diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 9057ac30..00000000 --- a/composer.lock +++ /dev/null @@ -1,2303 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" - ], - "hash": "c97b33f82a1e14bf632925de72277467", - "packages": [ - { - "name": "cboden/ratchet", - "version": "0.3.x-dev", - "source": { - "type": "git", - "url": "https://github.com/cboden/Ratchet.git", - "reference": "f4ddea5f44bc64c06016acea9da80e5e87830a7a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cboden/Ratchet/zipball/f4ddea5f44bc64c06016acea9da80e5e87830a7a", - "reference": "f4ddea5f44bc64c06016acea9da80e5e87830a7a", - "shasum": "" - }, - "require": { - "guzzle/http": ">=3.0,<4.0", - "php": ">=5.3.9", - "react/socket": ">=0.2,<1.0", - "symfony/http-foundation": ">=2.2,<3.0", - "symfony/routing": ">=2.2,<3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Ratchet\\Tests": "tests", - "Ratchet": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "http://res.im", - "role": "Developer" - } - ], - "description": "PHP WebSocket library", - "homepage": "http://socketo.me", - "keywords": [ - "Ratchet", - "WebSockets", - "server", - "sockets" - ], - "time": "2013-05-29 11:51:33" - }, - { - "name": "classpreloader/classpreloader", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/mtdowling/ClassPreloader.git", - "reference": "62c99d52ce2f1b0b8449c61e2d94f48d918222eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mtdowling/ClassPreloader/zipball/62c99d52ce2f1b0b8449c61e2d94f48d918222eb", - "reference": "62c99d52ce2f1b0b8449c61e2d94f48d918222eb", - "shasum": "" - }, - "require": { - "nikic/php-parser": "*", - "php": ">=5.3.3", - "symfony/console": ">2.0", - "symfony/filesystem": ">2.0", - "symfony/finder": ">2.0" - }, - "bin": [ - "classpreloader.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.0-dev" - } - }, - "autoload": { - "psr-0": { - "ClassPreloader": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", - "keywords": [ - "autoload", - "class", - "preload" - ], - "time": "2013-05-26 16:10:36" - }, - { - "name": "codescale/ffmpeg-php", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/CodeScaleInc/ffmpeg-php.git", - "reference": "2.7.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/CodeScaleInc/ffmpeg-php/zipball/2.7.0", - "reference": "2.7.0", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "." - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "New BSD" - ], - "authors": [ - { - "name": "char0n (Vladimír Gorej, CodeScale s.r.o.)", - "email": "gorej@codescale.net", - "homepage": "http://www.codescale.net/", - "role": "Development lead" - } - ], - "description": "PHP wrapper for FFmpeg application", - "homepage": "http://freecode.com/projects/ffmpegphp", - "keywords": [ - "audio", - "ffmpeg", - "video" - ], - "time": "2013-05-05 09:10:04" - }, - { - "name": "doctrine/annotations", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "v1.1.1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/v1.1.1", - "reference": "v1.1.1", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "doctrine/cache": "1.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2013-04-20 08:30:17" - }, - { - "name": "doctrine/cache", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "45123145f70dd79618963a72a5271b4f389712e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/45123145f70dd79618963a72a5271b4f389712e4", - "reference": "45123145f70dd79618963a72a5271b4f389712e4", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Cache\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan H. Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ], - "time": "2013-05-13 02:51:07" - }, - { - "name": "doctrine/collections", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "3db3ab843ff76774bee4679d4cb3a10cffb0a935" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/3db3ab843ff76774bee4679d4cb3a10cffb0a935", - "reference": "3db3ab843ff76774bee4679d4cb3a10cffb0a935", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Collections\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Collections Abstraction library", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "array", - "collections", - "iterator" - ], - "time": "2013-05-26 05:21:22" - }, - { - "name": "doctrine/common", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "2169b0ce1d253d448c60b7d40bbe4e4b5afe22fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/2169b0ce1d253d448c60b7d40bbe4e4b5afe22fe", - "reference": "2169b0ce1d253d448c60b7d40bbe4e4b5afe22fe", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/inflector": "1.*", - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Common Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "collections", - "eventmanager", - "persistence", - "spl" - ], - "time": "2013-05-27 19:11:46" - }, - { - "name": "doctrine/dbal", - "version": "2.3.x-dev", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "6a62fefefde6b2c0d8b3df70151d6a81fc028d28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/6a62fefefde6b2c0d8b3df70151d6a81fc028d28", - "reference": "6a62fefefde6b2c0d8b3df70151d6a81fc028d28", - "shasum": "" - }, - "require": { - "doctrine/common": ">=2.3.0,<2.5-dev", - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\DBAL": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - } - ], - "description": "Database Abstraction Layer", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "database", - "dbal", - "persistence", - "queryobject" - ], - "time": "2013-05-21 05:53:02" - }, - { - "name": "doctrine/inflector", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "8b4b3ccec7aafc596e2fc1e593c9f2e78f939c8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b4b3ccec7aafc596e2fc1e593c9f2e78f939c8c", - "reference": "8b4b3ccec7aafc596e2fc1e593c9f2e78f939c8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" - ], - "time": "2013-04-10 16:14:30" - }, - { - "name": "doctrine/lexer", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94", - "reference": "bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2013-03-07 12:15:25" - }, - { - "name": "evenement/evenement", - "version": "1.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/igorw/evenement.git", - "reference": "8b0918f8374327dfed4408fe467980ab41d556dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/8b0918f8374327dfed4408fe467980ab41d556dd", - "reference": "8b0918f8374327dfed4408fe467980ab41d556dd", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-0": { - "Evenement": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch", - "homepage": "http://wiedler.ch/igor/" - } - ], - "description": "Événement is a very simple event dispatching library for PHP 5.3", - "keywords": [ - "event-dispatcher" - ], - "time": "2012-12-29 17:04:52" - }, - { - "name": "filp/whoops", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "1.0.6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/1.0.6", - "reference": "1.0.6", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "mockery/mockery": "dev-master", - "silex/silex": "1.0.*@dev" - }, - "type": "library", - "autoload": { - "psr-0": { - "Whoops": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "description": "php error handling for cool kids", - "homepage": "https://github.com/filp/whoops", - "keywords": [ - "error", - "exception", - "handling", - "library", - "silex-provider", - "whoops", - "zf2" - ], - "time": "2013-05-10 22:13:22" - }, - { - "name": "guzzle/common", - "version": "dev-master", - "target-dir": "Guzzle/Common", - "source": { - "type": "git", - "url": "https://github.com/guzzle/common.git", - "reference": "v3.6.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/common/zipball/v3.6.0", - "reference": "v3.6.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.2", - "symfony/event-dispatcher": ">=2.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Common": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Common libraries used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "collection", - "common", - "event", - "exception" - ], - "time": "2013-05-30 07:01:25" - }, - { - "name": "guzzle/http", - "version": "dev-master", - "target-dir": "Guzzle/Http", - "source": { - "type": "git", - "url": "https://github.com/guzzle/http.git", - "reference": "v3.6.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/http/zipball/v3.6.0", - "reference": "v3.6.0", - "shasum": "" - }, - "require": { - "guzzle/common": "self.version", - "guzzle/parser": "self.version", - "guzzle/stream": "self.version", - "php": ">=5.3.2" - }, - "suggest": { - "ext-curl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Http": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "HTTP libraries used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "client", - "curl", - "http", - "http client" - ], - "time": "2013-05-30 07:01:25" - }, - { - "name": "guzzle/parser", - "version": "dev-master", - "target-dir": "Guzzle/Parser", - "source": { - "type": "git", - "url": "https://github.com/guzzle/parser.git", - "reference": "v3.6.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/parser/zipball/v3.6.0", - "reference": "v3.6.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Parser": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Interchangeable parsers used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "URI Template", - "cookie", - "http", - "message", - "url" - ], - "time": "2013-05-30 07:01:25" - }, - { - "name": "guzzle/stream", - "version": "dev-master", - "target-dir": "Guzzle/Stream", - "source": { - "type": "git", - "url": "https://github.com/guzzle/stream.git", - "reference": "v3.6.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/stream/zipball/v3.6.0", - "reference": "v3.6.0", - "shasum": "" - }, - "require": { - "guzzle/common": "self.version", - "php": ">=5.3.2" - }, - "suggest": { - "guzzle/http": "To convert Guzzle request objects to PHP streams" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Stream": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle stream wrapper component", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "component", - "stream" - ], - "time": "2013-05-30 07:01:25" - }, - { - "name": "ircmaxell/password-compat", - "version": "1.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/ircmaxell/password_compat.git", - "reference": "v1.0.3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/v1.0.3", - "reference": "v1.0.3", - "shasum": "" - }, - "type": "library", - "autoload": { - "files": [ - "lib/password.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthony Ferrara", - "email": "ircmaxell@php.net", - "homepage": "http://blog.ircmaxell.com" - } - ], - "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", - "homepage": "https://github.com/ircmaxell/password_compat", - "keywords": [ - "hashing", - "password" - ], - "time": "2013-04-30 19:58:08" - }, - { - "name": "kriswallsmith/assetic", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/kriswallsmith/assetic.git", - "reference": "d5311bf231ecf8a1e4b8ae00dcb15651b63dfed5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/d5311bf231ecf8a1e4b8ae00dcb15651b63dfed5", - "reference": "d5311bf231ecf8a1e4b8ae00dcb15651b63dfed5", - "shasum": "" - }, - "require": { - "php": ">=5.3.1", - "symfony/process": ">=2.1,<3.0" - }, - "require-dev": { - "cssmin/cssmin": "*", - "joliclic/javascript-packer": "*", - "kamicane/packager": "*", - "leafo/lessphp": "*", - "leafo/scssphp": "*", - "leafo/scssphp-compass": "*", - "mrclay/minify": "*", - "phpunit/phpunit": ">=3.7,<4.0", - "ptachoire/cssembed": "*", - "twig/twig": ">=1.6,<2.0" - }, - "suggest": { - "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", - "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler", - "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin", - "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", - "twig/twig": "Assetic provides the integration with the Twig templating engine" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "psr-0": { - "Assetic": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kris Wallsmith", - "email": "kris.wallsmith@gmail.com", - "homepage": "http://kriswallsmith.net/" - } - ], - "description": "Asset Management for PHP", - "homepage": "https://github.com/kriswallsmith/assetic", - "keywords": [ - "assets", - "compression", - "minification" - ], - "time": "2013-06-04 14:31:31" - }, - { - "name": "laravel/framework", - "version": "4.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/laravel/framework.git", - "reference": "444dbc5d02fa1e10737fcb06dd7124731f88a819" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/444dbc5d02fa1e10737fcb06dd7124731f88a819", - "reference": "444dbc5d02fa1e10737fcb06dd7124731f88a819", - "shasum": "" - }, - "require": { - "classpreloader/classpreloader": "1.0.*", - "doctrine/dbal": "2.3.x", - "filp/whoops": "1.0.6", - "ircmaxell/password-compat": "1.0.*", - "monolog/monolog": "1.5.*", - "nesbot/carbon": "1.*", - "patchwork/utf8": "1.1.*", - "php": ">=5.3.0", - "predis/predis": "0.8.*", - "swiftmailer/swiftmailer": "5.0.*", - "symfony/browser-kit": "2.3.*", - "symfony/console": "2.3.*", - "symfony/css-selector": "2.3.*", - "symfony/debug": "2.3.*", - "symfony/dom-crawler": "2.3.*", - "symfony/event-dispatcher": "2.3.*", - "symfony/finder": "2.3.*", - "symfony/http-foundation": "2.3.*", - "symfony/http-kernel": "2.3.*", - "symfony/process": "2.3.*", - "symfony/routing": "2.3.*", - "symfony/translation": "2.3.*" - }, - "replace": { - "illuminate/auth": "self.version", - "illuminate/cache": "self.version", - "illuminate/config": "self.version", - "illuminate/console": "self.version", - "illuminate/container": "self.version", - "illuminate/cookie": "self.version", - "illuminate/database": "self.version", - "illuminate/encryption": "self.version", - "illuminate/events": "self.version", - "illuminate/exception": "self.version", - "illuminate/filesystem": "self.version", - "illuminate/foundation": "self.version", - "illuminate/hashing": "self.version", - "illuminate/html": "self.version", - "illuminate/http": "self.version", - "illuminate/log": "self.version", - "illuminate/mail": "self.version", - "illuminate/pagination": "self.version", - "illuminate/queue": "self.version", - "illuminate/redis": "self.version", - "illuminate/routing": "self.version", - "illuminate/session": "self.version", - "illuminate/support": "self.version", - "illuminate/translation": "self.version", - "illuminate/validation": "self.version", - "illuminate/view": "self.version", - "illuminate/workbench": "self.version" - }, - "require-dev": { - "aws/aws-sdk-php": "2.2.*", - "iron-io/iron_mq": "1.4.4", - "mockery/mockery": "0.7.2", - "pda/pheanstalk": "2.0.*", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - [ - "src/Illuminate/Queue/IlluminateQueueClosure.php" - ] - ], - "files": [ - "src/Illuminate/Support/helpers.php" - ], - "psr-0": { - "Illuminate": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Laravel Framework.", - "keywords": [ - "framework", - "laravel" - ], - "time": "2013-06-04 21:58:42" - }, - { - "name": "monolog/monolog", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "1.5.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1.5.0", - "reference": "1.5.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": ">=1.0,<2.0" - }, - "require-dev": { - "doctrine/couchdb": "dev-master", - "mlehner/gelf-php": "1.0.*", - "raven/raven": "0.3.*" - }, - "suggest": { - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server", - "raven/raven": "Allow sending log messages to a Sentry server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Monolog": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be", - "role": "Developer" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2013-04-23 10:09:48" - }, - { - "name": "nesbot/carbon", - "version": "1.2.0", - "source": { - "type": "git", - "url": "git://github.com/briannesbitt/Carbon.git", - "reference": "1.2.0" - }, - "dist": { - "type": "zip", - "url": "https://github.com/briannesbitt/Carbon/zipball/1.2.0", - "reference": "1.2.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Carbon": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - } - ], - "description": "A simple API extension for DateTime.", - "homepage": "https://github.com/briannesbitt/Carbon", - "keywords": [ - "date", - "datetime", - "time" - ], - "time": "2012-10-14 17:41:18" - }, - { - "name": "nikic/php-parser", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "5ccf6196d6925e66568e3b8460c262e9512e4b92" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/5ccf6196d6925e66568e3b8460c262e9512e4b92", - "reference": "5ccf6196d6925e66568e3b8460c262e9512e4b92", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9-dev" - } - }, - "autoload": { - "psr-0": { - "PHPParser": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2013-05-23 13:17:59" - }, - { - "name": "patchwork/utf8", - "version": "v1.1.8", - "source": { - "type": "git", - "url": "https://github.com/nicolas-grekas/Patchwork-UTF8.git", - "reference": "v1.1.8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nicolas-grekas/Patchwork-UTF8/zipball/v1.1.8", - "reference": "v1.1.8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Patchwork": "class/", - "Normalizer": "class/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "(Apache-2.0 or GPL-2.0)" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com", - "role": "Developer" - } - ], - "description": "UTF-8 strings handling for PHP 5.3: portable, performant and extended", - "homepage": "https://github.com/nicolas-grekas/Patchwork-UTF8", - "keywords": [ - "i18n", - "unicode", - "utf-8", - "utf8" - ], - "time": "2013-05-24 12:11:22" - }, - { - "name": "predis/predis", - "version": "0.8.x-dev", - "source": { - "type": "git", - "url": "https://github.com/nrk/predis.git", - "reference": "aa458a1922a99611d7f81795bedff88459bc8753" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nrk/predis/zipball/aa458a1922a99611d7f81795bedff88459bc8753", - "reference": "aa458a1922a99611d7f81795bedff88459bc8753", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "suggest": { - "ext-curl": "Allows access to Webdis when paired with phpiredis", - "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" - }, - "type": "library", - "autoload": { - "psr-0": { - "Predis": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniele Alessandri", - "email": "suppakilla@gmail.com", - "homepage": "http://clorophilla.net" - } - ], - "description": "Flexible and feature-complete PHP client library for Redis", - "homepage": "http://github.com/nrk/predis", - "keywords": [ - "nosql", - "predis", - "redis" - ], - "time": "2013-06-03 10:04:10" - }, - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log", - "reference": "1.0.0" - }, - "dist": { - "type": "zip", - "url": "https://github.com/php-fig/log/archive/1.0.0.zip", - "reference": "1.0.0", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - }, - { - "name": "react/event-loop", - "version": "dev-master", - "target-dir": "React/EventLoop", - "source": { - "type": "git", - "url": "https://github.com/reactphp/event-loop.git", - "reference": "v0.3.2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/v0.3.2", - "reference": "v0.3.2", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-libev": "*", - "ext-libevent": ">=0.0.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "autoload": { - "psr-0": { - "React\\EventLoop": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Event loop abstraction layer that libraries can use for evented I/O.", - "keywords": [ - "event-loop" - ], - "time": "2013-01-14 23:11:47" - }, - { - "name": "react/socket", - "version": "dev-master", - "target-dir": "React/Socket", - "source": { - "type": "git", - "url": "https://github.com/reactphp/socket.git", - "reference": "v0.3.2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/v0.3.2", - "reference": "v0.3.2", - "shasum": "" - }, - "require": { - "evenement/evenement": "1.0.*", - "php": ">=5.3.3", - "react/event-loop": "0.3.*", - "react/stream": "0.3.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "autoload": { - "psr-0": { - "React\\Socket": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Library for building an evented socket server.", - "keywords": [ - "Socket" - ], - "time": "2013-04-26 20:23:10" - }, - { - "name": "react/stream", - "version": "dev-master", - "target-dir": "React/Stream", - "source": { - "type": "git", - "url": "https://github.com/reactphp/stream.git", - "reference": "v0.3.2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/v0.3.2", - "reference": "v0.3.2", - "shasum": "" - }, - "require": { - "evenement/evenement": "1.0.*", - "php": ">=5.3.3" - }, - "suggest": { - "react/event-loop": "0.3.*", - "react/promise": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "autoload": { - "psr-0": { - "React\\Stream": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Basic readable and writable stream interfaces that support piping.", - "keywords": [ - "pipe", - "stream" - ], - "time": "2013-05-10 15:12:22" - }, - { - "name": "swiftmailer/swiftmailer", - "version": "v5.0.0", - "source": { - "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "v5.0.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/v5.0.0", - "reference": "v5.0.0", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "autoload": { - "files": [ - "lib/swift_required.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Chris Corbyn" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "http://swiftmailer.org", - "keywords": [ - "mail", - "mailer" - ], - "time": "2013-04-30 17:35:30" - }, - { - "name": "symfony/browser-kit", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/BrowserKit", - "source": { - "type": "git", - "url": "https://github.com/symfony/BrowserKit.git", - "reference": "v2.3.0-RC1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/v2.3.0-RC1", - "reference": "v2.3.0-RC1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/dom-crawler": ">=2.0,<3.0" - }, - "require-dev": { - "symfony/css-selector": ">=2.0,<3.0", - "symfony/process": ">=2.0,<3.0" - }, - "suggest": { - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\BrowserKit\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony BrowserKit Component", - "homepage": "http://symfony.com", - "time": "2013-05-15 15:16:47" - }, - { - "name": "symfony/console", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/Console", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "v2.3.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/v2.3.0", - "reference": "v2.3.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/event-dispatcher": ">=2.1,<3.0" - }, - "suggest": { - "symfony/event-dispatcher": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "http://symfony.com", - "time": "2013-05-30 05:11:26" - }, - { - "name": "symfony/css-selector", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/CssSelector", - "source": { - "type": "git", - "url": "https://github.com/symfony/CssSelector.git", - "reference": "v2.3.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/v2.3.0", - "reference": "v2.3.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\CssSelector\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - } - ], - "description": "Symfony CssSelector Component", - "homepage": "http://symfony.com", - "time": "2013-05-19 18:59:12" - }, - { - "name": "symfony/debug", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/Debug", - "source": { - "type": "git", - "url": "https://github.com/symfony/Debug.git", - "reference": "v2.3.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/v2.3.0", - "reference": "v2.3.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/http-foundation": ">=2.1,<3.0", - "symfony/http-kernel": ">=2.1,<3.0" - }, - "suggest": { - "symfony/class-loader": "", - "symfony/http-foundation": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Debug\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "http://symfony.com", - "time": "2013-06-02 11:58:44" - }, - { - "name": "symfony/dom-crawler", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/DomCrawler", - "source": { - "type": "git", - "url": "https://github.com/symfony/DomCrawler.git", - "reference": "3cf81e7a021853183aa303181afc6e6868bf48ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/3cf81e7a021853183aa303181afc6e6868bf48ce", - "reference": "3cf81e7a021853183aa303181afc6e6868bf48ce", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/css-selector": ">=2.0,<3.0" - }, - "suggest": { - "symfony/css-selector": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\DomCrawler\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony DomCrawler Component", - "homepage": "http://symfony.com", - "time": "2013-05-19 19:00:48" - }, - { - "name": "symfony/event-dispatcher", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "v2.3.0-RC1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.3.0-RC1", - "reference": "v2.3.0-RC1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/dependency-injection": ">=2.0,<3.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2013-05-13 14:36:40" - }, - { - "name": "symfony/filesystem", - "version": "dev-master", - "target-dir": "Symfony/Component/Filesystem", - "source": { - "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "3567f5f48305098044c6d6a383f5cefec9c45efa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/3567f5f48305098044c6d6a383f5cefec9c45efa", - "reference": "3567f5f48305098044c6d6a383f5cefec9c45efa", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "http://symfony.com", - "time": "2013-05-16 07:54:39" - }, - { - "name": "symfony/finder", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/Finder", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "v2.3.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/v2.3.0", - "reference": "v2.3.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "http://symfony.com", - "time": "2013-06-02 12:05:51" - }, - { - "name": "symfony/http-foundation", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/HttpFoundation", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "v2.3.0-RC1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.3.0-RC1", - "reference": "v2.3.0-RC1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "http://symfony.com", - "time": "2013-05-10 06:00:03" - }, - { - "name": "symfony/http-kernel", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/HttpKernel", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", - "reference": "4f0f6485abe0e2e8b8a94369fb98b8447fb1e3cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/4f0f6485abe0e2e8b8a94369fb98b8447fb1e3cc", - "reference": "4f0f6485abe0e2e8b8a94369fb98b8447fb1e3cc", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "psr/log": ">=1.0,<2.0", - "symfony/debug": ">=2.3,<3.0", - "symfony/event-dispatcher": ">=2.1,<3.0", - "symfony/http-foundation": ">=2.2,<3.0" - }, - "require-dev": { - "symfony/browser-kit": "2.2.*", - "symfony/class-loader": ">=2.1,<3.0", - "symfony/config": ">=2.0,<3.0", - "symfony/console": "2.2.*", - "symfony/dependency-injection": ">=2.0,<3.0", - "symfony/finder": ">=2.0,<3.0", - "symfony/process": ">=2.0,<3.0", - "symfony/routing": ">=2.2,<3.0", - "symfony/stopwatch": ">=2.2,<3.0" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpKernel\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "http://symfony.com", - "time": "2013-06-03 15:11:57" - }, - { - "name": "symfony/process", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/Process", - "source": { - "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "v2.3.0-RC1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/v2.3.0-RC1", - "reference": "v2.3.0-RC1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Process\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "http://symfony.com", - "time": "2013-05-06 20:03:44" - }, - { - "name": "symfony/routing", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/Routing", - "source": { - "type": "git", - "url": "https://github.com/symfony/Routing.git", - "reference": "v2.3.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/v2.3.0", - "reference": "v2.3.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "doctrine/common": ">=2.2,<3.0", - "psr/log": ">=1.0,<2.0", - "symfony/config": ">=2.2,<3.0", - "symfony/yaml": ">=2.0,<3.0" - }, - "suggest": { - "doctrine/common": "", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Routing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Routing Component", - "homepage": "http://symfony.com", - "time": "2013-05-20 08:57:26" - }, - { - "name": "symfony/translation", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/Translation", - "source": { - "type": "git", - "url": "https://github.com/symfony/Translation.git", - "reference": "v2.3.0-RC1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/v2.3.0-RC1", - "reference": "v2.3.0-RC1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/config": ">=2.0,<3.0", - "symfony/yaml": ">=2.2,<3.0" - }, - "suggest": { - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Translation Component", - "homepage": "http://symfony.com", - "time": "2013-05-13 14:36:40" - } - ], - "packages-dev": [ - - ], - "aliases": [ - - ], - "minimum-stability": "dev", - "stability-flags": { - "kriswallsmith/assetic": 20 - }, - "platform": [ - - ], - "platform-dev": [ - - ] -} diff --git a/vendor/autoload.php b/vendor/autoload.php deleted file mode 100644 index 8da77fca..00000000 --- a/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ -outFilePath = $outFilePath; - $this->width = $width; - $this->height = $height; - $this->frameRate = $frameRate; - $this->loopCount = ($loopCount < -1) ? 0 : $loopCount; - $this->frames = array(); - $this->counter = -1; - } - - /** - * Add a frame to the end of the animated gif. - * - * @param FFmpegFrame $frame frame to add - * @return void - */ - public function addFrame(FFmpegFrame $frame) { - $tmpFrame = clone $frame; - $tmpFrame->resize($this->width, $this->height); - ob_start(); - imagegif($tmpFrame->toGDImage()); - $this->frames[] = ob_get_clean(); - $tmpFrame = null; - } - - /** - * Adding header to the animation - * - * @return void - */ - protected function addGifHeader() { - $cmap = 0; - - if (ord($this->frames[0]{10}) & 0x80) { - $cmap = 3 * (2 << (ord($this->frames[0]{10}) & 0x07)); - - $this->gifData = 'GIF89a'; - $this->gifData .= substr($this->frames[0], 6, 7); - $this->gifData .= substr($this->frames[0], 13, $cmap); - $this->gifData .= "!\377\13NETSCAPE2.0\3\1".$this->getGifWord($this->loopCount)."\0"; - } - } - - /** - * Adding frame binary data to the animation - * - * @param int $i index of frame from FFmpegAnimatedGif::frame array - * @param int $d delay (5 seconds = 500 delay units) - * @return void - */ - protected function addFrameData($i, $d) { - $DIS = 2; - $COL = 0; - - $Locals_str = 13 + 3 * (2 << (ord($this->frames[$i]{10}) & 0x07)); - $Locals_end = strlen($this->frames[$i]) - $Locals_str - 1; - $Locals_tmp = substr($this->frames[$i], $Locals_str, $Locals_end ); - - $Global_len = 2 << (ord($this->frames[0]{10}) & 0x07); - $Locals_len = 2 << (ord($this->frames[$i]{10}) & 0x07); - - $Global_rgb = substr($this->frames[0], 13, 3 * (2 << (ord($this->frames[0]{10}) & 0x07))); - $Locals_rgb = substr($this->frames[$i], 13, 3 * (2 << (ord($this->frames[$i]{10}) & 0x07))); - - $Locals_ext = "!\xF9\x04".chr(($DIS << 2 ) + 0). chr(($d >> 0) & 0xFF).chr(($d >> 8) & 0xFF)."\x0\x0"; - - if ($COL > -1 && ord($this->frames[$i]{10}) & 0x80) { - for ($j = 0; $j < (2 << (ord($this->frames[$i]{10}) & 0x07)); $j++) { - if (ord($Locals_rgb{3 * $j + 0}) == (($COL >> 16 ) & 0xFF) - && ord($Locals_rgb{3 * $j + 1}) == (($COL >> 8 ) & 0xFF) - && ord($Locals_rgb{3 * $j + 2}) == (($COL >> 0 ) & 0xFF) - ) { - $Locals_ext = "!\xF9\x04".chr(($DIS << 2) + 1).chr(($d >> 0) & 0xFF).chr(($d >> 8) & 0xFF).chr($j)."\x0"; - break; - } - } - } - switch ($Locals_tmp{0}) { - case "!": - $Locals_img = substr($Locals_tmp, 8, 10); - $Locals_tmp = substr($Locals_tmp, 18, strlen($Locals_tmp) - 18); - break; - case ",": - $Locals_img = substr($Locals_tmp, 0, 10); - $Locals_tmp = substr($Locals_tmp, 10, strlen($Locals_tmp) - 10); - break; - } - if (ord($this->frames[$i]{10}) & 0x80 && $this->counter > -1) { - if ($Global_len == $Locals_len) { - if ($this->gifBlockCompare($Global_rgb, $Locals_rgb, $Global_len)) { - $this->gifData .= ($Locals_ext.$Locals_img.$Locals_tmp); - } - else { - $byte = ord($Locals_img{9}); - $byte |= 0x80; - $byte &= 0xF8; - $byte |= (ord($this->frames[0]{10}) & 0x07); - $Locals_img{9} = chr ($byte); - $this->gifData .= ($Locals_ext.$Locals_img.$Locals_rgb.$Locals_tmp); - } - } - else { - $byte = ord($Locals_img{9}); - $byte |= 0x80; - $byte &= 0xF8; - $byte |= (ord($this->frames[$i]{10}) & 0x07); - $Locals_img{9} = chr($byte); - $this->gifData .= ($Locals_ext.$Locals_img.$Locals_rgb.$Locals_tmp); - } - } - else { - $this->gifData .= ($Locals_ext.$Locals_img.$Locals_tmp); - } - $this->counter = 1; - } - - /** - * Adding footer to the animation - * - * @return void - */ - protected function addGifFooter() { - $this->gifData .= ';'; - } - - /** - * Gif integer wrapper - * - * @param int $int - * @return string - */ - protected function getGifWord($int) { - - return (chr($int & 0xFF).chr(($int >> 8 ) & 0xFF)); - } - - /** - * Gif compare block - * - * @param string $GlobalBlock - * @param string $LocalBlock - * @param int $Len - * @return int - */ - protected function gifBlockCompare($GlobalBlock, $LocalBlock, $Len) { - for ($i = 0; $i < $Len; $i++) { - if ( - $GlobalBlock{3 * $i + 0} != $LocalBlock {3 * $i + 0} || - $GlobalBlock{3 * $i + 1} != $LocalBlock {3 * $i + 1} || - $GlobalBlock{3 * $i + 2} != $LocalBlock {3 * $i + 2} - ) { - return (0); - } - } - - return (1); - } - - /** - * Saving animated gif to remote file - * - * @return boolean - */ - public function save() { - // No images to proces - if (count($this->frames) == 0) return false; - - return (boolean) file_put_contents($this->outFilePath, $this->getAnimation(), LOCK_EX); - } - - /** - * Getting animation binary data - * - * @return string|boolean - */ - public function getAnimation() { - // No images to proces - if (count($this->frames) == 0) return false; - - // Process images as animation - $this->addGifHeader(); - for ($i = 0; $i < count($this->frames); $i++) { - $this->addFrameData($i, (1 / $this->frameRate * 100)); - } - $this->addGifFooter(); - - return $this->gifData; - } - - public function serialize() { - return serialize(array( - $this->outFilePath, - $this->width, - $this->height, - $this->frameRate, - $this->loopCount, - $this->gifData, - $this->frames, - $this->counter - )); - } - - public function unserialize($serialized) { - $data = unserialize($serialized); - list( - $this->outFilePath, - $this->width, - $this->height, - $this->frameRate, - $this->loopCount, - $this->gifData, - $this->frames, - $this->counter - ) = $data; - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/FFmpegAutoloader.php b/vendor/codescale/ffmpeg-php/FFmpegAutoloader.php deleted file mode 100644 index f823af58..00000000 --- a/vendor/codescale/ffmpeg-php/FFmpegAutoloader.php +++ /dev/null @@ -1,63 +0,0 @@ - 'FFmpegAnimatedGif.php', - 'FFmpegFrame' => 'FFmpegFrame.php', - 'FFmpegMovie' => 'FFmpegMovie.php', - 'ffmpeg_animated_gif' => 'adapter'.DIRECTORY_SEPARATOR.'ffmpeg_animated_gif.php', - 'ffmpeg_frame' => 'adapter'.DIRECTORY_SEPARATOR.'ffmpeg_frame.php', - 'ffmpeg_movie' => 'adapter'.DIRECTORY_SEPARATOR.'ffmpeg_movie.php', - 'OutputProvider' => 'provider'.DIRECTORY_SEPARATOR.'OutputProvider.php', - 'AbstractOutputProvider' => 'provider'.DIRECTORY_SEPARATOR.'AbstractOutputProvider.php', - 'FFmpegOutputProvider' => 'provider'.DIRECTORY_SEPARATOR.'FFmpegOutputProvider.php', - 'FFprobeOutputProvider' => 'provider'.DIRECTORY_SEPARATOR.'FFprobeOutputProvider.php', - 'StringOutputProvider' => 'provider'.DIRECTORY_SEPARATOR.'StringOutputProvider.php' - ); - } - } - - /** - * Autoloading mechanizm - * - * @param string $className name of the class to be loaded - * @return boolean - */ - public static function autoload($className) { - if (array_key_exists($className, self::$classes)) { - require_once dirname(__FILE__).DIRECTORY_SEPARATOR.self::$classes[$className]; - return true; - } - return false; - } - - /** - * Registering autoloading mechanizm - */ - public static function register() { - if (function_exists('__autoload')) { - trigger_error('FFmpegPHP uses spl_autoload_register() which will bypass your __autoload() and may break your autoloading', E_USER_WARNING); - } else { - self::initClasses(); - spl_autoload_register(array('FFmpegAutoloader', 'autoload')); - } - } -} - -FFmpegAutoloader::register(); \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/FFmpegFrame.php b/vendor/codescale/ffmpeg-php/FFmpegFrame.php deleted file mode 100644 index 8929c42e..00000000 --- a/vendor/codescale/ffmpeg-php/FFmpegFrame.php +++ /dev/null @@ -1,192 +0,0 @@ -gdImageData = $this->gdImageToBinaryData($gdImage); - $this->width = imagesx($gdImage); - $this->height = imagesy($gdImage); - $this->pts = $pts; - } - - /** - * Return the width of the frame. - * - * @return int - */ - public function getWidth() { - return $this->width; - } - - /** - * Return the height of the frame. - * - * @return int - */ - public function getHeight() { - return $this->height; - } - - /** - * Return the presentation time stamp of the frame; alias $frame->getPresentationTimestamp() - * - * @return float - */ - public function getPTS() { - return $this->pts; - } - - /** - * Return the presentation time stamp of the frame. - * - * @return float - */ - public function getPresentationTimestamp() { - return $this->getPTS(); - } - - /** - * Resize and optionally crop the frame. (Cropping is built into ffmpeg resizing so I'm providing it here for completeness.) - * - * * width - New width of the frame (must be an even number). - * * height - New height of the frame (must be an even number). - * * croptop - Remove [croptop] rows of pixels from the top of the frame. - * * cropbottom - Remove [cropbottom] rows of pixels from the bottom of the frame. - * * cropleft - Remove [cropleft] rows of pixels from the left of the frame. - * * cropright - Remove [cropright] rows of pixels from the right of the frame. - * - * - * NOTE: Cropping is always applied to the frame before it is resized. Crop values must be even numbers. - * - * @param int $width - * @param int $height - * @param int $cropTop OPTIONAL parameter; DEFAULT value - 0 - * @param int $cropBottom OPTIONAL parameter; DEFAULT value - 0 - * @param int $cropLeft OPTIONAL parameter; DEFAULT value - 0 - * @param int $cropRight OPTIONAL parameter; DEFAULT value - 0 - * @return void - */ - public function resize($width, $height, $cropTop = 0, $cropBottom = 0, $cropLeft = 0, $cropRight = 0) { - $widthCrop = ($cropLeft + $cropRight); - $heightCrop = ($cropTop + $cropBottom); - $width -= $widthCrop; - $height -= $heightCrop; - $resizedImage = imagecreatetruecolor($width, $height); - $gdImage = $this->toGDImage(); - imagecopyresampled($resizedImage, $gdImage, 0, 0, $cropLeft, $cropTop, $width, $height, $this->getWidth() - $widthCrop, $this->getHeight() - $heightCrop); - imageconvolution($resizedImage, array( - array( -1, -1, -1 ), - array( -1, 24, -1 ), - array( -1, -1, -1 ), - ), 16, 0); - - $this->gdImageData = $this->gdImageToBinaryData($resizedImage); - $this->width = imagesx($resizedImage); - $this->height = imagesy($resizedImage); - imagedestroy($gdImage); - imagedestroy($resizedImage); - } - - /** - * Crop the frame. - * - * * croptop - Remove [croptop] rows of pixels from the top of the frame. - * * cropbottom - Remove [cropbottom] rows of pixels from the bottom of the frame. - * * cropleft - Remove [cropleft] rows of pixels from the left of the frame. - * * cropright - Remove [cropright] rows of pixels from the right of the frame. - * - * NOTE: Crop values must be even numbers. - * - * @param int $cropTop - * @param int $cropBottom OPTIONAL parameter; DEFAULT value - 0 - * @param int $cropLeft OPTIONAL parameter; DEFAULT value - 0 - * @param int $cropRight OPTIONAL parameter; DEFAULT value - 0 - * @return void - */ - public function crop($cropTop, $cropBottom = 0, $cropLeft = 0, $cropRight = 0) { - $this->resize($this->getWidth(), $this->getHeight(), $cropTop, $cropBottom, $cropLeft, $cropRight); - } - - /** - * Returns a truecolor GD image of the frame. - * - * @return resource resource of type gd - */ - public function toGDImage() { - return imagecreatefromstring($this->gdImageData); - } - - protected function gdImageToBinaryData($gdImage) { - ob_start(); - imagegd2($gdImage); - return ob_get_clean(); - } - - public function serialize() { - $data = array( - $this->gdImageData, - $this->pts, - $this->width, - $this->height - ); - - return serialize($data); - } - - public function unserialize($serialized) { - $data = unserialize($serialized); - list($this->gdImageData, - $this->pts, - $this->width, - $this->height - ) = $data; - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/FFmpegMovie.php b/vendor/codescale/ffmpeg-php/FFmpegMovie.php deleted file mode 100644 index 8d90e947..00000000 --- a/vendor/codescale/ffmpeg-php/FFmpegMovie.php +++ /dev/null @@ -1,765 +0,0 @@ -movieFile = $moviePath; - $this->frameNumber = 0; - $this->ffmpegBinary = $ffmpegBinary; - if ($outputProvider === null) { - $outputProvider = new FFmpegOutputProvider($ffmpegBinary); - } - $this->setProvider($outputProvider); - } - - /** - * Setting provider implementation - * - * @param OutputProvider $outputProvider - */ - public function setProvider(OutputProvider $outputProvider) { - $this->provider = $outputProvider; - $this->provider->setMovieFile($this->movieFile); - $this->output = $this->provider->getOutput(); - } - - /** - * Getting current provider implementation - * - * @return OutputProvider - */ - public function getProvider() { - return $this->provider; - } - - /** - * Return the duration of a movie or audio file in seconds. - * - * @return float movie duration in seconds - */ - public function getDuration() { - if ($this->duration === null) { - $match = array(); - preg_match(self::$REGEX_DURATION, $this->output, $match); - if (array_key_exists(1, $match) && array_key_exists(2, $match) && array_key_exists(3, $match)) { - $hours = (int) $match[1]; - $minutes = (int) $match[2]; - $seconds = (int) $match[3]; - $fractions = (float) ((array_key_exists(5, $match)) ? "0.$match[5]" : 0.0); - - $this->duration = (($hours * (3600)) + ($minutes * 60) + $seconds + $fractions); - } else { - $this->duration = 0.0; - } - - return $this->duration; - } - - return $this->duration; - } - - /** - * Return the number of frames in a movie or audio file. - * - * @return int - */ - public function getFrameCount() { - if ($this->frameCount === null) { - $this->frameCount = (int) ($this->getDuration() * $this->getFrameRate()); - } - - return $this->frameCount; - } - - /** - * Return the frame rate of a movie in fps. - * - * @return float - */ - public function getFrameRate() { - if ($this->frameRate === null) { - $match = array(); - preg_match(self::$REGEX_FRAME_RATE, $this->output, $match); - $this->frameRate = (float) ((array_key_exists(1, $match)) ? $match[1] : 0.0); - } - - return $this->frameRate; - } - - /** - * Return the path and name of the movie file or audio file. - * - * @return string - */ - public function getFilename() { - return $this->movieFile; - } - - /** - * Return the comment field from the movie or audio file. - * - * @return string - */ - public function getComment() { - if ($this->comment === null) { - $match = array(); - preg_match(self::$REGEX_COMMENT, $this->output, $match); - $this->comment = (array_key_exists(2, $match)) ? trim($match[2]) : ''; - } - - return $this->comment; - } - - /** - * Return the title field from the movie or audio file. - * - * @return string - */ - public function getTitle() { - if ($this->title === null) { - $match = array(); - preg_match(self::$REGEX_TITLE, $this->output, $match); - $this->title = (array_key_exists(2, $match)) ? trim($match[2]) : ''; - } - - return $this->title; - } - - /** - * Return the author field from the movie or the artist ID3 field from an mp3 file; alias $movie->getArtist() - * - * @return string - */ - public function getArtist() { - if ($this->artist === null) { - $match = array(); - preg_match(self::$REGEX_ARTIST, $this->output, $match); - $this->artist = (array_key_exists(3, $match)) ? trim($match[3]) : ''; - } - - return $this->artist; - } - - /** - * Return the author field from the movie or the artist ID3 field from an mp3 file. - * - * @return string - */ - public function getAuthor() { - return $this->getArtist(); - } - - /** - * Return the copyright field from the movie or audio file. - * - * @return string - */ - public function getCopyright() { - if ($this->copyright === null) { - $match = array(); - preg_match(self::$REGEX_COPYRIGHT, $this->output, $match); - $this->copyright = (array_key_exists(2, $match)) ? trim($match[2]) : ''; - } - - return $this->copyright; - } - - /** - * Return the genre ID3 field from an mp3 file. - * - * @return string - */ - public function getGenre() { - if ($this->genre === null) { - $match = array(); - preg_match(self::$REGEX_GENRE, $this->output, $match); - $this->genre = (array_key_exists(2, $match)) ? trim($match[2]) : ''; - } - - return $this->genre; - } - - /** - * Return the track ID3 field from an mp3 file. - * - * @return int - */ - public function getTrackNumber() { - if ($this->trackNumber === null) { - $match = array(); - preg_match(self::$REGEX_TRACK_NUMBER, $this->output, $match); - $this->trackNumber = (int) ((array_key_exists(2, $match)) ? $match[2] : 0); - } - - return $this->trackNumber; - } - - /** - * Return the year ID3 field from an mp3 file. - * - * @return int - */ - public function getYear() { - if ($this->year === null) { - $match = array(); - preg_match(self::$REGEX_YEAR, $this->output, $match); - $this->year = (int) ((array_key_exists(2, $match)) ? $match[2] : 0); - } - - return $this->year; - } - - /** - * Return the height of the movie in pixels. - * - * @return int - */ - public function getFrameHeight() { - if ($this->frameHeight == null) { - $match = array(); - preg_match(self::$REGEX_FRAME_WH, $this->output, $match); - if (array_key_exists(1, $match) && array_key_exists(2, $match)) { - $this->frameWidth = (int) $match[1]; - $this->frameHeight = (int) $match[2]; - } else { - $this->frameWidth = 0; - $this->frameHeight = 0; - } - } - - return $this->frameHeight; - } - - /** - * Return the width of the movie in pixels. - * - * @return int - */ - public function getFrameWidth() { - if ($this->frameWidth === null) { - $this->getFrameHeight(); - } - - return $this->frameWidth; - } - - /** - * Return the pixel format of the movie. - * - * @return string - */ - public function getPixelFormat() { - if ($this->pixelFormat === null) { - $match = array(); - preg_match(self::$REGEX_PIXEL_FORMAT, $this->output, $match); - $this->pixelFormat = (array_key_exists(1, $match)) ? trim($match[1]) : ''; - } - - return $this->pixelFormat; - } - - /** - * Return the bit rate of the movie or audio file in bits per second. - * - * @return int - */ - public function getBitRate() { - if ($this->bitRate === null) { - $match = array(); - preg_match(self::$REGEX_BITRATE, $this->output, $match); - $this->bitRate = (int) ((array_key_exists(1, $match)) ? ($match[1] * 1000) : 0); - } - - return $this->bitRate; - } - - /** - * Return the bit rate of the video in bits per second. - * - * NOTE: This only works for files with constant bit rate. - * - * @return int - */ - public function getVideoBitRate() { - if ($this->videoBitRate === null) { - $match = array(); - preg_match(self::$REGEX_VIDEO_BITRATE, $this->output, $match); - $this->videoBitRate = (int) ((array_key_exists(1, $match)) ? ($match[1] * 1000) : 0); - } - - return $this->videoBitRate; - } - - /** - * Return the audio bit rate of the media file in bits per second. - * - * @return int - */ - public function getAudioBitRate() { - if ($this->audioBitRate === null) { - $match = array(); - preg_match(self::$REGEX_AUDIO_BITRATE, $this->output, $match); - $this->audioBitRate = (int) ((array_key_exists(1, $match)) ? ($match[1] * 1000) : 0); - } - - return $this->audioBitRate; - } - - /** - * Return the audio sample rate of the media file in bits per second. - * - * @return int - */ - public function getAudioSampleRate() { - if ($this->audioSampleRate === null) { - $match = array(); - preg_match(self::$REGEX_AUDIO_SAMPLE_RATE, $this->output, $match); - $this->audioSampleRate = (int) ((array_key_exists(1, $match)) ? $match[1] : 0); - } - - return $this->audioSampleRate; - } - - /** - * Return the current frame index. - * - * @return int - */ - public function getFrameNumber() { - return ($this->frameNumber == 0) ? 1 : $this->frameNumber; - } - - /** - * Return the name of the video codec used to encode this movie as a string. - * - * @return string - */ - public function getVideoCodec() { - if ($this->videoCodec === null) { - $match = array(); - preg_match(self::$REGEX_VIDEO_CODEC, $this->output, $match); - $this->videoCodec = (array_key_exists(1, $match)) ? trim($match[1]) : ''; - } - - return $this->videoCodec; - } - - /** - * Return the name of the audio codec used to encode this movie as a string. - * - * @return string - */ - public function getAudioCodec() { - if ($this->audioCodec === null) { - $match = array(); - preg_match(self::$REGEX_AUDIO_CODEC, $this->output, $match); - $this->audioCodec = (array_key_exists(1, $match)) ? trim($match[1]) : ''; - } - - return $this->audioCodec; - } - - /** - * Return the number of audio channels in this movie as an integer. - * - * @return int - */ - public function getAudioChannels() { - if ($this->audioChannels === null) { - $match = array(); - preg_match(self::$REGEX_AUDIO_CHANNELS, $this->output, $match); - if (array_key_exists(1, $match)) { - switch (trim($match[1])) { - case 'mono': - $this->audioChannels = 1; break; - case 'stereo': - $this->audioChannels = 2; break; - case '5.1': - $this->audioChannels = 6; break; - case '5:1': - $this->audioChannels = 6; break; - default: - $this->audioChannels = (int) $match[1]; - } - } else { - $this->audioChannels = 0; - } - } - - return $this->audioChannels; - } - - /** - * Return boolean value indicating whether the movie has an audio stream. - * - * @return boolean - */ - public function hasAudio() { - return (boolean) preg_match(self::$REGEX_HAS_AUDIO, $this->output); - } - - /** - * Return boolean value indicating whether the movie has a video stream. - * - * @return boolean - */ - public function hasVideo() { - return (boolean) preg_match(self::$REGEX_HAS_VIDEO, $this->output); - } - - /** - * Returns a frame from the movie as an FFmpegFrame object. Returns false if the frame was not found. - * - * * framenumber - Frame from the movie to return. If no framenumber is specified, returns the next frame of the movie. - * - * @param int $framenumber - * @param int $height - * @param int $width - * @param int $quality - * @return FFmpegFrame|boolean - */ - public function getFrame($framenumber = null, $height = null, $width = null, $quality = null) { - $framePos = ($framenumber === null) ? $this->frameNumber : (((int) $framenumber) - 1); - - // Frame position out of range - if (!is_numeric($framePos) || $framePos < 0 || $framePos > $this->getFrameCount()) { - return false; - } - - $frameTime = round((($framePos / $this->getFrameCount()) * $this->getDuration()), 4); - - $frame = $this->getFrameAtTime($frameTime, $height, $width, $quality); - - // Increment internal frame number - if ($framenumber === null) { - ++$this->frameNumber; - } - - return $frame; - } - - /** - * Returns a frame from the movie as an FFmpegFrame object. Returns false if the frame was not found. - * - * @param float $seconds - * @param int $width - * @param int $height - * @param int $quality - * @param string $frameFilePath - * @param array $output - * - * @throws Exception - * - * @return FFmpegFrame|boolean - * - */ - public function getFrameAtTime($seconds = null, $width = null, $height = null, $quality = null, $frameFilePath = null, &$output = null) { - // Set frame position for frame extraction - $frameTime = ($seconds === null) ? 0 : $seconds; - - // time out of range - if (!is_numeric($frameTime) || $frameTime < 0 || $frameTime > $this->getDuration()) { - throw(new Exception('Frame time is not in range '.$frameTime.'/'.$this->getDuration().' '.$this->getFilename())); - } - - if(is_numeric($height) && is_numeric($width)) { - $image_size = ' -s '.$width.'x'.$height; - } else { - $image_size = ''; - } - - if(is_numeric($quality)) { - $quality = ' -qscale '.$quality; - } else { - $quality = ''; - } - - $deleteTmp = false; - if ($frameFilePath === null) { - $frameFilePath = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('frame', true).'.jpg'; - $deleteTmp = true; - } - - $output = array(); - - // Fast and accurate way to seek. First quick-seek before input up to - // a point just before the frame, and then accurately seek after input - // to the exact point. - // See: http://ffmpeg.org/trac/ffmpeg/wiki/Seeking%20with%20FFmpeg - if ($frameTime > 30) { - $seek1 = $frameTime - 30; - $seek2 = 30; - } else { - $seek1 = 0; - $seek2 = $frameTime; - } - - exec(implode(' ', array( - $this->ffmpegBinary, - '-ss '.$seek1, - '-i '.escapeshellarg($this->movieFile), - '-f image2', - '-ss '.$seek2, - '-vframes 1', - $image_size, - $quality, - escapeshellarg($frameFilePath), - '2>&1', - )), $output, $retVar); - $output = join(PHP_EOL, $output); - - // Cannot write frame to the data storage - if (!file_exists($frameFilePath)) { - // Find error in output - preg_match(self::$REGEX_ERRORS, $output, $errors); - if ($errors) { - throw new Exception($errors[0]); - } - // Default file not found error - throw new Exception('TMP image not found/written '. $frameFilePath); - } - - // Create gdimage and delete temporary image - $gdImage = imagecreatefromjpeg($frameFilePath); - if ($deleteTmp && is_writable($frameFilePath)) { - unlink($frameFilePath); - } - - $frame = new FFmpegFrame($gdImage, $frameTime); - imagedestroy($gdImage); - - return $frame; - } - - /** - * Returns the next key frame from the movie as an FFmpegFrame object. Returns false if the frame was not found. - * - * @return FFmpegFrame|boolean - */ - public function getNextKeyFrame() { - return $this->getFrame(); - } - - public function __clone() { - $this->provider = clone $this->provider; - } - - public function serialize() { - $data = serialize(array( - $this->ffmpegBinary, - $this->movieFile, - $this->output, - $this->frameNumber, - $this->provider - )); - - return $data; - } - - public function unserialize($serialized) { - list($this->ffmpegBinary, - $this->movieFile, - $this->output, - $this->frameNumber, - $this->provider - ) = unserialize($serialized); - - } -} diff --git a/vendor/codescale/ffmpeg-php/LICENSE b/vendor/codescale/ffmpeg-php/LICENSE deleted file mode 100644 index 3b269e5c..00000000 --- a/vendor/codescale/ffmpeg-php/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -The New BSD License - -Copyright (c) 2011-2013, CodeScale s.r.o. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of CodeScale s.r.o. nor the names of its contributors - may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/README.rst b/vendor/codescale/ffmpeg-php/README.rst deleted file mode 100644 index 00f7cb9b..00000000 --- a/vendor/codescale/ffmpeg-php/README.rst +++ /dev/null @@ -1,96 +0,0 @@ -FFmpegPHP 2.7.0 -=============== - -FFmpegPHP is a pure OO PHP port of ffmpeg-php (written in C). It adds an easy to use, -object-oriented API for accessing and retrieving information from video and audio files. -It has methods for returning frames from movie files as images that can be manipulated -using PHP image functions. This works well for automatically creating thumbnail images from movies. -FFmpegPHP is also useful for reporting the duration and bitrate of audio files (mp3, wma...). -FFmpegPHP can access many of the video formats supported by ffmpeg (mov, avi, mpg, wmv...) - - -Requirements ------------- - -- PHP 5.3 and higher -- ffmpeg or ffprobe - - -Tests ------ - -**Tested environment** - -- Xubuntu Linux 12.04.2 LTS precise 64-bit -- ffmpeg version N-37798-gcd1c12b -- PHPUnit 3.7.18 -- PHP 5.3.10 - - -**Running tests** - -To run the test install phpunit (http://www.phpunit.de/) and run: :: - - $ phpunit --bootstrap test/bootstrap.php test/ - - -Installation ------------- - -You can easily install FFmpegPHP via PEAR framework: :: - - $ sudo pear channel-discover pear.codescale.net - $ sudo pear install codescale/FFmpegPHP2 - -or download package from github.com: :: - - $ wget http://github.com/char0n/ffmpeg-php/tarball/master - -or to install via composer (http://getcomposer.org/) place the following in your composer.json file: :: - - { - "require": { - "codescale/ffmpeg-php": "dev-master" - } - } - - -Using FFmpegPHP ---------------- - -Package installed via PEAR channel: :: - - require_once 'FFmpegPHP2/FFmpegAutoloader.php'; - -Package downloaded from github.com and unpacked into certain directory: :: - - require_once 'PATH_TO_YOUR_DIRECTORY/FFmpegAutoloader.php'; - - -Author ------- - -| char0n (Vladimír Gorej, CodeScale s.r.o.) -| email: gorej@codescale.net -| web: http://www.codescale.net - -Documentation -------------- - -FFmpegPHP documentation can be build from source code -using PhpDocumentor with following commnad: :: - - $ phpdoc -o HTML:Smarty:HandS -d . -t docs - - -References ----------- - -- http://github.com/CodeScaleInc/ffmpeg-php -- http://www.phpclasses.org/package/5977-PHP-Manipulate-video-files-using-the-ffmpeg-program.html -- http://freshmeat.net/projects/ffmpegphp -- http://www.codescale.net/en/community/#ffmpegphp -- http://pear.codescale.net/ -- http://www.phpdoc.org/ -- http://www.phpunit.de/ -- http://pear.php.net/ diff --git a/vendor/codescale/ffmpeg-php/adapter/ffmpeg_animated_gif.php b/vendor/codescale/ffmpeg-php/adapter/ffmpeg_animated_gif.php deleted file mode 100644 index a3439433..00000000 --- a/vendor/codescale/ffmpeg-php/adapter/ffmpeg_animated_gif.php +++ /dev/null @@ -1,32 +0,0 @@ -adaptee = new FFmpegAnimatedGif($outFilePath, $width, $height, $frameRate, $loopCount); - } - - public function addFrame(ffmpeg_frame $frame) { - $this->adaptee->addFrame(new FFmpegFrame($frame->toGDImage(), $frame->getPTS())); - return $this->adaptee->save(); - } - - public function __clone() { - $this->adaptee = clone $this->adaptee; - } - - public function __destruct() { - $this->adaptee = null; - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/adapter/ffmpeg_frame.php b/vendor/codescale/ffmpeg-php/adapter/ffmpeg_frame.php deleted file mode 100644 index 962ba06c..00000000 --- a/vendor/codescale/ffmpeg-php/adapter/ffmpeg_frame.php +++ /dev/null @@ -1,55 +0,0 @@ -adaptee = new FFmpegFrame($gdImage, $pts); - } - - public function getWidth() { - return $this->adaptee->getWidth(); - } - - public function getHeight() { - return $this->adaptee->getHeight(); - } - - public function getPTS() { - return $this->adaptee->getPTS(); - } - - public function getPresentationTimestamp() { - return $this->adaptee->getPresentationTimestamp(); - } - - public function resize($width, $height, $cropTop = 0, $cropBottom = 0, $cropLeft = 0, $cropRight = 0) { - return $this->adaptee->resize($width, $height, $cropTop, $cropBottom, $cropLeft, $cropRight); - } - - public function crop($cropTop, $cropBottom = 0, $cropLeft = 0, $cropRight = 0) { - return $this->adaptee->crop($cropTop, $cropBottom, $cropLeft, $cropRight); - } - - public function toGDImage() { - return $this->adaptee->toGDImage(); - } - - public function __clone() { - $this->adaptee = clone $this->adaptee; - } - - public function __destruct() { - $this->adaptee = null; - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/adapter/ffmpeg_movie.php b/vendor/codescale/ffmpeg-php/adapter/ffmpeg_movie.php deleted file mode 100644 index 24da11e7..00000000 --- a/vendor/codescale/ffmpeg-php/adapter/ffmpeg_movie.php +++ /dev/null @@ -1,149 +0,0 @@ -adaptee = new FFmpegMovie($moviePath, new FFmpegOutputProvider('ffmpeg', $persistent)); - } - - public function getDuration() { - return $this->adaptee->getDuration(); - } - - public function getFrameCount() { - return $this->adaptee->getFrameCount(); - } - - public function getFrameRate() { - return $this->adaptee->getFrameRate(); - } - - public function getFilename() { - return $this->adaptee->getFilename(); - } - - public function getComment() { - return $this->adaptee->getComment(); - } - - public function getTitle() { - return $this->adaptee->getTitle(); - } - - public function getArtist() { - return $this->adaptee->getArtist(); - } - - public function getAuthor() { - return $this->adaptee->getAuthor(); - } - - public function getCopyright() { - return $this->adaptee->getCopyright(); - } - - public function getGenre() { - return $this->adaptee->getGenre(); - } - - public function getTrackNumber() { - return $this->adaptee->getTrackNumber(); - } - - public function getYear() { - return $this->adaptee->getYear(); - } - - public function getFrameHeight() { - return $this->adaptee->getFrameHeight(); - } - - public function getFrameWidth() { - return $this->adaptee->getFrameWidth(); - } - - public function getPixelFormat() { - return $this->adaptee->getPixelFormat(); - } - - public function getBitRate() { - return $this->adaptee->getBitRate(); - } - - public function getVideoBitRate() { - return $this->adaptee->getVideoBitRate(); - } - - public function getAudioBitRate() { - return $this->adaptee->getAudioBitRate(); - } - - public function getAudioSampleRate() { - return $this->adaptee->getAudioSampleRate(); - } - - public function getFrameNumber() { - return $this->adaptee->getFrameNumber(); - } - - public function getVideoCodec() { - return $this->adaptee->getVideoCodec(); - } - - public function getAudioCodec() { - return $this->adaptee->getAudioCodec(); - } - - public function getAudioChannels() { - return $this->adaptee->getAudioChannels(); - } - - public function hasAudio() { - return $this->adaptee->hasAudio(); - } - - public function hasVideo() { - return $this->adaptee->hasVideo(); - } - - public function getFrame($framenumber = null) { - $toReturn = null; - $frame = $this->adaptee->getFrame($framenumber); - if ($frame != null) { - $toReturn = new ffmpeg_frame($frame->toGDImage(), $frame->getPTS()); - $frame = null; - } - - return $toReturn; - } - - public function getNextKeyFrame() { - $toReturn = null; - $frame = $this->adaptee->getNextKeyFrame(); - if ($frame != null) { - $toReturn = new ffmpeg_frame($frame->toGDImage(), $frame->getPTS()); - $frame = null; - } - - return $toReturn; - } - - public function __clone() { - $this->adaptee = clone $this->adaptee; - } - - public function __destruct() { - $this->adaptee = null; - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/composer.json b/vendor/codescale/ffmpeg-php/composer.json deleted file mode 100644 index dc445cd2..00000000 --- a/vendor/codescale/ffmpeg-php/composer.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "codescale/ffmpeg-php", - "type": "library", - "description": "PHP wrapper for FFmpeg application", - "version": "2.7.0", - "keywords": ["ffmpeg", "video", "audio"], - "homepage": "http://freecode.com/projects/ffmpegphp", - "license": "New BSD", - "authors": [ - { - "name": "char0n (Vladimír Gorej, CodeScale s.r.o.)", - "email": "gorej@codescale.net", - "homepage": "http://www.codescale.net/", - "role": "Development lead" - } - ], - "require": { - "php": ">=5.3" - }, - "autoload": { - "classmap": ["."] - } -} diff --git a/vendor/codescale/ffmpeg-php/package.xml b/vendor/codescale/ffmpeg-php/package.xml deleted file mode 100644 index 34cfed50..00000000 --- a/vendor/codescale/ffmpeg-php/package.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - FFmpegPHP2 - pear.codescale.net - Manipulate video files using the ffmpeg program - FFmpegPHP is a pure OO PHP port of ffmpeg-php writter in C. It adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. It has methods for returning frames from movie files as images that can be manipulated using PHP&apos;s image functions. This works well for automatically creating thumbnail images from movies. FFmpegPHP is also useful for reporting the duration and bitrate of audio files (mp3, wma...). FFmpegPHP can access many of the video formats supported by ffmpeg (mov, avi, mpg, wmv...) - - Vladimír Gorej - char0n - gorej@codescale.net - yes - - 2012-02-12 - - - 2.6.2.1 - 2.6 - - - stable - stable - - BSD Style - -Removed php ending tags from php files -Support for latest ffmpeg -Tons of fixes and enhancements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - - 1.4.0 - - - - - - - - 2.6.2.1 - 2.6 - - - stable - stable - - 2012-02-12 - BSD Style - -Removed php ending tags from php files -Support for latest ffmpeg -Tons of fixes and enhancements - - - 5 - gd - - - - diff --git a/vendor/codescale/ffmpeg-php/provider/AbstractOutputProvider.php b/vendor/codescale/ffmpeg-php/provider/AbstractOutputProvider.php deleted file mode 100644 index be77867b..00000000 --- a/vendor/codescale/ffmpeg-php/provider/AbstractOutputProvider.php +++ /dev/null @@ -1,73 +0,0 @@ -binary = $binary; - $this->persistent = $persistent; - } - - /** - * Setting movie file path - * - * @param string $movieFile - */ - public function setMovieFile($movieFile) { - $this->movieFile = $movieFile; - } - - public function serialize() { - return serialize(array( - $this->binary, - $this->movieFile, - $this->persistent - )); - } - - public function unserialize($serialized) { - list( - $this->binary, - $this->movieFile, - $this->persistent - ) = unserialize($serialized); - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/provider/FFmpegOutputProvider.php b/vendor/codescale/ffmpeg-php/provider/FFmpegOutputProvider.php deleted file mode 100644 index 65deaebe..00000000 --- a/vendor/codescale/ffmpeg-php/provider/FFmpegOutputProvider.php +++ /dev/null @@ -1,60 +0,0 @@ -persistent == true && array_key_exists(get_class($this).$this->binary.$this->movieFile, self::$persistentBuffer)) { - return self::$persistentBuffer[get_class($this).$this->binary.$this->movieFile]; - } - - // File doesn't exist - if (!file_exists($this->movieFile)) { - throw new Exception('Movie file not found', self::$EX_CODE_FILE_NOT_FOUND); - } - - // Get information about file from ffmpeg - $output = array(); - - exec($this->binary.' -i '.escapeshellarg($this->movieFile).' 2>&1', $output, $retVar); - $output = join(PHP_EOL, $output); - - // ffmpeg installed - if (!preg_match('/FFmpeg version/i', $output)) { - throw new Exception('FFmpeg is not installed on host server', self::$EX_CODE_NO_FFMPEG); - } - - // Storing persistent opening - if ($this->persistent == true) { - self::$persistentBuffer[get_class($this).$this->binary.$this->movieFile] = $output; - } - - return $output; - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/provider/FFprobeOutputProvider.php b/vendor/codescale/ffmpeg-php/provider/FFprobeOutputProvider.php deleted file mode 100644 index 4c937703..00000000 --- a/vendor/codescale/ffmpeg-php/provider/FFprobeOutputProvider.php +++ /dev/null @@ -1,59 +0,0 @@ -persistent == true && array_key_exists(get_class($this).$this->binary.$this->movieFile, self::$persistentBuffer)) { - return self::$persistentBuffer[get_class($this).$this->binary.$this->movieFile]; - } - - // File doesn't exist - if (!file_exists($this->movieFile)) { - throw new Exception('Movie file not found', self::$EX_CODE_FILE_NOT_FOUND); - } - - // Get information about file from ffprobe - $output = array(); - - exec($this->binary.' '.escapeshellarg($this->movieFile).' 2>&1', $output, $retVar); - $output = join(PHP_EOL, $output); - - // ffprobe installed - if (!preg_match('/FFprobe version/i', $output)) { - throw new Exception('FFprobe is not installed on host server', self::$EX_CODE_NO_FFPROBE); - } - - // Storing persistent opening - if ($this->persistent == true) { - self::$persistentBuffer[get_class($this).$this->binary.$this->movieFile] = $output; - } - - return $output; - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/provider/OutputProvider.php b/vendor/codescale/ffmpeg-php/provider/OutputProvider.php deleted file mode 100644 index 7acf4494..00000000 --- a/vendor/codescale/ffmpeg-php/provider/OutputProvider.php +++ /dev/null @@ -1,26 +0,0 @@ -_output = ''; - parent::__construct($ffmpegBinary, $persistent); - } - - /** - * Getting parsable output from ffmpeg binary - * - * @return string - */ - public function getOutput() { - - // Persistent opening - if ($this->persistent == true && array_key_exists(get_class($this).$this->binary.$this->movieFile, self::$persistentBuffer)) { - return self::$persistentBuffer[get_class($this).$this->binary.$this->movieFile]; - } - - return $this->_output; - } - - /** - * Setting parsable output - * - * @param string $output - */ - public function setOutput($output) { - - $this->_output = $output; - - // Storing persistent opening - if ($this->persistent == true) { - self::$persistentBuffer[get_class($this).$this->binary.$this->movieFile] = $output; - } - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/test/FFmpegAnimatedGifTest.php b/vendor/codescale/ffmpeg-php/test/FFmpegAnimatedGifTest.php deleted file mode 100644 index 0800b021..00000000 --- a/vendor/codescale/ffmpeg-php/test/FFmpegAnimatedGifTest.php +++ /dev/null @@ -1,101 +0,0 @@ -movie = new FFmpegMovie(self::$moviePath); - $this->frame1 = $this->movie->getFrame(1); - $this->frame2 = $this->movie->getFrame(2); - $this->anim = new FFmpegAnimatedGif(self::$outFilePath, 100, 120, 1, 0); - } - - public function tearDown() { - $this->movie = null; - $this->frame1 = null; - $this->frame2 = null; - $this->anim = null; - if (file_exists(self::$outFilePath)) unlink(self::$outFilePath); - } - - public function testAddFrame() { - $frame = $this->movie->getFrame(3); - $memoryBefore = memory_get_usage(); - - $this->anim->addFrame($frame); - - $memoryAfter = memory_get_usage(); - - $this->assertGreaterThan($memoryBefore, $memoryAfter, 'Memory usage should be higher after adding frame'); - } - - public function testGetAnimation() { - $this->anim->addFrame($this->frame1); - $this->anim->addFrame($this->frame2); - - $animData = $this->anim->getAnimation(); - $this->assertEquals(20936, strlen($animData), 'Animation binary size should be int(20936)'); - } - - public function testSave() { - $this->anim->addFrame($this->frame1); - $this->anim->addFrame($this->frame2); - - $saveResult = $this->anim->save(); - $this->assertEquals(true, $saveResult, 'Save result should be true'); - $this->assertEquals(true, file_exists(self::$outFilePath), 'File "'.self::$outFilePath.'" should exist after saving'); - $this->assertEquals(20936, filesize(self::$outFilePath), 'Animation binary size should be int(20936)'); - $imageInfo = getimagesize(self::$outFilePath); - $this->assertEquals(100, $imageInfo[0], 'Saved image width should be int(100)'); - $this->assertEquals(120, $imageInfo[1], 'Saved image height should be int(120)'); - } - - public function testSerializeUnserialize() { - $this->anim->addFrame($this->frame1); - $this->anim->addFrame($this->frame2); - - $serialized = serialize($this->anim); - $this->anim = null; - $this->anim = unserialize($serialized); - - $saveResult = $this->anim->save(); - $this->assertEquals(true, $saveResult, 'Save result should be true'); - $this->assertEquals(true, file_exists(self::$outFilePath), 'File "'.self::$outFilePath.'" should exist after saving'); - $this->assertEquals(20936, filesize(self::$outFilePath), 'Animation binary size should be int(20936)'); - $imageInfo = getimagesize(self::$outFilePath); - $this->assertEquals(100, $imageInfo[0], 'Saved image width should be int(100)'); - $this->assertEquals(120, $imageInfo[1], 'Saved image height should be int(120)'); - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/test/FFmpegAutoloaderTest.php b/vendor/codescale/ffmpeg-php/test/FFmpegAutoloaderTest.php deleted file mode 100644 index 46dab421..00000000 --- a/vendor/codescale/ffmpeg-php/test/FFmpegAutoloaderTest.php +++ /dev/null @@ -1,34 +0,0 @@ -assertTrue(FFmpegAutoloader::autoload('FFmpegAnimatedGif')); - $this->assertTrue(FFmpegAutoloader::autoload('FFmpegFrame')); - $this->assertTrue(FFmpegAutoloader::autoload('FFmpegMovie')); - $this->assertTrue(FFmpegAutoloader::autoload('ffmpeg_animated_gif')); - $this->assertTrue(FFmpegAutoloader::autoload('ffmpeg_frame')); - $this->assertTrue(FFmpegAutoloader::autoload('ffmpeg_movie')); - $this->assertTrue(FFmpegAutoloader::autoload('OutputProvider')); - $this->assertTrue(FFmpegAutoloader::autoload('AbstractOutputProvider')); - $this->assertTrue(FFmpegAutoloader::autoload('FFmpegOutputProvider')); - $this->assertTrue(FFmpegAutoloader::autoload('FFprobeOutputProvider')); - $this->assertFalse(FFmpegAutoloader::autoload(uniqid())); - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/test/FFmpegFrameTest.php b/vendor/codescale/ffmpeg-php/test/FFmpegFrameTest.php deleted file mode 100644 index 5013eec7..00000000 --- a/vendor/codescale/ffmpeg-php/test/FFmpegFrameTest.php +++ /dev/null @@ -1,133 +0,0 @@ -movie = new FFmpegMovie(self::$moviePath); - $this->frame = $this->movie->getFrame(1); - } - - public function tearDown() { - $this->movie = null; - $this->frame = null; - } - - public function testConstructor() { - try { - $frame = new FFmpegFrame('test', 0.0); - } catch (Exception $ex) { - if ($ex->getCode() == 334563) { - return; - } else { - $this->fail('Expected exception raised with wrong code'); - } - } - $this->fail('An expected exception with code 334561 has not been raised'); - } - - public function testFrameExtracted() { - $this->assertInstanceOf('FFmpegFrame', $this->frame); - } - - public function testGetWidth() { - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->frame->getWidth(), 'Frame width should be int(640)'); - } - - public function testGetHeight() { - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(272, $this->frame->getHeight(), 'Frame height should be int(272)'); - } - - public function testGetPts() { - $this->assertInternalType('float', $this->frame->getPts(), 'Pts is of integer type'); - $this->assertEquals(0.0, $this->frame->getPts(), 'Pts should be float(0.0)'); - } - - public function testGetPresentationTimestamp() { - $this->assertInternalType('float', $this->frame->getPresentationTimestamp(), 'Presentation timestamp is of integer type'); - $this->assertEquals(0.0, $this->frame->getPresentationTimestamp(), 'Presentation timestamp should be float(0.0)'); - $this->assertEquals($this->frame->getPts(), $this->frame->getPresentationTimestamp(), 'Presentation timestamp should equal Pts'); - } - - public function testResize() { - $oldWidth = $this->frame->getWidth(); - $oldHeight = $this->frame->getHeight(); - - $this->frame->resize(300, 300); - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(300, $this->frame->getWidth(), 'Frame width should be int(300)'); - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(300, $this->frame->getHeight(), 'Frame height should be int(300)'); - $this->frame->resize($oldWidth, $oldHeight); - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->frame->getWidth(), 'Frame width should be int(640)'); - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(272, $this->frame->getHeight(), 'Frame height should be int(272)'); - } - - public function testCrop() { - $oldWidth = $this->frame->getWidth(); - $oldHeight = $this->frame->getHeight(); - - $this->frame->crop(100); - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->frame->getWidth(), 'Frame width should be int(300)'); - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(172, $this->frame->getHeight(), 'Frame height should be int(172)'); - $this->frame->resize($oldWidth, $oldHeight); - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->frame->getWidth(), 'Frame width should be int(640)'); - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(272, $this->frame->getHeight(), 'Frame height should be int(272)'); - } - - public function testToGdImage() { - $this->assertInternalType('resource', $this->frame->toGdImage(), 'GdImage is of resource(gd2) type'); - } - - public function testSerializeUnserialize() { - $serialized = serialize($this->frame); - $this->frame = null; - $this->frame = unserialize($serialized); - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->frame->getWidth(), 'Frame width should be int(640)'); - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(272, $this->frame->getHeight(), 'Frame height should be int(272)'); - } - - public function testClone() { - $uoid = (string) $this->frame->toGdImage(); - $cloned = clone $this->frame; - $cuoid = (string) $cloned->toGdImage(); - $this->assertNotEquals($uoid, $cuoid); - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/test/FFmpegMovieTest.php b/vendor/codescale/ffmpeg-php/test/FFmpegMovieTest.php deleted file mode 100644 index f1d53543..00000000 --- a/vendor/codescale/ffmpeg-php/test/FFmpegMovieTest.php +++ /dev/null @@ -1,271 +0,0 @@ -movie = new FFmpegMovie(self::$moviePath); - $this->audio = new FFmpegMovie(self::$audioPath); - } - - public function tearDown() { - $this->movie = null; - $this->audio = null; - } - - public function testFileDoesNotExistException() { - try { - $movie = new FFmpegMovie(uniqid('test', true)); - } catch (Exception $ex) { - if ($ex->getCode() == 334561) { - return; - } else { - $this->fail('Expected exception raised with wrong code'); - } - } - - $this->fail('An expected exception with code 334561 has not been raised'); - } - - public function testPersistentResourceSimulation() { - PHP_Timer::start(); - $movie = new FFmpegMovie(self::$moviePath, new FFmpegOutputProvider('ffmpeg', true)); - $movie = new FFmpegMovie(self::$moviePath, new FFmpegOutputProvider('ffmpeg', true)); - $movie = new FFmpegMovie(self::$moviePath, new FFmpegOutputProvider('ffmpeg', true)); - $elapsed = PHP_Timer::stop(); - - PHP_Timer::start(); - $movie = new FFmpegMovie(self::$moviePath); - $movie = new FFmpegMovie(self::$moviePath); - $movie = new FFmpegMovie(self::$moviePath); - $elapsed1 = PHP_Timer::stop(); - $this->assertGreaterThan($elapsed, $elapsed1, 'Persistent resource simulation should be faster'); - } - - public function testGetDuration() { - $this->assertInternalType('float', $this->movie->getDuration(), 'Duration is of float type'); - $this->assertEquals(32.13, $this->movie->getDuration(), 'Duration should be float(32.13)'); - } - public function testGetDuration_Audio() { - $this->assertInternalType('float', $this->audio->getDuration(), 'Duration is of float type'); - $this->assertEquals(15.84, $this->audio->getDuration(), 'Duration should be float(15.84)'); - } - - public function testGetFrameCount() { - $this->assertInternalType('int', $this->movie->getFrameCount(), 'Frame count is of integer type'); - $this->assertEquals(803, $this->movie->getFrameCount(), 'Frame count should be int(830)'); - } - - public function testGetFrameRate() { - $this->assertInternalType('float', $this->movie->getFrameRate(), 'FrameRate is of float type'); - $this->assertEquals(25, $this->movie->getFrameRate(), 'FrameRate should be float(25)'); - } - - public function testGetFileName() { - $this->assertInternalType('string', $this->movie->getFilename(), 'Filename is of type string'); - $this->assertEquals(self::$moviePath, $this->movie->getFilename(), 'Filename should be string(data/test.avi)'); - } - - public function testGetComment() { - $this->assertInternalType('string', $this->movie->getComment(), 'Comment is of string type'); - $this->assertEquals('test comment', $this->movie->getComment(), 'Comment should be string(test comment)'); - } - - public function testGetTitle() { - $this->assertInternalType('string', $this->movie->getTitle(), 'Title is of string type'); - $this->assertEquals('title test', $this->movie->getTitle(), 'Title should be string(title test)'); - } - - public function testGetArtist() { - $this->assertInternalType('string', $this->movie->getArtist(), 'Artist is of string type'); - $this->assertEquals('char0n', $this->movie->getArtist(), 'Artist should be string(char0n)'); - } - - public function testGetAuthor() { - $this->assertInternalType('string', $this->movie->getAuthor(), 'Author is of string type'); - $this->assertEquals('char0n', $this->movie->getAuthor(), 'Author should be string(char0n)'); - $this->assertEquals($this->movie->getArtist(), $this->movie->getAuthor(), 'Author should qual Artist'); - } - - public function testGetCopyright() { - $this->assertInternalType('string', $this->movie->getCopyright(), 'Copyright is of string type'); - $this->assertEquals('test copyright', $this->movie->getCopyright(), 'Copyright should be string(test copyright)'); - } - - public function testGetGenre() { - $this->assertInternalType('string', $this->movie->getGenre(), 'Genre is of string type'); - $this->assertEquals('test genre', $this->movie->getGenre(), 'Genre should be string(test genre)'); - } - - public function testGetTrackNumber() { - $this->assertInternalType('int', $this->movie->getTrackNumber(), 'Track number is of integer type'); - $this->assertEquals(2, $this->movie->getTrackNumber(), 'Track number should be int(2)'); - } - - public function testGetYear() { - $this->assertInternalType('int', $this->movie->getYear(), 'Year is of integer type'); - $this->assertEquals(true, $this->movie->getYear() == 2010 || $this->movie->getYear() == 0, 'Year should be int(2010)'); - } - - public function testGetFrameHeight() { - $this->assertInternalType('int', $this->movie->getFrameHeight(), 'Frame height is of integer type'); - $this->assertEquals(272, $this->movie->getFrameHeight(), 'Frame height should be int(272)'); - } - - public function testGetFrameWidth() { - $this->assertInternalType('int', $this->movie->getFrameWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->movie->getFrameWidth(), 'Frame width should be int(640)'); - } - - public function testGetPixelFormat() { - $this->assertInternalType('string', $this->movie->getPixelFormat(), 'Pixel format is of string type'); - $this->assertEquals('yuv420p', $this->movie->getPixelFormat(), 'Pixel format should be string(yuv420p)'); - } - - public function testGetBitRate() { - $this->assertInternalType('int', $this->movie->getBitRate(), 'BitRate is of integer type'); - $this->assertEquals(296000, $this->movie->getBitRate(), 'BitRate should be int(296000)'); - } - - public function testGetBitRate_Audio() { - $this->assertInternalType('int', $this->audio->getBitRate(), 'BitRate is of integer type'); - $this->assertEquals(178000, $this->audio->getBitRate(), 'BitRate should be int(178000)'); - } - - public function testGetVideoBitRate() { - $this->assertInternalType('int', $this->movie->getVideoBitRate(), 'Video BitRate is of integer type'); - $this->assertEquals(224000, $this->movie->getVideoBitRate(), 'Video BitRate should be int(224000)'); - } - - public function testGetAudioBitRate() { - $this->assertInternalType('int', $this->movie->getAudioBitRate(), 'Audio BitRate is of integer type'); - $this->assertEquals(67000, $this->movie->getAudioBitRate(), 'Audio BitRate should be int(67000)'); - } - - public function testGetAudioSampleRate() { - $this->assertInternalType('int', $this->movie->getAudioSampleRate(), 'Audio SampleRate is of integer type'); - $this->assertEquals(44100, $this->movie->getAudioSampleRate(), 'Audio SampleRate should be int(44100)'); - } - - public function testGetAudioSampleRate_Audio() { - $this->assertInternalType('int', $this->audio->getAudioSampleRate(), 'Audio SampleRate is of integer type'); - $this->assertEquals(22050, $this->audio->getAudioSampleRate(), 'Audio SampleRate should be int(22050)'); - } - - public function testGetFrameNumber() { - $this->assertInternalType('int', $this->movie->getFrameNumber(), 'Frame number is of integer type'); - $this->assertEquals(1, $this->movie->getFrameNumber(), 'Frame number should be int(1)'); - - $this->assertInstanceOf('FFmpegFrame', $this->movie->getNextKeyFrame()); - $this->assertInternalType('int', $this->movie->getFrameNumber(), 'Frame number is of integer type'); - $this->assertEquals(1, $this->movie->getFrameNumber(), 'Frame number should be int(1)'); - - $this->assertInstanceOf('FFmpegFrame', $this->movie->getNextKeyFrame()); - $this->assertInternalType('int', $this->movie->getFrameNumber(), 'Frame number is of integer type'); - $this->assertEquals(2, $this->movie->getFrameNumber(), 'Frame number should be int(2)'); - - $this->assertInstanceOf('FFmpegFrame', $this->movie->getFrame()); - $this->assertInternalType('int', $this->movie->getFrameNumber(), 'Frame number is of integer type'); - $this->assertEquals(3, $this->movie->getFrameNumber(), 'Frame number should be int(3)'); - } - - public function testGetVideoCodec() { - $this->assertInternalType('string', $this->movie->getVideoCodec(), 'Video codec is of string type'); - $this->assertEquals('mpeg4 (Simple Profile) (mp4v / 0x7634706D)', $this->movie->getVideoCodec(), 'Video codec should be string(mpeg4)'); - } - - public function testGetAudioCodec() { - $this->assertInternalType('string', $this->movie->getAudioCodec(), 'Audio codec is of string type'); - $this->assertEquals('aac (mp4a / 0x6134706D)', $this->movie->getAudioCodec(), 'Audio codec should be string(aac)'); - } - - public function testGetAudioChannels() { - $this->assertInternalType('int', $this->movie->getAudioChannels(), 'Audio channels is of integer type'); - $this->assertEquals(2, $this->movie->getAudioChannels(), 'Audio channels should be int(2)'); - } - - public function testGetAudioChannels_Audio() { - $this->assertInternalType('int', $this->audio->getAudioChannels(), 'Audio channels is of integer type'); - $this->assertEquals(2, $this->audio->getAudioChannels(), 'Audio channels should be int(2)'); - } - - public function testHasAudio() { - $this->assertInternalType('boolean', $this->movie->hasAudio(), 'HasAudio is of boolean type'); - $this->assertEquals(true, $this->movie->hasAudio(), 'HasAudio should be boolean(true)'); - } - - public function testHasAudio_Audio() { - $this->assertInternalType('boolean', $this->audio->hasAudio(), 'HasAudio is of boolean type'); - $this->assertEquals(true, $this->audio->hasAudio(), 'HasAudio should be boolean(true)'); - } - - public function testHasVideo() { - $this->assertInternalType('boolean', $this->movie->hasVideo(), 'HasVideo is of boolean type'); - $this->assertEquals(true, $this->movie->hasVideo(), 'HasVideo is of should be boolean(true)'); - } - - public function testHasVideo_Audio() { - $this->assertInternalType('boolean', $this->audio->hasVideo(), 'HasVideo of audio file is of boolean type'); - $this->assertEquals(false, $this->audio->hasVideo(), 'HasVideo of audio file is of should be boolean(false)'); - } - - public function testGetFrame() { - $this->assertInstanceOf('FFmpegFrame', $this->movie->getFrame(), 'Frame is of FFmpegFrame type'); - $this->assertEquals(1, $this->movie->getFrameNumber(), 'Frame number should be int(1)'); - - $this->assertInstanceOf('FFmpegFrame', $this->movie->getFrame(25), 'Frame is of FFmpegFrame type'); - - $this->assertInstanceOf('FFmpegFrame', $this->movie->getFrame(), 'Frame is of FFmpegFrame type'); - $this->assertEquals(2, $this->movie->getFrameNumber(), 'Frame number should be int(2)'); - } - - public function testGetNextKeyFrame() { - $this->assertInstanceOf('FFmpegFrame', $this->movie->getNextKeyFrame(), 'KeyFrame is of FFmpegFrame type'); - $this->assertEquals(1, $this->movie->getFrameNumber(), 'Frame number should be int(1)'); - $this->assertInstanceOf('FFmpegFrame', $this->movie->getNextKeyFrame(), 'Next key frame is of FFmpegFrame type'); - $this->assertEquals(2, $this->movie->getFrameNumber(), 'Frame number should be int(2)'); - } - - public function testSerializeUnserialize() { - $serialized = serialize($this->movie); - $this->movie = null; - $this->movie = unserialize($serialized); - $this->assertInternalType('float', $this->movie->getDuration(), 'Duration is of float type'); - $this->assertEquals(32.13, $this->movie->getDuration(), 'Duration should be float(32.13)'); - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/test/adapter/ffmpeg_animated_gif_Test.php b/vendor/codescale/ffmpeg-php/test/adapter/ffmpeg_animated_gif_Test.php deleted file mode 100644 index 7ea362d0..00000000 --- a/vendor/codescale/ffmpeg-php/test/adapter/ffmpeg_animated_gif_Test.php +++ /dev/null @@ -1,81 +0,0 @@ -movie = new ffmpeg_movie(self::$moviePath); - $this->frame1 = $this->movie->getFrame(1); - $this->frame2 = $this->movie->getFrame(2); - $this->anim = new ffmpeg_animated_gif(self::$outFilePath, 100, 120, 1, 0); - } - - public function tearDown() { - $this->movie = null; - $this->frame1 = null; - $this->frame2 = null; - $this->anim = null; - if (file_exists(self::$outFilePath)) unlink(self::$outFilePath); - } - - public function testAddFrame() { - $frame = $this->movie->getFrame(3); - $memoryBefore = memory_get_usage(); - - $this->anim->addFrame($frame); - - $memoryAfter = memory_get_usage(); - - $this->assertGreaterThan($memoryBefore, $memoryAfter, 'Memory usage should be higher after adding frame'); - } - - public function testSerializeUnserialize() { - $this->anim->addFrame($this->frame1); - $this->anim->addFrame($this->frame2); - - $serialized = serialize($this->anim); - $this->anim = null; - $this->anim = unserialize($serialized); - - $saveResult = $this->anim->addFrame($this->frame1); - $this->assertEquals(true, $saveResult, 'Save result should be true'); - $this->assertEquals(true, file_exists(self::$outFilePath), 'File "'.self::$outFilePath.'" should exist after saving'); - $this->assertEquals(30585, filesize(self::$outFilePath), 'Animation binary size should be int(30585)'); - $imageInfo = getimagesize(self::$outFilePath); - $this->assertEquals(100, $imageInfo[0], 'Saved image width should be int(100)'); - $this->assertEquals(120, $imageInfo[1], 'Saved image height should be int(120)'); - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/test/adapter/ffmpeg_frame_Test.php b/vendor/codescale/ffmpeg-php/test/adapter/ffmpeg_frame_Test.php deleted file mode 100644 index 147b45af..00000000 --- a/vendor/codescale/ffmpeg-php/test/adapter/ffmpeg_frame_Test.php +++ /dev/null @@ -1,134 +0,0 @@ -movie = new ffmpeg_movie(self::$moviePath); - $this->frame = $this->movie->getFrame(1); - } - - public function tearDown() { - $this->movie = null; - $this->frame = null; - } - - public function testConstructor() { - try { - $frame = new FFmpegFrame('test', 0.0); - } catch (Exception $ex) { - if ($ex->getCode() == 334563) { - return; - } else { - $this->fail('Expected exception raised with wrong code'); - } - } - $this->fail('An expected exception with code 334561 has not been raised'); - } - - public function testFrameExtracted() { - $this->assertInstanceOf('ffmpeg_frame', $this->frame); - } - - public function testGetWidth() { - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->frame->getWidth(), 'Frame width should be int(640)'); - } - - public function testGetHeight() { - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(272, $this->frame->getHeight(), 'Frame height should be int(272)'); - } - - public function testGetPts() { - $this->assertInternalType('float', $this->frame->getPts(), 'Pts is of integer type'); - $this->assertEquals(0.0, $this->frame->getPts(), 'Pts should be float(0.0)'); - } - - public function testGetPresentationTimestamp() { - $this->assertInternalType('float', $this->frame->getPresentationTimestamp(), 'Presentation timestamp is of integer type'); - $this->assertEquals(0.0, $this->frame->getPresentationTimestamp(), 'Presentation timestamp should be float(0.0)'); - $this->assertEquals($this->frame->getPts(), $this->frame->getPresentationTimestamp(), 'Presentation timestamp should equal Pts'); - } - - public function testResize() { - $oldWidth = $this->frame->getWidth(); - $oldHeight = $this->frame->getHeight(); - - $this->frame->resize(300, 300); - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(300, $this->frame->getWidth(), 'Frame width should be int(300)'); - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(300, $this->frame->getHeight(), 'Frame height should be int(300)'); - $this->frame->resize($oldWidth, $oldHeight); - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->frame->getWidth(), 'Frame width should be int(640)'); - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(272, $this->frame->getHeight(), 'Frame height should be int(272)'); - } - - public function testCrop() { - $oldWidth = $this->frame->getWidth(); - $oldHeight = $this->frame->getHeight(); - - $this->frame->crop(100); - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->frame->getWidth(), 'Frame width should be int(300)'); - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(172, $this->frame->getHeight(), 'Frame height should be int(172)'); - $this->frame->resize($oldWidth, $oldHeight); - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->frame->getWidth(), 'Frame width should be int(640)'); - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(272, $this->frame->getHeight(), 'Frame height should be int(272)'); - } - - public function testToGdImage() { - $this->assertInternalType('resource', $this->frame->toGdImage(), 'GdImage is of resource(gd2) type'); - } - - public function testSerializeUnserialize() { - $serialized = serialize($this->frame); - $this->frame = null; - $this->frame = unserialize($serialized); - $this->assertInternalType('int', $this->frame->getWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->frame->getWidth(), 'Frame width should be int(640)'); - $this->assertInternalType('int', $this->frame->getHeight(), 'Frame height is of integer type'); - $this->assertEquals(272, $this->frame->getHeight(), 'Frame height should be int(272)'); - } - - public function testClone() { - $uoid = (string) $this->frame->toGdImage(); - $cloned = clone $this->frame; - $cuoid = (string) $cloned->toGdImage(); - $this->assertNotEquals($uoid, $cuoid); - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/test/adapter/ffmpeg_movie_Test.php b/vendor/codescale/ffmpeg-php/test/adapter/ffmpeg_movie_Test.php deleted file mode 100644 index 9b75839b..00000000 --- a/vendor/codescale/ffmpeg-php/test/adapter/ffmpeg_movie_Test.php +++ /dev/null @@ -1,273 +0,0 @@ -movie = new ffmpeg_movie(self::$moviePath); - $this->audio = new ffmpeg_movie(self::$audioPath); - } - - public function tearDown() { - $this->movie = null; - $this->audio = null; - } - - public function testFileDoesNotExistException() { - try { - $movie = new ffmpeg_movie(uniqid('test', true)); - } catch (Exception $ex) { - if ($ex->getCode() == 334561) { - return; - } else { - $this->fail('Expected exception raised with wrong code'); - } - } - - $this->fail('An expected exception with code 334561 has not been raised'); - } - - public function testPersistentResourceSimulation() { - PHP_Timer::start(); - $movie = new ffmpeg_movie(self::$moviePath, true); - $movie = new ffmpeg_movie(self::$moviePath, true); - $movie = new ffmpeg_movie(self::$moviePath, true); - $elapsed = PHP_Timer::stop(); - - PHP_Timer::start(); - $movie = new ffmpeg_movie(self::$moviePath); - $movie = new ffmpeg_movie(self::$moviePath); - $movie = new ffmpeg_movie(self::$moviePath); - $elapsed1 = PHP_Timer::stop(); - $this->assertGreaterThan($elapsed, $elapsed1, 'Persistent resource simulation should be faster'); - } - - public function testGetDuration() { - $this->assertInternalType('float', $this->movie->getDuration(), 'Duration is of float type'); - $this->assertEquals(32.13, $this->movie->getDuration(), 'Duration should be float(32.13)'); - } - - public function testGetDuration_Audio() { - $this->assertInternalType('float', $this->audio->getDuration(), 'Duration is of float type'); - $this->assertEquals(15.84, $this->audio->getDuration(), 'Duration should be float(15.88)'); - } - - public function testGetFrameCount() { - $this->assertInternalType('int', $this->movie->getFrameCount(), 'Frame count is of integer type'); - $this->assertEquals(803, $this->movie->getFrameCount(), 'Frame count should be int(830)'); - } - - public function testGetFrameRate() { - $this->assertInternalType('float', $this->movie->getFrameRate(), 'FrameRate is of float type'); - $this->assertEquals(25, $this->movie->getFrameRate(), 'FrameRate should be float(25)'); - } - - public function testGetFileName() { - $this->assertInternalType('string', $this->movie->getFilename(), 'Filename is of type string'); - $this->assertEquals(self::$moviePath, $this->movie->getFilename(), 'Filename should be string(*/test/data/test.avi)'); - } - - public function testGetComment() { - $this->assertInternalType('string', $this->movie->getComment(), 'Comment is of string type'); - $this->assertEquals('test comment', $this->movie->getComment(), 'Comment should be string(test comment)'); - } - - public function testGetTitle() { - $this->assertInternalType('string', $this->movie->getTitle(), 'Title is of string type'); - $this->assertEquals('title test', $this->movie->getTitle(), 'Title should be string(title test)'); - } - - public function testGetArtist() { - $this->assertInternalType('string', $this->movie->getArtist(), 'Artist is of string type'); - $this->assertEquals('char0n', $this->movie->getArtist(), 'Artist should be string(char0n)'); - } - - public function testGetAuthor() { - $this->assertInternalType('string', $this->movie->getAuthor(), 'Author is of string type'); - $this->assertEquals('char0n', $this->movie->getAuthor(), 'Author should be string(char0n)'); - $this->assertEquals($this->movie->getArtist(), $this->movie->getAuthor(), 'Author should qual Artist'); - } - - public function testGetCopyright() { - $this->assertInternalType('string', $this->movie->getCopyright(), 'Copyright is of string type'); - $this->assertEquals('test copyright', $this->movie->getCopyright(), 'Copyright should be string(test copyright)'); - } - - public function testGetGenre() { - $this->assertInternalType('string', $this->movie->getGenre(), 'Genre is of string type'); - $this->assertEquals('test genre', $this->movie->getGenre(), 'Genre should be string(test genre)'); - } - - public function testGetTrackNumber() { - $this->assertInternalType('int', $this->movie->getTrackNumber(), 'Track number is of integer type'); - $this->assertEquals(2, $this->movie->getTrackNumber(), 'Track number should be int(2)'); - } - - public function testGetYear() { - $this->assertInternalType('int', $this->movie->getYear(), 'Year is of integer type'); - $this->assertTrue($this->movie->getYear() == 2010 || $this->movie->getYear() == 0, 'Year should be int(2010)'); - } - - public function testGetFrameHeight() { - $this->assertInternalType('int', $this->movie->getFrameHeight(), 'Frame height is of integer type'); - $this->assertEquals(272, $this->movie->getFrameHeight(), 'Frame height should be int(272)'); - } - - public function testGetFrameWidth() { - $this->assertInternalType('int', $this->movie->getFrameWidth(), 'Frame width is of integer type'); - $this->assertEquals(640, $this->movie->getFrameWidth(), 'Frame width should be int(640)'); - } - - public function testGetPixelFormat() { - $this->assertInternalType('string', $this->movie->getPixelFormat(), 'Pixel format is of string type'); - $this->assertEquals('yuv420p', $this->movie->getPixelFormat(), 'Pixel format should be string(yuv420p)'); - } - - public function testGetBitRate() { - $this->assertInternalType('int', $this->movie->getBitRate(), 'BitRate is of integer type'); - $this->assertEquals(296000, $this->movie->getBitRate(), 'BitRate should be int(296000)'); - } - - public function testGetBitRate_Audio() { - $this->assertInternalType('int', $this->audio->getBitRate(), 'BitRate is of integer type'); - $this->assertEquals(178000, $this->audio->getBitRate(), 'BitRate should be int(178000)'); - } - - public function testGetVideoBitRate() { - $this->assertInternalType('int', $this->movie->getVideoBitRate(), 'Video BitRate is of integer type'); - $this->assertEquals(224000, $this->movie->getVideoBitRate(), 'Video BitRate should be int(224000)'); - } - - public function testGetAudioBitRate() { - $this->assertInternalType('int', $this->movie->getAudioBitRate(), 'Audio BitRate is of integer type'); - $this->assertEquals(67000, $this->movie->getAudioBitRate(), 'Audio BitRate should be int(67000)'); - } - - public function testGetAudioSampleRate() { - $this->assertInternalType('int', $this->movie->getAudioSampleRate(), 'Audio SampleRate is of integer type'); - $this->assertEquals(44100, $this->movie->getAudioSampleRate(), 'Audio SampleRate should be int(44100)'); - } - - public function testGetAudioSampleRate_Audio() { - $this->assertInternalType('int', $this->audio->getAudioSampleRate(), 'Audio SampleRate is of integer type'); - $this->assertEquals(22050, $this->audio->getAudioSampleRate(), 'Audio SampleRate should be int(22050)'); - } - - public function testGetFrameNumber() { - $this->assertInternalType('int', $this->movie->getFrameNumber(), 'Frame number is of integer type'); - $this->assertEquals(1, $this->movie->getFrameNumber(), 'Frame number should be int(1)'); - - $this->assertInstanceOf('ffmpeg_frame', $this->movie->getNextKeyFrame()); - $this->assertInternalType('int', $this->movie->getFrameNumber(), 'Frame number is of integer type'); - $this->assertEquals(1, $this->movie->getFrameNumber(), 'Frame number should be int(1)'); - - $this->assertInstanceOf('ffmpeg_frame', $this->movie->getNextKeyFrame()); - $this->assertInternalType('int', $this->movie->getFrameNumber(), 'Frame number is of integer type'); - $this->assertEquals(2, $this->movie->getFrameNumber(), 'Frame number should be int(2)'); - - $this->assertInstanceOf('ffmpeg_frame', $this->movie->getFrame()); - $this->assertInternalType('int', $this->movie->getFrameNumber(), 'Frame number is of integer type'); - $this->assertEquals(3, $this->movie->getFrameNumber(), 'Frame number should be int(3)'); - } - - public function testGetVideoCodec() { - $this->assertInternalType('string', $this->movie->getVideoCodec(), 'Video codec is of string type'); - $this->assertEquals('mpeg4 (Simple Profile) (mp4v / 0x7634706D)', $this->movie->getVideoCodec(), 'Video codec should be string(mpeg4)'); - } - - public function testGetAudioCodec() { - $this->assertInternalType('string', $this->movie->getAudioCodec(), 'Audio codec is of string type'); - $this->assertEquals('aac (mp4a / 0x6134706D)', $this->movie->getAudioCodec(), 'Audio codec should be string(aac)'); - } - - public function testGetAudioChannels() { - $this->assertInternalType('int', $this->movie->getAudioChannels(), 'Audio channels is of integer type'); - $this->assertEquals(2, $this->movie->getAudioChannels(), 'Audio channels should be int(2)'); - } - - public function testGetAudioChannels_Audio() { - $this->assertInternalType('int', $this->audio->getAudioChannels(), 'Audio channels is of integer type'); - $this->assertEquals(2, $this->audio->getAudioChannels(), 'Audio channels should be int(2)'); - } - - public function testHasAudio() { - $this->assertInternalType('boolean', $this->movie->hasAudio(), 'HasAudio is of boolean type'); - $this->assertEquals(true, $this->movie->hasAudio(), 'HasAudio should be boolean(true)'); - } - - public function testHasAudio_Audio() { - $this->assertInternalType('boolean', $this->audio->hasAudio(), 'HasAudio is of boolean type'); - $this->assertEquals(true, $this->audio->hasAudio(), 'HasAudio should be boolean(true)'); - } - - public function testHasVideo() { - $this->assertInternalType('boolean', $this->movie->hasVideo(), 'HasVideo is of boolean type'); - $this->assertEquals(true, $this->movie->hasVideo(), 'HasVideo is of should be boolean(true)'); - } - - public function testHasVideo_Audio() { - $this->assertInternalType('boolean', $this->audio->hasVideo(), 'HasVideo of audio file is of boolean type'); - $this->assertEquals(false, $this->audio->hasVideo(), 'HasVideo of audio file is of should be boolean(false)'); - } - - public function testGetFrame() { - $this->assertInstanceOf('ffmpeg_frame', $this->movie->getFrame(), 'Frame is of FFmpegFrame type'); - $this->assertEquals(1, $this->movie->getFrameNumber(), 'Frame number should be int(1)'); - - $this->assertInstanceOf('ffmpeg_frame', $this->movie->getFrame(25), 'Frame is of FFmpegFrame type'); - - $this->assertInstanceOf('ffmpeg_frame', $this->movie->getFrame(), 'Frame is of FFmpegFrame type'); - $this->assertEquals(2, $this->movie->getFrameNumber(), 'Frame number should be int(2)'); - } - - public function testGetNextKeyFrame() { - $this->assertInstanceOf('ffmpeg_frame', $this->movie->getNextKeyFrame(), 'Next key frame is of FFmpegFrame type'); - $this->assertEquals(1, $this->movie->getFrameNumber(), 'Frame number should be int(1)'); - $this->assertInstanceOf('ffmpeg_frame', $this->movie->getNextKeyFrame(), 'Next key frame is of FFmpegFrame type'); - $this->assertEquals(2, $this->movie->getFrameNumber(), 'Frame number should be int(2)'); - } - - public function testSerializeUnserialize() { - $serialized = serialize($this->movie); - $this->movie = null; - $this->movie = unserialize($serialized); - $this->assertInternalType('float', $this->movie->getDuration(), 'Duration is of float type'); - $this->assertEquals(32.13, $this->movie->getDuration(), 'Duration should be float(32.13)'); - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/test/bootstrap.php b/vendor/codescale/ffmpeg-php/test/bootstrap.php deleted file mode 100644 index 114875cc..00000000 --- a/vendor/codescale/ffmpeg-php/test/bootstrap.php +++ /dev/null @@ -1,26 +0,0 @@ -provider = new FFmpegOutputProvider(); - $this->provider->setMovieFile(self::$moviePath); - } - - public function tearDown() { - $this->provider = null; - } - - public function testGetOutput() { - $output = $this->provider->getOutput(); - $this->assertEquals(1, preg_match('/FFmpeg version/i', $output)); - } - - public function testGetOutputFileDoesntExist() { - try { - $provider = new FFmpegOutputProvider(); - $provider->setMovieFile(uniqid('test', true)); - $provider->getOutput(); - } catch (Exception $ex) { - if ($ex->getCode() == 334561) { - return; - } else { - $this->fail('Expected exception raise with wrong code'); - } - } - - $this->fail('An expected exception with code 334561 has not been raised'); - } - - public function testPersistentResourceSimulation() { - PHP_Timer::start(); - $provider = new FFmpegOutputProvider('ffmpeg', true); - $provider->setMovieFile(self::$moviePath); - $provider->getOutput(); - $provider = clone $provider; - $provider->getOutput(); - $provider = clone $provider; - $provider->getOutput(); - $elapsed = PHP_Timer::stop(); - - PHP_Timer::start(); - $provider = new FFmpegOutputProvider('ffmpeg', false); - $provider->setMovieFile(self::$moviePath); - $provider->getOutput(); - $provider = clone $provider; - $provider->getOutput(); - $provider = clone $provider; - $provider->getOutput(); - $elapsed1 = PHP_Timer::stop(); - $this->assertGreaterThan($elapsed, $elapsed1, 'Persistent resource simulation should be faster'); - } - - public function testSerializeUnserialize() { - $output = $this->provider->getOutput(); - $serialized = serialize($this->provider); - $this->provider = null; - $this->provider = unserialize($serialized); - $this->assertEquals($output, $this->provider->getOutput(), 'Output from original and unserialized provider should be equal'); - } -} \ No newline at end of file diff --git a/vendor/codescale/ffmpeg-php/test/provider/FFprobeOutputProviderTest.php b/vendor/codescale/ffmpeg-php/test/provider/FFprobeOutputProviderTest.php deleted file mode 100644 index 042bc388..00000000 --- a/vendor/codescale/ffmpeg-php/test/provider/FFprobeOutputProviderTest.php +++ /dev/null @@ -1,94 +0,0 @@ -provider = new FFprobeOutputProvider(); - $this->provider->setMovieFile(self::$moviePath); - } - - public function tearDown() { - $this->provider = null; - } - - public function testGetOutput() { - $output = $this->provider->getOutput(); - $this->assertEquals(1, preg_match('/FFprobe version/i', $output)); - } - - public function testGetOutputFileDoesntExist() { - try { - $provider = new FFprobeOutputProvider(); - $provider->setMovieFile(uniqid('test', true)); - $provider->getOutput(); - } catch (Exception $ex) { - if ($ex->getCode() == 334561) { - return; - } else { - $this->fail('Expected exception raise with wrong code'); - } - } - - $this->fail('An expected exception with code 334561 has not been raised'); - } - - public function testPersistentResourceSimulation() { - PHP_Timer::start(); - $provider = new FFprobeOutputProvider('ffprobe', true); - $provider->setMovieFile(self::$moviePath); - $provider->getOutput(); - $provider = clone $provider; - $provider->getOutput(); - $provider = clone $provider; - $provider->getOutput(); - $elapsed = PHP_Timer::stop(); - - PHP_Timer::start(); - $provider = new FFprobeOutputProvider('ffprobe', false); - $provider->setMovieFile(self::$moviePath); - $provider->getOutput(); - $provider = clone $provider; - $provider->getOutput(); - $provider = clone $provider; - $provider->getOutput(); - $elapsed1 = PHP_Timer::stop(); - $this->assertGreaterThan($elapsed, $elapsed1, 'Persistent resource simulation should be faster'); - } - - public function testSerializeUnserialize() { - $output = $this->provider->getOutput(); - $serialized = serialize($this->provider); - $this->provider = null; - $this->provider = unserialize($serialized); - $this->assertEquals($output, $this->provider->getOutput(), 'Output from original and unserialized provider should be equal'); - } -} \ No newline at end of file diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php deleted file mode 100644 index ef992451..00000000 --- a/vendor/composer/ClassLoader.php +++ /dev/null @@ -1,246 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0 class loader - * - * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - */ -class ClassLoader -{ - private $prefixes = array(); - private $fallbackDirs = array(); - private $useIncludePath = false; - private $classMap = array(); - - public function getPrefixes() - { - return call_user_func_array('array_merge', $this->prefixes); - } - - public function getFallbackDirs() - { - return $this->fallbackDirs; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of classes, merging with any others previously set. - * - * @param string $prefix The classes prefix - * @param array|string $paths The location(s) of the classes - * @param bool $prepend Prepend the location(s) - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirs = array_merge( - (array) $paths, - $this->fallbackDirs - ); - } else { - $this->fallbackDirs = array_merge( - $this->fallbackDirs, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixes[$first][$prefix])) { - $this->prefixes[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixes[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixes[$first][$prefix] - ); - } else { - $this->prefixes[$first][$prefix] = array_merge( - $this->prefixes[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of classes, replacing any others previously set. - * - * @param string $prefix The classes prefix - * @param array|string $paths The location(s) of the classes - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirs = (array) $paths; - - return; - } - $this->prefixes[substr($prefix, 0, 1)][$prefix] = (array) $paths; - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - include $file; - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $classPath = strtr(substr($class, 0, $pos), '\\', DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; - $className = substr($class, $pos + 1); - } else { - // PEAR-like class name - $classPath = null; - $className = $class; - } - - $classPath .= strtr($className, '_', DIRECTORY_SEPARATOR) . '.php'; - - $first = $class[0]; - if (isset($this->prefixes[$first])) { - foreach ($this->prefixes[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) { - return $dir . DIRECTORY_SEPARATOR . $classPath; - } - } - } - } - } - - foreach ($this->fallbackDirs as $dir) { - if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) { - return $dir . DIRECTORY_SEPARATOR . $classPath; - } - } - - if ($this->useIncludePath && $file = stream_resolve_include_path($classPath)) { - return $file; - } - - return $this->classMap[$class] = false; - } -} diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php deleted file mode 100644 index 2604e666..00000000 --- a/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,1893 +0,0 @@ - $vendorDir . '/codescale/ffmpeg-php/provider/AbstractOutputProvider.php', - 'AccountController' => $baseDir . '/app/controllers/AccountController.php', - 'AlbumDownloader' => $baseDir . '/app/models/AlbumDownloader.php', - 'AlbumsController' => $baseDir . '/app/controllers/AlbumsController.php', - 'ApiControllerBase' => $baseDir . '/app/controllers/ApiControllerBase.php', - 'Api\\Web\\AccountController' => $baseDir . '/app/controllers/Api/Web/AccountController.php', - 'Api\\Web\\AlbumsController' => $baseDir . '/app/controllers/Api/Web/AlbumsController.php', - 'Api\\Web\\ArtistsController' => $baseDir . '/app/controllers/Api/Web/ArtistsController.php', - 'Api\\Web\\AuthController' => $baseDir . '/app/controllers/Api/Web/AuthController.php', - 'Api\\Web\\CommentsController' => $baseDir . '/app/controllers/Api/Web/CommentsController.php', - 'Api\\Web\\DashboardController' => $baseDir . '/app/controllers/Api/Web/DashboardController.php', - 'Api\\Web\\FavouritesController' => $baseDir . '/app/controllers/Api/Web/FavouritesController.php', - 'Api\\Web\\FollowController' => $baseDir . '/app/controllers/Api/Web/FollowController.php', - 'Api\\Web\\ImagesController' => $baseDir . '/app/controllers/Api/Web/ImagesController.php', - 'Api\\Web\\PlaylistsController' => $baseDir . '/app/controllers/Api/Web/PlaylistsController.php', - 'Api\\Web\\ProfilerController' => $baseDir . '/app/controllers/Api/Web/ProfilerController.php', - 'Api\\Web\\TaxonomiesController' => $baseDir . '/app/controllers/Api/Web/TaxonomiesController.php', - 'Api\\Web\\TracksController' => $baseDir . '/app/controllers/Api/Web/TracksController.php', - 'ArtistsController' => $baseDir . '/app/controllers/ArtistsController.php', - 'Assetic\\AssetManager' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/AssetManager.php', - 'Assetic\\AssetWriter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/AssetWriter.php', - 'Assetic\\Asset\\AssetCache' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/AssetCache.php', - 'Assetic\\Asset\\AssetCollection' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php', - 'Assetic\\Asset\\AssetCollectionInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/AssetCollectionInterface.php', - 'Assetic\\Asset\\AssetInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/AssetInterface.php', - 'Assetic\\Asset\\AssetReference' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/AssetReference.php', - 'Assetic\\Asset\\BaseAsset' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php', - 'Assetic\\Asset\\FileAsset' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php', - 'Assetic\\Asset\\GlobAsset' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php', - 'Assetic\\Asset\\HttpAsset' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/HttpAsset.php', - 'Assetic\\Asset\\Iterator\\AssetCollectionFilterIterator' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionFilterIterator.php', - 'Assetic\\Asset\\Iterator\\AssetCollectionIterator' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php', - 'Assetic\\Asset\\StringAsset' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Asset/StringAsset.php', - 'Assetic\\Cache\\ApcCache' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Cache/ApcCache.php', - 'Assetic\\Cache\\ArrayCache' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Cache/ArrayCache.php', - 'Assetic\\Cache\\CacheInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Cache/CacheInterface.php', - 'Assetic\\Cache\\ConfigCache' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php', - 'Assetic\\Cache\\ExpiringCache' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Cache/ExpiringCache.php', - 'Assetic\\Cache\\FilesystemCache' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php', - 'Assetic\\Exception\\Exception' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Exception/Exception.php', - 'Assetic\\Exception\\FilterException' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Exception/FilterException.php', - 'Assetic\\Extension\\Twig\\AsseticExtension' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticExtension.php', - 'Assetic\\Extension\\Twig\\AsseticFilterFunction' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php', - 'Assetic\\Extension\\Twig\\AsseticFilterInvoker' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php', - 'Assetic\\Extension\\Twig\\AsseticNode' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticNode.php', - 'Assetic\\Extension\\Twig\\AsseticTokenParser' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php', - 'Assetic\\Extension\\Twig\\TwigFormulaLoader' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php', - 'Assetic\\Extension\\Twig\\TwigResource' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigResource.php', - 'Assetic\\Extension\\Twig\\ValueContainer' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Extension/Twig/ValueContainer.php', - 'Assetic\\Factory\\AssetFactory' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/AssetFactory.php', - 'Assetic\\Factory\\LazyAssetManager' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php', - 'Assetic\\Factory\\Loader\\BasePhpFormulaLoader' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php', - 'Assetic\\Factory\\Loader\\CachedFormulaLoader' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Loader/CachedFormulaLoader.php', - 'Assetic\\Factory\\Loader\\FormulaLoaderInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Loader/FormulaLoaderInterface.php', - 'Assetic\\Factory\\Loader\\FunctionCallsFormulaLoader' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php', - 'Assetic\\Factory\\Resource\\CoalescingDirectoryResource' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php', - 'Assetic\\Factory\\Resource\\DirectoryResource' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php', - 'Assetic\\Factory\\Resource\\DirectoryResourceFilterIterator' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php', - 'Assetic\\Factory\\Resource\\DirectoryResourceIterator' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php', - 'Assetic\\Factory\\Resource\\FileResource' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php', - 'Assetic\\Factory\\Resource\\IteratorResourceInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Resource/IteratorResourceInterface.php', - 'Assetic\\Factory\\Resource\\ResourceInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Resource/ResourceInterface.php', - 'Assetic\\Factory\\Worker\\CacheBustingWorker' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Worker/CacheBustingWorker.php', - 'Assetic\\Factory\\Worker\\EnsureFilterWorker' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php', - 'Assetic\\Factory\\Worker\\WorkerInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Factory/Worker/WorkerInterface.php', - 'Assetic\\FilterManager' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/FilterManager.php', - 'Assetic\\Filter\\BaseCssFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/BaseCssFilter.php', - 'Assetic\\Filter\\BaseNodeFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/BaseNodeFilter.php', - 'Assetic\\Filter\\BaseProcessFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/BaseProcessFilter.php', - 'Assetic\\Filter\\CallablesFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/CallablesFilter.php', - 'Assetic\\Filter\\CoffeeScriptFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/CoffeeScriptFilter.php', - 'Assetic\\Filter\\CompassFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php', - 'Assetic\\Filter\\CssEmbedFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/CssEmbedFilter.php', - 'Assetic\\Filter\\CssImportFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php', - 'Assetic\\Filter\\CssMinFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/CssMinFilter.php', - 'Assetic\\Filter\\CssRewriteFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/CssRewriteFilter.php', - 'Assetic\\Filter\\DartFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/DartFilter.php', - 'Assetic\\Filter\\DependencyExtractorInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/DependencyExtractorInterface.php', - 'Assetic\\Filter\\EmberPrecompileFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/EmberPrecompileFilter.php', - 'Assetic\\Filter\\FilterCollection' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php', - 'Assetic\\Filter\\FilterInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/FilterInterface.php', - 'Assetic\\Filter\\GoogleClosure\\BaseCompilerFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php', - 'Assetic\\Filter\\GoogleClosure\\CompilerApiFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php', - 'Assetic\\Filter\\GoogleClosure\\CompilerJarFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php', - 'Assetic\\Filter\\GssFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/GssFilter.php', - 'Assetic\\Filter\\HandlebarsFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/HandlebarsFilter.php', - 'Assetic\\Filter\\HashableInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/HashableInterface.php', - 'Assetic\\Filter\\JSMinFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/JSMinFilter.php', - 'Assetic\\Filter\\JSMinPlusFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/JSMinPlusFilter.php', - 'Assetic\\Filter\\JpegoptimFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/JpegoptimFilter.php', - 'Assetic\\Filter\\JpegtranFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/JpegtranFilter.php', - 'Assetic\\Filter\\LessFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/LessFilter.php', - 'Assetic\\Filter\\LessphpFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/LessphpFilter.php', - 'Assetic\\Filter\\OptiPngFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/OptiPngFilter.php', - 'Assetic\\Filter\\PackagerFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/PackagerFilter.php', - 'Assetic\\Filter\\PackerFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/PackerFilter.php', - 'Assetic\\Filter\\PhpCssEmbedFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/PhpCssEmbedFilter.php', - 'Assetic\\Filter\\PngoutFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/PngoutFilter.php', - 'Assetic\\Filter\\RooleFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/RooleFilter.php', - 'Assetic\\Filter\\Sass\\SassFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php', - 'Assetic\\Filter\\Sass\\ScssFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php', - 'Assetic\\Filter\\ScssphpFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/ScssphpFilter.php', - 'Assetic\\Filter\\SprocketsFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/SprocketsFilter.php', - 'Assetic\\Filter\\StylusFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/StylusFilter.php', - 'Assetic\\Filter\\TypeScriptFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/TypeScriptFilter.php', - 'Assetic\\Filter\\UglifyCssFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/UglifyCssFilter.php', - 'Assetic\\Filter\\UglifyJs2Filter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/UglifyJs2Filter.php', - 'Assetic\\Filter\\UglifyJsFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php', - 'Assetic\\Filter\\Yui\\BaseCompressorFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php', - 'Assetic\\Filter\\Yui\\CssCompressorFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/Yui/CssCompressorFilter.php', - 'Assetic\\Filter\\Yui\\JsCompressorFilter' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php', - 'Assetic\\Util\\CssUtils' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php', - 'Assetic\\Util\\LessUtils' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Util/LessUtils.php', - 'Assetic\\Util\\TraversableString' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Util/TraversableString.php', - 'Assetic\\Util\\VarUtils' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/Util/VarUtils.php', - 'Assetic\\ValueSupplierInterface' => $vendorDir . '/kriswallsmith/assetic/src/Assetic/ValueSupplierInterface.php', - 'AuthController' => $baseDir . '/app/controllers/AuthController.php', - 'Carbon\\Carbon' => $vendorDir . '/nesbot/carbon/Carbon/Carbon.php', - 'Carbon\\Tests\\TestFixture' => $vendorDir . '/nesbot/carbon/Carbon/Tests/TestFixture.php', - 'ClassPreloader\\Application' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/Application.php', - 'ClassPreloader\\ClassList' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/ClassList.php', - 'ClassPreloader\\ClassLoader' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/ClassLoader.php', - 'ClassPreloader\\ClassNode' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/ClassNode.php', - 'ClassPreloader\\Command\\PreCompileCommand' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/Command/PreCompileCommand.php', - 'ClassPreloader\\Config' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/Config.php', - 'ClassPreloader\\Parser\\AbstractNodeVisitor' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/Parser/AbstractNodeVisitor.php', - 'ClassPreloader\\Parser\\DirVisitor' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/Parser/DirVisitor.php', - 'ClassPreloader\\Parser\\FileVisitor' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/Parser/FileVisitor.php', - 'ClassPreloader\\Parser\\NodeTraverser' => $vendorDir . '/classpreloader/classpreloader/src/ClassPreloader/Parser/NodeTraverser.php', - 'Commands\\AddTrackToPlaylistCommand' => $baseDir . '/app/models/Commands/AddTrackToPlaylistCommand.php', - 'Commands\\CommandBase' => $baseDir . '/app/models/Commands/CommandBase.php', - 'Commands\\CommandResponse' => $baseDir . '/app/models/Commands/CommandResponse.php', - 'Commands\\CreateAlbumCommand' => $baseDir . '/app/models/Commands/CreateAlbumCommand.php', - 'Commands\\CreateCommentCommand' => $baseDir . '/app/models/Commands/CreateCommentCommand.php', - 'Commands\\CreatePlaylistCommand' => $baseDir . '/app/models/Commands/CreatePlaylistCommand.php', - 'Commands\\DeleteAlbumCommand' => $baseDir . '/app/models/Commands/DeleteAlbumCommand.php', - 'Commands\\DeletePlaylistCommand' => $baseDir . '/app/models/Commands/DeletePlaylistCommand.php', - 'Commands\\DeleteTrackCommand' => $baseDir . '/app/models/Commands/DeleteTrackCommand.php', - 'Commands\\EditAlbumCommand' => $baseDir . '/app/models/Commands/EditAlbumCommand.php', - 'Commands\\EditPlaylistCommand' => $baseDir . '/app/models/Commands/EditPlaylistCommand.php', - 'Commands\\EditTrackCommand' => $baseDir . '/app/models/Commands/EditTrackCommand.php', - 'Commands\\SaveAccountSettingsCommand' => $baseDir . '/app/models/Commands/SaveAccountSettingsCommand.php', - 'Commands\\ToggleFavouriteCommand' => $baseDir . '/app/models/Commands/ToggleFavouriteCommand.php', - 'Commands\\ToggleFollowingCommand' => $baseDir . '/app/models/Commands/ToggleFollowingCommand.php', - 'Commands\\UploadTrackCommand' => $baseDir . '/app/models/Commands/UploadTrackCommand.php', - 'ContentController' => $baseDir . '/app/controllers/ContentController.php', - 'CreateAlbums' => $baseDir . '/app/database/migrations/2013_07_28_060804_create_albums.php', - 'CreateComments' => $baseDir . '/app/database/migrations/2013_08_01_051337_create_comments.php', - 'CreateFavourites' => $baseDir . '/app/database/migrations/2013_08_18_045248_create_favourites.php', - 'CreateFollowers' => $baseDir . '/app/database/migrations/2013_08_29_025516_create_followers.php', - 'CreateImagesTable' => $baseDir . '/app/database/migrations/2013_07_26_230827_create_images_table.php', - 'CreatePlaylists' => $baseDir . '/app/database/migrations/2013_07_28_135136_create_playlists.php', - 'CreateSongsTable' => $baseDir . '/app/database/migrations/2013_07_28_034328_create_songs_table.php', - 'CreateTracksTable' => $baseDir . '/app/database/migrations/2013_06_27_015259_create_tracks_table.php', - 'CreateUserTables' => $baseDir . '/app/database/migrations/2013_08_18_041928_create_user_tables.php', - 'CreateUsersTable' => $baseDir . '/app/database/migrations/2013_06_07_003952_create_users_table.php', - 'DatabaseSeeder' => $baseDir . '/app/database/seeds/DatabaseSeeder.php', - 'Doctrine\\Common\\Annotations\\Annotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php', - 'Doctrine\\Common\\Annotations\\AnnotationException' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php', - 'Doctrine\\Common\\Annotations\\AnnotationReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php', - 'Doctrine\\Common\\Annotations\\AnnotationRegistry' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Attribute' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Attributes' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Enum' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php', - 'Doctrine\\Common\\Annotations\\Annotation\\IgnoreAnnotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Required' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php', - 'Doctrine\\Common\\Annotations\\Annotation\\Target' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php', - 'Doctrine\\Common\\Annotations\\CachedReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php', - 'Doctrine\\Common\\Annotations\\DocLexer' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php', - 'Doctrine\\Common\\Annotations\\DocParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php', - 'Doctrine\\Common\\Annotations\\FileCacheReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php', - 'Doctrine\\Common\\Annotations\\IndexedReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php', - 'Doctrine\\Common\\Annotations\\PhpParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php', - 'Doctrine\\Common\\Annotations\\Reader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php', - 'Doctrine\\Common\\Annotations\\SimpleAnnotationReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php', - 'Doctrine\\Common\\Annotations\\TokenParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php', - 'Doctrine\\Common\\Cache\\ApcCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php', - 'Doctrine\\Common\\Cache\\ArrayCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php', - 'Doctrine\\Common\\Cache\\Cache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php', - 'Doctrine\\Common\\Cache\\CacheProvider' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php', - 'Doctrine\\Common\\Cache\\CouchbaseCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php', - 'Doctrine\\Common\\Cache\\FileCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php', - 'Doctrine\\Common\\Cache\\FilesystemCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php', - 'Doctrine\\Common\\Cache\\MemcacheCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php', - 'Doctrine\\Common\\Cache\\MemcachedCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php', - 'Doctrine\\Common\\Cache\\PhpFileCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php', - 'Doctrine\\Common\\Cache\\RedisCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php', - 'Doctrine\\Common\\Cache\\WinCacheCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php', - 'Doctrine\\Common\\Cache\\XcacheCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php', - 'Doctrine\\Common\\Cache\\ZendDataCache' => $vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php', - 'Doctrine\\Common\\ClassLoader' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/ClassLoader.php', - 'Doctrine\\Common\\Collections\\ArrayCollection' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/ArrayCollection.php', - 'Doctrine\\Common\\Collections\\Collection' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/Collection.php', - 'Doctrine\\Common\\Collections\\Criteria' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php', - 'Doctrine\\Common\\Collections\\Expr\\ClosureExpressionVisitor' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php', - 'Doctrine\\Common\\Collections\\Expr\\Comparison' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Comparison.php', - 'Doctrine\\Common\\Collections\\Expr\\CompositeExpression' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/Expr/CompositeExpression.php', - 'Doctrine\\Common\\Collections\\Expr\\Expression' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Expression.php', - 'Doctrine\\Common\\Collections\\Expr\\ExpressionVisitor' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ExpressionVisitor.php', - 'Doctrine\\Common\\Collections\\Expr\\Value' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/Expr/Value.php', - 'Doctrine\\Common\\Collections\\ExpressionBuilder' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php', - 'Doctrine\\Common\\Collections\\Selectable' => $vendorDir . '/doctrine/collections/lib/Doctrine/Common/Collections/Selectable.php', - 'Doctrine\\Common\\CommonException' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/CommonException.php', - 'Doctrine\\Common\\Comparable' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Comparable.php', - 'Doctrine\\Common\\EventArgs' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/EventArgs.php', - 'Doctrine\\Common\\EventManager' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/EventManager.php', - 'Doctrine\\Common\\EventSubscriber' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/EventSubscriber.php', - 'Doctrine\\Common\\Inflector\\Inflector' => $vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php', - 'Doctrine\\Common\\Lexer' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Lexer.php', - 'Doctrine\\Common\\Lexer\\AbstractLexer' => $vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php', - 'Doctrine\\Common\\NotifyPropertyChanged' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/NotifyPropertyChanged.php', - 'Doctrine\\Common\\Persistence\\AbstractManagerRegistry' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php', - 'Doctrine\\Common\\Persistence\\ConnectionRegistry' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php', - 'Doctrine\\Common\\Persistence\\Event\\LifecycleEventArgs' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php', - 'Doctrine\\Common\\Persistence\\Event\\LoadClassMetadataEventArgs' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php', - 'Doctrine\\Common\\Persistence\\Event\\ManagerEventArgs' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php', - 'Doctrine\\Common\\Persistence\\Event\\OnClearEventArgs' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php', - 'Doctrine\\Common\\Persistence\\Event\\PreUpdateEventArgs' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php', - 'Doctrine\\Common\\Persistence\\ManagerRegistry' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php', - 'Doctrine\\Common\\Persistence\\Mapping\\AbstractClassMetadataFactory' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php', - 'Doctrine\\Common\\Persistence\\Mapping\\ClassMetadata' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php', - 'Doctrine\\Common\\Persistence\\Mapping\\ClassMetadataFactory' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php', - 'Doctrine\\Common\\Persistence\\Mapping\\Driver\\AnnotationDriver' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php', - 'Doctrine\\Common\\Persistence\\Mapping\\Driver\\DefaultFileLocator' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php', - 'Doctrine\\Common\\Persistence\\Mapping\\Driver\\FileDriver' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php', - 'Doctrine\\Common\\Persistence\\Mapping\\Driver\\FileLocator' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php', - 'Doctrine\\Common\\Persistence\\Mapping\\Driver\\MappingDriver' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php', - 'Doctrine\\Common\\Persistence\\Mapping\\Driver\\MappingDriverChain' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php', - 'Doctrine\\Common\\Persistence\\Mapping\\Driver\\PHPDriver' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php', - 'Doctrine\\Common\\Persistence\\Mapping\\Driver\\StaticPHPDriver' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php', - 'Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php', - 'Doctrine\\Common\\Persistence\\Mapping\\MappingException' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php', - 'Doctrine\\Common\\Persistence\\Mapping\\ReflectionService' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php', - 'Doctrine\\Common\\Persistence\\Mapping\\RuntimeReflectionService' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php', - 'Doctrine\\Common\\Persistence\\Mapping\\StaticReflectionService' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php', - 'Doctrine\\Common\\Persistence\\ObjectManager' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php', - 'Doctrine\\Common\\Persistence\\ObjectManagerAware' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php', - 'Doctrine\\Common\\Persistence\\ObjectManagerDecorator' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php', - 'Doctrine\\Common\\Persistence\\ObjectRepository' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/ObjectRepository.php', - 'Doctrine\\Common\\Persistence\\PersistentObject' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php', - 'Doctrine\\Common\\Persistence\\Proxy' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Persistence/Proxy.php', - 'Doctrine\\Common\\PropertyChangedListener' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/PropertyChangedListener.php', - 'Doctrine\\Common\\Proxy\\AbstractProxyFactory' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php', - 'Doctrine\\Common\\Proxy\\Autoloader' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Proxy/Autoloader.php', - 'Doctrine\\Common\\Proxy\\Exception\\InvalidArgumentException' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php', - 'Doctrine\\Common\\Proxy\\Exception\\ProxyException' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Proxy/Exception/ProxyException.php', - 'Doctrine\\Common\\Proxy\\Exception\\UnexpectedValueException' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php', - 'Doctrine\\Common\\Proxy\\Proxy' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Proxy/Proxy.php', - 'Doctrine\\Common\\Proxy\\ProxyDefinition' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Proxy/ProxyDefinition.php', - 'Doctrine\\Common\\Proxy\\ProxyGenerator' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php', - 'Doctrine\\Common\\Reflection\\ClassFinderInterface' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Reflection/ClassFinderInterface.php', - 'Doctrine\\Common\\Reflection\\Psr0FindFile' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Reflection/Psr0FindFile.php', - 'Doctrine\\Common\\Reflection\\ReflectionProviderInterface' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Reflection/ReflectionProviderInterface.php', - 'Doctrine\\Common\\Reflection\\RuntimePublicReflectionProperty' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Reflection/RuntimePublicReflectionProperty.php', - 'Doctrine\\Common\\Reflection\\StaticReflectionClass' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php', - 'Doctrine\\Common\\Reflection\\StaticReflectionMethod' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php', - 'Doctrine\\Common\\Reflection\\StaticReflectionParser' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php', - 'Doctrine\\Common\\Reflection\\StaticReflectionProperty' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php', - 'Doctrine\\Common\\Util\\ClassUtils' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php', - 'Doctrine\\Common\\Util\\Debug' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Util/Debug.php', - 'Doctrine\\Common\\Util\\Inflector' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Util/Inflector.php', - 'Doctrine\\Common\\Version' => $vendorDir . '/doctrine/common/lib/Doctrine/Common/Version.php', - 'Doctrine\\DBAL\\Cache\\ArrayStatement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Cache/ArrayStatement.php', - 'Doctrine\\DBAL\\Cache\\CacheException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Cache/CacheException.php', - 'Doctrine\\DBAL\\Cache\\QueryCacheProfile' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php', - 'Doctrine\\DBAL\\Cache\\ResultCacheStatement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php', - 'Doctrine\\DBAL\\Configuration' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php', - 'Doctrine\\DBAL\\Connection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Connection.php', - 'Doctrine\\DBAL\\ConnectionException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/ConnectionException.php', - 'Doctrine\\DBAL\\Connections\\MasterSlaveConnection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php', - 'Doctrine\\DBAL\\DBALException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php', - 'Doctrine\\DBAL\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver.php', - 'Doctrine\\DBAL\\DriverManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php', - 'Doctrine\\DBAL\\Driver\\Connection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/Connection.php', - 'Doctrine\\DBAL\\Driver\\DrizzlePDOMySql\\Connection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Connection.php', - 'Doctrine\\DBAL\\Driver\\DrizzlePDOMySql\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/DrizzlePDOMySql/Driver.php', - 'Doctrine\\DBAL\\Driver\\IBMDB2\\DB2Connection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php', - 'Doctrine\\DBAL\\Driver\\IBMDB2\\DB2Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php', - 'Doctrine\\DBAL\\Driver\\IBMDB2\\DB2Exception' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php', - 'Doctrine\\DBAL\\Driver\\IBMDB2\\DB2Statement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php', - 'Doctrine\\DBAL\\Driver\\Mysqli\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php', - 'Doctrine\\DBAL\\Driver\\Mysqli\\MysqliConnection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php', - 'Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php', - 'Doctrine\\DBAL\\Driver\\Mysqli\\MysqliStatement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php', - 'Doctrine\\DBAL\\Driver\\OCI8\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Driver.php', - 'Doctrine\\DBAL\\Driver\\OCI8\\OCI8Connection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php', - 'Doctrine\\DBAL\\Driver\\OCI8\\OCI8Exception' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php', - 'Doctrine\\DBAL\\Driver\\OCI8\\OCI8Statement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php', - 'Doctrine\\DBAL\\Driver\\PDOConnection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php', - 'Doctrine\\DBAL\\Driver\\PDOIbm\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php', - 'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php', - 'Doctrine\\DBAL\\Driver\\PDOOracle\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php', - 'Doctrine\\DBAL\\Driver\\PDOPgSql\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php', - 'Doctrine\\DBAL\\Driver\\PDOSqlite\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php', - 'Doctrine\\DBAL\\Driver\\PDOSqlsrv\\Connection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php', - 'Doctrine\\DBAL\\Driver\\PDOSqlsrv\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php', - 'Doctrine\\DBAL\\Driver\\PDOStatement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php', - 'Doctrine\\DBAL\\Driver\\ResultStatement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/ResultStatement.php', - 'Doctrine\\DBAL\\Driver\\SQLSrv\\Driver' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/Driver.php', - 'Doctrine\\DBAL\\Driver\\SQLSrv\\LastInsertId' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/LastInsertId.php', - 'Doctrine\\DBAL\\Driver\\SQLSrv\\SQLSrvConnection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php', - 'Doctrine\\DBAL\\Driver\\SQLSrv\\SQLSrvException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php', - 'Doctrine\\DBAL\\Driver\\SQLSrv\\SQLSrvStatement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php', - 'Doctrine\\DBAL\\Driver\\Statement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Driver/Statement.php', - 'Doctrine\\DBAL\\Event\\ConnectionEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php', - 'Doctrine\\DBAL\\Event\\Listeners\\MysqlSessionInit' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php', - 'Doctrine\\DBAL\\Event\\Listeners\\OracleSessionInit' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php', - 'Doctrine\\DBAL\\Event\\Listeners\\SQLSessionInit' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php', - 'Doctrine\\DBAL\\Event\\SchemaAlterTableAddColumnEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php', - 'Doctrine\\DBAL\\Event\\SchemaAlterTableChangeColumnEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php', - 'Doctrine\\DBAL\\Event\\SchemaAlterTableEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php', - 'Doctrine\\DBAL\\Event\\SchemaAlterTableRemoveColumnEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php', - 'Doctrine\\DBAL\\Event\\SchemaAlterTableRenameColumnEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php', - 'Doctrine\\DBAL\\Event\\SchemaColumnDefinitionEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php', - 'Doctrine\\DBAL\\Event\\SchemaCreateTableColumnEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php', - 'Doctrine\\DBAL\\Event\\SchemaCreateTableEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php', - 'Doctrine\\DBAL\\Event\\SchemaDropTableEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php', - 'Doctrine\\DBAL\\Event\\SchemaEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaEventArgs.php', - 'Doctrine\\DBAL\\Event\\SchemaIndexDefinitionEventArgs' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php', - 'Doctrine\\DBAL\\Events' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Events.php', - 'Doctrine\\DBAL\\Id\\TableGenerator' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Id/TableGenerator.php', - 'Doctrine\\DBAL\\Id\\TableGeneratorSchemaVisitor' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Id/TableGeneratorSchemaVisitor.php', - 'Doctrine\\DBAL\\LockMode' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/LockMode.php', - 'Doctrine\\DBAL\\Logging\\DebugStack' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Logging/DebugStack.php', - 'Doctrine\\DBAL\\Logging\\EchoSQLLogger' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php', - 'Doctrine\\DBAL\\Logging\\LoggerChain' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Logging/LoggerChain.php', - 'Doctrine\\DBAL\\Logging\\SQLLogger' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Logging/SQLLogger.php', - 'Doctrine\\DBAL\\Platforms\\AbstractPlatform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php', - 'Doctrine\\DBAL\\Platforms\\DB2Platform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DB2Platform.php', - 'Doctrine\\DBAL\\Platforms\\DrizzlePlatform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php', - 'Doctrine\\DBAL\\Platforms\\Keywords\\DB2Keywords' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DB2Keywords.php', - 'Doctrine\\DBAL\\Platforms\\Keywords\\DrizzleKeywords' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/DrizzleKeywords.php', - 'Doctrine\\DBAL\\Platforms\\Keywords\\KeywordList' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php', - 'Doctrine\\DBAL\\Platforms\\Keywords\\MsSQLKeywords' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MsSQLKeywords.php', - 'Doctrine\\DBAL\\Platforms\\Keywords\\MySQLKeywords' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/MySQLKeywords.php', - 'Doctrine\\DBAL\\Platforms\\Keywords\\OracleKeywords' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/OracleKeywords.php', - 'Doctrine\\DBAL\\Platforms\\Keywords\\PostgreSQLKeywords' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php', - 'Doctrine\\DBAL\\Platforms\\Keywords\\ReservedKeywordsValidator' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php', - 'Doctrine\\DBAL\\Platforms\\Keywords\\SQLiteKeywords' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/Keywords/SQLiteKeywords.php', - 'Doctrine\\DBAL\\Platforms\\MySqlPlatform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php', - 'Doctrine\\DBAL\\Platforms\\OraclePlatform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/OraclePlatform.php', - 'Doctrine\\DBAL\\Platforms\\PostgreSqlPlatform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php', - 'Doctrine\\DBAL\\Platforms\\SQLAzurePlatform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLAzurePlatform.php', - 'Doctrine\\DBAL\\Platforms\\SQLServer2005Platform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2005Platform.php', - 'Doctrine\\DBAL\\Platforms\\SQLServer2008Platform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php', - 'Doctrine\\DBAL\\Platforms\\SQLServerPlatform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php', - 'Doctrine\\DBAL\\Platforms\\SqlitePlatform' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php', - 'Doctrine\\DBAL\\Portability\\Connection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Portability/Connection.php', - 'Doctrine\\DBAL\\Portability\\Statement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Portability/Statement.php', - 'Doctrine\\DBAL\\Query\\Expression\\CompositeExpression' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php', - 'Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php', - 'Doctrine\\DBAL\\Query\\QueryBuilder' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php', - 'Doctrine\\DBAL\\Query\\QueryException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryException.php', - 'Doctrine\\DBAL\\SQLParserUtils' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtils.php', - 'Doctrine\\DBAL\\SQLParserUtilsException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtilsException.php', - 'Doctrine\\DBAL\\Schema\\AbstractAsset' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractAsset.php', - 'Doctrine\\DBAL\\Schema\\AbstractSchemaManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php', - 'Doctrine\\DBAL\\Schema\\Column' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Column.php', - 'Doctrine\\DBAL\\Schema\\ColumnDiff' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/ColumnDiff.php', - 'Doctrine\\DBAL\\Schema\\Comparator' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Comparator.php', - 'Doctrine\\DBAL\\Schema\\Constraint' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Constraint.php', - 'Doctrine\\DBAL\\Schema\\DB2SchemaManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php', - 'Doctrine\\DBAL\\Schema\\DrizzleSchemaManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/DrizzleSchemaManager.php', - 'Doctrine\\DBAL\\Schema\\ForeignKeyConstraint' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php', - 'Doctrine\\DBAL\\Schema\\Index' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Index.php', - 'Doctrine\\DBAL\\Schema\\MySqlSchemaManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php', - 'Doctrine\\DBAL\\Schema\\OracleSchemaManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php', - 'Doctrine\\DBAL\\Schema\\PostgreSqlSchemaManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php', - 'Doctrine\\DBAL\\Schema\\SQLServerSchemaManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php', - 'Doctrine\\DBAL\\Schema\\Schema' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Schema.php', - 'Doctrine\\DBAL\\Schema\\SchemaConfig' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaConfig.php', - 'Doctrine\\DBAL\\Schema\\SchemaDiff' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaDiff.php', - 'Doctrine\\DBAL\\Schema\\SchemaException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaException.php', - 'Doctrine\\DBAL\\Schema\\Sequence' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Sequence.php', - 'Doctrine\\DBAL\\Schema\\SqliteSchemaManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php', - 'Doctrine\\DBAL\\Schema\\Synchronizer\\AbstractSchemaSynchronizer' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/AbstractSchemaSynchronizer.php', - 'Doctrine\\DBAL\\Schema\\Synchronizer\\SchemaSynchronizer' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/SchemaSynchronizer.php', - 'Doctrine\\DBAL\\Schema\\Synchronizer\\SingleDatabaseSynchronizer' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php', - 'Doctrine\\DBAL\\Schema\\Table' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Table.php', - 'Doctrine\\DBAL\\Schema\\TableDiff' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/TableDiff.php', - 'Doctrine\\DBAL\\Schema\\View' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/View.php', - 'Doctrine\\DBAL\\Schema\\Visitor\\CreateSchemaSqlCollector' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php', - 'Doctrine\\DBAL\\Schema\\Visitor\\DropSchemaSqlCollector' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php', - 'Doctrine\\DBAL\\Schema\\Visitor\\Graphviz' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php', - 'Doctrine\\DBAL\\Schema\\Visitor\\RemoveNamespacedAssets' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/RemoveNamespacedAssets.php', - 'Doctrine\\DBAL\\Schema\\Visitor\\Visitor' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Schema/Visitor/Visitor.php', - 'Doctrine\\DBAL\\Sharding\\PoolingShardConnection' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php', - 'Doctrine\\DBAL\\Sharding\\PoolingShardManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Sharding/PoolingShardManager.php', - 'Doctrine\\DBAL\\Sharding\\SQLAzure\\SQLAzureFederationsSynchronizer' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureFederationsSynchronizer.php', - 'Doctrine\\DBAL\\Sharding\\SQLAzure\\SQLAzureShardManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureShardManager.php', - 'Doctrine\\DBAL\\Sharding\\SQLAzure\\Schema\\MultiTenantVisitor' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Sharding/SQLAzure/Schema/MultiTenantVisitor.php', - 'Doctrine\\DBAL\\Sharding\\ShardChoser\\MultiTenantShardChoser' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardChoser/MultiTenantShardChoser.php', - 'Doctrine\\DBAL\\Sharding\\ShardChoser\\ShardChoser' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardChoser/ShardChoser.php', - 'Doctrine\\DBAL\\Sharding\\ShardManager' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardManager.php', - 'Doctrine\\DBAL\\Sharding\\ShardingException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Sharding/ShardingException.php', - 'Doctrine\\DBAL\\Statement' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Statement.php', - 'Doctrine\\DBAL\\Tools\\Console\\Command\\ImportCommand' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php', - 'Doctrine\\DBAL\\Tools\\Console\\Command\\ReservedWordsCommand' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php', - 'Doctrine\\DBAL\\Tools\\Console\\Command\\RunSqlCommand' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php', - 'Doctrine\\DBAL\\Tools\\Console\\Helper\\ConnectionHelper' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Tools/Console/Helper/ConnectionHelper.php', - 'Doctrine\\DBAL\\Types\\ArrayType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php', - 'Doctrine\\DBAL\\Types\\BigIntType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/BigIntType.php', - 'Doctrine\\DBAL\\Types\\BlobType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/BlobType.php', - 'Doctrine\\DBAL\\Types\\BooleanType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/BooleanType.php', - 'Doctrine\\DBAL\\Types\\ConversionException' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php', - 'Doctrine\\DBAL\\Types\\DateTimeType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/DateTimeType.php', - 'Doctrine\\DBAL\\Types\\DateTimeTzType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/DateTimeTzType.php', - 'Doctrine\\DBAL\\Types\\DateType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/DateType.php', - 'Doctrine\\DBAL\\Types\\DecimalType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/DecimalType.php', - 'Doctrine\\DBAL\\Types\\FloatType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/FloatType.php', - 'Doctrine\\DBAL\\Types\\GuidType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/GuidType.php', - 'Doctrine\\DBAL\\Types\\IntegerType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/IntegerType.php', - 'Doctrine\\DBAL\\Types\\JsonArrayType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/JsonArrayType.php', - 'Doctrine\\DBAL\\Types\\ObjectType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/ObjectType.php', - 'Doctrine\\DBAL\\Types\\SimpleArrayType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/SimpleArrayType.php', - 'Doctrine\\DBAL\\Types\\SmallIntType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/SmallIntType.php', - 'Doctrine\\DBAL\\Types\\StringType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/StringType.php', - 'Doctrine\\DBAL\\Types\\TextType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/TextType.php', - 'Doctrine\\DBAL\\Types\\TimeType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/TimeType.php', - 'Doctrine\\DBAL\\Types\\Type' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/Type.php', - 'Doctrine\\DBAL\\Types\\VarDateTimeType' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Types/VarDateTimeType.php', - 'Doctrine\\DBAL\\Version' => $vendorDir . '/doctrine/dbal/lib/Doctrine/DBAL/Version.php', - 'Entities\\Album' => $baseDir . '/app/models/Entities/Album.php', - 'Entities\\Comment' => $baseDir . '/app/models/Entities/Comment.php', - 'Entities\\Favourite' => $baseDir . '/app/models/Entities/Favourite.php', - 'Entities\\Follower' => $baseDir . '/app/models/Entities/Follower.php', - 'Entities\\Genre' => $baseDir . '/app/models/Entities/Genre.php', - 'Entities\\Image' => $baseDir . '/app/models/Entities/Image.php', - 'Entities\\License' => $baseDir . '/app/models/Entities/License.php', - 'Entities\\PinnedPlaylist' => $baseDir . '/app/models/Entities/PinnedPlaylist.php', - 'Entities\\Playlist' => $baseDir . '/app/models/Entities/Playlist.php', - 'Entities\\ProfileRequest' => $baseDir . '/app/models/Entities/ProfileRequest.php', - 'Entities\\ResourceLogItem' => $baseDir . '/app/models/Entities/ResourceLogItem.php', - 'Entities\\ResourceUser' => $baseDir . '/app/models/Entities/ResourceUser.php', - 'Entities\\ShowSong' => $baseDir . '/app/models/Entities/ShowSong.php', - 'Entities\\Track' => $baseDir . '/app/models/Entities/Track.php', - 'Entities\\TrackType' => $baseDir . '/app/models/Entities/TrackType.php', - 'Entities\\User' => $baseDir . '/app/models/Entities/User.php', - 'Evenement\\EventEmitter' => $vendorDir . '/evenement/evenement/src/Evenement/EventEmitter.php', - 'Evenement\\EventEmitter2' => $vendorDir . '/evenement/evenement/src/Evenement/EventEmitter2.php', - 'Evenement\\EventEmitterInterface' => $vendorDir . '/evenement/evenement/src/Evenement/EventEmitterInterface.php', - 'FFmpegAnimatedGif' => $vendorDir . '/codescale/ffmpeg-php/FFmpegAnimatedGif.php', - 'FFmpegAnimatedGifTest' => $vendorDir . '/codescale/ffmpeg-php/test/FFmpegAnimatedGifTest.php', - 'FFmpegAutoloader' => $vendorDir . '/codescale/ffmpeg-php/FFmpegAutoloader.php', - 'FFmpegAutoloaderTest' => $vendorDir . '/codescale/ffmpeg-php/test/FFmpegAutoloaderTest.php', - 'FFmpegFrame' => $vendorDir . '/codescale/ffmpeg-php/FFmpegFrame.php', - 'FFmpegFrameTest' => $vendorDir . '/codescale/ffmpeg-php/test/FFmpegFrameTest.php', - 'FFmpegMovie' => $vendorDir . '/codescale/ffmpeg-php/FFmpegMovie.php', - 'FFmpegMovieTest' => $vendorDir . '/codescale/ffmpeg-php/test/FFmpegMovieTest.php', - 'FFmpegOutputProvider' => $vendorDir . '/codescale/ffmpeg-php/provider/FFmpegOutputProvider.php', - 'FFmpegOutputProviderTest' => $vendorDir . '/codescale/ffmpeg-php/test/provider/FFmpegOutputProviderTest.php', - 'FFprobeOutputProvider' => $vendorDir . '/codescale/ffmpeg-php/provider/FFprobeOutputProvider.php', - 'FFprobeOutputProviderTest' => $vendorDir . '/codescale/ffmpeg-php/test/provider/FFprobeOutputProviderTest.php', - 'FavouritesController' => $baseDir . '/app/controllers/FavouritesController.php', - 'Guzzle\\Common\\AbstractHasDispatcher' => $vendorDir . '/guzzle/common/Guzzle/Common/AbstractHasDispatcher.php', - 'Guzzle\\Common\\Collection' => $vendorDir . '/guzzle/common/Guzzle/Common/Collection.php', - 'Guzzle\\Common\\Event' => $vendorDir . '/guzzle/common/Guzzle/Common/Event.php', - 'Guzzle\\Common\\Exception\\BadMethodCallException' => $vendorDir . '/guzzle/common/Guzzle/Common/Exception/BadMethodCallException.php', - 'Guzzle\\Common\\Exception\\ExceptionCollection' => $vendorDir . '/guzzle/common/Guzzle/Common/Exception/ExceptionCollection.php', - 'Guzzle\\Common\\Exception\\GuzzleException' => $vendorDir . '/guzzle/common/Guzzle/Common/Exception/GuzzleException.php', - 'Guzzle\\Common\\Exception\\InvalidArgumentException' => $vendorDir . '/guzzle/common/Guzzle/Common/Exception/InvalidArgumentException.php', - 'Guzzle\\Common\\Exception\\RuntimeException' => $vendorDir . '/guzzle/common/Guzzle/Common/Exception/RuntimeException.php', - 'Guzzle\\Common\\Exception\\UnexpectedValueException' => $vendorDir . '/guzzle/common/Guzzle/Common/Exception/UnexpectedValueException.php', - 'Guzzle\\Common\\FromConfigInterface' => $vendorDir . '/guzzle/common/Guzzle/Common/FromConfigInterface.php', - 'Guzzle\\Common\\HasDispatcherInterface' => $vendorDir . '/guzzle/common/Guzzle/Common/HasDispatcherInterface.php', - 'Guzzle\\Common\\ToArrayInterface' => $vendorDir . '/guzzle/common/Guzzle/Common/ToArrayInterface.php', - 'Guzzle\\Common\\Version' => $vendorDir . '/guzzle/common/Guzzle/Common/Version.php', - 'Guzzle\\Http\\AbstractEntityBodyDecorator' => $vendorDir . '/guzzle/http/Guzzle/Http/AbstractEntityBodyDecorator.php', - 'Guzzle\\Http\\CachingEntityBody' => $vendorDir . '/guzzle/http/Guzzle/Http/CachingEntityBody.php', - 'Guzzle\\Http\\Client' => $vendorDir . '/guzzle/http/Guzzle/Http/Client.php', - 'Guzzle\\Http\\ClientInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/ClientInterface.php', - 'Guzzle\\Http\\Curl\\CurlHandle' => $vendorDir . '/guzzle/http/Guzzle/Http/Curl/CurlHandle.php', - 'Guzzle\\Http\\Curl\\CurlMulti' => $vendorDir . '/guzzle/http/Guzzle/Http/Curl/CurlMulti.php', - 'Guzzle\\Http\\Curl\\CurlMultiInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/Curl/CurlMultiInterface.php', - 'Guzzle\\Http\\Curl\\CurlMultiProxy' => $vendorDir . '/guzzle/http/Guzzle/Http/Curl/CurlMultiProxy.php', - 'Guzzle\\Http\\Curl\\CurlVersion' => $vendorDir . '/guzzle/http/Guzzle/Http/Curl/CurlVersion.php', - 'Guzzle\\Http\\Curl\\RequestMediator' => $vendorDir . '/guzzle/http/Guzzle/Http/Curl/RequestMediator.php', - 'Guzzle\\Http\\EntityBody' => $vendorDir . '/guzzle/http/Guzzle/Http/EntityBody.php', - 'Guzzle\\Http\\EntityBodyInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/EntityBodyInterface.php', - 'Guzzle\\Http\\Exception\\BadResponseException' => $vendorDir . '/guzzle/http/Guzzle/Http/Exception/BadResponseException.php', - 'Guzzle\\Http\\Exception\\ClientErrorResponseException' => $vendorDir . '/guzzle/http/Guzzle/Http/Exception/ClientErrorResponseException.php', - 'Guzzle\\Http\\Exception\\CouldNotRewindStreamException' => $vendorDir . '/guzzle/http/Guzzle/Http/Exception/CouldNotRewindStreamException.php', - 'Guzzle\\Http\\Exception\\CurlException' => $vendorDir . '/guzzle/http/Guzzle/Http/Exception/CurlException.php', - 'Guzzle\\Http\\Exception\\HttpException' => $vendorDir . '/guzzle/http/Guzzle/Http/Exception/HttpException.php', - 'Guzzle\\Http\\Exception\\MultiTransferException' => $vendorDir . '/guzzle/http/Guzzle/Http/Exception/MultiTransferException.php', - 'Guzzle\\Http\\Exception\\RequestException' => $vendorDir . '/guzzle/http/Guzzle/Http/Exception/RequestException.php', - 'Guzzle\\Http\\Exception\\ServerErrorResponseException' => $vendorDir . '/guzzle/http/Guzzle/Http/Exception/ServerErrorResponseException.php', - 'Guzzle\\Http\\Exception\\TooManyRedirectsException' => $vendorDir . '/guzzle/http/Guzzle/Http/Exception/TooManyRedirectsException.php', - 'Guzzle\\Http\\IoEmittingEntityBody' => $vendorDir . '/guzzle/http/Guzzle/Http/IoEmittingEntityBody.php', - 'Guzzle\\Http\\Message\\AbstractMessage' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/AbstractMessage.php', - 'Guzzle\\Http\\Message\\EntityEnclosingRequest' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequest.php', - 'Guzzle\\Http\\Message\\EntityEnclosingRequestInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/EntityEnclosingRequestInterface.php', - 'Guzzle\\Http\\Message\\Header' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/Header.php', - 'Guzzle\\Http\\Message\\Header\\CacheControl' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/Header/CacheControl.php', - 'Guzzle\\Http\\Message\\Header\\HeaderCollection' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/Header/HeaderCollection.php', - 'Guzzle\\Http\\Message\\Header\\HeaderFactory' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/Header/HeaderFactory.php', - 'Guzzle\\Http\\Message\\Header\\HeaderFactoryInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/Header/HeaderFactoryInterface.php', - 'Guzzle\\Http\\Message\\Header\\HeaderInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/Header/HeaderInterface.php', - 'Guzzle\\Http\\Message\\Header\\Link' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/Header/Link.php', - 'Guzzle\\Http\\Message\\MessageInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/MessageInterface.php', - 'Guzzle\\Http\\Message\\PostFile' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/PostFile.php', - 'Guzzle\\Http\\Message\\PostFileInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/PostFileInterface.php', - 'Guzzle\\Http\\Message\\Request' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/Request.php', - 'Guzzle\\Http\\Message\\RequestFactory' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/RequestFactory.php', - 'Guzzle\\Http\\Message\\RequestFactoryInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/RequestFactoryInterface.php', - 'Guzzle\\Http\\Message\\RequestInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/RequestInterface.php', - 'Guzzle\\Http\\Message\\Response' => $vendorDir . '/guzzle/http/Guzzle/Http/Message/Response.php', - 'Guzzle\\Http\\Mimetypes' => $vendorDir . '/guzzle/http/Guzzle/Http/Mimetypes.php', - 'Guzzle\\Http\\QueryAggregator\\CommaAggregator' => $vendorDir . '/guzzle/http/Guzzle/Http/QueryAggregator/CommaAggregator.php', - 'Guzzle\\Http\\QueryAggregator\\DuplicateAggregator' => $vendorDir . '/guzzle/http/Guzzle/Http/QueryAggregator/DuplicateAggregator.php', - 'Guzzle\\Http\\QueryAggregator\\PhpAggregator' => $vendorDir . '/guzzle/http/Guzzle/Http/QueryAggregator/PhpAggregator.php', - 'Guzzle\\Http\\QueryAggregator\\QueryAggregatorInterface' => $vendorDir . '/guzzle/http/Guzzle/Http/QueryAggregator/QueryAggregatorInterface.php', - 'Guzzle\\Http\\QueryString' => $vendorDir . '/guzzle/http/Guzzle/Http/QueryString.php', - 'Guzzle\\Http\\ReadLimitEntityBody' => $vendorDir . '/guzzle/http/Guzzle/Http/ReadLimitEntityBody.php', - 'Guzzle\\Http\\RedirectPlugin' => $vendorDir . '/guzzle/http/Guzzle/Http/RedirectPlugin.php', - 'Guzzle\\Http\\Url' => $vendorDir . '/guzzle/http/Guzzle/Http/Url.php', - 'Guzzle\\Parser\\Cookie\\CookieParser' => $vendorDir . '/guzzle/parser/Guzzle/Parser/Cookie/CookieParser.php', - 'Guzzle\\Parser\\Cookie\\CookieParserInterface' => $vendorDir . '/guzzle/parser/Guzzle/Parser/Cookie/CookieParserInterface.php', - 'Guzzle\\Parser\\Message\\AbstractMessageParser' => $vendorDir . '/guzzle/parser/Guzzle/Parser/Message/AbstractMessageParser.php', - 'Guzzle\\Parser\\Message\\MessageParser' => $vendorDir . '/guzzle/parser/Guzzle/Parser/Message/MessageParser.php', - 'Guzzle\\Parser\\Message\\MessageParserInterface' => $vendorDir . '/guzzle/parser/Guzzle/Parser/Message/MessageParserInterface.php', - 'Guzzle\\Parser\\Message\\PeclHttpMessageParser' => $vendorDir . '/guzzle/parser/Guzzle/Parser/Message/PeclHttpMessageParser.php', - 'Guzzle\\Parser\\ParserRegistry' => $vendorDir . '/guzzle/parser/Guzzle/Parser/ParserRegistry.php', - 'Guzzle\\Parser\\UriTemplate\\PeclUriTemplate' => $vendorDir . '/guzzle/parser/Guzzle/Parser/UriTemplate/PeclUriTemplate.php', - 'Guzzle\\Parser\\UriTemplate\\UriTemplate' => $vendorDir . '/guzzle/parser/Guzzle/Parser/UriTemplate/UriTemplate.php', - 'Guzzle\\Parser\\UriTemplate\\UriTemplateInterface' => $vendorDir . '/guzzle/parser/Guzzle/Parser/UriTemplate/UriTemplateInterface.php', - 'Guzzle\\Parser\\Url\\UrlParser' => $vendorDir . '/guzzle/parser/Guzzle/Parser/Url/UrlParser.php', - 'Guzzle\\Parser\\Url\\UrlParserInterface' => $vendorDir . '/guzzle/parser/Guzzle/Parser/Url/UrlParserInterface.php', - 'Guzzle\\Stream\\PhpStreamRequestFactory' => $vendorDir . '/guzzle/stream/Guzzle/Stream/PhpStreamRequestFactory.php', - 'Guzzle\\Stream\\Stream' => $vendorDir . '/guzzle/stream/Guzzle/Stream/Stream.php', - 'Guzzle\\Stream\\StreamInterface' => $vendorDir . '/guzzle/stream/Guzzle/Stream/StreamInterface.php', - 'Guzzle\\Stream\\StreamRequestFactoryInterface' => $vendorDir . '/guzzle/stream/Guzzle/Stream/StreamRequestFactoryInterface.php', - 'HomeController' => $baseDir . '/app/controllers/HomeController.php', - 'IlluminateQueueClosure' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php', - 'Illuminate\\Auth\\AuthManager' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/AuthManager.php', - 'Illuminate\\Auth\\AuthServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php', - 'Illuminate\\Auth\\Console\\MakeRemindersCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Console/MakeRemindersCommand.php', - 'Illuminate\\Auth\\DatabaseUserProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php', - 'Illuminate\\Auth\\EloquentUserProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php', - 'Illuminate\\Auth\\GenericUser' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/GenericUser.php', - 'Illuminate\\Auth\\Guard' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Guard.php', - 'Illuminate\\Auth\\Reminders\\DatabaseReminderRepository' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/DatabaseReminderRepository.php', - 'Illuminate\\Auth\\Reminders\\PasswordBroker' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/PasswordBroker.php', - 'Illuminate\\Auth\\Reminders\\RemindableInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/RemindableInterface.php', - 'Illuminate\\Auth\\Reminders\\ReminderRepositoryInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/ReminderRepositoryInterface.php', - 'Illuminate\\Auth\\Reminders\\ReminderServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/ReminderServiceProvider.php', - 'Illuminate\\Auth\\UserInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/UserInterface.php', - 'Illuminate\\Auth\\UserProviderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/UserProviderInterface.php', - 'Illuminate\\Cache\\ApcStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ApcStore.php', - 'Illuminate\\Cache\\ApcWrapper' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ApcWrapper.php', - 'Illuminate\\Cache\\ArrayStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ArrayStore.php', - 'Illuminate\\Cache\\CacheManager' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/CacheManager.php', - 'Illuminate\\Cache\\CacheServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php', - 'Illuminate\\Cache\\Console\\ClearCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php', - 'Illuminate\\Cache\\DatabaseStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/DatabaseStore.php', - 'Illuminate\\Cache\\FileStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/FileStore.php', - 'Illuminate\\Cache\\MemcachedConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php', - 'Illuminate\\Cache\\MemcachedStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/MemcachedStore.php', - 'Illuminate\\Cache\\RedisSection' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/RedisSection.php', - 'Illuminate\\Cache\\RedisStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/RedisStore.php', - 'Illuminate\\Cache\\Repository' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Repository.php', - 'Illuminate\\Cache\\Section' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/Section.php', - 'Illuminate\\Cache\\StoreInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/StoreInterface.php', - 'Illuminate\\Cache\\WinCacheStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/WinCacheStore.php', - 'Illuminate\\Config\\FileLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Config/FileLoader.php', - 'Illuminate\\Config\\LoaderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Config/LoaderInterface.php', - 'Illuminate\\Config\\Repository' => $vendorDir . '/laravel/framework/src/Illuminate/Config/Repository.php', - 'Illuminate\\Console\\Application' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Application.php', - 'Illuminate\\Console\\Command' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Command.php', - 'Illuminate\\Container\\BindingResolutionException' => $vendorDir . '/laravel/framework/src/Illuminate/Container/Container.php', - 'Illuminate\\Container\\Container' => $vendorDir . '/laravel/framework/src/Illuminate/Container/Container.php', - 'Illuminate\\Cookie\\CookieJar' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/CookieJar.php', - 'Illuminate\\Cookie\\CookieServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php', - 'Illuminate\\Database\\Capsule\\Manager' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Capsule/Manager.php', - 'Illuminate\\Database\\Connection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connection.php', - 'Illuminate\\Database\\ConnectionInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Database/ConnectionInterface.php', - 'Illuminate\\Database\\ConnectionResolver' => $vendorDir . '/laravel/framework/src/Illuminate/Database/ConnectionResolver.php', - 'Illuminate\\Database\\ConnectionResolverInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php', - 'Illuminate\\Database\\Connectors\\ConnectionFactory' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php', - 'Illuminate\\Database\\Connectors\\Connector' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/Connector.php', - 'Illuminate\\Database\\Connectors\\ConnectorInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php', - 'Illuminate\\Database\\Connectors\\MySqlConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php', - 'Illuminate\\Database\\Connectors\\PostgresConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php', - 'Illuminate\\Database\\Connectors\\SQLiteConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php', - 'Illuminate\\Database\\Connectors\\SqlServerConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php', - 'Illuminate\\Database\\Console\\Migrations\\BaseCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php', - 'Illuminate\\Database\\Console\\Migrations\\InstallCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php', - 'Illuminate\\Database\\Console\\Migrations\\MakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/MakeCommand.php', - 'Illuminate\\Database\\Console\\Migrations\\MigrateCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php', - 'Illuminate\\Database\\Console\\Migrations\\RefreshCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php', - 'Illuminate\\Database\\Console\\Migrations\\ResetCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php', - 'Illuminate\\Database\\Console\\Migrations\\RollbackCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php', - 'Illuminate\\Database\\Console\\SeedCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php', - 'Illuminate\\Database\\DatabaseManager' => $vendorDir . '/laravel/framework/src/Illuminate/Database/DatabaseManager.php', - 'Illuminate\\Database\\DatabaseServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php', - 'Illuminate\\Database\\Eloquent\\Builder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php', - 'Illuminate\\Database\\Eloquent\\Collection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php', - 'Illuminate\\Database\\Eloquent\\MassAssignmentException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php', - 'Illuminate\\Database\\Eloquent\\Model' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Model.php', - 'Illuminate\\Database\\Eloquent\\ModelNotFoundException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php', - 'Illuminate\\Database\\Eloquent\\Relations\\BelongsTo' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php', - 'Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php', - 'Illuminate\\Database\\Eloquent\\Relations\\HasMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php', - 'Illuminate\\Database\\Eloquent\\Relations\\HasOne' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php', - 'Illuminate\\Database\\Eloquent\\Relations\\HasOneOrMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php', - 'Illuminate\\Database\\Eloquent\\Relations\\MorphMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php', - 'Illuminate\\Database\\Eloquent\\Relations\\MorphOne' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php', - 'Illuminate\\Database\\Eloquent\\Relations\\MorphOneOrMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php', - 'Illuminate\\Database\\Eloquent\\Relations\\Pivot' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php', - 'Illuminate\\Database\\Eloquent\\Relations\\Relation' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php', - 'Illuminate\\Database\\Grammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Grammar.php', - 'Illuminate\\Database\\MigrationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php', - 'Illuminate\\Database\\Migrations\\DatabaseMigrationRepository' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php', - 'Illuminate\\Database\\Migrations\\Migration' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/Migration.php', - 'Illuminate\\Database\\Migrations\\MigrationCreator' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php', - 'Illuminate\\Database\\Migrations\\MigrationRepositoryInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php', - 'Illuminate\\Database\\Migrations\\Migrator' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php', - 'Illuminate\\Database\\MySqlConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/MySqlConnection.php', - 'Illuminate\\Database\\PostgresConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/PostgresConnection.php', - 'Illuminate\\Database\\Query\\Builder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Builder.php', - 'Illuminate\\Database\\Query\\Expression' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Expression.php', - 'Illuminate\\Database\\Query\\Grammars\\Grammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php', - 'Illuminate\\Database\\Query\\Grammars\\MySqlGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php', - 'Illuminate\\Database\\Query\\Grammars\\PostgresGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php', - 'Illuminate\\Database\\Query\\Grammars\\SQLiteGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php', - 'Illuminate\\Database\\Query\\Grammars\\SqlServerGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php', - 'Illuminate\\Database\\Query\\JoinClause' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/JoinClause.php', - 'Illuminate\\Database\\Query\\Processors\\PostgresProcessor' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php', - 'Illuminate\\Database\\Query\\Processors\\Processor' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php', - 'Illuminate\\Database\\Query\\Processors\\SqlServerProcessor' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php', - 'Illuminate\\Database\\SQLiteConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/SQLiteConnection.php', - 'Illuminate\\Database\\Schema\\Blueprint' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php', - 'Illuminate\\Database\\Schema\\Builder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Builder.php', - 'Illuminate\\Database\\Schema\\Grammars\\Grammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php', - 'Illuminate\\Database\\Schema\\Grammars\\MySqlGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php', - 'Illuminate\\Database\\Schema\\Grammars\\PostgresGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php', - 'Illuminate\\Database\\Schema\\Grammars\\SQLiteGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php', - 'Illuminate\\Database\\Schema\\Grammars\\SqlServerGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php', - 'Illuminate\\Database\\Schema\\MySqlBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php', - 'Illuminate\\Database\\SeedServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Database/SeedServiceProvider.php', - 'Illuminate\\Database\\Seeder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Seeder.php', - 'Illuminate\\Database\\SqlServerConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/SqlServerConnection.php', - 'Illuminate\\Encryption\\DecryptException' => $vendorDir . '/laravel/framework/src/Illuminate/Encryption/Encrypter.php', - 'Illuminate\\Encryption\\Encrypter' => $vendorDir . '/laravel/framework/src/Illuminate/Encryption/Encrypter.php', - 'Illuminate\\Encryption\\EncryptionServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php', - 'Illuminate\\Events\\Dispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Events/Dispatcher.php', - 'Illuminate\\Events\\EventServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Events/EventServiceProvider.php', - 'Illuminate\\Events\\Subscriber' => $vendorDir . '/laravel/framework/src/Illuminate/Events/Subscriber.php', - 'Illuminate\\Exception\\ExceptionDisplayerInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Exception/ExceptionDisplayerInterface.php', - 'Illuminate\\Exception\\ExceptionServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Exception/ExceptionServiceProvider.php', - 'Illuminate\\Exception\\Handler' => $vendorDir . '/laravel/framework/src/Illuminate/Exception/Handler.php', - 'Illuminate\\Exception\\SymfonyDisplayer' => $vendorDir . '/laravel/framework/src/Illuminate/Exception/SymfonyDisplayer.php', - 'Illuminate\\Exception\\WhoopsDisplayer' => $vendorDir . '/laravel/framework/src/Illuminate/Exception/WhoopsDisplayer.php', - 'Illuminate\\Filesystem\\FileNotFoundException' => $vendorDir . '/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', - 'Illuminate\\Filesystem\\Filesystem' => $vendorDir . '/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', - 'Illuminate\\Filesystem\\FilesystemServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php', - 'Illuminate\\Foundation\\AliasLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/AliasLoader.php', - 'Illuminate\\Foundation\\Application' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Application.php', - 'Illuminate\\Foundation\\Artisan' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Artisan.php', - 'Illuminate\\Foundation\\AssetPublisher' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/AssetPublisher.php', - 'Illuminate\\Foundation\\Composer' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Composer.php', - 'Illuminate\\Foundation\\ConfigPublisher' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/ConfigPublisher.php', - 'Illuminate\\Foundation\\Console\\AssetPublishCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/AssetPublishCommand.php', - 'Illuminate\\Foundation\\Console\\AutoloadCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/AutoloadCommand.php', - 'Illuminate\\Foundation\\Console\\ClearCompiledCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php', - 'Illuminate\\Foundation\\Console\\CommandMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/CommandMakeCommand.php', - 'Illuminate\\Foundation\\Console\\ConfigPublishCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ConfigPublishCommand.php', - 'Illuminate\\Foundation\\Console\\DownCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php', - 'Illuminate\\Foundation\\Console\\KeyGenerateCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php', - 'Illuminate\\Foundation\\Console\\OptimizeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php', - 'Illuminate\\Foundation\\Console\\RoutesCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/RoutesCommand.php', - 'Illuminate\\Foundation\\Console\\ServeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php', - 'Illuminate\\Foundation\\Console\\TinkerCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/TinkerCommand.php', - 'Illuminate\\Foundation\\Console\\UpCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php', - 'Illuminate\\Foundation\\ProviderRepository' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php', - 'Illuminate\\Foundation\\Providers\\ArtisanServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php', - 'Illuminate\\Foundation\\Providers\\CommandCreatorServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/CommandCreatorServiceProvider.php', - 'Illuminate\\Foundation\\Providers\\ComposerServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php', - 'Illuminate\\Foundation\\Providers\\KeyGeneratorServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/KeyGeneratorServiceProvider.php', - 'Illuminate\\Foundation\\Providers\\MaintenanceServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/MaintenanceServiceProvider.php', - 'Illuminate\\Foundation\\Providers\\OptimizeServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/OptimizeServiceProvider.php', - 'Illuminate\\Foundation\\Providers\\PublisherServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/PublisherServiceProvider.php', - 'Illuminate\\Foundation\\Providers\\RouteListServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/RouteListServiceProvider.php', - 'Illuminate\\Foundation\\Providers\\ServerServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/ServerServiceProvider.php', - 'Illuminate\\Foundation\\Providers\\TinkerServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Providers/TinkerServiceProvider.php', - 'Illuminate\\Foundation\\Testing\\Client' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/Client.php', - 'Illuminate\\Foundation\\Testing\\TestCase' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php', - 'Illuminate\\Hashing\\BcryptHasher' => $vendorDir . '/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php', - 'Illuminate\\Hashing\\HashServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php', - 'Illuminate\\Hashing\\HasherInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Hashing/HasherInterface.php', - 'Illuminate\\Html\\FormBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Html/FormBuilder.php', - 'Illuminate\\Html\\HtmlBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Html/HtmlBuilder.php', - 'Illuminate\\Html\\HtmlServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Html/HtmlServiceProvider.php', - 'Illuminate\\Http\\JsonResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Http/JsonResponse.php', - 'Illuminate\\Http\\RedirectResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Http/RedirectResponse.php', - 'Illuminate\\Http\\Request' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Request.php', - 'Illuminate\\Http\\Response' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Response.php', - 'Illuminate\\Log\\LogServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Log/LogServiceProvider.php', - 'Illuminate\\Log\\Writer' => $vendorDir . '/laravel/framework/src/Illuminate/Log/Writer.php', - 'Illuminate\\Mail\\MailServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php', - 'Illuminate\\Mail\\Mailer' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Mailer.php', - 'Illuminate\\Mail\\Message' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Message.php', - 'Illuminate\\Pagination\\BootstrapPresenter' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php', - 'Illuminate\\Pagination\\Environment' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Environment.php', - 'Illuminate\\Pagination\\PaginationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php', - 'Illuminate\\Pagination\\Paginator' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Paginator.php', - 'Illuminate\\Queue\\BeanstalkdQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php', - 'Illuminate\\Queue\\Connectors\\BeanstalkdConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php', - 'Illuminate\\Queue\\Connectors\\ConnectorInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/ConnectorInterface.php', - 'Illuminate\\Queue\\Connectors\\IronConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/IronConnector.php', - 'Illuminate\\Queue\\Connectors\\SqsConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/SqsConnector.php', - 'Illuminate\\Queue\\Connectors\\SyncConnector' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Connectors/SyncConnector.php', - 'Illuminate\\Queue\\Console\\ListenCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php', - 'Illuminate\\Queue\\Console\\SubscribeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/SubscribeCommand.php', - 'Illuminate\\Queue\\Console\\WorkCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php', - 'Illuminate\\Queue\\IronQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/IronQueue.php', - 'Illuminate\\Queue\\Jobs\\BeanstalkdJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php', - 'Illuminate\\Queue\\Jobs\\IronJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/IronJob.php', - 'Illuminate\\Queue\\Jobs\\Job' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/Job.php', - 'Illuminate\\Queue\\Jobs\\SqsJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/SqsJob.php', - 'Illuminate\\Queue\\Jobs\\SyncJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/SyncJob.php', - 'Illuminate\\Queue\\Listener' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Listener.php', - 'Illuminate\\Queue\\Queue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Queue.php', - 'Illuminate\\Queue\\QueueInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/QueueInterface.php', - 'Illuminate\\Queue\\QueueManager' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/QueueManager.php', - 'Illuminate\\Queue\\QueueServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php', - 'Illuminate\\Queue\\SqsQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/SqsQueue.php', - 'Illuminate\\Queue\\SyncQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/SyncQueue.php', - 'Illuminate\\Queue\\Worker' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Worker.php', - 'Illuminate\\Redis\\Database' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/Database.php', - 'Illuminate\\Redis\\RedisServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php', - 'Illuminate\\Routing\\Console\\MakeControllerCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Console/MakeControllerCommand.php', - 'Illuminate\\Routing\\ControllerServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/ControllerServiceProvider.php', - 'Illuminate\\Routing\\Controllers\\After' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Controllers/After.php', - 'Illuminate\\Routing\\Controllers\\Before' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Controllers/Before.php', - 'Illuminate\\Routing\\Controllers\\Controller' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Controllers/Controller.php', - 'Illuminate\\Routing\\Controllers\\Filter' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Controllers/Filter.php', - 'Illuminate\\Routing\\Controllers\\FilterParser' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Controllers/FilterParser.php', - 'Illuminate\\Routing\\Controllers\\Inspector' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Controllers/Inspector.php', - 'Illuminate\\Routing\\Generators\\ControllerGenerator' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Generators/ControllerGenerator.php', - 'Illuminate\\Routing\\Redirector' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Redirector.php', - 'Illuminate\\Routing\\Route' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Route.php', - 'Illuminate\\Routing\\Router' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/Router.php', - 'Illuminate\\Routing\\RoutingServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php', - 'Illuminate\\Routing\\UrlGenerator' => $vendorDir . '/laravel/framework/src/Illuminate/Routing/UrlGenerator.php', - 'Illuminate\\Session\\CacheBasedSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php', - 'Illuminate\\Session\\CommandsServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Session/CommandsServiceProvider.php', - 'Illuminate\\Session\\Console\\MakeTableCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Console/MakeTableCommand.php', - 'Illuminate\\Session\\CookieSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/CookieSessionHandler.php', - 'Illuminate\\Session\\SessionManager' => $vendorDir . '/laravel/framework/src/Illuminate/Session/SessionManager.php', - 'Illuminate\\Session\\SessionServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Session/SessionServiceProvider.php', - 'Illuminate\\Session\\Store' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Store.php', - 'Illuminate\\Session\\TokenMismatchException' => $vendorDir . '/laravel/framework/src/Illuminate/Session/TokenMismatchException.php', - 'Illuminate\\Support\\ClassLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Support/ClassLoader.php', - 'Illuminate\\Support\\Collection' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Collection.php', - 'Illuminate\\Support\\Contracts\\ArrayableInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Contracts/ArrayableInterface.php', - 'Illuminate\\Support\\Contracts\\JsonableInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Contracts/JsonableInterface.php', - 'Illuminate\\Support\\Contracts\\MessageProviderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Contracts/MessageProviderInterface.php', - 'Illuminate\\Support\\Contracts\\RenderableInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Contracts/RenderableInterface.php', - 'Illuminate\\Support\\Contracts\\ResponsePreparerInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Contracts/ResponsePreparerInterface.php', - 'Illuminate\\Support\\Facades\\App' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/App.php', - 'Illuminate\\Support\\Facades\\Artisan' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Artisan.php', - 'Illuminate\\Support\\Facades\\Auth' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Auth.php', - 'Illuminate\\Support\\Facades\\Blade' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Blade.php', - 'Illuminate\\Support\\Facades\\Cache' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Cache.php', - 'Illuminate\\Support\\Facades\\Config' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Config.php', - 'Illuminate\\Support\\Facades\\Cookie' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Cookie.php', - 'Illuminate\\Support\\Facades\\Crypt' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Crypt.php', - 'Illuminate\\Support\\Facades\\DB' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/DB.php', - 'Illuminate\\Support\\Facades\\Event' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Event.php', - 'Illuminate\\Support\\Facades\\Facade' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Facade.php', - 'Illuminate\\Support\\Facades\\File' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/File.php', - 'Illuminate\\Support\\Facades\\Form' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Form.php', - 'Illuminate\\Support\\Facades\\HTML' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/HTML.php', - 'Illuminate\\Support\\Facades\\Hash' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Hash.php', - 'Illuminate\\Support\\Facades\\Input' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Input.php', - 'Illuminate\\Support\\Facades\\Lang' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Lang.php', - 'Illuminate\\Support\\Facades\\Log' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Log.php', - 'Illuminate\\Support\\Facades\\Mail' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Mail.php', - 'Illuminate\\Support\\Facades\\Paginator' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Paginator.php', - 'Illuminate\\Support\\Facades\\Password' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Password.php', - 'Illuminate\\Support\\Facades\\Queue' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Queue.php', - 'Illuminate\\Support\\Facades\\Redirect' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Redirect.php', - 'Illuminate\\Support\\Facades\\Redis' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Redis.php', - 'Illuminate\\Support\\Facades\\Request' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Request.php', - 'Illuminate\\Support\\Facades\\Response' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Response.php', - 'Illuminate\\Support\\Facades\\Route' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Route.php', - 'Illuminate\\Support\\Facades\\Schema' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Schema.php', - 'Illuminate\\Support\\Facades\\Session' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Session.php', - 'Illuminate\\Support\\Facades\\URL' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/URL.php', - 'Illuminate\\Support\\Facades\\Validator' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/Validator.php', - 'Illuminate\\Support\\Facades\\View' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Facades/View.php', - 'Illuminate\\Support\\Fluent' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Fluent.php', - 'Illuminate\\Support\\Manager' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Manager.php', - 'Illuminate\\Support\\MessageBag' => $vendorDir . '/laravel/framework/src/Illuminate/Support/MessageBag.php', - 'Illuminate\\Support\\NamespacedItemResolver' => $vendorDir . '/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php', - 'Illuminate\\Support\\Pluralizer' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Pluralizer.php', - 'Illuminate\\Support\\SerializableClosure' => $vendorDir . '/laravel/framework/src/Illuminate/Support/SerializableClosure.php', - 'Illuminate\\Support\\ServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Support/ServiceProvider.php', - 'Illuminate\\Support\\Str' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Str.php', - 'Illuminate\\Translation\\FileLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/FileLoader.php', - 'Illuminate\\Translation\\LoaderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/LoaderInterface.php', - 'Illuminate\\Translation\\TranslationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/TranslationServiceProvider.php', - 'Illuminate\\Translation\\Translator' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/Translator.php', - 'Illuminate\\Validation\\DatabasePresenceVerifier' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php', - 'Illuminate\\Validation\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Factory.php', - 'Illuminate\\Validation\\PresenceVerifierInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php', - 'Illuminate\\Validation\\ValidationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidationServiceProvider.php', - 'Illuminate\\Validation\\Validator' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Validator.php', - 'Illuminate\\View\\Compilers\\BladeCompiler' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php', - 'Illuminate\\View\\Compilers\\Compiler' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Compiler.php', - 'Illuminate\\View\\Compilers\\CompilerInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/CompilerInterface.php', - 'Illuminate\\View\\Engines\\CompilerEngine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php', - 'Illuminate\\View\\Engines\\Engine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/Engine.php', - 'Illuminate\\View\\Engines\\EngineInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/EngineInterface.php', - 'Illuminate\\View\\Engines\\EngineResolver' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/EngineResolver.php', - 'Illuminate\\View\\Engines\\PhpEngine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php', - 'Illuminate\\View\\Environment' => $vendorDir . '/laravel/framework/src/Illuminate/View/Environment.php', - 'Illuminate\\View\\FileViewFinder' => $vendorDir . '/laravel/framework/src/Illuminate/View/FileViewFinder.php', - 'Illuminate\\View\\View' => $vendorDir . '/laravel/framework/src/Illuminate/View/View.php', - 'Illuminate\\View\\ViewFinderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php', - 'Illuminate\\View\\ViewServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewServiceProvider.php', - 'Illuminate\\Workbench\\Console\\WorkbenchMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Workbench/Console/WorkbenchMakeCommand.php', - 'Illuminate\\Workbench\\Package' => $vendorDir . '/laravel/framework/src/Illuminate/Workbench/Package.php', - 'Illuminate\\Workbench\\PackageCreator' => $vendorDir . '/laravel/framework/src/Illuminate/Workbench/PackageCreator.php', - 'Illuminate\\Workbench\\Starter' => $vendorDir . '/laravel/framework/src/Illuminate/Workbench/Starter.php', - 'Illuminate\\Workbench\\WorkbenchServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Workbench/WorkbenchServiceProvider.php', - 'ImagesController' => $baseDir . '/app/controllers/ImagesController.php', - 'MigrateOldData' => $baseDir . '/app/commands/MigrateOldData.php', - 'Monolog\\Formatter\\ChromePHPFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php', - 'Monolog\\Formatter\\FormatterInterface' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php', - 'Monolog\\Formatter\\GelfMessageFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php', - 'Monolog\\Formatter\\JsonFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php', - 'Monolog\\Formatter\\LineFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/LineFormatter.php', - 'Monolog\\Formatter\\LogstashFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php', - 'Monolog\\Formatter\\NormalizerFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php', - 'Monolog\\Formatter\\WildfireFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php', - 'Monolog\\Handler\\AbstractHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/AbstractHandler.php', - 'Monolog\\Handler\\AbstractProcessingHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php', - 'Monolog\\Handler\\AmqpHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/AmqpHandler.php', - 'Monolog\\Handler\\BufferHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/BufferHandler.php', - 'Monolog\\Handler\\ChromePHPHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php', - 'Monolog\\Handler\\CouchDBHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php', - 'Monolog\\Handler\\CubeHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/CubeHandler.php', - 'Monolog\\Handler\\DoctrineCouchDBHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php', - 'Monolog\\Handler\\FingersCrossedHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php', - 'Monolog\\Handler\\FingersCrossed\\ActivationStrategyInterface' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php', - 'Monolog\\Handler\\FingersCrossed\\ErrorLevelActivationStrategy' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php', - 'Monolog\\Handler\\FirePHPHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php', - 'Monolog\\Handler\\GelfHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/GelfHandler.php', - 'Monolog\\Handler\\GroupHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/GroupHandler.php', - 'Monolog\\Handler\\HandlerInterface' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/HandlerInterface.php', - 'Monolog\\Handler\\MailHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MailHandler.php', - 'Monolog\\Handler\\MissingExtensionException' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php', - 'Monolog\\Handler\\MongoDBHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php', - 'Monolog\\Handler\\NativeMailerHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php', - 'Monolog\\Handler\\NullHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/NullHandler.php', - 'Monolog\\Handler\\PushoverHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/PushoverHandler.php', - 'Monolog\\Handler\\RavenHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RavenHandler.php', - 'Monolog\\Handler\\RedisHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RedisHandler.php', - 'Monolog\\Handler\\RotatingFileHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php', - 'Monolog\\Handler\\SocketHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SocketHandler.php', - 'Monolog\\Handler\\StreamHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/StreamHandler.php', - 'Monolog\\Handler\\SwiftMailerHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php', - 'Monolog\\Handler\\SyslogHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SyslogHandler.php', - 'Monolog\\Handler\\TestHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/TestHandler.php', - 'Monolog\\Handler\\ZendMonitorHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php', - 'Monolog\\Logger' => $vendorDir . '/monolog/monolog/src/Monolog/Logger.php', - 'Monolog\\Processor\\IntrospectionProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php', - 'Monolog\\Processor\\MemoryPeakUsageProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php', - 'Monolog\\Processor\\MemoryProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php', - 'Monolog\\Processor\\MemoryUsageProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php', - 'Monolog\\Processor\\ProcessIdProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php', - 'Monolog\\Processor\\PsrLogMessageProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php', - 'Monolog\\Processor\\UidProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/UidProcessor.php', - 'Monolog\\Processor\\WebProcessor' => $vendorDir . '/monolog/monolog/src/Monolog/Processor/WebProcessor.php', - 'Normalizer' => $vendorDir . '/patchwork/utf8/class/Normalizer.php', - 'Oauth' => $baseDir . '/app/database/migrations/2013_09_01_025031_oauth.php', - 'OutputProvider' => $vendorDir . '/codescale/ffmpeg-php/provider/OutputProvider.php', - 'PHPParser_Autoloader' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Autoloader.php', - 'PHPParser_Builder' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Builder.php', - 'PHPParser_BuilderAbstract' => $vendorDir . '/nikic/php-parser/lib/PHPParser/BuilderAbstract.php', - 'PHPParser_BuilderFactory' => $vendorDir . '/nikic/php-parser/lib/PHPParser/BuilderFactory.php', - 'PHPParser_Builder_Class' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Builder/Class.php', - 'PHPParser_Builder_Function' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Builder/Function.php', - 'PHPParser_Builder_Interface' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Builder/Interface.php', - 'PHPParser_Builder_Method' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Builder/Method.php', - 'PHPParser_Builder_Param' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Builder/Param.php', - 'PHPParser_Builder_Property' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Builder/Property.php', - 'PHPParser_Comment' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Comment.php', - 'PHPParser_Comment_Doc' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Comment/Doc.php', - 'PHPParser_Error' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Error.php', - 'PHPParser_Lexer' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Lexer.php', - 'PHPParser_Lexer_Emulative' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Lexer/Emulative.php', - 'PHPParser_Node' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node.php', - 'PHPParser_NodeAbstract' => $vendorDir . '/nikic/php-parser/lib/PHPParser/NodeAbstract.php', - 'PHPParser_NodeDumper' => $vendorDir . '/nikic/php-parser/lib/PHPParser/NodeDumper.php', - 'PHPParser_NodeTraverser' => $vendorDir . '/nikic/php-parser/lib/PHPParser/NodeTraverser.php', - 'PHPParser_NodeTraverserInterface' => $vendorDir . '/nikic/php-parser/lib/PHPParser/NodeTraverserInterface.php', - 'PHPParser_NodeVisitor' => $vendorDir . '/nikic/php-parser/lib/PHPParser/NodeVisitor.php', - 'PHPParser_NodeVisitorAbstract' => $vendorDir . '/nikic/php-parser/lib/PHPParser/NodeVisitorAbstract.php', - 'PHPParser_NodeVisitor_NameResolver' => $vendorDir . '/nikic/php-parser/lib/PHPParser/NodeVisitor/NameResolver.php', - 'PHPParser_Node_Arg' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Arg.php', - 'PHPParser_Node_Const' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Const.php', - 'PHPParser_Node_Expr' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr.php', - 'PHPParser_Node_Expr_Array' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Array.php', - 'PHPParser_Node_Expr_ArrayDimFetch' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/ArrayDimFetch.php', - 'PHPParser_Node_Expr_ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/ArrayItem.php', - 'PHPParser_Node_Expr_Assign' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Assign.php', - 'PHPParser_Node_Expr_AssignBitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignBitwiseAnd.php', - 'PHPParser_Node_Expr_AssignBitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignBitwiseOr.php', - 'PHPParser_Node_Expr_AssignBitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignBitwiseXor.php', - 'PHPParser_Node_Expr_AssignConcat' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignConcat.php', - 'PHPParser_Node_Expr_AssignDiv' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignDiv.php', - 'PHPParser_Node_Expr_AssignMinus' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignMinus.php', - 'PHPParser_Node_Expr_AssignMod' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignMod.php', - 'PHPParser_Node_Expr_AssignMul' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignMul.php', - 'PHPParser_Node_Expr_AssignPlus' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignPlus.php', - 'PHPParser_Node_Expr_AssignRef' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignRef.php', - 'PHPParser_Node_Expr_AssignShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignShiftLeft.php', - 'PHPParser_Node_Expr_AssignShiftRight' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/AssignShiftRight.php', - 'PHPParser_Node_Expr_BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseAnd.php', - 'PHPParser_Node_Expr_BitwiseNot' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseNot.php', - 'PHPParser_Node_Expr_BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseOr.php', - 'PHPParser_Node_Expr_BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseXor.php', - 'PHPParser_Node_Expr_BooleanAnd' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/BooleanAnd.php', - 'PHPParser_Node_Expr_BooleanNot' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/BooleanNot.php', - 'PHPParser_Node_Expr_BooleanOr' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/BooleanOr.php', - 'PHPParser_Node_Expr_Cast' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Cast.php', - 'PHPParser_Node_Expr_Cast_Array' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Array.php', - 'PHPParser_Node_Expr_Cast_Bool' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Bool.php', - 'PHPParser_Node_Expr_Cast_Double' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Double.php', - 'PHPParser_Node_Expr_Cast_Int' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Int.php', - 'PHPParser_Node_Expr_Cast_Object' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Object.php', - 'PHPParser_Node_Expr_Cast_String' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/String.php', - 'PHPParser_Node_Expr_Cast_Unset' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Unset.php', - 'PHPParser_Node_Expr_ClassConstFetch' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/ClassConstFetch.php', - 'PHPParser_Node_Expr_Clone' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Clone.php', - 'PHPParser_Node_Expr_Closure' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Closure.php', - 'PHPParser_Node_Expr_ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/ClosureUse.php', - 'PHPParser_Node_Expr_Concat' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Concat.php', - 'PHPParser_Node_Expr_ConstFetch' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/ConstFetch.php', - 'PHPParser_Node_Expr_Div' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Div.php', - 'PHPParser_Node_Expr_Empty' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Empty.php', - 'PHPParser_Node_Expr_Equal' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Equal.php', - 'PHPParser_Node_Expr_ErrorSuppress' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/ErrorSuppress.php', - 'PHPParser_Node_Expr_Eval' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Eval.php', - 'PHPParser_Node_Expr_Exit' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Exit.php', - 'PHPParser_Node_Expr_FuncCall' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/FuncCall.php', - 'PHPParser_Node_Expr_Greater' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Greater.php', - 'PHPParser_Node_Expr_GreaterOrEqual' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/GreaterOrEqual.php', - 'PHPParser_Node_Expr_Identical' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Identical.php', - 'PHPParser_Node_Expr_Include' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Include.php', - 'PHPParser_Node_Expr_Instanceof' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Instanceof.php', - 'PHPParser_Node_Expr_Isset' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Isset.php', - 'PHPParser_Node_Expr_List' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/List.php', - 'PHPParser_Node_Expr_LogicalAnd' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/LogicalAnd.php', - 'PHPParser_Node_Expr_LogicalOr' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/LogicalOr.php', - 'PHPParser_Node_Expr_LogicalXor' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/LogicalXor.php', - 'PHPParser_Node_Expr_MethodCall' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/MethodCall.php', - 'PHPParser_Node_Expr_Minus' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Minus.php', - 'PHPParser_Node_Expr_Mod' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Mod.php', - 'PHPParser_Node_Expr_Mul' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Mul.php', - 'PHPParser_Node_Expr_New' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/New.php', - 'PHPParser_Node_Expr_NotEqual' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/NotEqual.php', - 'PHPParser_Node_Expr_NotIdentical' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/NotIdentical.php', - 'PHPParser_Node_Expr_Plus' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Plus.php', - 'PHPParser_Node_Expr_PostDec' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/PostDec.php', - 'PHPParser_Node_Expr_PostInc' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/PostInc.php', - 'PHPParser_Node_Expr_PreDec' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/PreDec.php', - 'PHPParser_Node_Expr_PreInc' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/PreInc.php', - 'PHPParser_Node_Expr_Print' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Print.php', - 'PHPParser_Node_Expr_PropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/PropertyFetch.php', - 'PHPParser_Node_Expr_ShellExec' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/ShellExec.php', - 'PHPParser_Node_Expr_ShiftLeft' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/ShiftLeft.php', - 'PHPParser_Node_Expr_ShiftRight' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/ShiftRight.php', - 'PHPParser_Node_Expr_Smaller' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Smaller.php', - 'PHPParser_Node_Expr_SmallerOrEqual' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/SmallerOrEqual.php', - 'PHPParser_Node_Expr_StaticCall' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/StaticCall.php', - 'PHPParser_Node_Expr_StaticPropertyFetch' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/StaticPropertyFetch.php', - 'PHPParser_Node_Expr_Ternary' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Ternary.php', - 'PHPParser_Node_Expr_UnaryMinus' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/UnaryMinus.php', - 'PHPParser_Node_Expr_UnaryPlus' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/UnaryPlus.php', - 'PHPParser_Node_Expr_Variable' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Variable.php', - 'PHPParser_Node_Expr_Yield' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Expr/Yield.php', - 'PHPParser_Node_Name' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Name.php', - 'PHPParser_Node_Name_FullyQualified' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Name/FullyQualified.php', - 'PHPParser_Node_Name_Relative' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Name/Relative.php', - 'PHPParser_Node_Param' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Param.php', - 'PHPParser_Node_Scalar' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar.php', - 'PHPParser_Node_Scalar_ClassConst' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/ClassConst.php', - 'PHPParser_Node_Scalar_DNumber' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/DNumber.php', - 'PHPParser_Node_Scalar_DirConst' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/DirConst.php', - 'PHPParser_Node_Scalar_Encapsed' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/Encapsed.php', - 'PHPParser_Node_Scalar_FileConst' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/FileConst.php', - 'PHPParser_Node_Scalar_FuncConst' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/FuncConst.php', - 'PHPParser_Node_Scalar_LNumber' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/LNumber.php', - 'PHPParser_Node_Scalar_LineConst' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/LineConst.php', - 'PHPParser_Node_Scalar_MethodConst' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/MethodConst.php', - 'PHPParser_Node_Scalar_NSConst' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/NSConst.php', - 'PHPParser_Node_Scalar_String' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/String.php', - 'PHPParser_Node_Scalar_TraitConst' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Scalar/TraitConst.php', - 'PHPParser_Node_Stmt' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt.php', - 'PHPParser_Node_Stmt_Break' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Break.php', - 'PHPParser_Node_Stmt_Case' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Case.php', - 'PHPParser_Node_Stmt_Catch' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Catch.php', - 'PHPParser_Node_Stmt_Class' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Class.php', - 'PHPParser_Node_Stmt_ClassConst' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/ClassConst.php', - 'PHPParser_Node_Stmt_ClassMethod' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/ClassMethod.php', - 'PHPParser_Node_Stmt_Const' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Const.php', - 'PHPParser_Node_Stmt_Continue' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Continue.php', - 'PHPParser_Node_Stmt_Declare' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Declare.php', - 'PHPParser_Node_Stmt_DeclareDeclare' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/DeclareDeclare.php', - 'PHPParser_Node_Stmt_Do' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Do.php', - 'PHPParser_Node_Stmt_Echo' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Echo.php', - 'PHPParser_Node_Stmt_Else' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Else.php', - 'PHPParser_Node_Stmt_ElseIf' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/ElseIf.php', - 'PHPParser_Node_Stmt_For' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/For.php', - 'PHPParser_Node_Stmt_Foreach' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Foreach.php', - 'PHPParser_Node_Stmt_Function' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Function.php', - 'PHPParser_Node_Stmt_Global' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Global.php', - 'PHPParser_Node_Stmt_Goto' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Goto.php', - 'PHPParser_Node_Stmt_HaltCompiler' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/HaltCompiler.php', - 'PHPParser_Node_Stmt_If' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/If.php', - 'PHPParser_Node_Stmt_InlineHTML' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/InlineHTML.php', - 'PHPParser_Node_Stmt_Interface' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Interface.php', - 'PHPParser_Node_Stmt_Label' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Label.php', - 'PHPParser_Node_Stmt_Namespace' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Namespace.php', - 'PHPParser_Node_Stmt_Property' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Property.php', - 'PHPParser_Node_Stmt_PropertyProperty' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/PropertyProperty.php', - 'PHPParser_Node_Stmt_Return' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Return.php', - 'PHPParser_Node_Stmt_Static' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Static.php', - 'PHPParser_Node_Stmt_StaticVar' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/StaticVar.php', - 'PHPParser_Node_Stmt_Switch' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Switch.php', - 'PHPParser_Node_Stmt_Throw' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Throw.php', - 'PHPParser_Node_Stmt_Trait' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Trait.php', - 'PHPParser_Node_Stmt_TraitUse' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUse.php', - 'PHPParser_Node_Stmt_TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUseAdaptation.php', - 'PHPParser_Node_Stmt_TraitUseAdaptation_Alias' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUseAdaptation/Alias.php', - 'PHPParser_Node_Stmt_TraitUseAdaptation_Precedence' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUseAdaptation/Precedence.php', - 'PHPParser_Node_Stmt_TryCatch' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/TryCatch.php', - 'PHPParser_Node_Stmt_Unset' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Unset.php', - 'PHPParser_Node_Stmt_Use' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/Use.php', - 'PHPParser_Node_Stmt_UseUse' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/UseUse.php', - 'PHPParser_Node_Stmt_While' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Node/Stmt/While.php', - 'PHPParser_Parser' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Parser.php', - 'PHPParser_PrettyPrinterAbstract' => $vendorDir . '/nikic/php-parser/lib/PHPParser/PrettyPrinterAbstract.php', - 'PHPParser_PrettyPrinter_Default' => $vendorDir . '/nikic/php-parser/lib/PHPParser/PrettyPrinter/Default.php', - 'PHPParser_PrettyPrinter_Zend' => $vendorDir . '/nikic/php-parser/lib/PHPParser/PrettyPrinter/Zend.php', - 'PHPParser_Serializer' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Serializer.php', - 'PHPParser_Serializer_XML' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Serializer/XML.php', - 'PHPParser_Template' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Template.php', - 'PHPParser_TemplateLoader' => $vendorDir . '/nikic/php-parser/lib/PHPParser/TemplateLoader.php', - 'PHPParser_Unserializer' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Unserializer.php', - 'PHPParser_Unserializer_XML' => $vendorDir . '/nikic/php-parser/lib/PHPParser/Unserializer/XML.php', - 'Patchwork\\PHP\\Shim\\Iconv' => $vendorDir . '/patchwork/utf8/class/Patchwork/PHP/Shim/Iconv.php', - 'Patchwork\\PHP\\Shim\\Intl' => $vendorDir . '/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php', - 'Patchwork\\PHP\\Shim\\Mbstring' => $vendorDir . '/patchwork/utf8/class/Patchwork/PHP/Shim/Mbstring.php', - 'Patchwork\\PHP\\Shim\\Normalizer' => $vendorDir . '/patchwork/utf8/class/Patchwork/PHP/Shim/Normalizer.php', - 'Patchwork\\PHP\\Shim\\Xml' => $vendorDir . '/patchwork/utf8/class/Patchwork/PHP/Shim/Xml.php', - 'Patchwork\\Utf8' => $vendorDir . '/patchwork/utf8/class/Patchwork/Utf8.php', - 'Patchwork\\Utf8\\Bootup' => $vendorDir . '/patchwork/utf8/class/Patchwork/Utf8/Bootup.php', - 'PlaylistDownloader' => $baseDir . '/app/models/PlaylistDownloader.php', - 'PlaylistsController' => $baseDir . '/app/controllers/PlaylistsController.php', - 'Predis\\Autoloader' => $vendorDir . '/predis/predis/lib/Predis/Autoloader.php', - 'Predis\\BasicClientInterface' => $vendorDir . '/predis/predis/lib/Predis/BasicClientInterface.php', - 'Predis\\Client' => $vendorDir . '/predis/predis/lib/Predis/Client.php', - 'Predis\\ClientException' => $vendorDir . '/predis/predis/lib/Predis/ClientException.php', - 'Predis\\ClientInterface' => $vendorDir . '/predis/predis/lib/Predis/ClientInterface.php', - 'Predis\\Cluster\\CommandHashStrategyInterface' => $vendorDir . '/predis/predis/lib/Predis/Cluster/CommandHashStrategyInterface.php', - 'Predis\\Cluster\\Distribution\\DistributionStrategyInterface' => $vendorDir . '/predis/predis/lib/Predis/Cluster/Distribution/DistributionStrategyInterface.php', - 'Predis\\Cluster\\Distribution\\EmptyRingException' => $vendorDir . '/predis/predis/lib/Predis/Cluster/Distribution/EmptyRingException.php', - 'Predis\\Cluster\\Distribution\\HashRing' => $vendorDir . '/predis/predis/lib/Predis/Cluster/Distribution/HashRing.php', - 'Predis\\Cluster\\Distribution\\KetamaPureRing' => $vendorDir . '/predis/predis/lib/Predis/Cluster/Distribution/KetamaPureRing.php', - 'Predis\\Cluster\\Hash\\CRC16HashGenerator' => $vendorDir . '/predis/predis/lib/Predis/Cluster/Hash/CRC16HashGenerator.php', - 'Predis\\Cluster\\Hash\\HashGeneratorInterface' => $vendorDir . '/predis/predis/lib/Predis/Cluster/Hash/HashGeneratorInterface.php', - 'Predis\\Cluster\\PredisClusterHashStrategy' => $vendorDir . '/predis/predis/lib/Predis/Cluster/PredisClusterHashStrategy.php', - 'Predis\\Cluster\\RedisClusterHashStrategy' => $vendorDir . '/predis/predis/lib/Predis/Cluster/RedisClusterHashStrategy.php', - 'Predis\\Command\\AbstractCommand' => $vendorDir . '/predis/predis/lib/Predis/Command/AbstractCommand.php', - 'Predis\\Command\\CommandInterface' => $vendorDir . '/predis/predis/lib/Predis/Command/CommandInterface.php', - 'Predis\\Command\\ConnectionAuth' => $vendorDir . '/predis/predis/lib/Predis/Command/ConnectionAuth.php', - 'Predis\\Command\\ConnectionEcho' => $vendorDir . '/predis/predis/lib/Predis/Command/ConnectionEcho.php', - 'Predis\\Command\\ConnectionPing' => $vendorDir . '/predis/predis/lib/Predis/Command/ConnectionPing.php', - 'Predis\\Command\\ConnectionQuit' => $vendorDir . '/predis/predis/lib/Predis/Command/ConnectionQuit.php', - 'Predis\\Command\\ConnectionSelect' => $vendorDir . '/predis/predis/lib/Predis/Command/ConnectionSelect.php', - 'Predis\\Command\\HashDelete' => $vendorDir . '/predis/predis/lib/Predis/Command/HashDelete.php', - 'Predis\\Command\\HashExists' => $vendorDir . '/predis/predis/lib/Predis/Command/HashExists.php', - 'Predis\\Command\\HashGet' => $vendorDir . '/predis/predis/lib/Predis/Command/HashGet.php', - 'Predis\\Command\\HashGetAll' => $vendorDir . '/predis/predis/lib/Predis/Command/HashGetAll.php', - 'Predis\\Command\\HashGetMultiple' => $vendorDir . '/predis/predis/lib/Predis/Command/HashGetMultiple.php', - 'Predis\\Command\\HashIncrementBy' => $vendorDir . '/predis/predis/lib/Predis/Command/HashIncrementBy.php', - 'Predis\\Command\\HashIncrementByFloat' => $vendorDir . '/predis/predis/lib/Predis/Command/HashIncrementByFloat.php', - 'Predis\\Command\\HashKeys' => $vendorDir . '/predis/predis/lib/Predis/Command/HashKeys.php', - 'Predis\\Command\\HashLength' => $vendorDir . '/predis/predis/lib/Predis/Command/HashLength.php', - 'Predis\\Command\\HashSet' => $vendorDir . '/predis/predis/lib/Predis/Command/HashSet.php', - 'Predis\\Command\\HashSetMultiple' => $vendorDir . '/predis/predis/lib/Predis/Command/HashSetMultiple.php', - 'Predis\\Command\\HashSetPreserve' => $vendorDir . '/predis/predis/lib/Predis/Command/HashSetPreserve.php', - 'Predis\\Command\\HashValues' => $vendorDir . '/predis/predis/lib/Predis/Command/HashValues.php', - 'Predis\\Command\\KeyDelete' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyDelete.php', - 'Predis\\Command\\KeyDump' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyDump.php', - 'Predis\\Command\\KeyExists' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyExists.php', - 'Predis\\Command\\KeyExpire' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyExpire.php', - 'Predis\\Command\\KeyExpireAt' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyExpireAt.php', - 'Predis\\Command\\KeyKeys' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyKeys.php', - 'Predis\\Command\\KeyKeysV12x' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyKeysV12x.php', - 'Predis\\Command\\KeyMove' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyMove.php', - 'Predis\\Command\\KeyPersist' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyPersist.php', - 'Predis\\Command\\KeyPreciseExpire' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyPreciseExpire.php', - 'Predis\\Command\\KeyPreciseExpireAt' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyPreciseExpireAt.php', - 'Predis\\Command\\KeyPreciseTimeToLive' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyPreciseTimeToLive.php', - 'Predis\\Command\\KeyRandom' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyRandom.php', - 'Predis\\Command\\KeyRename' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyRename.php', - 'Predis\\Command\\KeyRenamePreserve' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyRenamePreserve.php', - 'Predis\\Command\\KeyRestore' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyRestore.php', - 'Predis\\Command\\KeySort' => $vendorDir . '/predis/predis/lib/Predis/Command/KeySort.php', - 'Predis\\Command\\KeyTimeToLive' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyTimeToLive.php', - 'Predis\\Command\\KeyType' => $vendorDir . '/predis/predis/lib/Predis/Command/KeyType.php', - 'Predis\\Command\\ListIndex' => $vendorDir . '/predis/predis/lib/Predis/Command/ListIndex.php', - 'Predis\\Command\\ListInsert' => $vendorDir . '/predis/predis/lib/Predis/Command/ListInsert.php', - 'Predis\\Command\\ListLength' => $vendorDir . '/predis/predis/lib/Predis/Command/ListLength.php', - 'Predis\\Command\\ListPopFirst' => $vendorDir . '/predis/predis/lib/Predis/Command/ListPopFirst.php', - 'Predis\\Command\\ListPopFirstBlocking' => $vendorDir . '/predis/predis/lib/Predis/Command/ListPopFirstBlocking.php', - 'Predis\\Command\\ListPopLast' => $vendorDir . '/predis/predis/lib/Predis/Command/ListPopLast.php', - 'Predis\\Command\\ListPopLastBlocking' => $vendorDir . '/predis/predis/lib/Predis/Command/ListPopLastBlocking.php', - 'Predis\\Command\\ListPopLastPushHead' => $vendorDir . '/predis/predis/lib/Predis/Command/ListPopLastPushHead.php', - 'Predis\\Command\\ListPopLastPushHeadBlocking' => $vendorDir . '/predis/predis/lib/Predis/Command/ListPopLastPushHeadBlocking.php', - 'Predis\\Command\\ListPushHead' => $vendorDir . '/predis/predis/lib/Predis/Command/ListPushHead.php', - 'Predis\\Command\\ListPushHeadX' => $vendorDir . '/predis/predis/lib/Predis/Command/ListPushHeadX.php', - 'Predis\\Command\\ListPushTail' => $vendorDir . '/predis/predis/lib/Predis/Command/ListPushTail.php', - 'Predis\\Command\\ListPushTailX' => $vendorDir . '/predis/predis/lib/Predis/Command/ListPushTailX.php', - 'Predis\\Command\\ListRange' => $vendorDir . '/predis/predis/lib/Predis/Command/ListRange.php', - 'Predis\\Command\\ListRemove' => $vendorDir . '/predis/predis/lib/Predis/Command/ListRemove.php', - 'Predis\\Command\\ListSet' => $vendorDir . '/predis/predis/lib/Predis/Command/ListSet.php', - 'Predis\\Command\\ListTrim' => $vendorDir . '/predis/predis/lib/Predis/Command/ListTrim.php', - 'Predis\\Command\\PrefixHelpers' => $vendorDir . '/predis/predis/lib/Predis/Command/PrefixHelpers.php', - 'Predis\\Command\\PrefixableCommand' => $vendorDir . '/predis/predis/lib/Predis/Command/PrefixableCommand.php', - 'Predis\\Command\\PrefixableCommandInterface' => $vendorDir . '/predis/predis/lib/Predis/Command/PrefixableCommandInterface.php', - 'Predis\\Command\\Processor\\CommandProcessingInterface' => $vendorDir . '/predis/predis/lib/Predis/Command/Processor/CommandProcessingInterface.php', - 'Predis\\Command\\Processor\\CommandProcessorChainInterface' => $vendorDir . '/predis/predis/lib/Predis/Command/Processor/CommandProcessorChainInterface.php', - 'Predis\\Command\\Processor\\CommandProcessorInterface' => $vendorDir . '/predis/predis/lib/Predis/Command/Processor/CommandProcessorInterface.php', - 'Predis\\Command\\Processor\\KeyPrefixProcessor' => $vendorDir . '/predis/predis/lib/Predis/Command/Processor/KeyPrefixProcessor.php', - 'Predis\\Command\\Processor\\ProcessorChain' => $vendorDir . '/predis/predis/lib/Predis/Command/Processor/ProcessorChain.php', - 'Predis\\Command\\PubSubPublish' => $vendorDir . '/predis/predis/lib/Predis/Command/PubSubPublish.php', - 'Predis\\Command\\PubSubSubscribe' => $vendorDir . '/predis/predis/lib/Predis/Command/PubSubSubscribe.php', - 'Predis\\Command\\PubSubSubscribeByPattern' => $vendorDir . '/predis/predis/lib/Predis/Command/PubSubSubscribeByPattern.php', - 'Predis\\Command\\PubSubUnsubscribe' => $vendorDir . '/predis/predis/lib/Predis/Command/PubSubUnsubscribe.php', - 'Predis\\Command\\PubSubUnsubscribeByPattern' => $vendorDir . '/predis/predis/lib/Predis/Command/PubSubUnsubscribeByPattern.php', - 'Predis\\Command\\ScriptedCommand' => $vendorDir . '/predis/predis/lib/Predis/Command/ScriptedCommand.php', - 'Predis\\Command\\ServerBackgroundRewriteAOF' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerBackgroundRewriteAOF.php', - 'Predis\\Command\\ServerBackgroundSave' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerBackgroundSave.php', - 'Predis\\Command\\ServerClient' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerClient.php', - 'Predis\\Command\\ServerConfig' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerConfig.php', - 'Predis\\Command\\ServerDatabaseSize' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerDatabaseSize.php', - 'Predis\\Command\\ServerEval' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerEval.php', - 'Predis\\Command\\ServerEvalSHA' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerEvalSHA.php', - 'Predis\\Command\\ServerFlushAll' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerFlushAll.php', - 'Predis\\Command\\ServerFlushDatabase' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerFlushDatabase.php', - 'Predis\\Command\\ServerInfo' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerInfo.php', - 'Predis\\Command\\ServerInfoV26x' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerInfoV26x.php', - 'Predis\\Command\\ServerLastSave' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerLastSave.php', - 'Predis\\Command\\ServerMonitor' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerMonitor.php', - 'Predis\\Command\\ServerObject' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerObject.php', - 'Predis\\Command\\ServerSave' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerSave.php', - 'Predis\\Command\\ServerScript' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerScript.php', - 'Predis\\Command\\ServerShutdown' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerShutdown.php', - 'Predis\\Command\\ServerSlaveOf' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerSlaveOf.php', - 'Predis\\Command\\ServerSlowlog' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerSlowlog.php', - 'Predis\\Command\\ServerTime' => $vendorDir . '/predis/predis/lib/Predis/Command/ServerTime.php', - 'Predis\\Command\\SetAdd' => $vendorDir . '/predis/predis/lib/Predis/Command/SetAdd.php', - 'Predis\\Command\\SetCardinality' => $vendorDir . '/predis/predis/lib/Predis/Command/SetCardinality.php', - 'Predis\\Command\\SetDifference' => $vendorDir . '/predis/predis/lib/Predis/Command/SetDifference.php', - 'Predis\\Command\\SetDifferenceStore' => $vendorDir . '/predis/predis/lib/Predis/Command/SetDifferenceStore.php', - 'Predis\\Command\\SetIntersection' => $vendorDir . '/predis/predis/lib/Predis/Command/SetIntersection.php', - 'Predis\\Command\\SetIntersectionStore' => $vendorDir . '/predis/predis/lib/Predis/Command/SetIntersectionStore.php', - 'Predis\\Command\\SetIsMember' => $vendorDir . '/predis/predis/lib/Predis/Command/SetIsMember.php', - 'Predis\\Command\\SetMembers' => $vendorDir . '/predis/predis/lib/Predis/Command/SetMembers.php', - 'Predis\\Command\\SetMove' => $vendorDir . '/predis/predis/lib/Predis/Command/SetMove.php', - 'Predis\\Command\\SetPop' => $vendorDir . '/predis/predis/lib/Predis/Command/SetPop.php', - 'Predis\\Command\\SetRandomMember' => $vendorDir . '/predis/predis/lib/Predis/Command/SetRandomMember.php', - 'Predis\\Command\\SetRemove' => $vendorDir . '/predis/predis/lib/Predis/Command/SetRemove.php', - 'Predis\\Command\\SetUnion' => $vendorDir . '/predis/predis/lib/Predis/Command/SetUnion.php', - 'Predis\\Command\\SetUnionStore' => $vendorDir . '/predis/predis/lib/Predis/Command/SetUnionStore.php', - 'Predis\\Command\\StringAppend' => $vendorDir . '/predis/predis/lib/Predis/Command/StringAppend.php', - 'Predis\\Command\\StringBitCount' => $vendorDir . '/predis/predis/lib/Predis/Command/StringBitCount.php', - 'Predis\\Command\\StringBitOp' => $vendorDir . '/predis/predis/lib/Predis/Command/StringBitOp.php', - 'Predis\\Command\\StringDecrement' => $vendorDir . '/predis/predis/lib/Predis/Command/StringDecrement.php', - 'Predis\\Command\\StringDecrementBy' => $vendorDir . '/predis/predis/lib/Predis/Command/StringDecrementBy.php', - 'Predis\\Command\\StringGet' => $vendorDir . '/predis/predis/lib/Predis/Command/StringGet.php', - 'Predis\\Command\\StringGetBit' => $vendorDir . '/predis/predis/lib/Predis/Command/StringGetBit.php', - 'Predis\\Command\\StringGetMultiple' => $vendorDir . '/predis/predis/lib/Predis/Command/StringGetMultiple.php', - 'Predis\\Command\\StringGetRange' => $vendorDir . '/predis/predis/lib/Predis/Command/StringGetRange.php', - 'Predis\\Command\\StringGetSet' => $vendorDir . '/predis/predis/lib/Predis/Command/StringGetSet.php', - 'Predis\\Command\\StringIncrement' => $vendorDir . '/predis/predis/lib/Predis/Command/StringIncrement.php', - 'Predis\\Command\\StringIncrementBy' => $vendorDir . '/predis/predis/lib/Predis/Command/StringIncrementBy.php', - 'Predis\\Command\\StringIncrementByFloat' => $vendorDir . '/predis/predis/lib/Predis/Command/StringIncrementByFloat.php', - 'Predis\\Command\\StringPreciseSetExpire' => $vendorDir . '/predis/predis/lib/Predis/Command/StringPreciseSetExpire.php', - 'Predis\\Command\\StringSet' => $vendorDir . '/predis/predis/lib/Predis/Command/StringSet.php', - 'Predis\\Command\\StringSetBit' => $vendorDir . '/predis/predis/lib/Predis/Command/StringSetBit.php', - 'Predis\\Command\\StringSetExpire' => $vendorDir . '/predis/predis/lib/Predis/Command/StringSetExpire.php', - 'Predis\\Command\\StringSetMultiple' => $vendorDir . '/predis/predis/lib/Predis/Command/StringSetMultiple.php', - 'Predis\\Command\\StringSetMultiplePreserve' => $vendorDir . '/predis/predis/lib/Predis/Command/StringSetMultiplePreserve.php', - 'Predis\\Command\\StringSetPreserve' => $vendorDir . '/predis/predis/lib/Predis/Command/StringSetPreserve.php', - 'Predis\\Command\\StringSetRange' => $vendorDir . '/predis/predis/lib/Predis/Command/StringSetRange.php', - 'Predis\\Command\\StringStrlen' => $vendorDir . '/predis/predis/lib/Predis/Command/StringStrlen.php', - 'Predis\\Command\\StringSubstr' => $vendorDir . '/predis/predis/lib/Predis/Command/StringSubstr.php', - 'Predis\\Command\\TransactionDiscard' => $vendorDir . '/predis/predis/lib/Predis/Command/TransactionDiscard.php', - 'Predis\\Command\\TransactionExec' => $vendorDir . '/predis/predis/lib/Predis/Command/TransactionExec.php', - 'Predis\\Command\\TransactionMulti' => $vendorDir . '/predis/predis/lib/Predis/Command/TransactionMulti.php', - 'Predis\\Command\\TransactionUnwatch' => $vendorDir . '/predis/predis/lib/Predis/Command/TransactionUnwatch.php', - 'Predis\\Command\\TransactionWatch' => $vendorDir . '/predis/predis/lib/Predis/Command/TransactionWatch.php', - 'Predis\\Command\\ZSetAdd' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetAdd.php', - 'Predis\\Command\\ZSetCardinality' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetCardinality.php', - 'Predis\\Command\\ZSetCount' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetCount.php', - 'Predis\\Command\\ZSetIncrementBy' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetIncrementBy.php', - 'Predis\\Command\\ZSetIntersectionStore' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetIntersectionStore.php', - 'Predis\\Command\\ZSetRange' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetRange.php', - 'Predis\\Command\\ZSetRangeByScore' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetRangeByScore.php', - 'Predis\\Command\\ZSetRank' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetRank.php', - 'Predis\\Command\\ZSetRemove' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetRemove.php', - 'Predis\\Command\\ZSetRemoveRangeByRank' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetRemoveRangeByRank.php', - 'Predis\\Command\\ZSetRemoveRangeByScore' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetRemoveRangeByScore.php', - 'Predis\\Command\\ZSetReverseRange' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetReverseRange.php', - 'Predis\\Command\\ZSetReverseRangeByScore' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetReverseRangeByScore.php', - 'Predis\\Command\\ZSetReverseRank' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetReverseRank.php', - 'Predis\\Command\\ZSetScore' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetScore.php', - 'Predis\\Command\\ZSetUnionStore' => $vendorDir . '/predis/predis/lib/Predis/Command/ZSetUnionStore.php', - 'Predis\\CommunicationException' => $vendorDir . '/predis/predis/lib/Predis/CommunicationException.php', - 'Predis\\Connection\\AbstractConnection' => $vendorDir . '/predis/predis/lib/Predis/Connection/AbstractConnection.php', - 'Predis\\Connection\\AggregatedConnectionInterface' => $vendorDir . '/predis/predis/lib/Predis/Connection/AggregatedConnectionInterface.php', - 'Predis\\Connection\\ClusterConnectionInterface' => $vendorDir . '/predis/predis/lib/Predis/Connection/ClusterConnectionInterface.php', - 'Predis\\Connection\\ComposableConnectionInterface' => $vendorDir . '/predis/predis/lib/Predis/Connection/ComposableConnectionInterface.php', - 'Predis\\Connection\\ComposableStreamConnection' => $vendorDir . '/predis/predis/lib/Predis/Connection/ComposableStreamConnection.php', - 'Predis\\Connection\\ConnectionException' => $vendorDir . '/predis/predis/lib/Predis/Connection/ConnectionException.php', - 'Predis\\Connection\\ConnectionFactory' => $vendorDir . '/predis/predis/lib/Predis/Connection/ConnectionFactory.php', - 'Predis\\Connection\\ConnectionFactoryInterface' => $vendorDir . '/predis/predis/lib/Predis/Connection/ConnectionFactoryInterface.php', - 'Predis\\Connection\\ConnectionInterface' => $vendorDir . '/predis/predis/lib/Predis/Connection/ConnectionInterface.php', - 'Predis\\Connection\\ConnectionParameters' => $vendorDir . '/predis/predis/lib/Predis/Connection/ConnectionParameters.php', - 'Predis\\Connection\\ConnectionParametersInterface' => $vendorDir . '/predis/predis/lib/Predis/Connection/ConnectionParametersInterface.php', - 'Predis\\Connection\\MasterSlaveReplication' => $vendorDir . '/predis/predis/lib/Predis/Connection/MasterSlaveReplication.php', - 'Predis\\Connection\\PhpiredisConnection' => $vendorDir . '/predis/predis/lib/Predis/Connection/PhpiredisConnection.php', - 'Predis\\Connection\\PhpiredisStreamConnection' => $vendorDir . '/predis/predis/lib/Predis/Connection/PhpiredisStreamConnection.php', - 'Predis\\Connection\\PredisCluster' => $vendorDir . '/predis/predis/lib/Predis/Connection/PredisCluster.php', - 'Predis\\Connection\\RedisCluster' => $vendorDir . '/predis/predis/lib/Predis/Connection/RedisCluster.php', - 'Predis\\Connection\\ReplicationConnectionInterface' => $vendorDir . '/predis/predis/lib/Predis/Connection/ReplicationConnectionInterface.php', - 'Predis\\Connection\\SingleConnectionInterface' => $vendorDir . '/predis/predis/lib/Predis/Connection/SingleConnectionInterface.php', - 'Predis\\Connection\\StreamConnection' => $vendorDir . '/predis/predis/lib/Predis/Connection/StreamConnection.php', - 'Predis\\Connection\\WebdisConnection' => $vendorDir . '/predis/predis/lib/Predis/Connection/WebdisConnection.php', - 'Predis\\ExecutableContextInterface' => $vendorDir . '/predis/predis/lib/Predis/ExecutableContextInterface.php', - 'Predis\\Helpers' => $vendorDir . '/predis/predis/lib/Predis/Helpers.php', - 'Predis\\Iterator\\MultiBulkResponse' => $vendorDir . '/predis/predis/lib/Predis/Iterator/MultiBulkResponse.php', - 'Predis\\Iterator\\MultiBulkResponseSimple' => $vendorDir . '/predis/predis/lib/Predis/Iterator/MultiBulkResponseSimple.php', - 'Predis\\Iterator\\MultiBulkResponseTuple' => $vendorDir . '/predis/predis/lib/Predis/Iterator/MultiBulkResponseTuple.php', - 'Predis\\Monitor\\MonitorContext' => $vendorDir . '/predis/predis/lib/Predis/Monitor/MonitorContext.php', - 'Predis\\NotSupportedException' => $vendorDir . '/predis/predis/lib/Predis/NotSupportedException.php', - 'Predis\\Option\\AbstractOption' => $vendorDir . '/predis/predis/lib/Predis/Option/AbstractOption.php', - 'Predis\\Option\\ClientCluster' => $vendorDir . '/predis/predis/lib/Predis/Option/ClientCluster.php', - 'Predis\\Option\\ClientConnectionFactory' => $vendorDir . '/predis/predis/lib/Predis/Option/ClientConnectionFactory.php', - 'Predis\\Option\\ClientExceptions' => $vendorDir . '/predis/predis/lib/Predis/Option/ClientExceptions.php', - 'Predis\\Option\\ClientOptions' => $vendorDir . '/predis/predis/lib/Predis/Option/ClientOptions.php', - 'Predis\\Option\\ClientOptionsInterface' => $vendorDir . '/predis/predis/lib/Predis/Option/ClientOptionsInterface.php', - 'Predis\\Option\\ClientPrefix' => $vendorDir . '/predis/predis/lib/Predis/Option/ClientPrefix.php', - 'Predis\\Option\\ClientProfile' => $vendorDir . '/predis/predis/lib/Predis/Option/ClientProfile.php', - 'Predis\\Option\\ClientReplication' => $vendorDir . '/predis/predis/lib/Predis/Option/ClientReplication.php', - 'Predis\\Option\\CustomOption' => $vendorDir . '/predis/predis/lib/Predis/Option/CustomOption.php', - 'Predis\\Option\\OptionInterface' => $vendorDir . '/predis/predis/lib/Predis/Option/OptionInterface.php', - 'Predis\\Pipeline\\FireAndForgetExecutor' => $vendorDir . '/predis/predis/lib/Predis/Pipeline/FireAndForgetExecutor.php', - 'Predis\\Pipeline\\MultiExecExecutor' => $vendorDir . '/predis/predis/lib/Predis/Pipeline/MultiExecExecutor.php', - 'Predis\\Pipeline\\PipelineContext' => $vendorDir . '/predis/predis/lib/Predis/Pipeline/PipelineContext.php', - 'Predis\\Pipeline\\PipelineExecutorInterface' => $vendorDir . '/predis/predis/lib/Predis/Pipeline/PipelineExecutorInterface.php', - 'Predis\\Pipeline\\SafeClusterExecutor' => $vendorDir . '/predis/predis/lib/Predis/Pipeline/SafeClusterExecutor.php', - 'Predis\\Pipeline\\SafeExecutor' => $vendorDir . '/predis/predis/lib/Predis/Pipeline/SafeExecutor.php', - 'Predis\\Pipeline\\StandardExecutor' => $vendorDir . '/predis/predis/lib/Predis/Pipeline/StandardExecutor.php', - 'Predis\\PredisException' => $vendorDir . '/predis/predis/lib/Predis/PredisException.php', - 'Predis\\Profile\\ServerProfile' => $vendorDir . '/predis/predis/lib/Predis/Profile/ServerProfile.php', - 'Predis\\Profile\\ServerProfileInterface' => $vendorDir . '/predis/predis/lib/Predis/Profile/ServerProfileInterface.php', - 'Predis\\Profile\\ServerVersion12' => $vendorDir . '/predis/predis/lib/Predis/Profile/ServerVersion12.php', - 'Predis\\Profile\\ServerVersion20' => $vendorDir . '/predis/predis/lib/Predis/Profile/ServerVersion20.php', - 'Predis\\Profile\\ServerVersion22' => $vendorDir . '/predis/predis/lib/Predis/Profile/ServerVersion22.php', - 'Predis\\Profile\\ServerVersion24' => $vendorDir . '/predis/predis/lib/Predis/Profile/ServerVersion24.php', - 'Predis\\Profile\\ServerVersion26' => $vendorDir . '/predis/predis/lib/Predis/Profile/ServerVersion26.php', - 'Predis\\Profile\\ServerVersionNext' => $vendorDir . '/predis/predis/lib/Predis/Profile/ServerVersionNext.php', - 'Predis\\Protocol\\CommandSerializerInterface' => $vendorDir . '/predis/predis/lib/Predis/Protocol/CommandSerializerInterface.php', - 'Predis\\Protocol\\ComposableProtocolInterface' => $vendorDir . '/predis/predis/lib/Predis/Protocol/ComposableProtocolInterface.php', - 'Predis\\Protocol\\ProtocolException' => $vendorDir . '/predis/predis/lib/Predis/Protocol/ProtocolException.php', - 'Predis\\Protocol\\ProtocolInterface' => $vendorDir . '/predis/predis/lib/Predis/Protocol/ProtocolInterface.php', - 'Predis\\Protocol\\ResponseHandlerInterface' => $vendorDir . '/predis/predis/lib/Predis/Protocol/ResponseHandlerInterface.php', - 'Predis\\Protocol\\ResponseReaderInterface' => $vendorDir . '/predis/predis/lib/Predis/Protocol/ResponseReaderInterface.php', - 'Predis\\Protocol\\Text\\ComposableTextProtocol' => $vendorDir . '/predis/predis/lib/Predis/Protocol/Text/ComposableTextProtocol.php', - 'Predis\\Protocol\\Text\\ResponseBulkHandler' => $vendorDir . '/predis/predis/lib/Predis/Protocol/Text/ResponseBulkHandler.php', - 'Predis\\Protocol\\Text\\ResponseErrorHandler' => $vendorDir . '/predis/predis/lib/Predis/Protocol/Text/ResponseErrorHandler.php', - 'Predis\\Protocol\\Text\\ResponseIntegerHandler' => $vendorDir . '/predis/predis/lib/Predis/Protocol/Text/ResponseIntegerHandler.php', - 'Predis\\Protocol\\Text\\ResponseMultiBulkHandler' => $vendorDir . '/predis/predis/lib/Predis/Protocol/Text/ResponseMultiBulkHandler.php', - 'Predis\\Protocol\\Text\\ResponseMultiBulkStreamHandler' => $vendorDir . '/predis/predis/lib/Predis/Protocol/Text/ResponseMultiBulkStreamHandler.php', - 'Predis\\Protocol\\Text\\ResponseStatusHandler' => $vendorDir . '/predis/predis/lib/Predis/Protocol/Text/ResponseStatusHandler.php', - 'Predis\\Protocol\\Text\\TextCommandSerializer' => $vendorDir . '/predis/predis/lib/Predis/Protocol/Text/TextCommandSerializer.php', - 'Predis\\Protocol\\Text\\TextProtocol' => $vendorDir . '/predis/predis/lib/Predis/Protocol/Text/TextProtocol.php', - 'Predis\\Protocol\\Text\\TextResponseReader' => $vendorDir . '/predis/predis/lib/Predis/Protocol/Text/TextResponseReader.php', - 'Predis\\PubSub\\AbstractPubSubContext' => $vendorDir . '/predis/predis/lib/Predis/PubSub/AbstractPubSubContext.php', - 'Predis\\PubSub\\DispatcherLoop' => $vendorDir . '/predis/predis/lib/Predis/PubSub/DispatcherLoop.php', - 'Predis\\PubSub\\PubSubContext' => $vendorDir . '/predis/predis/lib/Predis/PubSub/PubSubContext.php', - 'Predis\\Replication\\ReplicationStrategy' => $vendorDir . '/predis/predis/lib/Predis/Replication/ReplicationStrategy.php', - 'Predis\\ResponseError' => $vendorDir . '/predis/predis/lib/Predis/ResponseError.php', - 'Predis\\ResponseErrorInterface' => $vendorDir . '/predis/predis/lib/Predis/ResponseErrorInterface.php', - 'Predis\\ResponseObjectInterface' => $vendorDir . '/predis/predis/lib/Predis/ResponseObjectInterface.php', - 'Predis\\ResponseQueued' => $vendorDir . '/predis/predis/lib/Predis/ResponseQueued.php', - 'Predis\\ServerException' => $vendorDir . '/predis/predis/lib/Predis/ServerException.php', - 'Predis\\Session\\SessionHandler' => $vendorDir . '/predis/predis/lib/Predis/Session/SessionHandler.php', - 'Predis\\Transaction\\AbortedMultiExecException' => $vendorDir . '/predis/predis/lib/Predis/Transaction/AbortedMultiExecException.php', - 'Predis\\Transaction\\MultiExecContext' => $vendorDir . '/predis/predis/lib/Predis/Transaction/MultiExecContext.php', - 'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php', - 'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php', - 'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php', - 'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareInterface.php', - 'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareTrait.php', - 'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php', - 'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php', - 'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php', - 'Ratchet\\AbstractConnectionDecorator' => $vendorDir . '/cboden/ratchet/src/Ratchet/AbstractConnectionDecorator.php', - 'Ratchet\\App' => $vendorDir . '/cboden/ratchet/src/Ratchet/App.php', - 'Ratchet\\ComponentInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/ComponentInterface.php', - 'Ratchet\\ConnectionInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/ConnectionInterface.php', - 'Ratchet\\Http\\Guzzle\\Http\\Message\\RequestFactory' => $vendorDir . '/cboden/ratchet/src/Ratchet/Http/Guzzle/Http/Message/RequestFactory.php', - 'Ratchet\\Http\\HttpRequestParser' => $vendorDir . '/cboden/ratchet/src/Ratchet/Http/HttpRequestParser.php', - 'Ratchet\\Http\\HttpServer' => $vendorDir . '/cboden/ratchet/src/Ratchet/Http/HttpServer.php', - 'Ratchet\\Http\\HttpServerInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/Http/HttpServerInterface.php', - 'Ratchet\\Http\\Router' => $vendorDir . '/cboden/ratchet/src/Ratchet/Http/Router.php', - 'Ratchet\\MessageComponentInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/MessageComponentInterface.php', - 'Ratchet\\MessageInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/MessageInterface.php', - 'Ratchet\\Server\\EchoServer' => $vendorDir . '/cboden/ratchet/src/Ratchet/Server/EchoServer.php', - 'Ratchet\\Server\\FlashPolicy' => $vendorDir . '/cboden/ratchet/src/Ratchet/Server/FlashPolicy.php', - 'Ratchet\\Server\\IoConnection' => $vendorDir . '/cboden/ratchet/src/Ratchet/Server/IoConnection.php', - 'Ratchet\\Server\\IoServer' => $vendorDir . '/cboden/ratchet/src/Ratchet/Server/IoServer.php', - 'Ratchet\\Server\\IpBlackList' => $vendorDir . '/cboden/ratchet/src/Ratchet/Server/IpBlackList.php', - 'Ratchet\\Session\\Serialize\\HandlerInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/Session/Serialize/HandlerInterface.php', - 'Ratchet\\Session\\Serialize\\PhpBinaryHandler' => $vendorDir . '/cboden/ratchet/src/Ratchet/Session/Serialize/PhpBinaryHandler.php', - 'Ratchet\\Session\\Serialize\\PhpHandler' => $vendorDir . '/cboden/ratchet/src/Ratchet/Session/Serialize/PhpHandler.php', - 'Ratchet\\Session\\SessionProvider' => $vendorDir . '/cboden/ratchet/src/Ratchet/Session/SessionProvider.php', - 'Ratchet\\Session\\Storage\\Proxy\\VirtualProxy' => $vendorDir . '/cboden/ratchet/src/Ratchet/Session/Storage/Proxy/VirtualProxy.php', - 'Ratchet\\Session\\Storage\\VirtualSessionStorage' => $vendorDir . '/cboden/ratchet/src/Ratchet/Session/Storage/VirtualSessionStorage.php', - 'Ratchet\\Tests\\AbstractMessageComponentTestCase' => $vendorDir . '/cboden/ratchet/tests/Ratchet/Tests/AbstractMessageComponentTestCase.php', - 'Ratchet\\Tests\\Mock\\Component' => $vendorDir . '/cboden/ratchet/tests/Ratchet/Tests/Mock/Component.php', - 'Ratchet\\Tests\\Mock\\Connection' => $vendorDir . '/cboden/ratchet/tests/Ratchet/Tests/Mock/Connection.php', - 'Ratchet\\Tests\\Mock\\ConnectionDecorator' => $vendorDir . '/cboden/ratchet/tests/Ratchet/Tests/Mock/ConnectionDecorator.php', - 'Ratchet\\Tests\\Mock\\NullComponent' => $vendorDir . '/cboden/ratchet/tests/Ratchet/Tests/Mock/NullComponent.php', - 'Ratchet\\Tests\\Mock\\WampComponent' => $vendorDir . '/cboden/ratchet/tests/Ratchet/Tests/Mock/WampComponent.php', - 'Ratchet\\Tests\\Wamp\\Stub\\WsWampServerInterface' => $vendorDir . '/cboden/ratchet/tests/Ratchet/Tests/Wamp/Stub/WsWampServerInterface.php', - 'Ratchet\\Tests\\WebSocket\\Stub\\WsMessageComponentInterface' => $vendorDir . '/cboden/ratchet/tests/Ratchet/Tests/WebSocket/Stub/WsMessageComponentInterface.php', - 'Ratchet\\Wamp\\Exception' => $vendorDir . '/cboden/ratchet/src/Ratchet/Wamp/Exception.php', - 'Ratchet\\Wamp\\JsonException' => $vendorDir . '/cboden/ratchet/src/Ratchet/Wamp/JsonException.php', - 'Ratchet\\Wamp\\ServerProtocol' => $vendorDir . '/cboden/ratchet/src/Ratchet/Wamp/ServerProtocol.php', - 'Ratchet\\Wamp\\Topic' => $vendorDir . '/cboden/ratchet/src/Ratchet/Wamp/Topic.php', - 'Ratchet\\Wamp\\TopicManager' => $vendorDir . '/cboden/ratchet/src/Ratchet/Wamp/TopicManager.php', - 'Ratchet\\Wamp\\WampConnection' => $vendorDir . '/cboden/ratchet/src/Ratchet/Wamp/WampConnection.php', - 'Ratchet\\Wamp\\WampServer' => $vendorDir . '/cboden/ratchet/src/Ratchet/Wamp/WampServer.php', - 'Ratchet\\Wamp\\WampServerInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/Wamp/WampServerInterface.php', - 'Ratchet\\WebSocket\\Encoding\\ToggleableValidator' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Encoding/ToggleableValidator.php', - 'Ratchet\\WebSocket\\Encoding\\Validator' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Encoding/Validator.php', - 'Ratchet\\WebSocket\\Encoding\\ValidatorInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Encoding/ValidatorInterface.php', - 'Ratchet\\WebSocket\\VersionManager' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/VersionManager.php', - 'Ratchet\\WebSocket\\Version\\DataInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/DataInterface.php', - 'Ratchet\\WebSocket\\Version\\FrameInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/FrameInterface.php', - 'Ratchet\\WebSocket\\Version\\Hixie76' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/Hixie76.php', - 'Ratchet\\WebSocket\\Version\\Hixie76\\Connection' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/Hixie76/Connection.php', - 'Ratchet\\WebSocket\\Version\\Hixie76\\Frame' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/Hixie76/Frame.php', - 'Ratchet\\WebSocket\\Version\\HyBi10' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/HyBi10.php', - 'Ratchet\\WebSocket\\Version\\MessageInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/MessageInterface.php', - 'Ratchet\\WebSocket\\Version\\RFC6455' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/RFC6455.php', - 'Ratchet\\WebSocket\\Version\\RFC6455\\Connection' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/RFC6455/Connection.php', - 'Ratchet\\WebSocket\\Version\\RFC6455\\Frame' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/RFC6455/Frame.php', - 'Ratchet\\WebSocket\\Version\\RFC6455\\HandshakeVerifier' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/RFC6455/HandshakeVerifier.php', - 'Ratchet\\WebSocket\\Version\\RFC6455\\Message' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/RFC6455/Message.php', - 'Ratchet\\WebSocket\\Version\\VersionInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/Version/VersionInterface.php', - 'Ratchet\\WebSocket\\WsServer' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/WsServer.php', - 'Ratchet\\WebSocket\\WsServerInterface' => $vendorDir . '/cboden/ratchet/src/Ratchet/WebSocket/WsServerInterface.php', - 'React\\EventLoop\\Factory' => $vendorDir . '/react/event-loop/React/EventLoop/Factory.php', - 'React\\EventLoop\\LibEvLoop' => $vendorDir . '/react/event-loop/React/EventLoop/LibEvLoop.php', - 'React\\EventLoop\\LibEventLoop' => $vendorDir . '/react/event-loop/React/EventLoop/LibEventLoop.php', - 'React\\EventLoop\\LoopInterface' => $vendorDir . '/react/event-loop/React/EventLoop/LoopInterface.php', - 'React\\EventLoop\\StreamSelectLoop' => $vendorDir . '/react/event-loop/React/EventLoop/StreamSelectLoop.php', - 'React\\EventLoop\\Timer\\Timer' => $vendorDir . '/react/event-loop/React/EventLoop/Timer/Timer.php', - 'React\\EventLoop\\Timer\\TimerInterface' => $vendorDir . '/react/event-loop/React/EventLoop/Timer/TimerInterface.php', - 'React\\EventLoop\\Timer\\Timers' => $vendorDir . '/react/event-loop/React/EventLoop/Timer/Timers.php', - 'React\\Socket\\Connection' => $vendorDir . '/react/socket/React/Socket/Connection.php', - 'React\\Socket\\ConnectionException' => $vendorDir . '/react/socket/React/Socket/ConnectionException.php', - 'React\\Socket\\ConnectionInterface' => $vendorDir . '/react/socket/React/Socket/ConnectionInterface.php', - 'React\\Socket\\Server' => $vendorDir . '/react/socket/React/Socket/Server.php', - 'React\\Socket\\ServerInterface' => $vendorDir . '/react/socket/React/Socket/ServerInterface.php', - 'React\\Stream\\Buffer' => $vendorDir . '/react/stream/React/Stream/Buffer.php', - 'React\\Stream\\BufferedSink' => $vendorDir . '/react/stream/React/Stream/BufferedSink.php', - 'React\\Stream\\CompositeStream' => $vendorDir . '/react/stream/React/Stream/CompositeStream.php', - 'React\\Stream\\ReadableStream' => $vendorDir . '/react/stream/React/Stream/ReadableStream.php', - 'React\\Stream\\ReadableStreamInterface' => $vendorDir . '/react/stream/React/Stream/ReadableStreamInterface.php', - 'React\\Stream\\Stream' => $vendorDir . '/react/stream/React/Stream/Stream.php', - 'React\\Stream\\StreamInterface' => $vendorDir . '/react/stream/React/Stream/StreamInterface.php', - 'React\\Stream\\ThroughStream' => $vendorDir . '/react/stream/React/Stream/ThroughStream.php', - 'React\\Stream\\Util' => $vendorDir . '/react/stream/React/Stream/Util.php', - 'React\\Stream\\WritableStream' => $vendorDir . '/react/stream/React/Stream/WritableStream.php', - 'React\\Stream\\WritableStreamInterface' => $vendorDir . '/react/stream/React/Stream/WritableStreamInterface.php', - 'RefreshCache' => $baseDir . '/app/commands/RefreshCache.php', - 'SessionHandlerInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php', - 'StringOutputProvider' => $vendorDir . '/codescale/ffmpeg-php/provider/StringOutputProvider.php', - 'Symfony\\Component\\BrowserKit\\Client' => $vendorDir . '/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php', - 'Symfony\\Component\\BrowserKit\\Cookie' => $vendorDir . '/symfony/browser-kit/Symfony/Component/BrowserKit/Cookie.php', - 'Symfony\\Component\\BrowserKit\\CookieJar' => $vendorDir . '/symfony/browser-kit/Symfony/Component/BrowserKit/CookieJar.php', - 'Symfony\\Component\\BrowserKit\\History' => $vendorDir . '/symfony/browser-kit/Symfony/Component/BrowserKit/History.php', - 'Symfony\\Component\\BrowserKit\\Request' => $vendorDir . '/symfony/browser-kit/Symfony/Component/BrowserKit/Request.php', - 'Symfony\\Component\\BrowserKit\\Response' => $vendorDir . '/symfony/browser-kit/Symfony/Component/BrowserKit/Response.php', - 'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Symfony/Component/Console/Application.php', - 'Symfony\\Component\\Console\\Command\\Command' => $vendorDir . '/symfony/console/Symfony/Component/Console/Command/Command.php', - 'Symfony\\Component\\Console\\Command\\HelpCommand' => $vendorDir . '/symfony/console/Symfony/Component/Console/Command/HelpCommand.php', - 'Symfony\\Component\\Console\\Command\\ListCommand' => $vendorDir . '/symfony/console/Symfony/Component/Console/Command/ListCommand.php', - 'Symfony\\Component\\Console\\ConsoleEvents' => $vendorDir . '/symfony/console/Symfony/Component/Console/ConsoleEvents.php', - 'Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => $vendorDir . '/symfony/console/Symfony/Component/Console/Descriptor/ApplicationDescription.php', - 'Symfony\\Component\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/console/Symfony/Component/Console/Descriptor/Descriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Descriptor/DescriptorInterface.php', - 'Symfony\\Component\\Console\\Descriptor\\JsonDescriptor' => $vendorDir . '/symfony/console/Symfony/Component/Console/Descriptor/JsonDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => $vendorDir . '/symfony/console/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/console/Symfony/Component/Console/Descriptor/TextDescriptor.php', - 'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => $vendorDir . '/symfony/console/Symfony/Component/Console/Descriptor/XmlDescriptor.php', - 'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => $vendorDir . '/symfony/console/Symfony/Component/Console/Event/ConsoleCommandEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleEvent' => $vendorDir . '/symfony/console/Symfony/Component/Console/Event/ConsoleEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent' => $vendorDir . '/symfony/console/Symfony/Component/Console/Event/ConsoleExceptionEvent.php', - 'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => $vendorDir . '/symfony/console/Symfony/Component/Console/Event/ConsoleTerminateEvent.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatter' => $vendorDir . '/symfony/console/Symfony/Component/Console/Formatter/OutputFormatter.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterInterface.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => $vendorDir . '/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php', - 'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => $vendorDir . '/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php', - 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/DescriptorHelper.php', - 'Symfony\\Component\\Console\\Helper\\DialogHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php', - 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/FormatterHelper.php', - 'Symfony\\Component\\Console\\Helper\\Helper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/Helper.php', - 'Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/HelperInterface.php', - 'Symfony\\Component\\Console\\Helper\\HelperSet' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/HelperSet.php', - 'Symfony\\Component\\Console\\Helper\\ProgressHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php', - 'Symfony\\Component\\Console\\Helper\\TableHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/TableHelper.php', - 'Symfony\\Component\\Console\\Input\\ArgvInput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/ArgvInput.php', - 'Symfony\\Component\\Console\\Input\\ArrayInput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/ArrayInput.php', - 'Symfony\\Component\\Console\\Input\\Input' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/Input.php', - 'Symfony\\Component\\Console\\Input\\InputArgument' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/InputArgument.php', - 'Symfony\\Component\\Console\\Input\\InputDefinition' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/InputDefinition.php', - 'Symfony\\Component\\Console\\Input\\InputInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/InputInterface.php', - 'Symfony\\Component\\Console\\Input\\InputOption' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/InputOption.php', - 'Symfony\\Component\\Console\\Input\\StringInput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/StringInput.php', - 'Symfony\\Component\\Console\\Output\\ConsoleOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/ConsoleOutput.php', - 'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/ConsoleOutputInterface.php', - 'Symfony\\Component\\Console\\Output\\NullOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/NullOutput.php', - 'Symfony\\Component\\Console\\Output\\Output' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/Output.php', - 'Symfony\\Component\\Console\\Output\\OutputInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/OutputInterface.php', - 'Symfony\\Component\\Console\\Output\\StreamOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/StreamOutput.php', - 'Symfony\\Component\\Console\\Shell' => $vendorDir . '/symfony/console/Symfony/Component/Console/Shell.php', - 'Symfony\\Component\\Console\\Tester\\ApplicationTester' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tester/ApplicationTester.php', - 'Symfony\\Component\\Console\\Tester\\CommandTester' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tester/CommandTester.php', - 'Symfony\\Component\\Console\\Tests\\Descriptor\\ObjectsProvider' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php', - 'Symfony\\Component\\Console\\Tests\\Fixtures\\DescriptorApplication1' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php', - 'Symfony\\Component\\Console\\Tests\\Fixtures\\DescriptorApplication2' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php', - 'Symfony\\Component\\Console\\Tests\\Fixtures\\DescriptorCommand1' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php', - 'Symfony\\Component\\Console\\Tests\\Fixtures\\DescriptorCommand2' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php', - 'Symfony\\Component\\CssSelector\\CssSelector' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/CssSelector.php', - 'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Exception/ExceptionInterface.php', - 'Symfony\\Component\\CssSelector\\Exception\\ExpressionErrorException' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Exception/ExpressionErrorException.php', - 'Symfony\\Component\\CssSelector\\Exception\\InternalErrorException' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Exception/InternalErrorException.php', - 'Symfony\\Component\\CssSelector\\Exception\\ParseException' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Exception/ParseException.php', - 'Symfony\\Component\\CssSelector\\Exception\\SyntaxErrorException' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Exception/SyntaxErrorException.php', - 'Symfony\\Component\\CssSelector\\Node\\AbstractNode' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/AbstractNode.php', - 'Symfony\\Component\\CssSelector\\Node\\AttributeNode' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/AttributeNode.php', - 'Symfony\\Component\\CssSelector\\Node\\ClassNode' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/ClassNode.php', - 'Symfony\\Component\\CssSelector\\Node\\CombinedSelectorNode' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php', - 'Symfony\\Component\\CssSelector\\Node\\ElementNode' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/ElementNode.php', - 'Symfony\\Component\\CssSelector\\Node\\FunctionNode' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/FunctionNode.php', - 'Symfony\\Component\\CssSelector\\Node\\HashNode' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/HashNode.php', - 'Symfony\\Component\\CssSelector\\Node\\NegationNode' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/NegationNode.php', - 'Symfony\\Component\\CssSelector\\Node\\NodeInterface' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/NodeInterface.php', - 'Symfony\\Component\\CssSelector\\Node\\PseudoNode' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/PseudoNode.php', - 'Symfony\\Component\\CssSelector\\Node\\SelectorNode' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/SelectorNode.php', - 'Symfony\\Component\\CssSelector\\Node\\Specificity' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Node/Specificity.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\CommentHandler' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HashHandler' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\IdentifierHandler' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\NumberHandler' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\StringHandler' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Handler\\WhitespaceHandler' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php', - 'Symfony\\Component\\CssSelector\\Parser\\Parser' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Parser.php', - 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/ParserInterface.php', - 'Symfony\\Component\\CssSelector\\Parser\\Reader' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Reader.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ClassParser' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\ElementParser' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\EmptyStringParser' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Shortcut\\HashParser' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php', - 'Symfony\\Component\\CssSelector\\Parser\\Token' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Token.php', - 'Symfony\\Component\\CssSelector\\Parser\\TokenStream' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/TokenStream.php', - 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\Tokenizer' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php', - 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerEscaping' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php', - 'Symfony\\Component\\CssSelector\\Parser\\Tokenizer\\TokenizerPatterns' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerPatterns.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AttributeMatchingExtension' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\CombinationExtension' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\ExtensionInterface' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\FunctionExtension' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\HtmlExtension' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\NodeExtension' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Extension\\PseudoClassExtension' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php', - 'Symfony\\Component\\CssSelector\\XPath\\Translator' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/Translator.php', - 'Symfony\\Component\\CssSelector\\XPath\\TranslatorInterface' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/TranslatorInterface.php', - 'Symfony\\Component\\CssSelector\\XPath\\XPathExpr' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/XPath/XPathExpr.php', - 'Symfony\\Component\\Debug\\Debug' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Debug.php', - 'Symfony\\Component\\Debug\\ErrorHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/ErrorHandler.php', - 'Symfony\\Component\\Debug\\ExceptionHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php', - 'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/ContextErrorException.php', - 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php', - 'Symfony\\Component\\Debug\\Exception\\FlattenException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php', - 'Symfony\\Component\\DomCrawler\\Crawler' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Crawler.php', - 'Symfony\\Component\\DomCrawler\\Field\\ChoiceFormField' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/ChoiceFormField.php', - 'Symfony\\Component\\DomCrawler\\Field\\FileFormField' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FileFormField.php', - 'Symfony\\Component\\DomCrawler\\Field\\FormField' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FormField.php', - 'Symfony\\Component\\DomCrawler\\Field\\InputFormField' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/InputFormField.php', - 'Symfony\\Component\\DomCrawler\\Field\\TextareaFormField' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/TextareaFormField.php', - 'Symfony\\Component\\DomCrawler\\Form' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php', - 'Symfony\\Component\\DomCrawler\\FormFieldRegistry' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/FormFieldRegistry.php', - 'Symfony\\Component\\DomCrawler\\Link' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Link.php', - 'Symfony\\Component\\DomCrawler\\Tests\\Field\\FormFieldTestCase' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/FormFieldTestCase.php', - 'Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php', - 'Symfony\\Component\\EventDispatcher\\Event' => $vendorDir . '/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php', - 'Symfony\\Component\\EventDispatcher\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php', - 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcherInterface.php', - 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => $vendorDir . '/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php', - 'Symfony\\Component\\EventDispatcher\\GenericEvent' => $vendorDir . '/symfony/event-dispatcher/Symfony/Component/EventDispatcher/GenericEvent.php', - 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php', - 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/filesystem/Symfony/Component/Filesystem/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Filesystem\\Exception\\IOException' => $vendorDir . '/symfony/filesystem/Symfony/Component/Filesystem/Exception/IOException.php', - 'Symfony\\Component\\Filesystem\\Filesystem' => $vendorDir . '/symfony/filesystem/Symfony/Component/Filesystem/Filesystem.php', - 'Symfony\\Component\\Finder\\Adapter\\AbstractAdapter' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Adapter/AbstractAdapter.php', - 'Symfony\\Component\\Finder\\Adapter\\AbstractFindAdapter' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php', - 'Symfony\\Component\\Finder\\Adapter\\AdapterInterface' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Adapter/AdapterInterface.php', - 'Symfony\\Component\\Finder\\Adapter\\BsdFindAdapter' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Adapter/BsdFindAdapter.php', - 'Symfony\\Component\\Finder\\Adapter\\GnuFindAdapter' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Adapter/GnuFindAdapter.php', - 'Symfony\\Component\\Finder\\Adapter\\PhpAdapter' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Adapter/PhpAdapter.php', - 'Symfony\\Component\\Finder\\Comparator\\Comparator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Comparator/Comparator.php', - 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Comparator/DateComparator.php', - 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Comparator/NumberComparator.php', - 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Exception/AccessDeniedException.php', - 'Symfony\\Component\\Finder\\Exception\\AdapterFailureException' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Exception/AdapterFailureException.php', - 'Symfony\\Component\\Finder\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Finder\\Exception\\OperationNotPermitedException' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Exception/OperationNotPermitedException.php', - 'Symfony\\Component\\Finder\\Exception\\ShellCommandFailureException' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Exception/ShellCommandFailureException.php', - 'Symfony\\Component\\Finder\\Expression\\Expression' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Expression/Expression.php', - 'Symfony\\Component\\Finder\\Expression\\Glob' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Expression/Glob.php', - 'Symfony\\Component\\Finder\\Expression\\Regex' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Expression/Regex.php', - 'Symfony\\Component\\Finder\\Expression\\ValueInterface' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Expression/ValueInterface.php', - 'Symfony\\Component\\Finder\\Finder' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Finder.php', - 'Symfony\\Component\\Finder\\Glob' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Glob.php', - 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/CustomFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilePathsIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/FilePathsIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/FilecontentFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\FilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/FilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/PathFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php', - 'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Iterator/SortableIterator.php', - 'Symfony\\Component\\Finder\\Shell\\Command' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Shell/Command.php', - 'Symfony\\Component\\Finder\\Shell\\Shell' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Shell/Shell.php', - 'Symfony\\Component\\Finder\\SplFileInfo' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/SplFileInfo.php', - 'Symfony\\Component\\Finder\\Tests\\FakeAdapter\\DummyAdapter' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/DummyAdapter.php', - 'Symfony\\Component\\Finder\\Tests\\FakeAdapter\\FailingAdapter' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/FailingAdapter.php', - 'Symfony\\Component\\Finder\\Tests\\FakeAdapter\\NamedAdapter' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/NamedAdapter.php', - 'Symfony\\Component\\Finder\\Tests\\FakeAdapter\\UnsupportedAdapter' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/UnsupportedAdapter.php', - 'Symfony\\Component\\Finder\\Tests\\Iterator\\Iterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Tests/Iterator/Iterator.php', - 'Symfony\\Component\\Finder\\Tests\\Iterator\\IteratorTestCase' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php', - 'Symfony\\Component\\Finder\\Tests\\Iterator\\MockFileListIterator' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php', - 'Symfony\\Component\\Finder\\Tests\\Iterator\\MockSplFileInfo' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php', - 'Symfony\\Component\\Finder\\Tests\\Iterator\\RealIteratorTestCase' => $vendorDir . '/symfony/finder/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php', - 'Symfony\\Component\\HttpFoundation\\AcceptHeader' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeader.php', - 'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeaderItem.php', - 'Symfony\\Component\\HttpFoundation\\ApacheRequest' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/ApacheRequest.php', - 'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php', - 'Symfony\\Component\\HttpFoundation\\Cookie' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Cookie.php', - 'Symfony\\Component\\HttpFoundation\\FileBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php', - 'Symfony\\Component\\HttpFoundation\\File\\Exception\\UploadException' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UploadException.php', - 'Symfony\\Component\\HttpFoundation\\File\\File' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/File.php', - 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesser' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php', - 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesserInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php', - 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileBinaryMimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php', - 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileinfoMimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php', - 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeExtensionGuesser' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php', - 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php', - 'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php', - 'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php', - 'Symfony\\Component\\HttpFoundation\\HeaderBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php', - 'Symfony\\Component\\HttpFoundation\\IpUtils' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/IpUtils.php', - 'Symfony\\Component\\HttpFoundation\\JsonResponse' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php', - 'Symfony\\Component\\HttpFoundation\\ParameterBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/ParameterBag.php', - 'Symfony\\Component\\HttpFoundation\\RedirectResponse' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/RedirectResponse.php', - 'Symfony\\Component\\HttpFoundation\\Request' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php', - 'Symfony\\Component\\HttpFoundation\\RequestMatcher' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcher.php', - 'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcherInterface.php', - 'Symfony\\Component\\HttpFoundation\\Response' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php', - 'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php', - 'Symfony\\Component\\HttpFoundation\\ServerBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/ServerBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Session' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Session.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionInterface.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcacheSessionHandler' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeSessionHandler' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\NativeProxy' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/NativeProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php', - 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php', - 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/StreamedResponse.php', - 'Symfony\\Component\\HttpFoundation\\Tests\\ResponseTestCase' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTestCase.php', - 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/Bundle.php', - 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/BundleInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheClearer\\ChainCacheClearer' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmer' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php', - 'Symfony\\Component\\HttpKernel\\CacheWarmer\\WarmableInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php', - 'Symfony\\Component\\HttpKernel\\Client' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Client.php', - 'Symfony\\Component\\HttpKernel\\Config\\FileLocator' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Config/FileLocator.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerReference' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerReference.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php', - 'Symfony\\Component\\HttpKernel\\Controller\\TraceableControllerResolver' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\ConfigDataCollector' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollector' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\EventDataCollector' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\ExceptionDataCollector' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\LoggerDataCollector' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\MemoryDataCollector' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\RouterDataCollector' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php', - 'Symfony\\Component\\HttpKernel\\DataCollector\\TimeDataCollector' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php', - 'Symfony\\Component\\HttpKernel\\Debug\\ErrorHandler' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ErrorHandler.php', - 'Symfony\\Component\\HttpKernel\\Debug\\ExceptionHandler' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php', - 'Symfony\\Component\\HttpKernel\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\AddClassesToCachePass' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ConfigurableExtension' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/Extension.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php', - 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterListenersPass' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorsLoggerListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\EsiListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/EsiListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/FragmentListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/LocaleListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ResponseListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/RouterListener.php', - 'Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php', - 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FilterControllerEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Event/KernelEvent.php', - 'Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Event/PostResponseEvent.php', - 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\FatalErrorException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FatalErrorException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\FlattenException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/GoneHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php', - 'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotAcceptableHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionFailedHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\EsiFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentHandler' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\HIncludeFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\InlineFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\Fragment\\RoutableFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Esi' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Esi.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\EsiResponseCacheStrategy' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\EsiResponseCacheStrategyInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php', - 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php', - 'Symfony\\Component\\HttpKernel\\HttpKernel' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php', - 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernelInterface.php', - 'Symfony\\Component\\HttpKernel\\Kernel' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php', - 'Symfony\\Component\\HttpKernel\\KernelEvents' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/KernelEvents.php', - 'Symfony\\Component\\HttpKernel\\KernelInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/KernelInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\DebugLoggerInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\LoggerInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Log/LoggerInterface.php', - 'Symfony\\Component\\HttpKernel\\Log\\NullLogger' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Log/NullLogger.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\BaseMemcacheProfilerStorage' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\FileProfilerStorage' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\MemcacheProfilerStorage' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MemcacheProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\MemcachedProfilerStorage' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MemcachedProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\MongoDbProfilerStorage' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\MysqlProfilerStorage' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MysqlProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\PdoProfilerStorage' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\Profile' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profile.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\Profiler' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profiler.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\RedisProfilerStorage' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\Profiler\\SqliteProfilerStorage' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php', - 'Symfony\\Component\\HttpKernel\\TerminableInterface' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/TerminableInterface.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\ExtensionAbsentBundle\\ExtensionAbsentBundle' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\ExtensionLoadedBundle\\DependencyInjection\\ExtensionLoadedExtension' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\ExtensionLoadedBundle\\ExtensionLoadedBundle' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\ExtensionPresentBundle\\Command\\FooCommand' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/FooCommand.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\ExtensionPresentBundle\\DependencyInjection\\ExtensionPresentExtension' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\ExtensionPresentBundle\\ExtensionPresentBundle' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/ExtensionPresentBundle.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\FooBarBundle' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/FooBarBundle.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\KernelForOverrideName' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForOverrideName.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\TestClient' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Fixtures\\TestEventDispatcher' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php', - 'Symfony\\Component\\HttpKernel\\Tests\\HttpCache\\HttpCacheTestCase' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php', - 'Symfony\\Component\\HttpKernel\\Tests\\HttpCache\\TestHttpKernel' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php', - 'Symfony\\Component\\HttpKernel\\Tests\\HttpCache\\TestMultipleHttpKernel' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Logger' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Logger.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Profiler\\Mock\\MemcacheMock' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/MemcacheMock.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Profiler\\Mock\\MemcachedMock' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/MemcachedMock.php', - 'Symfony\\Component\\HttpKernel\\Tests\\Profiler\\Mock\\RedisMock' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/RedisMock.php', - 'Symfony\\Component\\HttpKernel\\Tests\\TestHttpKernel' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php', - 'Symfony\\Component\\HttpKernel\\UriSigner' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/UriSigner.php', - 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/process/Symfony/Component/Process/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/process/Symfony/Component/Process/Exception/InvalidArgumentException.php', - 'Symfony\\Component\\Process\\Exception\\LogicException' => $vendorDir . '/symfony/process/Symfony/Component/Process/Exception/LogicException.php', - 'Symfony\\Component\\Process\\Exception\\ProcessFailedException' => $vendorDir . '/symfony/process/Symfony/Component/Process/Exception/ProcessFailedException.php', - 'Symfony\\Component\\Process\\Exception\\RuntimeException' => $vendorDir . '/symfony/process/Symfony/Component/Process/Exception/RuntimeException.php', - 'Symfony\\Component\\Process\\ExecutableFinder' => $vendorDir . '/symfony/process/Symfony/Component/Process/ExecutableFinder.php', - 'Symfony\\Component\\Process\\PhpExecutableFinder' => $vendorDir . '/symfony/process/Symfony/Component/Process/PhpExecutableFinder.php', - 'Symfony\\Component\\Process\\PhpProcess' => $vendorDir . '/symfony/process/Symfony/Component/Process/PhpProcess.php', - 'Symfony\\Component\\Process\\Process' => $vendorDir . '/symfony/process/Symfony/Component/Process/Process.php', - 'Symfony\\Component\\Process\\ProcessBuilder' => $vendorDir . '/symfony/process/Symfony/Component/Process/ProcessBuilder.php', - 'Symfony\\Component\\Process\\ProcessUtils' => $vendorDir . '/symfony/process/Symfony/Component/Process/ProcessUtils.php', - 'Symfony\\Component\\Process\\Tests\\ProcessInSigchildEnvironment' => $vendorDir . '/symfony/process/Symfony/Component/Process/Tests/ProcessInSigchildEnvironment.php', - 'Symfony\\Component\\Routing\\Annotation\\Route' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Annotation/Route.php', - 'Symfony\\Component\\Routing\\CompiledRoute' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/CompiledRoute.php', - 'Symfony\\Component\\Routing\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Routing\\Exception\\InvalidParameterException' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Exception/InvalidParameterException.php', - 'Symfony\\Component\\Routing\\Exception\\MethodNotAllowedException' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Exception/MethodNotAllowedException.php', - 'Symfony\\Component\\Routing\\Exception\\MissingMandatoryParametersException' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Exception/MissingMandatoryParametersException.php', - 'Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Exception/ResourceNotFoundException.php', - 'Symfony\\Component\\Routing\\Exception\\RouteNotFoundException' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Exception/RouteNotFoundException.php', - 'Symfony\\Component\\Routing\\Generator\\ConfigurableRequirementsInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumper' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumperInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php', - 'Symfony\\Component\\Routing\\Generator\\Dumper\\PhpGeneratorDumper' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php', - 'Symfony\\Component\\Routing\\Generator\\UrlGenerator' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php', - 'Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationClassLoader' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php', - 'Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Loader/AnnotationFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\ClosureLoader' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Loader/ClosureLoader.php', - 'Symfony\\Component\\Routing\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Loader/PhpFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Loader/XmlFileLoader.php', - 'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Loader/YamlFileLoader.php', - 'Symfony\\Component\\Routing\\Matcher\\ApacheUrlMatcher' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\ApacheMatcherDumper' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperCollection' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperPrefixCollection' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\DumperRoute' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumper' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumperInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php', - 'Symfony\\Component\\Routing\\Matcher\\TraceableUrlMatcher' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php', - 'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php', - 'Symfony\\Component\\Routing\\RequestContext' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/RequestContext.php', - 'Symfony\\Component\\Routing\\RequestContextAwareInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/RequestContextAwareInterface.php', - 'Symfony\\Component\\Routing\\Route' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Route.php', - 'Symfony\\Component\\Routing\\RouteCollection' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/RouteCollection.php', - 'Symfony\\Component\\Routing\\RouteCompiler' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/RouteCompiler.php', - 'Symfony\\Component\\Routing\\RouteCompilerInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/RouteCompilerInterface.php', - 'Symfony\\Component\\Routing\\Router' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Router.php', - 'Symfony\\Component\\Routing\\RouterInterface' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/RouterInterface.php', - 'Symfony\\Component\\Routing\\Tests\\Fixtures\\AnnotatedClasses\\AbstractClass' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.php', - 'Symfony\\Component\\Routing\\Tests\\Fixtures\\AnnotatedClasses\\BarClass' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/BarClass.php', - 'Symfony\\Component\\Routing\\Tests\\Fixtures\\AnnotatedClasses\\FooClass' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooClass.php', - 'Symfony\\Component\\Routing\\Tests\\Fixtures\\CustomXmlFileLoader' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/CustomXmlFileLoader.php', - 'Symfony\\Component\\Routing\\Tests\\Fixtures\\RedirectableUrlMatcher' => $vendorDir . '/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php', - 'Symfony\\Component\\Translation\\Catalogue\\AbstractOperation' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Catalogue/AbstractOperation.php', - 'Symfony\\Component\\Translation\\Catalogue\\DiffOperation' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Catalogue/DiffOperation.php', - 'Symfony\\Component\\Translation\\Catalogue\\MergeOperation' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Catalogue/MergeOperation.php', - 'Symfony\\Component\\Translation\\Catalogue\\OperationInterface' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Catalogue/OperationInterface.php', - 'Symfony\\Component\\Translation\\Dumper\\CsvFileDumper' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/CsvFileDumper.php', - 'Symfony\\Component\\Translation\\Dumper\\DumperInterface' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/DumperInterface.php', - 'Symfony\\Component\\Translation\\Dumper\\FileDumper' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php', - 'Symfony\\Component\\Translation\\Dumper\\IcuResFileDumper' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php', - 'Symfony\\Component\\Translation\\Dumper\\IniFileDumper' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/IniFileDumper.php', - 'Symfony\\Component\\Translation\\Dumper\\MoFileDumper' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/MoFileDumper.php', - 'Symfony\\Component\\Translation\\Dumper\\PhpFileDumper' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/PhpFileDumper.php', - 'Symfony\\Component\\Translation\\Dumper\\PoFileDumper' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/PoFileDumper.php', - 'Symfony\\Component\\Translation\\Dumper\\QtFileDumper' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/QtFileDumper.php', - 'Symfony\\Component\\Translation\\Dumper\\XliffFileDumper' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/XliffFileDumper.php', - 'Symfony\\Component\\Translation\\Dumper\\YamlFileDumper' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Dumper/YamlFileDumper.php', - 'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Exception/ExceptionInterface.php', - 'Symfony\\Component\\Translation\\Exception\\InvalidResourceException' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Exception/InvalidResourceException.php', - 'Symfony\\Component\\Translation\\Exception\\NotFoundResourceException' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Exception/NotFoundResourceException.php', - 'Symfony\\Component\\Translation\\Extractor\\ChainExtractor' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Extractor/ChainExtractor.php', - 'Symfony\\Component\\Translation\\Extractor\\ExtractorInterface' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Extractor/ExtractorInterface.php', - 'Symfony\\Component\\Translation\\IdentityTranslator' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/IdentityTranslator.php', - 'Symfony\\Component\\Translation\\Interval' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Interval.php', - 'Symfony\\Component\\Translation\\Loader\\ArrayLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/ArrayLoader.php', - 'Symfony\\Component\\Translation\\Loader\\CsvFileLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/CsvFileLoader.php', - 'Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/IcuDatFileLoader.php', - 'Symfony\\Component\\Translation\\Loader\\IcuResFileLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/IcuResFileLoader.php', - 'Symfony\\Component\\Translation\\Loader\\IniFileLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/IniFileLoader.php', - 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/LoaderInterface.php', - 'Symfony\\Component\\Translation\\Loader\\MoFileLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/MoFileLoader.php', - 'Symfony\\Component\\Translation\\Loader\\PhpFileLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/PhpFileLoader.php', - 'Symfony\\Component\\Translation\\Loader\\PoFileLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/PoFileLoader.php', - 'Symfony\\Component\\Translation\\Loader\\QtFileLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/QtFileLoader.php', - 'Symfony\\Component\\Translation\\Loader\\XliffFileLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/XliffFileLoader.php', - 'Symfony\\Component\\Translation\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Loader/YamlFileLoader.php', - 'Symfony\\Component\\Translation\\MessageCatalogue' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/MessageCatalogue.php', - 'Symfony\\Component\\Translation\\MessageCatalogueInterface' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/MessageCatalogueInterface.php', - 'Symfony\\Component\\Translation\\MessageSelector' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/MessageSelector.php', - 'Symfony\\Component\\Translation\\MetadataAwareInterface' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/MetadataAwareInterface.php', - 'Symfony\\Component\\Translation\\PluralizationRules' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/PluralizationRules.php', - 'Symfony\\Component\\Translation\\Tests\\Loader\\LocalizedTestCase' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php', - 'Symfony\\Component\\Translation\\Translator' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Translator.php', - 'Symfony\\Component\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/TranslatorInterface.php', - 'Symfony\\Component\\Translation\\Writer\\TranslationWriter' => $vendorDir . '/symfony/translation/Symfony/Component/Translation/Writer/TranslationWriter.php', - 'TestCase' => $baseDir . '/app/tests/TestCase.php', - 'TracksController' => $baseDir . '/app/controllers/TracksController.php', - 'Traits\\SlugTrait' => $baseDir . '/app/models/Traits/SlugTrait.php', - 'UploaderController' => $baseDir . '/app/controllers/UploaderController.php', - 'UsersController' => $baseDir . '/app/controllers/UsersController.php', - 'Whoops\\Exception\\ErrorException' => $vendorDir . '/filp/whoops/src/Whoops/Exception/ErrorException.php', - 'Whoops\\Exception\\Frame' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Frame.php', - 'Whoops\\Exception\\FrameCollection' => $vendorDir . '/filp/whoops/src/Whoops/Exception/FrameCollection.php', - 'Whoops\\Exception\\Inspector' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Inspector.php', - 'Whoops\\Handler\\CallbackHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/CallbackHandler.php', - 'Whoops\\Handler\\Handler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/Handler.php', - 'Whoops\\Handler\\HandlerInterface' => $vendorDir . '/filp/whoops/src/Whoops/Handler/HandlerInterface.php', - 'Whoops\\Handler\\JsonResponseHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php', - 'Whoops\\Handler\\PrettyPageHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php', - 'Whoops\\Module' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Zend/Module.php', - 'Whoops\\Provider\\Silex\\WhoopsServiceProvider' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Silex/WhoopsServiceProvider.php', - 'Whoops\\Provider\\Zend\\ExceptionStrategy' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php', - 'Whoops\\Provider\\Zend\\RouteNotFoundStrategy' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php', - 'Whoops\\Run' => $vendorDir . '/filp/whoops/src/Whoops/Run.php', - 'ffmpeg_animated_gif' => $vendorDir . '/codescale/ffmpeg-php/adapter/ffmpeg_animated_gif.php', - 'ffmpeg_animated_git_test' => $vendorDir . '/codescale/ffmpeg-php/test/adapter/ffmpeg_animated_gif_Test.php', - 'ffmpeg_frame' => $vendorDir . '/codescale/ffmpeg-php/adapter/ffmpeg_frame.php', - 'ffmpeg_frame_test' => $vendorDir . '/codescale/ffmpeg-php/test/adapter/ffmpeg_frame_Test.php', - 'ffmpeg_movie' => $vendorDir . '/codescale/ffmpeg-php/adapter/ffmpeg_movie.php', - 'ffmpeg_movie_test' => $vendorDir . '/codescale/ffmpeg-php/test/adapter/ffmpeg_movie_Test.php', -); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php deleted file mode 100644 index a8786262..00000000 --- a/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,50 +0,0 @@ - array($vendorDir . '/filp/whoops/src'), - 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), - 'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'), - 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), - 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), - 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), - 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), - 'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'), - 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), - 'Symfony\\Component\\DomCrawler\\' => array($vendorDir . '/symfony/dom-crawler'), - 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'), - 'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'), - 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), - 'Symfony\\Component\\BrowserKit\\' => array($vendorDir . '/symfony/browser-kit'), - 'React\\Stream' => array($vendorDir . '/react/stream'), - 'React\\Socket' => array($vendorDir . '/react/socket'), - 'React\\EventLoop' => array($vendorDir . '/react/event-loop'), - 'Ratchet\\Tests' => array($vendorDir . '/cboden/ratchet/tests'), - 'Ratchet' => array($vendorDir . '/cboden/ratchet/src'), - 'Psr\\Log\\' => array($vendorDir . '/psr/log'), - 'Predis' => array($vendorDir . '/predis/predis/lib'), - 'Patchwork' => array($vendorDir . '/patchwork/utf8/class'), - 'PHPParser' => array($vendorDir . '/nikic/php-parser/lib'), - 'Normalizer' => array($vendorDir . '/patchwork/utf8/class'), - 'Monolog' => array($vendorDir . '/monolog/monolog/src'), - 'Illuminate' => array($vendorDir . '/laravel/framework/src'), - 'Guzzle\\Stream' => array($vendorDir . '/guzzle/stream'), - 'Guzzle\\Parser' => array($vendorDir . '/guzzle/parser'), - 'Guzzle\\Http' => array($vendorDir . '/guzzle/http'), - 'Guzzle\\Common' => array($vendorDir . '/guzzle/common'), - 'Evenement' => array($vendorDir . '/evenement/evenement/src'), - 'Doctrine\\DBAL' => array($vendorDir . '/doctrine/dbal/lib'), - 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), - 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), - 'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'), - 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib'), - 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'), - 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib'), - 'ClassPreloader' => array($vendorDir . '/classpreloader/classpreloader/src'), - 'Carbon' => array($vendorDir . '/nesbot/carbon'), - 'Assetic' => array($vendorDir . '/kriswallsmith/assetic/src'), -); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php deleted file mode 100644 index ba76e071..00000000 --- a/vendor/composer/autoload_real.php +++ /dev/null @@ -1,48 +0,0 @@ - $path) { - $loader->set($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - - $loader->register(true); - - require $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php'; - require $vendorDir . '/ircmaxell/password-compat/lib/password.php'; - require $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php'; - require $vendorDir . '/kriswallsmith/assetic/src/functions.php'; - - return $loader; - } -} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json deleted file mode 100644 index 3c7a9850..00000000 --- a/vendor/composer/installed.json +++ /dev/null @@ -1,2364 +0,0 @@ -[ - { - "name": "doctrine/lexer", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94", - "reference": "bc0e1f0cc285127a38c6c8ea88bc5dba2fd53e94", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "time": "2013-03-07 12:15:25", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ] - }, - { - "name": "doctrine/annotations", - "version": "v1.1.1", - "version_normalized": "1.1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "v1.1.1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/v1.1.1", - "reference": "v1.1.1", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "doctrine/cache": "1.*" - }, - "time": "2013-04-20 08:30:17", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ] - }, - { - "name": "doctrine/collections", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "3db3ab843ff76774bee4679d4cb3a10cffb0a935" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/3db3ab843ff76774bee4679d4cb3a10cffb0a935", - "reference": "3db3ab843ff76774bee4679d4cb3a10cffb0a935", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "time": "2013-05-26 05:21:22", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Collections\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Collections Abstraction library", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "array", - "collections", - "iterator" - ] - }, - { - "name": "doctrine/cache", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "45123145f70dd79618963a72a5271b4f389712e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/45123145f70dd79618963a72a5271b4f389712e4", - "reference": "45123145f70dd79618963a72a5271b4f389712e4", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "time": "2013-05-13 02:51:07", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Cache\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan H. Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ] - }, - { - "name": "doctrine/inflector", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "8b4b3ccec7aafc596e2fc1e593c9f2e78f939c8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b4b3ccec7aafc596e2fc1e593c9f2e78f939c8c", - "reference": "8b4b3ccec7aafc596e2fc1e593c9f2e78f939c8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "time": "2013-04-10 16:14:30", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" - ] - }, - { - "name": "doctrine/common", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "2169b0ce1d253d448c60b7d40bbe4e4b5afe22fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/2169b0ce1d253d448c60b7d40bbe4e4b5afe22fe", - "reference": "2169b0ce1d253d448c60b7d40bbe4e4b5afe22fe", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/inflector": "1.*", - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "time": "2013-05-27 19:11:46", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4.x-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Doctrine\\Common\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Common Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "collections", - "eventmanager", - "persistence", - "spl" - ] - }, - { - "name": "doctrine/dbal", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "6a62fefefde6b2c0d8b3df70151d6a81fc028d28" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/6a62fefefde6b2c0d8b3df70151d6a81fc028d28", - "reference": "6a62fefefde6b2c0d8b3df70151d6a81fc028d28", - "shasum": "" - }, - "require": { - "doctrine/common": ">=2.3.0,<2.5-dev", - "php": ">=5.3.2" - }, - "time": "2013-05-21 05:53:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Doctrine\\DBAL": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - } - ], - "description": "Database Abstraction Layer", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "database", - "dbal", - "persistence", - "queryobject" - ] - }, - { - "name": "symfony/translation", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/Translation", - "source": { - "type": "git", - "url": "https://github.com/symfony/Translation.git", - "reference": "v2.3.0-RC1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/v2.3.0-RC1", - "reference": "v2.3.0-RC1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/config": ">=2.0,<3.0", - "symfony/yaml": ">=2.2,<3.0" - }, - "suggest": { - "symfony/config": "", - "symfony/yaml": "" - }, - "time": "2013-05-13 14:36:40", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Translation Component", - "homepage": "http://symfony.com" - }, - { - "name": "psr/log", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log", - "reference": "1.0.0" - }, - "dist": { - "type": "zip", - "url": "https://github.com/php-fig/log/archive/1.0.0.zip", - "reference": "1.0.0", - "shasum": "" - }, - "time": "2012-12-21 11:40:51", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ] - }, - { - "name": "symfony/routing", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/Routing", - "source": { - "type": "git", - "url": "https://github.com/symfony/Routing.git", - "reference": "v2.3.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/v2.3.0", - "reference": "v2.3.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "doctrine/common": ">=2.2,<3.0", - "psr/log": ">=1.0,<2.0", - "symfony/config": ">=2.2,<3.0", - "symfony/yaml": ">=2.0,<3.0" - }, - "suggest": { - "doctrine/common": "", - "symfony/config": "", - "symfony/yaml": "" - }, - "time": "2013-05-20 08:57:26", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\Routing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Routing Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/process", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/Process", - "source": { - "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "v2.3.0-RC1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/v2.3.0-RC1", - "reference": "v2.3.0-RC1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-05-06 20:03:44", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\Process\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/debug", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/Debug", - "source": { - "type": "git", - "url": "https://github.com/symfony/Debug.git", - "reference": "v2.3.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/v2.3.0", - "reference": "v2.3.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/http-foundation": ">=2.1,<3.0", - "symfony/http-kernel": ">=2.1,<3.0" - }, - "suggest": { - "symfony/class-loader": "", - "symfony/http-foundation": "", - "symfony/http-kernel": "" - }, - "time": "2013-06-02 11:58:44", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\Debug\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/http-foundation", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/HttpFoundation", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "v2.3.0-RC1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.3.0-RC1", - "reference": "v2.3.0-RC1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-05-10 06:00:03", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/event-dispatcher", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "v2.3.0-RC1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.3.0-RC1", - "reference": "v2.3.0-RC1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/dependency-injection": ">=2.0,<3.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "time": "2013-05-13 14:36:40", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/http-kernel", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/HttpKernel", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", - "reference": "4f0f6485abe0e2e8b8a94369fb98b8447fb1e3cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/4f0f6485abe0e2e8b8a94369fb98b8447fb1e3cc", - "reference": "4f0f6485abe0e2e8b8a94369fb98b8447fb1e3cc", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "psr/log": ">=1.0,<2.0", - "symfony/debug": ">=2.3,<3.0", - "symfony/event-dispatcher": ">=2.1,<3.0", - "symfony/http-foundation": ">=2.2,<3.0" - }, - "require-dev": { - "symfony/browser-kit": "2.2.*", - "symfony/class-loader": ">=2.1,<3.0", - "symfony/config": ">=2.0,<3.0", - "symfony/console": "2.2.*", - "symfony/dependency-injection": ">=2.0,<3.0", - "symfony/finder": ">=2.0,<3.0", - "symfony/process": ">=2.0,<3.0", - "symfony/routing": ">=2.2,<3.0", - "symfony/stopwatch": ">=2.2,<3.0" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "" - }, - "time": "2013-06-03 15:11:57", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpKernel\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/finder", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/Finder", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "v2.3.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/v2.3.0", - "reference": "v2.3.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-06-02 12:05:51", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/dom-crawler", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/DomCrawler", - "source": { - "type": "git", - "url": "https://github.com/symfony/DomCrawler.git", - "reference": "3cf81e7a021853183aa303181afc6e6868bf48ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/3cf81e7a021853183aa303181afc6e6868bf48ce", - "reference": "3cf81e7a021853183aa303181afc6e6868bf48ce", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/css-selector": ">=2.0,<3.0" - }, - "suggest": { - "symfony/css-selector": "" - }, - "time": "2013-05-19 19:00:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\DomCrawler\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony DomCrawler Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/css-selector", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/CssSelector", - "source": { - "type": "git", - "url": "https://github.com/symfony/CssSelector.git", - "reference": "v2.3.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/v2.3.0", - "reference": "v2.3.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-05-19 18:59:12", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\CssSelector\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - } - ], - "description": "Symfony CssSelector Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/console", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/Console", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "v2.3.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/v2.3.0", - "reference": "v2.3.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/event-dispatcher": ">=2.1,<3.0" - }, - "suggest": { - "symfony/event-dispatcher": "" - }, - "time": "2013-05-30 05:11:26", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "http://symfony.com" - }, - { - "name": "symfony/browser-kit", - "version": "2.3.x-dev", - "version_normalized": "2.3.9999999.9999999-dev", - "target-dir": "Symfony/Component/BrowserKit", - "source": { - "type": "git", - "url": "https://github.com/symfony/BrowserKit.git", - "reference": "v2.3.0-RC1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/v2.3.0-RC1", - "reference": "v2.3.0-RC1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/dom-crawler": ">=2.0,<3.0" - }, - "require-dev": { - "symfony/css-selector": ">=2.0,<3.0", - "symfony/process": ">=2.0,<3.0" - }, - "suggest": { - "symfony/process": "" - }, - "time": "2013-05-15 15:16:47", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\BrowserKit\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony BrowserKit Component", - "homepage": "http://symfony.com" - }, - { - "name": "swiftmailer/swiftmailer", - "version": "v5.0.0", - "version_normalized": "5.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "v5.0.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/v5.0.0", - "reference": "v5.0.0", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "time": "2013-04-30 17:35:30", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "lib/swift_required.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Chris Corbyn" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "http://swiftmailer.org", - "keywords": [ - "mail", - "mailer" - ] - }, - { - "name": "predis/predis", - "version": "0.8.x-dev", - "version_normalized": "0.8.9999999.9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/nrk/predis.git", - "reference": "aa458a1922a99611d7f81795bedff88459bc8753" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nrk/predis/zipball/aa458a1922a99611d7f81795bedff88459bc8753", - "reference": "aa458a1922a99611d7f81795bedff88459bc8753", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "suggest": { - "ext-curl": "Allows access to Webdis when paired with phpiredis", - "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" - }, - "time": "2013-06-03 10:04:10", - "type": "library", - "installation-source": "source", - "autoload": { - "psr-0": { - "Predis": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniele Alessandri", - "email": "suppakilla@gmail.com", - "homepage": "http://clorophilla.net" - } - ], - "description": "Flexible and feature-complete PHP client library for Redis", - "homepage": "http://github.com/nrk/predis", - "keywords": [ - "nosql", - "predis", - "redis" - ] - }, - { - "name": "patchwork/utf8", - "version": "v1.1.8", - "version_normalized": "1.1.8.0", - "source": { - "type": "git", - "url": "https://github.com/nicolas-grekas/Patchwork-UTF8.git", - "reference": "v1.1.8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nicolas-grekas/Patchwork-UTF8/zipball/v1.1.8", - "reference": "v1.1.8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2013-05-24 12:11:22", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Patchwork": "class/", - "Normalizer": "class/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "(Apache-2.0 or GPL-2.0)" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com", - "role": "Developer" - } - ], - "description": "UTF-8 strings handling for PHP 5.3: portable, performant and extended", - "homepage": "https://github.com/nicolas-grekas/Patchwork-UTF8", - "keywords": [ - "i18n", - "unicode", - "utf-8", - "utf8" - ] - }, - { - "name": "nesbot/carbon", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "git://github.com/briannesbitt/Carbon.git", - "reference": "1.2.0" - }, - "dist": { - "type": "zip", - "url": "https://github.com/briannesbitt/Carbon/zipball/1.2.0", - "reference": "1.2.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2012-10-14 17:41:18", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Carbon": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - } - ], - "description": "A simple API extension for DateTime.", - "homepage": "https://github.com/briannesbitt/Carbon", - "keywords": [ - "date", - "datetime", - "time" - ] - }, - { - "name": "monolog/monolog", - "version": "1.5.0", - "version_normalized": "1.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "1.5.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1.5.0", - "reference": "1.5.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": ">=1.0,<2.0" - }, - "require-dev": { - "doctrine/couchdb": "dev-master", - "mlehner/gelf-php": "1.0.*", - "raven/raven": "0.3.*" - }, - "suggest": { - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server", - "raven/raven": "Allow sending log messages to a Sentry server" - }, - "time": "2013-04-23 10:09:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Monolog": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be", - "role": "Developer" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ] - }, - { - "name": "filp/whoops", - "version": "1.0.6", - "version_normalized": "1.0.6.0", - "source": { - "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "1.0.6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/1.0.6", - "reference": "1.0.6", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "mockery/mockery": "dev-master", - "silex/silex": "1.0.*@dev" - }, - "time": "2013-05-10 22:13:22", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Whoops": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "description": "php error handling for cool kids", - "homepage": "https://github.com/filp/whoops", - "keywords": [ - "error", - "exception", - "handling", - "library", - "silex-provider", - "whoops", - "zf2" - ] - }, - { - "name": "ircmaxell/password-compat", - "version": "1.0.x-dev", - "version_normalized": "1.0.9999999.9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/ircmaxell/password_compat.git", - "reference": "v1.0.3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/v1.0.3", - "reference": "v1.0.3", - "shasum": "" - }, - "time": "2013-04-30 19:58:08", - "type": "library", - "installation-source": "source", - "autoload": { - "files": [ - "lib/password.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthony Ferrara", - "email": "ircmaxell@php.net", - "homepage": "http://blog.ircmaxell.com" - } - ], - "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", - "homepage": "https://github.com/ircmaxell/password_compat", - "keywords": [ - "hashing", - "password" - ] - }, - { - "name": "nikic/php-parser", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "5ccf6196d6925e66568e3b8460c262e9512e4b92" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/5ccf6196d6925e66568e3b8460c262e9512e4b92", - "reference": "5ccf6196d6925e66568e3b8460c262e9512e4b92", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "time": "2013-05-23 13:17:59", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "PHPParser": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ] - }, - { - "name": "symfony/filesystem", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "Symfony/Component/Filesystem", - "source": { - "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "3567f5f48305098044c6d6a383f5cefec9c45efa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/3567f5f48305098044c6d6a383f5cefec9c45efa", - "reference": "3567f5f48305098044c6d6a383f5cefec9c45efa", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-05-16 07:54:39", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "http://symfony.com" - }, - { - "name": "classpreloader/classpreloader", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/mtdowling/ClassPreloader.git", - "reference": "62c99d52ce2f1b0b8449c61e2d94f48d918222eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mtdowling/ClassPreloader/zipball/62c99d52ce2f1b0b8449c61e2d94f48d918222eb", - "reference": "62c99d52ce2f1b0b8449c61e2d94f48d918222eb", - "shasum": "" - }, - "require": { - "nikic/php-parser": "*", - "php": ">=5.3.3", - "symfony/console": ">2.0", - "symfony/filesystem": ">2.0", - "symfony/finder": ">2.0" - }, - "time": "2013-05-26 16:10:36", - "bin": [ - "classpreloader.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.0-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "ClassPreloader": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", - "keywords": [ - "autoload", - "class", - "preload" - ] - }, - { - "name": "laravel/framework", - "version": "4.0.x-dev", - "version_normalized": "4.0.9999999.9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/laravel/framework.git", - "reference": "444dbc5d02fa1e10737fcb06dd7124731f88a819" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/444dbc5d02fa1e10737fcb06dd7124731f88a819", - "reference": "444dbc5d02fa1e10737fcb06dd7124731f88a819", - "shasum": "" - }, - "require": { - "classpreloader/classpreloader": "1.0.*", - "doctrine/dbal": "2.3.x", - "filp/whoops": "1.0.6", - "ircmaxell/password-compat": "1.0.*", - "monolog/monolog": "1.5.*", - "nesbot/carbon": "1.*", - "patchwork/utf8": "1.1.*", - "php": ">=5.3.0", - "predis/predis": "0.8.*", - "swiftmailer/swiftmailer": "5.0.*", - "symfony/browser-kit": "2.3.*", - "symfony/console": "2.3.*", - "symfony/css-selector": "2.3.*", - "symfony/debug": "2.3.*", - "symfony/dom-crawler": "2.3.*", - "symfony/event-dispatcher": "2.3.*", - "symfony/finder": "2.3.*", - "symfony/http-foundation": "2.3.*", - "symfony/http-kernel": "2.3.*", - "symfony/process": "2.3.*", - "symfony/routing": "2.3.*", - "symfony/translation": "2.3.*" - }, - "replace": { - "illuminate/auth": "self.version", - "illuminate/cache": "self.version", - "illuminate/config": "self.version", - "illuminate/console": "self.version", - "illuminate/container": "self.version", - "illuminate/cookie": "self.version", - "illuminate/database": "self.version", - "illuminate/encryption": "self.version", - "illuminate/events": "self.version", - "illuminate/exception": "self.version", - "illuminate/filesystem": "self.version", - "illuminate/foundation": "self.version", - "illuminate/hashing": "self.version", - "illuminate/html": "self.version", - "illuminate/http": "self.version", - "illuminate/log": "self.version", - "illuminate/mail": "self.version", - "illuminate/pagination": "self.version", - "illuminate/queue": "self.version", - "illuminate/redis": "self.version", - "illuminate/routing": "self.version", - "illuminate/session": "self.version", - "illuminate/support": "self.version", - "illuminate/translation": "self.version", - "illuminate/validation": "self.version", - "illuminate/view": "self.version", - "illuminate/workbench": "self.version" - }, - "require-dev": { - "aws/aws-sdk-php": "2.2.*", - "iron-io/iron_mq": "1.4.4", - "mockery/mockery": "0.7.2", - "pda/pheanstalk": "2.0.*", - "phpunit/phpunit": "3.7.*" - }, - "time": "2013-06-04 21:58:42", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "installation-source": "source", - "autoload": { - "classmap": [ - [ - "src/Illuminate/Queue/IlluminateQueueClosure.php" - ] - ], - "files": [ - "src/Illuminate/Support/helpers.php" - ], - "psr-0": { - "Illuminate": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Laravel Framework.", - "keywords": [ - "framework", - "laravel" - ] - }, - { - "name": "evenement/evenement", - "version": "1.0.x-dev", - "version_normalized": "1.0.9999999.9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/igorw/evenement.git", - "reference": "8b0918f8374327dfed4408fe467980ab41d556dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/8b0918f8374327dfed4408fe467980ab41d556dd", - "reference": "8b0918f8374327dfed4408fe467980ab41d556dd", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2012-12-29 17:04:52", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Evenement": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch", - "homepage": "http://wiedler.ch/igor/" - } - ], - "description": "Événement is a very simple event dispatching library for PHP 5.3", - "keywords": [ - "event-dispatcher" - ] - }, - { - "name": "react/stream", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "React/Stream", - "source": { - "type": "git", - "url": "https://github.com/reactphp/stream.git", - "reference": "v0.3.2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/v0.3.2", - "reference": "v0.3.2", - "shasum": "" - }, - "require": { - "evenement/evenement": "1.0.*", - "php": ">=5.3.3" - }, - "suggest": { - "react/event-loop": "0.3.*", - "react/promise": "~1.0" - }, - "time": "2013-05-10 15:12:22", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "React\\Stream": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Basic readable and writable stream interfaces that support piping.", - "keywords": [ - "pipe", - "stream" - ] - }, - { - "name": "guzzle/parser", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "Guzzle/Parser", - "source": { - "type": "git", - "url": "https://github.com/guzzle/parser.git", - "reference": "v3.6.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/parser/zipball/v3.6.0", - "reference": "v3.6.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "time": "2013-05-30 07:01:25", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Guzzle\\Parser": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Interchangeable parsers used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "URI Template", - "cookie", - "http", - "message", - "url" - ] - }, - { - "name": "react/event-loop", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "React/EventLoop", - "source": { - "type": "git", - "url": "https://github.com/reactphp/event-loop.git", - "reference": "v0.3.2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/v0.3.2", - "reference": "v0.3.2", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-libev": "*", - "ext-libevent": ">=0.0.5" - }, - "time": "2013-01-14 23:11:47", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "React\\EventLoop": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Event loop abstraction layer that libraries can use for evented I/O.", - "keywords": [ - "event-loop" - ] - }, - { - "name": "react/socket", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "React/Socket", - "source": { - "type": "git", - "url": "https://github.com/reactphp/socket.git", - "reference": "v0.3.2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/v0.3.2", - "reference": "v0.3.2", - "shasum": "" - }, - "require": { - "evenement/evenement": "1.0.*", - "php": ">=5.3.3", - "react/event-loop": "0.3.*", - "react/stream": "0.3.*" - }, - "time": "2013-04-26 20:23:10", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "React\\Socket": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Library for building an evented socket server.", - "keywords": [ - "Socket" - ] - }, - { - "name": "guzzle/common", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "Guzzle/Common", - "source": { - "type": "git", - "url": "https://github.com/guzzle/common.git", - "reference": "v3.6.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/common/zipball/v3.6.0", - "reference": "v3.6.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.2", - "symfony/event-dispatcher": ">=2.1" - }, - "time": "2013-05-30 07:01:25", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Guzzle\\Common": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Common libraries used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "collection", - "common", - "event", - "exception" - ] - }, - { - "name": "guzzle/stream", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "Guzzle/Stream", - "source": { - "type": "git", - "url": "https://github.com/guzzle/stream.git", - "reference": "v3.6.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/stream/zipball/v3.6.0", - "reference": "v3.6.0", - "shasum": "" - }, - "require": { - "guzzle/common": "self.version", - "php": ">=5.3.2" - }, - "suggest": { - "guzzle/http": "To convert Guzzle request objects to PHP streams" - }, - "time": "2013-05-30 07:01:25", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Guzzle\\Stream": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle stream wrapper component", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "component", - "stream" - ] - }, - { - "name": "guzzle/http", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "Guzzle/Http", - "source": { - "type": "git", - "url": "https://github.com/guzzle/http.git", - "reference": "v3.6.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/http/zipball/v3.6.0", - "reference": "v3.6.0", - "shasum": "" - }, - "require": { - "guzzle/common": "self.version", - "guzzle/parser": "self.version", - "guzzle/stream": "self.version", - "php": ">=5.3.2" - }, - "suggest": { - "ext-curl": "*" - }, - "time": "2013-05-30 07:01:25", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Guzzle\\Http": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "HTTP libraries used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "client", - "curl", - "http", - "http client" - ] - }, - { - "name": "cboden/ratchet", - "version": "0.3.x-dev", - "version_normalized": "0.3.9999999.9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/cboden/Ratchet.git", - "reference": "f4ddea5f44bc64c06016acea9da80e5e87830a7a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cboden/Ratchet/zipball/f4ddea5f44bc64c06016acea9da80e5e87830a7a", - "reference": "f4ddea5f44bc64c06016acea9da80e5e87830a7a", - "shasum": "" - }, - "require": { - "guzzle/http": ">=3.0,<4.0", - "php": ">=5.3.9", - "react/socket": ">=0.2,<1.0", - "symfony/http-foundation": ">=2.2,<3.0", - "symfony/routing": ">=2.2,<3.0" - }, - "time": "2013-05-29 11:51:33", - "type": "library", - "installation-source": "source", - "autoload": { - "psr-0": { - "Ratchet\\Tests": "tests", - "Ratchet": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "http://res.im", - "role": "Developer" - } - ], - "description": "PHP WebSocket library", - "homepage": "http://socketo.me", - "keywords": [ - "Ratchet", - "WebSockets", - "server", - "sockets" - ] - }, - { - "name": "kriswallsmith/assetic", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/kriswallsmith/assetic.git", - "reference": "d5311bf231ecf8a1e4b8ae00dcb15651b63dfed5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/d5311bf231ecf8a1e4b8ae00dcb15651b63dfed5", - "reference": "d5311bf231ecf8a1e4b8ae00dcb15651b63dfed5", - "shasum": "" - }, - "require": { - "php": ">=5.3.1", - "symfony/process": ">=2.1,<3.0" - }, - "require-dev": { - "cssmin/cssmin": "*", - "joliclic/javascript-packer": "*", - "kamicane/packager": "*", - "leafo/lessphp": "*", - "leafo/scssphp": "*", - "leafo/scssphp-compass": "*", - "mrclay/minify": "*", - "phpunit/phpunit": ">=3.7,<4.0", - "ptachoire/cssembed": "*", - "twig/twig": ">=1.6,<2.0" - }, - "suggest": { - "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", - "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler", - "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin", - "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", - "twig/twig": "Assetic provides the integration with the Twig templating engine" - }, - "time": "2013-06-04 14:31:31", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Assetic": "src/" - }, - "files": [ - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kris Wallsmith", - "email": "kris.wallsmith@gmail.com", - "homepage": "http://kriswallsmith.net/" - } - ], - "description": "Asset Management for PHP", - "homepage": "https://github.com/kriswallsmith/assetic", - "keywords": [ - "assets", - "compression", - "minification" - ] - }, - { - "name": "codescale/ffmpeg-php", - "version": "2.7.0", - "version_normalized": "2.7.0.0", - "source": { - "type": "git", - "url": "https://github.com/CodeScaleInc/ffmpeg-php.git", - "reference": "2.7.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/CodeScaleInc/ffmpeg-php/zipball/2.7.0", - "reference": "2.7.0", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "time": "2013-05-05 09:10:04", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "." - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "New BSD" - ], - "authors": [ - { - "name": "char0n (Vladimír Gorej, CodeScale s.r.o.)", - "email": "gorej@codescale.net", - "homepage": "http://www.codescale.net/", - "role": "Development lead" - } - ], - "description": "PHP wrapper for FFmpeg application", - "homepage": "http://freecode.com/projects/ffmpegphp", - "keywords": [ - "audio", - "ffmpeg", - "video" - ] - } -] diff --git a/vendor/doctrine/annotations/.gitignore b/vendor/doctrine/annotations/.gitignore deleted file mode 100644 index 48b8bf90..00000000 --- a/vendor/doctrine/annotations/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor/ diff --git a/vendor/doctrine/annotations/.travis.yml b/vendor/doctrine/annotations/.travis.yml deleted file mode 100644 index 478e5d65..00000000 --- a/vendor/doctrine/annotations/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: php - -php: - - 5.3 - - 5.4 - -before_script: - - composer --prefer-source --dev install diff --git a/vendor/doctrine/annotations/README.md b/vendor/doctrine/annotations/README.md deleted file mode 100644 index 1107dc8e..00000000 --- a/vendor/doctrine/annotations/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Doctrine Annotations - -Docblock Annotations Parser library (extracted from Doctrine Common). - -## Changelog - -### v1.1 - -* Add Exception when ZendOptimizer+ or Opcache is configured to drop comments diff --git a/vendor/doctrine/annotations/composer.json b/vendor/doctrine/annotations/composer.json deleted file mode 100644 index 3569cf4c..00000000 --- a/vendor/doctrine/annotations/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "doctrine/annotations", - "type": "library", - "description": "Docblock Annotations Parser", - "keywords": ["annotations", "docblock", "parser"], - "homepage": "http://www.doctrine-project.org", - "license": "MIT", - "authors": [ - {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, - {"name": "Roman Borschel", "email": "roman@code-factory.org"}, - {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"}, - {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}, - {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} - ], - "require": { - "php": ">=5.3.2", - "doctrine/lexer": "1.*" - }, - "require-dev": { - "doctrine/cache": "1.*" - }, - "autoload": { - "psr-0": { "Doctrine\\Common\\Annotations\\": "lib/" } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/doctrine/annotations/composer.lock b/vendor/doctrine/annotations/composer.lock deleted file mode 100644 index b8cdceaf..00000000 --- a/vendor/doctrine/annotations/composer.lock +++ /dev/null @@ -1,129 +0,0 @@ -{ - "hash": "cacabc211410ba4430f0cadc8cc70667", - "packages": [ - { - "name": "doctrine/lexer", - "version": "v1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "v1.0" - }, - "dist": { - "type": "zip", - "url": "https://github.com/doctrine/lexer/archive/v1.0.zip", - "reference": "v1.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "time": "2013-01-12 18:59:04", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "parser", - "lexer" - ] - } - ], - "packages-dev": [ - { - "name": "doctrine/cache", - "version": "v1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "v1.0" - }, - "dist": { - "type": "zip", - "url": "https://github.com/doctrine/cache/archive/v1.0.zip", - "reference": "v1.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "time": "2013-01-10 22:43:46", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Cache\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ] - } - ], - "aliases": [ - - ], - "minimum-stability": "stable", - "stability-flags": [ - - ] -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php deleted file mode 100644 index 6a1390af..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php +++ /dev/null @@ -1,79 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * Annotations class - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class Annotation -{ - /** - * Value property. Common among all derived classes. - * - * @var string - */ - public $value; - - /** - * Constructor - * - * @param array $data Key-value for properties to be defined in this class - */ - public final function __construct(array $data) - { - foreach ($data as $key => $value) { - $this->$key = $value; - } - } - - /** - * Error handler for unknown property accessor in Annotation class. - * - * @param string $name Unknown property name - * - * @throws \BadMethodCallException - */ - public function __get($name) - { - throw new \BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)) - ); - } - - /** - * Error handler for unknown property mutator in Annotation class. - * - * @param string $name Unkown property name - * @param mixed $value Property value - * - * @throws \BadMethodCallException - */ - public function __set($name, $value) - { - throw new \BadMethodCallException( - sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)) - ); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php deleted file mode 100644 index dbef6df0..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php +++ /dev/null @@ -1,47 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser - * to check the attribute type during the parsing process. - * - * @author Fabio B. Silva - * - * @Annotation - */ -final class Attribute -{ - /** - * @var string - */ - public $name; - - /** - * @var string - */ - public $type; - - /** - * @var boolean - */ - public $required = false; -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php deleted file mode 100644 index 53134e30..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php +++ /dev/null @@ -1,37 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser - * to check the types of all declared attributes during the parsing process. - * - * @author Fabio B. Silva - * - * @Annotation - */ -final class Attributes -{ - /** - * @var array - */ - public $value; -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php deleted file mode 100644 index 315812f5..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php +++ /dev/null @@ -1,85 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser - * to check the available values during the parsing process. - * - * @since 2.4 - * @author Fabio B. Silva - * - * @Annotation - * @Attributes({ - * @Attribute("value", required = true, type = "array"), - * @Attribute("literal", required = false, type = "array") - * }) - */ -final class Enum -{ - /** - * @var array - */ - public $value; - - /** - * Literal target declaration. - * - * @var array - */ - public $literal; - - /** - * Annotation construct - * - * @param array $values - * - * @throws \InvalidArgumentException - */ - public function __construct(array $values) - { - if ( ! isset($values['literal'])) { - $values['literal'] = array(); - } - - foreach ($values['value'] as $var) { - if( ! is_scalar($var)) { - throw new \InvalidArgumentException(sprintf( - '@Enum supports only scalar values "%s" given.', - is_object($var) ? get_class($var) : gettype($var) - )); - } - } - - foreach ($values['literal'] as $key => $var) { - if( ! in_array($key, $values['value'])) { - throw new \InvalidArgumentException(sprintf( - 'Undefined enumerator value "%s" for literal "%s".', - $key , $var - )); - } - } - - $this->value = $values['value']; - $this->literal = $values['literal']; - } - -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php deleted file mode 100644 index a84a4f51..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php +++ /dev/null @@ -1,54 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser to ignore specific - * annotations during the parsing process. - * - * @Annotation - * @author Johannes M. Schmitt - */ -final class IgnoreAnnotation -{ - /** - * @var array - */ - public $names; - - /** - * Constructor - * - * @param array $values - * - * @throws \RuntimeException - */ - public function __construct(array $values) - { - if (is_string($values['value'])) { - $values['value'] = array($values['value']); - } - if (!is_array($values['value'])) { - throw new \RuntimeException(sprintf('@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', json_encode($values['value']))); - } - - $this->names = $values['value']; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php deleted file mode 100644 index d67f9606..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php +++ /dev/null @@ -1,33 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser - * to check if that attribute is required during the parsing process. - * - * @author Fabio B. Silva - * - * @Annotation - */ -final class Required -{ -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php deleted file mode 100644 index 64655ef6..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php +++ /dev/null @@ -1,107 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations\Annotation; - -/** - * Annotation that can be used to signal to the parser - * to check the annotation target during the parsing process. - * - * @author Fabio B. Silva - * - * @Annotation - */ -final class Target -{ - const TARGET_CLASS = 1; - const TARGET_METHOD = 2; - const TARGET_PROPERTY = 4; - const TARGET_ANNOTATION = 8; - const TARGET_ALL = 15; - - /** - * @var array - */ - private static $map = array( - 'ALL' => self::TARGET_ALL, - 'CLASS' => self::TARGET_CLASS, - 'METHOD' => self::TARGET_METHOD, - 'PROPERTY' => self::TARGET_PROPERTY, - 'ANNOTATION' => self::TARGET_ANNOTATION, - ); - - /** - * @var array - */ - public $value; - - /** - * Targets as bitmask. - * - * @var integer - */ - public $targets; - - /** - * Literal target declaration. - * - * @var integer - */ - public $literal; - - /** - * Annotation construct - * - * @param array $values - * - * @throws \InvalidArgumentException - */ - public function __construct(array $values) - { - if (!isset($values['value'])){ - $values['value'] = null; - } - if (is_string($values['value'])){ - $values['value'] = array($values['value']); - } - if (!is_array($values['value'])){ - throw new \InvalidArgumentException( - sprintf('@Target expects either a string value, or an array of strings, "%s" given.', - is_object($values['value']) ? get_class($values['value']) : gettype($values['value']) - ) - ); - } - - $bitmask = 0; - foreach ($values['value'] as $literal) { - if(!isset(self::$map[$literal])){ - throw new \InvalidArgumentException( - sprintf('Invalid Target "%s". Available targets: [%s]', - $literal, implode(', ', array_keys(self::$map))) - ); - } - $bitmask += self::$map[$literal]; - } - - $this->targets = $bitmask; - $this->value = $values['value']; - $this->literal = implode(', ', $this->value); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php deleted file mode 100644 index 6cdb6615..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php +++ /dev/null @@ -1,158 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * Description of AnnotationException - * - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class AnnotationException extends \Exception -{ - /** - * Creates a new AnnotationException describing a Syntax error. - * - * @param string $message Exception message - * @return AnnotationException - */ - public static function syntaxError($message) - { - return new self('[Syntax Error] ' . $message); - } - - /** - * Creates a new AnnotationException describing a Semantical error. - * - * @param string $message Exception message - * @return AnnotationException - */ - public static function semanticalError($message) - { - return new self('[Semantical Error] ' . $message); - } - - /** - * Creates a new AnnotationException describing a constant semantical error. - * - * @since 2.3 - * @param string $identifier - * @param string $context - * @return AnnotationException - */ - public static function semanticalErrorConstants($identifier, $context = null) - { - return self::semanticalError(sprintf( - "Couldn't find constant %s%s", $identifier, - $context ? ", $context." : "." - )); - } - - /** - * Creates a new AnnotationException describing an error which occurred during - * the creation of the annotation. - * - * @since 2.2 - * @param string $message - * @return AnnotationException - */ - public static function creationError($message) - { - return new self('[Creation Error] ' . $message); - } - - /** - * Creates a new AnnotationException describing an type error of an attribute. - * - * @since 2.2 - * @param string $attributeName - * @param string $annotationName - * @param string $context - * @param string $expected - * @param mixed $actual - * @return AnnotationException - */ - public static function typeError($attributeName, $annotationName, $context, $expected, $actual) - { - return new self(sprintf( - '[Type Error] Attribute "%s" of @%s declared on %s expects %s, but got %s.', - $attributeName, - $annotationName, - $context, - $expected, - is_object($actual) ? 'an instance of '.get_class($actual) : gettype($actual) - )); - } - - /** - * Creates a new AnnotationException describing an required error of an attribute. - * - * @since 2.2 - * @param string $attributeName - * @param string $annotationName - * @param string $context - * @param string $expected - * @return AnnotationException - */ - public static function requiredError($attributeName, $annotationName, $context, $expected) - { - return new self(sprintf( - '[Type Error] Attribute "%s" of @%s declared on %s expects %s. This value should not be null.', - $attributeName, - $annotationName, - $context, - $expected - )); - } - - /** - * Creates a new AnnotationException describing a invalid enummerator. - * - * @since 2.4 - * @param string $attributeName - * @param string $annotationName - * @param string $context - * @param array $available - * @param mixed $given - * @return AnnotationException - */ - public static function enumeratorError($attributeName, $annotationName, $context, $available, $given) - { - throw new self(sprintf( - '[Enum Error] Attribute "%s" of @%s declared on %s accept only [%s], but got %s.', - $attributeName, - $annotationName, - $context, - implode(', ', $available), - is_object($given) ? get_class($given) : $given - )); - } - - /** - * @return AnnotationException - */ - public static function optimizerPlusSaveComments() - { - throw new self("You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1."); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php deleted file mode 100644 index ad4a2649..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ /dev/null @@ -1,318 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation; -use Doctrine\Common\Annotations\Annotation\Target; -use Closure; -use ReflectionClass; -use ReflectionMethod; -use ReflectionProperty; - -/** - * A reader for docblock annotations. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Johannes M. Schmitt - */ -class AnnotationReader implements Reader -{ - /** - * Global map for imports. - * - * @var array - */ - private static $globalImports = array( - 'ignoreannotation' => 'Doctrine\Common\Annotations\Annotation\IgnoreAnnotation', - ); - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names are case sensitive. - * - * @var array - */ - private static $globalIgnoredNames = array( - 'access'=> true, 'author'=> true, 'copyright'=> true, 'deprecated'=> true, - 'example'=> true, 'ignore'=> true, 'internal'=> true, 'link'=> true, 'see'=> true, - 'since'=> true, 'tutorial'=> true, 'version'=> true, 'package'=> true, - 'subpackage'=> true, 'name'=> true, 'global'=> true, 'param'=> true, - 'return'=> true, 'staticvar'=> true, 'category'=> true, 'staticVar'=> true, - 'static'=> true, 'var'=> true, 'throws'=> true, 'inheritdoc'=> true, - 'inheritDoc'=> true, 'license'=> true, 'todo'=> true, 'TODO'=> true, - 'deprec'=> true, 'property' => true, 'method' => true, - 'abstract'=> true, 'exception'=> true, 'magic' => true, 'api' => true, - 'final'=> true, 'filesource'=> true, 'throw' => true, 'uses' => true, - 'usedby'=> true, 'private' => true, 'Annotation' => true, 'override' => true, - 'codeCoverageIgnore' => true, 'codeCoverageIgnoreStart' => true, 'codeCoverageIgnoreEnd' => true, - 'Required' => true, 'Attribute' => true, 'Attributes' => true, - 'Target' => true, 'SuppressWarnings' => true, - 'ingroup' => true, 'code' => true, 'endcode' => true, - 'package_version' => true, 'fixme' => true - ); - - /** - * Add a new annotation to the globally ignored annotation names with regard to exception handling. - * - * @param string $name - */ - static public function addGlobalIgnoredName($name) - { - self::$globalIgnoredNames[$name] = true; - } - - /** - * Annotations Parser - * - * @var \Doctrine\Common\Annotations\DocParser - */ - private $parser; - - /** - * Annotations Parser used to collect parsing metadata - * - * @var \Doctrine\Common\Annotations\DocParser - */ - private $preParser; - - /** - * PHP Parser used to collect imports. - * - * @var \Doctrine\Common\Annotations\PhpParser - */ - private $phpParser; - - /** - * In-memory cache mechanism to store imported annotations per class. - * - * @var array - */ - private $imports = array(); - - /** - * In-memory cache mechanism to store ignored annotations per class. - * - * @var array - */ - private $ignoredAnnotationNames = array(); - - /** - * Constructor. - * - * Initializes a new AnnotationReader. - */ - public function __construct() - { - if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === "0" || ini_get('opcache.save_comments') === "0")) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - if (extension_loaded('opcache') && ini_get('opcache.save_comments') == 0) { - throw AnnotationException::optimizerPlusSaveComments(); - } - - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/IgnoreAnnotation.php'); - - $this->parser = new DocParser; - - $this->preParser = new DocParser; - $this->preParser->setImports(self::$globalImports); - $this->preParser->setIgnoreNotImportedAnnotations(true); - - $this->phpParser = new PhpParser; - } - - /** - * Gets the annotations applied to a class. - * - * @param ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * @return array An array of Annotations. - */ - public function getClassAnnotations(ReflectionClass $class) - { - $this->parser->setTarget(Target::TARGET_CLASS); - $this->parser->setImports($this->getImports($class)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - - return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName()); - } - - /** - * Gets a class annotation. - * - * @param ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * @param string $annotationName The name of the annotation. - * @return mixed The Annotation or NULL, if the requested annotation does not exist. - */ - public function getClassAnnotation(ReflectionClass $class, $annotationName) - { - $annotations = $this->getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Gets the annotations applied to a property. - * - * @param ReflectionProperty $property The ReflectionProperty of the property - * from which the annotations should be read. - * @return array An array of Annotations. - */ - public function getPropertyAnnotations(ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $context = 'property ' . $class->getName() . "::\$" . $property->getName(); - $this->parser->setTarget(Target::TARGET_PROPERTY); - $this->parser->setImports($this->getImports($class)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - - return $this->parser->parse($property->getDocComment(), $context); - } - - /** - * Gets a property annotation. - * - * @param ReflectionProperty $property - * @param string $annotationName The name of the annotation. - * @return mixed The Annotation or NULL, if the requested annotation does not exist. - */ - public function getPropertyAnnotation(ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Gets the annotations applied to a method. - * - * @param \ReflectionMethod $method The ReflectionMethod of the method from which - * the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getMethodAnnotations(ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - $this->parser->setTarget(Target::TARGET_METHOD); - $this->parser->setImports($this->getImports($class)); - $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class)); - - return $this->parser->parse($method->getDocComment(), $context); - } - - /** - * Gets a method annotation. - * - * @param ReflectionMethod $method - * @param string $annotationName The name of the annotation. - * @return mixed The Annotation or NULL, if the requested annotation does not exist. - */ - public function getMethodAnnotation(ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Returns the ignored annotations for the given class. - * - * @param ReflectionClass $class - * @return array - */ - private function getIgnoredAnnotationNames(ReflectionClass $class) - { - if (isset($this->ignoredAnnotationNames[$name = $class->getName()])) { - return $this->ignoredAnnotationNames[$name]; - } - $this->collectParsingMetadata($class); - - return $this->ignoredAnnotationNames[$name]; - } - - /** - * Retrieve imports - * - * @param \ReflectionClass $class - * @return array - */ - private function getImports(ReflectionClass $class) - { - if (isset($this->imports[$name = $class->getName()])) { - return $this->imports[$name]; - } - $this->collectParsingMetadata($class); - - return $this->imports[$name]; - } - - /** - * Collects parsing metadata for a given class - * - * @param ReflectionClass $class - */ - private function collectParsingMetadata(ReflectionClass $class) - { - $ignoredAnnotationNames = self::$globalIgnoredNames; - - $annotations = $this->preParser->parse($class->getDocComment(), 'class '.$class->name); - foreach ($annotations as $annotation) { - if ($annotation instanceof IgnoreAnnotation) { - foreach ($annotation->names AS $annot) { - $ignoredAnnotationNames[$annot] = true; - } - } - } - - $name = $class->getName(); - $this->imports[$name] = array_merge( - self::$globalImports, - $this->phpParser->parseClass($class), - array('__NAMESPACE__' => $class->getNamespaceName()) - ); - $this->ignoredAnnotationNames[$name] = $ignoredAnnotationNames; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php deleted file mode 100644 index 6135f53d..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ /dev/null @@ -1,139 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * AnnotationRegistry - */ -final class AnnotationRegistry -{ - /** - * A map of namespaces to use for autoloading purposes based on a PSR-0 convention. - * - * Contains the namespace as key and an array of directories as value. If the value is NULL - * the include path is used for checking for the corresponding file. - * - * This autoloading mechanism does not utilize the PHP autoloading but implements autoloading on its own. - * - * @var array - */ - static private $autoloadNamespaces = array(); - - /** - * A map of autoloader callables. - * - * @var array - */ - static private $loaders = array(); - - static public function reset() - { - self::$autoloadNamespaces = array(); - self::$loaders = array(); - } - - /** - * Register file - * - * @param string $file - */ - static public function registerFile($file) - { - require_once $file; - } - - /** - * Add a namespace with one or many directories to look for files or null for the include path. - * - * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. - * - * @param string $namespace - * @param string|array|null $dirs - */ - static public function registerAutoloadNamespace($namespace, $dirs = null) - { - self::$autoloadNamespaces[$namespace] = $dirs; - } - - /** - * Register multiple namespaces - * - * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm. - * - * @param array $namespaces - */ - static public function registerAutoloadNamespaces(array $namespaces) - { - self::$autoloadNamespaces = array_merge(self::$autoloadNamespaces, $namespaces); - } - - /** - * Register an autoloading callable for annotations, much like spl_autoload_register(). - * - * NOTE: These class loaders HAVE to be silent when a class was not found! - * IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class. - * - * @param callable $callable - * - * @throws \InvalidArgumentException - */ - static public function registerLoader($callable) - { - if (!is_callable($callable)) { - throw new \InvalidArgumentException("A callable is expected in AnnotationRegistry::registerLoader()."); - } - self::$loaders[] = $callable; - } - - /** - * Autoload an annotation class silently. - * - * @param string $class - * @return boolean - */ - static public function loadAnnotationClass($class) - { - foreach (self::$autoloadNamespaces AS $namespace => $dirs) { - if (strpos($class, $namespace) === 0) { - $file = str_replace("\\", DIRECTORY_SEPARATOR, $class) . ".php"; - if ($dirs === null) { - if ($path = stream_resolve_include_path($file)) { - require $path; - return true; - } - } else { - foreach((array)$dirs AS $dir) { - if (is_file($dir . DIRECTORY_SEPARATOR . $file)) { - require $dir . DIRECTORY_SEPARATOR . $file; - return true; - } - } - } - } - } - - foreach (self::$loaders AS $loader) { - if (call_user_func($loader, $class) === true) { - return true; - } - } - return false; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php deleted file mode 100644 index e377e3b3..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php +++ /dev/null @@ -1,250 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use Doctrine\Common\Cache\Cache; - -/** - * A cache aware annotation reader. - * - * @author Johannes M. Schmitt - * @author Benjamin Eberlei - */ -final class CachedReader implements Reader -{ - /** - * @var string - */ - private static $CACHE_SALT = '@[Annot]'; - - /** - * @var Reader - */ - private $delegate; - - /** - * @var Cache - */ - private $cache; - - /** - * @var boolean - */ - private $debug; - - /** - * @var array - */ - private $loadedAnnotations; - - /** - * Constructor - * - * @param Reader $reader - * @param Cache $cache - * @param bool $debug - */ - public function __construct(Reader $reader, Cache $cache, $debug = false) - { - $this->delegate = $reader; - $this->cache = $cache; - $this->debug = (Boolean) $debug; - } - - /** - * Get annotations for class - * - * @param \ReflectionClass $class - * @return array - */ - public function getClassAnnotations(\ReflectionClass $class) - { - $cacheKey = $class->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { - $annots = $this->delegate->getClassAnnotations($class); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * Get selected annotation for class - * - * @param \ReflectionClass $class - * @param string $annotationName - * @return null - */ - public function getClassAnnotation(\ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * Get annotations for property - * - * @param \ReflectionProperty $property - * @return array - */ - public function getPropertyAnnotations(\ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - $cacheKey = $class->getName().'$'.$property->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { - $annots = $this->delegate->getPropertyAnnotations($property); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * Get selected annotation for property - * - * @param \ReflectionProperty $property - * @param string $annotationName - * @return null - */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * Get method annotations - * - * @param \ReflectionMethod $method - * @return array - */ - public function getMethodAnnotations(\ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - $cacheKey = $class->getName().'#'.$method->getName(); - - if (isset($this->loadedAnnotations[$cacheKey])) { - return $this->loadedAnnotations[$cacheKey]; - } - - if (false === ($annots = $this->fetchFromCache($cacheKey, $class))) { - $annots = $this->delegate->getMethodAnnotations($method); - $this->saveToCache($cacheKey, $annots); - } - - return $this->loadedAnnotations[$cacheKey] = $annots; - } - - /** - * Get selected method annotation - * - * @param \ReflectionMethod $method - * @param string $annotationName - * @return null - */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * Clear loaded annotations - */ - public function clearLoadedAnnotations() - { - $this->loadedAnnotations = array(); - } - - /** - * Fetches a value from the cache. - * - * @param string $rawCacheKey The cache key. - * @param \ReflectionClass $class The related class. - * @return mixed|boolean The cached value or false when the value is not in cache. - */ - private function fetchFromCache($rawCacheKey, \ReflectionClass $class) - { - $cacheKey = $rawCacheKey . self::$CACHE_SALT; - if (($data = $this->cache->fetch($cacheKey)) !== false) { - if (!$this->debug || $this->isCacheFresh($cacheKey, $class)) { - return $data; - } - } - - return false; - } - - /** - * Saves a value to the cache - * - * @param string $rawCacheKey The cache key. - * @param mixed $value The value. - */ - private function saveToCache($rawCacheKey, $value) - { - $cacheKey = $rawCacheKey . self::$CACHE_SALT; - $this->cache->save($cacheKey, $value); - if ($this->debug) { - $this->cache->save('[C]'.$cacheKey, time()); - } - } - - /** - * Check if cache is fresh - * - * @param string $cacheKey - * @param \ReflectionClass $class - * @return bool - */ - private function isCacheFresh($cacheKey, \ReflectionClass $class) - { - if (false === $filename = $class->getFilename()) { - return true; - } - - return $this->cache->fetch('[C]'.$cacheKey) >= filemtime($filename); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php deleted file mode 100644 index ddc84d69..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php +++ /dev/null @@ -1,132 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use Doctrine\Common\Lexer\AbstractLexer; - -/** - * Simple lexer for docblock annotations. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Johannes M. Schmitt - */ -final class DocLexer extends AbstractLexer -{ - const T_NONE = 1; - const T_INTEGER = 2; - const T_STRING = 3; - const T_FLOAT = 4; - - // All tokens that are also identifiers should be >= 100 - const T_IDENTIFIER = 100; - const T_AT = 101; - const T_CLOSE_CURLY_BRACES = 102; - const T_CLOSE_PARENTHESIS = 103; - const T_COMMA = 104; - const T_EQUALS = 105; - const T_FALSE = 106; - const T_NAMESPACE_SEPARATOR = 107; - const T_OPEN_CURLY_BRACES = 108; - const T_OPEN_PARENTHESIS = 109; - const T_TRUE = 110; - const T_NULL = 111; - const T_COLON = 112; - - protected $noCase = array( - '@' => self::T_AT, - ',' => self::T_COMMA, - '(' => self::T_OPEN_PARENTHESIS, - ')' => self::T_CLOSE_PARENTHESIS, - '{' => self::T_OPEN_CURLY_BRACES, - '}' => self::T_CLOSE_CURLY_BRACES, - '=' => self::T_EQUALS, - ':' => self::T_COLON, - '\\' => self::T_NAMESPACE_SEPARATOR - ); - - protected $withCase = array( - 'true' => self::T_TRUE, - 'false' => self::T_FALSE, - 'null' => self::T_NULL - ); - - /** - * {@inheritdoc} - */ - protected function getCatchablePatterns() - { - return array( - '[a-z_\\\][a-z0-9_\:\\\]*[a-z]{1}', - '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?', - '"(?:[^"]|"")*"', - ); - } - - /** - * {@inheritdoc} - */ - protected function getNonCatchablePatterns() - { - return array('\s+', '\*+', '(.)'); - } - - /** - * {@inheritdoc} - * - * @param string $value - * - * @return int - */ - protected function getType(&$value) - { - $type = self::T_NONE; - - if ($value[0] === '"') { - $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2)); - - return self::T_STRING; - } - - if (isset($this->noCase[$value])) { - return $this->noCase[$value]; - } - - if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) { - return self::T_IDENTIFIER; - } - - $lowerValue = strtolower($value); - - if (isset($this->withCase[$lowerValue])) { - return $this->withCase[$lowerValue]; - } - - // Checking numeric value - if (is_numeric($value)) { - return (strpos($value, '.') !== false || stripos($value, 'e') !== false) - ? self::T_FLOAT : self::T_INTEGER; - } - - return $type; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php deleted file mode 100644 index 5896e237..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php +++ /dev/null @@ -1,1041 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use Closure; -use ReflectionClass; -use Doctrine\Common\Annotations\Annotation\Enum; -use Doctrine\Common\Annotations\Annotation\Target; -use Doctrine\Common\Annotations\Annotation\Attribute; -use Doctrine\Common\Annotations\Annotation\Attributes; - -/** - * A parser for docblock annotations. - * - * It is strongly discouraged to change the default annotation parsing process. - * - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Johannes M. Schmitt - * @author Fabio B. Silva - */ -final class DocParser -{ - /** - * An array of all valid tokens for a class name. - * - * @var array - */ - private static $classIdentifiers = array(DocLexer::T_IDENTIFIER, DocLexer::T_TRUE, DocLexer::T_FALSE, DocLexer::T_NULL); - - /** - * The lexer. - * - * @var \Doctrine\Common\Annotations\DocLexer - */ - private $lexer; - - /** - * Current target context - * - * @var string - */ - private $target; - - /** - * Doc Parser used to collect annotation target - * - * @var \Doctrine\Common\Annotations\DocParser - */ - private static $metadataParser; - - /** - * Flag to control if the current annotation is nested or not. - * - * @var boolean - */ - private $isNestedAnnotation = false; - - /** - * Hashmap containing all use-statements that are to be used when parsing - * the given doc block. - * - * @var array - */ - private $imports = array(); - - /** - * This hashmap is used internally to cache results of class_exists() - * look-ups. - * - * @var array - */ - private $classExists = array(); - - /** - * Whether annotations that have not been imported should be ignored. - * - * @var boolean - */ - private $ignoreNotImportedAnnotations = false; - - /** - * An array of default namespaces if operating in simple mode. - * - * @var array - */ - private $namespaces = array(); - - /** - * A list with annotations that are not causing exceptions when not resolved to an annotation class. - * - * The names must be the raw names as used in the class, not the fully qualified - * class names. - * - * @var array - */ - private $ignoredAnnotationNames = array(); - - /** - * @var string - */ - private $context = ''; - - /** - * Hash-map for caching annotation metadata - * @var array - */ - private static $annotationMetadata = array( - 'Doctrine\Common\Annotations\Annotation\Target' => array( - 'is_annotation' => true, - 'has_constructor' => true, - 'properties' => array(), - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'attribute_types' => array( - 'value' => array( - 'required' => false, - 'type' =>'array', - 'array_type'=>'string', - 'value' =>'array' - ) - ), - ), - 'Doctrine\Common\Annotations\Annotation\Attribute' => array( - 'is_annotation' => true, - 'has_constructor' => false, - 'targets_literal' => 'ANNOTATION_ANNOTATION', - 'targets' => Target::TARGET_ANNOTATION, - 'default_property' => 'name', - 'properties' => array( - 'name' => 'name', - 'type' => 'type', - 'required' => 'required' - ), - 'attribute_types' => array( - 'value' => array( - 'required' => true, - 'type' =>'string', - 'value' =>'string' - ), - 'type' => array( - 'required' =>true, - 'type' =>'string', - 'value' =>'string' - ), - 'required' => array( - 'required' =>false, - 'type' =>'boolean', - 'value' =>'boolean' - ) - ), - ), - 'Doctrine\Common\Annotations\Annotation\Attributes' => array( - 'is_annotation' => true, - 'has_constructor' => false, - 'targets_literal' => 'ANNOTATION_CLASS', - 'targets' => Target::TARGET_CLASS, - 'default_property' => 'value', - 'properties' => array( - 'value' => 'value' - ), - 'attribute_types' => array( - 'value' => array( - 'type' =>'array', - 'required' =>true, - 'array_type'=>'Doctrine\Common\Annotations\Annotation\Attribute', - 'value' =>'array' - ) - ), - ), - 'Doctrine\Common\Annotations\Annotation\Enum' => array( - 'is_annotation' => true, - 'has_constructor' => true, - 'targets_literal' => 'ANNOTATION_PROPERTY', - 'targets' => Target::TARGET_PROPERTY, - 'default_property' => 'value', - 'properties' => array( - 'value' => 'value' - ), - 'attribute_types' => array( - 'value' => array( - 'type' => 'array', - 'required' => true, - ), - 'literal' => array( - 'type' => 'array', - 'required' => false, - ), - ), - ), - ); - - /** - * Hash-map for handle types declaration - * - * @var array - */ - private static $typeMap = array( - 'float' => 'double', - 'bool' => 'boolean', - // allow uppercase Boolean in honor of George Boole - 'Boolean' => 'boolean', - 'int' => 'integer', - ); - - /** - * Constructs a new DocParser. - */ - public function __construct() - { - $this->lexer = new DocLexer; - } - - /** - * Sets the annotation names that are ignored during the parsing process. - * - * The names are supposed to be the raw names as used in the class, not the - * fully qualified class names. - * - * @param array $names - */ - public function setIgnoredAnnotationNames(array $names) - { - $this->ignoredAnnotationNames = $names; - } - - /** - * Sets ignore on not-imported annotations - * - * @param $bool - */ - public function setIgnoreNotImportedAnnotations($bool) - { - $this->ignoreNotImportedAnnotations = (Boolean) $bool; - } - - /** - * Sets the default namespaces. - * - * @param array $namespace - * - * @throws \RuntimeException - */ - public function addNamespace($namespace) - { - if ($this->imports) { - throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - $this->namespaces[] = $namespace; - } - - /** - * Sets the imports - * - * @param array $imports - * @throws \RuntimeException - */ - public function setImports(array $imports) - { - if ($this->namespaces) { - throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.'); - } - $this->imports = $imports; - } - - /** - * Sets current target context as bitmask. - * - * @param integer $target - */ - public function setTarget($target) - { - $this->target = $target; - } - - /** - * Parses the given docblock string for annotations. - * - * @param string $input The docblock string to parse. - * @param string $context The parsing context. - * @return array Array of annotations. If no annotations are found, an empty array is returned. - */ - public function parse($input, $context = '') - { - if (false === $pos = strpos($input, '@')) { - return array(); - } - - // also parse whatever character is before the @ - if ($pos > 0) { - $pos -= 1; - } - - $this->context = $context; - $this->lexer->setInput(trim(substr($input, $pos), '* /')); - $this->lexer->moveNext(); - - return $this->Annotations(); - } - - /** - * Attempts to match the given token with the current lookahead token. - * If they match, updates the lookahead token; otherwise raises a syntax error. - * - * @param int $token type of Token. - * @return bool True if tokens match; false otherwise. - */ - private function match($token) - { - if ( ! $this->lexer->isNextToken($token) ) { - $this->syntaxError($this->lexer->getLiteral($token)); - } - - return $this->lexer->moveNext(); - } - - /** - * Attempts to match the current lookahead token with any of the given tokens. - * - * If any of them matches, this method updates the lookahead token; otherwise - * a syntax error is raised. - * - * @param array $tokens - * @return bool - */ - private function matchAny(array $tokens) - { - if ( ! $this->lexer->isNextTokenAny($tokens)) { - $this->syntaxError(implode(' or ', array_map(array($this->lexer, 'getLiteral'), $tokens))); - } - - return $this->lexer->moveNext(); - } - - /** - * Generates a new syntax error. - * - * @param string $expected Expected string. - * @param array $token Optional token. - * - * @throws AnnotationException - */ - private function syntaxError($expected, $token = null) - { - if ($token === null) { - $token = $this->lexer->lookahead; - } - - $message = "Expected {$expected}, got "; - - if ($this->lexer->lookahead === null) { - $message .= 'end of string'; - } else { - $message .= "'{$token['value']}' at position {$token['position']}"; - } - - if (strlen($this->context)) { - $message .= ' in ' . $this->context; - } - - $message .= '.'; - - throw AnnotationException::syntaxError($message); - } - - /** - * Attempt to check if a class exists or not. This never goes through the PHP autoloading mechanism - * but uses the {@link AnnotationRegistry} to load classes. - * - * @param string $fqcn - * @return boolean - */ - private function classExists($fqcn) - { - if (isset($this->classExists[$fqcn])) { - return $this->classExists[$fqcn]; - } - - // first check if the class already exists, maybe loaded through another AnnotationReader - if (class_exists($fqcn, false)) { - return $this->classExists[$fqcn] = true; - } - - // final check, does this class exist? - return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn); - } - - /** - * Collects parsing metadata for a given annotation class - * - * @param string $name The annotation name - */ - private function collectAnnotationMetadata($name) - { - if (self::$metadataParser == null){ - self::$metadataParser = new self(); - self::$metadataParser->setIgnoreNotImportedAnnotations(true); - self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames); - self::$metadataParser->setImports(array( - 'enum' => 'Doctrine\Common\Annotations\Annotation\Enum', - 'target' => 'Doctrine\Common\Annotations\Annotation\Target', - 'attribute' => 'Doctrine\Common\Annotations\Annotation\Attribute', - 'attributes' => 'Doctrine\Common\Annotations\Annotation\Attributes' - )); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Enum.php'); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Target.php'); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attribute.php'); - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attributes.php'); - } - - $class = new \ReflectionClass($name); - $docComment = $class->getDocComment(); - - // Sets default values for annotation metadata - $metadata = array( - 'default_property' => null, - 'has_constructor' => (null !== $constructor = $class->getConstructor()) && $constructor->getNumberOfParameters() > 0, - 'properties' => array(), - 'property_types' => array(), - 'attribute_types' => array(), - 'targets_literal' => null, - 'targets' => Target::TARGET_ALL, - 'is_annotation' => false !== strpos($docComment, '@Annotation'), - ); - - // verify that the class is really meant to be an annotation - if ($metadata['is_annotation']) { - - self::$metadataParser->setTarget(Target::TARGET_CLASS); - - foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) { - if ($annotation instanceof Target) { - $metadata['targets'] = $annotation->targets; - $metadata['targets_literal'] = $annotation->literal; - - } elseif ($annotation instanceof Attributes) { - foreach ($annotation->value as $attrib) { - // handle internal type declaration - $type = isset(self::$typeMap[$attrib->type]) ? self::$typeMap[$attrib->type] : $attrib->type; - - // handle the case if the property type is mixed - if ('mixed' !== $type) { - // Checks if the property has array - if (false !== $pos = strpos($type, '<')) { - $arrayType = substr($type, $pos+1, -1); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$attrib->name]['array_type'] = $arrayType; - } - - $metadata['attribute_types'][$attrib->name]['type'] = $type; - $metadata['attribute_types'][$attrib->name]['value'] = $attrib->type; - $metadata['attribute_types'][$attrib->name]['required'] = $attrib->required; - } - } - } - } - - // if not has a constructor will inject values into public properties - if (false === $metadata['has_constructor']) { - // collect all public properties - foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { - $metadata['properties'][$property->name] = $property->name; - - if(false === ($propertyComment = $property->getDocComment())) { - continue; - } - - // checks if the property has @var annotation - if (false !== strpos($propertyComment, '@var') - && preg_match('/@var\s+([^\s]+)/',$propertyComment, $matches)) { - // literal type declaration - $value = $matches[1]; - - // handle internal type declaration - $type = isset(self::$typeMap[$value]) ? self::$typeMap[$value] : $value; - - // handle the case if the property type is mixed - if ('mixed' !== $type) { - // Checks if the property has @var array annotation - if (false !== $pos = strpos($type, '<')) { - $arrayType = substr($type, $pos+1, -1); - $type = 'array'; - - if (isset(self::$typeMap[$arrayType])) { - $arrayType = self::$typeMap[$arrayType]; - } - - $metadata['attribute_types'][$property->name]['array_type'] = $arrayType; - } - - $metadata['attribute_types'][$property->name]['type'] = $type; - $metadata['attribute_types'][$property->name]['value'] = $value; - $metadata['attribute_types'][$property->name]['required'] = false !== strpos($propertyComment, '@Required'); - } - } - - // checks if the property has @Enum - if (false !== strpos($propertyComment, '@Enum')){ - - $context = 'property ' . $class->name . "::\$" . $property->name; - self::$metadataParser->setTarget(Target::TARGET_PROPERTY); - - foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) { - if($annotation instanceof Enum) { - $metadata['enum'][$property->name]['value'] = $annotation->value; - $metadata['enum'][$property->name]['literal'] = ! empty($annotation->literal) ? $annotation->literal : $annotation->value; - } - } - } - } - - // choose the first property as default property - $metadata['default_property'] = reset($metadata['properties']); - } - } - - self::$annotationMetadata[$name] = $metadata; - } - - /** - * Annotations ::= Annotation {[ "*" ]* [Annotation]}* - * - * @return array - */ - private function Annotations() - { - $annotations = array(); - - while (null !== $this->lexer->lookahead) { - if (DocLexer::T_AT !== $this->lexer->lookahead['type']) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is preceded by non-catchable pattern - if (null !== $this->lexer->token && $this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen($this->lexer->token['value'])) { - $this->lexer->moveNext(); - continue; - } - - // make sure the @ is followed by either a namespace separator, or - // an identifier token - if ((null === $peek = $this->lexer->glimpse()) - || (DocLexer::T_NAMESPACE_SEPARATOR !== $peek['type'] && !in_array($peek['type'], self::$classIdentifiers, true)) - || $peek['position'] !== $this->lexer->lookahead['position'] + 1) { - $this->lexer->moveNext(); - continue; - } - - $this->isNestedAnnotation = false; - if (false !== $annot = $this->Annotation()) { - $annotations[] = $annot; - } - } - - return $annotations; - } - - /** - * Annotation ::= "@" AnnotationName ["(" [Values] ")"] - * AnnotationName ::= QualifiedName | SimpleName - * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName - * NameSpacePart ::= identifier | null | false | true - * SimpleName ::= identifier | null | false | true - * - * @throws AnnotationException - * @return mixed False if it is not a valid annotation. - */ - private function Annotation() - { - $this->match(DocLexer::T_AT); - - // check if we have an annotation - $name = $this->Identifier(); - - // only process names which are not fully qualified, yet - // fully qualified names must start with a \ - $originalName = $name; - if ('\\' !== $name[0]) { - $alias = (false === $pos = strpos($name, '\\'))? $name : substr($name, 0, $pos); - - $found = false; - if ($this->namespaces) { - foreach ($this->namespaces as $namespace) { - if ($this->classExists($namespace.'\\'.$name)) { - $name = $namespace.'\\'.$name; - $found = true; - break; - } - } - } elseif (isset($this->imports[$loweredAlias = strtolower($alias)])) { - if (false !== $pos) { - $name = $this->imports[$loweredAlias].substr($name, $pos); - } else { - $name = $this->imports[$loweredAlias]; - } - $found = true; - } elseif (isset($this->imports['__NAMESPACE__']) && $this->classExists($this->imports['__NAMESPACE__'].'\\'.$name)) { - $name = $this->imports['__NAMESPACE__'].'\\'.$name; - $found = true; - } elseif ($this->classExists($name)) { - $found = true; - } - - if (!$found) { - if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) { - return false; - } - - throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation?', $name, $this->context)); - } - } - - if (!$this->classExists($name)) { - throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s does not exist, or could not be auto-loaded.', $name, $this->context)); - } - - // at this point, $name contains the fully qualified class name of the - // annotation, and it is also guaranteed that this class exists, and - // that it is loaded - - - // collects the metadata annotation only if there is not yet - if (!isset(self::$annotationMetadata[$name])) { - $this->collectAnnotationMetadata($name); - } - - // verify that the class is really meant to be an annotation and not just any ordinary class - if (self::$annotationMetadata[$name]['is_annotation'] === false) { - if (isset($this->ignoredAnnotationNames[$originalName])) { - return false; - } - - throw AnnotationException::semanticalError(sprintf('The class "%s" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "%s". If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s.', $name, $name, $originalName, $this->context)); - } - - //if target is nested annotation - $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target; - - // Next will be nested - $this->isNestedAnnotation = true; - - //if annotation does not support current target - if (0 === (self::$annotationMetadata[$name]['targets'] & $target) && $target) { - throw AnnotationException::semanticalError( - sprintf('Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s.', - $originalName, $this->context, self::$annotationMetadata[$name]['targets_literal']) - ); - } - - $values = array(); - if ($this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) { - $this->match(DocLexer::T_OPEN_PARENTHESIS); - - if ( ! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) { - $values = $this->Values(); - } - - $this->match(DocLexer::T_CLOSE_PARENTHESIS); - } - - if (isset(self::$annotationMetadata[$name]['enum'])) { - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) { - // checks if the attribute is a valid enumerator - if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) { - throw AnnotationException::enumeratorError($property, $name, $this->context, $enum['literal'], $values[$property]); - } - } - } - - // checks all declared attributes - foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) { - if ($property === self::$annotationMetadata[$name]['default_property'] - && !isset($values[$property]) && isset($values['value'])) { - $property = 'value'; - } - - // handle a not given attribute or null value - if (!isset($values[$property])) { - if ($type['required']) { - throw AnnotationException::requiredError($property, $originalName, $this->context, 'a(n) '.$type['value']); - } - - continue; - } - - if ($type['type'] === 'array') { - // handle the case of a single value - if ( ! is_array($values[$property])) { - $values[$property] = array($values[$property]); - } - - // checks if the attribute has array type declaration, such as "array" - if (isset($type['array_type'])) { - foreach ($values[$property] as $item) { - if (gettype($item) !== $type['array_type'] && !$item instanceof $type['array_type']) { - throw AnnotationException::typeError($property, $originalName, $this->context, 'either a(n) '.$type['array_type'].', or an array of '.$type['array_type'].'s', $item); - } - } - } - } elseif (gettype($values[$property]) !== $type['type'] && !$values[$property] instanceof $type['type']) { - throw AnnotationException::typeError($property, $originalName, $this->context, 'a(n) '.$type['value'], $values[$property]); - } - } - - // check if the annotation expects values via the constructor, - // or directly injected into public properties - if (self::$annotationMetadata[$name]['has_constructor'] === true) { - return new $name($values); - } - - $instance = new $name(); - foreach ($values as $property => $value) { - if (!isset(self::$annotationMetadata[$name]['properties'][$property])) { - if ('value' !== $property) { - throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not have a property named "%s". Available properties: %s', $originalName, $this->context, $property, implode(', ', self::$annotationMetadata[$name]['properties']))); - } - - // handle the case if the property has no annotations - if (!$property = self::$annotationMetadata[$name]['default_property']) { - throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not accept any values, but got %s.', $originalName, $this->context, json_encode($values))); - } - } - - $instance->{$property} = $value; - } - - return $instance; - } - - /** - * Values ::= Array | Value {"," Value}* - * - * @return array - */ - private function Values() - { - $values = array(); - - // Handle the case of a single array as value, i.e. @Foo({....}) - if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { - $values['value'] = $this->Value(); - return $values; - } - - $values[] = $this->Value(); - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - $token = $this->lexer->lookahead; - $value = $this->Value(); - - if ( ! is_object($value) && ! is_array($value)) { - $this->syntaxError('Value', $token); - } - - $values[] = $value; - } - - foreach ($values as $k => $value) { - if (is_object($value) && $value instanceof \stdClass) { - $values[$value->name] = $value->value; - } else if ( ! isset($values['value'])){ - $values['value'] = $value; - } else { - if ( ! is_array($values['value'])) { - $values['value'] = array($values['value']); - } - - $values['value'][] = $value; - } - - unset($values[$k]); - } - - return $values; - } - - /** - * Constant ::= integer | string | float | boolean - * - * @throws AnnotationException - * @return mixed - */ - private function Constant() - { - $identifier = $this->Identifier(); - - if (!defined($identifier) && false !== strpos($identifier, '::') && '\\' !== $identifier[0]) { - - list($className, $const) = explode('::', $identifier); - $alias = (false === $pos = strpos($className, '\\'))? $className : substr($className, 0, $pos); - - $found = false; - switch (true) { - case !empty ($this->namespaces): - foreach ($this->namespaces as $ns) { - if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) { - $className = $ns.'\\'.$className; - $found = true; - break; - } - } - break; - - case isset($this->imports[$loweredAlias = strtolower($alias)]): - $found = true; - if (false !== $pos) { - $className = $this->imports[$loweredAlias].substr($className, $pos); - } else { - $className = $this->imports[$loweredAlias]; - } - break; - - default: - if(isset($this->imports['__NAMESPACE__'])) { - $ns = $this->imports['__NAMESPACE__']; - if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) { - $className = $ns.'\\'.$className; - $found = true; - } - } - break; - } - - if ($found) { - $identifier = $className . '::' . $const; - } - } - - if (!defined($identifier)) { - throw AnnotationException::semanticalErrorConstants($identifier, $this->context); - } - - return constant($identifier); - } - - /** - * Identifier ::= string - * - * @return string - */ - private function Identifier() - { - // check if we have an annotation - if ($this->lexer->isNextTokenAny(self::$classIdentifiers)) { - $this->lexer->moveNext(); - $className = $this->lexer->token['value']; - } else { - $this->syntaxError('namespace separator or identifier'); - } - - while ($this->lexer->lookahead['position'] === ($this->lexer->token['position'] + strlen($this->lexer->token['value'])) - && $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)) { - - $this->match(DocLexer::T_NAMESPACE_SEPARATOR); - $this->matchAny(self::$classIdentifiers); - $className .= '\\' . $this->lexer->token['value']; - } - - return $className; - } - - /** - * Value ::= PlainValue | FieldAssignment - * - * @return mixed - */ - private function Value() - { - $peek = $this->lexer->glimpse(); - - if (DocLexer::T_EQUALS === $peek['type']) { - return $this->FieldAssignment(); - } - - return $this->PlainValue(); - } - - /** - * PlainValue ::= integer | string | float | boolean | Array | Annotation - * - * @return mixed - */ - private function PlainValue() - { - if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) { - return $this->Arrayx(); - } - - if ($this->lexer->isNextToken(DocLexer::T_AT)) { - return $this->Annotation(); - } - - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - return $this->Constant(); - } - - switch ($this->lexer->lookahead['type']) { - case DocLexer::T_STRING: - $this->match(DocLexer::T_STRING); - return $this->lexer->token['value']; - - case DocLexer::T_INTEGER: - $this->match(DocLexer::T_INTEGER); - return (int)$this->lexer->token['value']; - - case DocLexer::T_FLOAT: - $this->match(DocLexer::T_FLOAT); - return (float)$this->lexer->token['value']; - - case DocLexer::T_TRUE: - $this->match(DocLexer::T_TRUE); - return true; - - case DocLexer::T_FALSE: - $this->match(DocLexer::T_FALSE); - return false; - - case DocLexer::T_NULL: - $this->match(DocLexer::T_NULL); - return null; - - default: - $this->syntaxError('PlainValue'); - } - } - - /** - * FieldAssignment ::= FieldName "=" PlainValue - * FieldName ::= identifier - * - * @return array - */ - private function FieldAssignment() - { - $this->match(DocLexer::T_IDENTIFIER); - $fieldName = $this->lexer->token['value']; - - $this->match(DocLexer::T_EQUALS); - - $item = new \stdClass(); - $item->name = $fieldName; - $item->value = $this->PlainValue(); - - return $item; - } - - /** - * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}" - * - * @return array - */ - private function Arrayx() - { - $array = $values = array(); - - $this->match(DocLexer::T_OPEN_CURLY_BRACES); - $values[] = $this->ArrayEntry(); - - while ($this->lexer->isNextToken(DocLexer::T_COMMA)) { - $this->match(DocLexer::T_COMMA); - - // optional trailing comma - if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) { - break; - } - - $values[] = $this->ArrayEntry(); - } - - $this->match(DocLexer::T_CLOSE_CURLY_BRACES); - - foreach ($values as $value) { - list ($key, $val) = $value; - - if ($key !== null) { - $array[$key] = $val; - } else { - $array[] = $val; - } - } - - return $array; - } - - /** - * ArrayEntry ::= Value | KeyValuePair - * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant - * Key ::= string | integer | Constant - * - * @return array - */ - private function ArrayEntry() - { - $peek = $this->lexer->glimpse(); - - if (DocLexer::T_EQUALS === $peek['type'] - || DocLexer::T_COLON === $peek['type']) { - - if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) { - $key = $this->Constant(); - } else { - $this->matchAny(array(DocLexer::T_INTEGER, DocLexer::T_STRING)); - $key = $this->lexer->token['value']; - } - - $this->matchAny(array(DocLexer::T_EQUALS, DocLexer::T_COLON)); - - return array($key, $this->PlainValue()); - } - - return array(null, $this->Value()); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php deleted file mode 100644 index 5e937a86..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php +++ /dev/null @@ -1,269 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - - -/** - * File cache reader for annotations. - * - * @author Johannes M. Schmitt - * @author Benjamin Eberlei - */ -class FileCacheReader implements Reader -{ - /** - * @var Reader - */ - private $reader; - - /** - * @var string - */ - private $dir; - - /** - * @var bool - */ - private $debug; - - /** - * @var array - */ - private $loadedAnnotations = array(); - - private $classNameHashes = array(); - - /** - * Constructor - * - * @param Reader $reader - * @param string $cacheDir - * @param bool $debug - * - * @throws \InvalidArgumentException - */ - public function __construct(Reader $reader, $cacheDir, $debug = false) - { - $this->reader = $reader; - if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true)) { - throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist and could not be created.', $cacheDir)); - } - if (!is_writable($cacheDir)) { - throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable. Both, the webserver and the console user need access. You can manage access rights for multiple users with "chmod +a". If your system does not support this, check out the acl package.', $cacheDir)); - } - - $this->dir = rtrim($cacheDir, '\\/'); - $this->debug = $debug; - } - - /** - * Retrieve annotations for class - * - * @param \ReflectionClass $class - * @return array - */ - public function getClassAnnotations(\ReflectionClass $class) - { - if ( ! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - $key = $this->classNameHashes[$class->name]; - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; - if (!is_file($path)) { - $annot = $this->reader->getClassAnnotations($class); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - if ($this->debug - && (false !== $filename = $class->getFilename()) - && filemtime($path) < filemtime($filename)) { - @unlink($path); - - $annot = $this->reader->getClassAnnotations($class); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * Get annotations for property - * - * @param \ReflectionProperty $property - * @return array - */ - public function getPropertyAnnotations(\ReflectionProperty $property) - { - $class = $property->getDeclaringClass(); - if ( ! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - $key = $this->classNameHashes[$class->name].'$'.$property->getName(); - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; - if (!is_file($path)) { - $annot = $this->reader->getPropertyAnnotations($property); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - if ($this->debug - && (false !== $filename = $class->getFilename()) - && filemtime($path) < filemtime($filename)) { - @unlink($path); - - $annot = $this->reader->getPropertyAnnotations($property); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * Retrieve annotations for method - * - * @param \ReflectionMethod $method - * @return array - */ - public function getMethodAnnotations(\ReflectionMethod $method) - { - $class = $method->getDeclaringClass(); - if ( ! isset($this->classNameHashes[$class->name])) { - $this->classNameHashes[$class->name] = sha1($class->name); - } - $key = $this->classNameHashes[$class->name].'#'.$method->getName(); - - if (isset($this->loadedAnnotations[$key])) { - return $this->loadedAnnotations[$key]; - } - - $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php'; - if (!is_file($path)) { - $annot = $this->reader->getMethodAnnotations($method); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - if ($this->debug - && (false !== $filename = $class->getFilename()) - && filemtime($path) < filemtime($filename)) { - @unlink($path); - - $annot = $this->reader->getMethodAnnotations($method); - $this->saveCacheFile($path, $annot); - return $this->loadedAnnotations[$key] = $annot; - } - - return $this->loadedAnnotations[$key] = include $path; - } - - /** - * Save cache file - * - * @param string $path - * @param mixed $data - */ - private function saveCacheFile($path, $data) - { - file_put_contents($path, 'getClassAnnotations($class); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Gets a method annotation. - * - * @param \ReflectionMethod $method - * @param string $annotationName The name of the annotation. - * @return mixed The Annotation or NULL, if the requested annotation does not exist. - */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) - { - $annotations = $this->getMethodAnnotations($method); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Gets a property annotation. - * - * @param \ReflectionProperty $property - * @param string $annotationName The name of the annotation. - * @return mixed The Annotation or NULL, if the requested annotation does not exist. - */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) - { - $annotations = $this->getPropertyAnnotations($property); - - foreach ($annotations as $annotation) { - if ($annotation instanceof $annotationName) { - return $annotation; - } - } - - return null; - } - - /** - * Clear stores annotations - */ - public function clearLoadedAnnotations() - { - $this->loadedAnnotations = array(); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php deleted file mode 100644 index 2dfdd4da..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php +++ /dev/null @@ -1,141 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use Doctrine\Common\Annotations\Reader; - -/** - * Allows the reader to be used in-place of Doctrine's reader. - * - * @author Johannes M. Schmitt - */ -class IndexedReader implements Reader -{ - /** - * @var Reader - */ - private $delegate; - - /** - * Constructor - * - * @param Reader $reader - */ - public function __construct(Reader $reader) - { - $this->delegate = $reader; - } - - /** - * Get Annotations for class - * - * @param \ReflectionClass $class - * @return array - */ - public function getClassAnnotations(\ReflectionClass $class) - { - $annotations = array(); - foreach ($this->delegate->getClassAnnotations($class) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * Get selected annotation for class - * - * @param \ReflectionClass $class - * @param string $annotation - * @return mixed - */ - public function getClassAnnotation(\ReflectionClass $class, $annotation) - { - return $this->delegate->getClassAnnotation($class, $annotation); - } - - /** - * Get Annotations for method - * - * @param \ReflectionMethod $method - * @return array - */ - public function getMethodAnnotations(\ReflectionMethod $method) - { - $annotations = array(); - foreach ($this->delegate->getMethodAnnotations($method) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * Get selected annotation for method - * - * @param \ReflectionMethod $method - * @param string $annotation - * @return mixed - */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotation) - { - return $this->delegate->getMethodAnnotation($method, $annotation); - } - - /** - * Get annotations for property - * - * @param \ReflectionProperty $property - * @return array - */ - public function getPropertyAnnotations(\ReflectionProperty $property) - { - $annotations = array(); - foreach ($this->delegate->getPropertyAnnotations($property) as $annot) { - $annotations[get_class($annot)] = $annot; - } - - return $annotations; - } - - /** - * Get selected annotation for property - * - * @param \ReflectionProperty $property - * @param string $annotation - * @return mixed - */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotation) - { - return $this->delegate->getPropertyAnnotation($property, $annotation); - } - - /** - * Proxy all methods to the delegate. - * - * @param string $method - * @param array $args - * @return mixed - */ - public function __call($method, $args) - { - return call_user_func_array(array($this->delegate, $method), $args); - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php deleted file mode 100644 index 9d61020d..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php +++ /dev/null @@ -1,89 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use SplFileObject; - -/** - * Parses a file for namespaces/use/class declarations. - * - * @author Fabien Potencier - * @author Christian Kaps - */ -final class PhpParser -{ - /** - * Parses a class. - * - * @param \ReflectionClass $class A ReflectionClass object. - * @return array A list with use statements in the form (Alias => FQN). - */ - public function parseClass(\ReflectionClass $class) - { - if (method_exists($class, 'getUseStatements')) { - return $class->getUseStatements(); - } - - if (false === $filename = $class->getFilename()) { - return array(); - } - - $content = $this->getFileContent($filename, $class->getStartLine()); - - if (null === $content) { - return array(); - } - - $namespace = preg_quote($class->getNamespaceName()); - $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content); - $tokenizer = new TokenParser('parseUseStatements($class->getNamespaceName()); - - return $statements; - } - - /** - * Get the content of the file right up to the given line number. - * - * @param string $filename The name of the file to load. - * @param int $lineNumber The number of lines to read from file. - * @return string The content of the file. - */ - private function getFileContent($filename, $lineNumber) - { - if ( ! is_file($filename)) { - return null; - } - - $content = ''; - $lineCnt = 0; - $file = new SplFileObject($filename); - while (!$file->eof()) { - if ($lineCnt++ == $lineNumber) { - break; - } - - $content .= $file->fgets(); - } - - return $content; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php deleted file mode 100644 index 6a01cb4a..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php +++ /dev/null @@ -1,67 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * Interface for annotation readers. - * - * @author Johannes M. Schmitt - */ -interface Reader -{ - /** - * @param \ReflectionClass $class - * @return mixed - */ - function getClassAnnotations(\ReflectionClass $class); - - /** - * @param \ReflectionClass $class - * @param string $annotationName - * @return mixed - */ - function getClassAnnotation(\ReflectionClass $class, $annotationName); - - /** - * @param \ReflectionMethod $method - * @return mixed - */ - function getMethodAnnotations(\ReflectionMethod $method); - - /** - * @param \ReflectionMethod $method - * @param string $annotationName - * @return mixed - */ - function getMethodAnnotation(\ReflectionMethod $method, $annotationName); - - /** - * @param \ReflectionProperty $property - * @return mixed - */ - function getPropertyAnnotations(\ReflectionProperty $property); - - /** - * @param \ReflectionProperty $property - * @param string $annotationName - * @return mixed - */ - function getPropertyAnnotation(\ReflectionProperty $property, $annotationName); -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php deleted file mode 100644 index 4210d901..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php +++ /dev/null @@ -1,157 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -use Doctrine\Common\Annotations\Annotation\Target; - -/** - * Simple Annotation Reader. - * - * This annotation reader is intended to be used in projects where you have - * full-control over all annotations that are available. - * - * @since 2.2 - * @author Johannes M. Schmitt - * @author Fabio B. Silva - */ -class SimpleAnnotationReader implements Reader -{ - /** - * @var DocParser - */ - private $parser; - - /** - * Constructor. - * - * Initializes a new SimpleAnnotationReader. - */ - public function __construct() - { - $this->parser = new DocParser(); - $this->parser->setIgnoreNotImportedAnnotations(true); - } - - /** - * Adds a namespace in which we will look for annotations. - * - * @param string $namespace - */ - public function addNamespace($namespace) - { - $this->parser->addNamespace($namespace); - } - - /** - * Gets the annotations applied to a class. - * - * @param \ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * - * @return array An array of Annotations. - */ - public function getClassAnnotations(\ReflectionClass $class) - { - return $this->parser->parse($class->getDocComment(), 'class '.$class->getName()); - } - - /** - * Gets the annotations applied to a method. - * - * @param \ReflectionMethod $method The ReflectionMethod of the method from which - * the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getMethodAnnotations(\ReflectionMethod $method) - { - return $this->parser->parse($method->getDocComment(), 'method '.$method->getDeclaringClass()->name.'::'.$method->getName().'()'); - } - - /** - * Gets the annotations applied to a property. - * - * @param \ReflectionProperty $property The ReflectionProperty of the property - * from which the annotations should be read. - * - * @return array An array of Annotations. - */ - public function getPropertyAnnotations(\ReflectionProperty $property) - { - return $this->parser->parse($property->getDocComment(), 'property '.$property->getDeclaringClass()->name.'::$'.$property->getName()); - } - - /** - * Gets a class annotation. - * - * @param \ReflectionClass $class The ReflectionClass of the class from which - * the class annotations should be read. - * @param string $annotationName The name of the annotation. - * - * @return mixed The Annotation or NULL, if the requested annotation does not exist. - */ - public function getClassAnnotation(\ReflectionClass $class, $annotationName) - { - foreach ($this->getClassAnnotations($class) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * Gets a method annotation. - * - * @param \ReflectionMethod $method - * @param string $annotationName The name of the annotation. - * - * @return mixed The Annotation or NULL, if the requested annotation does not exist. - */ - public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) - { - foreach ($this->getMethodAnnotations($method) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } - - /** - * Gets a property annotation. - * - * @param \ReflectionProperty $property - * @param string $annotationName The name of the annotation. - * @return mixed The Annotation or NULL, if the requested annotation does not exist. - */ - public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) - { - foreach ($this->getPropertyAnnotations($property) as $annot) { - if ($annot instanceof $annotationName) { - return $annot; - } - } - - return null; - } -} diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php deleted file mode 100644 index a1ef1154..00000000 --- a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php +++ /dev/null @@ -1,175 +0,0 @@ -. - */ - -namespace Doctrine\Common\Annotations; - -/** - * Parses a file for namespaces/use/class declarations. - * - * @author Fabien Potencier - * @author Christian Kaps - */ -class TokenParser -{ - /** - * The token list. - * - * @var array - */ - private $tokens; - - /** - * The number of tokens. - * - * @var int - */ - private $numTokens = 0; - - /** - * The current array pointer. - * - * @var int - */ - private $pointer = 0; - - public function __construct($contents) - { - $this->tokens = token_get_all($contents); - $this->numTokens = count($this->tokens); - $this->pointer = 0; - } - - /** - * Gets the next non whitespace and non comment token. - * - * @param $docCommentIsComment - * If TRUE then a doc comment is considered a comment and skipped. - * If FALSE then only whitespace and normal comments are skipped. - * - * @return array The token if exists, null otherwise. - */ - public function next($docCommentIsComment = TRUE) - { - for ($i = $this->pointer; $i < $this->numTokens; $i++) { - $this->pointer++; - if ($this->tokens[$i][0] === T_WHITESPACE || - $this->tokens[$i][0] === T_COMMENT || - ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT)) { - - continue; - } - - return $this->tokens[$i]; - } - - return null; - } - - /** - * Parse a single use statement. - * - * @return array A list with all found class names for a use statement. - */ - public function parseUseStatement() - { - $class = ''; - $alias = ''; - $statements = array(); - $explicitAlias = false; - while (($token = $this->next())) { - $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR; - if (!$explicitAlias && $isNameToken) { - $class .= $token[1]; - $alias = $token[1]; - } else if ($explicitAlias && $isNameToken) { - $alias .= $token[1]; - } else if ($token[0] === T_AS) { - $explicitAlias = true; - $alias = ''; - } else if ($token === ',') { - $statements[strtolower($alias)] = $class; - $class = ''; - $alias = ''; - $explicitAlias = false; - } else if ($token === ';') { - $statements[strtolower($alias)] = $class; - break; - } else { - break; - } - } - - return $statements; - } - - /** - * Get all use statements. - * - * @param string $namespaceName The namespace name of the reflected class. - * @return array A list with all found use statements. - */ - public function parseUseStatements($namespaceName) - { - $statements = array(); - while (($token = $this->next())) { - if ($token[0] === T_USE) { - $statements = array_merge($statements, $this->parseUseStatement()); - continue; - } - if ($token[0] !== T_NAMESPACE || $this->parseNamespace() != $namespaceName) { - continue; - } - - // Get fresh array for new namespace. This is to prevent the parser to collect the use statements - // for a previous namespace with the same name. This is the case if a namespace is defined twice - // or if a namespace with the same name is commented out. - $statements = array(); - } - - return $statements; - } - - /** - * Get the namespace. - * - * @return string The found namespace. - */ - public function parseNamespace() - { - $name = ''; - while (($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR)) { - $name .= $token[1]; - } - - return $name; - } - - /** - * Get the class name. - * - * @return string The foundclass name. - */ - public function parseClass() - { - // Namespaces and class names are tokenized the same: T_STRINGs - // separated by T_NS_SEPARATOR so we can use one function to provide - // both. - return $this->parseNamespace(); - } -} diff --git a/vendor/doctrine/annotations/phpunit.xml.dist b/vendor/doctrine/annotations/phpunit.xml.dist deleted file mode 100644 index 6ab0c8c8..00000000 --- a/vendor/doctrine/annotations/phpunit.xml.dist +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - ./tests/Doctrine/ - - - - - - ./lib/Doctrine/ - - - - - - performance - - - diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php deleted file mode 100644 index ea52b02e..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php +++ /dev/null @@ -1,571 +0,0 @@ -getReflectionClass(); - $reader = $this->getReader(); - - $this->assertEquals(1, count($reader->getClassAnnotations($class))); - $this->assertInstanceOf($annotName = 'Doctrine\Tests\Common\Annotations\DummyAnnotation', $annot = $reader->getClassAnnotation($class, $annotName)); - $this->assertEquals("hello", $annot->dummyValue); - - $field1Prop = $class->getProperty('field1'); - $propAnnots = $reader->getPropertyAnnotations($field1Prop); - $this->assertEquals(1, count($propAnnots)); - $this->assertInstanceOf($annotName, $annot = $reader->getPropertyAnnotation($field1Prop, $annotName)); - $this->assertEquals("fieldHello", $annot->dummyValue); - - $getField1Method = $class->getMethod('getField1'); - $methodAnnots = $reader->getMethodAnnotations($getField1Method); - $this->assertEquals(1, count($methodAnnots)); - $this->assertInstanceOf($annotName, $annot = $reader->getMethodAnnotation($getField1Method, $annotName)); - $this->assertEquals(array(1, 2, "three"), $annot->value); - - $field2Prop = $class->getProperty('field2'); - $propAnnots = $reader->getPropertyAnnotations($field2Prop); - $this->assertEquals(1, count($propAnnots)); - $this->assertInstanceOf($annotName = 'Doctrine\Tests\Common\Annotations\DummyJoinTable', $joinTableAnnot = $reader->getPropertyAnnotation($field2Prop, $annotName)); - $this->assertEquals(1, count($joinTableAnnot->joinColumns)); - $this->assertEquals(1, count($joinTableAnnot->inverseJoinColumns)); - $this->assertTrue($joinTableAnnot->joinColumns[0] instanceof DummyJoinColumn); - $this->assertTrue($joinTableAnnot->inverseJoinColumns[0] instanceof DummyJoinColumn); - $this->assertEquals('col1', $joinTableAnnot->joinColumns[0]->name); - $this->assertEquals('col2', $joinTableAnnot->joinColumns[0]->referencedColumnName); - $this->assertEquals('col3', $joinTableAnnot->inverseJoinColumns[0]->name); - $this->assertEquals('col4', $joinTableAnnot->inverseJoinColumns[0]->referencedColumnName); - - $dummyAnnot = $reader->getMethodAnnotation($class->getMethod('getField1'), 'Doctrine\Tests\Common\Annotations\DummyAnnotation'); - $this->assertEquals('', $dummyAnnot->dummyValue); - $this->assertEquals(array(1, 2, 'three'), $dummyAnnot->value); - - $dummyAnnot = $reader->getPropertyAnnotation($class->getProperty('field1'), 'Doctrine\Tests\Common\Annotations\DummyAnnotation'); - $this->assertEquals('fieldHello', $dummyAnnot->dummyValue); - - $classAnnot = $reader->getClassAnnotation($class, 'Doctrine\Tests\Common\Annotations\DummyAnnotation'); - $this->assertEquals('hello', $classAnnot->dummyValue); - } - - public function testAnnotationsWithValidTargets() - { - $reader = $this->getReader(); - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithValidAnnotationTarget'); - - $this->assertEquals(1,count($reader->getClassAnnotations($class))); - $this->assertEquals(1,count($reader->getPropertyAnnotations($class->getProperty('foo')))); - $this->assertEquals(1,count($reader->getMethodAnnotations($class->getMethod('someFunction')))); - $this->assertEquals(1,count($reader->getPropertyAnnotations($class->getProperty('nested')))); - } - - public function testAnnotationsWithVarType() - { - $reader = $this->getReader(); - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithVarType'); - - $this->assertEquals(1,count($fooAnnot = $reader->getPropertyAnnotations($class->getProperty('foo')))); - $this->assertEquals(1,count($barAnnot = $reader->getMethodAnnotations($class->getMethod('bar')))); - - $this->assertInternalType('string', $fooAnnot[0]->string); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', $barAnnot[0]->annotation); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetPropertyMethod is not allowed to be declared on class Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtClass. You may only use this annotation on these code elements: METHOD, PROPERTY - */ - public function testClassWithInvalidAnnotationTargetAtClassDocBlock() - { - $reader = $this->getReader(); - $reader->getClassAnnotations(new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtClass')); - } - - public function testClassWithWithInclude() - { - $reader = $this->getReader(); - $annots = $reader->getClassAnnotations(new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithRequire')); - $this->assertCount(1, $annots); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetClass is not allowed to be declared on property Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtProperty::$foo. You may only use this annotation on these code elements: CLASS - */ - public function testClassWithInvalidAnnotationTargetAtPropertyDocBlock() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtProperty', 'foo')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetAnnotation is not allowed to be declared on property Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtProperty::$bar. You may only use this annotation on these code elements: ANNOTATION - */ - public function testClassWithInvalidNestedAnnotationTargetAtPropertyDocBlock() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtProperty', 'bar')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetClass is not allowed to be declared on method Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtMethod::functionName(). You may only use this annotation on these code elements: CLASS - */ - public function testClassWithInvalidAnnotationTargetAtMethodDocBlock() - { - $reader = $this->getReader(); - $reader->getMethodAnnotations(new \ReflectionMethod('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtMethod', 'functionName')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError. - */ - public function testClassWithAnnotationWithTargetSyntaxErrorAtClassDocBlock() - { - $reader = $this->getReader(); - $reader->getClassAnnotations(new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithTargetSyntaxError')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError. - */ - public function testClassWithAnnotationWithTargetSyntaxErrorAtPropertyDocBlock() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithTargetSyntaxError','foo')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError. - */ - public function testClassWithAnnotationWithTargetSyntaxErrorAtMethodDocBlock() - { - $reader = $this->getReader(); - $reader->getMethodAnnotations(new \ReflectionMethod('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithTargetSyntaxError','bar')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Type Error] Attribute "string" of @AnnotationWithVarType declared on property Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithVarType::$invalidProperty expects a(n) string, but got integer. - */ - public function testClassWithPropertyInvalidVarTypeError() - { - $reader = $this->getReader(); - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithVarType'); - - $reader->getPropertyAnnotations($class->getProperty('invalidProperty')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Type Error] Attribute "annotation" of @AnnotationWithVarType declared on method Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithVarType::invalidMethod() expects a(n) Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll, but got an instance of Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation. - */ - public function testClassWithMethodInvalidVarTypeError() - { - $reader = $this->getReader(); - $class = new ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationWithVarType'); - - $reader->getMethodAnnotations($class->getMethod('invalidMethod')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 18 in class Doctrine\Tests\Common\Annotations\DummyClassSyntaxError. - */ - public function testClassSyntaxErrorContext() - { - $reader = $this->getReader(); - $reader->getClassAnnotations(new \ReflectionClass('Doctrine\Tests\Common\Annotations\DummyClassSyntaxError')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 18 in method Doctrine\Tests\Common\Annotations\DummyClassMethodSyntaxError::foo(). - */ - public function testMethodSyntaxErrorContext() - { - $reader = $this->getReader(); - $reader->getMethodAnnotations(new \ReflectionMethod('Doctrine\Tests\Common\Annotations\DummyClassMethodSyntaxError', 'foo')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 18 in property Doctrine\Tests\Common\Annotations\DummyClassPropertySyntaxError::$foo. - */ - public function testPropertySyntaxErrorContext() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\DummyClassPropertySyntaxError', 'foo')); - } - - /** - * @group regression - */ - public function testMultipleAnnotationsOnSameLine() - { - $reader = $this->getReader(); - $annots = $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\DummyClass2', 'id')); - $this->assertEquals(3, count($annots)); - } - - public function testNonAnnotationProblem() - { - $reader = $this->getReader(); - - $this->assertNotNull($annot = $reader->getPropertyAnnotation(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\DummyClassNonAnnotationProblem', 'foo'), $name = 'Doctrine\Tests\Common\Annotations\DummyAnnotation')); - $this->assertInstanceOf($name, $annot); - } - - public function testImportWithConcreteAnnotation() - { - $reader = $this->getReader(); - $property = new \ReflectionProperty('Doctrine\Tests\Common\Annotations\TestImportWithConcreteAnnotation', 'field'); - $annotations = $reader->getPropertyAnnotations($property); - $this->assertEquals(1, count($annotations)); - $this->assertNotNull($reader->getPropertyAnnotation($property, 'Doctrine\Tests\Common\Annotations\DummyAnnotation')); - } - - public function testImportWithInheritance() - { - $reader = $this->getReader(); - - $class = new TestParentClass(); - $ref = new \ReflectionClass($class); - - $childAnnotations = $reader->getPropertyAnnotations($ref->getProperty('child')); - $this->assertEquals(1, count($childAnnotations)); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Foo\Name', reset($childAnnotations)); - - $parentAnnotations = $reader->getPropertyAnnotations($ref->getProperty('parent')); - $this->assertEquals(1, count($parentAnnotations)); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Bar\Name', reset($parentAnnotations)); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage The annotation "@NameFoo" in property Doctrine\Tests\Common\Annotations\TestAnnotationNotImportedClass::$field was never imported. - */ - public function testImportDetectsNotImportedAnnotation() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\TestAnnotationNotImportedClass', 'field')); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage The annotation "@Foo\Bar\Name" in property Doctrine\Tests\Common\Annotations\TestNonExistentAnnotationClass::$field was never imported. - */ - public function testImportDetectsNonExistentAnnotation() - { - $reader = $this->getReader(); - $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\TestNonExistentAnnotationClass', 'field')); - } - - public function testTopLevelAnnotation() - { - $reader = $this->getReader(); - $annotations = $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\TestTopLevelAnnotationClass', 'field')); - - $this->assertEquals(1, count($annotations)); - $this->assertInstanceOf('\TopLevelAnnotation', reset($annotations)); - } - - public function testIgnoresAnnotationsNotPrefixedWithWhitespace() - { - $reader = $this->getReader(); - - $annotation = $reader->getClassAnnotation(new \ReflectionClass(new TestIgnoresNonAnnotationsClass()), 'Doctrine\Tests\Common\Annotations\Name'); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Name', $annotation); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage The class "Doctrine\Tests\Common\Annotations\Fixtures\NoAnnotation" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "Doctrine\Tests\Common\Annotations\Fixtures\NoAnnotation". If it is indeed no annotation, then you need to add @IgnoreAnnotation("NoAnnotation") to the _class_ doc comment of class Doctrine\Tests\Common\Annotations\Fixtures\InvalidAnnotationUsageClass. - */ - public function testErrorWhenInvalidAnnotationIsUsed() - { - $reader = $this->getReader(); - $ref = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\InvalidAnnotationUsageClass'); - $reader->getClassAnnotations($ref); - } - - public function testInvalidAnnotationUsageButIgnoredClass() - { - $reader = $this->getReader(); - $ref = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\InvalidAnnotationUsageButIgnoredClass'); - $annots = $reader->getClassAnnotations($ref); - - $this->assertEquals(2, count($annots)); - } - - /** - * @group DDC-1660 - * @group regression - */ - public function testInvalidAnnotationButIgnored() - { - $reader = $this->getReader(); - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassDDC1660'); - - $this->assertTrue(class_exists('Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Version')); - $this->assertCount(0, $reader->getClassAnnotations($class)); - $this->assertCount(0, $reader->getMethodAnnotations($class->getMethod('bar'))); - $this->assertCount(0, $reader->getPropertyAnnotations($class->getProperty('foo'))); - } - - public function testAnnotationEnumeratorException() - { - $reader = $this->getReader(); - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationEnum'); - - $this->assertCount(1, $bar = $reader->getMethodAnnotations($class->getMethod('bar'))); - $this->assertCount(1, $foo = $reader->getPropertyAnnotations($class->getProperty('foo'))); - - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum', $bar[0]); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum', $foo[0]); - - try { - $reader->getPropertyAnnotations($class->getProperty('invalidProperty')); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertEquals('[Enum Error] Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum declared on property Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationEnum::$invalidProperty accept only [ONE, TWO, THREE], but got FOUR.', $exc->getMessage()); - } - - try { - $reader->getMethodAnnotations($class->getMethod('invalidMethod')); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertEquals('[Enum Error] Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum declared on method Doctrine\Tests\Common\Annotations\Fixtures\ClassWithAnnotationEnum::invalidMethod() accept only [ONE, TWO, THREE], but got 5.', $exc->getMessage()); - } - } - - /** - * @group DCOM-106 - */ - public function testIgnoreFixMeAndUpperCaseToDo() - { - $reader = $this->getReader(); - $ref = new \ReflectionClass('Doctrine\Tests\Common\Annotations\DCOM106'); - $reader->getClassAnnotations($ref); - } - - /** - * @return AnnotationReader - */ - abstract protected function getReader(); -} - -/** - * @parseAnnotation("var") - * @author Johannes M. Schmitt - * - */ -class TestParseAnnotationClass -{ - /** - * @var - */ - private $field; -} - -/** - * @Name - * @author Johannes M. Schmitt - */ -class TestIgnoresNonAnnotationsClass -{ -} - -class TestTopLevelAnnotationClass -{ - /** - * @\TopLevelAnnotation - */ - private $field; -} - -class TestNonExistentAnnotationClass -{ - /** - * @Foo\Bar\Name - */ - private $field; -} - -class TestAnnotationNotImportedClass -{ - /** - * @NameFoo - */ - private $field; -} - -class TestChildClass -{ - /** - * @\Doctrine\Tests\Common\Annotations\Foo\Name(name = "foo") - */ - protected $child; -} - -class TestParentClass extends TestChildClass -{ - /** - * @\Doctrine\Tests\Common\Annotations\Bar\Name(name = "bar") - */ - private $parent; -} - -class TestImportWithConcreteAnnotation -{ - /** - * @DummyAnnotation(dummyValue = "bar") - */ - private $field; -} - -/** - * @ignoreAnnotation("var") - */ -class DummyClass2 { - /** - * @DummyId @DummyColumn(type="integer") @DummyGeneratedValue - * @var integer - */ - private $id; -} - -/** @Annotation */ -class DummyId extends \Doctrine\Common\Annotations\Annotation {} -/** @Annotation */ -class DummyColumn extends \Doctrine\Common\Annotations\Annotation { - public $type; -} -/** @Annotation */ -class DummyGeneratedValue extends \Doctrine\Common\Annotations\Annotation {} -/** @Annotation */ -class DummyAnnotation extends \Doctrine\Common\Annotations\Annotation { - public $dummyValue; -} - -/** - * @api - * @Annotation - */ -class DummyAnnotationWithIgnoredAnnotation extends \Doctrine\Common\Annotations\Annotation { - public $dummyValue; -} - -/** @Annotation */ -class DummyJoinColumn extends \Doctrine\Common\Annotations\Annotation { - public $name; - public $referencedColumnName; -} -/** @Annotation */ -class DummyJoinTable extends \Doctrine\Common\Annotations\Annotation { - public $name; - public $joinColumns; - public $inverseJoinColumns; -} - -/** - * @DummyAnnotation(@) - */ -class DummyClassSyntaxError -{ - -} - -class DummyClassMethodSyntaxError -{ - /** - * @DummyAnnotation(@) - */ - public function foo() - { - - } -} - -class DummyClassPropertySyntaxError -{ - /** - * @DummyAnnotation(@) - */ - public $foo; -} - -/** - * @ignoreAnnotation({"since", "var"}) - */ -class DummyClassNonAnnotationProblem -{ - /** - * @DummyAnnotation - * - * @var \Test - * @since 0.1 - */ - public $foo; -} - - -/** -* @DummyAnnotation Foo bar -*/ -class DummyClassWithEmail -{ - -} - - -/** - * @fixme public - * @TODO - */ -class DCOM106 -{ - -} - -namespace Doctrine\Tests\Common\Annotations\Foo; - -/** @Annotation */ -class Name extends \Doctrine\Common\Annotations\Annotation -{ - public $name; -} - -namespace Doctrine\Tests\Common\Annotations\Bar; - -/** @Annotation */ -class Name extends \Doctrine\Common\Annotations\Annotation -{ - public $name; -} diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php deleted file mode 100644 index d2cc6678..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/AnnotationReaderTest.php +++ /dev/null @@ -1,13 +0,0 @@ -getMock('Doctrine\Common\Cache\Cache'); - $cache - ->expects($this->at(0)) - ->method('fetch') - ->with($this->equalTo($cacheKey)) - ->will($this->returnValue(array())) - ; - $cache - ->expects($this->at(1)) - ->method('fetch') - ->with($this->equalTo('[C]'.$cacheKey)) - ->will($this->returnValue(time() - 10)) - ; - $cache - ->expects($this->at(2)) - ->method('save') - ->with($this->equalTo($cacheKey)) - ; - $cache - ->expects($this->at(3)) - ->method('save') - ->with($this->equalTo('[C]'.$cacheKey)) - ; - - $reader = new CachedReader(new AnnotationReader(), $cache, true); - $route = new Route(); - $route->pattern = '/someprefix'; - $this->assertEquals(array($route), $reader->getClassAnnotations(new \ReflectionClass($name))); - } - - protected function getReader() - { - $this->cache = new ArrayCache(); - return new CachedReader(new AnnotationReader(), $this->cache); - } -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php deleted file mode 100644 index 03a55c80..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php +++ /dev/null @@ -1,137 +0,0 @@ -setInput("@Name"); - $this->assertNull($lexer->token); - $this->assertNull($lexer->lookahead); - - $this->assertTrue($lexer->moveNext()); - $this->assertNull($lexer->token); - $this->assertEquals('@', $lexer->lookahead['value']); - - $this->assertTrue($lexer->moveNext()); - $this->assertEquals('@', $lexer->token['value']); - $this->assertEquals('Name', $lexer->lookahead['value']); - - $this->assertFalse($lexer->moveNext()); - } - - public function testScannerTokenizesDocBlockWhitConstants() - { - $lexer = new DocLexer(); - $docblock = '@AnnotationWithConstants(PHP_EOL, ClassWithConstants::SOME_VALUE, \Doctrine\Tests\Common\Annotations\Fixtures\IntefaceWithConstants::SOME_VALUE)'; - - $tokens = array ( - array( - 'value' => '@', - 'position' => 0, - 'type' => DocLexer::T_AT, - ), - array( - 'value' => 'AnnotationWithConstants', - 'position' => 1, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => '(', - 'position' => 24, - 'type' => DocLexer::T_OPEN_PARENTHESIS, - ), - array( - 'value' => 'PHP_EOL', - 'position' => 25, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => ',', - 'position' => 32, - 'type' => DocLexer::T_COMMA, - ), - array( - 'value' => 'ClassWithConstants::SOME_VALUE', - 'position' => 34, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => ',', - 'position' => 64, - 'type' => DocLexer::T_COMMA, - ), - array( - 'value' => '\\Doctrine\\Tests\\Common\\Annotations\\Fixtures\\IntefaceWithConstants::SOME_VALUE', - 'position' => 66, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => ')', - 'position' => 143, - 'type' => DocLexer::T_CLOSE_PARENTHESIS, - ) - - ); - - $lexer->setInput($docblock); - - foreach ($tokens as $expected) { - $lexer->moveNext(); - $lookahead = $lexer->lookahead; - $this->assertEquals($expected['value'], $lookahead['value']); - $this->assertEquals($expected['type'], $lookahead['type']); - $this->assertEquals($expected['position'], $lookahead['position']); - } - - $this->assertFalse($lexer->moveNext()); - } - - - public function testScannerTokenizesDocBlockWhitInvalidIdentifier() - { - $lexer = new DocLexer(); - $docblock = '@Foo\3.42'; - - $tokens = array ( - array( - 'value' => '@', - 'position' => 0, - 'type' => DocLexer::T_AT, - ), - array( - 'value' => 'Foo', - 'position' => 1, - 'type' => DocLexer::T_IDENTIFIER, - ), - array( - 'value' => '\\', - 'position' => 4, - 'type' => DocLexer::T_NAMESPACE_SEPARATOR, - ), - array( - 'value' => 3.42, - 'position' => 5, - 'type' => DocLexer::T_FLOAT, - ) - ); - - $lexer->setInput($docblock); - - foreach ($tokens as $expected) { - $lexer->moveNext(); - $lookahead = $lexer->lookahead; - $this->assertEquals($expected['value'], $lookahead['value']); - $this->assertEquals($expected['type'], $lookahead['type']); - $this->assertEquals($expected['position'], $lookahead['position']); - } - - $this->assertFalse($lexer->moveNext()); - } - -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php deleted file mode 100644 index 86a36953..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php +++ /dev/null @@ -1,1264 +0,0 @@ -createTestParser(); - - // Nested arrays with nested annotations - $result = $parser->parse('@Name(foo={1,2, {"key"=@Name}})'); - $annot = $result[0]; - - $this->assertTrue($annot instanceof Name); - $this->assertNull($annot->value); - $this->assertEquals(3, count($annot->foo)); - $this->assertEquals(1, $annot->foo[0]); - $this->assertEquals(2, $annot->foo[1]); - $this->assertTrue(is_array($annot->foo[2])); - - $nestedArray = $annot->foo[2]; - $this->assertTrue(isset($nestedArray['key'])); - $this->assertTrue($nestedArray['key'] instanceof Name); - } - - public function testBasicAnnotations() - { - $parser = $this->createTestParser(); - - // Marker annotation - $result = $parser->parse("@Name"); - $annot = $result[0]; - $this->assertTrue($annot instanceof Name); - $this->assertNull($annot->value); - $this->assertNull($annot->foo); - - // Associative arrays - $result = $parser->parse('@Name(foo={"key1" = "value1"})'); - $annot = $result[0]; - $this->assertNull($annot->value); - $this->assertTrue(is_array($annot->foo)); - $this->assertTrue(isset($annot->foo['key1'])); - - // Numerical arrays - $result = $parser->parse('@Name({2="foo", 4="bar"})'); - $annot = $result[0]; - $this->assertTrue(is_array($annot->value)); - $this->assertEquals('foo', $annot->value[2]); - $this->assertEquals('bar', $annot->value[4]); - $this->assertFalse(isset($annot->value[0])); - $this->assertFalse(isset($annot->value[1])); - $this->assertFalse(isset($annot->value[3])); - - // Multiple values - $result = $parser->parse('@Name(@Name, @Name)'); - $annot = $result[0]; - - $this->assertTrue($annot instanceof Name); - $this->assertTrue(is_array($annot->value)); - $this->assertTrue($annot->value[0] instanceof Name); - $this->assertTrue($annot->value[1] instanceof Name); - - // Multiple types as values - $result = $parser->parse('@Name(foo="Bar", @Name, {"key1"="value1", "key2"="value2"})'); - $annot = $result[0]; - - $this->assertTrue($annot instanceof Name); - $this->assertTrue(is_array($annot->value)); - $this->assertTrue($annot->value[0] instanceof Name); - $this->assertTrue(is_array($annot->value[1])); - $this->assertEquals('value1', $annot->value[1]['key1']); - $this->assertEquals('value2', $annot->value[1]['key2']); - - // Complete docblock - $docblock = <<parse($docblock); - $this->assertEquals(1, count($result)); - $annot = $result[0]; - $this->assertTrue($annot instanceof Name); - $this->assertEquals("bar", $annot->foo); - $this->assertNull($annot->value); - } - - public function testNamespacedAnnotations() - { - $parser = new DocParser; - $parser->setIgnoreNotImportedAnnotations(true); - - $docblock = << - * @Doctrine\Tests\Common\Annotations\Name(foo="bar") - * @ignore - */ -DOCBLOCK; - - $result = $parser->parse($docblock); - $this->assertEquals(1, count($result)); - $annot = $result[0]; - $this->assertTrue($annot instanceof Name); - $this->assertEquals("bar", $annot->foo); - } - - /** - * @group debug - */ - public function testTypicalMethodDocBlock() - { - $parser = $this->createTestParser(); - - $docblock = <<parse($docblock); - $this->assertEquals(2, count($result)); - $this->assertTrue(isset($result[0])); - $this->assertTrue(isset($result[1])); - $annot = $result[0]; - $this->assertTrue($annot instanceof Name); - $this->assertEquals("bar", $annot->foo); - $marker = $result[1]; - $this->assertTrue($marker instanceof Marker); - } - - - public function testAnnotationWithoutConstructor() - { - $parser = $this->createTestParser(); - - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertNotNull($annot); - $this->assertTrue($annot instanceof SomeAnnotationClassNameWithoutConstructor); - - $this->assertNull($annot->name); - $this->assertNotNull($annot->data); - $this->assertEquals($annot->data, "Some data"); - - - - -$docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertNotNull($annot); - $this->assertTrue($annot instanceof SomeAnnotationClassNameWithoutConstructor); - - $this->assertEquals($annot->name, "Some Name"); - $this->assertEquals($annot->data, "Some data"); - - - - -$docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertEquals($annot->data, "Some data"); - $this->assertNull($annot->name); - - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertEquals($annot->name, "Some name"); - $this->assertNull($annot->data); - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertEquals($annot->data, "Some data"); - $this->assertNull($annot->name); - - - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertEquals($annot->name, "Some name"); - $this->assertEquals($annot->data, "Some data"); - - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $annot = $result[0]; - - $this->assertEquals($annot->name, "Some name"); - $this->assertEquals($annot->data, "Some data"); - - $docblock = <<parse($docblock); - $this->assertEquals(count($result), 1); - $this->assertTrue($result[0] instanceof SomeAnnotationClassNameWithoutConstructorAndProperties); - } - - public function testAnnotationTarget() - { - - $parser = new DocParser; - $parser->setImports(array( - '__NAMESPACE__' => 'Doctrine\Tests\Common\Annotations\Fixtures', - )); - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithValidAnnotationTarget'); - - - $context = 'class ' . $class->getName(); - $docComment = $class->getDocComment(); - - $parser->setTarget(Target::TARGET_CLASS); - $this->assertNotNull($parser->parse($docComment,$context)); - - - $property = $class->getProperty('foo'); - $docComment = $property->getDocComment(); - $context = 'property ' . $class->getName() . "::\$" . $property->getName(); - - $parser->setTarget(Target::TARGET_PROPERTY); - $this->assertNotNull($parser->parse($docComment,$context)); - - - - $method = $class->getMethod('someFunction'); - $docComment = $property->getDocComment(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - - $parser->setTarget(Target::TARGET_METHOD); - $this->assertNotNull($parser->parse($docComment,$context)); - - - try { - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtClass'); - $context = 'class ' . $class->getName(); - $docComment = $class->getDocComment(); - - $parser->setTarget(Target::TARGET_CLASS); - $parser->parse($class->getDocComment(),$context); - - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertNotNull($exc->getMessage()); - } - - - try { - - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtMethod'); - $method = $class->getMethod('functionName'); - $docComment = $method->getDocComment(); - $context = 'method ' . $class->getName() . '::' . $method->getName() . '()'; - - $parser->setTarget(Target::TARGET_METHOD); - $parser->parse($docComment,$context); - - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertNotNull($exc->getMessage()); - } - - - try { - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithInvalidAnnotationTargetAtProperty'); - $property = $class->getProperty('foo'); - $docComment = $property->getDocComment(); - $context = 'property ' . $class->getName() . "::\$" . $property->getName(); - - $parser->setTarget(Target::TARGET_PROPERTY); - $parser->parse($docComment,$context); - - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertNotNull($exc->getMessage()); - } - - } - - public function getAnnotationVarTypeProviderValid() - { - //({attribute name}, {attribute value}) - return array( - // mixed type - array('mixed', '"String Value"'), - array('mixed', 'true'), - array('mixed', 'false'), - array('mixed', '1'), - array('mixed', '1.2'), - array('mixed', '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll'), - - // boolean type - array('boolean', 'true'), - array('boolean', 'false'), - - // alias for internal type boolean - array('bool', 'true'), - array('bool', 'false'), - - // integer type - array('integer', '0'), - array('integer', '1'), - array('integer', '123456789'), - array('integer', '9223372036854775807'), - - // alias for internal type double - array('float', '0.1'), - array('float', '1.2'), - array('float', '123.456'), - - // string type - array('string', '"String Value"'), - array('string', '"true"'), - array('string', '"123"'), - - // array type - array('array', '{@AnnotationExtendsAnnotationTargetAll}'), - array('array', '{@AnnotationExtendsAnnotationTargetAll,@AnnotationExtendsAnnotationTargetAll}'), - - array('arrayOfIntegers', '1'), - array('arrayOfIntegers', '{1}'), - array('arrayOfIntegers', '{1,2,3,4}'), - array('arrayOfAnnotations', '@AnnotationExtendsAnnotationTargetAll'), - array('arrayOfAnnotations', '{@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll}'), - array('arrayOfAnnotations', '{@AnnotationExtendsAnnotationTargetAll, @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll}'), - - // annotation instance - array('annotation', '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll'), - array('annotation', '@AnnotationExtendsAnnotationTargetAll'), - ); - } - - public function getAnnotationVarTypeProviderInvalid() - { - //({attribute name}, {type declared type}, {attribute value} , {given type or class}) - return array( - // boolean type - array('boolean','boolean','1','integer'), - array('boolean','boolean','1.2','double'), - array('boolean','boolean','"str"','string'), - array('boolean','boolean','{1,2,3}','array'), - array('boolean','boolean','@Name', 'an instance of Doctrine\Tests\Common\Annotations\Name'), - - // alias for internal type boolean - array('bool','bool', '1','integer'), - array('bool','bool', '1.2','double'), - array('bool','bool', '"str"','string'), - array('bool','bool', '{"str"}','array'), - - // integer type - array('integer','integer', 'true','boolean'), - array('integer','integer', 'false','boolean'), - array('integer','integer', '1.2','double'), - array('integer','integer', '"str"','string'), - array('integer','integer', '{"str"}','array'), - array('integer','integer', '{1,2,3,4}','array'), - - // alias for internal type double - array('float','float', 'true','boolean'), - array('float','float', 'false','boolean'), - array('float','float', '123','integer'), - array('float','float', '"str"','string'), - array('float','float', '{"str"}','array'), - array('float','float', '{12.34}','array'), - array('float','float', '{1,2,3}','array'), - - // string type - array('string','string', 'true','boolean'), - array('string','string', 'false','boolean'), - array('string','string', '12','integer'), - array('string','string', '1.2','double'), - array('string','string', '{"str"}','array'), - array('string','string', '{1,2,3,4}','array'), - - // annotation instance - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', 'true','boolean'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', 'false','boolean'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '12','integer'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '1.2','double'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{"str"}','array'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{1,2,3,4}','array'), - array('annotation','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '@Name','an instance of Doctrine\Tests\Common\Annotations\Name'), - ); - } - - public function getAnnotationVarTypeArrayProviderInvalid() - { - //({attribute name}, {type declared type}, {attribute value} , {given type or class}) - return array( - array('arrayOfIntegers','integer', 'true','boolean'), - array('arrayOfIntegers','integer', 'false','boolean'), - array('arrayOfIntegers','integer', '{true,true}','boolean'), - array('arrayOfIntegers','integer', '{1,true}','boolean'), - array('arrayOfIntegers','integer', '{1,2,1.2}','double'), - array('arrayOfIntegers','integer', '{1,2,"str"}','string'), - - - array('arrayOfAnnotations','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', 'true','boolean'), - array('arrayOfAnnotations','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', 'false','boolean'), - array('arrayOfAnnotations','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll,true}','boolean'), - array('arrayOfAnnotations','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll,true}','boolean'), - array('arrayOfAnnotations','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll,1.2}','double'), - array('arrayOfAnnotations','Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll', '{@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll,@AnnotationExtendsAnnotationTargetAll,"str"}','string'), - ); - } - - /** - * @dataProvider getAnnotationVarTypeProviderValid - */ - public function testAnnotationWithVarType($attribute, $value) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::$invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - $result = $parser->parse($docblock, $context); - - $this->assertTrue(sizeof($result) === 1); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType', $result[0]); - $this->assertNotNull($result[0]->$attribute); - } - - /** - * @dataProvider getAnnotationVarTypeProviderInvalid - */ - public function testAnnotationWithVarTypeError($attribute,$type,$value,$given) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - try { - $parser->parse($docblock, $context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains("[Type Error] Attribute \"$attribute\" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType declared on property SomeClassName::invalidProperty. expects a(n) $type, but got $given.", $exc->getMessage()); - } - } - - - /** - * @dataProvider getAnnotationVarTypeArrayProviderInvalid - */ - public function testAnnotationWithVarTypeArrayError($attribute,$type,$value,$given) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - try { - $parser->parse($docblock, $context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains("[Type Error] Attribute \"$attribute\" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithVarType declared on property SomeClassName::invalidProperty. expects either a(n) $type, or an array of {$type}s, but got $given.", $exc->getMessage()); - } - } - - /** - * @dataProvider getAnnotationVarTypeProviderValid - */ - public function testAnnotationWithAttributes($attribute, $value) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::$invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - $result = $parser->parse($docblock, $context); - - $this->assertTrue(sizeof($result) === 1); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes', $result[0]); - $getter = "get".ucfirst($attribute); - $this->assertNotNull($result[0]->$getter()); - } - - /** - * @dataProvider getAnnotationVarTypeProviderInvalid - */ - public function testAnnotationWithAttributesError($attribute,$type,$value,$given) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - try { - $parser->parse($docblock, $context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains("[Type Error] Attribute \"$attribute\" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes declared on property SomeClassName::invalidProperty. expects a(n) $type, but got $given.", $exc->getMessage()); - } - } - - - /** - * @dataProvider getAnnotationVarTypeArrayProviderInvalid - */ - public function testAnnotationWithAttributesWithVarTypeArrayError($attribute,$type,$value,$given) - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = sprintf('@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes(%s = %s)',$attribute, $value); - $parser->setTarget(Target::TARGET_PROPERTY); - - try { - $parser->parse($docblock, $context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains("[Type Error] Attribute \"$attribute\" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithAttributes declared on property SomeClassName::invalidProperty. expects either a(n) $type, or an array of {$type}s, but got $given.", $exc->getMessage()); - } - } - - public function testAnnotationWithRequiredAttributes() - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $parser->setTarget(Target::TARGET_PROPERTY); - - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes("Some Value", annot = @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation)'; - $result = $parser->parse($docblock); - - $this->assertTrue(sizeof($result) === 1); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes', $result[0]); - $this->assertEquals("Some Value",$result[0]->getValue()); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation', $result[0]->getAnnot()); - - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes("Some Value")'; - try { - $result = $parser->parse($docblock,$context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains('Attribute "annot" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes declared on property SomeClassName::invalidProperty. expects a(n) Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation. This value should not be null.', $exc->getMessage()); - } - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes(annot = @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation)'; - try { - $result = $parser->parse($docblock,$context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains('Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributes declared on property SomeClassName::invalidProperty. expects a(n) string. This value should not be null.', $exc->getMessage()); - } - - } - - public function testAnnotationWithRequiredAttributesWithoutContructor() - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $parser->setTarget(Target::TARGET_PROPERTY); - - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor("Some Value", annot = @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation)'; - $result = $parser->parse($docblock); - - $this->assertTrue(sizeof($result) === 1); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor', $result[0]); - $this->assertEquals("Some Value", $result[0]->value); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation', $result[0]->annot); - - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor("Some Value")'; - try { - $result = $parser->parse($docblock,$context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains('Attribute "annot" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor declared on property SomeClassName::invalidProperty. expects a(n) Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation. This value should not be null.', $exc->getMessage()); - } - - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor(annot = @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation)'; - try { - $result = $parser->parse($docblock,$context); - $this->fail(); - } catch (\Doctrine\Common\Annotations\AnnotationException $exc) { - $this->assertContains('Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithRequiredAttributesWithoutContructor declared on property SomeClassName::invalidProperty. expects a(n) string. This value should not be null.', $exc->getMessage()); - } - - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum declared on property SomeClassName::invalidProperty. accept only [ONE, TWO, THREE], but got FOUR. - */ - public function testAnnotationEnumeratorException() - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnum("FOUR")'; - - $parser->setIgnoreNotImportedAnnotations(false); - $parser->setTarget(Target::TARGET_PROPERTY); - $parser->parse($docblock, $context); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Attribute "value" of @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnumLiteral declared on property SomeClassName::invalidProperty. accept only [AnnotationEnumLiteral::ONE, AnnotationEnumLiteral::TWO, AnnotationEnumLiteral::THREE], but got 4. - */ - public function testAnnotationEnumeratorLiteralException() - { - $parser = $this->createTestParser(); - $context = 'property SomeClassName::invalidProperty.'; - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnumLiteral(4)'; - - $parser->setIgnoreNotImportedAnnotations(false); - $parser->setTarget(Target::TARGET_PROPERTY); - $parser->parse($docblock, $context); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage @Enum supports only scalar values "array" given. - */ - public function testAnnotationEnumInvalidTypeDeclarationException() - { - $parser = $this->createTestParser(); - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnumInvalid("foo")'; - - $parser->setIgnoreNotImportedAnnotations(false); - $parser->parse($docblock); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Undefined enumerator value "3" for literal "AnnotationEnumLiteral::THREE". - */ - public function testAnnotationEnumInvalidLiteralDeclarationException() - { - $parser = $this->createTestParser(); - $docblock = '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationEnumLiteralInvalid("foo")'; - - $parser->setIgnoreNotImportedAnnotations(false); - $parser->parse($docblock); - } - - public function getConstantsProvider() - { - $provider[] = array( - '@AnnotationWithConstants(PHP_EOL)', - PHP_EOL - ); - $provider[] = array( - '@AnnotationWithConstants(AnnotationWithConstants::INTEGER)', - AnnotationWithConstants::INTEGER - ); - $provider[] = array( - '@Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants(AnnotationWithConstants::STRING)', - AnnotationWithConstants::STRING - ); - $provider[] = array( - '@AnnotationWithConstants(Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants::FLOAT)', - AnnotationWithConstants::FLOAT - ); - $provider[] = array( - '@AnnotationWithConstants(ClassWithConstants::SOME_VALUE)', - ClassWithConstants::SOME_VALUE - ); - $provider[] = array( - '@AnnotationWithConstants(Doctrine\Tests\Common\Annotations\Fixtures\ClassWithConstants::SOME_VALUE)', - ClassWithConstants::SOME_VALUE - ); - $provider[] = array( - '@AnnotationWithConstants(IntefaceWithConstants::SOME_VALUE)', - IntefaceWithConstants::SOME_VALUE - ); - $provider[] = array( - '@AnnotationWithConstants(\Doctrine\Tests\Common\Annotations\Fixtures\IntefaceWithConstants::SOME_VALUE)', - IntefaceWithConstants::SOME_VALUE - ); - $provider[] = array( - '@AnnotationWithConstants({AnnotationWithConstants::STRING, AnnotationWithConstants::INTEGER, AnnotationWithConstants::FLOAT})', - array(AnnotationWithConstants::STRING, AnnotationWithConstants::INTEGER, AnnotationWithConstants::FLOAT) - ); - $provider[] = array( - '@AnnotationWithConstants({ - AnnotationWithConstants::STRING = AnnotationWithConstants::INTEGER - })', - array(AnnotationWithConstants::STRING => AnnotationWithConstants::INTEGER) - ); - $provider[] = array( - '@AnnotationWithConstants({ - Doctrine\Tests\Common\Annotations\Fixtures\IntefaceWithConstants::SOME_KEY = AnnotationWithConstants::INTEGER - })', - array(IntefaceWithConstants::SOME_KEY => AnnotationWithConstants::INTEGER) - ); - $provider[] = array( - '@AnnotationWithConstants({ - \Doctrine\Tests\Common\Annotations\Fixtures\IntefaceWithConstants::SOME_KEY = AnnotationWithConstants::INTEGER - })', - array(IntefaceWithConstants::SOME_KEY => AnnotationWithConstants::INTEGER) - ); - $provider[] = array( - '@AnnotationWithConstants({ - AnnotationWithConstants::STRING = AnnotationWithConstants::INTEGER, - ClassWithConstants::SOME_KEY = ClassWithConstants::SOME_VALUE, - Doctrine\Tests\Common\Annotations\Fixtures\ClassWithConstants::SOME_KEY = IntefaceWithConstants::SOME_VALUE - })', - array( - AnnotationWithConstants::STRING => AnnotationWithConstants::INTEGER, - ClassWithConstants::SOME_KEY => ClassWithConstants::SOME_VALUE, - ClassWithConstants::SOME_KEY => IntefaceWithConstants::SOME_VALUE - ) - ); - return $provider; - } - - /** - * @dataProvider getConstantsProvider - */ - public function testSupportClassConstants($docblock, $expected) - { - $parser = $this->createTestParser(); - $parser->setImports(array( - 'classwithconstants' => 'Doctrine\Tests\Common\Annotations\Fixtures\ClassWithConstants', - 'intefacewithconstants' => 'Doctrine\Tests\Common\Annotations\Fixtures\IntefaceWithConstants', - 'annotationwithconstants' => 'Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants' - )); - - $result = $parser->parse($docblock); - $this->assertInstanceOf('\Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithConstants', $annotation = $result[0]); - $this->assertEquals($expected, $annotation->value); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage The annotation @SomeAnnotationClassNameWithoutConstructorAndProperties declared on does not accept any values, but got {"value":"Foo"}. - */ - public function testWithoutConstructorWhenIsNotDefaultValue() - { - $parser = $this->createTestParser(); - $docblock = <<setTarget(Target::TARGET_CLASS); - $parser->parse($docblock); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage The annotation @SomeAnnotationClassNameWithoutConstructorAndProperties declared on does not accept any values, but got {"value":"Foo"}. - */ - public function testWithoutConstructorWhenHasNoProperties() - { - $parser = $this->createTestParser(); - $docblock = <<setTarget(Target::TARGET_CLASS); - $parser->parse($docblock); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError. - */ - public function testAnnotationTargetSyntaxError() - { - $parser = $this->createTestParser(); - $context = 'class ' . 'SomeClassName'; - $docblock = <<setTarget(Target::TARGET_CLASS); - $parser->parse($docblock,$context); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Invalid Target "Foo". Available targets: [ALL, CLASS, METHOD, PROPERTY, ANNOTATION] - */ - public function testAnnotationWithInvalidTargetDeclarationError() - { - $parser = $this->createTestParser(); - $context = 'class ' . 'SomeClassName'; - $docblock = <<setTarget(Target::TARGET_CLASS); - $parser->parse($docblock,$context); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage @Target expects either a string value, or an array of strings, "NULL" given. - */ - public function testAnnotationWithTargetEmptyError() - { - $parser = $this->createTestParser(); - $context = 'class ' . 'SomeClassName'; - $docblock = <<setTarget(Target::TARGET_CLASS); - $parser->parse($docblock,$context); - } - - /** - * @group DDC-575 - */ - public function testRegressionDDC575() - { - $parser = $this->createTestParser(); - - $docblock = <<parse($docblock); - - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Name", $result[0]); - - $docblock = <<parse($docblock); - - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Name", $result[0]); - } - - /** - * @group DDC-77 - */ - public function testAnnotationWithoutClassIsIgnoredWithoutWarning() - { - $parser = new DocParser(); - $parser->setIgnoreNotImportedAnnotations(true); - $result = $parser->parse("@param"); - - $this->assertEquals(0, count($result)); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected PlainValue, got ''' at position 10. - */ - public function testAnnotationDontAcceptSingleQuotes() - { - $parser = $this->createTestParser(); - $parser->parse("@Name(foo='bar')"); - } - - /** - * @group DCOM-41 - */ - public function testAnnotationDoesntThrowExceptionWhenAtSignIsNotFollowedByIdentifier() - { - $parser = new DocParser(); - $result = $parser->parse("'@'"); - - $this->assertEquals(0, count($result)); - } - - /** - * @group DCOM-41 - * @expectedException Doctrine\Common\Annotations\AnnotationException - */ - public function testAnnotationThrowsExceptionWhenAtSignIsNotFollowedByIdentifierInNestedAnnotation() - { - $parser = new DocParser(); - $result = $parser->parse("@Doctrine\Tests\Common\Annotations\Name(@')"); - } - - /** - * @group DCOM-56 - */ - public function testAutoloadAnnotation() - { - $this->assertFalse(class_exists('Doctrine\Tests\Common\Annotations\Fixture\Annotation\Autoload', false), 'Pre-condition: Doctrine\Tests\Common\Annotations\Fixture\Annotation\Autoload not allowed to be loaded.'); - - $parser = new DocParser(); - - AnnotationRegistry::registerAutoloadNamespace('Doctrine\Tests\Common\Annotations\Fixtures\Annotation', __DIR__ . '/../../../../'); - - $parser->setImports(array( - 'autoload' => 'Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Autoload', - )); - $annotations = $parser->parse('@Autoload'); - - $this->assertEquals(1, count($annotations)); - $this->assertInstanceOf('Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Autoload', $annotations[0]); - } - - public function createTestParser() - { - $parser = new DocParser(); - $parser->setIgnoreNotImportedAnnotations(true); - $parser->setImports(array( - 'name' => 'Doctrine\Tests\Common\Annotations\Name', - '__NAMESPACE__' => 'Doctrine\Tests\Common\Annotations', - )); - - return $parser; - } - - /** - * @group DDC-78 - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage Expected PlainValue, got ''' at position 10 in class \Doctrine\Tests\Common\Annotations\Name - */ - public function testSyntaxErrorWithContextDescription() - { - $parser = $this->createTestParser(); - $parser->parse("@Name(foo='bar')", "class \Doctrine\Tests\Common\Annotations\Name"); - } - - /** - * @group DDC-183 - */ - public function testSyntaxErrorWithUnknownCharacters() - { - $docblock = <<setInput(trim($docblock, '/ *')); - //var_dump($lexer); - - try { - $parser = $this->createTestParser(); - $result = $parser->parse($docblock); - } catch (Exception $e) { - $this->fail($e->getMessage()); - } - } - - /** - * @group DCOM-14 - */ - public function testIgnorePHPDocThrowTag() - { - $docblock = <<createTestParser(); - $result = $parser->parse($docblock); - } catch (Exception $e) { - $this->fail($e->getMessage()); - } - } - - /** - * @group DCOM-38 - */ - public function testCastInt() - { - $parser = $this->createTestParser(); - - $result = $parser->parse("@Name(foo=1234)"); - $annot = $result[0]; - $this->assertInternalType('int', $annot->foo); - } - - /** - * @group DCOM-38 - */ - public function testCastNegativeInt() - { - $parser = $this->createTestParser(); - - $result = $parser->parse("@Name(foo=-1234)"); - $annot = $result[0]; - $this->assertInternalType('int', $annot->foo); - } - - /** - * @group DCOM-38 - */ - public function testCastFloat() - { - $parser = $this->createTestParser(); - - $result = $parser->parse("@Name(foo=1234.345)"); - $annot = $result[0]; - $this->assertInternalType('float', $annot->foo); - } - - /** - * @group DCOM-38 - */ - public function testCastNegativeFloat() - { - $parser = $this->createTestParser(); - - $result = $parser->parse("@Name(foo=-1234.345)"); - $annot = $result[0]; - $this->assertInternalType('float', $annot->foo); - - $result = $parser->parse("@Marker(-1234.345)"); - $annot = $result[0]; - $this->assertInternalType('float', $annot->value); - } - - public function testReservedKeywordsInAnnotations() - { - $parser = $this->createTestParser(); - - $result = $parser->parse('@Doctrine\Tests\Common\Annotations\True'); - $this->assertTrue($result[0] instanceof True); - $result = $parser->parse('@Doctrine\Tests\Common\Annotations\False'); - $this->assertTrue($result[0] instanceof False); - $result = $parser->parse('@Doctrine\Tests\Common\Annotations\Null'); - $this->assertTrue($result[0] instanceof Null); - - $result = $parser->parse('@True'); - $this->assertTrue($result[0] instanceof True); - $result = $parser->parse('@False'); - $this->assertTrue($result[0] instanceof False); - $result = $parser->parse('@Null'); - $this->assertTrue($result[0] instanceof Null); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Creation Error] The annotation @SomeAnnotationClassNameWithoutConstructor declared on some class does not have a property named "invalidaProperty". Available properties: data, name - */ - public function testSetValuesExeption() - { - $docblock = <<createTestParser()->parse($docblock, 'some class'); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_IDENTIFIER or Doctrine\Common\Annotations\DocLexer::T_TRUE or Doctrine\Common\Annotations\DocLexer::T_FALSE or Doctrine\Common\Annotations\DocLexer::T_NULL, got '3.42' at position 5. - */ - public function testInvalidIdentifierInAnnotation() - { - $parser = $this->createTestParser(); - $parser->parse('@Foo\3.42'); - } - - public function testTrailingCommaIsAllowed() - { - $parser = $this->createTestParser(); - - $annots = $parser->parse('@Name({ - "Foo", - "Bar", - })'); - $this->assertEquals(1, count($annots)); - $this->assertEquals(array('Foo', 'Bar'), $annots[0]->value); - } - - public function testDefaultAnnotationValueIsNotOverwritten() - { - $parser = $this->createTestParser(); - - $annots = $parser->parse('@Doctrine\Tests\Common\Annotations\Fixtures\Annotation\AnnotWithDefaultValue'); - $this->assertEquals(1, count($annots)); - $this->assertEquals('bar', $annots[0]->foo); - } - - public function testArrayWithColon() - { - $parser = $this->createTestParser(); - - $annots = $parser->parse('@Name({"foo": "bar"})'); - $this->assertEquals(1, count($annots)); - $this->assertEquals(array('foo' => 'bar'), $annots[0]->value); - } - - /** - * @expectedException Doctrine\Common\Annotations\AnnotationException - * @expectedExceptionMessage [Semantical Error] Couldn't find constant foo. - */ - public function testInvalidContantName() - { - $parser = $this->createTestParser(); - $parser->parse('@Name(foo: "bar")'); - } -} - -/** @Annotation */ -class SomeAnnotationClassNameWithoutConstructor -{ - public $data; - public $name; -} - -/** @Annotation */ -class SomeAnnotationWithConstructorWithoutParams -{ - function __construct() - { - $this->data = "Some data"; - } - public $data; - public $name; -} - -/** @Annotation */ -class SomeAnnotationClassNameWithoutConstructorAndProperties{} - -/** - * @Annotation - * @Target("Foo") - */ -class AnnotationWithInvalidTargetDeclaration{} - -/** - * @Annotation - * @Target - */ -class AnnotationWithTargetEmpty{} - -/** @Annotation */ -class AnnotationExtendsAnnotationTargetAll extends \Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll -{ -} - -/** @Annotation */ -class Name extends \Doctrine\Common\Annotations\Annotation { - public $foo; -} - -/** @Annotation */ -class Marker { - public $value; -} - -/** @Annotation */ -class True {} - -/** @Annotation */ -class False {} - -/** @Annotation */ -class Null {} - -namespace Doctrine\Tests\Common\Annotations\FooBar; - -/** @Annotation */ -class Name extends \Doctrine\Common\Annotations\Annotation { -} diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DummyClass.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DummyClass.php deleted file mode 100644 index 17223f68..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/DummyClass.php +++ /dev/null @@ -1,48 +0,0 @@ -cacheDir = sys_get_temp_dir() . "/annotations_". uniqid(); - @mkdir($this->cacheDir); - return new FileCacheReader(new AnnotationReader(), $this->cacheDir); - } - - public function tearDown() - { - foreach (glob($this->cacheDir.'/*.php') AS $file) { - unlink($file); - } - rmdir($this->cacheDir); - } - - /** - * @group DCOM-81 - */ - public function testAttemptToCreateAnnotationCacheDir() - { - $this->cacheDir = sys_get_temp_dir() . "/not_existed_dir_". uniqid(); - - $this->assertFalse(is_dir($this->cacheDir)); - - $cache = new FileCacheReader(new AnnotationReader(), $this->cacheDir); - - $this->assertTrue(is_dir($this->cacheDir)); - } -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php deleted file mode 100644 index 44108e19..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/AnnotWithDefaultValue.php +++ /dev/null @@ -1,10 +0,0 @@ -roles = $values['value']; - } -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php deleted file mode 100644 index b507e602..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Template.php +++ /dev/null @@ -1,14 +0,0 @@ -name = isset($values['value']) ? $values['value'] : null; - } -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Version.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Version.php deleted file mode 100644 index 09ef0317..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Annotation/Version.php +++ /dev/null @@ -1,11 +0,0 @@ -"), - @Attribute("annotation", type = "Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll"), - @Attribute("arrayOfAnnotations", type = "array"), - }) - */ -final class AnnotationWithAttributes -{ - - public final function __construct(array $data) - { - foreach ($data as $key => $value) { - $this->$key = $value; - } - } - - private $mixed; - private $boolean; - private $bool; - private $float; - private $string; - private $integer; - private $array; - private $annotation; - private $arrayOfIntegers; - private $arrayOfAnnotations; - - /** - * @return mixed - */ - public function getMixed() - { - return $this->mixed; - } - - /** - * @return boolean - */ - public function getBoolean() - { - return $this->boolean; - } - - /** - * @return bool - */ - public function getBool() - { - return $this->bool; - } - - /** - * @return float - */ - public function getFloat() - { - return $this->float; - } - - /** - * @return string - */ - public function getString() - { - return $this->string; - } - - public function getInteger() - { - return $this->integer; - } - - /** - * @return array - */ - public function getArray() - { - return $this->array; - } - - /** - * @return Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll - */ - public function getAnnotation() - { - return $this->annotation; - } - - /** - * @return array - */ - public function getArrayOfIntegers() - { - return $this->arrayOfIntegers; - } - - /** - * @return array - */ - public function getArrayOfAnnotations() - { - return $this->arrayOfAnnotations; - } - -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php deleted file mode 100644 index 9c94558b..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithConstants.php +++ /dev/null @@ -1,20 +0,0 @@ - $value) { - $this->$key = $value; - } - } - - /** - * @var string - */ - private $value; - - /** - * - * @var Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation - */ - private $annot; - - /** - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * @return Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAnnotation - */ - public function getAnnot() - { - return $this->annot; - } - -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php deleted file mode 100644 index bf458ee7..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ - public $arrayOfIntegers; - - /** - * @var array - */ - public $arrayOfAnnotations; - -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Api.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Api.php deleted file mode 100644 index 534ad142..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/Api.php +++ /dev/null @@ -1,10 +0,0 @@ -events->filter(function ($item) use ($year, $month, $day) { - $leftDate = new \DateTime($year.'-'.$month.'-'.$day.' 00:00'); - $rigthDate = new \DateTime($year.'-'.$month.'-'.$day.' +1 day 00:00'); - return ( ( $leftDate <= $item->getDateStart() ) && ( $item->getDateStart() < $rigthDate ) ); - - } - ); - return $extractEvents; - } - -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php deleted file mode 100644 index 055e245c..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithConstants.php +++ /dev/null @@ -1,10 +0,0 @@ - - */ -class Controller -{ - /** - * @Route("/", name="_demo") - * @Template() - */ - public function indexAction() - { - return array(); - } - - /** - * @Route("/hello/{name}", name="_demo_hello") - * @Template() - */ - public function helloAction($name) - { - return array('name' => $name); - } - - /** - * @Route("/contact", name="_demo_contact") - * @Template() - */ - public function contactAction() - { - $form = ContactForm::create($this->get('form.context'), 'contact'); - - $form->bind($this->container->get('request'), $form); - if ($form->isValid()) { - $form->send($this->get('mailer')); - - $this->get('session')->setFlash('notice', 'Message sent!'); - - return new RedirectResponse($this->generateUrl('_demo')); - } - - return array('form' => $form); - } - - /** - * Creates the ACL for the passed object identity - * - * @param ObjectIdentityInterface $oid - * @return void - */ - private function createObjectIdentity(ObjectIdentityInterface $oid) - { - $classId = $this->createOrRetrieveClassId($oid->getType()); - - $this->connection->executeQuery($this->getInsertObjectIdentitySql($oid->getIdentifier(), $classId, true)); - } - - /** - * Returns the primary key for the passed class type. - * - * If the type does not yet exist in the database, it will be created. - * - * @param string $classType - * @return integer - */ - private function createOrRetrieveClassId($classType) - { - if (false !== $id = $this->connection->executeQuery($this->getSelectClassIdSql($classType))->fetchColumn()) { - return $id; - } - - $this->connection->executeQuery($this->getInsertClassSql($classType)); - - return $this->connection->executeQuery($this->getSelectClassIdSql($classType))->fetchColumn(); - } - - /** - * Returns the primary key for the passed security identity. - * - * If the security identity does not yet exist in the database, it will be - * created. - * - * @param SecurityIdentityInterface $sid - * @return integer - */ - private function createOrRetrieveSecurityIdentityId(SecurityIdentityInterface $sid) - { - if (false !== $id = $this->connection->executeQuery($this->getSelectSecurityIdentityIdSql($sid))->fetchColumn()) { - return $id; - } - - $this->connection->executeQuery($this->getInsertSecurityIdentitySql($sid)); - - return $this->connection->executeQuery($this->getSelectSecurityIdentityIdSql($sid))->fetchColumn(); - } - - /** - * Deletes all ACEs for the given object identity primary key. - * - * @param integer $oidPK - * @return void - */ - private function deleteAccessControlEntries($oidPK) - { - $this->connection->executeQuery($this->getDeleteAccessControlEntriesSql($oidPK)); - } - - /** - * Deletes the object identity from the database. - * - * @param integer $pk - * @return void - */ - private function deleteObjectIdentity($pk) - { - $this->connection->executeQuery($this->getDeleteObjectIdentitySql($pk)); - } - - /** - * Deletes all entries from the relations table from the database. - * - * @param integer $pk - * @return void - */ - private function deleteObjectIdentityRelations($pk) - { - $this->connection->executeQuery($this->getDeleteObjectIdentityRelationsSql($pk)); - } - - /** - * This regenerates the ancestor table which is used for fast read access. - * - * @param AclInterface $acl - * @return void - */ - private function regenerateAncestorRelations(AclInterface $acl) - { - $pk = $acl->getId(); - $this->connection->executeQuery($this->getDeleteObjectIdentityRelationsSql($pk)); - $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $pk)); - - $parentAcl = $acl->getParentAcl(); - while (null !== $parentAcl) { - $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $parentAcl->getId())); - - $parentAcl = $parentAcl->getParentAcl(); - } - } - - /** - * This processes changes on an ACE related property (classFieldAces, or objectFieldAces). - * - * @param string $name - * @param array $changes - * @return void - */ - private function updateFieldAceProperty($name, array $changes) - { - $sids = new \SplObjectStorage(); - $classIds = new \SplObjectStorage(); - $currentIds = array(); - foreach ($changes[1] as $field => $new) { - for ($i=0,$c=count($new); $i<$c; $i++) { - $ace = $new[$i]; - - if (null === $ace->getId()) { - if ($sids->contains($ace->getSecurityIdentity())) { - $sid = $sids->offsetGet($ace->getSecurityIdentity()); - } else { - $sid = $this->createOrRetrieveSecurityIdentityId($ace->getSecurityIdentity()); - } - - $oid = $ace->getAcl()->getObjectIdentity(); - if ($classIds->contains($oid)) { - $classId = $classIds->offsetGet($oid); - } else { - $classId = $this->createOrRetrieveClassId($oid->getType()); - } - - $objectIdentityId = $name === 'classFieldAces' ? null : $ace->getAcl()->getId(); - - $this->connection->executeQuery($this->getInsertAccessControlEntrySql($classId, $objectIdentityId, $field, $i, $sid, $ace->getStrategy(), $ace->getMask(), $ace->isGranting(), $ace->isAuditSuccess(), $ace->isAuditFailure())); - $aceId = $this->connection->executeQuery($this->getSelectAccessControlEntryIdSql($classId, $objectIdentityId, $field, $i))->fetchColumn(); - $this->loadedAces[$aceId] = $ace; - - $aceIdProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'id'); - $aceIdProperty->setAccessible(true); - $aceIdProperty->setValue($ace, intval($aceId)); - } else { - $currentIds[$ace->getId()] = true; - } - } - } - - foreach ($changes[0] as $old) { - for ($i=0,$c=count($old); $i<$c; $i++) { - $ace = $old[$i]; - - if (!isset($currentIds[$ace->getId()])) { - $this->connection->executeQuery($this->getDeleteAccessControlEntrySql($ace->getId())); - unset($this->loadedAces[$ace->getId()]); - } - } - } - } - - /** - * This processes changes on an ACE related property (classAces, or objectAces). - * - * @param string $name - * @param array $changes - * @return void - */ - private function updateAceProperty($name, array $changes) - { - list($old, $new) = $changes; - - $sids = new \SplObjectStorage(); - $classIds = new \SplObjectStorage(); - $currentIds = array(); - for ($i=0,$c=count($new); $i<$c; $i++) { - $ace = $new[$i]; - - if (null === $ace->getId()) { - if ($sids->contains($ace->getSecurityIdentity())) { - $sid = $sids->offsetGet($ace->getSecurityIdentity()); - } else { - $sid = $this->createOrRetrieveSecurityIdentityId($ace->getSecurityIdentity()); - } - - $oid = $ace->getAcl()->getObjectIdentity(); - if ($classIds->contains($oid)) { - $classId = $classIds->offsetGet($oid); - } else { - $classId = $this->createOrRetrieveClassId($oid->getType()); - } - - $objectIdentityId = $name === 'classAces' ? null : $ace->getAcl()->getId(); - - $this->connection->executeQuery($this->getInsertAccessControlEntrySql($classId, $objectIdentityId, null, $i, $sid, $ace->getStrategy(), $ace->getMask(), $ace->isGranting(), $ace->isAuditSuccess(), $ace->isAuditFailure())); - $aceId = $this->connection->executeQuery($this->getSelectAccessControlEntryIdSql($classId, $objectIdentityId, null, $i))->fetchColumn(); - $this->loadedAces[$aceId] = $ace; - - $aceIdProperty = new \ReflectionProperty($ace, 'id'); - $aceIdProperty->setAccessible(true); - $aceIdProperty->setValue($ace, intval($aceId)); - } else { - $currentIds[$ace->getId()] = true; - } - } - - for ($i=0,$c=count($old); $i<$c; $i++) { - $ace = $old[$i]; - - if (!isset($currentIds[$ace->getId()])) { - $this->connection->executeQuery($this->getDeleteAccessControlEntrySql($ace->getId())); - unset($this->loadedAces[$ace->getId()]); - } - } - } - - /** - * Persists the changes which were made to ACEs to the database. - * - * @param \SplObjectStorage $aces - * @return void - */ - private function updateAces(\SplObjectStorage $aces) - { - foreach ($aces as $ace) { - $propertyChanges = $aces->offsetGet($ace); - $sets = array(); - - if (isset($propertyChanges['mask'])) { - $sets[] = sprintf('mask = %d', $propertyChanges['mask'][1]); - } - if (isset($propertyChanges['strategy'])) { - $sets[] = sprintf('granting_strategy = %s', $this->connection->quote($propertyChanges['strategy'])); - } - if (isset($propertyChanges['aceOrder'])) { - $sets[] = sprintf('ace_order = %d', $propertyChanges['aceOrder'][1]); - } - if (isset($propertyChanges['auditSuccess'])) { - $sets[] = sprintf('audit_success = %s', $this->connection->getDatabasePlatform()->convertBooleans($propertyChanges['auditSuccess'][1])); - } - if (isset($propertyChanges['auditFailure'])) { - $sets[] = sprintf('audit_failure = %s', $this->connection->getDatabasePlatform()->convertBooleans($propertyChanges['auditFailure'][1])); - } - - $this->connection->executeQuery($this->getUpdateAccessControlEntrySql($ace->getId(), $sets)); - } - } -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php deleted file mode 100644 index bda2cc21..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/DifferentNamespacesPerFileWithClassAsFirst.php +++ /dev/null @@ -1,15 +0,0 @@ -test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test2() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test3() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test4() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test5() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test6() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test7() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test8() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test9() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test10() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test11() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test12() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test13() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test14() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test15() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test16() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test17() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test18() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test19() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test20() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test21() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test22() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test23() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test24() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test25() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test26() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test27() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test28() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test29() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test30() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test31() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test32() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test33() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test34() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test35() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test36() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test37() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test38() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test39() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php deleted file mode 100644 index 1dae104a..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/NoAnnotation.php +++ /dev/null @@ -1,5 +0,0 @@ -test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test2() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test3() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test4() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test5() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test6() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test7() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test8() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test9() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test10() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test11() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test12() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test13() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test14() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test15() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test16() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test17() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test18() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test19() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test20() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test21() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test22() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test23() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test24() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test25() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test26() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test27() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test28() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test29() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test30() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test31() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test32() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test33() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test34() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test35() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test36() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test37() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - - } - - public function test38() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } - - public function test39() - { - echo $this->test1; - echo $this->test2; - echo $this->test3; - $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - foreach ($array as $key => $value) { - echo $key . ' => ' . $value; - } - - $val = (string)self::TEST1; - $val .= (string)self::TEST2; - $val .= (string)self::TEST3; - $val .= (string)self::TEST4; - $val .= (string)self::TEST5; - $val .= (string)self::TEST6; - $val .= (string)self::TEST7; - $val .= (string)self::TEST8; - $val .= (string)self::TEST9; - - strtolower($val); - - return $val; - } -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/TestInterface.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/TestInterface.php deleted file mode 100644 index 58c5e6af..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/TestInterface.php +++ /dev/null @@ -1,13 +0,0 @@ -getMethod(); - - $time = microtime(true); - for ($i=0,$c=500; $i<$c; $i++) { - $reader->getMethodAnnotations($method); - } - $time = microtime(true) - $time; - - $this->printResults('cached reader (in-memory)', $time, $c); - } - - /** - * @group performance - */ - public function testCachedReadPerformanceWithFileCache() - { - $method = $this->getMethod(); - - // prime cache - $reader = new FileCacheReader(new AnnotationReader(), sys_get_temp_dir()); - $reader->getMethodAnnotations($method); - - $time = microtime(true); - for ($i=0,$c=500; $i<$c; $i++) { - $reader = new FileCacheReader(new AnnotationReader(), sys_get_temp_dir()); - $reader->getMethodAnnotations($method); - clearstatcache(); - } - $time = microtime(true) - $time; - - $this->printResults('cached reader (file)', $time, $c); - } - - /** - * @group performance - */ - public function testReadPerformance() - { - $method = $this->getMethod(); - - $time = microtime(true); - for ($i=0,$c=150; $i<$c; $i++) { - $reader = new AnnotationReader(); - $reader->getMethodAnnotations($method); - } - $time = microtime(true) - $time; - - $this->printResults('reader', $time, $c); - } - - /** - * @group performance - */ - public function testDocParsePerformance() - { - $imports = array( - 'ignorephpdoc' => 'Annotations\Annotation\IgnorePhpDoc', - 'ignoreannotation' => 'Annotations\Annotation\IgnoreAnnotation', - 'route' => 'Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Route', - 'template' => 'Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template', - '__NAMESPACE__' => 'Doctrine\Tests\Common\Annotations\Fixtures', - ); - $ignored = array( - 'access', 'author', 'copyright', 'deprecated', 'example', 'ignore', - 'internal', 'link', 'see', 'since', 'tutorial', 'version', 'package', - 'subpackage', 'name', 'global', 'param', 'return', 'staticvar', - 'static', 'var', 'throws', 'inheritdoc', - ); - - $method = $this->getMethod(); - $methodComment = $method->getDocComment(); - $classComment = $method->getDeclaringClass()->getDocComment(); - - $time = microtime(true); - for ($i=0,$c=200; $i<$c; $i++) { - $parser = new DocParser(); - $parser->setImports($imports); - $parser->setIgnoredAnnotationNames($ignored); - $parser->setIgnoreNotImportedAnnotations(true); - - $parser->parse($methodComment); - $parser->parse($classComment); - } - $time = microtime(true) - $time; - - $this->printResults('doc-parser', $time, $c); - } - - /** - * @group performance - */ - public function testDocLexerPerformance() - { - $method = $this->getMethod(); - $methodComment = $method->getDocComment(); - $classComment = $method->getDeclaringClass()->getDocComment(); - - $time = microtime(true); - for ($i=0,$c=500; $i<$c; $i++) { - $lexer = new DocLexer(); - $lexer->setInput($methodComment); - $lexer->setInput($classComment); - } - $time = microtime(true) - $time; - - $this->printResults('doc-lexer', $time, $c); - } - - /** - * @group performance - */ - public function testPhpParserPerformanceWithShortCut() - { - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\NamespacedSingleClassLOC1000'); - - $time = microtime(true); - for ($i=0,$c=500; $i<$c; $i++) { - $parser = new PhpParser(); - $parser->parseClass($class); - } - $time = microtime(true) - $time; - - $this->printResults('doc-parser-with-short-cut', $time, $c); - } - - /** - * @group performance - */ - public function testPhpParserPerformanceWithoutShortCut() - { - $class = new \ReflectionClass('SingleClassLOC1000'); - - $time = microtime(true); - for ($i=0,$c=500; $i<$c; $i++) { - $parser = new PhpParser(); - $parser->parseClass($class); - } - $time = microtime(true) - $time; - - $this->printResults('doc-parser-without-short-cut', $time, $c); - } - - private function getMethod() - { - return new \ReflectionMethod('Doctrine\Tests\Common\Annotations\Fixtures\Controller', 'helloAction'); - } - - private function printResults($test, $time, $iterations) - { - if (0 == $iterations) { - throw new \InvalidArgumentException('$iterations cannot be zero.'); - } - - $title = $test." results:\n"; - $iterationsText = sprintf("Iterations: %d\n", $iterations); - $totalTime = sprintf("Total Time: %.3f s\n", $time); - $iterationTime = sprintf("Time per iteration: %.3f ms\n", $time/$iterations * 1000); - - $max = max(strlen($title), strlen($iterationTime)) - 1; - - echo "\n".str_repeat('-', $max)."\n"; - echo $title; - echo str_repeat('=', $max)."\n"; - echo $iterationsText; - echo $totalTime; - echo $iterationTime; - echo str_repeat('-', $max)."\n"; - } -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php deleted file mode 100644 index dc01f8b0..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php +++ /dev/null @@ -1,207 +0,0 @@ -assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - ), $parser->parseClass($class)); - } - - public function testParseClassWithMultipleImportsInUseStatement() - { - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\MultipleImportsInUseStatement'); - $parser = new PhpParser(); - - $this->assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - ), $parser->parseClass($class)); - } - - public function testParseClassWhenNotUserDefined() - { - $parser = new PhpParser(); - $this->assertEquals(array(), $parser->parseClass(new \ReflectionClass('\stdClass'))); - } - - public function testClassFileDoesNotExist() - { - $class = $this->getMockBuilder('\ReflectionClass') - ->disableOriginalConstructor() - ->getMock(); - $class->expects($this->once()) - ->method('getFilename') - ->will($this->returnValue('/valid/class/Fake.php(35) : eval()d code')); - - $parser = new PhpParser(); - $this->assertEquals(array(), $parser->parseClass($class)); - } - - public function testParseClassWhenClassIsNotNamespaced() - { - $parser = new PhpParser(); - $class = new ReflectionClass('\AnnotationsTestsFixturesNonNamespacedClass'); - - $this->assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testParseClassWhenClassIsInterface() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\TestInterface'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - ), $parser->parseClass($class)); - } - - public function testClassWithFullyQualifiedUseStatements() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\ClassWithFullyQualifiedUseStatements'); - - $this->assertEquals(array( - 'secure' => '\\' . __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => '\\' . __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => '\\' . __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testNamespaceAndClassCommentedOut() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\NamespaceAndClassCommentedOut'); - - $this->assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testEqualNamespacesPerFileWithClassAsFirst() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\EqualNamespacesPerFileWithClassAsFirst'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - ), $parser->parseClass($class)); - } - - public function testEqualNamespacesPerFileWithClassAsLast() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\EqualNamespacesPerFileWithClassAsLast'); - - $this->assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testDifferentNamespacesPerFileWithClassAsFirst() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\DifferentNamespacesPerFileWithClassAsFirst'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - ), $parser->parseClass($class)); - } - - public function testDifferentNamespacesPerFileWithClassAsLast() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\DifferentNamespacesPerFileWithClassAsLast'); - - $this->assertEquals(array( - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testGlobalNamespacesPerFileWithClassAsFirst() - { - $parser = new PhpParser(); - $class = new \ReflectionClass('\GlobalNamespacesPerFileWithClassAsFirst'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - ), $parser->parseClass($class)); - } - - public function testGlobalNamespacesPerFileWithClassAsLast() - { - $parser = new PhpParser(); - $class = new ReflectionClass('\GlobalNamespacesPerFileWithClassAsLast'); - - $this->assertEquals(array( - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testNamespaceWithClosureDeclaration() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\NamespaceWithClosureDeclaration'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - public function testIfPointerResetsOnMultipleParsingTries() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\NamespaceWithClosureDeclaration'); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - - $this->assertEquals(array( - 'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure', - 'route' => __NAMESPACE__ . '\Fixtures\Annotation\Route', - 'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template', - ), $parser->parseClass($class)); - } - - /** - * @group DCOM-97 - * @group regression - */ - public function testClassWithClosure() - { - $parser = new PhpParser(); - $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\ClassWithClosure'); - - $this->assertEquals(array( - 'annotationtargetall' => __NAMESPACE__ . '\Fixtures\AnnotationTargetAll', - 'annotationtargetannotation' => __NAMESPACE__ . '\Fixtures\AnnotationTargetAnnotation', - ), $parser->parseClass($class)); - } -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php deleted file mode 100644 index 376539ff..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php +++ /dev/null @@ -1,97 +0,0 @@ -getReader(); - $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\ClassDDC1660'); - - $this->assertTrue(class_exists('Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Version')); - $this->assertCount(1, $reader->getClassAnnotations($class)); - $this->assertCount(1, $reader->getMethodAnnotations($class->getMethod('bar'))); - $this->assertCount(1, $reader->getPropertyAnnotations($class->getProperty('foo'))); - } - - protected function getReader() - { - $reader = new SimpleAnnotationReader(); - $reader->addNamespace(__NAMESPACE__); - $reader->addNamespace(__NAMESPACE__ . '\Fixtures'); - $reader->addNamespace(__NAMESPACE__ . '\Fixtures\Annotation'); - - return $reader; - } -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php deleted file mode 100644 index a7b9e2f2..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM55Test.php +++ /dev/null @@ -1,65 +0,0 @@ -getClassAnnotations($class); - } - - public function testAnnotation() - { - $class = new \ReflectionClass(__NAMESPACE__ . '\\DCOM55Consumer'); - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - $annots = $reader->getClassAnnotations($class); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf(__NAMESPACE__.'\\DCOM55Annotation', $annots[0]); - } - - public function testParseAnnotationDocblocks() - { - $class = new \ReflectionClass(__NAMESPACE__ . '\\DCOM55Annotation'); - $reader = new \Doctrine\Common\Annotations\AnnotationReader(); - $annots = $reader->getClassAnnotations($class); - - $this->assertEquals(0, count($annots)); - } -} - -/** - * @Controller - */ -class Dummy -{ - -} - -/** - * @Annotation - */ -class DCOM55Annotation -{ - -} - -/** - * @DCOM55Annotation - */ -class DCOM55Consumer -{ - -} \ No newline at end of file diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php deleted file mode 100644 index 708bcc99..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php +++ /dev/null @@ -1,8 +0,0 @@ -getClassAnnotations(new \ReflectionClass(__NAMESPACE__."\MappedClass")); - - foreach ($result as $annot) { - $classAnnotations[get_class($annot)] = $annot; - } - - $this->assertTrue(!isset($classAnnotations['']), 'Class "xxx" is not a valid entity or mapped super class.'); - } - - public function testIssueGlobalNamespace() - { - $docblock = "@Entity"; - $parser = new \Doctrine\Common\Annotations\DocParser(); - $parser->setImports(array( - "__NAMESPACE__" =>"Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping" - )); - - $annots = $parser->parse($docblock); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping\Entity", $annots[0]); - } - - public function testIssueNamespaces() - { - $docblock = "@Entity"; - $parser = new \Doctrine\Common\Annotations\DocParser(); - $parser->addNamespace("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM"); - - $annots = $parser->parse($docblock); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Entity", $annots[0]); - } - - public function testIssueMultipleNamespaces() - { - $docblock = "@Entity"; - $parser = new \Doctrine\Common\Annotations\DocParser(); - $parser->addNamespace("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping"); - $parser->addNamespace("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM"); - - $annots = $parser->parse($docblock); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping\Entity", $annots[0]); - } - - public function testIssueWithNamespacesOrImports() - { - $docblock = "@Entity"; - $parser = new \Doctrine\Common\Annotations\DocParser(); - $annots = $parser->parse($docblock); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf("Entity", $annots[0]); - $this->assertEquals(1, count($annots)); - } - - - public function testIssueSimpleAnnotationReader() - { - $reader = new \Doctrine\Common\Annotations\SimpleAnnotationReader(); - $reader->addNamespace('Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping'); - $annots = $reader->getClassAnnotations(new \ReflectionClass(__NAMESPACE__."\MappedClass")); - - $this->assertEquals(1, count($annots)); - $this->assertInstanceOf("Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping\Entity", $annots[0]); - } - -} - -/** - * @Entity - */ -class MappedClass -{ - -} - - -namespace Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM\Mapping; -/** -* @Annotation -*/ -class Entity -{ - -} - -namespace Doctrine\Tests\Common\Annotations\Ticket\Doctrine\ORM; -/** -* @Annotation -*/ -class Entity -{ - -} diff --git a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/TopLevelAnnotation.php b/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/TopLevelAnnotation.php deleted file mode 100644 index ff3ca376..00000000 --- a/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/TopLevelAnnotation.php +++ /dev/null @@ -1,8 +0,0 @@ -register(new Whoops\Provider\Silex\WhoopsServiceProvider); -} - -// ... - -$app->run(); -``` - -And that's about it. By default, you'll get the pretty error pages if something goes awry in your development -environment, but you also have full access to the **whoops** library, obviously. For example, adding a new handler -into your app is as simple as extending `whoops`: - -```php -$app['whoops'] = $app->extend('whoops', function($whoops) { - $whoops->pushHandler(new DeleteWholeProjectHandler); - return $whoops; -}); -``` -### Integrating with Laravel 4/Illuminate - -If you're using Laravel 4, as of [this commit to laravel/framework](https://github.com/laravel/framework/commit/64f3a79aae254b71550a8097880f0b0e09062d24), you're already using Whoops! Yay! - -### Integrating with Laravel 3 - -User [@hdias](https://github.com/hdias) contributed a simple guide/example to help you integrate **whoops** with Laravel 3's IoC container, available at: - -https://gist.github.com/hdias/5169713#file-start-php - -### Integrating with Zend Framework 2 - -User [@zsilbi](https://github.com/zsilbi) contributed a provider for ZF2 integration, -available in the following location: - -https://github.com/filp/whoops/tree/master/src/Whoops/Provider/Zend - -**Instructions:** - -- Add Whoops as a module to you app (/vendor/Whoops) -- Whoops must be the first module: - -```php -'modules' => array( - 'Whoops', - 'Application' - ) -``` - -- Move Module.php from /Whoops/Provider/Zend/Module.php to /Whoops/Module.php -- Use optional configurations in your controller config: - -```php -return array( - 'view_manager' => array( - 'display_not_found_reason' => true, - 'display_exceptions' => true, - 'json_exceptions' => array( - 'display' => true, - 'ajax_only' => true, - 'show_trace' => true - ) - ), -); -``` - -- NOTE: ob_clean(); is used to remove previous output, so you may use ob_start(); at the beginning of your app (index.php) - -### Opening referenced files with your favorite editor or IDE - -When using the pretty error page feature, whoops comes with the ability to -open referenced files directly in your IDE or editor. - -```php -setEditor('sublime'); -``` - -The following editors are currently supported by default. - -- `sublime` - Sublime Text 2 -- `emacs` - Emacs -- `textmate` - Textmate -- `macvim` - MacVim -- `xdebug` - xdebug (uses [xdebug.file_link_format](http://xdebug.org/docs/all_settings#file_link_format)) - -Adding your own editor is simple: - -```php - -$handler->setEditor(function($file, $line) { - return "whatever://open?file=$file&line=$line"; -}); - -``` - -### Available Handlers - -**whoops** currently ships with the following built-in handlers, available in the `Whoops\Handler` namespace: - -- [`PrettyPageHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/PrettyPageHandler.php) - Shows a pretty error page when something goes pants-up -- [`CallbackHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/CallbackHandler.php) - Wraps a closure or other callable as a handler. You do not need to use this handler explicitly, **whoops** will automatically wrap any closure or callable you pass to `Whoops\Run::pushHandler` -- [`JsonResponseHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/JsonResponseHandler.php) - Captures exceptions and returns information on them as a JSON string. Can be used to, for example, play nice with AJAX requests. - -## Contributing - -If you want to give me some feedback or make a suggestion, send me a message through -twitter: [@imfilp](https://twitter.com/imfilp) - -If you want to get your hands dirty, great! Here's a couple of steps/guidelines: - -- Fork/clone this repo, and update dev dependencies using Composer - -```bash -$ git clone git@github.com:filp/whoops.git -$ cd whoops -$ composer install --dev -``` - -- Create a new branch for your feature or fix - -```bash -$ git checkout -b feature/flames-on-the-side -``` - -- Add your changes & tests for those changes (in `tests/`). -- Remember to stick to the existing code style as best as possible. When in doubt, follow `PSR-2`. -- Send me a pull request! - -If you don't want to go through all this, but still found something wrong or missing, please -let me know, and/or **open a new issue report** so that I or others may take care of it. - -## Authors - -This library was primarily developed by [Filipe Dobreira](https://github.com/filp). - -A lot of awesome fixes and enhancements were also sent in by contributors, which you can find **[in this page right here](https://github.com/filp/whoops/contributors)**. diff --git a/vendor/filp/whoops/composer.json b/vendor/filp/whoops/composer.json deleted file mode 100644 index c9cd9961..00000000 --- a/vendor/filp/whoops/composer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "filp/whoops", - "license": "MIT", - "description": "php error handling for cool kids", - "version": "1.0.6", - "keywords": ["library", "error", "handling", "exception", "silex-provider", "whoops", "zf2"], - "homepage": "https://github.com/filp/whoops", - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "mockery/mockery": "dev-master", - "silex/silex": "1.0.*@dev" - }, - "autoload": { - "psr-0": { - "Whoops": "src/" - } - } -} diff --git a/vendor/filp/whoops/composer.lock b/vendor/filp/whoops/composer.lock deleted file mode 100644 index 1b833c38..00000000 --- a/vendor/filp/whoops/composer.lock +++ /dev/null @@ -1,477 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" - ], - "hash": "05a48af6c1364031a57c1ddaa85fa572", - "packages": [ - - ], - "packages-dev": [ - { - "name": "mockery/mockery", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/padraic/mockery.git", - "reference": "28c77695ac5167e533f86e0268c0a83ef1ac693a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/padraic/mockery/zipball/28c77695ac5167e533f86e0268c0a83ef1ac693a", - "reference": "28c77695ac5167e533f86e0268c0a83ef1ac693a", - "shasum": "" - }, - "require": { - "lib-pcre": ">=7.0", - "php": ">=5.3.2" - }, - "require-dev": { - "hamcrest/hamcrest": "1.1.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succint API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/padraic/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "time": "2013-05-08 16:54:26" - }, - { - "name": "pimple/pimple", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/fabpot/Pimple.git", - "reference": "v1.0.2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fabpot/Pimple/zipball/v1.0.2", - "reference": "v1.0.2", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", - "homepage": "http://pimple.sensiolabs.org", - "keywords": [ - "container", - "dependency injection" - ], - "time": "2013-03-08 08:21:40" - }, - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log", - "reference": "1.0.0" - }, - "dist": { - "type": "zip", - "url": "https://github.com/php-fig/log/archive/1.0.0.zip", - "reference": "1.0.0", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - }, - { - "name": "silex/silex", - "version": "1.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/fabpot/Silex.git", - "reference": "7ae0fd8b871eaebf95b856940c47679da40666c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fabpot/Silex/zipball/7ae0fd8b871eaebf95b856940c47679da40666c6", - "reference": "7ae0fd8b871eaebf95b856940c47679da40666c6", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "pimple/pimple": "1.*", - "symfony/event-dispatcher": ">=2.1,<2.4-dev", - "symfony/http-foundation": ">=2.1,<2.4-dev", - "symfony/http-kernel": ">=2.1,<2.4-dev", - "symfony/routing": ">=2.1,<2.4-dev" - }, - "require-dev": { - "doctrine/dbal": ">=2.2.0,<2.4.0-dev", - "monolog/monolog": ">=1.4,<2.0,>=1.4.1", - "swiftmailer/swiftmailer": "5.*", - "symfony/browser-kit": ">=2.1,<2.4-dev", - "symfony/config": ">=2.1,<2.4-dev", - "symfony/css-selector": ">=2.1,<2.4-dev", - "symfony/dom-crawler": ">=2.1,<2.4-dev", - "symfony/finder": ">=2.1,<2.4-dev", - "symfony/form": ">=2.1.4,<2.4-dev", - "symfony/locale": ">=2.1,<2.4-dev", - "symfony/monolog-bridge": ">=2.1,<2.4-dev", - "symfony/options-resolver": ">=2.1,<2.4-dev", - "symfony/process": ">=2.1,<2.4-dev", - "symfony/security": ">=2.1,<2.4-dev", - "symfony/serializer": ">=2.1,<2.4-dev", - "symfony/translation": ">=2.1,<2.4-dev", - "symfony/twig-bridge": ">=2.1,<2.4-dev", - "symfony/validator": ">=2.1,<2.4-dev", - "twig/twig": ">=1.8.0,<2.0-dev" - }, - "suggest": { - "symfony/browser-kit": ">=2.1,<2.4-dev", - "symfony/css-selector": ">=2.1,<2.4-dev", - "symfony/dom-crawler": ">=2.1,<2.4-dev", - "symfony/form": ">= 2.1.4,<2.4-dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Silex": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch", - "homepage": "http://wiedler.ch/igor/" - } - ], - "description": "The PHP micro-framework based on the Symfony2 Components", - "homepage": "http://silex.sensiolabs.org", - "keywords": [ - "microframework" - ], - "time": "2013-05-08 12:49:14" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.2.1", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "v2.2.1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.1", - "reference": "v2.2.1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/dependency-injection": ">=2.0,<3.0" - }, - "suggest": { - "symfony/dependency-injection": "2.2.*", - "symfony/http-kernel": "2.2.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2013-02-11 11:26:43" - }, - { - "name": "symfony/http-foundation", - "version": "v2.2.1", - "target-dir": "Symfony/Component/HttpFoundation", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "v2.2.1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.2.1", - "reference": "v2.2.1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "http://symfony.com", - "time": "2013-04-06 10:15:43" - }, - { - "name": "symfony/http-kernel", - "version": "v2.2.1", - "target-dir": "Symfony/Component/HttpKernel", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", - "reference": "v2.2.1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.2.1", - "reference": "v2.2.1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "psr/log": ">=1.0,<2.0", - "symfony/event-dispatcher": ">=2.1,<3.0", - "symfony/http-foundation": ">=2.2,<2.3-dev" - }, - "require-dev": { - "symfony/browser-kit": "2.2.*", - "symfony/class-loader": ">=2.1,<3.0", - "symfony/config": ">=2.0,<3.0", - "symfony/console": "2.2.*", - "symfony/dependency-injection": ">=2.0,<3.0", - "symfony/finder": ">=2.0,<3.0", - "symfony/process": ">=2.0,<3.0", - "symfony/routing": ">=2.2,<2.3-dev", - "symfony/stopwatch": ">=2.2,<2.3-dev" - }, - "suggest": { - "symfony/browser-kit": "2.2.*", - "symfony/class-loader": "2.2.*", - "symfony/config": "2.2.*", - "symfony/console": "2.2.*", - "symfony/dependency-injection": "2.2.*", - "symfony/finder": "2.2.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpKernel\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "http://symfony.com", - "time": "2013-04-06 10:16:33" - }, - { - "name": "symfony/routing", - "version": "v2.2.1", - "target-dir": "Symfony/Component/Routing", - "source": { - "type": "git", - "url": "https://github.com/symfony/Routing.git", - "reference": "v2.2.1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.1", - "reference": "v2.2.1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "doctrine/common": ">=2.2,<3.0", - "psr/log": ">=1.0,<2.0", - "symfony/config": ">=2.2,<2.3-dev", - "symfony/yaml": ">=2.0,<3.0" - }, - "suggest": { - "doctrine/common": "~2.2", - "symfony/config": "2.2.*", - "symfony/yaml": "2.2.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Routing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Routing Component", - "homepage": "http://symfony.com", - "time": "2013-03-23 12:03:22" - } - ], - "aliases": [ - - ], - "minimum-stability": "stable", - "stability-flags": { - "mockery/mockery": 20, - "silex/silex": 20 - }, - "platform": { - "php": ">=5.3.0" - }, - "platform-dev": [ - - ] -} diff --git a/vendor/filp/whoops/examples/example-ajax-only.php b/vendor/filp/whoops/examples/example-ajax-only.php deleted file mode 100644 index 3efdb453..00000000 --- a/vendor/filp/whoops/examples/example-ajax-only.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * Run this example file with the PHP 5.4 web server with: - * - * $ cd project_dir - * $ php -S localhost:8080 - * - * and access localhost:8080/example/example-ajax-only.php through your browser - * - * Or just run it through apache/nginx/what-have-yous as usual. - */ - -namespace Whoops\Example; -use Whoops\Run; -use Whoops\Handler\PrettyPageHandler; -use Whoops\Handler\JsonResponseHandler; -use RuntimeException; - -require __DIR__ . '/../vendor/autoload.php'; - -$run = new Run; - -// We want the error page to be shown by default, if this is a -// regular request, so that's the first thing to go into the stack: -$run->pushHandler(new PrettyPageHandler); - -// Now, we want a second handler that will run before the error page, -// and immediately return an error message in JSON format, if something -// goes awry. -$jsonHandler = new JsonResponseHandler; - -// Make sure it only triggers for AJAX requests: -$jsonHandler->onlyForAjaxRequests(true); - -// You can also tell JsonResponseHandler to give you a full stack trace: -// $jsonHandler->addTraceToOutput(true); - -// And push it into the stack: -$run->pushHandler($jsonHandler); - -// That's it! Register Whoops and throw a dummy exception: -$run->register(); -throw new RuntimeException("Oh fudge napkins!"); diff --git a/vendor/filp/whoops/examples/example-silex.php b/vendor/filp/whoops/examples/example-silex.php deleted file mode 100644 index 86530a4c..00000000 --- a/vendor/filp/whoops/examples/example-silex.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * NOTE: Requires silex/silex, can be installed with composer - * within this project using the --dev flag: - * - * $ composer install --dev - * - * Run this example file with the PHP 5.4 web server with: - * - * $ cd project_dir - * $ php -S localhost:8080 - * - * and access localhost:8080/examples/example-silex.php through your browser - * - * Or just run it through apache/nginx/what-have-yous as usual. - */ -require __DIR__ . '/../vendor/autoload.php'; - -use Whoops\Provider\Silex\WhoopsServiceProvider; -use Silex\Application; - -$app = new Application; -$app['debug'] = true; - -if($app['debug']) { - $app->register(new WhoopsServiceProvider); -} - -$app->get('/', function() use($app) { - throw new RuntimeException("Oh no!"); -}); - -$app->run(); diff --git a/vendor/filp/whoops/examples/example.php b/vendor/filp/whoops/examples/example.php deleted file mode 100644 index a1a5710f..00000000 --- a/vendor/filp/whoops/examples/example.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * Run this example file with the PHP 5.4 web server with: - * - * $ cd project_dir - * $ php -S localhost:8080 - * - * and access localhost:8080/example/example.php through your browser - * - * Or just run it through apache/nginx/what-have-yous as usual. - */ - -namespace Whoops\Example; -use Whoops\Run; -use Whoops\Handler\PrettyPageHandler; -use Exception as BaseException; - -require __DIR__ . '/../vendor/autoload.php'; - -class Exception extends BaseException {} - -$run = new Run; -$handler = new PrettyPageHandler; - -// Add a custom table to the layout: -$handler->addDataTable('Ice-cream I like', array( - 'Chocolate' => 'yes', - 'Coffee & chocolate' => 'a lot', - 'Strawberry & chocolate' => 'it\'s alright', - 'Vanilla' => 'ew' -)); - -$run->pushHandler($handler); - -// Example: tag all frames inside a function with their function name -$run->pushHandler(function($exception, $inspector, $run) { - - $inspector->getFrames()->map(function($frame) { - - if($function = $frame->getFunction()) { - $frame->addComment("This frame is within function '$function'", 'cpt-obvious'); - } - - return $frame; - }); - -}); - -$run->register(); - -function fooBar() { - throw new Exception("Something broke!"); -} - -function bar() -{ - fooBar(); -} - -bar(); diff --git a/vendor/filp/whoops/phpunit.xml.dist b/vendor/filp/whoops/phpunit.xml.dist deleted file mode 100644 index a5abf9a5..00000000 --- a/vendor/filp/whoops/phpunit.xml.dist +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - tests/Whoops/ - - - - - - src/Whoops/ - - - diff --git a/vendor/filp/whoops/src/Whoops/Exception/ErrorException.php b/vendor/filp/whoops/src/Whoops/Exception/ErrorException.php deleted file mode 100644 index 8a770af5..00000000 --- a/vendor/filp/whoops/src/Whoops/Exception/ErrorException.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ - -namespace Whoops\Exception; -use ErrorException as BaseErrorException; - -/** - * Wraps ErrorException; mostly used for typing (at least now) - * to easily cleanup the stack trace of redundant info. - */ -class ErrorException extends BaseErrorException {} diff --git a/vendor/filp/whoops/src/Whoops/Exception/Frame.php b/vendor/filp/whoops/src/Whoops/Exception/Frame.php deleted file mode 100644 index a97268e9..00000000 --- a/vendor/filp/whoops/src/Whoops/Exception/Frame.php +++ /dev/null @@ -1,228 +0,0 @@ - - */ - -namespace Whoops\Exception; -use InvalidArgumentException; -use Serializable; - -class Frame implements Serializable -{ - /** - * @var array - */ - protected $frame; - - /** - * @var string - */ - protected $fileContentsCache; - - /** - * @var array[] - */ - protected $comments = array(); - - /** - * @param array[] - */ - public function __construct(array $frame) - { - $this->frame = $frame; - } - - /** - * @param bool $shortened - * @return string|null - */ - public function getFile($shortened = false) - { - $file = !empty($this->frame['file']) ? $this->frame['file'] : null; - if ($shortened && is_string($file)) { - // Replace the part of the path that all frames have in common, and add 'soft hyphens' for smoother line-breaks. - $dirname = dirname(dirname(dirname(dirname(dirname(dirname(__DIR__)))))); - $file = str_replace($dirname, "…", $file); - $file = str_replace("/", "/­", $file); - } - return $file; - } - - /** - * @return int|null - */ - public function getLine() - { - return isset($this->frame['line']) ? $this->frame['line'] : null; - } - - /** - * @return string|null - */ - public function getClass() - { - return isset($this->frame['class']) ? $this->frame['class'] : null; - } - - /** - * @return string|null - */ - public function getFunction() - { - return isset($this->frame['function']) ? $this->frame['function'] : null; - } - - /** - * @return array - */ - public function getArgs() - { - return isset($this->frame['args']) ? (array) $this->frame['args'] : array(); - } - - /** - * Returns the full contents of the file for this frame, - * if it's known. - * @return string|null - */ - public function getFileContents() - { - if($this->fileContentsCache === null && $filePath = $this->getFile()) { - $this->fileContentsCache = file_get_contents($filePath); - } - - return $this->fileContentsCache; - } - - /** - * Adds a comment to this frame, that can be received and - * used by other handlers. For example, the PrettyPage handler - * can attach these comments under the code for each frame. - * - * An interesting use for this would be, for example, code analysis - * & annotations. - * - * @param string $comment - * @param string $context Optional string identifying the origin of the comment - */ - public function addComment($comment, $context = 'global') - { - $this->comments[] = array( - 'comment' => $comment, - 'context' => $context - ); - } - - /** - * Returns all comments for this frame. Optionally allows - * a filter to only retrieve comments from a specific - * context. - * - * @param string $filter - * @return array[] - */ - public function getComments($filter = null) - { - $comments = $this->comments; - - if($filter !== null) { - $comments = array_filter($comments, function($c) use($filter) { - return $c['context'] == $filter; - }); - } - - return $comments; - } - - /** - * Returns the array containing the raw frame data from which - * this Frame object was built - * - * @return array - */ - public function getRawFrame() - { - return $this->frame; - } - - /** - * Returns the contents of the file for this frame as an - * array of lines, and optionally as a clamped range of lines. - * - * NOTE: lines are 0-indexed - * - * @example - * Get all lines for this file - * $frame->getFileLines(); // => array( 0 => ' '...', ...) - * @example - * Get one line for this file, starting at line 10 (zero-indexed, remember!) - * $frame->getFileLines(9, 1); // array( 10 => '...', 11 => '...') - * - * @param int $start - * @param int $length - * @return string[]|null - */ - public function getFileLines($start = 0, $length = null) - { - if(null !== ($contents = $this->getFileContents())) { - $lines = explode("\n", $contents); - - // Get a subset of lines from $start to $end - if($length !== null) - { - $start = (int) $start; - $length = (int) $length; - if ($start < 0) { - $start = 0; - } - - if($length <= 0) { - throw new InvalidArgumentException( - "\$length($length) cannot be lower or equal to 0" - ); - } - - $lines = array_slice($lines, $start, $length, true); - } - - return $lines; - } - } - - /** - * Implements the Serializable interface, with special - * steps to also save the existing comments. - * - * @see Serializable::serialize - * @return string - */ - public function serialize() - { - $frame = $this->frame; - if(!empty($this->comments)) { - $frame['_comments'] = $this->comments; - } - - return serialize($frame); - } - - /** - * Unserializes the frame data, while also preserving - * any existing comment data. - * - * @see Serializable::unserialize - * @param string $serializedFrame - */ - public function unserialize($serializedFrame) - { - $frame = unserialize($serializedFrame); - - if(!empty($frame['_comments'])) { - $this->comments = $frame['_comments']; - unset($frame['_comments']); - } - - $this->frame = $frame; - } -} diff --git a/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php b/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php deleted file mode 100644 index c5fb7bc6..00000000 --- a/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php +++ /dev/null @@ -1,122 +0,0 @@ - - */ - -namespace Whoops\Exception; -use Whoops\Exception\Frame; -use UnexpectedValueException; -use IteratorAggregate; -use ArrayIterator; -use Serializable; -use Countable; - -/** - * Exposes a fluent interface for dealing with an ordered list - * of stack-trace frames. - */ -class FrameCollection implements IteratorAggregate, Serializable, Countable -{ - /** - * @var array[] - */ - private $frames; - - /** - * @param array $frames - */ - public function __construct(array $frames) - { - $this->frames = array_map(function($frame) { - return new Frame($frame); - }, $frames); - } - - /** - * Filters frames using a callable, returns the same FrameCollection - * - * @param callable $callable - * @return Whoops\Exception\FrameCollection - */ - public function filter($callable) - { - $this->frames = array_filter($this->frames, $callable); - return $this; - } - - /** - * Map the collection of frames - * - * @param callable $callable - * @return Whoops\Exception\FrameCollection - */ - public function map($callable) - { - // Contain the map within a higher-order callable - // that enforces type-correctness for the $callable - $this->frames = array_map(function($frame) use($callable) { - $frame = call_user_func($callable, $frame); - - if(!$frame instanceof Frame) { - throw new UnexpectedValueException( - "Callable to " . __METHOD__ . " must return a Frame object" - ); - } - - return $frame; - }, $this->frames); - - return $this; - } - - /** - * Returns an array with all frames, does not affect - * the internal array. - * - * @todo If this gets any more complex than this, - * have getIterator use this method. - * @see Whoops\Exception\FrameCollection::getIterator - * @return array - */ - public function getArray() - { - return $this->frames; - } - - /** - * @see IteratorAggregate::getIterator - * @return ArrayIterator - */ - public function getIterator() - { - return new ArrayIterator($this->frames); - } - - /** - * @see Countable::count - * @return int - */ - public function count() - { - return count($this->frames); - } - - /** - * @see Serializable::serialize - * @return string - */ - public function serialize() - { - return serialize($this->frames); - } - - /** - * @see Serializable::unserialize - * @param string $serializedFrames - */ - public function unserialize($serializedFrames) - { - $this->frames = unserialize($serializedFrames); - } -} diff --git a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php deleted file mode 100644 index 2e10c6dc..00000000 --- a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php +++ /dev/null @@ -1,100 +0,0 @@ - - */ - -namespace Whoops\Exception; -use Whoops\Exception\FrameCollection; -use Whoops\Exception\ErrorException; -use Exception; - -class Inspector -{ - /** - * @var Exception - */ - private $exception; - - /** - * @var Whoops\Exception\FrameCollection - */ - private $frames; - - /** - * @param Exception $exception The exception to inspect - */ - public function __construct(Exception $exception) - { - $this->exception = $exception; - } - - /** - * @return Exception - */ - public function getException() - { - return $this->exception; - } - - /** - * @return string - */ - public function getExceptionName() - { - return get_class($this->exception); - } - - /** - * @return string - */ - public function getExceptionMessage() - { - return $this->exception->getMessage(); - } - - /** - * Returns an iterator for the inspected exception's - * frames. - * @return Whoops\Exception\FrameCollection - */ - public function getFrames() - { - if($this->frames === null) { - $frames = $this->exception->getTrace(); - - // If we're handling an ErrorException thrown by Whoops, - // get rid of the last frame, which matches the handleError method, - // and do not add the current exception to trace. We ensure that - // the next frame does have a filename / linenumber, though. - if($this->exception instanceof ErrorException && empty($frames[1]['line'])) { - $frames[1] = isset($frames[1]) ? $frames[1] + $frames[0] : $frames[0]; - array_shift($frames); - } else { - $firstFrame = $this->getFrameFromException($this->exception); - array_unshift($frames, $firstFrame); - } - $this->frames = new FrameCollection($frames); - } - - return $this->frames; - } - - /** - * Given an exception, generates an array in the format - * generated by Exception::getTrace() - * @param Exception $exception - * @return array - */ - protected function getFrameFromException(Exception $exception) - { - return array( - 'file' => $exception->getFile(), - 'line' => $exception->getLine(), - 'class' => get_class($exception), - 'args' => array( - $exception->getMessage() - ) - ); - } -} diff --git a/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php b/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php deleted file mode 100644 index 9350d293..00000000 --- a/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ - -namespace Whoops\Handler; -use Whoops\Handler\Handler; -use InvalidArgumentException; - -/** - * Wrapper for Closures passed as handlers. Can be used - * directly, or will be instantiated automagically by Whoops\Run - * if passed to Run::pushHandler - */ -class CallbackHandler extends Handler -{ - /** - * @var callable - */ - protected $callable; - - /** - * @param callable $callable - */ - public function __construct($callable) - { - if(!is_callable($callable)) { - throw new InvalidArgumentException( - 'Argument to ' . __METHOD__ . ' must be valid callable' - ); - } - - $this->callable = $callable; - } - - /** - * @return int|null - */ - public function handle() - { - $exception = $this->getException(); - $inspector = $this->getInspector(); - $run = $this->getRun(); - - return call_user_func($this->callable, $exception, $inspector, $run); - } -} diff --git a/vendor/filp/whoops/src/Whoops/Handler/Handler.php b/vendor/filp/whoops/src/Whoops/Handler/Handler.php deleted file mode 100644 index be2e2c7e..00000000 --- a/vendor/filp/whoops/src/Whoops/Handler/Handler.php +++ /dev/null @@ -1,89 +0,0 @@ - - */ - -namespace Whoops\Handler; -use Whoops\Handler\HandlerInterface; -use Whoops\Exception\Inspector; -use Whoops\Run; -use Exception; - -/** - * Abstract implementation of a Handler. - */ -abstract class Handler implements HandlerInterface -{ - /** - * Return constants that can be returned from Handler::handle - * to message the handler walker. - */ - const DONE = 0x10; // returning this is optional, only exists for - // semantic purposes - const LAST_HANDLER = 0x20; - const QUIT = 0x30; - - /** - * @var Whoops\Run - */ - private $run; - - /** - * @var Whoops\Exception\Inspector $inspector - */ - private $inspector; - - /** - * @var Exception $exception - */ - private $exception; - - /** - * @param Whoops\Run $run - */ - public function setRun(Run $run) - { - $this->run = $run; - } - - /** - * @return Whoops\Run - */ - protected function getRun() - { - return $this->run; - } - - /** - * @param Whoops\Exception\Inspector $inspector - */ - public function setInspector(Inspector $inspector) - { - $this->inspector = $inspector; - } - - /** - * @return Whoops\Run - */ - protected function getInspector() - { - return $this->inspector; - } - - /** - * @param Exception $exception - */ - public function setException(Exception $exception) - { - $this->exception = $exception; - } - - /** - * @return Exception - */ - protected function getException() - { - return $this->exception; - } -} diff --git a/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php b/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php deleted file mode 100644 index 80169f33..00000000 --- a/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ - -namespace Whoops\Handler; -use Whoops\Exception\Inspector; -use Whoops\Run; -use Exception; - -interface HandlerInterface -{ - /** - * @return int|null A handler may return nothing, or a Handler::HANDLE_* constant - */ - public function handle(); - - /** - * @param Whoops\Run $run - */ - public function setRun(Run $run); - - /** - * @param Exception $exception - */ - public function setException(Exception $exception); - - /** - * @param Whoops\Exception\Inspector $run - */ - public function setInspector(Inspector $inspector); -} diff --git a/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php b/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php deleted file mode 100644 index f34ea6b8..00000000 --- a/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php +++ /dev/null @@ -1,106 +0,0 @@ - - */ - -namespace Whoops\Handler; -use Whoops\Handler\Handler; - -/** - * Catches an exception and converts it to a JSON - * response. Additionally can also return exception - * frames for consumption by an API. - */ -class JsonResponseHandler extends Handler -{ - /** - * @var bool - */ - private $returnFrames = false; - - /** - * @var bool - */ - private $onlyForAjaxRequests = false; - - /** - * @param bool|null $returnFrames - * @return null|bool - */ - public function addTraceToOutput($returnFrames = null) - { - if(func_num_args() == 0) { - return $this->returnFrames; - } - - $this->returnFrames = (bool) $returnFrames; - } - - /** - * @param bool|null $onlyForAjaxRequests - * @return null|bool - */ - public function onlyForAjaxRequests($onlyForAjaxRequests = null) - { - if(func_num_args() == 0) { - return $this->onlyForAjaxRequests; - } - - $this->onlyForAjaxRequests = (bool) $onlyForAjaxRequests; - } - - /** - * Check, if possible, that this execution was triggered by an AJAX request. - * @param bool - */ - private function isAjaxRequest() - { - return ( - !empty($_SERVER['HTTP_X_REQUESTED_WITH']) - && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') - ; - } - - /** - * @return int - */ - public function handle() - { - if($this->onlyForAjaxRequests() && !$this->isAjaxRequest()) { - return Handler::DONE; - } - - $exception = $this->getException(); - - $response = array( - 'error' => array( - 'type' => get_class($exception), - 'message' => $exception->getMessage(), - 'file' => $exception->getFile(), - 'line' => $exception->getLine() - ) - ); - - if($this->addTraceToOutput()) { - $inspector = $this->getInspector(); - $frames = $inspector->getFrames(); - $frameData = array(); - - foreach($frames as $frame) { - $frameData[] = array( - 'file' => $frame->getFile(), - 'line' => $frame->getLine(), - 'function' => $frame->getFunction(), - 'class' => $frame->getClass(), - 'args' => $frame->getArgs() - ); - } - - $response['error']['trace'] = $frameData; - } - - echo json_encode($response); - return Handler::QUIT; - } -} diff --git a/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php b/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php deleted file mode 100644 index 77dc5878..00000000 --- a/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php +++ /dev/null @@ -1,328 +0,0 @@ - - */ - -namespace Whoops\Handler; -use Whoops\Handler\Handler; -use InvalidArgumentException; - -class PrettyPageHandler extends Handler -{ - /** - * @var string - */ - private $resourcesPath; - - /** - * @var array[] - */ - private $extraTables = array(); - - /** - * @var string - */ - private $pageTitle = 'Whoops! There was an error.'; - - /** - * A string identifier for a known IDE/text editor, or a closure - * that resolves a string that can be used to open a given file - * in an editor. If the string contains the special substrings - * %file or %line, they will be replaced with the correct data. - * - * @example - * "txmt://open?url=%file&line=%line" - * @var mixed $editor - */ - protected $editor; - - /** - * A list of known editor strings - * @var array - */ - protected $editors = array( - 'sublime' => 'subl://open?url=file://%file&line=%line', - 'textmate' => 'txmt://open?url=file://%file&line=%line', - 'emacs' => 'emacs://open?url=file://%file&line=%line', - 'macvim' => 'mvim://open/?url=file://%file&line=%line' - ); - - /** - * Constructor. - */ - public function __construct() - { - if (extension_loaded('xdebug')) { - // Register editor using xdebug's file_link_format option. - $this->editors['xdebug'] = function($file, $line) { - return str_replace(array('%f', '%l'), array($file, $line), ini_get('xdebug.file_link_format')); - }; - } - } - - /** - * @return int|null - */ - public function handle() - { - // Check conditions for outputting HTML: - // @todo: make this more robust - if(php_sapi_name() === 'cli' && !isset($_ENV['whoops-test'])) { - return Handler::DONE; - } - - // Get the 'pretty-template.php' template file - // @todo: this can be made more dynamic &&|| cleaned-up - if(!($resources = $this->getResourcesPath())) { - $resources = __DIR__ . '/../Resources'; - } - - $templateFile = "$resources/pretty-template.php"; - - // @todo: Make this more reliable, - // possibly by adding methods to append CSS & JS to the page - $cssFile = "$resources/pretty-page.css"; - - // Prepare the $v global variable that will pass relevant - // information to the template - $inspector = $this->getInspector(); - $frames = $inspector->getFrames(); - - $v = (object) array( - 'title' => $this->getPageTitle(), - 'name' => explode('\\', $inspector->getExceptionName()), - 'message' => $inspector->getException()->getMessage(), - 'frames' => $frames, - 'hasFrames' => !!count($frames), - 'handler' => $this, - 'handlers' => $this->getRun()->getHandlers(), - 'pageStyle' => file_get_contents($cssFile), - - 'tables' => array( - 'Server/Request Data' => $_SERVER, - 'GET Data' => $_GET, - 'POST Data' => $_POST, - 'Files' => $_FILES, - 'Cookies' => $_COOKIE, - 'Session' => isset($_SESSION) ? $_SESSION: array(), - 'Environment Variables' => $_ENV - ) - ); - - $extraTables = array_map(function($table) { - return $table instanceof \Closure ? $table() : $table; - }, $this->getDataTables()); - - // Add extra entries list of data tables: - $v->tables = array_merge($extraTables, $v->tables); - - call_user_func(function() use($templateFile, $v) { - // $e -> cleanup output, optionally preserving URIs as anchors: - $e = function($_, $allowLinks = false) { - $escaped = htmlspecialchars($_, ENT_QUOTES, 'UTF-8'); - - // convert URIs to clickable anchor elements: - if($allowLinks) { - $escaped = preg_replace( - '@([A-z]+?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', - "$1", $escaped - ); - } - - return $escaped; - }; - - // $slug -> sluggify string (i.e: Hello world! -> hello-world) - $slug = function($_) { - $_ = str_replace(" ", "-", $_); - $_ = preg_replace('/[^\w\d\-\_]/i', '', $_); - return strtolower($_); - }; - - require $templateFile; - }); - - - return Handler::QUIT; - } - - /** - * Adds an entry to the list of tables displayed in the template. - * The expected data is a simple associative array. Any nested arrays - * will be flattened with print_r - * @param string $label - * @param array $data - */ - public function addDataTable($label, array $data) - { - $this->extraTables[$label] = $data; - } - - /** - * Lazily adds an entry to the list of tables displayed in the table. - * The supplied callback argument will be called when the error is rendered, - * it should produce a simple associative array. Any nested arrays will - * be flattened with print_r. - * @param string $label - * @param callable $callback Callable returning an associative array - */ - public function addDataTableCallback($label, /* callable */ $callback) - { - if (!is_callable($callback)) { - throw new InvalidArgumentException('Expecting callback argument to be callable'); - } - - $this->extraTables[$label] = function() use ($callback) { - try { - $result = call_user_func($callback); - - // Only return the result if it can be iterated over by foreach(). - return is_array($result) || $result instanceof \Traversable ? $result : array(); - } catch (\Exception $e) { - // Don't allow failiure to break the rendering of the original exception. - return array(); - } - }; - } - - /** - * Returns all the extra data tables registered with this handler. - * Optionally accepts a 'label' parameter, to only return the data - * table under that label. - * @param string|null $label - * @return array[] - */ - public function getDataTables($label = null) - { - if($label !== null) { - return isset($this->extraTables[$label]) ? - $this->extraTables[$label] : array(); - } - - return $this->extraTables; - } - - /** - * Adds an editor resolver, identified by a string - * name, and that may be a string path, or a callable - * resolver. If the callable returns a string, it will - * be set as the file reference's href attribute. - * - * @example - * $run->addEditor('macvim', "mvim://open?url=file://%file&line=%line") - * @example - * $run->addEditor('remove-it', function($file, $line) { - * unlink($file); - * return "http://stackoverflow.com"; - * }); - * @param string $identifier - * @param string $resolver - */ - public function addEditor($identifier, $resolver) - { - $this->editors[$identifier] = $resolver; - } - - /** - * Set the editor to use to open referenced files, by a string - * identifier, or a callable that will be executed for every - * file reference, with a $file and $line argument, and should - * return a string. - * - * @example - * $run->setEditor(function($file, $line) { return "file:///{$file}"; }); - * @example - * $run->setEditor('sublime'); - * - * @param string|callable $editor - */ - public function setEditor($editor) - { - if(!is_callable($editor) && !isset($this->editors[$editor])) { - throw new InvalidArgumentException( - "Unknown editor identifier: $editor. Known editors:" . - implode(",", array_keys($this->editors)) - ); - } - - $this->editor = $editor; - } - - /** - * Given a string file path, and an integer file line, - * executes the editor resolver and returns, if available, - * a string that may be used as the href property for that - * file reference. - * - * @param string $filePath - * @param int $line - * @return string|false - */ - public function getEditorHref($filePath, $line) - { - if($this->editor === null) { - return false; - } - - $editor = $this->editor; - if(is_string($editor)) { - $editor = $this->editors[$editor]; - } - - if(is_callable($editor)) { - $editor = call_user_func($editor, $filePath, $line); - } - - // Check that the editor is a string, and replace the - // %line and %file placeholders: - if(!is_string($editor)) { - throw new InvalidArgumentException( - __METHOD__ . " should always resolve to a string; got something else instead" - ); - } - - $editor = str_replace("%line", rawurlencode($line), $editor); - $editor = str_replace("%file", rawurlencode($filePath), $editor); - - return $editor; - } - - /** - * @var string - */ - public function setPageTitle($title) - { - $this->pageTitle = (string) $title; - } - - /** - * @return string - */ - public function getPageTitle() - { - return $this->pageTitle; - } - - /** - * @return string - */ - public function getResourcesPath() - { - return $this->resourcesPath; - } - - /** - * @param string $resourcesPath - */ - public function setResourcesPath($resourcesPath) - { - if(!is_dir($resourcesPath)) { - throw new InvalidArgumentException( - "$resourcesPath is not a valid directory" - ); - } - - $this->resourcesPath = $resourcesPath; - } -} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Silex/WhoopsServiceProvider.php b/vendor/filp/whoops/src/Whoops/Provider/Silex/WhoopsServiceProvider.php deleted file mode 100644 index 238ab823..00000000 --- a/vendor/filp/whoops/src/Whoops/Provider/Silex/WhoopsServiceProvider.php +++ /dev/null @@ -1,81 +0,0 @@ - - */ - -namespace Whoops\Provider\Silex; -use Whoops\Run; -use Whoops\Handler\PrettyPageHandler; -use Silex\ServiceProviderInterface; -use Silex\Application; -use RuntimeException; - -class WhoopsServiceProvider implements ServiceProviderInterface -{ - /** - * @see Silex\ServiceProviderInterface::register - * @param Silex\Application $app - */ - public function register(Application $app) - { - // There's only ever going to be one error page...right? - $app['whoops.error_page_handler'] = $app->share(function() { - return new PrettyPageHandler; - }); - - // Retrieves info on the Silex environment and ships it off - // to the PrettyPageHandler's data tables: - // This works by adding a new handler to the stack that runs - // before the error page, retrieving the shared page handler - // instance, and working with it to add new data tables - $app['whoops.silex_info_handler'] = $app->protect(function() use($app) { - try { - $request = $app['request']; - } catch (RuntimeException $e) { - // This error occurred too early in the application's life - // and the request instance is not yet available. - return; - } - - // General application info: - $app['whoops.error_page_handler']->addDataTable('Silex Application', array( - 'Charset' => $app['charset'], - 'Locale' => $app['locale'], - 'Route Class' => $app['route_class'], - 'Dispatcher Class' => $app['dispatcher_class'], - 'Application Class'=> get_class($app) - )); - - // Request info: - $app['whoops.error_page_handler']->addDataTable('Silex Application (Request)', array( - 'URI' => $request->getUri(), - 'Request URI' => $request->getRequestUri(), - 'Path Info' => $request->getPathInfo(), - 'Query String'=> $request->getQueryString() ?: '', - 'HTTP Method' => $request->getMethod(), - 'Script Name' => $request->getScriptName(), - 'Base Path' => $request->getBasePath(), - 'Base URL' => $request->getBaseUrl(), - 'Scheme' => $request->getScheme(), - 'Port' => $request->getPort(), - 'Host' => $request->getHost(), - )); - }); - - $app['whoops'] = $app->share(function() use($app) { - $run = new Run; - $run->pushHandler($app['whoops.error_page_handler']); - $run->pushHandler($app['whoops.silex_info_handler']); - return $run; - }); - - $app->error(array($app['whoops'], Run::EXCEPTION_HANDLER)); - $app['whoops']->register(); - } - - /** - * @see Silex\ServiceProviderInterface::boot - */ - public function boot(Application $app) {} -} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php deleted file mode 100644 index bf8830d0..00000000 --- a/vendor/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php +++ /dev/null @@ -1,56 +0,0 @@ - - */ - -namespace Whoops\Provider\Zend; - -use Whoops\Run; - -use Zend\Mvc\View\Http\ExceptionStrategy as BaseExceptionStrategy; -use Zend\Mvc\MvcEvent; -use Zend\Mvc\Application; - -class ExceptionStrategy extends BaseExceptionStrategy { - - protected $run; - - public function __construct(Run $run) { - $this->run = $run; - return $this; - } - - public function prepareExceptionViewModel(MvcEvent $event) { - // Do nothing if no error in the event - $error = $event->getError(); - if (empty($error)) { - return; - } - - // Do nothing if the result is a response object - $result = $event->getResult(); - if ($result instanceof Response) { - return; - } - - switch ($error) { - case Application::ERROR_CONTROLLER_NOT_FOUND: - case Application::ERROR_CONTROLLER_INVALID: - case Application::ERROR_ROUTER_NO_MATCH: - // Specifically not handling these - return; - - case Application::ERROR_EXCEPTION: - default: - $response = $event->getResponse(); - if (!$response || $response->getStatusCode() === 200) { - header('HTTP/1.0 500 Internal Server Error', true, 500); - } - ob_clean(); - $this->run->handleException($event->getParam('exception')); - break; - } - } - -} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/Module.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/Module.php deleted file mode 100644 index 44f14ca2..00000000 --- a/vendor/filp/whoops/src/Whoops/Provider/Zend/Module.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * The Whoops directory should be added as a module to ZF2 (/vendor/Whoops) - * - * Whoops must be added as the first module - * For example: - * 'modules' => array( - * 'Whoops', - * 'Application', - * ), - * - * This file should be moved next to Whoops/Run.php (/vendor/Whoops/Module.php) - * - */ - -namespace Whoops; - -use Whoops\Run; -use Whoops\Provider\Zend\ExceptionStrategy; -use Whoops\Provider\Zend\RouteNotFoundStrategy; -use Whoops\Handler\JsonResponseHandler; -use Whoops\Handler\PrettyPageHandler; -use Zend\EventManager\EventInterface; -use Zend\Console\Request as ConsoleRequest; - -class Module -{ - protected $run; - - public function onBootstrap(EventInterface $event) - { - $prettyPageHandler = new PrettyPageHandler(); - - // Set editor - $config = $event->getApplication()->getServiceManager()->get('Config'); - if (isset($config['view_manager']['editor'])) { - $prettyPageHandler->setEditor($config['view_manager']['editor']); - } - - - $this->run = new Run(); - $this->run->register(); - $this->run->pushHandler($prettyPageHandler); - - $this->attachListeners($event); - } - - public function getAutoloaderConfig() - { - return array( - 'Zend\Loader\StandardAutoloader' => array( - 'namespaces' => array( - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, - ), - ), - ); - } - - private function attachListeners(EventInterface $event) - { - $request = $event->getRequest(); - $application = $event->getApplication(); - $services = $application->getServiceManager(); - $events = $application->getEventManager(); - $config = $services->get('Config'); - - //Display exceptions based on configuration and console mode - if ($request instanceof ConsoleRequest || empty($config['view_manager']['display_exceptions'])) - return; - - $jsonHandler = new JsonResponseHandler(); - - if (!empty($config['view_manager']['json_exceptions']['show_trace'])) { - //Add trace to the JSON output - $jsonHandler->addTraceToOutput(true); - } - - if (!empty($config['view_manager']['json_exceptions']['ajax_only'])) { - //Only return JSON response for AJAX requests - $jsonHandler->onlyForAjaxRequests(true); - } - - if (!empty($config['view_manager']['json_exceptions']['display'])) { - //Turn on JSON handler - $this->run->pushHandler($jsonHandler); - } - - //Attach the Whoops ExceptionStrategy - $exceptionStrategy = new ExceptionStrategy($this->run); - $exceptionStrategy->attach($events); - - //Attach the Whoops RouteNotFoundStrategy - $routeNotFoundStrategy = new RouteNotFoundStrategy($this->run); - $routeNotFoundStrategy->attach($events); - - //Detach default ExceptionStrategy - $services->get('Zend\Mvc\View\Http\ExceptionStrategy')->detach($events); - - //Detach default RouteNotFoundStrategy - $services->get('Zend\Mvc\View\Http\RouteNotFoundStrategy')->detach($events); - } - -} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php deleted file mode 100644 index 6c0b3de9..00000000 --- a/vendor/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ - -namespace Whoops\Provider\Zend; - -use Whoops\Run; - -use Zend\Mvc\View\Http\RouteNotFoundStrategy as BaseRouteNotFoundStrategy; -use Zend\Mvc\MvcEvent; -use Zend\Stdlib\ResponseInterface as Response; -use Zend\View\Model\ViewModel; - -class RouteNotFoundStrategy extends BaseRouteNotFoundStrategy { - - protected $run; - - public function __construct(Run $run) { - $this->run = $run; - } - - public function prepareNotFoundViewModel(MvcEvent $e) { - $vars = $e->getResult(); - if ($vars instanceof Response) { - // Already have a response as the result - return; - } - - $response = $e->getResponse(); - if ($response->getStatusCode() != 404) { - // Only handle 404 responses - return; - } - - if (!$vars instanceof ViewModel) { - $model = new ViewModel(); - if (is_string($vars)) { - $model->setVariable('message', $vars); - } else { - $model->setVariable('message', 'Page not found.'); - } - } else { - $model = $vars; - if ($model->getVariable('message') === null) { - $model->setVariable('message', 'Page not found.'); - } - } - // If displaying reasons, inject the reason - $this->injectNotFoundReason($model, $e); - - // If displaying exceptions, inject - $this->injectException($model, $e); - - // Inject controller if we're displaying either the reason or the exception - $this->injectController($model, $e); - - ob_clean(); - - throw new \Exception($model->getVariable('message') . ' ' . $model->getVariable('reason')); - } - -} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/module.config.example.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/module.config.example.php deleted file mode 100644 index 13198a85..00000000 --- a/vendor/filp/whoops/src/Whoops/Provider/Zend/module.config.example.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * Example controller configuration - */ - -return array( - 'view_manager' => array( - 'editor' => 'sublime', - 'display_not_found_reason' => true, - 'display_exceptions' => true, - 'json_exceptions' => array( - 'display' => true, - 'ajax_only' => true, - 'show_trace' => true - ) - ), -); diff --git a/vendor/filp/whoops/src/Whoops/Resources/pretty-page.css b/vendor/filp/whoops/src/Whoops/Resources/pretty-page.css deleted file mode 100644 index 5e504848..00000000 --- a/vendor/filp/whoops/src/Whoops/Resources/pretty-page.css +++ /dev/null @@ -1,311 +0,0 @@ -.cf:before, .cf:after {content: " ";display: table;} .cf:after {clear: both;} .cf {*zoom: 1;} -body { - font: 14px helvetica, arial, sans-serif; - color: #2B2B2B; - background-color: #D4D4D4; - padding:0; - margin: 0; - max-height: 100%; -} - a { - text-decoration: none; - } - -.container{ - height: 100%; - width: 100%; - position: fixed; - margin: 0; - padding: 0; - left: 0; - top: 0; -} - -.branding { - position: absolute; - top: 10px; - right: 20px; - color: #777777; - font-size: 10px; - z-index: 100; -} - .branding a { - color: #CD3F3F; - } - -header { - padding: 30px 20px; - color: white; - background: #272727; - box-sizing: border-box; - border-left: 5px solid #CD3F3F; -} - .exc-title { - margin: 0; - color: #616161; - text-shadow: 0 1px 2px rgba(0, 0, 0, .1); - } - .exc-title-primary { color: #CD3F3F; } - .exc-message { - font-size: 32px; - margin: 5px 0; - word-wrap: break-word; - } - -.stack-container { - height: 100%; - position: relative; -} - -.details-container { - height: 100%; - overflow: auto; - float: right; - width: 70%; - background: #DADADA; -} - .details { - padding: 10px; - padding-left: 5px; - border-left: 5px solid rgba(0, 0, 0, .1); - } - -.frames-container { - height: 100%; - overflow: auto; - float: left; - width: 30%; - background: #FFF; -} - .frame { - padding: 14px; - background: #F3F3F3; - border-right: 1px solid rgba(0, 0, 0, .2); - cursor: pointer; - } - .frame.active { - background-color: #4288CE; - color: #F3F3F3; - box-shadow: inset -2px 0 0 rgba(255, 255, 255, .1); - text-shadow: 0 1px 0 rgba(0, 0, 0, .2); - } - - .frame:not(.active):hover { - background: #BEE9EA; - } - - .frame-class, .frame-function { - font-weight: bold; - } - - .frame-class { - color: #4288CE; - } - .active .frame-class { - color: #BEE9EA; - } - - .frame-file { - font-family: consolas, monospace; - word-wrap:break-word; - } - - .frame-file .editor-link { - color: #272727; - } - - .frame-line { - font-weight: bold; - color: #4288CE; - } - - - .active .frame-line { color: #BEE9EA; } - .frame-line:before { - content: ":"; - } - - .frame-code { - padding: 10px; - padding-left: 5px; - background: #BDBDBD; - display: none; - border-left: 5px solid #4288CE; - } - - .frame-code.active { - display: block; - } - - .frame-code .frame-file { - background: #C6C6C6; - color: #525252; - text-shadow: 0 1px 0 #E7E7E7; - padding: 10px 10px 5px 10px; - - border-top-right-radius: 6px; - border-top-left-radius: 6px; - - border: 1px solid rgba(0, 0, 0, .1); - border-bottom: none; - box-shadow: inset 0 1px 0 #DADADA; - } - - .code-block { - padding: 10px; - margin: 0; - box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); - } - - .linenums { - margin: 0; - margin-left: 10px; - } - - .frame-comments { - box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); - border: 1px solid rgba(0, 0, 0, .2); - border-top: none; - - border-bottom-right-radius: 6px; - border-bottom-left-radius: 6px; - - padding: 5px; - font-size: 12px; - background: #404040; - } - - .frame-comments.empty { - padding: 8px 15px; - } - - .frame-comments.empty:before { - content: "No comments for this stack frame."; - font-style: italic; - color: #828282; - } - - .frame-comment { - padding: 10px; - color: #D2D2D2; - } - .frame-comment a { - color: #BEE9EA; - font-weight: bold; - text-decoration: none; - } - .frame-comment a:hover { - color: #4bb1b1; - } - - .frame-comment:not(:last-child) { - border-bottom: 1px dotted rgba(0, 0, 0, .3); - } - - .frame-comment-context { - font-size: 10px; - font-weight: bold; - color: #86D2B6; - } - -.data-table-container label { - font-size: 16px; - font-weight: bold; - color: #4288CE; - margin: 10px 0; - padding: 10px 0; - - display: block; - margin-bottom: 5px; - padding-bottom: 5px; - border-bottom: 1px dotted rgba(0, 0, 0, .2); -} - .data-table { - width: 100%; - margin: 10px 0; - } - - .data-table tbody { - font: 13px consolas, monospace; - } - - .data-table thead { - display: none; - } - - .data-table tr { - padding: 5px 0; - } - - .data-table td:first-child { - width: 20%; - min-width: 130px; - overflow: hidden; - font-weight: bold; - color: #463C54; - padding-right: 5px; - - } - - .data-table td:last-child { - width: 80%; - -ms-word-break: break-all; - word-break: break-all; - word-break: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; - } - - .data-table .empty { - color: rgba(0, 0, 0, .3); - font-style: italic; - } - -.handler { - padding: 10px; - font: 14px monospace; -} - -.handler.active { - color: #BBBBBB; - background: #989898; - font-weight: bold; -} - -/* prettify code style -Uses the Doxy theme as a base */ -pre .str, code .str { color: #BCD42A; } /* string */ -pre .kwd, code .kwd { color: #4bb1b1; font-weight: bold; } /* keyword*/ -pre .com, code .com { color: #888; font-weight: bold; } /* comment */ -pre .typ, code .typ { color: #ef7c61; } /* type */ -pre .lit, code .lit { color: #BCD42A; } /* literal */ -pre .pun, code .pun { color: #fff; font-weight: bold; } /* punctuation */ -pre .pln, code .pln { color: #e9e4e5; } /* plaintext */ -pre .tag, code .tag { color: #4bb1b1; } /* html/xml tag */ -pre .htm, code .htm { color: #dda0dd; } /* html tag */ -pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag */ -pre .atn, code .atn { color: #ef7c61; font-weight: normal;} /* html/xml attribute name */ -pre .atv, code .atv { color: #bcd42a; } /* html/xml attribute value */ -pre .dec, code .dec { color: #606; } /* decimal */ -pre.prettyprint, code.prettyprint { - font-family: 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace;; - background: #333; - color: #e9e4e5; -} - pre.prettyprint { - white-space: pre-wrap; - } - - pre.prettyprint a, code.prettyprint a { - text-decoration:none; - } - - .linenums li.current{ - background: rgba(255, 255, 255, .07); - padding-top: 4px; - padding-left: 1px; - } - .linenums li.current.active { - background: rgba(255, 255, 255, .17); - } diff --git a/vendor/filp/whoops/src/Whoops/Resources/pretty-template.php b/vendor/filp/whoops/src/Whoops/Resources/pretty-template.php deleted file mode 100644 index 7e61e07d..00000000 --- a/vendor/filp/whoops/src/Whoops/Resources/pretty-template.php +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - <?php echo $e($v->title) ?> - - - - -
- -
- -
- - - frames as $i => $frame): ?> -
-
- getClass() ?: '') ?> - getFunction() ?: '') ?> -
- - - getFile(true) ?: '<#unknown>') ?>getLine() ?> - -
- - -
- -
- -
-
-

- name as $i => $nameSection): ?> - name) - 1): ?> - - - - - -

-

- message) ?> -

-
-
- - -
- frames as $i => $frame): ?> - getLine(); ?> -
-
- getFile(); ?> - handler->getEditorHref($filePath, (int) $line)): ?> - Open: - - ') ?> - - - ') ?> - -
- getFileLines($line - 8, 10); - $start = key($range) + 1; - $code = join("\n", $range); - ?> -
- - - getComments(); - ?> -
- $comment): ?> - -
- - -
- -
- -
- -
- - -
-
- tables as $label => $data): ?> -
- - - - - - - - - - $value): ?> - - - - - -
KeyValue
- - empty - -
- -
- - -
- - handlers as $i => $handler): ?> -
- . -
- -
- -
-
- -
-
- - - - - - diff --git a/vendor/filp/whoops/src/Whoops/Run.php b/vendor/filp/whoops/src/Whoops/Run.php deleted file mode 100644 index a0c8a216..00000000 --- a/vendor/filp/whoops/src/Whoops/Run.php +++ /dev/null @@ -1,247 +0,0 @@ - - */ - -namespace Whoops; -use Whoops\Handler\HandlerInterface; -use Whoops\Handler\Handler; -use Whoops\Handler\CallbackHandler; -use Whoops\Exception\Inspector; -use Whoops\Exception\ErrorException; -use InvalidArgumentException; -use Exception; - -class Run -{ - const EXCEPTION_HANDLER = 'handleException'; - const ERROR_HANDLER = 'handleError'; - const SHUTDOWN_HANDLER = 'handleShutdown'; - - protected $isRegistered; - protected $allowQuit = true; - protected $sendOutput = true; - - /** - * @var DarnIt\Handler\HandlerInterface[] - */ - protected $handlerStack = array(); - - /** - * Pushes a handler to the end of the stack. - * @param Whoops\HandlerInterface $handler - * @return Whoops\Run - */ - public function pushHandler($handler) - { - if(is_callable($handler)) { - $handler = new CallbackHandler($handler); - } - - if(!$handler instanceof HandlerInterface) { - throw new InvalidArgumentException( - 'Argument to ' . __METHOD__ . ' must be a callable, or instance of' - . 'Whoops\\Handler\\HandlerInterface' - ); - } - - $this->handlerStack[] = $handler; - return $this; - } - - /** - * Removes the last handler in the stack and returns it. - * Returns null if there's nothing else to pop. - * @return null|Whoops\Handler\HandlerInterface - */ - public function popHandler() - { - return array_pop($this->handlerStack); - } - - /** - * Returns an array with all handlers, in the - * order they were added to the stack. - * @return array - */ - public function getHandlers() - { - return $this->handlerStack; - } - - /** - * Clears all handlers in the handlerStack, including - * the default PrettyPage handler. - * @return Whoops\Run - */ - public function clearHandlers() - { - $this->handlerStack = array(); - return $this; - } - - /** - * @param Exception $exception - * @return Whoops\Exception\Inspector - */ - protected function getInspector(Exception $exception) - { - return new Inspector($exception); - } - - /** - * Registers this instance as an error handler. - * @return Whoops\Run - */ - public function register() - { - if(!$this->isRegistered) { - set_error_handler(array($this, self::ERROR_HANDLER)); - set_exception_handler(array($this, self::EXCEPTION_HANDLER)); - register_shutdown_function(array($this, self::SHUTDOWN_HANDLER)); - - $this->isRegistered = true; - } - - return $this; - } - - /** - * Unregisters all handlers registered by this Whoops\Run instance - * @return Whoops\Run - */ - public function unregister() - { - if($this->isRegistered) { - restore_exception_handler(); - restore_error_handler(); - - $this->isRegistered = false; - } - - return $this; - } - - /** - * Should Whoops allow Handlers to force the script to quit? - * @param bool|num $exit - * @return bool - */ - public function allowQuit($exit = null) - { - if(func_num_args() == 0) { - return $this->allowQuit; - } - - return $this->allowQuit = (bool) $exit; - } - - /** - * Should Whoops push output directly to the client? - * If this is false, output will be returned by handleException - * @param bool|num $send - * @return bool - */ - public function writeToOutput($send = null) - { - if(func_num_args() == 0) { - return $this->sendOutput; - } - - return $this->sendOutput = (bool) $send; - } - - /** - * Handles an exception, ultimately generating a Whoops error - * page. - * - * @param Exception $exception - * @return string Output generated by handlers - */ - public function handleException(Exception $exception) - { - // Walk the registered handlers in the reverse order - // they were registered, and pass off the exception - $inspector = $this->getInspector($exception); - - // Capture output produced while handling the exception, - // we might want to send it straight away to the client, - // or return it silently. - ob_start(); - - for($i = count($this->handlerStack) - 1; $i >= 0; $i--) { - $handler = $this->handlerStack[$i]; - - $handler->setRun($this); - $handler->setInspector($inspector); - $handler->setException($exception); - - $handlerResponse = $handler->handle($exception); - - if(in_array($handlerResponse, array(Handler::LAST_HANDLER, Handler::QUIT))) { - // The Handler has handled the exception in some way, and - // wishes to quit execution (Handler::QUIT), or skip any - // other handlers (Handler::LAST_HANDLER). If $this->allowQuit - // is false, Handler::QUIT behaves like Handler::LAST_HANDLER - break; - } - } - - $output = ob_get_clean(); - - // Handlers are done! Check if we got here because of Handler::QUIT - // ($handlerResponse will be the response from the last queried handler) - // and if so, try to quit execution. - if($this->allowQuit()) { - echo $output; - exit; - } else { - // If we're allowed to, send output generated by handlers directly - // to the output, otherwise, return it so that it may be used by - // the caller. - if($this->writeToOutput()) { - echo $output; - } - - return $output; - } - } - - /** - * Converts generic PHP errors to \ErrorException - * instances, before passing them off to be handled. - * - * This method MUST be compatible with set_error_handler. - * - * @param int $level - * @param string $message - * @param string $file - * @param int $line - */ - public function handleError($level, $message, $file = null, $line = null) - { - if ($level & error_reporting()) { - $this->handleException( - new ErrorException( - $message, $level, 0, $file, $line - ) - ); - } - } - - /** - * Special case to deal with Fatal errors and the like. - */ - public function handleShutdown() - { - if($error = error_get_last()) { - $this->handleError( - $error['type'], - $error['message'], - $error['file'], - $error['line'] - ); - } - } -} diff --git a/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php b/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php deleted file mode 100644 index 136d1150..00000000 --- a/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php +++ /dev/null @@ -1,150 +0,0 @@ - - */ - -namespace Whoops\Exception; -use Whoops\Exception\FrameCollection; -use Whoops\TestCase; -use Mockery as m; - -class FrameCollectionTest extends TestCase -{ - /** - * Stupid little counter for tagging frames - * with a unique but predictable id - * @var int - */ - private $frameIdCounter = 0; - - /** - * @return array - */ - public function getFrameData() - { - $id = ++$this->frameIdCounter; - return array( - 'file' => __DIR__ . '/../../fixtures/frame.lines-test.php', - 'line' => $id, - 'function' => 'test-' . $id, - 'class' => 'MyClass', - 'args' => array(true, 'hello') - ); - } - - /** - * @param int $total - * @return array - */ - public function getFrameDataList($total) - { - $total = max((int) $total, 1); - $self = $this; - $frames = array_map(function() use($self) { - return $self->getFrameData(); - }, range(1, $total)); - - return $frames; - } - - /** - * @param array $frames - * @return Whoops\Exception\FrameCollection - */ - private function getFrameCollectionInstance($frames = null) - { - if($frames === null) { - $frames = $this->getFrameDataList(10); - } - - return new FrameCollection($frames); - } - - /** - * @covers Whoops\Exception\FrameCollection::filter - * @covers Whoops\Exception\FrameCollection::count - */ - public function testFilterFrames() - { - $frames = $this->getFrameCollectionInstance(); - - // Filter out all frames with a line number under 6 - $frames->filter(function($frame) { - return $frame->getLine() <= 5; - }); - - $this->assertCount(5, $frames); - } - - /** - * @covers Whoops\Exception\FrameCollection::map - */ - public function testMapFrames() - { - $frames = $this->getFrameCollectionInstance(); - - // Filter out all frames with a line number under 6 - $frames->map(function($frame) { - $frame->addComment("This is cool", "test"); - return $frame; - }); - - $this->assertCount(10, $frames); - } - - - /** - * @covers Whoops\Exception\FrameCollection::map - * @expectedException UnexpectedValueException - */ - public function testMapFramesEnforceType() - { - $frames = $this->getFrameCollectionInstance(); - - // Filter out all frames with a line number under 6 - $frames->map(function($frame) { - return "bajango"; - }); - } - - /** - * @covers Whoops\Exception\FrameCollection::getArray - */ - public function testGetArray() - { - $frames = $this->getFrameCollectionInstance(); - $frames = $frames->getArray(); - - $this->assertCount(10, $frames); - foreach($frames as $frame) { - $this->assertInstanceOf('Whoops\\Exception\\Frame', $frame); - } - } - - /** - * @covers Whoops\Exception\FrameCollection::getIterator - */ - public function testCollectionIsIterable() - { - $frames = $this->getFrameCollectionInstance(); - foreach($frames as $frame) { - $this->assertInstanceOf('Whoops\\Exception\\Frame', $frame); - } - } - - /** - * @covers Whoops\Exception\FrameCollection::serialize - * @covers Whoops\Exception\FrameCollection::unserialize - */ - public function testCollectionIsSerializable() - { - $frames = $this->getFrameCollectionInstance(); - $serializedFrames = serialize($frames); - $newFrames = unserialize($serializedFrames); - - foreach($newFrames as $frame) { - $this->assertInstanceOf('Whoops\\Exception\\Frame', $frame); - } - } -} diff --git a/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php b/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php deleted file mode 100644 index d615ae08..00000000 --- a/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php +++ /dev/null @@ -1,209 +0,0 @@ - - */ - -namespace Whoops\Exception; -use Whoops\Exception\Frame; -use Whoops\TestCase; -use Mockery as m; - -class FrameTest extends TestCase -{ - /** - * @return array - */ - private function getFrameData() - { - return array( - 'file' => __DIR__ . '/../../fixtures/frame.lines-test.php', - 'line' => 0, - 'function' => 'test', - 'class' => 'MyClass', - 'args' => array(true, 'hello') - ); - } - - /** - * @param array $data - * @return Whoops\Exception\Frame - */ - private function getFrameInstance($data = null) - { - if($data === null) { - $data = $this->getFrameData(); - } - - return new Frame($data); - } - - /** - * @covers Whoops\Exception\Frame::getFile - */ - public function testGetFile() - { - $data = $this->getFrameData(); - $frame = $this->getFrameInstance($data); - - $this->assertEquals($frame->getFile(), $data['file']); - } - - /** - * @covers Whoops\Exception\Frame::getLine - */ - public function testGetLine() - { - $data = $this->getFrameData(); - $frame = $this->getFrameInstance($data); - - $this->assertEquals($frame->getLine(), $data['line']); - } - - /** - * @covers Whoops\Exception\Frame::getClass - */ - public function testGetClass() - { - $data = $this->getFrameData(); - $frame = $this->getFrameInstance($data); - - $this->assertEquals($frame->getClass(), $data['class']); - } - - /** - * @covers Whoops\Exception\Frame::getFunction - */ - public function testGetFunction() - { - $data = $this->getFrameData(); - $frame = $this->getFrameInstance($data); - - $this->assertEquals($frame->getFunction(), $data['function']); - } - - /** - * @covers Whoops\Exception\Frame::getArgs - */ - public function testGetArgs() - { - $data = $this->getFrameData(); - $frame = $this->getFrameInstance($data); - - $this->assertEquals($frame->getArgs(), $data['args']); - } - - /** - * @covers Whoops\Exception\Frame::getFileContents - */ - public function testGetFileContents() - { - $data = $this->getFrameData(); - $frame = $this->getFrameInstance($data); - - $this->assertEquals($frame->getFileContents(), file_get_contents($data['file'])); - } - - /** - * @covers Whoops\Exception\Frame::getFileLines - */ - public function testGetFileLines() - { - $data = $this->getFrameData(); - $frame = $this->getFrameInstance($data); - - $lines = explode("\n", $frame->getFileContents()); - $this->assertEquals($frame->getFileLines(), $lines); - } - - /** - * @covers Whoops\Exception\Frame::getFileLines - */ - public function testGetFileLinesRange() - { - $data = $this->getFrameData(); - $frame = $this->getFrameInstance($data); - - $lines = $frame->getFileLines(0, 3); - - $this->assertEquals($lines[0], 'assertEquals($lines[1], '// Line 2'); - $this->assertEquals($lines[2], '// Line 3'); - } - - /** - * @covers Whoops\Exception\Frame::addComment - * @covers Whoops\Exception\Frame::getComments - */ - public function testGetComments() - { - $frame = $this->getFrameInstance(); - $testComments = array( - 'Dang, yo!', - 'Errthangs broken!', - 'Dayumm!' - ); - - $frame->addComment($testComments[0]); - $frame->addComment($testComments[1]); - $frame->addComment($testComments[2]); - - $comments = $frame->getComments(); - - $this->assertCount(3, $comments); - - $this->assertEquals($comments[0]['comment'], $testComments[0]); - $this->assertEquals($comments[1]['comment'], $testComments[1]); - $this->assertEquals($comments[2]['comment'], $testComments[2]); - } - - /** - * @covers Whoops\Exception\Frame::addComment - * @covers Whoops\Exception\Frame::getComments - */ - public function testGetFilteredComments() - { - $frame = $this->getFrameInstance(); - $testComments = array( - array('Dang, yo!', 'test'), - array('Errthangs broken!', 'test'), - 'Dayumm!' - ); - - $frame->addComment($testComments[0][0], $testComments[0][1]); - $frame->addComment($testComments[1][0], $testComments[1][1]); - $frame->addComment($testComments[2][0], $testComments[2][1]); - - $comments = $frame->getComments('test'); - - $this->assertCount(2, $comments); - $this->assertEquals($comments[0]['comment'], $testComments[0][0]); - $this->assertEquals($comments[1]['comment'], $testComments[1][0]); - } - - /** - * @covers Whoops\Exception\Frame::serialize - * @covers Whoops\Exception\Frame::unserialize - */ - public function testFrameIsSerializable() - { - $data = $this->getFrameData(); - $frame = $this->getFrameInstance(); - $commentText = "Gee I hope this works"; - $commentContext = "test"; - - $frame->addComment($commentText, $commentContext); - - $serializedFrame = serialize($frame); - $newFrame = unserialize($serializedFrame); - - $this->assertInstanceOf('Whoops\\Exception\\Frame', $newFrame); - $this->assertEquals($newFrame->getFile(), $data['file']); - $this->assertEquals($newFrame->getLine(), $data['line']); - - $comments = $newFrame->getComments(); - $this->assertCount(1, $comments); - $this->assertEquals($comments[0]["comment"], $commentText); - $this->assertEquals($comments[0]["context"], $commentContext); - } -} diff --git a/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php b/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php deleted file mode 100644 index 7c78740f..00000000 --- a/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php +++ /dev/null @@ -1,67 +0,0 @@ - - */ - -namespace Whoops\Exception; -use Whoops\Exception\Inspector; -use Whoops\TestCase; -use RuntimeException; -use Exception; -use Mockery as m; - -class InspectorTest extends TestCase -{ - /** - * @param string $message - * @return Exception - */ - protected function getException($message = null) - { - return m::mock('Exception', array($message)); - } - - /** - * @param Exception $exception|null - * @return Whoops\Exception\Inspector - */ - protected function getInspectorInstance(Exception $exception = null) - { - return new Inspector($exception); - } - - /** - * @covers Whoops\Exception\Inspector::getExceptionName - */ - public function testReturnsCorrectExceptionName() - { - $exception = $this->getException(); - $inspector = $this->getInspectorInstance($exception); - - $this->assertEquals(get_class($exception), $inspector->getExceptionName()); - } - - /** - * @covers Whoops\Exception\Inspector::__construct - * @covers Whoops\Exception\Inspector::getException - */ - public function testExceptionIsStoredAndReturned() - { - $exception = $this->getException(); - $inspector = $this->getInspectorInstance($exception); - - $this->assertSame($exception, $inspector->getException()); - } - - /** - * @covers Whoops\Exception\Inspector::getFrames - */ - public function testGetFramesReturnsCollection() - { - $exception = $this->getException(); - $inspector = $this->getInspectorInstance($exception); - - $this->assertInstanceOf('Whoops\\Exception\\FrameCollection', $inspector->getFrames()); - } -} diff --git a/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php b/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php deleted file mode 100644 index 548d4f71..00000000 --- a/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php +++ /dev/null @@ -1,96 +0,0 @@ - - */ - -namespace Whoops\Handler; -use Whoops\TestCase; -use Whoops\Handler\JsonResponseHandler; -use RuntimeException; - -class JsonResponseHandlerTest extends TestCase -{ - /** - * @return Whoops\Handler\JsonResponseHandler - */ - private function getHandler() - { - return new JsonResponseHandler; - } - - /** - * @return RuntimeException - */ - public function getException($message = 'test message') - { - return new RuntimeException($message); - } - - /** - * @param bool $withTrace - * @return array - */ - private function getJsonResponseFromHandler($withTrace = false) - { - $handler = $this->getHandler(); - $handler->addTraceToOutput($withTrace); - - $run = $this->getRunInstance(); - $run->pushHandler($handler); - $run->register(); - - $exception = $this->getException(); - ob_start(); - $run->handleException($exception); - $json = json_decode(ob_get_clean(), true); - - // Check that the json response is parse-able: - $this->assertEquals(json_last_error(), JSON_ERROR_NONE); - - return $json; - } - - /** - * @covers Whoops\Handler\JsonResponseHandler::addTraceToOutput - * @covers Whoops\Handler\JsonResponseHandler::handle - */ - public function testReturnsWithoutFrames() - { - $json = $this->getJsonResponseFromHandler($withTrace = false); - - // Check that the response has the expected keys: - $this->assertArrayHasKey('error', $json); - $this->assertArrayHasKey('type', $json['error']); - $this->assertArrayHasKey('file', $json['error']); - $this->assertArrayHasKey('line', $json['error']); - - // Check the field values: - $this->assertEquals($json['error']['file'], __FILE__); - $this->assertEquals($json['error']['message'], 'test message'); - $this->assertEquals($json['error']['type'], get_class($this->getException())); - - // Check that the trace is NOT returned: - $this->assertArrayNotHasKey('trace', $json['error']); - } - - /** - * @covers Whoops\Handler\JsonResponseHandler::addTraceToOutput - * @covers Whoops\Handler\JsonResponseHandler::handle - */ - public function testReturnsWithFrames() - { - $json = $this->getJsonResponseFromHandler($withTrace = true); - - // Check that the trace is returned: - $this->assertArrayHasKey('trace', $json['error']); - - // Check that a random frame has the expected fields - $traceFrame = reset($json['error']['trace']); - $this->assertArrayHasKey('file', $traceFrame); - $this->assertArrayHasKey('line', $traceFrame); - $this->assertArrayHasKey('function', $traceFrame); - $this->assertArrayHasKey('class', $traceFrame); - $this->assertArrayHasKey('args', $traceFrame); - } -} diff --git a/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php b/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php deleted file mode 100644 index 3bc6c2ad..00000000 --- a/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php +++ /dev/null @@ -1,268 +0,0 @@ - - */ - -namespace Whoops\Handler; -use Whoops\TestCase; -use Whoops\Handler\PrettyPageHandler; -use RuntimeException; -use InvalidArgumentException; - -class PrettyPageHandlerTest extends TestCase -{ - /** - * @return Whoops\Handler\JsonResponseHandler - */ - private function getHandler() - { - return new PrettyPageHandler; - } - - /** - * @return RuntimeException - */ - public function getException() - { - return new RuntimeException; - } - - /** - * Test that PrettyPageHandle handles the template without - * any errors. - * @covers Whoops\Handler\PrettyPageHandler::handle - */ - public function testHandleWithoutErrors() - { - $run = $this->getRunInstance(); - $handler = $this->getHandler(); - - $run->pushHandler($handler); - - ob_start(); - $run->handleException($this->getException()); - ob_get_clean(); - } - - /** - * @covers Whoops\Handler\PrettyPageHandler::setPageTitle - * @covers Whoops\Handler\PrettyPageHandler::getPageTitle - */ - public function testGetSetPageTitle() - { - $title = 'My Cool Error Handler'; - $handler = $this->getHandler(); - $handler->setPageTitle($title); - - $this->assertEquals($title, $handler->getPagetitle()); - } - - /** - * @covers Whoops\Handler\PrettyPageHandler::setResourcesPath - * @covers Whoops\Handler\PrettyPageHandler::getResourcesPath - */ - public function testGetSetResourcesPath() - { - $path = __DIR__; // guaranteed to be valid! - $handler = $this->getHandler(); - - $handler->setResourcesPath($path); - $this->assertEquals($path, $handler->getResourcesPath()); - } - - /** - * @covers Whoops\Handler\PrettyPageHandler::setResourcesPath - * @expectedException InvalidArgumentException - */ - public function testSetInvalidResourcesPath() - { - $path = __DIR__ . '/ZIMBABWE'; // guaranteed to be invalid! - $this->getHandler()->setResourcesPath($path); - } - - /** - * @covers Whoops\Handler\PrettyPageHandler::getDataTables - * @covers Whoops\Handler\PrettyPageHandler::addDataTable - */ - public function testGetSetDataTables() - { - $handler = $this->getHandler(); - - // should have no tables by default: - $this->assertEmpty($handler->getDataTables()); - - $tableOne = array( - 'ice' => 'cream', - 'ice-ice' => 'baby' - ); - - $tableTwo = array( - 'dolan' =>'pls', - 'time' => time() - ); - - $handler->addDataTable('table 1', $tableOne); - $handler->addDataTable('table 2', $tableTwo); - - // should contain both tables: - $tables = $handler->getDataTables(); - $this->assertCount(2, $tables); - - $this->assertEquals($tableOne, $tables['table 1']); - $this->assertEquals($tableTwo, $tables['table 2']); - - // should contain only table 1 - $this->assertEquals($tableOne, $handler->getDataTables('table 1')); - - // should return an empty table: - $this->assertEmpty($handler->getDataTables('ZIMBABWE!')); - } - - /** - * @covers Whoops\Handler\PrettyPageHandler::getDataTables - * @covers Whoops\Handler\PrettyPageHandler::addDataTableCallback - */ - public function testSetCallbackDataTables() - { - $handler = $this->getHandler(); - - $this->assertEmpty($handler->getDataTables()); - $table1 = function() { - return array( - 'hammer' => 'time', - 'foo' => 'bar', - ); - }; - $expected1 = array('hammer' => 'time', 'foo' => 'bar'); - - $table2 = function() use ($expected1) { - return array( - 'another' => 'table', - 'this' => $expected1, - ); - }; - $expected2 = array('another' => 'table', 'this' => $expected1); - - $table3 = create_function('', 'return array("oh my" => "how times have changed!");'); - $expected3 = array('oh my' => 'how times have changed!'); - - // Sanity check, make sure expected values really are correct. - $this->assertSame($expected1, $table1()); - $this->assertSame($expected2, $table2()); - $this->assertSame($expected3, $table3()); - - $handler->addDataTableCallback('table1', $table1); - $handler->addDataTableCallback('table2', $table2); - $handler->addDataTableCallback('table3', $table3); - - $tables = $handler->getDataTables(); - $this->assertCount(3, $tables); - - // Supplied callable is wrapped in a closure - $this->assertInstanceOf('Closure', $tables['table1']); - $this->assertInstanceOf('Closure', $tables['table2']); - $this->assertInstanceOf('Closure', $tables['table3']); - - // Run each wrapped callable and check results against expected output. - $this->assertEquals($expected1, $tables['table1']()); - $this->assertEquals($expected2, $tables['table2']()); - $this->assertEquals($expected3, $tables['table3']()); - - $this->assertSame($tables['table1'], $handler->getDataTables('table1')); - $this->assertSame($expected1, call_user_func($handler->getDataTables('table1'))); - } - - /** - * @covers Whoops\Handler\PrettyPageHandler::setEditor - * @covers Whoops\Handler\PrettyPageHandler::getEditorHref - */ - public function testSetEditorSimple() - { - $handler = $this->getHandler(); - $handler->setEditor('sublime'); - - $this->assertEquals( - $handler->getEditorHref('/foo/bar.php', 10), - 'subl://open?url=file://%2Ffoo%2Fbar.php&line=10' - ); - - $this->assertEquals( - $handler->getEditorHref('/foo/with space?.php', 2324), - 'subl://open?url=file://%2Ffoo%2Fwith%20space%3F.php&line=2324' - ); - - $this->assertEquals( - $handler->getEditorHref('/foo/bar/with-dash.php', 0), - 'subl://open?url=file://%2Ffoo%2Fbar%2Fwith-dash.php&line=0' - ); - } - - /** - * @covers Whoops\Handler\PrettyPageHandler::setEditor - * @covers Whoops\Handler\PrettyPageHandler::getEditorHref - */ - public function testSetEditorCallable() - { - $handler = $this->getHandler(); - $handler->setEditor(function($file, $line) { - $file = rawurlencode($file); - $line = rawurlencode($line); - return "http://google.com/search/?q=$file:$line"; - }); - - $this->assertEquals( - $handler->getEditorHref('/foo/bar.php', 10), - 'http://google.com/search/?q=%2Ffoo%2Fbar.php:10' - ); - } - - /** - * @covers Whoops\Handler\PrettyPageHandler::setEditor - * @covers Whoops\Handler\PrettyPageHandler::addEditor - * @covers Whoops\Handler\PrettyPageHandler::getEditorHref - */ - public function testAddEditor() - { - $handler = $this->getHandler(); - $handler->addEditor('test-editor', function($file, $line) { - return "cool beans $file:$line"; - }); - - $handler->setEditor('test-editor'); - - $this->assertEquals( - $handler->getEditorHref('hello', 20), - 'cool beans hello:20' - ); - } - - public function testEditorXdebug() - { - if (!extension_loaded('xdebug')) { - $this->markTestSkipped('xdebug is not available'); - } - - $originalValue = ini_get('xdebug.file_link_format'); - - $handler = $this->getHandler(); - $handler->setEditor('xdebug'); - - ini_set('xdebug.file_link_format', '%f:%l'); - - $this->assertEquals( - '/foo/bar.php:10', - $handler->getEditorHref('/foo/bar.php', 10) - ); - - ini_set('xdebug.file_link_format', 'subl://open?url=%f&line=%l'); - - // xdebug doesn't do any URL encoded, matching that behaviour. - $this->assertEquals( - 'subl://open?url=/foo/with space?.php&line=2324', - $handler->getEditorHref('/foo/with space?.php', 2324) - ); - - ini_set('xdebug.file_link_format', $originalValue); - } -} diff --git a/vendor/filp/whoops/tests/Whoops/RunTest.php b/vendor/filp/whoops/tests/Whoops/RunTest.php deleted file mode 100644 index a3e1ce59..00000000 --- a/vendor/filp/whoops/tests/Whoops/RunTest.php +++ /dev/null @@ -1,330 +0,0 @@ - - */ - -namespace Whoops; -use Whoops\TestCase; -use Whoops\Run; -use Whoops\Handler\Handler; -use RuntimeException; -use ArrayObject; -use Mockery as m; - -class RunTest extends TestCase -{ - - /** - * @param string $message - * @return Exception - */ - protected function getException($message = null) - { - return m::mock('Exception', array($message)); - } - - /** - * @return Whoops\Handler\Handler - */ - protected function getHandler() - { - return m::mock('Whoops\\Handler\\Handler') - ->shouldReceive('setRun') - ->andReturn(null) - ->mock() - - ->shouldReceive('setInspector') - ->andReturn(null) - ->mock() - - ->shouldReceive('setException') - ->andReturn(null) - ->mock() - ; - } - - /** - * @covers Whoops\Run::clearHandlers - */ - public function testClearHandlers() - { - $run = $this->getRunInstance(); - $run->clearHandlers(); - - $handlers = $run->getHandlers(); - - $this->assertEmpty($handlers); - } - - /** - * @covers Whoops\Run::pushHandler - */ - public function testPushHandler() - { - $run = $this->getRunInstance(); - $run->clearHandlers(); - - $handlerOne = $this->getHandler(); - $handlerTwo = $this->getHandler(); - - $run->pushHandler($handlerOne); - $run->pushHandler($handlerTwo); - - $handlers = $run->getHandlers(); - - $this->assertCount(2, $handlers); - $this->assertContains($handlerOne, $handlers); - $this->assertContains($handlerTwo, $handlers); - } - - /** - * @expectedException InvalidArgumentException - * @covers Whoops\Run::pushHandler - */ - public function testPushInvalidHandler() - { - $run = $this->getRunInstance(); - $run->pushHandler($banana = 'actually turnip'); - } - - /** - * @covers Whoops\Run::pushHandler - */ - public function testPushClosureBecomesHandler() - { - $run = $this->getRunInstance(); - $run->pushHandler(function() {}); - $this->assertInstanceOf('Whoops\\Handler\\CallbackHandler', $run->popHandler()); - } - - /** - * @covers Whoops\Run::popHandler - * @covers Whoops\Run::getHandlers - */ - public function testPopHandler() - { - $run = $this->getRunInstance(); - - $handlerOne = $this->getHandler(); - $handlerTwo = $this->getHandler(); - $handlerThree = $this->getHandler(); - - $run->pushHandler($handlerOne); - $run->pushHandler($handlerTwo); - $run->pushHandler($handlerThree); - - $this->assertSame($handlerThree, $run->popHandler()); - $this->assertSame($handlerTwo, $run->popHandler()); - $this->assertSame($handlerOne, $run->popHandler()); - - // Should return null if there's nothing else in - // the stack - $this->assertNull($run->popHandler()); - - // Should be empty since we popped everything off - // the stack: - $this->assertEmpty($run->getHandlers()); - } - - /** - * @covers Whoops\Run::register - */ - public function testRegisterHandler() - { - $this->markTestSkipped("Need to test exception handler"); - - $run = $this->getRunInstance(); - $run->register(); - - $handler = $this->getHandler(); - $run->pushHandler($handler); - - throw $this->getException(); - - $this->assertCount(2, $handler->exceptions); - } - - /** - * @covers Whoops\Run::unregister - * @expectedException Exception - */ - public function testUnregisterHandler() - { - $run = $this->getRunInstance(); - $run->register(); - - $handler = $this->getHandler(); - $run->pushHandler($handler); - - $run->unregister(); - throw $this->getException("I'm not supposed to be caught!"); - } - - /** - * @covers Whoops\Run::pushHandler - * @covers Whoops\Run::getHandlers - */ - public function testHandlerHoldsOrder() - { - $run = $this->getRunInstance(); - - $handlerOne = $this->getHandler(); - $handlerTwo = $this->getHandler(); - $handlerThree = $this->getHandler(); - $handlerFour = $this->getHandler(); - - $run->pushHandler($handlerOne); - $run->pushHandler($handlerTwo); - $run->pushHandler($handlerThree); - $run->pushHandler($handlerFour); - - $handlers = $run->getHandlers(); - - $this->assertSame($handlers[0], $handlerOne); - $this->assertSame($handlers[1], $handlerTwo); - $this->assertSame($handlers[2], $handlerThree); - $this->assertSame($handlers[3], $handlerFour); - } - - /** - * @todo possibly split this up a bit and move - * some of this test to Handler unit tests? - * @covers Whoops\Run::handleException - */ - public function testHandlersGonnaHandle() - { - $run = $this->getRunInstance(); - $exception = $this->getException(); - $order = new ArrayObject; - - $handlerOne = $this->getHandler(); - $handlerTwo = $this->getHandler(); - $handlerThree = $this->getHandler(); - - $handlerOne->shouldReceive('handle') - ->andReturnUsing(function() use($order) { $order[] = 1; }); - $handlerTwo->shouldReceive('handle') - ->andReturnUsing(function() use($order) { $order[] = 2; }); - $handlerThree->shouldReceive('handle') - ->andReturnUsing(function() use($order) { $order[] = 3; }); - - $run->pushHandler($handlerOne); - $run->pushHandler($handlerTwo); - $run->pushHandler($handlerThree); - - // Get an exception to be handled, and verify that the handlers - // are given the handler, and in the inverse order they were - // registered. - $run->handleException($exception); - $this->assertEquals((array) $order, array(3, 2, 1)); - } - - /** - * @covers Whoops\Run::handleException - */ - public function testLastHandler() - { - $run = $this->getRunInstance(); - - $handlerOne = $this->getHandler(); - $handlerTwo = $this->getHandler(); - - $run->pushHandler($handlerOne); - $run->pushHandler($handlerTwo); - - $test = $this; - $handlerOne - ->shouldReceive('handle') - ->andReturnUsing(function () use($test) { - $test->fail('$handlerOne should not be called'); - }) - ; - - $handlerTwo - ->shouldReceive('handle') - ->andReturn(Handler::LAST_HANDLER) - ; - - $run->handleException($this->getException()); - } - - /** - * Test error suppression using @ operator. - */ - public function testErrorSuppression() - { - $run = $this->getRunInstance(); - $run->register(); - - $handler = $this->getHandler(); - $run->pushHandler($handler); - - $test = $this; - $handler - ->shouldReceive('handle') - ->andReturnUsing(function () use($test) { - $test->fail('$handler should not be called, error not suppressed'); - }) - ; - - @trigger_error("Test error suppression"); - } - - /** - * Test to make sure that error_reporting is respected. - */ - public function testErrorReporting() - { - $run = $this->getRunInstance(); - $run->register(); - - $handler = $this->getHandler(); - $run->pushHandler($handler); - - $test = $this; - $handler - ->shouldReceive('handle') - ->andReturnUsing(function () use($test) { - $test->fail('$handler should not be called, error_reporting not respected'); - }) - ; - - $oldLevel = error_reporting(E_ALL ^ E_USER_NOTICE); - trigger_error("Test error reporting", E_USER_NOTICE); - error_reporting($oldLevel); - } - - /** - * @covers Whoops\Run::handleException - * @covers Whoops\Run::writeToOutput - */ - public function testOutputIsSent() - { - $run = $this->getRunInstance(); - $run->pushHandler(function() { - echo "hello there"; - }); - - ob_start(); - $run->handleException(new RuntimeException); - $this->assertEquals("hello there", ob_get_clean()); - } - - /** - * @covers Whoops\Run::handleException - * @covers Whoops\Run::writeToOutput - */ - public function testOutputIsNotSent() - { - $run = $this->getRunInstance(); - $run->writeToOutput(false); - $run->pushHandler(function() { - echo "hello there"; - }); - - ob_start(); - $this->assertEquals("hello there", $run->handleException(new RuntimeException)); - $this->assertEquals("", ob_get_clean()); - } -} diff --git a/vendor/filp/whoops/tests/Whoops/TestCase.php b/vendor/filp/whoops/tests/Whoops/TestCase.php deleted file mode 100644 index f47c1a83..00000000 --- a/vendor/filp/whoops/tests/Whoops/TestCase.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - -namespace Whoops; -use Whoops\Run; - -class TestCase extends \PHPUnit_Framework_TestCase -{ - /** - * @return Whoops\Run - */ - protected function getRunInstance() - { - $run = new Run; - $run->allowQuit(false); - - return $run; - } -} diff --git a/vendor/filp/whoops/tests/bootstrap.php b/vendor/filp/whoops/tests/bootstrap.php deleted file mode 100644 index d88d7724..00000000 --- a/vendor/filp/whoops/tests/bootstrap.php +++ /dev/null @@ -1,11 +0,0 @@ - - * - * Bootstraper for PHPUnit tests. - */ -error_reporting(E_ALL | E_STRICT); -$_ENV['whoops-test'] = true; -$loader = require_once __DIR__ . '/../vendor/autoload.php'; -$loader->add('Whoops\\', __DIR__); diff --git a/vendor/filp/whoops/tests/fixtures/frame.lines-test.php b/vendor/filp/whoops/tests/fixtures/frame.lines-test.php deleted file mode 100644 index 687a0520..00000000 --- a/vendor/filp/whoops/tests/fixtures/frame.lines-test.php +++ /dev/null @@ -1,10 +0,0 @@ - 1.0.0" -gem "sass" -gem "compass" diff --git a/vendor/kriswallsmith/assetic/LICENSE b/vendor/kriswallsmith/assetic/LICENSE deleted file mode 100644 index 50b8e219..00000000 --- a/vendor/kriswallsmith/assetic/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010-2013 OpenSky Project Inc - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/kriswallsmith/assetic/README.md b/vendor/kriswallsmith/assetic/README.md deleted file mode 100644 index a446b22f..00000000 --- a/vendor/kriswallsmith/assetic/README.md +++ /dev/null @@ -1,340 +0,0 @@ -# Assetic [![Build Status](https://travis-ci.org/kriswallsmith/assetic.png?branch=master)](https://travis-ci.org/kriswallsmith/assetic) ![project status](http://stillmaintained.com/kriswallsmith/assetic.png) # - -Assetic is an asset management framework for PHP. - -``` php -dump(); -``` - -Assets ------- - -An Assetic asset is something with filterable content that can be loaded and -dumped. An asset also includes metadata, some of which can be manipulated and -some of which is immutable. - -| **Property** | **Accessor** | **Mutator** | -|--------------|-----------------|---------------| -| content | getContent | setContent | -| mtime | getLastModified | n/a | -| source root | getSourceRoot | n/a | -| source path | getSourcePath | n/a | -| target path | getTargetPath | setTargetPath | - -The "target path" property denotes where an asset (or an collection of assets) should be dumped. - -Filters -------- - -Filters can be applied to manipulate assets. - -``` php -dump(); -``` - -The filters applied to the collection will cascade to each asset leaf if you -iterate over it. - -``` php -dump(); -} -``` - -The core provides the following filters in the `Assetic\Filter` namespace: - - * `CoffeeScriptFilter`: compiles CoffeeScript into Javascript - * `CompassFilter`: Compass CSS authoring framework - * `CssEmbedFilter`: embeds image data in your stylesheets - * `CssImportFilter`: inlines imported stylesheets - * `CssMinFilter`: minifies CSS - * `CssRewriteFilter`: fixes relative URLs in CSS assets when moving to a new URL - * `DartFilter`: compiles Javascript using dart2js - * `EmberPrecompileFilter`: precompiles Handlebars templates into Javascript for use in the Ember.js framework - * `GoogleClosure\CompilerApiFilter`: compiles Javascript using the Google Closure Compiler API - * `GoogleClosure\CompilerJarFilter`: compiles Javascript using the Google Closure Compiler JAR - * `GssFilter`: compliles CSS using the Google Closure Stylesheets Compiler - * `HandlebarsFilter`: compiles Handlebars templates into Javascript - * `JpegoptimFilter`: optimize your JPEGs - * `JpegtranFilter`: optimize your JPEGs - * `JSMinFilter`: minifies Javascript - * `JSMinPlusFilter`: minifies Javascript - * `LessFilter`: parses LESS into CSS (using less.js with node.js) - * `LessphpFilter`: parses LESS into CSS (using lessphp) - * `OptiPngFilter`: optimize your PNGs - * `PackagerFilter`: parses Javascript for packager tags - * `PackerFilter`: compresses Javascript using Dean Edwards's Packer - * `PhpCssEmbedFilter`: embeds image data in your stylesheet - * `PngoutFilter`: optimize your PNGs - * `Sass\SassFilter`: parses SASS into CSS - * `Sass\ScssFilter`: parses SCSS into CSS - * `ScssphpFilter`: parses SCSS using scssphp - * `SprocketsFilter`: Sprockets Javascript dependency management - * `StylusFilter`: parses STYL into CSS - * `TypeScriptFilter`: parses TypeScript into Javascript - * `UglifyCssFilter`: minifies CSS - * `UglifyJs2Filter`: minifies Javascript - * `UglifyJsFilter`: minifies Javascript - * `Yui\CssCompressorFilter`: compresses CSS using the YUI compressor - * `Yui\JsCompressorFilter`: compresses Javascript using the YUI compressor - -Asset Manager -------------- - -An asset manager is provided for organizing assets. - -``` php -set('jquery', new FileAsset('/path/to/jquery.js')); -$am->set('base_css', new GlobAsset('/path/to/css/*')); -``` - -The asset manager can also be used to reference assets to avoid duplication. - -``` php -set('my_plugin', new AssetCollection(array( - new AssetReference($am, 'jquery'), - new FileAsset('/path/to/jquery.plugin.js'), -))); -``` - -Filter Manager --------------- - -A filter manager is also provided for organizing filters. - -``` php -set('sass', new SassFilter('/path/to/parser/sass')); -$fm->set('yui_css', new Yui\CssCompressorFilter('/path/to/yuicompressor.jar')); -``` - -Asset Factory -------------- - -If you'd rather not create all these objects by hand, you can use the asset -factory, which will do most of the work for you. - -``` php -setAssetManager($am); -$factory->setFilterManager($fm); -$factory->setDebug(true); - -$css = $factory->createAsset(array( - '@reset', // load the asset manager's "reset" asset - 'css/src/*.scss', // load every scss files from "/path/to/asset/directory/css/src/" -), array( - 'scss', // filter through the filter manager's "scss" filter - '?yui_css', // don't use this filter in debug mode -)); - -echo $css->dump(); -``` - -The `AssetFactory` is constructed with a root directory which is used as the base directory for relative asset paths. - -Prefixing a filter name with a question mark, as `yui_css` is here, will cause -that filter to be omitted when the factory is in debug mode. - -You can also register [Workers](src/Assetic/Factory/Worker/WorkerInterface.php) on the factory and all assets created -by it will be passed to the worker's `process()` method before being returned. See _Cache Busting_ below for an example. - -Dumping Assets to static files ------------------------------- - -You can dump all the assets an AssetManager holds to files in a directory. This will probably be below your webserver's document root -so the files can be served statically. - -``` php -writeManagerAssets($am); -``` - -This will make use of the assets' target path. - -Cache Busting -------------- - -If you serve your assets from static files as just described, you can use the CacheBustingWorker to rewrite the target -paths for assets. It will insert an identifier before the filename extension that is unique for a particular version -of the asset. - -This identifier is based on the modification time of the asset and will also take depended-on assets into -consideration if the applied filters support it. - -``` php -setAssetManager($am); -$factory->setFilterManager($fm); -$factory->setDebug(true); -$factory->addWorker(new CacheBustingWorker(new LazyAssetManager($factory))); - -$css = $factory->createAsset(array( - '@reset', // load the asset manager's "reset" asset - 'css/src/*.scss', // load every scss files from "/path/to/asset/directory/css/src/" -), array( - 'scss', // filter through the filter manager's "scss" filter - '?yui_css', // don't use this filter in debug mode -)); - -echo $css->dump(); -``` - -Internal caching -------- - -A simple caching mechanism is provided to avoid unnecessary work. - -``` php -dump(); -$js->dump(); -$js->dump(); -``` - -Twig ----- - -To use the Assetic [Twig][3] extension you must register it to your Twig -environment: - -``` php -addExtension(new AsseticExtension($factory, $debug)); -``` - -Once in place, the extension exposes a stylesheets and a javascripts tag with a syntax similar -to what the asset factory uses: - -``` html+jinja -{% stylesheets '/path/to/sass/main.sass' filter='sass,?yui_css' output='css/all.css' %} - -{% endstylesheets %} -``` - -This example will render one `link` element on the page that includes a URL -where the filtered asset can be found. - -When the extension is in debug mode, this same tag will render multiple `link` -elements, one for each asset referenced by the `css/src/*.sass` glob. The -specified filters will still be applied, unless they are marked as optional -using the `?` prefix. - -This behavior can also be triggered by setting a `debug` attribute on the tag: - -``` html+jinja -{% stylesheets 'css/*' debug=true %} ... {% stylesheets %} -``` - -These assets need to be written to the web directory so these URLs don't -return 404 errors. - -``` php -setLoader('twig', new TwigFormulaLoader($twig)); - -// loop through all your templates -foreach ($templates as $template) { - $resource = new TwigResource($twigLoader, $template); - $am->addResource($resource, 'twig'); -} - -$writer = new AssetWriter('/path/to/web'); -$writer->writeManagerAssets($am); -``` - ---- - -Assetic is based on the Python [webassets][1] library (available on -[GitHub][2]). - -[1]: http://elsdoerfer.name/docs/webassets -[2]: https://github.com/miracle2k/webassets -[3]: http://twig.sensiolabs.org diff --git a/vendor/kriswallsmith/assetic/composer.json b/vendor/kriswallsmith/assetic/composer.json deleted file mode 100644 index 10fc8b4e..00000000 --- a/vendor/kriswallsmith/assetic/composer.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "kriswallsmith/assetic", - "minimum-stability": "dev", - "description": "Asset Management for PHP", - "keywords": [ "assets", "compression", "minification" ], - "homepage": "https://github.com/kriswallsmith/assetic", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Kris Wallsmith", - "email": "kris.wallsmith@gmail.com", - "homepage": "http://kriswallsmith.net/" - } - ], - "require": { - "php": ">=5.3.1", - "symfony/process": "~2.1" - }, - "require-dev": { - "phpunit/phpunit": "~3.7", - "twig/twig": "~1.6", - "leafo/lessphp": "*", - "leafo/scssphp": "*", - "ptachoire/cssembed": "*", - "leafo/scssphp-compass": "*", - - "cssmin/cssmin": "*", - "mrclay/minify": "*", - "kamicane/packager": "*", - "joliclic/javascript-packer": "*" - }, - "suggest": { - "twig/twig": "Assetic provides the integration with the Twig templating engine", - "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", - "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler", - "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", - "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin" - }, - "autoload": { - "psr-0": { "Assetic": "src/" }, - "files": [ "src/functions.php" ] - }, - "config": { - "bin-dir": "bin" - }, - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "repositories": [ - { - "type": "package", - "package": { - "name": "cssmin/cssmin", - "version": "3.0.1", - "dist": { "url": "http://cssmin.googlecode.com/files/cssmin-v3.0.1.php", "type": "file" }, - "autoload": { "classmap": [ "cssmin-v3.0.1.php" ] } - } - }, - { - "type": "package", - "package": { - "name": "kamicane/packager", - "version": "1.0", - "dist": { "url": "https://github.com/kamicane/packager/archive/1.0.zip", "type": "zip" }, - "autoload": { "classmap": [ "." ] } - } - }, - { - "type": "package", - "package": { - "name": "joliclic/javascript-packer", - "version": "1.1", - "dist": { "url": "http://joliclic.free.fr/php/javascript-packer/telechargement.php?id=2&action=telecharger", "type": "zip" }, - "autoload": { "classmap": [ "class.JavaScriptPacker.php" ] } - } - } - ] -} diff --git a/vendor/kriswallsmith/assetic/package.json b/vendor/kriswallsmith/assetic/package.json deleted file mode 100644 index d43d3bbe..00000000 --- a/vendor/kriswallsmith/assetic/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "devDependencies": { - "uglifycss": "*", - "coffee-script": "*", - "stylus": "*", - "nib": "*", - "ember-precompile": "*", - "typescript": "*", - "less": "*", - "handlebars": "*", - "uglify-js": "*" - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCache.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCache.php deleted file mode 100644 index 01793901..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCache.php +++ /dev/null @@ -1,169 +0,0 @@ - - */ -class AssetCache implements AssetInterface -{ - private $asset; - private $cache; - - public function __construct(AssetInterface $asset, CacheInterface $cache) - { - $this->asset = $asset; - $this->cache = $cache; - } - - public function ensureFilter(FilterInterface $filter) - { - $this->asset->ensureFilter($filter); - } - - public function getFilters() - { - return $this->asset->getFilters(); - } - - public function clearFilters() - { - $this->asset->clearFilters(); - } - - public function load(FilterInterface $additionalFilter = null) - { - $cacheKey = self::getCacheKey($this->asset, $additionalFilter, 'load'); - if ($this->cache->has($cacheKey)) { - $this->asset->setContent($this->cache->get($cacheKey)); - - return; - } - - $this->asset->load($additionalFilter); - $this->cache->set($cacheKey, $this->asset->getContent()); - } - - public function dump(FilterInterface $additionalFilter = null) - { - $cacheKey = self::getCacheKey($this->asset, $additionalFilter, 'dump'); - if ($this->cache->has($cacheKey)) { - return $this->cache->get($cacheKey); - } - - $content = $this->asset->dump($additionalFilter); - $this->cache->set($cacheKey, $content); - - return $content; - } - - public function getContent() - { - return $this->asset->getContent(); - } - - public function setContent($content) - { - $this->asset->setContent($content); - } - - public function getSourceRoot() - { - return $this->asset->getSourceRoot(); - } - - public function getSourcePath() - { - return $this->asset->getSourcePath(); - } - - public function getTargetPath() - { - return $this->asset->getTargetPath(); - } - - public function setTargetPath($targetPath) - { - $this->asset->setTargetPath($targetPath); - } - - public function getLastModified() - { - return $this->asset->getLastModified(); - } - - public function getVars() - { - return $this->asset->getVars(); - } - - public function setValues(array $values) - { - $this->asset->setValues($values); - } - - public function getValues() - { - return $this->asset->getValues(); - } - - /** - * Returns a cache key for the current asset. - * - * The key is composed of everything but an asset's content: - * - * * source root - * * source path - * * target url - * * last modified - * * filters - * - * @param AssetInterface $asset The asset - * @param FilterInterface $additionalFilter Any additional filter being applied - * @param string $salt Salt for the key - * - * @return string A key for identifying the current asset - */ - private static function getCacheKey(AssetInterface $asset, FilterInterface $additionalFilter = null, $salt = '') - { - if ($additionalFilter) { - $asset = clone $asset; - $asset->ensureFilter($additionalFilter); - } - - $cacheKey = $asset->getSourceRoot(); - $cacheKey .= $asset->getSourcePath(); - $cacheKey .= $asset->getTargetPath(); - $cacheKey .= $asset->getLastModified(); - - foreach ($asset->getFilters() as $filter) { - if ($filter instanceof HashableInterface) { - $cacheKey .= $filter->hash(); - } else { - $cacheKey .= serialize($filter); - } - } - - if ($values = $asset->getValues()) { - asort($values); - $cacheKey .= serialize($values); - } - - return md5($cacheKey.$salt); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php deleted file mode 100644 index 6cfa3e86..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php +++ /dev/null @@ -1,233 +0,0 @@ - - */ -class AssetCollection implements \IteratorAggregate, AssetCollectionInterface -{ - private $assets; - private $filters; - private $sourceRoot; - private $targetPath; - private $content; - private $clones; - private $vars; - private $values; - - /** - * Constructor. - * - * @param array $assets Assets for the current collection - * @param array $filters Filters for the current collection - * @param string $sourceRoot The root directory - * @param array $vars - */ - public function __construct($assets = array(), $filters = array(), $sourceRoot = null, array $vars = array()) - { - $this->assets = array(); - foreach ($assets as $asset) { - $this->add($asset); - } - - $this->filters = new FilterCollection($filters); - $this->sourceRoot = $sourceRoot; - $this->clones = new \SplObjectStorage(); - $this->vars = $vars; - $this->values = array(); - } - - public function __clone() - { - $this->filters = clone $this->filters; - $this->clones = new \SplObjectStorage(); - } - - public function all() - { - return $this->assets; - } - - public function add(AssetInterface $asset) - { - $this->assets[] = $asset; - } - - public function removeLeaf(AssetInterface $needle, $graceful = false) - { - foreach ($this->assets as $i => $asset) { - $clone = isset($this->clones[$asset]) ? $this->clones[$asset] : null; - if (in_array($needle, array($asset, $clone), true)) { - unset($this->clones[$asset], $this->assets[$i]); - - return true; - } - - if ($asset instanceof AssetCollectionInterface && $asset->removeLeaf($needle, true)) { - return true; - } - } - - if ($graceful) { - return false; - } - - throw new \InvalidArgumentException('Leaf not found.'); - } - - public function replaceLeaf(AssetInterface $needle, AssetInterface $replacement, $graceful = false) - { - foreach ($this->assets as $i => $asset) { - $clone = isset($this->clones[$asset]) ? $this->clones[$asset] : null; - if (in_array($needle, array($asset, $clone), true)) { - unset($this->clones[$asset]); - $this->assets[$i] = $replacement; - - return true; - } - - if ($asset instanceof AssetCollectionInterface && $asset->replaceLeaf($needle, $replacement, true)) { - return true; - } - } - - if ($graceful) { - return false; - } - - throw new \InvalidArgumentException('Leaf not found.'); - } - - public function ensureFilter(FilterInterface $filter) - { - $this->filters->ensure($filter); - } - - public function getFilters() - { - return $this->filters->all(); - } - - public function clearFilters() - { - $this->filters->clear(); - } - - public function load(FilterInterface $additionalFilter = null) - { - // loop through leaves and load each asset - $parts = array(); - foreach ($this as $asset) { - $asset->load($additionalFilter); - $parts[] = $asset->getContent(); - } - - $this->content = implode("\n", $parts); - } - - public function dump(FilterInterface $additionalFilter = null) - { - // loop through leaves and dump each asset - $parts = array(); - foreach ($this as $asset) { - $parts[] = $asset->dump($additionalFilter); - } - - return implode("\n", $parts); - } - - public function getContent() - { - return $this->content; - } - - public function setContent($content) - { - $this->content = $content; - } - - public function getSourceRoot() - { - return $this->sourceRoot; - } - - public function getSourcePath() - { - } - - public function getTargetPath() - { - return $this->targetPath; - } - - public function setTargetPath($targetPath) - { - $this->targetPath = $targetPath; - } - - /** - * Returns the highest last-modified value of all assets in the current collection. - * - * @return integer|null A UNIX timestamp - */ - public function getLastModified() - { - if (!count($this->assets)) { - return; - } - - $mtime = 0; - foreach ($this as $asset) { - $assetMtime = $asset->getLastModified(); - if ($assetMtime > $mtime) { - $mtime = $assetMtime; - } - } - - return $mtime; - } - - /** - * Returns an iterator for looping recursively over unique leaves. - */ - public function getIterator() - { - return new \RecursiveIteratorIterator(new AssetCollectionFilterIterator(new AssetCollectionIterator($this, $this->clones))); - } - - public function getVars() - { - return $this->vars; - } - - public function setValues(array $values) - { - $this->values = $values; - - foreach ($this as $asset) { - $asset->setValues(array_intersect_key($values, array_flip($asset->getVars()))); - } - } - - public function getValues() - { - return $this->values; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollectionInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollectionInterface.php deleted file mode 100644 index 8a7927ea..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollectionInterface.php +++ /dev/null @@ -1,59 +0,0 @@ - - */ -interface AssetCollectionInterface extends AssetInterface, \Traversable -{ - /** - * Returns all child assets. - * - * @return array An array of AssetInterface objects - */ - public function all(); - - /** - * Adds an asset to the current collection. - * - * @param AssetInterface $asset An asset - */ - public function add(AssetInterface $asset); - - /** - * Removes a leaf. - * - * @param AssetInterface $leaf The leaf to remove - * @param Boolean $graceful Whether the failure should return false or throw an exception - * - * @return Boolean Whether the asset has been found - * - * @throws \InvalidArgumentException If the asset cannot be found - */ - public function removeLeaf(AssetInterface $leaf, $graceful = false); - - /** - * Replaces an existing leaf with a new one. - * - * @param AssetInterface $needle The current asset to replace - * @param AssetInterface $replacement The new asset - * @param Boolean $graceful Whether the failure should return false or throw an exception - * - * @return Boolean Whether the asset has been found - * - * @throws \InvalidArgumentException If the asset cannot be found - */ - public function replaceLeaf(AssetInterface $needle, AssetInterface $replacement, $graceful = false); -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetInterface.php deleted file mode 100644 index 0f36aea0..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetInterface.php +++ /dev/null @@ -1,156 +0,0 @@ - - */ -interface AssetInterface -{ - /** - * Ensures the current asset includes the supplied filter. - * - * @param FilterInterface $filter A filter - */ - public function ensureFilter(FilterInterface $filter); - - /** - * Returns an array of filters currently applied. - * - * @return array An array of filters - */ - public function getFilters(); - - /** - * Clears all filters from the current asset. - */ - public function clearFilters(); - - /** - * Loads the asset into memory and applies load filters. - * - * You may provide an additional filter to apply during load. - * - * @param FilterInterface $additionalFilter An additional filter - */ - public function load(FilterInterface $additionalFilter = null); - - /** - * Applies dump filters and returns the asset as a string. - * - * You may provide an additional filter to apply during dump. - * - * Dumping an asset should not change its state. - * - * If the current asset has not been loaded yet, it should be - * automatically loaded at this time. - * - * @param FilterInterface $additionalFilter An additional filter - * - * @return string The filtered content of the current asset - */ - public function dump(FilterInterface $additionalFilter = null); - - /** - * Returns the loaded content of the current asset. - * - * @return string The content - */ - public function getContent(); - - /** - * Sets the content of the current asset. - * - * Filters can use this method to change the content of the asset. - * - * @param string $content The asset content - */ - public function setContent($content); - - /** - * Returns an absolute path or URL to the source asset's root directory. - * - * This value should be an absolute path to a directory in the filesystem, - * an absolute URL with no path, or null. - * - * For example: - * - * * '/path/to/web' - * * 'http://example.com' - * * null - * - * @return string|null The asset's root - */ - public function getSourceRoot(); - - /** - * Returns the relative path for the source asset. - * - * This value can be combined with the asset's source root (if both are - * non-null) to get something compatible with file_get_contents(). - * - * For example: - * - * * 'js/main.js' - * * 'main.js' - * * null - * - * @return string|null The source asset path - */ - public function getSourcePath(); - - /** - * Returns the URL for the current asset. - * - * @return string|null A web URL where the asset will be dumped - */ - public function getTargetPath(); - - /** - * Sets the URL for the current asset. - * - * @param string $targetPath A web URL where the asset will be dumped - */ - public function setTargetPath($targetPath); - - /** - * Returns the time the current asset was last modified. - * - * @return integer|null A UNIX timestamp - */ - public function getLastModified(); - - /** - * Returns an array of variable names for this asset. - * - * @return array - */ - public function getVars(); - - /** - * Sets the values for the asset's variables. - * - * @param array $values - */ - public function setValues(array $values); - - /** - * Returns the current values for this asset. - * - * @return array an array of strings - */ - public function getValues(); -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetReference.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetReference.php deleted file mode 100644 index 57c3930a..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetReference.php +++ /dev/null @@ -1,133 +0,0 @@ - - */ -class AssetReference implements AssetInterface -{ - private $am; - private $name; - private $filters = array(); - - public function __construct(AssetManager $am, $name) - { - $this->am = $am; - $this->name = $name; - } - - public function ensureFilter(FilterInterface $filter) - { - $this->filters[] = $filter; - } - - public function getFilters() - { - $this->flushFilters(); - - return $this->callAsset(__FUNCTION__); - } - - public function clearFilters() - { - $this->filters = array(); - $this->callAsset(__FUNCTION__); - } - - public function load(FilterInterface $additionalFilter = null) - { - $this->flushFilters(); - - return $this->callAsset(__FUNCTION__, array($additionalFilter)); - } - - public function dump(FilterInterface $additionalFilter = null) - { - $this->flushFilters(); - - return $this->callAsset(__FUNCTION__, array($additionalFilter)); - } - - public function getContent() - { - return $this->callAsset(__FUNCTION__); - } - - public function setContent($content) - { - $this->callAsset(__FUNCTION__, array($content)); - } - - public function getSourceRoot() - { - return $this->callAsset(__FUNCTION__); - } - - public function getSourcePath() - { - return $this->callAsset(__FUNCTION__); - } - - public function getTargetPath() - { - return $this->callAsset(__FUNCTION__); - } - - public function setTargetPath($targetPath) - { - $this->callAsset(__FUNCTION__, array($targetPath)); - } - - public function getLastModified() - { - return $this->callAsset(__FUNCTION__); - } - - public function getVars() - { - return $this->callAsset(__FUNCTION__); - } - - public function getValues() - { - return $this->callAsset(__FUNCTION__); - } - - public function setValues(array $values) - { - $this->callAsset(__FUNCTION__, array($values)); - } - - // private - - private function callAsset($method, $arguments = array()) - { - $asset = $this->am->get($this->name); - - return call_user_func_array(array($asset, $method), $arguments); - } - - private function flushFilters() - { - $asset = $this->am->get($this->name); - - while ($filter = array_shift($this->filters)) { - $asset->ensureFilter($filter); - } - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php deleted file mode 100644 index 12b03406..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php +++ /dev/null @@ -1,172 +0,0 @@ - - */ -abstract class BaseAsset implements AssetInterface -{ - private $filters; - private $sourceRoot; - private $sourcePath; - private $targetPath; - private $content; - private $loaded; - private $vars; - private $values; - - /** - * Constructor. - * - * @param array $filters Filters for the asset - * @param string $sourceRoot The root directory - * @param string $sourcePath The asset path - * @param array $vars - */ - public function __construct($filters = array(), $sourceRoot = null, $sourcePath = null, array $vars = array()) - { - $this->filters = new FilterCollection($filters); - $this->sourceRoot = $sourceRoot; - $this->sourcePath = $sourcePath; - $this->vars = $vars; - $this->values = array(); - $this->loaded = false; - } - - public function __clone() - { - $this->filters = clone $this->filters; - } - - public function ensureFilter(FilterInterface $filter) - { - $this->filters->ensure($filter); - } - - public function getFilters() - { - return $this->filters->all(); - } - - public function clearFilters() - { - $this->filters->clear(); - } - - /** - * Encapsulates asset loading logic. - * - * @param string $content The asset content - * @param FilterInterface $additionalFilter An additional filter - */ - protected function doLoad($content, FilterInterface $additionalFilter = null) - { - $filter = clone $this->filters; - if ($additionalFilter) { - $filter->ensure($additionalFilter); - } - - $asset = clone $this; - $asset->setContent($content); - - $filter->filterLoad($asset); - $this->content = $asset->getContent(); - - $this->loaded = true; - } - - public function dump(FilterInterface $additionalFilter = null) - { - if (!$this->loaded) { - $this->load(); - } - - $filter = clone $this->filters; - if ($additionalFilter) { - $filter->ensure($additionalFilter); - } - - $asset = clone $this; - $filter->filterDump($asset); - - return $asset->getContent(); - } - - public function getContent() - { - return $this->content; - } - - public function setContent($content) - { - $this->content = $content; - } - - public function getSourceRoot() - { - return $this->sourceRoot; - } - - public function getSourcePath() - { - return $this->sourcePath; - } - - public function getTargetPath() - { - return $this->targetPath; - } - - public function setTargetPath($targetPath) - { - if ($this->vars) { - foreach ($this->vars as $var) { - if (false === strpos($targetPath, $var)) { - throw new \RuntimeException(sprintf('The asset target path "%s" must contain the variable "{%s}".', $targetPath, $var)); - } - } - } - - $this->targetPath = $targetPath; - } - - public function getVars() - { - return $this->vars; - } - - public function setValues(array $values) - { - foreach ($values as $var => $v) { - if (!in_array($var, $this->vars, true)) { - throw new \InvalidArgumentException(sprintf('The asset with source path "%s" has no variable named "%s".', $this->sourcePath, $var)); - } - } - - $this->values = $values; - $this->loaded = false; - } - - public function getValues() - { - return $this->values; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php deleted file mode 100644 index 7a7e1132..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php +++ /dev/null @@ -1,78 +0,0 @@ - - */ -class FileAsset extends BaseAsset -{ - private $source; - - /** - * Constructor. - * - * @param string $source An absolute path - * @param array $filters An array of filters - * @param string $sourceRoot The source asset root directory - * @param string $sourcePath The source asset path - * @param array $vars - * - * @throws \InvalidArgumentException If the supplied root doesn't match the source when guessing the path - */ - public function __construct($source, $filters = array(), $sourceRoot = null, $sourcePath = null, array $vars = array()) - { - if (null === $sourceRoot) { - $sourceRoot = dirname($source); - if (null === $sourcePath) { - $sourcePath = basename($source); - } - } elseif (null === $sourcePath) { - if (0 !== strpos($source, $sourceRoot)) { - throw new \InvalidArgumentException(sprintf('The source "%s" is not in the root directory "%s"', $source, $sourceRoot)); - } - - $sourcePath = substr($source, strlen($sourceRoot) + 1); - } - - $this->source = $source; - - parent::__construct($filters, $sourceRoot, $sourcePath, $vars); - } - - public function load(FilterInterface $additionalFilter = null) - { - $source = VarUtils::resolve($this->source, $this->getVars(), $this->getValues()); - - if (!is_file($source)) { - throw new \RuntimeException(sprintf('The source file "%s" does not exist.', $source)); - } - - $this->doLoad(file_get_contents($source), $additionalFilter); - } - - public function getLastModified() - { - $source = VarUtils::resolve($this->source, $this->getVars(), $this->getValues()); - - if (!is_file($source)) { - throw new \RuntimeException(sprintf('The source file "%s" does not exist.', $source)); - } - - return filemtime($source); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php deleted file mode 100644 index f6c32ab7..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php +++ /dev/null @@ -1,113 +0,0 @@ - - */ -class GlobAsset extends AssetCollection -{ - private $globs; - private $initialized; - - /** - * Constructor. - * - * @param string|array $globs A single glob path or array of paths - * @param array $filters An array of filters - * @param string $root The root directory - * @param array $vars - */ - public function __construct($globs, $filters = array(), $root = null, array $vars = array()) - { - $this->globs = (array) $globs; - $this->initialized = false; - - parent::__construct(array(), $filters, $root, $vars); - } - - public function all() - { - if (!$this->initialized) { - $this->initialize(); - } - - return parent::all(); - } - - public function load(FilterInterface $additionalFilter = null) - { - if (!$this->initialized) { - $this->initialize(); - } - - parent::load($additionalFilter); - } - - public function dump(FilterInterface $additionalFilter = null) - { - if (!$this->initialized) { - $this->initialize(); - } - - return parent::dump($additionalFilter); - } - - public function getLastModified() - { - if (!$this->initialized) { - $this->initialize(); - } - - return parent::getLastModified(); - } - - public function getIterator() - { - if (!$this->initialized) { - $this->initialize(); - } - - return parent::getIterator(); - } - - public function setValues(array $values) - { - parent::setValues($values); - $this->initialized = false; - } - - /** - * Initializes the collection based on the glob(s) passed in. - */ - private function initialize() - { - foreach ($this->globs as $glob) { - $glob = VarUtils::resolve($glob, $this->getVars(), $this->getValues()); - - if (false !== $paths = glob($glob)) { - foreach ($paths as $path) { - if (is_file($path)) { - $this->add(new FileAsset($path, array(), $this->getSourceRoot())); - } - } - } - } - - $this->initialized = true; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/HttpAsset.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/HttpAsset.php deleted file mode 100644 index eea23501..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/HttpAsset.php +++ /dev/null @@ -1,79 +0,0 @@ - - */ -class HttpAsset extends BaseAsset -{ - private $sourceUrl; - private $ignoreErrors; - - /** - * Constructor. - * - * @param string $sourceUrl The source URL - * @param array $filters An array of filters - * @param Boolean $ignoreErrors - * @param array $vars - * - * @throws \InvalidArgumentException If the first argument is not an URL - */ - public function __construct($sourceUrl, $filters = array(), $ignoreErrors = false, array $vars = array()) - { - if (0 === strpos($sourceUrl, '//')) { - $sourceUrl = 'http:'.$sourceUrl; - } elseif (false === strpos($sourceUrl, '://')) { - throw new \InvalidArgumentException(sprintf('"%s" is not a valid URL.', $sourceUrl)); - } - - $this->sourceUrl = $sourceUrl; - $this->ignoreErrors = $ignoreErrors; - - list($scheme, $url) = explode('://', $sourceUrl, 2); - list($host, $path) = explode('/', $url, 2); - - parent::__construct($filters, $scheme.'://'.$host, $path, $vars); - } - - public function load(FilterInterface $additionalFilter = null) - { - $content = @file_get_contents( - VarUtils::resolve($this->sourceUrl, $this->getVars(), $this->getValues()) - ); - - if (false === $content && !$this->ignoreErrors) { - throw new \RuntimeException(sprintf('Unable to load asset from URL "%s"', $this->sourceUrl)); - } - - $this->doLoad($content, $additionalFilter); - } - - public function getLastModified() - { - if (false !== @file_get_contents($this->sourceUrl, false, stream_context_create(array('http' => array('method' => 'HEAD'))))) { - foreach ($http_response_header as $header) { - if (0 === stripos($header, 'Last-Modified: ')) { - list(, $mtime) = explode(':', $header, 2); - - return strtotime(trim($mtime)); - } - } - } - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionFilterIterator.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionFilterIterator.php deleted file mode 100644 index de9c169e..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionFilterIterator.php +++ /dev/null @@ -1,84 +0,0 @@ - - */ -class AssetCollectionFilterIterator extends \RecursiveFilterIterator -{ - private $visited; - private $sources; - - /** - * Constructor. - * - * @param AssetCollectionIterator $iterator The inner iterator - * @param array $visited An array of visited asset objects - * @param array $sources An array of visited source strings - */ - public function __construct(AssetCollectionIterator $iterator, array $visited = array(), array $sources = array()) - { - parent::__construct($iterator); - - $this->visited = $visited; - $this->sources = $sources; - } - - /** - * Determines whether the current asset is a duplicate. - * - * De-duplication is performed based on either strict equality or by - * matching sources. - * - * @return Boolean Returns true if we have not seen this asset yet - */ - public function accept() - { - $asset = $this->getInnerIterator()->current(true); - $duplicate = false; - - // check strict equality - if (in_array($asset, $this->visited, true)) { - $duplicate = true; - } else { - $this->visited[] = $asset; - } - - // check source - $sourceRoot = $asset->getSourceRoot(); - $sourcePath = $asset->getSourcePath(); - if ($sourceRoot && $sourcePath) { - $source = $sourceRoot.'/'.$sourcePath; - if (in_array($source, $this->sources)) { - $duplicate = true; - } else { - $this->sources[] = $source; - } - } - - return !$duplicate; - } - - /** - * Passes visited objects and source URLs to the child iterator. - */ - public function getChildren() - { - return new self($this->getInnerIterator()->getChildren(), $this->visited, $this->sources); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php deleted file mode 100644 index 134b0a86..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php +++ /dev/null @@ -1,110 +0,0 @@ - - */ -class AssetCollectionIterator implements \RecursiveIterator -{ - private $assets; - private $filters; - private $output; - private $clones; - - public function __construct(AssetCollectionInterface $coll, \SplObjectStorage $clones) - { - $this->assets = $coll->all(); - $this->filters = $coll->getFilters(); - $this->output = $coll->getTargetPath(); - $this->clones = $clones; - - if (false === $pos = strrpos($this->output, '.')) { - $this->output .= '_*'; - } else { - $this->output = substr($this->output, 0, $pos).'_*'.substr($this->output, $pos); - } - } - - /** - * Returns a copy of the current asset with filters and a target URL applied. - * - * @param Boolean $raw Returns the unmodified asset if true - * @return \Assetic\Asset\AssetInterface - */ - public function current($raw = false) - { - $asset = current($this->assets); - - if ($raw) { - return $asset; - } - - // clone once - if (!isset($this->clones[$asset])) { - $clone = $this->clones[$asset] = clone $asset; - - // generate a target path based on asset name - $name = sprintf('%s_%d', pathinfo($asset->getSourcePath(), PATHINFO_FILENAME) ?: 'part', $this->key() + 1); - $clone->setTargetPath(str_replace('*', $name, $this->output)); - } else { - $clone = $this->clones[$asset]; - } - - // cascade filters - foreach ($this->filters as $filter) { - $clone->ensureFilter($filter); - } - - return $clone; - } - - public function key() - { - return key($this->assets); - } - - public function next() - { - return next($this->assets); - } - - public function rewind() - { - return reset($this->assets); - } - - public function valid() - { - return false !== current($this->assets); - } - - public function hasChildren() - { - return current($this->assets) instanceof AssetCollectionInterface; - } - - /** - * @uses current() - */ - public function getChildren() - { - return new self($this->current(), $this->clones); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Asset/StringAsset.php b/vendor/kriswallsmith/assetic/src/Assetic/Asset/StringAsset.php deleted file mode 100644 index 7222fe5e..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Asset/StringAsset.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ -class StringAsset extends BaseAsset -{ - private $content; - private $lastModified; - - /** - * Constructor. - * - * @param string $content The content of the asset - * @param array $filters Filters for the asset - * @param string $sourceRoot The source asset root directory - * @param string $sourcePath The source asset path - */ - public function __construct($content, $filters = array(), $sourceRoot = null, $sourcePath = null) - { - $this->content = $content; - - parent::__construct($filters, $sourceRoot, $sourcePath); - } - - public function load(FilterInterface $additionalFilter = null) - { - $this->doLoad($this->content, $additionalFilter); - } - - public function setLastModified($lastModified) - { - $this->lastModified = $lastModified; - } - - public function getLastModified() - { - return $this->lastModified; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/AssetManager.php b/vendor/kriswallsmith/assetic/src/Assetic/AssetManager.php deleted file mode 100644 index a55cd2ed..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/AssetManager.php +++ /dev/null @@ -1,89 +0,0 @@ - - */ -class AssetManager -{ - private $assets = array(); - - /** - * Gets an asset by name. - * - * @param string $name The asset name - * - * @return AssetInterface The asset - * - * @throws \InvalidArgumentException If there is no asset by that name - */ - public function get($name) - { - if (!isset($this->assets[$name])) { - throw new \InvalidArgumentException(sprintf('There is no "%s" asset.', $name)); - } - - return $this->assets[$name]; - } - - /** - * Checks if the current asset manager has a certain asset. - * - * @param string $name an asset name - * - * @return Boolean True if the asset has been set, false if not - */ - public function has($name) - { - return isset($this->assets[$name]); - } - - /** - * Registers an asset to the current asset manager. - * - * @param string $name The asset name - * @param AssetInterface $asset The asset - * - * @throws \InvalidArgumentException If the asset name is invalid - */ - public function set($name, AssetInterface $asset) - { - if (!ctype_alnum(str_replace('_', '', $name))) { - throw new \InvalidArgumentException(sprintf('The name "%s" is invalid.', $name)); - } - - $this->assets[$name] = $asset; - } - - /** - * Returns an array of asset names. - * - * @return array An array of asset names - */ - public function getNames() - { - return array_keys($this->assets); - } - - /** - * Clears all assets. - */ - public function clear() - { - $this->assets = array(); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/AssetWriter.php b/vendor/kriswallsmith/assetic/src/Assetic/AssetWriter.php deleted file mode 100644 index bbace99f..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/AssetWriter.php +++ /dev/null @@ -1,94 +0,0 @@ - - * @author Johannes M. Schmitt - */ -class AssetWriter -{ - private $dir; - private $values; - - /** - * Constructor. - * - * @param string $dir The base web directory - * @param array $values Variable values - * - * @throws \InvalidArgumentException if a variable value is not a string - */ - public function __construct($dir, array $values = array()) - { - foreach ($values as $var => $vals) { - foreach ($vals as $value) { - if (!is_string($value)) { - throw new \InvalidArgumentException(sprintf('All variable values must be strings, but got %s for variable "%s".', json_encode($value), $var)); - } - } - } - - $this->dir = $dir; - $this->values = $values; - } - - public function writeManagerAssets(AssetManager $am) - { - foreach ($am->getNames() as $name) { - $this->writeAsset($am->get($name)); - } - } - - public function writeAsset(AssetInterface $asset) - { - foreach (VarUtils::getCombinations($asset->getVars(), $this->values) as $combination) { - $asset->setValues($combination); - - static::write( - $this->dir.'/'.VarUtils::resolve( - $asset->getTargetPath(), - $asset->getVars(), - $asset->getValues() - ), - $asset->dump() - ); - } - } - - protected static function write($path, $contents) - { - if (!is_dir($dir = dirname($path)) && false === @mkdir($dir, 0777, true)) { - throw new \RuntimeException('Unable to create directory '.$dir); - } - - if (false === @file_put_contents($path, $contents)) { - throw new \RuntimeException('Unable to write file '.$path); - } - } - - /** - * Not used. - * - * This method is provided for backward compatibility with certain versions - * of AsseticBundle. - */ - private function getCombinations(array $vars) - { - return VarUtils::getCombinations($vars, $this->values); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Cache/ApcCache.php b/vendor/kriswallsmith/assetic/src/Assetic/Cache/ApcCache.php deleted file mode 100644 index 6a56f394..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Cache/ApcCache.php +++ /dev/null @@ -1,66 +0,0 @@ - - */ -class ApcCache implements CacheInterface -{ - public $ttl = 0; - - /** - * @see CacheInterface::has() - */ - public function has($key) - { - return apc_exists($key); - } - - /** - * @see CacheInterface::get() - */ - public function get($key) - { - $value = apc_fetch($key, $success); - - if (!$success) { - throw new \RuntimeException('There is no cached value for ' . $key); - } - - return $value; - } - - /** - * @see CacheInterface::set() - */ - public function set($key, $value) - { - $store = apc_store($key, $value, $this->ttl); - - if (!$store) { - throw new \RuntimeException('Unable to store "' . $key . '" for ' . $this->ttl . ' seconds.'); - } - - return $store; - } - - /** - * @see CacheInterface::remove() - */ - public function remove($key) - { - return apc_delete($key); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Cache/ArrayCache.php b/vendor/kriswallsmith/assetic/src/Assetic/Cache/ArrayCache.php deleted file mode 100644 index e322cb31..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Cache/ArrayCache.php +++ /dev/null @@ -1,58 +0,0 @@ - - */ -class ArrayCache implements CacheInterface -{ - private $cache = array(); - - /** - * @see CacheInterface::has() - */ - public function has($key) - { - return isset($this->cache[$key]); - } - - /** - * @see CacheInterface::get() - */ - public function get($key) - { - if(!$this->has($key)) { - throw new \RuntimeException('There is no cached value for '.$key); - } - - return $this->cache[$key]; - } - - /** - * @see CacheInterface::set() - */ - public function set($key, $value) - { - $this->cache[$key] = $value; - } - - /** - * @see CacheInterface::remove() - */ - public function remove($key) - { - unset($this->cache[$key]); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Cache/CacheInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/Cache/CacheInterface.php deleted file mode 100644 index 7f301f33..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Cache/CacheInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ -interface CacheInterface -{ - /** - * Checks if the cache has a value for a key. - * - * @param string $key A unique key - * - * @return Boolean Whether the cache has a value for this key - */ - public function has($key); - - /** - * Returns the value for a key. - * - * @param string $key A unique key - * - * @return string|null The value in the cache - */ - public function get($key); - - /** - * Sets a value in the cache. - * - * @param string $key A unique key - * @param string $value The value to cache - */ - public function set($key, $value); - - /** - * Removes a value from the cache. - * - * @param string $key A unique key - */ - public function remove($key); -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php b/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php deleted file mode 100644 index b5ad0c16..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php +++ /dev/null @@ -1,123 +0,0 @@ - - */ -class ConfigCache -{ - private $dir; - - /** - * Construct. - * - * @param string $dir The cache directory - */ - public function __construct($dir) - { - $this->dir = $dir; - } - - /** - * Checks of the cache has a file. - * - * @param string $resource A cache key - * - * @return Boolean True if a file exists - */ - public function has($resource) - { - return file_exists($this->getSourcePath($resource)); - } - - /** - * Writes a value to a file. - * - * @param string $resource A cache key - * @param mixed $value A value to cache - */ - public function set($resource, $value) - { - $path = $this->getSourcePath($resource); - - if (!is_dir($dir = dirname($path)) && false === @mkdir($dir, 0777, true)) { - // @codeCoverageIgnoreStart - throw new \RuntimeException('Unable to create directory '.$dir); - // @codeCoverageIgnoreEnd - } - - if (false === @file_put_contents($path, sprintf("getSourcePath($resource); - - if (!file_exists($path)) { - throw new \RuntimeException('There is no cached value for '.$resource); - } - - return include $path; - } - - /** - * Returns a timestamp for when the cache was created. - * - * @param string $resource A cache key - * - * @return integer A UNIX timestamp - */ - public function getTimestamp($resource) - { - $path = $this->getSourcePath($resource); - - if (!file_exists($path)) { - throw new \RuntimeException('There is no cached value for '.$resource); - } - - if (false === $mtime = @filemtime($path)) { - // @codeCoverageIgnoreStart - throw new \RuntimeException('Unable to determine file mtime for '.$path); - // @codeCoverageIgnoreEnd - } - - return $mtime; - } - - /** - * Returns the path where the file corresponding to the supplied cache key can be included from. - * - * @param string $resource A cache key - * - * @return string A file path - */ - private function getSourcePath($resource) - { - $key = md5($resource); - - return $this->dir.'/'.$key[0].'/'.$key.'.php'; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Cache/ExpiringCache.php b/vendor/kriswallsmith/assetic/src/Assetic/Cache/ExpiringCache.php deleted file mode 100644 index 74ca1adf..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Cache/ExpiringCache.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ -class ExpiringCache implements CacheInterface -{ - private $cache; - private $lifetime; - - public function __construct(CacheInterface $cache, $lifetime) - { - $this->cache = $cache; - $this->lifetime = $lifetime; - } - - public function has($key) - { - if ($this->cache->has($key)) { - if (time() < $this->cache->get($key.'.expires')) { - return true; - } - - $this->cache->remove($key.'.expires'); - $this->cache->remove($key); - } - - return false; - } - - public function get($key) - { - return $this->cache->get($key); - } - - public function set($key, $value) - { - $this->cache->set($key.'.expires', time() + $this->lifetime); - $this->cache->set($key, $value); - } - - public function remove($key) - { - $this->cache->remove($key.'.expires'); - $this->cache->remove($key); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php b/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php deleted file mode 100644 index 7698aed9..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php +++ /dev/null @@ -1,65 +0,0 @@ - - */ -class FilesystemCache implements CacheInterface -{ - private $dir; - - public function __construct($dir) - { - $this->dir = $dir; - } - - public function has($key) - { - return file_exists($this->dir.'/'.$key); - } - - public function get($key) - { - $path = $this->dir.'/'.$key; - - if (!file_exists($path)) { - throw new \RuntimeException('There is no cached value for '.$key); - } - - return file_get_contents($path); - } - - public function set($key, $value) - { - if (!is_dir($this->dir) && false === @mkdir($this->dir, 0777, true)) { - throw new \RuntimeException('Unable to create directory '.$this->dir); - } - - $path = $this->dir.'/'.$key; - - if (false === @file_put_contents($path, $value)) { - throw new \RuntimeException('Unable to write file '.$path); - } - } - - public function remove($key) - { - $path = $this->dir.'/'.$key; - - if (file_exists($path) && false === @unlink($path)) { - throw new \RuntimeException('Unable to remove file '.$path); - } - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Exception/Exception.php b/vendor/kriswallsmith/assetic/src/Assetic/Exception/Exception.php deleted file mode 100644 index e9e37c7d..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Exception/Exception.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -interface Exception -{ -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Exception/FilterException.php b/vendor/kriswallsmith/assetic/src/Assetic/Exception/FilterException.php deleted file mode 100644 index ced54497..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Exception/FilterException.php +++ /dev/null @@ -1,73 +0,0 @@ - - */ -class FilterException extends \RuntimeException implements Exception -{ - private $originalMessage; - private $input; - - public static function fromProcess(Process $proc) - { - $message = sprintf("An error occurred while running:\n%s", $proc->getCommandLine()); - - $errorOutput = $proc->getErrorOutput(); - if (!empty($errorOutput)) { - $message .= "\n\nError Output:\n".str_replace("\r", '', $errorOutput); - } - - $output = $proc->getOutput(); - if (!empty($output)) { - $message .= "\n\nOutput:\n".str_replace("\r", '', $output); - } - - return new self($message); - } - - public function __construct($message, $code = 0, \Exception $previous = null) - { - parent::__construct($message, $code, $previous); - - $this->originalMessage = $message; - } - - public function setInput($input) - { - $this->input = $input; - $this->updateMessage(); - - return $this; - } - - public function getInput() - { - return $this->input; - } - - private function updateMessage() - { - $message = $this->originalMessage; - - if (!empty($this->input)) { - $message .= "\n\nInput:\n".$this->input; - } - - $this->message = $message; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticExtension.php b/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticExtension.php deleted file mode 100644 index a63bc9e6..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticExtension.php +++ /dev/null @@ -1,76 +0,0 @@ -factory = $factory; - $this->functions = array(); - $this->valueSupplier = $valueSupplier; - - foreach ($functions as $function => $options) { - if (is_integer($function) && is_string($options)) { - $this->functions[$options] = array('filter' => $options); - } else { - $this->functions[$function] = $options + array('filter' => $function); - } - } - } - - public function getTokenParsers() - { - return array( - new AsseticTokenParser($this->factory, 'javascripts', 'js/*.js'), - new AsseticTokenParser($this->factory, 'stylesheets', 'css/*.css'), - new AsseticTokenParser($this->factory, 'image', 'images/*', true), - ); - } - - public function getFunctions() - { - $functions = array(); - foreach ($this->functions as $function => $filter) { - $functions[$function] = new AsseticFilterFunction($function); - } - - return $functions; - } - - public function getGlobals() - { - return array( - 'assetic' => array( - 'debug' => $this->factory->isDebug(), - 'vars' => null !== $this->valueSupplier ? new ValueContainer($this->valueSupplier) : array(), - ), - ); - } - - public function getFilterInvoker($function) - { - return new AsseticFilterInvoker($this->factory, $this->functions[$function]); - } - - public function getName() - { - return 'assetic'; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php b/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php deleted file mode 100644 index c43aa304..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php +++ /dev/null @@ -1,29 +0,0 @@ -filter = $filter; - - parent::__construct($options); - } - - public function compile() - { - return sprintf('$this->env->getExtension(\'assetic\')->getFilterInvoker(\'%s\')->invoke', $this->filter); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php b/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php deleted file mode 100644 index 577e1f65..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php +++ /dev/null @@ -1,59 +0,0 @@ - - */ -class AsseticFilterInvoker -{ - private $factory; - private $filters; - private $options; - - public function __construct($factory, $filter) - { - $this->factory = $factory; - - if (is_array($filter) && isset($filter['filter'])) { - $this->filters = (array) $filter['filter']; - $this->options = isset($filter['options']) ? (array) $filter['options'] : array(); - } else { - $this->filters = (array) $filter; - $this->options = array(); - } - } - - public function getFactory() - { - return $this->factory; - } - - public function getFilters() - { - return $this->filters; - } - - public function getOptions() - { - return $this->options; - } - - public function invoke($input, array $options = array()) - { - $asset = $this->factory->createAsset($input, $this->filters, $options + $this->options); - - return $asset->getTargetPath(); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticNode.php b/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticNode.php deleted file mode 100644 index 0b32e0ac..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticNode.php +++ /dev/null @@ -1,166 +0,0 @@ - $body); - - $attributes = array_replace( - array('debug' => null, 'combine' => null, 'var_name' => 'asset_url'), - $attributes, - array('asset' => $asset, 'inputs' => $inputs, 'filters' => $filters, 'name' => $name) - ); - - parent::__construct($nodes, $attributes, $lineno, $tag); - } - - public function compile(\Twig_Compiler $compiler) - { - $compiler->addDebugInfo($this); - - $combine = $this->getAttribute('combine'); - $debug = $this->getAttribute('debug'); - - if (null === $combine && null !== $debug) { - $combine = !$debug; - } - - if (null === $combine) { - $compiler - ->write("if (isset(\$context['assetic']['debug']) && \$context['assetic']['debug']) {\n") - ->indent() - ; - - $this->compileDebug($compiler); - - $compiler - ->outdent() - ->write("} else {\n") - ->indent() - ; - - $this->compileAsset($compiler, $this->getAttribute('asset'), $this->getAttribute('name')); - - $compiler - ->outdent() - ->write("}\n") - ; - } elseif ($combine) { - $this->compileAsset($compiler, $this->getAttribute('asset'), $this->getAttribute('name')); - } else { - $this->compileDebug($compiler); - } - - $compiler - ->write('unset($context[') - ->repr($this->getAttribute('var_name')) - ->raw("]);\n") - ; - } - - protected function compileDebug(\Twig_Compiler $compiler) - { - $i = 0; - foreach ($this->getAttribute('asset') as $leaf) { - $leafName = $this->getAttribute('name').'_'.$i++; - $this->compileAsset($compiler, $leaf, $leafName); - } - } - - protected function compileAsset(\Twig_Compiler $compiler, AssetInterface $asset, $name) - { - if ($vars = $asset->getVars()) { - $compiler->write("// check variable conditions\n"); - - foreach ($vars as $var) { - $compiler - ->write("if (!isset(\$context['assetic']['vars']['$var'])) {\n") - ->indent() - ->write("throw new \RuntimeException(sprintf('The asset \"".$name."\" expected variable \"".$var."\" to be set, but got only these vars: %s. Did you set-up a value supplier?', isset(\$context['assetic']['vars']) && \$context['assetic']['vars'] ? implode(', ', \$context['assetic']['vars']) : '# none #'));\n") - ->outdent() - ->write("}\n") - ; - } - - $compiler->raw("\n"); - } - - $compiler - ->write("// asset \"$name\"\n") - ->write('$context[') - ->repr($this->getAttribute('var_name')) - ->raw('] = ') - ; - - $this->compileAssetUrl($compiler, $asset, $name); - - $compiler - ->raw(";\n") - ->subcompile($this->getNode('body')) - ; - } - - protected function compileAssetUrl(\Twig_Compiler $compiler, AssetInterface $asset, $name) - { - if (!$vars = $asset->getVars()) { - $compiler->repr($asset->getTargetPath()); - - return; - } - - $compiler - ->raw("strtr(") - ->string($asset->getTargetPath()) - ->raw(", array("); - ; - - $first = true; - foreach ($vars as $var) { - if (!$first) { - $compiler->raw(", "); - } - $first = false; - - $compiler - ->string("{".$var."}") - ->raw(" => \$context['assetic']['vars']['$var']") - ; - } - - $compiler - ->raw("))") - ; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php b/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php deleted file mode 100644 index 3e5fb93f..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php +++ /dev/null @@ -1,153 +0,0 @@ -factory = $factory; - $this->tag = $tag; - $this->output = $output; - $this->single = $single; - $this->extensions = $extensions; - } - - public function parse(\Twig_Token $token) - { - $inputs = array(); - $filters = array(); - $name = null; - $attributes = array( - 'output' => $this->output, - 'var_name' => 'asset_url', - 'vars' => array(), - ); - - $stream = $this->parser->getStream(); - while (!$stream->test(\Twig_Token::BLOCK_END_TYPE)) { - if ($stream->test(\Twig_Token::STRING_TYPE)) { - // '@jquery', 'js/src/core/*', 'js/src/extra.js' - $inputs[] = $stream->next()->getValue(); - } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'filter')) { - // filter='yui_js' - $stream->next(); - $stream->expect(\Twig_Token::OPERATOR_TYPE, '='); - $filters = array_merge($filters, array_filter(array_map('trim', explode(',', $stream->expect(\Twig_Token::STRING_TYPE)->getValue())))); - } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'output')) { - // output='js/packed/*.js' OR output='js/core.js' - $stream->next(); - $stream->expect(\Twig_Token::OPERATOR_TYPE, '='); - $attributes['output'] = $stream->expect(\Twig_Token::STRING_TYPE)->getValue(); - } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'name')) { - // name='core_js' - $stream->next(); - $stream->expect(\Twig_Token::OPERATOR_TYPE, '='); - $name = $stream->expect(\Twig_Token::STRING_TYPE)->getValue(); - } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'as')) { - // as='the_url' - $stream->next(); - $stream->expect(\Twig_Token::OPERATOR_TYPE, '='); - $attributes['var_name'] = $stream->expect(\Twig_Token::STRING_TYPE)->getValue(); - } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'debug')) { - // debug=true - $stream->next(); - $stream->expect(\Twig_Token::OPERATOR_TYPE, '='); - $attributes['debug'] = 'true' == $stream->expect(\Twig_Token::NAME_TYPE, array('true', 'false'))->getValue(); - } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'combine')) { - // combine=true - $stream->next(); - $stream->expect(\Twig_Token::OPERATOR_TYPE, '='); - $attributes['combine'] = 'true' == $stream->expect(\Twig_Token::NAME_TYPE, array('true', 'false'))->getValue(); - } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'vars')) { - // vars=['locale','browser'] - $stream->next(); - $stream->expect(\Twig_Token::OPERATOR_TYPE, '='); - $stream->expect(\Twig_Token::PUNCTUATION_TYPE, '['); - - while ($stream->test(\Twig_Token::STRING_TYPE)) { - $attributes['vars'][] = $stream->expect(\Twig_Token::STRING_TYPE)->getValue(); - - if (!$stream->test(\Twig_Token::PUNCTUATION_TYPE, ',')) { - break; - } - - $stream->next(); - } - - $stream->expect(\Twig_Token::PUNCTUATION_TYPE, ']'); - } elseif ($stream->test(\Twig_Token::NAME_TYPE, $this->extensions)) { - // an arbitrary configured attribute - $key = $stream->next()->getValue(); - $stream->expect(\Twig_Token::OPERATOR_TYPE, '='); - $attributes[$key] = $stream->expect(\Twig_Token::STRING_TYPE)->getValue(); - } else { - $token = $stream->getCurrent(); - throw new \Twig_Error_Syntax(sprintf('Unexpected token "%s" of value "%s"', \Twig_Token::typeToEnglish($token->getType(), $token->getLine()), $token->getValue()), $token->getLine()); - } - } - - $stream->expect(\Twig_Token::BLOCK_END_TYPE); - - $body = $this->parser->subparse(array($this, 'testEndTag'), true); - - $stream->expect(\Twig_Token::BLOCK_END_TYPE); - - if ($this->single && 1 < count($inputs)) { - $inputs = array_slice($inputs, -1); - } - - if (!$name) { - $name = $this->factory->generateAssetName($inputs, $filters, $attributes); - } - - $asset = $this->factory->createAsset($inputs, $filters, $attributes + array('name' => $name)); - - return $this->createNode($asset, $body, $inputs, $filters, $name, $attributes, $token->getLine(), $this->getTag()); - } - - public function getTag() - { - return $this->tag; - } - - public function testEndTag(\Twig_Token $token) - { - return $token->test(array('end'.$this->getTag())); - } - - protected function createNode(AssetInterface $asset, \Twig_NodeInterface $body, array $inputs, array $filters, $name, array $attributes = array(), $lineno = 0, $tag = null) - { - return new AsseticNode($asset, $body, $inputs, $filters, $name, $attributes, $lineno, $tag); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php b/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php deleted file mode 100644 index ddfe8922..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php +++ /dev/null @@ -1,99 +0,0 @@ - - */ -class TwigFormulaLoader implements FormulaLoaderInterface -{ - private $twig; - - public function __construct(\Twig_Environment $twig) - { - $this->twig = $twig; - } - - public function load(ResourceInterface $resource) - { - try { - $tokens = $this->twig->tokenize($resource->getContent(), (string) $resource); - $nodes = $this->twig->parse($tokens); - } catch (\Exception $e) { - return array(); - } - - return $this->loadNode($nodes); - } - - /** - * Loads assets from the supplied node. - * - * @param \Twig_Node $node - * - * @return array An array of asset formulae indexed by name - */ - private function loadNode(\Twig_Node $node) - { - $formulae = array(); - - if ($node instanceof AsseticNode) { - $formulae[$node->getAttribute('name')] = array( - $node->getAttribute('inputs'), - $node->getAttribute('filters'), - array( - 'output' => $node->getAttribute('asset')->getTargetPath(), - 'name' => $node->getAttribute('name'), - 'debug' => $node->getAttribute('debug'), - 'combine' => $node->getAttribute('combine'), - 'vars' => $node->getAttribute('vars'), - ), - ); - } elseif ($node instanceof \Twig_Node_Expression_Function) { - $name = version_compare(\Twig_Environment::VERSION, '1.2.0-DEV', '<') - ? $node->getNode('name')->getAttribute('name') - : $node->getAttribute('name'); - - if ($this->twig->getFunction($name) instanceof AsseticFilterFunction) { - $arguments = array(); - foreach ($node->getNode('arguments') as $argument) { - $arguments[] = eval('return '.$this->twig->compile($argument).';'); - } - - $invoker = $this->twig->getExtension('assetic')->getFilterInvoker($name); - - $inputs = isset($arguments[0]) ? (array) $arguments[0] : array(); - $filters = $invoker->getFilters(); - $options = array_replace($invoker->getOptions(), isset($arguments[1]) ? $arguments[1] : array()); - - if (!isset($options['name'])) { - $options['name'] = $invoker->getFactory()->generateAssetName($inputs, $filters, $options); - } - - $formulae[$options['name']] = array($inputs, $filters, $options); - } - } - - foreach ($node as $child) { - if ($child instanceof \Twig_Node) { - $formulae += $this->loadNode($child); - } - } - - return $formulae; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigResource.php b/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigResource.php deleted file mode 100644 index 7a071644..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigResource.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -class TwigResource implements ResourceInterface -{ - private $loader; - private $name; - - public function __construct(\Twig_LoaderInterface $loader, $name) - { - $this->loader = $loader; - $this->name = $name; - } - - public function getContent() - { - try { - return $this->loader->getSource($this->name); - } catch (\Twig_Error_Loader $e) { - return ''; - } - } - - public function isFresh($timestamp) - { - try { - return $this->loader->isFresh($this->name, $timestamp); - } catch (\Twig_Error_Loader $e) { - return false; - } - } - - public function __toString() - { - return $this->name; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/ValueContainer.php b/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/ValueContainer.php deleted file mode 100644 index f959c33a..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/ValueContainer.php +++ /dev/null @@ -1,79 +0,0 @@ - - */ -class ValueContainer implements \ArrayAccess, \IteratorAggregate, \Countable -{ - private $values; - private $valueSupplier; - - public function __construct(ValueSupplierInterface $valueSupplier) - { - $this->valueSupplier = $valueSupplier; - } - - public function offsetExists($offset) - { - $this->initialize(); - - return array_key_exists($offset, $this->values); - } - - public function offsetGet($offset) - { - $this->initialize(); - - if (!array_key_exists($offset, $this->values)) { - throw new \OutOfRangeException(sprintf('The variable "%s" does not exist.', $offset)); - } - - return $this->values[$offset]; - } - - public function offsetSet($offset, $value) - { - throw new \BadMethodCallException('The ValueContainer is read-only.'); - } - - public function offsetUnset($offset) - { - throw new \BadMethodCallException('The ValueContainer is read-only.'); - } - - public function getIterator() - { - $this->initialize(); - - return new \ArrayIterator($this->values); - } - - public function count() - { - $this->initialize(); - - return count($this->values); - } - - private function initialize() - { - if (null === $this->values) { - $this->values = $this->valueSupplier->getValues(); - } - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/AssetFactory.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/AssetFactory.php deleted file mode 100644 index 3ab6ec8a..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/AssetFactory.php +++ /dev/null @@ -1,425 +0,0 @@ - - */ -class AssetFactory -{ - private $root; - private $debug; - private $output; - private $workers; - private $am; - private $fm; - - /** - * Constructor. - * - * @param string $root The default root directory - * @param Boolean $debug Filters prefixed with a "?" will be omitted in debug mode - */ - public function __construct($root, $debug = false) - { - $this->root = rtrim($root, '/'); - $this->debug = $debug; - $this->output = 'assetic/*'; - $this->workers = array(); - } - - /** - * Sets debug mode for the current factory. - * - * @param Boolean $debug Debug mode - */ - public function setDebug($debug) - { - $this->debug = $debug; - } - - /** - * Checks if the factory is in debug mode. - * - * @return Boolean Debug mode - */ - public function isDebug() - { - return $this->debug; - } - - /** - * Sets the default output string. - * - * @param string $output The default output string - */ - public function setDefaultOutput($output) - { - $this->output = $output; - } - - /** - * Adds a factory worker. - * - * @param WorkerInterface $worker A worker - */ - public function addWorker(WorkerInterface $worker) - { - $this->workers[] = $worker; - } - - /** - * Returns the current asset manager. - * - * @return AssetManager|null The asset manager - */ - public function getAssetManager() - { - return $this->am; - } - - /** - * Sets the asset manager to use when creating asset references. - * - * @param AssetManager $am The asset manager - */ - public function setAssetManager(AssetManager $am) - { - $this->am = $am; - } - - /** - * Returns the current filter manager. - * - * @return FilterManager|null The filter manager - */ - public function getFilterManager() - { - return $this->fm; - } - - /** - * Sets the filter manager to use when adding filters. - * - * @param FilterManager $fm The filter manager - */ - public function setFilterManager(FilterManager $fm) - { - $this->fm = $fm; - } - - /** - * Creates a new asset. - * - * Prefixing a filter name with a question mark will cause it to be - * omitted when the factory is in debug mode. - * - * Available options: - * - * * output: An output string - * * name: An asset name for interpolation in output patterns - * * debug: Forces debug mode on or off for this asset - * * root: An array or string of more root directories - * - * @param array|string $inputs An array of input strings - * @param array|string $filters An array of filter names - * @param array $options An array of options - * - * @return AssetCollection An asset collection - */ - public function createAsset($inputs = array(), $filters = array(), array $options = array()) - { - if (!is_array($inputs)) { - $inputs = array($inputs); - } - - if (!is_array($filters)) { - $filters = array($filters); - } - - if (!isset($options['output'])) { - $options['output'] = $this->output; - } - - if (!isset($options['vars'])) { - $options['vars'] = array(); - } - - if (!isset($options['debug'])) { - $options['debug'] = $this->debug; - } - - if (!isset($options['root'])) { - $options['root'] = array($this->root); - } else { - if (!is_array($options['root'])) { - $options['root'] = array($options['root']); - } - - $options['root'][] = $this->root; - } - - if (!isset($options['name'])) { - $options['name'] = $this->generateAssetName($inputs, $filters, $options); - } - - $asset = $this->createAssetCollection(array(), $options); - $extensions = array(); - - // inner assets - foreach ($inputs as $input) { - if (is_array($input)) { - // nested formula - $asset->add(call_user_func_array(array($this, 'createAsset'), $input)); - } else { - $asset->add($this->parseInput($input, $options)); - $extensions[pathinfo($input, PATHINFO_EXTENSION)] = true; - } - } - - // filters - foreach ($filters as $filter) { - if ('?' != $filter[0]) { - $asset->ensureFilter($this->getFilter($filter)); - } elseif (!$options['debug']) { - $asset->ensureFilter($this->getFilter(substr($filter, 1))); - } - } - - // append variables - if (!empty($options['vars'])) { - $toAdd = array(); - foreach ($options['vars'] as $var) { - if (false !== strpos($options['output'], '{'.$var.'}')) { - continue; - } - - $toAdd[] = '{'.$var.'}'; - } - - if ($toAdd) { - $options['output'] = str_replace('*', '*.'.implode('.', $toAdd), $options['output']); - } - } - - // append consensus extension if missing - if (1 == count($extensions) && !pathinfo($options['output'], PATHINFO_EXTENSION) && $extension = key($extensions)) { - $options['output'] .= '.'.$extension; - } - - // output --> target url - $asset->setTargetPath(str_replace('*', $options['name'], $options['output'])); - - // apply workers and return - return $this->applyWorkers($asset); - } - - public function generateAssetName($inputs, $filters, $options = array()) - { - foreach (array_diff(array_keys($options), array('output', 'debug', 'root')) as $key) { - unset($options[$key]); - } - - ksort($options); - - return substr(sha1(serialize($inputs).serialize($filters).serialize($options)), 0, 7); - } - - public function getLastModified(AssetInterface $asset) - { - $mtime = $asset->getLastModified(); - if (!$filters = $asset->getFilters()) { - return $mtime; - } - - // prepare load path - $sourceRoot = $asset->getSourceRoot(); - $sourcePath = $asset->getSourcePath(); - $loadPath = $sourceRoot && $sourcePath ? dirname($sourceRoot.'/'.$sourcePath) : null; - - $prevFilters = array(); - foreach ($filters as $filter) { - $prevFilters[] = $filter; - - if (!$filter instanceof DependencyExtractorInterface) { - continue; - } - - // extract children from asset after running all preceeding filters - $clone = clone $asset; - $clone->clearFilters(); - foreach (array_slice($prevFilters, 0, -1) as $prevFilter) { - $clone->ensureFilter($prevFilter); - } - $clone->load(); - - foreach ($filter->getChildren($this, $clone->getContent(), $loadPath) as $child) { - $mtime = max($mtime, $this->getLastModified($child)); - } - } - - return $mtime; - } - - /** - * Parses an input string string into an asset. - * - * The input string can be one of the following: - * - * * A reference: If the string starts with an "at" sign it will be interpreted as a reference to an asset in the asset manager - * * An absolute URL: If the string contains "://" or starts with "//" it will be interpreted as an HTTP asset - * * A glob: If the string contains a "*" it will be interpreted as a glob - * * A path: Otherwise the string is interpreted as a filesystem path - * - * Both globs and paths will be absolutized using the current root directory. - * - * @param string $input An input string - * @param array $options An array of options - * - * @return AssetInterface An asset - */ - protected function parseInput($input, array $options = array()) - { - if ('@' == $input[0]) { - return $this->createAssetReference(substr($input, 1)); - } - - if (false !== strpos($input, '://') || 0 === strpos($input, '//')) { - return $this->createHttpAsset($input, $options['vars']); - } - - if (self::isAbsolutePath($input)) { - if ($root = self::findRootDir($input, $options['root'])) { - $path = ltrim(substr($input, strlen($root)), '/'); - } else { - $path = null; - } - } else { - $root = $this->root; - $path = $input; - $input = $this->root.'/'.$path; - } - - if (false !== strpos($input, '*')) { - return $this->createGlobAsset($input, $root, $options['vars']); - } - - return $this->createFileAsset($input, $root, $path, $options['vars']); - } - - protected function createAssetCollection(array $assets = array(), array $options = array()) - { - return new AssetCollection($assets, array(), null, isset($options['vars']) ? $options['vars'] : array()); - } - - protected function createAssetReference($name) - { - if (!$this->am) { - throw new \LogicException('There is no asset manager.'); - } - - return new AssetReference($this->am, $name); - } - - protected function createHttpAsset($sourceUrl, $vars) - { - return new HttpAsset($sourceUrl, array(), false, $vars); - } - - protected function createGlobAsset($glob, $root = null, $vars) - { - return new GlobAsset($glob, array(), $root, $vars); - } - - protected function createFileAsset($source, $root = null, $path = null, $vars) - { - return new FileAsset($source, array(), $root, $path, $vars); - } - - protected function getFilter($name) - { - if (!$this->fm) { - throw new \LogicException('There is no filter manager.'); - } - - return $this->fm->get($name); - } - - /** - * Filters an asset collection through the factory workers. - * - * Each leaf asset will be processed first, followed by the asset - * collection itself. - * - * @param AssetCollectionInterface $asset An asset collection - * - * @return AssetCollectionInterface - */ - private function applyWorkers(AssetCollectionInterface $asset) - { - foreach ($asset as $leaf) { - foreach ($this->workers as $worker) { - $retval = $worker->process($leaf, $this); - - if ($retval instanceof AssetInterface && $leaf !== $retval) { - $asset->replaceLeaf($leaf, $retval); - } - } - } - - foreach ($this->workers as $worker) { - $retval = $worker->process($asset, $this); - - if ($retval instanceof AssetInterface) { - $asset = $retval; - } - } - - return $asset instanceof AssetCollectionInterface ? $asset : $this->createAssetCollection(array($asset)); - } - - private static function isAbsolutePath($path) - { - return '/' == $path[0] || '\\' == $path[0] || (3 < strlen($path) && ctype_alpha($path[0]) && $path[1] == ':' && ('\\' == $path[2] || '/' == $path[2])); - } - - /** - * Loops through the root directories and returns the first match. - * - * @param string $path An absolute path - * @param array $roots An array of root directories - * - * @return string|null The matching root directory, if found - */ - private static function findRootDir($path, array $roots) - { - foreach ($roots as $root) { - if (0 === strpos($path, $root)) { - return $root; - } - } - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php deleted file mode 100644 index b864b8a9..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php +++ /dev/null @@ -1,210 +0,0 @@ - - */ -class LazyAssetManager extends AssetManager -{ - private $factory; - private $loaders; - private $resources; - private $formulae; - private $loaded; - private $loading; - - /** - * Constructor. - * - * @param AssetFactory $factory The asset factory - * @param array $loaders An array of loaders indexed by alias - */ - public function __construct(AssetFactory $factory, $loaders = array()) - { - $this->factory = $factory; - $this->loaders = array(); - $this->resources = array(); - $this->formulae = array(); - $this->loaded = false; - $this->loading = false; - - foreach ($loaders as $alias => $loader) { - $this->setLoader($alias, $loader); - } - } - - /** - * Adds a loader to the asset manager. - * - * @param string $alias An alias for the loader - * @param FormulaLoaderInterface $loader A loader - */ - public function setLoader($alias, FormulaLoaderInterface $loader) - { - $this->loaders[$alias] = $loader; - $this->loaded = false; - } - - /** - * Adds a resource to the asset manager. - * - * @param ResourceInterface $resource A resource - * @param string $loader The loader alias for this resource - */ - public function addResource(ResourceInterface $resource, $loader) - { - $this->resources[$loader][] = $resource; - $this->loaded = false; - } - - /** - * Returns an array of resources. - * - * @return array An array of resources - */ - public function getResources() - { - $resources = array(); - foreach ($this->resources as $r) { - $resources = array_merge($resources, $r); - } - - return $resources; - } - - /** - * Checks for an asset formula. - * - * @param string $name An asset name - * - * @return Boolean If there is a formula - */ - public function hasFormula($name) - { - if (!$this->loaded) { - $this->load(); - } - - return isset($this->formulae[$name]); - } - - /** - * Returns an asset's formula. - * - * @param string $name An asset name - * - * @return array The formula - * - * @throws \InvalidArgumentException If there is no formula by that name - */ - public function getFormula($name) - { - if (!$this->loaded) { - $this->load(); - } - - if (!isset($this->formulae[$name])) { - throw new \InvalidArgumentException(sprintf('There is no "%s" formula.', $name)); - } - - return $this->formulae[$name]; - } - - /** - * Sets a formula on the asset manager. - * - * @param string $name An asset name - * @param array $formula A formula - */ - public function setFormula($name, array $formula) - { - $this->formulae[$name] = $formula; - } - - /** - * Loads formulae from resources. - * - * @throws \LogicException If a resource has been added to an invalid loader - */ - public function load() - { - if ($this->loading) { - return; - } - - if ($diff = array_diff(array_keys($this->resources), array_keys($this->loaders))) { - throw new \LogicException('The following loader(s) are not registered: '.implode(', ', $diff)); - } - - $this->loading = true; - - foreach ($this->resources as $loader => $resources) { - foreach ($resources as $resource) { - $this->formulae = array_replace($this->formulae, $this->loaders[$loader]->load($resource)); - } - } - - $this->loaded = true; - $this->loading = false; - } - - public function get($name) - { - if (!$this->loaded) { - $this->load(); - } - - if (!parent::has($name) && isset($this->formulae[$name])) { - list($inputs, $filters, $options) = $this->formulae[$name]; - $options['name'] = $name; - parent::set($name, $this->factory->createAsset($inputs, $filters, $options)); - } - - return parent::get($name); - } - - public function has($name) - { - if (!$this->loaded) { - $this->load(); - } - - return isset($this->formulae[$name]) || parent::has($name); - } - - public function getNames() - { - if (!$this->loaded) { - $this->load(); - } - - return array_unique(array_merge(parent::getNames(), array_keys($this->formulae))); - } - - public function isDebug() - { - return $this->factory->isDebug(); - } - - public function getLastModified(AssetInterface $asset) - { - return $this->factory->getLastModified($asset); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php deleted file mode 100644 index 122d53c9..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php +++ /dev/null @@ -1,159 +0,0 @@ - - */ -abstract class BasePhpFormulaLoader implements FormulaLoaderInterface -{ - protected $factory; - protected $prototypes; - - public function __construct(AssetFactory $factory) - { - $this->factory = $factory; - $this->prototypes = array(); - - foreach ($this->registerPrototypes() as $prototype => $options) { - $this->addPrototype($prototype, $options); - } - } - - public function addPrototype($prototype, array $options = array()) - { - $tokens = token_get_all('prototypes[$prototype] = array($tokens, $options); - } - - public function load(ResourceInterface $resource) - { - if (!$nbProtos = count($this->prototypes)) { - throw new \LogicException('There are no prototypes registered.'); - } - - $buffers = array_fill(0, $nbProtos, ''); - $bufferLevels = array_fill(0, $nbProtos, 0); - $buffersInWildcard = array(); - - $tokens = token_get_all($resource->getContent()); - $calls = array(); - - while ($token = array_shift($tokens)) { - $current = self::tokenToString($token); - // loop through each prototype (by reference) - foreach (array_keys($this->prototypes) as $i) { - $prototype =& $this->prototypes[$i][0]; - $options = $this->prototypes[$i][1]; - $buffer =& $buffers[$i]; - $level =& $bufferLevels[$i]; - - if (isset($buffersInWildcard[$i])) { - switch ($current) { - case '(': ++$level; break; - case ')': --$level; break; - } - - $buffer .= $current; - - if (!$level) { - $calls[] = array($buffer.';', $options); - $buffer = ''; - unset($buffersInWildcard[$i]); - } - } elseif ($current == self::tokenToString(current($prototype))) { - $buffer .= $current; - if ('*' == self::tokenToString(next($prototype))) { - $buffersInWildcard[$i] = true; - ++$level; - } - } else { - reset($prototype); - unset($buffersInWildcard[$i]); - $buffer = ''; - } - } - } - - $formulae = array(); - foreach ($calls as $call) { - $formulae += call_user_func_array(array($this, 'processCall'), $call); - } - - return $formulae; - } - - private function processCall($call, array $protoOptions = array()) - { - $tmp = tempnam(sys_get_temp_dir(), 'assetic'); - file_put_contents($tmp, implode("\n", array( - 'registerSetupCode(), - $call, - 'echo serialize($_call);', - ))); - $args = unserialize(shell_exec('php '.escapeshellarg($tmp))); - unlink($tmp); - - $inputs = isset($args[0]) ? self::argumentToArray($args[0]) : array(); - $filters = isset($args[1]) ? self::argumentToArray($args[1]) : array(); - $options = isset($args[2]) ? $args[2] : array(); - - if (!isset($options['debug'])) { - $options['debug'] = $this->factory->isDebug(); - } - - if (!is_array($options)) { - throw new \RuntimeException('The third argument must be omitted, null or an array.'); - } - - // apply the prototype options - $options += $protoOptions; - - if (!isset($options['name'])) { - $options['name'] = $this->factory->generateAssetName($inputs, $filters, $options); - } - - return array($options['name'] => array($inputs, $filters, $options)); - } - - /** - * Returns an array of prototypical calls and options. - * - * @return array Prototypes and options - */ - abstract protected function registerPrototypes(); - - /** - * Returns setup code for the reflection scriptlet. - * - * @return string Some PHP setup code - */ - abstract protected function registerSetupCode(); - - protected static function tokenToString($token) - { - return is_array($token) ? $token[1] : $token; - } - - protected static function argumentToArray($argument) - { - return is_array($argument) ? $argument : array_filter(array_map('trim', explode(',', $argument))); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/CachedFormulaLoader.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/CachedFormulaLoader.php deleted file mode 100644 index cd57def2..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/CachedFormulaLoader.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ -class CachedFormulaLoader implements FormulaLoaderInterface -{ - private $loader; - private $configCache; - private $debug; - - /** - * Constructor. - * - * When the loader is in debug mode it will ensure the cached formulae - * are fresh before returning them. - * - * @param FormulaLoaderInterface $loader A formula loader - * @param ConfigCache $configCache A config cache - * @param Boolean $debug The debug mode - */ - public function __construct(FormulaLoaderInterface $loader, ConfigCache $configCache, $debug = false) - { - $this->loader = $loader; - $this->configCache = $configCache; - $this->debug = $debug; - } - - public function load(ResourceInterface $resources) - { - if (!$resources instanceof IteratorResourceInterface) { - $resources = array($resources); - } - - $formulae = array(); - - foreach ($resources as $resource) { - $id = (string) $resource; - if (!$this->configCache->has($id) || ($this->debug && !$resource->isFresh($this->configCache->getTimestamp($id)))) { - $formulae += $this->loader->load($resource); - $this->configCache->set($id, $formulae); - } else { - $formulae += $this->configCache->get($id); - } - } - - return $formulae; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/FormulaLoaderInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/FormulaLoaderInterface.php deleted file mode 100644 index f7adc1a1..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/FormulaLoaderInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -interface FormulaLoaderInterface -{ - /** - * Loads formulae from a resource. - * - * Formulae should be loaded the same regardless of the current debug - * mode. Debug considerations should happen downstream. - * - * @param ResourceInterface $resource A resource - * - * @return array An array of formulae - */ - public function load(ResourceInterface $resource); -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php deleted file mode 100644 index 902a5238..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ -class FunctionCallsFormulaLoader extends BasePhpFormulaLoader -{ - protected function registerPrototypes() - { - return array( - 'assetic_javascripts(*)' => array('output' => 'js/*.js'), - 'assetic_stylesheets(*)' => array('output' => 'css/*.css'), - 'assetic_image(*)' => array('output' => 'images/*'), - ); - } - - protected function registerSetupCode() - { - return <<<'EOF' -function assetic_javascripts() -{ - global $_call; - $_call = func_get_args(); -} - -function assetic_stylesheets() -{ - global $_call; - $_call = func_get_args(); -} - -function assetic_image() -{ - global $_call; - $_call = func_get_args(); -} - -EOF; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php deleted file mode 100644 index da4a40e1..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php +++ /dev/null @@ -1,112 +0,0 @@ - - */ -class CoalescingDirectoryResource implements IteratorResourceInterface -{ - private $directories; - - public function __construct($directories) - { - $this->directories = array(); - - foreach ($directories as $directory) { - $this->addDirectory($directory); - } - } - - public function addDirectory(IteratorResourceInterface $directory) - { - $this->directories[] = $directory; - } - - public function isFresh($timestamp) - { - foreach ($this->getFileResources() as $file) { - if (!$file->isFresh($timestamp)) { - return false; - } - } - - return true; - } - - public function getContent() - { - $parts = array(); - foreach ($this->getFileResources() as $file) { - $parts[] = $file->getContent(); - } - - return implode("\n", $parts); - } - - /** - * Returns a string to uniquely identify the current resource. - * - * @return string An identifying string - */ - public function __toString() - { - $parts = array(); - foreach ($this->directories as $directory) { - $parts[] = (string) $directory; - } - - return implode(',', $parts); - } - - public function getIterator() - { - return new \ArrayIterator($this->getFileResources()); - } - - /** - * Returns the relative version of a filename. - * - * @param ResourceInterface $file The file - * @param ResourceInterface $directory The directory - * - * @return string The name to compare with files from other directories - */ - protected function getRelativeName(ResourceInterface $file, ResourceInterface $directory) - { - return substr((string) $file, strlen((string) $directory)); - } - - /** - * Performs the coalesce. - * - * @return array An array of file resources - */ - private function getFileResources() - { - $paths = array(); - - foreach ($this->directories as $directory) { - foreach ($directory as $file) { - $relative = $this->getRelativeName($file, $directory); - - if (!isset($paths[$relative])) { - $paths[$relative] = $file; - } - } - } - - return array_values($paths); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php deleted file mode 100644 index 83c42be3..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php +++ /dev/null @@ -1,133 +0,0 @@ - - */ -class DirectoryResource implements IteratorResourceInterface -{ - private $path; - private $pattern; - - /** - * Constructor. - * - * @param string $path A directory path - * @param string $pattern A filename pattern - */ - public function __construct($path, $pattern = null) - { - if (DIRECTORY_SEPARATOR != substr($path, -1)) { - $path .= DIRECTORY_SEPARATOR; - } - - $this->path = $path; - $this->pattern = $pattern; - } - - public function isFresh($timestamp) - { - if (!is_dir($this->path) || filemtime($this->path) > $timestamp) { - return false; - } - - foreach ($this as $resource) { - if (!$resource->isFresh($timestamp)) { - return false; - } - } - - return true; - } - - /** - * Returns the combined content of all inner resources. - */ - public function getContent() - { - $content = array(); - foreach ($this as $resource) { - $content[] = $resource->getContent(); - } - - return implode("\n", $content); - } - - public function __toString() - { - return $this->path; - } - - public function getIterator() - { - return is_dir($this->path) - ? new DirectoryResourceIterator($this->getInnerIterator()) - : new \EmptyIterator(); - } - - protected function getInnerIterator() - { - return new DirectoryResourceFilterIterator(new \RecursiveDirectoryIterator($this->path, \RecursiveDirectoryIterator::FOLLOW_SYMLINKS), $this->pattern); - } -} - -/** - * An iterator that converts file objects into file resources. - * - * @author Kris Wallsmith - * @access private - */ -class DirectoryResourceIterator extends \RecursiveIteratorIterator -{ - public function current() - { - return new FileResource(parent::current()->getPathname()); - } -} - -/** - * Filters files by a basename pattern. - * - * @author Kris Wallsmith - * @access private - */ -class DirectoryResourceFilterIterator extends \RecursiveFilterIterator -{ - protected $pattern; - - public function __construct(\RecursiveDirectoryIterator $iterator, $pattern = null) - { - parent::__construct($iterator); - - $this->pattern = $pattern; - } - - public function accept() - { - $file = $this->current(); - $name = $file->getBasename(); - - if ($file->isDir()) { - return '.' != $name[0]; - } - - return null === $this->pattern || 0 < preg_match($this->pattern, $name); - } - - public function getChildren() - { - return new self(new \RecursiveDirectoryIterator($this->current()->getPathname(), \RecursiveDirectoryIterator::FOLLOW_SYMLINKS), $this->pattern); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php deleted file mode 100644 index 50550068..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ -class FileResource implements ResourceInterface -{ - private $path; - - /** - * Constructor. - * - * @param string $path The path to a file - */ - public function __construct($path) - { - $this->path = $path; - } - - public function isFresh($timestamp) - { - return file_exists($this->path) && filemtime($this->path) <= $timestamp; - } - - public function getContent() - { - return file_exists($this->path) ? file_get_contents($this->path) : ''; - } - - public function __toString() - { - return $this->path; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/IteratorResourceInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/IteratorResourceInterface.php deleted file mode 100644 index 815c958c..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/IteratorResourceInterface.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -interface IteratorResourceInterface extends ResourceInterface, \IteratorAggregate -{ -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/ResourceInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/ResourceInterface.php deleted file mode 100644 index a33610b5..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/ResourceInterface.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -interface ResourceInterface -{ - /** - * Checks if a timestamp represents the latest resource. - * - * @param integer $timestamp A UNIX timestamp - * - * @return Boolean True if the timestamp is up to date - */ - public function isFresh($timestamp); - - /** - * Returns the content of the resource. - * - * @return string The content - */ - public function getContent(); - - /** - * Returns a unique string for the current resource. - * - * @return string A unique string to identity the current resource - */ - public function __toString(); -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/CacheBustingWorker.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/CacheBustingWorker.php deleted file mode 100644 index ae6e6e3f..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/CacheBustingWorker.php +++ /dev/null @@ -1,71 +0,0 @@ - - */ -class CacheBustingWorker implements WorkerInterface -{ - private $separator; - - public function __construct($separator = '-') - { - $this->separator = $separator; - } - - public function process(AssetInterface $asset, AssetFactory $factory) - { - if (!$path = $asset->getTargetPath()) { - // no path to work with - return; - } - - if (!$search = pathinfo($path, PATHINFO_EXTENSION)) { - // nothing to replace - return; - } - - $replace = $this->separator.$this->getHash($asset, $factory).'.'.$search; - if (preg_match('/'.preg_quote($replace, '/').'$/', $path)) { - // already replaced - return; - } - - $asset->setTargetPath( - preg_replace('/\.'.preg_quote($search, '/').'$/', $replace, $path) - ); - } - - protected function getHash(AssetInterface $asset, AssetFactory $factory) - { - $hash = hash_init('sha1'); - - hash_update($hash, $factory->getLastModified($asset)); - - if ($asset instanceof AssetCollectionInterface) { - foreach ($asset as $i => $leaf) { - $sourcePath = $leaf->getSourcePath(); - hash_update($hash, $sourcePath ?: $i); - } - } - - return substr(hash_final($hash), 0, 7); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php deleted file mode 100644 index 1b2cf9e3..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @todo A better asset-matcher mechanism - */ -class EnsureFilterWorker implements WorkerInterface -{ - const CHECK_SOURCE = 1; - const CHECK_TARGET = 2; - - private $pattern; - private $filter; - private $flags; - - /** - * Constructor. - * - * @param string $pattern A regex for checking the asset's target URL - * @param FilterInterface $filter A filter to apply if the regex matches - * @param integer $flags Flags for what to check - */ - public function __construct($pattern, FilterInterface $filter, $flags = null) - { - if (null === $flags) { - $flags = self::CHECK_SOURCE | self::CHECK_TARGET; - } - - $this->pattern = $pattern; - $this->filter = $filter; - $this->flags = $flags; - } - - public function process(AssetInterface $asset, AssetFactory $factory) - { - if ( - (self::CHECK_SOURCE === (self::CHECK_SOURCE & $this->flags) && preg_match($this->pattern, $asset->getSourcePath())) - || - (self::CHECK_TARGET === (self::CHECK_TARGET & $this->flags) && preg_match($this->pattern, $asset->getTargetPath())) - ) { - $asset->ensureFilter($this->filter); - } - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/WorkerInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/WorkerInterface.php deleted file mode 100644 index 985db528..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/WorkerInterface.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ -interface WorkerInterface -{ - /** - * Processes an asset. - * - * @param AssetInterface $asset An asset - * @param AssetFactory $factory The factory - * - * @return AssetInterface|null May optionally return a replacement asset - */ - public function process(AssetInterface $asset, AssetFactory $factory); -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseCssFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseCssFilter.php deleted file mode 100644 index 0d9ff700..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseCssFilter.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -abstract class BaseCssFilter implements FilterInterface -{ - /** - * @see CssUtils::filterReferences() - */ - protected function filterReferences($content, $callback, $limit = -1, &$count = 0) - { - return CssUtils::filterReferences($content, $callback, $limit, $count); - } - - /** - * @see CssUtils::filterUrls() - */ - protected function filterUrls($content, $callback, $limit = -1, &$count = 0) - { - return CssUtils::filterUrls($content, $callback, $limit, $count); - } - - /** - * @see CssUtils::filterImports() - */ - protected function filterImports($content, $callback, $limit = -1, &$count = 0, $includeUrl = true) - { - return CssUtils::filterImports($content, $callback, $limit, $count, $includeUrl); - } - - /** - * @see CssUtils::filterIEFilters() - */ - protected function filterIEFilters($content, $callback, $limit = -1, &$count = 0) - { - return CssUtils::filterIEFilters($content, $callback, $limit, $count); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseNodeFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseNodeFilter.php deleted file mode 100644 index d88e9cda..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseNodeFilter.php +++ /dev/null @@ -1,44 +0,0 @@ -nodePaths; - } - - public function setNodePaths(array $nodePaths) - { - $this->nodePaths = $nodePaths; - } - - public function addNodePath($nodePath) - { - $this->nodePaths[] = $nodePath; - } - - protected function createProcessBuilder(array $arguments = array()) - { - $pb = parent::createProcessBuilder($arguments); - - if ($this->nodePaths) { - $pb->setEnv('NODE_PATH', implode(':', $this->nodePaths)); - $this->mergeEnv($pb); - } - - return $pb; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseProcessFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseProcessFilter.php deleted file mode 100644 index b049f65c..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseProcessFilter.php +++ /dev/null @@ -1,58 +0,0 @@ -timeout = $timeout; - } - - /** - * Creates a new process builder. - * - * @param array $arguments An optional array of arguments - * - * @return ProcessBuilder A new process builder - */ - protected function createProcessBuilder(array $arguments = array()) - { - $pb = new ProcessBuilder($arguments); - - if (null !== $this->timeout) { - $pb->setTimeout($this->timeout); - } - - return $pb; - } - - protected function mergeEnv(ProcessBuilder $pb) - { - foreach (array_filter($_SERVER, 'is_scalar') as $key => $value) { - $pb->setEnv($key, $value); - } - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CallablesFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/CallablesFilter.php deleted file mode 100644 index fafa52e2..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CallablesFilter.php +++ /dev/null @@ -1,63 +0,0 @@ - - */ -class CallablesFilter implements FilterInterface, DependencyExtractorInterface -{ - private $loader; - private $dumper; - private $extractor; - - /** - * @param callable|null $loader - * @param callable|null $dumper - * @param callable|null $extractor - */ - public function __construct($loader = null, $dumper = null, $extractor = null) - { - $this->loader = $loader; - $this->dumper = $dumper; - $this->extractor = $extractor; - } - - public function filterLoad(AssetInterface $asset) - { - if (null !== $callable = $this->loader) { - $callable($asset); - } - } - - public function filterDump(AssetInterface $asset) - { - if (null !== $callable = $this->dumper) { - $callable($asset); - } - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - if (null !== $callable = $this->extractor) { - return $callable($factory, $content, $loadPath); - } - - return array(); - } - -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CoffeeScriptFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/CoffeeScriptFilter.php deleted file mode 100644 index 6e6c95a9..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CoffeeScriptFilter.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ -class CoffeeScriptFilter extends BaseNodeFilter -{ - private $coffeeBin; - private $nodeBin; - - // coffee options - private $bare; - - public function __construct($coffeeBin = '/usr/bin/coffee', $nodeBin = null) - { - $this->coffeeBin = $coffeeBin; - $this->nodeBin = $nodeBin; - } - - public function setBare($bare) - { - $this->bare = $bare; - } - - public function filterLoad(AssetInterface $asset) - { - $input = tempnam(sys_get_temp_dir(), 'assetic_coffeescript'); - file_put_contents($input, $asset->getContent()); - - $pb = $this->createProcessBuilder($this->nodeBin - ? array($this->nodeBin, $this->coffeeBin) - : array($this->coffeeBin)); - - $pb->add('-cp'); - - if ($this->bare) { - $pb->add('--bare'); - } - - $pb->add($input); - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } - - public function filterDump(AssetInterface $asset) - { - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php deleted file mode 100644 index c32fc46d..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php +++ /dev/null @@ -1,401 +0,0 @@ - - */ -class CompassFilter extends BaseProcessFilter implements DependencyExtractorInterface -{ - private $compassPath; - private $rubyPath; - private $scss; - - // sass options - private $unixNewlines; - private $debugInfo; - private $cacheLocation; - private $noCache; - - // compass options - private $force; - private $style; - private $quiet; - private $boring; - private $noLineComments; - private $imagesDir; - private $javascriptsDir; - private $fontsDir; - - // compass configuration file options - private $plugins = array(); - private $loadPaths = array(); - private $httpPath; - private $httpImagesPath; - private $httpFontsPath; - private $httpGeneratedImagesPath; - private $generatedImagesPath; - private $httpJavascriptsPath; - private $homeEnv = true; - - public function __construct($compassPath = '/usr/bin/compass', $rubyPath = null) - { - $this->compassPath = $compassPath; - $this->rubyPath = $rubyPath; - $this->cacheLocation = sys_get_temp_dir(); - - if ('cli' !== php_sapi_name()) { - $this->boring = true; - } - } - - public function setScss($scss) - { - $this->scss = $scss; - } - - // sass options setters - public function setUnixNewlines($unixNewlines) - { - $this->unixNewlines = $unixNewlines; - } - - public function setDebugInfo($debugInfo) - { - $this->debugInfo = $debugInfo; - } - - public function setCacheLocation($cacheLocation) - { - $this->cacheLocation = $cacheLocation; - } - - public function setNoCache($noCache) - { - $this->noCache = $noCache; - } - - // compass options setters - public function setForce($force) - { - $this->force = $force; - } - - public function setStyle($style) - { - $this->style = $style; - } - - public function setQuiet($quiet) - { - $this->quiet = $quiet; - } - - public function setBoring($boring) - { - $this->boring = $boring; - } - - public function setNoLineComments($noLineComments) - { - $this->noLineComments = $noLineComments; - } - - public function setImagesDir($imagesDir) - { - $this->imagesDir = $imagesDir; - } - - public function setJavascriptsDir($javascriptsDir) - { - $this->javascriptsDir = $javascriptsDir; - } - - public function setFontsDir($fontsDir) - { - $this->fontsDir = $fontsDir; - } - - // compass configuration file options setters - public function setPlugins(array $plugins) - { - $this->plugins = $plugins; - } - - public function addPlugin($plugin) - { - $this->plugins[] = $plugin; - } - - public function setLoadPaths(array $loadPaths) - { - $this->loadPaths = $loadPaths; - } - - public function addLoadPath($loadPath) - { - $this->loadPaths[] = $loadPath; - } - - public function setHttpPath($httpPath) - { - $this->httpPath = $httpPath; - } - - public function setHttpImagesPath($httpImagesPath) - { - $this->httpImagesPath = $httpImagesPath; - } - - public function setHttpFontsPath($httpFontsPath) - { - $this->httpFontsPath = $httpFontsPath; - } - - public function setHttpGeneratedImagesPath($httpGeneratedImagesPath) - { - $this->httpGeneratedImagesPath = $httpGeneratedImagesPath; - } - - public function setGeneratedImagesPath($generatedImagesPath) - { - $this->generatedImagesPath = $generatedImagesPath; - } - - public function setHttpJavascriptsPath($httpJavascriptsPath) - { - $this->httpJavascriptsPath = $httpJavascriptsPath; - } - - public function setHomeEnv($homeEnv) - { - $this->homeEnv = $homeEnv; - } - - public function filterLoad(AssetInterface $asset) - { - $root = $asset->getSourceRoot(); - $path = $asset->getSourcePath(); - - $loadPaths = $this->loadPaths; - if ($root && $path) { - $loadPaths[] = dirname($root.'/'.$path); - } - - // compass does not seems to handle symlink, so we use realpath() - $tempDir = realpath(sys_get_temp_dir()); - - $compassProcessArgs = array( - $this->compassPath, - 'compile', - $tempDir, - ); - if (null !== $this->rubyPath) { - $compassProcessArgs = array_merge(explode(' ', $this->rubyPath), $compassProcessArgs); - } - - $pb = $this->createProcessBuilder($compassProcessArgs); - - if ($this->force) { - $pb->add('--force'); - } - - if ($this->style) { - $pb->add('--output-style')->add($this->style); - } - - if ($this->quiet) { - $pb->add('--quiet'); - } - - if ($this->boring) { - $pb->add('--boring'); - } - - if ($this->noLineComments) { - $pb->add('--no-line-comments'); - } - - // these two options are not passed into the config file - // because like this, compass adapts this to be xxx_dir or xxx_path - // whether it's an absolute path or not - if ($this->imagesDir) { - $pb->add('--images-dir')->add($this->imagesDir); - } - - if ($this->javascriptsDir) { - $pb->add('--javascripts-dir')->add($this->javascriptsDir); - } - - // options in config file - $optionsConfig = array(); - - if (!empty($loadPaths)) { - $optionsConfig['additional_import_paths'] = $loadPaths; - } - - if ($this->unixNewlines) { - $optionsConfig['sass_options']['unix_newlines'] = true; - } - - if ($this->debugInfo) { - $optionsConfig['sass_options']['debug_info'] = true; - } - - if ($this->cacheLocation) { - $optionsConfig['sass_options']['cache_location'] = $this->cacheLocation; - } - - if ($this->noCache) { - $optionsConfig['sass_options']['no_cache'] = true; - } - - if ($this->httpPath) { - $optionsConfig['http_path'] = $this->httpPath; - } - - if ($this->httpImagesPath) { - $optionsConfig['http_images_path'] = $this->httpImagesPath; - } - - if ($this->httpFontsPath) { - $optionsConfig['http_fonts_path'] = $this->httpFontsPath; - } - - if ($this->httpGeneratedImagesPath) { - $optionsConfig['http_generated_images_path'] = $this->httpGeneratedImagesPath; - } - - if ($this->generatedImagesPath) { - $optionsConfig['generated_images_path'] = $this->generatedImagesPath; - } - - if ($this->httpJavascriptsPath) { - $optionsConfig['http_javascripts_path'] = $this->httpJavascriptsPath; - } - - if ($this->fontsDir) { - $optionsConfig['fonts_dir'] = $this->fontsDir; - } - - // options in configuration file - if (count($optionsConfig)) { - $config = array(); - foreach ($this->plugins as $plugin) { - $config[] = sprintf("require '%s'", addcslashes($plugin, '\\')); - } - foreach ($optionsConfig as $name => $value) { - if (!is_array($value)) { - $config[] = sprintf('%s = "%s"', $name, addcslashes($value, '\\')); - } elseif (!empty($value)) { - $config[] = sprintf('%s = %s', $name, $this->formatArrayToRuby($value)); - } - } - - $configFile = tempnam($tempDir, 'assetic_compass'); - file_put_contents($configFile, implode("\n", $config)."\n"); - $pb->add('--config')->add($configFile); - } - - $pb->add('--sass-dir')->add('')->add('--css-dir')->add(''); - - // compass choose the type (sass or scss from the filename) - if (null !== $this->scss) { - $type = $this->scss ? 'scss' : 'sass'; - } elseif ($path) { - // FIXME: what if the extension is something else? - $type = pathinfo($path, PATHINFO_EXTENSION); - } else { - $type = 'scss'; - } - - $tempName = tempnam($tempDir, 'assetic_compass'); - unlink($tempName); // FIXME: don't use tempnam() here - - // input - $input = $tempName.'.'.$type; - - // work-around for https://github.com/chriseppstein/compass/issues/748 - if (defined('PHP_WINDOWS_VERSION_MAJOR')) { - $input = str_replace('\\', '/', $input); - } - - $pb->add($input); - file_put_contents($input, $asset->getContent()); - - // output - $output = $tempName.'.css'; - - if ($this->homeEnv) { - // it's not really usefull but... https://github.com/chriseppstein/compass/issues/376 - $pb->setEnv('HOME', sys_get_temp_dir()); - $this->mergeEnv($pb); - } - - $proc = $pb->getProcess(); - $code = $proc->run(); - - if (0 !== $code) { - unlink($input); - if (isset($configFile)) { - unlink($configFile); - } - - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent(file_get_contents($output)); - - unlink($input); - unlink($output); - if (isset($configFile)) { - unlink($configFile); - } - } - - public function filterDump(AssetInterface $asset) - { - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - // todo - return array(); - } - - private function formatArrayToRuby($array) - { - $output = array(); - - // does we have an associative array ? - if (count(array_filter(array_keys($array), "is_numeric")) != count($array)) { - foreach ($array as $name => $value) { - $output[] = sprintf(' :%s => "%s"', $name, addcslashes($value, '\\')); - } - $output = "{\n".implode(",\n", $output)."\n}"; - } else { - foreach ($array as $name => $value) { - $output[] = sprintf(' "%s"', addcslashes($value, '\\')); - } - $output = "[\n".implode(",\n", $output)."\n]"; - } - - return $output; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssEmbedFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssEmbedFilter.php deleted file mode 100644 index e0c2c159..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssEmbedFilter.php +++ /dev/null @@ -1,145 +0,0 @@ - - */ -class CssEmbedFilter extends BaseProcessFilter implements DependencyExtractorInterface -{ - private $jarPath; - private $javaPath; - private $charset; - private $mhtml; // Enable MHTML mode. - private $mhtmlRoot; // Use as the MHTML root for the file. - private $root; // Prepends to all relative URLs. - private $skipMissing; // Don't throw an error for missing image files. - private $maxUriLength; // Maximum length for a data URI. Defaults to 32768. - private $maxImageSize; // Maximum image size (in bytes) to convert. - - public function __construct($jarPath, $javaPath = '/usr/bin/java') - { - $this->jarPath = $jarPath; - $this->javaPath = $javaPath; - } - - public function setCharset($charset) - { - $this->charset = $charset; - } - - public function setMhtml($mhtml) - { - $this->mhtml = $mhtml; - } - - public function setMhtmlRoot($mhtmlRoot) - { - $this->mhtmlRoot = $mhtmlRoot; - } - - public function setRoot($root) - { - $this->root = $root; - } - - public function setSkipMissing($skipMissing) - { - $this->skipMissing = $skipMissing; - } - - public function setMaxUriLength($maxUriLength) - { - $this->maxUriLength = $maxUriLength; - } - - public function setMaxImageSize($maxImageSize) - { - $this->maxImageSize = $maxImageSize; - } - - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $pb = $this->createProcessBuilder(array( - $this->javaPath, - '-jar', - $this->jarPath, - )); - - if (null !== $this->charset) { - $pb->add('--charset')->add($this->charset); - } - - if ($this->mhtml) { - $pb->add('--mhtml'); - } - - if (null !== $this->mhtmlRoot) { - $pb->add('--mhtmlroot')->add($this->mhtmlRoot); - } - - // automatically define root if not already defined - if (null === $this->root) { - $root = $asset->getSourceRoot(); - $path = $asset->getSourcePath(); - - if ($root && $path) { - $pb->add('--root')->add(dirname($root.'/'.$path)); - } - } else { - $pb->add('--root')->add($this->root); - } - - if ($this->skipMissing) { - $pb->add('--skip-missing'); - } - - if (null !== $this->maxUriLength) { - $pb->add('--max-uri-length')->add($this->maxUriLength); - } - - if (null !== $this->maxImageSize) { - $pb->add('--max-image-size')->add($this->maxImageSize); - } - - // input - $pb->add($input = tempnam(sys_get_temp_dir(), 'assetic_cssembed')); - file_put_contents($input, $asset->getContent()); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - // todo - return array(); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php deleted file mode 100644 index 6dd264f0..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php +++ /dev/null @@ -1,108 +0,0 @@ - - */ -class CssImportFilter extends BaseCssFilter implements DependencyExtractorInterface -{ - private $importFilter; - - /** - * Constructor. - * - * @param FilterInterface $importFilter Filter for each imported asset - */ - public function __construct(FilterInterface $importFilter = null) - { - $this->importFilter = $importFilter ?: new CssRewriteFilter(); - } - - public function filterLoad(AssetInterface $asset) - { - $importFilter = $this->importFilter; - $sourceRoot = $asset->getSourceRoot(); - $sourcePath = $asset->getSourcePath(); - - $callback = function($matches) use ($importFilter, $sourceRoot, $sourcePath) { - if (!$matches['url'] || null === $sourceRoot) { - return $matches[0]; - } - - $importRoot = $sourceRoot; - - if (false !== strpos($matches['url'], '://')) { - // absolute - list($importScheme, $tmp) = explode('://', $matches['url'], 2); - list($importHost, $importPath) = explode('/', $tmp, 2); - $importRoot = $importScheme.'://'.$importHost; - } elseif (0 === strpos($matches['url'], '//')) { - // protocol-relative - list($importHost, $importPath) = explode('/', substr($matches['url'], 2), 2); - $importRoot = '//'.$importHost; - } elseif ('/' == $matches['url'][0]) { - // root-relative - $importPath = substr($matches['url'], 1); - } elseif (null !== $sourcePath) { - // document-relative - $importPath = $matches['url']; - if ('.' != $sourceDir = dirname($sourcePath)) { - $importPath = $sourceDir.'/'.$importPath; - } - } else { - return $matches[0]; - } - - $importSource = $importRoot.'/'.$importPath; - if (false !== strpos($importSource, '://') || 0 === strpos($importSource, '//')) { - $import = new HttpAsset($importSource, array($importFilter), true); - } elseif ('css' != pathinfo($importPath, PATHINFO_EXTENSION) || !file_exists($importSource)) { - // ignore non-css and non-existant imports - return $matches[0]; - } else { - $import = new FileAsset($importSource, array($importFilter), $importRoot, $importPath); - } - - $import->setTargetPath($sourcePath); - - return $import->dump(); - }; - - $content = $asset->getContent(); - $lastHash = md5($content); - - do { - $content = $this->filterImports($content, $callback); - $hash = md5($content); - } while ($lastHash != $hash && $lastHash = $hash); - - $asset->setContent($content); - } - - public function filterDump(AssetInterface $asset) - { - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - // todo - return array(); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssMinFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssMinFilter.php deleted file mode 100644 index e6339586..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssMinFilter.php +++ /dev/null @@ -1,74 +0,0 @@ - - */ -class CssMinFilter implements FilterInterface -{ - private $filters; - private $plugins; - - public function __construct() - { - $this->filters = array(); - $this->plugins = array(); - } - - public function setFilters(array $filters) - { - $this->filters = $filters; - } - - public function setFilter($name, $value) - { - $this->filters[$name] = $value; - } - - public function setPlugins(array $plugins) - { - $this->plugins = $plugins; - } - - public function setPlugin($name, $value) - { - $this->plugins[$name] = $value; - } - - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $filters = $this->filters; - $plugins = $this->plugins; - - if (isset($filters['ImportImports']) && true === $filters['ImportImports']) { - $root = $asset->getSourceRoot(); - $path = $asset->getSourcePath(); - if ($root && $path) { - $filters['ImportImports'] = array('BasePath' => dirname($root.'/'.$path)); - } else { - unset($filters['ImportImports']); - } - } - - $asset->setContent(\CssMin::minify($asset->getContent(), $filters, $plugins)); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssRewriteFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssRewriteFilter.php deleted file mode 100644 index 8d612c14..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssRewriteFilter.php +++ /dev/null @@ -1,102 +0,0 @@ - - */ -class CssRewriteFilter extends BaseCssFilter -{ - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $sourceBase = $asset->getSourceRoot(); - $sourcePath = $asset->getSourcePath(); - $targetPath = $asset->getTargetPath(); - - if (null === $sourcePath || null === $targetPath || $sourcePath == $targetPath) { - return; - } - - // learn how to get from the target back to the source - if (false !== strpos($sourceBase, '://')) { - list($scheme, $url) = explode('://', $sourceBase.'/'.$sourcePath, 2); - list($host, $path) = explode('/', $url, 2); - - $host = $scheme.'://'.$host.'/'; - $path = false === strpos($path, '/') ? '' : dirname($path); - $path .= '/'; - } else { - // assume source and target are on the same host - $host = ''; - - // pop entries off the target until it fits in the source - if ('.' == dirname($sourcePath)) { - $path = str_repeat('../', substr_count($targetPath, '/')); - } elseif ('.' == $targetDir = dirname($targetPath)) { - $path = dirname($sourcePath).'/'; - } else { - $path = ''; - while (0 !== strpos($sourcePath, $targetDir)) { - if (false !== $pos = strrpos($targetDir, '/')) { - $targetDir = substr($targetDir, 0, $pos); - $path .= '../'; - } else { - $targetDir = ''; - $path .= '../'; - break; - } - } - $path .= ltrim(substr(dirname($sourcePath).'/', strlen($targetDir)), '/'); - } - } - - $content = $this->filterReferences($asset->getContent(), function($matches) use ($host, $path) { - if (false !== strpos($matches['url'], '://') || 0 === strpos($matches['url'], '//') || 0 === strpos($matches['url'], 'data:')) { - // absolute or protocol-relative or data uri - return $matches[0]; - } - - if (isset($matches['url'][0]) && '/' == $matches['url'][0]) { - // root relative - return str_replace($matches['url'], $host.$matches['url'], $matches[0]); - } - - // document relative - $url = $matches['url']; - while (0 === strpos($url, '../') && 2 <= substr_count($path, '/')) { - $path = substr($path, 0, strrpos(rtrim($path, '/'), '/') + 1); - $url = substr($url, 3); - } - - $parts = array(); - foreach (explode('/', $host.$path.$url) as $part) { - if ('..' === $part && count($parts) && '..' !== end($parts)) { - array_pop($parts); - } else { - $parts[] = $part; - } - } - - return str_replace($matches['url'], implode('/', $parts), $matches[0]); - }); - - $asset->setContent($content); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/DartFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/DartFilter.php deleted file mode 100644 index 95055816..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/DartFilter.php +++ /dev/null @@ -1,67 +0,0 @@ -dartBin = $dartBin; - } - - public function filterLoad(AssetInterface $asset) - { - $input = tempnam(sys_get_temp_dir(), 'assetic_dart'); - $output = tempnam(sys_get_temp_dir(), 'assetic_dart'); - - file_put_contents($input, $asset->getContent()); - - $pb = $this->createProcessBuilder() - ->add($this->dartBin) - ->add('-o'.$output) - ->add($input) - ; - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - if (file_exists($output)) { - unlink($output); - } - - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - if (!file_exists($output)) { - throw new \RuntimeException('Error creating output file.'); - } - - $asset->setContent(file_get_contents($output)); - unlink($output); - } - - public function filterDump(AssetInterface $asset) - { - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/DependencyExtractorInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/DependencyExtractorInterface.php deleted file mode 100644 index 934371f2..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/DependencyExtractorInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -interface DependencyExtractorInterface extends FilterInterface -{ - /** - * Returns child assets. - * - * @param AssetFactory $factory The asset factory - * @param string $content The asset content - * @param string $loadPath An optional load path - * - * @return AssetInterface[] Child assets - */ - public function getChildren(AssetFactory $factory, $content, $loadPath = null); -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/EmberPrecompileFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/EmberPrecompileFilter.php deleted file mode 100644 index 2467960e..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/EmberPrecompileFilter.php +++ /dev/null @@ -1,83 +0,0 @@ - - */ -class EmberPrecompileFilter extends BaseNodeFilter -{ - private $emberBin; - private $nodeBin; - - public function __construct($handlebarsBin = '/usr/bin/ember-precompile', $nodeBin = null) - { - $this->emberBin = $handlebarsBin; - $this->nodeBin = $nodeBin; - } - - public function filterLoad(AssetInterface $asset) - { - $pb = $this->createProcessBuilder($this->nodeBin - ? array($this->nodeBin, $this->emberBin) - : array($this->emberBin)); - - $templateName = basename($asset->getSourcePath()); - - $inputDirPath = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('input_dir'); - $inputPath = $inputDirPath.DIRECTORY_SEPARATOR.$templateName; - $outputPath = tempnam(sys_get_temp_dir(), 'output'); - - mkdir($inputDirPath); - file_put_contents($inputPath, $asset->getContent()); - - $pb->add($inputPath)->add('-f')->add($outputPath); - - $process = $pb->getProcess(); - $returnCode = $process->run(); - - unlink($inputPath); - rmdir($inputDirPath); - - if (127 === $returnCode) { - throw new \RuntimeException('Path to node executable could not be resolved.'); - } - - if (0 !== $returnCode) { - if (file_exists($outputPath)) { - unlink($outputPath); - } - throw FilterException::fromProcess($process)->setInput($asset->getContent()); - } - - if (!file_exists($outputPath)) { - throw new \RuntimeException('Error creating output file.'); - } - - $compiledJs = file_get_contents($outputPath); - unlink($outputPath); - - $asset->setContent($compiledJs); - } - - public function filterDump(AssetInterface $asset) - { - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php deleted file mode 100644 index 9dc28cb2..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php +++ /dev/null @@ -1,82 +0,0 @@ - - */ -class FilterCollection implements FilterInterface, \IteratorAggregate, \Countable -{ - private $filters = array(); - - public function __construct($filters = array()) - { - foreach ($filters as $filter) { - $this->ensure($filter); - } - } - - /** - * Checks that the current collection contains the supplied filter. - * - * If the supplied filter is another filter collection, each of its - * filters will be checked. - */ - public function ensure(FilterInterface $filter) - { - if ($filter instanceof \Traversable) { - foreach ($filter as $f) { - $this->ensure($f); - } - } elseif (!in_array($filter, $this->filters, true)) { - $this->filters[] = $filter; - } - } - - public function all() - { - return $this->filters; - } - - public function clear() - { - $this->filters = array(); - } - - public function filterLoad(AssetInterface $asset) - { - foreach ($this->filters as $filter) { - $filter->filterLoad($asset); - } - } - - public function filterDump(AssetInterface $asset) - { - foreach ($this->filters as $filter) { - $filter->filterDump($asset); - } - } - - public function getIterator() - { - return new \ArrayIterator($this->filters); - } - - public function count() - { - return count($this->filters); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterInterface.php deleted file mode 100644 index 17ff87d9..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -interface FilterInterface -{ - /** - * Filters an asset after it has been loaded. - * - * @param AssetInterface $asset An asset - */ - public function filterLoad(AssetInterface $asset); - - /** - * Filters an asset just before it's dumped. - * - * @param AssetInterface $asset An asset - */ - public function filterDump(AssetInterface $asset); -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php deleted file mode 100644 index 59e062e2..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php +++ /dev/null @@ -1,101 +0,0 @@ - - */ -abstract class BaseCompilerFilter implements FilterInterface -{ - // compilation levels - const COMPILE_WHITESPACE_ONLY = 'WHITESPACE_ONLY'; - const COMPILE_SIMPLE_OPTIMIZATIONS = 'SIMPLE_OPTIMIZATIONS'; - const COMPILE_ADVANCED_OPTIMIZATIONS = 'ADVANCED_OPTIMIZATIONS'; - - // formatting modes - const FORMAT_PRETTY_PRINT = 'pretty_print'; - const FORMAT_PRINT_INPUT_DELIMITER = 'print_input_delimiter'; - - // warning levels - const LEVEL_QUIET = 'QUIET'; - const LEVEL_DEFAULT = 'DEFAULT'; - const LEVEL_VERBOSE = 'VERBOSE'; - - // languages - const LANGUAGE_ECMASCRIPT3 = 'ECMASCRIPT3'; - const LANGUAGE_ECMASCRIPT5 = 'ECMASCRIPT5'; - const LANGUAGE_ECMASCRIPT5_STRICT = 'ECMASCRIPT5_STRICT'; - - protected $timeout; - protected $compilationLevel; - protected $jsExterns; - protected $externsUrl; - protected $excludeDefaultExterns; - protected $formatting; - protected $useClosureLibrary; - protected $warningLevel; - protected $language; - - public function setTimeout($timeout) - { - $this->timeout = $timeout; - } - - public function setCompilationLevel($compilationLevel) - { - $this->compilationLevel = $compilationLevel; - } - - public function setJsExterns($jsExterns) - { - $this->jsExterns = $jsExterns; - } - - public function setExternsUrl($externsUrl) - { - $this->externsUrl = $externsUrl; - } - - public function setExcludeDefaultExterns($excludeDefaultExterns) - { - $this->excludeDefaultExterns = $excludeDefaultExterns; - } - - public function setFormatting($formatting) - { - $this->formatting = $formatting; - } - - public function setUseClosureLibrary($useClosureLibrary) - { - $this->useClosureLibrary = $useClosureLibrary; - } - - public function setWarningLevel($warningLevel) - { - $this->warningLevel = $warningLevel; - } - - public function setLanguage($language) - { - $this->language = $language; - } - - public function filterLoad(AssetInterface $asset) - { - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php deleted file mode 100644 index 0b090c74..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php +++ /dev/null @@ -1,132 +0,0 @@ - - */ -class CompilerApiFilter extends BaseCompilerFilter -{ - private $proxy; - private $proxyFullUri; - - public function setProxy($proxy) - { - $this->proxy = $proxy; - } - - public function setProxyFullUri($proxyFullUri) - { - $this->proxyFullUri = $proxyFullUri; - } - - public function filterDump(AssetInterface $asset) - { - $query = array( - 'js_code' => $asset->getContent(), - 'output_format' => 'json', - 'output_info' => 'compiled_code', - ); - - if (null !== $this->compilationLevel) { - $query['compilation_level'] = $this->compilationLevel; - } - - if (null !== $this->jsExterns) { - $query['js_externs'] = $this->jsExterns; - } - - if (null !== $this->externsUrl) { - $query['externs_url'] = $this->externsUrl; - } - - if (null !== $this->excludeDefaultExterns) { - $query['exclude_default_externs'] = $this->excludeDefaultExterns ? 'true' : 'false'; - } - - if (null !== $this->formatting) { - $query['formatting'] = $this->formatting; - } - - if (null !== $this->useClosureLibrary) { - $query['use_closure_library'] = $this->useClosureLibrary ? 'true' : 'false'; - } - - if (null !== $this->warningLevel) { - $query['warning_level'] = $this->warningLevel; - } - - if (null !== $this->language) { - $query['language'] = $this->language; - } - - if (preg_match('/1|yes|on|true/i', ini_get('allow_url_fopen'))) { - $contextOptions = array('http' => array( - 'method' => 'POST', - 'header' => 'Content-Type: application/x-www-form-urlencoded', - 'content' => http_build_query($query), - )); - if (null !== $this->timeout) { - $contextOptions['http']['timeout'] = $this->timeout; - } - if ($this->proxy) { - $contextOptions['http']['proxy'] = $this->proxy; - $contextOptions['http']['request_fulluri'] = (Boolean) $this->proxyFullUri; - } - $context = stream_context_create($contextOptions); - - $response = file_get_contents('http://closure-compiler.appspot.com/compile', false, $context); - $data = json_decode($response); - - } elseif (defined('CURLOPT_POST') && !in_array('curl_init', explode(',', ini_get('disable_functions')))) { - - $ch = curl_init('http://closure-compiler.appspot.com/compile'); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/x-www-form-urlencoded')); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $query); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15); - if (null !== $this->timeout) { - curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout); - } - if ($this->proxy) { - curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE); - curl_setopt($ch, CURLOPT_PROXY, $this->proxy); - } - $response = curl_exec($ch); - curl_close($ch); - - $data = json_decode($response); - } else { - throw new \RuntimeException("There is no known way to contact closure compiler available"); - } - - if (isset($data->serverErrors) && 0 < count($data->serverErrors)) { - // @codeCoverageIgnoreStart - throw new \RuntimeException(sprintf('The Google Closure Compiler API threw some server errors: '.print_r($data->serverErrors, true))); - // @codeCoverageIgnoreEnd - } - - if (isset($data->errors) && 0 < count($data->errors)) { - // @codeCoverageIgnoreStart - throw new \RuntimeException(sprintf('The Google Closure Compiler API threw some errors: '.print_r($data->errors, true))); - // @codeCoverageIgnoreEnd - } - - $asset->setContent($data->compiledCode); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php deleted file mode 100644 index d4a1e168..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php +++ /dev/null @@ -1,98 +0,0 @@ - - */ -class CompilerJarFilter extends BaseCompilerFilter -{ - private $jarPath; - private $javaPath; - - public function __construct($jarPath, $javaPath = '/usr/bin/java') - { - $this->jarPath = $jarPath; - $this->javaPath = $javaPath; - } - - public function filterDump(AssetInterface $asset) - { - $cleanup = array(); - - $pb = new ProcessBuilder(array( - $this->javaPath, - '-jar', - $this->jarPath, - )); - - if (null !== $this->timeout) { - $pb->setTimeout($this->timeout); - } - - if (null !== $this->compilationLevel) { - $pb->add('--compilation_level')->add($this->compilationLevel); - } - - if (null !== $this->jsExterns) { - $cleanup[] = $externs = tempnam(sys_get_temp_dir(), 'assetic_google_closure_compiler'); - file_put_contents($externs, $this->jsExterns); - $pb->add('--externs')->add($externs); - } - - if (null !== $this->externsUrl) { - $cleanup[] = $externs = tempnam(sys_get_temp_dir(), 'assetic_google_closure_compiler'); - file_put_contents($externs, file_get_contents($this->externsUrl)); - $pb->add('--externs')->add($externs); - } - - if (null !== $this->excludeDefaultExterns) { - $pb->add('--use_only_custom_externs'); - } - - if (null !== $this->formatting) { - $pb->add('--formatting')->add($this->formatting); - } - - if (null !== $this->useClosureLibrary) { - $pb->add('--manage_closure_dependencies'); - } - - if (null !== $this->warningLevel) { - $pb->add('--warning_level')->add($this->warningLevel); - } - - if (null !== $this->language) { - $pb->add('--language_in')->add($this->language); - } - - $pb->add('--js')->add($cleanup[] = $input = tempnam(sys_get_temp_dir(), 'assetic_google_closure_compiler')); - file_put_contents($input, $asset->getContent()); - - $proc = $pb->getProcess(); - $code = $proc->run(); - array_map('unlink', $cleanup); - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/GssFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/GssFilter.php deleted file mode 100644 index 3c0b84fc..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/GssFilter.php +++ /dev/null @@ -1,141 +0,0 @@ - - */ -class GssFilter extends BaseProcessFilter -{ - private $jarPath; - private $javaPath; - private $allowUnrecognizedFunctions; - private $allowedNonStandardFunctions; - private $copyrightNotice; - private $define; - private $gssFunctionMapProvider; - private $inputOrientation; - private $outputOrientation; - private $prettyPrint; - - public function __construct($jarPath, $javaPath = '/usr/bin/java') - { - $this->jarPath = $jarPath; - $this->javaPath = $javaPath; - } - - public function setAllowUnrecognizedFunctions($allowUnrecognizedFunctions) - { - $this->allowUnrecognizedFunctions = $allowUnrecognizedFunctions; - } - - public function setAllowedNonStandardFunctions($allowNonStandardFunctions) - { - $this->allowedNonStandardFunctions = $allowNonStandardFunctions; - } - - public function setCopyrightNotice($copyrightNotice) - { - $this->copyrightNotice = $copyrightNotice; - } - - public function setDefine($define) - { - $this->define = $define; - } - - public function setGssFunctionMapProvider($gssFunctionMapProvider) - { - $this->gssFunctionMapProvider = $gssFunctionMapProvider; - } - - public function setInputOrientation($inputOrientation) - { - $this->inputOrientation = $inputOrientation; - } - - public function setOutputOrientation($outputOrientation) - { - $this->outputOrientation = $outputOrientation; - } - - public function setPrettyPrint($prettyPrint) - { - $this->prettyPrint = $prettyPrint; - } - - public function filterLoad(AssetInterface $asset) - { - $cleanup = array(); - - $pb = $this->createProcessBuilder(array( - $this->javaPath, - '-jar', - $this->jarPath, - )); - - if (null !== $this->allowUnrecognizedFunctions) { - $pb->add('--allow-unrecognized-functions'); - } - - if (null !== $this->allowedNonStandardFunctions) { - $pb->add('--allowed_non_standard_functions')->add($this->allowedNonStandardFunctions); - } - - if (null !== $this->copyrightNotice) { - $pb->add('--copyright-notice')->add($this->copyrightNotice); - } - - if (null !== $this->define) { - $pb->add('--define')->add($this->define); - } - - if (null !== $this->gssFunctionMapProvider) { - $pb->add('--gss-function-map-provider')->add($this->gssFunctionMapProvider); - } - - if (null !== $this->inputOrientation) { - $pb->add('--input-orientation')->add($this->inputOrientation); - } - - if (null !== $this->outputOrientation) { - $pb->add('--output-orientation')->add($this->outputOrientation); - } - - if (null !== $this->prettyPrint) { - $pb->add('--pretty-print'); - } - - $pb->add($cleanup[] = $input = tempnam(sys_get_temp_dir(), 'assetic_google_closure_stylesheets_compiler')); - file_put_contents($input, $asset->getContent()); - - $proc = $pb->getProcess(); - $code = $proc->run(); - array_map('unlink', $cleanup); - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } - - public function filterDump(AssetInterface $asset) - { - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/HandlebarsFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/HandlebarsFilter.php deleted file mode 100644 index e16e8583..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/HandlebarsFilter.php +++ /dev/null @@ -1,102 +0,0 @@ - - */ -class HandlebarsFilter extends BaseNodeFilter -{ - private $handlebarsBin; - private $nodeBin; - - private $minimize = false; - private $simple = false; - - public function __construct($handlebarsBin = '/usr/bin/handlebars', $nodeBin = null) - { - $this->handlebarsBin = $handlebarsBin; - $this->nodeBin = $nodeBin; - } - - public function setMinimize($minimize) - { - $this->minimize = $minimize; - } - - public function setSimple($simple) - { - $this->simple = $simple; - } - - public function filterLoad(AssetInterface $asset) - { - $pb = $this->createProcessBuilder($this->nodeBin - ? array($this->nodeBin, $this->handlebarsBin) - : array($this->handlebarsBin)); - - $templateName = basename($asset->getSourcePath()); - - $inputDirPath = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('input_dir'); - $inputPath = $inputDirPath.DIRECTORY_SEPARATOR.$templateName; - $outputPath = tempnam(sys_get_temp_dir(), 'output'); - - mkdir($inputDirPath); - file_put_contents($inputPath, $asset->getContent()); - - $pb->add($inputPath)->add('-f')->add($outputPath); - - if ($this->minimize) { - $pb->add('--min'); - } - - if ($this->simple) { - $pb->add('--simple'); - } - - $process = $pb->getProcess(); - $returnCode = $process->run(); - - unlink($inputPath); - rmdir($inputDirPath); - - if (127 === $returnCode) { - throw new \RuntimeException('Path to node executable could not be resolved.'); - } - - if (0 !== $returnCode) { - if (file_exists($outputPath)) { - unlink($outputPath); - } - throw FilterException::fromProcess($process)->setInput($asset->getContent()); - } - - if (!file_exists($outputPath)) { - throw new \RuntimeException('Error creating output file.'); - } - - $compiledJs = file_get_contents($outputPath); - unlink($outputPath); - - $asset->setContent($compiledJs); - } - - public function filterDump(AssetInterface $asset) - { - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/HashableInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/HashableInterface.php deleted file mode 100644 index 9442fdba..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/HashableInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ -interface HashableInterface -{ - /** - * Generates a hash for the object - * - * @return string Object hash - */ - public function hash(); -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinFilter.php deleted file mode 100644 index 44c08afa..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinFilter.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -class JSMinFilter implements FilterInterface -{ - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $asset->setContent(\JSMin::minify($asset->getContent())); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinPlusFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinPlusFilter.php deleted file mode 100644 index 21dc48e7..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinPlusFilter.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -class JSMinPlusFilter implements FilterInterface -{ - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $asset->setContent(\JSMinPlus::minify($asset->getContent())); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegoptimFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegoptimFilter.php deleted file mode 100644 index 68fac7ce..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegoptimFilter.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ -class JpegoptimFilter extends BaseProcessFilter -{ - private $jpegoptimBin; - private $stripAll; - private $max; - - /** - * Constructor. - * - * @param string $jpegoptimBin Path to the jpegoptim binary - */ - public function __construct($jpegoptimBin = '/usr/bin/jpegoptim') - { - $this->jpegoptimBin = $jpegoptimBin; - } - - public function setStripAll($stripAll) - { - $this->stripAll = $stripAll; - } - - public function setMax($max) - { - $this->max = $max; - } - - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $pb = $this->createProcessBuilder(array($this->jpegoptimBin)); - - if ($this->stripAll) { - $pb->add('--strip-all'); - } - - if ($this->max) { - $pb->add('--max='.$this->max); - } - - $pb->add($input = tempnam(sys_get_temp_dir(), 'assetic_jpegoptim')); - file_put_contents($input, $asset->getContent()); - - $proc = $pb->getProcess(); - $proc->run(); - - if (false !== strpos($proc->getOutput(), 'ERROR')) { - unlink($input); - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent(file_get_contents($input)); - - unlink($input); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegtranFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegtranFilter.php deleted file mode 100644 index c495ad12..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegtranFilter.php +++ /dev/null @@ -1,102 +0,0 @@ - - */ -class JpegtranFilter extends BaseProcessFilter -{ - const COPY_NONE = 'none'; - const COPY_COMMENTS = 'comments'; - const COPY_ALL = 'all'; - - private $jpegtranBin; - private $optimize; - private $copy; - private $progressive; - private $restart; - - /** - * Constructor. - * - * @param string $jpegtranBin Path to the jpegtran binary - */ - public function __construct($jpegtranBin = '/usr/bin/jpegtran') - { - $this->jpegtranBin = $jpegtranBin; - } - - public function setOptimize($optimize) - { - $this->optimize = $optimize; - } - - public function setCopy($copy) - { - $this->copy = $copy; - } - - public function setProgressive($progressive) - { - $this->progressive = $progressive; - } - - public function setRestart($restart) - { - $this->restart = $restart; - } - - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $pb = $this->createProcessBuilder(array($this->jpegtranBin)); - - if ($this->optimize) { - $pb->add('-optimize'); - } - - if ($this->copy) { - $pb->add('-copy')->add($this->copy); - } - - if ($this->progressive) { - $pb->add('-progressive'); - } - - if (null !== $this->restart) { - $pb->add('-restart')->add($this->restart); - } - - $pb->add($input = tempnam(sys_get_temp_dir(), 'assetic_jpegtran')); - file_put_contents($input, $asset->getContent()); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessFilter.php deleted file mode 100644 index 022fab6e..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessFilter.php +++ /dev/null @@ -1,208 +0,0 @@ - - */ -class LessFilter extends BaseNodeFilter implements DependencyExtractorInterface -{ - private $nodeBin; - - /** - * @var array - */ - private $treeOptions; - - /** - * @var array - */ - private $parserOptions; - - /** - * Load Paths - * - * A list of paths which less will search for includes. - * - * @var array - */ - protected $loadPaths = array(); - - /** - * Constructor. - * - * @param string $nodeBin The path to the node binary - * @param array $nodePaths An array of node paths - */ - public function __construct($nodeBin = '/usr/bin/node', array $nodePaths = array()) - { - $this->nodeBin = $nodeBin; - $this->setNodePaths($nodePaths); - $this->treeOptions = array(); - $this->parserOptions = array(); - } - - /** - * @param bool $compress - */ - public function setCompress($compress) - { - $this->addTreeOption('compress', $compress); - } - - public function setLoadPaths(array $loadPaths) - { - $this->loadPaths = $loadPaths; - } - - /** - * Adds a path where less will search for includes - * - * @param string $path Load path (absolute) - */ - public function addLoadPath($path) - { - $this->loadPaths[] = $path; - } - - /** - * @param string $code - * @param string $value - */ - public function addTreeOption($code, $value) - { - $this->treeOptions[$code] = $value; - } - - /** - * @param string $code - * @param string $value - */ - public function addParserOption($code, $value) - { - $this->parserOptions[$code] = $value; - } - - public function filterLoad(AssetInterface $asset) - { - static $format = <<<'EOF' -var less = require('less'); -var sys = require(process.binding('natives').util ? 'util' : 'sys'); - -new(less.Parser)(%s).parse(%s, function(e, tree) { - if (e) { - less.writeError(e); - process.exit(2); - } - - try { - sys.print(tree.toCSS(%s)); - } catch (e) { - less.writeError(e); - process.exit(3); - } -}); - -EOF; - - $root = $asset->getSourceRoot(); - $path = $asset->getSourcePath(); - - // parser options - $parserOptions = $this->parserOptions; - if ($root && $path) { - $parserOptions['paths'] = array(dirname($root.'/'.$path)); - $parserOptions['filename'] = basename($path); - } - - foreach ($this->loadPaths as $loadPath) { - $parserOptions['paths'][] = $loadPath; - } - - $pb = $this->createProcessBuilder(); - - $pb->add($this->nodeBin)->add($input = tempnam(sys_get_temp_dir(), 'assetic_less')); - file_put_contents($input, sprintf($format, - json_encode($parserOptions), - json_encode($asset->getContent()), - json_encode($this->treeOptions) - )); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } - - public function filterDump(AssetInterface $asset) - { - } - - /** - * @todo support for @import-once - * @todo support for @import (less) "lib.css" - */ - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - $loadPaths = $this->loadPaths; - if (null !== $loadPath) { - $loadPaths[] = $loadPath; - } - - if (empty($loadPaths)) { - return array(); - } - - $children = array(); - foreach (LessUtils::extractImports($content) as $reference) { - if ('.css' === substr($reference, -4)) { - // skip normal css imports - // todo: skip imports with media queries - continue; - } - - if ('.less' !== substr($reference, -5)) { - $reference .= '.less'; - } - - foreach ($loadPaths as $loadPath) { - if (file_exists($file = $loadPath.'/'.$reference)) { - $coll = $factory->createAsset($file, array(), array('root' => $loadPath)); - foreach ($coll as $leaf) { - $leaf->ensureFilter($this); - $children[] = $leaf; - goto next_reference; - } - } - } - - next_reference: - } - - var_dump($children);exit(); - - return $children; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessphpFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessphpFilter.php deleted file mode 100644 index fe82412d..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessphpFilter.php +++ /dev/null @@ -1,150 +0,0 @@ - - * @author Kris Wallsmith - */ -class LessphpFilter implements DependencyExtractorInterface -{ - private $presets = array(); - private $formatter; - private $preserveComments; - - /** - * Lessphp Load Paths - * - * @var array - */ - protected $loadPaths = array(); - - /** - * Adds a load path to the paths used by lessphp - * - * @param string $path Load Path - */ - public function addLoadPath($path) - { - $this->loadPaths[] = $path; - } - - /** - * Sets load paths used by lessphp - * - * @param array $loadPaths Load paths - */ - public function setLoadPaths(array $loadPaths) - { - $this->loadPaths = $loadPaths; - } - - public function setPresets(array $presets) - { - $this->presets = $presets; - } - - /** - * @param string $formatter One of "lessjs", "compressed", or "classic". - */ - public function setFormatter($formatter) - { - $this->formatter = $formatter; - } - - /** - * @param boolean $preserveComments - */ - public function setPreserveComments($preserveComments) - { - $this->preserveComments = $preserveComments; - } - - public function filterLoad(AssetInterface $asset) - { - $root = $asset->getSourceRoot(); - $path = $asset->getSourcePath(); - - $lc = new \lessc(); - if ($root && $path) { - $lc->importDir = dirname($root.'/'.$path); - } - - foreach ($this->loadPaths as $loadPath) { - $lc->addImportDir($loadPath); - } - - if ($this->formatter) { - $lc->setFormatter($this->formatter); - } - - if (null !== $this->preserveComments) { - $lc->setPreserveComments($this->preserveComments); - } - - $asset->setContent($lc->parse($asset->getContent(), $this->presets)); - } - - public function filterDump(AssetInterface $asset) - { - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - $loadPaths = $this->loadPaths; - if (null !== $loadPath) { - $loadPaths[] = $loadPath; - } - - if (empty($loadPaths)) { - return array(); - } - - $children = array(); - foreach (LessUtils::extractImports($content) as $reference) { - if ('.css' === substr($reference, -4)) { - // skip normal css imports - // todo: skip imports with media queries - continue; - } - - if ('.less' !== substr($reference, -5)) { - $reference .= '.less'; - } - - foreach ($loadPaths as $loadPath) { - if (file_exists($file = $loadPath.'/'.$reference)) { - $coll = $factory->createAsset($file, array(), array('root' => $loadPath)); - foreach ($coll as $leaf) { - $leaf->ensureFilter($this); - $children[] = $leaf; - goto next_reference; - } - } - } - - next_reference: - } - - return $children; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/OptiPngFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/OptiPngFilter.php deleted file mode 100644 index 4f7abcf1..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/OptiPngFilter.php +++ /dev/null @@ -1,74 +0,0 @@ - - */ -class OptiPngFilter extends BaseProcessFilter -{ - private $optipngBin; - private $level; - - /** - * Constructor. - * - * @param string $optipngBin Path to the optipng binary - */ - public function __construct($optipngBin = '/usr/bin/optipng') - { - $this->optipngBin = $optipngBin; - } - - public function setLevel($level) - { - $this->level = $level; - } - - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $pb = $this->createProcessBuilder(array($this->optipngBin)); - - if (null !== $this->level) { - $pb->add('-o')->add($this->level); - } - - $pb->add('-out')->add($output = tempnam(sys_get_temp_dir(), 'assetic_optipng')); - unlink($output); - - $pb->add($input = tempnam(sys_get_temp_dir(), 'assetic_optipng')); - file_put_contents($input, $asset->getContent()); - - $proc = $pb->getProcess(); - $code = $proc->run(); - - if (0 !== $code) { - unlink($input); - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent(file_get_contents($output)); - - unlink($input); - unlink($output); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackagerFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackagerFilter.php deleted file mode 100644 index 6029833b..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackagerFilter.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ -class PackagerFilter implements FilterInterface -{ - private $packages; - - public function __construct(array $packages = array()) - { - $this->packages = $packages; - } - - public function addPackage($package) - { - $this->packages[] = $package; - } - - public function filterLoad(AssetInterface $asset) - { - static $manifest = <<getContent()); - - $packager = new \Packager(array_merge(array($package), $this->packages)); - $content = $packager->build(array(), array(), array('Application'.$hash)); - - unlink($package.'/package.yml'); - unlink($package.'/source.js'); - rmdir($package); - - $asset->setContent($content); - } - - public function filterDump(AssetInterface $asset) - { - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackerFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackerFilter.php deleted file mode 100644 index 3fd41eac..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackerFilter.php +++ /dev/null @@ -1,56 +0,0 @@ - - */ -class PackerFilter implements FilterInterface -{ - protected $encoding = 'None'; - - protected $fastDecode = true; - - protected $specialChars = false; - - public function setEncoding($encoding) - { - $this->encoding = $encoding; - } - - public function setFastDecode($fastDecode) - { - $this->fastDecode = (bool) $fastDecode; - } - - public function setSpecialChars($specialChars) - { - $this->specialChars = (bool) $specialChars; - } - - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $packer = new \JavaScriptPacker($asset->getContent(), $this->encoding, $this->fastDecode, $this->specialChars); - $asset->setContent($packer->pack()); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/PhpCssEmbedFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/PhpCssEmbedFilter.php deleted file mode 100644 index 5df4423f..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/PhpCssEmbedFilter.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @link https://github.com/krichprollsch/phpCssEmbed - */ -class PhpCssEmbedFilter implements DependencyExtractorInterface -{ - private $presets = array(); - - public function setPresets(array $presets) - { - $this->presets = $presets; - } - - public function filterLoad(AssetInterface $asset) - { - $root = $asset->getSourceRoot(); - $path = $asset->getSourcePath(); - - $pce = new CssEmbed(); - if ($root && $path) { - $pce->setRootDir(dirname($root.'/'.$path)); - } - - $asset->setContent($pce->embedString($asset->getContent())); - } - - public function filterDump(AssetInterface $asset) - { - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - // todo - return array(); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/PngoutFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/PngoutFilter.php deleted file mode 100644 index 571945f4..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/PngoutFilter.php +++ /dev/null @@ -1,127 +0,0 @@ - - */ -class PngoutFilter extends BaseProcessFilter -{ - // -c# - const COLOR_GREY = '0'; - const COLOR_RGB = '2'; - const COLOR_PAL = '3'; - const COLOR_GRAY_ALPHA = '4'; - const COLOR_RGB_ALPHA = '6'; - - // -f# - const FILTER_NONE = '0'; - const FILTER_X = '1'; - const FILTER_Y = '2'; - const FILTER_X_Y = '3'; - const FILTER_PAETH = '4'; - const FILTER_MIXED = '5'; - - // -s# - const STRATEGY_XTREME = '0'; - const STRATEGY_INTENSE = '1'; - const STRATEGY_LONGEST_MATCH = '2'; - const STRATEGY_HUFFMAN_ONLY = '3'; - const STRATEGY_UNCOMPRESSED = '4'; - - private $pngoutBin; - private $color; - private $filter; - private $strategy; - private $blockSplitThreshold; - - /** - * Constructor. - * - * @param string $pngoutBin Path to the pngout binary - */ - public function __construct($pngoutBin = '/usr/bin/pngout') - { - $this->pngoutBin = $pngoutBin; - } - - public function setColor($color) - { - $this->color = $color; - } - - public function setFilter($filter) - { - $this->filter = $filter; - } - - public function setStrategy($strategy) - { - $this->strategy = $strategy; - } - - public function setBlockSplitThreshold($blockSplitThreshold) - { - $this->blockSplitThreshold = $blockSplitThreshold; - } - - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $pb = $this->createProcessBuilder(array($this->pngoutBin)); - - if (null !== $this->color) { - $pb->add('-c'.$this->color); - } - - if (null !== $this->filter) { - $pb->add('-f'.$this->filter); - } - - if (null !== $this->strategy) { - $pb->add('-s'.$this->strategy); - } - - if (null !== $this->blockSplitThreshold) { - $pb->add('-b'.$this->blockSplitThreshold); - } - - $pb->add($input = tempnam(sys_get_temp_dir(), 'assetic_pngout')); - file_put_contents($input, $asset->getContent()); - - $output = tempnam(sys_get_temp_dir(), 'assetic_pngout'); - unlink($output); - $pb->add($output .= '.png'); - - $proc = $pb->getProcess(); - $code = $proc->run(); - - if (0 !== $code) { - unlink($input); - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent(file_get_contents($output)); - - unlink($input); - unlink($output); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/RooleFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/RooleFilter.php deleted file mode 100644 index 59585d32..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/RooleFilter.php +++ /dev/null @@ -1,73 +0,0 @@ - - */ -class RooleFilter extends BaseNodeFilter implements DependencyExtractorInterface -{ - private $rooleBin; - private $nodeBin; - - /** - * Constructor - * - * @param string $rooleBin The path to the roole binary - * @param string $nodeBin The path to the node binary - */ - public function __construct($rooleBin = '/usr/bin/roole', $nodeBin = null) - { - $this->rooleBin = $rooleBin; - $this->nodeBin = $nodeBin; - } - - public function filterLoad(AssetInterface $asset) - { - $input = tempnam(sys_get_temp_dir(), 'assetic_roole'); - file_put_contents($input, $asset->getContent()); - - $pb = $this->createProcessBuilder($this->nodeBin - ? array($this->nodeBin, $this->rooleBin) - : array($this->rooleBin)); - - $pb->add('-p'); - - $pb->add($input); - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } - - public function filterDump(AssetInterface $asset) - { - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - // todo - return array(); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php deleted file mode 100644 index 24e618dd..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php +++ /dev/null @@ -1,236 +0,0 @@ - - */ -class SassFilter extends BaseProcessFilter implements DependencyExtractorInterface -{ - const STYLE_NESTED = 'nested'; - const STYLE_EXPANDED = 'expanded'; - const STYLE_COMPACT = 'compact'; - const STYLE_COMPRESSED = 'compressed'; - - private $sassPath; - private $rubyPath; - private $unixNewlines; - private $scss; - private $style; - private $quiet; - private $debugInfo; - private $lineNumbers; - private $loadPaths = array(); - private $cacheLocation; - private $noCache; - private $compass; - - public function __construct($sassPath = '/usr/bin/sass', $rubyPath = null) - { - $this->sassPath = $sassPath; - $this->rubyPath = $rubyPath; - $this->cacheLocation = realpath(sys_get_temp_dir()); - } - - public function setUnixNewlines($unixNewlines) - { - $this->unixNewlines = $unixNewlines; - } - - public function setScss($scss) - { - $this->scss = $scss; - } - - public function setStyle($style) - { - $this->style = $style; - } - - public function setQuiet($quiet) - { - $this->quiet = $quiet; - } - - public function setDebugInfo($debugInfo) - { - $this->debugInfo = $debugInfo; - } - - public function setLineNumbers($lineNumbers) - { - $this->lineNumbers = $lineNumbers; - } - - public function setLoadPaths(array $loadPaths) - { - $this->loadPaths = $loadPaths; - } - - public function addLoadPath($loadPath) - { - $this->loadPaths[] = $loadPath; - } - - public function setCacheLocation($cacheLocation) - { - $this->cacheLocation = $cacheLocation; - } - - public function setNoCache($noCache) - { - $this->noCache = $noCache; - } - - public function setCompass($compass) - { - $this->compass = $compass; - } - - public function filterLoad(AssetInterface $asset) - { - $sassProcessArgs = array($this->sassPath); - if (null !== $this->rubyPath) { - $sassProcessArgs = array_merge(explode(' ', $this->rubyPath), $sassProcessArgs); - } - - $pb = $this->createProcessBuilder($sassProcessArgs); - - $root = $asset->getSourceRoot(); - $path = $asset->getSourcePath(); - - if ($root && $path) { - $pb->add('--load-path')->add(dirname($root.'/'.$path)); - } - - if ($this->unixNewlines) { - $pb->add('--unix-newlines'); - } - - if (true === $this->scss || (null === $this->scss && 'scss' == pathinfo($path, PATHINFO_EXTENSION))) { - $pb->add('--scss'); - } - - if ($this->style) { - $pb->add('--style')->add($this->style); - } - - if ($this->quiet) { - $pb->add('--quiet'); - } - - if ($this->debugInfo) { - $pb->add('--debug-info'); - } - - if ($this->lineNumbers) { - $pb->add('--line-numbers'); - } - - foreach ($this->loadPaths as $loadPath) { - $pb->add('--load-path')->add($loadPath); - } - - if ($this->cacheLocation) { - $pb->add('--cache-location')->add($this->cacheLocation); - } - - if ($this->noCache) { - $pb->add('--no-cache'); - } - - if ($this->compass) { - $pb->add('--compass'); - } - - // input - $pb->add($input = tempnam(sys_get_temp_dir(), 'assetic_sass')); - file_put_contents($input, $asset->getContent()); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } - - public function filterDump(AssetInterface $asset) - { - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - $loadPaths = $this->loadPaths; - if ($loadPath) { - array_unshift($loadPaths, $loadPath); - } - - if (!$loadPaths) { - return array(); - } - - $children = array(); - foreach (CssUtils::extractImports($content) as $reference) { - if ('.css' === substr($reference, -4)) { - // skip normal css imports - // todo: skip imports with media queries - continue; - } - - // the reference may or may not have an extension or be a partial - if (pathinfo($reference, PATHINFO_EXTENSION)) { - $needles = array( - $reference, - '_'.$reference, - ); - } else { - $needles = array( - $reference.'.scss', - $reference.'.sass', - '_'.$reference.'.scss', - '_'.$reference.'.sass', - ); - } - - foreach ($loadPaths as $loadPath) { - foreach ($needles as $needle) { - if (file_exists($file = $loadPath.'/'.$needle)) { - $coll = $factory->createAsset($file, array(), array('root' => $loadPath)); - foreach ($coll as $leaf) { - $leaf->ensureFilter($this); - $children[] = $leaf; - goto next_reference; - } - } - } - } - - next_reference: - } - - return $children; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php deleted file mode 100644 index 3906bf57..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ -class ScssFilter extends SassFilter -{ - public function __construct($sassPath = '/usr/bin/sass', $rubyPath = null) - { - parent::__construct($sassPath, $rubyPath); - - $this->setScss(true); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/ScssphpFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/ScssphpFilter.php deleted file mode 100644 index db5c0684..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/ScssphpFilter.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ -class ScssphpFilter implements DependencyExtractorInterface -{ - private $compass = false; - - private $importPaths = array(); - - public function enableCompass($enable = true) - { - $this->compass = (Boolean) $enable; - } - - public function isCompassEnabled() - { - return $this->compass; - } - - public function filterLoad(AssetInterface $asset) - { - $root = $asset->getSourceRoot(); - $path = $asset->getSourcePath(); - - $lc = new \scssc(); - if ($this->compass) { - new \scss_compass($lc); - } - if ($root && $path) { - $lc->addImportPath(dirname($root.'/'.$path)); - } - foreach ($this->importPaths as $path) { - $lc->addImportPath($path); - } - - $asset->setContent($lc->compile($asset->getContent())); - } - - public function setImportPaths(array $paths) - { - $this->importPaths = $paths; - } - - public function addImportPath($path) - { - $this->importPaths[] = $path; - } - - public function filterDump(AssetInterface $asset) - { - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - // todo - return array(); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/SprocketsFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/SprocketsFilter.php deleted file mode 100644 index b305ad2a..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/SprocketsFilter.php +++ /dev/null @@ -1,154 +0,0 @@ - - */ -class SprocketsFilter extends BaseProcessFilter implements DependencyExtractorInterface -{ - private $sprocketsLib; - private $rubyBin; - private $includeDirs; - private $assetRoot; - - /** - * Constructor. - * - * @param string $sprocketsLib Path to the Sprockets lib/ directory - * @param string $rubyBin Path to the ruby binary - */ - public function __construct($sprocketsLib = null, $rubyBin = '/usr/bin/ruby') - { - $this->sprocketsLib = $sprocketsLib; - $this->rubyBin = $rubyBin; - $this->includeDirs = array(); - } - - public function addIncludeDir($directory) - { - $this->includeDirs[] = $directory; - } - - public function setAssetRoot($assetRoot) - { - $this->assetRoot = $assetRoot; - } - - /** - * Hack around a bit, get the job done. - */ - public function filterLoad(AssetInterface $asset) - { - static $format = <<<'EOF' -#!/usr/bin/env ruby - -require %s -%s -options = { :load_path => [], - :source_files => [%s], - :expand_paths => false } - -%ssecretary = Sprockets::Secretary.new(options) -secretary.install_assets if options[:asset_root] -print secretary.concatenation - -EOF; - - $more = ''; - - foreach ($this->includeDirs as $directory) { - $more .= 'options[:load_path] << '.var_export($directory, true)."\n"; - } - - if (null !== $this->assetRoot) { - $more .= 'options[:asset_root] = '.var_export($this->assetRoot, true)."\n"; - } - - if ($more) { - $more .= "\n"; - } - - $tmpAsset = tempnam(sys_get_temp_dir(), 'assetic_sprockets'); - file_put_contents($tmpAsset, $asset->getContent()); - - $input = tempnam(sys_get_temp_dir(), 'assetic_sprockets'); - file_put_contents($input, sprintf($format, - $this->sprocketsLib - ? sprintf('File.join(%s, \'sprockets\')', var_export($this->sprocketsLib, true)) - : '\'sprockets\'', - $this->getHack($asset), - var_export($tmpAsset, true), - $more - )); - - $pb = $this->createProcessBuilder(array( - $this->rubyBin, - $input, - )); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($tmpAsset); - unlink($input); - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } - - public function filterDump(AssetInterface $asset) - { - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - // todo - return array(); - } - - private function getHack(AssetInterface $asset) - { - static $format = <<<'EOF' - -module Sprockets - class Preprocessor - protected - def pathname_for_relative_require_from(source_line) - Sprockets::Pathname.new(@environment, File.join(%s, location_from(source_line))) - end - end -end - -EOF; - - $root = $asset->getSourceRoot(); - $path = $asset->getSourcePath(); - - if ($root && $path) { - return sprintf($format, var_export(dirname($root.'/'.$path), true)); - } - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/StylusFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/StylusFilter.php deleted file mode 100644 index 03cdc988..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/StylusFilter.php +++ /dev/null @@ -1,128 +0,0 @@ - - */ -class StylusFilter extends BaseNodeFilter implements DependencyExtractorInterface -{ - private $nodeBin; - private $compress; - private $useNib; - - /** - * Constructs filter. - * - * @param string $nodeBin The path to the node binary - * @param array $nodePaths An array of node paths - */ - public function __construct($nodeBin = '/usr/bin/node', array $nodePaths = array()) - { - $this->nodeBin = $nodeBin; - $this->setNodePaths($nodePaths); - } - - /** - * Enable output compression. - * - * @param boolean $compress - */ - public function setCompress($compress) - { - $this->compress = $compress; - } - - /** - * Enable the use of Nib - * - * @param boolean $useNib - */ - public function setUseNib($useNib) - { - $this->useNib = $useNib; - } - - /** - * {@inheritdoc} - */ - public function filterLoad(AssetInterface $asset) - { - static $format = <<<'EOF' -var stylus = require('stylus'); -var sys = require(process.binding('natives').util ? 'util' : 'sys'); - -stylus(%s, %s)%s.render(function(e, css){ - if (e) { - throw e; - } - - sys.print(css); - process.exit(0); -}); - -EOF; - - $root = $asset->getSourceRoot(); - $path = $asset->getSourcePath(); - - // parser options - $parserOptions = array(); - if ($root && $path) { - $parserOptions['paths'] = array(dirname($root.'/'.$path)); - $parserOptions['filename'] = basename($path); - } - - if (null !== $this->compress) { - $parserOptions['compress'] = $this->compress; - } - - $pb = $this->createProcessBuilder(); - - $pb->add($this->nodeBin)->add($input = tempnam(sys_get_temp_dir(), 'assetic_stylus')); - file_put_contents($input, sprintf($format, - json_encode($asset->getContent()), - json_encode($parserOptions), - $this->useNib ? '.use(require(\'nib\')())' : '' - )); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } - - /** - * {@inheritdoc} - */ - public function filterDump(AssetInterface $asset) - { - } - - public function getChildren(AssetFactory $factory, $content, $loadPath = null) - { - // todo - return array(); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/TypeScriptFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/TypeScriptFilter.php deleted file mode 100644 index a2896d36..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/TypeScriptFilter.php +++ /dev/null @@ -1,76 +0,0 @@ - - */ -class TypeScriptFilter extends BaseNodeFilter -{ - private $tscBin; - private $nodeBin; - - public function __construct($tscBin = '/usr/bin/tsc', $nodeBin = null) - { - $this->tscBin = $tscBin; - $this->nodeBin = $nodeBin; - } - - public function filterLoad(AssetInterface $asset) - { - $pb = $this->createProcessBuilder($this->nodeBin - ? array($this->nodeBin, $this->tscBin) - : array($this->tscBin)); - - $templateName = basename($asset->getSourcePath()); - - $inputDirPath = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('input_dir'); - $inputPath = $inputDirPath.DIRECTORY_SEPARATOR.$templateName.'.ts'; - $outputPath = tempnam(sys_get_temp_dir(), 'output'); - - mkdir($inputDirPath); - file_put_contents($inputPath, $asset->getContent()); - - $pb->add($inputPath)->add('--out')->add($outputPath); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($inputPath); - rmdir($inputDirPath); - - if (0 !== $code) { - if (file_exists($outputPath)) { - unlink($outputPath); - } - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - if (!file_exists($outputPath)) { - throw new \RuntimeException('Error creating output file.'); - } - - $compiledJs = file_get_contents($outputPath); - unlink($outputPath); - - $asset->setContent($compiledJs); - } - - public function filterDump(AssetInterface $asset) - { - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyCssFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyCssFilter.php deleted file mode 100644 index 3fd6c4a6..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyCssFilter.php +++ /dev/null @@ -1,119 +0,0 @@ - - */ -class UglifyCssFilter extends BaseNodeFilter -{ - private $uglifycssBin; - private $nodeBin; - - private $expandVars; - private $uglyComments; - private $cuteComments; - - /** - * @param string $uglifycssBin Absolute path to the uglifycss executable - * @param string $nodeBin Absolute path to the folder containg node.js executable - */ - public function __construct($uglifycssBin = '/usr/bin/uglifycss', $nodeBin = null) - { - $this->uglifycssBin = $uglifycssBin; - $this->nodeBin = $nodeBin; - } - - /** - * Expand variables - * @param bool $expandVars True to enable - */ - public function setExpandVars($expandVars) - { - $this->expandVars = $expandVars; - } - - /** - * Remove newlines within preserved comments - * @param bool $uglyComments True to enable - */ - public function setUglyComments($uglyComments) - { - $this->uglyComments = $uglyComments; - } - - /** - * Preserve newlines within and around preserved comments - * @param bool $cuteComments True to enable - */ - public function setCuteComments($cuteComments) - { - $this->cuteComments = $cuteComments; - } - - /** - * @see Assetic\Filter\FilterInterface::filterLoad() - */ - public function filterLoad(AssetInterface $asset) - { - } - - /** - * Run the asset through UglifyJs - * - * @see Assetic\Filter\FilterInterface::filterDump() - */ - public function filterDump(AssetInterface $asset) - { - $pb = $this->createProcessBuilder($this->nodeBin - ? array($this->nodeBin, $this->uglifycssBin) - : array($this->uglifycssBin)); - - if ($this->expandVars) { - $pb->add('--expand-vars'); - } - - if ($this->uglyComments) { - $pb->add('--ugly-comments'); - } - - if ($this->cuteComments) { - $pb->add('--cute-comments'); - } - - // input and output files - $input = tempnam(sys_get_temp_dir(), 'input'); - - file_put_contents($input, $asset->getContent()); - $pb->add($input); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (127 === $code) { - throw new \RuntimeException('Path to node executable could not be resolved.'); - } - - if (0 !== $code) { - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - $asset->setContent($proc->getOutput()); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJs2Filter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJs2Filter.php deleted file mode 100644 index 15d314e4..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJs2Filter.php +++ /dev/null @@ -1,135 +0,0 @@ - - */ -class UglifyJs2Filter extends BaseNodeFilter -{ - private $uglifyjsBin; - private $nodeBin; - private $compress; - private $beautify; - private $mangle; - private $screwIe8; - private $comments; - private $wrap; - - public function __construct($uglifyjsBin = '/usr/bin/uglifyjs', $nodeBin = null) - { - $this->uglifyjsBin = $uglifyjsBin; - $this->nodeBin = $nodeBin; - } - - public function setCompress($compress) - { - $this->compress = $compress; - } - - public function setBeautify($beautify) - { - $this->beautify = $beautify; - } - - public function setMangle($mangle) - { - $this->mangle = $mangle; - } - - public function setScrewIe8($screwIe8) - { - $this->screwIe8 = $screwIe8; - } - - public function setComments($comments) - { - $this->comments = $comments; - } - - public function setWrap($wrap) - { - $this->wrap = $wrap; - } - - public function filterLoad(AssetInterface $asset) - { - } - - public function filterDump(AssetInterface $asset) - { - $pb = $this->createProcessBuilder($this->nodeBin - ? array($this->nodeBin, $this->uglifyjsBin) - : array($this->uglifyjsBin)); - - if ($this->compress) { - $pb->add('--compress'); - } - - if ($this->beautify) { - $pb->add('--beautify'); - } - - if ($this->mangle) { - $pb->add('--mangle'); - } - - if ($this->screwIe8) { - $pb->add('--screw-ie8'); - } - - if ($this->comments) { - $pb->add('--comments')->add(true === $this->comments ? 'all' : $this->comments); - } - - if ($this->wrap) { - $pb->add('--wrap')->add($this->wrap); - } - - // input and output files - $input = tempnam(sys_get_temp_dir(), 'input'); - $output = tempnam(sys_get_temp_dir(), 'output'); - - file_put_contents($input, $asset->getContent()); - $pb->add('-o')->add($output)->add($input); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - if (file_exists($output)) { - unlink($output); - } - - if (127 === $code) { - throw new \RuntimeException('Path to node executable could not be resolved.'); - } - - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - if (!file_exists($output)) { - throw new \RuntimeException('Error creating output file.'); - } - - $asset->setContent(file_get_contents($output)); - - unlink($output); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php deleted file mode 100644 index 5a0ae330..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php +++ /dev/null @@ -1,145 +0,0 @@ - - */ -class UglifyJsFilter extends BaseNodeFilter -{ - private $uglifyjsBin; - private $nodeBin; - - private $noCopyright; - private $beautify; - private $unsafe; - private $mangle; - - /** - * @param string $uglifyjsBin Absolute path to the uglifyjs executable - * @param string $nodeBin Absolute path to the folder containg node.js executable - */ - public function __construct($uglifyjsBin = '/usr/bin/uglifyjs', $nodeBin = null) - { - $this->uglifyjsBin = $uglifyjsBin; - $this->nodeBin = $nodeBin; - } - - /** - * Removes the first block of comments as well - * @param bool $noCopyright True to enable - */ - public function setNoCopyright($noCopyright) - { - $this->noCopyright = $noCopyright; - } - - /** - * Output indented code - * @param bool $beautify True to enable - */ - public function setBeautify($beautify) - { - $this->beautify = $beautify; - } - - /** - * Enable additional optimizations that are known to be unsafe in some situations. - * @param bool $unsafe True to enable - */ - public function setUnsafe($unsafe) - { - $this->unsafe = $unsafe; - } - - /** - * Safely mangle variable and function names for greater file compress. - * @param bool $mangle True to enable - */ - public function setMangle($mangle) - { - $this->mangle = $mangle; - } - - /** - * @see Assetic\Filter\FilterInterface::filterLoad() - */ - public function filterLoad(AssetInterface $asset) - { - } - - /** - * Run the asset through UglifyJs - * - * @see Assetic\Filter\FilterInterface::filterDump() - */ - public function filterDump(AssetInterface $asset) - { - $pb = $this->createProcessBuilder($this->nodeBin - ? array($this->nodeBin, $this->uglifyjsBin) - : array($this->uglifyjsBin)); - - if ($this->noCopyright) { - $pb->add('--no-copyright'); - } - - if ($this->beautify) { - $pb->add('--beautify'); - } - - if ($this->unsafe) { - $pb->add('--unsafe'); - } - - if (false === $this->mangle) { - $pb->add('--no-mangle'); - } - - // input and output files - $input = tempnam(sys_get_temp_dir(), 'input'); - $output = tempnam(sys_get_temp_dir(), 'output'); - - file_put_contents($input, $asset->getContent()); - $pb->add('-o')->add($output)->add($input); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - if (file_exists($output)) { - unlink($output); - } - - if (127 === $code) { - throw new \RuntimeException('Path to node executable could not be resolved.'); - } - - throw FilterException::fromProcess($proc)->setInput($asset->getContent()); - } - - if (!file_exists($output)) { - throw new \RuntimeException('Error creating output file.'); - } - - $uglifiedJs = file_get_contents($output); - unlink($output); - - $asset->setContent($uglifiedJs); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php deleted file mode 100644 index ba9c7bb9..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php +++ /dev/null @@ -1,116 +0,0 @@ - - */ -abstract class BaseCompressorFilter extends BaseProcessFilter -{ - private $jarPath; - private $javaPath; - private $charset; - private $lineBreak; - private $stackSize; - - public function __construct($jarPath, $javaPath = '/usr/bin/java') - { - $this->jarPath = $jarPath; - $this->javaPath = $javaPath; - } - - public function setCharset($charset) - { - $this->charset = $charset; - } - - public function setLineBreak($lineBreak) - { - $this->lineBreak = $lineBreak; - } - - public function setStackSize($stackSize) - { - $this->stackSize = $stackSize; - } - - public function filterLoad(AssetInterface $asset) - { - } - - /** - * Compresses a string. - * - * @param string $content The content to compress - * @param string $type The type of content, either "js" or "css" - * @param array $options An indexed array of additional options - * - * @return string The compressed content - */ - protected function compress($content, $type, $options = array()) - { - $pb = $this->createProcessBuilder(array($this->javaPath)); - - if (null !== $this->stackSize) { - $pb->add('-Xss'.$this->stackSize); - } - - $pb->add('-jar')->add($this->jarPath); - - foreach ($options as $option) { - $pb->add($option); - } - - if (null !== $this->charset) { - $pb->add('--charset')->add($this->charset); - } - - if (null !== $this->lineBreak) { - $pb->add('--line-break')->add($this->lineBreak); - } - - // input and output files - $tempDir = realpath(sys_get_temp_dir()); - $input = tempnam($tempDir, 'YUI-IN-'); - $output = tempnam($tempDir, 'YUI-OUT-'); - file_put_contents($input, $content); - $pb->add('-o')->add($output)->add('--type')->add($type)->add($input); - - $proc = $pb->getProcess(); - $code = $proc->run(); - unlink($input); - - if (0 !== $code) { - if (file_exists($output)) { - unlink($output); - } - - throw FilterException::fromProcess($proc)->setInput($content); - } - - if (!file_exists($output)) { - throw new \RuntimeException('Error creating output file.'); - } - - $retval = file_get_contents($output); - unlink($output); - - return $retval; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/CssCompressorFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/CssCompressorFilter.php deleted file mode 100644 index 96d2739a..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/CssCompressorFilter.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ -class CssCompressorFilter extends BaseCompressorFilter -{ - public function filterDump(AssetInterface $asset) - { - $asset->setContent($this->compress($asset->getContent(), 'css')); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php b/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php deleted file mode 100644 index 2326f2e4..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php +++ /dev/null @@ -1,61 +0,0 @@ - - */ -class JsCompressorFilter extends BaseCompressorFilter -{ - private $nomunge; - private $preserveSemi; - private $disableOptimizations; - - public function setNomunge($nomunge = true) - { - $this->nomunge = $nomunge; - } - - public function setPreserveSemi($preserveSemi) - { - $this->preserveSemi = $preserveSemi; - } - - public function setDisableOptimizations($disableOptimizations) - { - $this->disableOptimizations = $disableOptimizations; - } - - public function filterDump(AssetInterface $asset) - { - $options = array(); - - if ($this->nomunge) { - $options[] = '--nomunge'; - } - - if ($this->preserveSemi) { - $options[] = '--preserve-semi'; - } - - if ($this->disableOptimizations) { - $options[] = '--disable-optimizations'; - } - - $asset->setContent($this->compress($asset->getContent(), 'js', $options)); - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/FilterManager.php b/vendor/kriswallsmith/assetic/src/Assetic/FilterManager.php deleted file mode 100644 index 48fe9fce..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/FilterManager.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ -class FilterManager -{ - private $filters = array(); - - public function set($alias, FilterInterface $filter) - { - $this->checkName($alias); - - $this->filters[$alias] = $filter; - } - - public function get($alias) - { - if (!isset($this->filters[$alias])) { - throw new \InvalidArgumentException(sprintf('There is no "%s" filter.', $alias)); - } - - return $this->filters[$alias]; - } - - public function has($alias) - { - return isset($this->filters[$alias]); - } - - public function getNames() - { - return array_keys($this->filters); - } - - /** - * Checks that a name is valid. - * - * @param string $name An asset name candidate - * - * @throws \InvalidArgumentException If the asset name is invalid - */ - protected function checkName($name) - { - if (!ctype_alnum(str_replace('_', '', $name))) { - throw new \InvalidArgumentException(sprintf('The name "%s" is invalid.', $name)); - } - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php b/vendor/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php deleted file mode 100644 index 00d658bb..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php +++ /dev/null @@ -1,111 +0,0 @@ - - */ -abstract class CssUtils -{ - const REGEX_URLS = '/url\((["\']?)(?P.*?)(\\1)\)/'; - const REGEX_IMPORTS = '/@import (?:url\()?(\'|"|)(?P[^\'"\)\n\r]*)\1\)?;?/'; - const REGEX_IMPORTS_NO_URLS = '/@import (?!url\()(\'|"|)(?P[^\'"\)\n\r]*)\1;?/'; - const REGEX_IE_FILTERS = '/src=(["\']?)(?P.*?)\\1/'; - - /** - * Filters all references -- url() and "@import" -- through a callable. - * - * @param string $content The CSS - * @param callable $callback A PHP callable - * @param integer $limit - * @param integer $count - * - * @return string The filtered CSS - */ - public static function filterReferences($content, $callback, $limit = -1, &$count = 0) - { - $content = static::filterUrls($content, $callback, $limit, $count); - $content = static::filterImports($content, $callback, $limit, $count, false); - $content = static::filterIEFilters($content, $callback, $limit, $count); - - return $content; - } - - /** - * Filters all CSS url()'s through a callable. - * - * @param string $content The CSS - * @param callable $callback A PHP callable - * @param integer $limit Limit the number of replacements - * @param integer $count Will be populated with the count - * - * @return string The filtered CSS - */ - public static function filterUrls($content, $callback, $limit = -1, &$count = 0) - { - return preg_replace_callback(static::REGEX_URLS, $callback, $content, $limit, $count); - } - - /** - * Filters all CSS imports through a callable. - * - * @param string $content The CSS - * @param callable $callback A PHP callable - * @param integer $limit Limit the number of replacements - * @param integer $count Will be populated with the count - * @param Boolean $includeUrl Whether to include url() in the pattern - * - * @return string The filtered CSS - */ - public static function filterImports($content, $callback, $limit = -1, &$count = 0, $includeUrl = true) - { - $pattern = $includeUrl ? static::REGEX_IMPORTS : static::REGEX_IMPORTS_NO_URLS; - - return preg_replace_callback($pattern, $callback, $content, $limit, $count); - } - - /** - * Filters all IE filters (AlphaImageLoader filter) through a callable. - * - * @param string $content The CSS - * @param callable $callback A PHP callable - * @param integer $limit Limit the number of replacements - * @param integer $count Will be populated with the count - * - * @return string The filtered CSS - */ - public static function filterIEFilters($content, $callback, $limit = -1, &$count = 0) - { - return preg_replace_callback(static::REGEX_IE_FILTERS, $callback, $content, $limit, $count); - } - - /** - * Extracts all references from the supplied CSS content. - * - * @param string $content The CSS content - * - * @return array An array of unique URLs - */ - public static function extractImports($content) - { - $imports = array(); - static::filterImports($content, function($matches) use(& $imports) { - $imports[] = $matches['url']; - }); - - return array_unique($imports); - } - - final private function __construct() { } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Util/LessUtils.php b/vendor/kriswallsmith/assetic/src/Assetic/Util/LessUtils.php deleted file mode 100644 index 291fb662..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Util/LessUtils.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ -abstract class LessUtils extends CssUtils -{ - const REGEX_IMPORTS = '/@import(?:-once)? (?:url\()?(\'|"|)(?P[^\'"\)\n\r]*)\1\)?;?/'; - const REGEX_IMPORTS_NO_URLS = '/@import(?:-once)? (?!url\()(\'|"|)(?P[^\'"\)\n\r]*)\1;?/'; -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Util/TraversableString.php b/vendor/kriswallsmith/assetic/src/Assetic/Util/TraversableString.php deleted file mode 100644 index 4802a523..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Util/TraversableString.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ -class TraversableString implements \IteratorAggregate, \Countable -{ - private $one; - private $many; - - public function __construct($one, array $many) - { - $this->one = $one; - $this->many = $many; - } - - public function getIterator() - { - return new \ArrayIterator($this->many); - } - - public function count() - { - return count($this->many); - } - - public function __toString() - { - return (string) $this->one; - } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/Util/VarUtils.php b/vendor/kriswallsmith/assetic/src/Assetic/Util/VarUtils.php deleted file mode 100644 index 4cc9103c..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/Util/VarUtils.php +++ /dev/null @@ -1,82 +0,0 @@ - - */ -abstract class VarUtils -{ - /** - * Resolves variable placeholders. - * - * @param string $template A template string - * @param array $vars Variable names - * @param array $values Variable values - * - * @return string The resolved string - * - * @throws \InvalidArgumentException If there is a variable with no value - */ - public static function resolve($template, array $vars, array $values) - { - $map = array(); - foreach ($vars as $var) { - if (false === strpos($template, '{'.$var.'}')) { - continue; - } - - if (!isset($values[$var])) { - throw new \InvalidArgumentException(sprintf('The path "%s" contains the variable "%s", but was not given any value for it.', $template, $var)); - } - - $map['{'.$var.'}'] = $values[$var]; - } - - return strtr($template, $map); - } - - public static function getCombinations(array $vars, array $values) - { - if (!$vars) { - return array(array()); - } - - $combinations = array(); - $nbValues = array(); - foreach ($values as $var => $vals) { - if (!in_array($var, $vars, true)) { - continue; - } - - $nbValues[$var] = count($vals); - } - - for ($i = array_product($nbValues), $c = $i * 2; $i < $c; $i++) { - $k = $i; - $combination = array(); - - foreach ($vars as $var) { - $combination[$var] = $values[$var][$k % $nbValues[$var]]; - $k = intval($k / $nbValues[$var]); - } - - $combinations[] = $combination; - } - - return $combinations; - } - - final private function __construct() { } -} diff --git a/vendor/kriswallsmith/assetic/src/Assetic/ValueSupplierInterface.php b/vendor/kriswallsmith/assetic/src/Assetic/ValueSupplierInterface.php deleted file mode 100644 index 75c81a0f..00000000 --- a/vendor/kriswallsmith/assetic/src/Assetic/ValueSupplierInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -interface ValueSupplierInterface -{ - /** - * Returns a map of values. - * - * @return array - */ - public function getValues(); -} diff --git a/vendor/kriswallsmith/assetic/src/functions.php b/vendor/kriswallsmith/assetic/src/functions.php deleted file mode 100644 index 75cfbf23..00000000 --- a/vendor/kriswallsmith/assetic/src/functions.php +++ /dev/null @@ -1,121 +0,0 @@ -factory = $factory; -} - -/** - * Returns an array of javascript URLs. - * - * @param array|string $inputs Input strings - * @param array|string $filters Filter names - * @param array $options An array of options - * - * @return array An array of javascript URLs - */ -function assetic_javascripts($inputs = array(), $filters = array(), array $options = array()) -{ - if (!isset($options['output'])) { - $options['output'] = 'js/*.js'; - } - - return _assetic_urls($inputs, $filters, $options); -} - -/** - * Returns an array of stylesheet URLs. - * - * @param array|string $inputs Input strings - * @param array|string $filters Filter names - * @param array $options An array of options - * - * @return array An array of stylesheet URLs - */ -function assetic_stylesheets($inputs = array(), $filters = array(), array $options = array()) -{ - if (!isset($options['output'])) { - $options['output'] = 'css/*.css'; - } - - return _assetic_urls($inputs, $filters, $options); -} - -/** - * Returns an image URL. - * - * @param string $input An input - * @param array|string $filters Filter names - * @param array $options An array of options - * - * @return string An image URL - */ -function assetic_image($input, $filters = array(), array $options = array()) -{ - if (!isset($options['output'])) { - $options['output'] = 'images/*'; - } - - $urls = _assetic_urls($input, $filters, $options); - - return current($urls); -} - -/** - * Returns an array of asset urls. - * - * @param array|string $inputs Input strings - * @param array|string $filters Filter names - * @param array $options An array of options - * - * @return array An array of URLs - */ -function _assetic_urls($inputs = array(), $filters = array(), array $options = array()) -{ - global $_assetic; - - if (!is_array($inputs)) { - $inputs = array_filter(array_map('trim', explode(',', $inputs))); - } - - if (!is_array($filters)) { - $filters = array_filter(array_map('trim', explode(',', $filters))); - } - - $coll = $_assetic->factory->createAsset($inputs, $filters, $options); - - $debug = isset($options['debug']) ? $options['debug'] : $_assetic->factory->isDebug(); - $combine = isset($options['combine']) ? $options['combine'] : !$debug; - - $one = $coll->getTargetPath(); - if ($combine) { - $many = array($one); - } else { - $many = array(); - foreach ($coll as $leaf) { - $many[] = $leaf->getTargetPath(); - } - } - - return new TraversableString($one, $many); -} diff --git a/vendor/monolog/monolog/CHANGELOG.mdown b/vendor/monolog/monolog/CHANGELOG.mdown deleted file mode 100644 index 2710fdc4..00000000 --- a/vendor/monolog/monolog/CHANGELOG.mdown +++ /dev/null @@ -1,92 +0,0 @@ -### 1.5.0 (2013-04-23) - - * Added ProcessIdProcessor to inject the PID in log records - * Added UidProcessor to inject a unique identifier to all log records of one request/run - * Added support for previous exceptions in the LineFormatter exception serialization - * Added Monolog\Logger::getLevels() to get all available levels - * Fixed ChromePHPHandler so it avoids sending headers larger than Chrome can handle - -### 1.4.1 (2013-04-01) - - * Fixed exception formatting in the LineFormatter to be more minimalistic - * Fixed RavenHandler's handling of context/extra data, requires Raven client >0.1.0 - * Fixed log rotation in RotatingFileHandler to work with long running scripts spanning multiple days - * Fixed WebProcessor array access so it checks for data presence - * Fixed Buffer, Group and FingersCrossed handlers to make use of their processors - -### 1.4.0 (2013-02-13) - - * Added RedisHandler to log to Redis via the Predis library or the phpredis extension - * Added ZendMonitorHandler to log to the Zend Server monitor - * Added the possibility to pass arrays of handlers and processors directly in the Logger constructor - * Added `$useSSL` option to the PushoverHandler which is enabled by default - * Fixed ChromePHPHandler and FirePHPHandler issue when multiple instances are used simultaneously - * Fixed header injection capability in the NativeMailHandler - -### 1.3.1 (2013-01-11) - - * Fixed LogstashFormatter to be usable with stream handlers - * Fixed GelfMessageFormatter levels on Windows - -### 1.3.0 (2013-01-08) - - * Added PSR-3 compliance, the `Monolog\Logger` class is now an instance of `Psr\Log\LoggerInterface` - * Added PsrLogMessageProcessor that you can selectively enable for full PSR-3 compliance - * Added LogstashFormatter (combine with SocketHandler or StreamHandler to send logs to Logstash) - * Added PushoverHandler to send mobile notifications - * Added CouchDBHandler and DoctrineCouchDBHandler - * Added RavenHandler to send data to Sentry servers - * Added support for the new MongoClient class in MongoDBHandler - * Added microsecond precision to log records' timestamps - * Added `$flushOnOverflow` param to BufferHandler to flush by batches instead of losing - the oldest entries - * Fixed normalization of objects with cyclic references - -### 1.2.1 (2012-08-29) - - * Added new $logopts arg to SyslogHandler to provide custom openlog options - * Fixed fatal error in SyslogHandler - -### 1.2.0 (2012-08-18) - - * Added AmqpHandler (for use with AMQP servers) - * Added CubeHandler - * Added NativeMailerHandler::addHeader() to send custom headers in mails - * Added the possibility to specify more than one recipient in NativeMailerHandler - * Added the possibility to specify float timeouts in SocketHandler - * Added NOTICE and EMERGENCY levels to conform with RFC 5424 - * Fixed the log records to use the php default timezone instead of UTC - * Fixed BufferHandler not being flushed properly on PHP fatal errors - * Fixed normalization of exotic resource types - * Fixed the default format of the SyslogHandler to avoid duplicating datetimes in syslog - -### 1.1.0 (2012-04-23) - - * Added Monolog\Logger::isHandling() to check if a handler will - handle the given log level - * Added ChromePHPHandler - * Added MongoDBHandler - * Added GelfHandler (for use with Graylog2 servers) - * Added SocketHandler (for use with syslog-ng for example) - * Added NormalizerFormatter - * Added the possibility to change the activation strategy of the FingersCrossedHandler - * Added possibility to show microseconds in logs - * Added `server` and `referer` to WebProcessor output - -### 1.0.2 (2011-10-24) - - * Fixed bug in IE with large response headers and FirePHPHandler - -### 1.0.1 (2011-08-25) - - * Added MemoryPeakUsageProcessor and MemoryUsageProcessor - * Added Monolog\Logger::getName() to get a logger's channel name - -### 1.0.0 (2011-07-06) - - * Added IntrospectionProcessor to get info from where the logger was called - * Fixed WebProcessor in CLI - -### 1.0.0-RC1 (2011-07-01) - - * Initial release diff --git a/vendor/monolog/monolog/LICENSE b/vendor/monolog/monolog/LICENSE deleted file mode 100644 index 5df1c397..00000000 --- a/vendor/monolog/monolog/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/monolog/monolog/README.mdown b/vendor/monolog/monolog/README.mdown deleted file mode 100644 index 4c1b21e8..00000000 --- a/vendor/monolog/monolog/README.mdown +++ /dev/null @@ -1,230 +0,0 @@ -Monolog - Logging for PHP 5.3+ [![Build Status](https://secure.travis-ci.org/Seldaek/monolog.png)](http://travis-ci.org/Seldaek/monolog) -============================== - -Monolog sends your logs to files, sockets, inboxes, databases and various -web services. See the complete list of handlers below. Special handlers -allow you to build advanced logging strategies. - -This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -interface that you can type-hint against in your own libraries to keep -a maximum of interoperability. You can also use it in your applications to -make sure you can always use another compatible logger at a later time. - -Usage ------ - -```php -pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING)); - -// add records to the log -$log->addWarning('Foo'); -$log->addError('Bar'); -``` - -Core Concepts -------------- - -Every `Logger` instance has a channel (name) and a stack of handlers. Whenever -you add a record to the logger, it traverses the handler stack. Each handler -decides whether it handled fully the record, and if so, the propagation of the -record ends there. - -This allows for flexible logging setups, for example having a `StreamHandler` at -the bottom of the stack that will log anything to disk, and on top of that add -a `MailHandler` that will send emails only when an error message is logged. -Handlers also have a `$bubble` property which defines whether they block the -record or not if they handled it. In this example, setting the `MailHandler`'s -`$bubble` argument to true means that all records will propagate to the -`StreamHandler`, even the errors that are handled by the `MailHandler`. - -You can create many `Logger`s, each defining a channel (e.g.: db, request, -router, ..) and each of them combining various handlers, which can be shared -or not. The channel is reflected in the logs and allows you to easily see or -filter records. - -Each Handler also has a Formatter, a default one with settings that make sense -will be created if you don't set one. The formatters normalize and format -incoming records so that they can be used by the handlers to output useful -information. - -Custom severity levels are not available. Only the eight -[RFC 5424](http://tools.ietf.org/html/rfc5424) levels (debug, info, notice, -warning, error, critical, alert, emergency) are present for basic filtering -purposes, but for sorting and other use cases that would require -flexibility, you should add Processors to the Logger that can add extra -information (tags, user ip, ..) to the records before they are handled. - -Log Levels ----------- - -Monolog supports all 8 logging levels defined in -[RFC 5424](http://tools.ietf.org/html/rfc5424), but unless you specifically -need syslog compatibility, it is advised to only use DEBUG, INFO, WARNING, -ERROR, CRITICAL, ALERT. - -- **DEBUG** (100): Detailed debug information. - -- **INFO** (200): Interesting events. Examples: User logs in, SQL logs. - -- NOTICE (250): Normal but significant events. - -- **WARNING** (300): Exceptional occurrences that are not errors. Examples: - Use of deprecated APIs, poor use of an API, undesirable things that are not - necessarily wrong. - -- **ERROR** (400): Runtime errors that do not require immediate action but - should typically be logged and monitored. - -- **CRITICAL** (500): Critical conditions. Example: Application component - unavailable, unexpected exception. - -- **ALERT** (550): Action must be taken immediately. Example: Entire website - down, database unavailable, etc. This should trigger the SMS alerts and wake - you up. - -- EMERGENCY (600): Emergency: system is unusable. - -Docs -==== - -**See the `doc` directory for more detailed documentation. -The following is only a list of all parts that come with Monolog.** - -Handlers --------- - -### Log to files and syslog - -- _StreamHandler_: Logs records into any PHP stream, use this for log files. -- _RotatingFileHandler_: Logs records to a file and creates one logfile per day. - It will also delete files older than `$maxFiles`. You should use - [logrotate](http://linuxcommand.org/man_pages/logrotate8.html) for high profile - setups though, this is just meant as a quick and dirty solution. -- _SyslogHandler_: Logs records to the syslog. - -### Send alerts and emails - -- _NativeMailHandler_: Sends emails using PHP's - [`mail()`](http://php.net/manual/en/function.mail.php) function. -- _SwiftMailerHandler_: Sends emails using a [`Swift_Mailer`](http://swiftmailer.org/) instance. -- _PushoverHandler_: Sends mobile notifications via the [Pushover](https://www.pushover.net/) API. - -### Log specific servers and networked logging - -- _SocketHandler_: Logs records to [sockets](http://php.net/fsockopen), use this - for UNIX and TCP sockets. See an [example](https://github.com/Seldaek/monolog/blob/master/doc/sockets.md). -- _AmqpHandler_: Logs records to an [amqp](http://www.amqp.org/) compatible - server. Requires the [php-amqp](http://pecl.php.net/package/amqp) extension (1.0+). -- _GelfHandler_: Logs records to a [Graylog2](http://www.graylog2.org) server. -- _CubeHandler_: Logs records to a [Cube](http://square.github.com/cube/) server. -- _RavenHandler_: Logs records to a [Sentry](http://getsentry.com/) server using - [raven](https://packagist.org/packages/raven/raven). -- _ZendMonitorHandler_: Logs records to the Zend Monitor present in Zend Server. - -### Logging in development - -- _FirePHPHandler_: Handler for [FirePHP](http://www.firephp.org/), providing - inline `console` messages within [FireBug](http://getfirebug.com/). -- _ChromePHPHandler_: Handler for [ChromePHP](http://www.chromephp.com/), providing - inline `console` messages within Chrome. - -### Log to databases - -- _RedisHandler_: Logs records to a [redis](http://redis.io) server. -- _MongoDBHandler_: Handler to write records in MongoDB via a - [Mongo](http://pecl.php.net/package/mongo) extension connection. -- _CouchDBHandler_: Logs records to a CouchDB server. -- _DoctrineCouchDBHandler_: Logs records to a CouchDB server via the Doctrine CouchDB ODM. - -### Wrappers / Special Handlers - -- _FingersCrossedHandler_: A very interesting wrapper. It takes a logger as - parameter and will accumulate log records of all levels until a record - exceeds the defined severity level. At which point it delivers all records, - including those of lower severity, to the handler it wraps. This means that - until an error actually happens you will not see anything in your logs, but - when it happens you will have the full information, including debug and info - records. This provides you with all the information you need, but only when - you need it. -- _NullHandler_: Any record it can handle will be thrown away. This can be used - to put on top of an existing handler stack to disable it temporarily. -- _BufferHandler_: This handler will buffer all the log records it receives - until `close()` is called at which point it will call `handleBatch()` on the - handler it wraps with all the log messages at once. This is very useful to - send an email with all records at once for example instead of having one mail - for every log record. -- _GroupHandler_: This handler groups other handlers. Every record received is - sent to all the handlers it is configured with. -- _TestHandler_: Used for testing, it records everything that is sent to it and - has accessors to read out the information. - -Formatters ----------- - -- _LineFormatter_: Formats a log record into a one-line string. -- _NormalizerFormatter_: Normalizes objects/resources down to strings so a record can easily be serialized/encoded. -- _JsonFormatter_: Encodes a log record into json. -- _WildfireFormatter_: Used to format log records into the Wildfire/FirePHP protocol, only useful for the FirePHPHandler. -- _ChromePHPFormatter_: Used to format log records into the ChromePHP format, only useful for the ChromePHPHandler. -- _GelfFormatter_: Used to format log records into Gelf message instances, only useful for the GelfHandler. -- _LogstashFormatter_: Used to format log records into [logstash](http://logstash.net/) event json, useful for any handler listed under inputs [here](http://logstash.net/docs/1.1.5/). - -Processors ----------- - -- _IntrospectionProcessor_: Adds the line/file/class/method from which the log call originated. -- _WebProcessor_: Adds the current request URI, request method and client IP to a log record. -- _MemoryUsageProcessor_: Adds the current memory usage to a log record. -- _MemoryPeakUsageProcessor_: Adds the peak memory usage to a log record. -- _ProcessIdProcessor_: Adds the process id to a log record. -- _UidProcessor_: Adds a unique identifier to a log record. - -About -===== - -Requirements ------------- - -- Any flavor of PHP 5.3 or above should do -- [optional] PHPUnit 3.5+ to execute the test suite (phpunit --version) - -Submitting bugs and feature requests ------------------------------------- - -Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) - -Frameworks Integration ----------------------- - -- Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) - can be used very easily with Monolog since it implements the interface. -- [Symfony2](http://symfony.com) comes out of the box with Monolog. -- [Silex](http://silex.sensiolabs.org/) comes out of the box with Monolog. -- [Laravel4](http://laravel.com/) comes out of the box with Monolog. -- [PPI](http://www.ppi.io/) comes out of the box with Monolog. -- [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin. -- [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer. - -Author ------- - -Jordi Boggiano - -
-See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) which participated in this project. - -License -------- - -Monolog is licensed under the MIT License - see the `LICENSE` file for details - -Acknowledgements ----------------- - -This library is heavily inspired by Python's [Logbook](http://packages.python.org/Logbook/) -library, although most concepts have been adjusted to fit to the PHP world. diff --git a/vendor/monolog/monolog/composer.json b/vendor/monolog/monolog/composer.json deleted file mode 100644 index 9453f38f..00000000 --- a/vendor/monolog/monolog/composer.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "monolog/monolog", - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "keywords": ["log", "logging", "psr-3"], - "homepage": "http://github.com/Seldaek/monolog", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "require-dev": { - "mlehner/gelf-php": "1.0.*", - "raven/raven": "0.3.*", - "doctrine/couchdb": "dev-master" - }, - "suggest": { - "mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server", - "raven/raven": "Allow sending log messages to a Sentry server", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server" - }, - "autoload": { - "psr-0": {"Monolog": "src/"} - }, - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - } -} diff --git a/vendor/monolog/monolog/doc/extending.md b/vendor/monolog/monolog/doc/extending.md deleted file mode 100644 index fcd7af2b..00000000 --- a/vendor/monolog/monolog/doc/extending.md +++ /dev/null @@ -1,76 +0,0 @@ -Extending Monolog -================= - -Monolog is fully extensible, allowing you to adapt your logger to your needs. - -Writing your own handler ------------------------- - -Monolog provides many built-in handlers. But if the one you need does not -exist, you can write it and use it in your logger. The only requirement is -to implement `Monolog\Handler\HandlerInterface`. - -Let's write a PDOHandler to log records to a database. We will extend the -abstract class provided by Monolog to keep things DRY. - -```php -pdo = $pdo; - parent::__construct($level, $bubble); - } - - protected function write(array $record) - { - if (!$this->initialized) { - $this->initialize(); - } - - $this->statement->execute(array( - 'channel' => $record['channel'], - 'level' => $record['level'], - 'message' => $record['formatted'], - 'time' => $record['datetime']->format('U'), - )); - } - - private function initialize() - { - $this->pdo->exec( - 'CREATE TABLE IF NOT EXISTS monolog ' - .'(channel VARCHAR(255), level INTEGER, message LONGTEXT, time INTEGER UNSIGNED)' - ); - $this->statement = $this->pdo->prepare( - 'INSERT INTO monolog (channel, level, message, time) VALUES (:channel, :level, :message, :time)' - ); - - $this->initialized = true; - } -} -``` - -You can now use this handler in your logger: - -```php -pushHandler(new PDOHandler(new PDO('sqlite:logs.sqlite')); - -// You can now use your logger -$logger->addInfo('My logger is now ready'); -``` - -The `Monolog\Handler\AbstractProcessingHandler` class provides most of the -logic needed for the handler, including the use of processors and the formatting -of the record (which is why we use ``$record['formatted']`` instead of ``$record['message']``). diff --git a/vendor/monolog/monolog/doc/sockets.md b/vendor/monolog/monolog/doc/sockets.md deleted file mode 100644 index fad30a9f..00000000 --- a/vendor/monolog/monolog/doc/sockets.md +++ /dev/null @@ -1,37 +0,0 @@ -Sockets Handler -=============== - -This handler allows you to write your logs to sockets using [fsockopen](http://php.net/fsockopen) -or [pfsockopen](http://php.net/pfsockopen). - -Persistent sockets are mainly useful in web environments where you gain some performance not closing/opening -the connections between requests. - -Basic Example -------------- - -```php -setPersistent(true); - -// Now add the handler -$logger->pushHandler($handler, Logger::DEBUG); - -// You can now use your logger -$logger->addInfo('My logger is now ready'); - -``` - -In this example, using syslog-ng, you should see the log on the log server: - - cweb1 [2012-02-26 00:12:03] my_logger.INFO: My logger is now ready [] [] - diff --git a/vendor/monolog/monolog/doc/usage.md b/vendor/monolog/monolog/doc/usage.md deleted file mode 100644 index 07efa78a..00000000 --- a/vendor/monolog/monolog/doc/usage.md +++ /dev/null @@ -1,158 +0,0 @@ -Using Monolog -============= - -Installation ------------- - -Monolog is available on Packagist ([monolog/monolog](http://packagist.org/packages/monolog/monolog)) -and as such installable via [Composer](http://getcomposer.org/). - -If you do not use Composer, you can grab the code from GitHub, and use any -PSR-0 compatible autoloader (e.g. the [Symfony2 ClassLoader component](https://github.com/symfony/ClassLoader)) -to load Monolog classes. - -Configuring a logger --------------------- - -Here is a basic setup to log to a file and to firephp on the DEBUG level: - -```php -pushHandler(new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG)); -$logger->pushHandler(new FirePHPHandler()); - -// You can now use your logger -$logger->addInfo('My logger is now ready'); -``` - -Let's explain it. The first step is to create the logger instance which will -be used in your code. The argument is a channel name, which is useful when -you use several loggers (see below for more details about it). - -The logger itself does not know how to handle a record. It delegates it to -some handlers. The code above registers two handlers in the stack to allow -handling records in two different ways. - -Note that the FirePHPHandler is called first as it is added on top of the -stack. This allows you to temporarily add a logger with bubbling disabled if -you want to override other configured loggers. - -Adding extra data in the records --------------------------------- - -Monolog provides two different ways to add extra informations along the simple -textual message. - -### Using the logging context - -The first way is the context, allowing to pass an array of data along the -record: - -```php -addInfo('Adding a new user', array('username' => 'Seldaek')); -``` - -Simple handlers (like the StreamHandler for instance) will simply format -the array to a string but richer handlers can take advantage of the context -(FirePHP is able to display arrays in pretty way for instance). - -### Using processors - -The second way is to add extra data for all records by using a processor. -Processors can be any callable. They will get the record as parameter and -must return it after having eventually changed the `extra` part of it. Let's -write a processor adding some dummy data in the record: - -```php -pushProcessor(function ($record) { - $record['extra']['dummy'] = 'Hello world!'; - - return $record; -}); -``` - -Monolog provides some built-in processors that can be used in your project. -Look at the README file for the list. - -> Tip: processors can also be registered on a specific handler instead of - the logger to apply only for this handler. - -Leveraging channels -------------------- - -Channels are a great way to identify to which part of the application a record -is related. This is useful in big applications (and is leveraged by -MonologBundle in Symfony2). - -Picture two loggers sharing a handler that writes to a single log file. -Channels would allow you to identify the logger that issued every record. -You can easily grep through the log files filtering this or that channel. - -```php -pushHandler($stream); -$logger->pushHandler($firephp); - -// Create a logger for the security-related stuff with a different channel -$securityLogger = new Logger('security'); -$securityLogger->pushHandler($stream); -$securityLogger->pushHandler($firephp); -``` - -Customizing log format ----------------------- - -In Monolog it's easy to customize the format of the logs written into files, -sockets, mails, databases and other handlers. Most of the handlers use the - -```php -$record['formatted'] -``` - -value to be automatically put into the log device. This value depends on the -formatter settings. You can choose between predefined formatter classes or -write your own (e.g. a multiline text file for human-readable output). - -To configure a predefined formatter class, just set it as the handler's field: - -```php -// the default date format is "Y-m-d H:i:s" -$dateFormat = "Y n j, g:i a"; -// the default output format is "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n" -$output = "%datetime% > %level_name% > %message% %context% %extra%\n"; -// finally, create a formatter -$formatter = new LineFormatter($output, $dateFormat); - -// Create a handler -$stream = new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG); -$stream->setFormatter($formatter); -// bind it to a logger object -$securityLogger = new Logger('security'); -$securityLogger->pushHandler($stream); -``` - -You may also reuse the same formatter between multiple handlers and share those -handlers between multiple loggers. diff --git a/vendor/monolog/monolog/phpunit.xml.dist b/vendor/monolog/monolog/phpunit.xml.dist deleted file mode 100644 index 17545707..00000000 --- a/vendor/monolog/monolog/phpunit.xml.dist +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - tests/Monolog/ - - - - - - src/Monolog/ - - - diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php deleted file mode 100644 index 56d3e278..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -/** - * Formats a log message according to the ChromePHP array format - * - * @author Christophe Coevoet - */ -class ChromePHPFormatter implements FormatterInterface -{ - /** - * Translates Monolog log levels to Wildfire levels. - */ - private $logLevels = array( - Logger::DEBUG => 'log', - Logger::INFO => 'info', - Logger::NOTICE => 'info', - Logger::WARNING => 'warn', - Logger::ERROR => 'error', - Logger::CRITICAL => 'error', - Logger::ALERT => 'error', - Logger::EMERGENCY => 'error', - ); - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - // Retrieve the line and file if set and remove them from the formatted extra - $backtrace = 'unknown'; - if (isset($record['extra']['file']) && isset($record['extra']['line'])) { - $backtrace = $record['extra']['file'].' : '.$record['extra']['line']; - unset($record['extra']['file']); - unset($record['extra']['line']); - } - - $message = array('message' => $record['message']); - if ($record['context']) { - $message['context'] = $record['context']; - } - if ($record['extra']) { - $message['extra'] = $record['extra']; - } - if (count($message) === 1) { - $message = reset($message); - } - - return array( - $record['channel'], - $message, - $backtrace, - $this->logLevels[$record['level']], - ); - } - - public function formatBatch(array $records) - { - $formatted = array(); - - foreach ($records as $record) { - $formatted[] = $this->format($record); - } - - return $formatted; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php b/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php deleted file mode 100644 index b5de7511..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Interface for formatters - * - * @author Jordi Boggiano - */ -interface FormatterInterface -{ - /** - * Formats a log record. - * - * @param array $record A record to format - * @return mixed The formatted record - */ - public function format(array $record); - - /** - * Formats a set of log records. - * - * @param array $records A set of records to format - * @return mixed The formatted set of records - */ - public function formatBatch(array $records); -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php deleted file mode 100644 index aa01f491..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Gelf\Message; - -/** - * Serializes a log message to GELF - * @see http://www.graylog2.org/about/gelf - * - * @author Matt Lehner - */ -class GelfMessageFormatter extends NormalizerFormatter -{ - /** - * @var string the name of the system for the Gelf log message - */ - protected $systemName; - - /** - * @var string a prefix for 'extra' fields from the Monolog record (optional) - */ - protected $extraPrefix; - - /** - * @var string a prefix for 'context' fields from the Monolog record (optional) - */ - protected $contextPrefix; - - /** - * Translates Monolog log levels to Graylog2 log priorities. - */ - private $logLevels = array( - Logger::DEBUG => 7, - Logger::INFO => 6, - Logger::NOTICE => 5, - Logger::WARNING => 4, - Logger::ERROR => 3, - Logger::CRITICAL => 2, - Logger::ALERT => 1, - Logger::EMERGENCY => 0, - ); - - public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_') - { - parent::__construct('U.u'); - - $this->systemName = $systemName ?: gethostname(); - - $this->extraPrefix = $extraPrefix; - $this->contextPrefix = $contextPrefix; - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - $record = parent::format($record); - $message = new Message(); - $message - ->setTimestamp($record['datetime']) - ->setShortMessage((string) $record['message']) - ->setFacility($record['channel']) - ->setHost($this->systemName) - ->setLine(isset($record['extra']['line']) ? $record['extra']['line'] : null) - ->setFile(isset($record['extra']['file']) ? $record['extra']['file'] : null) - ->setLevel($this->logLevels[$record['level']]); - - // Do not duplicate these values in the additional fields - unset($record['extra']['line']); - unset($record['extra']['file']); - - foreach ($record['extra'] as $key => $val) { - $message->setAdditional($this->extraPrefix . $key, is_scalar($val) ? $val : $this->toJson($val)); - } - - foreach ($record['context'] as $key => $val) { - $message->setAdditional($this->contextPrefix . $key, is_scalar($val) ? $val : $this->toJson($val)); - } - - return $message; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php deleted file mode 100644 index 822af0ea..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Encodes whatever record data is passed to it as json - * - * This can be useful to log to databases or remote APIs - * - * @author Jordi Boggiano - */ -class JsonFormatter implements FormatterInterface -{ - /** - * {@inheritdoc} - */ - public function format(array $record) - { - return json_encode($record); - } - - /** - * {@inheritdoc} - */ - public function formatBatch(array $records) - { - return json_encode($records); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php deleted file mode 100644 index a96fb27d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Formats incoming records into a one-line string - * - * This is especially useful for logging to files - * - * @author Jordi Boggiano - * @author Christophe Coevoet - */ -class LineFormatter extends NormalizerFormatter -{ - const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"; - - protected $format; - - /** - * @param string $format The format of the message - * @param string $dateFormat The format of the timestamp: one supported by DateTime::format - */ - public function __construct($format = null, $dateFormat = null) - { - $this->format = $format ?: static::SIMPLE_FORMAT; - parent::__construct($dateFormat); - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - $vars = parent::format($record); - - $output = $this->format; - foreach ($vars['extra'] as $var => $val) { - if (false !== strpos($output, '%extra.'.$var.'%')) { - $output = str_replace('%extra.'.$var.'%', $this->convertToString($val), $output); - unset($vars['extra'][$var]); - } - } - foreach ($vars as $var => $val) { - $output = str_replace('%'.$var.'%', $this->convertToString($val), $output); - } - - return $output; - } - - public function formatBatch(array $records) - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } - - protected function normalize($data) - { - if (is_bool($data) || is_null($data)) { - return var_export($data, true); - } - - if ($data instanceof \Exception) { - $previousText = ''; - if ($previous = $data->getPrevious()) { - do { - $previousText .= ', '.get_class($previous).': '.$previous->getMessage().' at '.$previous->getFile().':'.$previous->getLine(); - } while ($previous = $previous->getPrevious()); - } - - return '[object] ('.get_class($data).': '.$data->getMessage().' at '.$data->getFile().':'.$data->getLine().$previousText.')'; - } - - return parent::normalize($data); - } - - protected function convertToString($data) - { - if (null === $data || is_scalar($data)) { - return (string) $data; - } - - $data = $this->normalize($data); - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - return $this->toJson($data); - } - - return str_replace('\\/', '/', json_encode($data)); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php deleted file mode 100644 index 7aa8ad33..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Serializes a log message to Logstash Event Format - * - * @see http://logstash.net/ - * @see https://github.com/logstash/logstash/blob/master/lib/logstash/event.rb - * - * @author Tim Mower - */ -class LogstashFormatter extends NormalizerFormatter -{ - /** - * @var string the name of the system for the Logstash log message, used to fill the @source field - */ - protected $systemName; - - /** - * @var string an application name for the Logstash log message, used to fill the @type field - */ - protected $applicationName; - - /** - * @var string a prefix for 'extra' fields from the Monolog record (optional) - */ - protected $extraPrefix; - - /** - * @var string a prefix for 'context' fields from the Monolog record (optional) - */ - protected $contextPrefix; - - /** - * @param string $applicationName the application that sends the data, used as the "type" field of logstash - * @param string $systemName the system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine - * @param string $extraPrefix prefix for extra keys inside logstash "fields" - * @param string $contextPrefix prefix for context keys inside logstash "fields", defaults to ctxt_ - */ - public function __construct($applicationName, $systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_') - { - //log stash requires a ISO 8601 format date - parent::__construct('c'); - - $this->systemName = $systemName ?: gethostname(); - $this->applicationName = $applicationName; - - $this->extraPrefix = $extraPrefix; - $this->contextPrefix = $contextPrefix; - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - $record = parent::format($record); - $message = array( - '@timestamp' => $record['datetime'], - '@message' => $record['message'], - '@tags' => array($record['channel']), - '@source' => $this->systemName - ); - - if ($this->applicationName) { - $message['@type'] = $this->applicationName; - } - $message['@fields'] = array(); - $message['@fields']['channel'] = $record['channel']; - $message['@fields']['level'] = $record['level']; - - if (isset($record['extra']['server'])) { - $message['@source_host'] = $record['extra']['server']; - } - if (isset($record['extra']['url'])) { - $message['@source_path'] = $record['extra']['url']; - } - foreach ($record['extra'] as $key => $val) { - $message['@fields'][$this->extraPrefix . $key] = $val; - } - - foreach ($record['context'] as $key => $val) { - $message['@fields'][$this->contextPrefix . $key] = $val; - } - - return json_encode($message) . "\n"; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php deleted file mode 100644 index c8b05fba..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets - * - * @author Jordi Boggiano - */ -class NormalizerFormatter implements FormatterInterface -{ - const SIMPLE_DATE = "Y-m-d H:i:s"; - - protected $dateFormat; - - /** - * @param string $dateFormat The format of the timestamp: one supported by DateTime::format - */ - public function __construct($dateFormat = null) - { - $this->dateFormat = $dateFormat ?: static::SIMPLE_DATE; - } - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - return $this->normalize($record); - } - - /** - * {@inheritdoc} - */ - public function formatBatch(array $records) - { - foreach ($records as $key => $record) { - $records[$key] = $this->format($record); - } - - return $records; - } - - protected function normalize($data) - { - if (null === $data || is_scalar($data)) { - return $data; - } - - if (is_array($data) || $data instanceof \Traversable) { - $normalized = array(); - - foreach ($data as $key => $value) { - $normalized[$key] = $this->normalize($value); - } - - return $normalized; - } - - if ($data instanceof \DateTime) { - return $data->format($this->dateFormat); - } - - if (is_object($data)) { - return sprintf("[object] (%s: %s)", get_class($data), $this->toJson($data, true)); - } - - if (is_resource($data)) { - return '[resource]'; - } - - return '[unknown('.gettype($data).')]'; - } - - protected function toJson($data, $ignoreErrors = false) - { - // suppress json_encode errors since it's twitchy with some inputs - if ($ignoreErrors) { - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - return @json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - } - - return @json_encode($data); - } - - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - } - - return json_encode($data); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php deleted file mode 100644 index b3e9b186..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -/** - * Serializes a log message according to Wildfire's header requirements - * - * @author Eric Clemmons (@ericclemmons) - * @author Christophe Coevoet - * @author Kirill chEbba Chebunin - */ -class WildfireFormatter extends NormalizerFormatter -{ - /** - * Translates Monolog log levels to Wildfire levels. - */ - private $logLevels = array( - Logger::DEBUG => 'LOG', - Logger::INFO => 'INFO', - Logger::NOTICE => 'INFO', - Logger::WARNING => 'WARN', - Logger::ERROR => 'ERROR', - Logger::CRITICAL => 'ERROR', - Logger::ALERT => 'ERROR', - Logger::EMERGENCY => 'ERROR', - ); - - /** - * {@inheritdoc} - */ - public function format(array $record) - { - // Retrieve the line and file if set and remove them from the formatted extra - $file = $line = ''; - if (isset($record['extra']['file'])) { - $file = $record['extra']['file']; - unset($record['extra']['file']); - } - if (isset($record['extra']['line'])) { - $line = $record['extra']['line']; - unset($record['extra']['line']); - } - - $record = $this->normalize($record); - $message = array('message' => $record['message']); - $handleError = false; - if ($record['context']) { - $message['context'] = $record['context']; - $handleError = true; - } - if ($record['extra']) { - $message['extra'] = $record['extra']; - $handleError = true; - } - if (count($message) === 1) { - $message = reset($message); - } - - // Create JSON object describing the appearance of the message in the console - $json = $this->toJson(array( - array( - 'Type' => $this->logLevels[$record['level']], - 'File' => $file, - 'Line' => $line, - 'Label' => $record['channel'], - ), - $message, - ), $handleError); - - // The message itself is a serialization of the above JSON object + it's length - return sprintf( - '%s|%s|', - strlen($json), - $json - ); - } - - public function formatBatch(array $records) - { - throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter'); - } - - protected function normalize($data) - { - if (is_object($data) && !$data instanceof \DateTime) { - return $data; - } - - return parent::normalize($data); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php deleted file mode 100644 index 2ea9f559..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; - -/** - * Base Handler class providing the Handler structure - * - * @author Jordi Boggiano - */ -abstract class AbstractHandler implements HandlerInterface -{ - protected $level = Logger::DEBUG; - protected $bubble = false; - - /** - * @var FormatterInterface - */ - protected $formatter; - protected $processors = array(); - - /** - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($level = Logger::DEBUG, $bubble = true) - { - $this->level = $level; - $this->bubble = $bubble; - } - - /** - * {@inheritdoc} - */ - public function isHandling(array $record) - { - return $record['level'] >= $this->level; - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - foreach ($records as $record) { - $this->handle($record); - } - } - - /** - * Closes the handler. - * - * This will be called automatically when the object is destroyed - */ - public function close() - { - } - - /** - * {@inheritdoc} - */ - public function pushProcessor($callback) - { - if (!is_callable($callback)) { - throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); - } - array_unshift($this->processors, $callback); - } - - /** - * {@inheritdoc} - */ - public function popProcessor() - { - if (!$this->processors) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * {@inheritdoc} - */ - public function setFormatter(FormatterInterface $formatter) - { - $this->formatter = $formatter; - } - - /** - * {@inheritdoc} - */ - public function getFormatter() - { - if (!$this->formatter) { - $this->formatter = $this->getDefaultFormatter(); - } - - return $this->formatter; - } - - /** - * Sets minimum logging level at which this handler will be triggered. - * - * @param integer $level - */ - public function setLevel($level) - { - $this->level = $level; - } - - /** - * Gets minimum logging level at which this handler will be triggered. - * - * @return integer - */ - public function getLevel() - { - return $this->level; - } - - /** - * Sets the bubbling behavior. - * - * @param Boolean $bubble True means that bubbling is not permitted. - * False means that this handler allows bubbling. - */ - public function setBubble($bubble) - { - $this->bubble = $bubble; - } - - /** - * Gets the bubbling behavior. - * - * @return Boolean True means that bubbling is not permitted. - * False means that this handler allows bubbling. - */ - public function getBubble() - { - return $this->bubble; - } - - public function __destruct() - { - try { - $this->close(); - } catch (\Exception $e) { - // do nothing - } - } - - /** - * Gets the default formatter. - * - * @return FormatterInterface - */ - protected function getDefaultFormatter() - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php deleted file mode 100644 index e1e5b893..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Base Handler class providing the Handler structure - * - * Classes extending it should (in most cases) only implement write($record) - * - * @author Jordi Boggiano - * @author Christophe Coevoet - */ -abstract class AbstractProcessingHandler extends AbstractHandler -{ - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if ($record['level'] < $this->level) { - return false; - } - - $record = $this->processRecord($record); - - $record['formatted'] = $this->getFormatter()->format($record); - - $this->write($record); - - return false === $this->bubble; - } - - /** - * Writes the record down to the log of the implementing handler - * - * @param array $record - * @return void - */ - abstract protected function write(array $record); - - /** - * Processes a record. - * - * @param array $record - * @return array - */ - protected function processRecord(array $record) - { - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php deleted file mode 100644 index 00703436..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\JsonFormatter; - -class AmqpHandler extends AbstractProcessingHandler -{ - /** - * @var \AMQPExchange $exchange - */ - protected $exchange; - - /** - * @param \AMQPExchange $exchange AMQP exchange, ready for use - * @param string $exchangeName - * @param int $level - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(\AMQPExchange $exchange, $exchangeName = 'log', $level = Logger::DEBUG, $bubble = true) - { - $this->exchange = $exchange; - $this->exchange->setName($exchangeName); - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record) - { - $data = $record["formatted"]; - - $routingKey = sprintf( - '%s.%s', - substr($record['level_name'], 0, 4), - $record['channel'] - ); - - $this->exchange->publish( - $data, - strtolower($routingKey), - 0, - array( - 'delivery_mode' => 2, - 'Content-type' => 'application/json' - ) - ); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new JsonFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php deleted file mode 100644 index e9a4dc35..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Buffers all records until closing the handler and then pass them as batch. - * - * This is useful for a MailHandler to send only one mail per request instead of - * sending one per log message. - * - * @author Christophe Coevoet - */ -class BufferHandler extends AbstractHandler -{ - protected $handler; - protected $bufferSize = 0; - protected $bufferLimit; - protected $flushOnOverflow; - protected $buffer = array(); - - /** - * @param HandlerInterface $handler Handler. - * @param integer $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - * @param Boolean $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded - */ - public function __construct(HandlerInterface $handler, $bufferSize = 0, $level = Logger::DEBUG, $bubble = true, $flushOnOverflow = false) - { - parent::__construct($level, $bubble); - $this->handler = $handler; - $this->bufferLimit = (int) $bufferSize; - $this->flushOnOverflow = $flushOnOverflow; - - // __destructor() doesn't get called on Fatal errors - register_shutdown_function(array($this, 'close')); - } - - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if ($record['level'] < $this->level) { - return false; - } - - if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { - if ($this->flushOnOverflow) { - $this->flush(); - } else { - array_shift($this->buffer); - $this->bufferSize--; - } - } - - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - $this->buffer[] = $record; - $this->bufferSize++; - - return false === $this->bubble; - } - - public function flush() - { - if ($this->bufferSize === 0) { - return; - } - - $this->handler->handleBatch($this->buffer); - $this->bufferSize = 0; - $this->buffer = array(); - } - - /** - * {@inheritdoc} - */ - public function close() - { - $this->flush(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php deleted file mode 100644 index 91b8f8aa..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\ChromePHPFormatter; -use Monolog\Logger; - -/** - * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) - * - * @author Christophe Coevoet - */ -class ChromePHPHandler extends AbstractProcessingHandler -{ - /** - * Version of the extension - */ - const VERSION = '3.0'; - - /** - * Header name - */ - const HEADER_NAME = 'X-ChromePhp-Data'; - - protected static $initialized = false; - - /** - * Tracks whether we sent too much data - * - * Chrome limits the headers to 256KB, so when we sent 240KB we stop sending - * - * @var Boolean - */ - protected static $overflowed = false; - - protected static $json = array( - 'version' => self::VERSION, - 'columns' => array('label', 'log', 'backtrace', 'type'), - 'rows' => array(), - ); - - protected static $sendHeaders = true; - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - $messages = array(); - - foreach ($records as $record) { - if ($record['level'] < $this->level) { - continue; - } - $messages[] = $this->processRecord($record); - } - - if (!empty($messages)) { - $messages = $this->getFormatter()->formatBatch($messages); - self::$json['rows'] = array_merge(self::$json['rows'], $messages); - $this->send(); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new ChromePHPFormatter(); - } - - /** - * Creates & sends header for a record - * - * @see sendHeader() - * @see send() - * @param array $record - */ - protected function write(array $record) - { - self::$json['rows'][] = $record['formatted']; - - $this->send(); - } - - /** - * Sends the log header - * - * @see sendHeader() - */ - protected function send() - { - if (self::$overflowed) { - return; - } - - if (!self::$initialized) { - self::$sendHeaders = $this->headersAccepted(); - self::$json['request_uri'] = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; - - self::$initialized = true; - } - - $json = @json_encode(self::$json); - $data = base64_encode(utf8_encode($json)); - if (strlen($data) > 240*1024) { - self::$overflowed = true; - - $record = array( - 'message' => 'Incomplete logs, chrome header size limit reached', - 'context' => array(), - 'level' => Logger::WARNING, - 'level_name' => Logger::getLevelName(Logger::WARNING), - 'channel' => 'monolog', - 'datetime' => new \DateTime(), - 'extra' => array(), - ); - self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); - $json = @json_encode(self::$json); - $data = base64_encode(utf8_encode($json)); - } - - $this->sendHeader(self::HEADER_NAME, $data); - } - - /** - * Send header string to the client - * - * @param string $header - * @param string $content - */ - protected function sendHeader($header, $content) - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - * - * @return Boolean - */ - protected function headersAccepted() - { - return !isset($_SERVER['HTTP_USER_AGENT']) - || preg_match('{\bChrome/\d+[\.\d+]*\b}', $_SERVER['HTTP_USER_AGENT']); - } - - /** - * BC getter for the sendHeaders property that has been made static - */ - public function __get($property) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property '.$property); - } - - return static::$sendHeaders; - } - - /** - * BC setter for the sendHeaders property that has been made static - */ - public function __set($property, $value) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property '.$property); - } - - static::$sendHeaders = $value; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php deleted file mode 100644 index 4877b345..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\JsonFormatter; -use Monolog\Logger; - -/** - * CouchDB handler - * - * @author Markus Bachmann - */ -class CouchDBHandler extends AbstractProcessingHandler -{ - private $options; - - public function __construct(array $options = array(), $level = Logger::DEBUG, $bubble = true) - { - $this->options = array_merge(array( - 'host' => 'localhost', - 'port' => 5984, - 'dbname' => 'logger', - 'username' => null, - 'password' => null, - ), $options); - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record) - { - $basicAuth = null; - if ($this->options['username']) { - $basicAuth = sprintf('%s:%s@', $this->options['username'], $this->options['password']); - } - - $url = 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname']; - $context = stream_context_create(array( - 'http' => array( - 'method' => 'POST', - 'content' => $record['formatted'], - 'ignore_errors' => true, - 'max_redirects' => 0, - 'header' => 'Content-type: application/json', - ) - )); - - if (false === @file_get_contents($url, null, $context)) { - throw new \RuntimeException(sprintf('Could not connect to %s', $url)); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new JsonFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php deleted file mode 100644 index 6ccff26e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Logs to Cube. - * - * @link http://square.github.com/cube/ - * @author Wan Chen - */ -class CubeHandler extends AbstractProcessingHandler -{ - private $udpConnection = null; - private $httpConnection = null; - private $scheme = null; - private $host = null; - private $port = null; - private $acceptedSchemes = array('http', 'udp'); - - /** - * Create a Cube handler - * - * @throws UnexpectedValueException when given url is not a valid url. - * A valid url must consists of three parts : protocol://host:port - * Only valid protocol used by Cube are http and udp - */ - public function __construct($url, $level = Logger::DEBUG, $bubble = true) - { - $urlInfos = parse_url($url); - - if (!isset($urlInfos['scheme']) || !isset($urlInfos['host']) || !isset($urlInfos['port'])) { - throw new \UnexpectedValueException('URL "'.$url.'" is not valid'); - } - - if (!in_array($urlInfos['scheme'], $this->acceptedSchemes)) { - throw new \UnexpectedValueException( - 'Invalid protocol (' . $urlInfos['scheme'] . ').' - . ' Valid options are ' . implode(', ', $this->acceptedSchemes)); - } - - $this->scheme = $urlInfos['scheme']; - $this->host = $urlInfos['host']; - $this->port = $urlInfos['port']; - - parent::__construct($level, $bubble); - } - - /** - * Establish a connection to an UDP socket - * - * @throws LogicException when unable to connect to the socket - */ - protected function connectUdp() - { - if (!extension_loaded('sockets')) { - throw new \LogicException('The sockets extension is needed to use udp URLs with the CubeHandler'); - } - - $this->udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0); - if (!$this->udpConnection) { - throw new \LogicException('Unable to create a socket'); - } - - if (!socket_connect($this->udpConnection, $this->host, $this->port)) { - throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); - } - } - - /** - * Establish a connection to a http server - */ - protected function connectHttp() - { - if (!extension_loaded('curl')) { - throw new \LogicException('The curl extension is needed to use http URLs with the CubeHandler'); - } - - $this->httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put'); - - if (!$this->httpConnection) { - throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); - } - - curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST"); - curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true); - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $date = $record['datetime']; - - $data = array('time' => $date->format('Y-m-d\TH:i:s.u')); - unset($record['datetime']); - - if (isset($record['context']['type'])) { - $data['type'] = $record['context']['type']; - unset($record['context']['type']); - } else { - $data['type'] = $record['channel']; - } - - $data['data'] = $record['context']; - $data['data']['level'] = $record['level']; - - $this->{'write'.$this->scheme}(json_encode($data)); - } - - private function writeUdp($data) - { - if (!$this->udpConnection) { - $this->connectUdp(); - } - - socket_send($this->udpConnection, $data, strlen($data), 0); - } - - private function writeHttp($data) - { - if (!$this->httpConnection) { - $this->connectHttp(); - } - - curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']'); - curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, array( - 'Content-Type: application/json', - 'Content-Length: ' . strlen('['.$data.']')) - ); - - return curl_exec($this->httpConnection); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php deleted file mode 100644 index b91ffec9..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\NormalizerFormatter; -use Doctrine\CouchDB\CouchDBClient; - -/** - * CouchDB handler for Doctrine CouchDB ODM - * - * @author Markus Bachmann - */ -class DoctrineCouchDBHandler extends AbstractProcessingHandler -{ - private $client; - - public function __construct(CouchDBClient $client, $level = Logger::DEBUG, $bubble = true) - { - $this->client = $client; - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record) - { - $this->client->postDocument($record['formatted']); - } - - protected function getDefaultFormatter() - { - return new NormalizerFormatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php deleted file mode 100644 index c3e42efe..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -/** - * Interface for activation strategies for the FingersCrossedHandler. - * - * @author Johannes M. Schmitt - */ -interface ActivationStrategyInterface -{ - /** - * Returns whether the given record activates the handler. - * - * @param array $record - * @return Boolean - */ - public function isHandlerActivated(array $record); -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php deleted file mode 100644 index 7cd8ef1b..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -/** - * Error level based activation strategy. - * - * @author Johannes M. Schmitt - */ -class ErrorLevelActivationStrategy implements ActivationStrategyInterface -{ - private $actionLevel; - - public function __construct($actionLevel) - { - $this->actionLevel = $actionLevel; - } - - public function isHandlerActivated(array $record) - { - return $record['level'] >= $this->actionLevel; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php deleted file mode 100644 index 5ac6d777..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; -use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; -use Monolog\Logger; - -/** - * Buffers all records until a certain level is reached - * - * The advantage of this approach is that you don't get any clutter in your log files. - * Only requests which actually trigger an error (or whatever your actionLevel is) will be - * in the logs, but they will contain all records, not only those above the level threshold. - * - * @author Jordi Boggiano - */ -class FingersCrossedHandler extends AbstractHandler -{ - protected $handler; - protected $activationStrategy; - protected $buffering = true; - protected $bufferSize; - protected $buffer = array(); - protected $stopBuffering; - - /** - * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler). - * @param int|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action - * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - * @param Boolean $stopBuffering Whether the handler should stop buffering after being triggered (default true) - */ - public function __construct($handler, $activationStrategy = null, $bufferSize = 0, $bubble = true, $stopBuffering = true) - { - if (null === $activationStrategy) { - $activationStrategy = new ErrorLevelActivationStrategy(Logger::WARNING); - } - if (!$activationStrategy instanceof ActivationStrategyInterface) { - $activationStrategy = new ErrorLevelActivationStrategy($activationStrategy); - } - - $this->handler = $handler; - $this->activationStrategy = $activationStrategy; - $this->bufferSize = $bufferSize; - $this->bubble = $bubble; - $this->stopBuffering = $stopBuffering; - } - - /** - * {@inheritdoc} - */ - public function isHandling(array $record) - { - return true; - } - - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - if ($this->buffering) { - $this->buffer[] = $record; - if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) { - array_shift($this->buffer); - } - if ($this->activationStrategy->isHandlerActivated($record)) { - if ($this->stopBuffering) { - $this->buffering = false; - } - if (!$this->handler instanceof HandlerInterface) { - if (!is_callable($this->handler)) { - throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); - } - $this->handler = call_user_func($this->handler, $record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - $this->handler->handleBatch($this->buffer); - $this->buffer = array(); - } - } else { - $this->handler->handle($record); - } - - return false === $this->bubble; - } - - /** - * Resets the state of the handler. Stops forwarding records to the wrapped handler. - */ - public function reset() - { - $this->buffering = true; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php deleted file mode 100644 index 46a039ad..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php +++ /dev/null @@ -1,184 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\WildfireFormatter; - -/** - * Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol. - * - * @author Eric Clemmons (@ericclemmons) - */ -class FirePHPHandler extends AbstractProcessingHandler -{ - /** - * WildFire JSON header message format - */ - const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; - - /** - * FirePHP structure for parsing messages & their presentation - */ - const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; - - /** - * Must reference a "known" plugin, otherwise headers won't display in FirePHP - */ - const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; - - /** - * Header prefix for Wildfire to recognize & parse headers - */ - const HEADER_PREFIX = 'X-Wf'; - - /** - * Whether or not Wildfire vendor-specific headers have been generated & sent yet - */ - protected static $initialized = false; - - /** - * Shared static message index between potentially multiple handlers - * @var int - */ - protected static $messageIndex = 1; - - protected static $sendHeaders = true; - - /** - * Base header creation function used by init headers & record headers - * - * @param array $meta Wildfire Plugin, Protocol & Structure Indexes - * @param string $message Log message - * @return array Complete header string ready for the client as key and message as value - */ - protected function createHeader(array $meta, $message) - { - $header = sprintf('%s-%s', self::HEADER_PREFIX, join('-', $meta)); - - return array($header => $message); - } - - /** - * Creates message header from record - * - * @see createHeader() - * @param array $record - * @return string - */ - protected function createRecordHeader(array $record) - { - // Wildfire is extensible to support multiple protocols & plugins in a single request, - // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. - return $this->createHeader( - array(1, 1, 1, self::$messageIndex++), - $record['formatted'] - ); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new WildfireFormatter(); - } - - /** - * Wildfire initialization headers to enable message parsing - * - * @see createHeader() - * @see sendHeader() - * @return array - */ - protected function getInitHeaders() - { - // Initial payload consists of required headers for Wildfire - return array_merge( - $this->createHeader(array('Protocol', 1), self::PROTOCOL_URI), - $this->createHeader(array(1, 'Structure', 1), self::STRUCTURE_URI), - $this->createHeader(array(1, 'Plugin', 1), self::PLUGIN_URI) - ); - } - - /** - * Send header string to the client - * - * @param string $header - * @param string $content - */ - protected function sendHeader($header, $content) - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Creates & sends header for a record, ensuring init headers have been sent prior - * - * @see sendHeader() - * @see sendInitHeaders() - * @param array $record - */ - protected function write(array $record) - { - // WildFire-specific headers must be sent prior to any messages - if (!self::$initialized) { - self::$sendHeaders = $this->headersAccepted(); - - foreach ($this->getInitHeaders() as $header => $content) { - $this->sendHeader($header, $content); - } - - self::$initialized = true; - } - - $header = $this->createRecordHeader($record); - $this->sendHeader(key($header), current($header)); - } - - /** - * Verifies if the headers are accepted by the current user agent - * - * @return Boolean - */ - protected function headersAccepted() - { - return !isset($_SERVER['HTTP_USER_AGENT']) - || preg_match('{\bFirePHP/\d+\.\d+\b}', $_SERVER['HTTP_USER_AGENT']) - || isset($_SERVER['HTTP_X_FIREPHP_VERSION']); - } - - /** - * BC getter for the sendHeaders property that has been made static - */ - public function __get($property) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property '.$property); - } - - return static::$sendHeaders; - } - - /** - * BC setter for the sendHeaders property that has been made static - */ - public function __set($property, $value) - { - if ('sendHeaders' !== $property) { - throw new \InvalidArgumentException('Undefined property '.$property); - } - - static::$sendHeaders = $value; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php deleted file mode 100644 index 34d48e75..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\IMessagePublisher; -use Monolog\Logger; -use Monolog\Handler\AbstractProcessingHandler; -use Monolog\Formatter\GelfMessageFormatter; - -/** - * Handler to send messages to a Graylog2 (http://www.graylog2.org) server - * - * @author Matt Lehner - */ -class GelfHandler extends AbstractProcessingHandler -{ - /** - * @var Gelf\IMessagePublisher the publisher object that sends the message to the server - */ - protected $publisher; - - /** - * @param Gelf\IMessagePublisher $publisher a publisher object - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(IMessagePublisher $publisher, $level = Logger::DEBUG, $bubble = true) - { - parent::__construct($level, $bubble); - - $this->publisher = $publisher; - } - - /** - * {@inheritdoc} - */ - public function close() - { - $this->publisher = null; - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $this->publisher->publish($record['formatted']); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new GelfMessageFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php deleted file mode 100644 index 99384d35..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Forwards records to multiple handlers - * - * @author Lenar Lõhmus - */ -class GroupHandler extends AbstractHandler -{ - protected $handlers; - - /** - * @param array $handlers Array of Handlers. - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(array $handlers, $bubble = true) - { - foreach ($handlers as $handler) { - if (!$handler instanceof HandlerInterface) { - throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); - } - } - - $this->handlers = $handlers; - $this->bubble = $bubble; - } - - /** - * {@inheritdoc} - */ - public function isHandling(array $record) - { - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if ($this->processors) { - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - } - - foreach ($this->handlers as $handler) { - $handler->handle($record); - } - - return false === $this->bubble; - } - - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - foreach ($this->handlers as $handler) { - $handler->handleBatch($records); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php deleted file mode 100644 index ac15d7de..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; - -/** - * Interface that all Monolog Handlers must implement - * - * @author Jordi Boggiano - */ -interface HandlerInterface -{ - /** - * Checks whether the given record will be handled by this handler. - * - * This is mostly done for performance reasons, to avoid calling processors for nothing. - * - * Handlers should still check the record levels within handle(), returning false in isHandling() - * is no guarantee that handle() will not be called, and isHandling() might not be called - * for a given record. - * - * @param array $record - * - * @return Boolean - */ - public function isHandling(array $record); - - /** - * Handles a record. - * - * All records may be passed to this method, and the handler should discard - * those that it does not want to handle. - * - * The return value of this function controls the bubbling process of the handler stack. - * Unless the bubbling is interrupted (by returning true), the Logger class will keep on - * calling further handlers in the stack with a given log record. - * - * @param array $record The record to handle - * @return Boolean True means that this handler handled the record, and that bubbling is not permitted. - * False means the record was either not processed or that this handler allows bubbling. - */ - public function handle(array $record); - - /** - * Handles a set of records at once. - * - * @param array $records The records to handle (an array of record arrays) - */ - public function handleBatch(array $records); - - /** - * Adds a processor in the stack. - * - * @param callable $callback - */ - public function pushProcessor($callback); - - /** - * Removes the processor on top of the stack and returns it. - * - * @return callable - */ - public function popProcessor(); - - /** - * Sets the formatter. - * - * @param FormatterInterface $formatter - */ - public function setFormatter(FormatterInterface $formatter); - - /** - * Gets the formatter. - * - * @return FormatterInterface - */ - public function getFormatter(); -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php deleted file mode 100644 index 86292727..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Base class for all mail handlers - * - * @author Gyula Sallai - */ -abstract class MailHandler extends AbstractProcessingHandler -{ - /** - * {@inheritdoc} - */ - public function handleBatch(array $records) - { - $messages = array(); - - foreach ($records as $record) { - if ($record['level'] < $this->level) { - continue; - } - $messages[] = $this->processRecord($record); - } - - if (!empty($messages)) { - $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); - } - } - - /** - * Send a mail with the given content - * - * @param string $content - * @param array $records the array of log records that formed this content - */ - abstract protected function send($content, array $records); - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $this->send((string) $record['formatted'], array($record)); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php deleted file mode 100644 index 0cb21cd2..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Exception can be thrown if an extension for an handler is missing - * - * @author Christian Bergau - */ -class MissingExtensionException extends \Exception -{ - -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php deleted file mode 100644 index 5a59201a..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\NormalizerFormatter; - -/** - * Logs to a MongoDB database. - * - * usage example: - * - * $log = new Logger('application'); - * $mongodb = new MongoDBHandler(new \Mongo("mongodb://localhost:27017"), "logs", "prod"); - * $log->pushHandler($mongodb); - * - * @author Thomas Tourlourat - */ -class MongoDBHandler extends AbstractProcessingHandler -{ - private $mongoCollection; - - public function __construct($mongo, $database, $collection, $level = Logger::DEBUG, $bubble = true) - { - if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo)) { - throw new \InvalidArgumentException('MongoClient or Mongo instance required'); - } - - $this->mongoCollection = $mongo->selectCollection($database, $collection); - - parent::__construct($level, $bubble); - } - - protected function write(array $record) - { - $this->mongoCollection->save($record["formatted"]); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new NormalizerFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php deleted file mode 100644 index c7ac63a0..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * NativeMailerHandler uses the mail() function to send the emails - * - * @author Christophe Coevoet - */ -class NativeMailerHandler extends MailHandler -{ - protected $to; - protected $subject; - protected $headers = array( - 'Content-type: text/plain; charset=utf-8' - ); - - /** - * @param string|array $to The receiver of the mail - * @param string $subject The subject of the mail - * @param string $from The sender of the mail - * @param integer $level The minimum logging level at which this handler will be triggered - * @param boolean $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true) - { - parent::__construct($level, $bubble); - $this->to = is_array($to) ? $to : array($to); - $this->subject = $subject; - $this->addHeader(sprintf('From: %s', $from)); - } - - /** - * @param string|array $headers Custom added headers - */ - public function addHeader($headers) - { - foreach ((array) $headers as $header) { - if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) { - throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons'); - } - $this->headers[] = $header; - } - } - - /** - * {@inheritdoc} - */ - protected function send($content, array $records) - { - $content = wordwrap($content, 70); - $headers = implode("\r\n", $this->headers) . "\r\n"; - foreach ($this->to as $to) { - mail($to, $this->subject, $content, $headers); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php deleted file mode 100644 index 3754e45d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Blackhole - * - * Any record it can handle will be thrown away. This can be used - * to put on top of an existing stack to override it temporarily. - * - * @author Jordi Boggiano - */ -class NullHandler extends AbstractHandler -{ - /** - * @param integer $level The minimum logging level at which this handler will be triggered - */ - public function __construct($level = Logger::DEBUG) - { - parent::__construct($level, false); - } - - /** - * {@inheritdoc} - */ - public function handle(array $record) - { - if ($record['level'] < $this->level) { - return false; - } - - return true; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php deleted file mode 100644 index 06818393..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Sends notifications through the pushover api to mobile phones - * - * @author Sebastian Göttschkes - * @see https://www.pushover.net/api - */ -class PushoverHandler extends SocketHandler -{ - private $token; - private $user; - private $title; - - /** - * @param string $token Pushover api token - * @param string $user Pushover user id the message will be sent to - * @param string $title Title sent to Pushover API - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - * @param Boolean $useSSL Whether to connect via SSL. Required when pushing messages to users that are not - * the pushover.net app owner. OpenSSL is required for this option. - */ - public function __construct($token, $user, $title = null, $level = Logger::CRITICAL, $bubble = true, $useSSL = true) - { - $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; - parent::__construct($connectionString, $level, $bubble); - - $this->token = $token; - $this->user = $user; - $this->title = $title ?: gethostname(); - } - - protected function generateDataStream($record) - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - private function buildContent($record) - { - // Pushover has a limit of 512 characters on title and message combined. - $maxMessageLength = 512 - strlen($this->title); - $message = substr($record['message'], 0, $maxMessageLength); - $timestamp = $record['datetime']->getTimestamp(); - - $dataArray = array( - 'token' => $this->token, - 'user' => $this->user, - 'message' => $message, - 'title' => $this->title, - 'timestamp' => $timestamp - ); - - return http_build_query($dataArray); - } - - private function buildHeader($content) - { - $header = "POST /1/messages.json HTTP/1.1\r\n"; - $header .= "Host: api.pushover.net\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - public function write(array $record) - { - parent::write($record); - $this->closeSocket(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php deleted file mode 100644 index a9ea4fad..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Logger; -use Monolog\Handler\AbstractProcessingHandler; -use Raven_Client; - -/** - * Handler to send messages to a Sentry (https://github.com/dcramer/sentry) server - * using raven-php (https://github.com/getsentry/raven-php) - * - * @author Marc Abramowitz - */ -class RavenHandler extends AbstractProcessingHandler -{ - /** - * Translates Monolog log levels to Raven log levels. - */ - private $logLevels = array( - Logger::DEBUG => Raven_Client::DEBUG, - Logger::INFO => Raven_Client::INFO, - Logger::NOTICE => Raven_Client::INFO, - Logger::WARNING => Raven_Client::WARNING, - Logger::ERROR => Raven_Client::ERROR, - Logger::CRITICAL => Raven_Client::FATAL, - Logger::ALERT => Raven_Client::FATAL, - Logger::EMERGENCY => Raven_Client::FATAL, - ); - - /** - * @var Raven_Client the client object that sends the message to the server - */ - protected $ravenClient; - - /** - * @param Raven_Client $ravenClient - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(Raven_Client $ravenClient, $level = Logger::DEBUG, $bubble = true) - { - parent::__construct($level, $bubble); - - $this->ravenClient = $ravenClient; - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $level = $this->logLevels[$record['level']]; - - $options = array(); - $options['level'] = $level; - if (!empty($record['context'])) { - $options['extra']['context'] = $record['context']; - } - if (!empty($record['extra'])) { - $options['extra']['extra'] = $record['extra']; - } - - $this->ravenClient->captureMessage( - $record['formatted'], - array(), // $params - not used - version_compare(Raven_Client::VERSION, '0.1.0', '>') ? $options : $level, // $level or $options - false // $stack - ); - if ($record['level'] >= Logger::ERROR && isset($record['context']['exception'])) { - $this->ravenClient->captureException($record['context']['exception']); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new LineFormatter('[%channel%] %message%'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php deleted file mode 100644 index 51a8e7df..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; - -/** - * Logs to a Redis key using rpush - * - * usage example: - * - * $log = new Logger('application'); - * $redis = new RedisHandler(new Predis\Client("tcp://localhost:6379"), "logs", "prod"); - * $log->pushHandler($redis); - * - * @author Thomas Tourlourat - */ -class RedisHandler extends AbstractProcessingHandler -{ - private $redisClient; - private $redisKey; - - # redis instance, key to use - public function __construct($redis, $key, $level = Logger::DEBUG, $bubble = true) - { - if (!(($redis instanceof \Predis\Client) || ($redis instanceof \Redis))) { - throw new \InvalidArgumentException('Predis\Client or Redis instance required'); - } - - $this->redisClient = $redis; - $this->redisKey = $key; - - parent::__construct($level, $bubble); - } - - protected function write(array $record) - { - $this->redisClient->rpush($this->redisKey, $record["formatted"]); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter() - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php deleted file mode 100644 index cfb0d5aa..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Stores logs to files that are rotated every day and a limited number of files are kept. - * - * This rotation is only intended to be used as a workaround. Using logrotate to - * handle the rotation is strongly encouraged when you can use it. - * - * @author Christophe Coevoet - * @author Jordi Boggiano - */ -class RotatingFileHandler extends StreamHandler -{ - protected $filename; - protected $maxFiles; - protected $mustRotate; - protected $nextRotation; - - /** - * @param string $filename - * @param integer $maxFiles The maximal amount of files to keep (0 means unlimited) - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true) - { - $this->filename = $filename; - $this->maxFiles = (int) $maxFiles; - $this->nextRotation = new \DateTime('tomorrow'); - - parent::__construct($this->getTimedFilename(), $level, $bubble); - } - - /** - * {@inheritdoc} - */ - public function close() - { - parent::close(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - // on the first record written, if the log is new, we should rotate (once per day) - if (null === $this->mustRotate) { - $this->mustRotate = !file_exists($this->url); - } - - if ($this->nextRotation < $record['datetime']) { - $this->mustRotate = true; - $this->close(); - } - - parent::write($record); - } - - /** - * Rotates the files. - */ - protected function rotate() - { - // update filename - $this->url = $this->getTimedFilename(); - $this->nextRotation = new \DateTime('tomorrow'); - - // skip GC of old logs if files are unlimited - if (0 === $this->maxFiles) { - return; - } - - $fileInfo = pathinfo($this->filename); - $glob = $fileInfo['dirname'].'/'.$fileInfo['filename'].'-*'; - if (!empty($fileInfo['extension'])) { - $glob .= '.'.$fileInfo['extension']; - } - $iterator = new \GlobIterator($glob); - $count = $iterator->count(); - if ($this->maxFiles >= $count) { - // no files to remove - return; - } - - // Sorting the files by name to remove the older ones - $array = iterator_to_array($iterator); - usort($array, function($a, $b) { - return strcmp($b->getFilename(), $a->getFilename()); - }); - - foreach (array_slice($array, $this->maxFiles) as $file) { - if ($file->isWritable()) { - unlink($file->getRealPath()); - } - } - } - - protected function getTimedFilename() - { - $fileInfo = pathinfo($this->filename); - $timedFilename = $fileInfo['dirname'].'/'.$fileInfo['filename'].'-'.date('Y-m-d'); - if (!empty($fileInfo['extension'])) { - $timedFilename .= '.'.$fileInfo['extension']; - } - - return $timedFilename; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php deleted file mode 100644 index 4faa327d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php +++ /dev/null @@ -1,285 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Stores to any socket - uses fsockopen() or pfsockopen(). - * - * @author Pablo de Leon Belloc - * @see http://php.net/manual/en/function.fsockopen.php - */ -class SocketHandler extends AbstractProcessingHandler -{ - private $connectionString; - private $connectionTimeout; - private $resource; - private $timeout = 0; - private $persistent = false; - private $errno; - private $errstr; - - /** - * @param string $connectionString Socket connection string - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($connectionString, $level = Logger::DEBUG, $bubble = true) - { - parent::__construct($level, $bubble); - $this->connectionString = $connectionString; - $this->connectionTimeout = (float) ini_get('default_socket_timeout'); - } - - /** - * Connect (if necessary) and write to the socket - * - * @param array $record - * - * @throws \UnexpectedValueException - * @throws \RuntimeException - */ - public function write(array $record) - { - $this->connectIfNotConnected(); - $data = $this->generateDataStream($record); - $this->writeToSocket($data); - } - - /** - * We will not close a PersistentSocket instance so it can be reused in other requests. - */ - public function close() - { - if (!$this->isPersistent()) { - $this->closeSocket(); - } - } - - /** - * Close socket, if open - */ - public function closeSocket() - { - if (is_resource($this->resource)) { - fclose($this->resource); - $this->resource = null; - } - } - - /** - * Set socket connection to nbe persistent. It only has effect before the connection is initiated. - * - * @param type $boolean - */ - public function setPersistent($boolean) - { - $this->persistent = (boolean) $boolean; - } - - /** - * Set connection timeout. Only has effect before we connect. - * - * @param float $seconds - * - * @see http://php.net/manual/en/function.fsockopen.php - */ - public function setConnectionTimeout($seconds) - { - $this->validateTimeout($seconds); - $this->connectionTimeout = (float) $seconds; - } - - /** - * Set write timeout. Only has effect before we connect. - * - * @param float $seconds - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - */ - public function setTimeout($seconds) - { - $this->validateTimeout($seconds); - $this->timeout = (float) $seconds; - } - - /** - * Get current connection string - * - * @return string - */ - public function getConnectionString() - { - return $this->connectionString; - } - - /** - * Get persistent setting - * - * @return boolean - */ - public function isPersistent() - { - return $this->persistent; - } - - /** - * Get current connection timeout setting - * - * @return float - */ - public function getConnectionTimeout() - { - return $this->connectionTimeout; - } - - /** - * Get current in-transfer timeout - * - * @return float - */ - public function getTimeout() - { - return $this->timeout; - } - - /** - * Check to see if the socket is currently available. - * - * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. - * - * @return boolean - */ - public function isConnected() - { - return is_resource($this->resource) - && !feof($this->resource); // on TCP - other party can close connection. - } - - /** - * Wrapper to allow mocking - */ - protected function pfsockopen() - { - return @pfsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - */ - protected function fsockopen() - { - return @fsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - */ - protected function streamSetTimeout() - { - $seconds = floor($this->timeout); - $microseconds = round(($this->timeout - $seconds)*1e6); - - return stream_set_timeout($this->resource, $seconds, $microseconds); - } - - /** - * Wrapper to allow mocking - */ - protected function fwrite($data) - { - return @fwrite($this->resource, $data); - } - - /** - * Wrapper to allow mocking - */ - protected function streamGetMetadata() - { - return stream_get_meta_data($this->resource); - } - - private function validateTimeout($value) - { - $ok = filter_var($value, FILTER_VALIDATE_FLOAT); - if ($ok === false || $value < 0) { - throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got $value)"); - } - } - - private function connectIfNotConnected() - { - if ($this->isConnected()) { - return; - } - $this->connect(); - } - - protected function generateDataStream($record) - { - return (string) $record['formatted']; - } - - private function connect() - { - $this->createSocketResource(); - $this->setSocketTimeout(); - } - - private function createSocketResource() - { - if ($this->isPersistent()) { - $resource = $this->pfsockopen(); - } else { - $resource = $this->fsockopen(); - } - if (!$resource) { - throw new \UnexpectedValueException("Failed connecting to $this->connectionString ($this->errno: $this->errstr)"); - } - $this->resource = $resource; - } - - private function setSocketTimeout() - { - if (!$this->streamSetTimeout()) { - throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); - } - } - - private function writeToSocket($data) - { - $length = strlen($data); - $sent = 0; - while ($this->isConnected() && $sent < $length) { - if (0 == $sent) { - $chunk = $this->fwrite($data); - } else { - $chunk = $this->fwrite(substr($data, $sent)); - } - if ($chunk === false) { - throw new \RuntimeException("Could not write to socket"); - } - $sent += $chunk; - $socketInfo = $this->streamGetMetadata(); - if ($socketInfo['timed_out']) { - throw new \RuntimeException("Write timed-out"); - } - } - if (!$this->isConnected() && $sent < $length) { - throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); - } - } - -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php deleted file mode 100644 index 96ce7fc0..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Stores to any stream resource - * - * Can be used to store into php://stderr, remote and local files, etc. - * - * @author Jordi Boggiano - */ -class StreamHandler extends AbstractProcessingHandler -{ - protected $stream; - protected $url; - - /** - * @param string $stream - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct($stream, $level = Logger::DEBUG, $bubble = true) - { - parent::__construct($level, $bubble); - if (is_resource($stream)) { - $this->stream = $stream; - } else { - $this->url = $stream; - } - } - - /** - * {@inheritdoc} - */ - public function close() - { - if (is_resource($this->stream)) { - fclose($this->stream); - } - $this->stream = null; - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - if (null === $this->stream) { - if (!$this->url) { - throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().'); - } - $errorMessage = null; - set_error_handler(function ($code, $msg) use (&$errorMessage) { - $errorMessage = preg_replace('{^fopen\(.*?\): }', '', $msg); - }); - $this->stream = fopen($this->url, 'a'); - restore_error_handler(); - if (!is_resource($this->stream)) { - $this->stream = null; - throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$errorMessage, $this->url)); - } - } - fwrite($this->stream, (string) $record['formatted']); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php deleted file mode 100644 index ca03ccaa..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * SwiftMailerHandler uses Swift_Mailer to send the emails - * - * @author Gyula Sallai - */ -class SwiftMailerHandler extends MailHandler -{ - protected $mailer; - protected $message; - - /** - * @param \Swift_Mailer $mailer The mailer to use - * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true) - { - parent::__construct($level, $bubble); - $this->mailer = $mailer; - if (!$message instanceof \Swift_Message && is_callable($message)) { - $message = call_user_func($message); - } - if (!$message instanceof \Swift_Message) { - throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); - } - $this->message = $message; - } - - /** - * {@inheritdoc} - */ - protected function send($content, array $records) - { - $message = clone $this->message; - $message->setBody($content); - - $this->mailer->send($message); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php deleted file mode 100644 index c4856cf7..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; - -/** - * Logs to syslog service. - * - * usage example: - * - * $log = new Logger('application'); - * $syslog = new SyslogHandler('myfacility', 'local6'); - * $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%"); - * $syslog->setFormatter($formatter); - * $log->pushHandler($syslog); - * - * @author Sven Paulus - */ -class SyslogHandler extends AbstractProcessingHandler -{ - /** - * Translates Monolog log levels to syslog log priorities. - */ - private $logLevels = array( - Logger::DEBUG => LOG_DEBUG, - Logger::INFO => LOG_INFO, - Logger::NOTICE => LOG_NOTICE, - Logger::WARNING => LOG_WARNING, - Logger::ERROR => LOG_ERR, - Logger::CRITICAL => LOG_CRIT, - Logger::ALERT => LOG_ALERT, - Logger::EMERGENCY => LOG_EMERG, - ); - - /** - * List of valid log facility names. - */ - private $facilities = array( - 'auth' => LOG_AUTH, - 'authpriv' => LOG_AUTHPRIV, - 'cron' => LOG_CRON, - 'daemon' => LOG_DAEMON, - 'kern' => LOG_KERN, - 'lpr' => LOG_LPR, - 'mail' => LOG_MAIL, - 'news' => LOG_NEWS, - 'syslog' => LOG_SYSLOG, - 'user' => LOG_USER, - 'uucp' => LOG_UUCP, - ); - - /** - * @param string $ident - * @param mixed $facility - * @param integer $level The minimum logging level at which this handler will be triggered - * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not - * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID - */ - public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID) - { - parent::__construct($level, $bubble); - - if (!defined('PHP_WINDOWS_VERSION_BUILD')) { - $this->facilities['local0'] = LOG_LOCAL0; - $this->facilities['local1'] = LOG_LOCAL1; - $this->facilities['local2'] = LOG_LOCAL2; - $this->facilities['local3'] = LOG_LOCAL3; - $this->facilities['local4'] = LOG_LOCAL4; - $this->facilities['local5'] = LOG_LOCAL5; - $this->facilities['local6'] = LOG_LOCAL6; - $this->facilities['local7'] = LOG_LOCAL7; - } - - // convert textual description of facility to syslog constant - if (array_key_exists(strtolower($facility), $this->facilities)) { - $facility = $this->facilities[strtolower($facility)]; - } elseif (!in_array($facility, array_values($this->facilities), true)) { - throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given'); - } - - if (!openlog($ident, $logopts, $facility)) { - throw new \LogicException('Can\'t open syslog for ident "'.$ident.'" and facility "'.$facility.'"'); - } - } - - /** - * {@inheritdoc} - */ - public function close() - { - closelog(); - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - syslog($this->logLevels[$record['level']], (string) $record['formatted']); - } - - /** - * {@inheritdoc} - */ - protected function getDefaultFormatter() - { - return new LineFormatter('%channel%.%level_name%: %message% %context% %extra%'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php deleted file mode 100644 index 085d9e17..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Used for testing purposes. - * - * It records all records and gives you access to them for verification. - * - * @author Jordi Boggiano - */ -class TestHandler extends AbstractProcessingHandler -{ - protected $records = array(); - protected $recordsByLevel = array(); - - public function getRecords() - { - return $this->records; - } - - public function hasEmergency($record) - { - return $this->hasRecord($record, Logger::EMERGENCY); - } - - public function hasAlert($record) - { - return $this->hasRecord($record, Logger::ALERT); - } - - public function hasCritical($record) - { - return $this->hasRecord($record, Logger::CRITICAL); - } - - public function hasError($record) - { - return $this->hasRecord($record, Logger::ERROR); - } - - public function hasWarning($record) - { - return $this->hasRecord($record, Logger::WARNING); - } - - public function hasNotice($record) - { - return $this->hasRecord($record, Logger::NOTICE); - } - - public function hasInfo($record) - { - return $this->hasRecord($record, Logger::INFO); - } - - public function hasDebug($record) - { - return $this->hasRecord($record, Logger::DEBUG); - } - - public function hasEmergencyRecords() - { - return isset($this->recordsByLevel[Logger::EMERGENCY]); - } - - public function hasAlertRecords() - { - return isset($this->recordsByLevel[Logger::ALERT]); - } - - public function hasCriticalRecords() - { - return isset($this->recordsByLevel[Logger::CRITICAL]); - } - - public function hasErrorRecords() - { - return isset($this->recordsByLevel[Logger::ERROR]); - } - - public function hasWarningRecords() - { - return isset($this->recordsByLevel[Logger::WARNING]); - } - - public function hasNoticeRecords() - { - return isset($this->recordsByLevel[Logger::NOTICE]); - } - - public function hasInfoRecords() - { - return isset($this->recordsByLevel[Logger::INFO]); - } - - public function hasDebugRecords() - { - return isset($this->recordsByLevel[Logger::DEBUG]); - } - - protected function hasRecord($record, $level) - { - if (!isset($this->recordsByLevel[$level])) { - return false; - } - - if (is_array($record)) { - $record = $record['message']; - } - - foreach ($this->recordsByLevel[$level] as $rec) { - if ($rec['message'] === $record) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $this->recordsByLevel[$record['level']][] = $record; - $this->records[] = $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php deleted file mode 100644 index f22cf218..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Logger; - -/** - * Handler sending logs to Zend Monitor - * - * @author Christian Bergau - */ -class ZendMonitorHandler extends AbstractProcessingHandler -{ - /** - * Monolog level / ZendMonitor Custom Event priority map - * - * @var array - */ - protected $levelMap = array( - Logger::DEBUG => 1, - Logger::INFO => 2, - Logger::NOTICE => 3, - Logger::WARNING => 4, - Logger::ERROR => 5, - Logger::CRITICAL => 6, - Logger::ALERT => 7, - Logger::EMERGENCY => 0, - ); - - /** - * Construct - * - * @param int $level - * @param bool $bubble - * @throws MissingExtensionException - */ - public function __construct($level = Logger::DEBUG, $bubble = true) - { - if (!function_exists('zend_monitor_custom_event')) { - throw new MissingExtensionException('You must have Zend Server installed in order to use this handler'); - } - parent::__construct($level, $bubble); - } - - /** - * {@inheritdoc} - */ - protected function write(array $record) - { - $this->writeZendMonitorCustomEvent( - $this->levelMap[$record['level']], - $record['message'], - $record['formatted'] - ); - } - - /** - * Write a record to Zend Monitor - * - * @param int $level - * @param string $message - * @param array $formatted - */ - protected function writeZendMonitorCustomEvent($level, $message, $formatted) - { - zend_monitor_custom_event($level, $message, $formatted); - } - - /** - * {@inheritdoc} - */ - public function getDefaultFormatter() - { - return new NormalizerFormatter(); - } - - /** - * Get the level map - * - * @return array - */ - public function getLevelMap() - { - return $this->levelMap; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php deleted file mode 100644 index 0d58e78f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Logger.php +++ /dev/null @@ -1,564 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Monolog\Handler\HandlerInterface; -use Monolog\Handler\StreamHandler; -use Psr\Log\LoggerInterface; -use Psr\Log\InvalidArgumentException; - -/** - * Monolog log channel - * - * It contains a stack of Handlers and a stack of Processors, - * and uses them to store records that are added to it. - * - * @author Jordi Boggiano - */ -class Logger implements LoggerInterface -{ - /** - * Detailed debug information - */ - const DEBUG = 100; - - /** - * Interesting events - * - * Examples: User logs in, SQL logs. - */ - const INFO = 200; - - /** - * Uncommon events - */ - const NOTICE = 250; - - /** - * Exceptional occurrences that are not errors - * - * Examples: Use of deprecated APIs, poor use of an API, - * undesirable things that are not necessarily wrong. - */ - const WARNING = 300; - - /** - * Runtime errors - */ - const ERROR = 400; - - /** - * Critical conditions - * - * Example: Application component unavailable, unexpected exception. - */ - const CRITICAL = 500; - - /** - * Action must be taken immediately - * - * Example: Entire website down, database unavailable, etc. - * This should trigger the SMS alerts and wake you up. - */ - const ALERT = 550; - - /** - * Urgent alert. - */ - const EMERGENCY = 600; - - protected static $levels = array( - 100 => 'DEBUG', - 200 => 'INFO', - 250 => 'NOTICE', - 300 => 'WARNING', - 400 => 'ERROR', - 500 => 'CRITICAL', - 550 => 'ALERT', - 600 => 'EMERGENCY', - ); - - /** - * @var DateTimeZone - */ - protected static $timezone; - - protected $name; - - /** - * The handler stack - * - * @var array of Monolog\Handler\HandlerInterface - */ - protected $handlers; - - /** - * Processors that will process all log records - * - * To process records of a single handler instead, add the processor on that specific handler - * - * @var array of callables - */ - protected $processors; - - /** - * @param string $name The logging channel - * @param array $handlers Optional stack of handlers, the first one in the array is called first, etc. - * @param array $processors Optional array of processors - */ - public function __construct($name, array $handlers = array(), array $processors = array()) - { - $this->name = $name; - $this->handlers = $handlers; - $this->processors = $processors; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Pushes a handler on to the stack. - * - * @param HandlerInterface $handler - */ - public function pushHandler(HandlerInterface $handler) - { - array_unshift($this->handlers, $handler); - } - - /** - * Pops a handler from the stack - * - * @return HandlerInterface - */ - public function popHandler() - { - if (!$this->handlers) { - throw new \LogicException('You tried to pop from an empty handler stack.'); - } - - return array_shift($this->handlers); - } - - /** - * Adds a processor on to the stack. - * - * @param callable $callback - */ - public function pushProcessor($callback) - { - if (!is_callable($callback)) { - throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); - } - array_unshift($this->processors, $callback); - } - - /** - * Removes the processor on top of the stack and returns it. - * - * @return callable - */ - public function popProcessor() - { - if (!$this->processors) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * Adds a log record. - * - * @param integer $level The logging level - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function addRecord($level, $message, array $context = array()) - { - if (!$this->handlers) { - $this->pushHandler(new StreamHandler('php://stderr', static::DEBUG)); - } - - if (!static::$timezone) { - static::$timezone = new \DateTimeZone(date_default_timezone_get() ?: 'UTC'); - } - - $record = array( - 'message' => (string) $message, - 'context' => $context, - 'level' => $level, - 'level_name' => static::getLevelName($level), - 'channel' => $this->name, - 'datetime' => \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone)->setTimezone(static::$timezone), - 'extra' => array(), - ); - // check if any handler will handle this message - $handlerKey = null; - foreach ($this->handlers as $key => $handler) { - if ($handler->isHandling($record)) { - $handlerKey = $key; - break; - } - } - // none found - if (null === $handlerKey) { - return false; - } - - // found at least one, process message and dispatch it - foreach ($this->processors as $processor) { - $record = call_user_func($processor, $record); - } - while (isset($this->handlers[$handlerKey]) && - false === $this->handlers[$handlerKey]->handle($record)) { - $handlerKey++; - } - - return true; - } - - /** - * Adds a log record at the DEBUG level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function addDebug($message, array $context = array()) - { - return $this->addRecord(static::DEBUG, $message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function addInfo($message, array $context = array()) - { - return $this->addRecord(static::INFO, $message, $context); - } - - /** - * Adds a log record at the NOTICE level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function addNotice($message, array $context = array()) - { - return $this->addRecord(static::NOTICE, $message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function addWarning($message, array $context = array()) - { - return $this->addRecord(static::WARNING, $message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function addError($message, array $context = array()) - { - return $this->addRecord(static::ERROR, $message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function addCritical($message, array $context = array()) - { - return $this->addRecord(static::CRITICAL, $message, $context); - } - - /** - * Adds a log record at the ALERT level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function addAlert($message, array $context = array()) - { - return $this->addRecord(static::ALERT, $message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function addEmergency($message, array $context = array()) - { - return $this->addRecord(static::EMERGENCY, $message, $context); - } - - /** - * Gets all supported logging levels. - * - * @return array Assoc array with human-readable level names => level codes. - */ - public static function getLevels() - { - return array_flip(static::$levels); - } - - /** - * Gets the name of the logging level. - * - * @param integer $level - * @return string - */ - public static function getLevelName($level) - { - if (!isset(static::$levels[$level])) { - throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', array_keys(static::$levels))); - } - - return static::$levels[$level]; - } - - /** - * Checks whether the Logger has a handler that listens on the given level - * - * @param integer $level - * @return Boolean - */ - public function isHandling($level) - { - $record = array( - 'level' => $level, - ); - - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * Adds a log record at an arbitrary level. - * - * This method allows for compatibility with common interfaces. - * - * @param mixed $level The log level - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function log($level, $message, array $context = array()) - { - if (is_string($level) && defined(__CLASS__.'::'.strtoupper($level))) { - $level = constant(__CLASS__.'::'.strtoupper($level)); - } - - return $this->addRecord($level, $message, $context); - } - - /** - * Adds a log record at the DEBUG level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function debug($message, array $context = array()) - { - return $this->addRecord(static::DEBUG, $message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function info($message, array $context = array()) - { - return $this->addRecord(static::INFO, $message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function notice($message, array $context = array()) - { - return $this->addRecord(static::NOTICE, $message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function warn($message, array $context = array()) - { - return $this->addRecord(static::WARNING, $message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function warning($message, array $context = array()) - { - return $this->addRecord(static::WARNING, $message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function err($message, array $context = array()) - { - return $this->addRecord(static::ERROR, $message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function error($message, array $context = array()) - { - return $this->addRecord(static::ERROR, $message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function crit($message, array $context = array()) - { - return $this->addRecord(static::CRITICAL, $message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function critical($message, array $context = array()) - { - return $this->addRecord(static::CRITICAL, $message, $context); - } - - /** - * Adds a log record at the ALERT level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function alert($message, array $context = array()) - { - return $this->addRecord(static::ALERT, $message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function emerg($message, array $context = array()) - { - return $this->addRecord(static::EMERGENCY, $message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * This method allows for compatibility with common interfaces. - * - * @param string $message The log message - * @param array $context The log context - * @return Boolean Whether the record has been processed - */ - public function emergency($message, array $context = array()) - { - return $this->addRecord(static::EMERGENCY, $message, $context); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php deleted file mode 100644 index b126218e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects line/file:class/function where the log message came from - * - * Warning: This only works if the handler processes the logs directly. - * If you put the processor on a handler that is behind a FingersCrossedHandler - * for example, the processor will only be called once the trigger level is reached, - * and all the log records will have the same file/line/.. data from the call that - * triggered the FingersCrossedHandler. - * - * @author Jordi Boggiano - */ -class IntrospectionProcessor -{ - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - $trace = debug_backtrace(); - - // skip first since it's always the current method - array_shift($trace); - // the call_user_func call is also skipped - array_shift($trace); - - $i = 0; - while (isset($trace[$i]['class']) && false !== strpos($trace[$i]['class'], 'Monolog\\')) { - $i++; - } - - // we should have the call source now - $record['extra'] = array_merge( - $record['extra'], - array( - 'file' => isset($trace[$i-1]['file']) ? $trace[$i-1]['file'] : null, - 'line' => isset($trace[$i-1]['line']) ? $trace[$i-1]['line'] : null, - 'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null, - 'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null, - ) - ); - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php deleted file mode 100644 index e48672bf..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects memory_get_peak_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryPeakUsageProcessor extends MemoryProcessor -{ - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - $bytes = memory_get_peak_usage($this->realUsage); - $formatted = self::formatBytes($bytes); - - $record['extra'] = array_merge( - $record['extra'], - array( - 'memory_peak_usage' => $formatted, - ) - ); - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php deleted file mode 100644 index 7551043e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Some methods that are common for all memory processors - * - * @author Rob Jensen - */ -abstract class MemoryProcessor -{ - protected $realUsage; - - /** - * @param boolean $realUsage - */ - public function __construct($realUsage = true) - { - $this->realUsage = (boolean) $realUsage; - } - - /** - * Formats bytes into a human readable string - * - * @param int $bytes - * @return string - */ - protected static function formatBytes($bytes) - { - $bytes = (int) $bytes; - - if ($bytes > 1024*1024) { - return round($bytes/1024/1024, 2).' MB'; - } elseif ($bytes > 1024) { - return round($bytes/1024, 2).' KB'; - } - - return $bytes . ' B'; - } - -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php deleted file mode 100644 index 2c4a8079..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects memory_get_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryUsageProcessor extends MemoryProcessor -{ - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - $bytes = memory_get_usage($this->realUsage); - $formatted = self::formatBytes($bytes); - - $record['extra'] = array_merge( - $record['extra'], - array( - 'memory_usage' => $formatted, - ) - ); - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php deleted file mode 100644 index 9bd5e5ea..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Adds value of getmypid into records - * - * @author Andreas Hörnicke - */ -class ProcessIdProcessor -{ - private static $pid; - - public function __construct() - { - if (null === self::$pid) { - self::$pid = getmypid(); - } - } - - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - $record['extra']['process_id'] = self::$pid; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php deleted file mode 100644 index b63fcccc..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Processes a record's message according to PSR-3 rules - * - * It replaces {foo} with the value from $context['foo'] - * - * @author Jordi Boggiano - */ -class PsrLogMessageProcessor -{ - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - if (false === strpos($record['message'], '{')) { - return $record; - } - - $replacements = array(); - foreach ($record['context'] as $key => $val) { - $replacements['{'.$key.'}'] = $val; - } - - $record['message'] = strtr($record['message'], $replacements); - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php deleted file mode 100644 index 80270d08..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Adds a unique identifier into records - * - * @author Simon Mönch - */ -class UidProcessor -{ - private $uid; - - public function __construct($length = 7) - { - if (!is_int($length) || $length > 32 || $length < 1) { - throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); - } - - $this->uid = substr(hash('md5', uniqid('', true)), 0, $length); - } - - public function __invoke(array $record) - { - $record['extra']['uid'] = $this->uid; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php deleted file mode 100644 index 9916cc08..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects url/method and remote IP of the current web request in all records - * - * @author Jordi Boggiano - */ -class WebProcessor -{ - protected $serverData; - - /** - * @param mixed $serverData array or object w/ ArrayAccess that provides access to the $_SERVER data - */ - public function __construct($serverData = null) - { - if (null === $serverData) { - $this->serverData =& $_SERVER; - } elseif (is_array($serverData) || $serverData instanceof \ArrayAccess) { - $this->serverData = $serverData; - } else { - throw new \UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.'); - } - } - - /** - * @param array $record - * @return array - */ - public function __invoke(array $record) - { - // skip processing if for some reason request data - // is not present (CLI or wonky SAPIs) - if (!isset($this->serverData['REQUEST_URI'])) { - return $record; - } - - $record['extra'] = array_merge( - $record['extra'], - array( - 'url' => $this->serverData['REQUEST_URI'], - 'ip' => isset($this->serverData['REMOTE_ADDR']) ? $this->serverData['REMOTE_ADDR'] : null, - 'http_method' => isset($this->serverData['REQUEST_METHOD']) ? $this->serverData['REQUEST_METHOD'] : null, - 'server' => isset($this->serverData['SERVER_NAME']) ? $this->serverData['SERVER_NAME'] : null, - 'referrer' => isset($this->serverData['HTTP_REFERER']) ? $this->serverData['HTTP_REFERER'] : null, - ) - ); - - return $record; - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php deleted file mode 100644 index e7f7334e..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php +++ /dev/null @@ -1,158 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -class ChromePHPFormatterTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers Monolog\Formatter\ChromePHPFormatter::format - */ - public function testDefaultFormat() - { - $formatter = new ChromePHPFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('ip' => '127.0.0.1'), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertEquals( - array( - 'meh', - array( - 'message' => 'log', - 'context' => array('from' => 'logger'), - 'extra' => array('ip' => '127.0.0.1'), - ), - 'unknown', - 'error' - ), - $message - ); - } - - /** - * @covers Monolog\Formatter\ChromePHPFormatter::format - */ - public function testFormatWithFileAndLine() - { - $formatter = new ChromePHPFormatter(); - $record = array( - 'level' => Logger::CRITICAL, - 'level_name' => 'CRITICAL', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('ip' => '127.0.0.1', 'file' => 'test', 'line' => 14), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertEquals( - array( - 'meh', - array( - 'message' => 'log', - 'context' => array('from' => 'logger'), - 'extra' => array('ip' => '127.0.0.1'), - ), - 'test : 14', - 'error' - ), - $message - ); - } - - /** - * @covers Monolog\Formatter\ChromePHPFormatter::format - */ - public function testFormatWithoutContext() - { - $formatter = new ChromePHPFormatter(); - $record = array( - 'level' => Logger::DEBUG, - 'level_name' => 'DEBUG', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertEquals( - array( - 'meh', - 'log', - 'unknown', - 'log' - ), - $message - ); - } - - /** - * @covers Monolog\Formatter\ChromePHPFormatter::formatBatch - */ - public function testBatchFormatThrowException() - { - $formatter = new ChromePHPFormatter(); - $records = array( - array( - 'level' => Logger::INFO, - 'level_name' => 'INFO', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ), - array( - 'level' => Logger::WARNING, - 'level_name' => 'WARNING', - 'channel' => 'foo', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log2', - ), - ); - - $this->assertEquals( - array( - array( - 'meh', - 'log', - 'unknown', - 'info' - ), - array( - 'foo', - 'log2', - 'unknown', - 'warn' - ), - ), - $formatter->formatBatch($records) - ); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php deleted file mode 100644 index a1db166a..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php +++ /dev/null @@ -1,158 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Monolog\Formatter\GelfMessageFormatter; - -class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase -{ - public function setUp() - { - if (!class_exists("Gelf\Message")) { - $this->markTestSkipped("mlehner/gelf-php not installed"); - } - } - - /** - * @covers Monolog\Formatter\GelfMessageFormatter::format - */ - public function testDefaultFormatter() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - $this->assertEquals(0, $message->getTimestamp()); - $this->assertEquals('log', $message->getShortMessage()); - $this->assertEquals('meh', $message->getFacility()); - $this->assertEquals(null, $message->getLine()); - $this->assertEquals(null, $message->getFile()); - $this->assertEquals(3, $message->getLevel()); - $this->assertNotEmpty($message->getHost()); - - $formatter = new GelfMessageFormatter('mysystem'); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - $this->assertEquals('mysystem', $message->getHost()); - } - - /** - * @covers Monolog\Formatter\GelfMessageFormatter::format - */ - public function testFormatWithFileAndLine() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('file' => 'test', 'line' => 14), - 'message' => 'log', - ); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - $this->assertEquals('test', $message->getFile()); - $this->assertEquals(14, $message->getLine()); - } - - /** - * @covers Monolog\Formatter\GelfMessageFormatter::format - */ - public function testFormatWithContext() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log' - ); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - - $message_array = $message->toArray(); - - $this->assertArrayHasKey('_ctxt_from', $message_array); - $this->assertEquals('logger', $message_array['_ctxt_from']); - - // Test with extraPrefix - $formatter = new GelfMessageFormatter(null, null, 'CTX'); - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - - $message_array = $message->toArray(); - - $this->assertArrayHasKey('_CTXfrom', $message_array); - $this->assertEquals('logger', $message_array['_CTXfrom']); - - } - - /** - * @covers Monolog\Formatter\GelfMessageFormatter::format - */ - public function testFormatWithExtra() - { - $formatter = new GelfMessageFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log' - ); - - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - - $message_array = $message->toArray(); - - $this->assertArrayHasKey('_key', $message_array); - $this->assertEquals('pair', $message_array['_key']); - - // Test with extraPrefix - $formatter = new GelfMessageFormatter(null, 'EXT'); - $message = $formatter->format($record); - - $this->assertInstanceOf('Gelf\Message', $message); - - $message_array = $message->toArray(); - - $this->assertArrayHasKey('_EXTkey', $message_array); - $this->assertEquals('pair', $message_array['_EXTkey']); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php deleted file mode 100644 index ba6152c9..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Monolog\TestCase; - -class JsonFormatterTest extends TestCase -{ - /** - * @covers Monolog\Formatter\JsonFormatter::format - */ - public function testFormat() - { - $formatter = new JsonFormatter(); - $record = $this->getRecord(); - $this->assertEquals(json_encode($record), $formatter->format($record)); - } - - /** - * @covers Monolog\Formatter\JsonFormatter::formatBatch - */ - public function testFormatBatch() - { - $formatter = new JsonFormatter(); - $records = array( - $this->getRecord(Logger::WARNING), - $this->getRecord(Logger::DEBUG), - ); - $this->assertEquals(json_encode($records), $formatter->formatBatch($records)); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php deleted file mode 100644 index fa3fa59d..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * @covers Monolog\Formatter\LineFormatter - */ -class LineFormatterTest extends \PHPUnit_Framework_TestCase -{ - public function testDefFormatWithString() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'WARNING', - 'channel' => 'log', - 'context' => array(), - 'message' => 'foo', - 'datetime' => new \DateTime, - 'extra' => array(), - )); - $this->assertEquals('['.date('Y-m-d').'] log.WARNING: foo [] []'."\n", $message); - } - - public function testDefFormatWithArrayContext() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'message' => 'foo', - 'datetime' => new \DateTime, - 'extra' => array(), - 'context' => array( - 'foo' => 'bar', - 'baz' => 'qux', - ) - )); - $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: foo {"foo":"bar","baz":"qux"} []'."\n", $message); - } - - public function testDefFormatExtras() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array('ip' => '127.0.0.1'), - 'message' => 'log', - )); - $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: log [] {"ip":"127.0.0.1"}'."\n", $message); - } - - public function testFormatExtras() - { - $formatter = new LineFormatter("[%datetime%] %channel%.%level_name%: %message% %context% %extra.file% %extra%\n", 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array('ip' => '127.0.0.1', 'file' => 'test'), - 'message' => 'log', - )); - $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: log [] test {"ip":"127.0.0.1"}'."\n", $message); - } - - public function testDefFormatWithObject() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array('foo' => new TestFoo, 'bar' => new TestBar, 'baz' => array(), 'res' => fopen('php://memory', 'rb')), - 'message' => 'foobar', - )); - - $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: foobar [] {"foo":"[object] (Monolog\\\\Formatter\\\\TestFoo: {\\"foo\\":\\"foo\\"})","bar":"[object] (Monolog\\\\Formatter\\\\TestBar: {})","baz":[],"res":"[resource]"}'."\n", $message); - } - - public function testDefFormatWithException() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->format(array( - 'level_name' => 'CRITICAL', - 'channel' => 'core', - 'context' => array('exception' => new \RuntimeException('Foo')), - 'datetime' => new \DateTime, - 'extra' => array(), - 'message' => 'foobar', - )); - - $path = str_replace('\\/', '/', json_encode(__FILE__)); - - $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException: Foo at '.substr($path, 1, -1).':'.(__LINE__-8).')"} []'."\n", $message); - } - - public function testDefFormatWithPreviousException() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $previous = new \LogicException('Wut?'); - $message = $formatter->format(array( - 'level_name' => 'CRITICAL', - 'channel' => 'core', - 'context' => array('exception' => new \RuntimeException('Foo', 0, $previous)), - 'datetime' => new \DateTime, - 'extra' => array(), - 'message' => 'foobar', - )); - - $path = str_replace('\\/', '/', json_encode(__FILE__)); - - $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException: Foo at '.substr($path, 1, -1).':'.(__LINE__-8).', LogicException: Wut? at '.substr($path, 1, -1).':'.(__LINE__-12).')"} []'."\n", $message); - } - - public function testBatchFormat() - { - $formatter = new LineFormatter(null, 'Y-m-d'); - $message = $formatter->formatBatch(array( - array( - 'level_name' => 'CRITICAL', - 'channel' => 'test', - 'message' => 'bar', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array(), - ), - array( - 'level_name' => 'WARNING', - 'channel' => 'log', - 'message' => 'foo', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array(), - ), - )); - $this->assertEquals('['.date('Y-m-d').'] test.CRITICAL: bar [] []'."\n".'['.date('Y-m-d').'] log.WARNING: foo [] []'."\n", $message); - } -} - -class TestFoo -{ - public $foo = 'foo'; -} - -class TestBar -{ - public function __toString() - { - return 'bar'; - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php deleted file mode 100644 index 6b012dea..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php +++ /dev/null @@ -1,160 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Monolog\Formatter\LogstashFormatter; - -class LogstashFormatterTest extends \PHPUnit_Framework_TestCase -{ - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testDefaultFormatter() - { - $formatter = new LogstashFormatter('test', 'hostname'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertEquals("1970-01-01T00:00:00+00:00", $message['@timestamp']); - $this->assertEquals('log', $message['@message']); - $this->assertEquals('meh', $message['@fields']['channel']); - $this->assertContains('meh', $message['@tags']); - $this->assertEquals(Logger::ERROR, $message['@fields']['level']); - $this->assertEquals('test', $message['@type']); - $this->assertEquals('hostname', $message['@source']); - - $formatter = new LogstashFormatter('mysystem'); - - $message = json_decode($formatter->format($record), true); - - $this->assertEquals('mysystem', $message['@type']); - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testFormatWithFileAndLine() - { - $formatter = new LogstashFormatter('test'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('file' => 'test', 'line' => 14), - 'message' => 'log', - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertEquals('test', $message['@fields']['file']); - $this->assertEquals(14, $message['@fields']['line']); - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testFormatWithContext() - { - $formatter = new LogstashFormatter('test'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log' - ); - - $message = json_decode($formatter->format($record), true); - - $message_array = $message['@fields']; - - $this->assertArrayHasKey('ctxt_from', $message_array); - $this->assertEquals('logger', $message_array['ctxt_from']); - - // Test with extraPrefix - $formatter = new LogstashFormatter('test', null, null, 'CTX'); - $message = json_decode($formatter->format($record), true); - - $message_array = $message['@fields']; - - $this->assertArrayHasKey('CTXfrom', $message_array); - $this->assertEquals('logger', $message_array['CTXfrom']); - - } - - /** - * @covers Monolog\Formatter\LogstashFormatter::format - */ - public function testFormatWithExtra() - { - $formatter = new LogstashFormatter('test'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log' - ); - - $message = json_decode($formatter->format($record), true); - - $message_array = $message['@fields']; - - $this->assertArrayHasKey('key', $message_array); - $this->assertEquals('pair', $message_array['key']); - - // Test with extraPrefix - $formatter = new LogstashFormatter('test', null, 'EXT'); - $message = json_decode($formatter->format($record), true); - - $message_array = $message['@fields']; - - $this->assertArrayHasKey('EXTkey', $message_array); - $this->assertEquals('pair', $message_array['EXTkey']); - } - - public function testFormatWithApplicationName() - { - $formatter = new LogstashFormatter('app', 'test'); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('key' => 'pair'), - 'message' => 'log' - ); - - $message = json_decode($formatter->format($record), true); - - $this->assertArrayHasKey('@type', $message); - $this->assertEquals('app', $message['@type']); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php deleted file mode 100644 index e09add4a..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php +++ /dev/null @@ -1,160 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * @covers Monolog\Formatter\NormalizerFormatter - */ -class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase -{ - public function testFormat() - { - $formatter = new NormalizerFormatter('Y-m-d'); - $formatted = $formatter->format(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'message' => 'foo', - 'datetime' => new \DateTime, - 'extra' => array('foo' => new TestFooNorm, 'bar' => new TestBarNorm, 'baz' => array(), 'res' => fopen('php://memory', 'rb')), - 'context' => array( - 'foo' => 'bar', - 'baz' => 'qux', - ) - )); - - $this->assertEquals(array( - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'message' => 'foo', - 'datetime' => date('Y-m-d'), - 'extra' => array( - 'foo' => '[object] (Monolog\\Formatter\\TestFooNorm: {"foo":"foo"})', - 'bar' => '[object] (Monolog\\Formatter\\TestBarNorm: {})', - 'baz' => array(), - 'res' => '[resource]', - ), - 'context' => array( - 'foo' => 'bar', - 'baz' => 'qux', - ) - ), $formatted); - } - - public function testBatchFormat() - { - $formatter = new NormalizerFormatter('Y-m-d'); - $formatted = $formatter->formatBatch(array( - array( - 'level_name' => 'CRITICAL', - 'channel' => 'test', - 'message' => 'bar', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array(), - ), - array( - 'level_name' => 'WARNING', - 'channel' => 'log', - 'message' => 'foo', - 'context' => array(), - 'datetime' => new \DateTime, - 'extra' => array(), - ), - )); - $this->assertEquals(array( - array( - 'level_name' => 'CRITICAL', - 'channel' => 'test', - 'message' => 'bar', - 'context' => array(), - 'datetime' => date('Y-m-d'), - 'extra' => array(), - ), - array( - 'level_name' => 'WARNING', - 'channel' => 'log', - 'message' => 'foo', - 'context' => array(), - 'datetime' => date('Y-m-d'), - 'extra' => array(), - ), - ), $formatted); - } - - /** - * Test issue #137 - */ - public function testIgnoresRecursiveObjectReferences() - { - // set up the recursion - $foo = new \stdClass(); - $bar = new \stdClass(); - - $foo->bar = $bar; - $bar->foo = $foo; - - // set an error handler to assert that the error is not raised anymore - $that = $this; - set_error_handler(function ($level, $message, $file, $line, $context) use ($that) { - if (error_reporting() & $level) { - restore_error_handler(); - $that->fail("$message should not be raised"); - } - }); - - $formatter = new NormalizerFormatter(); - $reflMethod = new \ReflectionMethod($formatter, 'toJson'); - $reflMethod->setAccessible(true); - $res = $reflMethod->invoke($formatter, array($foo, $bar), true); - - restore_error_handler(); - - $this->assertEquals(@json_encode(array($foo, $bar)), $res); - } - - public function testIgnoresInvalidTypes() - { - // set up the recursion - $resource = fopen(__FILE__, 'r'); - - // set an error handler to assert that the error is not raised anymore - $that = $this; - set_error_handler(function ($level, $message, $file, $line, $context) use ($that) { - if (error_reporting() & $level) { - restore_error_handler(); - $that->fail("$message should not be raised"); - } - }); - - $formatter = new NormalizerFormatter(); - $reflMethod = new \ReflectionMethod($formatter, 'toJson'); - $reflMethod->setAccessible(true); - $res = $reflMethod->invoke($formatter, array($resource), true); - - restore_error_handler(); - - $this->assertEquals(@json_encode(array($resource)), $res); - } -} - -class TestFooNorm -{ - public $foo = 'foo'; -} - -class TestBarNorm -{ - public function __toString() - { - return 'bar'; - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php deleted file mode 100644 index 0b07e330..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -class WildfireFormatterTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers Monolog\Formatter\WildfireFormatter::format - */ - public function testDefaultFormat() - { - $wildfire = new WildfireFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('ip' => '127.0.0.1'), - 'message' => 'log', - ); - - $message = $wildfire->format($record); - - $this->assertEquals( - '125|[{"Type":"ERROR","File":"","Line":"","Label":"meh"},' - .'{"message":"log","context":{"from":"logger"},"extra":{"ip":"127.0.0.1"}}]|', - $message - ); - } - - /** - * @covers Monolog\Formatter\WildfireFormatter::format - */ - public function testFormatWithFileAndLine() - { - $wildfire = new WildfireFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array('from' => 'logger'), - 'datetime' => new \DateTime("@0"), - 'extra' => array('ip' => '127.0.0.1', 'file' => 'test', 'line' => 14), - 'message' => 'log', - ); - - $message = $wildfire->format($record); - - $this->assertEquals( - '129|[{"Type":"ERROR","File":"test","Line":14,"Label":"meh"},' - .'{"message":"log","context":{"from":"logger"},"extra":{"ip":"127.0.0.1"}}]|', - $message - ); - } - - /** - * @covers Monolog\Formatter\WildfireFormatter::format - */ - public function testFormatWithoutContext() - { - $wildfire = new WildfireFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $message = $wildfire->format($record); - - $this->assertEquals( - '58|[{"Type":"ERROR","File":"","Line":"","Label":"meh"},"log"]|', - $message - ); - } - - /** - * @covers Monolog\Formatter\WildfireFormatter::formatBatch - * @expectedException BadMethodCallException - */ - public function testBatchFormatThrowException() - { - $wildfire = new WildfireFormatter(); - $record = array( - 'level' => Logger::ERROR, - 'level_name' => 'ERROR', - 'channel' => 'meh', - 'context' => array(), - 'datetime' => new \DateTime("@0"), - 'extra' => array(), - 'message' => 'log', - ); - - $wildfire->formatBatch(array($record)); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Functional/Handler/FirePHPHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Functional/Handler/FirePHPHandlerTest.php deleted file mode 100644 index 65b53097..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Functional/Handler/FirePHPHandlerTest.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function($class) { - $file = __DIR__.'/../../../../src/'.strtr($class, '\\', '/').'.php'; - if (file_exists($file)) { - require $file; - - return true; - } -}); - -use Monolog\Logger; -use Monolog\Handler\FirePHPHandler; -use Monolog\Handler\ChromePHPHandler; - -$logger = new Logger('firephp'); -$logger->pushHandler(new FirePHPHandler); -$logger->pushHandler(new ChromePHPHandler()); - -$logger->addDebug('Debug'); -$logger->addInfo('Info'); -$logger->addWarning('Warning'); -$logger->addError('Error'); diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php deleted file mode 100644 index 01d522fa..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; -use Monolog\Processor\WebProcessor; - -class AbstractHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\AbstractHandler::__construct - * @covers Monolog\Handler\AbstractHandler::getLevel - * @covers Monolog\Handler\AbstractHandler::setLevel - * @covers Monolog\Handler\AbstractHandler::getBubble - * @covers Monolog\Handler\AbstractHandler::setBubble - * @covers Monolog\Handler\AbstractHandler::getFormatter - * @covers Monolog\Handler\AbstractHandler::setFormatter - */ - public function testConstructAndGetSet() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler', array(Logger::WARNING, false)); - $this->assertEquals(Logger::WARNING, $handler->getLevel()); - $this->assertEquals(false, $handler->getBubble()); - - $handler->setLevel(Logger::ERROR); - $handler->setBubble(true); - $handler->setFormatter($formatter = new LineFormatter); - $this->assertEquals(Logger::ERROR, $handler->getLevel()); - $this->assertEquals(true, $handler->getBubble()); - $this->assertSame($formatter, $handler->getFormatter()); - } - - /** - * @covers Monolog\Handler\AbstractHandler::handleBatch - */ - public function testHandleBatch() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); - $handler->expects($this->exactly(2)) - ->method('handle'); - $handler->handleBatch(array($this->getRecord(), $this->getRecord())); - } - - /** - * @covers Monolog\Handler\AbstractHandler::isHandling - */ - public function testIsHandling() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler', array(Logger::WARNING, false)); - $this->assertTrue($handler->isHandling($this->getRecord())); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\AbstractHandler::getFormatter - * @covers Monolog\Handler\AbstractHandler::getDefaultFormatter - */ - public function testGetFormatterInitializesDefault() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); - $this->assertInstanceOf('Monolog\Formatter\LineFormatter', $handler->getFormatter()); - } - - /** - * @covers Monolog\Handler\AbstractHandler::pushProcessor - * @covers Monolog\Handler\AbstractHandler::popProcessor - * @expectedException LogicException - */ - public function testPushPopProcessor() - { - $logger = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); - $processor1 = new WebProcessor; - $processor2 = new WebProcessor; - - $logger->pushProcessor($processor1); - $logger->pushProcessor($processor2); - - $this->assertEquals($processor2, $logger->popProcessor()); - $this->assertEquals($processor1, $logger->popProcessor()); - $logger->popProcessor(); - } - - /** - * @covers Monolog\Handler\AbstractHandler::pushProcessor - * @expectedException InvalidArgumentException - */ - public function testPushProcessorWithNonCallable() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); - - $handler->pushProcessor(new \stdClass()); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php deleted file mode 100644 index 3485bdf3..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Processor\WebProcessor; - -class AbstractProcessingHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\AbstractProcessingHandler::handle - */ - public function testHandleLowerLevelMessage() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::WARNING, true)); - $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\AbstractProcessingHandler::handle - */ - public function testHandleBubbling() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::DEBUG, true)); - $this->assertFalse($handler->handle($this->getRecord())); - } - - /** - * @covers Monolog\Handler\AbstractProcessingHandler::handle - */ - public function testHandleNotBubbling() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::DEBUG, false)); - $this->assertTrue($handler->handle($this->getRecord())); - } - - /** - * @covers Monolog\Handler\AbstractProcessingHandler::handle - */ - public function testHandleIsFalseWhenNotHandled() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::WARNING, false)); - $this->assertTrue($handler->handle($this->getRecord())); - $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\AbstractProcessingHandler::processRecord - */ - public function testProcessRecord() - { - $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler'); - $handler->pushProcessor(new WebProcessor(array( - 'REQUEST_URI' => '', - 'REQUEST_METHOD' => '', - 'REMOTE_ADDR' => '', - 'SERVER_NAME' => '', - ))); - $handledRecord = null; - $handler->expects($this->once()) - ->method('write') - ->will($this->returnCallback(function($record) use (&$handledRecord) { - $handledRecord = $record; - })) - ; - $handler->handle($this->getRecord()); - $this->assertEquals(5, count($handledRecord['extra'])); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AmqpExchangeMock.php b/vendor/monolog/monolog/tests/Monolog/Handler/AmqpExchangeMock.php deleted file mode 100644 index 3415c82c..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/AmqpExchangeMock.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -class AmqpExchangeMock extends \AMQPExchange -{ - protected $messages = array(); - - public function __construct() - { - } - - public function publish($message, $routing_key, $params = 0, $attributes = array()) - { - $this->messages[] = array($message, $routing_key, $params, $attributes); - - return true; - } - - public function getMessages() - { - return $this->messages; - } - - public function setName($name) - { - return true; - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php deleted file mode 100644 index 73690916..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\RotatingFileHandler - */ -class AmqpHandlerTest extends TestCase -{ - public function setUp() - { - if (!class_exists('AMQPConnection') || !class_exists('AMQPExchange')) { - $this->markTestSkipped("amqp-php not installed"); - } - - if (!class_exists('AMQPChannel')) { - $this->markTestSkipped("Please update AMQP to version >= 1.0"); - } - } - - public function testHandle() - { - $exchange = $this->getExchange(); - - $handler = new AmqpHandler($exchange, 'log'); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $expected = array( - array( - 'message' => 'test', - 'context' => array( - 'data' => array(), - 'foo' => 34, - ), - 'level' => 300, - 'level_name' => 'WARNING', - 'channel' => 'test', - 'extra' => array(), - ), - 'warn.test', - 0, - array( - 'delivery_mode' => 2, - 'Content-type' => 'application/json' - ) - ); - - $handler->handle($record); - - $messages = $exchange->getMessages(); - $this->assertCount(1, $messages); - $messages[0][0] = json_decode($messages[0][0], true); - unset($messages[0][0]['datetime']); - $this->assertEquals($expected, $messages[0]); - } - - protected function getExchange() - { - return new AmqpExchangeMock(); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php deleted file mode 100644 index beb08cf8..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class BufferHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\BufferHandler::__construct - * @covers Monolog\Handler\BufferHandler::handle - * @covers Monolog\Handler\BufferHandler::close - */ - public function testHandleBuffers() - { - $test = new TestHandler(); - $handler = new BufferHandler($test); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertFalse($test->hasDebugRecords()); - $this->assertFalse($test->hasInfoRecords()); - $handler->close(); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 2); - } - - /** - * @covers Monolog\Handler\BufferHandler::close - * @covers Monolog\Handler\BufferHandler::flush - */ - public function testDestructPropagatesRecords() - { - $test = new TestHandler(); - $handler = new BufferHandler($test); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->__destruct(); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasDebugRecords()); - } - - /** - * @covers Monolog\Handler\BufferHandler::handle - */ - public function testHandleBufferLimit() - { - $test = new TestHandler(); - $handler = new BufferHandler($test, 2); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->close(); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertFalse($test->hasDebugRecords()); - } - - /** - * @covers Monolog\Handler\BufferHandler::handle - */ - public function testHandleBufferLimitWithFlushOnOverflow() - { - $test = new TestHandler(); - $handler = new BufferHandler($test, 3, Logger::DEBUG, true, true); - - // send two records - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $this->assertFalse($test->hasDebugRecords()); - $this->assertCount(0, $test->getRecords()); - - // overflow - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertTrue($test->hasDebugRecords()); - $this->assertCount(3, $test->getRecords()); - - // should buffer again - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertCount(3, $test->getRecords()); - - $handler->close(); - $this->assertCount(5, $test->getRecords()); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasInfoRecords()); - } - - /** - * @covers Monolog\Handler\BufferHandler::handle - */ - public function testHandleLevel() - { - $test = new TestHandler(); - $handler = new BufferHandler($test, 0, Logger::INFO); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->close(); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertFalse($test->hasDebugRecords()); - } - - /** - * @covers Monolog\Handler\BufferHandler::flush - */ - public function testFlush() - { - $test = new TestHandler(); - $handler = new BufferHandler($test, 0); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->flush(); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue($test->hasDebugRecords()); - $this->assertFalse($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\BufferHandler::handle - */ - public function testHandleUsesProcessors() - { - $test = new TestHandler(); - $handler = new BufferHandler($test); - $handler->pushProcessor(function ($record) { - $record['extra']['foo'] = true; - - return $record; - }); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->flush(); - $this->assertTrue($test->hasWarningRecords()); - $records = $test->getRecords(); - $this->assertTrue($records[0]['extra']['foo']); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php deleted file mode 100644 index ef50253d..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\ChromePHPHandler - */ -class ChromePHPHandlerTest extends TestCase -{ - protected function setUp() - { - TestChromePHPHandler::reset(); - } - - public function testHeaders() - { - $handler = new TestChromePHPHandler(); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING)); - - $expected = array( - 'X-ChromePhp-Data' => base64_encode(utf8_encode(json_encode(array( - 'version' => ChromePHPHandler::VERSION, - 'columns' => array('label', 'log', 'backtrace', 'type'), - 'rows' => array( - 'test', - 'test', - ), - 'request_uri' => '', - )))) - ); - - $this->assertEquals($expected, $handler->getHeaders()); - } - - public function testHeadersOverflow() - { - $handler = new TestChromePHPHandler(); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING, str_repeat('a', 150*1024))); - - // overflow chrome headers limit - $handler->handle($this->getRecord(Logger::WARNING, str_repeat('a', 100*1024))); - - $expected = array( - 'X-ChromePhp-Data' => base64_encode(utf8_encode(json_encode(array( - 'version' => ChromePHPHandler::VERSION, - 'columns' => array('label', 'log', 'backtrace', 'type'), - 'rows' => array( - array( - 'test', - 'test', - 'unknown', - 'log', - ), - array( - 'test', - str_repeat('a', 150*1024), - 'unknown', - 'warn', - ), - array( - 'monolog', - 'Incomplete logs, chrome header size limit reached', - 'unknown', - 'warn', - ), - ), - 'request_uri' => '', - )))) - ); - - $this->assertEquals($expected, $handler->getHeaders()); - } - - public function testConcurrentHandlers() - { - $handler = new TestChromePHPHandler(); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING)); - - $handler2 = new TestChromePHPHandler(); - $handler2->setFormatter($this->getIdentityFormatter()); - $handler2->handle($this->getRecord(Logger::DEBUG)); - $handler2->handle($this->getRecord(Logger::WARNING)); - - $expected = array( - 'X-ChromePhp-Data' => base64_encode(utf8_encode(json_encode(array( - 'version' => ChromePHPHandler::VERSION, - 'columns' => array('label', 'log', 'backtrace', 'type'), - 'rows' => array( - 'test', - 'test', - 'test', - 'test', - ), - 'request_uri' => '', - )))) - ); - - $this->assertEquals($expected, $handler2->getHeaders()); - } -} - -class TestChromePHPHandler extends ChromePHPHandler -{ - protected $headers = array(); - - public static function reset() - { - self::$initialized = false; - self::$overflowed = false; - self::$json['rows'] = array(); - } - - protected function sendHeader($header, $content) - { - $this->headers[$header] = $content; - } - - public function getHeaders() - { - return $this->headers; - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php deleted file mode 100644 index 78a1d15c..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class CouchDBHandlerTest extends TestCase -{ - public function testHandle() - { - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $expected = array( - 'message' => 'test', - 'context' => array('data' => '[object] (stdClass: {})', 'foo' => 34), - 'level' => Logger::WARNING, - 'level_name' => 'WARNING', - 'channel' => 'test', - 'datetime' => $record['datetime']->format('Y-m-d H:i:s'), - 'extra' => array(), - ); - - $handler = new CouchDBHandler(); - - try { - $handler->handle($record); - } catch (\RuntimeException $e) { - $this->markTestSkipped('Could not connect to couchdb server on http://localhost:5984'); - } - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php deleted file mode 100644 index d67da90a..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class DoctrineCouchDBHandlerTest extends TestCase -{ - protected function setup() - { - if (!class_exists('Doctrine\CouchDB\CouchDBClient')) { - $this->markTestSkipped('The "doctrine/couchdb" package is not installed'); - } - } - - public function testHandle() - { - $client = $this->getMockBuilder('Doctrine\\CouchDB\\CouchDBClient') - ->setMethods(array('postDocument')) - ->disableOriginalConstructor() - ->getMock(); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $expected = array( - 'message' => 'test', - 'context' => array('data' => '[object] (stdClass: {})', 'foo' => 34), - 'level' => Logger::WARNING, - 'level_name' => 'WARNING', - 'channel' => 'test', - 'datetime' => $record['datetime']->format('Y-m-d H:i:s'), - 'extra' => array(), - ); - - $client->expects($this->once()) - ->method('postDocument') - ->with($expected); - - $handler = new DoctrineCouchDBHandler($client); - $handler->handle($record); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php deleted file mode 100644 index c2207115..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; - -class FingersCrossedHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\FingersCrossedHandler::__construct - * @covers Monolog\Handler\FingersCrossedHandler::handle - */ - public function testHandleBuffers() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertFalse($test->hasDebugRecords()); - $this->assertFalse($test->hasInfoRecords()); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 3); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - */ - public function testHandleStopsBufferingAfterTrigger() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasDebugRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - * @covers Monolog\Handler\FingersCrossedHandler::reset - */ - public function testHandleRestartBufferingAfterReset() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->reset(); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasDebugRecords()); - $this->assertFalse($test->hasInfoRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - */ - public function testHandleRestartBufferingAfterBeingTriggeredWhenStopBufferingIsDisabled() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, Logger::WARNING, 0, false, false); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasDebugRecords()); - $this->assertFalse($test->hasInfoRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - */ - public function testHandleBufferLimit() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, Logger::WARNING, 2); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasWarningRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertFalse($test->hasDebugRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - */ - public function testHandleWithCallback() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler(function($record, $handler) use ($test) { - return $test; - }); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - $this->assertFalse($test->hasDebugRecords()); - $this->assertFalse($test->hasInfoRecords()); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 3); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - * @expectedException RuntimeException - */ - public function testHandleWithBadCallbackThrowsException() - { - $handler = new FingersCrossedHandler(function($record, $handler) { - return 'foo'; - }); - $handler->handle($this->getRecord(Logger::WARNING)); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::isHandling - */ - public function testIsHandlingAlways() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, Logger::ERROR); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::__construct - */ - public function testActivationStrategy() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy(Logger::WARNING)); - $handler->handle($this->getRecord(Logger::DEBUG)); - $this->assertFalse($test->hasDebugRecords()); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasWarningRecords()); - } - - /** - * @covers Monolog\Handler\FingersCrossedHandler::handle - */ - public function testHandleUsesProcessors() - { - $test = new TestHandler(); - $handler = new FingersCrossedHandler($test, Logger::INFO); - $handler->pushProcessor(function ($record) { - $record['extra']['foo'] = true; - - return $record; - }); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasWarningRecords()); - $records = $test->getRecords(); - $this->assertTrue($records[0]['extra']['foo']); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php deleted file mode 100644 index 2b7b76d9..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\FirePHPHandler - */ -class FirePHPHandlerTest extends TestCase -{ - public function setUp() - { - TestFirePHPHandler::reset(); - } - - public function testHeaders() - { - $handler = new TestFirePHPHandler; - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING)); - - $expected = array( - 'X-Wf-Protocol-1' => 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2', - 'X-Wf-1-Structure-1' => 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1', - 'X-Wf-1-Plugin-1' => 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3', - 'X-Wf-1-1-1-1' => 'test', - 'X-Wf-1-1-1-2' => 'test', - ); - - $this->assertEquals($expected, $handler->getHeaders()); - } - - public function testConcurrentHandlers() - { - $handler = new TestFirePHPHandler; - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::WARNING)); - - $handler2 = new TestFirePHPHandler; - $handler2->setFormatter($this->getIdentityFormatter()); - $handler2->handle($this->getRecord(Logger::DEBUG)); - $handler2->handle($this->getRecord(Logger::WARNING)); - - $expected = array( - 'X-Wf-Protocol-1' => 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2', - 'X-Wf-1-Structure-1' => 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1', - 'X-Wf-1-Plugin-1' => 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3', - 'X-Wf-1-1-1-1' => 'test', - 'X-Wf-1-1-1-2' => 'test', - ); - - $expected2 = array( - 'X-Wf-1-1-1-3' => 'test', - 'X-Wf-1-1-1-4' => 'test', - ); - - $this->assertEquals($expected, $handler->getHeaders()); - $this->assertEquals($expected2, $handler2->getHeaders()); - } -} - -class TestFirePHPHandler extends FirePHPHandler -{ - protected $headers = array(); - - public static function reset() - { - self::$initialized = false; - self::$messageIndex = 1; - } - - protected function sendHeader($header, $content) - { - $this->headers[$header] = $content; - } - - public function getHeaders() - { - return $this->headers; - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/Fixtures/.gitkeep b/vendor/monolog/monolog/tests/Monolog/Handler/Fixtures/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php deleted file mode 100644 index 8e9b9f8a..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\GelfMessageFormatter; - -class GelfHandlerTest extends TestCase -{ - public function setUp() - { - if (!class_exists("Gelf\MessagePublisher") || !class_exists("Gelf\Message")) { - $this->markTestSkipped("mlehner/gelf-php not installed"); - } - - require_once __DIR__ . '/GelfMocks.php'; - } - - /** - * @covers Monolog\Handler\GelfHandler::__construct - */ - public function testConstruct() - { - $handler = new GelfHandler($this->getMessagePublisher()); - $this->assertInstanceOf('Monolog\Handler\GelfHandler', $handler); - } - - protected function getHandler($messagePublisher) - { - $handler = new GelfHandler($messagePublisher); - - return $handler; - } - - protected function getMessagePublisher() - { - return new MockMessagePublisher('localhost'); - } - - public function testDebug() - { - $messagePublisher = $this->getMessagePublisher(); - $handler = $this->getHandler($messagePublisher); - - $record = $this->getRecord(Logger::DEBUG, "A test debug message"); - $handler->handle($record); - - $this->assertEquals(7, $messagePublisher->lastMessage->getLevel()); - $this->assertEquals('test', $messagePublisher->lastMessage->getFacility()); - $this->assertEquals($record['message'], $messagePublisher->lastMessage->getShortMessage()); - $this->assertEquals(null, $messagePublisher->lastMessage->getFullMessage()); - } - - public function testWarning() - { - $messagePublisher = $this->getMessagePublisher(); - $handler = $this->getHandler($messagePublisher); - - $record = $this->getRecord(Logger::WARNING, "A test warning message"); - $handler->handle($record); - - $this->assertEquals(4, $messagePublisher->lastMessage->getLevel()); - $this->assertEquals('test', $messagePublisher->lastMessage->getFacility()); - $this->assertEquals($record['message'], $messagePublisher->lastMessage->getShortMessage()); - $this->assertEquals(null, $messagePublisher->lastMessage->getFullMessage()); - } - - public function testInjectedGelfMessageFormatter() - { - $messagePublisher = $this->getMessagePublisher(); - $handler = $this->getHandler($messagePublisher); - - $handler->setFormatter(new GelfMessageFormatter('mysystem', 'EXT', 'CTX')); - - $record = $this->getRecord(Logger::WARNING, "A test warning message"); - $record['extra']['blarg'] = 'yep'; - $record['context']['from'] = 'logger'; - $handler->handle($record); - - $this->assertEquals('mysystem', $messagePublisher->lastMessage->getHost()); - $this->assertArrayHasKey('_EXTblarg', $messagePublisher->lastMessage->toArray()); - $this->assertArrayHasKey('_CTXfrom', $messagePublisher->lastMessage->toArray()); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/GelfMocks.php b/vendor/monolog/monolog/tests/Monolog/Handler/GelfMocks.php deleted file mode 100644 index dda87114..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/GelfMocks.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\MessagePublisher; -use Gelf\Message; - -class MockMessagePublisher extends MessagePublisher -{ - public function publish(Message $message) - { - $this->lastMessage = $message; - } - - public $lastMessage = null; -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php deleted file mode 100644 index c6298a6e..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class GroupHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\GroupHandler::__construct - * @expectedException InvalidArgumentException - */ - public function testConstructorOnlyTakesHandler() - { - new GroupHandler(array(new TestHandler(), "foo")); - } - - /** - * @covers Monolog\Handler\GroupHandler::__construct - * @covers Monolog\Handler\GroupHandler::handle - */ - public function testHandle() - { - $testHandlers = array(new TestHandler(), new TestHandler()); - $handler = new GroupHandler($testHandlers); - $handler->handle($this->getRecord(Logger::DEBUG)); - $handler->handle($this->getRecord(Logger::INFO)); - foreach ($testHandlers as $test) { - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 2); - } - } - - /** - * @covers Monolog\Handler\GroupHandler::handleBatch - */ - public function testHandleBatch() - { - $testHandlers = array(new TestHandler(), new TestHandler()); - $handler = new GroupHandler($testHandlers); - $handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO))); - foreach ($testHandlers as $test) { - $this->assertTrue($test->hasDebugRecords()); - $this->assertTrue($test->hasInfoRecords()); - $this->assertTrue(count($test->getRecords()) === 2); - } - } - - /** - * @covers Monolog\Handler\GroupHandler::isHandling - */ - public function testIsHandling() - { - $testHandlers = array(new TestHandler(Logger::ERROR), new TestHandler(Logger::WARNING)); - $handler = new GroupHandler($testHandlers); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::ERROR))); - $this->assertTrue($handler->isHandling($this->getRecord(Logger::WARNING))); - $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); - } - - /** - * @covers Monolog\Handler\GroupHandler::handle - */ - public function testHandleUsesProcessors() - { - $test = new TestHandler(); - $handler = new GroupHandler(array($test)); - $handler->pushProcessor(function ($record) { - $record['extra']['foo'] = true; - - return $record; - }); - $handler->handle($this->getRecord(Logger::WARNING)); - $this->assertTrue($test->hasWarningRecords()); - $records = $test->getRecords(); - $this->assertTrue($records[0]['extra']['foo']); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php deleted file mode 100644 index 6754f3d6..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\TestCase; - -class MailHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\MailHandler::handleBatch - */ - public function testHandleBatch() - { - $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $formatter->expects($this->once()) - ->method('formatBatch'); // Each record is formatted - - $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler'); - $handler->expects($this->once()) - ->method('send'); - $handler->expects($this->never()) - ->method('write'); // write is for individual records - - $handler->setFormatter($formatter); - - $handler->handleBatch($this->getMultipleRecords()); - } - - /** - * @covers Monolog\Handler\MailHandler::handleBatch - */ - public function testHandleBatchNotSendsMailIfMessagesAreBelowLevel() - { - $records = array( - $this->getRecord(Logger::DEBUG, 'debug message 1'), - $this->getRecord(Logger::DEBUG, 'debug message 2'), - $this->getRecord(Logger::INFO, 'information'), - ); - - $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler'); - $handler->expects($this->never()) - ->method('send'); - $handler->setLevel(Logger::ERROR); - - $handler->handleBatch($records); - } - - /** - * @covers Monolog\Handler\MailHandler::write - */ - public function testHandle() - { - $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler'); - - $record = $this->getRecord(); - $records = array($record); - $records[0]['formatted'] = '['.$record['datetime']->format('Y-m-d H:i:s').'] test.WARNING: test [] []'."\n"; - - $handler->expects($this->once()) - ->method('send') - ->with($records[0]['formatted'], $records); - - $handler->handle($record); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php b/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php deleted file mode 100644 index f1f54a8f..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Raven_Client; - -class MockRavenClient extends Raven_Client -{ - public function capture($data, $stack) - { - $this->lastData = $data; - $this->lastStack = $stack; - } - - public $lastData; - public $lastStack; -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php deleted file mode 100644 index ce3433e1..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class MongoDBHandlerTest extends TestCase -{ - /** - * @expectedException InvalidArgumentException - */ - public function testConstructorShouldThrowExceptionForInvalidMongo() - { - new MongoDBHandler(new \stdClass(), 'DB', 'Collection'); - } - - public function testHandle() - { - $mongo = $this->getMock('Mongo', array('selectCollection')); - $collection = $this->getMock('stdClass', array('save')); - - $mongo->expects($this->once()) - ->method('selectCollection') - ->with('DB', 'Collection') - ->will($this->returnValue($collection)); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $expected = array( - 'message' => 'test', - 'context' => array('data' => '[object] (stdClass: {})', 'foo' => 34), - 'level' => Logger::WARNING, - 'level_name' => 'WARNING', - 'channel' => 'test', - 'datetime' => $record['datetime']->format('Y-m-d H:i:s'), - 'extra' => array(), - ); - - $collection->expects($this->once()) - ->method('save') - ->with($expected); - - $handler = new MongoDBHandler($mongo, 'DB', 'Collection'); - $handler->handle($record); - } -} - -if (!class_exists('Mongo')) { - class Mongo - { - public function selectCollection() {} - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php deleted file mode 100644 index 50ceace0..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; - -class NativeMailerHandlerTest extends TestCase -{ - /** - * @expectedException InvalidArgumentException - */ - public function testConstructorHeaderInjection() - { - $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', "receiver@example.org\r\nFrom: faked@attacker.org"); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testSetterHeaderInjection() - { - $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org'); - $mailer->addHeader("Content-Type: text/html\r\nFrom: faked@attacker.org"); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testSetterArrayHeaderInjection() - { - $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org'); - $mailer->addHeader(array("Content-Type: text/html\r\nFrom: faked@attacker.org")); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php deleted file mode 100644 index 292df78c..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\NullHandler::handle - */ -class NullHandlerTest extends TestCase -{ - public function testHandle() - { - $handler = new NullHandler(); - $this->assertTrue($handler->handle($this->getRecord())); - } - - public function testHandleLowerLevelRecord() - { - $handler = new NullHandler(Logger::WARNING); - $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG))); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php deleted file mode 100644 index 991d0e9b..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php +++ /dev/null @@ -1,108 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * Almost all examples (expected header, titles, messages) taken from - * https://www.pushover.net/api - * @author Sebastian Göttschkes - * @see https://www.pushover.net/api - */ -class PushoverHandlerTest extends TestCase -{ - - private $res; - private $handler; - - public function testWriteHeader() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/POST \/1\/messages.json HTTP\/1.1\\r\\nHost: api.pushover.net\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); - - return $content; - } - - /** - * @depends testWriteHeader - */ - public function testWriteContent($content) - { - $this->assertRegexp('/token=myToken&user=myUser&message=test1&title=Monolog×tamp=\d{10}$/', $content); - } - - public function testWriteWithComplexTitle() - { - $this->createHandler('myToken', 'myUser', 'Backup finished - SQL1'); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/title=Backup\+finished\+-\+SQL1/', $content); - } - - public function testWriteWithComplexMessage() - { - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, 'Backup of database "example" finished in 16 minutes.')); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $this->assertRegexp('/message=Backup\+of\+database\+%22example%22\+finished\+in\+16\+minutes\./', $content); - } - - public function testWriteWithTooLongMessage() - { - $message = str_pad('test', 520, 'a'); - $this->createHandler(); - $this->handler->handle($this->getRecord(Logger::CRITICAL, $message)); - fseek($this->res, 0); - $content = fread($this->res, 1024); - - $expectedMessage = substr($message, 0, 505); - - $this->assertRegexp('/message=' . $expectedMessage . '&title/', $content); - } - - private function createHandler($token = 'myToken', $user = 'myUser', $title = 'Monolog') - { - $constructorArgs = array($token, $user, $title); - $this->res = fopen('php://memory', 'a'); - $this->handler = $this->getMock( - '\Monolog\Handler\PushoverHandler', - array('fsockopen', 'streamSetTimeout', 'closeSocket'), - $constructorArgs - ); - - $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); - $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($this->handler, 'localhost:1234'); - - $this->handler->expects($this->any()) - ->method('fsockopen') - ->will($this->returnValue($this->res)); - $this->handler->expects($this->any()) - ->method('streamSetTimeout') - ->will($this->returnValue(true)); - $this->handler->expects($this->any()) - ->method('closeSocket') - ->will($this->returnValue(true)); - - $this->handler->setFormatter($this->getIdentityFormatter()); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php deleted file mode 100644 index cd8ae574..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Handler\RavenHandler; - -class RavenHandlerTest extends TestCase -{ - public function setUp() - { - if (!class_exists("Raven_Client")) { - $this->markTestSkipped("raven/raven not installed"); - } - - require_once __DIR__ . '/MockRavenClient.php'; - } - - /** - * @covers Monolog\Handler\RavenHandler::__construct - */ - public function testConstruct() - { - $handler = new RavenHandler($this->getRavenClient()); - $this->assertInstanceOf('Monolog\Handler\RavenHandler', $handler); - } - - protected function getHandler($ravenClient) - { - $handler = new RavenHandler($ravenClient); - - return $handler; - } - - protected function getRavenClient() - { - $dsn = 'http://43f6017361224d098402974103bfc53d:a6a0538fc2934ba2bed32e08741b2cd3@marca.python.live.cheggnet.com:9000/1'; - - return new MockRavenClient($dsn); - } - - public function testDebug() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - $record = $this->getRecord(Logger::DEBUG, "A test debug message"); - $handler->handle($record); - - $this->assertEquals($ravenClient::DEBUG, $ravenClient->lastData['level']); - $this->assertContains($record['message'], $ravenClient->lastData['message']); - } - - public function testWarning() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - $record = $this->getRecord(Logger::WARNING, "A test warning message"); - $handler->handle($record); - - $this->assertEquals($ravenClient::WARNING, $ravenClient->lastData['level']); - $this->assertContains($record['message'], $ravenClient->lastData['message']); - } - - public function testException() - { - $ravenClient = $this->getRavenClient(); - $handler = $this->getHandler($ravenClient); - - try { - $this->methodThatThrowsAnException(); - } catch (\Exception $e) { - $record = $this->getRecord(Logger::ERROR, $e->getMessage(), array('exception' => $e)); - $handler->handle($record); - } - - $this->assertEquals($record['message'], $ravenClient->lastData['message']); - } - - private function methodThatThrowsAnException() - { - throw new \Exception('This is an exception'); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php deleted file mode 100644 index 3629f8a2..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; - -class RedisHandlerTest extends TestCase -{ - /** - * @expectedException InvalidArgumentException - */ - public function testConstructorShouldThrowExceptionForInvalidRedis() - { - new RedisHandler(new \stdClass(), 'key'); - } - - public function testConstructorShouldWorkWithPredis() - { - $redis = $this->getMock('Predis\Client'); - $this->assertInstanceof('Monolog\Handler\RedisHandler', new RedisHandler($redis, 'key')); - } - - public function testConstructorShouldWorkWithRedis() - { - $redis = $this->getMock('Redis'); - $this->assertInstanceof('Monolog\Handler\RedisHandler', new RedisHandler($redis, 'key')); - } - - public function testPredisHandle() - { - $redis = $this->getMock('Predis\Client', array('rpush')); - - // Predis\Client uses rpush - $redis->expects($this->once()) - ->method('rpush') - ->with('key', 'test'); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $handler = new RedisHandler($redis, 'key'); - $handler->setFormatter(new LineFormatter("%message%")); - $handler->handle($record); - } - - public function testRedisHandle() - { - $redis = $this->getMock('Redis', array('rpush')); - - // Redis uses rPush - $redis->expects($this->once()) - ->method('rPush') - ->with('key', 'test'); - - $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); - - $handler = new RedisHandler($redis, 'key'); - $handler->setFormatter(new LineFormatter("%message%")); - $handler->handle($record); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php deleted file mode 100644 index f4cefda1..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; - -/** - * @covers Monolog\Handler\RotatingFileHandler - */ -class RotatingFileHandlerTest extends TestCase -{ - public function setUp() - { - $dir = __DIR__.'/Fixtures'; - chmod($dir, 0777); - if (!is_writable($dir)) { - $this->markTestSkipped($dir.' must be writeable to test the RotatingFileHandler.'); - } - } - - public function testRotationCreatesNewFile() - { - touch(__DIR__.'/Fixtures/foo-'.date('Y-m-d', time() - 86400).'.rot'); - - $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot'); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord()); - - $log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot'; - $this->assertTrue(file_exists($log)); - $this->assertEquals('test', file_get_contents($log)); - } - - /** - * @dataProvider rotationTests - */ - public function testRotation($createFile) - { - touch($old1 = __DIR__.'/Fixtures/foo-'.date('Y-m-d', time() - 86400).'.rot'); - touch($old2 = __DIR__.'/Fixtures/foo-'.date('Y-m-d', time() - 86400 * 2).'.rot'); - touch($old3 = __DIR__.'/Fixtures/foo-'.date('Y-m-d', time() - 86400 * 3).'.rot'); - touch($old4 = __DIR__.'/Fixtures/foo-'.date('Y-m-d', time() - 86400 * 4).'.rot'); - - $log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot'; - - if ($createFile) { - touch($log); - } - - $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord()); - - $handler->close(); - - $this->assertTrue(file_exists($log)); - $this->assertTrue(file_exists($old1)); - $this->assertEquals($createFile, file_exists($old2)); - $this->assertEquals($createFile, file_exists($old3)); - $this->assertEquals($createFile, file_exists($old4)); - $this->assertEquals('test', file_get_contents($log)); - } - - public function rotationTests() - { - return array( - 'Rotation is triggered when the file of the current day is not present' - => array(true), - 'Rotation is not triggered when the file is already present' - => array(false), - ); - } - - public function testReuseCurrentFile() - { - $log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot'; - file_put_contents($log, "foo"); - $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot'); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord()); - $this->assertEquals('footest', file_get_contents($log)); - } - - public function tearDown() - { - foreach (glob(__DIR__.'/Fixtures/*.rot') as $file) { - unlink($file); - } - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php deleted file mode 100644 index c642bea8..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php +++ /dev/null @@ -1,283 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @author Pablo de Leon Belloc - */ -class SocketHandlerTest extends TestCase -{ - /** - * @var Monolog\Handler\SocketHandler - */ - private $handler; - - /** - * @var resource - */ - private $res; - - /** - * @expectedException UnexpectedValueException - */ - public function testInvalidHostname() - { - $this->createHandler('garbage://here'); - $this->writeRecord('data'); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testBadConnectionTimeout() - { - $this->createHandler('localhost:1234'); - $this->handler->setConnectionTimeout(-1); - } - - public function testSetConnectionTimeout() - { - $this->createHandler('localhost:1234'); - $this->handler->setConnectionTimeout(10.1); - $this->assertEquals(10.1, $this->handler->getConnectionTimeout()); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testBadTimeout() - { - $this->createHandler('localhost:1234'); - $this->handler->setTimeout(-1); - } - - public function testSetTimeout() - { - $this->createHandler('localhost:1234'); - $this->handler->setTimeout(10.25); - $this->assertEquals(10.25, $this->handler->getTimeout()); - } - - public function testSetConnectionString() - { - $this->createHandler('tcp://localhost:9090'); - $this->assertEquals('tcp://localhost:9090', $this->handler->getConnectionString()); - } - - /** - * @expectedException UnexpectedValueException - */ - public function testExceptionIsThrownOnFsockopenError() - { - $this->setMockHandler(array('fsockopen')); - $this->handler->expects($this->once()) - ->method('fsockopen') - ->will($this->returnValue(false)); - $this->writeRecord('Hello world'); - } - - /** - * @expectedException UnexpectedValueException - */ - public function testExceptionIsThrownOnPfsockopenError() - { - $this->setMockHandler(array('pfsockopen')); - $this->handler->expects($this->once()) - ->method('pfsockopen') - ->will($this->returnValue(false)); - $this->handler->setPersistent(true); - $this->writeRecord('Hello world'); - } - - /** - * @expectedException UnexpectedValueException - */ - public function testExceptionIsThrownIfCannotSetTimeout() - { - $this->setMockHandler(array('streamSetTimeout')); - $this->handler->expects($this->once()) - ->method('streamSetTimeout') - ->will($this->returnValue(false)); - $this->writeRecord('Hello world'); - } - - /** - * @expectedException RuntimeException - */ - public function testWriteFailsOnIfFwriteReturnsFalse() - { - $this->setMockHandler(array('fwrite')); - - $callback = function($arg) { - $map = array( - 'Hello world' => 6, - 'world' => false, - ); - - return $map[$arg]; - }; - - $this->handler->expects($this->exactly(2)) - ->method('fwrite') - ->will($this->returnCallback($callback)); - - $this->writeRecord('Hello world'); - } - - /** - * @expectedException RuntimeException - */ - public function testWriteFailsIfStreamTimesOut() - { - $this->setMockHandler(array('fwrite', 'streamGetMetadata')); - - $callback = function($arg) { - $map = array( - 'Hello world' => 6, - 'world' => 5, - ); - - return $map[$arg]; - }; - - $this->handler->expects($this->exactly(1)) - ->method('fwrite') - ->will($this->returnCallback($callback)); - $this->handler->expects($this->exactly(1)) - ->method('streamGetMetadata') - ->will($this->returnValue(array('timed_out' => true))); - - $this->writeRecord('Hello world'); - } - - /** - * @expectedException RuntimeException - */ - public function testWriteFailsOnIncompleteWrite() - { - $this->setMockHandler(array('fwrite', 'streamGetMetadata')); - - $res = $this->res; - $callback = function($string) use ($res) { - fclose($res); - - return strlen('Hello'); - }; - - $this->handler->expects($this->exactly(1)) - ->method('fwrite') - ->will($this->returnCallback($callback)); - $this->handler->expects($this->exactly(1)) - ->method('streamGetMetadata') - ->will($this->returnValue(array('timed_out' => false))); - - $this->writeRecord('Hello world'); - } - - public function testWriteWithMemoryFile() - { - $this->setMockHandler(); - $this->writeRecord('test1'); - $this->writeRecord('test2'); - $this->writeRecord('test3'); - fseek($this->res, 0); - $this->assertEquals('test1test2test3', fread($this->res, 1024)); - } - - public function testWriteWithMock() - { - $this->setMockHandler(array('fwrite')); - - $callback = function($arg) { - $map = array( - 'Hello world' => 6, - 'world' => 5, - ); - - return $map[$arg]; - }; - - $this->handler->expects($this->exactly(2)) - ->method('fwrite') - ->will($this->returnCallback($callback)); - - $this->writeRecord('Hello world'); - } - - public function testClose() - { - $this->setMockHandler(); - $this->writeRecord('Hello world'); - $this->assertInternalType('resource', $this->res); - $this->handler->close(); - $this->assertFalse(is_resource($this->res), "Expected resource to be closed after closing handler"); - } - - public function testCloseDoesNotClosePersistentSocket() - { - $this->setMockHandler(); - $this->handler->setPersistent(true); - $this->writeRecord('Hello world'); - $this->assertTrue(is_resource($this->res)); - $this->handler->close(); - $this->assertTrue(is_resource($this->res)); - } - - private function createHandler($connectionString) - { - $this->handler = new SocketHandler($connectionString); - $this->handler->setFormatter($this->getIdentityFormatter()); - } - - private function writeRecord($string) - { - $this->handler->handle($this->getRecord(Logger::WARNING, $string)); - } - - private function setMockHandler(array $methods = array()) - { - $this->res = fopen('php://memory', 'a'); - - $defaultMethods = array('fsockopen', 'pfsockopen', 'streamSetTimeout'); - $newMethods = array_diff($methods, $defaultMethods); - - $finalMethods = array_merge($defaultMethods, $newMethods); - - $this->handler = $this->getMock( - '\Monolog\Handler\SocketHandler', $finalMethods, array('localhost:1234') - ); - - if (!in_array('fsockopen', $methods)) { - $this->handler->expects($this->any()) - ->method('fsockopen') - ->will($this->returnValue($this->res)); - } - - if (!in_array('pfsockopen', $methods)) { - $this->handler->expects($this->any()) - ->method('pfsockopen') - ->will($this->returnValue($this->res)); - } - - if (!in_array('streamSetTimeout', $methods)) { - $this->handler->expects($this->any()) - ->method('streamSetTimeout') - ->will($this->returnValue(true)); - } - - $this->handler->setFormatter($this->getIdentityFormatter()); - } - -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php deleted file mode 100644 index 63d4fef6..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -class StreamHandlerTest extends TestCase -{ - /** - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWrite() - { - $handle = fopen('php://memory', 'a+'); - $handler = new StreamHandler($handle); - $handler->setFormatter($this->getIdentityFormatter()); - $handler->handle($this->getRecord(Logger::WARNING, 'test')); - $handler->handle($this->getRecord(Logger::WARNING, 'test2')); - $handler->handle($this->getRecord(Logger::WARNING, 'test3')); - fseek($handle, 0); - $this->assertEquals('testtest2test3', fread($handle, 100)); - } - - /** - * @covers Monolog\Handler\StreamHandler::close - */ - public function testClose() - { - $handle = fopen('php://memory', 'a+'); - $handler = new StreamHandler($handle); - $this->assertTrue(is_resource($handle)); - $handler->close(); - $this->assertFalse(is_resource($handle)); - } - - /** - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteCreatesTheStreamResource() - { - $handler = new StreamHandler('php://memory'); - $handler->handle($this->getRecord()); - } - - /** - * @expectedException LogicException - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteMissingResource() - { - $handler = new StreamHandler(null); - $handler->handle($this->getRecord()); - } - - /** - * @expectedException UnexpectedValueException - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteInvalidResource() - { - $handler = new StreamHandler('bogus://url'); - $handler->handle($this->getRecord()); - } - - /** - * @expectedException UnexpectedValueException - * @covers Monolog\Handler\StreamHandler::__construct - * @covers Monolog\Handler\StreamHandler::write - */ - public function testWriteNonExistingResource() - { - $handler = new StreamHandler('/foo/bar/baz/'.rand(0, 10000)); - $handler->handle($this->getRecord()); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php deleted file mode 100644 index 98219ac1..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; -use Monolog\Logger; - -class SyslogHandlerTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers Monolog\Handler\SyslogHandler::__construct - */ - public function testConstruct() - { - $handler = new SyslogHandler('test'); - $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); - - $handler = new SyslogHandler('test', LOG_USER); - $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); - - $handler = new SyslogHandler('test', 'user'); - $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); - - $handler = new SyslogHandler('test', LOG_USER, Logger::DEBUG, true, LOG_PERROR); - $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); - } - - /** - * @covers Monolog\Handler\SyslogHandler::__construct - */ - public function testConstructInvalidFacility() - { - $this->setExpectedException('UnexpectedValueException'); - $handler = new SyslogHandler('test', 'unknown'); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php deleted file mode 100644 index 801d80a9..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; -use Monolog\Logger; - -/** - * @covers Monolog\Handler\TestHandler - */ -class TestHandlerTest extends TestCase -{ - /** - * @dataProvider methodProvider - */ - public function testHandler($method, $level) - { - $handler = new TestHandler; - $record = $this->getRecord($level, 'test'.$method); - $this->assertFalse($handler->{'has'.$method}($record)); - $this->assertFalse($handler->{'has'.$method.'Records'}()); - $handler->handle($record); - - $this->assertFalse($handler->{'has'.$method}('bar')); - $this->assertTrue($handler->{'has'.$method}($record)); - $this->assertTrue($handler->{'has'.$method}('test'.$method)); - $this->assertTrue($handler->{'has'.$method.'Records'}()); - - $records = $handler->getRecords(); - unset($records[0]['formatted']); - $this->assertEquals(array($record), $records); - } - - public function methodProvider() - { - return array( - array('Emergency', Logger::EMERGENCY), - array('Alert' , Logger::ALERT), - array('Critical' , Logger::CRITICAL), - array('Error' , Logger::ERROR), - array('Warning' , Logger::WARNING), - array('Info' , Logger::INFO), - array('Notice' , Logger::NOTICE), - array('Debug' , Logger::DEBUG), - ); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php deleted file mode 100644 index 416039e6..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\TestCase; - -class ZendMonitorHandlerTest extends TestCase -{ - protected $zendMonitorHandler; - - public function setUp() - { - if (!function_exists('zend_monitor_custom_event')) { - $this->markTestSkipped('ZendServer is not installed'); - } - } - - /** - * @covers Monolog\Handler\ZendMonitorHandler::write - */ - public function testWrite() - { - $record = $this->getRecord(); - $formatterResult = array( - 'message' => $record['message'] - ); - - $zendMonitor = $this->getMockBuilder('Monolog\Handler\ZendMonitorHandler') - ->setMethods(array('writeZendMonitorCustomEvent', 'getDefaultFormatter')) - ->getMock(); - - $formatterMock = $this->getMockBuilder('Monolog\Formatter\NormalizerFormatter') - ->disableOriginalConstructor() - ->getMock(); - - $formatterMock->expects($this->once()) - ->method('format') - ->will($this->returnValue($formatterResult)); - - $zendMonitor->expects($this->once()) - ->method('getDefaultFormatter') - ->will($this->returnValue($formatterMock)); - - $levelMap = $zendMonitor->getLevelMap(); - - $zendMonitor->expects($this->once()) - ->method('writeZendMonitorCustomEvent') - ->with($levelMap[$record['level']], $record['message'], $formatterResult); - - $zendMonitor->handle($record); - } - - /** - * @covers Monolog\Handler\ZendMonitorHandler::getDefaultFormatter - */ - public function testGetDefaultFormatterReturnsNormalizerFormatter() - { - $zendMonitor = new ZendMonitorHandler(); - $this->assertInstanceOf('Monolog\Formatter\NormalizerFormatter', $zendMonitor->getDefaultFormatter()); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/LoggerTest.php b/vendor/monolog/monolog/tests/Monolog/LoggerTest.php deleted file mode 100644 index 8bcbbf90..00000000 --- a/vendor/monolog/monolog/tests/Monolog/LoggerTest.php +++ /dev/null @@ -1,409 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Monolog\Processor\WebProcessor; -use Monolog\Handler\TestHandler; - -class LoggerTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers Monolog\Logger::getName - */ - public function testGetName() - { - $logger = new Logger('foo'); - $this->assertEquals('foo', $logger->getName()); - } - - /** - * @covers Monolog\Logger::getLevelName - */ - public function testGetLevelName() - { - $this->assertEquals('ERROR', Logger::getLevelName(Logger::ERROR)); - } - - /** - * @covers Monolog\Logger::getLevelName - * @expectedException InvalidArgumentException - */ - public function testGetLevelNameThrows() - { - Logger::getLevelName(5); - } - - /** - * @covers Monolog\Logger::__construct - */ - public function testChannel() - { - $logger = new Logger('foo'); - $handler = new TestHandler; - $logger->pushHandler($handler); - $logger->addWarning('test'); - list($record) = $handler->getRecords(); - $this->assertEquals('foo', $record['channel']); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testLog() - { - $logger = new Logger(__METHOD__); - - $handler = $this->getMock('Monolog\Handler\NullHandler', array('handle')); - $handler->expects($this->once()) - ->method('handle'); - $logger->pushHandler($handler); - - $this->assertTrue($logger->addWarning('test')); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testLogNotHandled() - { - $logger = new Logger(__METHOD__); - - $handler = $this->getMock('Monolog\Handler\NullHandler', array('handle'), array(Logger::ERROR)); - $handler->expects($this->never()) - ->method('handle'); - $logger->pushHandler($handler); - - $this->assertFalse($logger->addWarning('test')); - } - - public function testHandlersInCtor() - { - $handler1 = new TestHandler; - $handler2 = new TestHandler; - $logger = new Logger(__METHOD__, array($handler1, $handler2)); - - $this->assertEquals($handler1, $logger->popHandler()); - $this->assertEquals($handler2, $logger->popHandler()); - } - - public function testProcessorsInCtor() - { - $processor1 = new WebProcessor; - $processor2 = new WebProcessor; - $logger = new Logger(__METHOD__, array(), array($processor1, $processor2)); - - $this->assertEquals($processor1, $logger->popProcessor()); - $this->assertEquals($processor2, $logger->popProcessor()); - } - - /** - * @covers Monolog\Logger::pushHandler - * @covers Monolog\Logger::popHandler - * @expectedException LogicException - */ - public function testPushPopHandler() - { - $logger = new Logger(__METHOD__); - $handler1 = new TestHandler; - $handler2 = new TestHandler; - - $logger->pushHandler($handler1); - $logger->pushHandler($handler2); - - $this->assertEquals($handler2, $logger->popHandler()); - $this->assertEquals($handler1, $logger->popHandler()); - $logger->popHandler(); - } - - /** - * @covers Monolog\Logger::pushProcessor - * @covers Monolog\Logger::popProcessor - * @expectedException LogicException - */ - public function testPushPopProcessor() - { - $logger = new Logger(__METHOD__); - $processor1 = new WebProcessor; - $processor2 = new WebProcessor; - - $logger->pushProcessor($processor1); - $logger->pushProcessor($processor2); - - $this->assertEquals($processor2, $logger->popProcessor()); - $this->assertEquals($processor1, $logger->popProcessor()); - $logger->popProcessor(); - } - - /** - * @covers Monolog\Logger::pushProcessor - * @expectedException InvalidArgumentException - */ - public function testPushProcessorWithNonCallable() - { - $logger = new Logger(__METHOD__); - - $logger->pushProcessor(new \stdClass()); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testProcessorsAreExecuted() - { - $logger = new Logger(__METHOD__); - $handler = new TestHandler; - $logger->pushHandler($handler); - $logger->pushProcessor(function($record) { - $record['extra']['win'] = true; - - return $record; - }); - $logger->addError('test'); - list($record) = $handler->getRecords(); - $this->assertTrue($record['extra']['win']); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testProcessorsAreCalledOnlyOnce() - { - $logger = new Logger(__METHOD__); - $handler = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler->expects($this->any()) - ->method('handle') - ->will($this->returnValue(true)) - ; - $logger->pushHandler($handler); - - $processor = $this->getMockBuilder('Monolog\Processor\WebProcessor') - ->disableOriginalConstructor() - ->setMethods(array('__invoke')) - ->getMock() - ; - $processor->expects($this->once()) - ->method('__invoke') - ->will($this->returnArgument(0)) - ; - $logger->pushProcessor($processor); - - $logger->addError('test'); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testProcessorsNotCalledWhenNotHandled() - { - $logger = new Logger(__METHOD__); - $handler = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler->expects($this->once()) - ->method('isHandling') - ->will($this->returnValue(false)) - ; - $logger->pushHandler($handler); - $that = $this; - $logger->pushProcessor(function($record) use ($that) { - $that->fail('The processor should not be called'); - }); - $logger->addAlert('test'); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testHandlersNotCalledBeforeFirstHandling() - { - $logger = new Logger(__METHOD__); - - $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler1->expects($this->never()) - ->method('isHandling') - ->will($this->returnValue(false)) - ; - $handler1->expects($this->once()) - ->method('handle') - ->will($this->returnValue(false)) - ; - $logger->pushHandler($handler1); - - $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler2->expects($this->once()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler2->expects($this->once()) - ->method('handle') - ->will($this->returnValue(false)) - ; - $logger->pushHandler($handler2); - - $handler3 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler3->expects($this->once()) - ->method('isHandling') - ->will($this->returnValue(false)) - ; - $handler3->expects($this->never()) - ->method('handle') - ; - $logger->pushHandler($handler3); - - $logger->debug('test'); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testBubblingWhenTheHandlerReturnsFalse() - { - $logger = new Logger(__METHOD__); - - $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler1->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler1->expects($this->once()) - ->method('handle') - ->will($this->returnValue(false)) - ; - $logger->pushHandler($handler1); - - $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler2->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler2->expects($this->once()) - ->method('handle') - ->will($this->returnValue(false)) - ; - $logger->pushHandler($handler2); - - $logger->debug('test'); - } - - /** - * @covers Monolog\Logger::addRecord - */ - public function testNotBubblingWhenTheHandlerReturnsTrue() - { - $logger = new Logger(__METHOD__); - - $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler1->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler1->expects($this->never()) - ->method('handle') - ; - $logger->pushHandler($handler1); - - $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler2->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - $handler2->expects($this->once()) - ->method('handle') - ->will($this->returnValue(true)) - ; - $logger->pushHandler($handler2); - - $logger->debug('test'); - } - - /** - * @covers Monolog\Logger::isHandling - */ - public function testIsHandling() - { - $logger = new Logger(__METHOD__); - - $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler1->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(false)) - ; - - $logger->pushHandler($handler1); - $this->assertFalse($logger->isHandling(Logger::DEBUG)); - - $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); - $handler2->expects($this->any()) - ->method('isHandling') - ->will($this->returnValue(true)) - ; - - $logger->pushHandler($handler2); - $this->assertTrue($logger->isHandling(Logger::DEBUG)); - } - - /** - * @dataProvider logMethodProvider - * @covers Monolog\Logger::addDebug - * @covers Monolog\Logger::addInfo - * @covers Monolog\Logger::addNotice - * @covers Monolog\Logger::addWarning - * @covers Monolog\Logger::addError - * @covers Monolog\Logger::addCritical - * @covers Monolog\Logger::addAlert - * @covers Monolog\Logger::addEmergency - * @covers Monolog\Logger::debug - * @covers Monolog\Logger::info - * @covers Monolog\Logger::notice - * @covers Monolog\Logger::warn - * @covers Monolog\Logger::err - * @covers Monolog\Logger::crit - * @covers Monolog\Logger::alert - * @covers Monolog\Logger::emerg - */ - public function testLogMethods($method, $expectedLevel) - { - $logger = new Logger('foo'); - $handler = new TestHandler; - $logger->pushHandler($handler); - $logger->{$method}('test'); - list($record) = $handler->getRecords(); - $this->assertEquals($expectedLevel, $record['level']); - } - - public function logMethodProvider() - { - return array( - // monolog methods - array('addDebug', Logger::DEBUG), - array('addInfo', Logger::INFO), - array('addNotice', Logger::NOTICE), - array('addWarning', Logger::WARNING), - array('addError', Logger::ERROR), - array('addCritical', Logger::CRITICAL), - array('addAlert', Logger::ALERT), - array('addEmergency', Logger::EMERGENCY), - - // ZF/Sf2 compat methods - array('debug', Logger::DEBUG), - array('info', Logger::INFO), - array('notice', Logger::NOTICE), - array('warn', Logger::WARNING), - array('err', Logger::ERROR), - array('crit', Logger::CRITICAL), - array('alert', Logger::ALERT), - array('emerg', Logger::EMERGENCY), - ); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php deleted file mode 100644 index 9adbe174..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; -use Monolog\Handler\TestHandler; - -class IntrospectionProcessorTest extends TestCase -{ - public function getHandler() - { - $processor = new IntrospectionProcessor(); - $handler = new TestHandler(); - $handler->pushProcessor($processor); - - return $handler; - } - - public function testProcessorFromClass() - { - $handler = $this->getHandler(); - $tester = new \Acme\Tester; - $tester->test($handler, $this->getRecord()); - list($record) = $handler->getRecords(); - $this->assertEquals(__FILE__, $record['extra']['file']); - $this->assertEquals(58, $record['extra']['line']); - $this->assertEquals('Acme\Tester', $record['extra']['class']); - $this->assertEquals('test', $record['extra']['function']); - } - - public function testProcessorFromFunc() - { - $handler = $this->getHandler(); - \Acme\tester($handler, $this->getRecord()); - list($record) = $handler->getRecords(); - $this->assertEquals(__FILE__, $record['extra']['file']); - $this->assertEquals(64, $record['extra']['line']); - $this->assertEquals(null, $record['extra']['class']); - $this->assertEquals('Acme\tester', $record['extra']['function']); - } -} - -namespace Acme; - -class Tester -{ - public function test($handler, $record) - { - $handler->handle($record); - } -} - -function tester($handler, $record) -{ - $handler->handle($record); -} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php deleted file mode 100644 index 4bdf22c3..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class MemoryPeakUsageProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\MemoryPeakUsageProcessor::__invoke - * @covers Monolog\Processor\MemoryProcessor::formatBytes - */ - public function testProcessor() - { - $processor = new MemoryPeakUsageProcessor(); - $record = $processor($this->getRecord()); - $this->assertArrayHasKey('memory_peak_usage', $record['extra']); - $this->assertRegExp('#[0-9.]+ (M|K)?B$#', $record['extra']['memory_peak_usage']); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php deleted file mode 100644 index a30d6de6..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class MemoryUsageProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\MemoryUsageProcessor::__invoke - * @covers Monolog\Processor\MemoryProcessor::formatBytes - */ - public function testProcessor() - { - $processor = new MemoryUsageProcessor(); - $record = $processor($this->getRecord()); - $this->assertArrayHasKey('memory_usage', $record['extra']); - $this->assertRegExp('#[0-9.]+ (M|K)?B$#', $record['extra']['memory_usage']); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php deleted file mode 100644 index 458d2a33..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class ProcessIdProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\ProcessIdProcessor::__invoke - */ - public function testProcessor() - { - $processor = new ProcessIdProcessor(); - $record = $processor($this->getRecord()); - $this->assertArrayHasKey('process_id', $record['extra']); - $this->assertInternalType('int', $record['extra']['process_id']); - $this->assertGreaterThan(0, $record['extra']['process_id']); - $this->assertEquals(getmypid(), $record['extra']['process_id']); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php deleted file mode 100644 index 7ced62ca..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class UidProcessorTest extends TestCase -{ - /** - * @covers Monolog\Processor\UidProcessor::__invoke - */ - public function testProcessor() - { - $processor = new UidProcessor(); - $record = $processor($this->getRecord()); - $this->assertArrayHasKey('uid', $record['extra']); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php deleted file mode 100644 index 04a54221..00000000 --- a/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\TestCase; - -class WebProcessorTest extends TestCase -{ - public function testProcessor() - { - $server = array( - 'REQUEST_URI' => 'A', - 'REMOTE_ADDR' => 'B', - 'REQUEST_METHOD' => 'C', - 'HTTP_REFERER' => 'D', - 'SERVER_NAME' => 'F', - ); - - $processor = new WebProcessor($server); - $record = $processor($this->getRecord()); - $this->assertEquals($server['REQUEST_URI'], $record['extra']['url']); - $this->assertEquals($server['REMOTE_ADDR'], $record['extra']['ip']); - $this->assertEquals($server['REQUEST_METHOD'], $record['extra']['http_method']); - $this->assertEquals($server['HTTP_REFERER'], $record['extra']['referrer']); - $this->assertEquals($server['SERVER_NAME'], $record['extra']['server']); - } - - public function testProcessorDoNothingIfNoRequestUri() - { - $server = array( - 'REMOTE_ADDR' => 'B', - 'REQUEST_METHOD' => 'C', - ); - $processor = new WebProcessor($server); - $record = $processor($this->getRecord()); - $this->assertEmpty($record['extra']); - } - - public function testProcessorReturnNullIfNoHttpReferer() - { - $server = array( - 'REQUEST_URI' => 'A', - 'REMOTE_ADDR' => 'B', - 'REQUEST_METHOD' => 'C', - 'SERVER_NAME' => 'F', - ); - $processor = new WebProcessor($server); - $record = $processor($this->getRecord()); - $this->assertNull($record['extra']['referrer']); - } - - /** - * @expectedException UnexpectedValueException - */ - public function testInvalidData() - { - new WebProcessor(new \stdClass); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php b/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php deleted file mode 100644 index ab899449..00000000 --- a/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Monolog\Handler\TestHandler; -use Monolog\Formatter\LineFormatter; -use Monolog\Processor\PsrLogMessageProcessor; -use Psr\Log\Test\LoggerInterfaceTest; - -class PsrLogCompatTest extends LoggerInterfaceTest -{ - private $handler; - - public function getLogger() - { - $logger = new Logger('foo'); - $logger->pushHandler($handler = new TestHandler); - $logger->pushProcessor(new PsrLogMessageProcessor); - $handler->setFormatter(new LineFormatter('%level_name% %message%')); - - $this->handler = $handler; - - return $logger; - } - - public function getLogs() - { - $convert = function ($record) { - $lower = function ($match) { - return strtolower($match[0]); - }; - - return preg_replace_callback('{^[A-Z]+}', $lower, $record['formatted']); - }; - - return array_map($convert, $this->handler->getRecords()); - } -} diff --git a/vendor/monolog/monolog/tests/Monolog/TestCase.php b/vendor/monolog/monolog/tests/Monolog/TestCase.php deleted file mode 100644 index 1067b919..00000000 --- a/vendor/monolog/monolog/tests/Monolog/TestCase.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -class TestCase extends \PHPUnit_Framework_TestCase -{ - /** - * @return array Record - */ - protected function getRecord($level = Logger::WARNING, $message = 'test', $context = array()) - { - return array( - 'message' => $message, - 'context' => $context, - 'level' => $level, - 'level_name' => Logger::getLevelName($level), - 'channel' => 'test', - 'datetime' => \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true))), - 'extra' => array(), - ); - } - - /** - * @return array - */ - protected function getMultipleRecords() - { - return array( - $this->getRecord(Logger::DEBUG, 'debug message 1'), - $this->getRecord(Logger::DEBUG, 'debug message 2'), - $this->getRecord(Logger::INFO, 'information'), - $this->getRecord(Logger::WARNING, 'warning'), - $this->getRecord(Logger::ERROR, 'error') - ); - } - - /** - * @return Monolog\Formatter\FormatterInterface - */ - protected function getIdentityFormatter() - { - $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); - $formatter->expects($this->any()) - ->method('format') - ->will($this->returnCallback(function($record) { return $record['message']; })); - - return $formatter; - } -} diff --git a/vendor/monolog/monolog/tests/bootstrap.php b/vendor/monolog/monolog/tests/bootstrap.php deleted file mode 100644 index 189f4a68..00000000 --- a/vendor/monolog/monolog/tests/bootstrap.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -$loader = require_once __DIR__ . "/../vendor/autoload.php"; -$loader->add('Monolog\\', __DIR__); diff --git a/vendor/nesbot/carbon/.gitignore b/vendor/nesbot/carbon/.gitignore deleted file mode 100644 index 08db745d..00000000 --- a/vendor/nesbot/carbon/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -vendor -composer.phar \ No newline at end of file diff --git a/vendor/nesbot/carbon/.travis.yml b/vendor/nesbot/carbon/.travis.yml deleted file mode 100644 index 1c74466c..00000000 --- a/vendor/nesbot/carbon/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: php - -php: - - 5.3 - - 5.4 - -script: phpunit --coverage-text \ No newline at end of file diff --git a/vendor/nesbot/carbon/Carbon/Carbon.php b/vendor/nesbot/carbon/Carbon/Carbon.php deleted file mode 100644 index d88b8719..00000000 --- a/vendor/nesbot/carbon/Carbon/Carbon.php +++ /dev/null @@ -1,724 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -class Carbon extends \DateTime -{ - const SUNDAY = 0; - const MONDAY = 1; - const TUESDAY = 2; - const WEDNESDAY = 3; - const THURSDAY = 4; - const FRIDAY = 5; - const SATURDAY = 6; - - const MONTHS_PER_YEAR = 12; - const HOURS_PER_DAY = 24; - const MINUTES_PER_HOUR = 60; - const SECONDS_PER_MINUTE = 60; - - protected static function safeCreateDateTimeZone($object) - { - if ($object instanceof \DateTimeZone) { - return $object; - } - - $tz = @timezone_open((string) $object); - - if ($tz === false) { - throw new \InvalidArgumentException('Unknown or bad timezone ('.$object.')'); - } - - return $tz; - } - - public function __construct($time = null, $tz = null) - { - if ($tz !== null) { - parent::__construct($time, self::safeCreateDateTimeZone($tz)); - } else { - parent::__construct($time); - } - } - - public static function instance(\DateTime $dt) - { - return new self($dt->format('Y-m-d H:i:s'), $dt->getTimeZone()); - } - - public static function now($tz = null) - { - return new self(null, $tz); - } - public static function today($tz = null) - { - return Carbon::now($tz)->startOfDay(); - } - public static function tomorrow($tz = null) - { - return Carbon::today($tz)->addDay(); - } - public static function yesterday($tz = null) - { - return Carbon::today($tz)->subDay(); - } - public static function create($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) - { - $year = ($year === null) ? date('Y') : $year; - $month = ($month === null) ? date('n') : $month; - $day = ($day === null) ? date('j') : $day; - - if ($hour === null) { - $hour = date('G'); - $minute = ($minute === null) ? date('i') : $minute; - $second = ($second === null) ? date('s') : $second; - } else { - $minute = ($minute === null) ? 0 : $minute; - $second = ($second === null) ? 0 : $second; - } - - return self::createFromFormat('Y-n-j G:i:s', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); - } - public static function createFromDate($year = null, $month = null, $day = null, $tz = null) - { - return self::create($year, $month, $day, null, null, null, $tz); - } - public static function createFromTime($hour = null, $minute = null, $second = null, $tz = null) - { - return self::create(null, null, null, $hour, $minute, $second, $tz); - } - public static function createFromFormat($format, $time, $object = null) - { - if ($object !== null) { - $dt = parent::createFromFormat($format, $time, self::safeCreateDateTimeZone($object)); - } else { - $dt = parent::createFromFormat($format, $time); - } - - if ($dt instanceof \DateTime) { - return self::instance($dt); - } - - $errors = \DateTime::getLastErrors(); - throw new \InvalidArgumentException(implode(PHP_EOL, $errors['errors'])); - } - public static function createFromTimestamp($timestamp, $tz = null) - { - return self::now($tz)->setTimestamp($timestamp); - } - public static function createFromTimestampUTC($timestamp) - { - return new self('@'.$timestamp); - } - - public function copy() - { - return self::instance($this); - } - - public function __get($name) - { - if ($name == 'year') return intval($this->format('Y')); - if ($name == 'month') return intval($this->format('n')); - if ($name == 'day') return intval($this->format('j')); - if ($name == 'hour') return intval($this->format('G')); - if ($name == 'minute') return intval($this->format('i')); - if ($name == 'second') return intval($this->format('s')); - if ($name == 'dayOfWeek') return intval($this->format('w')); - if ($name == 'dayOfYear') return intval($this->format('z')); - if ($name == 'weekOfYear') return intval($this->format('W')); - if ($name == 'daysInMonth') return intval($this->format('t')); - if ($name == 'timestamp') return intval($this->format('U')); - if ($name == 'age') return intval($this->diffInYears()); - if ($name == 'quarter') return intval(($this->month - 1) / 3) + 1; - if ($name == 'offset') return $this->getOffset(); - if ($name == 'offsetHours') return $this->getOffset() / self::SECONDS_PER_MINUTE / self::MINUTES_PER_HOUR; - if ($name == 'dst') return $this->format('I') == '1'; - if ($name == 'timezone') return $this->getTimezone(); - if ($name == 'timezoneName') return $this->getTimezone()->getName(); - if ($name == 'tz') return $this->timezone; - if ($name == 'tzName') return $this->timezoneName; - throw new \InvalidArgumentException(sprintf("Unknown getter '%s'", $name)); - } - public function __isset($name) - { - try { - $this->__get($name); - } catch (\InvalidArgumentException $e) { - return false; - } - return true; - } - public function __set($name, $value) - { - switch ($name) { - case 'year': - parent::setDate($value, $this->month, $this->day); - break; - case 'month': - parent::setDate($this->year, $value, $this->day); - break; - case 'day': - parent::setDate($this->year, $this->month, $value); - break; - case 'hour': - parent::setTime($value, $this->minute, $this->second); - break; - case 'minute': - parent::setTime($this->hour, $value, $this->second); - break; - case 'second': - parent::setTime($this->hour, $this->minute, $value); - break; - case 'timestamp': - parent::setTimestamp($value); - break; - case 'timezone': - $this->setTimezone($value); - break; - case 'tz': - $this->setTimezone($value); - break; - default: - throw new \InvalidArgumentException(sprintf("Unknown setter '%s'", $name)); - } - } - public function year($value) - { - $this->year = $value; - - return $this; - } - public function month($value) - { - $this->month = $value; - - return $this; - } - public function day($value) - { - $this->day = $value; - - return $this; - } - public function setDate($year, $month, $day) - { - return $this->year($year)->month($month)->day($day); - } - public function hour($value) - { - $this->hour = $value; - - return $this; - } - public function minute($value) - { - $this->minute = $value; - - return $this; - } - public function second($value) - { - $this->second = $value; - - return $this; - } - public function setTime($hour, $minute, $second = 0) - { - return $this->hour($hour)->minute($minute)->second($second); - } - public function setDateTime($year, $month, $day, $hour, $minute, $second) - { - return $this->setDate($year, $month, $day)->setTime($hour, $minute, $second); - } - public function timestamp($value) - { - $this->timestamp = $value; - - return $this; - } - public function timezone($value) - { - return $this->setTimezone($value); - } - public function tz($value) - { - return $this->setTimezone($value); - } - public function setTimezone($value) - { - parent::setTimezone(self::safeCreateDateTimeZone($value)); - - return $this; - } - - public function __toString() - { - return $this->toDateTimeString(); - } - public function toDateString() - { - return $this->format('Y-m-d'); - } - public function toFormattedDateString() - { - return $this->format('M j, Y'); - } - public function toTimeString() - { - return $this->format('H:i:s'); - } - public function toDateTimeString() - { - return $this->format('Y-m-d H:i:s'); - } - public function toDayDateTimeString() - { - return $this->format('D, M j, Y g:i A'); - } - public function toATOMString() - { - return $this->format(\DateTime::ATOM); - } - public function toCOOKIEString() - { - return $this->format(\DateTime::COOKIE); - } - public function toISO8601String() - { - return $this->format(\DateTime::ISO8601); - } - public function toRFC822String() - { - return $this->format(\DateTime::RFC822); - } - public function toRFC850String() - { - return $this->format(\DateTime::RFC850); - } - public function toRFC1036String() - { - return $this->format(\DateTime::RFC1036); - } - public function toRFC1123String() - { - return $this->format(\DateTime::RFC1123); - } - public function toRFC2822String() - { - return $this->format(\DateTime::RFC2822); - } - public function toRFC3339String() - { - return $this->format(\DateTime::RFC3339); - } - public function toRSSString() - { - return $this->format(\DateTime::RSS); - } - public function toW3CString() - { - return $this->format(\DateTime::W3C); - } - - public function eq(Carbon $dt) - { - return $this == $dt; - } - public function ne(Carbon $dt) - { - return !$this->eq($dt); - } - public function gt(Carbon $dt) - { - return $this > $dt; - } - public function gte(Carbon $dt) - { - return $this >= $dt; - } - public function lt(Carbon $dt) - { - return $this < $dt; - } - public function lte(Carbon $dt) - { - return $this <= $dt; - } - public function isWeekday() - { - return ($this->dayOfWeek != self::SUNDAY && $this->dayOfWeek != self::SATURDAY); - } - public function isWeekend() - { - return !$this->isWeekDay(); - } - public function isYesterday() - { - return $this->toDateString() === self::now($this->tz)->subDay()->toDateString(); - } - public function isToday() - { - return $this->toDateString() === self::now($this->tz)->toDateString(); - } - public function isTomorrow() - { - return $this->toDateString() === self::now($this->tz)->addDay()->toDateString(); - } - public function isFuture() - { - return $this->gt(self::now($this->tz)); - } - public function isPast() - { - return !$this->isFuture(); - } - public function isLeapYear() - { - return $this->format('L') == '1'; - } - - public function addYears($value) - { - $interval = new \DateInterval(sprintf("P%dY", abs($value))); - if ($value >= 0) { - $this->add($interval); - } else { - $this->sub($interval); - } - - return $this; - } - public function addYear() - { - return $this->addYears(1); - } - public function subYear() - { - return $this->addYears(-1); - } - public function subYears($value) - { - return $this->addYears(-1 * $value); - } - public function addMonths($value) - { - $interval = new \DateInterval(sprintf("P%dM", abs($value))); - if ($value >= 0) { - $this->add($interval); - } else { - $this->sub($interval); - } - - return $this; - } - public function addMonth() - { - return $this->addMonths(1); - } - public function subMonth() - { - return $this->addMonths(-1); - } - public function subMonths($value) - { - return $this->addMonths(-1 * $value); - } - public function addDays($value) - { - $interval = new \DateInterval(sprintf("P%dD", abs($value))); - if ($value >= 0) { - $this->add($interval); - } else { - $this->sub($interval); - } - - return $this; - } - public function addDay() - { - return $this->addDays(1); - } - public function subDay() - { - return $this->addDays(-1); - } - public function subDays($value) - { - return $this->addDays(-1 * $value); - } - public function addWeekdays($value) - { - $absValue = abs($value); - $direction = $value < 0 ? -1 : 1; - - while ($absValue > 0) { - $this->addDays($direction); - - while ($this->isWeekend()) { - $this->addDays($direction); - } - - $absValue--; - } - - return $this; - } - public function addWeekday() - { - return $this->addWeekdays(1); - } - public function subWeekday() - { - return $this->addWeekdays(-1); - } - public function subWeekdays($value) - { - return $this->addWeekdays(-1 * $value); - } - public function addWeeks($value) - { - $interval = new \DateInterval(sprintf("P%dW", abs($value))); - if ($value >= 0) { - $this->add($interval); - } else { - $this->sub($interval); - } - - return $this; - } - public function addWeek() - { - return $this->addWeeks(1); - } - public function subWeek() - { - return $this->addWeeks(-1); - } - public function subWeeks($value) - { - return $this->addWeeks(-1 * $value); - } - public function addHours($value) - { - $interval = new \DateInterval(sprintf("PT%dH", abs($value))); - if ($value >= 0) { - $this->add($interval); - } else { - $this->sub($interval); - } - - return $this; - } - public function addHour() - { - return $this->addHours(1); - } - public function subHour() - { - return $this->addHours(-1); - } - public function subHours($value) - { - return $this->addHours(-1 * $value); - } - public function addMinutes($value) - { - $interval = new \DateInterval(sprintf("PT%dM", abs($value))); - if ($value >= 0) { - $this->add($interval); - } else { - $this->sub($interval); - } - - return $this; - } - public function addMinute() - { - return $this->addMinutes(1); - } - public function subMinute() - { - return $this->addMinutes(-1); - } - public function subMinutes($value) - { - return $this->addMinutes(-1 * $value); - } - public function addSeconds($value) - { - $interval = new \DateInterval(sprintf("PT%dS", abs($value))); - if ($value >= 0) { - $this->add($interval); - } else { - $this->sub($interval); - } - - return $this; - } - public function addSecond() - { - return $this->addSeconds(1); - } - public function subSecond() - { - return $this->addSeconds(-1); - } - public function subSeconds($value) - { - return $this->addSeconds(-1 * $value); - } - - public function startOfDay() - { - return $this->hour(0)->minute(0)->second(0); - } - public function endOfDay() - { - return $this->hour(23)->minute(59)->second(59); - } - public function startOfMonth() - { - return $this->startOfDay()->day(1); - } - public function endOfMonth() - { - return $this->day($this->daysInMonth)->endOfDay(); - } - - public function diffInYears(Carbon $dt = null, $abs = true) - { - $dt = ($dt === null) ? Carbon::now($this->tz) : $dt; - $sign = ($abs) ? '' : '%r'; - - return intval($this->diff($dt)->format($sign.'%y')); - } - public function diffInMonths(Carbon $dt = null, $abs = true) - { - $dt = ($dt === null) ? Carbon::now($this->tz) : $dt; - list($sign, $years, $months) = explode(':', $this->diff($dt)->format('%r:%y:%m')); - $value = ($years * self::MONTHS_PER_YEAR) + $months; - - if ($sign === '-' && !$abs) { - $value = $value * -1; - } - - return $value; - } - public function diffInDays(Carbon $dt = null, $abs = true) - { - $dt = ($dt === null) ? Carbon::now($this->tz) : $dt; - $sign = ($abs) ? '' : '%r'; - - return intval($this->diff($dt)->format($sign.'%a')); - } - public function diffInHours(Carbon $dt = null, $abs = true) - { - $dt = ($dt === null) ? Carbon::now($this->tz) : $dt; - - return intval($this->diffInMinutes($dt, $abs) / self::MINUTES_PER_HOUR); - } - public function diffInMinutes(Carbon $dt = null, $abs = true) - { - $dt = ($dt === null) ? Carbon::now($this->tz) : $dt; - - return intval($this->diffInSeconds($dt, $abs) / self::SECONDS_PER_MINUTE); - } - public function diffInSeconds(Carbon $dt = null, $abs = true) - { - $dt = ($dt === null) ? Carbon::now($this->tz) : $dt; - list($sign, $days, $hours, $minutes, $seconds) = explode(':', $this->diff($dt)->format('%r:%a:%h:%i:%s')); - $value = ($days * self::HOURS_PER_DAY * self::MINUTES_PER_HOUR * self::SECONDS_PER_MINUTE) + - ($hours * self::MINUTES_PER_HOUR * self::SECONDS_PER_MINUTE) + - ($minutes * self::SECONDS_PER_MINUTE) + - $seconds; - - if ($sign === '-' && !$abs) { - $value = $value * -1; - } - - return intval($value); - } - - /** - * When comparing a value in the past to default now: - * 1 hour ago - * 5 months ago - * - * When comparing a value in the future to default now: - * 1 hour from now - * 5 months from now - * - * When comparing a value in the past to another value: - * 1 hour before - * 5 months before - * - * When comparing a value in the future to another value: - * 1 hour after - * 5 months after - */ - public function diffForHumans(Carbon $other = null) - { - $txt = ''; - - $isNow = $other === null; - - if ($isNow) { - $other = self::now(); - } - - $isFuture = $this->gt($other); - - $delta = abs($other->diffInSeconds($this)); - - // 30 days per month, 365 days per year... good enough!! - $divs = array( - 'second' => self::SECONDS_PER_MINUTE, - 'minute' => self::MINUTES_PER_HOUR, - 'hour' => self::HOURS_PER_DAY, - 'day' => 30, - 'month' => 12 - ); - - $unit = 'year'; - - foreach ($divs as $divUnit => $divValue) { - if ($delta < $divValue) { - $unit = $divUnit; - break; - } - - $delta = floor($delta / $divValue); - } - - if ($delta == 0) { - $delta = 1; - } - - $txt = $delta . ' ' . $unit; - $txt .= $delta == 1 ? '' : 's'; - - if ($isNow) { - if ($isFuture) { - return $txt . ' from now'; - } - - return $txt . ' ago'; - } - - if ($isFuture) { - return $txt . ' after'; - } - - return $txt . ' before'; - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/AddTest.php b/vendor/nesbot/carbon/Carbon/Tests/AddTest.php deleted file mode 100644 index 637d0cac..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/AddTest.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class AddTest extends TestFixture -{ - public function testAddYearsPositive() - { - $this->assertSame(1976, Carbon::createFromDate(1975)->addYears(1)->year); - } - public function testAddYearsZero() - { - $this->assertSame(1975, Carbon::createFromDate(1975)->addYears(0)->year); - } - public function testAddYearsNegative() - { - $this->assertSame(1974, Carbon::createFromDate(1975)->addYears(-1)->year); - } - - public function testAddYear() - { - $this->assertSame(1976, Carbon::createFromDate(1975)->addYear()->year); - } - - public function testAddMonthsPositive() - { - $this->assertSame(1, Carbon::createFromDate(1975, 12)->addMonths(1)->month); - } - public function testAddMonthsZero() - { - $this->assertSame(12, Carbon::createFromDate(1975, 12)->addMonths(0)->month); - } - public function testAddMonthsNegative() - { - $this->assertSame(11, Carbon::createFromDate(1975, 12, 1)->addMonths(-1)->month); - } - - public function testAddMonth() - { - $this->assertSame(1, Carbon::createFromDate(1975, 12)->addMonth()->month); - } - public function testAddMonthWithOverflow() - { - $this->assertSame(3, Carbon::createFromDate(2012, 1, 31)->addMonth()->month); - } - - public function testAddDaysPositive() - { - $this->assertSame(1, Carbon::createFromDate(1975, 5, 31)->addDays(1)->day); - } - public function testAddDaysZero() - { - $this->assertSame(31, Carbon::createFromDate(1975, 5, 31)->addDays(0)->day); - } - public function testAddDaysNegative() - { - $this->assertSame(30, Carbon::createFromDate(1975, 5, 31)->addDays(-1)->day); - } - - public function testAddDay() - { - $this->assertSame(1, Carbon::createFromDate(1975, 5, 31)->addDay()->day); - } - - public function testAddWeekdaysPositive() - { - $this->assertSame(17, Carbon::createFromDate(2012, 1, 4)->addWeekdays(9)->day); - } - public function testAddWeekdaysZero() - { - $this->assertSame(4, Carbon::createFromDate(2012, 1, 4)->addWeekdays(0)->day); - } - public function testAddWeekdaysNegative() - { - $this->assertSame(18, Carbon::createFromDate(2012, 1, 31)->addWeekdays(-9)->day); - } - - public function testAddWeekday() - { - $this->assertSame(9, Carbon::createFromDate(2012, 1, 6)->addWeekday()->day); - } - - public function testAddWeeksPositive() - { - $this->assertSame(28, Carbon::createFromDate(1975, 5, 21)->addWeeks(1)->day); - } - public function testAddWeeksZero() - { - $this->assertSame(21, Carbon::createFromDate(1975, 5, 21)->addWeeks(0)->day); - } - public function testAddWeeksNegative() - { - $this->assertSame(14, Carbon::createFromDate(1975, 5, 21)->addWeeks(-1)->day); - } - - public function testAddWeek() - { - $this->assertSame(28, Carbon::createFromDate(1975, 5, 21)->addWeek()->day); - } - - public function testAddHoursPositive() - { - $this->assertSame(1, Carbon::createFromTime(0)->addHours(1)->hour); - } - public function testAddHoursZero() - { - $this->assertSame(0, Carbon::createFromTime(0)->addHours(0)->hour); - } - public function testAddHoursNegative() - { - $this->assertSame(23, Carbon::createFromTime(0)->addHours(-1)->hour); - } - - public function testAddHour() - { - $this->assertSame(1, Carbon::createFromTime(0)->addHour()->hour); - } - - public function testAddMinutesPositive() - { - $this->assertSame(1, Carbon::createFromTime(0, 0)->addMinutes(1)->minute); - } - public function testAddMinutesZero() - { - $this->assertSame(0, Carbon::createFromTime(0, 0)->addMinutes(0)->minute); - } - public function testAddMinutesNegative() - { - $this->assertSame(59, Carbon::createFromTime(0, 0)->addMinutes(-1)->minute); - } - - public function testAddMinute() - { - $this->assertSame(1, Carbon::createFromTime(0, 0)->addMinute()->minute); - } - - public function testAddSecondsPositive() - { - $this->assertSame(1, Carbon::createFromTime(0, 0, 0)->addSeconds(1)->second); - } - public function testAddSecondsZero() - { - $this->assertSame(0, Carbon::createFromTime(0, 0, 0)->addSeconds(0)->second); - } - public function testAddSecondsNegative() - { - $this->assertSame(59, Carbon::createFromTime(0, 0, 0)->addSeconds(-1)->second); - } - - public function testAddSecond() - { - $this->assertSame(1, Carbon::createFromTime(0, 0, 0)->addSecond()->second); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/ComparisonTest.php b/vendor/nesbot/carbon/Carbon/Tests/ComparisonTest.php deleted file mode 100644 index 558bdaa3..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/ComparisonTest.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class ComparisonTest extends TestFixture -{ - public function testEqualToTrue() - { - $this->assertTrue(Carbon::createFromDate(2000, 1, 1)->eq(Carbon::createFromDate(2000, 1, 1))); - } - public function testEqualToFalse() - { - $this->assertFalse(Carbon::createFromDate(2000, 1, 1)->eq(Carbon::createFromDate(2000, 1, 2))); - } - public function testEqualWithTimezoneTrue() - { - $this->assertTrue(Carbon::create(2000, 1, 1, 12, 0, 0, 'America/Toronto')->eq(Carbon::create(2000, 1, 1, 9, 0, 0, 'America/Vancouver'))); - } - public function testEqualWithTimezoneFalse() - { - $this->assertFalse(Carbon::createFromDate(2000, 1, 1, 'America/Toronto')->eq(Carbon::createFromDate(2000, 1, 1, 'America/Vancouver'))); - } - - public function testNotEqualToTrue() - { - $this->assertTrue(Carbon::createFromDate(2000, 1, 1)->ne(Carbon::createFromDate(2000, 1, 2))); - } - public function testNotEqualToFalse() - { - $this->assertFalse(Carbon::createFromDate(2000, 1, 1)->ne(Carbon::createFromDate(2000, 1, 1))); - } - public function testNotEqualWithTimezone() - { - $this->assertTrue(Carbon::createFromDate(2000, 1, 1, 'America/Toronto')->ne(Carbon::createFromDate(2000, 1, 1, 'America/Vancouver'))); - } - - public function testGreaterThanTrue() - { - $this->assertTrue(Carbon::createFromDate(2000, 1, 1)->gt(Carbon::createFromDate(1999, 12, 31))); - } - public function testGreaterThanFalse() - { - $this->assertFalse(Carbon::createFromDate(2000, 1, 1)->gt(Carbon::createFromDate(2000, 1, 2))); - } - public function testGreaterThanWithTimezoneTrue() - { - $dt1 = Carbon::create(2000, 1, 1, 12, 0, 0, 'America/Toronto'); - $dt2 = Carbon::create(2000, 1, 1, 8, 59, 59, 'America/Vancouver'); - $this->assertTrue($dt1->gt($dt2)); - } - public function testGreaterThanWithTimezoneFalse() - { - $dt1 = Carbon::create(2000, 1, 1, 12, 0, 0, 'America/Toronto'); - $dt2 = Carbon::create(2000, 1, 1, 9, 0, 1, 'America/Vancouver'); - $this->assertFalse($dt1->gt($dt2)); - } - - public function testGreaterThanOrEqualTrue() - { - $this->assertTrue(Carbon::createFromDate(2000, 1, 1)->gte(Carbon::createFromDate(1999, 12, 31))); - } - public function testGreaterThanOrEqualTrueEqual() - { - $this->assertTrue(Carbon::createFromDate(2000, 1, 1)->gte(Carbon::createFromDate(2000, 1, 1))); - } - public function testGreaterThanOrEqualFalse() - { - $this->assertFalse(Carbon::createFromDate(2000, 1, 1)->gte(Carbon::createFromDate(2000, 1, 2))); - } - - public function testLessThanTrue() - { - $this->assertTrue(Carbon::createFromDate(2000, 1, 1)->lt(Carbon::createFromDate(2000, 1, 2))); - } - public function testLessThanFalse() - { - $this->assertFalse(Carbon::createFromDate(2000, 1, 1)->lt(Carbon::createFromDate(1999, 12, 31))); - } - - public function testLessThanOrEqualTrue() - { - $this->assertTrue(Carbon::createFromDate(2000, 1, 1)->lte(Carbon::createFromDate(2000, 1, 2))); - } - public function testLessThanOrEqualTrueEqual() - { - $this->assertTrue(Carbon::createFromDate(2000, 1, 1)->lte(Carbon::createFromDate(2000, 1, 1))); - } - public function testLessThanOrEqualFalse() - { - $this->assertFalse(Carbon::createFromDate(2000, 1, 1)->lte(Carbon::createFromDate(1999, 12, 31))); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/ConstructTest.php b/vendor/nesbot/carbon/Carbon/Tests/ConstructTest.php deleted file mode 100644 index b68b3290..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/ConstructTest.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class ConstructTest extends TestFixture -{ - public function testCreatesAnInstanceDefaultToNow() - { - $c = new Carbon(); - $now = Carbon::now(); - $this->assertEquals('Carbon\Carbon', get_class($c)); - $this->assertEquals($now->tzName, $c->tzName); - $this->assertCarbon($c, $now->year, $now->month, $now->day, $now->hour, $now->minute, $now->second); - } - - public function testWithFancyString() - { - $c = new Carbon('first day of January 2008'); - $this->assertCarbon($c, 2008, 1, 1, 0, 0, 0); - } - - public function testDefaultTimezone() - { - $c = new Carbon('now'); - $this->assertSame('America/Toronto', $c->tzName); - } - - public function testSettingTimezone() - { - $c = new Carbon('now', new \DateTimeZone('Europe/London')); - $this->assertSame('Europe/London', $c->tzName); - $this->assertSame(1, $c->offsetHours); - } - - public function testSettingTimezoneWithString() - { - $c = new Carbon('now', 'Asia/Tokyo'); - $this->assertSame('Asia/Tokyo', $c->tzName); - $this->assertSame(9, $c->offsetHours); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/CopyTest.php b/vendor/nesbot/carbon/Carbon/Tests/CopyTest.php deleted file mode 100644 index f7d143a9..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/CopyTest.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class CopyTest extends TestFixture -{ - public function testCopy() - { - $dating = Carbon::now(); - $dating2 = $dating->copy(); - $this->assertNotSame($dating, $dating2); - } - - public function testCopyEnsureTzIsCopied() - { - $dating = Carbon::createFromDate(2000, 1, 1, 'Europe/London'); - $dating2 = $dating->copy(); - $this->assertSame($dating->tzName, $dating2->tzName); - $this->assertSame($dating->offset, $dating2->offset); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/CreateFromDateTest.php b/vendor/nesbot/carbon/Carbon/Tests/CreateFromDateTest.php deleted file mode 100644 index 469ecb45..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/CreateFromDateTest.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class CreateFromDateTest extends TestFixture -{ - public function testCreateFromDateWithDefaults() - { - $d = Carbon::createFromDate(); - $this->assertSame($d->timestamp, Carbon::create(null, null, null, null, null, null)->timestamp); - } - - public function testCreateFromDate() - { - $d = Carbon::createFromDate(1975, 5, 21); - $this->assertCarbon($d, 1975, 5, 21); - } - - public function testCreateFromDateWithYear() - { - $d = Carbon::createFromDate(1975); - $this->assertSame(1975, $d->year); - } - - public function testCreateFromDateWithMonth() - { - $d = Carbon::createFromDate(null, 5); - $this->assertSame(5, $d->month); - } - - public function testCreateFromDateWithDay() - { - $d = Carbon::createFromDate(null, null, 21); - $this->assertSame(21, $d->day); - } - - public function testCreateFromDateWithTimezone() - { - $d = Carbon::createFromDate(1975, 5, 21, 'Europe/London'); - $this->assertCarbon($d, 1975, 5, 21); - $this->assertSame('Europe/London', $d->tzName); - } - - public function testCreateFromDateWithDateTimeZone() - { - $d = Carbon::createFromDate(1975, 5, 21, new \DateTimeZone('Europe/London')); - $this->assertCarbon($d, 1975, 5, 21); - $this->assertSame('Europe/London', $d->tzName); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/CreateFromFormatTest.php b/vendor/nesbot/carbon/Carbon/Tests/CreateFromFormatTest.php deleted file mode 100644 index 484959cd..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/CreateFromFormatTest.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class CreateFromFormatTest extends TestFixture -{ - public function testCreateFromFormatReturnsCarbon() - { - $d = Carbon::createFromFormat('Y-m-d H:i:s', '1975-05-21 22:32:11'); - $this->assertCarbon($d, 1975, 5, 21, 22, 32, 11); - $this->assertTrue($d instanceof Carbon); - } - - public function testCreateFromFormatWithTimezoneString() - { - $d = Carbon::createFromFormat('Y-m-d H:i:s', '1975-05-21 22:32:11', 'Europe/London'); - $this->assertCarbon($d, 1975, 5, 21, 22, 32, 11); - $this->assertSame('Europe/London', $d->tzName); - } - - public function testCreateFromFormatWithTimezone() - { - $d = Carbon::createFromFormat('Y-m-d H:i:s', '1975-05-21 22:32:11', new \DateTimeZone('Europe/London')); - $this->assertCarbon($d, 1975, 5, 21, 22, 32, 11); - $this->assertSame('Europe/London', $d->tzName); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/CreateFromTimeTest.php b/vendor/nesbot/carbon/Carbon/Tests/CreateFromTimeTest.php deleted file mode 100644 index 1fe3b58f..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/CreateFromTimeTest.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class CreateFromTimeTest extends TestFixture -{ - public function testCreateFromDateWithDefaults() - { - $d = Carbon::createFromTime(); - $this->assertSame($d->timestamp, Carbon::create(null, null, null, null, null, null)->timestamp); - } - - public function testCreateFromDate() - { - $d = Carbon::createFromTime(23, 5, 21); - $this->assertCarbon($d, Carbon::now()->year, Carbon::now()->month, Carbon::now()->day, 23, 5, 21); - } - - public function testCreateFromTimeWithHour() - { - $d = Carbon::createFromTime(22); - $this->assertSame(22, $d->hour); - $this->assertSame(0, $d->minute); - $this->assertSame(0, $d->second); - } - - public function testCreateFromTimeWithMinute() - { - $d = Carbon::createFromTime(null, 5); - $this->assertSame(5, $d->minute); - } - - public function testCreateFromTimeWithSecond() - { - $d = Carbon::createFromTime(null, null, 21); - $this->assertSame(21, $d->second); - } - - public function testCreateFromTimeWithDateTimeZone() - { - $d = Carbon::createFromTime(12, 0, 0, new \DateTimeZone('Europe/London')); - $this->assertCarbon($d, Carbon::now()->year, Carbon::now()->month, Carbon::now()->day, 12, 0, 0); - $this->assertSame('Europe/London', $d->tzName); - } - public function testCreateFromTimeWithTimeZoneString() - { - $d = Carbon::createFromTime(12, 0, 0, 'Europe/London'); - $this->assertCarbon($d, Carbon::now()->year, Carbon::now()->month, Carbon::now()->day, 12, 0, 0); - $this->assertSame('Europe/London', $d->tzName); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/CreateFromTimestampTest.php b/vendor/nesbot/carbon/Carbon/Tests/CreateFromTimestampTest.php deleted file mode 100644 index 4e352bfa..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/CreateFromTimestampTest.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class CreateFromTimestampTest extends TestFixture -{ - public function testCreateReturnsDatingInstance() - { - $d = Carbon::createFromTimestamp(Carbon::create(1975, 5, 21, 22, 32, 5)->timestamp); - $this->assertCarbon($d, 1975, 5, 21, 22, 32, 5); - } - - public function testCreateFromTimestampUsesDefaultTimezone() - { - $d = Carbon::createFromTimestamp(0); - - // We know Toronto is -5 since no DST in Jan - $this->assertSame(1969, $d->year); - $this->assertSame(-5 * 3600, $d->offset); - } - - public function testCreateFromTimestampWithDateTimeZone() - { - $d = Carbon::createFromTimestamp(0, new \DateTimeZone('UTC')); - $this->assertSame('UTC', $d->tzName); - $this->assertCarbon($d, 1970, 1, 1, 0, 0, 0); - } - public function testCreateFromTimestampWithString() - { - $d = Carbon::createFromTimestamp(0, 'UTC'); - $this->assertCarbon($d, 1970, 1, 1, 0, 0, 0); - $this->assertTrue($d->offset === 0); - $this->assertSame('UTC', $d->tzName); - } - - public function testCreateFromTimestampGMTDoesNotUseDefaultTimezone() - { - $d = Carbon::createFromTimestampUTC(0); - $this->assertCarbon($d, 1970, 1, 1, 0, 0, 0); - $this->assertTrue($d->offset === 0); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/CreateTest.php b/vendor/nesbot/carbon/Carbon/Tests/CreateTest.php deleted file mode 100644 index c0c15f87..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/CreateTest.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class CreateTest extends TestFixture -{ - public function testCreateReturnsDatingInstance() - { - $d = Carbon::create(); - $this->assertTrue($d instanceof Carbon); - } - - public function testCreateWithDefaults() - { - $d = Carbon::create(); - $this->assertSame($d->timestamp, Carbon::now()->timestamp); - } - - public function testCreateWithYear() - { - $d = Carbon::create(2012); - $this->assertSame(2012, $d->year); - } - public function testCreateWithInvalidYear() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::create(-3); - } - - public function testCreateWithMonth() - { - $d = Carbon::create(null, 3); - $this->assertSame(3, $d->month); - } - public function testCreateWithInvalidMonth() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::create(null, -5); - } - public function testCreateMonthWraps() - { - $d = Carbon::create(2011, 0, 1, 0, 0, 0); - $this->assertCarbon($d, 2010, 12, 1, 0, 0, 0); - } - - public function testCreateWithDay() - { - $d = Carbon::create(null, null, 21); - $this->assertSame(21, $d->day); - } - public function testCreateWithInvalidDay() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::create(null, null, -4); - } - public function testCreateDayWraps() - { - $d = Carbon::create(2011, 1, 40, 0, 0, 0); - $this->assertCarbon($d, 2011, 2, 9, 0, 0, 0); - } - - public function testCreateWithHourAndDefaultMinSecToZero() - { - $d = Carbon::create(null, null, null, 14); - $this->assertSame(14, $d->hour); - $this->assertSame(0, $d->minute); - $this->assertSame(0, $d->second); - } - public function testCreateWithInvalidHour() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::create(null, null, null, -1); - } - public function testCreateHourWraps() - { - $d = Carbon::create(2011, 1, 1, 24, 0, 0); - $this->assertCarbon($d, 2011, 1, 2, 0, 0, 0); - } - - public function testCreateWithMinute() - { - $d = Carbon::create(null, null, null, null, 58); - $this->assertSame(58, $d->minute); - } - public function testCreateWithInvalidMinute() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::create(2011, 1, 1, 0, -2, 0); - } - public function testCreateMinuteWraps() - { - $d = Carbon::create(2011, 1, 1, 0, 62, 0); - $this->assertCarbon($d, 2011, 1, 1, 1, 2, 0); - } - - public function testCreateWithSecond() - { - $d = Carbon::create(null, null, null, null, null, 59); - $this->assertSame(59, $d->second); - } - public function testCreateWithInvalidSecond() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::create(null, null, null, null, null, -2); - } - public function testCreateSecondsWrap() - { - $d = Carbon::create(2012, 1, 1, 0, 0, 61); - $this->assertCarbon($d, 2012, 1, 1, 0, 1, 1); - } - - public function testCreateWithDateTimeZone() - { - $d = Carbon::create(2012, 1, 1, 0, 0, 0, new \DateTimeZone('Europe/London')); - $this->assertCarbon($d, 2012, 1, 1, 0, 0, 0); - $this->assertSame('Europe/London', $d->tzName); - } - public function testCreateWithTimeZoneString() - { - $d = Carbon::create(2012, 1, 1, 0, 0, 0, 'Europe/London'); - $this->assertCarbon($d, 2012, 1, 1, 0, 0, 0); - $this->assertSame('Europe/London', $d->tzName); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/DiffTest.php b/vendor/nesbot/carbon/Carbon/Tests/DiffTest.php deleted file mode 100644 index daf78156..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/DiffTest.php +++ /dev/null @@ -1,438 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class DiffTest extends TestFixture -{ - public function testDiffInYearsPositive() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(1, $dt->diffInYears($dt->copy()->addYear())); - } - public function testDiffInYearsNegativeWithSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(-1, $dt->diffInYears($dt->copy()->subYear(), false)); - } - public function testDiffInYearsNegativeNoSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(1, $dt->diffInYears($dt->copy()->subYear())); - } - public function testDiffInYearsVsDefaultNow() - { - $this->assertSame(1, Carbon::now()->subYear()->diffInYears()); - } - public function testDiffInYearsEnsureIsTruncated() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(1, $dt->diffInYears($dt->copy()->addYear()->addMonths(7))); - } - - public function testDiffInMonthsPositive() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(13, $dt->diffInMonths($dt->copy()->addYear()->addMonth())); - } - public function testDiffInMonthsNegativeWithSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(-11, $dt->diffInMonths($dt->copy()->subYear()->addMonth(), false)); - } - public function testDiffInMonthsNegativeNoSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(11, $dt->diffInMonths($dt->copy()->subYear()->addMonth())); - } - public function testDiffInMonthsVsDefaultNow() - { - $this->assertSame(12, Carbon::now()->subYear()->diffInMonths()); - } - public function testDiffInMonthsEnsureIsTruncated() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(1, $dt->diffInMonths($dt->copy()->addMonth()->addDays(16))); - } - - public function testDiffInDaysPositive() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(366, $dt->diffInDays($dt->copy()->addYear())); - } - public function testDiffInDaysNegativeWithSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(-365, $dt->diffInDays($dt->copy()->subYear(), false)); - } - public function testDiffInDaysNegativeNoSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(365, $dt->diffInDays($dt->copy()->subYear())); - } - public function testDiffInDaysVsDefaultNow() - { - $this->assertSame(7, Carbon::now()->subWeek()->diffInDays()); - } - public function testDiffInDaysEnsureIsTruncated() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(1, $dt->diffInDays($dt->copy()->addDay()->addHours(13))); - } - - public function testDiffInHoursPositive() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(26, $dt->diffInHours($dt->copy()->addDay()->addHours(2))); - } - public function testDiffInHoursNegativeWithSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(-22, $dt->diffInHours($dt->copy()->subDay()->addHours(2), false)); - } - public function testDiffInHoursNegativeNoSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(22, $dt->diffInHours($dt->copy()->subDay()->addHours(2))); - } - public function testDiffInHoursVsDefaultNow() - { - $this->assertSame(48, Carbon::now()->subDays(2)->diffInHours()); - } - public function testDiffInHoursEnsureIsTruncated() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(1, $dt->diffInHours($dt->copy()->addHour()->addMinutes(31))); - } - - public function testDiffInMinutesPositive() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(62, $dt->diffInMinutes($dt->copy()->addHour()->addMinutes(2))); - } - public function testDiffInMinutesPositiveAlot() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(1502, $dt->diffInMinutes($dt->copy()->addHours(25)->addMinutes(2))); - } - public function testDiffInMinutesNegativeWithSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(-58, $dt->diffInMinutes($dt->copy()->subHour()->addMinutes(2), false)); - } - public function testDiffInMinutesNegativeNoSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(58, $dt->diffInMinutes($dt->copy()->subHour()->addMinutes(2))); - } - public function testDiffInMinutesVsDefaultNow() - { - $this->assertSame(60, Carbon::now()->subHour()->diffInMinutes()); - } - public function testDiffInMinutesEnsureIsTruncated() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(1, $dt->diffInMinutes($dt->copy()->addMinute()->addSeconds(31))); - } - - public function testDiffInSecondsPositive() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(62, $dt->diffInSeconds($dt->copy()->addMinute()->addSeconds(2))); - } - public function testDiffInSecondsPositiveAlot() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(7202, $dt->diffInSeconds($dt->copy()->addHours(2)->addSeconds(2))); - } - public function testDiffInSecondsNegativeWithSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(-58, $dt->diffInSeconds($dt->copy()->subMinute()->addSeconds(2), false)); - } - public function testDiffInSecondsNegativeNoSign() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(58, $dt->diffInSeconds($dt->copy()->subMinute()->addSeconds(2))); - } - public function testDiffInSecondsVsDefaultNow() - { - $this->assertSame(3600, Carbon::now()->subHour()->diffInSeconds()); - } - public function testDiffInSecondsEnsureIsTruncated() - { - $dt = Carbon::createFromDate(2000, 1, 1); - $this->assertSame(1, $dt->diffInSeconds($dt->copy()->addSeconds(1.9))); - } - - public function testDiffInSecondsWithTimezones() - { - $dtOttawa = Carbon::createFromDate(2000, 1, 1, 'America/Toronto'); - $dtVancouver = Carbon::createFromDate(2000, 1, 1, 'America/Vancouver'); - $this->assertSame(3*60*60, $dtOttawa->diffInSeconds($dtVancouver)); - } - public function testDiffInSecondsWithTimezonesAndVsDefault() - { - $dt = Carbon::now('America/Vancouver'); - $this->assertSame(0, $dt->diffInSeconds()); - } - - public function testDiffForHumansNowAndSecond() - { - $d = Carbon::now(); - $this->assertSame('1 second ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndSecondWithTimezone() - { - $d = Carbon::now('America/Vancouver'); - $this->assertSame('1 second ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndSeconds() - { - $d = Carbon::now()->subSeconds(2); - $this->assertSame('2 seconds ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndMinute() - { - $d = Carbon::now()->subMinute(); - $this->assertSame('1 minute ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndMinutes() - { - $d = Carbon::now()->subMinutes(2); - $this->assertSame('2 minutes ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndHour() - { - $d = Carbon::now()->subHour(); - $this->assertSame('1 hour ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndHours() - { - $d = Carbon::now()->subHours(2); - $this->assertSame('2 hours ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndDay() - { - $d = Carbon::now()->subDay(); - $this->assertSame('1 day ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndDays() - { - $d = Carbon::now()->subDays(2); - $this->assertSame('2 days ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndMonth() - { - $d = Carbon::now()->subMonth(); - $this->assertSame('1 month ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndMonths() - { - $d = Carbon::now()->subMonths(2); - $this->assertSame('2 months ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndYear() - { - $d = Carbon::now()->subYear(); - $this->assertSame('1 year ago', $d->diffForHumans()); - } - public function testDiffForHumansNowAndYears() - { - $d = Carbon::now()->subYears(2); - $this->assertSame('2 years ago', $d->diffForHumans()); - } - - public function testDiffForHumansNowAndFutureSecond() - { - $d = Carbon::now()->addSecond(); - $this->assertSame('1 second from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureSeconds() - { - $d = Carbon::now()->addSeconds(2); - $this->assertSame('2 seconds from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureMinute() - { - $d = Carbon::now()->addMinute(); - $this->assertSame('1 minute from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureMinutes() - { - $d = Carbon::now()->addMinutes(2); - $this->assertSame('2 minutes from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureHour() - { - $d = Carbon::now()->addHour(); - $this->assertSame('1 hour from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureHours() - { - $d = Carbon::now()->addHours(2); - $this->assertSame('2 hours from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureDay() - { - $d = Carbon::now()->addDay(); - $this->assertSame('1 day from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureDays() - { - $d = Carbon::now()->addDays(2); - $this->assertSame('2 days from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureMonth() - { - $d = Carbon::now()->addMonth(); - $this->assertSame('1 month from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureMonths() - { - $d = Carbon::now()->addMonths(2); - $this->assertSame('2 months from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureYear() - { - $d = Carbon::now()->addYear(); - $this->assertSame('1 year from now', $d->diffForHumans()); - } - public function testDiffForHumansNowAndFutureYears() - { - $d = Carbon::now()->addYears(2); - $this->assertSame('2 years from now', $d->diffForHumans()); - } - - public function testDiffForHumansOtherAndSecond() - { - $d = Carbon::now()->addSecond(); - $this->assertSame('1 second before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndSeconds() - { - $d = Carbon::now()->addSeconds(2); - $this->assertSame('2 seconds before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndMinute() - { - $d = Carbon::now()->addMinute(); - $this->assertSame('1 minute before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndMinutes() - { - $d = Carbon::now()->addMinutes(2); - $this->assertSame('2 minutes before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndHour() - { - $d = Carbon::now()->addHour(); - $this->assertSame('1 hour before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndHours() - { - $d = Carbon::now()->addHours(2); - $this->assertSame('2 hours before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndDay() - { - $d = Carbon::now()->addDay(); - $this->assertSame('1 day before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndDays() - { - $d = Carbon::now()->addDays(2); - $this->assertSame('2 days before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndMonth() - { - $d = Carbon::now()->addMonth(); - $this->assertSame('1 month before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndMonths() - { - $d = Carbon::now()->addMonths(2); - $this->assertSame('2 months before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndYear() - { - $d = Carbon::now()->addYear(); - $this->assertSame('1 year before', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndYears() - { - $d = Carbon::now()->addYears(2); - $this->assertSame('2 years before', Carbon::now()->diffForHumans($d)); - } - - public function testDiffForHumansOtherAndFutureSecond() - { - $d = Carbon::now()->subSecond(); - $this->assertSame('1 second after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureSeconds() - { - $d = Carbon::now()->subSeconds(2); - $this->assertSame('2 seconds after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureMinute() - { - $d = Carbon::now()->subMinute(); - $this->assertSame('1 minute after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureMinutes() - { - $d = Carbon::now()->subMinutes(2); - $this->assertSame('2 minutes after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureHour() - { - $d = Carbon::now()->subHour(); - $this->assertSame('1 hour after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureHours() - { - $d = Carbon::now()->subHours(2); - $this->assertSame('2 hours after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureDay() - { - $d = Carbon::now()->subDay(); - $this->assertSame('1 day after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureDays() - { - $d = Carbon::now()->subDays(2); - $this->assertSame('2 days after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureMonth() - { - $d = Carbon::now()->subMonth(); - $this->assertSame('1 month after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureMonths() - { - $d = Carbon::now()->subMonths(2); - $this->assertSame('2 months after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureYear() - { - $d = Carbon::now()->subYear(); - $this->assertSame('1 year after', Carbon::now()->diffForHumans($d)); - } - public function testDiffForHumansOtherAndFutureYears() - { - $d = Carbon::now()->subYears(2); - $this->assertSame('2 years after', Carbon::now()->diffForHumans($d)); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/FluidSettersTest.php b/vendor/nesbot/carbon/Carbon/Tests/FluidSettersTest.php deleted file mode 100644 index 3c3f4e32..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/FluidSettersTest.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class FluidSettersTest extends TestFixture -{ - public function testFluidYearSetter() - { - $d = Carbon::now(); - $this->assertTrue($d->year(1995) instanceof Carbon); - $this->assertSame(1995, $d->year); - } - - public function testFluidMonthSetter() - { - $d = Carbon::now(); - $this->assertTrue($d->month(3) instanceof Carbon); - $this->assertSame(3, $d->month); - } - public function testFluidMonthSetterWithWrap() - { - $d = Carbon::createFromDate(2012, 8, 21); - $this->assertTrue($d->month(13) instanceof Carbon); - $this->assertSame(1, $d->month); - } - - public function testFluidDaySetter() - { - $d = Carbon::now(); - $this->assertTrue($d->day(2) instanceof Carbon); - $this->assertSame(2, $d->day); - } - public function testFluidDaySetterWithWrap() - { - $d = Carbon::createFromDate(2000, 1, 1); - $this->assertTrue($d->day(32) instanceof Carbon); - $this->assertSame(1, $d->day); - } - - public function testFluidSetDate() - { - $d = Carbon::createFromDate(2000, 1, 1); - $this->assertTrue($d->setDate(1995, 13, 32) instanceof Carbon); - $this->assertCarbon($d, 1996, 2, 1); - } - - public function testFluidHourSetter() - { - $d = Carbon::now(); - $this->assertTrue($d->hour(2) instanceof Carbon); - $this->assertSame(2, $d->hour); - } - public function testFluidHourSetterWithWrap() - { - $d = Carbon::now(); - $this->assertTrue($d->hour(25) instanceof Carbon); - $this->assertSame(1, $d->hour); - } - - public function testFluidMinuteSetter() - { - $d = Carbon::now(); - $this->assertTrue($d->minute(2) instanceof Carbon); - $this->assertSame(2, $d->minute); - } - public function testFluidMinuteSetterWithWrap() - { - $d = Carbon::now(); - $this->assertTrue($d->minute(61) instanceof Carbon); - $this->assertSame(1, $d->minute); - } - - public function testFluidSecondSetter() - { - $d = Carbon::now(); - $this->assertTrue($d->second(2) instanceof Carbon); - $this->assertSame(2, $d->second); - } - public function testFluidSecondSetterWithWrap() - { - $d = Carbon::now(); - $this->assertTrue($d->second(62) instanceof Carbon); - $this->assertSame(2, $d->second); - } - - public function testFluidSetTime() - { - $d = Carbon::createFromDate(2000, 1, 1); - $this->assertTrue($d->setTime(25, 61, 61) instanceof Carbon); - $this->assertCarbon($d, 2000, 1, 2, 2, 2, 1); - } - - public function testFluidTimestampSetter() - { - $d = Carbon::now(); - $this->assertTrue($d->timestamp(10) instanceof Carbon); - $this->assertSame(10, $d->timestamp); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/GettersTest.php b/vendor/nesbot/carbon/Carbon/Tests/GettersTest.php deleted file mode 100644 index 20e8ac43..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/GettersTest.php +++ /dev/null @@ -1,200 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class GettersTest extends TestFixture -{ - public function testGettersThrowExceptionOnUnknownGetter() - { - $this->setExpectedException('InvalidArgumentException'); - Carbon::create(1234, 5, 6, 7, 8, 9)->sdfsdfss; - } - public function testYearGetter() - { - $d = Carbon::create(1234, 5, 6, 7, 8, 9); - $this->assertSame(1234, $d->year); - } - public function testMonthGetter() - { - $d = Carbon::create(1234, 5, 6, 7, 8, 9); - $this->assertSame(5, $d->month); - } - public function testDayGetter() - { - $d = Carbon::create(1234, 5, 6, 7, 8, 9); - $this->assertSame(6, $d->day); - } - public function testHourGetter() - { - $d = Carbon::create(1234, 5, 6, 7, 8, 9); - $this->assertSame(7, $d->hour); - } - public function testMinuteGetter() - { - $d = Carbon::create(1234, 5, 6, 7, 8, 9); - $this->assertSame(8, $d->minute); - } - public function testSecondGetter() - { - $d = Carbon::create(1234, 5, 6, 7, 8, 9); - $this->assertSame(9, $d->second); - } - public function testDayOfWeeGetter() - { - $d = Carbon::create(2012, 5, 7, 7, 8, 9); - $this->assertSame(Carbon::MONDAY, $d->dayOfWeek); - } - public function testDayOfYearGetter() - { - $d = Carbon::createFromDate(2012, 5, 7); - $this->assertSame(127, $d->dayOfYear); - } - public function testDaysInMonthGetter() - { - $d = Carbon::createFromDate(2012, 5, 7); - $this->assertSame(31, $d->daysInMonth); - } - public function testTimestampGetter() - { - $d = Carbon::create(); - $d->setTimezone('GMT'); - $this->assertSame(0, $d->setDateTime(1970, 1, 1, 0, 0, 0)->timestamp); - } - - public function testGetAge() - { - $d = Carbon::now(); - $this->assertSame(0, $d->age); - } - public function testGetAgeWithRealAge() - { - $d = Carbon::createFromDate(1975, 5, 21); - $age = intval(substr(date('Ymd') - date('Ymd', $d->timestamp), 0, -4)); - - $this->assertSame($age, $d->age); - } - - public function testGetQuarterFirst() - { - $d = Carbon::createFromDate(2012, 1, 1); - $this->assertSame(1, $d->quarter); - } - public function testGetQuarterFirstEnd() - { - $d = Carbon::createFromDate(2012, 3, 31); - $this->assertSame(1, $d->quarter); - } - public function testGetQuarterSecond() - { - $d = Carbon::createFromDate(2012, 4, 1); - $this->assertSame(2, $d->quarter); - } - public function testGetQuarterThird() - { - $d = Carbon::createFromDate(2012, 7, 1); - $this->assertSame(3, $d->quarter); - } - public function testGetQuarterFourth() - { - $d = Carbon::createFromDate(2012, 10, 1); - $this->assertSame(4, $d->quarter); - } - public function testGetQuarterFirstLast() - { - $d = Carbon::createFromDate(2012, 12, 31); - $this->assertSame(4, $d->quarter); - } - - public function testGetDstFalse() - { - $this->assertFalse(Carbon::createFromDate(2012, 1, 1, 'America/Toronto')->dst); - } - public function testGetDstTrue() - { - $this->assertTrue(Carbon::createFromDate(2012, 7, 1, 'America/Toronto')->dst); - } - - public function testOffsetForTorontoWithDST() - { - $this->assertSame(-18000, Carbon::createFromDate(2012, 1, 1, 'America/Toronto')->offset); - } - public function testOffsetForTorontoNoDST() - { - $this->assertSame(-14400, Carbon::createFromDate(2012, 6, 1, 'America/Toronto')->offset); - } - public function testOffsetForGMT() - { - $this->assertSame(0, Carbon::createFromDate(2012, 6, 1, 'GMT')->offset); - } - public function testOffsetHoursForTorontoWithDST() - { - $this->assertSame(-5, Carbon::createFromDate(2012, 1, 1, 'America/Toronto')->offsetHours); - } - public function testOffsetHoursForTorontoNoDST() - { - $this->assertSame(-4, Carbon::createFromDate(2012, 6, 1, 'America/Toronto')->offsetHours); - } - public function testOffsetHoursForGMT() - { - $this->assertSame(0, Carbon::createFromDate(2012, 6, 1, 'GMT')->offsetHours); - } - - public function testIsLeapYearTrue() - { - $this->assertTrue(Carbon::createFromDate(2012, 1, 1)->isLeapYear()); - } - public function testIsLeapYearFalse() - { - $this->assertFalse(Carbon::createFromDate(2011, 1, 1)->isLeapYear()); - } - - public function testWeekOfYearFirstWeek() - { - $this->assertSame(52, Carbon::createFromDate(2012, 1, 1)->weekOfYear); - $this->assertSame(1, Carbon::createFromDate(2012, 1, 2)->weekOfYear); - } - public function testWeekOfYearLastWeek() - { - $this->assertSame(52, Carbon::createFromDate(2012, 12, 30)->weekOfYear); - $this->assertSame(1, Carbon::createFromDate(2012, 12, 31)->weekOfYear); - } - - public function testGetTimezone() - { - $dt = Carbon::createFromDate(2000, 1, 1, 'America/Toronto'); - $this->assertSame('America/Toronto', $dt->timezone->getName()); - } - public function testGetTz() - { - $dt = Carbon::createFromDate(2000, 1, 1, 'America/Toronto'); - $this->assertSame('America/Toronto', $dt->tz->getName()); - } - public function testGetTimezoneName() - { - $dt = Carbon::createFromDate(2000, 1, 1, 'America/Toronto'); - $this->assertSame('America/Toronto', $dt->timezoneName); - } - public function testGetTzName() - { - $dt = Carbon::createFromDate(2000, 1, 1, 'America/Toronto'); - $this->assertSame('America/Toronto', $dt->tzName); - } - - public function testInvalidGetter() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::now(); - $bb = $d->doesNotExit; - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/InstanceTest.php b/vendor/nesbot/carbon/Carbon/Tests/InstanceTest.php deleted file mode 100644 index 9c9c5831..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/InstanceTest.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class InstanceTest extends TestFixture -{ - public function testInstanceFromDateTime() - { - $dating = Carbon::instance(\DateTime::createFromFormat('Y-m-d H:i:s', '1975-05-21 22:32:11')); - $this->assertCarbon($dating, 1975, 5, 21, 22, 32, 11); - } - - public function testInstanceFromDateTimeKeepsTimezoneName() - { - $dating = Carbon::instance(\DateTime::createFromFormat('Y-m-d H:i:s', '1975-05-21 22:32:11')->setTimezone(new \DateTimeZone('America/Vancouver'))); - $this->assertSame('America/Vancouver', $dating->tzName); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/IsTest.php b/vendor/nesbot/carbon/Carbon/Tests/IsTest.php deleted file mode 100644 index ce414b36..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/IsTest.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class IsTest extends TestFixture -{ - public function testIsWeekdayTrue() - { - $this->assertTrue(Carbon::createFromDate(2012, 1, 2)->isWeekday()); - } - public function testIsWeekdayFalse() - { - $this->assertFalse(Carbon::createFromDate(2012, 1, 1)->isWeekday()); - } - public function testIsWeekendTrue() - { - $this->assertTrue(Carbon::createFromDate(2012, 1, 1)->isWeekend()); - } - public function testIsWeekendFalse() - { - $this->assertFalse(Carbon::createFromDate(2012, 1, 2)->isWeekend()); - } - - public function testIsYesterdayTrue() - { - $this->assertTrue(Carbon::now()->subDay()->isYesterday()); - } - public function testIsYesterdayFalseWithToday() - { - $this->assertFalse(Carbon::now()->endOfDay()->isYesterday()); - } - public function testIsYesterdayFalseWith2Days() - { - $this->assertFalse(Carbon::now()->subDays(2)->startOfDay()->isYesterday()); - } - - public function testIsTodayTrue() - { - $this->assertTrue(Carbon::now()->isToday()); - } - public function testIsTodayFalseWithYesterday() - { - $this->assertFalse(Carbon::now()->subDay()->endOfDay()->isToday()); - } - public function testIsTodayFalseWithTomorrow() - { - $this->assertFalse(Carbon::now()->addDay()->startOfDay()->isToday()); - } - public function testIsTodayWithTimezone() - { - $this->assertTrue(Carbon::now('Asia/Tokyo')->isToday()); - } - - public function testIsTomorrowTrue() - { - $this->assertTrue(Carbon::now()->addDay()->isTomorrow()); - } - public function testIsTomorrowFalseWithToday() - { - $this->assertFalse(Carbon::now()->endOfDay()->isTomorrow()); - } - public function testIsTomorrowFalseWith2Days() - { - $this->assertFalse(Carbon::now()->addDays(2)->startOfDay()->isTomorrow()); - } - - public function testIsFutureTrue() - { - $this->assertTrue(Carbon::now()->addSecond()->isFuture()); - } - public function testIsFutureFalse() - { - $this->assertFalse(Carbon::now()->isFuture()); - } - public function testIsFutureFalseInThePast() - { - $this->assertFalse(Carbon::now()->subSecond()->isFuture()); - } - - public function testIsPastTrue() - { - $this->assertTrue(Carbon::now()->subSecond()->isPast()); - } - public function testIsPast() - { - $this->assertFalse(Carbon::now()->addSecond()->isPast()); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/IssetTest.php b/vendor/nesbot/carbon/Carbon/Tests/IssetTest.php deleted file mode 100644 index 7b306594..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/IssetTest.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class IssetTest extends TestFixture -{ - public function testIssetReturnFalseForUnknownProperty() - { - $this->assertFalse(isset(Carbon::create(1234, 5, 6, 7, 8, 9)->sdfsdfss)); - } - public function testIssetReturnTrueForProperties() - { - $properties = array('year', 'month', 'day', 'hour', 'minute', 'second', 'dayOfWeek', 'dayOfYear', 'daysInMonth', 'timestamp', 'age', 'quarter', 'dst', 'offset', 'offsetHours', 'timezone', 'timezoneName', 'tz', 'tzName'); - foreach ($properties as $property) { - $this->assertTrue(isset(Carbon::create(1234, 5, 6, 7, 8, 9)->$property)); - } - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/NowAndOtherStaticHelpersTest.php b/vendor/nesbot/carbon/Carbon/Tests/NowAndOtherStaticHelpersTest.php deleted file mode 100644 index 84c44d4e..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/NowAndOtherStaticHelpersTest.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class NowAndOtherStaticHelpersTest extends TestFixture -{ - public function testNow() - { - $dt = Carbon::now(); - $this->assertSame(time(), $dt->timestamp); - } - public function testNowWithTimezone() - { - $dt = Carbon::now('Europe/London'); - $this->assertSame(time(), $dt->timestamp); - $this->assertSame('Europe/London', $dt->tzName); - } - - public function testToday() - { - $dt = Carbon::today(); - $this->assertSame(date('Y-m-d 00:00:00'), $dt->toDateTimeString()); - } - public function testTodayWithTimezone() - { - $dt = Carbon::today('Europe/London'); - $dt2 = new \DateTime('now', new \DateTimeZone('Europe/London')); - $this->assertSame($dt2->format('Y-m-d 00:00:00'), $dt->toDateTimeString()); - } - - public function testTomorrow() - { - $dt = Carbon::tomorrow(); - $dt2 = new \DateTime('tomorrow'); - $this->assertSame($dt2->format('Y-m-d 00:00:00'), $dt->toDateTimeString()); - } - public function testTomorrowWithTimezone() - { - $dt = Carbon::tomorrow('Europe/London'); - $dt2 = new \DateTime('tomorrow', new \DateTimeZone('Europe/London')); - $this->assertSame($dt2->format('Y-m-d 00:00:00'), $dt->toDateTimeString()); - } - - public function testYesterday() - { - $dt = Carbon::yesterday(); - $dt2 = new \DateTime('yesterday'); - $this->assertSame($dt2->format('Y-m-d 00:00:00'), $dt->toDateTimeString()); - } - public function testYesterdayWithTimezone() - { - $dt = Carbon::yesterday('Europe/London'); - $dt2 = new \DateTime('yesterday', new \DateTimeZone('Europe/London')); - $this->assertSame($dt2->format('Y-m-d 00:00:00'), $dt->toDateTimeString()); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/SettersTest.php b/vendor/nesbot/carbon/Carbon/Tests/SettersTest.php deleted file mode 100644 index 7b342fc6..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/SettersTest.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class SettersTest extends TestFixture -{ - public function testYearSetter() - { - $d = Carbon::now(); - $d->year = 1995; - $this->assertSame(1995, $d->year); - } - - public function testMonthSetter() - { - $d = Carbon::now(); - $d->month = 3; - $this->assertSame(3, $d->month); - } - public function testMonthSetterWithWrap() - { - $d = Carbon::now(); - $d->month = 13; - $this->assertSame(1, $d->month); - } - - public function testDaySetter() - { - $d = Carbon::now(); - $d->day = 2; - $this->assertSame(2, $d->day); - } - public function testDaySetterWithWrap() - { - $d = Carbon::createFromDate(2012, 8, 5); - $d->day = 32; - $this->assertSame(1, $d->day); - } - - public function testHourSetter() - { - $d = Carbon::now(); - $d->hour = 2; - $this->assertSame(2, $d->hour); - } - public function testHourSetterWithWrap() - { - $d = Carbon::now(); - $d->hour = 25; - $this->assertSame(1, $d->hour); - } - - public function testMinuteSetter() - { - $d = Carbon::now(); - $d->minute = 2; - $this->assertSame(2, $d->minute); - } - public function testMinuteSetterWithWrap() - { - $d = Carbon::now(); - $d->minute = 65; - $this->assertSame(5, $d->minute); - } - - public function testSecondSetter() - { - $d = Carbon::now(); - $d->second = 2; - $this->assertSame(2, $d->second); - } - public function testSecondSetterWithWrap() - { - $d = Carbon::now(); - $d->second = 65; - $this->assertSame(5, $d->second); - } - - public function testTimestampSetter() - { - $d = Carbon::now(); - $d->timestamp = 10; - $this->assertSame(10, $d->timestamp); - - $d->setTimestamp(11); - $this->assertSame(11, $d->timestamp); - } - - public function testSetTimezoneWithInvalidTimezone() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::now(); - $d->setTimezone('sdf'); - } - public function testTimezoneWithInvalidTimezone() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::now(); - $d->timezone = 'sdf'; - } - public function testTzWithInvalidTimezone() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::now(); - $d->tz = 'sdf'; - } - public function testSetTimezoneUsingString() - { - $d = Carbon::now(); - $d->setTimezone('America/Toronto'); - $this->assertSame('America/Toronto', $d->tzName); - } - public function testTimezoneUsingString() - { - $d = Carbon::now(); - $d->timezone = 'America/Toronto'; - $this->assertSame('America/Toronto', $d->tzName); - } - public function testTzUsingString() - { - $d = Carbon::now(); - $d->tz = 'America/Toronto'; - $this->assertSame('America/Toronto', $d->tzName); - } - public function testSetTimezoneUsingDateTimeZone() - { - $d = Carbon::now(); - $d->setTimezone(new \DateTimeZone('America/Toronto')); - $this->assertSame('America/Toronto', $d->tzName); - } - public function testTimezoneUsingDateTimeZone() - { - $d = Carbon::now(); - $d->timezone = new \DateTimeZone('America/Toronto'); - $this->assertSame('America/Toronto', $d->tzName); - } - public function testTzUsingDateTimeZone() - { - $d = Carbon::now(); - $d->tz = new \DateTimeZone('America/Toronto'); - $this->assertSame('America/Toronto', $d->tzName); - } - - public function testInvalidSetter() - { - $this->setExpectedException('InvalidArgumentException'); - $d = Carbon::now(); - $d->doesNotExit = 'bb'; - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/StartEndOfTest.php b/vendor/nesbot/carbon/Carbon/Tests/StartEndOfTest.php deleted file mode 100644 index 347e385c..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/StartEndOfTest.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class StartEndOfTest extends TestFixture -{ - public function testStartOfDay() - { - $dt = Carbon::now(); - $this->assertTrue($dt->startOfDay() instanceof Carbon); - $this->assertCarbon($dt, $dt->year, $dt->month, $dt->day, 0, 0, 0); - } - public function testEndOfDay() - { - $dt = Carbon::now(); - $this->assertTrue($dt->endOfDay() instanceof Carbon); - $this->assertCarbon($dt, $dt->year, $dt->month, $dt->day, 23, 59, 59); - } - - public function testStartOfMonthIsFluid() - { - $dt = Carbon::now(); - $this->assertTrue($dt->startOfMonth() instanceof Carbon); - } - public function testStartOfMonthFromNow() - { - $dt = Carbon::now()->startOfMonth(); - $this->assertCarbon($dt, $dt->year, $dt->month, 1, 0, 0, 0); - } - public function testStartOfMonthFromLastDay() - { - $dt = Carbon::create(2000, 1, 31, 2, 3, 4)->startOfMonth(); - $this->assertCarbon($dt, 2000, 1, 1, 0, 0, 0); - } - - public function testEndOfMonthIsFluid() - { - $dt = Carbon::now(); - $this->assertTrue($dt->endOfMonth() instanceof Carbon); - } - public function testEndOfMonth() - { - $dt = Carbon::create(2000, 1, 1, 2, 3, 4)->endOfMonth(); - $this->assertCarbon($dt, 2000, 1, 31, 23, 59, 59); - } - public function testEndOfMonthFromLastDay() - { - $dt = Carbon::create(2000, 1, 31, 2, 3, 4)->endOfMonth(); - $this->assertCarbon($dt, 2000, 1, 31, 23, 59, 59); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/StringsTest.php b/vendor/nesbot/carbon/Carbon/Tests/StringsTest.php deleted file mode 100644 index d8402ac2..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/StringsTest.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class StringsTest extends TestFixture -{ - public function testToString() - { - $d = Carbon::now(); - $this->assertSame(Carbon::now()->toDateTimeString(), ''.$d); - } - - public function testToDateString() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('1975-12-25', $d->toDateString()); - } - public function testToFormattedDateString() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('Dec 25, 1975', $d->toFormattedDateString()); - } - public function testToTimeString() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('14:15:16', $d->toTimeString()); - } - public function testToDateTimeString() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('1975-12-25 14:15:16', $d->toDateTimeString()); - } - public function testToDateTimeStringWithPaddedZeroes() - { - $d = Carbon::create(2000, 5, 2, 4, 3, 4); - $this->assertSame('2000-05-02 04:03:04', $d->toDateTimeString()); - } - public function testToDayDateTimeString() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('Thu, Dec 25, 1975 2:15 PM', $d->toDayDateTimeString()); - } - - public function testToATOMString() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('1975-12-25T14:15:16-05:00', $d->toATOMString()); - } - public function testToCOOKIEString() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('Thursday, 25-Dec-75 14:15:16 EST', $d->toCOOKIEString()); - } - public function testToISO8601String() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('1975-12-25T14:15:16-0500', $d->toISO8601String()); - } - public function testToRC822String() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('Thu, 25 Dec 75 14:15:16 -0500', $d->toRFC822String()); - } - public function testToRFC850String() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('Thursday, 25-Dec-75 14:15:16 EST', $d->toRFC850String()); - } - public function testToRFC1036String() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('Thu, 25 Dec 75 14:15:16 -0500', $d->toRFC1036String()); - } - public function testToRFC1123String() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('Thu, 25 Dec 1975 14:15:16 -0500', $d->toRFC1123String()); - } - public function testToRFC2822String() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('Thu, 25 Dec 1975 14:15:16 -0500', $d->toRFC2822String()); - } - public function testToRFC3339String() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('1975-12-25T14:15:16-05:00', $d->toRFC3339String()); - } - public function testToRSSString() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('Thu, 25 Dec 1975 14:15:16 -0500', $d->toRSSString()); - } - public function testToW3CString() - { - $d = Carbon::create(1975, 12, 25, 14, 15, 16); - $this->assertSame('1975-12-25T14:15:16-05:00', $d->toW3CString()); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/SubTest.php b/vendor/nesbot/carbon/Carbon/Tests/SubTest.php deleted file mode 100644 index 8b136f3d..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/SubTest.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -use Carbon\Carbon; - -class SubTest extends TestFixture -{ - public function testSubYearsPositive() - { - $this->assertSame(1974, Carbon::createFromDate(1975)->subYears(1)->year); - } - public function testSubYearsZero() - { - $this->assertSame(1975, Carbon::createFromDate(1975)->subYears(0)->year); - } - public function testSubYearsNegative() - { - $this->assertSame(1976, Carbon::createFromDate(1975)->subYears(-1)->year); - } - - public function testSubYear() - { - $this->assertSame(1974, Carbon::createFromDate(1975)->subYear()->year); - } - - public function testSubMonthsPositive() - { - $this->assertSame(12, Carbon::createFromDate(1975, 1, 1)->subMonths(1)->month); - } - public function testSubMonthsZero() - { - $this->assertSame(1, Carbon::createFromDate(1975, 1, 1)->subMonths(0)->month); - } - public function testSubMonthsNegative() - { - $this->assertSame(2, Carbon::createFromDate(1975, 1, 1)->subMonths(-1)->month); - } - - public function testSubMonth() - { - $this->assertSame(12, Carbon::createFromDate(1975, 1, 1)->subMonth()->month); - } - - public function testSubDaysPositive() - { - $this->assertSame(30, Carbon::createFromDate(1975, 5, 1)->subDays(1)->day); - } - public function testSubDaysZero() - { - $this->assertSame(1, Carbon::createFromDate(1975, 5, 1)->subDays(0)->day); - } - public function testSubDaysNegative() - { - $this->assertSame(2, Carbon::createFromDate(1975, 5, 1)->subDays(-1)->day); - } - - public function testSubDay() - { - $this->assertSame(30, Carbon::createFromDate(1975, 5, 1)->subDay()->day); - } - - public function testSubWeekdaysPositive() - { - $this->assertSame(22, Carbon::createFromDate(2012, 1, 4)->subWeekdays(9)->day); - } - public function testSubWeekdaysZero() - { - $this->assertSame(4, Carbon::createFromDate(2012, 1, 4)->subWeekdays(0)->day); - } - public function testSubWeekdaysNegative() - { - $this->assertSame(13, Carbon::createFromDate(2012, 1, 31)->subWeekdays(-9)->day); - } - - public function testSubWeekday() - { - $this->assertSame(6, Carbon::createFromDate(2012, 1, 9)->subWeekday()->day); - } - - public function testSubWeeksPositive() - { - $this->assertSame(14, Carbon::createFromDate(1975, 5, 21)->subWeeks(1)->day); - } - public function testSubWeeksZero() - { - $this->assertSame(21, Carbon::createFromDate(1975, 5, 21)->subWeeks(0)->day); - } - public function testSubWeeksNegative() - { - $this->assertSame(28, Carbon::createFromDate(1975, 5, 21)->subWeeks(-1)->day); - } - - public function testSubWeek() - { - $this->assertSame(14, Carbon::createFromDate(1975, 5, 21)->subWeek()->day); - } - - public function testSubHoursPositive() - { - $this->assertSame(23, Carbon::createFromTime(0)->subHours(1)->hour); - } - public function testSubHoursZero() - { - $this->assertSame(0, Carbon::createFromTime(0)->subHours(0)->hour); - } - public function testSubHoursNegative() - { - $this->assertSame(1, Carbon::createFromTime(0)->subHours(-1)->hour); - } - - public function testSubHour() - { - $this->assertSame(23, Carbon::createFromTime(0)->subHour()->hour); - } - - public function testSubMinutesPositive() - { - $this->assertSame(59, Carbon::createFromTime(0, 0)->subMinutes(1)->minute); - } - public function testSubMinutesZero() - { - $this->assertSame(0, Carbon::createFromTime(0, 0)->subMinutes(0)->minute); - } - public function testSubMinutesNegative() - { - $this->assertSame(1, Carbon::createFromTime(0, 0)->subMinutes(-1)->minute); - } - - public function testSubMinute() - { - $this->assertSame(59, Carbon::createFromTime(0, 0)->subMinute()->minute); - } - - public function testSubSecondsPositive() - { - $this->assertSame(59, Carbon::createFromTime(0, 0, 0)->subSeconds(1)->second); - } - public function testSubSecondsZero() - { - $this->assertSame(0, Carbon::createFromTime(0, 0, 0)->subSeconds(0)->second); - } - public function testSubSecondsNegative() - { - $this->assertSame(1, Carbon::createFromTime(0, 0, 0)->subSeconds(-1)->second); - } - - public function testSubSecond() - { - $this->assertSame(59, Carbon::createFromTime(0, 0, 0)->subSecond()->second); - } -} diff --git a/vendor/nesbot/carbon/Carbon/Tests/TestFixture.php b/vendor/nesbot/carbon/Carbon/Tests/TestFixture.php deleted file mode 100644 index 14bdaae1..00000000 --- a/vendor/nesbot/carbon/Carbon/Tests/TestFixture.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Tests; - -require __DIR__.'/../Carbon.php'; - -use Carbon\Carbon; - -class TestFixture extends \PHPUnit_Framework_TestCase -{ - private $saveTz; - - protected function setUp() - { - //save current timezone - $this->saveTz = date_default_timezone_get(); - - date_default_timezone_set('America/Toronto'); - } - - protected function tearDown() - { - date_default_timezone_set($this->saveTz); - } - - protected function assertCarbon(Carbon $d, $year, $month, $day, $hour = null, $minute = null, $second = null) - { - $this->assertSame($year, $d->year, 'Carbon->year'); - $this->assertSame($month, $d->month, 'Carbon->month'); - $this->assertSame($day, $d->day, 'Carbon->day'); - - if ($hour !== null) { - $this->assertSame($hour, $d->hour, 'Carbon->hour'); - } - - if ($minute !== null) { - $this->assertSame($minute, $d->minute, 'Carbon->minute'); - } - - if ($second !== null) { - $this->assertSame($second, $d->second, 'Carbon->second'); - } - } -} diff --git a/vendor/nesbot/carbon/LICENSE b/vendor/nesbot/carbon/LICENSE deleted file mode 100644 index 8957ee65..00000000 --- a/vendor/nesbot/carbon/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) Brian Nesbitt - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/vendor/nesbot/carbon/composer.json b/vendor/nesbot/carbon/composer.json deleted file mode 100644 index 088e8f0b..00000000 --- a/vendor/nesbot/carbon/composer.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "nesbot/carbon", - "type": "library", - "description": "A simple API extension for DateTime.", - "keywords": ["date", "time", "DateTime"], - "homepage": "https://github.com/briannesbitt/Carbon", - "license": "MIT", - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-0": { "Carbon": "." } - } -} \ No newline at end of file diff --git a/vendor/nesbot/carbon/composer.lock b/vendor/nesbot/carbon/composer.lock deleted file mode 100644 index 3303863f..00000000 --- a/vendor/nesbot/carbon/composer.lock +++ /dev/null @@ -1,14 +0,0 @@ -{ - "hash": "1a8cba1efd4312e4364bd5792738e2f6", - "packages": [ - - ], - "packages-dev": null, - "aliases": [ - - ], - "minimum-stability": "stable", - "stability-flags": [ - - ] -} diff --git a/vendor/nesbot/carbon/history.md b/vendor/nesbot/carbon/history.md deleted file mode 100644 index d63b5ace..00000000 --- a/vendor/nesbot/carbon/history.md +++ /dev/null @@ -1,27 +0,0 @@ -1.2.0 / 2012-10-14 -================== - - * Added history.md - * Implemented __isset() (thanks @flevour) - * Simplified tomorrow()/yesterday() to rely on today()... more DRY - * Simplified __set() and fixed exception text - * Updated readme - -1.1.0 / 2012-09-16 -================== - - * Updated composer.json - * Added better error messaging for failed readme generation - * Fixed readme typos - * Added static helpers `today()`, `tomorrow()`, `yesterday()` - * Simplified `now()` code - -1.0.1 / 2012-09-10 -================== - - * Added travis-ci.org - -1.0.0 / 2012-09-10 -================== - - * Initial release diff --git a/vendor/nesbot/carbon/phpunit.xml.dist b/vendor/nesbot/carbon/phpunit.xml.dist deleted file mode 100644 index 78c5a688..00000000 --- a/vendor/nesbot/carbon/phpunit.xml.dist +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - Carbon/Tests/ - - - \ No newline at end of file diff --git a/vendor/nesbot/carbon/readme.md b/vendor/nesbot/carbon/readme.md deleted file mode 100644 index 2ef2dd3f..00000000 --- a/vendor/nesbot/carbon/readme.md +++ /dev/null @@ -1,647 +0,0 @@ -> **This file is autogenerated. Please see the [Contributing](#about-contributing) section from more information.** - -# Carbon - -[![Build Status](https://secure.travis-ci.org/briannesbitt/Carbon.png)](http://travis-ci.org/briannesbitt/Carbon) - -A simple API extension for DateTime with PHP 5.3+ - -```php -printf("Right now is %s", Carbon::now()->toDateTimeString()); -printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString() -$tomorrow = Carbon::now()->addDay(); -$lastWeek = Carbon::now()->subWeek(); -$nextSummerOlympics = Carbon::createFromDate(2012)->addYears(4); - -$officialDate = Carbon::now()->toRFC2822String(); - -$howOldAmI = Carbon::createFromDate(1975, 5, 21)->age; - -$noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London'); - -$worldWillEnd = Carbon::createFromDate(2012, 12, 21, 'GMT'); - -// comparisons are always done in UTC -if (Carbon::now()->gte($worldWillEnd)) { - die(); -} - -if (Carbon::now()->isWeekend()) { - echo 'Party!'; -} - -echo Carbon::now()->subMinutes(2)->diffForHumans(); // '2 minutes ago' - -// ... but also does 'from now', 'after' and 'before' -// rolling up to seconds, minutes, hours, days, months, years - -$daysSinceEpoch = Carbon::createFromTimeStamp(0)->diffInDays(); -``` - -## README Contents - -* [Installation](#install) - * [Requirements](#requirements) - * [With composer](#install-composer) - * [Without composer](#install-nocomposer) -* [API](#api) - * [Instantiation](#api-instantiation) - * [Getters](#api-getters) - * [Setters](#api-setters) - * [Fluent Setters](#api-settersfluent) - * [IsSet](#api-isset) - * [Formatting and Strings](#api-formatting) - * [Common Formats](#api-commonformats) - * [Comparison](#api-comparison) - * [Addition and Subtraction](#api-addsub) - * [Difference](#api-difference) - * [Difference for Humans](#api-humandiff) - * [Constants](#api-constants) -* [About](#about) - * [Contributing](#about-contributing) - * [Author](#about-author) - * [License](#about-license) - * [History](#about-history) - * [Why the name Carbon?](#about-whyname) - - -## Installation - - -### Requirements - -- Any flavour of PHP 5.3+ should do -- [optional] PHPUnit to execute the test suite - - -### With Composer - -The easiest way to install Carbon is via [composer](http://getcomposer.org/). Create the following `composer.json` file and run the `php composer.phar install` command to install it. - -```json -{ - "require": { - "nesbot/Carbon": "*" - } -} -``` - -```php - -### Without Composer - -Why are you not using [composer](http://getcomposer.org/)? Download [Carbon.php](https://github.com/briannesbitt/Carbon/blob/master/Carbon/Carbon.php) from the repo and save the file into your project path somewhere. - -```php - -## API - -The Carbon class is [inherited](http://php.net/manual/en/keyword.extends.php) from the PHP [DateTime](http://www.php.net/manual/en/class.datetime.php) class. - -```php - **Note: I live in Ottawa, Ontario, Canada and if the timezone is not specified in the examples then the default of 'America/Toronto' is to be assumed. Typically Ottawa is -0500 but when daylight savings time is on we are -0400.** - -Special care has been taken to ensure timezones are handled correctly, and where appropriate are based on the underlying DateTime implementation. For example all comparisons are done in UTC or in the timezone of the datetime being used. - -```php -$dtToronto = Carbon::createFromDate(2012, 1, 1, 'America/Toronto'); -$dtVancouver = Carbon::createFromDate(2012, 1, 1, 'America/Vancouver'); - -echo $dtVancouver->diffInHours($dtToronto); // 3 -``` - -Also `is` comparisons are done in the timezone of the provided Carbon instance. For example my current timezone is -13 hours from Tokyo. So `Carbon::now('Asia/Tokyo')->isToday()` would only return false for any time past 1 PM my time. This doesn't make sense since `now()` in tokyo is always today in Tokyo. Thus the comparison to `now()` is done in the same timezone as the current instance. - - -### Instantiation - -There are several different methods available to create a new instance of Carbon. First there is a constructor. It overrides the [parent constructor](http://www.php.net/manual/en/datetime.construct.php) and you are best to read about the first parameter from the PHP manual and understand the date/time string formats it accepts. You'll hopefully find yourself rarely using the constructor but rather relying on the explicit static methods for improved readability. - -```php -$carbon = new Carbon(); // equivalent to Carbon::now() -$carbon = new Carbon('first day of January 2008', 'America/Vancouver'); -echo get_class($carbon); // 'Carbon\Carbon' -``` - -You'll notice above that the timezone (2nd) parameter was passed as a string rather than a `\DateTimeZone` instance. All DateTimeZone parameters have been augmented so you can pass a DateTimeZone instance or a string and the timezone will be created for you. This is again shown in the next example which also introduces the `now()` function. - -```php -$now = Carbon::now(); - -$nowInLondonTz = Carbon::now(new DateTimeZone('Europe/London')); - -// or just pass the timezone as a string -$nowInLondonTz = Carbon::now('Europe/London'); -``` - -To accompany `now()`, a few other static instantiation helpers exist to create widely known instances. The only thing to really notice here is that `today()`, `tomorrow()` and `yesterday()`, besides behaving as expected, all accept a timezone parameter and each has their time value set to `00:00:00`. - -```php -$now = Carbon::now(); -echo $now; // 2012-10-14 20:40:20 -$today = Carbon::today(); -echo $today; // 2012-10-14 00:00:00 -$tomorrow = Carbon::tomorrow('Europe/London'); -echo $tomorrow; // 2012-10-16 00:00:00 -$yesterday = Carbon::yesterday(); -echo $yesterday; // 2012-10-13 00:00:00 -``` - -The next group of static helpers are the `createXXX()` helpers. Most of the static `create` functions allow you to provide as many or as few arguments as you want and will provide default values for all others. Generally default values are the current date, time or timezone. Higher values will wrap appropriately but invalid values will throw an `InvalidArgumentException` with an informative message. The message is obtained from an [DateTime::getLastErrors()](http://php.net/manual/en/datetime.getlasterrors.php) call. - -```php -Carbon::createFromDate($year, $month, $day, $tz); -Carbon::createFromTime($hour, $minute, $second, $tz); -Carbon::create($year, $month, $day, $hour, $minute, $second, $tz); -``` - -`createFromDate()` will default the time to now. `createFromTime()` will default the date to today. `create()` will default any null parameter to the current respective value. As before, the `$tz` defaults to the current timezone and otherwise can be a DateTimeZone instance or simply a string timezone value. The only special case for default values (mimicking the underlying PHP library) occurs when an hour value is specified but no minutes or seconds, they will get defaulted to 0. - -```php -$xmasThisYear = Carbon::createFromDate(null, 12, 25); // Year defaults to current year -$Y2K = Carbon::create(2000, 1, 1, 0, 0, 0); -$alsoY2K = Carbon::create(1999, 12, 31, 24); -$noonLondonTz = Carbon::createFromTime(12, 0, 0, 'Europe/London'); - -// A two digit minute could not be found -try { Carbon::create(1975, 5, 21, 22, -2, 0); } catch(InvalidArgumentException $x) { echo $x->getMessage(); } -``` - -```php -Carbon::createFromFormat($format, $time, $tz); -``` - -`createFromFormat()` is mostly a wrapper for the base php function [DateTime::createFromFormat](http://php.net/manual/en/datetime.createfromformat.php). The difference being again the `$tz` argument can be a DateTimeZone instance or a string timezone value. Also, if there are errors with the format this function will call the `DateTime::getLastErrors()` method and then throw a `InvalidArgumentException` with the errors as the message. If you look at the source for the `createXX()` functions above, they all make a call to `createFromFormat()`. - -```php -echo Carbon::createFromFormat('Y-m-d H', '1975-05-21 22')->toDateTimeString(); // 1975-05-21 22:00:00 -``` - -The final two create functions are for working with [unix timestamps](http://en.wikipedia.org/wiki/Unix_time). The first will create a Carbon instance equal to the given timestamp and will set the timezone as well or default it to the current timezone. The second, `createFromTimestampUTC()`, is different in that the timezone will remain UTC (GMT). The second acts the same as `Carbon::createFromFormat('@'.$timestamp)` but I have just made it a little more explicit. Negative timestamps are also allowed. - -```php -echo Carbon::createFromTimeStamp(-1)->toDateTimeString(); // 1969-12-31 18:59:59 -echo Carbon::createFromTimeStamp(-1, 'Europe/London')->toDateTimeString(); // 1970-01-01 00:59:59 -echo Carbon::createFromTimeStampUTC(-1)->toDateTimeString(); // 1969-12-31 23:59:59 -``` - -You can also create a `copy()` of an existing Carbon instance. As expected the date, time and timezone values are all copied to the new instance. - -```php -$dt = Carbon::now(); -echo $dt->diffInYears($dt->copy()->addYear()); // 1 - -// $dt was unchanged and still holds the value of Carbon:now() -``` - -Finally, if you find yourself inheriting a `\DateTime` instance from another library, fear not! You can create a `Carbon` instance via a friendly `instance()` function. - -```php -$dt = new \DateTime('first day of January 2008'); // <== instance from another API -$carbon = Carbon::instance($dt); -echo get_class($carbon); // 'Carbon\Carbon' -echo $carbon->toDateTimeString(); // '2008-01-01 00:00:00' -``` - - -### Getters - -The getters are implemented via PHP's `__get()` method. This enables you to access the value as if it was a property rather than a function call. - -```php -$dt = Carbon::create(2012, 9, 5, 23, 26, 11); - -// These getters specifically return integers, ie intval() -var_dump($dt->year); // int(2012) -var_dump($dt->month); // int(9) -var_dump($dt->day); // int(5) -var_dump($dt->hour); // int(23) -var_dump($dt->minute); // int(26) -var_dump($dt->second); // int(11) -var_dump($dt->dayOfWeek); // int(3) -var_dump($dt->dayOfYear); // int(248) -var_dump($dt->weekOfYear); // int(36) -var_dump($dt->daysInMonth); // int(30) -var_dump($dt->timestamp); // int(1346901971) -var_dump(Carbon::createFromDate(1975, 5, 21)->age); // int(37) calculated vs now in the same tz -var_dump($dt->quarter); // int(3) - -// Returns an int of seconds difference from UTC (+/- sign included) -var_dump(Carbon::createFromTimestampUTC(0)->offset); // int(0) -var_dump(Carbon::createFromTimestamp(0)->offset); // int(-18000) - -// Returns an int of hours difference from UTC (+/- sign included) -var_dump(Carbon::createFromTimestamp(0)->offsetHours); // int(-5) - -// Indicates if day light savings time is on -var_dump(Carbon::createFromDate(2012, 1, 1)->dst); // bool(false) - -// Gets the DateTimeZone instance -echo get_class(Carbon::now()->timezone); // DateTimeZone -echo get_class(Carbon::now()->tz); // DateTimeZone - -// Gets the DateTimeZone instance name, shortcut for ->timezone->getName() -echo Carbon::now()->timezoneName; // America/Toronto -echo Carbon::now()->tzName; // America/Toronto -``` - - -### Setters - -The following setters are implemented via PHP's `__set()` method. Its good to take note here that none of the setters, with the obvious exception of explicitly setting the timezone, will change the timezone of the instance. Specifically, setting the timestamp will not set the corresponding timezone to UTC. - -```php -$dt = Carbon::now(); - -$dt->year = 1975; -$dt->month = 13; // would force year++ and month = 1 -$dt->month = 5; -$dt->day = 21; -$dt->hour = 22; -$dt->minute = 32; -$dt->second = 5; - -$dt->timestamp = 169957925; // This will not change the timezone - -// Set the timezone via DateTimeZone instance or string -$dt->timezone = new DateTimeZone('Europe/London'); -$dt->timezone = 'Europe/London'; -$dt->tz = 'Europe/London'; -``` - - -### Fluent Setters - -No arguments are optional for the setters, but there are enough variety in the function definitions that you shouldn't need them anyway. Its good to take note here that none of the setters, with the obvious exception of explicitly setting the timezone, will change the timezone of the instance. Specifically, setting the timestamp will not set the corresponding timezone to UTC. - -```php -$dt = Carbon::now(); - -$dt->year(1975)->month(5)->day(21)->hour(22)->minute(32)->second(5)->toDateTimeString(); -$dt->setDate(1975, 5, 21)->setTime(22, 32, 5)->toDateTimeString(); -$dt->setDateTime(1975, 5, 21, 22, 32, 5)->toDateTimeString(); - -$dt->timestamp(169957925)->timezone('Europe/London'); - -$dt->tz('America/Toronto')->setTimezone('America/Vancouver'); -``` - - -### IsSet - -The PHP function `__isset()` is implemented. This was done as some external systems (ex. [Twig](http://twig.sensiolabs.org/doc/recipes.html#using-dynamic-object-properties)) validate the existence of a property before using it. This is done using the `isset()` or `empty()` method. You can read more about these on the PHP site: [__isset()](http://www.php.net/manual/en/language.oop5.overloading.php#object.isset), [isset()](http://www.php.net/manual/en/function.isset.php), [empty()](http://www.php.net/manual/en/function.empty.php). - -```php -var_dump(isset(Carbon::now()->iDoNotExist)); // bool(false) -var_dump(isset(Carbon::now()->hour)); // bool(true) -var_dump(empty(Carbon::now()->iDoNotExist)); // bool(true) -var_dump(empty(Carbon::now()->year)); // bool(false) -``` - - -### Formatting and Strings - -All of the available `toXXXString()` methods rely on the base class method [DateTime::format()](http://php.net/manual/en/datetime.format.php). You'll notice the `__toString()` method is defined which allows a Carbon instance to be printed as a pretty date time string when used in a string context. - -```php -$dt = Carbon::create(1975, 12, 25, 14, 15, 16); - -var_dump($dt->toDateTimeString() == $dt); // bool(true) => uses __toString() -echo $dt->toDateString(); // 1975-12-25 -echo $dt->toFormattedDateString(); // Dec 25, 1975 -echo $dt->toTimeString(); // 14:15:16 -echo $dt->toDateTimeString(); // 1975-12-25 14:15:16 -echo $dt->toDayDateTimeString(); // Thu, Dec 25, 1975 2:15 PM - -// ... of course format() is still available -echo $dt->format('l jS \\of F Y h:i:s A'); // Thursday 25th of December 1975 02:15:16 PM -``` - - -## Common Formats - -The following are wrappers for the common formats provided in the [DateTime class](http://www.php.net/manual/en/class.datetime.php). - -```php -$dt = Carbon::now(); - -echo $dt->toATOMString(); // same as $dt->format(DateTime::ATOM); -echo $dt->toCOOKIEString(); -echo $dt->toISO8601String(); -echo $dt->toRFC822String(); -echo $dt->toRFC850String(); -echo $dt->toRFC1036String(); -echo $dt->toRFC1123String(); -echo $dt->toRFC2822String(); -echo $dt->toRFC3339String(); -echo $dt->toRSSString(); -echo $dt->toW3CString(); -``` - - -### Comparison - -Simple comparison is offered up via the following functions. Remember that the comparison is done in the UTC timezone so things aren't always as they seem. - -```php -$first = Carbon::create(2012, 9, 5, 23, 26, 11); -$second = Carbon::create(2012, 9, 5, 20, 26, 11, 'America/Vancouver'); - -echo $first->toDateTimeString(); // 2012-09-05 23:26:11 -echo $second->toDateTimeString(); // 2012-09-05 20:26:11 - -var_dump($first->eq($second)); // bool(true) -var_dump($first->ne($second)); // bool(false) -var_dump($first->gt($second)); // bool(false) -var_dump($first->gte($second)); // bool(true) -var_dump($first->lt($second)); // bool(false) -var_dump($first->lte($second)); // bool(true) - -$first->setDateTime(2012, 1, 1, 0, 0, 0); -$second->setDateTime(2012, 1, 1, 0, 0, 0); // Remember tz is 'America/Vancouver' - -var_dump($first->eq($second)); // bool(false) -var_dump($first->ne($second)); // bool(true) -var_dump($first->gt($second)); // bool(false) -var_dump($first->gte($second)); // bool(false) -var_dump($first->lt($second)); // bool(true) -var_dump($first->lte($second)); // bool(true) -``` - -To handle the most used cases there are some simple helper functions that hopefully are obvious from their names. For the methods that compare to `now()` (ex. isToday()) in some manner the `now()` is created in the same timezone as the instance. - -```php -$dt = Carbon::now(); - -$dt->isWeekday(); -$dt->isWeekend(); -$dt->isYesterday(); -$dt->isToday(); -$dt->isTomorrow(); -$dt->isFuture(); -$dt->isPast(); -$dt->isLeapYear(); -``` - - -### Addition and Subtraction - -The default DateTime provides a couple of different methods for easily adding and subtracting time. There is `modify()`, `add()` and `sub()`. `modify()` takes a *magical* date/time format string, 'last day of next month', that it parses and applies the modification while `add()` and `sub()` use a `DateInterval` class thats not so obvious, `new \DateInterval('P6YT5M')`. Hopefully using these fluent functions will be more clear and easier to read after not seeing your code for a few weeks. But of course I don't make you choose since the base class functions are still available. - -```php -$dt = Carbon::create(2012, 1, 31, 0); - -echo $dt->toDateTimeString(); // 2012-01-31 00:00:00 - -echo $dt->addYears(5); // 2017-01-31 00:00:00 -echo $dt->addYear(); // 2018-01-31 00:00:00 -echo $dt->subYear(); // 2017-01-31 00:00:00 -echo $dt->subYears(5); // 2012-01-31 00:00:00 - -echo $dt->addMonths(60); // 2017-01-31 00:00:00 -echo $dt->addMonth(); // 2017-03-03 00:00:00 equivalent of $dt->month($dt->month + 1); so it wraps -echo $dt->subMonth(); // 2017-02-03 00:00:00 -echo $dt->subMonths(60); // 2012-02-03 00:00:00 - -echo $dt->addDays(29); // 2012-03-03 00:00:00 -echo $dt->addDay(); // 2012-03-04 00:00:00 -echo $dt->subDay(); // 2012-03-03 00:00:00 -echo $dt->subDays(29); // 2012-02-03 00:00:00 - -echo $dt->addWeekdays(4); // 2012-02-09 00:00:00 -echo $dt->addWeekday(); // 2012-02-10 00:00:00 -echo $dt->subWeekday(); // 2012-02-09 00:00:00 -echo $dt->subWeekdays(4); // 2012-02-03 00:00:00 - -echo $dt->addWeeks(3); // 2012-02-24 00:00:00 -echo $dt->addWeek(); // 2012-03-02 00:00:00 -echo $dt->subWeek(); // 2012-02-24 00:00:00 -echo $dt->subWeeks(3); // 2012-02-03 00:00:00 - -echo $dt->addHours(24); // 2012-02-04 00:00:00 -echo $dt->addHour(); // 2012-02-04 01:00:00 -echo $dt->subHour(); // 2012-02-04 00:00:00 -echo $dt->subHours(24); // 2012-02-03 00:00:00 - -echo $dt->addMinutes(61); // 2012-02-03 01:01:00 -echo $dt->addMinute(); // 2012-02-03 01:02:00 -echo $dt->subMinute(); // 2012-02-03 01:01:00 -echo $dt->subMinutes(61); // 2012-02-03 00:00:00 - -echo $dt->addSeconds(61); // 2012-02-03 00:01:01 -echo $dt->addSecond(); // 2012-02-03 00:01:02 -echo $dt->subSecond(); // 2012-02-03 00:01:01 -echo $dt->subSeconds(61); // 2012-02-03 00:00:00 - -$dt = Carbon::create(2012, 1, 31, 12, 0, 0); -echo $dt->startOfDay(); // 2012-01-31 00:00:00 - -$dt = Carbon::create(2012, 1, 31, 12, 0, 0); -echo $dt->endOfDay(); // 2012-01-31 23:59:59 - -$dt = Carbon::create(2012, 1, 31, 12, 0, 0); -echo $dt->startOfMonth(); // 2012-01-01 00:00:00 - -$dt = Carbon::create(2012, 1, 31, 12, 0, 0); -echo $dt->endOfMonth(); // 2012-01-31 23:59:59 -``` - -For fun you can also pass negative values to `addXXX()`, in fact that's how `subXXX()` is implemented. - - -### Difference - -These functions always return the **total difference** expressed in the specified time requested. This differs from the base class `diff()` function where an interval of 61 seconds would be returned as 1 minute and 1 second via a `DateInterval` instance. The `diffInMinutes()` function would simply return 1. All values are truncated and not rounded. Each function below has a default first parameter which is the Carbon instance to compare to, or null if you want to use `now()`. The 2nd parameter again is optional and indicates if you want the return value to be the absolute value or a relative value that might have a `-` (negative) sign if the passed in date is less than the current instance. This will default to true, return the absolute value. The comparisons are done in UTC. - -```php -// Carbon::diffInYears(Carbon $dt = null, $abs = true) - -echo Carbon::now('America/Vancouver')->diffInSeconds(Carbon::now('Europe/London')); // 0 - -$dtOttawa = Carbon::createFromDate(2000, 1, 1, 'America/Toronto'); -$dtVancouver = Carbon::createFromDate(2000, 1, 1, 'America/Vancouver'); -echo $dtOttawa->diffInHours($dtVancouver); // 3 - -echo $dtOttawa->diffInHours($dtVancouver, false); // 3 -echo $dtVancouver->diffInHours($dtOttawa, false); // -3 - -$dt = Carbon::create(2012, 1, 31, 0); -echo $dt->diffInDays($dt->copy()->addMonth()); // 31 -echo $dt->diffInDays($dt->copy()->subMonth(), false); // -31 - -$dt = Carbon::create(2012, 4, 30, 0); -echo $dt->diffInDays($dt->copy()->addMonth()); // 30 -echo $dt->diffInDays($dt->copy()->addWeek()); // 7 - -$dt = Carbon::create(2012, 1, 1, 0); -echo $dt->diffInMinutes($dt->copy()->addSeconds(59)); // 0 -echo $dt->diffInMinutes($dt->copy()->addSeconds(60)); // 1 -echo $dt->diffInMinutes($dt->copy()->addSeconds(119)); // 1 -echo $dt->diffInMinutes($dt->copy()->addSeconds(120)); // 2 - -// others that are defined -// diffInYears(), diffInMonths(), diffInDays() -// diffInHours(), diffInMinutes(), diffInSeconds() -``` - - -### Difference for Humans - -It is easier for humans to read `1 month ago` compared to 30 days ago. This is a common function seen in most date libraries so I thought I would add it here as well. It uses approximations for month being 30 days which then equates a year to 360 days. The lone argument for the function is the other Carbon instance to diff against, and of course it defaults to `now()` if not specified. - -This method will add a phrase after the difference value relative to the instance and the passed in instance. There are 4 possibilities: - -* When comparing a value in the past to default now: - * 1 hour ago - * 5 months ago - -* When comparing a value in the future to default now: - * 1 hour from now - * 5 months from now - -* When comparing a value in the past to another value: - * 1 hour before - * 5 months before - -* When comparing a value in the future to another value: - * 1 hour after - * 5 months after - -```php -// The most typical usage is for comments -// The instance is the date the comment was created and its being compared to default now() -echo Carbon::now()->subDays(5)->diffForHumans(); // 5 days ago - -echo Carbon::now()->diffForHumans(Carbon::now()->subYear()); // 1 year after - -$dt = Carbon::createFromDate(2011, 2, 1); - -echo $dt->diffForHumans($dt->copy()->addMonth()); // 28 days before -echo $dt->diffForHumans($dt->copy()->subMonth()); // 1 month after - -echo Carbon::now()->addSeconds(5)->diffForHumans(); // 5 seconds from now -``` - - -### Constants - -The following constants are defined in the Carbon class. - -* SUNDAY = 0 -* MONDAY = 1 -* TUESDAY = 2 -* WEDNESDAY = 3 -* THURSDAY = 4 -* FRIDAY = 5 -* SATURDAY = 6 -* MONTHS_PER_YEAR = 12 -* HOURS_PER_DAY = 24 -* MINUTES_PER_HOUR = 60 -* SECONDS_PER_MINUTE = 60 - -```php -$dt = Carbon::createFromDate(2012, 10, 6); -if ($dt->dayOfWeek === Carbon::SATURDAY) { - echo 'Place bets on Ottawa Senators Winning!'; -} -``` - - -## About - - -### Contributing - -I hate reading a readme.md file that has code errors and/or sample output that is incorrect. I tried something new with this project and wrote a quick readme parser that can **lint** sample source code or **execute** and inject the actual result into a generated readme. - -> **Don't make changes to the `readme.md` directly!!** - -Change the `readme.src.md` and then use the `readme.php` to generate the new `readme.md` file. It can be run at the command line using `php readme.php` from the project root. Maybe someday I'll extract this out to another project or at least run it with a post receive hook, but for now its just a local tool, deal with it. - -The commands are quickly explained below. To see some examples you can view the raw `readme.src.md` file in this repo. - -`{{::lint()}}` - -The `lint` command is meant for confirming the code is valid and will `eval()` the code passed into the function. Assuming there were no errors, the executed source code will then be injected back into the text replacing out the `{{::lint()}}`. When you look at the raw `readme.src.md` you will see that the code can span several lines. Remember the code is executed in the context of the running script so any variables will be available for the rest of the file. - - {{::lint($var = 'brian nesbitt';)}} => $var = 'brian nesbitt'; - -> As mentioned the `$var` can later be echo'd and you would get 'brian nesbitt' as all of the source is executed in the same scope. - -`{{varName::exec()}}` and `{{varName_eval}}` - -The `exec` command begins by performing an `eval()` on the code passed into the function. The executed source code will then be injected back into the text replacing out the `{{varName::exec()}}`. This will also create a variable named `varName_eval` that you can then place anywhere in the file and it will get replaced with the output of the `eval()`. You can use any type of output (`echo`, `printf`, `var_dump` etc) statement to return the result value as an output buffer is setup to capture the output. - - {{exVarName::exec(echo $var;)}} => echo $var; - {{exVarName_eval}} => brian nesbitt // $var is still set from above - -`/*pad()*/` - -The `pad()` is a special source modifier. This will pad the code block to the indicated number of characters using spaces. Its particularly handy for aligning `//` comments when showing results. - - {{exVarName1::exec(echo 12345;/*pad(20)*/)}} // {{exVarName1_eval}} - {{exVarName2::exec(echo 6;/*pad(20)*/)}} // {{exVarName2_eval}} - -... would generate to: - - echo 12345; // 12345 - echo 6; // 6 - -Apart from the readme the typical steps can be used to contribute your own improvements. - -* Fork -* Clone -* PHPUnit -* Branch -* PHPUnit -* Code -* PHPUnit -* Commit -* Push -* Pull request -* Relax and play Castle Crashers - - -### Author - -Brian Nesbitt - - - - -### License - -Carbon is licensed under the MIT License - see the `LICENSE` file for details - - -### History - -You can view the history of the Carbon project in the [history file](https://github.com/briannesbitt/Carbon/blob/master/history.md). - - -### Why the name Carbon? - -Read about [Carbon Dating](http://en.wikipedia.org/wiki/Radiocarbon_dating) \ No newline at end of file diff --git a/vendor/nesbot/carbon/readme.php b/vendor/nesbot/carbon/readme.php deleted file mode 100644 index b266ff96..00000000 --- a/vendor/nesbot/carbon/readme.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -require 'Carbon/Carbon.php'; - -use Carbon\Carbon; - -date_default_timezone_set('America/Toronto'); - -$readme = file_get_contents('readme.src.md'); - -$pre_src = 'use Carbon\Carbon; '; - -// {{intro::exec(echo Carbon::now()->subMinutes(2)->diffForHumans();)}} -preg_match_all('@{{(\w*)::(\w+)\((.+)\)}}@sU', $readme, $matches, PREG_SET_ORDER); - -foreach ($matches as $match) { - - list($orig, $name, $cmd, $src) = $match; - - $src = trim($src, "\n\r"); - - ob_start(); - $result = eval($pre_src . $src); - $ob = ob_get_clean(); - - if ($result === false) { - echo "Failed lint check.". PHP_EOL . PHP_EOL; - - $error = error_get_last(); - if ($error != null) { - echo $error['message'] . ' on line ' . $error['line'] . PHP_EOL . PHP_EOL; - } - - echo "---- eval'd source ---- " . PHP_EOL . PHP_EOL; - - $i = 1; - foreach (preg_split("/$[\n\r]^/m", $src) as $ln) { - printf('%3s : %s%s', $i++, $ln, PHP_EOL); - } - - exit(1); - } - - // remove the extra newline from a var_dump - if (strpos($src, 'var_dump(') === 0) { - $ob = trim($ob); - } - - // Add any necessary padding to lineup comments - if (preg_match('@/\*pad\(([0-9]+)\)\*/@', $src, $matches)) { - $src = preg_replace('@/\*pad\(([0-9]+)\)\*/@', '', $src); - $src = str_pad($src, intval($matches[1])); - } - - // Inject the source code - $readme = str_replace($orig, $src, $readme); - - // Inject the eval'd result - if ($cmd == 'exec') { - $readme = str_replace('{{'.$name.'_eval}}', $ob, $readme); - } -} - -// allow for escaping a command -$readme = str_replace('\{\{', '{{', $readme); - -file_put_contents('readme.md', $readme); diff --git a/vendor/nesbot/carbon/readme.src.md b/vendor/nesbot/carbon/readme.src.md deleted file mode 100644 index ffd541e9..00000000 --- a/vendor/nesbot/carbon/readme.src.md +++ /dev/null @@ -1,663 +0,0 @@ -> **This file is autogenerated. Please see the [Contributing](#about-contributing) section from more information.** - -# Carbon - -[![Build Status](https://secure.travis-ci.org/briannesbitt/Carbon.png)](http://travis-ci.org/briannesbitt/Carbon) - -A simple API extension for DateTime with PHP 5.3+ - -```php -{{::lint( -printf("Right now is %s", Carbon::now()->toDateTimeString()); -printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString() -$tomorrow = Carbon::now()->addDay(); -$lastWeek = Carbon::now()->subWeek(); -$nextSummerOlympics = Carbon::createFromDate(2012)->addYears(4); - -$officialDate = Carbon::now()->toRFC2822String(); - -$howOldAmI = Carbon::createFromDate(1975, 5, 21)->age; - -$noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London'); - -$worldWillEnd = Carbon::createFromDate(2012, 12, 21, 'GMT'); - -// comparisons are always done in UTC -if (Carbon::now()->gte($worldWillEnd)) { - die(); -} - -if (Carbon::now()->isWeekend()) { - echo 'Party!'; -} -)}} - -{{intro::exec(echo Carbon::now()->subMinutes(2)->diffForHumans();)}} // '{{intro_eval}}' - -// ... but also does 'from now', 'after' and 'before' -// rolling up to seconds, minutes, hours, days, months, years - -{{::lint( -$daysSinceEpoch = Carbon::createFromTimeStamp(0)->diffInDays(); -)}} -``` - -## README Contents - -* [Installation](#install) - * [Requirements](#requirements) - * [With composer](#install-composer) - * [Without composer](#install-nocomposer) -* [API](#api) - * [Instantiation](#api-instantiation) - * [Getters](#api-getters) - * [Setters](#api-setters) - * [Fluent Setters](#api-settersfluent) - * [IsSet](#api-isset) - * [Formatting and Strings](#api-formatting) - * [Common Formats](#api-commonformats) - * [Comparison](#api-comparison) - * [Addition and Subtraction](#api-addsub) - * [Difference](#api-difference) - * [Difference for Humans](#api-humandiff) - * [Constants](#api-constants) -* [About](#about) - * [Contributing](#about-contributing) - * [Author](#about-author) - * [License](#about-license) - * [History](#about-history) - * [Why the name Carbon?](#about-whyname) - - -## Installation - - -### Requirements - -- Any flavour of PHP 5.3+ should do -- [optional] PHPUnit to execute the test suite - - -### With Composer - -The easiest way to install Carbon is via [composer](http://getcomposer.org/). Create the following `composer.json` file and run the `php composer.phar install` command to install it. - -```json -{ - "require": { - "nesbot/Carbon": "*" - } -} -``` - -```php - -### Without Composer - -Why are you not using [composer](http://getcomposer.org/)? Download [Carbon.php](https://github.com/briannesbitt/Carbon/blob/master/Carbon/Carbon.php) from the repo and save the file into your project path somewhere. - -```php - -## API - -The Carbon class is [inherited](http://php.net/manual/en/keyword.extends.php) from the PHP [DateTime](http://www.php.net/manual/en/class.datetime.php) class. - -```php - **Note: I live in Ottawa, Ontario, Canada and if the timezone is not specified in the examples then the default of 'America/Toronto' is to be assumed. Typically Ottawa is -0500 but when daylight savings time is on we are -0400.** - -Special care has been taken to ensure timezones are handled correctly, and where appropriate are based on the underlying DateTime implementation. For example all comparisons are done in UTC or in the timezone of the datetime being used. - -```php -{{::lint($dtToronto = Carbon::createFromDate(2012, 1, 1, 'America/Toronto');)}} -{{::lint($dtVancouver = Carbon::createFromDate(2012, 1, 1, 'America/Vancouver');)}} - -{{tz::exec(echo $dtVancouver->diffInHours($dtToronto);)}} // {{tz_eval}} -``` - -Also `is` comparisons are done in the timezone of the provided Carbon instance. For example my current timezone is -13 hours from Tokyo. So `Carbon::now('Asia/Tokyo')->isToday()` would only return false for any time past 1 PM my time. This doesn't make sense since `now()` in tokyo is always today in Tokyo. Thus the comparison to `now()` is done in the same timezone as the current instance. - - -### Instantiation - -There are several different methods available to create a new instance of Carbon. First there is a constructor. It overrides the [parent constructor](http://www.php.net/manual/en/datetime.construct.php) and you are best to read about the first parameter from the PHP manual and understand the date/time string formats it accepts. You'll hopefully find yourself rarely using the constructor but rather relying on the explicit static methods for improved readability. - -```php -{{::lint($carbon = new Carbon();/*pad(40)*/)}} // equivalent to Carbon::now() -{{::lint($carbon = new Carbon('first day of January 2008', 'America/Vancouver');)}} -{{ctorType::exec(echo get_class($carbon);/*pad(40)*/)}} // '{{ctorType_eval}}' -``` - -You'll notice above that the timezone (2nd) parameter was passed as a string rather than a `\DateTimeZone` instance. All DateTimeZone parameters have been augmented so you can pass a DateTimeZone instance or a string and the timezone will be created for you. This is again shown in the next example which also introduces the `now()` function. - -```php -{{::lint( -$now = Carbon::now(); - -$nowInLondonTz = Carbon::now(new DateTimeZone('Europe/London')); - -// or just pass the timezone as a string -$nowInLondonTz = Carbon::now('Europe/London'); -)}} -``` - -To accompany `now()`, a few other static instantiation helpers exist to create widely known instances. The only thing to really notice here is that `today()`, `tomorrow()` and `yesterday()`, besides behaving as expected, all accept a timezone parameter and each has their time value set to `00:00:00`. - -```php -{{::lint($now = Carbon::now();)}} -{{now::exec(echo $now;/*pad(40)*/)}} // {{now_eval}} -{{::lint($today = Carbon::today();)}} -{{today::exec(echo $today;/*pad(40)*/)}} // {{today_eval}} -{{::lint($tomorrow = Carbon::tomorrow('Europe/London');)}} -{{tomorrow::exec(echo $tomorrow;/*pad(40)*/)}} // {{tomorrow_eval}} -{{::lint($yesterday = Carbon::yesterday();)}} -{{yesterday::exec(echo $yesterday;/*pad(40)*/)}} // {{yesterday_eval}} -``` - -The next group of static helpers are the `createXXX()` helpers. Most of the static `create` functions allow you to provide as many or as few arguments as you want and will provide default values for all others. Generally default values are the current date, time or timezone. Higher values will wrap appropriately but invalid values will throw an `InvalidArgumentException` with an informative message. The message is obtained from an [DateTime::getLastErrors()](http://php.net/manual/en/datetime.getlasterrors.php) call. - -```php -Carbon::createFromDate($year, $month, $day, $tz); -Carbon::createFromTime($hour, $minute, $second, $tz); -Carbon::create($year, $month, $day, $hour, $minute, $second, $tz); -``` - -`createFromDate()` will default the time to now. `createFromTime()` will default the date to today. `create()` will default any null parameter to the current respective value. As before, the `$tz` defaults to the current timezone and otherwise can be a DateTimeZone instance or simply a string timezone value. The only special case for default values (mimicking the underlying PHP library) occurs when an hour value is specified but no minutes or seconds, they will get defaulted to 0. - -```php -{{::lint( -$xmasThisYear = Carbon::createFromDate(null, 12, 25); // Year defaults to current year -$Y2K = Carbon::create(2000, 1, 1, 0, 0, 0); -$alsoY2K = Carbon::create(1999, 12, 31, 24); -$noonLondonTz = Carbon::createFromTime(12, 0, 0, 'Europe/London'); -)}} - -// {{createFromDateException_eval}} -{{createFromDateException::exec(try { Carbon::create(1975, 5, 21, 22, -2, 0); } catch(InvalidArgumentException $x) { echo $x->getMessage(); })}} -``` - -```php -Carbon::createFromFormat($format, $time, $tz); -``` - -`createFromFormat()` is mostly a wrapper for the base php function [DateTime::createFromFormat](http://php.net/manual/en/datetime.createfromformat.php). The difference being again the `$tz` argument can be a DateTimeZone instance or a string timezone value. Also, if there are errors with the format this function will call the `DateTime::getLastErrors()` method and then throw a `InvalidArgumentException` with the errors as the message. If you look at the source for the `createXX()` functions above, they all make a call to `createFromFormat()`. - -```php -{{createFromFormat1::exec(echo Carbon::createFromFormat('Y-m-d H', '1975-05-21 22')->toDateTimeString();)}} // {{createFromFormat1_eval}} -``` - -The final two create functions are for working with [unix timestamps](http://en.wikipedia.org/wiki/Unix_time). The first will create a Carbon instance equal to the given timestamp and will set the timezone as well or default it to the current timezone. The second, `createFromTimestampUTC()`, is different in that the timezone will remain UTC (GMT). The second acts the same as `Carbon::createFromFormat('@'.$timestamp)` but I have just made it a little more explicit. Negative timestamps are also allowed. - -```php -{{createFromTimeStamp1::exec(echo Carbon::createFromTimeStamp(-1)->toDateTimeString();/*pad(80)*/)}} // {{createFromTimeStamp1_eval}} -{{createFromTimeStamp2::exec(echo Carbon::createFromTimeStamp(-1, 'Europe/London')->toDateTimeString();/*pad(80)*/)}} // {{createFromTimeStamp2_eval}} -{{createFromTimeStampUTC::exec(echo Carbon::createFromTimeStampUTC(-1)->toDateTimeString();/*pad(80)*/)}} // {{createFromTimeStampUTC_eval}} -``` - -You can also create a `copy()` of an existing Carbon instance. As expected the date, time and timezone values are all copied to the new instance. - -```php -{{::lint($dt = Carbon::now();)}} -{{copy2::exec(echo $dt->diffInYears($dt->copy()->addYear());)}} // {{copy2_eval}} - -// $dt was unchanged and still holds the value of Carbon:now() -``` - -Finally, if you find yourself inheriting a `\DateTime` instance from another library, fear not! You can create a `Carbon` instance via a friendly `instance()` function. - -```php -{{::lint($dt = new \DateTime('first day of January 2008');)}} // <== instance from another API -{{::lint($carbon = Carbon::instance($dt);)}} -{{ctorType1::exec(echo get_class($carbon);/*pad(54)*/)}} // '{{ctorType1_eval}}' -{{ctorType2::exec(echo $carbon->toDateTimeString();/*pad(54)*/)}} // '{{ctorType2_eval}}' -``` - - -### Getters - -The getters are implemented via PHP's `__get()` method. This enables you to access the value as if it was a property rather than a function call. - -```php -{{::lint($dt = Carbon::create(2012, 9, 5, 23, 26, 11);)}} - -// These getters specifically return integers, ie intval() -{{getyear::exec(var_dump($dt->year);/*pad(54)*/)}} // {{getyear_eval}} -{{getmonth::exec(var_dump($dt->month);/*pad(54)*/)}} // {{getmonth_eval}} -{{getday::exec(var_dump($dt->day);/*pad(54)*/)}} // {{getday_eval}} -{{gethour::exec(var_dump($dt->hour);/*pad(54)*/)}} // {{gethour_eval}} -{{getminute::exec(var_dump($dt->minute);/*pad(54)*/)}} // {{getminute_eval}} -{{getsecond::exec(var_dump($dt->second);/*pad(54)*/)}} // {{getsecond_eval}} -{{getdow::exec(var_dump($dt->dayOfWeek);/*pad(54)*/)}} // {{getdow_eval}} -{{getdoy::exec(var_dump($dt->dayOfYear);/*pad(54)*/)}} // {{getdoy_eval}} -{{getwoy::exec(var_dump($dt->weekOfYear);/*pad(54)*/)}} // {{getwoy_eval}} -{{getdnm::exec(var_dump($dt->daysInMonth);/*pad(54)*/)}} // {{getdnm_eval}} -{{getts::exec(var_dump($dt->timestamp);/*pad(54)*/)}} // {{getts_eval}} -{{getage::exec(var_dump(Carbon::createFromDate(1975, 5, 21)->age);/*pad(54)*/)}} // {{getage_eval}} calculated vs now in the same tz -{{getq::exec(var_dump($dt->quarter);/*pad(54)*/)}} // {{getq_eval}} - -// Returns an int of seconds difference from UTC (+/- sign included) -{{get1::exec(var_dump(Carbon::createFromTimestampUTC(0)->offset);/*pad(54)*/)}} // {{get1_eval}} -{{get2::exec(var_dump(Carbon::createFromTimestamp(0)->offset);/*pad(54)*/)}} // {{get2_eval}} - -// Returns an int of hours difference from UTC (+/- sign included) -{{get3::exec(var_dump(Carbon::createFromTimestamp(0)->offsetHours);/*pad(54)*/)}} // {{get3_eval}} - -// Indicates if day light savings time is on -{{get4::exec(var_dump(Carbon::createFromDate(2012, 1, 1)->dst);/*pad(54)*/)}} // {{get4_eval}} - -// Gets the DateTimeZone instance -{{get5::exec(echo get_class(Carbon::now()->timezone);/*pad(54)*/)}} // {{get5_eval}} -{{get6::exec(echo get_class(Carbon::now()->tz);/*pad(54)*/)}} // {{get6_eval}} - -// Gets the DateTimeZone instance name, shortcut for ->timezone->getName() -{{get7::exec(echo Carbon::now()->timezoneName;/*pad(54)*/)}} // {{get7_eval}} -{{get8::exec(echo Carbon::now()->tzName;/*pad(54)*/)}} // {{get8_eval}} -``` - - -### Setters - -The following setters are implemented via PHP's `__set()` method. Its good to take note here that none of the setters, with the obvious exception of explicitly setting the timezone, will change the timezone of the instance. Specifically, setting the timestamp will not set the corresponding timezone to UTC. - -```php -{{::lint( -$dt = Carbon::now(); - -$dt->year = 1975; -$dt->month = 13; // would force year++ and month = 1 -$dt->month = 5; -$dt->day = 21; -$dt->hour = 22; -$dt->minute = 32; -$dt->second = 5; - -$dt->timestamp = 169957925; // This will not change the timezone - -// Set the timezone via DateTimeZone instance or string -$dt->timezone = new DateTimeZone('Europe/London'); -$dt->timezone = 'Europe/London'; -$dt->tz = 'Europe/London'; -)}} -``` - - -### Fluent Setters - -No arguments are optional for the setters, but there are enough variety in the function definitions that you shouldn't need them anyway. Its good to take note here that none of the setters, with the obvious exception of explicitly setting the timezone, will change the timezone of the instance. Specifically, setting the timestamp will not set the corresponding timezone to UTC. - -```php -{{::lint( -$dt = Carbon::now(); - -$dt->year(1975)->month(5)->day(21)->hour(22)->minute(32)->second(5)->toDateTimeString(); -$dt->setDate(1975, 5, 21)->setTime(22, 32, 5)->toDateTimeString(); -$dt->setDateTime(1975, 5, 21, 22, 32, 5)->toDateTimeString(); - -$dt->timestamp(169957925)->timezone('Europe/London'); - -$dt->tz('America/Toronto')->setTimezone('America/Vancouver'); -)}} -``` - - -### IsSet - -The PHP function `__isset()` is implemented. This was done as some external systems (ex. [Twig](http://twig.sensiolabs.org/doc/recipes.html#using-dynamic-object-properties)) validate the existence of a property before using it. This is done using the `isset()` or `empty()` method. You can read more about these on the PHP site: [__isset()](http://www.php.net/manual/en/language.oop5.overloading.php#object.isset), [isset()](http://www.php.net/manual/en/function.isset.php), [empty()](http://www.php.net/manual/en/function.empty.php). - -```php -{{isset1::exec(var_dump(isset(Carbon::now()->iDoNotExist));/*pad(50)*/)}} // {{isset1_eval}} -{{isset2::exec(var_dump(isset(Carbon::now()->hour));/*pad(50)*/)}} // {{isset2_eval}} -{{isset3::exec(var_dump(empty(Carbon::now()->iDoNotExist));/*pad(50)*/)}} // {{isset3_eval}} -{{isset4::exec(var_dump(empty(Carbon::now()->year));/*pad(50)*/)}} // {{isset4_eval}} -``` - - -### Formatting and Strings - -All of the available `toXXXString()` methods rely on the base class method [DateTime::format()](http://php.net/manual/en/datetime.format.php). You'll notice the `__toString()` method is defined which allows a Carbon instance to be printed as a pretty date time string when used in a string context. - -```php -{{::lint($dt = Carbon::create(1975, 12, 25, 14, 15, 16);)}} - -{{format1::exec(var_dump($dt->toDateTimeString() == $dt);/*pad(50)*/)}} // {{format1_eval}} => uses __toString() -{{format2::exec(echo $dt->toDateString();/*pad(50)*/)}} // {{format2_eval}} -{{format3::exec(echo $dt->toFormattedDateString();/*pad(50)*/)}} // {{format3_eval}} -{{format4::exec(echo $dt->toTimeString();/*pad(50)*/)}} // {{format4_eval}} -{{format5::exec(echo $dt->toDateTimeString();/*pad(50)*/)}} // {{format5_eval}} -{{format6::exec(echo $dt->toDayDateTimeString();/*pad(50)*/)}} // {{format6_eval}} - -// ... of course format() is still available -{{format7::exec(echo $dt->format('l jS \\of F Y h:i:s A');/*pad(50)*/)}} // {{format7_eval}} -``` - - -## Common Formats - -The following are wrappers for the common formats provided in the [DateTime class](http://www.php.net/manual/en/class.datetime.php). - -```php -$dt = Carbon::now(); - -echo $dt->toATOMString(); // same as $dt->format(DateTime::ATOM); -echo $dt->toCOOKIEString(); -echo $dt->toISO8601String(); -echo $dt->toRFC822String(); -echo $dt->toRFC850String(); -echo $dt->toRFC1036String(); -echo $dt->toRFC1123String(); -echo $dt->toRFC2822String(); -echo $dt->toRFC3339String(); -echo $dt->toRSSString(); -echo $dt->toW3CString(); -``` - - -### Comparison - -Simple comparison is offered up via the following functions. Remember that the comparison is done in the UTC timezone so things aren't always as they seem. - -```php -{{::lint($first = Carbon::create(2012, 9, 5, 23, 26, 11);)}} -{{::lint($second = Carbon::create(2012, 9, 5, 20, 26, 11, 'America/Vancouver');)}} - -{{compare1::exec(echo $first->toDateTimeString();/*pad(50)*/)}} // {{compare1_eval}} -{{compare2::exec(echo $second->toDateTimeString();/*pad(50)*/)}} // {{compare2_eval}} - -{{compare3::exec(var_dump($first->eq($second));/*pad(50)*/)}} // {{compare3_eval}} -{{compare4::exec(var_dump($first->ne($second));/*pad(50)*/)}} // {{compare4_eval}} -{{compare5::exec(var_dump($first->gt($second));/*pad(50)*/)}} // {{compare5_eval}} -{{compare6::exec(var_dump($first->gte($second));/*pad(50)*/)}} // {{compare6_eval}} -{{compare7::exec(var_dump($first->lt($second));/*pad(50)*/)}} // {{compare7_eval}} -{{compare8::exec(var_dump($first->lte($second));/*pad(50)*/)}} // {{compare8_eval}} - -{{::lint($first->setDateTime(2012, 1, 1, 0, 0, 0);)}} -{{::lint($second->setDateTime(2012, 1, 1, 0, 0, 0);/*pad(50)*/)}} // Remember tz is 'America/Vancouver' - -{{compare9::exec(var_dump($first->eq($second));/*pad(50)*/)}} // {{compare9_eval}} -{{compare10::exec(var_dump($first->ne($second));/*pad(50)*/)}} // {{compare10_eval}} -{{compare11::exec(var_dump($first->gt($second));/*pad(50)*/)}} // {{compare11_eval}} -{{compare12::exec(var_dump($first->gte($second));/*pad(50)*/)}} // {{compare12_eval}} -{{compare13::exec(var_dump($first->lt($second));/*pad(50)*/)}} // {{compare13_eval}} -{{compare14::exec(var_dump($first->lte($second));/*pad(50)*/)}} // {{compare14_eval}} -``` - -To handle the most used cases there are some simple helper functions that hopefully are obvious from their names. For the methods that compare to `now()` (ex. isToday()) in some manner the `now()` is created in the same timezone as the instance. - -```php -{{::lint( -$dt = Carbon::now(); - -$dt->isWeekday(); -$dt->isWeekend(); -$dt->isYesterday(); -$dt->isToday(); -$dt->isTomorrow(); -$dt->isFuture(); -$dt->isPast(); -$dt->isLeapYear(); -)}} -``` - - -### Addition and Subtraction - -The default DateTime provides a couple of different methods for easily adding and subtracting time. There is `modify()`, `add()` and `sub()`. `modify()` takes a *magical* date/time format string, 'last day of next month', that it parses and applies the modification while `add()` and `sub()` use a `DateInterval` class thats not so obvious, `new \DateInterval('P6YT5M')`. Hopefully using these fluent functions will be more clear and easier to read after not seeing your code for a few weeks. But of course I don't make you choose since the base class functions are still available. - -```php -{{::lint($dt = Carbon::create(2012, 1, 31, 0);)}} - -{{addsub1::exec(echo $dt->toDateTimeString();/*pad(40)*/)}} // {{addsub1_eval}} - -{{addsub2::exec(echo $dt->addYears(5);/*pad(40)*/)}} // {{addsub2_eval}} -{{addsub3::exec(echo $dt->addYear();/*pad(40)*/)}} // {{addsub3_eval}} -{{addsub4::exec(echo $dt->subYear();/*pad(40)*/)}} // {{addsub4_eval}} -{{addsub5::exec(echo $dt->subYears(5);/*pad(40)*/)}} // {{addsub5_eval}} - -{{addsub6::exec(echo $dt->addMonths(60);/*pad(40)*/)}} // {{addsub6_eval}} -{{addsub7::exec(echo $dt->addMonth();/*pad(40)*/)}} // {{addsub7_eval}} equivalent of $dt->month($dt->month + 1); so it wraps -{{addsub8::exec(echo $dt->subMonth();/*pad(40)*/)}} // {{addsub8_eval}} -{{addsub9::exec(echo $dt->subMonths(60);/*pad(40)*/)}} // {{addsub9_eval}} - -{{addsub10::exec(echo $dt->addDays(29);/*pad(40)*/)}} // {{addsub10_eval}} -{{addsub11::exec(echo $dt->addDay();/*pad(40)*/)}} // {{addsub11_eval}} -{{addsub12::exec(echo $dt->subDay();/*pad(40)*/)}} // {{addsub12_eval}} -{{addsub13::exec(echo $dt->subDays(29);/*pad(40)*/)}} // {{addsub13_eval}} - -{{addsub14::exec(echo $dt->addWeekdays(4);/*pad(40)*/)}} // {{addsub14_eval}} -{{addsub15::exec(echo $dt->addWeekday();/*pad(40)*/)}} // {{addsub15_eval}} -{{addsub16::exec(echo $dt->subWeekday();/*pad(40)*/)}} // {{addsub16_eval}} -{{addsub17::exec(echo $dt->subWeekdays(4);/*pad(40)*/)}} // {{addsub17_eval}} - -{{addsub18::exec(echo $dt->addWeeks(3);/*pad(40)*/)}} // {{addsub18_eval}} -{{addsub19::exec(echo $dt->addWeek();/*pad(40)*/)}} // {{addsub19_eval}} -{{addsub20::exec(echo $dt->subWeek();/*pad(40)*/)}} // {{addsub20_eval}} -{{addsub21::exec(echo $dt->subWeeks(3);/*pad(40)*/)}} // {{addsub21_eval}} - -{{addsub22::exec(echo $dt->addHours(24);/*pad(40)*/)}} // {{addsub22_eval}} -{{addsub23::exec(echo $dt->addHour();/*pad(40)*/)}} // {{addsub23_eval}} -{{addsub24::exec(echo $dt->subHour();/*pad(40)*/)}} // {{addsub24_eval}} -{{addsub25::exec(echo $dt->subHours(24);/*pad(40)*/)}} // {{addsub25_eval}} - -{{addsub26::exec(echo $dt->addMinutes(61);/*pad(40)*/)}} // {{addsub26_eval}} -{{addsub27::exec(echo $dt->addMinute();/*pad(40)*/)}} // {{addsub27_eval}} -{{addsub28::exec(echo $dt->subMinute();/*pad(40)*/)}} // {{addsub28_eval}} -{{addsub29::exec(echo $dt->subMinutes(61);/*pad(40)*/)}} // {{addsub29_eval}} - -{{addsub30::exec(echo $dt->addSeconds(61);/*pad(40)*/)}} // {{addsub30_eval}} -{{addsub31::exec(echo $dt->addSecond();/*pad(40)*/)}} // {{addsub31_eval}} -{{addsub32::exec(echo $dt->subSecond();/*pad(40)*/)}} // {{addsub32_eval}} -{{addsub33::exec(echo $dt->subSeconds(61);/*pad(40)*/)}} // {{addsub33_eval}} - -{{::lint($dt = Carbon::create(2012, 1, 31, 12, 0, 0);/*pad(40)*/)}} -{{addsub35::exec(echo $dt->startOfDay();/*pad(40)*/)}} // {{addsub35_eval}} - -{{::lint($dt = Carbon::create(2012, 1, 31, 12, 0, 0);)}} -{{addsub37::exec(echo $dt->endOfDay();/*pad(40)*/)}} // {{addsub37_eval}} - -{{::lint($dt = Carbon::create(2012, 1, 31, 12, 0, 0);)}} -{{addsub39::exec(echo $dt->startOfMonth();/*pad(40)*/)}} // {{addsub39_eval}} - -{{::lint($dt = Carbon::create(2012, 1, 31, 12, 0, 0);)}} -{{addsub41::exec(echo $dt->endOfMonth();/*pad(40)*/)}} // {{addsub41_eval}} -``` - -For fun you can also pass negative values to `addXXX()`, in fact that's how `subXXX()` is implemented. - - -### Difference - -These functions always return the **total difference** expressed in the specified time requested. This differs from the base class `diff()` function where an interval of 61 seconds would be returned as 1 minute and 1 second via a `DateInterval` instance. The `diffInMinutes()` function would simply return 1. All values are truncated and not rounded. Each function below has a default first parameter which is the Carbon instance to compare to, or null if you want to use `now()`. The 2nd parameter again is optional and indicates if you want the return value to be the absolute value or a relative value that might have a `-` (negative) sign if the passed in date is less than the current instance. This will default to true, return the absolute value. The comparisons are done in UTC. - -```php -// Carbon::diffInYears(Carbon $dt = null, $abs = true) - -{{diff1::exec(echo Carbon::now('America/Vancouver')->diffInSeconds(Carbon::now('Europe/London'));)}} // {{diff1_eval}} - -{{::lint($dtOttawa = Carbon::createFromDate(2000, 1, 1, 'America/Toronto');)}} -{{::lint($dtVancouver = Carbon::createFromDate(2000, 1, 1, 'America/Vancouver');)}} -{{diff4::exec(echo $dtOttawa->diffInHours($dtVancouver);/*pad(70)*/)}} // {{diff4_eval}} - -{{diff5::exec(echo $dtOttawa->diffInHours($dtVancouver, false);/*pad(70)*/)}} // {{diff5_eval}} -{{diff6::exec(echo $dtVancouver->diffInHours($dtOttawa, false);/*pad(70)*/)}} // {{diff6_eval}} - -{{::lint($dt = Carbon::create(2012, 1, 31, 0);)}} -{{diff8::exec(echo $dt->diffInDays($dt->copy()->addMonth());/*pad(70)*/)}} // {{diff8_eval}} -{{diff9::exec(echo $dt->diffInDays($dt->copy()->subMonth(), false);/*pad(70)*/)}} // {{diff9_eval}} - -{{::lint($dt = Carbon::create(2012, 4, 30, 0);)}} -{{diff11::exec(echo $dt->diffInDays($dt->copy()->addMonth());/*pad(70)*/)}} // {{diff11_eval}} -{{diff12::exec(echo $dt->diffInDays($dt->copy()->addWeek());/*pad(70)*/)}} // {{diff12_eval}} - -{{::lint($dt = Carbon::create(2012, 1, 1, 0);)}} -{{diff14::exec(echo $dt->diffInMinutes($dt->copy()->addSeconds(59));/*pad(70)*/)}} // {{diff14_eval}} -{{diff15::exec(echo $dt->diffInMinutes($dt->copy()->addSeconds(60));/*pad(70)*/)}} // {{diff15_eval}} -{{diff16::exec(echo $dt->diffInMinutes($dt->copy()->addSeconds(119));/*pad(70)*/)}} // {{diff16_eval}} -{{diff17::exec(echo $dt->diffInMinutes($dt->copy()->addSeconds(120));/*pad(70)*/)}} // {{diff17_eval}} - -// others that are defined -// diffInYears(), diffInMonths(), diffInDays() -// diffInHours(), diffInMinutes(), diffInSeconds() -``` - - -### Difference for Humans - -It is easier for humans to read `1 month ago` compared to 30 days ago. This is a common function seen in most date libraries so I thought I would add it here as well. It uses approximations for month being 30 days which then equates a year to 360 days. The lone argument for the function is the other Carbon instance to diff against, and of course it defaults to `now()` if not specified. - -This method will add a phrase after the difference value relative to the instance and the passed in instance. There are 4 possibilities: - -* When comparing a value in the past to default now: - * 1 hour ago - * 5 months ago - -* When comparing a value in the future to default now: - * 1 hour from now - * 5 months from now - -* When comparing a value in the past to another value: - * 1 hour before - * 5 months before - -* When comparing a value in the future to another value: - * 1 hour after - * 5 months after - -```php -// The most typical usage is for comments -// The instance is the date the comment was created and its being compared to default now() -{{humandiff1::exec(echo Carbon::now()->subDays(5)->diffForHumans();/*pad(62)*/)}} // {{humandiff1_eval}} - -{{humandiff2::exec(echo Carbon::now()->diffForHumans(Carbon::now()->subYear());/*pad(62)*/)}} // {{humandiff2_eval}} - -{{::lint($dt = Carbon::createFromDate(2011, 2, 1);)}} - -{{humandiff4::exec(echo $dt->diffForHumans($dt->copy()->addMonth());/*pad(62)*/)}} // {{humandiff4_eval}} -{{humandiff5::exec(echo $dt->diffForHumans($dt->copy()->subMonth());/*pad(62)*/)}} // {{humandiff5_eval}} - -{{humandiff6::exec(echo Carbon::now()->addSeconds(5)->diffForHumans();/*pad(62)*/)}} // {{humandiff6_eval}} -``` - - -### Constants - -The following constants are defined in the Carbon class. - -* SUNDAY = 0 -* MONDAY = 1 -* TUESDAY = 2 -* WEDNESDAY = 3 -* THURSDAY = 4 -* FRIDAY = 5 -* SATURDAY = 6 -* MONTHS_PER_YEAR = 12 -* HOURS_PER_DAY = 24 -* MINUTES_PER_HOUR = 60 -* SECONDS_PER_MINUTE = 60 - -```php -{{::lint( -$dt = Carbon::createFromDate(2012, 10, 6); -if ($dt->dayOfWeek === Carbon::SATURDAY) { - echo 'Place bets on Ottawa Senators Winning!'; -} -)}} -``` - - -## About - - -### Contributing - -I hate reading a readme.md file that has code errors and/or sample output that is incorrect. I tried something new with this project and wrote a quick readme parser that can **lint** sample source code or **execute** and inject the actual result into a generated readme. - -> **Don't make changes to the `readme.md` directly!!** - -Change the `readme.src.md` and then use the `readme.php` to generate the new `readme.md` file. It can be run at the command line using `php readme.php` from the project root. Maybe someday I'll extract this out to another project or at least run it with a post receive hook, but for now its just a local tool, deal with it. - -The commands are quickly explained below. To see some examples you can view the raw `readme.src.md` file in this repo. - -`\{\{::lint()}}` - -The `lint` command is meant for confirming the code is valid and will `eval()` the code passed into the function. Assuming there were no errors, the executed source code will then be injected back into the text replacing out the `\{\{::lint()}}`. When you look at the raw `readme.src.md` you will see that the code can span several lines. Remember the code is executed in the context of the running script so any variables will be available for the rest of the file. - - \{\{::lint($var = 'brian nesbitt';)}} => {{::lint($var = 'brian nesbitt';)}} - -> As mentioned the `$var` can later be echo'd and you would get 'brian nesbitt' as all of the source is executed in the same scope. - -`\{\{varName::exec()}}` and `{{varName_eval}}` - -The `exec` command begins by performing an `eval()` on the code passed into the function. The executed source code will then be injected back into the text replacing out the `\{\{varName::exec()}}`. This will also create a variable named `varName_eval` that you can then place anywhere in the file and it will get replaced with the output of the `eval()`. You can use any type of output (`echo`, `printf`, `var_dump` etc) statement to return the result value as an output buffer is setup to capture the output. - - \{\{exVarName::exec(echo $var;)}} => {{exVarName::exec(echo $var;)}} - \{\{exVarName_eval}} => {{exVarName_eval}} // $var is still set from above - -`/*pad()*/` - -The `pad()` is a special source modifier. This will pad the code block to the indicated number of characters using spaces. Its particularly handy for aligning `//` comments when showing results. - - \{\{exVarName1::exec(echo 12345;/*pad(20)*/)}} // \{\{exVarName1_eval}} - \{\{exVarName2::exec(echo 6;/*pad(20)*/)}} // \{\{exVarName2_eval}} - -... would generate to: - - {{exVarName1::exec(echo 12345;/*pad(20)*/)}} // {{exVarName1_eval}} - {{exVarName2::exec(echo 6;/*pad(20)*/)}} // {{exVarName2_eval}} - -Apart from the readme the typical steps can be used to contribute your own improvements. - -* Fork -* Clone -* PHPUnit -* Branch -* PHPUnit -* Code -* PHPUnit -* Commit -* Push -* Pull request -* Relax and play Castle Crashers - - -### Author - -Brian Nesbitt - - - - -### License - -Carbon is licensed under the MIT License - see the `LICENSE` file for details - - -### History - -You can view the history of the Carbon project in the [history file](https://github.com/briannesbitt/Carbon/blob/master/history.md). - - -### Why the name Carbon? - -Read about [Carbon Dating](http://en.wikipedia.org/wiki/Radiocarbon_dating) \ No newline at end of file diff --git a/vendor/patchwork/utf8/.gitattributes b/vendor/patchwork/utf8/.gitattributes deleted file mode 100644 index 983fb702..00000000 --- a/vendor/patchwork/utf8/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -class/Patchwork/Utf8/unicode-data.tbz2 export-ignore -class/Patchwork/Utf8/Compiler.php export-ignore -tests/ export-ignore diff --git a/vendor/patchwork/utf8/README.md b/vendor/patchwork/utf8/README.md deleted file mode 100644 index 62e95fad..00000000 --- a/vendor/patchwork/utf8/README.md +++ /dev/null @@ -1,125 +0,0 @@ -Patchwork UTF-8 -=============== - -Patchwork UTF-8 provides both : - -- a portability layer for Unicode handling in PHP, and -- a class that mirrors the quasi complete set of native string functions, - enhanced to UTF-8 [grapheme clusters](http://unicode.org/reports/tr29/) - awareness. - -It can also serve as a documentation source referencing the practical problems -that arise when handling UTF-8 in PHP: Unicode concepts, related algorithms, -bugs in PHP core, workarounds, etc. - -Portability ------------ - -Unicode handling in PHP is best performed using a combo of `mbstring`, `iconv`, -`intl` and `pcre` with the `u` flag enabled. But when an application is expected -to run on many servers, you should be aware that these 4 extensions are not -always enabled. - -Patchwork UTF-8 provides pure PHP implementations for 3 of those 4 extensions. -Here is the set of portability-fallbacks that are currently implemented: - -- *utf8_encode, utf8_decode*, -- `mbstring`: *mb_convert_encoding, mb_decode_mimeheader, mb_encode_mimeheader, - mb_convert_case, mb_internal_encoding, mb_list_encodings, mb_strlen, - mb_strpos, mb_strrpos, mb_strtolower, mb_strtoupper, mb_substitute_character, - mb_substr, mb_stripos, mb_stristr, mb_strrchr, mb_strrichr, mb_strripos, - mb_strstr*, -- `iconv`: *iconv, iconv_mime_decode, iconv_mime_decode_headers, - iconv_get_encoding, iconv_set_encoding, iconv_mime_encode, ob_iconv_handler, - iconv_strlen, iconv_strpos, iconv_strrpos, iconv_substr*, -- `intl`: *Normalizer, grapheme_extract, grapheme_stripos, grapheme_stristr, - grapheme_strlen, grapheme_strpos, grapheme_strripos, grapheme_strrpos, - grapheme_strstr, grapheme_substr*. - -`pcre` compiled with unicode support is required. - -Patchwork\Utf8 --------------- - -[Grapheme clusters](http://unicode.org/reports/tr29/) should always be -considered when working with generic Unicode strings. The `Patchwork\Utf8` -class implements the quasi-complete set of native string functions that need -UTF-8 grapheme clusters awareness. Function names, arguments and behavior -carefully replicates native PHP string functions so that usage is very easy. - -Some more functions are also provided to help handling UTF-8 strings: - -- *isUtf8()*: checks if a string contains well formed UTF-8 data, -- *toAscii()*: generic UTF-8 to ASCII transliteration, -- *strtocasefold()*: unicode transformation for caseless matching, -- *strtonatfold()*: generic case sensitive transformation for collation matching - -Mirrored string functions are: -*strlen, substr, strpos, stripos, strrpos, strripos, strstr, stristr, strrchr, -strrichr, strtolower, strtoupper, wordwrap, chr, count_chars, ltrim, ord, rtrim, -trim, str_ireplace, str_pad, str_shuffle, str_split, str_word_count, strcmp, -strnatcmp, strcasecmp, strnatcasecmp, strncasecmp, strncmp, strcspn, strpbrk, -strrev, strspn, strtr, substr_compare, substr_count, substr_replace, ucfirst, -lcfirst, ucwords, number_format, utf8_encode, utf8_decode*. - -Missing are *printf*-family functions. - -Usage ------ - -The recommended way to install Patchwork UTF-8 is [through -composer](http://getcomposer.org). Just create a `composer.json` file and run -the `php composer.phar install` command to install it: - - { - "require": { - "patchwork/utf8": "1.1.*" - } - } - -Then, early in your bootstrap sequence, you have to configure your environment: - -```php -\Patchwork\Utf8\Bootup::initAll(); // Enables the portablity layer and configures PHP for UTF-8 -\Patchwork\Utf8\Bootup::filterRequestUri(); // Redirects to an UTF-8 encoded URL if it's not already the case -\Patchwork\Utf8\Bootup::filterRequestInputs(); // Sanitizes HTTP inputs to UTF-8 NFC -``` - -Run `phpunit` in the `tests/` directory to see the code in action. - -Make sure that you are confident about using UTF-8 by reading -[Character Sets / Character Encoding Issues](http://www.phpwact.org/php/i18n/charsets) -and [Handling UTF-8 with PHP](http://www.phpwact.org/php/i18n/utf-8), -or [PHP et UTF-8](http://julp.lescigales.org/articles/3-php-et-utf-8.html) for french readers. - -You should also get familar with the concept of -[Unicode Normalization](http://en.wikipedia.org/wiki/Unicode_equivalence) and -[Grapheme Clusters](http://unicode.org/reports/tr29/). - -Do not blindly replace all use of PHP's string functions. Most of the time you -will not need to, and you will be introducing a significant performance overhead -to your application. - -Screen your input on the *outer perimeter* so that only well formed UTF-8 pass -through. When dealing with badly formed UTF-8, you should not try to fix it. -Instead, consider it as ISO-8859-1 and use `utf8_encode()` to get an UTF-8 -string. Don't forget also to choose one unicode normalization form and stick to -it. NFC is the most in use today. - -This library is orthogonal to `mbstring.func_overload` and will not work if the -php.ini setting is enabled. - -Licensing ---------- - -Patchwork\Utf8 is free software; you can redistribute it and/or modify it under -the terms of the (at your option): -- [Apache License v2.0](http://apache.org/licenses/LICENSE-2.0.txt), or -- [GNU General Public License v2.0](http://gnu.org/licenses/gpl-2.0.txt). - -Unicode handling requires tedious work to be implemented and maintained on the -long run. As such, contributions such as unit tests, bug reports, comments or -patches licensed under both licenses are really welcomed. - -I hope many projects could adopt this code and together help solve the unicode -subject for PHP. diff --git a/vendor/patchwork/utf8/class/Normalizer.php b/vendor/patchwork/utf8/class/Normalizer.php deleted file mode 100644 index 3acd5f30..00000000 --- a/vendor/patchwork/utf8/class/Normalizer.php +++ /dev/null @@ -1,17 +0,0 @@ - 'utf-8', - 'ascii' => 'us-ascii', - 'tis-620' => 'iso-8859-11', - 'cp1250' => 'windows-1250', - 'cp1251' => 'windows-1251', - 'cp1252' => 'windows-1252', - 'cp1253' => 'windows-1253', - 'cp1254' => 'windows-1254', - 'cp1255' => 'windows-1255', - 'cp1256' => 'windows-1256', - 'cp1257' => 'windows-1257', - 'cp1258' => 'windows-1258', - 'shift-jis' => 'cp932', - 'shift_jis' => 'cp932', - 'latin1' => 'iso-8859-1', - 'latin2' => 'iso-8859-2', - 'latin3' => 'iso-8859-3', - 'latin4' => 'iso-8859-4', - 'latin5' => 'iso-8859-9', - 'latin6' => 'iso-8859-10', - 'latin7' => 'iso-8859-13', - 'latin8' => 'iso-8859-14', - 'latin9' => 'iso-8859-15', - 'latin10' => 'iso-8859-16', - 'iso8859-1' => 'iso-8859-1', - 'iso8859-2' => 'iso-8859-2', - 'iso8859-3' => 'iso-8859-3', - 'iso8859-4' => 'iso-8859-4', - 'iso8859-5' => 'iso-8859-5', - 'iso8859-6' => 'iso-8859-6', - 'iso8859-7' => 'iso-8859-7', - 'iso8859-8' => 'iso-8859-8', - 'iso8859-9' => 'iso-8859-9', - 'iso8859-10' => 'iso-8859-10', - 'iso8859-11' => 'iso-8859-11', - 'iso8859-12' => 'iso-8859-12', - 'iso8859-13' => 'iso-8859-13', - 'iso8859-14' => 'iso-8859-14', - 'iso8859-15' => 'iso-8859-15', - 'iso8859-16' => 'iso-8859-16', - 'iso_8859-1' => 'iso-8859-1', - 'iso_8859-2' => 'iso-8859-2', - 'iso_8859-3' => 'iso-8859-3', - 'iso_8859-4' => 'iso-8859-4', - 'iso_8859-5' => 'iso-8859-5', - 'iso_8859-6' => 'iso-8859-6', - 'iso_8859-7' => 'iso-8859-7', - 'iso_8859-8' => 'iso-8859-8', - 'iso_8859-9' => 'iso-8859-9', - 'iso_8859-10' => 'iso-8859-10', - 'iso_8859-11' => 'iso-8859-11', - 'iso_8859-12' => 'iso-8859-12', - 'iso_8859-13' => 'iso-8859-13', - 'iso_8859-14' => 'iso-8859-14', - 'iso_8859-15' => 'iso-8859-15', - 'iso_8859-16' => 'iso-8859-16', - 'iso88591' => 'iso-8859-1', - 'iso88592' => 'iso-8859-2', - 'iso88593' => 'iso-8859-3', - 'iso88594' => 'iso-8859-4', - 'iso88595' => 'iso-8859-5', - 'iso88596' => 'iso-8859-6', - 'iso88597' => 'iso-8859-7', - 'iso88598' => 'iso-8859-8', - 'iso88599' => 'iso-8859-9', - 'iso885910' => 'iso-8859-10', - 'iso885911' => 'iso-8859-11', - 'iso885912' => 'iso-8859-12', - 'iso885913' => 'iso-8859-13', - 'iso885914' => 'iso-8859-14', - 'iso885915' => 'iso-8859-15', - 'iso885916' => 'iso-8859-16', - ), - - $translit_map = array(), - $convert_map = array(), - $error_handler, - $last_error, - - $ulen_mask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4), - $is_valid_utf8; - - - static function iconv($in_charset, $out_charset, $str) - { - if ('' === (string) $str) return ''; - - - // Prepare for //IGNORE and //TRANSLIT - - $TRANSLIT = $IGNORE = ''; - - $out_charset = strtolower($out_charset); - $in_charset = strtolower($in_charset ); - - '' === $out_charset && $out_charset = 'iso-8859-1'; - '' === $in_charset && $in_charset = 'iso-8859-1'; - - if ('//translit' === substr($out_charset, -10)) - { - $TRANSLIT = '//TRANSLIT'; - $out_charset = substr($out_charset, 0, -10); - } - - if ('//ignore' === substr($out_charset, -8)) - { - $IGNORE = '//IGNORE'; - $out_charset = substr($out_charset, 0, -8); - } - - '//translit' === substr($in_charset, -10) && $in_charset = substr($in_charset, 0, -10); - '//ignore' === substr($in_charset, -8) && $in_charset = substr($in_charset, 0, -8); - - isset(self::$alias[ $in_charset]) && $in_charset = self::$alias[ $in_charset]; - isset(self::$alias[$out_charset]) && $out_charset = self::$alias[$out_charset]; - - - // Load charset maps - - if ( ('utf-8' !== $in_charset && !self::loadMap('from.', $in_charset, $in_map)) - || ('utf-8' !== $out_charset && !self::loadMap( 'to.', $out_charset, $out_map)) ) - { - user_error(sprintf(self::ERROR_WRONG_CHARSET, $in_charset, $out_charset)); - return false; - } - - - if ('utf-8' !== $in_charset) - { - // Convert input to UTF-8 - $result = ''; - if (self::map_to_utf8($result, $in_map, $str, $IGNORE)) $str = $result; - else $str = false; - self::$is_valid_utf8 = true; - } - else - { - self::$is_valid_utf8 = preg_match('//u', $str); - - if (!self::$is_valid_utf8 && !$IGNORE) - { - user_error(self::ERROR_ILLEGAL_CHARACTER); - return false; - } - - if ('utf-8' === $out_charset) - { - // UTF-8 validation - $str = self::utf8_to_utf8($str, $IGNORE); - } - } - - if ('utf-8' !== $out_charset && false !== $str) - { - // Convert output to UTF-8 - $result = ''; - if (self::map_from_utf8($result, $out_map, $str, $IGNORE, $TRANSLIT)) return $result; - else return false; - } - else return $str; - } - - static function iconv_mime_decode_headers($str, $mode = 0, $charset = INF) - { - INF === $charset && $charset = self::$internal_encoding; - - false !== strpos($str, "\r") && $str = strtr(str_replace("\r\n", "\n", $str), "\r", "\n"); - $str = explode("\n\n", $str, 2); - - $headers = array(); - - $str = preg_split('/\n(?![ \t])/', $str[0]); - foreach ($str as $str) - { - $str = self::iconv_mime_decode($str, $mode, $charset); - $str = explode(':', $str, 2); - - if (2 === count($str)) - { - if (isset($headers[$str[0]])) - { - is_array($headers[$str[0]]) || $headers[$str[0]] = array($headers[$str[0]]); - $headers[$str[0]][] = ltrim($str[1]); - } - else $headers[$str[0]] = ltrim($str[1]); - } - } - - return $headers; - } - - static function iconv_mime_decode($str, $mode = 0, $charset = INF) - { - INF === $charset && $charset = self::$internal_encoding; - if (ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) $charset .= '//IGNORE'; - - false !== strpos($str, "\r") && $str = strtr(str_replace("\r\n", "\n", $str), "\r", "\n"); - $str = preg_split('/\n(?![ \t])/', rtrim($str), 2); - $str = preg_replace('/[ \t]*\n[ \t]+/', ' ', rtrim($str[0])); - $str = preg_split('/=\?([^?]+)\?([bqBQ])\?(.*)\?=/', $str, -1, PREG_SPLIT_DELIM_CAPTURE); - - $result = self::iconv('utf-8', $charset, $str[0]); - - $i = 1; - $len = count($str); - - while ($i < $len) - { - if ('Q' !== strtoupper($str[$i+1])) $str[$i+2] = base64_decode($str[$i+2]); - else $str[$i+2] = rawurldecode(strtr(str_replace('%', '%25', $str[$i+2]), '=_', '% ')); - - $str[$i+2] = self::iconv($str[$i], $charset, $str[$i+2]); - $str[$i+3] = self::iconv('utf-8' , $charset, $str[$i+3]); - - $result .= $str[$i+2] . ('' === trim($str[$i+3]) ? '' : $str[$i+3]); - - $i += 4; - } - - return $result; - } - - static function iconv_get_encoding($type = 'all') - { - switch ($type) - { - case 'input_encoding' : return self::$input_encoding; - case 'output_encoding' : return self::$output_encoding; - case 'internal_encoding': return self::$internal_encoding; - } - - return array( - 'input_encoding' => self::$input_encoding, - 'output_encoding' => self::$output_encoding, - 'internal_encoding' => self::$internal_encoding - ); - } - - static function iconv_set_encoding($type, $charset) - { - switch ($type) - { - case 'input_encoding' : self::$input_encoding = $charset; break; - case 'output_encoding' : self::$output_encoding = $charset; break; - case 'internal_encoding': self::$internal_encoding = $charset; break; - - default: return false; - } - - return true; - } - - static function iconv_mime_encode($field_name, $field_value, $pref = INF) - { - is_array($pref) || $pref = array(); - - $pref += array( - 'scheme' => 'B', - 'input-charset' => self::$internal_encoding, - 'output-charset' => self::$internal_encoding, - 'line-length' => 76, - 'line-break-chars' => "\r\n" - ); - - preg_match('/[\x80-\xFF]/', $field_name) && $field_name = ''; - - $scheme = strtoupper(substr($pref['scheme'], 0, 1)); - $in = strtolower($pref['input-charset']); - $out = strtolower($pref['output-charset']); - - if ('utf-8' !== $in && false === $field_value = self::iconv($in, 'utf-8', $field_value)) return false; - - preg_match_all('/./us', $field_value, $chars); - - $chars = isset($chars[0]) ? $chars[0] : array(); - - $line_break = (int) $pref['line-length']; - $line_start = "=?{$pref['output-charset']}?{$scheme}?"; - $line_length = strlen($field_name) + 2 + strlen($line_start) + 2; - $line_offset = strlen($line_start) + 3; - $line_data = ''; - - $field_value = array(); - - $Q = 'Q' === $scheme; - - foreach ($chars as $c) - { - if ('utf-8' !== $out && false === $c = self::iconv('utf-8', $out, $c)) return false; - - $o = $Q - ? $c = preg_replace_callback( - '/[=_\?\x00-\x1F\x80-\xFF]/', - array(__CLASS__, 'qp_byte_callback'), - $c - ) - : base64_encode($line_data . $c); - - if (isset($o[$line_break - $line_length])) - { - $Q || $line_data = base64_encode($line_data); - $field_value[] = $line_start . $line_data . '?='; - $line_length = $line_offset; - $line_data = ''; - } - - $line_data .= $c; - $Q && $line_length += strlen($c); - } - - if ('' !== $line_data) - { - $Q || $line_data = base64_encode($line_data); - $field_value[] = $line_start . $line_data . '?='; - } - - return $field_name . ': ' . implode($pref['line-break-chars'] . ' ', $field_value); - } - - static function ob_iconv_handler($buffer, $mode) - { - return self::iconv(self::$internal_encoding, self::$output_encoding, $buffer); - } - - static function iconv_strlen($s, $encoding = INF) - { -/**/ if (extension_loaded('xml')) - return self::strlen1($s, $encoding); -/**/ else - return self::strlen2($s, $encoding); - } - - static function strlen1($s, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - if (0 !== strncasecmp($encoding, 'utf-8', 5) && false === $s = self::iconv($encoding, 'utf-8', $s)) return false; - - return strlen(utf8_decode($s)); - } - - static function strlen2($s, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - if (0 !== strncasecmp($encoding, 'utf-8', 5) && false === $s = self::iconv($encoding, 'utf-8', $s)) return false; - - $ulen_mask = self::$ulen_mask; - - $i = 0; $j = 0; - $len = strlen($s); - - while ($i < $len) - { - $u = $s[$i] & "\xF0"; - $i += isset($ulen_mask[$u]) ? $ulen_mask[$u] : 1; - ++$j; - } - - return $j; - } - - static function iconv_strpos($haystack, $needle, $offset = 0, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - if (0 !== strncasecmp($encoding, 'utf-8', 5) && false === $s = self::iconv($encoding, 'utf-8', $s)) return false; - - if ($offset = (int) $offset) $haystack = self::iconv_substr($haystack, $offset, 2147483647, 'utf-8'); - $pos = strpos($haystack, $needle); - return false === $pos ? false : ($offset + ($pos ? iconv_strlen(substr($haystack, 0, $pos), 'utf-8') : 0)); - } - - static function iconv_strrpos($haystack, $needle, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - if (0 !== strncasecmp($encoding, 'utf-8', 5) && false === $s = self::iconv($encoding, 'utf-8', $s)) return false; - - $needle = self::iconv_substr($needle, 0, 1, 'utf-8'); - $pos = strpos(strrev($haystack), strrev($needle)); - return false === $pos ? false : iconv_strlen($pos ? substr($haystack, 0, -$pos) : $haystack, 'utf-8'); - } - - static function iconv_substr($s, $start, $length = 2147483647, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - if (0 === strncasecmp($encoding, 'utf-8', 5)) $encoding = INF; - else if (false === $s = self::iconv($encoding, 'utf-8', $s)) return false; - - $slen = iconv_strlen($s, 'utf-8'); - $start = (int) $start; - - if (0 > $start) $start += $slen; - if (0 > $start) return false; - if ($start >= $slen) return false; - - $rx = $slen - $start; - - if (0 > $length) $length += $rx; - if (0 === $length) return ''; - if (0 > $length) return false; - - if ($length > $rx) $length = $rx; - - $rx = '/^' . ($start ? self::preg_offset($start) : '') . '(' . self::preg_offset($length) . ')/u'; - - $s = preg_match($rx, $s, $s) ? $s[1] : ''; - - if (INF === $encoding) return $s; - else return self::iconv('utf-8', $encoding, $s); - } - - static function iconv_workaround52211($in_charset, $out_charset, $str) - { - self::$last_error = false; - self::$error_handler = set_error_handler(array(__CLASS__, 'iconv_workaround52211_error_handler')); - $str = iconv($in_charset, $out_charset, $str); - restore_error_handler(); - self::$error_handler = null; - - if (true === self::$last_error && is_string($str)) - { - self::$error_handler = null; - return false; - } - - return $str; - } - - protected static function iconv_workaround52211_error_handler($no, $msg, $file, $line, &$context) - { - if ($h = self::$error_handler) - { - $no = call_user_func_array($h, array($no, $msg, $file, $line, &$context)); - self::$error_handler = $h; - } - else $no = false; - self::$last_error = true; - return $no; - } - - protected static function loadMap($type, $charset, &$map) - { - if (!isset(self::$convert_map[$type . $charset])) - { - if (false === $map = self::getData($type . $charset)) - { - if ('to.' === $type && self::loadMap('from.', $charset, $map)) $map = array_reverse($map); - else return false; - } - - self::$convert_map[$type . $charset] = $map; - } - else $map = self::$convert_map[$type . $charset]; - - return true; - } - - protected static function utf8_to_utf8($str, $IGNORE) - { - $ulen_mask = self::$ulen_mask; - $valid = self::$is_valid_utf8; - - $u = $str; - $i = $j = 0; - $len = strlen($str); - - while ($i < $len) - { - if ($str[$i] < "\x80") $u[$j++] = $str[$i++]; - else - { - $ulen = $str[$i] & "\xF0"; - $ulen = isset($ulen_mask[$ulen]) ? $ulen_mask[$ulen] : 1; - $uchr = substr($str, $i, $ulen); - - if (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr))) - { - if ($IGNORE) - { - ++$i; - continue; - } - - user_error(self::ERROR_ILLEGAL_CHARACTER); - return false; - } - else $i += $ulen; - - $u[$j++] = $uchr[0]; - - isset($uchr[1]) && 0 !== ($u[$j++] = $uchr[1]) - && isset($uchr[2]) && 0 !== ($u[$j++] = $uchr[2]) - && isset($uchr[3]) && 0 !== ($u[$j++] = $uchr[3]); - } - } - - return substr($u, 0, $j); - } - - protected static function map_to_utf8(&$result, $map, $str, $IGNORE) - { - $len = strlen($str); - for ($i = 0; $i < $len; ++$i) - { - if (isset($str[$i+1], $map[$str[$i] . $str[$i+1]])) $result .= $map[$str[$i] . $str[++$i]]; - else if (isset($map[$str[$i]])) $result .= $map[$str[$i]]; - else if (!$IGNORE) - { - user_error(self::ERROR_ILLEGAL_CHARACTER); - return false; - } - } - - return true; - } - - protected static function map_from_utf8(&$result, $map, $str, $IGNORE, $TRANSLIT) - { - $ulen_mask = self::$ulen_mask; - $valid = self::$is_valid_utf8; - - $TRANSLIT - && self::$translit_map - || self::$translit_map = self::getData('translit'); - - $i = 0; - $len = strlen($str); - - while ($i < $len) - { - if ($str[$i] < "\x80") $uchr = $str[$i++]; - else - { - $ulen = $str[$i] & "\xF0"; - $ulen = isset($ulen_mask[$ulen]) ? $ulen_mask[$ulen] : 1; - $uchr = substr($str, $i, $ulen); - - if ($IGNORE && (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr)))) - { - ++$i; - continue; - } - else $i += $ulen; - } - - if (isset($map[$uchr])) - { - $result .= $map[$uchr]; - } - else if ($TRANSLIT && isset($translit_map[$uchr])) - { - $uchr = $translit_map[$uchr]; - - if (isset($map[$uchr])) - { - $result .= $map[$uchr]; - } - else if (!self::map_from_utf8($result, $map, $uchr, $IGNORE, true)) - { - return false; - } - } - else - { - user_error(self::ERROR_ILLEGAL_CHARACTER); - return false; - } - } - - return true; - } - - protected static function qp_byte_callback($m) - { - return '=' . strtoupper(dechex(ord($m[0]))); - } - - protected static function preg_offset($offset) - { - $rx = array(); - $offset = (int) $offset; - - while ($offset > 65535) - { - $rx[] = '.{65535}'; - $offset -= 65535; - } - - return implode('', $rx) . '.{' . $offset . '}'; - } - - protected static function getData($file) - { - $file = __DIR__ . '/charset/' . $file . '.ser'; - if (file_exists($file)) return unserialize(file_get_contents($file)); - else return false; - } -} diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php deleted file mode 100644 index fb4424eb..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php +++ /dev/null @@ -1,145 +0,0 @@ - $size || 0 > $start || 0 > $type || 2 < $type) return false; - if (0 === $size) return ''; - - $next = $start; - $s = substr($s, $start); //TODO: seek to the first character boundary when needed - - if (GRAPHEME_EXTR_COUNT === $type) - { - if ($size > 65635) - { - // Workaround PCRE limiting quantifiers to 65635. - $rx = floor(sqrt($size)); - $size -= $rx * $rx; // This can't be greather than 65635: the native intl is limited to 2Gio strings - $rx = '(?:' . GRAPHEME_CLUSTER_RX . "{{$rx}}){{$rx}}" . GRAPHEME_CLUSTER_RX . "{1,{$size}}"; - } - else $rx = GRAPHEME_CLUSTER_RX . "{1,{$size}}"; - - $s = preg_split("/({$rx})/u", $s, 2, PREG_SPLIT_DELIM_CAPTURE); - $next += strlen($s[0]); - $s = isset($s[1]) ? $s[1] : ''; - } - else - { - //TODO - return !user_error(__METHOD__ . '() with GRAPHEME_EXTR_MAXBYTES or GRAPHEME_EXTR_MAXCHARS is not implemented', E_USER_WARNING); - } - - $next += strlen($s); - - return $s; - } - - static function grapheme_strlen($s) - { - preg_replace('/' . GRAPHEME_CLUSTER_RX . '/u', '', $s, -1, $s); - return $s; - } - - static function grapheme_substr($s, $start, $len = 2147483647) - { - preg_match_all('/' . GRAPHEME_CLUSTER_RX . '/u', $s, $s); - - $slen = count($s[0]); - $start = (int) $start; - - if (0 > $start) $start += $slen; - if (0 > $start) return false; - if ($start >= $slen) return false; - - $rem = $slen - $start; - - if (0 > $len) $len += $rem; - if (0 === $len) return ''; - if (0 > $len) return false; - if ($len > $rem) $len = $rem; - - return implode('', array_slice($s[0], $start, $len)); - } - - static function grapheme_substr_workaround62759($s, $start, $len) - { - // Intl based http://bugs.php.net/62759 and 55562 workaround - - if (2147483647 == $len) return grapheme_substr($s, $start); - - $slen = grapheme_strlen($s); - $start = (int) $start; - - if (0 > $start) $start += $slen; - if (0 > $start) return false; - if ($start >= $slen) return false; - - $rem = $slen - $start; - - if (0 > $len) $len += $rem; - if (0 === $len) return ''; - if (0 > $len) return false; - if ($len > $rem) $len = $rem; - - return grapheme_substr($s, $start, $len); - } - - static function grapheme_strpos ($s, $needle, $offset = 0) {return self::grapheme_position($s, $needle, $offset, 0);} - static function grapheme_stripos ($s, $needle, $offset = 0) {return self::grapheme_position($s, $needle, $offset, 1);} - static function grapheme_strrpos ($s, $needle, $offset = 0) {return self::grapheme_position($s, $needle, $offset, 2);} - static function grapheme_strripos($s, $needle, $offset = 0) {return self::grapheme_position($s, $needle, $offset, 3);} - static function grapheme_stristr ($s, $needle, $before_needle = false) {return mb_stristr($s, $needle, $before_needle, 'UTF-8');} - static function grapheme_strstr ($s, $needle, $before_needle = false) {return mb_strstr ($s, $needle, $before_needle, 'UTF-8');} - - - protected static function grapheme_position($s, $needle, $offset, $mode) - { - if ($offset > 0) $s = (string) self::grapheme_substr($s, $offset); - else if ($offset < 0) $offset = 0; - if ('' === (string) $needle) return false; - if ('' === (string) $s) return false; - - switch ($mode) - { - case 0: $needle = iconv_strpos ($s, $needle, 0, 'UTF-8'); break; - case 1: $needle = mb_stripos ($s, $needle, 0, 'UTF-8'); break; - case 2: $needle = iconv_strrpos($s, $needle, 'UTF-8'); break; - default: $needle = mb_strripos ($s, $needle, 0, 'UTF-8'); break; - } - - return $needle ? self::grapheme_strlen(iconv_substr($s, 0, $needle, 'UTF-8')) + $offset : $needle; - } -} diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Mbstring.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Mbstring.php deleted file mode 100644 index be318f8c..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Mbstring.php +++ /dev/null @@ -1,336 +0,0 @@ - 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); - - $i = 0; - $len = strlen($s); - - while ($i < $len) - { - $ulen = $s[$i] < "\x80" ? 1 : $ulen_mask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - - if (isset($map[$uchr])) - { - $uchr = $map[$uchr]; - $nlen = strlen($uchr); - - if ($nlen == $ulen) - { - $nlen = $i; - do $s[--$nlen] = $uchr[--$ulen]; - while ($ulen); - } - else - { - $s = substr_replace($s, $uchr, $i, $ulen); - $len += $nlen - $ulen; - $i += $nlen - $ulen; - } - } - } - - if (MB_CASE_TITLE == $mode) - { - $s = preg_replace_callback('/\b\p{Ll}/u', array(__CLASS__, 'title_case_callback'), $s); - } - - if (INF === $encoding) return $s; - else return iconv('UTF-8', $encoding, $s); - } - - static function mb_internal_encoding($encoding = INF) - { - if (INF === $encoding) return self::$internal_encoding; - - if ('UTF-8' === strtoupper($encoding) || false !== @iconv($encoding, $encoding, ' ')) - { - self::$internal_encoding = $encoding; - return true; - } - - return false; - } - - static function mb_list_encodings() - { - return array('UTF-8'); - } - - static function mb_strlen($s, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - return iconv_strlen($s, $encoding . '//IGNORE'); - } - - static function mb_strpos ($haystack, $needle, $offset = 0, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - if ('' === (string) $needle) - { - user_error(__METHOD__ . ': Empty delimiter', E_USER_WARNING); - return false; - } - else return iconv_strpos($haystack, $needle, $offset, $encoding . '//IGNORE'); - } - - static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - - if ($offset != (int) $offset) - { - $offset = 0; - } - else if ($offset = (int) $offset) - { - $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); - } - - $pos = iconv_strrpos($haystack, $needle, $encoding . '//IGNORE'); - - return false !== $pos ? $offset + $pos : false; - } - - static function mb_strtolower($s, $encoding = INF) - { - return self::mb_convert_case($s, MB_CASE_LOWER, $encoding); - } - - static function mb_strtoupper($s, $encoding = INF) - { - return self::mb_convert_case($s, MB_CASE_UPPER, $encoding); - } - - static function mb_substitute_character($c = INF) - { - return INF !== $c ? false : 'none'; - } - - static function mb_substr($s, $start, $length = 2147483647, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - - if ($start < 0) - { - $start = iconv_strlen($s, $encoding . '//IGNORE') + $start; - if ($start < 0) $start = 0; - } - - if ($length < 0) - { - $length = iconv_strlen($s, $encoding . '//IGNORE') + $length - $start; - if ($length < 0) return ''; - } - - return (string) iconv_substr($s, $start, $length, $encoding . '//IGNORE'); - } - - static function mb_stripos($haystack, $needle, $offset = 0, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); - return self::mb_strpos($haystack, $needle, $offset, $encoding); - } - - static function mb_stristr($haystack, $needle, $part = false, $encoding = INF) - { - $pos = self::mb_stripos($haystack, $needle, $encoding); - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - static function mb_strrchr($haystack, $needle, $part = false, $encoding = INF) - { - $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = iconv_strrpos($haystack, $needle, $encoding); - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - static function mb_strrichr($haystack, $needle, $part = false, $encoding = INF) - { - $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = self::mb_strripos($haystack, $needle, $encoding); - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - static function mb_strripos($haystack, $needle, $offset = 0, $encoding = INF) - { - INF === $encoding && $encoding = self::$internal_encoding; - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); - return self::mb_strrpos($haystack, $needle, $offset, $encoding); - } - - static function mb_strstr($haystack, $needle, $part = false, $encoding = INF) - { - $pos = strpos($haystack, $needle); - if (false === $pos) return false; - if ($part) return substr($haystack, 0, $pos); - else return substr($haystack, $pos); - } - - - protected static function getSubpart($pos, $part, $haystack, $encoding) - { - INF === $encoding && $encoding = self::$internal_encoding; - - if (false === $pos) return false; - if ($part) return self::mb_substr($haystack, 0, $pos, $encoding); - else return self::mb_substr($haystack, $pos, 2147483647, $encoding); - } - - protected static function html_encoding_callback($m) - { - return htmlentities($m, ENT_COMPAT, 'UTF-8'); - } - - protected static function title_case_callback($s) - { - return self::mb_convert_case($s[0], MB_CASE_UPPER, 'UTF-8'); - } - - protected static function getData($file) - { - $file = __DIR__ . '/unidata/' . $file . '.ser'; - if (file_exists($file)) return unserialize(file_get_contents($file)); - else return false; - } -} diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Normalizer.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Normalizer.php deleted file mode 100644 index 2f622885..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Normalizer.php +++ /dev/null @@ -1,295 +0,0 @@ - 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4), - $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; - - - static function isNormalized($s, $form = self::NFC) - { - if (strspn($s, self::$ASCII) === strlen($s)) return true; - if (self::NFC === $form && preg_match('//u', $s) && !preg_match('/[^\x00-\x{2FF}]/u', $s)) return true; - return false; // Pretend false as quick checks implementented in PHP won't be so quick - } - - static function normalize($s, $form = self::NFC) - { - if (!preg_match('//u', $s)) return false; - - switch ($form) - { - case self::NONE: return $s; - case self::NFC: $C = true; $K = false; break; - case self::NFD: $C = false; $K = false; break; - case self::NFKC: $C = true; $K = true; break; - case self::NFKD: $C = false; $K = true; break; - default: return false; - } - - if (!strlen($s)) return ''; - - if ($K && empty(self::$KD)) self::$KD = self::getData('compatibilityDecomposition'); - - if (empty(self::$D)) - { - self::$D = self::getData('canonicalDecomposition'); - self::$cC = self::getData('combiningClass'); - } - - if ($C) - { - if (empty(self::$C)) self::$C = self::getData('canonicalComposition'); - return self::recompose(self::decompose($s, $K)); - } - else return self::decompose($s, $K); - } - - protected static function recompose($s) - { - $ASCII = self::$ASCII; - $compMap = self::$C; - $combClass = self::$cC; - $ulen_mask = self::$ulen_mask; - - $result = $tail = ''; - - $i = $s[0] < "\x80" ? 1 : $ulen_mask[$s[0] & "\xF0"]; - $len = strlen($s); - - $last_uchr = substr($s, 0, $i); - $last_ucls = isset($combClass[$last_uchr]) ? 256 : 0; - - while ($i < $len) - { - if ($s[$i] < "\x80") - { - // ASCII chars - - if ($tail) - { - $last_uchr .= $tail; - $tail = ''; - } - - if ($j = strspn($s, $ASCII, $i+1)) - { - $last_uchr .= substr($s, $i, $j); - $i += $j; - } - - $result .= $last_uchr; - $last_uchr = $s[$i]; - ++$i; - } - else - { - $ulen = $ulen_mask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - - if ($last_uchr < "\xE1\x84\x80" || "\xE1\x84\x92" < $last_uchr - || $uchr < "\xE1\x85\xA1" || "\xE1\x85\xB5" < $uchr - || $last_ucls) - { - // Table lookup and combining chars composition - - $ucls = isset($combClass[$uchr]) ? $combClass[$uchr] : 0; - - if (isset($compMap[$last_uchr . $uchr]) && (!$last_ucls || $last_ucls < $ucls)) - { - $last_uchr = $compMap[$last_uchr . $uchr]; - } - else if ($last_ucls = $ucls) $tail .= $uchr; - else - { - if ($tail) - { - $last_uchr .= $tail; - $tail = ''; - } - - $result .= $last_uchr; - $last_uchr = $uchr; - } - } - else - { - // Hangul chars - - $L = ord($last_uchr[2]) - 0x80; - $V = ord($uchr[2]) - 0xA1; - $T = 0; - - $uchr = substr($s, $i + $ulen, 3); - - if ("\xE1\x86\xA7" <= $uchr && $uchr <= "\xE1\x87\x82") - { - $T = ord($uchr[2]) - 0xA7; - 0 > $T && $T += 0x40; - $ulen += 3; - } - - $L = 0xAC00 + ($L * 21 + $V) * 28 + $T; - $last_uchr = chr(0xE0 | $L>>12) . chr(0x80 | $L>>6 & 0x3F) . chr(0x80 | $L & 0x3F); - } - - $i += $ulen; - } - } - - return $result . $last_uchr . $tail; - } - - protected static function decompose($s, $c) - { - $result = ''; - - $ASCII = self::$ASCII; - $decompMap = self::$D; - $combClass = self::$cC; - $ulen_mask = self::$ulen_mask; - if ($c) $compatMap = self::$KD; - - $c = array(); - $i = 0; - $len = strlen($s); - - while ($i < $len) - { - if ($s[$i] < "\x80") - { - // ASCII chars - - if ($c) - { - ksort($c); - $result .= implode('', $c); - $c = array(); - } - - $j = 1 + strspn($s, $ASCII, $i+1); - $result .= substr($s, $i, $j); - $i += $j; - } - else - { - $ulen = $ulen_mask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - - if (isset($combClass[$uchr])) - { - // Combining chars, for sorting - - isset($c[$combClass[$uchr]]) || $c[$combClass[$uchr]] = ''; - $c[$combClass[$uchr]] .= isset($compatMap[$uchr]) ? $compatMap[$uchr] : (isset($decompMap[$uchr]) ? $decompMap[$uchr] : $uchr); - } - else - { - if ($c) - { - ksort($c); - $result .= implode('', $c); - $c = array(); - } - - if ($uchr < "\xEA\xB0\x80" || "\xED\x9E\xA3" < $uchr) - { - // Table lookup - - $j = isset($compatMap[$uchr]) ? $compatMap[$uchr] : (isset($decompMap[$uchr]) ? $decompMap[$uchr] : $uchr); - - if ($uchr != $j) - { - $uchr = $j; - - $j = strlen($uchr); - $ulen = $uchr[0] < "\x80" ? 1 : $ulen_mask[$uchr[0] & "\xF0"]; - - if ($ulen != $j) - { - // Put trailing chars in $s - - $j -= $ulen; - $i -= $j; - - if (0 > $i) - { - $s = str_repeat(' ', -$i) . $s; - $len -= $i; - $i = 0; - } - - while ($j--) $s[$i+$j] = $uchr[$ulen+$j]; - - $uchr = substr($uchr, 0, $ulen); - } - } - } - else - { - // Hangul chars - - $uchr = unpack('C*', $uchr); - $j = (($uchr[1]-224) << 12) + (($uchr[2]-128) << 6) + $uchr[3] - 0xAC80; - - $uchr = "\xE1\x84" . chr(0x80 + (int) ($j / 588)) - . "\xE1\x85" . chr(0xA1 + (int) (($j % 588) / 28)); - - if ($j %= 28) - { - $uchr .= $j < 25 - ? ("\xE1\x86" . chr(0xA7 + $j)) - : ("\xE1\x87" . chr(0x67 + $j)); - } - } - - $result .= $uchr; - } - } - } - - if ($c) - { - ksort($c); - $result .= implode('', $c); - } - - return $result; - } - - protected static function getData($file) - { - $file = __DIR__ . '/unidata/' . $file . '.ser'; - if (file_exists($file)) return unserialize(file_get_contents($file)); - else return false; - } -} diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Xml.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Xml.php deleted file mode 100644 index 85487b94..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Xml.php +++ /dev/null @@ -1,60 +0,0 @@ -";s:1:">";s:1:"?";s:1:"?";s:1:"@";s:1:"@";s:1:"A";s:1:"A";s:1:"B";s:1:"B";s:1:"C";s:1:"C";s:1:"D";s:1:"D";s:1:"E";s:1:"E";s:1:"F";s:1:"F";s:1:"G";s:1:"G";s:1:"H";s:1:"H";s:1:"I";s:1:"I";s:1:"J";s:1:"J";s:1:"K";s:1:"K";s:1:"L";s:1:"L";s:1:"M";s:1:"M";s:1:"N";s:1:"N";s:1:"O";s:1:"O";s:1:"P";s:1:"P";s:1:"Q";s:1:"Q";s:1:"R";s:1:"R";s:1:"S";s:1:"S";s:1:"T";s:1:"T";s:1:"U";s:1:"U";s:1:"V";s:1:"V";s:1:"W";s:1:"W";s:1:"X";s:1:"X";s:1:"Y";s:1:"Y";s:1:"Z";s:1:"Z";s:1:"[";s:1:"[";s:1:"\";s:1:"\";s:1:"]";s:1:"]";s:1:"^";s:1:"^";s:1:"_";s:1:"_";s:1:"`";s:3:"‘";s:1:"a";s:1:"a";s:1:"b";s:1:"b";s:1:"c";s:1:"c";s:1:"d";s:1:"d";s:1:"e";s:1:"e";s:1:"f";s:1:"f";s:1:"g";s:1:"g";s:1:"h";s:1:"h";s:1:"i";s:1:"i";s:1:"j";s:1:"j";s:1:"k";s:1:"k";s:1:"l";s:1:"l";s:1:"m";s:1:"m";s:1:"n";s:1:"n";s:1:"o";s:1:"o";s:1:"p";s:1:"p";s:1:"q";s:1:"q";s:1:"r";s:1:"r";s:1:"s";s:1:"s";s:1:"t";s:1:"t";s:1:"u";s:1:"u";s:1:"v";s:1:"v";s:1:"w";s:1:"w";s:1:"x";s:1:"x";s:1:"y";s:1:"y";s:1:"z";s:1:"z";s:1:"{";s:1:"{";s:1:"|";s:1:"|";s:1:"}";s:1:"}";s:1:"~";s:1:"~";s:1:"";s:2:"¡";s:1:"";s:2:"¢";s:1:"";s:2:"£";s:1:"";s:3:"⁄";s:1:"";s:2:"¥";s:1:"";s:2:"ƒ";s:1:"";s:2:"§";s:1:"";s:2:"¤";s:1:"";s:1:"'";s:1:"";s:3:"“";s:1:"";s:2:"«";s:1:"";s:3:"‹";s:1:"";s:3:"›";s:1:"";s:3:"fi";s:1:"";s:3:"fl";s:1:"";s:3:"–";s:1:"";s:3:"†";s:1:"";s:3:"‡";s:1:"";s:2:"·";s:1:"";s:2:"¶";s:1:"";s:3:"•";s:1:"";s:3:"‚";s:1:"";s:3:"„";s:1:"";s:3:"”";s:1:"";s:2:"»";s:1:"";s:3:"…";s:1:"";s:3:"‰";s:1:"";s:2:"¿";s:1:"";s:1:"`";s:1:"";s:2:"´";s:1:"";s:2:"ˆ";s:1:"";s:2:"˜";s:1:"";s:2:"¯";s:1:"";s:2:"˘";s:1:"";s:2:"˙";s:1:"";s:2:"¨";s:1:"";s:2:"˚";s:1:"";s:2:"¸";s:1:"";s:2:"˝";s:1:"";s:2:"˛";s:1:"";s:2:"ˇ";s:1:"";s:3:"—";s:1:"";s:2:"Æ";s:1:"";s:2:"ª";s:1:"";s:2:"Ł";s:1:"";s:2:"Ø";s:1:"";s:2:"Œ";s:1:"";s:2:"º";s:1:"";s:2:"æ";s:1:"";s:2:"ı";s:1:"";s:2:"ł";s:1:"";s:2:"ø";s:1:"";s:2:"œ";s:1:"";s:2:"ß";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.symbol.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.symbol.ser deleted file mode 100644 index 889217bf..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.symbol.ser +++ /dev/null @@ -1 +0,0 @@ -a:189:{s:1:" ";s:1:" ";s:1:"!";s:1:"!";s:1:""";s:3:"∀";s:1:"#";s:1:"#";s:1:"$";s:3:"∃";s:1:"%";s:1:"%";s:1:"&";s:1:"&";s:1:"'";s:3:"∋";s:1:"(";s:1:"(";s:1:")";s:1:")";s:1:"*";s:3:"∗";s:1:"+";s:1:"+";s:1:",";s:1:",";s:1:"-";s:3:"−";s:1:".";s:1:".";s:1:"/";s:1:"/";i:0;s:1:"0";i:1;s:1:"1";i:2;s:1:"2";i:3;s:1:"3";i:4;s:1:"4";i:5;s:1:"5";i:6;s:1:"6";i:7;s:1:"7";i:8;s:1:"8";i:9;s:1:"9";s:1:":";s:1:":";s:1:";";s:1:";";s:1:"<";s:1:"<";s:1:"=";s:1:"=";s:1:">";s:1:">";s:1:"?";s:1:"?";s:1:"@";s:3:"≅";s:1:"A";s:2:"Α";s:1:"B";s:2:"Β";s:1:"C";s:2:"Χ";s:1:"D";s:2:"Δ";s:1:"E";s:2:"Ε";s:1:"F";s:2:"Φ";s:1:"G";s:2:"Γ";s:1:"H";s:2:"Η";s:1:"I";s:2:"Ι";s:1:"J";s:2:"ϑ";s:1:"K";s:2:"Κ";s:1:"L";s:2:"Λ";s:1:"M";s:2:"Μ";s:1:"N";s:2:"Ν";s:1:"O";s:2:"Ο";s:1:"P";s:2:"Π";s:1:"Q";s:2:"Θ";s:1:"R";s:2:"Ρ";s:1:"S";s:2:"Σ";s:1:"T";s:2:"Τ";s:1:"U";s:2:"Υ";s:1:"V";s:2:"ς";s:1:"W";s:2:"Ω";s:1:"X";s:2:"Ξ";s:1:"Y";s:2:"Ψ";s:1:"Z";s:2:"Ζ";s:1:"[";s:1:"[";s:1:"\";s:3:"∴";s:1:"]";s:1:"]";s:1:"^";s:3:"⊥";s:1:"_";s:1:"_";s:1:"`";s:3:"";s:1:"a";s:2:"α";s:1:"b";s:2:"β";s:1:"c";s:2:"χ";s:1:"d";s:2:"δ";s:1:"e";s:2:"ε";s:1:"f";s:2:"φ";s:1:"g";s:2:"γ";s:1:"h";s:2:"η";s:1:"i";s:2:"ι";s:1:"j";s:2:"ϕ";s:1:"k";s:2:"κ";s:1:"l";s:2:"λ";s:1:"m";s:2:"µ";s:1:"n";s:2:"ν";s:1:"o";s:2:"ο";s:1:"p";s:2:"π";s:1:"q";s:2:"θ";s:1:"r";s:2:"ρ";s:1:"s";s:2:"σ";s:1:"t";s:2:"τ";s:1:"u";s:2:"υ";s:1:"v";s:2:"ϖ";s:1:"w";s:2:"ω";s:1:"x";s:2:"ξ";s:1:"y";s:2:"ψ";s:1:"z";s:2:"ζ";s:1:"{";s:1:"{";s:1:"|";s:1:"|";s:1:"}";s:1:"}";s:1:"~";s:3:"∼";s:1:"";s:3:"€";s:1:"";s:2:"ϒ";s:1:"";s:3:"′";s:1:"";s:3:"≤";s:1:"";s:3:"⁄";s:1:"";s:3:"∞";s:1:"";s:2:"ƒ";s:1:"";s:3:"♣";s:1:"";s:3:"♦";s:1:"";s:3:"♥";s:1:"";s:3:"♠";s:1:"";s:3:"↔";s:1:"";s:3:"←";s:1:"";s:3:"↑";s:1:"";s:3:"→";s:1:"";s:3:"↓";s:1:"";s:2:"°";s:1:"";s:2:"±";s:1:"";s:3:"″";s:1:"";s:3:"≥";s:1:"";s:2:"×";s:1:"";s:3:"∝";s:1:"";s:3:"∂";s:1:"";s:3:"•";s:1:"";s:2:"÷";s:1:"";s:3:"≠";s:1:"";s:3:"≡";s:1:"";s:3:"≈";s:1:"";s:3:"…";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"↵";s:1:"";s:3:"ℵ";s:1:"";s:3:"ℑ";s:1:"";s:3:"ℜ";s:1:"";s:3:"℘";s:1:"";s:3:"⊗";s:1:"";s:3:"⊕";s:1:"";s:3:"∅";s:1:"";s:3:"∩";s:1:"";s:3:"∪";s:1:"";s:3:"⊃";s:1:"";s:3:"⊇";s:1:"";s:3:"⊄";s:1:"";s:3:"⊂";s:1:"";s:3:"⊆";s:1:"";s:3:"∈";s:1:"";s:3:"∉";s:1:"";s:3:"∠";s:1:"";s:3:"∇";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"∏";s:1:"";s:3:"√";s:1:"";s:3:"⋅";s:1:"";s:2:"¬";s:1:"";s:3:"∧";s:1:"";s:3:"∨";s:1:"";s:3:"⇔";s:1:"";s:3:"⇐";s:1:"";s:3:"⇑";s:1:"";s:3:"⇒";s:1:"";s:3:"⇓";s:1:"";s:3:"◊";s:1:"";s:3:"〈";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"∑";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"〉";s:1:"";s:3:"∫";s:1:"";s:3:"⌠";s:1:"";s:3:"";s:1:"";s:3:"⌡";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.turkish.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.turkish.ser deleted file mode 100644 index a3651e68..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.turkish.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser deleted file mode 100644 index f10af335..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii.ser deleted file mode 100644 index 3a2f7e49..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1250.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1250.ser deleted file mode 100644 index 9e799cb5..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1250.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1251.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1251.ser deleted file mode 100644 index 6592885c..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1251.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1252.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1252.ser deleted file mode 100644 index cccc26c9..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1252.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1253.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1253.ser deleted file mode 100644 index 13c5a0b6..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1253.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1254.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1254.ser deleted file mode 100644 index 96d69722..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1254.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1255.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1255.ser deleted file mode 100644 index c366bfdb..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1255.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1256.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1256.ser deleted file mode 100644 index cc98d2c6..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1256.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1257.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1257.ser deleted file mode 100644 index 2a522061..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1257.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1258.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1258.ser deleted file mode 100644 index 114dd846..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1258.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser deleted file mode 100644 index 246603d8..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser deleted file mode 100644 index 3f606d65..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser deleted file mode 100644 index c4b66d93..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser deleted file mode 100644 index 15b35b1c..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser deleted file mode 100644 index a39e96a6..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.zdingbat.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.zdingbat.ser deleted file mode 100644 index 3a894d2d..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.zdingbat.ser +++ /dev/null @@ -1 +0,0 @@ -a:202:{s:1:" ";s:1:" ";s:1:"!";s:3:"✁";s:1:""";s:3:"✂";s:1:"#";s:3:"✃";s:1:"$";s:3:"✄";s:1:"%";s:3:"☎";s:1:"&";s:3:"✆";s:1:"'";s:3:"✇";s:1:"(";s:3:"✈";s:1:")";s:3:"✉";s:1:"*";s:3:"☛";s:1:"+";s:3:"☞";s:1:",";s:3:"✌";s:1:"-";s:3:"✍";s:1:".";s:3:"✎";s:1:"/";s:3:"✏";i:0;s:3:"✐";i:1;s:3:"✑";i:2;s:3:"✒";i:3;s:3:"✓";i:4;s:3:"✔";i:5;s:3:"✕";i:6;s:3:"✖";i:7;s:3:"✗";i:8;s:3:"✘";i:9;s:3:"✙";s:1:":";s:3:"✚";s:1:";";s:3:"✛";s:1:"<";s:3:"✜";s:1:"=";s:3:"✝";s:1:">";s:3:"✞";s:1:"?";s:3:"✟";s:1:"@";s:3:"✠";s:1:"A";s:3:"✡";s:1:"B";s:3:"✢";s:1:"C";s:3:"✣";s:1:"D";s:3:"✤";s:1:"E";s:3:"✥";s:1:"F";s:3:"✦";s:1:"G";s:3:"✧";s:1:"H";s:3:"★";s:1:"I";s:3:"✩";s:1:"J";s:3:"✪";s:1:"K";s:3:"✫";s:1:"L";s:3:"✬";s:1:"M";s:3:"✭";s:1:"N";s:3:"✮";s:1:"O";s:3:"✯";s:1:"P";s:3:"✰";s:1:"Q";s:3:"✱";s:1:"R";s:3:"✲";s:1:"S";s:3:"✳";s:1:"T";s:3:"✴";s:1:"U";s:3:"✵";s:1:"V";s:3:"✶";s:1:"W";s:3:"✷";s:1:"X";s:3:"✸";s:1:"Y";s:3:"✹";s:1:"Z";s:3:"✺";s:1:"[";s:3:"✻";s:1:"\";s:3:"✼";s:1:"]";s:3:"✽";s:1:"^";s:3:"✾";s:1:"_";s:3:"✿";s:1:"`";s:3:"❀";s:1:"a";s:3:"❁";s:1:"b";s:3:"❂";s:1:"c";s:3:"❃";s:1:"d";s:3:"❄";s:1:"e";s:3:"❅";s:1:"f";s:3:"❆";s:1:"g";s:3:"❇";s:1:"h";s:3:"❈";s:1:"i";s:3:"❉";s:1:"j";s:3:"❊";s:1:"k";s:3:"❋";s:1:"l";s:3:"●";s:1:"m";s:3:"❍";s:1:"n";s:3:"■";s:1:"o";s:3:"❏";s:1:"p";s:3:"❐";s:1:"q";s:3:"❑";s:1:"r";s:3:"❒";s:1:"s";s:3:"▲";s:1:"t";s:3:"▼";s:1:"u";s:3:"◆";s:1:"v";s:3:"❖";s:1:"w";s:3:"◗";s:1:"x";s:3:"❘";s:1:"y";s:3:"❙";s:1:"z";s:3:"❚";s:1:"{";s:3:"❛";s:1:"|";s:3:"❜";s:1:"}";s:3:"❝";s:1:"~";s:3:"❞";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"❡";s:1:"";s:3:"❢";s:1:"";s:3:"❣";s:1:"";s:3:"❤";s:1:"";s:3:"❥";s:1:"";s:3:"❦";s:1:"";s:3:"❧";s:1:"";s:3:"♣";s:1:"";s:3:"♦";s:1:"";s:3:"♥";s:1:"";s:3:"♠";s:1:"";s:3:"①";s:1:"";s:3:"②";s:1:"";s:3:"③";s:1:"";s:3:"④";s:1:"";s:3:"⑤";s:1:"";s:3:"⑥";s:1:"";s:3:"⑦";s:1:"";s:3:"⑧";s:1:"";s:3:"⑨";s:1:"";s:3:"⑩";s:1:"";s:3:"❶";s:1:"";s:3:"❷";s:1:"";s:3:"❸";s:1:"";s:3:"❹";s:1:"";s:3:"❺";s:1:"";s:3:"❻";s:1:"";s:3:"❼";s:1:"";s:3:"❽";s:1:"";s:3:"❾";s:1:"";s:3:"❿";s:1:"";s:3:"➀";s:1:"";s:3:"➁";s:1:"";s:3:"➂";s:1:"";s:3:"➃";s:1:"";s:3:"➄";s:1:"";s:3:"➅";s:1:"";s:3:"➆";s:1:"";s:3:"➇";s:1:"";s:3:"➈";s:1:"";s:3:"➉";s:1:"";s:3:"➊";s:1:"";s:3:"➋";s:1:"";s:3:"➌";s:1:"";s:3:"➍";s:1:"";s:3:"➎";s:1:"";s:3:"➏";s:1:"";s:3:"➐";s:1:"";s:3:"➑";s:1:"";s:3:"➒";s:1:"";s:3:"➓";s:1:"";s:3:"➔";s:1:"";s:3:"→";s:1:"";s:3:"↔";s:1:"";s:3:"↕";s:1:"";s:3:"➘";s:1:"";s:3:"➙";s:1:"";s:3:"➚";s:1:"";s:3:"➛";s:1:"";s:3:"➜";s:1:"";s:3:"➝";s:1:"";s:3:"➞";s:1:"";s:3:"➟";s:1:"";s:3:"➠";s:1:"";s:3:"➡";s:1:"";s:3:"➢";s:1:"";s:3:"➣";s:1:"";s:3:"➤";s:1:"";s:3:"➥";s:1:"";s:3:"➦";s:1:"";s:3:"➧";s:1:"";s:3:"➨";s:1:"";s:3:"➩";s:1:"";s:3:"➪";s:1:"";s:3:"➫";s:1:"";s:3:"➬";s:1:"";s:3:"➭";s:1:"";s:3:"➮";s:1:"";s:3:"➯";s:1:"";s:3:"➱";s:1:"";s:3:"➲";s:1:"";s:3:"➳";s:1:"";s:3:"➴";s:1:"";s:3:"➵";s:1:"";s:3:"➶";s:1:"";s:3:"➷";s:1:"";s:3:"➸";s:1:"";s:3:"➹";s:1:"";s:3:"➺";s:1:"";s:3:"➻";s:1:"";s:3:"➼";s:1:"";s:3:"➽";s:1:"";s:3:"➾";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.gsm0338.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.gsm0338.ser deleted file mode 100644 index e675fc33..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.gsm0338.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.mazovia.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.mazovia.ser deleted file mode 100644 index 70a534fe..00000000 Binary files a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.mazovia.ser and /dev/null differ diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.stdenc.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.stdenc.ser deleted file mode 100644 index 0cb46281..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.stdenc.ser +++ /dev/null @@ -1 +0,0 @@ -a:154:{s:2:" ";s:1:" ";s:2:"­";s:1:"-";s:3:"∕";s:1:"";s:3:"∙";s:1:"";s:2:"ˉ";s:1:"";s:1:" ";s:1:" ";s:1:"!";s:1:"!";s:1:""";s:1:""";s:1:"#";s:1:"#";s:1:"$";s:1:"$";s:1:"%";s:1:"%";s:1:"&";s:1:"&";s:3:"’";s:1:"'";s:1:"(";s:1:"(";s:1:")";s:1:")";s:1:"*";s:1:"*";s:1:"+";s:1:"+";s:1:",";s:1:",";s:1:"-";s:1:"-";s:1:".";s:1:".";s:1:"/";s:1:"/";i:0;i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;i:9;s:1:":";s:1:":";s:1:";";s:1:";";s:1:"<";s:1:"<";s:1:"=";s:1:"=";s:1:">";s:1:">";s:1:"?";s:1:"?";s:1:"@";s:1:"@";s:1:"A";s:1:"A";s:1:"B";s:1:"B";s:1:"C";s:1:"C";s:1:"D";s:1:"D";s:1:"E";s:1:"E";s:1:"F";s:1:"F";s:1:"G";s:1:"G";s:1:"H";s:1:"H";s:1:"I";s:1:"I";s:1:"J";s:1:"J";s:1:"K";s:1:"K";s:1:"L";s:1:"L";s:1:"M";s:1:"M";s:1:"N";s:1:"N";s:1:"O";s:1:"O";s:1:"P";s:1:"P";s:1:"Q";s:1:"Q";s:1:"R";s:1:"R";s:1:"S";s:1:"S";s:1:"T";s:1:"T";s:1:"U";s:1:"U";s:1:"V";s:1:"V";s:1:"W";s:1:"W";s:1:"X";s:1:"X";s:1:"Y";s:1:"Y";s:1:"Z";s:1:"Z";s:1:"[";s:1:"[";s:1:"\";s:1:"\";s:1:"]";s:1:"]";s:1:"^";s:1:"^";s:1:"_";s:1:"_";s:3:"‘";s:1:"`";s:1:"a";s:1:"a";s:1:"b";s:1:"b";s:1:"c";s:1:"c";s:1:"d";s:1:"d";s:1:"e";s:1:"e";s:1:"f";s:1:"f";s:1:"g";s:1:"g";s:1:"h";s:1:"h";s:1:"i";s:1:"i";s:1:"j";s:1:"j";s:1:"k";s:1:"k";s:1:"l";s:1:"l";s:1:"m";s:1:"m";s:1:"n";s:1:"n";s:1:"o";s:1:"o";s:1:"p";s:1:"p";s:1:"q";s:1:"q";s:1:"r";s:1:"r";s:1:"s";s:1:"s";s:1:"t";s:1:"t";s:1:"u";s:1:"u";s:1:"v";s:1:"v";s:1:"w";s:1:"w";s:1:"x";s:1:"x";s:1:"y";s:1:"y";s:1:"z";s:1:"z";s:1:"{";s:1:"{";s:1:"|";s:1:"|";s:1:"}";s:1:"}";s:1:"~";s:1:"~";s:2:"¡";s:1:"";s:2:"¢";s:1:"";s:2:"£";s:1:"";s:3:"⁄";s:1:"";s:2:"¥";s:1:"";s:2:"ƒ";s:1:"";s:2:"§";s:1:"";s:2:"¤";s:1:"";s:1:"'";s:1:"";s:3:"“";s:1:"";s:2:"«";s:1:"";s:3:"‹";s:1:"";s:3:"›";s:1:"";s:3:"fi";s:1:"";s:3:"fl";s:1:"";s:3:"–";s:1:"";s:3:"†";s:1:"";s:3:"‡";s:1:"";s:2:"·";s:1:"";s:2:"¶";s:1:"";s:3:"•";s:1:"";s:3:"‚";s:1:"";s:3:"„";s:1:"";s:3:"”";s:1:"";s:2:"»";s:1:"";s:3:"…";s:1:"";s:3:"‰";s:1:"";s:2:"¿";s:1:"";s:1:"`";s:1:"";s:2:"´";s:1:"";s:2:"ˆ";s:1:"";s:2:"˜";s:1:"";s:2:"¯";s:1:"";s:2:"˘";s:1:"";s:2:"˙";s:1:"";s:2:"¨";s:1:"";s:2:"˚";s:1:"";s:2:"¸";s:1:"";s:2:"˝";s:1:"";s:2:"˛";s:1:"";s:2:"ˇ";s:1:"";s:3:"—";s:1:"";s:2:"Æ";s:1:"";s:2:"ª";s:1:"";s:2:"Ł";s:1:"";s:2:"Ø";s:1:"";s:2:"Œ";s:1:"";s:2:"º";s:1:"";s:2:"æ";s:1:"";s:2:"ı";s:1:"";s:2:"ł";s:1:"";s:2:"ø";s:1:"";s:2:"œ";s:1:"";s:2:"ß";s:1:"";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.symbol.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.symbol.ser deleted file mode 100644 index fc615054..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.symbol.ser +++ /dev/null @@ -1 +0,0 @@ -a:194:{s:2:" ";s:1:" ";s:3:"∆";s:1:"D";s:3:"Ω";s:1:"W";s:2:"μ";s:1:"m";s:3:"∕";s:1:"";s:1:" ";s:1:" ";s:1:"!";s:1:"!";s:3:"∀";s:1:""";s:1:"#";s:1:"#";s:3:"∃";s:1:"$";s:1:"%";s:1:"%";s:1:"&";s:1:"&";s:3:"∋";s:1:"'";s:1:"(";s:1:"(";s:1:")";s:1:")";s:3:"∗";s:1:"*";s:1:"+";s:1:"+";s:1:",";s:1:",";s:3:"−";s:1:"-";s:1:".";s:1:".";s:1:"/";s:1:"/";i:0;i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;i:9;i:9;s:1:":";s:1:":";s:1:";";s:1:";";s:1:"<";s:1:"<";s:1:"=";s:1:"=";s:1:">";s:1:">";s:1:"?";s:1:"?";s:3:"≅";s:1:"@";s:2:"Α";s:1:"A";s:2:"Β";s:1:"B";s:2:"Χ";s:1:"C";s:2:"Δ";s:1:"D";s:2:"Ε";s:1:"E";s:2:"Φ";s:1:"F";s:2:"Γ";s:1:"G";s:2:"Η";s:1:"H";s:2:"Ι";s:1:"I";s:2:"ϑ";s:1:"J";s:2:"Κ";s:1:"K";s:2:"Λ";s:1:"L";s:2:"Μ";s:1:"M";s:2:"Ν";s:1:"N";s:2:"Ο";s:1:"O";s:2:"Π";s:1:"P";s:2:"Θ";s:1:"Q";s:2:"Ρ";s:1:"R";s:2:"Σ";s:1:"S";s:2:"Τ";s:1:"T";s:2:"Υ";s:1:"U";s:2:"ς";s:1:"V";s:2:"Ω";s:1:"W";s:2:"Ξ";s:1:"X";s:2:"Ψ";s:1:"Y";s:2:"Ζ";s:1:"Z";s:1:"[";s:1:"[";s:3:"∴";s:1:"\";s:1:"]";s:1:"]";s:3:"⊥";s:1:"^";s:1:"_";s:1:"_";s:3:"";s:1:"`";s:2:"α";s:1:"a";s:2:"β";s:1:"b";s:2:"χ";s:1:"c";s:2:"δ";s:1:"d";s:2:"ε";s:1:"e";s:2:"φ";s:1:"f";s:2:"γ";s:1:"g";s:2:"η";s:1:"h";s:2:"ι";s:1:"i";s:2:"ϕ";s:1:"j";s:2:"κ";s:1:"k";s:2:"λ";s:1:"l";s:2:"µ";s:1:"m";s:2:"ν";s:1:"n";s:2:"ο";s:1:"o";s:2:"π";s:1:"p";s:2:"θ";s:1:"q";s:2:"ρ";s:1:"r";s:2:"σ";s:1:"s";s:2:"τ";s:1:"t";s:2:"υ";s:1:"u";s:2:"ϖ";s:1:"v";s:2:"ω";s:1:"w";s:2:"ξ";s:1:"x";s:2:"ψ";s:1:"y";s:2:"ζ";s:1:"z";s:1:"{";s:1:"{";s:1:"|";s:1:"|";s:1:"}";s:1:"}";s:3:"∼";s:1:"~";s:3:"€";s:1:"";s:2:"ϒ";s:1:"";s:3:"′";s:1:"";s:3:"≤";s:1:"";s:3:"⁄";s:1:"";s:3:"∞";s:1:"";s:2:"ƒ";s:1:"";s:3:"♣";s:1:"";s:3:"♦";s:1:"";s:3:"♥";s:1:"";s:3:"♠";s:1:"";s:3:"↔";s:1:"";s:3:"←";s:1:"";s:3:"↑";s:1:"";s:3:"→";s:1:"";s:3:"↓";s:1:"";s:2:"°";s:1:"";s:2:"±";s:1:"";s:3:"″";s:1:"";s:3:"≥";s:1:"";s:2:"×";s:1:"";s:3:"∝";s:1:"";s:3:"∂";s:1:"";s:3:"•";s:1:"";s:2:"÷";s:1:"";s:3:"≠";s:1:"";s:3:"≡";s:1:"";s:3:"≈";s:1:"";s:3:"…";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"↵";s:1:"";s:3:"ℵ";s:1:"";s:3:"ℑ";s:1:"";s:3:"ℜ";s:1:"";s:3:"℘";s:1:"";s:3:"⊗";s:1:"";s:3:"⊕";s:1:"";s:3:"∅";s:1:"";s:3:"∩";s:1:"";s:3:"∪";s:1:"";s:3:"⊃";s:1:"";s:3:"⊇";s:1:"";s:3:"⊄";s:1:"";s:3:"⊂";s:1:"";s:3:"⊆";s:1:"";s:3:"∈";s:1:"";s:3:"∉";s:1:"";s:3:"∠";s:1:"";s:3:"∇";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"∏";s:1:"";s:3:"√";s:1:"";s:3:"⋅";s:1:"";s:2:"¬";s:1:"";s:3:"∧";s:1:"";s:3:"∨";s:1:"";s:3:"⇔";s:1:"";s:3:"⇐";s:1:"";s:3:"⇑";s:1:"";s:3:"⇒";s:1:"";s:3:"⇓";s:1:"";s:3:"◊";s:1:"";s:3:"〈";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"∑";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"〉";s:1:"";s:3:"∫";s:1:"";s:3:"⌠";s:1:"";s:3:"";s:1:"";s:3:"⌡";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.zdingbat.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.zdingbat.ser deleted file mode 100644 index 1f293bf8..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.zdingbat.ser +++ /dev/null @@ -1 +0,0 @@ -a:203:{s:2:" ";s:1:" ";s:1:" ";s:1:" ";s:3:"✁";s:1:"!";s:3:"✂";s:1:""";s:3:"✃";s:1:"#";s:3:"✄";s:1:"$";s:3:"☎";s:1:"%";s:3:"✆";s:1:"&";s:3:"✇";s:1:"'";s:3:"✈";s:1:"(";s:3:"✉";s:1:")";s:3:"☛";s:1:"*";s:3:"☞";s:1:"+";s:3:"✌";s:1:",";s:3:"✍";s:1:"-";s:3:"✎";s:1:".";s:3:"✏";s:1:"/";s:3:"✐";i:0;s:3:"✑";i:1;s:3:"✒";i:2;s:3:"✓";i:3;s:3:"✔";i:4;s:3:"✕";i:5;s:3:"✖";i:6;s:3:"✗";i:7;s:3:"✘";i:8;s:3:"✙";i:9;s:3:"✚";s:1:":";s:3:"✛";s:1:";";s:3:"✜";s:1:"<";s:3:"✝";s:1:"=";s:3:"✞";s:1:">";s:3:"✟";s:1:"?";s:3:"✠";s:1:"@";s:3:"✡";s:1:"A";s:3:"✢";s:1:"B";s:3:"✣";s:1:"C";s:3:"✤";s:1:"D";s:3:"✥";s:1:"E";s:3:"✦";s:1:"F";s:3:"✧";s:1:"G";s:3:"★";s:1:"H";s:3:"✩";s:1:"I";s:3:"✪";s:1:"J";s:3:"✫";s:1:"K";s:3:"✬";s:1:"L";s:3:"✭";s:1:"M";s:3:"✮";s:1:"N";s:3:"✯";s:1:"O";s:3:"✰";s:1:"P";s:3:"✱";s:1:"Q";s:3:"✲";s:1:"R";s:3:"✳";s:1:"S";s:3:"✴";s:1:"T";s:3:"✵";s:1:"U";s:3:"✶";s:1:"V";s:3:"✷";s:1:"W";s:3:"✸";s:1:"X";s:3:"✹";s:1:"Y";s:3:"✺";s:1:"Z";s:3:"✻";s:1:"[";s:3:"✼";s:1:"\";s:3:"✽";s:1:"]";s:3:"✾";s:1:"^";s:3:"✿";s:1:"_";s:3:"❀";s:1:"`";s:3:"❁";s:1:"a";s:3:"❂";s:1:"b";s:3:"❃";s:1:"c";s:3:"❄";s:1:"d";s:3:"❅";s:1:"e";s:3:"❆";s:1:"f";s:3:"❇";s:1:"g";s:3:"❈";s:1:"h";s:3:"❉";s:1:"i";s:3:"❊";s:1:"j";s:3:"❋";s:1:"k";s:3:"●";s:1:"l";s:3:"❍";s:1:"m";s:3:"■";s:1:"n";s:3:"❏";s:1:"o";s:3:"❐";s:1:"p";s:3:"❑";s:1:"q";s:3:"❒";s:1:"r";s:3:"▲";s:1:"s";s:3:"▼";s:1:"t";s:3:"◆";s:1:"u";s:3:"❖";s:1:"v";s:3:"◗";s:1:"w";s:3:"❘";s:1:"x";s:3:"❙";s:1:"y";s:3:"❚";s:1:"z";s:3:"❛";s:1:"{";s:3:"❜";s:1:"|";s:3:"❝";s:1:"}";s:3:"❞";s:1:"~";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"";s:1:"";s:3:"❡";s:1:"";s:3:"❢";s:1:"";s:3:"❣";s:1:"";s:3:"❤";s:1:"";s:3:"❥";s:1:"";s:3:"❦";s:1:"";s:3:"❧";s:1:"";s:3:"♣";s:1:"";s:3:"♦";s:1:"";s:3:"♥";s:1:"";s:3:"♠";s:1:"";s:3:"①";s:1:"";s:3:"②";s:1:"";s:3:"③";s:1:"";s:3:"④";s:1:"";s:3:"⑤";s:1:"";s:3:"⑥";s:1:"";s:3:"⑦";s:1:"";s:3:"⑧";s:1:"";s:3:"⑨";s:1:"";s:3:"⑩";s:1:"";s:3:"❶";s:1:"";s:3:"❷";s:1:"";s:3:"❸";s:1:"";s:3:"❹";s:1:"";s:3:"❺";s:1:"";s:3:"❻";s:1:"";s:3:"❼";s:1:"";s:3:"❽";s:1:"";s:3:"❾";s:1:"";s:3:"❿";s:1:"";s:3:"➀";s:1:"";s:3:"➁";s:1:"";s:3:"➂";s:1:"";s:3:"➃";s:1:"";s:3:"➄";s:1:"";s:3:"➅";s:1:"";s:3:"➆";s:1:"";s:3:"➇";s:1:"";s:3:"➈";s:1:"";s:3:"➉";s:1:"";s:3:"➊";s:1:"";s:3:"➋";s:1:"";s:3:"➌";s:1:"";s:3:"➍";s:1:"";s:3:"➎";s:1:"";s:3:"➏";s:1:"";s:3:"➐";s:1:"";s:3:"➑";s:1:"";s:3:"➒";s:1:"";s:3:"➓";s:1:"";s:3:"➔";s:1:"";s:3:"→";s:1:"";s:3:"↔";s:1:"";s:3:"↕";s:1:"";s:3:"➘";s:1:"";s:3:"➙";s:1:"";s:3:"➚";s:1:"";s:3:"➛";s:1:"";s:3:"➜";s:1:"";s:3:"➝";s:1:"";s:3:"➞";s:1:"";s:3:"➟";s:1:"";s:3:"➠";s:1:"";s:3:"➡";s:1:"";s:3:"➢";s:1:"";s:3:"➣";s:1:"";s:3:"➤";s:1:"";s:3:"➥";s:1:"";s:3:"➦";s:1:"";s:3:"➧";s:1:"";s:3:"➨";s:1:"";s:3:"➩";s:1:"";s:3:"➪";s:1:"";s:3:"➫";s:1:"";s:3:"➬";s:1:"";s:3:"➭";s:1:"";s:3:"➮";s:1:"";s:3:"➯";s:1:"";s:3:"➱";s:1:"";s:3:"➲";s:1:"";s:3:"➳";s:1:"";s:3:"➴";s:1:"";s:3:"➵";s:1:"";s:3:"➶";s:1:"";s:3:"➷";s:1:"";s:3:"➸";s:1:"";s:3:"➹";s:1:"";s:3:"➺";s:1:"";s:3:"➻";s:1:"";s:3:"➼";s:1:"";s:3:"➽";s:1:"";s:3:"➾";s:1:"";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/translit.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/translit.ser deleted file mode 100644 index 3fd84112..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/translit.ser +++ /dev/null @@ -1 +0,0 @@ -a:3959:{s:2:"µ";s:2:"μ";s:2:"¼";s:7:" 1⁄4 ";s:2:"½";s:7:" 1⁄2 ";s:2:"¾";s:7:" 3⁄4 ";s:2:"IJ";s:2:"IJ";s:2:"ij";s:2:"ij";s:2:"Ŀ";s:3:"L·";s:2:"ŀ";s:3:"l·";s:2:"ʼn";s:3:"ʼn";s:2:"ſ";s:1:"s";s:2:"DŽ";s:3:"DŽ";s:2:"Dž";s:3:"Dž";s:2:"dž";s:3:"dž";s:2:"LJ";s:2:"LJ";s:2:"Lj";s:2:"Lj";s:2:"lj";s:2:"lj";s:2:"NJ";s:2:"NJ";s:2:"Nj";s:2:"Nj";s:2:"nj";s:2:"nj";s:2:"DZ";s:2:"DZ";s:2:"Dz";s:2:"Dz";s:2:"dz";s:2:"dz";s:2:"ϐ";s:2:"β";s:2:"ϑ";s:2:"θ";s:2:"ϒ";s:2:"Υ";s:2:"ϕ";s:2:"φ";s:2:"ϖ";s:2:"π";s:2:"ϰ";s:2:"κ";s:2:"ϱ";s:2:"ρ";s:2:"ϲ";s:2:"ς";s:2:"ϴ";s:2:"Θ";s:2:"ϵ";s:2:"ε";s:2:"Ϲ";s:2:"Σ";s:2:"և";s:4:"եւ";s:2:"ٵ";s:4:"اٴ";s:2:"ٶ";s:4:"وٴ";s:2:"ٷ";s:4:"ۇٴ";s:2:"ٸ";s:4:"يٴ";s:3:"ำ";s:6:"ํา";s:3:"ຳ";s:6:"ໍາ";s:3:"ໜ";s:6:"ຫນ";s:3:"ໝ";s:6:"ຫມ";s:3:"ཷ";s:6:"ྲཱྀ";s:3:"ཹ";s:6:"ླཱྀ";s:3:"ẚ";s:3:"aʾ";s:3:"․";s:1:".";s:3:"‥";s:2:"..";s:3:"…";s:3:"...";s:3:"″";s:6:"′′";s:3:"‴";s:9:"′′′";s:3:"‶";s:6:"‵‵";s:3:"‷";s:9:"‵‵‵";s:3:"‼";s:2:"!!";s:3:"⁇";s:2:"??";s:3:"⁈";s:2:"?!";s:3:"⁉";s:2:"!?";s:3:"⁗";s:12:"′′′′";s:3:"₨";s:2:"Rs";s:3:"℀";s:3:"a/c";s:3:"℁";s:3:"a/s";s:3:"ℂ";s:1:"C";s:3:"℃";s:3:"°C";s:3:"℅";s:3:"c/o";s:3:"℆";s:3:"c/u";s:3:"ℇ";s:2:"Ɛ";s:3:"℉";s:3:"°F";s:3:"ℊ";s:1:"g";s:3:"ℋ";s:1:"H";s:3:"ℌ";s:1:"H";s:3:"ℍ";s:1:"H";s:3:"ℎ";s:1:"h";s:3:"ℏ";s:2:"ħ";s:3:"ℐ";s:1:"I";s:3:"ℑ";s:1:"I";s:3:"ℒ";s:1:"L";s:3:"ℓ";s:1:"l";s:3:"ℕ";s:1:"N";s:3:"№";s:2:"No";s:3:"ℙ";s:1:"P";s:3:"ℚ";s:1:"Q";s:3:"ℛ";s:1:"R";s:3:"ℜ";s:1:"R";s:3:"ℝ";s:1:"R";s:3:"℡";s:3:"TEL";s:3:"ℤ";s:1:"Z";s:3:"ℨ";s:1:"Z";s:3:"ℬ";s:1:"B";s:3:"ℭ";s:1:"C";s:3:"ℯ";s:1:"e";s:3:"ℰ";s:1:"E";s:3:"ℱ";s:1:"F";s:3:"ℳ";s:1:"M";s:3:"ℴ";s:1:"o";s:3:"ℵ";s:2:"א";s:3:"ℶ";s:2:"ב";s:3:"ℷ";s:2:"ג";s:3:"ℸ";s:2:"ד";s:3:"ℹ";s:1:"i";s:3:"℻";s:3:"FAX";s:3:"ℼ";s:2:"π";s:3:"ℽ";s:2:"γ";s:3:"ℾ";s:2:"Γ";s:3:"ℿ";s:2:"Π";s:3:"⅀";s:3:"∑";s:3:"ⅅ";s:1:"D";s:3:"ⅆ";s:1:"d";s:3:"ⅇ";s:1:"e";s:3:"ⅈ";s:1:"i";s:3:"ⅉ";s:1:"j";s:3:"⅐";s:7:" 1⁄7 ";s:3:"⅑";s:7:" 1⁄9 ";s:3:"⅒";s:8:" 1⁄10 ";s:3:"⅓";s:7:" 1⁄3 ";s:3:"⅔";s:7:" 2⁄3 ";s:3:"⅕";s:7:" 1⁄5 ";s:3:"⅖";s:7:" 2⁄5 ";s:3:"⅗";s:7:" 3⁄5 ";s:3:"⅘";s:7:" 4⁄5 ";s:3:"⅙";s:7:" 1⁄6 ";s:3:"⅚";s:7:" 5⁄6 ";s:3:"⅛";s:7:" 1⁄8 ";s:3:"⅜";s:7:" 3⁄8 ";s:3:"⅝";s:7:" 5⁄8 ";s:3:"⅞";s:7:" 7⁄8 ";s:3:"⅟";s:6:" 1⁄ ";s:3:"Ⅰ";s:1:"I";s:3:"Ⅱ";s:2:"II";s:3:"Ⅲ";s:3:"III";s:3:"Ⅳ";s:2:"IV";s:3:"Ⅴ";s:1:"V";s:3:"Ⅵ";s:2:"VI";s:3:"Ⅶ";s:3:"VII";s:3:"Ⅷ";s:4:"VIII";s:3:"Ⅸ";s:2:"IX";s:3:"Ⅹ";s:1:"X";s:3:"Ⅺ";s:2:"XI";s:3:"Ⅻ";s:3:"XII";s:3:"Ⅼ";s:1:"L";s:3:"Ⅽ";s:1:"C";s:3:"Ⅾ";s:1:"D";s:3:"Ⅿ";s:1:"M";s:3:"ⅰ";s:1:"i";s:3:"ⅱ";s:2:"ii";s:3:"ⅲ";s:3:"iii";s:3:"ⅳ";s:2:"iv";s:3:"ⅴ";s:1:"v";s:3:"ⅵ";s:2:"vi";s:3:"ⅶ";s:3:"vii";s:3:"ⅷ";s:4:"viii";s:3:"ⅸ";s:2:"ix";s:3:"ⅹ";s:1:"x";s:3:"ⅺ";s:2:"xi";s:3:"ⅻ";s:3:"xii";s:3:"ⅼ";s:1:"l";s:3:"ⅽ";s:1:"c";s:3:"ⅾ";s:1:"d";s:3:"ⅿ";s:1:"m";s:3:"↉";s:7:" 0⁄3 ";s:3:"∬";s:6:"∫∫";s:3:"∭";s:9:"∫∫∫";s:3:"∯";s:6:"∮∮";s:3:"∰";s:9:"∮∮∮";s:3:"①";s:3:"(1)";s:3:"②";s:3:"(2)";s:3:"③";s:3:"(3)";s:3:"④";s:3:"(4)";s:3:"⑤";s:3:"(5)";s:3:"⑥";s:3:"(6)";s:3:"⑦";s:3:"(7)";s:3:"⑧";s:3:"(8)";s:3:"⑨";s:3:"(9)";s:3:"⑩";s:4:"(10)";s:3:"⑪";s:4:"(11)";s:3:"⑫";s:4:"(12)";s:3:"⑬";s:4:"(13)";s:3:"⑭";s:4:"(14)";s:3:"⑮";s:4:"(15)";s:3:"⑯";s:4:"(16)";s:3:"⑰";s:4:"(17)";s:3:"⑱";s:4:"(18)";s:3:"⑲";s:4:"(19)";s:3:"⑳";s:4:"(20)";s:3:"⑴";s:3:"(1)";s:3:"⑵";s:3:"(2)";s:3:"⑶";s:3:"(3)";s:3:"⑷";s:3:"(4)";s:3:"⑸";s:3:"(5)";s:3:"⑹";s:3:"(6)";s:3:"⑺";s:3:"(7)";s:3:"⑻";s:3:"(8)";s:3:"⑼";s:3:"(9)";s:3:"⑽";s:4:"(10)";s:3:"⑾";s:4:"(11)";s:3:"⑿";s:4:"(12)";s:3:"⒀";s:4:"(13)";s:3:"⒁";s:4:"(14)";s:3:"⒂";s:4:"(15)";s:3:"⒃";s:4:"(16)";s:3:"⒄";s:4:"(17)";s:3:"⒅";s:4:"(18)";s:3:"⒆";s:4:"(19)";s:3:"⒇";s:4:"(20)";s:3:"⒈";s:2:"1.";s:3:"⒉";s:2:"2.";s:3:"⒊";s:2:"3.";s:3:"⒋";s:2:"4.";s:3:"⒌";s:2:"5.";s:3:"⒍";s:2:"6.";s:3:"⒎";s:2:"7.";s:3:"⒏";s:2:"8.";s:3:"⒐";s:2:"9.";s:3:"⒑";s:3:"10.";s:3:"⒒";s:3:"11.";s:3:"⒓";s:3:"12.";s:3:"⒔";s:3:"13.";s:3:"⒕";s:3:"14.";s:3:"⒖";s:3:"15.";s:3:"⒗";s:3:"16.";s:3:"⒘";s:3:"17.";s:3:"⒙";s:3:"18.";s:3:"⒚";s:3:"19.";s:3:"⒛";s:3:"20.";s:3:"⒜";s:3:"(a)";s:3:"⒝";s:3:"(b)";s:3:"⒞";s:3:"(c)";s:3:"⒟";s:3:"(d)";s:3:"⒠";s:3:"(e)";s:3:"⒡";s:3:"(f)";s:3:"⒢";s:3:"(g)";s:3:"⒣";s:3:"(h)";s:3:"⒤";s:3:"(i)";s:3:"⒥";s:3:"(j)";s:3:"⒦";s:3:"(k)";s:3:"⒧";s:3:"(l)";s:3:"⒨";s:3:"(m)";s:3:"⒩";s:3:"(n)";s:3:"⒪";s:3:"(o)";s:3:"⒫";s:3:"(p)";s:3:"⒬";s:3:"(q)";s:3:"⒭";s:3:"(r)";s:3:"⒮";s:3:"(s)";s:3:"⒯";s:3:"(t)";s:3:"⒰";s:3:"(u)";s:3:"⒱";s:3:"(v)";s:3:"⒲";s:3:"(w)";s:3:"⒳";s:3:"(x)";s:3:"⒴";s:3:"(y)";s:3:"⒵";s:3:"(z)";s:3:"Ⓐ";s:3:"(A)";s:3:"Ⓑ";s:3:"(B)";s:3:"Ⓒ";s:3:"(C)";s:3:"Ⓓ";s:3:"(D)";s:3:"Ⓔ";s:3:"(E)";s:3:"Ⓕ";s:3:"(F)";s:3:"Ⓖ";s:3:"(G)";s:3:"Ⓗ";s:3:"(H)";s:3:"Ⓘ";s:3:"(I)";s:3:"Ⓙ";s:3:"(J)";s:3:"Ⓚ";s:3:"(K)";s:3:"Ⓛ";s:3:"(L)";s:3:"Ⓜ";s:3:"(M)";s:3:"Ⓝ";s:3:"(N)";s:3:"Ⓞ";s:3:"(O)";s:3:"Ⓟ";s:3:"(P)";s:3:"Ⓠ";s:3:"(Q)";s:3:"Ⓡ";s:3:"(R)";s:3:"Ⓢ";s:3:"(S)";s:3:"Ⓣ";s:3:"(T)";s:3:"Ⓤ";s:3:"(U)";s:3:"Ⓥ";s:3:"(V)";s:3:"Ⓦ";s:3:"(W)";s:3:"Ⓧ";s:3:"(X)";s:3:"Ⓨ";s:3:"(Y)";s:3:"Ⓩ";s:3:"(Z)";s:3:"ⓐ";s:3:"(a)";s:3:"ⓑ";s:3:"(b)";s:3:"ⓒ";s:3:"(c)";s:3:"ⓓ";s:3:"(d)";s:3:"ⓔ";s:3:"(e)";s:3:"ⓕ";s:3:"(f)";s:3:"ⓖ";s:3:"(g)";s:3:"ⓗ";s:3:"(h)";s:3:"ⓘ";s:3:"(i)";s:3:"ⓙ";s:3:"(j)";s:3:"ⓚ";s:3:"(k)";s:3:"ⓛ";s:3:"(l)";s:3:"ⓜ";s:3:"(m)";s:3:"ⓝ";s:3:"(n)";s:3:"ⓞ";s:3:"(o)";s:3:"ⓟ";s:3:"(p)";s:3:"ⓠ";s:3:"(q)";s:3:"ⓡ";s:3:"(r)";s:3:"ⓢ";s:3:"(s)";s:3:"ⓣ";s:3:"(t)";s:3:"ⓤ";s:3:"(u)";s:3:"ⓥ";s:3:"(v)";s:3:"ⓦ";s:3:"(w)";s:3:"ⓧ";s:3:"(x)";s:3:"ⓨ";s:3:"(y)";s:3:"ⓩ";s:3:"(z)";s:3:"⓪";s:3:"(0)";s:3:"⨌";s:12:"∫∫∫∫";s:3:"⩴";s:3:"::=";s:3:"⩵";s:2:"==";s:3:"⩶";s:3:"===";s:3:"⺟";s:3:"母";s:3:"⻳";s:3:"龟";s:3:"⼀";s:3:"一";s:3:"⼁";s:3:"丨";s:3:"⼂";s:3:"丶";s:3:"⼃";s:3:"丿";s:3:"⼄";s:3:"乙";s:3:"⼅";s:3:"亅";s:3:"⼆";s:3:"二";s:3:"⼇";s:3:"亠";s:3:"⼈";s:3:"人";s:3:"⼉";s:3:"儿";s:3:"⼊";s:3:"入";s:3:"⼋";s:3:"八";s:3:"⼌";s:3:"冂";s:3:"⼍";s:3:"冖";s:3:"⼎";s:3:"冫";s:3:"⼏";s:3:"几";s:3:"⼐";s:3:"凵";s:3:"⼑";s:3:"刀";s:3:"⼒";s:3:"力";s:3:"⼓";s:3:"勹";s:3:"⼔";s:3:"匕";s:3:"⼕";s:3:"匚";s:3:"⼖";s:3:"匸";s:3:"⼗";s:3:"十";s:3:"⼘";s:3:"卜";s:3:"⼙";s:3:"卩";s:3:"⼚";s:3:"厂";s:3:"⼛";s:3:"厶";s:3:"⼜";s:3:"又";s:3:"⼝";s:3:"口";s:3:"⼞";s:3:"囗";s:3:"⼟";s:3:"土";s:3:"⼠";s:3:"士";s:3:"⼡";s:3:"夂";s:3:"⼢";s:3:"夊";s:3:"⼣";s:3:"夕";s:3:"⼤";s:3:"大";s:3:"⼥";s:3:"女";s:3:"⼦";s:3:"子";s:3:"⼧";s:3:"宀";s:3:"⼨";s:3:"寸";s:3:"⼩";s:3:"小";s:3:"⼪";s:3:"尢";s:3:"⼫";s:3:"尸";s:3:"⼬";s:3:"屮";s:3:"⼭";s:3:"山";s:3:"⼮";s:3:"巛";s:3:"⼯";s:3:"工";s:3:"⼰";s:3:"己";s:3:"⼱";s:3:"巾";s:3:"⼲";s:3:"干";s:3:"⼳";s:3:"幺";s:3:"⼴";s:3:"广";s:3:"⼵";s:3:"廴";s:3:"⼶";s:3:"廾";s:3:"⼷";s:3:"弋";s:3:"⼸";s:3:"弓";s:3:"⼹";s:3:"彐";s:3:"⼺";s:3:"彡";s:3:"⼻";s:3:"彳";s:3:"⼼";s:3:"心";s:3:"⼽";s:3:"戈";s:3:"⼾";s:3:"戶";s:3:"⼿";s:3:"手";s:3:"⽀";s:3:"支";s:3:"⽁";s:3:"攴";s:3:"⽂";s:3:"文";s:3:"⽃";s:3:"斗";s:3:"⽄";s:3:"斤";s:3:"⽅";s:3:"方";s:3:"⽆";s:3:"无";s:3:"⽇";s:3:"日";s:3:"⽈";s:3:"曰";s:3:"⽉";s:3:"月";s:3:"⽊";s:3:"木";s:3:"⽋";s:3:"欠";s:3:"⽌";s:3:"止";s:3:"⽍";s:3:"歹";s:3:"⽎";s:3:"殳";s:3:"⽏";s:3:"毋";s:3:"⽐";s:3:"比";s:3:"⽑";s:3:"毛";s:3:"⽒";s:3:"氏";s:3:"⽓";s:3:"气";s:3:"⽔";s:3:"水";s:3:"⽕";s:3:"火";s:3:"⽖";s:3:"爪";s:3:"⽗";s:3:"父";s:3:"⽘";s:3:"爻";s:3:"⽙";s:3:"爿";s:3:"⽚";s:3:"片";s:3:"⽛";s:3:"牙";s:3:"⽜";s:3:"牛";s:3:"⽝";s:3:"犬";s:3:"⽞";s:3:"玄";s:3:"⽟";s:3:"玉";s:3:"⽠";s:3:"瓜";s:3:"⽡";s:3:"瓦";s:3:"⽢";s:3:"甘";s:3:"⽣";s:3:"生";s:3:"⽤";s:3:"用";s:3:"⽥";s:3:"田";s:3:"⽦";s:3:"疋";s:3:"⽧";s:3:"疒";s:3:"⽨";s:3:"癶";s:3:"⽩";s:3:"白";s:3:"⽪";s:3:"皮";s:3:"⽫";s:3:"皿";s:3:"⽬";s:3:"目";s:3:"⽭";s:3:"矛";s:3:"⽮";s:3:"矢";s:3:"⽯";s:3:"石";s:3:"⽰";s:3:"示";s:3:"⽱";s:3:"禸";s:3:"⽲";s:3:"禾";s:3:"⽳";s:3:"穴";s:3:"⽴";s:3:"立";s:3:"⽵";s:3:"竹";s:3:"⽶";s:3:"米";s:3:"⽷";s:3:"糸";s:3:"⽸";s:3:"缶";s:3:"⽹";s:3:"网";s:3:"⽺";s:3:"羊";s:3:"⽻";s:3:"羽";s:3:"⽼";s:3:"老";s:3:"⽽";s:3:"而";s:3:"⽾";s:3:"耒";s:3:"⽿";s:3:"耳";s:3:"⾀";s:3:"聿";s:3:"⾁";s:3:"肉";s:3:"⾂";s:3:"臣";s:3:"⾃";s:3:"自";s:3:"⾄";s:3:"至";s:3:"⾅";s:3:"臼";s:3:"⾆";s:3:"舌";s:3:"⾇";s:3:"舛";s:3:"⾈";s:3:"舟";s:3:"⾉";s:3:"艮";s:3:"⾊";s:3:"色";s:3:"⾋";s:3:"艸";s:3:"⾌";s:3:"虍";s:3:"⾍";s:3:"虫";s:3:"⾎";s:3:"血";s:3:"⾏";s:3:"行";s:3:"⾐";s:3:"衣";s:3:"⾑";s:3:"襾";s:3:"⾒";s:3:"見";s:3:"⾓";s:3:"角";s:3:"⾔";s:3:"言";s:3:"⾕";s:3:"谷";s:3:"⾖";s:3:"豆";s:3:"⾗";s:3:"豕";s:3:"⾘";s:3:"豸";s:3:"⾙";s:3:"貝";s:3:"⾚";s:3:"赤";s:3:"⾛";s:3:"走";s:3:"⾜";s:3:"足";s:3:"⾝";s:3:"身";s:3:"⾞";s:3:"車";s:3:"⾟";s:3:"辛";s:3:"⾠";s:3:"辰";s:3:"⾡";s:3:"辵";s:3:"⾢";s:3:"邑";s:3:"⾣";s:3:"酉";s:3:"⾤";s:3:"釆";s:3:"⾥";s:3:"里";s:3:"⾦";s:3:"金";s:3:"⾧";s:3:"長";s:3:"⾨";s:3:"門";s:3:"⾩";s:3:"阜";s:3:"⾪";s:3:"隶";s:3:"⾫";s:3:"隹";s:3:"⾬";s:3:"雨";s:3:"⾭";s:3:"靑";s:3:"⾮";s:3:"非";s:3:"⾯";s:3:"面";s:3:"⾰";s:3:"革";s:3:"⾱";s:3:"韋";s:3:"⾲";s:3:"韭";s:3:"⾳";s:3:"音";s:3:"⾴";s:3:"頁";s:3:"⾵";s:3:"風";s:3:"⾶";s:3:"飛";s:3:"⾷";s:3:"食";s:3:"⾸";s:3:"首";s:3:"⾹";s:3:"香";s:3:"⾺";s:3:"馬";s:3:"⾻";s:3:"骨";s:3:"⾼";s:3:"高";s:3:"⾽";s:3:"髟";s:3:"⾾";s:3:"鬥";s:3:"⾿";s:3:"鬯";s:3:"⿀";s:3:"鬲";s:3:"⿁";s:3:"鬼";s:3:"⿂";s:3:"魚";s:3:"⿃";s:3:"鳥";s:3:"⿄";s:3:"鹵";s:3:"⿅";s:3:"鹿";s:3:"⿆";s:3:"麥";s:3:"⿇";s:3:"麻";s:3:"⿈";s:3:"黃";s:3:"⿉";s:3:"黍";s:3:"⿊";s:3:"黑";s:3:"⿋";s:3:"黹";s:3:"⿌";s:3:"黽";s:3:"⿍";s:3:"鼎";s:3:"⿎";s:3:"鼓";s:3:"⿏";s:3:"鼠";s:3:"⿐";s:3:"鼻";s:3:"⿑";s:3:"齊";s:3:"⿒";s:3:"齒";s:3:"⿓";s:3:"龍";s:3:"⿔";s:3:"龜";s:3:"⿕";s:3:"龠";s:3:" ";s:1:" ";s:3:"〶";s:3:"〒";s:3:"〸";s:3:"十";s:3:"〹";s:3:"卄";s:3:"〺";s:3:"卅";s:3:"ㄱ";s:3:"ᄀ";s:3:"ㄲ";s:3:"ᄁ";s:3:"ㄳ";s:3:"ᆪ";s:3:"ㄴ";s:3:"ᄂ";s:3:"ㄵ";s:3:"ᆬ";s:3:"ㄶ";s:3:"ᆭ";s:3:"ㄷ";s:3:"ᄃ";s:3:"ㄸ";s:3:"ᄄ";s:3:"ㄹ";s:3:"ᄅ";s:3:"ㄺ";s:3:"ᆰ";s:3:"ㄻ";s:3:"ᆱ";s:3:"ㄼ";s:3:"ᆲ";s:3:"ㄽ";s:3:"ᆳ";s:3:"ㄾ";s:3:"ᆴ";s:3:"ㄿ";s:3:"ᆵ";s:3:"ㅀ";s:3:"ᄚ";s:3:"ㅁ";s:3:"ᄆ";s:3:"ㅂ";s:3:"ᄇ";s:3:"ㅃ";s:3:"ᄈ";s:3:"ㅄ";s:3:"ᄡ";s:3:"ㅅ";s:3:"ᄉ";s:3:"ㅆ";s:3:"ᄊ";s:3:"ㅇ";s:3:"ᄋ";s:3:"ㅈ";s:3:"ᄌ";s:3:"ㅉ";s:3:"ᄍ";s:3:"ㅊ";s:3:"ᄎ";s:3:"ㅋ";s:3:"ᄏ";s:3:"ㅌ";s:3:"ᄐ";s:3:"ㅍ";s:3:"ᄑ";s:3:"ㅎ";s:3:"ᄒ";s:3:"ㅏ";s:3:"ᅡ";s:3:"ㅐ";s:3:"ᅢ";s:3:"ㅑ";s:3:"ᅣ";s:3:"ㅒ";s:3:"ᅤ";s:3:"ㅓ";s:3:"ᅥ";s:3:"ㅔ";s:3:"ᅦ";s:3:"ㅕ";s:3:"ᅧ";s:3:"ㅖ";s:3:"ᅨ";s:3:"ㅗ";s:3:"ᅩ";s:3:"ㅘ";s:3:"ᅪ";s:3:"ㅙ";s:3:"ᅫ";s:3:"ㅚ";s:3:"ᅬ";s:3:"ㅛ";s:3:"ᅭ";s:3:"ㅜ";s:3:"ᅮ";s:3:"ㅝ";s:3:"ᅯ";s:3:"ㅞ";s:3:"ᅰ";s:3:"ㅟ";s:3:"ᅱ";s:3:"ㅠ";s:3:"ᅲ";s:3:"ㅡ";s:3:"ᅳ";s:3:"ㅢ";s:3:"ᅴ";s:3:"ㅣ";s:3:"ᅵ";s:3:"ㅤ";s:3:"ᅠ";s:3:"ㅥ";s:3:"ᄔ";s:3:"ㅦ";s:3:"ᄕ";s:3:"ㅧ";s:3:"ᇇ";s:3:"ㅨ";s:3:"ᇈ";s:3:"ㅩ";s:3:"ᇌ";s:3:"ㅪ";s:3:"ᇎ";s:3:"ㅫ";s:3:"ᇓ";s:3:"ㅬ";s:3:"ᇗ";s:3:"ㅭ";s:3:"ᇙ";s:3:"ㅮ";s:3:"ᄜ";s:3:"ㅯ";s:3:"ᇝ";s:3:"ㅰ";s:3:"ᇟ";s:3:"ㅱ";s:3:"ᄝ";s:3:"ㅲ";s:3:"ᄞ";s:3:"ㅳ";s:3:"ᄠ";s:3:"ㅴ";s:3:"ᄢ";s:3:"ㅵ";s:3:"ᄣ";s:3:"ㅶ";s:3:"ᄧ";s:3:"ㅷ";s:3:"ᄩ";s:3:"ㅸ";s:3:"ᄫ";s:3:"ㅹ";s:3:"ᄬ";s:3:"ㅺ";s:3:"ᄭ";s:3:"ㅻ";s:3:"ᄮ";s:3:"ㅼ";s:3:"ᄯ";s:3:"ㅽ";s:3:"ᄲ";s:3:"ㅾ";s:3:"ᄶ";s:3:"ㅿ";s:3:"ᅀ";s:3:"ㆀ";s:3:"ᅇ";s:3:"ㆁ";s:3:"ᅌ";s:3:"ㆂ";s:3:"ᇱ";s:3:"ㆃ";s:3:"ᇲ";s:3:"ㆄ";s:3:"ᅗ";s:3:"ㆅ";s:3:"ᅘ";s:3:"ㆆ";s:3:"ᅙ";s:3:"ㆇ";s:3:"ᆄ";s:3:"ㆈ";s:3:"ᆅ";s:3:"ㆉ";s:3:"ᆈ";s:3:"ㆊ";s:3:"ᆑ";s:3:"ㆋ";s:3:"ᆒ";s:3:"ㆌ";s:3:"ᆔ";s:3:"ㆍ";s:3:"ᆞ";s:3:"ㆎ";s:3:"ᆡ";s:3:"㈀";s:5:"(ᄀ)";s:3:"㈁";s:5:"(ᄂ)";s:3:"㈂";s:5:"(ᄃ)";s:3:"㈃";s:5:"(ᄅ)";s:3:"㈄";s:5:"(ᄆ)";s:3:"㈅";s:5:"(ᄇ)";s:3:"㈆";s:5:"(ᄉ)";s:3:"㈇";s:5:"(ᄋ)";s:3:"㈈";s:5:"(ᄌ)";s:3:"㈉";s:5:"(ᄎ)";s:3:"㈊";s:5:"(ᄏ)";s:3:"㈋";s:5:"(ᄐ)";s:3:"㈌";s:5:"(ᄑ)";s:3:"㈍";s:5:"(ᄒ)";s:3:"㈎";s:8:"(가)";s:3:"㈏";s:8:"(나)";s:3:"㈐";s:8:"(다)";s:3:"㈑";s:8:"(라)";s:3:"㈒";s:8:"(마)";s:3:"㈓";s:8:"(바)";s:3:"㈔";s:8:"(사)";s:3:"㈕";s:8:"(아)";s:3:"㈖";s:8:"(자)";s:3:"㈗";s:8:"(차)";s:3:"㈘";s:8:"(카)";s:3:"㈙";s:8:"(타)";s:3:"㈚";s:8:"(파)";s:3:"㈛";s:8:"(하)";s:3:"㈜";s:8:"(주)";s:3:"㈝";s:17:"(오전)";s:3:"㈞";s:14:"(오후)";s:3:"㈠";s:5:"(一)";s:3:"㈡";s:5:"(二)";s:3:"㈢";s:5:"(三)";s:3:"㈣";s:5:"(四)";s:3:"㈤";s:5:"(五)";s:3:"㈥";s:5:"(六)";s:3:"㈦";s:5:"(七)";s:3:"㈧";s:5:"(八)";s:3:"㈨";s:5:"(九)";s:3:"㈩";s:5:"(十)";s:3:"㈪";s:5:"(月)";s:3:"㈫";s:5:"(火)";s:3:"㈬";s:5:"(水)";s:3:"㈭";s:5:"(木)";s:3:"㈮";s:5:"(金)";s:3:"㈯";s:5:"(土)";s:3:"㈰";s:5:"(日)";s:3:"㈱";s:5:"(株)";s:3:"㈲";s:5:"(有)";s:3:"㈳";s:5:"(社)";s:3:"㈴";s:5:"(名)";s:3:"㈵";s:5:"(特)";s:3:"㈶";s:5:"(財)";s:3:"㈷";s:5:"(祝)";s:3:"㈸";s:5:"(労)";s:3:"㈹";s:5:"(代)";s:3:"㈺";s:5:"(呼)";s:3:"㈻";s:5:"(学)";s:3:"㈼";s:5:"(監)";s:3:"㈽";s:5:"(企)";s:3:"㈾";s:5:"(資)";s:3:"㈿";s:5:"(協)";s:3:"㉀";s:5:"(祭)";s:3:"㉁";s:5:"(休)";s:3:"㉂";s:5:"(自)";s:3:"㉃";s:5:"(至)";s:3:"㉄";s:5:"(問)";s:3:"㉅";s:5:"(幼)";s:3:"㉆";s:5:"(文)";s:3:"㉇";s:5:"(箏)";s:3:"㉐";s:3:"PTE";s:3:"㉑";s:4:"(21)";s:3:"㉒";s:4:"(22)";s:3:"㉓";s:4:"(23)";s:3:"㉔";s:4:"(24)";s:3:"㉕";s:4:"(25)";s:3:"㉖";s:4:"(26)";s:3:"㉗";s:4:"(27)";s:3:"㉘";s:4:"(28)";s:3:"㉙";s:4:"(29)";s:3:"㉚";s:4:"(30)";s:3:"㉛";s:4:"(31)";s:3:"㉜";s:4:"(32)";s:3:"㉝";s:4:"(33)";s:3:"㉞";s:4:"(34)";s:3:"㉟";s:4:"(35)";s:3:"㉠";s:5:"(ᄀ)";s:3:"㉡";s:5:"(ᄂ)";s:3:"㉢";s:5:"(ᄃ)";s:3:"㉣";s:5:"(ᄅ)";s:3:"㉤";s:5:"(ᄆ)";s:3:"㉥";s:5:"(ᄇ)";s:3:"㉦";s:5:"(ᄉ)";s:3:"㉧";s:5:"(ᄋ)";s:3:"㉨";s:5:"(ᄌ)";s:3:"㉩";s:5:"(ᄎ)";s:3:"㉪";s:5:"(ᄏ)";s:3:"㉫";s:5:"(ᄐ)";s:3:"㉬";s:5:"(ᄑ)";s:3:"㉭";s:5:"(ᄒ)";s:3:"㉮";s:8:"(가)";s:3:"㉯";s:8:"(나)";s:3:"㉰";s:8:"(다)";s:3:"㉱";s:8:"(라)";s:3:"㉲";s:8:"(마)";s:3:"㉳";s:8:"(바)";s:3:"㉴";s:8:"(사)";s:3:"㉵";s:8:"(아)";s:3:"㉶";s:8:"(자)";s:3:"㉷";s:8:"(차)";s:3:"㉸";s:8:"(카)";s:3:"㉹";s:8:"(타)";s:3:"㉺";s:8:"(파)";s:3:"㉻";s:8:"(하)";s:3:"㉼";s:17:"(참고)";s:3:"㉽";s:14:"(주의)";s:3:"㉾";s:8:"(우)";s:3:"㊀";s:5:"(一)";s:3:"㊁";s:5:"(二)";s:3:"㊂";s:5:"(三)";s:3:"㊃";s:5:"(四)";s:3:"㊄";s:5:"(五)";s:3:"㊅";s:5:"(六)";s:3:"㊆";s:5:"(七)";s:3:"㊇";s:5:"(八)";s:3:"㊈";s:5:"(九)";s:3:"㊉";s:5:"(十)";s:3:"㊊";s:5:"(月)";s:3:"㊋";s:5:"(火)";s:3:"㊌";s:5:"(水)";s:3:"㊍";s:5:"(木)";s:3:"㊎";s:5:"(金)";s:3:"㊏";s:5:"(土)";s:3:"㊐";s:5:"(日)";s:3:"㊑";s:5:"(株)";s:3:"㊒";s:5:"(有)";s:3:"㊓";s:5:"(社)";s:3:"㊔";s:5:"(名)";s:3:"㊕";s:5:"(特)";s:3:"㊖";s:5:"(財)";s:3:"㊗";s:5:"(祝)";s:3:"㊘";s:5:"(労)";s:3:"㊙";s:5:"(秘)";s:3:"㊚";s:5:"(男)";s:3:"㊛";s:5:"(女)";s:3:"㊜";s:5:"(適)";s:3:"㊝";s:5:"(優)";s:3:"㊞";s:5:"(印)";s:3:"㊟";s:5:"(注)";s:3:"㊠";s:5:"(項)";s:3:"㊡";s:5:"(休)";s:3:"㊢";s:5:"(写)";s:3:"㊣";s:5:"(正)";s:3:"㊤";s:5:"(上)";s:3:"㊥";s:5:"(中)";s:3:"㊦";s:5:"(下)";s:3:"㊧";s:5:"(左)";s:3:"㊨";s:5:"(右)";s:3:"㊩";s:5:"(医)";s:3:"㊪";s:5:"(宗)";s:3:"㊫";s:5:"(学)";s:3:"㊬";s:5:"(監)";s:3:"㊭";s:5:"(企)";s:3:"㊮";s:5:"(資)";s:3:"㊯";s:5:"(協)";s:3:"㊰";s:5:"(夜)";s:3:"㊱";s:4:"(36)";s:3:"㊲";s:4:"(37)";s:3:"㊳";s:4:"(38)";s:3:"㊴";s:4:"(39)";s:3:"㊵";s:4:"(40)";s:3:"㊶";s:4:"(41)";s:3:"㊷";s:4:"(42)";s:3:"㊸";s:4:"(43)";s:3:"㊹";s:4:"(44)";s:3:"㊺";s:4:"(45)";s:3:"㊻";s:4:"(46)";s:3:"㊼";s:4:"(47)";s:3:"㊽";s:4:"(48)";s:3:"㊾";s:4:"(49)";s:3:"㊿";s:4:"(50)";s:3:"㋀";s:4:"1月";s:3:"㋁";s:4:"2月";s:3:"㋂";s:4:"3月";s:3:"㋃";s:4:"4月";s:3:"㋄";s:4:"5月";s:3:"㋅";s:4:"6月";s:3:"㋆";s:4:"7月";s:3:"㋇";s:4:"8月";s:3:"㋈";s:4:"9月";s:3:"㋉";s:5:"10月";s:3:"㋊";s:5:"11月";s:3:"㋋";s:5:"12月";s:3:"㋌";s:2:"Hg";s:3:"㋍";s:3:"erg";s:3:"㋎";s:2:"eV";s:3:"㋏";s:3:"LTD";s:3:"㋐";s:5:"(ア)";s:3:"㋑";s:5:"(イ)";s:3:"㋒";s:5:"(ウ)";s:3:"㋓";s:5:"(エ)";s:3:"㋔";s:5:"(オ)";s:3:"㋕";s:5:"(カ)";s:3:"㋖";s:5:"(キ)";s:3:"㋗";s:5:"(ク)";s:3:"㋘";s:5:"(ケ)";s:3:"㋙";s:5:"(コ)";s:3:"㋚";s:5:"(サ)";s:3:"㋛";s:5:"(シ)";s:3:"㋜";s:5:"(ス)";s:3:"㋝";s:5:"(セ)";s:3:"㋞";s:5:"(ソ)";s:3:"㋟";s:5:"(タ)";s:3:"㋠";s:5:"(チ)";s:3:"㋡";s:5:"(ツ)";s:3:"㋢";s:5:"(テ)";s:3:"㋣";s:5:"(ト)";s:3:"㋤";s:5:"(ナ)";s:3:"㋥";s:5:"(ニ)";s:3:"㋦";s:5:"(ヌ)";s:3:"㋧";s:5:"(ネ)";s:3:"㋨";s:5:"(ノ)";s:3:"㋩";s:5:"(ハ)";s:3:"㋪";s:5:"(ヒ)";s:3:"㋫";s:5:"(フ)";s:3:"㋬";s:5:"(ヘ)";s:3:"㋭";s:5:"(ホ)";s:3:"㋮";s:5:"(マ)";s:3:"㋯";s:5:"(ミ)";s:3:"㋰";s:5:"(ム)";s:3:"㋱";s:5:"(メ)";s:3:"㋲";s:5:"(モ)";s:3:"㋳";s:5:"(ヤ)";s:3:"㋴";s:5:"(ユ)";s:3:"㋵";s:5:"(ヨ)";s:3:"㋶";s:5:"(ラ)";s:3:"㋷";s:5:"(リ)";s:3:"㋸";s:5:"(ル)";s:3:"㋹";s:5:"(レ)";s:3:"㋺";s:5:"(ロ)";s:3:"㋻";s:5:"(ワ)";s:3:"㋼";s:5:"(ヰ)";s:3:"㋽";s:5:"(ヱ)";s:3:"㋾";s:5:"(ヲ)";s:3:"㌀";s:12:"アパート";s:3:"㌁";s:12:"アルファ";s:3:"㌂";s:12:"アンペア";s:3:"㌃";s:9:"アール";s:3:"㌄";s:12:"イニング";s:3:"㌅";s:9:"インチ";s:3:"㌆";s:9:"ウォン";s:3:"㌇";s:15:"エスクード";s:3:"㌈";s:12:"エーカー";s:3:"㌉";s:9:"オンス";s:3:"㌊";s:9:"オーム";s:3:"㌋";s:9:"カイリ";s:3:"㌌";s:12:"カラット";s:3:"㌍";s:12:"カロリー";s:3:"㌎";s:9:"ガロン";s:3:"㌏";s:9:"ガンマ";s:3:"㌐";s:6:"ギガ";s:3:"㌑";s:9:"ギニー";s:3:"㌒";s:12:"キュリー";s:3:"㌓";s:12:"ギルダー";s:3:"㌔";s:6:"キロ";s:3:"㌕";s:15:"キログラム";s:3:"㌖";s:18:"キロメートル";s:3:"㌗";s:15:"キロワット";s:3:"㌘";s:9:"グラム";s:3:"㌙";s:15:"グラムトン";s:3:"㌚";s:15:"クルゼイロ";s:3:"㌛";s:12:"クローネ";s:3:"㌜";s:9:"ケース";s:3:"㌝";s:9:"コルナ";s:3:"㌞";s:9:"コーポ";s:3:"㌟";s:12:"サイクル";s:3:"㌠";s:15:"サンチーム";s:3:"㌡";s:12:"シリング";s:3:"㌢";s:9:"センチ";s:3:"㌣";s:9:"セント";s:3:"㌤";s:9:"ダース";s:3:"㌥";s:6:"デシ";s:3:"㌦";s:6:"ドル";s:3:"㌧";s:6:"トン";s:3:"㌨";s:6:"ナノ";s:3:"㌩";s:9:"ノット";s:3:"㌪";s:9:"ハイツ";s:3:"㌫";s:15:"パーセント";s:3:"㌬";s:9:"パーツ";s:3:"㌭";s:12:"バーレル";s:3:"㌮";s:15:"ピアストル";s:3:"㌯";s:9:"ピクル";s:3:"㌰";s:6:"ピコ";s:3:"㌱";s:6:"ビル";s:3:"㌲";s:15:"ファラッド";s:3:"㌳";s:12:"フィート";s:3:"㌴";s:15:"ブッシェル";s:3:"㌵";s:9:"フラン";s:3:"㌶";s:15:"ヘクタール";s:3:"㌷";s:6:"ペソ";s:3:"㌸";s:9:"ペニヒ";s:3:"㌹";s:9:"ヘルツ";s:3:"㌺";s:9:"ペンス";s:3:"㌻";s:9:"ページ";s:3:"㌼";s:9:"ベータ";s:3:"㌽";s:12:"ポイント";s:3:"㌾";s:9:"ボルト";s:3:"㌿";s:6:"ホン";s:3:"㍀";s:9:"ポンド";s:3:"㍁";s:9:"ホール";s:3:"㍂";s:9:"ホーン";s:3:"㍃";s:12:"マイクロ";s:3:"㍄";s:9:"マイル";s:3:"㍅";s:9:"マッハ";s:3:"㍆";s:9:"マルク";s:3:"㍇";s:15:"マンション";s:3:"㍈";s:12:"ミクロン";s:3:"㍉";s:6:"ミリ";s:3:"㍊";s:15:"ミリバール";s:3:"㍋";s:6:"メガ";s:3:"㍌";s:12:"メガトン";s:3:"㍍";s:12:"メートル";s:3:"㍎";s:9:"ヤード";s:3:"㍏";s:9:"ヤール";s:3:"㍐";s:9:"ユアン";s:3:"㍑";s:12:"リットル";s:3:"㍒";s:6:"リラ";s:3:"㍓";s:9:"ルピー";s:3:"㍔";s:12:"ルーブル";s:3:"㍕";s:6:"レム";s:3:"㍖";s:15:"レントゲン";s:3:"㍗";s:9:"ワット";s:3:"㍘";s:4:"0点";s:3:"㍙";s:4:"1点";s:3:"㍚";s:4:"2点";s:3:"㍛";s:4:"3点";s:3:"㍜";s:4:"4点";s:3:"㍝";s:4:"5点";s:3:"㍞";s:4:"6点";s:3:"㍟";s:4:"7点";s:3:"㍠";s:4:"8点";s:3:"㍡";s:4:"9点";s:3:"㍢";s:5:"10点";s:3:"㍣";s:5:"11点";s:3:"㍤";s:5:"12点";s:3:"㍥";s:5:"13点";s:3:"㍦";s:5:"14点";s:3:"㍧";s:5:"15点";s:3:"㍨";s:5:"16点";s:3:"㍩";s:5:"17点";s:3:"㍪";s:5:"18点";s:3:"㍫";s:5:"19点";s:3:"㍬";s:5:"20点";s:3:"㍭";s:5:"21点";s:3:"㍮";s:5:"22点";s:3:"㍯";s:5:"23点";s:3:"㍰";s:5:"24点";s:3:"㍱";s:3:"hPa";s:3:"㍲";s:2:"da";s:3:"㍳";s:2:"AU";s:3:"㍴";s:3:"bar";s:3:"㍵";s:2:"oV";s:3:"㍶";s:2:"pc";s:3:"㍷";s:2:"dm";s:3:"㍸";s:4:"dm²";s:3:"㍹";s:4:"dm³";s:3:"㍺";s:2:"IU";s:3:"㍻";s:6:"平成";s:3:"㍼";s:6:"昭和";s:3:"㍽";s:6:"大正";s:3:"㍾";s:6:"明治";s:3:"㍿";s:12:"株式会社";s:3:"㎀";s:2:"pA";s:3:"㎁";s:2:"nA";s:3:"㎂";s:3:"μA";s:3:"㎃";s:2:"mA";s:3:"㎄";s:2:"kA";s:3:"㎅";s:2:"KB";s:3:"㎆";s:2:"MB";s:3:"㎇";s:2:"GB";s:3:"㎈";s:3:"cal";s:3:"㎉";s:4:"kcal";s:3:"㎊";s:2:"pF";s:3:"㎋";s:2:"nF";s:3:"㎌";s:3:"μF";s:3:"㎍";s:3:"μg";s:3:"㎎";s:2:"mg";s:3:"㎏";s:2:"kg";s:3:"㎐";s:2:"Hz";s:3:"㎑";s:3:"kHz";s:3:"㎒";s:3:"MHz";s:3:"㎓";s:3:"GHz";s:3:"㎔";s:3:"THz";s:3:"㎕";s:5:"μℓ";s:3:"㎖";s:4:"mℓ";s:3:"㎗";s:4:"dℓ";s:3:"㎘";s:4:"kℓ";s:3:"㎙";s:2:"fm";s:3:"㎚";s:2:"nm";s:3:"㎛";s:3:"μm";s:3:"㎜";s:2:"mm";s:3:"㎝";s:2:"cm";s:3:"㎞";s:2:"km";s:3:"㎟";s:4:"mm²";s:3:"㎠";s:4:"cm²";s:3:"㎡";s:3:"m²";s:3:"㎢";s:4:"km²";s:3:"㎣";s:4:"mm³";s:3:"㎤";s:4:"cm³";s:3:"㎥";s:3:"m³";s:3:"㎦";s:4:"km³";s:3:"㎧";s:5:"m∕s";s:3:"㎨";s:7:"m∕s²";s:3:"㎩";s:2:"Pa";s:3:"㎪";s:3:"kPa";s:3:"㎫";s:3:"MPa";s:3:"㎬";s:3:"GPa";s:3:"㎭";s:3:"rad";s:3:"㎮";s:7:"rad∕s";s:3:"㎯";s:9:"rad∕s²";s:3:"㎰";s:2:"ps";s:3:"㎱";s:2:"ns";s:3:"㎲";s:3:"μs";s:3:"㎳";s:2:"ms";s:3:"㎴";s:2:"pV";s:3:"㎵";s:2:"nV";s:3:"㎶";s:3:"μV";s:3:"㎷";s:2:"mV";s:3:"㎸";s:2:"kV";s:3:"㎹";s:2:"MV";s:3:"㎺";s:2:"pW";s:3:"㎻";s:2:"nW";s:3:"㎼";s:3:"μW";s:3:"㎽";s:2:"mW";s:3:"㎾";s:2:"kW";s:3:"㎿";s:2:"MW";s:3:"㏀";s:3:"kΩ";s:3:"㏁";s:3:"MΩ";s:3:"㏂";s:4:"a.m.";s:3:"㏃";s:2:"Bq";s:3:"㏄";s:2:"cc";s:3:"㏅";s:2:"cd";s:3:"㏆";s:6:"C∕kg";s:3:"㏇";s:3:"Co.";s:3:"㏈";s:2:"dB";s:3:"㏉";s:2:"Gy";s:3:"㏊";s:2:"ha";s:3:"㏋";s:2:"HP";s:3:"㏌";s:2:"in";s:3:"㏍";s:2:"KK";s:3:"㏎";s:2:"KM";s:3:"㏏";s:2:"kt";s:3:"㏐";s:2:"lm";s:3:"㏑";s:2:"ln";s:3:"㏒";s:3:"log";s:3:"㏓";s:2:"lx";s:3:"㏔";s:2:"mb";s:3:"㏕";s:3:"mil";s:3:"㏖";s:3:"mol";s:3:"㏗";s:2:"PH";s:3:"㏘";s:4:"p.m.";s:3:"㏙";s:3:"PPM";s:3:"㏚";s:2:"PR";s:3:"㏛";s:2:"sr";s:3:"㏜";s:2:"Sv";s:3:"㏝";s:2:"Wb";s:3:"㏞";s:5:"V∕m";s:3:"㏟";s:5:"A∕m";s:3:"㏠";s:4:"1日";s:3:"㏡";s:4:"2日";s:3:"㏢";s:4:"3日";s:3:"㏣";s:4:"4日";s:3:"㏤";s:4:"5日";s:3:"㏥";s:4:"6日";s:3:"㏦";s:4:"7日";s:3:"㏧";s:4:"8日";s:3:"㏨";s:4:"9日";s:3:"㏩";s:5:"10日";s:3:"㏪";s:5:"11日";s:3:"㏫";s:5:"12日";s:3:"㏬";s:5:"13日";s:3:"㏭";s:5:"14日";s:3:"㏮";s:5:"15日";s:3:"㏯";s:5:"16日";s:3:"㏰";s:5:"17日";s:3:"㏱";s:5:"18日";s:3:"㏲";s:5:"19日";s:3:"㏳";s:5:"20日";s:3:"㏴";s:5:"21日";s:3:"㏵";s:5:"22日";s:3:"㏶";s:5:"23日";s:3:"㏷";s:5:"24日";s:3:"㏸";s:5:"25日";s:3:"㏹";s:5:"26日";s:3:"㏺";s:5:"27日";s:3:"㏻";s:5:"28日";s:3:"㏼";s:5:"29日";s:3:"㏽";s:5:"30日";s:3:"㏾";s:5:"31日";s:3:"㏿";s:3:"gal";s:3:"豈";s:3:"豈";s:3:"更";s:3:"更";s:3:"車";s:3:"車";s:3:"賈";s:3:"賈";s:3:"滑";s:3:"滑";s:3:"串";s:3:"串";s:3:"句";s:3:"句";s:3:"龜";s:3:"龜";s:3:"龜";s:3:"龜";s:3:"契";s:3:"契";s:3:"金";s:3:"金";s:3:"喇";s:3:"喇";s:3:"奈";s:3:"奈";s:3:"懶";s:3:"懶";s:3:"癩";s:3:"癩";s:3:"羅";s:3:"羅";s:3:"蘿";s:3:"蘿";s:3:"螺";s:3:"螺";s:3:"裸";s:3:"裸";s:3:"邏";s:3:"邏";s:3:"樂";s:3:"樂";s:3:"洛";s:3:"洛";s:3:"烙";s:3:"烙";s:3:"珞";s:3:"珞";s:3:"落";s:3:"落";s:3:"酪";s:3:"酪";s:3:"駱";s:3:"駱";s:3:"亂";s:3:"亂";s:3:"卵";s:3:"卵";s:3:"欄";s:3:"欄";s:3:"爛";s:3:"爛";s:3:"蘭";s:3:"蘭";s:3:"鸞";s:3:"鸞";s:3:"嵐";s:3:"嵐";s:3:"濫";s:3:"濫";s:3:"藍";s:3:"藍";s:3:"襤";s:3:"襤";s:3:"拉";s:3:"拉";s:3:"臘";s:3:"臘";s:3:"蠟";s:3:"蠟";s:3:"廊";s:3:"廊";s:3:"朗";s:3:"朗";s:3:"浪";s:3:"浪";s:3:"狼";s:3:"狼";s:3:"郎";s:3:"郎";s:3:"來";s:3:"來";s:3:"冷";s:3:"冷";s:3:"勞";s:3:"勞";s:3:"擄";s:3:"擄";s:3:"櫓";s:3:"櫓";s:3:"爐";s:3:"爐";s:3:"盧";s:3:"盧";s:3:"老";s:3:"老";s:3:"蘆";s:3:"蘆";s:3:"虜";s:3:"虜";s:3:"路";s:3:"路";s:3:"露";s:3:"露";s:3:"魯";s:3:"魯";s:3:"鷺";s:3:"鷺";s:3:"碌";s:3:"碌";s:3:"祿";s:3:"祿";s:3:"綠";s:3:"綠";s:3:"菉";s:3:"菉";s:3:"錄";s:3:"錄";s:3:"鹿";s:3:"鹿";s:3:"論";s:3:"論";s:3:"壟";s:3:"壟";s:3:"弄";s:3:"弄";s:3:"籠";s:3:"籠";s:3:"聾";s:3:"聾";s:3:"牢";s:3:"牢";s:3:"磊";s:3:"磊";s:3:"賂";s:3:"賂";s:3:"雷";s:3:"雷";s:3:"壘";s:3:"壘";s:3:"屢";s:3:"屢";s:3:"樓";s:3:"樓";s:3:"淚";s:3:"淚";s:3:"漏";s:3:"漏";s:3:"累";s:3:"累";s:3:"縷";s:3:"縷";s:3:"陋";s:3:"陋";s:3:"勒";s:3:"勒";s:3:"肋";s:3:"肋";s:3:"凜";s:3:"凜";s:3:"凌";s:3:"凌";s:3:"稜";s:3:"稜";s:3:"綾";s:3:"綾";s:3:"菱";s:3:"菱";s:3:"陵";s:3:"陵";s:3:"讀";s:3:"讀";s:3:"拏";s:3:"拏";s:3:"樂";s:3:"樂";s:3:"諾";s:3:"諾";s:3:"丹";s:3:"丹";s:3:"寧";s:3:"寧";s:3:"怒";s:3:"怒";s:3:"率";s:3:"率";s:3:"異";s:3:"異";s:3:"北";s:3:"北";s:3:"磻";s:3:"磻";s:3:"便";s:3:"便";s:3:"復";s:3:"復";s:3:"不";s:3:"不";s:3:"泌";s:3:"泌";s:3:"數";s:3:"數";s:3:"索";s:3:"索";s:3:"參";s:3:"參";s:3:"塞";s:3:"塞";s:3:"省";s:3:"省";s:3:"葉";s:3:"葉";s:3:"說";s:3:"說";s:3:"殺";s:3:"殺";s:3:"辰";s:3:"辰";s:3:"沈";s:3:"沈";s:3:"拾";s:3:"拾";s:3:"若";s:3:"若";s:3:"掠";s:3:"掠";s:3:"略";s:3:"略";s:3:"亮";s:3:"亮";s:3:"兩";s:3:"兩";s:3:"凉";s:3:"凉";s:3:"梁";s:3:"梁";s:3:"糧";s:3:"糧";s:3:"良";s:3:"良";s:3:"諒";s:3:"諒";s:3:"量";s:3:"量";s:3:"勵";s:3:"勵";s:3:"呂";s:3:"呂";s:3:"女";s:3:"女";s:3:"廬";s:3:"廬";s:3:"旅";s:3:"旅";s:3:"濾";s:3:"濾";s:3:"礪";s:3:"礪";s:3:"閭";s:3:"閭";s:3:"驪";s:3:"驪";s:3:"麗";s:3:"麗";s:3:"黎";s:3:"黎";s:3:"力";s:3:"力";s:3:"曆";s:3:"曆";s:3:"歷";s:3:"歷";s:3:"轢";s:3:"轢";s:3:"年";s:3:"年";s:3:"憐";s:3:"憐";s:3:"戀";s:3:"戀";s:3:"撚";s:3:"撚";s:3:"漣";s:3:"漣";s:3:"煉";s:3:"煉";s:3:"璉";s:3:"璉";s:3:"秊";s:3:"秊";s:3:"練";s:3:"練";s:3:"聯";s:3:"聯";s:3:"輦";s:3:"輦";s:3:"蓮";s:3:"蓮";s:3:"連";s:3:"連";s:3:"鍊";s:3:"鍊";s:3:"列";s:3:"列";s:3:"劣";s:3:"劣";s:3:"咽";s:3:"咽";s:3:"烈";s:3:"烈";s:3:"裂";s:3:"裂";s:3:"說";s:3:"說";s:3:"廉";s:3:"廉";s:3:"念";s:3:"念";s:3:"捻";s:3:"捻";s:3:"殮";s:3:"殮";s:3:"簾";s:3:"簾";s:3:"獵";s:3:"獵";s:3:"令";s:3:"令";s:3:"囹";s:3:"囹";s:3:"寧";s:3:"寧";s:3:"嶺";s:3:"嶺";s:3:"怜";s:3:"怜";s:3:"玲";s:3:"玲";s:3:"瑩";s:3:"瑩";s:3:"羚";s:3:"羚";s:3:"聆";s:3:"聆";s:3:"鈴";s:3:"鈴";s:3:"零";s:3:"零";s:3:"靈";s:3:"靈";s:3:"領";s:3:"領";s:3:"例";s:3:"例";s:3:"禮";s:3:"禮";s:3:"醴";s:3:"醴";s:3:"隸";s:3:"隸";s:3:"惡";s:3:"惡";s:3:"了";s:3:"了";s:3:"僚";s:3:"僚";s:3:"寮";s:3:"寮";s:3:"尿";s:3:"尿";s:3:"料";s:3:"料";s:3:"樂";s:3:"樂";s:3:"燎";s:3:"燎";s:3:"療";s:3:"療";s:3:"蓼";s:3:"蓼";s:3:"遼";s:3:"遼";s:3:"龍";s:3:"龍";s:3:"暈";s:3:"暈";s:3:"阮";s:3:"阮";s:3:"劉";s:3:"劉";s:3:"杻";s:3:"杻";s:3:"柳";s:3:"柳";s:3:"流";s:3:"流";s:3:"溜";s:3:"溜";s:3:"琉";s:3:"琉";s:3:"留";s:3:"留";s:3:"硫";s:3:"硫";s:3:"紐";s:3:"紐";s:3:"類";s:3:"類";s:3:"六";s:3:"六";s:3:"戮";s:3:"戮";s:3:"陸";s:3:"陸";s:3:"倫";s:3:"倫";s:3:"崙";s:3:"崙";s:3:"淪";s:3:"淪";s:3:"輪";s:3:"輪";s:3:"律";s:3:"律";s:3:"慄";s:3:"慄";s:3:"栗";s:3:"栗";s:3:"率";s:3:"率";s:3:"隆";s:3:"隆";s:3:"利";s:3:"利";s:3:"吏";s:3:"吏";s:3:"履";s:3:"履";s:3:"易";s:3:"易";s:3:"李";s:3:"李";s:3:"梨";s:3:"梨";s:3:"泥";s:3:"泥";s:3:"理";s:3:"理";s:3:"痢";s:3:"痢";s:3:"罹";s:3:"罹";s:3:"裏";s:3:"裏";s:3:"裡";s:3:"裡";s:3:"里";s:3:"里";s:3:"離";s:3:"離";s:3:"匿";s:3:"匿";s:3:"溺";s:3:"溺";s:3:"吝";s:3:"吝";s:3:"燐";s:3:"燐";s:3:"璘";s:3:"璘";s:3:"藺";s:3:"藺";s:3:"隣";s:3:"隣";s:3:"鱗";s:3:"鱗";s:3:"麟";s:3:"麟";s:3:"林";s:3:"林";s:3:"淋";s:3:"淋";s:3:"臨";s:3:"臨";s:3:"立";s:3:"立";s:3:"笠";s:3:"笠";s:3:"粒";s:3:"粒";s:3:"狀";s:3:"狀";s:3:"炙";s:3:"炙";s:3:"識";s:3:"識";s:3:"什";s:3:"什";s:3:"茶";s:3:"茶";s:3:"刺";s:3:"刺";s:3:"切";s:3:"切";s:3:"度";s:3:"度";s:3:"拓";s:3:"拓";s:3:"糖";s:3:"糖";s:3:"宅";s:3:"宅";s:3:"洞";s:3:"洞";s:3:"暴";s:3:"暴";s:3:"輻";s:3:"輻";s:3:"行";s:3:"行";s:3:"降";s:3:"降";s:3:"見";s:3:"見";s:3:"廓";s:3:"廓";s:3:"兀";s:3:"兀";s:3:"嗀";s:3:"嗀";s:3:"﨎";s:1:"";s:3:"﨏";s:1:"";s:3:"塚";s:3:"塚";s:3:"﨑";s:1:"";s:3:"晴";s:3:"晴";s:3:"﨓";s:1:"";s:3:"﨔";s:1:"";s:3:"凞";s:3:"凞";s:3:"猪";s:3:"猪";s:3:"益";s:3:"益";s:3:"礼";s:3:"礼";s:3:"神";s:3:"神";s:3:"祥";s:3:"祥";s:3:"福";s:3:"福";s:3:"靖";s:3:"靖";s:3:"精";s:3:"精";s:3:"羽";s:3:"羽";s:3:"﨟";s:1:"";s:3:"蘒";s:3:"蘒";s:3:"﨡";s:1:"";s:3:"諸";s:3:"諸";s:3:"﨣";s:1:"";s:3:"﨤";s:1:"";s:3:"逸";s:3:"逸";s:3:"都";s:3:"都";s:3:"﨧";s:1:"";s:3:"﨨";s:1:"";s:3:"﨩";s:1:"";s:3:"飯";s:3:"飯";s:3:"飼";s:3:"飼";s:3:"館";s:3:"館";s:3:"鶴";s:3:"鶴";s:3:"郞";s:3:"郞";s:3:"隷";s:3:"隷";s:3:"侮";s:3:"侮";s:3:"僧";s:3:"僧";s:3:"免";s:3:"免";s:3:"勉";s:3:"勉";s:3:"勤";s:3:"勤";s:3:"卑";s:3:"卑";s:3:"喝";s:3:"喝";s:3:"嘆";s:3:"嘆";s:3:"器";s:3:"器";s:3:"塀";s:3:"塀";s:3:"墨";s:3:"墨";s:3:"層";s:3:"層";s:3:"屮";s:3:"屮";s:3:"悔";s:3:"悔";s:3:"慨";s:3:"慨";s:3:"憎";s:3:"憎";s:3:"懲";s:3:"懲";s:3:"敏";s:3:"敏";s:3:"既";s:3:"既";s:3:"暑";s:3:"暑";s:3:"梅";s:3:"梅";s:3:"海";s:3:"海";s:3:"渚";s:3:"渚";s:3:"漢";s:3:"漢";s:3:"煮";s:3:"煮";s:3:"爫";s:3:"爫";s:3:"琢";s:3:"琢";s:3:"碑";s:3:"碑";s:3:"社";s:3:"社";s:3:"祉";s:3:"祉";s:3:"祈";s:3:"祈";s:3:"祐";s:3:"祐";s:3:"祖";s:3:"祖";s:3:"祝";s:3:"祝";s:3:"禍";s:3:"禍";s:3:"禎";s:3:"禎";s:3:"穀";s:3:"穀";s:3:"突";s:3:"突";s:3:"節";s:3:"節";s:3:"練";s:3:"練";s:3:"縉";s:3:"縉";s:3:"繁";s:3:"繁";s:3:"署";s:3:"署";s:3:"者";s:3:"者";s:3:"臭";s:3:"臭";s:3:"艹";s:3:"艹";s:3:"艹";s:3:"艹";s:3:"著";s:3:"著";s:3:"褐";s:3:"褐";s:3:"視";s:3:"視";s:3:"謁";s:3:"謁";s:3:"謹";s:3:"謹";s:3:"賓";s:3:"賓";s:3:"贈";s:3:"贈";s:3:"辶";s:3:"辶";s:3:"逸";s:3:"逸";s:3:"難";s:3:"難";s:3:"響";s:3:"響";s:3:"頻";s:3:"頻";s:3:"恵";s:3:"恵";s:3:"𤋮";s:4:"𤋮";s:3:"舘";s:3:"舘";s:3:"並";s:3:"並";s:3:"况";s:3:"况";s:3:"全";s:3:"全";s:3:"侀";s:3:"侀";s:3:"充";s:3:"充";s:3:"冀";s:3:"冀";s:3:"勇";s:3:"勇";s:3:"勺";s:3:"勺";s:3:"喝";s:3:"喝";s:3:"啕";s:3:"啕";s:3:"喙";s:3:"喙";s:3:"嗢";s:3:"嗢";s:3:"塚";s:3:"塚";s:3:"墳";s:3:"墳";s:3:"奄";s:3:"奄";s:3:"奔";s:3:"奔";s:3:"婢";s:3:"婢";s:3:"嬨";s:3:"嬨";s:3:"廒";s:3:"廒";s:3:"廙";s:3:"廙";s:3:"彩";s:3:"彩";s:3:"徭";s:3:"徭";s:3:"惘";s:3:"惘";s:3:"慎";s:3:"慎";s:3:"愈";s:3:"愈";s:3:"憎";s:3:"憎";s:3:"慠";s:3:"慠";s:3:"懲";s:3:"懲";s:3:"戴";s:3:"戴";s:3:"揄";s:3:"揄";s:3:"搜";s:3:"搜";s:3:"摒";s:3:"摒";s:3:"敖";s:3:"敖";s:3:"晴";s:3:"晴";s:3:"朗";s:3:"朗";s:3:"望";s:3:"望";s:3:"杖";s:3:"杖";s:3:"歹";s:3:"歹";s:3:"殺";s:3:"殺";s:3:"流";s:3:"流";s:3:"滛";s:3:"滛";s:3:"滋";s:3:"滋";s:3:"漢";s:3:"漢";s:3:"瀞";s:3:"瀞";s:3:"煮";s:3:"煮";s:3:"瞧";s:3:"瞧";s:3:"爵";s:3:"爵";s:3:"犯";s:3:"犯";s:3:"猪";s:3:"猪";s:3:"瑱";s:3:"瑱";s:3:"甆";s:3:"甆";s:3:"画";s:3:"画";s:3:"瘝";s:3:"瘝";s:3:"瘟";s:3:"瘟";s:3:"益";s:3:"益";s:3:"盛";s:3:"盛";s:3:"直";s:3:"直";s:3:"睊";s:3:"睊";s:3:"着";s:3:"着";s:3:"磌";s:3:"磌";s:3:"窱";s:3:"窱";s:3:"節";s:3:"節";s:3:"类";s:3:"类";s:3:"絛";s:3:"絛";s:3:"練";s:3:"練";s:3:"缾";s:3:"缾";s:3:"者";s:3:"者";s:3:"荒";s:3:"荒";s:3:"華";s:3:"華";s:3:"蝹";s:3:"蝹";s:3:"襁";s:3:"襁";s:3:"覆";s:3:"覆";s:3:"視";s:3:"視";s:3:"調";s:3:"調";s:3:"諸";s:3:"諸";s:3:"請";s:3:"請";s:3:"謁";s:3:"謁";s:3:"諾";s:3:"諾";s:3:"諭";s:3:"諭";s:3:"謹";s:3:"謹";s:3:"變";s:3:"變";s:3:"贈";s:3:"贈";s:3:"輸";s:3:"輸";s:3:"遲";s:3:"遲";s:3:"醙";s:3:"醙";s:3:"鉶";s:3:"鉶";s:3:"陼";s:3:"陼";s:3:"難";s:3:"難";s:3:"靖";s:3:"靖";s:3:"韛";s:3:"韛";s:3:"響";s:3:"響";s:3:"頋";s:3:"頋";s:3:"頻";s:3:"頻";s:3:"鬒";s:3:"鬒";s:3:"龜";s:3:"龜";s:3:"𢡊";s:4:"𢡊";s:3:"𢡄";s:4:"𢡄";s:3:"𣏕";s:4:"𣏕";s:3:"㮝";s:3:"㮝";s:3:"䀘";s:3:"䀘";s:3:"䀹";s:3:"䀹";s:3:"𥉉";s:4:"𥉉";s:3:"𥳐";s:4:"𥳐";s:3:"𧻓";s:4:"𧻓";s:3:"齃";s:3:"齃";s:3:"龎";s:3:"龎";s:3:"ff";s:2:"ff";s:3:"fi";s:2:"fi";s:3:"fl";s:2:"fl";s:3:"ffi";s:3:"ffi";s:3:"ffl";s:3:"ffl";s:3:"ſt";s:3:"ſt";s:3:"st";s:2:"st";s:3:"ﬓ";s:4:"մն";s:3:"ﬔ";s:4:"մե";s:3:"ﬕ";s:4:"մի";s:3:"ﬖ";s:4:"վն";s:3:"ﬗ";s:4:"մխ";s:3:"ﬠ";s:2:"ע";s:3:"ﬡ";s:2:"א";s:3:"ﬢ";s:2:"ד";s:3:"ﬣ";s:2:"ה";s:3:"ﬤ";s:2:"כ";s:3:"ﬥ";s:2:"ל";s:3:"ﬦ";s:2:"ם";s:3:"ﬧ";s:2:"ר";s:3:"ﬨ";s:2:"ת";s:3:"﬩";s:1:"+";s:3:"ﭏ";s:4:"אל";s:3:"﹉";s:3:"‾";s:3:"﹊";s:3:"‾";s:3:"﹋";s:3:"‾";s:3:"﹌";s:3:"‾";s:3:"﹍";s:1:"_";s:3:"﹎";s:1:"_";s:3:"﹏";s:1:"_";s:3:"﹐";s:1:",";s:3:"﹑";s:3:"、";s:3:"﹒";s:1:".";s:3:"﹔";s:1:";";s:3:"﹕";s:1:":";s:3:"﹖";s:1:"?";s:3:"﹗";s:1:"!";s:3:"﹘";s:3:"—";s:3:"﹙";s:1:"(";s:3:"﹚";s:1:")";s:3:"﹛";s:1:"{";s:3:"﹜";s:1:"}";s:3:"﹝";s:3:"〔";s:3:"﹞";s:3:"〕";s:3:"﹟";s:1:"#";s:3:"﹠";s:1:"&";s:3:"﹡";s:1:"*";s:3:"﹢";s:1:"+";s:3:"﹣";s:1:"-";s:3:"﹤";s:1:"<";s:3:"﹥";s:1:">";s:3:"﹦";s:1:"=";s:3:"﹨";s:1:"\";s:3:"﹩";s:1:"$";s:3:"﹪";s:1:"%";s:3:"﹫";s:1:"@";s:3:"!";s:1:"!";s:3:""";s:1:""";s:3:"#";s:1:"#";s:3:"$";s:1:"$";s:3:"%";s:1:"%";s:3:"&";s:1:"&";s:3:"'";s:1:"'";s:3:"(";s:1:"(";s:3:")";s:1:")";s:3:"*";s:1:"*";s:3:"+";s:1:"+";s:3:",";s:1:",";s:3:"-";s:1:"-";s:3:".";s:1:".";s:3:"/";s:1:"/";s:3:"0";s:1:"0";s:3:"1";s:1:"1";s:3:"2";s:1:"2";s:3:"3";s:1:"3";s:3:"4";s:1:"4";s:3:"5";s:1:"5";s:3:"6";s:1:"6";s:3:"7";s:1:"7";s:3:"8";s:1:"8";s:3:"9";s:1:"9";s:3:":";s:1:":";s:3:";";s:1:";";s:3:"<";s:1:"<";s:3:"=";s:1:"=";s:3:">";s:1:">";s:3:"?";s:1:"?";s:3:"@";s:1:"@";s:3:"A";s:1:"A";s:3:"B";s:1:"B";s:3:"C";s:1:"C";s:3:"D";s:1:"D";s:3:"E";s:1:"E";s:3:"F";s:1:"F";s:3:"G";s:1:"G";s:3:"H";s:1:"H";s:3:"I";s:1:"I";s:3:"J";s:1:"J";s:3:"K";s:1:"K";s:3:"L";s:1:"L";s:3:"M";s:1:"M";s:3:"N";s:1:"N";s:3:"O";s:1:"O";s:3:"P";s:1:"P";s:3:"Q";s:1:"Q";s:3:"R";s:1:"R";s:3:"S";s:1:"S";s:3:"T";s:1:"T";s:3:"U";s:1:"U";s:3:"V";s:1:"V";s:3:"W";s:1:"W";s:3:"X";s:1:"X";s:3:"Y";s:1:"Y";s:3:"Z";s:1:"Z";s:3:"[";s:1:"[";s:3:"\";s:1:"\";s:3:"]";s:1:"]";s:3:"^";s:1:"^";s:3:"_";s:1:"_";s:3:"`";s:1:"`";s:3:"a";s:1:"a";s:3:"b";s:1:"b";s:3:"c";s:1:"c";s:3:"d";s:1:"d";s:3:"e";s:1:"e";s:3:"f";s:1:"f";s:3:"g";s:1:"g";s:3:"h";s:1:"h";s:3:"i";s:1:"i";s:3:"j";s:1:"j";s:3:"k";s:1:"k";s:3:"l";s:1:"l";s:3:"m";s:1:"m";s:3:"n";s:1:"n";s:3:"o";s:1:"o";s:3:"p";s:1:"p";s:3:"q";s:1:"q";s:3:"r";s:1:"r";s:3:"s";s:1:"s";s:3:"t";s:1:"t";s:3:"u";s:1:"u";s:3:"v";s:1:"v";s:3:"w";s:1:"w";s:3:"x";s:1:"x";s:3:"y";s:1:"y";s:3:"z";s:1:"z";s:3:"{";s:1:"{";s:3:"|";s:1:"|";s:3:"}";s:1:"}";s:3:"~";s:1:"~";s:3:"⦅";s:3:"⦅";s:3:"⦆";s:3:"⦆";s:3:"。";s:3:"。";s:3:"「";s:3:"「";s:3:"」";s:3:"」";s:3:"、";s:3:"、";s:3:"・";s:3:"・";s:3:"ヲ";s:3:"ヲ";s:3:"ァ";s:3:"ァ";s:3:"ィ";s:3:"ィ";s:3:"ゥ";s:3:"ゥ";s:3:"ェ";s:3:"ェ";s:3:"ォ";s:3:"ォ";s:3:"ャ";s:3:"ャ";s:3:"ュ";s:3:"ュ";s:3:"ョ";s:3:"ョ";s:3:"ッ";s:3:"ッ";s:3:"ー";s:3:"ー";s:3:"ア";s:3:"ア";s:3:"イ";s:3:"イ";s:3:"ウ";s:3:"ウ";s:3:"エ";s:3:"エ";s:3:"オ";s:3:"オ";s:3:"カ";s:3:"カ";s:3:"キ";s:3:"キ";s:3:"ク";s:3:"ク";s:3:"ケ";s:3:"ケ";s:3:"コ";s:3:"コ";s:3:"サ";s:3:"サ";s:3:"シ";s:3:"シ";s:3:"ス";s:3:"ス";s:3:"セ";s:3:"セ";s:3:"ソ";s:3:"ソ";s:3:"タ";s:3:"タ";s:3:"チ";s:3:"チ";s:3:"ツ";s:3:"ツ";s:3:"テ";s:3:"テ";s:3:"ト";s:3:"ト";s:3:"ナ";s:3:"ナ";s:3:"ニ";s:3:"ニ";s:3:"ヌ";s:3:"ヌ";s:3:"ネ";s:3:"ネ";s:3:"ノ";s:3:"ノ";s:3:"ハ";s:3:"ハ";s:3:"ヒ";s:3:"ヒ";s:3:"フ";s:3:"フ";s:3:"ヘ";s:3:"ヘ";s:3:"ホ";s:3:"ホ";s:3:"マ";s:3:"マ";s:3:"ミ";s:3:"ミ";s:3:"ム";s:3:"ム";s:3:"メ";s:3:"メ";s:3:"モ";s:3:"モ";s:3:"ヤ";s:3:"ヤ";s:3:"ユ";s:3:"ユ";s:3:"ヨ";s:3:"ヨ";s:3:"ラ";s:3:"ラ";s:3:"リ";s:3:"リ";s:3:"ル";s:3:"ル";s:3:"レ";s:3:"レ";s:3:"ロ";s:3:"ロ";s:3:"ワ";s:3:"ワ";s:3:"ン";s:3:"ン";s:3:"゙";s:3:"゙";s:3:"゚";s:3:"゚";s:3:"ᅠ";s:3:"ㅤ";s:3:"ᄀ";s:3:"ㄱ";s:3:"ᄁ";s:3:"ㄲ";s:3:"ᆪ";s:3:"ㄳ";s:3:"ᄂ";s:3:"ㄴ";s:3:"ᆬ";s:3:"ㄵ";s:3:"ᆭ";s:3:"ㄶ";s:3:"ᄃ";s:3:"ㄷ";s:3:"ᄄ";s:3:"ㄸ";s:3:"ᄅ";s:3:"ㄹ";s:3:"ᆰ";s:3:"ㄺ";s:3:"ᆱ";s:3:"ㄻ";s:3:"ᆲ";s:3:"ㄼ";s:3:"ᆳ";s:3:"ㄽ";s:3:"ᆴ";s:3:"ㄾ";s:3:"ᆵ";s:3:"ㄿ";s:3:"ᄚ";s:3:"ㅀ";s:3:"ᄆ";s:3:"ㅁ";s:3:"ᄇ";s:3:"ㅂ";s:3:"ᄈ";s:3:"ㅃ";s:3:"ᄡ";s:3:"ㅄ";s:3:"ᄉ";s:3:"ㅅ";s:3:"ᄊ";s:3:"ㅆ";s:3:"ᄋ";s:3:"ㅇ";s:3:"ᄌ";s:3:"ㅈ";s:3:"ᄍ";s:3:"ㅉ";s:3:"ᄎ";s:3:"ㅊ";s:3:"ᄏ";s:3:"ㅋ";s:3:"ᄐ";s:3:"ㅌ";s:3:"ᄑ";s:3:"ㅍ";s:3:"ᄒ";s:3:"ㅎ";s:3:"ᅡ";s:3:"ㅏ";s:3:"ᅢ";s:3:"ㅐ";s:3:"ᅣ";s:3:"ㅑ";s:3:"ᅤ";s:3:"ㅒ";s:3:"ᅥ";s:3:"ㅓ";s:3:"ᅦ";s:3:"ㅔ";s:3:"ᅧ";s:3:"ㅕ";s:3:"ᅨ";s:3:"ㅖ";s:3:"ᅩ";s:3:"ㅗ";s:3:"ᅪ";s:3:"ㅘ";s:3:"ᅫ";s:3:"ㅙ";s:3:"ᅬ";s:3:"ㅚ";s:3:"ᅭ";s:3:"ㅛ";s:3:"ᅮ";s:3:"ㅜ";s:3:"ᅯ";s:3:"ㅝ";s:3:"ᅰ";s:3:"ㅞ";s:3:"ᅱ";s:3:"ㅟ";s:3:"ᅲ";s:3:"ㅠ";s:3:"ᅳ";s:3:"ㅡ";s:3:"ᅴ";s:3:"ㅢ";s:3:"ᅵ";s:3:"ㅣ";s:3:"¢";s:2:"¢";s:3:"£";s:2:"£";s:3:"¬";s:2:"¬";s:3:" ̄";s:2:"¯";s:3:"¦";s:2:"¦";s:3:"¥";s:2:"¥";s:3:"₩";s:3:"₩";s:3:"│";s:3:"│";s:3:"←";s:3:"←";s:3:"↑";s:3:"↑";s:3:"→";s:3:"→";s:3:"↓";s:3:"↓";s:3:"■";s:3:"■";s:3:"○";s:3:"○";s:4:"𝐀";s:1:"A";s:4:"𝐁";s:1:"B";s:4:"𝐂";s:1:"C";s:4:"𝐃";s:1:"D";s:4:"𝐄";s:1:"E";s:4:"𝐅";s:1:"F";s:4:"𝐆";s:1:"G";s:4:"𝐇";s:1:"H";s:4:"𝐈";s:1:"I";s:4:"𝐉";s:1:"J";s:4:"𝐊";s:1:"K";s:4:"𝐋";s:1:"L";s:4:"𝐌";s:1:"M";s:4:"𝐍";s:1:"N";s:4:"𝐎";s:1:"O";s:4:"𝐏";s:1:"P";s:4:"𝐐";s:1:"Q";s:4:"𝐑";s:1:"R";s:4:"𝐒";s:1:"S";s:4:"𝐓";s:1:"T";s:4:"𝐔";s:1:"U";s:4:"𝐕";s:1:"V";s:4:"𝐖";s:1:"W";s:4:"𝐗";s:1:"X";s:4:"𝐘";s:1:"Y";s:4:"𝐙";s:1:"Z";s:4:"𝐚";s:1:"a";s:4:"𝐛";s:1:"b";s:4:"𝐜";s:1:"c";s:4:"𝐝";s:1:"d";s:4:"𝐞";s:1:"e";s:4:"𝐟";s:1:"f";s:4:"𝐠";s:1:"g";s:4:"𝐡";s:1:"h";s:4:"𝐢";s:1:"i";s:4:"𝐣";s:1:"j";s:4:"𝐤";s:1:"k";s:4:"𝐥";s:1:"l";s:4:"𝐦";s:1:"m";s:4:"𝐧";s:1:"n";s:4:"𝐨";s:1:"o";s:4:"𝐩";s:1:"p";s:4:"𝐪";s:1:"q";s:4:"𝐫";s:1:"r";s:4:"𝐬";s:1:"s";s:4:"𝐭";s:1:"t";s:4:"𝐮";s:1:"u";s:4:"𝐯";s:1:"v";s:4:"𝐰";s:1:"w";s:4:"𝐱";s:1:"x";s:4:"𝐲";s:1:"y";s:4:"𝐳";s:1:"z";s:4:"𝐴";s:1:"A";s:4:"𝐵";s:1:"B";s:4:"𝐶";s:1:"C";s:4:"𝐷";s:1:"D";s:4:"𝐸";s:1:"E";s:4:"𝐹";s:1:"F";s:4:"𝐺";s:1:"G";s:4:"𝐻";s:1:"H";s:4:"𝐼";s:1:"I";s:4:"𝐽";s:1:"J";s:4:"𝐾";s:1:"K";s:4:"𝐿";s:1:"L";s:4:"𝑀";s:1:"M";s:4:"𝑁";s:1:"N";s:4:"𝑂";s:1:"O";s:4:"𝑃";s:1:"P";s:4:"𝑄";s:1:"Q";s:4:"𝑅";s:1:"R";s:4:"𝑆";s:1:"S";s:4:"𝑇";s:1:"T";s:4:"𝑈";s:1:"U";s:4:"𝑉";s:1:"V";s:4:"𝑊";s:1:"W";s:4:"𝑋";s:1:"X";s:4:"𝑌";s:1:"Y";s:4:"𝑍";s:1:"Z";s:4:"𝑎";s:1:"a";s:4:"𝑏";s:1:"b";s:4:"𝑐";s:1:"c";s:4:"𝑑";s:1:"d";s:4:"𝑒";s:1:"e";s:4:"𝑓";s:1:"f";s:4:"𝑔";s:1:"g";s:4:"𝑖";s:1:"i";s:4:"𝑗";s:1:"j";s:4:"𝑘";s:1:"k";s:4:"𝑙";s:1:"l";s:4:"𝑚";s:1:"m";s:4:"𝑛";s:1:"n";s:4:"𝑜";s:1:"o";s:4:"𝑝";s:1:"p";s:4:"𝑞";s:1:"q";s:4:"𝑟";s:1:"r";s:4:"𝑠";s:1:"s";s:4:"𝑡";s:1:"t";s:4:"𝑢";s:1:"u";s:4:"𝑣";s:1:"v";s:4:"𝑤";s:1:"w";s:4:"𝑥";s:1:"x";s:4:"𝑦";s:1:"y";s:4:"𝑧";s:1:"z";s:4:"𝑨";s:1:"A";s:4:"𝑩";s:1:"B";s:4:"𝑪";s:1:"C";s:4:"𝑫";s:1:"D";s:4:"𝑬";s:1:"E";s:4:"𝑭";s:1:"F";s:4:"𝑮";s:1:"G";s:4:"𝑯";s:1:"H";s:4:"𝑰";s:1:"I";s:4:"𝑱";s:1:"J";s:4:"𝑲";s:1:"K";s:4:"𝑳";s:1:"L";s:4:"𝑴";s:1:"M";s:4:"𝑵";s:1:"N";s:4:"𝑶";s:1:"O";s:4:"𝑷";s:1:"P";s:4:"𝑸";s:1:"Q";s:4:"𝑹";s:1:"R";s:4:"𝑺";s:1:"S";s:4:"𝑻";s:1:"T";s:4:"𝑼";s:1:"U";s:4:"𝑽";s:1:"V";s:4:"𝑾";s:1:"W";s:4:"𝑿";s:1:"X";s:4:"𝒀";s:1:"Y";s:4:"𝒁";s:1:"Z";s:4:"𝒂";s:1:"a";s:4:"𝒃";s:1:"b";s:4:"𝒄";s:1:"c";s:4:"𝒅";s:1:"d";s:4:"𝒆";s:1:"e";s:4:"𝒇";s:1:"f";s:4:"𝒈";s:1:"g";s:4:"𝒉";s:1:"h";s:4:"𝒊";s:1:"i";s:4:"𝒋";s:1:"j";s:4:"𝒌";s:1:"k";s:4:"𝒍";s:1:"l";s:4:"𝒎";s:1:"m";s:4:"𝒏";s:1:"n";s:4:"𝒐";s:1:"o";s:4:"𝒑";s:1:"p";s:4:"𝒒";s:1:"q";s:4:"𝒓";s:1:"r";s:4:"𝒔";s:1:"s";s:4:"𝒕";s:1:"t";s:4:"𝒖";s:1:"u";s:4:"𝒗";s:1:"v";s:4:"𝒘";s:1:"w";s:4:"𝒙";s:1:"x";s:4:"𝒚";s:1:"y";s:4:"𝒛";s:1:"z";s:4:"𝒜";s:1:"A";s:4:"𝒞";s:1:"C";s:4:"𝒟";s:1:"D";s:4:"𝒢";s:1:"G";s:4:"𝒥";s:1:"J";s:4:"𝒦";s:1:"K";s:4:"𝒩";s:1:"N";s:4:"𝒪";s:1:"O";s:4:"𝒫";s:1:"P";s:4:"𝒬";s:1:"Q";s:4:"𝒮";s:1:"S";s:4:"𝒯";s:1:"T";s:4:"𝒰";s:1:"U";s:4:"𝒱";s:1:"V";s:4:"𝒲";s:1:"W";s:4:"𝒳";s:1:"X";s:4:"𝒴";s:1:"Y";s:4:"𝒵";s:1:"Z";s:4:"𝒶";s:1:"a";s:4:"𝒷";s:1:"b";s:4:"𝒸";s:1:"c";s:4:"𝒹";s:1:"d";s:4:"𝒻";s:1:"f";s:4:"𝒽";s:1:"h";s:4:"𝒾";s:1:"i";s:4:"𝒿";s:1:"j";s:4:"𝓀";s:1:"k";s:4:"𝓁";s:1:"l";s:4:"𝓂";s:1:"m";s:4:"𝓃";s:1:"n";s:4:"𝓅";s:1:"p";s:4:"𝓆";s:1:"q";s:4:"𝓇";s:1:"r";s:4:"𝓈";s:1:"s";s:4:"𝓉";s:1:"t";s:4:"𝓊";s:1:"u";s:4:"𝓋";s:1:"v";s:4:"𝓌";s:1:"w";s:4:"𝓍";s:1:"x";s:4:"𝓎";s:1:"y";s:4:"𝓏";s:1:"z";s:4:"𝓐";s:1:"A";s:4:"𝓑";s:1:"B";s:4:"𝓒";s:1:"C";s:4:"𝓓";s:1:"D";s:4:"𝓔";s:1:"E";s:4:"𝓕";s:1:"F";s:4:"𝓖";s:1:"G";s:4:"𝓗";s:1:"H";s:4:"𝓘";s:1:"I";s:4:"𝓙";s:1:"J";s:4:"𝓚";s:1:"K";s:4:"𝓛";s:1:"L";s:4:"𝓜";s:1:"M";s:4:"𝓝";s:1:"N";s:4:"𝓞";s:1:"O";s:4:"𝓟";s:1:"P";s:4:"𝓠";s:1:"Q";s:4:"𝓡";s:1:"R";s:4:"𝓢";s:1:"S";s:4:"𝓣";s:1:"T";s:4:"𝓤";s:1:"U";s:4:"𝓥";s:1:"V";s:4:"𝓦";s:1:"W";s:4:"𝓧";s:1:"X";s:4:"𝓨";s:1:"Y";s:4:"𝓩";s:1:"Z";s:4:"𝓪";s:1:"a";s:4:"𝓫";s:1:"b";s:4:"𝓬";s:1:"c";s:4:"𝓭";s:1:"d";s:4:"𝓮";s:1:"e";s:4:"𝓯";s:1:"f";s:4:"𝓰";s:1:"g";s:4:"𝓱";s:1:"h";s:4:"𝓲";s:1:"i";s:4:"𝓳";s:1:"j";s:4:"𝓴";s:1:"k";s:4:"𝓵";s:1:"l";s:4:"𝓶";s:1:"m";s:4:"𝓷";s:1:"n";s:4:"𝓸";s:1:"o";s:4:"𝓹";s:1:"p";s:4:"𝓺";s:1:"q";s:4:"𝓻";s:1:"r";s:4:"𝓼";s:1:"s";s:4:"𝓽";s:1:"t";s:4:"𝓾";s:1:"u";s:4:"𝓿";s:1:"v";s:4:"𝔀";s:1:"w";s:4:"𝔁";s:1:"x";s:4:"𝔂";s:1:"y";s:4:"𝔃";s:1:"z";s:4:"𝔄";s:1:"A";s:4:"𝔅";s:1:"B";s:4:"𝔇";s:1:"D";s:4:"𝔈";s:1:"E";s:4:"𝔉";s:1:"F";s:4:"𝔊";s:1:"G";s:4:"𝔍";s:1:"J";s:4:"𝔎";s:1:"K";s:4:"𝔏";s:1:"L";s:4:"𝔐";s:1:"M";s:4:"𝔑";s:1:"N";s:4:"𝔒";s:1:"O";s:4:"𝔓";s:1:"P";s:4:"𝔔";s:1:"Q";s:4:"𝔖";s:1:"S";s:4:"𝔗";s:1:"T";s:4:"𝔘";s:1:"U";s:4:"𝔙";s:1:"V";s:4:"𝔚";s:1:"W";s:4:"𝔛";s:1:"X";s:4:"𝔜";s:1:"Y";s:4:"𝔞";s:1:"a";s:4:"𝔟";s:1:"b";s:4:"𝔠";s:1:"c";s:4:"𝔡";s:1:"d";s:4:"𝔢";s:1:"e";s:4:"𝔣";s:1:"f";s:4:"𝔤";s:1:"g";s:4:"𝔥";s:1:"h";s:4:"𝔦";s:1:"i";s:4:"𝔧";s:1:"j";s:4:"𝔨";s:1:"k";s:4:"𝔩";s:1:"l";s:4:"𝔪";s:1:"m";s:4:"𝔫";s:1:"n";s:4:"𝔬";s:1:"o";s:4:"𝔭";s:1:"p";s:4:"𝔮";s:1:"q";s:4:"𝔯";s:1:"r";s:4:"𝔰";s:1:"s";s:4:"𝔱";s:1:"t";s:4:"𝔲";s:1:"u";s:4:"𝔳";s:1:"v";s:4:"𝔴";s:1:"w";s:4:"𝔵";s:1:"x";s:4:"𝔶";s:1:"y";s:4:"𝔷";s:1:"z";s:4:"𝔸";s:1:"A";s:4:"𝔹";s:1:"B";s:4:"𝔻";s:1:"D";s:4:"𝔼";s:1:"E";s:4:"𝔽";s:1:"F";s:4:"𝔾";s:1:"G";s:4:"𝕀";s:1:"I";s:4:"𝕁";s:1:"J";s:4:"𝕂";s:1:"K";s:4:"𝕃";s:1:"L";s:4:"𝕄";s:1:"M";s:4:"𝕆";s:1:"O";s:4:"𝕊";s:1:"S";s:4:"𝕋";s:1:"T";s:4:"𝕌";s:1:"U";s:4:"𝕍";s:1:"V";s:4:"𝕎";s:1:"W";s:4:"𝕏";s:1:"X";s:4:"𝕐";s:1:"Y";s:4:"𝕒";s:1:"a";s:4:"𝕓";s:1:"b";s:4:"𝕔";s:1:"c";s:4:"𝕕";s:1:"d";s:4:"𝕖";s:1:"e";s:4:"𝕗";s:1:"f";s:4:"𝕘";s:1:"g";s:4:"𝕙";s:1:"h";s:4:"𝕚";s:1:"i";s:4:"𝕛";s:1:"j";s:4:"𝕜";s:1:"k";s:4:"𝕝";s:1:"l";s:4:"𝕞";s:1:"m";s:4:"𝕟";s:1:"n";s:4:"𝕠";s:1:"o";s:4:"𝕡";s:1:"p";s:4:"𝕢";s:1:"q";s:4:"𝕣";s:1:"r";s:4:"𝕤";s:1:"s";s:4:"𝕥";s:1:"t";s:4:"𝕦";s:1:"u";s:4:"𝕧";s:1:"v";s:4:"𝕨";s:1:"w";s:4:"𝕩";s:1:"x";s:4:"𝕪";s:1:"y";s:4:"𝕫";s:1:"z";s:4:"𝕬";s:1:"A";s:4:"𝕭";s:1:"B";s:4:"𝕮";s:1:"C";s:4:"𝕯";s:1:"D";s:4:"𝕰";s:1:"E";s:4:"𝕱";s:1:"F";s:4:"𝕲";s:1:"G";s:4:"𝕳";s:1:"H";s:4:"𝕴";s:1:"I";s:4:"𝕵";s:1:"J";s:4:"𝕶";s:1:"K";s:4:"𝕷";s:1:"L";s:4:"𝕸";s:1:"M";s:4:"𝕹";s:1:"N";s:4:"𝕺";s:1:"O";s:4:"𝕻";s:1:"P";s:4:"𝕼";s:1:"Q";s:4:"𝕽";s:1:"R";s:4:"𝕾";s:1:"S";s:4:"𝕿";s:1:"T";s:4:"𝖀";s:1:"U";s:4:"𝖁";s:1:"V";s:4:"𝖂";s:1:"W";s:4:"𝖃";s:1:"X";s:4:"𝖄";s:1:"Y";s:4:"𝖅";s:1:"Z";s:4:"𝖆";s:1:"a";s:4:"𝖇";s:1:"b";s:4:"𝖈";s:1:"c";s:4:"𝖉";s:1:"d";s:4:"𝖊";s:1:"e";s:4:"𝖋";s:1:"f";s:4:"𝖌";s:1:"g";s:4:"𝖍";s:1:"h";s:4:"𝖎";s:1:"i";s:4:"𝖏";s:1:"j";s:4:"𝖐";s:1:"k";s:4:"𝖑";s:1:"l";s:4:"𝖒";s:1:"m";s:4:"𝖓";s:1:"n";s:4:"𝖔";s:1:"o";s:4:"𝖕";s:1:"p";s:4:"𝖖";s:1:"q";s:4:"𝖗";s:1:"r";s:4:"𝖘";s:1:"s";s:4:"𝖙";s:1:"t";s:4:"𝖚";s:1:"u";s:4:"𝖛";s:1:"v";s:4:"𝖜";s:1:"w";s:4:"𝖝";s:1:"x";s:4:"𝖞";s:1:"y";s:4:"𝖟";s:1:"z";s:4:"𝖠";s:1:"A";s:4:"𝖡";s:1:"B";s:4:"𝖢";s:1:"C";s:4:"𝖣";s:1:"D";s:4:"𝖤";s:1:"E";s:4:"𝖥";s:1:"F";s:4:"𝖦";s:1:"G";s:4:"𝖧";s:1:"H";s:4:"𝖨";s:1:"I";s:4:"𝖩";s:1:"J";s:4:"𝖪";s:1:"K";s:4:"𝖫";s:1:"L";s:4:"𝖬";s:1:"M";s:4:"𝖭";s:1:"N";s:4:"𝖮";s:1:"O";s:4:"𝖯";s:1:"P";s:4:"𝖰";s:1:"Q";s:4:"𝖱";s:1:"R";s:4:"𝖲";s:1:"S";s:4:"𝖳";s:1:"T";s:4:"𝖴";s:1:"U";s:4:"𝖵";s:1:"V";s:4:"𝖶";s:1:"W";s:4:"𝖷";s:1:"X";s:4:"𝖸";s:1:"Y";s:4:"𝖹";s:1:"Z";s:4:"𝖺";s:1:"a";s:4:"𝖻";s:1:"b";s:4:"𝖼";s:1:"c";s:4:"𝖽";s:1:"d";s:4:"𝖾";s:1:"e";s:4:"𝖿";s:1:"f";s:4:"𝗀";s:1:"g";s:4:"𝗁";s:1:"h";s:4:"𝗂";s:1:"i";s:4:"𝗃";s:1:"j";s:4:"𝗄";s:1:"k";s:4:"𝗅";s:1:"l";s:4:"𝗆";s:1:"m";s:4:"𝗇";s:1:"n";s:4:"𝗈";s:1:"o";s:4:"𝗉";s:1:"p";s:4:"𝗊";s:1:"q";s:4:"𝗋";s:1:"r";s:4:"𝗌";s:1:"s";s:4:"𝗍";s:1:"t";s:4:"𝗎";s:1:"u";s:4:"𝗏";s:1:"v";s:4:"𝗐";s:1:"w";s:4:"𝗑";s:1:"x";s:4:"𝗒";s:1:"y";s:4:"𝗓";s:1:"z";s:4:"𝗔";s:1:"A";s:4:"𝗕";s:1:"B";s:4:"𝗖";s:1:"C";s:4:"𝗗";s:1:"D";s:4:"𝗘";s:1:"E";s:4:"𝗙";s:1:"F";s:4:"𝗚";s:1:"G";s:4:"𝗛";s:1:"H";s:4:"𝗜";s:1:"I";s:4:"𝗝";s:1:"J";s:4:"𝗞";s:1:"K";s:4:"𝗟";s:1:"L";s:4:"𝗠";s:1:"M";s:4:"𝗡";s:1:"N";s:4:"𝗢";s:1:"O";s:4:"𝗣";s:1:"P";s:4:"𝗤";s:1:"Q";s:4:"𝗥";s:1:"R";s:4:"𝗦";s:1:"S";s:4:"𝗧";s:1:"T";s:4:"𝗨";s:1:"U";s:4:"𝗩";s:1:"V";s:4:"𝗪";s:1:"W";s:4:"𝗫";s:1:"X";s:4:"𝗬";s:1:"Y";s:4:"𝗭";s:1:"Z";s:4:"𝗮";s:1:"a";s:4:"𝗯";s:1:"b";s:4:"𝗰";s:1:"c";s:4:"𝗱";s:1:"d";s:4:"𝗲";s:1:"e";s:4:"𝗳";s:1:"f";s:4:"𝗴";s:1:"g";s:4:"𝗵";s:1:"h";s:4:"𝗶";s:1:"i";s:4:"𝗷";s:1:"j";s:4:"𝗸";s:1:"k";s:4:"𝗹";s:1:"l";s:4:"𝗺";s:1:"m";s:4:"𝗻";s:1:"n";s:4:"𝗼";s:1:"o";s:4:"𝗽";s:1:"p";s:4:"𝗾";s:1:"q";s:4:"𝗿";s:1:"r";s:4:"𝘀";s:1:"s";s:4:"𝘁";s:1:"t";s:4:"𝘂";s:1:"u";s:4:"𝘃";s:1:"v";s:4:"𝘄";s:1:"w";s:4:"𝘅";s:1:"x";s:4:"𝘆";s:1:"y";s:4:"𝘇";s:1:"z";s:4:"𝘈";s:1:"A";s:4:"𝘉";s:1:"B";s:4:"𝘊";s:1:"C";s:4:"𝘋";s:1:"D";s:4:"𝘌";s:1:"E";s:4:"𝘍";s:1:"F";s:4:"𝘎";s:1:"G";s:4:"𝘏";s:1:"H";s:4:"𝘐";s:1:"I";s:4:"𝘑";s:1:"J";s:4:"𝘒";s:1:"K";s:4:"𝘓";s:1:"L";s:4:"𝘔";s:1:"M";s:4:"𝘕";s:1:"N";s:4:"𝘖";s:1:"O";s:4:"𝘗";s:1:"P";s:4:"𝘘";s:1:"Q";s:4:"𝘙";s:1:"R";s:4:"𝘚";s:1:"S";s:4:"𝘛";s:1:"T";s:4:"𝘜";s:1:"U";s:4:"𝘝";s:1:"V";s:4:"𝘞";s:1:"W";s:4:"𝘟";s:1:"X";s:4:"𝘠";s:1:"Y";s:4:"𝘡";s:1:"Z";s:4:"𝘢";s:1:"a";s:4:"𝘣";s:1:"b";s:4:"𝘤";s:1:"c";s:4:"𝘥";s:1:"d";s:4:"𝘦";s:1:"e";s:4:"𝘧";s:1:"f";s:4:"𝘨";s:1:"g";s:4:"𝘩";s:1:"h";s:4:"𝘪";s:1:"i";s:4:"𝘫";s:1:"j";s:4:"𝘬";s:1:"k";s:4:"𝘭";s:1:"l";s:4:"𝘮";s:1:"m";s:4:"𝘯";s:1:"n";s:4:"𝘰";s:1:"o";s:4:"𝘱";s:1:"p";s:4:"𝘲";s:1:"q";s:4:"𝘳";s:1:"r";s:4:"𝘴";s:1:"s";s:4:"𝘵";s:1:"t";s:4:"𝘶";s:1:"u";s:4:"𝘷";s:1:"v";s:4:"𝘸";s:1:"w";s:4:"𝘹";s:1:"x";s:4:"𝘺";s:1:"y";s:4:"𝘻";s:1:"z";s:4:"𝘼";s:1:"A";s:4:"𝘽";s:1:"B";s:4:"𝘾";s:1:"C";s:4:"𝘿";s:1:"D";s:4:"𝙀";s:1:"E";s:4:"𝙁";s:1:"F";s:4:"𝙂";s:1:"G";s:4:"𝙃";s:1:"H";s:4:"𝙄";s:1:"I";s:4:"𝙅";s:1:"J";s:4:"𝙆";s:1:"K";s:4:"𝙇";s:1:"L";s:4:"𝙈";s:1:"M";s:4:"𝙉";s:1:"N";s:4:"𝙊";s:1:"O";s:4:"𝙋";s:1:"P";s:4:"𝙌";s:1:"Q";s:4:"𝙍";s:1:"R";s:4:"𝙎";s:1:"S";s:4:"𝙏";s:1:"T";s:4:"𝙐";s:1:"U";s:4:"𝙑";s:1:"V";s:4:"𝙒";s:1:"W";s:4:"𝙓";s:1:"X";s:4:"𝙔";s:1:"Y";s:4:"𝙕";s:1:"Z";s:4:"𝙖";s:1:"a";s:4:"𝙗";s:1:"b";s:4:"𝙘";s:1:"c";s:4:"𝙙";s:1:"d";s:4:"𝙚";s:1:"e";s:4:"𝙛";s:1:"f";s:4:"𝙜";s:1:"g";s:4:"𝙝";s:1:"h";s:4:"𝙞";s:1:"i";s:4:"𝙟";s:1:"j";s:4:"𝙠";s:1:"k";s:4:"𝙡";s:1:"l";s:4:"𝙢";s:1:"m";s:4:"𝙣";s:1:"n";s:4:"𝙤";s:1:"o";s:4:"𝙥";s:1:"p";s:4:"𝙦";s:1:"q";s:4:"𝙧";s:1:"r";s:4:"𝙨";s:1:"s";s:4:"𝙩";s:1:"t";s:4:"𝙪";s:1:"u";s:4:"𝙫";s:1:"v";s:4:"𝙬";s:1:"w";s:4:"𝙭";s:1:"x";s:4:"𝙮";s:1:"y";s:4:"𝙯";s:1:"z";s:4:"𝙰";s:1:"A";s:4:"𝙱";s:1:"B";s:4:"𝙲";s:1:"C";s:4:"𝙳";s:1:"D";s:4:"𝙴";s:1:"E";s:4:"𝙵";s:1:"F";s:4:"𝙶";s:1:"G";s:4:"𝙷";s:1:"H";s:4:"𝙸";s:1:"I";s:4:"𝙹";s:1:"J";s:4:"𝙺";s:1:"K";s:4:"𝙻";s:1:"L";s:4:"𝙼";s:1:"M";s:4:"𝙽";s:1:"N";s:4:"𝙾";s:1:"O";s:4:"𝙿";s:1:"P";s:4:"𝚀";s:1:"Q";s:4:"𝚁";s:1:"R";s:4:"𝚂";s:1:"S";s:4:"𝚃";s:1:"T";s:4:"𝚄";s:1:"U";s:4:"𝚅";s:1:"V";s:4:"𝚆";s:1:"W";s:4:"𝚇";s:1:"X";s:4:"𝚈";s:1:"Y";s:4:"𝚉";s:1:"Z";s:4:"𝚊";s:1:"a";s:4:"𝚋";s:1:"b";s:4:"𝚌";s:1:"c";s:4:"𝚍";s:1:"d";s:4:"𝚎";s:1:"e";s:4:"𝚏";s:1:"f";s:4:"𝚐";s:1:"g";s:4:"𝚑";s:1:"h";s:4:"𝚒";s:1:"i";s:4:"𝚓";s:1:"j";s:4:"𝚔";s:1:"k";s:4:"𝚕";s:1:"l";s:4:"𝚖";s:1:"m";s:4:"𝚗";s:1:"n";s:4:"𝚘";s:1:"o";s:4:"𝚙";s:1:"p";s:4:"𝚚";s:1:"q";s:4:"𝚛";s:1:"r";s:4:"𝚜";s:1:"s";s:4:"𝚝";s:1:"t";s:4:"𝚞";s:1:"u";s:4:"𝚟";s:1:"v";s:4:"𝚠";s:1:"w";s:4:"𝚡";s:1:"x";s:4:"𝚢";s:1:"y";s:4:"𝚣";s:1:"z";s:4:"𝚤";s:2:"ı";s:4:"𝚥";s:2:"ȷ";s:4:"𝚨";s:2:"Α";s:4:"𝚩";s:2:"Β";s:4:"𝚪";s:2:"Γ";s:4:"𝚫";s:2:"Δ";s:4:"𝚬";s:2:"Ε";s:4:"𝚭";s:2:"Ζ";s:4:"𝚮";s:2:"Η";s:4:"𝚯";s:2:"Θ";s:4:"𝚰";s:2:"Ι";s:4:"𝚱";s:2:"Κ";s:4:"𝚲";s:2:"Λ";s:4:"𝚳";s:2:"Μ";s:4:"𝚴";s:2:"Ν";s:4:"𝚵";s:2:"Ξ";s:4:"𝚶";s:2:"Ο";s:4:"𝚷";s:2:"Π";s:4:"𝚸";s:2:"Ρ";s:4:"𝚹";s:2:"ϴ";s:4:"𝚺";s:2:"Σ";s:4:"𝚻";s:2:"Τ";s:4:"𝚼";s:2:"Υ";s:4:"𝚽";s:2:"Φ";s:4:"𝚾";s:2:"Χ";s:4:"𝚿";s:2:"Ψ";s:4:"𝛀";s:2:"Ω";s:4:"𝛁";s:3:"∇";s:4:"𝛂";s:2:"α";s:4:"𝛃";s:2:"β";s:4:"𝛄";s:2:"γ";s:4:"𝛅";s:2:"δ";s:4:"𝛆";s:2:"ε";s:4:"𝛇";s:2:"ζ";s:4:"𝛈";s:2:"η";s:4:"𝛉";s:2:"θ";s:4:"𝛊";s:2:"ι";s:4:"𝛋";s:2:"κ";s:4:"𝛌";s:2:"λ";s:4:"𝛍";s:2:"μ";s:4:"𝛎";s:2:"ν";s:4:"𝛏";s:2:"ξ";s:4:"𝛐";s:2:"ο";s:4:"𝛑";s:2:"π";s:4:"𝛒";s:2:"ρ";s:4:"𝛓";s:2:"ς";s:4:"𝛔";s:2:"σ";s:4:"𝛕";s:2:"τ";s:4:"𝛖";s:2:"υ";s:4:"𝛗";s:2:"φ";s:4:"𝛘";s:2:"χ";s:4:"𝛙";s:2:"ψ";s:4:"𝛚";s:2:"ω";s:4:"𝛛";s:3:"∂";s:4:"𝛜";s:2:"ϵ";s:4:"𝛝";s:2:"ϑ";s:4:"𝛞";s:2:"ϰ";s:4:"𝛟";s:2:"ϕ";s:4:"𝛠";s:2:"ϱ";s:4:"𝛡";s:2:"ϖ";s:4:"𝛢";s:2:"Α";s:4:"𝛣";s:2:"Β";s:4:"𝛤";s:2:"Γ";s:4:"𝛥";s:2:"Δ";s:4:"𝛦";s:2:"Ε";s:4:"𝛧";s:2:"Ζ";s:4:"𝛨";s:2:"Η";s:4:"𝛩";s:2:"Θ";s:4:"𝛪";s:2:"Ι";s:4:"𝛫";s:2:"Κ";s:4:"𝛬";s:2:"Λ";s:4:"𝛭";s:2:"Μ";s:4:"𝛮";s:2:"Ν";s:4:"𝛯";s:2:"Ξ";s:4:"𝛰";s:2:"Ο";s:4:"𝛱";s:2:"Π";s:4:"𝛲";s:2:"Ρ";s:4:"𝛳";s:2:"ϴ";s:4:"𝛴";s:2:"Σ";s:4:"𝛵";s:2:"Τ";s:4:"𝛶";s:2:"Υ";s:4:"𝛷";s:2:"Φ";s:4:"𝛸";s:2:"Χ";s:4:"𝛹";s:2:"Ψ";s:4:"𝛺";s:2:"Ω";s:4:"𝛻";s:3:"∇";s:4:"𝛼";s:2:"α";s:4:"𝛽";s:2:"β";s:4:"𝛾";s:2:"γ";s:4:"𝛿";s:2:"δ";s:4:"𝜀";s:2:"ε";s:4:"𝜁";s:2:"ζ";s:4:"𝜂";s:2:"η";s:4:"𝜃";s:2:"θ";s:4:"𝜄";s:2:"ι";s:4:"𝜅";s:2:"κ";s:4:"𝜆";s:2:"λ";s:4:"𝜇";s:2:"μ";s:4:"𝜈";s:2:"ν";s:4:"𝜉";s:2:"ξ";s:4:"𝜊";s:2:"ο";s:4:"𝜋";s:2:"π";s:4:"𝜌";s:2:"ρ";s:4:"𝜍";s:2:"ς";s:4:"𝜎";s:2:"σ";s:4:"𝜏";s:2:"τ";s:4:"𝜐";s:2:"υ";s:4:"𝜑";s:2:"φ";s:4:"𝜒";s:2:"χ";s:4:"𝜓";s:2:"ψ";s:4:"𝜔";s:2:"ω";s:4:"𝜕";s:3:"∂";s:4:"𝜖";s:2:"ϵ";s:4:"𝜗";s:2:"ϑ";s:4:"𝜘";s:2:"ϰ";s:4:"𝜙";s:2:"ϕ";s:4:"𝜚";s:2:"ϱ";s:4:"𝜛";s:2:"ϖ";s:4:"𝜜";s:2:"Α";s:4:"𝜝";s:2:"Β";s:4:"𝜞";s:2:"Γ";s:4:"𝜟";s:2:"Δ";s:4:"𝜠";s:2:"Ε";s:4:"𝜡";s:2:"Ζ";s:4:"𝜢";s:2:"Η";s:4:"𝜣";s:2:"Θ";s:4:"𝜤";s:2:"Ι";s:4:"𝜥";s:2:"Κ";s:4:"𝜦";s:2:"Λ";s:4:"𝜧";s:2:"Μ";s:4:"𝜨";s:2:"Ν";s:4:"𝜩";s:2:"Ξ";s:4:"𝜪";s:2:"Ο";s:4:"𝜫";s:2:"Π";s:4:"𝜬";s:2:"Ρ";s:4:"𝜭";s:2:"ϴ";s:4:"𝜮";s:2:"Σ";s:4:"𝜯";s:2:"Τ";s:4:"𝜰";s:2:"Υ";s:4:"𝜱";s:2:"Φ";s:4:"𝜲";s:2:"Χ";s:4:"𝜳";s:2:"Ψ";s:4:"𝜴";s:2:"Ω";s:4:"𝜵";s:3:"∇";s:4:"𝜶";s:2:"α";s:4:"𝜷";s:2:"β";s:4:"𝜸";s:2:"γ";s:4:"𝜹";s:2:"δ";s:4:"𝜺";s:2:"ε";s:4:"𝜻";s:2:"ζ";s:4:"𝜼";s:2:"η";s:4:"𝜽";s:2:"θ";s:4:"𝜾";s:2:"ι";s:4:"𝜿";s:2:"κ";s:4:"𝝀";s:2:"λ";s:4:"𝝁";s:2:"μ";s:4:"𝝂";s:2:"ν";s:4:"𝝃";s:2:"ξ";s:4:"𝝄";s:2:"ο";s:4:"𝝅";s:2:"π";s:4:"𝝆";s:2:"ρ";s:4:"𝝇";s:2:"ς";s:4:"𝝈";s:2:"σ";s:4:"𝝉";s:2:"τ";s:4:"𝝊";s:2:"υ";s:4:"𝝋";s:2:"φ";s:4:"𝝌";s:2:"χ";s:4:"𝝍";s:2:"ψ";s:4:"𝝎";s:2:"ω";s:4:"𝝏";s:3:"∂";s:4:"𝝐";s:2:"ϵ";s:4:"𝝑";s:2:"ϑ";s:4:"𝝒";s:2:"ϰ";s:4:"𝝓";s:2:"ϕ";s:4:"𝝔";s:2:"ϱ";s:4:"𝝕";s:2:"ϖ";s:4:"𝝖";s:2:"Α";s:4:"𝝗";s:2:"Β";s:4:"𝝘";s:2:"Γ";s:4:"𝝙";s:2:"Δ";s:4:"𝝚";s:2:"Ε";s:4:"𝝛";s:2:"Ζ";s:4:"𝝜";s:2:"Η";s:4:"𝝝";s:2:"Θ";s:4:"𝝞";s:2:"Ι";s:4:"𝝟";s:2:"Κ";s:4:"𝝠";s:2:"Λ";s:4:"𝝡";s:2:"Μ";s:4:"𝝢";s:2:"Ν";s:4:"𝝣";s:2:"Ξ";s:4:"𝝤";s:2:"Ο";s:4:"𝝥";s:2:"Π";s:4:"𝝦";s:2:"Ρ";s:4:"𝝧";s:2:"ϴ";s:4:"𝝨";s:2:"Σ";s:4:"𝝩";s:2:"Τ";s:4:"𝝪";s:2:"Υ";s:4:"𝝫";s:2:"Φ";s:4:"𝝬";s:2:"Χ";s:4:"𝝭";s:2:"Ψ";s:4:"𝝮";s:2:"Ω";s:4:"𝝯";s:3:"∇";s:4:"𝝰";s:2:"α";s:4:"𝝱";s:2:"β";s:4:"𝝲";s:2:"γ";s:4:"𝝳";s:2:"δ";s:4:"𝝴";s:2:"ε";s:4:"𝝵";s:2:"ζ";s:4:"𝝶";s:2:"η";s:4:"𝝷";s:2:"θ";s:4:"𝝸";s:2:"ι";s:4:"𝝹";s:2:"κ";s:4:"𝝺";s:2:"λ";s:4:"𝝻";s:2:"μ";s:4:"𝝼";s:2:"ν";s:4:"𝝽";s:2:"ξ";s:4:"𝝾";s:2:"ο";s:4:"𝝿";s:2:"π";s:4:"𝞀";s:2:"ρ";s:4:"𝞁";s:2:"ς";s:4:"𝞂";s:2:"σ";s:4:"𝞃";s:2:"τ";s:4:"𝞄";s:2:"υ";s:4:"𝞅";s:2:"φ";s:4:"𝞆";s:2:"χ";s:4:"𝞇";s:2:"ψ";s:4:"𝞈";s:2:"ω";s:4:"𝞉";s:3:"∂";s:4:"𝞊";s:2:"ϵ";s:4:"𝞋";s:2:"ϑ";s:4:"𝞌";s:2:"ϰ";s:4:"𝞍";s:2:"ϕ";s:4:"𝞎";s:2:"ϱ";s:4:"𝞏";s:2:"ϖ";s:4:"𝞐";s:2:"Α";s:4:"𝞑";s:2:"Β";s:4:"𝞒";s:2:"Γ";s:4:"𝞓";s:2:"Δ";s:4:"𝞔";s:2:"Ε";s:4:"𝞕";s:2:"Ζ";s:4:"𝞖";s:2:"Η";s:4:"𝞗";s:2:"Θ";s:4:"𝞘";s:2:"Ι";s:4:"𝞙";s:2:"Κ";s:4:"𝞚";s:2:"Λ";s:4:"𝞛";s:2:"Μ";s:4:"𝞜";s:2:"Ν";s:4:"𝞝";s:2:"Ξ";s:4:"𝞞";s:2:"Ο";s:4:"𝞟";s:2:"Π";s:4:"𝞠";s:2:"Ρ";s:4:"𝞡";s:2:"ϴ";s:4:"𝞢";s:2:"Σ";s:4:"𝞣";s:2:"Τ";s:4:"𝞤";s:2:"Υ";s:4:"𝞥";s:2:"Φ";s:4:"𝞦";s:2:"Χ";s:4:"𝞧";s:2:"Ψ";s:4:"𝞨";s:2:"Ω";s:4:"𝞩";s:3:"∇";s:4:"𝞪";s:2:"α";s:4:"𝞫";s:2:"β";s:4:"𝞬";s:2:"γ";s:4:"𝞭";s:2:"δ";s:4:"𝞮";s:2:"ε";s:4:"𝞯";s:2:"ζ";s:4:"𝞰";s:2:"η";s:4:"𝞱";s:2:"θ";s:4:"𝞲";s:2:"ι";s:4:"𝞳";s:2:"κ";s:4:"𝞴";s:2:"λ";s:4:"𝞵";s:2:"μ";s:4:"𝞶";s:2:"ν";s:4:"𝞷";s:2:"ξ";s:4:"𝞸";s:2:"ο";s:4:"𝞹";s:2:"π";s:4:"𝞺";s:2:"ρ";s:4:"𝞻";s:2:"ς";s:4:"𝞼";s:2:"σ";s:4:"𝞽";s:2:"τ";s:4:"𝞾";s:2:"υ";s:4:"𝞿";s:2:"φ";s:4:"𝟀";s:2:"χ";s:4:"𝟁";s:2:"ψ";s:4:"𝟂";s:2:"ω";s:4:"𝟃";s:3:"∂";s:4:"𝟄";s:2:"ϵ";s:4:"𝟅";s:2:"ϑ";s:4:"𝟆";s:2:"ϰ";s:4:"𝟇";s:2:"ϕ";s:4:"𝟈";s:2:"ϱ";s:4:"𝟉";s:2:"ϖ";s:4:"𝟊";s:2:"Ϝ";s:4:"𝟋";s:2:"ϝ";s:4:"𝟎";s:1:"0";s:4:"𝟏";s:1:"1";s:4:"𝟐";s:1:"2";s:4:"𝟑";s:1:"3";s:4:"𝟒";s:1:"4";s:4:"𝟓";s:1:"5";s:4:"𝟔";s:1:"6";s:4:"𝟕";s:1:"7";s:4:"𝟖";s:1:"8";s:4:"𝟗";s:1:"9";s:4:"𝟘";s:1:"0";s:4:"𝟙";s:1:"1";s:4:"𝟚";s:1:"2";s:4:"𝟛";s:1:"3";s:4:"𝟜";s:1:"4";s:4:"𝟝";s:1:"5";s:4:"𝟞";s:1:"6";s:4:"𝟟";s:1:"7";s:4:"𝟠";s:1:"8";s:4:"𝟡";s:1:"9";s:4:"𝟢";s:1:"0";s:4:"𝟣";s:1:"1";s:4:"𝟤";s:1:"2";s:4:"𝟥";s:1:"3";s:4:"𝟦";s:1:"4";s:4:"𝟧";s:1:"5";s:4:"𝟨";s:1:"6";s:4:"𝟩";s:1:"7";s:4:"𝟪";s:1:"8";s:4:"𝟫";s:1:"9";s:4:"𝟬";s:1:"0";s:4:"𝟭";s:1:"1";s:4:"𝟮";s:1:"2";s:4:"𝟯";s:1:"3";s:4:"𝟰";s:1:"4";s:4:"𝟱";s:1:"5";s:4:"𝟲";s:1:"6";s:4:"𝟳";s:1:"7";s:4:"𝟴";s:1:"8";s:4:"𝟵";s:1:"9";s:4:"𝟶";s:1:"0";s:4:"𝟷";s:1:"1";s:4:"𝟸";s:1:"2";s:4:"𝟹";s:1:"3";s:4:"𝟺";s:1:"4";s:4:"𝟻";s:1:"5";s:4:"𝟼";s:1:"6";s:4:"𝟽";s:1:"7";s:4:"𝟾";s:1:"8";s:4:"𝟿";s:1:"9";s:4:"𞸀";s:2:"ا";s:4:"𞸁";s:2:"ب";s:4:"𞸂";s:2:"ج";s:4:"𞸃";s:2:"د";s:4:"𞸅";s:2:"و";s:4:"𞸆";s:2:"ز";s:4:"𞸇";s:2:"ح";s:4:"𞸈";s:2:"ط";s:4:"𞸉";s:2:"ي";s:4:"𞸊";s:2:"ك";s:4:"𞸋";s:2:"ل";s:4:"𞸌";s:2:"م";s:4:"𞸍";s:2:"ن";s:4:"𞸎";s:2:"س";s:4:"𞸏";s:2:"ع";s:4:"𞸐";s:2:"ف";s:4:"𞸑";s:2:"ص";s:4:"𞸒";s:2:"ق";s:4:"𞸓";s:2:"ر";s:4:"𞸔";s:2:"ش";s:4:"𞸕";s:2:"ت";s:4:"𞸖";s:2:"ث";s:4:"𞸗";s:2:"خ";s:4:"𞸘";s:2:"ذ";s:4:"𞸙";s:2:"ض";s:4:"𞸚";s:2:"ظ";s:4:"𞸛";s:2:"غ";s:4:"𞸜";s:2:"ٮ";s:4:"𞸝";s:2:"ں";s:4:"𞸞";s:2:"ڡ";s:4:"𞸟";s:2:"ٯ";s:4:"𞸡";s:2:"ب";s:4:"𞸢";s:2:"ج";s:4:"𞸤";s:2:"ه";s:4:"𞸧";s:2:"ح";s:4:"𞸩";s:2:"ي";s:4:"𞸪";s:2:"ك";s:4:"𞸫";s:2:"ل";s:4:"𞸬";s:2:"م";s:4:"𞸭";s:2:"ن";s:4:"𞸮";s:2:"س";s:4:"𞸯";s:2:"ع";s:4:"𞸰";s:2:"ف";s:4:"𞸱";s:2:"ص";s:4:"𞸲";s:2:"ق";s:4:"𞸴";s:2:"ش";s:4:"𞸵";s:2:"ت";s:4:"𞸶";s:2:"ث";s:4:"𞸷";s:2:"خ";s:4:"𞸹";s:2:"ض";s:4:"𞸻";s:2:"غ";s:4:"𞹂";s:2:"ج";s:4:"𞹇";s:2:"ح";s:4:"𞹉";s:2:"ي";s:4:"𞹋";s:2:"ل";s:4:"𞹍";s:2:"ن";s:4:"𞹎";s:2:"س";s:4:"𞹏";s:2:"ع";s:4:"𞹑";s:2:"ص";s:4:"𞹒";s:2:"ق";s:4:"𞹔";s:2:"ش";s:4:"𞹗";s:2:"خ";s:4:"𞹙";s:2:"ض";s:4:"𞹛";s:2:"غ";s:4:"𞹝";s:2:"ں";s:4:"𞹟";s:2:"ٯ";s:4:"𞹡";s:2:"ب";s:4:"𞹢";s:2:"ج";s:4:"𞹤";s:2:"ه";s:4:"𞹧";s:2:"ح";s:4:"𞹨";s:2:"ط";s:4:"𞹩";s:2:"ي";s:4:"𞹪";s:2:"ك";s:4:"𞹬";s:2:"م";s:4:"𞹭";s:2:"ن";s:4:"𞹮";s:2:"س";s:4:"𞹯";s:2:"ع";s:4:"𞹰";s:2:"ف";s:4:"𞹱";s:2:"ص";s:4:"𞹲";s:2:"ق";s:4:"𞹴";s:2:"ش";s:4:"𞹵";s:2:"ت";s:4:"𞹶";s:2:"ث";s:4:"𞹷";s:2:"خ";s:4:"𞹹";s:2:"ض";s:4:"𞹺";s:2:"ظ";s:4:"𞹻";s:2:"غ";s:4:"𞹼";s:2:"ٮ";s:4:"𞹾";s:2:"ڡ";s:4:"𞺀";s:2:"ا";s:4:"𞺁";s:2:"ب";s:4:"𞺂";s:2:"ج";s:4:"𞺃";s:2:"د";s:4:"𞺄";s:2:"ه";s:4:"𞺅";s:2:"و";s:4:"𞺆";s:2:"ز";s:4:"𞺇";s:2:"ح";s:4:"𞺈";s:2:"ط";s:4:"𞺉";s:2:"ي";s:4:"𞺋";s:2:"ل";s:4:"𞺌";s:2:"م";s:4:"𞺍";s:2:"ن";s:4:"𞺎";s:2:"س";s:4:"𞺏";s:2:"ع";s:4:"𞺐";s:2:"ف";s:4:"𞺑";s:2:"ص";s:4:"𞺒";s:2:"ق";s:4:"𞺓";s:2:"ر";s:4:"𞺔";s:2:"ش";s:4:"𞺕";s:2:"ت";s:4:"𞺖";s:2:"ث";s:4:"𞺗";s:2:"خ";s:4:"𞺘";s:2:"ذ";s:4:"𞺙";s:2:"ض";s:4:"𞺚";s:2:"ظ";s:4:"𞺛";s:2:"غ";s:4:"𞺡";s:2:"ب";s:4:"𞺢";s:2:"ج";s:4:"𞺣";s:2:"د";s:4:"𞺥";s:2:"و";s:4:"𞺦";s:2:"ز";s:4:"𞺧";s:2:"ح";s:4:"𞺨";s:2:"ط";s:4:"𞺩";s:2:"ي";s:4:"𞺫";s:2:"ل";s:4:"𞺬";s:2:"م";s:4:"𞺭";s:2:"ن";s:4:"𞺮";s:2:"س";s:4:"𞺯";s:2:"ع";s:4:"𞺰";s:2:"ف";s:4:"𞺱";s:2:"ص";s:4:"𞺲";s:2:"ق";s:4:"𞺳";s:2:"ر";s:4:"𞺴";s:2:"ش";s:4:"𞺵";s:2:"ت";s:4:"𞺶";s:2:"ث";s:4:"𞺷";s:2:"خ";s:4:"𞺸";s:2:"ذ";s:4:"𞺹";s:2:"ض";s:4:"𞺺";s:2:"ظ";s:4:"𞺻";s:2:"غ";s:4:"🄀";s:2:"0.";s:4:"🄁";s:2:"0,";s:4:"🄂";s:2:"1,";s:4:"🄃";s:2:"2,";s:4:"🄄";s:2:"3,";s:4:"🄅";s:2:"4,";s:4:"🄆";s:2:"5,";s:4:"🄇";s:2:"6,";s:4:"🄈";s:2:"7,";s:4:"🄉";s:2:"8,";s:4:"🄊";s:2:"9,";s:4:"🄐";s:3:"(A)";s:4:"🄑";s:3:"(B)";s:4:"🄒";s:3:"(C)";s:4:"🄓";s:3:"(D)";s:4:"🄔";s:3:"(E)";s:4:"🄕";s:3:"(F)";s:4:"🄖";s:3:"(G)";s:4:"🄗";s:3:"(H)";s:4:"🄘";s:3:"(I)";s:4:"🄙";s:3:"(J)";s:4:"🄚";s:3:"(K)";s:4:"🄛";s:3:"(L)";s:4:"🄜";s:3:"(M)";s:4:"🄝";s:3:"(N)";s:4:"🄞";s:3:"(O)";s:4:"🄟";s:3:"(P)";s:4:"🄠";s:3:"(Q)";s:4:"🄡";s:3:"(R)";s:4:"🄢";s:3:"(S)";s:4:"🄣";s:3:"(T)";s:4:"🄤";s:3:"(U)";s:4:"🄥";s:3:"(V)";s:4:"🄦";s:3:"(W)";s:4:"🄧";s:3:"(X)";s:4:"🄨";s:3:"(Y)";s:4:"🄩";s:3:"(Z)";s:4:"🄪";s:7:"〔S〕";s:4:"🄫";s:3:"(C)";s:4:"🄬";s:3:"(R)";s:4:"🄭";s:4:"(CD)";s:4:"🄮";s:4:"(WZ)";s:4:"🄰";s:1:"A";s:4:"🄱";s:1:"B";s:4:"🄲";s:1:"C";s:4:"🄳";s:1:"D";s:4:"🄴";s:1:"E";s:4:"🄵";s:1:"F";s:4:"🄶";s:1:"G";s:4:"🄷";s:1:"H";s:4:"🄸";s:1:"I";s:4:"🄹";s:1:"J";s:4:"🄺";s:1:"K";s:4:"🄻";s:1:"L";s:4:"🄼";s:1:"M";s:4:"🄽";s:1:"N";s:4:"🄾";s:1:"O";s:4:"🄿";s:1:"P";s:4:"🅀";s:1:"Q";s:4:"🅁";s:1:"R";s:4:"🅂";s:1:"S";s:4:"🅃";s:1:"T";s:4:"🅄";s:1:"U";s:4:"🅅";s:1:"V";s:4:"🅆";s:1:"W";s:4:"🅇";s:1:"X";s:4:"🅈";s:1:"Y";s:4:"🅉";s:1:"Z";s:4:"🅊";s:2:"HV";s:4:"🅋";s:2:"MV";s:4:"🅌";s:2:"SD";s:4:"🅍";s:2:"SS";s:4:"🅎";s:3:"PPV";s:4:"🅏";s:2:"WC";s:4:"🆐";s:2:"DJ";s:4:"🈀";s:6:"ほか";s:4:"🈁";s:6:"ココ";s:4:"🈂";s:3:"サ";s:4:"🈐";s:3:"手";s:4:"🈑";s:3:"字";s:4:"🈒";s:3:"双";s:4:"🈓";s:3:"デ";s:4:"🈔";s:3:"二";s:4:"🈕";s:3:"多";s:4:"🈖";s:3:"解";s:4:"🈗";s:3:"天";s:4:"🈘";s:3:"交";s:4:"🈙";s:3:"映";s:4:"🈚";s:3:"無";s:4:"🈛";s:3:"料";s:4:"🈜";s:3:"前";s:4:"🈝";s:3:"後";s:4:"🈞";s:3:"再";s:4:"🈟";s:3:"新";s:4:"🈠";s:3:"初";s:4:"🈡";s:3:"終";s:4:"🈢";s:3:"生";s:4:"🈣";s:3:"販";s:4:"🈤";s:3:"声";s:4:"🈥";s:3:"吹";s:4:"🈦";s:3:"演";s:4:"🈧";s:3:"投";s:4:"🈨";s:3:"捕";s:4:"🈩";s:3:"一";s:4:"🈪";s:3:"三";s:4:"🈫";s:3:"遊";s:4:"🈬";s:3:"左";s:4:"🈭";s:3:"中";s:4:"🈮";s:3:"右";s:4:"🈯";s:3:"指";s:4:"🈰";s:3:"走";s:4:"🈱";s:3:"打";s:4:"🈲";s:3:"禁";s:4:"🈳";s:3:"空";s:4:"🈴";s:3:"合";s:4:"🈵";s:3:"満";s:4:"🈶";s:3:"有";s:4:"🈷";s:3:"月";s:4:"🈸";s:3:"申";s:4:"🈹";s:3:"割";s:4:"🈺";s:3:"営";s:4:"🉀";s:9:"〔本〕";s:4:"🉁";s:9:"〔三〕";s:4:"🉂";s:9:"〔二〕";s:4:"🉃";s:9:"〔安〕";s:4:"🉄";s:9:"〔点〕";s:4:"🉅";s:9:"〔打〕";s:4:"🉆";s:9:"〔盗〕";s:4:"🉇";s:9:"〔勝〕";s:4:"🉈";s:9:"〔敗〕";s:4:"🉐";s:5:"(得)";s:4:"🉑";s:5:"(可)";s:4:"丽";s:3:"丽";s:4:"丸";s:3:"丸";s:4:"乁";s:3:"乁";s:4:"𠄢";s:4:"𠄢";s:4:"你";s:3:"你";s:4:"侮";s:3:"侮";s:4:"侻";s:3:"侻";s:4:"倂";s:3:"倂";s:4:"偺";s:3:"偺";s:4:"備";s:3:"備";s:4:"僧";s:3:"僧";s:4:"像";s:3:"像";s:4:"㒞";s:3:"㒞";s:4:"𠘺";s:4:"𠘺";s:4:"免";s:3:"免";s:4:"兔";s:3:"兔";s:4:"兤";s:3:"兤";s:4:"具";s:3:"具";s:4:"𠔜";s:4:"𠔜";s:4:"㒹";s:3:"㒹";s:4:"內";s:3:"內";s:4:"再";s:3:"再";s:4:"𠕋";s:4:"𠕋";s:4:"冗";s:3:"冗";s:4:"冤";s:3:"冤";s:4:"仌";s:3:"仌";s:4:"冬";s:3:"冬";s:4:"况";s:3:"况";s:4:"𩇟";s:4:"𩇟";s:4:"凵";s:3:"凵";s:4:"刃";s:3:"刃";s:4:"㓟";s:3:"㓟";s:4:"刻";s:3:"刻";s:4:"剆";s:3:"剆";s:4:"割";s:3:"割";s:4:"剷";s:3:"剷";s:4:"㔕";s:3:"㔕";s:4:"勇";s:3:"勇";s:4:"勉";s:3:"勉";s:4:"勤";s:3:"勤";s:4:"勺";s:3:"勺";s:4:"包";s:3:"包";s:4:"匆";s:3:"匆";s:4:"北";s:3:"北";s:4:"卉";s:3:"卉";s:4:"卑";s:3:"卑";s:4:"博";s:3:"博";s:4:"即";s:3:"即";s:4:"卽";s:3:"卽";s:4:"卿";s:3:"卿";s:4:"卿";s:3:"卿";s:4:"卿";s:3:"卿";s:4:"𠨬";s:4:"𠨬";s:4:"灰";s:3:"灰";s:4:"及";s:3:"及";s:4:"叟";s:3:"叟";s:4:"𠭣";s:4:"𠭣";s:4:"叫";s:3:"叫";s:4:"叱";s:3:"叱";s:4:"吆";s:3:"吆";s:4:"咞";s:3:"咞";s:4:"吸";s:3:"吸";s:4:"呈";s:3:"呈";s:4:"周";s:3:"周";s:4:"咢";s:3:"咢";s:4:"哶";s:3:"哶";s:4:"唐";s:3:"唐";s:4:"啓";s:3:"啓";s:4:"啣";s:3:"啣";s:4:"善";s:3:"善";s:4:"善";s:3:"善";s:4:"喙";s:3:"喙";s:4:"喫";s:3:"喫";s:4:"喳";s:3:"喳";s:4:"嗂";s:3:"嗂";s:4:"圖";s:3:"圖";s:4:"嘆";s:3:"嘆";s:4:"圗";s:3:"圗";s:4:"噑";s:3:"噑";s:4:"噴";s:3:"噴";s:4:"切";s:3:"切";s:4:"壮";s:3:"壮";s:4:"城";s:3:"城";s:4:"埴";s:3:"埴";s:4:"堍";s:3:"堍";s:4:"型";s:3:"型";s:4:"堲";s:3:"堲";s:4:"報";s:3:"報";s:4:"墬";s:3:"墬";s:4:"𡓤";s:4:"𡓤";s:4:"売";s:3:"売";s:4:"壷";s:3:"壷";s:4:"夆";s:3:"夆";s:4:"多";s:3:"多";s:4:"夢";s:3:"夢";s:4:"奢";s:3:"奢";s:4:"𡚨";s:4:"𡚨";s:4:"𡛪";s:4:"𡛪";s:4:"姬";s:3:"姬";s:4:"娛";s:3:"娛";s:4:"娧";s:3:"娧";s:4:"姘";s:3:"姘";s:4:"婦";s:3:"婦";s:4:"㛮";s:3:"㛮";s:4:"㛼";s:3:"㛼";s:4:"嬈";s:3:"嬈";s:4:"嬾";s:3:"嬾";s:4:"嬾";s:3:"嬾";s:4:"𡧈";s:4:"𡧈";s:4:"寃";s:3:"寃";s:4:"寘";s:3:"寘";s:4:"寧";s:3:"寧";s:4:"寳";s:3:"寳";s:4:"𡬘";s:4:"𡬘";s:4:"寿";s:3:"寿";s:4:"将";s:3:"将";s:4:"当";s:3:"当";s:4:"尢";s:3:"尢";s:4:"㞁";s:3:"㞁";s:4:"屠";s:3:"屠";s:4:"屮";s:3:"屮";s:4:"峀";s:3:"峀";s:4:"岍";s:3:"岍";s:4:"𡷤";s:4:"𡷤";s:4:"嵃";s:3:"嵃";s:4:"𡷦";s:4:"𡷦";s:4:"嵮";s:3:"嵮";s:4:"嵫";s:3:"嵫";s:4:"嵼";s:3:"嵼";s:4:"巡";s:3:"巡";s:4:"巢";s:3:"巢";s:4:"㠯";s:3:"㠯";s:4:"巽";s:3:"巽";s:4:"帨";s:3:"帨";s:4:"帽";s:3:"帽";s:4:"幩";s:3:"幩";s:4:"㡢";s:3:"㡢";s:4:"𢆃";s:4:"𢆃";s:4:"㡼";s:3:"㡼";s:4:"庰";s:3:"庰";s:4:"庳";s:3:"庳";s:4:"庶";s:3:"庶";s:4:"廊";s:3:"廊";s:4:"𪎒";s:4:"𪎒";s:4:"廾";s:3:"廾";s:4:"𢌱";s:4:"𢌱";s:4:"𢌱";s:4:"𢌱";s:4:"舁";s:3:"舁";s:4:"弢";s:3:"弢";s:4:"弢";s:3:"弢";s:4:"㣇";s:3:"㣇";s:4:"𣊸";s:4:"𣊸";s:4:"𦇚";s:4:"𦇚";s:4:"形";s:3:"形";s:4:"彫";s:3:"彫";s:4:"㣣";s:3:"㣣";s:4:"徚";s:3:"徚";s:4:"忍";s:3:"忍";s:4:"志";s:3:"志";s:4:"忹";s:3:"忹";s:4:"悁";s:3:"悁";s:4:"㤺";s:3:"㤺";s:4:"㤜";s:3:"㤜";s:4:"悔";s:3:"悔";s:4:"𢛔";s:4:"𢛔";s:4:"惇";s:3:"惇";s:4:"慈";s:3:"慈";s:4:"慌";s:3:"慌";s:4:"慎";s:3:"慎";s:4:"慌";s:3:"慌";s:4:"慺";s:3:"慺";s:4:"憎";s:3:"憎";s:4:"憲";s:3:"憲";s:4:"憤";s:3:"憤";s:4:"憯";s:3:"憯";s:4:"懞";s:3:"懞";s:4:"懲";s:3:"懲";s:4:"懶";s:3:"懶";s:4:"成";s:3:"成";s:4:"戛";s:3:"戛";s:4:"扝";s:3:"扝";s:4:"抱";s:3:"抱";s:4:"拔";s:3:"拔";s:4:"捐";s:3:"捐";s:4:"𢬌";s:4:"𢬌";s:4:"挽";s:3:"挽";s:4:"拼";s:3:"拼";s:4:"捨";s:3:"捨";s:4:"掃";s:3:"掃";s:4:"揤";s:3:"揤";s:4:"𢯱";s:4:"𢯱";s:4:"搢";s:3:"搢";s:4:"揅";s:3:"揅";s:4:"掩";s:3:"掩";s:4:"㨮";s:3:"㨮";s:4:"摩";s:3:"摩";s:4:"摾";s:3:"摾";s:4:"撝";s:3:"撝";s:4:"摷";s:3:"摷";s:4:"㩬";s:3:"㩬";s:4:"敏";s:3:"敏";s:4:"敬";s:3:"敬";s:4:"𣀊";s:4:"𣀊";s:4:"旣";s:3:"旣";s:4:"書";s:3:"書";s:4:"晉";s:3:"晉";s:4:"㬙";s:3:"㬙";s:4:"暑";s:3:"暑";s:4:"㬈";s:3:"㬈";s:4:"㫤";s:3:"㫤";s:4:"冒";s:3:"冒";s:4:"冕";s:3:"冕";s:4:"最";s:3:"最";s:4:"暜";s:3:"暜";s:4:"肭";s:3:"肭";s:4:"䏙";s:3:"䏙";s:4:"朗";s:3:"朗";s:4:"望";s:3:"望";s:4:"朡";s:3:"朡";s:4:"杞";s:3:"杞";s:4:"杓";s:3:"杓";s:4:"𣏃";s:4:"𣏃";s:4:"㭉";s:3:"㭉";s:4:"柺";s:3:"柺";s:4:"枅";s:3:"枅";s:4:"桒";s:3:"桒";s:4:"梅";s:3:"梅";s:4:"𣑭";s:4:"𣑭";s:4:"梎";s:3:"梎";s:4:"栟";s:3:"栟";s:4:"椔";s:3:"椔";s:4:"㮝";s:3:"㮝";s:4:"楂";s:3:"楂";s:4:"榣";s:3:"榣";s:4:"槪";s:3:"槪";s:4:"檨";s:3:"檨";s:4:"𣚣";s:4:"𣚣";s:4:"櫛";s:3:"櫛";s:4:"㰘";s:3:"㰘";s:4:"次";s:3:"次";s:4:"𣢧";s:4:"𣢧";s:4:"歔";s:3:"歔";s:4:"㱎";s:3:"㱎";s:4:"歲";s:3:"歲";s:4:"殟";s:3:"殟";s:4:"殺";s:3:"殺";s:4:"殻";s:3:"殻";s:4:"𣪍";s:4:"𣪍";s:4:"𡴋";s:4:"𡴋";s:4:"𣫺";s:4:"𣫺";s:4:"汎";s:3:"汎";s:4:"𣲼";s:4:"𣲼";s:4:"沿";s:3:"沿";s:4:"泍";s:3:"泍";s:4:"汧";s:3:"汧";s:4:"洖";s:3:"洖";s:4:"派";s:3:"派";s:4:"海";s:3:"海";s:4:"流";s:3:"流";s:4:"浩";s:3:"浩";s:4:"浸";s:3:"浸";s:4:"涅";s:3:"涅";s:4:"𣴞";s:4:"𣴞";s:4:"洴";s:3:"洴";s:4:"港";s:3:"港";s:4:"湮";s:3:"湮";s:4:"㴳";s:3:"㴳";s:4:"滋";s:3:"滋";s:4:"滇";s:3:"滇";s:4:"𣻑";s:4:"𣻑";s:4:"淹";s:3:"淹";s:4:"潮";s:3:"潮";s:4:"𣽞";s:4:"𣽞";s:4:"𣾎";s:4:"𣾎";s:4:"濆";s:3:"濆";s:4:"瀹";s:3:"瀹";s:4:"瀞";s:3:"瀞";s:4:"瀛";s:3:"瀛";s:4:"㶖";s:3:"㶖";s:4:"灊";s:3:"灊";s:4:"災";s:3:"災";s:4:"灷";s:3:"灷";s:4:"炭";s:3:"炭";s:4:"𠔥";s:4:"𠔥";s:4:"煅";s:3:"煅";s:4:"𤉣";s:4:"𤉣";s:4:"熜";s:3:"熜";s:4:"𤎫";s:4:"𤎫";s:4:"爨";s:3:"爨";s:4:"爵";s:3:"爵";s:4:"牐";s:3:"牐";s:4:"𤘈";s:4:"𤘈";s:4:"犀";s:3:"犀";s:4:"犕";s:3:"犕";s:4:"𤜵";s:4:"𤜵";s:4:"𤠔";s:4:"𤠔";s:4:"獺";s:3:"獺";s:4:"王";s:3:"王";s:4:"㺬";s:3:"㺬";s:4:"玥";s:3:"玥";s:4:"㺸";s:3:"㺸";s:4:"㺸";s:3:"㺸";s:4:"瑇";s:3:"瑇";s:4:"瑜";s:3:"瑜";s:4:"瑱";s:3:"瑱";s:4:"璅";s:3:"璅";s:4:"瓊";s:3:"瓊";s:4:"㼛";s:3:"㼛";s:4:"甤";s:3:"甤";s:4:"𤰶";s:4:"𤰶";s:4:"甾";s:3:"甾";s:4:"𤲒";s:4:"𤲒";s:4:"異";s:3:"異";s:4:"𢆟";s:4:"𢆟";s:4:"瘐";s:3:"瘐";s:4:"𤾡";s:4:"𤾡";s:4:"𤾸";s:4:"𤾸";s:4:"𥁄";s:4:"𥁄";s:4:"㿼";s:3:"㿼";s:4:"䀈";s:3:"䀈";s:4:"直";s:3:"直";s:4:"𥃳";s:4:"𥃳";s:4:"𥃲";s:4:"𥃲";s:4:"𥄙";s:4:"𥄙";s:4:"𥄳";s:4:"𥄳";s:4:"眞";s:3:"眞";s:4:"真";s:3:"真";s:4:"真";s:3:"真";s:4:"睊";s:3:"睊";s:4:"䀹";s:3:"䀹";s:4:"瞋";s:3:"瞋";s:4:"䁆";s:3:"䁆";s:4:"䂖";s:3:"䂖";s:4:"𥐝";s:4:"𥐝";s:4:"硎";s:3:"硎";s:4:"碌";s:3:"碌";s:4:"磌";s:3:"磌";s:4:"䃣";s:3:"䃣";s:4:"𥘦";s:4:"𥘦";s:4:"祖";s:3:"祖";s:4:"𥚚";s:4:"𥚚";s:4:"𥛅";s:4:"𥛅";s:4:"福";s:3:"福";s:4:"秫";s:3:"秫";s:4:"䄯";s:3:"䄯";s:4:"穀";s:3:"穀";s:4:"穊";s:3:"穊";s:4:"穏";s:3:"穏";s:4:"𥥼";s:4:"𥥼";s:4:"𥪧";s:4:"𥪧";s:4:"𥪧";s:4:"𥪧";s:4:"竮";s:3:"竮";s:4:"䈂";s:3:"䈂";s:4:"𥮫";s:4:"𥮫";s:4:"篆";s:3:"篆";s:4:"築";s:3:"築";s:4:"䈧";s:3:"䈧";s:4:"𥲀";s:4:"𥲀";s:4:"糒";s:3:"糒";s:4:"䊠";s:3:"䊠";s:4:"糨";s:3:"糨";s:4:"糣";s:3:"糣";s:4:"紀";s:3:"紀";s:4:"𥾆";s:4:"𥾆";s:4:"絣";s:3:"絣";s:4:"䌁";s:3:"䌁";s:4:"緇";s:3:"緇";s:4:"縂";s:3:"縂";s:4:"繅";s:3:"繅";s:4:"䌴";s:3:"䌴";s:4:"𦈨";s:4:"𦈨";s:4:"𦉇";s:4:"𦉇";s:4:"䍙";s:3:"䍙";s:4:"𦋙";s:4:"𦋙";s:4:"罺";s:3:"罺";s:4:"𦌾";s:4:"𦌾";s:4:"羕";s:3:"羕";s:4:"翺";s:3:"翺";s:4:"者";s:3:"者";s:4:"𦓚";s:4:"𦓚";s:4:"𦔣";s:4:"𦔣";s:4:"聠";s:3:"聠";s:4:"𦖨";s:4:"𦖨";s:4:"聰";s:3:"聰";s:4:"𣍟";s:4:"𣍟";s:4:"䏕";s:3:"䏕";s:4:"育";s:3:"育";s:4:"脃";s:3:"脃";s:4:"䐋";s:3:"䐋";s:4:"脾";s:3:"脾";s:4:"媵";s:3:"媵";s:4:"𦞧";s:4:"𦞧";s:4:"𦞵";s:4:"𦞵";s:4:"𣎓";s:4:"𣎓";s:4:"𣎜";s:4:"𣎜";s:4:"舁";s:3:"舁";s:4:"舄";s:3:"舄";s:4:"辞";s:3:"辞";s:4:"䑫";s:3:"䑫";s:4:"芑";s:3:"芑";s:4:"芋";s:3:"芋";s:4:"芝";s:3:"芝";s:4:"劳";s:3:"劳";s:4:"花";s:3:"花";s:4:"芳";s:3:"芳";s:4:"芽";s:3:"芽";s:4:"苦";s:3:"苦";s:4:"𦬼";s:4:"𦬼";s:4:"若";s:3:"若";s:4:"茝";s:3:"茝";s:4:"荣";s:3:"荣";s:4:"莭";s:3:"莭";s:4:"茣";s:3:"茣";s:4:"莽";s:3:"莽";s:4:"菧";s:3:"菧";s:4:"著";s:3:"著";s:4:"荓";s:3:"荓";s:4:"菊";s:3:"菊";s:4:"菌";s:3:"菌";s:4:"菜";s:3:"菜";s:4:"𦰶";s:4:"𦰶";s:4:"𦵫";s:4:"𦵫";s:4:"𦳕";s:4:"𦳕";s:4:"䔫";s:3:"䔫";s:4:"蓱";s:3:"蓱";s:4:"蓳";s:3:"蓳";s:4:"蔖";s:3:"蔖";s:4:"𧏊";s:4:"𧏊";s:4:"蕤";s:3:"蕤";s:4:"𦼬";s:4:"𦼬";s:4:"䕝";s:3:"䕝";s:4:"䕡";s:3:"䕡";s:4:"𦾱";s:4:"𦾱";s:4:"𧃒";s:4:"𧃒";s:4:"䕫";s:3:"䕫";s:4:"虐";s:3:"虐";s:4:"虜";s:3:"虜";s:4:"虧";s:3:"虧";s:4:"虩";s:3:"虩";s:4:"蚩";s:3:"蚩";s:4:"蚈";s:3:"蚈";s:4:"蜎";s:3:"蜎";s:4:"蛢";s:3:"蛢";s:4:"蝹";s:3:"蝹";s:4:"蜨";s:3:"蜨";s:4:"蝫";s:3:"蝫";s:4:"螆";s:3:"螆";s:4:"䗗";s:3:"䗗";s:4:"蟡";s:3:"蟡";s:4:"蠁";s:3:"蠁";s:4:"䗹";s:3:"䗹";s:4:"衠";s:3:"衠";s:4:"衣";s:3:"衣";s:4:"𧙧";s:4:"𧙧";s:4:"裗";s:3:"裗";s:4:"裞";s:3:"裞";s:4:"䘵";s:3:"䘵";s:4:"裺";s:3:"裺";s:4:"㒻";s:3:"㒻";s:4:"𧢮";s:4:"𧢮";s:4:"𧥦";s:4:"𧥦";s:4:"䚾";s:3:"䚾";s:4:"䛇";s:3:"䛇";s:4:"誠";s:3:"誠";s:4:"諭";s:3:"諭";s:4:"變";s:3:"變";s:4:"豕";s:3:"豕";s:4:"𧲨";s:4:"𧲨";s:4:"貫";s:3:"貫";s:4:"賁";s:3:"賁";s:4:"贛";s:3:"贛";s:4:"起";s:3:"起";s:4:"𧼯";s:4:"𧼯";s:4:"𠠄";s:4:"𠠄";s:4:"跋";s:3:"跋";s:4:"趼";s:3:"趼";s:4:"跰";s:3:"跰";s:4:"𠣞";s:4:"𠣞";s:4:"軔";s:3:"軔";s:4:"輸";s:3:"輸";s:4:"𨗒";s:4:"𨗒";s:4:"𨗭";s:4:"𨗭";s:4:"邔";s:3:"邔";s:4:"郱";s:3:"郱";s:4:"鄑";s:3:"鄑";s:4:"𨜮";s:4:"𨜮";s:4:"鄛";s:3:"鄛";s:4:"鈸";s:3:"鈸";s:4:"鋗";s:3:"鋗";s:4:"鋘";s:3:"鋘";s:4:"鉼";s:3:"鉼";s:4:"鏹";s:3:"鏹";s:4:"鐕";s:3:"鐕";s:4:"𨯺";s:4:"𨯺";s:4:"開";s:3:"開";s:4:"䦕";s:3:"䦕";s:4:"閷";s:3:"閷";s:4:"𨵷";s:4:"𨵷";s:4:"䧦";s:3:"䧦";s:4:"雃";s:3:"雃";s:4:"嶲";s:3:"嶲";s:4:"霣";s:3:"霣";s:4:"𩅅";s:4:"𩅅";s:4:"𩈚";s:4:"𩈚";s:4:"䩮";s:3:"䩮";s:4:"䩶";s:3:"䩶";s:4:"韠";s:3:"韠";s:4:"𩐊";s:4:"𩐊";s:4:"䪲";s:3:"䪲";s:4:"𩒖";s:4:"𩒖";s:4:"頋";s:3:"頋";s:4:"頋";s:3:"頋";s:4:"頩";s:3:"頩";s:4:"𩖶";s:4:"𩖶";s:4:"飢";s:3:"飢";s:4:"䬳";s:3:"䬳";s:4:"餩";s:3:"餩";s:4:"馧";s:3:"馧";s:4:"駂";s:3:"駂";s:4:"駾";s:3:"駾";s:4:"䯎";s:3:"䯎";s:4:"𩬰";s:4:"𩬰";s:4:"鬒";s:3:"鬒";s:4:"鱀";s:3:"鱀";s:4:"鳽";s:3:"鳽";s:4:"䳎";s:3:"䳎";s:4:"䳭";s:3:"䳭";s:4:"鵧";s:3:"鵧";s:4:"𪃎";s:4:"𪃎";s:4:"䳸";s:3:"䳸";s:4:"𪄅";s:4:"𪄅";s:4:"𪈎";s:4:"𪈎";s:4:"𪊑";s:4:"𪊑";s:4:"麻";s:3:"麻";s:4:"䵖";s:3:"䵖";s:4:"黹";s:3:"黹";s:4:"黾";s:3:"黾";s:4:"鼅";s:3:"鼅";s:4:"鼏";s:3:"鼏";s:4:"鼖";s:3:"鼖";s:4:"鼻";s:3:"鼻";s:4:"𪘀";s:4:"𪘀";s:2:"Æ";s:2:"AE";s:2:"Ð";s:1:"D";s:2:"Ø";s:1:"O";s:2:"Þ";s:2:"TH";s:2:"ß";s:2:"ss";s:2:"æ";s:2:"ae";s:2:"ð";s:1:"d";s:2:"ø";s:1:"o";s:2:"þ";s:2:"th";s:2:"Đ";s:1:"D";s:2:"đ";s:1:"d";s:2:"Ħ";s:1:"H";s:2:"ħ";s:1:"h";s:2:"ı";s:1:"i";s:2:"ĸ";s:1:"q";s:2:"Ł";s:1:"L";s:2:"ł";s:1:"l";s:2:"Ŋ";s:1:"N";s:2:"ŋ";s:1:"n";s:2:"Œ";s:2:"OE";s:2:"œ";s:2:"oe";s:2:"Ŧ";s:1:"T";s:2:"ŧ";s:1:"t";s:2:"ƀ";s:1:"b";s:2:"Ɓ";s:1:"B";s:2:"Ƃ";s:1:"B";s:2:"ƃ";s:1:"b";s:2:"Ƈ";s:1:"C";s:2:"ƈ";s:1:"c";s:2:"Ɖ";s:1:"D";s:2:"Ɗ";s:1:"D";s:2:"Ƌ";s:1:"D";s:2:"ƌ";s:1:"d";s:2:"Ɛ";s:1:"E";s:2:"Ƒ";s:1:"F";s:2:"ƒ";s:1:"f";s:2:"Ɠ";s:1:"G";s:2:"ƕ";s:2:"hv";s:2:"Ɩ";s:1:"I";s:2:"Ɨ";s:1:"I";s:2:"Ƙ";s:1:"K";s:2:"ƙ";s:1:"k";s:2:"ƚ";s:1:"l";s:2:"Ɲ";s:1:"N";s:2:"ƞ";s:1:"n";s:2:"Ƣ";s:2:"OI";s:2:"ƣ";s:2:"oi";s:2:"Ƥ";s:1:"P";s:2:"ƥ";s:1:"p";s:2:"ƫ";s:1:"t";s:2:"Ƭ";s:1:"T";s:2:"ƭ";s:1:"t";s:2:"Ʈ";s:1:"T";s:2:"Ʋ";s:1:"V";s:2:"Ƴ";s:1:"Y";s:2:"ƴ";s:1:"y";s:2:"Ƶ";s:1:"Z";s:2:"ƶ";s:1:"z";s:2:"Ǥ";s:1:"G";s:2:"ǥ";s:1:"g";s:2:"ȡ";s:1:"d";s:2:"Ȥ";s:1:"Z";s:2:"ȥ";s:1:"z";s:2:"ȴ";s:1:"l";s:2:"ȵ";s:1:"n";s:2:"ȶ";s:1:"t";s:2:"ȷ";s:1:"j";s:2:"ȸ";s:2:"db";s:2:"ȹ";s:2:"qp";s:2:"Ⱥ";s:1:"A";s:2:"Ȼ";s:1:"C";s:2:"ȼ";s:1:"c";s:2:"Ƚ";s:1:"L";s:2:"Ⱦ";s:1:"T";s:2:"ȿ";s:1:"s";s:2:"ɀ";s:1:"z";s:2:"Ƀ";s:1:"B";s:2:"Ʉ";s:1:"U";s:2:"Ɇ";s:1:"E";s:2:"ɇ";s:1:"e";s:2:"Ɉ";s:1:"J";s:2:"ɉ";s:1:"j";s:2:"Ɍ";s:1:"R";s:2:"ɍ";s:1:"r";s:2:"Ɏ";s:1:"Y";s:2:"ɏ";s:1:"y";s:2:"ɓ";s:1:"b";s:2:"ɕ";s:1:"c";s:2:"ɖ";s:1:"d";s:2:"ɗ";s:1:"d";s:2:"ɛ";s:1:"e";s:2:"ɟ";s:1:"j";s:2:"ɠ";s:1:"g";s:2:"ɡ";s:1:"g";s:2:"ɢ";s:1:"G";s:2:"ɦ";s:1:"h";s:2:"ɧ";s:1:"h";s:2:"ɨ";s:1:"i";s:2:"ɪ";s:1:"I";s:2:"ɫ";s:1:"l";s:2:"ɬ";s:1:"l";s:2:"ɭ";s:1:"l";s:2:"ɱ";s:1:"m";s:2:"ɲ";s:1:"n";s:2:"ɳ";s:1:"n";s:2:"ɴ";s:1:"N";s:2:"ɶ";s:2:"OE";s:2:"ɼ";s:1:"r";s:2:"ɽ";s:1:"r";s:2:"ɾ";s:1:"r";s:2:"ʀ";s:1:"R";s:2:"ʂ";s:1:"s";s:2:"ʈ";s:1:"t";s:2:"ʉ";s:1:"u";s:2:"ʋ";s:1:"v";s:2:"ʏ";s:1:"Y";s:2:"ʐ";s:1:"z";s:2:"ʑ";s:1:"z";s:2:"ʙ";s:1:"B";s:2:"ʛ";s:1:"G";s:2:"ʜ";s:1:"H";s:2:"ʝ";s:1:"j";s:2:"ʟ";s:1:"L";s:2:"ʠ";s:1:"q";s:2:"ʣ";s:2:"dz";s:2:"ʥ";s:2:"dz";s:2:"ʦ";s:2:"ts";s:2:"ʪ";s:2:"ls";s:2:"ʫ";s:2:"lz";s:3:"ᴀ";s:1:"A";s:3:"ᴁ";s:2:"AE";s:3:"ᴃ";s:1:"B";s:3:"ᴄ";s:1:"C";s:3:"ᴅ";s:1:"D";s:3:"ᴆ";s:1:"D";s:3:"ᴇ";s:1:"E";s:3:"ᴊ";s:1:"J";s:3:"ᴋ";s:1:"K";s:3:"ᴌ";s:1:"L";s:3:"ᴍ";s:1:"M";s:3:"ᴏ";s:1:"O";s:3:"ᴘ";s:1:"P";s:3:"ᴛ";s:1:"T";s:3:"ᴜ";s:1:"U";s:3:"ᴠ";s:1:"V";s:3:"ᴡ";s:1:"W";s:3:"ᴢ";s:1:"Z";s:3:"ᵫ";s:2:"ue";s:3:"ᵬ";s:1:"b";s:3:"ᵭ";s:1:"d";s:3:"ᵮ";s:1:"f";s:3:"ᵯ";s:1:"m";s:3:"ᵰ";s:1:"n";s:3:"ᵱ";s:1:"p";s:3:"ᵲ";s:1:"r";s:3:"ᵳ";s:1:"r";s:3:"ᵴ";s:1:"s";s:3:"ᵵ";s:1:"t";s:3:"ᵶ";s:1:"z";s:3:"ᵺ";s:2:"th";s:3:"ᵻ";s:1:"I";s:3:"ᵽ";s:1:"p";s:3:"ᵾ";s:1:"U";s:3:"ᶀ";s:1:"b";s:3:"ᶁ";s:1:"d";s:3:"ᶂ";s:1:"f";s:3:"ᶃ";s:1:"g";s:3:"ᶄ";s:1:"k";s:3:"ᶅ";s:1:"l";s:3:"ᶆ";s:1:"m";s:3:"ᶇ";s:1:"n";s:3:"ᶈ";s:1:"p";s:3:"ᶉ";s:1:"r";s:3:"ᶊ";s:1:"s";s:3:"ᶌ";s:1:"v";s:3:"ᶍ";s:1:"x";s:3:"ᶎ";s:1:"z";s:3:"ᶏ";s:1:"a";s:3:"ᶑ";s:1:"d";s:3:"ᶒ";s:1:"e";s:3:"ᶓ";s:1:"e";s:3:"ᶖ";s:1:"i";s:3:"ᶙ";s:1:"u";s:3:"ẜ";s:1:"s";s:3:"ẝ";s:1:"s";s:3:"ẞ";s:2:"SS";s:3:"Ỻ";s:2:"LL";s:3:"ỻ";s:2:"ll";s:3:"Ỽ";s:1:"V";s:3:"ỽ";s:1:"v";s:3:"Ỿ";s:1:"Y";s:3:"ỿ";s:1:"y";s:2:"©";s:3:"(C)";s:2:"®";s:3:"(R)";s:3:"₠";s:2:"CE";s:3:"₢";s:2:"Cr";s:3:"₣";s:3:"Fr.";s:3:"₤";s:2:"L.";s:3:"₧";s:3:"Pts";s:3:"₹";s:2:"Rs";s:3:"℞";s:2:"Rx";s:3:"〇";s:1:"0";s:3:"‘";s:1:"'";s:3:"’";s:1:"'";s:3:"‚";s:1:",";s:3:"‛";s:1:"'";s:3:"“";s:1:""";s:3:"”";s:1:""";s:3:"„";s:2:",,";s:3:"‟";s:1:""";s:3:"′";s:1:"'";s:3:"〝";s:1:""";s:3:"〞";s:1:""";s:2:"«";s:2:"<<";s:2:"»";s:2:">>";s:3:"‹";s:1:"<";s:3:"›";s:1:">";s:3:"‐";s:1:"-";s:3:"‑";s:1:"-";s:3:"‒";s:1:"-";s:3:"–";s:1:"-";s:3:"—";s:1:"-";s:3:"―";s:1:"-";s:3:"︱";s:1:"-";s:3:"︲";s:1:"-";s:3:"‖";s:2:"||";s:3:"⁄";s:1:"/";s:3:"⁅";s:1:"[";s:3:"⁆";s:1:"]";s:3:"⁎";s:1:"*";s:3:"、";s:1:",";s:3:"。";s:1:".";s:3:"〈";s:1:"<";s:3:"〉";s:1:">";s:3:"《";s:2:"<<";s:3:"》";s:2:">>";s:3:"〔";s:1:"[";s:3:"〕";s:1:"]";s:3:"〘";s:1:"[";s:3:"〙";s:1:"]";s:3:"〚";s:1:"[";s:3:"〛";s:1:"]";s:3:"︐";s:1:",";s:3:"︑";s:1:",";s:3:"︒";s:1:".";s:3:"︓";s:1:":";s:3:"︔";s:1:";";s:3:"︕";s:1:"!";s:3:"︖";s:1:"?";s:3:"︙";s:3:"...";s:3:"︰";s:2:"..";s:3:"︵";s:1:"(";s:3:"︶";s:1:")";s:3:"︷";s:1:"{";s:3:"︸";s:1:"}";s:3:"︹";s:1:"[";s:3:"︺";s:1:"]";s:3:"︽";s:2:"<<";s:3:"︾";s:2:">>";s:3:"︿";s:1:"<";s:3:"﹀";s:1:">";s:3:"﹇";s:1:"[";s:3:"﹈";s:1:"]";s:2:"×";s:1:"*";s:2:"÷";s:1:"/";s:3:"−";s:1:"-";s:3:"∕";s:1:"/";s:3:"∖";s:1:"\";s:3:"∣";s:1:"|";s:3:"∥";s:2:"||";s:3:"≪";s:2:"<<";s:3:"≫";s:2:">>";s:3:"⦅";s:2:"((";s:3:"⦆";s:2:"))";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalComposition.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalComposition.ser deleted file mode 100644 index e75cfcfe..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalComposition.ser +++ /dev/null @@ -1 +0,0 @@ -a:933:{s:3:"À";s:2:"À";s:3:"Á";s:2:"Á";s:3:"Â";s:2:"Â";s:3:"Ã";s:2:"Ã";s:3:"Ä";s:2:"Ä";s:3:"Å";s:2:"Å";s:3:"Ç";s:2:"Ç";s:3:"È";s:2:"È";s:3:"É";s:2:"É";s:3:"Ê";s:2:"Ê";s:3:"Ë";s:2:"Ë";s:3:"Ì";s:2:"Ì";s:3:"Í";s:2:"Í";s:3:"Î";s:2:"Î";s:3:"Ï";s:2:"Ï";s:3:"Ñ";s:2:"Ñ";s:3:"Ò";s:2:"Ò";s:3:"Ó";s:2:"Ó";s:3:"Ô";s:2:"Ô";s:3:"Õ";s:2:"Õ";s:3:"Ö";s:2:"Ö";s:3:"Ù";s:2:"Ù";s:3:"Ú";s:2:"Ú";s:3:"Û";s:2:"Û";s:3:"Ü";s:2:"Ü";s:3:"Ý";s:2:"Ý";s:3:"à";s:2:"à";s:3:"á";s:2:"á";s:3:"â";s:2:"â";s:3:"ã";s:2:"ã";s:3:"ä";s:2:"ä";s:3:"å";s:2:"å";s:3:"ç";s:2:"ç";s:3:"è";s:2:"è";s:3:"é";s:2:"é";s:3:"ê";s:2:"ê";s:3:"ë";s:2:"ë";s:3:"ì";s:2:"ì";s:3:"í";s:2:"í";s:3:"î";s:2:"î";s:3:"ï";s:2:"ï";s:3:"ñ";s:2:"ñ";s:3:"ò";s:2:"ò";s:3:"ó";s:2:"ó";s:3:"ô";s:2:"ô";s:3:"õ";s:2:"õ";s:3:"ö";s:2:"ö";s:3:"ù";s:2:"ù";s:3:"ú";s:2:"ú";s:3:"û";s:2:"û";s:3:"ü";s:2:"ü";s:3:"ý";s:2:"ý";s:3:"ÿ";s:2:"ÿ";s:3:"Ā";s:2:"Ā";s:3:"ā";s:2:"ā";s:3:"Ă";s:2:"Ă";s:3:"ă";s:2:"ă";s:3:"Ą";s:2:"Ą";s:3:"ą";s:2:"ą";s:3:"Ć";s:2:"Ć";s:3:"ć";s:2:"ć";s:3:"Ĉ";s:2:"Ĉ";s:3:"ĉ";s:2:"ĉ";s:3:"Ċ";s:2:"Ċ";s:3:"ċ";s:2:"ċ";s:3:"Č";s:2:"Č";s:3:"č";s:2:"č";s:3:"Ď";s:2:"Ď";s:3:"ď";s:2:"ď";s:3:"Ē";s:2:"Ē";s:3:"ē";s:2:"ē";s:3:"Ĕ";s:2:"Ĕ";s:3:"ĕ";s:2:"ĕ";s:3:"Ė";s:2:"Ė";s:3:"ė";s:2:"ė";s:3:"Ę";s:2:"Ę";s:3:"ę";s:2:"ę";s:3:"Ě";s:2:"Ě";s:3:"ě";s:2:"ě";s:3:"Ĝ";s:2:"Ĝ";s:3:"ĝ";s:2:"ĝ";s:3:"Ğ";s:2:"Ğ";s:3:"ğ";s:2:"ğ";s:3:"Ġ";s:2:"Ġ";s:3:"ġ";s:2:"ġ";s:3:"Ģ";s:2:"Ģ";s:3:"ģ";s:2:"ģ";s:3:"Ĥ";s:2:"Ĥ";s:3:"ĥ";s:2:"ĥ";s:3:"Ĩ";s:2:"Ĩ";s:3:"ĩ";s:2:"ĩ";s:3:"Ī";s:2:"Ī";s:3:"ī";s:2:"ī";s:3:"Ĭ";s:2:"Ĭ";s:3:"ĭ";s:2:"ĭ";s:3:"Į";s:2:"Į";s:3:"į";s:2:"į";s:3:"İ";s:2:"İ";s:3:"Ĵ";s:2:"Ĵ";s:3:"ĵ";s:2:"ĵ";s:3:"Ķ";s:2:"Ķ";s:3:"ķ";s:2:"ķ";s:3:"Ĺ";s:2:"Ĺ";s:3:"ĺ";s:2:"ĺ";s:3:"Ļ";s:2:"Ļ";s:3:"ļ";s:2:"ļ";s:3:"Ľ";s:2:"Ľ";s:3:"ľ";s:2:"ľ";s:3:"Ń";s:2:"Ń";s:3:"ń";s:2:"ń";s:3:"Ņ";s:2:"Ņ";s:3:"ņ";s:2:"ņ";s:3:"Ň";s:2:"Ň";s:3:"ň";s:2:"ň";s:3:"Ō";s:2:"Ō";s:3:"ō";s:2:"ō";s:3:"Ŏ";s:2:"Ŏ";s:3:"ŏ";s:2:"ŏ";s:3:"Ő";s:2:"Ő";s:3:"ő";s:2:"ő";s:3:"Ŕ";s:2:"Ŕ";s:3:"ŕ";s:2:"ŕ";s:3:"Ŗ";s:2:"Ŗ";s:3:"ŗ";s:2:"ŗ";s:3:"Ř";s:2:"Ř";s:3:"ř";s:2:"ř";s:3:"Ś";s:2:"Ś";s:3:"ś";s:2:"ś";s:3:"Ŝ";s:2:"Ŝ";s:3:"ŝ";s:2:"ŝ";s:3:"Ş";s:2:"Ş";s:3:"ş";s:2:"ş";s:3:"Š";s:2:"Š";s:3:"š";s:2:"š";s:3:"Ţ";s:2:"Ţ";s:3:"ţ";s:2:"ţ";s:3:"Ť";s:2:"Ť";s:3:"ť";s:2:"ť";s:3:"Ũ";s:2:"Ũ";s:3:"ũ";s:2:"ũ";s:3:"Ū";s:2:"Ū";s:3:"ū";s:2:"ū";s:3:"Ŭ";s:2:"Ŭ";s:3:"ŭ";s:2:"ŭ";s:3:"Ů";s:2:"Ů";s:3:"ů";s:2:"ů";s:3:"Ű";s:2:"Ű";s:3:"ű";s:2:"ű";s:3:"Ų";s:2:"Ų";s:3:"ų";s:2:"ų";s:3:"Ŵ";s:2:"Ŵ";s:3:"ŵ";s:2:"ŵ";s:3:"Ŷ";s:2:"Ŷ";s:3:"ŷ";s:2:"ŷ";s:3:"Ÿ";s:2:"Ÿ";s:3:"Ź";s:2:"Ź";s:3:"ź";s:2:"ź";s:3:"Ż";s:2:"Ż";s:3:"ż";s:2:"ż";s:3:"Ž";s:2:"Ž";s:3:"ž";s:2:"ž";s:3:"Ơ";s:2:"Ơ";s:3:"ơ";s:2:"ơ";s:3:"Ư";s:2:"Ư";s:3:"ư";s:2:"ư";s:3:"Ǎ";s:2:"Ǎ";s:3:"ǎ";s:2:"ǎ";s:3:"Ǐ";s:2:"Ǐ";s:3:"ǐ";s:2:"ǐ";s:3:"Ǒ";s:2:"Ǒ";s:3:"ǒ";s:2:"ǒ";s:3:"Ǔ";s:2:"Ǔ";s:3:"ǔ";s:2:"ǔ";s:4:"Ǖ";s:2:"Ǖ";s:4:"ǖ";s:2:"ǖ";s:4:"Ǘ";s:2:"Ǘ";s:4:"ǘ";s:2:"ǘ";s:4:"Ǚ";s:2:"Ǚ";s:4:"ǚ";s:2:"ǚ";s:4:"Ǜ";s:2:"Ǜ";s:4:"ǜ";s:2:"ǜ";s:4:"Ǟ";s:2:"Ǟ";s:4:"ǟ";s:2:"ǟ";s:4:"Ǡ";s:2:"Ǡ";s:4:"ǡ";s:2:"ǡ";s:4:"Ǣ";s:2:"Ǣ";s:4:"ǣ";s:2:"ǣ";s:3:"Ǧ";s:2:"Ǧ";s:3:"ǧ";s:2:"ǧ";s:3:"Ǩ";s:2:"Ǩ";s:3:"ǩ";s:2:"ǩ";s:3:"Ǫ";s:2:"Ǫ";s:3:"ǫ";s:2:"ǫ";s:4:"Ǭ";s:2:"Ǭ";s:4:"ǭ";s:2:"ǭ";s:4:"Ǯ";s:2:"Ǯ";s:4:"ǯ";s:2:"ǯ";s:3:"ǰ";s:2:"ǰ";s:3:"Ǵ";s:2:"Ǵ";s:3:"ǵ";s:2:"ǵ";s:3:"Ǹ";s:2:"Ǹ";s:3:"ǹ";s:2:"ǹ";s:4:"Ǻ";s:2:"Ǻ";s:4:"ǻ";s:2:"ǻ";s:4:"Ǽ";s:2:"Ǽ";s:4:"ǽ";s:2:"ǽ";s:4:"Ǿ";s:2:"Ǿ";s:4:"ǿ";s:2:"ǿ";s:3:"Ȁ";s:2:"Ȁ";s:3:"ȁ";s:2:"ȁ";s:3:"Ȃ";s:2:"Ȃ";s:3:"ȃ";s:2:"ȃ";s:3:"Ȅ";s:2:"Ȅ";s:3:"ȅ";s:2:"ȅ";s:3:"Ȇ";s:2:"Ȇ";s:3:"ȇ";s:2:"ȇ";s:3:"Ȉ";s:2:"Ȉ";s:3:"ȉ";s:2:"ȉ";s:3:"Ȋ";s:2:"Ȋ";s:3:"ȋ";s:2:"ȋ";s:3:"Ȍ";s:2:"Ȍ";s:3:"ȍ";s:2:"ȍ";s:3:"Ȏ";s:2:"Ȏ";s:3:"ȏ";s:2:"ȏ";s:3:"Ȑ";s:2:"Ȑ";s:3:"ȑ";s:2:"ȑ";s:3:"Ȓ";s:2:"Ȓ";s:3:"ȓ";s:2:"ȓ";s:3:"Ȕ";s:2:"Ȕ";s:3:"ȕ";s:2:"ȕ";s:3:"Ȗ";s:2:"Ȗ";s:3:"ȗ";s:2:"ȗ";s:3:"Ș";s:2:"Ș";s:3:"ș";s:2:"ș";s:3:"Ț";s:2:"Ț";s:3:"ț";s:2:"ț";s:3:"Ȟ";s:2:"Ȟ";s:3:"ȟ";s:2:"ȟ";s:3:"Ȧ";s:2:"Ȧ";s:3:"ȧ";s:2:"ȧ";s:3:"Ȩ";s:2:"Ȩ";s:3:"ȩ";s:2:"ȩ";s:4:"Ȫ";s:2:"Ȫ";s:4:"ȫ";s:2:"ȫ";s:4:"Ȭ";s:2:"Ȭ";s:4:"ȭ";s:2:"ȭ";s:3:"Ȯ";s:2:"Ȯ";s:3:"ȯ";s:2:"ȯ";s:4:"Ȱ";s:2:"Ȱ";s:4:"ȱ";s:2:"ȱ";s:3:"Ȳ";s:2:"Ȳ";s:3:"ȳ";s:2:"ȳ";s:4:"΅";s:2:"΅";s:4:"Ά";s:2:"Ά";s:4:"Έ";s:2:"Έ";s:4:"Ή";s:2:"Ή";s:4:"Ί";s:2:"Ί";s:4:"Ό";s:2:"Ό";s:4:"Ύ";s:2:"Ύ";s:4:"Ώ";s:2:"Ώ";s:4:"ΐ";s:2:"ΐ";s:4:"Ϊ";s:2:"Ϊ";s:4:"Ϋ";s:2:"Ϋ";s:4:"ά";s:2:"ά";s:4:"έ";s:2:"έ";s:4:"ή";s:2:"ή";s:4:"ί";s:2:"ί";s:4:"ΰ";s:2:"ΰ";s:4:"ϊ";s:2:"ϊ";s:4:"ϋ";s:2:"ϋ";s:4:"ό";s:2:"ό";s:4:"ύ";s:2:"ύ";s:4:"ώ";s:2:"ώ";s:4:"ϓ";s:2:"ϓ";s:4:"ϔ";s:2:"ϔ";s:4:"Ѐ";s:2:"Ѐ";s:4:"Ё";s:2:"Ё";s:4:"Ѓ";s:2:"Ѓ";s:4:"Ї";s:2:"Ї";s:4:"Ќ";s:2:"Ќ";s:4:"Ѝ";s:2:"Ѝ";s:4:"Ў";s:2:"Ў";s:4:"Й";s:2:"Й";s:4:"й";s:2:"й";s:4:"ѐ";s:2:"ѐ";s:4:"ё";s:2:"ё";s:4:"ѓ";s:2:"ѓ";s:4:"ї";s:2:"ї";s:4:"ќ";s:2:"ќ";s:4:"ѝ";s:2:"ѝ";s:4:"ў";s:2:"ў";s:4:"Ѷ";s:2:"Ѷ";s:4:"ѷ";s:2:"ѷ";s:4:"Ӂ";s:2:"Ӂ";s:4:"ӂ";s:2:"ӂ";s:4:"Ӑ";s:2:"Ӑ";s:4:"ӑ";s:2:"ӑ";s:4:"Ӓ";s:2:"Ӓ";s:4:"ӓ";s:2:"ӓ";s:4:"Ӗ";s:2:"Ӗ";s:4:"ӗ";s:2:"ӗ";s:4:"Ӛ";s:2:"Ӛ";s:4:"ӛ";s:2:"ӛ";s:4:"Ӝ";s:2:"Ӝ";s:4:"ӝ";s:2:"ӝ";s:4:"Ӟ";s:2:"Ӟ";s:4:"ӟ";s:2:"ӟ";s:4:"Ӣ";s:2:"Ӣ";s:4:"ӣ";s:2:"ӣ";s:4:"Ӥ";s:2:"Ӥ";s:4:"ӥ";s:2:"ӥ";s:4:"Ӧ";s:2:"Ӧ";s:4:"ӧ";s:2:"ӧ";s:4:"Ӫ";s:2:"Ӫ";s:4:"ӫ";s:2:"ӫ";s:4:"Ӭ";s:2:"Ӭ";s:4:"ӭ";s:2:"ӭ";s:4:"Ӯ";s:2:"Ӯ";s:4:"ӯ";s:2:"ӯ";s:4:"Ӱ";s:2:"Ӱ";s:4:"ӱ";s:2:"ӱ";s:4:"Ӳ";s:2:"Ӳ";s:4:"ӳ";s:2:"ӳ";s:4:"Ӵ";s:2:"Ӵ";s:4:"ӵ";s:2:"ӵ";s:4:"Ӹ";s:2:"Ӹ";s:4:"ӹ";s:2:"ӹ";s:4:"آ";s:2:"آ";s:4:"أ";s:2:"أ";s:4:"ؤ";s:2:"ؤ";s:4:"إ";s:2:"إ";s:4:"ئ";s:2:"ئ";s:4:"ۀ";s:2:"ۀ";s:4:"ۂ";s:2:"ۂ";s:4:"ۓ";s:2:"ۓ";s:6:"ऩ";s:3:"ऩ";s:6:"ऱ";s:3:"ऱ";s:6:"ऴ";s:3:"ऴ";s:6:"ো";s:3:"ো";s:6:"ৌ";s:3:"ৌ";s:6:"ୈ";s:3:"ୈ";s:6:"ୋ";s:3:"ୋ";s:6:"ୌ";s:3:"ୌ";s:6:"ஔ";s:3:"ஔ";s:6:"ொ";s:3:"ொ";s:6:"ோ";s:3:"ோ";s:6:"ௌ";s:3:"ௌ";s:6:"ై";s:3:"ై";s:6:"ೀ";s:3:"ೀ";s:6:"ೇ";s:3:"ೇ";s:6:"ೈ";s:3:"ೈ";s:6:"ೊ";s:3:"ೊ";s:6:"ೋ";s:3:"ೋ";s:6:"ൊ";s:3:"ൊ";s:6:"ോ";s:3:"ോ";s:6:"ൌ";s:3:"ൌ";s:6:"ේ";s:3:"ේ";s:6:"ො";s:3:"ො";s:6:"ෝ";s:3:"ෝ";s:6:"ෞ";s:3:"ෞ";s:6:"ဦ";s:3:"ဦ";s:6:"ᬆ";s:3:"ᬆ";s:6:"ᬈ";s:3:"ᬈ";s:6:"ᬊ";s:3:"ᬊ";s:6:"ᬌ";s:3:"ᬌ";s:6:"ᬎ";s:3:"ᬎ";s:6:"ᬒ";s:3:"ᬒ";s:6:"ᬻ";s:3:"ᬻ";s:6:"ᬽ";s:3:"ᬽ";s:6:"ᭀ";s:3:"ᭀ";s:6:"ᭁ";s:3:"ᭁ";s:6:"ᭃ";s:3:"ᭃ";s:3:"Ḁ";s:3:"Ḁ";s:3:"ḁ";s:3:"ḁ";s:3:"Ḃ";s:3:"Ḃ";s:3:"ḃ";s:3:"ḃ";s:3:"Ḅ";s:3:"Ḅ";s:3:"ḅ";s:3:"ḅ";s:3:"Ḇ";s:3:"Ḇ";s:3:"ḇ";s:3:"ḇ";s:4:"Ḉ";s:3:"Ḉ";s:4:"ḉ";s:3:"ḉ";s:3:"Ḋ";s:3:"Ḋ";s:3:"ḋ";s:3:"ḋ";s:3:"Ḍ";s:3:"Ḍ";s:3:"ḍ";s:3:"ḍ";s:3:"Ḏ";s:3:"Ḏ";s:3:"ḏ";s:3:"ḏ";s:3:"Ḑ";s:3:"Ḑ";s:3:"ḑ";s:3:"ḑ";s:3:"Ḓ";s:3:"Ḓ";s:3:"ḓ";s:3:"ḓ";s:4:"Ḕ";s:3:"Ḕ";s:4:"ḕ";s:3:"ḕ";s:4:"Ḗ";s:3:"Ḗ";s:4:"ḗ";s:3:"ḗ";s:3:"Ḙ";s:3:"Ḙ";s:3:"ḙ";s:3:"ḙ";s:3:"Ḛ";s:3:"Ḛ";s:3:"ḛ";s:3:"ḛ";s:4:"Ḝ";s:3:"Ḝ";s:4:"ḝ";s:3:"ḝ";s:3:"Ḟ";s:3:"Ḟ";s:3:"ḟ";s:3:"ḟ";s:3:"Ḡ";s:3:"Ḡ";s:3:"ḡ";s:3:"ḡ";s:3:"Ḣ";s:3:"Ḣ";s:3:"ḣ";s:3:"ḣ";s:3:"Ḥ";s:3:"Ḥ";s:3:"ḥ";s:3:"ḥ";s:3:"Ḧ";s:3:"Ḧ";s:3:"ḧ";s:3:"ḧ";s:3:"Ḩ";s:3:"Ḩ";s:3:"ḩ";s:3:"ḩ";s:3:"Ḫ";s:3:"Ḫ";s:3:"ḫ";s:3:"ḫ";s:3:"Ḭ";s:3:"Ḭ";s:3:"ḭ";s:3:"ḭ";s:4:"Ḯ";s:3:"Ḯ";s:4:"ḯ";s:3:"ḯ";s:3:"Ḱ";s:3:"Ḱ";s:3:"ḱ";s:3:"ḱ";s:3:"Ḳ";s:3:"Ḳ";s:3:"ḳ";s:3:"ḳ";s:3:"Ḵ";s:3:"Ḵ";s:3:"ḵ";s:3:"ḵ";s:3:"Ḷ";s:3:"Ḷ";s:3:"ḷ";s:3:"ḷ";s:5:"Ḹ";s:3:"Ḹ";s:5:"ḹ";s:3:"ḹ";s:3:"Ḻ";s:3:"Ḻ";s:3:"ḻ";s:3:"ḻ";s:3:"Ḽ";s:3:"Ḽ";s:3:"ḽ";s:3:"ḽ";s:3:"Ḿ";s:3:"Ḿ";s:3:"ḿ";s:3:"ḿ";s:3:"Ṁ";s:3:"Ṁ";s:3:"ṁ";s:3:"ṁ";s:3:"Ṃ";s:3:"Ṃ";s:3:"ṃ";s:3:"ṃ";s:3:"Ṅ";s:3:"Ṅ";s:3:"ṅ";s:3:"ṅ";s:3:"Ṇ";s:3:"Ṇ";s:3:"ṇ";s:3:"ṇ";s:3:"Ṉ";s:3:"Ṉ";s:3:"ṉ";s:3:"ṉ";s:3:"Ṋ";s:3:"Ṋ";s:3:"ṋ";s:3:"ṋ";s:4:"Ṍ";s:3:"Ṍ";s:4:"ṍ";s:3:"ṍ";s:4:"Ṏ";s:3:"Ṏ";s:4:"ṏ";s:3:"ṏ";s:4:"Ṑ";s:3:"Ṑ";s:4:"ṑ";s:3:"ṑ";s:4:"Ṓ";s:3:"Ṓ";s:4:"ṓ";s:3:"ṓ";s:3:"Ṕ";s:3:"Ṕ";s:3:"ṕ";s:3:"ṕ";s:3:"Ṗ";s:3:"Ṗ";s:3:"ṗ";s:3:"ṗ";s:3:"Ṙ";s:3:"Ṙ";s:3:"ṙ";s:3:"ṙ";s:3:"Ṛ";s:3:"Ṛ";s:3:"ṛ";s:3:"ṛ";s:5:"Ṝ";s:3:"Ṝ";s:5:"ṝ";s:3:"ṝ";s:3:"Ṟ";s:3:"Ṟ";s:3:"ṟ";s:3:"ṟ";s:3:"Ṡ";s:3:"Ṡ";s:3:"ṡ";s:3:"ṡ";s:3:"Ṣ";s:3:"Ṣ";s:3:"ṣ";s:3:"ṣ";s:4:"Ṥ";s:3:"Ṥ";s:4:"ṥ";s:3:"ṥ";s:4:"Ṧ";s:3:"Ṧ";s:4:"ṧ";s:3:"ṧ";s:5:"Ṩ";s:3:"Ṩ";s:5:"ṩ";s:3:"ṩ";s:3:"Ṫ";s:3:"Ṫ";s:3:"ṫ";s:3:"ṫ";s:3:"Ṭ";s:3:"Ṭ";s:3:"ṭ";s:3:"ṭ";s:3:"Ṯ";s:3:"Ṯ";s:3:"ṯ";s:3:"ṯ";s:3:"Ṱ";s:3:"Ṱ";s:3:"ṱ";s:3:"ṱ";s:3:"Ṳ";s:3:"Ṳ";s:3:"ṳ";s:3:"ṳ";s:3:"Ṵ";s:3:"Ṵ";s:3:"ṵ";s:3:"ṵ";s:3:"Ṷ";s:3:"Ṷ";s:3:"ṷ";s:3:"ṷ";s:4:"Ṹ";s:3:"Ṹ";s:4:"ṹ";s:3:"ṹ";s:4:"Ṻ";s:3:"Ṻ";s:4:"ṻ";s:3:"ṻ";s:3:"Ṽ";s:3:"Ṽ";s:3:"ṽ";s:3:"ṽ";s:3:"Ṿ";s:3:"Ṿ";s:3:"ṿ";s:3:"ṿ";s:3:"Ẁ";s:3:"Ẁ";s:3:"ẁ";s:3:"ẁ";s:3:"Ẃ";s:3:"Ẃ";s:3:"ẃ";s:3:"ẃ";s:3:"Ẅ";s:3:"Ẅ";s:3:"ẅ";s:3:"ẅ";s:3:"Ẇ";s:3:"Ẇ";s:3:"ẇ";s:3:"ẇ";s:3:"Ẉ";s:3:"Ẉ";s:3:"ẉ";s:3:"ẉ";s:3:"Ẋ";s:3:"Ẋ";s:3:"ẋ";s:3:"ẋ";s:3:"Ẍ";s:3:"Ẍ";s:3:"ẍ";s:3:"ẍ";s:3:"Ẏ";s:3:"Ẏ";s:3:"ẏ";s:3:"ẏ";s:3:"Ẑ";s:3:"Ẑ";s:3:"ẑ";s:3:"ẑ";s:3:"Ẓ";s:3:"Ẓ";s:3:"ẓ";s:3:"ẓ";s:3:"Ẕ";s:3:"Ẕ";s:3:"ẕ";s:3:"ẕ";s:3:"ẖ";s:3:"ẖ";s:3:"ẗ";s:3:"ẗ";s:3:"ẘ";s:3:"ẘ";s:3:"ẙ";s:3:"ẙ";s:4:"ẛ";s:3:"ẛ";s:3:"Ạ";s:3:"Ạ";s:3:"ạ";s:3:"ạ";s:3:"Ả";s:3:"Ả";s:3:"ả";s:3:"ả";s:4:"Ấ";s:3:"Ấ";s:4:"ấ";s:3:"ấ";s:4:"Ầ";s:3:"Ầ";s:4:"ầ";s:3:"ầ";s:4:"Ẩ";s:3:"Ẩ";s:4:"ẩ";s:3:"ẩ";s:4:"Ẫ";s:3:"Ẫ";s:4:"ẫ";s:3:"ẫ";s:5:"Ậ";s:3:"Ậ";s:5:"ậ";s:3:"ậ";s:4:"Ắ";s:3:"Ắ";s:4:"ắ";s:3:"ắ";s:4:"Ằ";s:3:"Ằ";s:4:"ằ";s:3:"ằ";s:4:"Ẳ";s:3:"Ẳ";s:4:"ẳ";s:3:"ẳ";s:4:"Ẵ";s:3:"Ẵ";s:4:"ẵ";s:3:"ẵ";s:5:"Ặ";s:3:"Ặ";s:5:"ặ";s:3:"ặ";s:3:"Ẹ";s:3:"Ẹ";s:3:"ẹ";s:3:"ẹ";s:3:"Ẻ";s:3:"Ẻ";s:3:"ẻ";s:3:"ẻ";s:3:"Ẽ";s:3:"Ẽ";s:3:"ẽ";s:3:"ẽ";s:4:"Ế";s:3:"Ế";s:4:"ế";s:3:"ế";s:4:"Ề";s:3:"Ề";s:4:"ề";s:3:"ề";s:4:"Ể";s:3:"Ể";s:4:"ể";s:3:"ể";s:4:"Ễ";s:3:"Ễ";s:4:"ễ";s:3:"ễ";s:5:"Ệ";s:3:"Ệ";s:5:"ệ";s:3:"ệ";s:3:"Ỉ";s:3:"Ỉ";s:3:"ỉ";s:3:"ỉ";s:3:"Ị";s:3:"Ị";s:3:"ị";s:3:"ị";s:3:"Ọ";s:3:"Ọ";s:3:"ọ";s:3:"ọ";s:3:"Ỏ";s:3:"Ỏ";s:3:"ỏ";s:3:"ỏ";s:4:"Ố";s:3:"Ố";s:4:"ố";s:3:"ố";s:4:"Ồ";s:3:"Ồ";s:4:"ồ";s:3:"ồ";s:4:"Ổ";s:3:"Ổ";s:4:"ổ";s:3:"ổ";s:4:"Ỗ";s:3:"Ỗ";s:4:"ỗ";s:3:"ỗ";s:5:"Ộ";s:3:"Ộ";s:5:"ộ";s:3:"ộ";s:4:"Ớ";s:3:"Ớ";s:4:"ớ";s:3:"ớ";s:4:"Ờ";s:3:"Ờ";s:4:"ờ";s:3:"ờ";s:4:"Ở";s:3:"Ở";s:4:"ở";s:3:"ở";s:4:"Ỡ";s:3:"Ỡ";s:4:"ỡ";s:3:"ỡ";s:4:"Ợ";s:3:"Ợ";s:4:"ợ";s:3:"ợ";s:3:"Ụ";s:3:"Ụ";s:3:"ụ";s:3:"ụ";s:3:"Ủ";s:3:"Ủ";s:3:"ủ";s:3:"ủ";s:4:"Ứ";s:3:"Ứ";s:4:"ứ";s:3:"ứ";s:4:"Ừ";s:3:"Ừ";s:4:"ừ";s:3:"ừ";s:4:"Ử";s:3:"Ử";s:4:"ử";s:3:"ử";s:4:"Ữ";s:3:"Ữ";s:4:"ữ";s:3:"ữ";s:4:"Ự";s:3:"Ự";s:4:"ự";s:3:"ự";s:3:"Ỳ";s:3:"Ỳ";s:3:"ỳ";s:3:"ỳ";s:3:"Ỵ";s:3:"Ỵ";s:3:"ỵ";s:3:"ỵ";s:3:"Ỷ";s:3:"Ỷ";s:3:"ỷ";s:3:"ỷ";s:3:"Ỹ";s:3:"Ỹ";s:3:"ỹ";s:3:"ỹ";s:4:"ἀ";s:3:"ἀ";s:4:"ἁ";s:3:"ἁ";s:5:"ἂ";s:3:"ἂ";s:5:"ἃ";s:3:"ἃ";s:5:"ἄ";s:3:"ἄ";s:5:"ἅ";s:3:"ἅ";s:5:"ἆ";s:3:"ἆ";s:5:"ἇ";s:3:"ἇ";s:4:"Ἀ";s:3:"Ἀ";s:4:"Ἁ";s:3:"Ἁ";s:5:"Ἂ";s:3:"Ἂ";s:5:"Ἃ";s:3:"Ἃ";s:5:"Ἄ";s:3:"Ἄ";s:5:"Ἅ";s:3:"Ἅ";s:5:"Ἆ";s:3:"Ἆ";s:5:"Ἇ";s:3:"Ἇ";s:4:"ἐ";s:3:"ἐ";s:4:"ἑ";s:3:"ἑ";s:5:"ἒ";s:3:"ἒ";s:5:"ἓ";s:3:"ἓ";s:5:"ἔ";s:3:"ἔ";s:5:"ἕ";s:3:"ἕ";s:4:"Ἐ";s:3:"Ἐ";s:4:"Ἑ";s:3:"Ἑ";s:5:"Ἒ";s:3:"Ἒ";s:5:"Ἓ";s:3:"Ἓ";s:5:"Ἔ";s:3:"Ἔ";s:5:"Ἕ";s:3:"Ἕ";s:4:"ἠ";s:3:"ἠ";s:4:"ἡ";s:3:"ἡ";s:5:"ἢ";s:3:"ἢ";s:5:"ἣ";s:3:"ἣ";s:5:"ἤ";s:3:"ἤ";s:5:"ἥ";s:3:"ἥ";s:5:"ἦ";s:3:"ἦ";s:5:"ἧ";s:3:"ἧ";s:4:"Ἠ";s:3:"Ἠ";s:4:"Ἡ";s:3:"Ἡ";s:5:"Ἢ";s:3:"Ἢ";s:5:"Ἣ";s:3:"Ἣ";s:5:"Ἤ";s:3:"Ἤ";s:5:"Ἥ";s:3:"Ἥ";s:5:"Ἦ";s:3:"Ἦ";s:5:"Ἧ";s:3:"Ἧ";s:4:"ἰ";s:3:"ἰ";s:4:"ἱ";s:3:"ἱ";s:5:"ἲ";s:3:"ἲ";s:5:"ἳ";s:3:"ἳ";s:5:"ἴ";s:3:"ἴ";s:5:"ἵ";s:3:"ἵ";s:5:"ἶ";s:3:"ἶ";s:5:"ἷ";s:3:"ἷ";s:4:"Ἰ";s:3:"Ἰ";s:4:"Ἱ";s:3:"Ἱ";s:5:"Ἲ";s:3:"Ἲ";s:5:"Ἳ";s:3:"Ἳ";s:5:"Ἴ";s:3:"Ἴ";s:5:"Ἵ";s:3:"Ἵ";s:5:"Ἶ";s:3:"Ἶ";s:5:"Ἷ";s:3:"Ἷ";s:4:"ὀ";s:3:"ὀ";s:4:"ὁ";s:3:"ὁ";s:5:"ὂ";s:3:"ὂ";s:5:"ὃ";s:3:"ὃ";s:5:"ὄ";s:3:"ὄ";s:5:"ὅ";s:3:"ὅ";s:4:"Ὀ";s:3:"Ὀ";s:4:"Ὁ";s:3:"Ὁ";s:5:"Ὂ";s:3:"Ὂ";s:5:"Ὃ";s:3:"Ὃ";s:5:"Ὄ";s:3:"Ὄ";s:5:"Ὅ";s:3:"Ὅ";s:4:"ὐ";s:3:"ὐ";s:4:"ὑ";s:3:"ὑ";s:5:"ὒ";s:3:"ὒ";s:5:"ὓ";s:3:"ὓ";s:5:"ὔ";s:3:"ὔ";s:5:"ὕ";s:3:"ὕ";s:5:"ὖ";s:3:"ὖ";s:5:"ὗ";s:3:"ὗ";s:4:"Ὑ";s:3:"Ὑ";s:5:"Ὓ";s:3:"Ὓ";s:5:"Ὕ";s:3:"Ὕ";s:5:"Ὗ";s:3:"Ὗ";s:4:"ὠ";s:3:"ὠ";s:4:"ὡ";s:3:"ὡ";s:5:"ὢ";s:3:"ὢ";s:5:"ὣ";s:3:"ὣ";s:5:"ὤ";s:3:"ὤ";s:5:"ὥ";s:3:"ὥ";s:5:"ὦ";s:3:"ὦ";s:5:"ὧ";s:3:"ὧ";s:4:"Ὠ";s:3:"Ὠ";s:4:"Ὡ";s:3:"Ὡ";s:5:"Ὢ";s:3:"Ὢ";s:5:"Ὣ";s:3:"Ὣ";s:5:"Ὤ";s:3:"Ὤ";s:5:"Ὥ";s:3:"Ὥ";s:5:"Ὦ";s:3:"Ὦ";s:5:"Ὧ";s:3:"Ὧ";s:4:"ὰ";s:3:"ὰ";s:4:"ὲ";s:3:"ὲ";s:4:"ὴ";s:3:"ὴ";s:4:"ὶ";s:3:"ὶ";s:4:"ὸ";s:3:"ὸ";s:4:"ὺ";s:3:"ὺ";s:4:"ὼ";s:3:"ὼ";s:5:"ᾀ";s:3:"ᾀ";s:5:"ᾁ";s:3:"ᾁ";s:5:"ᾂ";s:3:"ᾂ";s:5:"ᾃ";s:3:"ᾃ";s:5:"ᾄ";s:3:"ᾄ";s:5:"ᾅ";s:3:"ᾅ";s:5:"ᾆ";s:3:"ᾆ";s:5:"ᾇ";s:3:"ᾇ";s:5:"ᾈ";s:3:"ᾈ";s:5:"ᾉ";s:3:"ᾉ";s:5:"ᾊ";s:3:"ᾊ";s:5:"ᾋ";s:3:"ᾋ";s:5:"ᾌ";s:3:"ᾌ";s:5:"ᾍ";s:3:"ᾍ";s:5:"ᾎ";s:3:"ᾎ";s:5:"ᾏ";s:3:"ᾏ";s:5:"ᾐ";s:3:"ᾐ";s:5:"ᾑ";s:3:"ᾑ";s:5:"ᾒ";s:3:"ᾒ";s:5:"ᾓ";s:3:"ᾓ";s:5:"ᾔ";s:3:"ᾔ";s:5:"ᾕ";s:3:"ᾕ";s:5:"ᾖ";s:3:"ᾖ";s:5:"ᾗ";s:3:"ᾗ";s:5:"ᾘ";s:3:"ᾘ";s:5:"ᾙ";s:3:"ᾙ";s:5:"ᾚ";s:3:"ᾚ";s:5:"ᾛ";s:3:"ᾛ";s:5:"ᾜ";s:3:"ᾜ";s:5:"ᾝ";s:3:"ᾝ";s:5:"ᾞ";s:3:"ᾞ";s:5:"ᾟ";s:3:"ᾟ";s:5:"ᾠ";s:3:"ᾠ";s:5:"ᾡ";s:3:"ᾡ";s:5:"ᾢ";s:3:"ᾢ";s:5:"ᾣ";s:3:"ᾣ";s:5:"ᾤ";s:3:"ᾤ";s:5:"ᾥ";s:3:"ᾥ";s:5:"ᾦ";s:3:"ᾦ";s:5:"ᾧ";s:3:"ᾧ";s:5:"ᾨ";s:3:"ᾨ";s:5:"ᾩ";s:3:"ᾩ";s:5:"ᾪ";s:3:"ᾪ";s:5:"ᾫ";s:3:"ᾫ";s:5:"ᾬ";s:3:"ᾬ";s:5:"ᾭ";s:3:"ᾭ";s:5:"ᾮ";s:3:"ᾮ";s:5:"ᾯ";s:3:"ᾯ";s:4:"ᾰ";s:3:"ᾰ";s:4:"ᾱ";s:3:"ᾱ";s:5:"ᾲ";s:3:"ᾲ";s:4:"ᾳ";s:3:"ᾳ";s:4:"ᾴ";s:3:"ᾴ";s:4:"ᾶ";s:3:"ᾶ";s:5:"ᾷ";s:3:"ᾷ";s:4:"Ᾰ";s:3:"Ᾰ";s:4:"Ᾱ";s:3:"Ᾱ";s:4:"Ὰ";s:3:"Ὰ";s:4:"ᾼ";s:3:"ᾼ";s:4:"῁";s:3:"῁";s:5:"ῂ";s:3:"ῂ";s:4:"ῃ";s:3:"ῃ";s:4:"ῄ";s:3:"ῄ";s:4:"ῆ";s:3:"ῆ";s:5:"ῇ";s:3:"ῇ";s:4:"Ὲ";s:3:"Ὲ";s:4:"Ὴ";s:3:"Ὴ";s:4:"ῌ";s:3:"ῌ";s:5:"῍";s:3:"῍";s:5:"῎";s:3:"῎";s:5:"῏";s:3:"῏";s:4:"ῐ";s:3:"ῐ";s:4:"ῑ";s:3:"ῑ";s:4:"ῒ";s:3:"ῒ";s:4:"ῖ";s:3:"ῖ";s:4:"ῗ";s:3:"ῗ";s:4:"Ῐ";s:3:"Ῐ";s:4:"Ῑ";s:3:"Ῑ";s:4:"Ὶ";s:3:"Ὶ";s:5:"῝";s:3:"῝";s:5:"῞";s:3:"῞";s:5:"῟";s:3:"῟";s:4:"ῠ";s:3:"ῠ";s:4:"ῡ";s:3:"ῡ";s:4:"ῢ";s:3:"ῢ";s:4:"ῤ";s:3:"ῤ";s:4:"ῥ";s:3:"ῥ";s:4:"ῦ";s:3:"ῦ";s:4:"ῧ";s:3:"ῧ";s:4:"Ῠ";s:3:"Ῠ";s:4:"Ῡ";s:3:"Ῡ";s:4:"Ὺ";s:3:"Ὺ";s:4:"Ῥ";s:3:"Ῥ";s:4:"῭";s:3:"῭";s:5:"ῲ";s:3:"ῲ";s:4:"ῳ";s:3:"ῳ";s:4:"ῴ";s:3:"ῴ";s:4:"ῶ";s:3:"ῶ";s:5:"ῷ";s:3:"ῷ";s:4:"Ὸ";s:3:"Ὸ";s:4:"Ὼ";s:3:"Ὼ";s:4:"ῼ";s:3:"ῼ";s:5:"↚";s:3:"↚";s:5:"↛";s:3:"↛";s:5:"↮";s:3:"↮";s:5:"⇍";s:3:"⇍";s:5:"⇎";s:3:"⇎";s:5:"⇏";s:3:"⇏";s:5:"∄";s:3:"∄";s:5:"∉";s:3:"∉";s:5:"∌";s:3:"∌";s:5:"∤";s:3:"∤";s:5:"∦";s:3:"∦";s:5:"≁";s:3:"≁";s:5:"≄";s:3:"≄";s:5:"≇";s:3:"≇";s:5:"≉";s:3:"≉";s:3:"≠";s:3:"≠";s:5:"≢";s:3:"≢";s:5:"≭";s:3:"≭";s:3:"≮";s:3:"≮";s:3:"≯";s:3:"≯";s:5:"≰";s:3:"≰";s:5:"≱";s:3:"≱";s:5:"≴";s:3:"≴";s:5:"≵";s:3:"≵";s:5:"≸";s:3:"≸";s:5:"≹";s:3:"≹";s:5:"⊀";s:3:"⊀";s:5:"⊁";s:3:"⊁";s:5:"⊄";s:3:"⊄";s:5:"⊅";s:3:"⊅";s:5:"⊈";s:3:"⊈";s:5:"⊉";s:3:"⊉";s:5:"⊬";s:3:"⊬";s:5:"⊭";s:3:"⊭";s:5:"⊮";s:3:"⊮";s:5:"⊯";s:3:"⊯";s:5:"⋠";s:3:"⋠";s:5:"⋡";s:3:"⋡";s:5:"⋢";s:3:"⋢";s:5:"⋣";s:3:"⋣";s:5:"⋪";s:3:"⋪";s:5:"⋫";s:3:"⋫";s:5:"⋬";s:3:"⋬";s:5:"⋭";s:3:"⋭";s:6:"が";s:3:"が";s:6:"ぎ";s:3:"ぎ";s:6:"ぐ";s:3:"ぐ";s:6:"げ";s:3:"げ";s:6:"ご";s:3:"ご";s:6:"ざ";s:3:"ざ";s:6:"じ";s:3:"じ";s:6:"ず";s:3:"ず";s:6:"ぜ";s:3:"ぜ";s:6:"ぞ";s:3:"ぞ";s:6:"だ";s:3:"だ";s:6:"ぢ";s:3:"ぢ";s:6:"づ";s:3:"づ";s:6:"で";s:3:"で";s:6:"ど";s:3:"ど";s:6:"ば";s:3:"ば";s:6:"ぱ";s:3:"ぱ";s:6:"び";s:3:"び";s:6:"ぴ";s:3:"ぴ";s:6:"ぶ";s:3:"ぶ";s:6:"ぷ";s:3:"ぷ";s:6:"べ";s:3:"べ";s:6:"ぺ";s:3:"ぺ";s:6:"ぼ";s:3:"ぼ";s:6:"ぽ";s:3:"ぽ";s:6:"ゔ";s:3:"ゔ";s:6:"ゞ";s:3:"ゞ";s:6:"ガ";s:3:"ガ";s:6:"ギ";s:3:"ギ";s:6:"グ";s:3:"グ";s:6:"ゲ";s:3:"ゲ";s:6:"ゴ";s:3:"ゴ";s:6:"ザ";s:3:"ザ";s:6:"ジ";s:3:"ジ";s:6:"ズ";s:3:"ズ";s:6:"ゼ";s:3:"ゼ";s:6:"ゾ";s:3:"ゾ";s:6:"ダ";s:3:"ダ";s:6:"ヂ";s:3:"ヂ";s:6:"ヅ";s:3:"ヅ";s:6:"デ";s:3:"デ";s:6:"ド";s:3:"ド";s:6:"バ";s:3:"バ";s:6:"パ";s:3:"パ";s:6:"ビ";s:3:"ビ";s:6:"ピ";s:3:"ピ";s:6:"ブ";s:3:"ブ";s:6:"プ";s:3:"プ";s:6:"ベ";s:3:"ベ";s:6:"ペ";s:3:"ペ";s:6:"ボ";s:3:"ボ";s:6:"ポ";s:3:"ポ";s:6:"ヴ";s:3:"ヴ";s:6:"ヷ";s:3:"ヷ";s:6:"ヸ";s:3:"ヸ";s:6:"ヹ";s:3:"ヹ";s:6:"ヺ";s:3:"ヺ";s:6:"ヾ";s:3:"ヾ";s:8:"𑂚";s:4:"𑂚";s:8:"𑂜";s:4:"𑂜";s:8:"𑂫";s:4:"𑂫";s:8:"𑄮";s:4:"𑄮";s:8:"𑄯";s:4:"𑄯";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser deleted file mode 100644 index c1ee2b60..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser +++ /dev/null @@ -1 +0,0 @@ -a:2053:{s:2:"À";s:3:"À";s:2:"Á";s:3:"Á";s:2:"Â";s:3:"Â";s:2:"Ã";s:3:"Ã";s:2:"Ä";s:3:"Ä";s:2:"Å";s:3:"Å";s:2:"Ç";s:3:"Ç";s:2:"È";s:3:"È";s:2:"É";s:3:"É";s:2:"Ê";s:3:"Ê";s:2:"Ë";s:3:"Ë";s:2:"Ì";s:3:"Ì";s:2:"Í";s:3:"Í";s:2:"Î";s:3:"Î";s:2:"Ï";s:3:"Ï";s:2:"Ñ";s:3:"Ñ";s:2:"Ò";s:3:"Ò";s:2:"Ó";s:3:"Ó";s:2:"Ô";s:3:"Ô";s:2:"Õ";s:3:"Õ";s:2:"Ö";s:3:"Ö";s:2:"Ù";s:3:"Ù";s:2:"Ú";s:3:"Ú";s:2:"Û";s:3:"Û";s:2:"Ü";s:3:"Ü";s:2:"Ý";s:3:"Ý";s:2:"à";s:3:"à";s:2:"á";s:3:"á";s:2:"â";s:3:"â";s:2:"ã";s:3:"ã";s:2:"ä";s:3:"ä";s:2:"å";s:3:"å";s:2:"ç";s:3:"ç";s:2:"è";s:3:"è";s:2:"é";s:3:"é";s:2:"ê";s:3:"ê";s:2:"ë";s:3:"ë";s:2:"ì";s:3:"ì";s:2:"í";s:3:"í";s:2:"î";s:3:"î";s:2:"ï";s:3:"ï";s:2:"ñ";s:3:"ñ";s:2:"ò";s:3:"ò";s:2:"ó";s:3:"ó";s:2:"ô";s:3:"ô";s:2:"õ";s:3:"õ";s:2:"ö";s:3:"ö";s:2:"ù";s:3:"ù";s:2:"ú";s:3:"ú";s:2:"û";s:3:"û";s:2:"ü";s:3:"ü";s:2:"ý";s:3:"ý";s:2:"ÿ";s:3:"ÿ";s:2:"Ā";s:3:"Ā";s:2:"ā";s:3:"ā";s:2:"Ă";s:3:"Ă";s:2:"ă";s:3:"ă";s:2:"Ą";s:3:"Ą";s:2:"ą";s:3:"ą";s:2:"Ć";s:3:"Ć";s:2:"ć";s:3:"ć";s:2:"Ĉ";s:3:"Ĉ";s:2:"ĉ";s:3:"ĉ";s:2:"Ċ";s:3:"Ċ";s:2:"ċ";s:3:"ċ";s:2:"Č";s:3:"Č";s:2:"č";s:3:"č";s:2:"Ď";s:3:"Ď";s:2:"ď";s:3:"ď";s:2:"Ē";s:3:"Ē";s:2:"ē";s:3:"ē";s:2:"Ĕ";s:3:"Ĕ";s:2:"ĕ";s:3:"ĕ";s:2:"Ė";s:3:"Ė";s:2:"ė";s:3:"ė";s:2:"Ę";s:3:"Ę";s:2:"ę";s:3:"ę";s:2:"Ě";s:3:"Ě";s:2:"ě";s:3:"ě";s:2:"Ĝ";s:3:"Ĝ";s:2:"ĝ";s:3:"ĝ";s:2:"Ğ";s:3:"Ğ";s:2:"ğ";s:3:"ğ";s:2:"Ġ";s:3:"Ġ";s:2:"ġ";s:3:"ġ";s:2:"Ģ";s:3:"Ģ";s:2:"ģ";s:3:"ģ";s:2:"Ĥ";s:3:"Ĥ";s:2:"ĥ";s:3:"ĥ";s:2:"Ĩ";s:3:"Ĩ";s:2:"ĩ";s:3:"ĩ";s:2:"Ī";s:3:"Ī";s:2:"ī";s:3:"ī";s:2:"Ĭ";s:3:"Ĭ";s:2:"ĭ";s:3:"ĭ";s:2:"Į";s:3:"Į";s:2:"į";s:3:"į";s:2:"İ";s:3:"İ";s:2:"Ĵ";s:3:"Ĵ";s:2:"ĵ";s:3:"ĵ";s:2:"Ķ";s:3:"Ķ";s:2:"ķ";s:3:"ķ";s:2:"Ĺ";s:3:"Ĺ";s:2:"ĺ";s:3:"ĺ";s:2:"Ļ";s:3:"Ļ";s:2:"ļ";s:3:"ļ";s:2:"Ľ";s:3:"Ľ";s:2:"ľ";s:3:"ľ";s:2:"Ń";s:3:"Ń";s:2:"ń";s:3:"ń";s:2:"Ņ";s:3:"Ņ";s:2:"ņ";s:3:"ņ";s:2:"Ň";s:3:"Ň";s:2:"ň";s:3:"ň";s:2:"Ō";s:3:"Ō";s:2:"ō";s:3:"ō";s:2:"Ŏ";s:3:"Ŏ";s:2:"ŏ";s:3:"ŏ";s:2:"Ő";s:3:"Ő";s:2:"ő";s:3:"ő";s:2:"Ŕ";s:3:"Ŕ";s:2:"ŕ";s:3:"ŕ";s:2:"Ŗ";s:3:"Ŗ";s:2:"ŗ";s:3:"ŗ";s:2:"Ř";s:3:"Ř";s:2:"ř";s:3:"ř";s:2:"Ś";s:3:"Ś";s:2:"ś";s:3:"ś";s:2:"Ŝ";s:3:"Ŝ";s:2:"ŝ";s:3:"ŝ";s:2:"Ş";s:3:"Ş";s:2:"ş";s:3:"ş";s:2:"Š";s:3:"Š";s:2:"š";s:3:"š";s:2:"Ţ";s:3:"Ţ";s:2:"ţ";s:3:"ţ";s:2:"Ť";s:3:"Ť";s:2:"ť";s:3:"ť";s:2:"Ũ";s:3:"Ũ";s:2:"ũ";s:3:"ũ";s:2:"Ū";s:3:"Ū";s:2:"ū";s:3:"ū";s:2:"Ŭ";s:3:"Ŭ";s:2:"ŭ";s:3:"ŭ";s:2:"Ů";s:3:"Ů";s:2:"ů";s:3:"ů";s:2:"Ű";s:3:"Ű";s:2:"ű";s:3:"ű";s:2:"Ų";s:3:"Ų";s:2:"ų";s:3:"ų";s:2:"Ŵ";s:3:"Ŵ";s:2:"ŵ";s:3:"ŵ";s:2:"Ŷ";s:3:"Ŷ";s:2:"ŷ";s:3:"ŷ";s:2:"Ÿ";s:3:"Ÿ";s:2:"Ź";s:3:"Ź";s:2:"ź";s:3:"ź";s:2:"Ż";s:3:"Ż";s:2:"ż";s:3:"ż";s:2:"Ž";s:3:"Ž";s:2:"ž";s:3:"ž";s:2:"Ơ";s:3:"Ơ";s:2:"ơ";s:3:"ơ";s:2:"Ư";s:3:"Ư";s:2:"ư";s:3:"ư";s:2:"Ǎ";s:3:"Ǎ";s:2:"ǎ";s:3:"ǎ";s:2:"Ǐ";s:3:"Ǐ";s:2:"ǐ";s:3:"ǐ";s:2:"Ǒ";s:3:"Ǒ";s:2:"ǒ";s:3:"ǒ";s:2:"Ǔ";s:3:"Ǔ";s:2:"ǔ";s:3:"ǔ";s:2:"Ǖ";s:5:"Ǖ";s:2:"ǖ";s:5:"ǖ";s:2:"Ǘ";s:5:"Ǘ";s:2:"ǘ";s:5:"ǘ";s:2:"Ǚ";s:5:"Ǚ";s:2:"ǚ";s:5:"ǚ";s:2:"Ǜ";s:5:"Ǜ";s:2:"ǜ";s:5:"ǜ";s:2:"Ǟ";s:5:"Ǟ";s:2:"ǟ";s:5:"ǟ";s:2:"Ǡ";s:5:"Ǡ";s:2:"ǡ";s:5:"ǡ";s:2:"Ǣ";s:4:"Ǣ";s:2:"ǣ";s:4:"ǣ";s:2:"Ǧ";s:3:"Ǧ";s:2:"ǧ";s:3:"ǧ";s:2:"Ǩ";s:3:"Ǩ";s:2:"ǩ";s:3:"ǩ";s:2:"Ǫ";s:3:"Ǫ";s:2:"ǫ";s:3:"ǫ";s:2:"Ǭ";s:5:"Ǭ";s:2:"ǭ";s:5:"ǭ";s:2:"Ǯ";s:4:"Ǯ";s:2:"ǯ";s:4:"ǯ";s:2:"ǰ";s:3:"ǰ";s:2:"Ǵ";s:3:"Ǵ";s:2:"ǵ";s:3:"ǵ";s:2:"Ǹ";s:3:"Ǹ";s:2:"ǹ";s:3:"ǹ";s:2:"Ǻ";s:5:"Ǻ";s:2:"ǻ";s:5:"ǻ";s:2:"Ǽ";s:4:"Ǽ";s:2:"ǽ";s:4:"ǽ";s:2:"Ǿ";s:4:"Ǿ";s:2:"ǿ";s:4:"ǿ";s:2:"Ȁ";s:3:"Ȁ";s:2:"ȁ";s:3:"ȁ";s:2:"Ȃ";s:3:"Ȃ";s:2:"ȃ";s:3:"ȃ";s:2:"Ȅ";s:3:"Ȅ";s:2:"ȅ";s:3:"ȅ";s:2:"Ȇ";s:3:"Ȇ";s:2:"ȇ";s:3:"ȇ";s:2:"Ȉ";s:3:"Ȉ";s:2:"ȉ";s:3:"ȉ";s:2:"Ȋ";s:3:"Ȋ";s:2:"ȋ";s:3:"ȋ";s:2:"Ȍ";s:3:"Ȍ";s:2:"ȍ";s:3:"ȍ";s:2:"Ȏ";s:3:"Ȏ";s:2:"ȏ";s:3:"ȏ";s:2:"Ȑ";s:3:"Ȑ";s:2:"ȑ";s:3:"ȑ";s:2:"Ȓ";s:3:"Ȓ";s:2:"ȓ";s:3:"ȓ";s:2:"Ȕ";s:3:"Ȕ";s:2:"ȕ";s:3:"ȕ";s:2:"Ȗ";s:3:"Ȗ";s:2:"ȗ";s:3:"ȗ";s:2:"Ș";s:3:"Ș";s:2:"ș";s:3:"ș";s:2:"Ț";s:3:"Ț";s:2:"ț";s:3:"ț";s:2:"Ȟ";s:3:"Ȟ";s:2:"ȟ";s:3:"ȟ";s:2:"Ȧ";s:3:"Ȧ";s:2:"ȧ";s:3:"ȧ";s:2:"Ȩ";s:3:"Ȩ";s:2:"ȩ";s:3:"ȩ";s:2:"Ȫ";s:5:"Ȫ";s:2:"ȫ";s:5:"ȫ";s:2:"Ȭ";s:5:"Ȭ";s:2:"ȭ";s:5:"ȭ";s:2:"Ȯ";s:3:"Ȯ";s:2:"ȯ";s:3:"ȯ";s:2:"Ȱ";s:5:"Ȱ";s:2:"ȱ";s:5:"ȱ";s:2:"Ȳ";s:3:"Ȳ";s:2:"ȳ";s:3:"ȳ";s:2:"̀";s:2:"̀";s:2:"́";s:2:"́";s:2:"̓";s:2:"̓";s:2:"̈́";s:4:"̈́";s:2:"ʹ";s:2:"ʹ";s:2:";";s:1:";";s:2:"΅";s:4:"΅";s:2:"Ά";s:4:"Ά";s:2:"·";s:2:"·";s:2:"Έ";s:4:"Έ";s:2:"Ή";s:4:"Ή";s:2:"Ί";s:4:"Ί";s:2:"Ό";s:4:"Ό";s:2:"Ύ";s:4:"Ύ";s:2:"Ώ";s:4:"Ώ";s:2:"ΐ";s:6:"ΐ";s:2:"Ϊ";s:4:"Ϊ";s:2:"Ϋ";s:4:"Ϋ";s:2:"ά";s:4:"ά";s:2:"έ";s:4:"έ";s:2:"ή";s:4:"ή";s:2:"ί";s:4:"ί";s:2:"ΰ";s:6:"ΰ";s:2:"ϊ";s:4:"ϊ";s:2:"ϋ";s:4:"ϋ";s:2:"ό";s:4:"ό";s:2:"ύ";s:4:"ύ";s:2:"ώ";s:4:"ώ";s:2:"ϓ";s:4:"ϓ";s:2:"ϔ";s:4:"ϔ";s:2:"Ѐ";s:4:"Ѐ";s:2:"Ё";s:4:"Ё";s:2:"Ѓ";s:4:"Ѓ";s:2:"Ї";s:4:"Ї";s:2:"Ќ";s:4:"Ќ";s:2:"Ѝ";s:4:"Ѝ";s:2:"Ў";s:4:"Ў";s:2:"Й";s:4:"Й";s:2:"й";s:4:"й";s:2:"ѐ";s:4:"ѐ";s:2:"ё";s:4:"ё";s:2:"ѓ";s:4:"ѓ";s:2:"ї";s:4:"ї";s:2:"ќ";s:4:"ќ";s:2:"ѝ";s:4:"ѝ";s:2:"ў";s:4:"ў";s:2:"Ѷ";s:4:"Ѷ";s:2:"ѷ";s:4:"ѷ";s:2:"Ӂ";s:4:"Ӂ";s:2:"ӂ";s:4:"ӂ";s:2:"Ӑ";s:4:"Ӑ";s:2:"ӑ";s:4:"ӑ";s:2:"Ӓ";s:4:"Ӓ";s:2:"ӓ";s:4:"ӓ";s:2:"Ӗ";s:4:"Ӗ";s:2:"ӗ";s:4:"ӗ";s:2:"Ӛ";s:4:"Ӛ";s:2:"ӛ";s:4:"ӛ";s:2:"Ӝ";s:4:"Ӝ";s:2:"ӝ";s:4:"ӝ";s:2:"Ӟ";s:4:"Ӟ";s:2:"ӟ";s:4:"ӟ";s:2:"Ӣ";s:4:"Ӣ";s:2:"ӣ";s:4:"ӣ";s:2:"Ӥ";s:4:"Ӥ";s:2:"ӥ";s:4:"ӥ";s:2:"Ӧ";s:4:"Ӧ";s:2:"ӧ";s:4:"ӧ";s:2:"Ӫ";s:4:"Ӫ";s:2:"ӫ";s:4:"ӫ";s:2:"Ӭ";s:4:"Ӭ";s:2:"ӭ";s:4:"ӭ";s:2:"Ӯ";s:4:"Ӯ";s:2:"ӯ";s:4:"ӯ";s:2:"Ӱ";s:4:"Ӱ";s:2:"ӱ";s:4:"ӱ";s:2:"Ӳ";s:4:"Ӳ";s:2:"ӳ";s:4:"ӳ";s:2:"Ӵ";s:4:"Ӵ";s:2:"ӵ";s:4:"ӵ";s:2:"Ӹ";s:4:"Ӹ";s:2:"ӹ";s:4:"ӹ";s:2:"آ";s:4:"آ";s:2:"أ";s:4:"أ";s:2:"ؤ";s:4:"ؤ";s:2:"إ";s:4:"إ";s:2:"ئ";s:4:"ئ";s:2:"ۀ";s:4:"ۀ";s:2:"ۂ";s:4:"ۂ";s:2:"ۓ";s:4:"ۓ";s:3:"ऩ";s:6:"ऩ";s:3:"ऱ";s:6:"ऱ";s:3:"ऴ";s:6:"ऴ";s:3:"क़";s:6:"क़";s:3:"ख़";s:6:"ख़";s:3:"ग़";s:6:"ग़";s:3:"ज़";s:6:"ज़";s:3:"ड़";s:6:"ड़";s:3:"ढ़";s:6:"ढ़";s:3:"फ़";s:6:"फ़";s:3:"य़";s:6:"य़";s:3:"ো";s:6:"ো";s:3:"ৌ";s:6:"ৌ";s:3:"ড়";s:6:"ড়";s:3:"ঢ়";s:6:"ঢ়";s:3:"য়";s:6:"য়";s:3:"ਲ਼";s:6:"ਲ਼";s:3:"ਸ਼";s:6:"ਸ਼";s:3:"ਖ਼";s:6:"ਖ਼";s:3:"ਗ਼";s:6:"ਗ਼";s:3:"ਜ਼";s:6:"ਜ਼";s:3:"ਫ਼";s:6:"ਫ਼";s:3:"ୈ";s:6:"ୈ";s:3:"ୋ";s:6:"ୋ";s:3:"ୌ";s:6:"ୌ";s:3:"ଡ଼";s:6:"ଡ଼";s:3:"ଢ଼";s:6:"ଢ଼";s:3:"ஔ";s:6:"ஔ";s:3:"ொ";s:6:"ொ";s:3:"ோ";s:6:"ோ";s:3:"ௌ";s:6:"ௌ";s:3:"ై";s:6:"ై";s:3:"ೀ";s:6:"ೀ";s:3:"ೇ";s:6:"ೇ";s:3:"ೈ";s:6:"ೈ";s:3:"ೊ";s:6:"ೊ";s:3:"ೋ";s:9:"ೋ";s:3:"ൊ";s:6:"ൊ";s:3:"ോ";s:6:"ോ";s:3:"ൌ";s:6:"ൌ";s:3:"ේ";s:6:"ේ";s:3:"ො";s:6:"ො";s:3:"ෝ";s:9:"ෝ";s:3:"ෞ";s:6:"ෞ";s:3:"གྷ";s:6:"གྷ";s:3:"ཌྷ";s:6:"ཌྷ";s:3:"དྷ";s:6:"དྷ";s:3:"བྷ";s:6:"བྷ";s:3:"ཛྷ";s:6:"ཛྷ";s:3:"ཀྵ";s:6:"ཀྵ";s:3:"ཱི";s:6:"ཱི";s:3:"ཱུ";s:6:"ཱུ";s:3:"ྲྀ";s:6:"ྲྀ";s:3:"ླྀ";s:6:"ླྀ";s:3:"ཱྀ";s:6:"ཱྀ";s:3:"ྒྷ";s:6:"ྒྷ";s:3:"ྜྷ";s:6:"ྜྷ";s:3:"ྡྷ";s:6:"ྡྷ";s:3:"ྦྷ";s:6:"ྦྷ";s:3:"ྫྷ";s:6:"ྫྷ";s:3:"ྐྵ";s:6:"ྐྵ";s:3:"ဦ";s:6:"ဦ";s:3:"ᬆ";s:6:"ᬆ";s:3:"ᬈ";s:6:"ᬈ";s:3:"ᬊ";s:6:"ᬊ";s:3:"ᬌ";s:6:"ᬌ";s:3:"ᬎ";s:6:"ᬎ";s:3:"ᬒ";s:6:"ᬒ";s:3:"ᬻ";s:6:"ᬻ";s:3:"ᬽ";s:6:"ᬽ";s:3:"ᭀ";s:6:"ᭀ";s:3:"ᭁ";s:6:"ᭁ";s:3:"ᭃ";s:6:"ᭃ";s:3:"Ḁ";s:3:"Ḁ";s:3:"ḁ";s:3:"ḁ";s:3:"Ḃ";s:3:"Ḃ";s:3:"ḃ";s:3:"ḃ";s:3:"Ḅ";s:3:"Ḅ";s:3:"ḅ";s:3:"ḅ";s:3:"Ḇ";s:3:"Ḇ";s:3:"ḇ";s:3:"ḇ";s:3:"Ḉ";s:5:"Ḉ";s:3:"ḉ";s:5:"ḉ";s:3:"Ḋ";s:3:"Ḋ";s:3:"ḋ";s:3:"ḋ";s:3:"Ḍ";s:3:"Ḍ";s:3:"ḍ";s:3:"ḍ";s:3:"Ḏ";s:3:"Ḏ";s:3:"ḏ";s:3:"ḏ";s:3:"Ḑ";s:3:"Ḑ";s:3:"ḑ";s:3:"ḑ";s:3:"Ḓ";s:3:"Ḓ";s:3:"ḓ";s:3:"ḓ";s:3:"Ḕ";s:5:"Ḕ";s:3:"ḕ";s:5:"ḕ";s:3:"Ḗ";s:5:"Ḗ";s:3:"ḗ";s:5:"ḗ";s:3:"Ḙ";s:3:"Ḙ";s:3:"ḙ";s:3:"ḙ";s:3:"Ḛ";s:3:"Ḛ";s:3:"ḛ";s:3:"ḛ";s:3:"Ḝ";s:5:"Ḝ";s:3:"ḝ";s:5:"ḝ";s:3:"Ḟ";s:3:"Ḟ";s:3:"ḟ";s:3:"ḟ";s:3:"Ḡ";s:3:"Ḡ";s:3:"ḡ";s:3:"ḡ";s:3:"Ḣ";s:3:"Ḣ";s:3:"ḣ";s:3:"ḣ";s:3:"Ḥ";s:3:"Ḥ";s:3:"ḥ";s:3:"ḥ";s:3:"Ḧ";s:3:"Ḧ";s:3:"ḧ";s:3:"ḧ";s:3:"Ḩ";s:3:"Ḩ";s:3:"ḩ";s:3:"ḩ";s:3:"Ḫ";s:3:"Ḫ";s:3:"ḫ";s:3:"ḫ";s:3:"Ḭ";s:3:"Ḭ";s:3:"ḭ";s:3:"ḭ";s:3:"Ḯ";s:5:"Ḯ";s:3:"ḯ";s:5:"ḯ";s:3:"Ḱ";s:3:"Ḱ";s:3:"ḱ";s:3:"ḱ";s:3:"Ḳ";s:3:"Ḳ";s:3:"ḳ";s:3:"ḳ";s:3:"Ḵ";s:3:"Ḵ";s:3:"ḵ";s:3:"ḵ";s:3:"Ḷ";s:3:"Ḷ";s:3:"ḷ";s:3:"ḷ";s:3:"Ḹ";s:5:"Ḹ";s:3:"ḹ";s:5:"ḹ";s:3:"Ḻ";s:3:"Ḻ";s:3:"ḻ";s:3:"ḻ";s:3:"Ḽ";s:3:"Ḽ";s:3:"ḽ";s:3:"ḽ";s:3:"Ḿ";s:3:"Ḿ";s:3:"ḿ";s:3:"ḿ";s:3:"Ṁ";s:3:"Ṁ";s:3:"ṁ";s:3:"ṁ";s:3:"Ṃ";s:3:"Ṃ";s:3:"ṃ";s:3:"ṃ";s:3:"Ṅ";s:3:"Ṅ";s:3:"ṅ";s:3:"ṅ";s:3:"Ṇ";s:3:"Ṇ";s:3:"ṇ";s:3:"ṇ";s:3:"Ṉ";s:3:"Ṉ";s:3:"ṉ";s:3:"ṉ";s:3:"Ṋ";s:3:"Ṋ";s:3:"ṋ";s:3:"ṋ";s:3:"Ṍ";s:5:"Ṍ";s:3:"ṍ";s:5:"ṍ";s:3:"Ṏ";s:5:"Ṏ";s:3:"ṏ";s:5:"ṏ";s:3:"Ṑ";s:5:"Ṑ";s:3:"ṑ";s:5:"ṑ";s:3:"Ṓ";s:5:"Ṓ";s:3:"ṓ";s:5:"ṓ";s:3:"Ṕ";s:3:"Ṕ";s:3:"ṕ";s:3:"ṕ";s:3:"Ṗ";s:3:"Ṗ";s:3:"ṗ";s:3:"ṗ";s:3:"Ṙ";s:3:"Ṙ";s:3:"ṙ";s:3:"ṙ";s:3:"Ṛ";s:3:"Ṛ";s:3:"ṛ";s:3:"ṛ";s:3:"Ṝ";s:5:"Ṝ";s:3:"ṝ";s:5:"ṝ";s:3:"Ṟ";s:3:"Ṟ";s:3:"ṟ";s:3:"ṟ";s:3:"Ṡ";s:3:"Ṡ";s:3:"ṡ";s:3:"ṡ";s:3:"Ṣ";s:3:"Ṣ";s:3:"ṣ";s:3:"ṣ";s:3:"Ṥ";s:5:"Ṥ";s:3:"ṥ";s:5:"ṥ";s:3:"Ṧ";s:5:"Ṧ";s:3:"ṧ";s:5:"ṧ";s:3:"Ṩ";s:5:"Ṩ";s:3:"ṩ";s:5:"ṩ";s:3:"Ṫ";s:3:"Ṫ";s:3:"ṫ";s:3:"ṫ";s:3:"Ṭ";s:3:"Ṭ";s:3:"ṭ";s:3:"ṭ";s:3:"Ṯ";s:3:"Ṯ";s:3:"ṯ";s:3:"ṯ";s:3:"Ṱ";s:3:"Ṱ";s:3:"ṱ";s:3:"ṱ";s:3:"Ṳ";s:3:"Ṳ";s:3:"ṳ";s:3:"ṳ";s:3:"Ṵ";s:3:"Ṵ";s:3:"ṵ";s:3:"ṵ";s:3:"Ṷ";s:3:"Ṷ";s:3:"ṷ";s:3:"ṷ";s:3:"Ṹ";s:5:"Ṹ";s:3:"ṹ";s:5:"ṹ";s:3:"Ṻ";s:5:"Ṻ";s:3:"ṻ";s:5:"ṻ";s:3:"Ṽ";s:3:"Ṽ";s:3:"ṽ";s:3:"ṽ";s:3:"Ṿ";s:3:"Ṿ";s:3:"ṿ";s:3:"ṿ";s:3:"Ẁ";s:3:"Ẁ";s:3:"ẁ";s:3:"ẁ";s:3:"Ẃ";s:3:"Ẃ";s:3:"ẃ";s:3:"ẃ";s:3:"Ẅ";s:3:"Ẅ";s:3:"ẅ";s:3:"ẅ";s:3:"Ẇ";s:3:"Ẇ";s:3:"ẇ";s:3:"ẇ";s:3:"Ẉ";s:3:"Ẉ";s:3:"ẉ";s:3:"ẉ";s:3:"Ẋ";s:3:"Ẋ";s:3:"ẋ";s:3:"ẋ";s:3:"Ẍ";s:3:"Ẍ";s:3:"ẍ";s:3:"ẍ";s:3:"Ẏ";s:3:"Ẏ";s:3:"ẏ";s:3:"ẏ";s:3:"Ẑ";s:3:"Ẑ";s:3:"ẑ";s:3:"ẑ";s:3:"Ẓ";s:3:"Ẓ";s:3:"ẓ";s:3:"ẓ";s:3:"Ẕ";s:3:"Ẕ";s:3:"ẕ";s:3:"ẕ";s:3:"ẖ";s:3:"ẖ";s:3:"ẗ";s:3:"ẗ";s:3:"ẘ";s:3:"ẘ";s:3:"ẙ";s:3:"ẙ";s:3:"ẛ";s:4:"ẛ";s:3:"Ạ";s:3:"Ạ";s:3:"ạ";s:3:"ạ";s:3:"Ả";s:3:"Ả";s:3:"ả";s:3:"ả";s:3:"Ấ";s:5:"Ấ";s:3:"ấ";s:5:"ấ";s:3:"Ầ";s:5:"Ầ";s:3:"ầ";s:5:"ầ";s:3:"Ẩ";s:5:"Ẩ";s:3:"ẩ";s:5:"ẩ";s:3:"Ẫ";s:5:"Ẫ";s:3:"ẫ";s:5:"ẫ";s:3:"Ậ";s:5:"Ậ";s:3:"ậ";s:5:"ậ";s:3:"Ắ";s:5:"Ắ";s:3:"ắ";s:5:"ắ";s:3:"Ằ";s:5:"Ằ";s:3:"ằ";s:5:"ằ";s:3:"Ẳ";s:5:"Ẳ";s:3:"ẳ";s:5:"ẳ";s:3:"Ẵ";s:5:"Ẵ";s:3:"ẵ";s:5:"ẵ";s:3:"Ặ";s:5:"Ặ";s:3:"ặ";s:5:"ặ";s:3:"Ẹ";s:3:"Ẹ";s:3:"ẹ";s:3:"ẹ";s:3:"Ẻ";s:3:"Ẻ";s:3:"ẻ";s:3:"ẻ";s:3:"Ẽ";s:3:"Ẽ";s:3:"ẽ";s:3:"ẽ";s:3:"Ế";s:5:"Ế";s:3:"ế";s:5:"ế";s:3:"Ề";s:5:"Ề";s:3:"ề";s:5:"ề";s:3:"Ể";s:5:"Ể";s:3:"ể";s:5:"ể";s:3:"Ễ";s:5:"Ễ";s:3:"ễ";s:5:"ễ";s:3:"Ệ";s:5:"Ệ";s:3:"ệ";s:5:"ệ";s:3:"Ỉ";s:3:"Ỉ";s:3:"ỉ";s:3:"ỉ";s:3:"Ị";s:3:"Ị";s:3:"ị";s:3:"ị";s:3:"Ọ";s:3:"Ọ";s:3:"ọ";s:3:"ọ";s:3:"Ỏ";s:3:"Ỏ";s:3:"ỏ";s:3:"ỏ";s:3:"Ố";s:5:"Ố";s:3:"ố";s:5:"ố";s:3:"Ồ";s:5:"Ồ";s:3:"ồ";s:5:"ồ";s:3:"Ổ";s:5:"Ổ";s:3:"ổ";s:5:"ổ";s:3:"Ỗ";s:5:"Ỗ";s:3:"ỗ";s:5:"ỗ";s:3:"Ộ";s:5:"Ộ";s:3:"ộ";s:5:"ộ";s:3:"Ớ";s:5:"Ớ";s:3:"ớ";s:5:"ớ";s:3:"Ờ";s:5:"Ờ";s:3:"ờ";s:5:"ờ";s:3:"Ở";s:5:"Ở";s:3:"ở";s:5:"ở";s:3:"Ỡ";s:5:"Ỡ";s:3:"ỡ";s:5:"ỡ";s:3:"Ợ";s:5:"Ợ";s:3:"ợ";s:5:"ợ";s:3:"Ụ";s:3:"Ụ";s:3:"ụ";s:3:"ụ";s:3:"Ủ";s:3:"Ủ";s:3:"ủ";s:3:"ủ";s:3:"Ứ";s:5:"Ứ";s:3:"ứ";s:5:"ứ";s:3:"Ừ";s:5:"Ừ";s:3:"ừ";s:5:"ừ";s:3:"Ử";s:5:"Ử";s:3:"ử";s:5:"ử";s:3:"Ữ";s:5:"Ữ";s:3:"ữ";s:5:"ữ";s:3:"Ự";s:5:"Ự";s:3:"ự";s:5:"ự";s:3:"Ỳ";s:3:"Ỳ";s:3:"ỳ";s:3:"ỳ";s:3:"Ỵ";s:3:"Ỵ";s:3:"ỵ";s:3:"ỵ";s:3:"Ỷ";s:3:"Ỷ";s:3:"ỷ";s:3:"ỷ";s:3:"Ỹ";s:3:"Ỹ";s:3:"ỹ";s:3:"ỹ";s:3:"ἀ";s:4:"ἀ";s:3:"ἁ";s:4:"ἁ";s:3:"ἂ";s:6:"ἂ";s:3:"ἃ";s:6:"ἃ";s:3:"ἄ";s:6:"ἄ";s:3:"ἅ";s:6:"ἅ";s:3:"ἆ";s:6:"ἆ";s:3:"ἇ";s:6:"ἇ";s:3:"Ἀ";s:4:"Ἀ";s:3:"Ἁ";s:4:"Ἁ";s:3:"Ἂ";s:6:"Ἂ";s:3:"Ἃ";s:6:"Ἃ";s:3:"Ἄ";s:6:"Ἄ";s:3:"Ἅ";s:6:"Ἅ";s:3:"Ἆ";s:6:"Ἆ";s:3:"Ἇ";s:6:"Ἇ";s:3:"ἐ";s:4:"ἐ";s:3:"ἑ";s:4:"ἑ";s:3:"ἒ";s:6:"ἒ";s:3:"ἓ";s:6:"ἓ";s:3:"ἔ";s:6:"ἔ";s:3:"ἕ";s:6:"ἕ";s:3:"Ἐ";s:4:"Ἐ";s:3:"Ἑ";s:4:"Ἑ";s:3:"Ἒ";s:6:"Ἒ";s:3:"Ἓ";s:6:"Ἓ";s:3:"Ἔ";s:6:"Ἔ";s:3:"Ἕ";s:6:"Ἕ";s:3:"ἠ";s:4:"ἠ";s:3:"ἡ";s:4:"ἡ";s:3:"ἢ";s:6:"ἢ";s:3:"ἣ";s:6:"ἣ";s:3:"ἤ";s:6:"ἤ";s:3:"ἥ";s:6:"ἥ";s:3:"ἦ";s:6:"ἦ";s:3:"ἧ";s:6:"ἧ";s:3:"Ἠ";s:4:"Ἠ";s:3:"Ἡ";s:4:"Ἡ";s:3:"Ἢ";s:6:"Ἢ";s:3:"Ἣ";s:6:"Ἣ";s:3:"Ἤ";s:6:"Ἤ";s:3:"Ἥ";s:6:"Ἥ";s:3:"Ἦ";s:6:"Ἦ";s:3:"Ἧ";s:6:"Ἧ";s:3:"ἰ";s:4:"ἰ";s:3:"ἱ";s:4:"ἱ";s:3:"ἲ";s:6:"ἲ";s:3:"ἳ";s:6:"ἳ";s:3:"ἴ";s:6:"ἴ";s:3:"ἵ";s:6:"ἵ";s:3:"ἶ";s:6:"ἶ";s:3:"ἷ";s:6:"ἷ";s:3:"Ἰ";s:4:"Ἰ";s:3:"Ἱ";s:4:"Ἱ";s:3:"Ἲ";s:6:"Ἲ";s:3:"Ἳ";s:6:"Ἳ";s:3:"Ἴ";s:6:"Ἴ";s:3:"Ἵ";s:6:"Ἵ";s:3:"Ἶ";s:6:"Ἶ";s:3:"Ἷ";s:6:"Ἷ";s:3:"ὀ";s:4:"ὀ";s:3:"ὁ";s:4:"ὁ";s:3:"ὂ";s:6:"ὂ";s:3:"ὃ";s:6:"ὃ";s:3:"ὄ";s:6:"ὄ";s:3:"ὅ";s:6:"ὅ";s:3:"Ὀ";s:4:"Ὀ";s:3:"Ὁ";s:4:"Ὁ";s:3:"Ὂ";s:6:"Ὂ";s:3:"Ὃ";s:6:"Ὃ";s:3:"Ὄ";s:6:"Ὄ";s:3:"Ὅ";s:6:"Ὅ";s:3:"ὐ";s:4:"ὐ";s:3:"ὑ";s:4:"ὑ";s:3:"ὒ";s:6:"ὒ";s:3:"ὓ";s:6:"ὓ";s:3:"ὔ";s:6:"ὔ";s:3:"ὕ";s:6:"ὕ";s:3:"ὖ";s:6:"ὖ";s:3:"ὗ";s:6:"ὗ";s:3:"Ὑ";s:4:"Ὑ";s:3:"Ὓ";s:6:"Ὓ";s:3:"Ὕ";s:6:"Ὕ";s:3:"Ὗ";s:6:"Ὗ";s:3:"ὠ";s:4:"ὠ";s:3:"ὡ";s:4:"ὡ";s:3:"ὢ";s:6:"ὢ";s:3:"ὣ";s:6:"ὣ";s:3:"ὤ";s:6:"ὤ";s:3:"ὥ";s:6:"ὥ";s:3:"ὦ";s:6:"ὦ";s:3:"ὧ";s:6:"ὧ";s:3:"Ὠ";s:4:"Ὠ";s:3:"Ὡ";s:4:"Ὡ";s:3:"Ὢ";s:6:"Ὢ";s:3:"Ὣ";s:6:"Ὣ";s:3:"Ὤ";s:6:"Ὤ";s:3:"Ὥ";s:6:"Ὥ";s:3:"Ὦ";s:6:"Ὦ";s:3:"Ὧ";s:6:"Ὧ";s:3:"ὰ";s:4:"ὰ";s:3:"ά";s:4:"ά";s:3:"ὲ";s:4:"ὲ";s:3:"έ";s:4:"έ";s:3:"ὴ";s:4:"ὴ";s:3:"ή";s:4:"ή";s:3:"ὶ";s:4:"ὶ";s:3:"ί";s:4:"ί";s:3:"ὸ";s:4:"ὸ";s:3:"ό";s:4:"ό";s:3:"ὺ";s:4:"ὺ";s:3:"ύ";s:4:"ύ";s:3:"ὼ";s:4:"ὼ";s:3:"ώ";s:4:"ώ";s:3:"ᾀ";s:6:"ᾀ";s:3:"ᾁ";s:6:"ᾁ";s:3:"ᾂ";s:8:"ᾂ";s:3:"ᾃ";s:8:"ᾃ";s:3:"ᾄ";s:8:"ᾄ";s:3:"ᾅ";s:8:"ᾅ";s:3:"ᾆ";s:8:"ᾆ";s:3:"ᾇ";s:8:"ᾇ";s:3:"ᾈ";s:6:"ᾈ";s:3:"ᾉ";s:6:"ᾉ";s:3:"ᾊ";s:8:"ᾊ";s:3:"ᾋ";s:8:"ᾋ";s:3:"ᾌ";s:8:"ᾌ";s:3:"ᾍ";s:8:"ᾍ";s:3:"ᾎ";s:8:"ᾎ";s:3:"ᾏ";s:8:"ᾏ";s:3:"ᾐ";s:6:"ᾐ";s:3:"ᾑ";s:6:"ᾑ";s:3:"ᾒ";s:8:"ᾒ";s:3:"ᾓ";s:8:"ᾓ";s:3:"ᾔ";s:8:"ᾔ";s:3:"ᾕ";s:8:"ᾕ";s:3:"ᾖ";s:8:"ᾖ";s:3:"ᾗ";s:8:"ᾗ";s:3:"ᾘ";s:6:"ᾘ";s:3:"ᾙ";s:6:"ᾙ";s:3:"ᾚ";s:8:"ᾚ";s:3:"ᾛ";s:8:"ᾛ";s:3:"ᾜ";s:8:"ᾜ";s:3:"ᾝ";s:8:"ᾝ";s:3:"ᾞ";s:8:"ᾞ";s:3:"ᾟ";s:8:"ᾟ";s:3:"ᾠ";s:6:"ᾠ";s:3:"ᾡ";s:6:"ᾡ";s:3:"ᾢ";s:8:"ᾢ";s:3:"ᾣ";s:8:"ᾣ";s:3:"ᾤ";s:8:"ᾤ";s:3:"ᾥ";s:8:"ᾥ";s:3:"ᾦ";s:8:"ᾦ";s:3:"ᾧ";s:8:"ᾧ";s:3:"ᾨ";s:6:"ᾨ";s:3:"ᾩ";s:6:"ᾩ";s:3:"ᾪ";s:8:"ᾪ";s:3:"ᾫ";s:8:"ᾫ";s:3:"ᾬ";s:8:"ᾬ";s:3:"ᾭ";s:8:"ᾭ";s:3:"ᾮ";s:8:"ᾮ";s:3:"ᾯ";s:8:"ᾯ";s:3:"ᾰ";s:4:"ᾰ";s:3:"ᾱ";s:4:"ᾱ";s:3:"ᾲ";s:6:"ᾲ";s:3:"ᾳ";s:4:"ᾳ";s:3:"ᾴ";s:6:"ᾴ";s:3:"ᾶ";s:4:"ᾶ";s:3:"ᾷ";s:6:"ᾷ";s:3:"Ᾰ";s:4:"Ᾰ";s:3:"Ᾱ";s:4:"Ᾱ";s:3:"Ὰ";s:4:"Ὰ";s:3:"Ά";s:4:"Ά";s:3:"ᾼ";s:4:"ᾼ";s:3:"ι";s:2:"ι";s:3:"῁";s:4:"῁";s:3:"ῂ";s:6:"ῂ";s:3:"ῃ";s:4:"ῃ";s:3:"ῄ";s:6:"ῄ";s:3:"ῆ";s:4:"ῆ";s:3:"ῇ";s:6:"ῇ";s:3:"Ὲ";s:4:"Ὲ";s:3:"Έ";s:4:"Έ";s:3:"Ὴ";s:4:"Ὴ";s:3:"Ή";s:4:"Ή";s:3:"ῌ";s:4:"ῌ";s:3:"῍";s:5:"῍";s:3:"῎";s:5:"῎";s:3:"῏";s:5:"῏";s:3:"ῐ";s:4:"ῐ";s:3:"ῑ";s:4:"ῑ";s:3:"ῒ";s:6:"ῒ";s:3:"ΐ";s:6:"ΐ";s:3:"ῖ";s:4:"ῖ";s:3:"ῗ";s:6:"ῗ";s:3:"Ῐ";s:4:"Ῐ";s:3:"Ῑ";s:4:"Ῑ";s:3:"Ὶ";s:4:"Ὶ";s:3:"Ί";s:4:"Ί";s:3:"῝";s:5:"῝";s:3:"῞";s:5:"῞";s:3:"῟";s:5:"῟";s:3:"ῠ";s:4:"ῠ";s:3:"ῡ";s:4:"ῡ";s:3:"ῢ";s:6:"ῢ";s:3:"ΰ";s:6:"ΰ";s:3:"ῤ";s:4:"ῤ";s:3:"ῥ";s:4:"ῥ";s:3:"ῦ";s:4:"ῦ";s:3:"ῧ";s:6:"ῧ";s:3:"Ῠ";s:4:"Ῠ";s:3:"Ῡ";s:4:"Ῡ";s:3:"Ὺ";s:4:"Ὺ";s:3:"Ύ";s:4:"Ύ";s:3:"Ῥ";s:4:"Ῥ";s:3:"῭";s:4:"῭";s:3:"΅";s:4:"΅";s:3:"`";s:1:"`";s:3:"ῲ";s:6:"ῲ";s:3:"ῳ";s:4:"ῳ";s:3:"ῴ";s:6:"ῴ";s:3:"ῶ";s:4:"ῶ";s:3:"ῷ";s:6:"ῷ";s:3:"Ὸ";s:4:"Ὸ";s:3:"Ό";s:4:"Ό";s:3:"Ὼ";s:4:"Ὼ";s:3:"Ώ";s:4:"Ώ";s:3:"ῼ";s:4:"ῼ";s:3:"´";s:2:"´";s:3:" ";s:3:" ";s:3:" ";s:3:" ";s:3:"Ω";s:2:"Ω";s:3:"K";s:1:"K";s:3:"Å";s:3:"Å";s:3:"↚";s:5:"↚";s:3:"↛";s:5:"↛";s:3:"↮";s:5:"↮";s:3:"⇍";s:5:"⇍";s:3:"⇎";s:5:"⇎";s:3:"⇏";s:5:"⇏";s:3:"∄";s:5:"∄";s:3:"∉";s:5:"∉";s:3:"∌";s:5:"∌";s:3:"∤";s:5:"∤";s:3:"∦";s:5:"∦";s:3:"≁";s:5:"≁";s:3:"≄";s:5:"≄";s:3:"≇";s:5:"≇";s:3:"≉";s:5:"≉";s:3:"≠";s:3:"≠";s:3:"≢";s:5:"≢";s:3:"≭";s:5:"≭";s:3:"≮";s:3:"≮";s:3:"≯";s:3:"≯";s:3:"≰";s:5:"≰";s:3:"≱";s:5:"≱";s:3:"≴";s:5:"≴";s:3:"≵";s:5:"≵";s:3:"≸";s:5:"≸";s:3:"≹";s:5:"≹";s:3:"⊀";s:5:"⊀";s:3:"⊁";s:5:"⊁";s:3:"⊄";s:5:"⊄";s:3:"⊅";s:5:"⊅";s:3:"⊈";s:5:"⊈";s:3:"⊉";s:5:"⊉";s:3:"⊬";s:5:"⊬";s:3:"⊭";s:5:"⊭";s:3:"⊮";s:5:"⊮";s:3:"⊯";s:5:"⊯";s:3:"⋠";s:5:"⋠";s:3:"⋡";s:5:"⋡";s:3:"⋢";s:5:"⋢";s:3:"⋣";s:5:"⋣";s:3:"⋪";s:5:"⋪";s:3:"⋫";s:5:"⋫";s:3:"⋬";s:5:"⋬";s:3:"⋭";s:5:"⋭";s:3:"〈";s:3:"〈";s:3:"〉";s:3:"〉";s:3:"⫝̸";s:5:"⫝̸";s:3:"が";s:6:"が";s:3:"ぎ";s:6:"ぎ";s:3:"ぐ";s:6:"ぐ";s:3:"げ";s:6:"げ";s:3:"ご";s:6:"ご";s:3:"ざ";s:6:"ざ";s:3:"じ";s:6:"じ";s:3:"ず";s:6:"ず";s:3:"ぜ";s:6:"ぜ";s:3:"ぞ";s:6:"ぞ";s:3:"だ";s:6:"だ";s:3:"ぢ";s:6:"ぢ";s:3:"づ";s:6:"づ";s:3:"で";s:6:"で";s:3:"ど";s:6:"ど";s:3:"ば";s:6:"ば";s:3:"ぱ";s:6:"ぱ";s:3:"び";s:6:"び";s:3:"ぴ";s:6:"ぴ";s:3:"ぶ";s:6:"ぶ";s:3:"ぷ";s:6:"ぷ";s:3:"べ";s:6:"べ";s:3:"ぺ";s:6:"ぺ";s:3:"ぼ";s:6:"ぼ";s:3:"ぽ";s:6:"ぽ";s:3:"ゔ";s:6:"ゔ";s:3:"ゞ";s:6:"ゞ";s:3:"ガ";s:6:"ガ";s:3:"ギ";s:6:"ギ";s:3:"グ";s:6:"グ";s:3:"ゲ";s:6:"ゲ";s:3:"ゴ";s:6:"ゴ";s:3:"ザ";s:6:"ザ";s:3:"ジ";s:6:"ジ";s:3:"ズ";s:6:"ズ";s:3:"ゼ";s:6:"ゼ";s:3:"ゾ";s:6:"ゾ";s:3:"ダ";s:6:"ダ";s:3:"ヂ";s:6:"ヂ";s:3:"ヅ";s:6:"ヅ";s:3:"デ";s:6:"デ";s:3:"ド";s:6:"ド";s:3:"バ";s:6:"バ";s:3:"パ";s:6:"パ";s:3:"ビ";s:6:"ビ";s:3:"ピ";s:6:"ピ";s:3:"ブ";s:6:"ブ";s:3:"プ";s:6:"プ";s:3:"ベ";s:6:"ベ";s:3:"ペ";s:6:"ペ";s:3:"ボ";s:6:"ボ";s:3:"ポ";s:6:"ポ";s:3:"ヴ";s:6:"ヴ";s:3:"ヷ";s:6:"ヷ";s:3:"ヸ";s:6:"ヸ";s:3:"ヹ";s:6:"ヹ";s:3:"ヺ";s:6:"ヺ";s:3:"ヾ";s:6:"ヾ";s:3:"豈";s:3:"豈";s:3:"更";s:3:"更";s:3:"車";s:3:"車";s:3:"賈";s:3:"賈";s:3:"滑";s:3:"滑";s:3:"串";s:3:"串";s:3:"句";s:3:"句";s:3:"龜";s:3:"龜";s:3:"龜";s:3:"龜";s:3:"契";s:3:"契";s:3:"金";s:3:"金";s:3:"喇";s:3:"喇";s:3:"奈";s:3:"奈";s:3:"懶";s:3:"懶";s:3:"癩";s:3:"癩";s:3:"羅";s:3:"羅";s:3:"蘿";s:3:"蘿";s:3:"螺";s:3:"螺";s:3:"裸";s:3:"裸";s:3:"邏";s:3:"邏";s:3:"樂";s:3:"樂";s:3:"洛";s:3:"洛";s:3:"烙";s:3:"烙";s:3:"珞";s:3:"珞";s:3:"落";s:3:"落";s:3:"酪";s:3:"酪";s:3:"駱";s:3:"駱";s:3:"亂";s:3:"亂";s:3:"卵";s:3:"卵";s:3:"欄";s:3:"欄";s:3:"爛";s:3:"爛";s:3:"蘭";s:3:"蘭";s:3:"鸞";s:3:"鸞";s:3:"嵐";s:3:"嵐";s:3:"濫";s:3:"濫";s:3:"藍";s:3:"藍";s:3:"襤";s:3:"襤";s:3:"拉";s:3:"拉";s:3:"臘";s:3:"臘";s:3:"蠟";s:3:"蠟";s:3:"廊";s:3:"廊";s:3:"朗";s:3:"朗";s:3:"浪";s:3:"浪";s:3:"狼";s:3:"狼";s:3:"郎";s:3:"郎";s:3:"來";s:3:"來";s:3:"冷";s:3:"冷";s:3:"勞";s:3:"勞";s:3:"擄";s:3:"擄";s:3:"櫓";s:3:"櫓";s:3:"爐";s:3:"爐";s:3:"盧";s:3:"盧";s:3:"老";s:3:"老";s:3:"蘆";s:3:"蘆";s:3:"虜";s:3:"虜";s:3:"路";s:3:"路";s:3:"露";s:3:"露";s:3:"魯";s:3:"魯";s:3:"鷺";s:3:"鷺";s:3:"碌";s:3:"碌";s:3:"祿";s:3:"祿";s:3:"綠";s:3:"綠";s:3:"菉";s:3:"菉";s:3:"錄";s:3:"錄";s:3:"鹿";s:3:"鹿";s:3:"論";s:3:"論";s:3:"壟";s:3:"壟";s:3:"弄";s:3:"弄";s:3:"籠";s:3:"籠";s:3:"聾";s:3:"聾";s:3:"牢";s:3:"牢";s:3:"磊";s:3:"磊";s:3:"賂";s:3:"賂";s:3:"雷";s:3:"雷";s:3:"壘";s:3:"壘";s:3:"屢";s:3:"屢";s:3:"樓";s:3:"樓";s:3:"淚";s:3:"淚";s:3:"漏";s:3:"漏";s:3:"累";s:3:"累";s:3:"縷";s:3:"縷";s:3:"陋";s:3:"陋";s:3:"勒";s:3:"勒";s:3:"肋";s:3:"肋";s:3:"凜";s:3:"凜";s:3:"凌";s:3:"凌";s:3:"稜";s:3:"稜";s:3:"綾";s:3:"綾";s:3:"菱";s:3:"菱";s:3:"陵";s:3:"陵";s:3:"讀";s:3:"讀";s:3:"拏";s:3:"拏";s:3:"樂";s:3:"樂";s:3:"諾";s:3:"諾";s:3:"丹";s:3:"丹";s:3:"寧";s:3:"寧";s:3:"怒";s:3:"怒";s:3:"率";s:3:"率";s:3:"異";s:3:"異";s:3:"北";s:3:"北";s:3:"磻";s:3:"磻";s:3:"便";s:3:"便";s:3:"復";s:3:"復";s:3:"不";s:3:"不";s:3:"泌";s:3:"泌";s:3:"數";s:3:"數";s:3:"索";s:3:"索";s:3:"參";s:3:"參";s:3:"塞";s:3:"塞";s:3:"省";s:3:"省";s:3:"葉";s:3:"葉";s:3:"說";s:3:"說";s:3:"殺";s:3:"殺";s:3:"辰";s:3:"辰";s:3:"沈";s:3:"沈";s:3:"拾";s:3:"拾";s:3:"若";s:3:"若";s:3:"掠";s:3:"掠";s:3:"略";s:3:"略";s:3:"亮";s:3:"亮";s:3:"兩";s:3:"兩";s:3:"凉";s:3:"凉";s:3:"梁";s:3:"梁";s:3:"糧";s:3:"糧";s:3:"良";s:3:"良";s:3:"諒";s:3:"諒";s:3:"量";s:3:"量";s:3:"勵";s:3:"勵";s:3:"呂";s:3:"呂";s:3:"女";s:3:"女";s:3:"廬";s:3:"廬";s:3:"旅";s:3:"旅";s:3:"濾";s:3:"濾";s:3:"礪";s:3:"礪";s:3:"閭";s:3:"閭";s:3:"驪";s:3:"驪";s:3:"麗";s:3:"麗";s:3:"黎";s:3:"黎";s:3:"力";s:3:"力";s:3:"曆";s:3:"曆";s:3:"歷";s:3:"歷";s:3:"轢";s:3:"轢";s:3:"年";s:3:"年";s:3:"憐";s:3:"憐";s:3:"戀";s:3:"戀";s:3:"撚";s:3:"撚";s:3:"漣";s:3:"漣";s:3:"煉";s:3:"煉";s:3:"璉";s:3:"璉";s:3:"秊";s:3:"秊";s:3:"練";s:3:"練";s:3:"聯";s:3:"聯";s:3:"輦";s:3:"輦";s:3:"蓮";s:3:"蓮";s:3:"連";s:3:"連";s:3:"鍊";s:3:"鍊";s:3:"列";s:3:"列";s:3:"劣";s:3:"劣";s:3:"咽";s:3:"咽";s:3:"烈";s:3:"烈";s:3:"裂";s:3:"裂";s:3:"說";s:3:"說";s:3:"廉";s:3:"廉";s:3:"念";s:3:"念";s:3:"捻";s:3:"捻";s:3:"殮";s:3:"殮";s:3:"簾";s:3:"簾";s:3:"獵";s:3:"獵";s:3:"令";s:3:"令";s:3:"囹";s:3:"囹";s:3:"寧";s:3:"寧";s:3:"嶺";s:3:"嶺";s:3:"怜";s:3:"怜";s:3:"玲";s:3:"玲";s:3:"瑩";s:3:"瑩";s:3:"羚";s:3:"羚";s:3:"聆";s:3:"聆";s:3:"鈴";s:3:"鈴";s:3:"零";s:3:"零";s:3:"靈";s:3:"靈";s:3:"領";s:3:"領";s:3:"例";s:3:"例";s:3:"禮";s:3:"禮";s:3:"醴";s:3:"醴";s:3:"隸";s:3:"隸";s:3:"惡";s:3:"惡";s:3:"了";s:3:"了";s:3:"僚";s:3:"僚";s:3:"寮";s:3:"寮";s:3:"尿";s:3:"尿";s:3:"料";s:3:"料";s:3:"樂";s:3:"樂";s:3:"燎";s:3:"燎";s:3:"療";s:3:"療";s:3:"蓼";s:3:"蓼";s:3:"遼";s:3:"遼";s:3:"龍";s:3:"龍";s:3:"暈";s:3:"暈";s:3:"阮";s:3:"阮";s:3:"劉";s:3:"劉";s:3:"杻";s:3:"杻";s:3:"柳";s:3:"柳";s:3:"流";s:3:"流";s:3:"溜";s:3:"溜";s:3:"琉";s:3:"琉";s:3:"留";s:3:"留";s:3:"硫";s:3:"硫";s:3:"紐";s:3:"紐";s:3:"類";s:3:"類";s:3:"六";s:3:"六";s:3:"戮";s:3:"戮";s:3:"陸";s:3:"陸";s:3:"倫";s:3:"倫";s:3:"崙";s:3:"崙";s:3:"淪";s:3:"淪";s:3:"輪";s:3:"輪";s:3:"律";s:3:"律";s:3:"慄";s:3:"慄";s:3:"栗";s:3:"栗";s:3:"率";s:3:"率";s:3:"隆";s:3:"隆";s:3:"利";s:3:"利";s:3:"吏";s:3:"吏";s:3:"履";s:3:"履";s:3:"易";s:3:"易";s:3:"李";s:3:"李";s:3:"梨";s:3:"梨";s:3:"泥";s:3:"泥";s:3:"理";s:3:"理";s:3:"痢";s:3:"痢";s:3:"罹";s:3:"罹";s:3:"裏";s:3:"裏";s:3:"裡";s:3:"裡";s:3:"里";s:3:"里";s:3:"離";s:3:"離";s:3:"匿";s:3:"匿";s:3:"溺";s:3:"溺";s:3:"吝";s:3:"吝";s:3:"燐";s:3:"燐";s:3:"璘";s:3:"璘";s:3:"藺";s:3:"藺";s:3:"隣";s:3:"隣";s:3:"鱗";s:3:"鱗";s:3:"麟";s:3:"麟";s:3:"林";s:3:"林";s:3:"淋";s:3:"淋";s:3:"臨";s:3:"臨";s:3:"立";s:3:"立";s:3:"笠";s:3:"笠";s:3:"粒";s:3:"粒";s:3:"狀";s:3:"狀";s:3:"炙";s:3:"炙";s:3:"識";s:3:"識";s:3:"什";s:3:"什";s:3:"茶";s:3:"茶";s:3:"刺";s:3:"刺";s:3:"切";s:3:"切";s:3:"度";s:3:"度";s:3:"拓";s:3:"拓";s:3:"糖";s:3:"糖";s:3:"宅";s:3:"宅";s:3:"洞";s:3:"洞";s:3:"暴";s:3:"暴";s:3:"輻";s:3:"輻";s:3:"行";s:3:"行";s:3:"降";s:3:"降";s:3:"見";s:3:"見";s:3:"廓";s:3:"廓";s:3:"兀";s:3:"兀";s:3:"嗀";s:3:"嗀";s:3:"塚";s:3:"塚";s:3:"晴";s:3:"晴";s:3:"凞";s:3:"凞";s:3:"猪";s:3:"猪";s:3:"益";s:3:"益";s:3:"礼";s:3:"礼";s:3:"神";s:3:"神";s:3:"祥";s:3:"祥";s:3:"福";s:3:"福";s:3:"靖";s:3:"靖";s:3:"精";s:3:"精";s:3:"羽";s:3:"羽";s:3:"蘒";s:3:"蘒";s:3:"諸";s:3:"諸";s:3:"逸";s:3:"逸";s:3:"都";s:3:"都";s:3:"飯";s:3:"飯";s:3:"飼";s:3:"飼";s:3:"館";s:3:"館";s:3:"鶴";s:3:"鶴";s:3:"郞";s:3:"郞";s:3:"隷";s:3:"隷";s:3:"侮";s:3:"侮";s:3:"僧";s:3:"僧";s:3:"免";s:3:"免";s:3:"勉";s:3:"勉";s:3:"勤";s:3:"勤";s:3:"卑";s:3:"卑";s:3:"喝";s:3:"喝";s:3:"嘆";s:3:"嘆";s:3:"器";s:3:"器";s:3:"塀";s:3:"塀";s:3:"墨";s:3:"墨";s:3:"層";s:3:"層";s:3:"屮";s:3:"屮";s:3:"悔";s:3:"悔";s:3:"慨";s:3:"慨";s:3:"憎";s:3:"憎";s:3:"懲";s:3:"懲";s:3:"敏";s:3:"敏";s:3:"既";s:3:"既";s:3:"暑";s:3:"暑";s:3:"梅";s:3:"梅";s:3:"海";s:3:"海";s:3:"渚";s:3:"渚";s:3:"漢";s:3:"漢";s:3:"煮";s:3:"煮";s:3:"爫";s:3:"爫";s:3:"琢";s:3:"琢";s:3:"碑";s:3:"碑";s:3:"社";s:3:"社";s:3:"祉";s:3:"祉";s:3:"祈";s:3:"祈";s:3:"祐";s:3:"祐";s:3:"祖";s:3:"祖";s:3:"祝";s:3:"祝";s:3:"禍";s:3:"禍";s:3:"禎";s:3:"禎";s:3:"穀";s:3:"穀";s:3:"突";s:3:"突";s:3:"節";s:3:"節";s:3:"練";s:3:"練";s:3:"縉";s:3:"縉";s:3:"繁";s:3:"繁";s:3:"署";s:3:"署";s:3:"者";s:3:"者";s:3:"臭";s:3:"臭";s:3:"艹";s:3:"艹";s:3:"艹";s:3:"艹";s:3:"著";s:3:"著";s:3:"褐";s:3:"褐";s:3:"視";s:3:"視";s:3:"謁";s:3:"謁";s:3:"謹";s:3:"謹";s:3:"賓";s:3:"賓";s:3:"贈";s:3:"贈";s:3:"辶";s:3:"辶";s:3:"逸";s:3:"逸";s:3:"難";s:3:"難";s:3:"響";s:3:"響";s:3:"頻";s:3:"頻";s:3:"恵";s:3:"恵";s:3:"𤋮";s:4:"𤋮";s:3:"舘";s:3:"舘";s:3:"並";s:3:"並";s:3:"况";s:3:"况";s:3:"全";s:3:"全";s:3:"侀";s:3:"侀";s:3:"充";s:3:"充";s:3:"冀";s:3:"冀";s:3:"勇";s:3:"勇";s:3:"勺";s:3:"勺";s:3:"喝";s:3:"喝";s:3:"啕";s:3:"啕";s:3:"喙";s:3:"喙";s:3:"嗢";s:3:"嗢";s:3:"塚";s:3:"塚";s:3:"墳";s:3:"墳";s:3:"奄";s:3:"奄";s:3:"奔";s:3:"奔";s:3:"婢";s:3:"婢";s:3:"嬨";s:3:"嬨";s:3:"廒";s:3:"廒";s:3:"廙";s:3:"廙";s:3:"彩";s:3:"彩";s:3:"徭";s:3:"徭";s:3:"惘";s:3:"惘";s:3:"慎";s:3:"慎";s:3:"愈";s:3:"愈";s:3:"憎";s:3:"憎";s:3:"慠";s:3:"慠";s:3:"懲";s:3:"懲";s:3:"戴";s:3:"戴";s:3:"揄";s:3:"揄";s:3:"搜";s:3:"搜";s:3:"摒";s:3:"摒";s:3:"敖";s:3:"敖";s:3:"晴";s:3:"晴";s:3:"朗";s:3:"朗";s:3:"望";s:3:"望";s:3:"杖";s:3:"杖";s:3:"歹";s:3:"歹";s:3:"殺";s:3:"殺";s:3:"流";s:3:"流";s:3:"滛";s:3:"滛";s:3:"滋";s:3:"滋";s:3:"漢";s:3:"漢";s:3:"瀞";s:3:"瀞";s:3:"煮";s:3:"煮";s:3:"瞧";s:3:"瞧";s:3:"爵";s:3:"爵";s:3:"犯";s:3:"犯";s:3:"猪";s:3:"猪";s:3:"瑱";s:3:"瑱";s:3:"甆";s:3:"甆";s:3:"画";s:3:"画";s:3:"瘝";s:3:"瘝";s:3:"瘟";s:3:"瘟";s:3:"益";s:3:"益";s:3:"盛";s:3:"盛";s:3:"直";s:3:"直";s:3:"睊";s:3:"睊";s:3:"着";s:3:"着";s:3:"磌";s:3:"磌";s:3:"窱";s:3:"窱";s:3:"節";s:3:"節";s:3:"类";s:3:"类";s:3:"絛";s:3:"絛";s:3:"練";s:3:"練";s:3:"缾";s:3:"缾";s:3:"者";s:3:"者";s:3:"荒";s:3:"荒";s:3:"華";s:3:"華";s:3:"蝹";s:3:"蝹";s:3:"襁";s:3:"襁";s:3:"覆";s:3:"覆";s:3:"視";s:3:"視";s:3:"調";s:3:"調";s:3:"諸";s:3:"諸";s:3:"請";s:3:"請";s:3:"謁";s:3:"謁";s:3:"諾";s:3:"諾";s:3:"諭";s:3:"諭";s:3:"謹";s:3:"謹";s:3:"變";s:3:"變";s:3:"贈";s:3:"贈";s:3:"輸";s:3:"輸";s:3:"遲";s:3:"遲";s:3:"醙";s:3:"醙";s:3:"鉶";s:3:"鉶";s:3:"陼";s:3:"陼";s:3:"難";s:3:"難";s:3:"靖";s:3:"靖";s:3:"韛";s:3:"韛";s:3:"響";s:3:"響";s:3:"頋";s:3:"頋";s:3:"頻";s:3:"頻";s:3:"鬒";s:3:"鬒";s:3:"龜";s:3:"龜";s:3:"𢡊";s:4:"𢡊";s:3:"𢡄";s:4:"𢡄";s:3:"𣏕";s:4:"𣏕";s:3:"㮝";s:3:"㮝";s:3:"䀘";s:3:"䀘";s:3:"䀹";s:3:"䀹";s:3:"𥉉";s:4:"𥉉";s:3:"𥳐";s:4:"𥳐";s:3:"𧻓";s:4:"𧻓";s:3:"齃";s:3:"齃";s:3:"龎";s:3:"龎";s:3:"יִ";s:4:"יִ";s:3:"ײַ";s:4:"ײַ";s:3:"שׁ";s:4:"שׁ";s:3:"שׂ";s:4:"שׂ";s:3:"שּׁ";s:6:"שּׁ";s:3:"שּׂ";s:6:"שּׂ";s:3:"אַ";s:4:"אַ";s:3:"אָ";s:4:"אָ";s:3:"אּ";s:4:"אּ";s:3:"בּ";s:4:"בּ";s:3:"גּ";s:4:"גּ";s:3:"דּ";s:4:"דּ";s:3:"הּ";s:4:"הּ";s:3:"וּ";s:4:"וּ";s:3:"זּ";s:4:"זּ";s:3:"טּ";s:4:"טּ";s:3:"יּ";s:4:"יּ";s:3:"ךּ";s:4:"ךּ";s:3:"כּ";s:4:"כּ";s:3:"לּ";s:4:"לּ";s:3:"מּ";s:4:"מּ";s:3:"נּ";s:4:"נּ";s:3:"סּ";s:4:"סּ";s:3:"ףּ";s:4:"ףּ";s:3:"פּ";s:4:"פּ";s:3:"צּ";s:4:"צּ";s:3:"קּ";s:4:"קּ";s:3:"רּ";s:4:"רּ";s:3:"שּ";s:4:"שּ";s:3:"תּ";s:4:"תּ";s:3:"וֹ";s:4:"וֹ";s:3:"בֿ";s:4:"בֿ";s:3:"כֿ";s:4:"כֿ";s:3:"פֿ";s:4:"פֿ";s:4:"𑂚";s:8:"𑂚";s:4:"𑂜";s:8:"𑂜";s:4:"𑂫";s:8:"𑂫";s:4:"𑄮";s:8:"𑄮";s:4:"𑄯";s:8:"𑄯";s:4:"𝅗𝅥";s:8:"𝅗𝅥";s:4:"𝅘𝅥";s:8:"𝅘𝅥";s:4:"𝅘𝅥𝅮";s:12:"𝅘𝅥𝅮";s:4:"𝅘𝅥𝅯";s:12:"𝅘𝅥𝅯";s:4:"𝅘𝅥𝅰";s:12:"𝅘𝅥𝅰";s:4:"𝅘𝅥𝅱";s:12:"𝅘𝅥𝅱";s:4:"𝅘𝅥𝅲";s:12:"𝅘𝅥𝅲";s:4:"𝆹𝅥";s:8:"𝆹𝅥";s:4:"𝆺𝅥";s:8:"𝆺𝅥";s:4:"𝆹𝅥𝅮";s:12:"𝆹𝅥𝅮";s:4:"𝆺𝅥𝅮";s:12:"𝆺𝅥𝅮";s:4:"𝆹𝅥𝅯";s:12:"𝆹𝅥𝅯";s:4:"𝆺𝅥𝅯";s:12:"𝆺𝅥𝅯";s:4:"丽";s:3:"丽";s:4:"丸";s:3:"丸";s:4:"乁";s:3:"乁";s:4:"𠄢";s:4:"𠄢";s:4:"你";s:3:"你";s:4:"侮";s:3:"侮";s:4:"侻";s:3:"侻";s:4:"倂";s:3:"倂";s:4:"偺";s:3:"偺";s:4:"備";s:3:"備";s:4:"僧";s:3:"僧";s:4:"像";s:3:"像";s:4:"㒞";s:3:"㒞";s:4:"𠘺";s:4:"𠘺";s:4:"免";s:3:"免";s:4:"兔";s:3:"兔";s:4:"兤";s:3:"兤";s:4:"具";s:3:"具";s:4:"𠔜";s:4:"𠔜";s:4:"㒹";s:3:"㒹";s:4:"內";s:3:"內";s:4:"再";s:3:"再";s:4:"𠕋";s:4:"𠕋";s:4:"冗";s:3:"冗";s:4:"冤";s:3:"冤";s:4:"仌";s:3:"仌";s:4:"冬";s:3:"冬";s:4:"况";s:3:"况";s:4:"𩇟";s:4:"𩇟";s:4:"凵";s:3:"凵";s:4:"刃";s:3:"刃";s:4:"㓟";s:3:"㓟";s:4:"刻";s:3:"刻";s:4:"剆";s:3:"剆";s:4:"割";s:3:"割";s:4:"剷";s:3:"剷";s:4:"㔕";s:3:"㔕";s:4:"勇";s:3:"勇";s:4:"勉";s:3:"勉";s:4:"勤";s:3:"勤";s:4:"勺";s:3:"勺";s:4:"包";s:3:"包";s:4:"匆";s:3:"匆";s:4:"北";s:3:"北";s:4:"卉";s:3:"卉";s:4:"卑";s:3:"卑";s:4:"博";s:3:"博";s:4:"即";s:3:"即";s:4:"卽";s:3:"卽";s:4:"卿";s:3:"卿";s:4:"卿";s:3:"卿";s:4:"卿";s:3:"卿";s:4:"𠨬";s:4:"𠨬";s:4:"灰";s:3:"灰";s:4:"及";s:3:"及";s:4:"叟";s:3:"叟";s:4:"𠭣";s:4:"𠭣";s:4:"叫";s:3:"叫";s:4:"叱";s:3:"叱";s:4:"吆";s:3:"吆";s:4:"咞";s:3:"咞";s:4:"吸";s:3:"吸";s:4:"呈";s:3:"呈";s:4:"周";s:3:"周";s:4:"咢";s:3:"咢";s:4:"哶";s:3:"哶";s:4:"唐";s:3:"唐";s:4:"啓";s:3:"啓";s:4:"啣";s:3:"啣";s:4:"善";s:3:"善";s:4:"善";s:3:"善";s:4:"喙";s:3:"喙";s:4:"喫";s:3:"喫";s:4:"喳";s:3:"喳";s:4:"嗂";s:3:"嗂";s:4:"圖";s:3:"圖";s:4:"嘆";s:3:"嘆";s:4:"圗";s:3:"圗";s:4:"噑";s:3:"噑";s:4:"噴";s:3:"噴";s:4:"切";s:3:"切";s:4:"壮";s:3:"壮";s:4:"城";s:3:"城";s:4:"埴";s:3:"埴";s:4:"堍";s:3:"堍";s:4:"型";s:3:"型";s:4:"堲";s:3:"堲";s:4:"報";s:3:"報";s:4:"墬";s:3:"墬";s:4:"𡓤";s:4:"𡓤";s:4:"売";s:3:"売";s:4:"壷";s:3:"壷";s:4:"夆";s:3:"夆";s:4:"多";s:3:"多";s:4:"夢";s:3:"夢";s:4:"奢";s:3:"奢";s:4:"𡚨";s:4:"𡚨";s:4:"𡛪";s:4:"𡛪";s:4:"姬";s:3:"姬";s:4:"娛";s:3:"娛";s:4:"娧";s:3:"娧";s:4:"姘";s:3:"姘";s:4:"婦";s:3:"婦";s:4:"㛮";s:3:"㛮";s:4:"㛼";s:3:"㛼";s:4:"嬈";s:3:"嬈";s:4:"嬾";s:3:"嬾";s:4:"嬾";s:3:"嬾";s:4:"𡧈";s:4:"𡧈";s:4:"寃";s:3:"寃";s:4:"寘";s:3:"寘";s:4:"寧";s:3:"寧";s:4:"寳";s:3:"寳";s:4:"𡬘";s:4:"𡬘";s:4:"寿";s:3:"寿";s:4:"将";s:3:"将";s:4:"当";s:3:"当";s:4:"尢";s:3:"尢";s:4:"㞁";s:3:"㞁";s:4:"屠";s:3:"屠";s:4:"屮";s:3:"屮";s:4:"峀";s:3:"峀";s:4:"岍";s:3:"岍";s:4:"𡷤";s:4:"𡷤";s:4:"嵃";s:3:"嵃";s:4:"𡷦";s:4:"𡷦";s:4:"嵮";s:3:"嵮";s:4:"嵫";s:3:"嵫";s:4:"嵼";s:3:"嵼";s:4:"巡";s:3:"巡";s:4:"巢";s:3:"巢";s:4:"㠯";s:3:"㠯";s:4:"巽";s:3:"巽";s:4:"帨";s:3:"帨";s:4:"帽";s:3:"帽";s:4:"幩";s:3:"幩";s:4:"㡢";s:3:"㡢";s:4:"𢆃";s:4:"𢆃";s:4:"㡼";s:3:"㡼";s:4:"庰";s:3:"庰";s:4:"庳";s:3:"庳";s:4:"庶";s:3:"庶";s:4:"廊";s:3:"廊";s:4:"𪎒";s:4:"𪎒";s:4:"廾";s:3:"廾";s:4:"𢌱";s:4:"𢌱";s:4:"𢌱";s:4:"𢌱";s:4:"舁";s:3:"舁";s:4:"弢";s:3:"弢";s:4:"弢";s:3:"弢";s:4:"㣇";s:3:"㣇";s:4:"𣊸";s:4:"𣊸";s:4:"𦇚";s:4:"𦇚";s:4:"形";s:3:"形";s:4:"彫";s:3:"彫";s:4:"㣣";s:3:"㣣";s:4:"徚";s:3:"徚";s:4:"忍";s:3:"忍";s:4:"志";s:3:"志";s:4:"忹";s:3:"忹";s:4:"悁";s:3:"悁";s:4:"㤺";s:3:"㤺";s:4:"㤜";s:3:"㤜";s:4:"悔";s:3:"悔";s:4:"𢛔";s:4:"𢛔";s:4:"惇";s:3:"惇";s:4:"慈";s:3:"慈";s:4:"慌";s:3:"慌";s:4:"慎";s:3:"慎";s:4:"慌";s:3:"慌";s:4:"慺";s:3:"慺";s:4:"憎";s:3:"憎";s:4:"憲";s:3:"憲";s:4:"憤";s:3:"憤";s:4:"憯";s:3:"憯";s:4:"懞";s:3:"懞";s:4:"懲";s:3:"懲";s:4:"懶";s:3:"懶";s:4:"成";s:3:"成";s:4:"戛";s:3:"戛";s:4:"扝";s:3:"扝";s:4:"抱";s:3:"抱";s:4:"拔";s:3:"拔";s:4:"捐";s:3:"捐";s:4:"𢬌";s:4:"𢬌";s:4:"挽";s:3:"挽";s:4:"拼";s:3:"拼";s:4:"捨";s:3:"捨";s:4:"掃";s:3:"掃";s:4:"揤";s:3:"揤";s:4:"𢯱";s:4:"𢯱";s:4:"搢";s:3:"搢";s:4:"揅";s:3:"揅";s:4:"掩";s:3:"掩";s:4:"㨮";s:3:"㨮";s:4:"摩";s:3:"摩";s:4:"摾";s:3:"摾";s:4:"撝";s:3:"撝";s:4:"摷";s:3:"摷";s:4:"㩬";s:3:"㩬";s:4:"敏";s:3:"敏";s:4:"敬";s:3:"敬";s:4:"𣀊";s:4:"𣀊";s:4:"旣";s:3:"旣";s:4:"書";s:3:"書";s:4:"晉";s:3:"晉";s:4:"㬙";s:3:"㬙";s:4:"暑";s:3:"暑";s:4:"㬈";s:3:"㬈";s:4:"㫤";s:3:"㫤";s:4:"冒";s:3:"冒";s:4:"冕";s:3:"冕";s:4:"最";s:3:"最";s:4:"暜";s:3:"暜";s:4:"肭";s:3:"肭";s:4:"䏙";s:3:"䏙";s:4:"朗";s:3:"朗";s:4:"望";s:3:"望";s:4:"朡";s:3:"朡";s:4:"杞";s:3:"杞";s:4:"杓";s:3:"杓";s:4:"𣏃";s:4:"𣏃";s:4:"㭉";s:3:"㭉";s:4:"柺";s:3:"柺";s:4:"枅";s:3:"枅";s:4:"桒";s:3:"桒";s:4:"梅";s:3:"梅";s:4:"𣑭";s:4:"𣑭";s:4:"梎";s:3:"梎";s:4:"栟";s:3:"栟";s:4:"椔";s:3:"椔";s:4:"㮝";s:3:"㮝";s:4:"楂";s:3:"楂";s:4:"榣";s:3:"榣";s:4:"槪";s:3:"槪";s:4:"檨";s:3:"檨";s:4:"𣚣";s:4:"𣚣";s:4:"櫛";s:3:"櫛";s:4:"㰘";s:3:"㰘";s:4:"次";s:3:"次";s:4:"𣢧";s:4:"𣢧";s:4:"歔";s:3:"歔";s:4:"㱎";s:3:"㱎";s:4:"歲";s:3:"歲";s:4:"殟";s:3:"殟";s:4:"殺";s:3:"殺";s:4:"殻";s:3:"殻";s:4:"𣪍";s:4:"𣪍";s:4:"𡴋";s:4:"𡴋";s:4:"𣫺";s:4:"𣫺";s:4:"汎";s:3:"汎";s:4:"𣲼";s:4:"𣲼";s:4:"沿";s:3:"沿";s:4:"泍";s:3:"泍";s:4:"汧";s:3:"汧";s:4:"洖";s:3:"洖";s:4:"派";s:3:"派";s:4:"海";s:3:"海";s:4:"流";s:3:"流";s:4:"浩";s:3:"浩";s:4:"浸";s:3:"浸";s:4:"涅";s:3:"涅";s:4:"𣴞";s:4:"𣴞";s:4:"洴";s:3:"洴";s:4:"港";s:3:"港";s:4:"湮";s:3:"湮";s:4:"㴳";s:3:"㴳";s:4:"滋";s:3:"滋";s:4:"滇";s:3:"滇";s:4:"𣻑";s:4:"𣻑";s:4:"淹";s:3:"淹";s:4:"潮";s:3:"潮";s:4:"𣽞";s:4:"𣽞";s:4:"𣾎";s:4:"𣾎";s:4:"濆";s:3:"濆";s:4:"瀹";s:3:"瀹";s:4:"瀞";s:3:"瀞";s:4:"瀛";s:3:"瀛";s:4:"㶖";s:3:"㶖";s:4:"灊";s:3:"灊";s:4:"災";s:3:"災";s:4:"灷";s:3:"灷";s:4:"炭";s:3:"炭";s:4:"𠔥";s:4:"𠔥";s:4:"煅";s:3:"煅";s:4:"𤉣";s:4:"𤉣";s:4:"熜";s:3:"熜";s:4:"𤎫";s:4:"𤎫";s:4:"爨";s:3:"爨";s:4:"爵";s:3:"爵";s:4:"牐";s:3:"牐";s:4:"𤘈";s:4:"𤘈";s:4:"犀";s:3:"犀";s:4:"犕";s:3:"犕";s:4:"𤜵";s:4:"𤜵";s:4:"𤠔";s:4:"𤠔";s:4:"獺";s:3:"獺";s:4:"王";s:3:"王";s:4:"㺬";s:3:"㺬";s:4:"玥";s:3:"玥";s:4:"㺸";s:3:"㺸";s:4:"㺸";s:3:"㺸";s:4:"瑇";s:3:"瑇";s:4:"瑜";s:3:"瑜";s:4:"瑱";s:3:"瑱";s:4:"璅";s:3:"璅";s:4:"瓊";s:3:"瓊";s:4:"㼛";s:3:"㼛";s:4:"甤";s:3:"甤";s:4:"𤰶";s:4:"𤰶";s:4:"甾";s:3:"甾";s:4:"𤲒";s:4:"𤲒";s:4:"異";s:3:"異";s:4:"𢆟";s:4:"𢆟";s:4:"瘐";s:3:"瘐";s:4:"𤾡";s:4:"𤾡";s:4:"𤾸";s:4:"𤾸";s:4:"𥁄";s:4:"𥁄";s:4:"㿼";s:3:"㿼";s:4:"䀈";s:3:"䀈";s:4:"直";s:3:"直";s:4:"𥃳";s:4:"𥃳";s:4:"𥃲";s:4:"𥃲";s:4:"𥄙";s:4:"𥄙";s:4:"𥄳";s:4:"𥄳";s:4:"眞";s:3:"眞";s:4:"真";s:3:"真";s:4:"真";s:3:"真";s:4:"睊";s:3:"睊";s:4:"䀹";s:3:"䀹";s:4:"瞋";s:3:"瞋";s:4:"䁆";s:3:"䁆";s:4:"䂖";s:3:"䂖";s:4:"𥐝";s:4:"𥐝";s:4:"硎";s:3:"硎";s:4:"碌";s:3:"碌";s:4:"磌";s:3:"磌";s:4:"䃣";s:3:"䃣";s:4:"𥘦";s:4:"𥘦";s:4:"祖";s:3:"祖";s:4:"𥚚";s:4:"𥚚";s:4:"𥛅";s:4:"𥛅";s:4:"福";s:3:"福";s:4:"秫";s:3:"秫";s:4:"䄯";s:3:"䄯";s:4:"穀";s:3:"穀";s:4:"穊";s:3:"穊";s:4:"穏";s:3:"穏";s:4:"𥥼";s:4:"𥥼";s:4:"𥪧";s:4:"𥪧";s:4:"𥪧";s:4:"𥪧";s:4:"竮";s:3:"竮";s:4:"䈂";s:3:"䈂";s:4:"𥮫";s:4:"𥮫";s:4:"篆";s:3:"篆";s:4:"築";s:3:"築";s:4:"䈧";s:3:"䈧";s:4:"𥲀";s:4:"𥲀";s:4:"糒";s:3:"糒";s:4:"䊠";s:3:"䊠";s:4:"糨";s:3:"糨";s:4:"糣";s:3:"糣";s:4:"紀";s:3:"紀";s:4:"𥾆";s:4:"𥾆";s:4:"絣";s:3:"絣";s:4:"䌁";s:3:"䌁";s:4:"緇";s:3:"緇";s:4:"縂";s:3:"縂";s:4:"繅";s:3:"繅";s:4:"䌴";s:3:"䌴";s:4:"𦈨";s:4:"𦈨";s:4:"𦉇";s:4:"𦉇";s:4:"䍙";s:3:"䍙";s:4:"𦋙";s:4:"𦋙";s:4:"罺";s:3:"罺";s:4:"𦌾";s:4:"𦌾";s:4:"羕";s:3:"羕";s:4:"翺";s:3:"翺";s:4:"者";s:3:"者";s:4:"𦓚";s:4:"𦓚";s:4:"𦔣";s:4:"𦔣";s:4:"聠";s:3:"聠";s:4:"𦖨";s:4:"𦖨";s:4:"聰";s:3:"聰";s:4:"𣍟";s:4:"𣍟";s:4:"䏕";s:3:"䏕";s:4:"育";s:3:"育";s:4:"脃";s:3:"脃";s:4:"䐋";s:3:"䐋";s:4:"脾";s:3:"脾";s:4:"媵";s:3:"媵";s:4:"𦞧";s:4:"𦞧";s:4:"𦞵";s:4:"𦞵";s:4:"𣎓";s:4:"𣎓";s:4:"𣎜";s:4:"𣎜";s:4:"舁";s:3:"舁";s:4:"舄";s:3:"舄";s:4:"辞";s:3:"辞";s:4:"䑫";s:3:"䑫";s:4:"芑";s:3:"芑";s:4:"芋";s:3:"芋";s:4:"芝";s:3:"芝";s:4:"劳";s:3:"劳";s:4:"花";s:3:"花";s:4:"芳";s:3:"芳";s:4:"芽";s:3:"芽";s:4:"苦";s:3:"苦";s:4:"𦬼";s:4:"𦬼";s:4:"若";s:3:"若";s:4:"茝";s:3:"茝";s:4:"荣";s:3:"荣";s:4:"莭";s:3:"莭";s:4:"茣";s:3:"茣";s:4:"莽";s:3:"莽";s:4:"菧";s:3:"菧";s:4:"著";s:3:"著";s:4:"荓";s:3:"荓";s:4:"菊";s:3:"菊";s:4:"菌";s:3:"菌";s:4:"菜";s:3:"菜";s:4:"𦰶";s:4:"𦰶";s:4:"𦵫";s:4:"𦵫";s:4:"𦳕";s:4:"𦳕";s:4:"䔫";s:3:"䔫";s:4:"蓱";s:3:"蓱";s:4:"蓳";s:3:"蓳";s:4:"蔖";s:3:"蔖";s:4:"𧏊";s:4:"𧏊";s:4:"蕤";s:3:"蕤";s:4:"𦼬";s:4:"𦼬";s:4:"䕝";s:3:"䕝";s:4:"䕡";s:3:"䕡";s:4:"𦾱";s:4:"𦾱";s:4:"𧃒";s:4:"𧃒";s:4:"䕫";s:3:"䕫";s:4:"虐";s:3:"虐";s:4:"虜";s:3:"虜";s:4:"虧";s:3:"虧";s:4:"虩";s:3:"虩";s:4:"蚩";s:3:"蚩";s:4:"蚈";s:3:"蚈";s:4:"蜎";s:3:"蜎";s:4:"蛢";s:3:"蛢";s:4:"蝹";s:3:"蝹";s:4:"蜨";s:3:"蜨";s:4:"蝫";s:3:"蝫";s:4:"螆";s:3:"螆";s:4:"䗗";s:3:"䗗";s:4:"蟡";s:3:"蟡";s:4:"蠁";s:3:"蠁";s:4:"䗹";s:3:"䗹";s:4:"衠";s:3:"衠";s:4:"衣";s:3:"衣";s:4:"𧙧";s:4:"𧙧";s:4:"裗";s:3:"裗";s:4:"裞";s:3:"裞";s:4:"䘵";s:3:"䘵";s:4:"裺";s:3:"裺";s:4:"㒻";s:3:"㒻";s:4:"𧢮";s:4:"𧢮";s:4:"𧥦";s:4:"𧥦";s:4:"䚾";s:3:"䚾";s:4:"䛇";s:3:"䛇";s:4:"誠";s:3:"誠";s:4:"諭";s:3:"諭";s:4:"變";s:3:"變";s:4:"豕";s:3:"豕";s:4:"𧲨";s:4:"𧲨";s:4:"貫";s:3:"貫";s:4:"賁";s:3:"賁";s:4:"贛";s:3:"贛";s:4:"起";s:3:"起";s:4:"𧼯";s:4:"𧼯";s:4:"𠠄";s:4:"𠠄";s:4:"跋";s:3:"跋";s:4:"趼";s:3:"趼";s:4:"跰";s:3:"跰";s:4:"𠣞";s:4:"𠣞";s:4:"軔";s:3:"軔";s:4:"輸";s:3:"輸";s:4:"𨗒";s:4:"𨗒";s:4:"𨗭";s:4:"𨗭";s:4:"邔";s:3:"邔";s:4:"郱";s:3:"郱";s:4:"鄑";s:3:"鄑";s:4:"𨜮";s:4:"𨜮";s:4:"鄛";s:3:"鄛";s:4:"鈸";s:3:"鈸";s:4:"鋗";s:3:"鋗";s:4:"鋘";s:3:"鋘";s:4:"鉼";s:3:"鉼";s:4:"鏹";s:3:"鏹";s:4:"鐕";s:3:"鐕";s:4:"𨯺";s:4:"𨯺";s:4:"開";s:3:"開";s:4:"䦕";s:3:"䦕";s:4:"閷";s:3:"閷";s:4:"𨵷";s:4:"𨵷";s:4:"䧦";s:3:"䧦";s:4:"雃";s:3:"雃";s:4:"嶲";s:3:"嶲";s:4:"霣";s:3:"霣";s:4:"𩅅";s:4:"𩅅";s:4:"𩈚";s:4:"𩈚";s:4:"䩮";s:3:"䩮";s:4:"䩶";s:3:"䩶";s:4:"韠";s:3:"韠";s:4:"𩐊";s:4:"𩐊";s:4:"䪲";s:3:"䪲";s:4:"𩒖";s:4:"𩒖";s:4:"頋";s:3:"頋";s:4:"頋";s:3:"頋";s:4:"頩";s:3:"頩";s:4:"𩖶";s:4:"𩖶";s:4:"飢";s:3:"飢";s:4:"䬳";s:3:"䬳";s:4:"餩";s:3:"餩";s:4:"馧";s:3:"馧";s:4:"駂";s:3:"駂";s:4:"駾";s:3:"駾";s:4:"䯎";s:3:"䯎";s:4:"𩬰";s:4:"𩬰";s:4:"鬒";s:3:"鬒";s:4:"鱀";s:3:"鱀";s:4:"鳽";s:3:"鳽";s:4:"䳎";s:3:"䳎";s:4:"䳭";s:3:"䳭";s:4:"鵧";s:3:"鵧";s:4:"𪃎";s:4:"𪃎";s:4:"䳸";s:3:"䳸";s:4:"𪄅";s:4:"𪄅";s:4:"𪈎";s:4:"𪈎";s:4:"𪊑";s:4:"𪊑";s:4:"麻";s:3:"麻";s:4:"䵖";s:3:"䵖";s:4:"黹";s:3:"黹";s:4:"黾";s:3:"黾";s:4:"鼅";s:3:"鼅";s:4:"鼏";s:3:"鼏";s:4:"鼖";s:3:"鼖";s:4:"鼻";s:3:"鼻";s:4:"𪘀";s:4:"𪘀";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/combiningClass.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/combiningClass.ser deleted file mode 100644 index 6812d01d..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/combiningClass.ser +++ /dev/null @@ -1 +0,0 @@ -a:653:{s:2:"̀";i:230;s:2:"́";i:230;s:2:"̂";i:230;s:2:"̃";i:230;s:2:"̄";i:230;s:2:"̅";i:230;s:2:"̆";i:230;s:2:"̇";i:230;s:2:"̈";i:230;s:2:"̉";i:230;s:2:"̊";i:230;s:2:"̋";i:230;s:2:"̌";i:230;s:2:"̍";i:230;s:2:"̎";i:230;s:2:"̏";i:230;s:2:"̐";i:230;s:2:"̑";i:230;s:2:"̒";i:230;s:2:"̓";i:230;s:2:"̔";i:230;s:2:"̕";i:232;s:2:"̖";i:220;s:2:"̗";i:220;s:2:"̘";i:220;s:2:"̙";i:220;s:2:"̚";i:232;s:2:"̛";i:216;s:2:"̜";i:220;s:2:"̝";i:220;s:2:"̞";i:220;s:2:"̟";i:220;s:2:"̠";i:220;s:2:"̡";i:202;s:2:"̢";i:202;s:2:"̣";i:220;s:2:"̤";i:220;s:2:"̥";i:220;s:2:"̦";i:220;s:2:"̧";i:202;s:2:"̨";i:202;s:2:"̩";i:220;s:2:"̪";i:220;s:2:"̫";i:220;s:2:"̬";i:220;s:2:"̭";i:220;s:2:"̮";i:220;s:2:"̯";i:220;s:2:"̰";i:220;s:2:"̱";i:220;s:2:"̲";i:220;s:2:"̳";i:220;s:2:"̴";i:1;s:2:"̵";i:1;s:2:"̶";i:1;s:2:"̷";i:1;s:2:"̸";i:1;s:2:"̹";i:220;s:2:"̺";i:220;s:2:"̻";i:220;s:2:"̼";i:220;s:2:"̽";i:230;s:2:"̾";i:230;s:2:"̿";i:230;s:2:"̀";i:230;s:2:"́";i:230;s:2:"͂";i:230;s:2:"̓";i:230;s:2:"̈́";i:230;s:2:"ͅ";i:240;s:2:"͆";i:230;s:2:"͇";i:220;s:2:"͈";i:220;s:2:"͉";i:220;s:2:"͊";i:230;s:2:"͋";i:230;s:2:"͌";i:230;s:2:"͍";i:220;s:2:"͎";i:220;s:2:"͐";i:230;s:2:"͑";i:230;s:2:"͒";i:230;s:2:"͓";i:220;s:2:"͔";i:220;s:2:"͕";i:220;s:2:"͖";i:220;s:2:"͗";i:230;s:2:"͘";i:232;s:2:"͙";i:220;s:2:"͚";i:220;s:2:"͛";i:230;s:2:"͜";i:233;s:2:"͝";i:234;s:2:"͞";i:234;s:2:"͟";i:233;s:2:"͠";i:234;s:2:"͡";i:234;s:2:"͢";i:233;s:2:"ͣ";i:230;s:2:"ͤ";i:230;s:2:"ͥ";i:230;s:2:"ͦ";i:230;s:2:"ͧ";i:230;s:2:"ͨ";i:230;s:2:"ͩ";i:230;s:2:"ͪ";i:230;s:2:"ͫ";i:230;s:2:"ͬ";i:230;s:2:"ͭ";i:230;s:2:"ͮ";i:230;s:2:"ͯ";i:230;s:2:"҃";i:230;s:2:"҄";i:230;s:2:"҅";i:230;s:2:"҆";i:230;s:2:"҇";i:230;s:2:"֑";i:220;s:2:"֒";i:230;s:2:"֓";i:230;s:2:"֔";i:230;s:2:"֕";i:230;s:2:"֖";i:220;s:2:"֗";i:230;s:2:"֘";i:230;s:2:"֙";i:230;s:2:"֚";i:222;s:2:"֛";i:220;s:2:"֜";i:230;s:2:"֝";i:230;s:2:"֞";i:230;s:2:"֟";i:230;s:2:"֠";i:230;s:2:"֡";i:230;s:2:"֢";i:220;s:2:"֣";i:220;s:2:"֤";i:220;s:2:"֥";i:220;s:2:"֦";i:220;s:2:"֧";i:220;s:2:"֨";i:230;s:2:"֩";i:230;s:2:"֪";i:220;s:2:"֫";i:230;s:2:"֬";i:230;s:2:"֭";i:222;s:2:"֮";i:228;s:2:"֯";i:230;s:2:"ְ";i:10;s:2:"ֱ";i:11;s:2:"ֲ";i:12;s:2:"ֳ";i:13;s:2:"ִ";i:14;s:2:"ֵ";i:15;s:2:"ֶ";i:16;s:2:"ַ";i:17;s:2:"ָ";i:18;s:2:"ֹ";i:19;s:2:"ֺ";i:19;s:2:"ֻ";i:20;s:2:"ּ";i:21;s:2:"ֽ";i:22;s:2:"ֿ";i:23;s:2:"ׁ";i:24;s:2:"ׂ";i:25;s:2:"ׄ";i:230;s:2:"ׅ";i:220;s:2:"ׇ";i:18;s:2:"ؐ";i:230;s:2:"ؑ";i:230;s:2:"ؒ";i:230;s:2:"ؓ";i:230;s:2:"ؔ";i:230;s:2:"ؕ";i:230;s:2:"ؖ";i:230;s:2:"ؗ";i:230;s:2:"ؘ";i:30;s:2:"ؙ";i:31;s:2:"ؚ";i:32;s:2:"ً";i:27;s:2:"ٌ";i:28;s:2:"ٍ";i:29;s:2:"َ";i:30;s:2:"ُ";i:31;s:2:"ِ";i:32;s:2:"ّ";i:33;s:2:"ْ";i:34;s:2:"ٓ";i:230;s:2:"ٔ";i:230;s:2:"ٕ";i:220;s:2:"ٖ";i:220;s:2:"ٗ";i:230;s:2:"٘";i:230;s:2:"ٙ";i:230;s:2:"ٚ";i:230;s:2:"ٛ";i:230;s:2:"ٜ";i:220;s:2:"ٝ";i:230;s:2:"ٞ";i:230;s:2:"ٟ";i:220;s:2:"ٰ";i:35;s:2:"ۖ";i:230;s:2:"ۗ";i:230;s:2:"ۘ";i:230;s:2:"ۙ";i:230;s:2:"ۚ";i:230;s:2:"ۛ";i:230;s:2:"ۜ";i:230;s:2:"۟";i:230;s:2:"۠";i:230;s:2:"ۡ";i:230;s:2:"ۢ";i:230;s:2:"ۣ";i:220;s:2:"ۤ";i:230;s:2:"ۧ";i:230;s:2:"ۨ";i:230;s:2:"۪";i:220;s:2:"۫";i:230;s:2:"۬";i:230;s:2:"ۭ";i:220;s:2:"ܑ";i:36;s:2:"ܰ";i:230;s:2:"ܱ";i:220;s:2:"ܲ";i:230;s:2:"ܳ";i:230;s:2:"ܴ";i:220;s:2:"ܵ";i:230;s:2:"ܶ";i:230;s:2:"ܷ";i:220;s:2:"ܸ";i:220;s:2:"ܹ";i:220;s:2:"ܺ";i:230;s:2:"ܻ";i:220;s:2:"ܼ";i:220;s:2:"ܽ";i:230;s:2:"ܾ";i:220;s:2:"ܿ";i:230;s:2:"݀";i:230;s:2:"݁";i:230;s:2:"݂";i:220;s:2:"݃";i:230;s:2:"݄";i:220;s:2:"݅";i:230;s:2:"݆";i:220;s:2:"݇";i:230;s:2:"݈";i:220;s:2:"݉";i:230;s:2:"݊";i:230;s:2:"߫";i:230;s:2:"߬";i:230;s:2:"߭";i:230;s:2:"߮";i:230;s:2:"߯";i:230;s:2:"߰";i:230;s:2:"߱";i:230;s:2:"߲";i:220;s:2:"߳";i:230;s:3:"ࠖ";i:230;s:3:"ࠗ";i:230;s:3:"࠘";i:230;s:3:"࠙";i:230;s:3:"ࠛ";i:230;s:3:"ࠜ";i:230;s:3:"ࠝ";i:230;s:3:"ࠞ";i:230;s:3:"ࠟ";i:230;s:3:"ࠠ";i:230;s:3:"ࠡ";i:230;s:3:"ࠢ";i:230;s:3:"ࠣ";i:230;s:3:"ࠥ";i:230;s:3:"ࠦ";i:230;s:3:"ࠧ";i:230;s:3:"ࠩ";i:230;s:3:"ࠪ";i:230;s:3:"ࠫ";i:230;s:3:"ࠬ";i:230;s:3:"࠭";i:230;s:3:"࡙";i:220;s:3:"࡚";i:220;s:3:"࡛";i:220;s:3:"ࣤ";i:230;s:3:"ࣥ";i:230;s:3:"ࣦ";i:220;s:3:"ࣧ";i:230;s:3:"ࣨ";i:230;s:3:"ࣩ";i:220;s:3:"࣪";i:230;s:3:"࣫";i:230;s:3:"࣬";i:230;s:3:"࣭";i:220;s:3:"࣮";i:220;s:3:"࣯";i:220;s:3:"ࣰ";i:27;s:3:"ࣱ";i:28;s:3:"ࣲ";i:29;s:3:"ࣳ";i:230;s:3:"ࣴ";i:230;s:3:"ࣵ";i:230;s:3:"ࣶ";i:220;s:3:"ࣷ";i:230;s:3:"ࣸ";i:230;s:3:"ࣹ";i:220;s:3:"ࣺ";i:220;s:3:"ࣻ";i:230;s:3:"ࣼ";i:230;s:3:"ࣽ";i:230;s:3:"ࣾ";i:230;s:3:"़";i:7;s:3:"्";i:9;s:3:"॑";i:230;s:3:"॒";i:220;s:3:"॓";i:230;s:3:"॔";i:230;s:3:"়";i:7;s:3:"্";i:9;s:3:"਼";i:7;s:3:"੍";i:9;s:3:"઼";i:7;s:3:"્";i:9;s:3:"଼";i:7;s:3:"୍";i:9;s:3:"்";i:9;s:3:"్";i:9;s:3:"ౕ";i:84;s:3:"ౖ";i:91;s:3:"಼";i:7;s:3:"್";i:9;s:3:"്";i:9;s:3:"්";i:9;s:3:"ุ";i:103;s:3:"ู";i:103;s:3:"ฺ";i:9;s:3:"่";i:107;s:3:"้";i:107;s:3:"๊";i:107;s:3:"๋";i:107;s:3:"ຸ";i:118;s:3:"ູ";i:118;s:3:"່";i:122;s:3:"້";i:122;s:3:"໊";i:122;s:3:"໋";i:122;s:3:"༘";i:220;s:3:"༙";i:220;s:3:"༵";i:220;s:3:"༷";i:220;s:3:"༹";i:216;s:3:"ཱ";i:129;s:3:"ི";i:130;s:3:"ུ";i:132;s:3:"ེ";i:130;s:3:"ཻ";i:130;s:3:"ོ";i:130;s:3:"ཽ";i:130;s:3:"ྀ";i:130;s:3:"ྂ";i:230;s:3:"ྃ";i:230;s:3:"྄";i:9;s:3:"྆";i:230;s:3:"྇";i:230;s:3:"࿆";i:220;s:3:"့";i:7;s:3:"္";i:9;s:3:"်";i:9;s:3:"ႍ";i:220;s:3:"፝";i:230;s:3:"፞";i:230;s:3:"፟";i:230;s:3:"᜔";i:9;s:3:"᜴";i:9;s:3:"្";i:9;s:3:"៝";i:230;s:3:"ᢩ";i:228;s:3:"᤹";i:222;s:3:"᤺";i:230;s:3:"᤻";i:220;s:3:"ᨗ";i:230;s:3:"ᨘ";i:220;s:3:"᩠";i:9;s:3:"᩵";i:230;s:3:"᩶";i:230;s:3:"᩷";i:230;s:3:"᩸";i:230;s:3:"᩹";i:230;s:3:"᩺";i:230;s:3:"᩻";i:230;s:3:"᩼";i:230;s:3:"᩿";i:220;s:3:"᬴";i:7;s:3:"᭄";i:9;s:3:"᭫";i:230;s:3:"᭬";i:220;s:3:"᭭";i:230;s:3:"᭮";i:230;s:3:"᭯";i:230;s:3:"᭰";i:230;s:3:"᭱";i:230;s:3:"᭲";i:230;s:3:"᭳";i:230;s:3:"᮪";i:9;s:3:"᮫";i:9;s:3:"᯦";i:7;s:3:"᯲";i:9;s:3:"᯳";i:9;s:3:"᰷";i:7;s:3:"᳐";i:230;s:3:"᳑";i:230;s:3:"᳒";i:230;s:3:"᳔";i:1;s:3:"᳕";i:220;s:3:"᳖";i:220;s:3:"᳗";i:220;s:3:"᳘";i:220;s:3:"᳙";i:220;s:3:"᳚";i:230;s:3:"᳛";i:230;s:3:"᳜";i:220;s:3:"᳝";i:220;s:3:"᳞";i:220;s:3:"᳟";i:220;s:3:"᳠";i:230;s:3:"᳢";i:1;s:3:"᳣";i:1;s:3:"᳤";i:1;s:3:"᳥";i:1;s:3:"᳦";i:1;s:3:"᳧";i:1;s:3:"᳨";i:1;s:3:"᳭";i:220;s:3:"᳴";i:230;s:3:"᷀";i:230;s:3:"᷁";i:230;s:3:"᷂";i:220;s:3:"᷃";i:230;s:3:"᷄";i:230;s:3:"᷅";i:230;s:3:"᷆";i:230;s:3:"᷇";i:230;s:3:"᷈";i:230;s:3:"᷉";i:230;s:3:"᷊";i:220;s:3:"᷋";i:230;s:3:"᷌";i:230;s:3:"᷍";i:234;s:3:"᷎";i:214;s:3:"᷏";i:220;s:3:"᷐";i:202;s:3:"᷑";i:230;s:3:"᷒";i:230;s:3:"ᷓ";i:230;s:3:"ᷔ";i:230;s:3:"ᷕ";i:230;s:3:"ᷖ";i:230;s:3:"ᷗ";i:230;s:3:"ᷘ";i:230;s:3:"ᷙ";i:230;s:3:"ᷚ";i:230;s:3:"ᷛ";i:230;s:3:"ᷜ";i:230;s:3:"ᷝ";i:230;s:3:"ᷞ";i:230;s:3:"ᷟ";i:230;s:3:"ᷠ";i:230;s:3:"ᷡ";i:230;s:3:"ᷢ";i:230;s:3:"ᷣ";i:230;s:3:"ᷤ";i:230;s:3:"ᷥ";i:230;s:3:"ᷦ";i:230;s:3:"᷼";i:233;s:3:"᷽";i:220;s:3:"᷾";i:230;s:3:"᷿";i:220;s:3:"⃐";i:230;s:3:"⃑";i:230;s:3:"⃒";i:1;s:3:"⃓";i:1;s:3:"⃔";i:230;s:3:"⃕";i:230;s:3:"⃖";i:230;s:3:"⃗";i:230;s:3:"⃘";i:1;s:3:"⃙";i:1;s:3:"⃚";i:1;s:3:"⃛";i:230;s:3:"⃜";i:230;s:3:"⃡";i:230;s:3:"⃥";i:1;s:3:"⃦";i:1;s:3:"⃧";i:230;s:3:"⃨";i:220;s:3:"⃩";i:230;s:3:"⃪";i:1;s:3:"⃫";i:1;s:3:"⃬";i:220;s:3:"⃭";i:220;s:3:"⃮";i:220;s:3:"⃯";i:220;s:3:"⃰";i:230;s:3:"⳯";i:230;s:3:"⳰";i:230;s:3:"⳱";i:230;s:3:"⵿";i:9;s:3:"ⷠ";i:230;s:3:"ⷡ";i:230;s:3:"ⷢ";i:230;s:3:"ⷣ";i:230;s:3:"ⷤ";i:230;s:3:"ⷥ";i:230;s:3:"ⷦ";i:230;s:3:"ⷧ";i:230;s:3:"ⷨ";i:230;s:3:"ⷩ";i:230;s:3:"ⷪ";i:230;s:3:"ⷫ";i:230;s:3:"ⷬ";i:230;s:3:"ⷭ";i:230;s:3:"ⷮ";i:230;s:3:"ⷯ";i:230;s:3:"ⷰ";i:230;s:3:"ⷱ";i:230;s:3:"ⷲ";i:230;s:3:"ⷳ";i:230;s:3:"ⷴ";i:230;s:3:"ⷵ";i:230;s:3:"ⷶ";i:230;s:3:"ⷷ";i:230;s:3:"ⷸ";i:230;s:3:"ⷹ";i:230;s:3:"ⷺ";i:230;s:3:"ⷻ";i:230;s:3:"ⷼ";i:230;s:3:"ⷽ";i:230;s:3:"ⷾ";i:230;s:3:"ⷿ";i:230;s:3:"〪";i:218;s:3:"〫";i:228;s:3:"〬";i:232;s:3:"〭";i:222;s:3:"〮";i:224;s:3:"〯";i:224;s:3:"゙";i:8;s:3:"゚";i:8;s:3:"꙯";i:230;s:3:"ꙴ";i:230;s:3:"ꙵ";i:230;s:3:"ꙶ";i:230;s:3:"ꙷ";i:230;s:3:"ꙸ";i:230;s:3:"ꙹ";i:230;s:3:"ꙺ";i:230;s:3:"ꙻ";i:230;s:3:"꙼";i:230;s:3:"꙽";i:230;s:3:"ꚟ";i:230;s:3:"꛰";i:230;s:3:"꛱";i:230;s:3:"꠆";i:9;s:3:"꣄";i:9;s:3:"꣠";i:230;s:3:"꣡";i:230;s:3:"꣢";i:230;s:3:"꣣";i:230;s:3:"꣤";i:230;s:3:"꣥";i:230;s:3:"꣦";i:230;s:3:"꣧";i:230;s:3:"꣨";i:230;s:3:"꣩";i:230;s:3:"꣪";i:230;s:3:"꣫";i:230;s:3:"꣬";i:230;s:3:"꣭";i:230;s:3:"꣮";i:230;s:3:"꣯";i:230;s:3:"꣰";i:230;s:3:"꣱";i:230;s:3:"꤫";i:220;s:3:"꤬";i:220;s:3:"꤭";i:220;s:3:"꥓";i:9;s:3:"꦳";i:7;s:3:"꧀";i:9;s:3:"ꪰ";i:230;s:3:"ꪲ";i:230;s:3:"ꪳ";i:230;s:3:"ꪴ";i:220;s:3:"ꪷ";i:230;s:3:"ꪸ";i:230;s:3:"ꪾ";i:230;s:3:"꪿";i:230;s:3:"꫁";i:230;s:3:"꫶";i:9;s:3:"꯭";i:9;s:3:"ﬞ";i:26;s:3:"︠";i:230;s:3:"︡";i:230;s:3:"︢";i:230;s:3:"︣";i:230;s:3:"︤";i:230;s:3:"︥";i:230;s:3:"︦";i:230;s:4:"𐇽";i:220;s:4:"𐨍";i:220;s:4:"𐨏";i:230;s:4:"𐨸";i:230;s:4:"𐨹";i:1;s:4:"𐨺";i:220;s:4:"𐨿";i:9;s:4:"𑁆";i:9;s:4:"𑂹";i:9;s:4:"𑂺";i:7;s:4:"𑄀";i:230;s:4:"𑄁";i:230;s:4:"𑄂";i:230;s:4:"𑄳";i:9;s:4:"𑄴";i:9;s:4:"𑇀";i:9;s:4:"𑚶";i:9;s:4:"𑚷";i:7;s:4:"𝅥";i:216;s:4:"𝅦";i:216;s:4:"𝅧";i:1;s:4:"𝅨";i:1;s:4:"𝅩";i:1;s:4:"𝅭";i:226;s:4:"𝅮";i:216;s:4:"𝅯";i:216;s:4:"𝅰";i:216;s:4:"𝅱";i:216;s:4:"𝅲";i:216;s:4:"𝅻";i:220;s:4:"𝅼";i:220;s:4:"𝅽";i:220;s:4:"𝅾";i:220;s:4:"𝅿";i:220;s:4:"𝆀";i:220;s:4:"𝆁";i:220;s:4:"𝆂";i:220;s:4:"𝆅";i:230;s:4:"𝆆";i:230;s:4:"𝆇";i:230;s:4:"𝆈";i:230;s:4:"𝆉";i:230;s:4:"𝆊";i:220;s:4:"𝆋";i:220;s:4:"𝆪";i:230;s:4:"𝆫";i:230;s:4:"𝆬";i:230;s:4:"𝆭";i:230;s:4:"𝉂";i:230;s:4:"𝉃";i:230;s:4:"𝉄";i:230;} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser deleted file mode 100644 index 24482dd2..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser +++ /dev/null @@ -1 +0,0 @@ -a:3671:{s:2:" ";s:1:" ";s:2:"¨";s:3:" ̈";s:2:"ª";s:1:"a";s:2:"¯";s:3:" ̄";s:2:"²";s:1:"2";s:2:"³";s:1:"3";s:2:"´";s:3:" ́";s:2:"µ";s:2:"μ";s:2:"¸";s:3:" ̧";s:2:"¹";s:1:"1";s:2:"º";s:1:"o";s:2:"¼";s:5:"1⁄4";s:2:"½";s:5:"1⁄2";s:2:"¾";s:5:"3⁄4";s:2:"IJ";s:2:"IJ";s:2:"ij";s:2:"ij";s:2:"Ŀ";s:3:"L·";s:2:"ŀ";s:3:"l·";s:2:"ʼn";s:3:"ʼn";s:2:"ſ";s:1:"s";s:2:"DŽ";s:4:"DŽ";s:2:"Dž";s:4:"Dž";s:2:"dž";s:4:"dž";s:2:"LJ";s:2:"LJ";s:2:"Lj";s:2:"Lj";s:2:"lj";s:2:"lj";s:2:"NJ";s:2:"NJ";s:2:"Nj";s:2:"Nj";s:2:"nj";s:2:"nj";s:2:"DZ";s:2:"DZ";s:2:"Dz";s:2:"Dz";s:2:"dz";s:2:"dz";s:2:"ʰ";s:1:"h";s:2:"ʱ";s:2:"ɦ";s:2:"ʲ";s:1:"j";s:2:"ʳ";s:1:"r";s:2:"ʴ";s:2:"ɹ";s:2:"ʵ";s:2:"ɻ";s:2:"ʶ";s:2:"ʁ";s:2:"ʷ";s:1:"w";s:2:"ʸ";s:1:"y";s:2:"˘";s:3:" ̆";s:2:"˙";s:3:" ̇";s:2:"˚";s:3:" ̊";s:2:"˛";s:3:" ̨";s:2:"˜";s:3:" ̃";s:2:"˝";s:3:" ̋";s:2:"ˠ";s:2:"ɣ";s:2:"ˡ";s:1:"l";s:2:"ˢ";s:1:"s";s:2:"ˣ";s:1:"x";s:2:"ˤ";s:2:"ʕ";s:2:"ͺ";s:3:" ͅ";s:2:"΄";s:3:" ́";s:2:"΅";s:5:" ̈́";s:2:"ϐ";s:2:"β";s:2:"ϑ";s:2:"θ";s:2:"ϒ";s:2:"Υ";s:2:"ϓ";s:4:"Ύ";s:2:"ϔ";s:4:"Ϋ";s:2:"ϕ";s:2:"φ";s:2:"ϖ";s:2:"π";s:2:"ϰ";s:2:"κ";s:2:"ϱ";s:2:"ρ";s:2:"ϲ";s:2:"ς";s:2:"ϴ";s:2:"Θ";s:2:"ϵ";s:2:"ε";s:2:"Ϲ";s:2:"Σ";s:2:"և";s:4:"եւ";s:2:"ٵ";s:4:"اٴ";s:2:"ٶ";s:4:"وٴ";s:2:"ٷ";s:4:"ۇٴ";s:2:"ٸ";s:4:"يٴ";s:3:"ำ";s:6:"ํา";s:3:"ຳ";s:6:"ໍາ";s:3:"ໜ";s:6:"ຫນ";s:3:"ໝ";s:6:"ຫມ";s:3:"༌";s:3:"་";s:3:"ཷ";s:9:"ྲཱྀ";s:3:"ཹ";s:9:"ླཱྀ";s:3:"ჼ";s:3:"ნ";s:3:"ᴬ";s:1:"A";s:3:"ᴭ";s:2:"Æ";s:3:"ᴮ";s:1:"B";s:3:"ᴰ";s:1:"D";s:3:"ᴱ";s:1:"E";s:3:"ᴲ";s:2:"Ǝ";s:3:"ᴳ";s:1:"G";s:3:"ᴴ";s:1:"H";s:3:"ᴵ";s:1:"I";s:3:"ᴶ";s:1:"J";s:3:"ᴷ";s:1:"K";s:3:"ᴸ";s:1:"L";s:3:"ᴹ";s:1:"M";s:3:"ᴺ";s:1:"N";s:3:"ᴼ";s:1:"O";s:3:"ᴽ";s:2:"Ȣ";s:3:"ᴾ";s:1:"P";s:3:"ᴿ";s:1:"R";s:3:"ᵀ";s:1:"T";s:3:"ᵁ";s:1:"U";s:3:"ᵂ";s:1:"W";s:3:"ᵃ";s:1:"a";s:3:"ᵄ";s:2:"ɐ";s:3:"ᵅ";s:2:"ɑ";s:3:"ᵆ";s:3:"ᴂ";s:3:"ᵇ";s:1:"b";s:3:"ᵈ";s:1:"d";s:3:"ᵉ";s:1:"e";s:3:"ᵊ";s:2:"ə";s:3:"ᵋ";s:2:"ɛ";s:3:"ᵌ";s:2:"ɜ";s:3:"ᵍ";s:1:"g";s:3:"ᵏ";s:1:"k";s:3:"ᵐ";s:1:"m";s:3:"ᵑ";s:2:"ŋ";s:3:"ᵒ";s:1:"o";s:3:"ᵓ";s:2:"ɔ";s:3:"ᵔ";s:3:"ᴖ";s:3:"ᵕ";s:3:"ᴗ";s:3:"ᵖ";s:1:"p";s:3:"ᵗ";s:1:"t";s:3:"ᵘ";s:1:"u";s:3:"ᵙ";s:3:"ᴝ";s:3:"ᵚ";s:2:"ɯ";s:3:"ᵛ";s:1:"v";s:3:"ᵜ";s:3:"ᴥ";s:3:"ᵝ";s:2:"β";s:3:"ᵞ";s:2:"γ";s:3:"ᵟ";s:2:"δ";s:3:"ᵠ";s:2:"φ";s:3:"ᵡ";s:2:"χ";s:3:"ᵢ";s:1:"i";s:3:"ᵣ";s:1:"r";s:3:"ᵤ";s:1:"u";s:3:"ᵥ";s:1:"v";s:3:"ᵦ";s:2:"β";s:3:"ᵧ";s:2:"γ";s:3:"ᵨ";s:2:"ρ";s:3:"ᵩ";s:2:"φ";s:3:"ᵪ";s:2:"χ";s:3:"ᵸ";s:2:"н";s:3:"ᶛ";s:2:"ɒ";s:3:"ᶜ";s:1:"c";s:3:"ᶝ";s:2:"ɕ";s:3:"ᶞ";s:2:"ð";s:3:"ᶟ";s:2:"ɜ";s:3:"ᶠ";s:1:"f";s:3:"ᶡ";s:2:"ɟ";s:3:"ᶢ";s:2:"ɡ";s:3:"ᶣ";s:2:"ɥ";s:3:"ᶤ";s:2:"ɨ";s:3:"ᶥ";s:2:"ɩ";s:3:"ᶦ";s:2:"ɪ";s:3:"ᶧ";s:3:"ᵻ";s:3:"ᶨ";s:2:"ʝ";s:3:"ᶩ";s:2:"ɭ";s:3:"ᶪ";s:3:"ᶅ";s:3:"ᶫ";s:2:"ʟ";s:3:"ᶬ";s:2:"ɱ";s:3:"ᶭ";s:2:"ɰ";s:3:"ᶮ";s:2:"ɲ";s:3:"ᶯ";s:2:"ɳ";s:3:"ᶰ";s:2:"ɴ";s:3:"ᶱ";s:2:"ɵ";s:3:"ᶲ";s:2:"ɸ";s:3:"ᶳ";s:2:"ʂ";s:3:"ᶴ";s:2:"ʃ";s:3:"ᶵ";s:2:"ƫ";s:3:"ᶶ";s:2:"ʉ";s:3:"ᶷ";s:2:"ʊ";s:3:"ᶸ";s:3:"ᴜ";s:3:"ᶹ";s:2:"ʋ";s:3:"ᶺ";s:2:"ʌ";s:3:"ᶻ";s:1:"z";s:3:"ᶼ";s:2:"ʐ";s:3:"ᶽ";s:2:"ʑ";s:3:"ᶾ";s:2:"ʒ";s:3:"ᶿ";s:2:"θ";s:3:"ẚ";s:3:"aʾ";s:3:"ẛ";s:3:"ṡ";s:3:"᾽";s:3:" ̓";s:3:"᾿";s:3:" ̓";s:3:"῀";s:3:" ͂";s:3:"῁";s:5:" ̈͂";s:3:"῍";s:5:" ̓̀";s:3:"῎";s:5:" ̓́";s:3:"῏";s:5:" ̓͂";s:3:"῝";s:5:" ̔̀";s:3:"῞";s:5:" ̔́";s:3:"῟";s:5:" ̔͂";s:3:"῭";s:5:" ̈̀";s:3:"΅";s:5:" ̈́";s:3:"´";s:3:" ́";s:3:"῾";s:3:" ̔";s:3:" ";s:1:" ";s:3:" ";s:1:" ";s:3:" ";s:1:" ";s:3:" ";s:1:" ";s:3:" ";s:1:" ";s:3:" ";s:1:" ";s:3:" ";s:1:" ";s:3:" ";s:1:" ";s:3:" ";s:1:" ";s:3:" ";s:1:" ";s:3:" ";s:1:" ";s:3:"‑";s:3:"‐";s:3:"‗";s:3:" ̳";s:3:"․";s:1:".";s:3:"‥";s:2:"..";s:3:"…";s:3:"...";s:3:" ";s:1:" ";s:3:"″";s:6:"′′";s:3:"‴";s:9:"′′′";s:3:"‶";s:6:"‵‵";s:3:"‷";s:9:"‵‵‵";s:3:"‼";s:2:"!!";s:3:"‾";s:3:" ̅";s:3:"⁇";s:2:"??";s:3:"⁈";s:2:"?!";s:3:"⁉";s:2:"!?";s:3:"⁗";s:12:"′′′′";s:3:" ";s:1:" ";s:3:"⁰";s:1:"0";s:3:"ⁱ";s:1:"i";s:3:"⁴";s:1:"4";s:3:"⁵";s:1:"5";s:3:"⁶";s:1:"6";s:3:"⁷";s:1:"7";s:3:"⁸";s:1:"8";s:3:"⁹";s:1:"9";s:3:"⁺";s:1:"+";s:3:"⁻";s:3:"−";s:3:"⁼";s:1:"=";s:3:"⁽";s:1:"(";s:3:"⁾";s:1:")";s:3:"ⁿ";s:1:"n";s:3:"₀";s:1:"0";s:3:"₁";s:1:"1";s:3:"₂";s:1:"2";s:3:"₃";s:1:"3";s:3:"₄";s:1:"4";s:3:"₅";s:1:"5";s:3:"₆";s:1:"6";s:3:"₇";s:1:"7";s:3:"₈";s:1:"8";s:3:"₉";s:1:"9";s:3:"₊";s:1:"+";s:3:"₋";s:3:"−";s:3:"₌";s:1:"=";s:3:"₍";s:1:"(";s:3:"₎";s:1:")";s:3:"ₐ";s:1:"a";s:3:"ₑ";s:1:"e";s:3:"ₒ";s:1:"o";s:3:"ₓ";s:1:"x";s:3:"ₔ";s:2:"ə";s:3:"ₕ";s:1:"h";s:3:"ₖ";s:1:"k";s:3:"ₗ";s:1:"l";s:3:"ₘ";s:1:"m";s:3:"ₙ";s:1:"n";s:3:"ₚ";s:1:"p";s:3:"ₛ";s:1:"s";s:3:"ₜ";s:1:"t";s:3:"₨";s:2:"Rs";s:3:"℀";s:3:"a/c";s:3:"℁";s:3:"a/s";s:3:"ℂ";s:1:"C";s:3:"℃";s:3:"°C";s:3:"℅";s:3:"c/o";s:3:"℆";s:3:"c/u";s:3:"ℇ";s:2:"Ɛ";s:3:"℉";s:3:"°F";s:3:"ℊ";s:1:"g";s:3:"ℋ";s:1:"H";s:3:"ℌ";s:1:"H";s:3:"ℍ";s:1:"H";s:3:"ℎ";s:1:"h";s:3:"ℏ";s:2:"ħ";s:3:"ℐ";s:1:"I";s:3:"ℑ";s:1:"I";s:3:"ℒ";s:1:"L";s:3:"ℓ";s:1:"l";s:3:"ℕ";s:1:"N";s:3:"№";s:2:"No";s:3:"ℙ";s:1:"P";s:3:"ℚ";s:1:"Q";s:3:"ℛ";s:1:"R";s:3:"ℜ";s:1:"R";s:3:"ℝ";s:1:"R";s:3:"℠";s:2:"SM";s:3:"℡";s:3:"TEL";s:3:"™";s:2:"TM";s:3:"ℤ";s:1:"Z";s:3:"ℨ";s:1:"Z";s:3:"ℬ";s:1:"B";s:3:"ℭ";s:1:"C";s:3:"ℯ";s:1:"e";s:3:"ℰ";s:1:"E";s:3:"ℱ";s:1:"F";s:3:"ℳ";s:1:"M";s:3:"ℴ";s:1:"o";s:3:"ℵ";s:2:"א";s:3:"ℶ";s:2:"ב";s:3:"ℷ";s:2:"ג";s:3:"ℸ";s:2:"ד";s:3:"ℹ";s:1:"i";s:3:"℻";s:3:"FAX";s:3:"ℼ";s:2:"π";s:3:"ℽ";s:2:"γ";s:3:"ℾ";s:2:"Γ";s:3:"ℿ";s:2:"Π";s:3:"⅀";s:3:"∑";s:3:"ⅅ";s:1:"D";s:3:"ⅆ";s:1:"d";s:3:"ⅇ";s:1:"e";s:3:"ⅈ";s:1:"i";s:3:"ⅉ";s:1:"j";s:3:"⅐";s:5:"1⁄7";s:3:"⅑";s:5:"1⁄9";s:3:"⅒";s:6:"1⁄10";s:3:"⅓";s:5:"1⁄3";s:3:"⅔";s:5:"2⁄3";s:3:"⅕";s:5:"1⁄5";s:3:"⅖";s:5:"2⁄5";s:3:"⅗";s:5:"3⁄5";s:3:"⅘";s:5:"4⁄5";s:3:"⅙";s:5:"1⁄6";s:3:"⅚";s:5:"5⁄6";s:3:"⅛";s:5:"1⁄8";s:3:"⅜";s:5:"3⁄8";s:3:"⅝";s:5:"5⁄8";s:3:"⅞";s:5:"7⁄8";s:3:"⅟";s:4:"1⁄";s:3:"Ⅰ";s:1:"I";s:3:"Ⅱ";s:2:"II";s:3:"Ⅲ";s:3:"III";s:3:"Ⅳ";s:2:"IV";s:3:"Ⅴ";s:1:"V";s:3:"Ⅵ";s:2:"VI";s:3:"Ⅶ";s:3:"VII";s:3:"Ⅷ";s:4:"VIII";s:3:"Ⅸ";s:2:"IX";s:3:"Ⅹ";s:1:"X";s:3:"Ⅺ";s:2:"XI";s:3:"Ⅻ";s:3:"XII";s:3:"Ⅼ";s:1:"L";s:3:"Ⅽ";s:1:"C";s:3:"Ⅾ";s:1:"D";s:3:"Ⅿ";s:1:"M";s:3:"ⅰ";s:1:"i";s:3:"ⅱ";s:2:"ii";s:3:"ⅲ";s:3:"iii";s:3:"ⅳ";s:2:"iv";s:3:"ⅴ";s:1:"v";s:3:"ⅵ";s:2:"vi";s:3:"ⅶ";s:3:"vii";s:3:"ⅷ";s:4:"viii";s:3:"ⅸ";s:2:"ix";s:3:"ⅹ";s:1:"x";s:3:"ⅺ";s:2:"xi";s:3:"ⅻ";s:3:"xii";s:3:"ⅼ";s:1:"l";s:3:"ⅽ";s:1:"c";s:3:"ⅾ";s:1:"d";s:3:"ⅿ";s:1:"m";s:3:"↉";s:5:"0⁄3";s:3:"∬";s:6:"∫∫";s:3:"∭";s:9:"∫∫∫";s:3:"∯";s:6:"∮∮";s:3:"∰";s:9:"∮∮∮";s:3:"①";s:1:"1";s:3:"②";s:1:"2";s:3:"③";s:1:"3";s:3:"④";s:1:"4";s:3:"⑤";s:1:"5";s:3:"⑥";s:1:"6";s:3:"⑦";s:1:"7";s:3:"⑧";s:1:"8";s:3:"⑨";s:1:"9";s:3:"⑩";s:2:"10";s:3:"⑪";s:2:"11";s:3:"⑫";s:2:"12";s:3:"⑬";s:2:"13";s:3:"⑭";s:2:"14";s:3:"⑮";s:2:"15";s:3:"⑯";s:2:"16";s:3:"⑰";s:2:"17";s:3:"⑱";s:2:"18";s:3:"⑲";s:2:"19";s:3:"⑳";s:2:"20";s:3:"⑴";s:3:"(1)";s:3:"⑵";s:3:"(2)";s:3:"⑶";s:3:"(3)";s:3:"⑷";s:3:"(4)";s:3:"⑸";s:3:"(5)";s:3:"⑹";s:3:"(6)";s:3:"⑺";s:3:"(7)";s:3:"⑻";s:3:"(8)";s:3:"⑼";s:3:"(9)";s:3:"⑽";s:4:"(10)";s:3:"⑾";s:4:"(11)";s:3:"⑿";s:4:"(12)";s:3:"⒀";s:4:"(13)";s:3:"⒁";s:4:"(14)";s:3:"⒂";s:4:"(15)";s:3:"⒃";s:4:"(16)";s:3:"⒄";s:4:"(17)";s:3:"⒅";s:4:"(18)";s:3:"⒆";s:4:"(19)";s:3:"⒇";s:4:"(20)";s:3:"⒈";s:2:"1.";s:3:"⒉";s:2:"2.";s:3:"⒊";s:2:"3.";s:3:"⒋";s:2:"4.";s:3:"⒌";s:2:"5.";s:3:"⒍";s:2:"6.";s:3:"⒎";s:2:"7.";s:3:"⒏";s:2:"8.";s:3:"⒐";s:2:"9.";s:3:"⒑";s:3:"10.";s:3:"⒒";s:3:"11.";s:3:"⒓";s:3:"12.";s:3:"⒔";s:3:"13.";s:3:"⒕";s:3:"14.";s:3:"⒖";s:3:"15.";s:3:"⒗";s:3:"16.";s:3:"⒘";s:3:"17.";s:3:"⒙";s:3:"18.";s:3:"⒚";s:3:"19.";s:3:"⒛";s:3:"20.";s:3:"⒜";s:3:"(a)";s:3:"⒝";s:3:"(b)";s:3:"⒞";s:3:"(c)";s:3:"⒟";s:3:"(d)";s:3:"⒠";s:3:"(e)";s:3:"⒡";s:3:"(f)";s:3:"⒢";s:3:"(g)";s:3:"⒣";s:3:"(h)";s:3:"⒤";s:3:"(i)";s:3:"⒥";s:3:"(j)";s:3:"⒦";s:3:"(k)";s:3:"⒧";s:3:"(l)";s:3:"⒨";s:3:"(m)";s:3:"⒩";s:3:"(n)";s:3:"⒪";s:3:"(o)";s:3:"⒫";s:3:"(p)";s:3:"⒬";s:3:"(q)";s:3:"⒭";s:3:"(r)";s:3:"⒮";s:3:"(s)";s:3:"⒯";s:3:"(t)";s:3:"⒰";s:3:"(u)";s:3:"⒱";s:3:"(v)";s:3:"⒲";s:3:"(w)";s:3:"⒳";s:3:"(x)";s:3:"⒴";s:3:"(y)";s:3:"⒵";s:3:"(z)";s:3:"Ⓐ";s:1:"A";s:3:"Ⓑ";s:1:"B";s:3:"Ⓒ";s:1:"C";s:3:"Ⓓ";s:1:"D";s:3:"Ⓔ";s:1:"E";s:3:"Ⓕ";s:1:"F";s:3:"Ⓖ";s:1:"G";s:3:"Ⓗ";s:1:"H";s:3:"Ⓘ";s:1:"I";s:3:"Ⓙ";s:1:"J";s:3:"Ⓚ";s:1:"K";s:3:"Ⓛ";s:1:"L";s:3:"Ⓜ";s:1:"M";s:3:"Ⓝ";s:1:"N";s:3:"Ⓞ";s:1:"O";s:3:"Ⓟ";s:1:"P";s:3:"Ⓠ";s:1:"Q";s:3:"Ⓡ";s:1:"R";s:3:"Ⓢ";s:1:"S";s:3:"Ⓣ";s:1:"T";s:3:"Ⓤ";s:1:"U";s:3:"Ⓥ";s:1:"V";s:3:"Ⓦ";s:1:"W";s:3:"Ⓧ";s:1:"X";s:3:"Ⓨ";s:1:"Y";s:3:"Ⓩ";s:1:"Z";s:3:"ⓐ";s:1:"a";s:3:"ⓑ";s:1:"b";s:3:"ⓒ";s:1:"c";s:3:"ⓓ";s:1:"d";s:3:"ⓔ";s:1:"e";s:3:"ⓕ";s:1:"f";s:3:"ⓖ";s:1:"g";s:3:"ⓗ";s:1:"h";s:3:"ⓘ";s:1:"i";s:3:"ⓙ";s:1:"j";s:3:"ⓚ";s:1:"k";s:3:"ⓛ";s:1:"l";s:3:"ⓜ";s:1:"m";s:3:"ⓝ";s:1:"n";s:3:"ⓞ";s:1:"o";s:3:"ⓟ";s:1:"p";s:3:"ⓠ";s:1:"q";s:3:"ⓡ";s:1:"r";s:3:"ⓢ";s:1:"s";s:3:"ⓣ";s:1:"t";s:3:"ⓤ";s:1:"u";s:3:"ⓥ";s:1:"v";s:3:"ⓦ";s:1:"w";s:3:"ⓧ";s:1:"x";s:3:"ⓨ";s:1:"y";s:3:"ⓩ";s:1:"z";s:3:"⓪";s:1:"0";s:3:"⨌";s:12:"∫∫∫∫";s:3:"⩴";s:3:"::=";s:3:"⩵";s:2:"==";s:3:"⩶";s:3:"===";s:3:"ⱼ";s:1:"j";s:3:"ⱽ";s:1:"V";s:3:"ⵯ";s:3:"ⵡ";s:3:"⺟";s:3:"母";s:3:"⻳";s:3:"龟";s:3:"⼀";s:3:"一";s:3:"⼁";s:3:"丨";s:3:"⼂";s:3:"丶";s:3:"⼃";s:3:"丿";s:3:"⼄";s:3:"乙";s:3:"⼅";s:3:"亅";s:3:"⼆";s:3:"二";s:3:"⼇";s:3:"亠";s:3:"⼈";s:3:"人";s:3:"⼉";s:3:"儿";s:3:"⼊";s:3:"入";s:3:"⼋";s:3:"八";s:3:"⼌";s:3:"冂";s:3:"⼍";s:3:"冖";s:3:"⼎";s:3:"冫";s:3:"⼏";s:3:"几";s:3:"⼐";s:3:"凵";s:3:"⼑";s:3:"刀";s:3:"⼒";s:3:"力";s:3:"⼓";s:3:"勹";s:3:"⼔";s:3:"匕";s:3:"⼕";s:3:"匚";s:3:"⼖";s:3:"匸";s:3:"⼗";s:3:"十";s:3:"⼘";s:3:"卜";s:3:"⼙";s:3:"卩";s:3:"⼚";s:3:"厂";s:3:"⼛";s:3:"厶";s:3:"⼜";s:3:"又";s:3:"⼝";s:3:"口";s:3:"⼞";s:3:"囗";s:3:"⼟";s:3:"土";s:3:"⼠";s:3:"士";s:3:"⼡";s:3:"夂";s:3:"⼢";s:3:"夊";s:3:"⼣";s:3:"夕";s:3:"⼤";s:3:"大";s:3:"⼥";s:3:"女";s:3:"⼦";s:3:"子";s:3:"⼧";s:3:"宀";s:3:"⼨";s:3:"寸";s:3:"⼩";s:3:"小";s:3:"⼪";s:3:"尢";s:3:"⼫";s:3:"尸";s:3:"⼬";s:3:"屮";s:3:"⼭";s:3:"山";s:3:"⼮";s:3:"巛";s:3:"⼯";s:3:"工";s:3:"⼰";s:3:"己";s:3:"⼱";s:3:"巾";s:3:"⼲";s:3:"干";s:3:"⼳";s:3:"幺";s:3:"⼴";s:3:"广";s:3:"⼵";s:3:"廴";s:3:"⼶";s:3:"廾";s:3:"⼷";s:3:"弋";s:3:"⼸";s:3:"弓";s:3:"⼹";s:3:"彐";s:3:"⼺";s:3:"彡";s:3:"⼻";s:3:"彳";s:3:"⼼";s:3:"心";s:3:"⼽";s:3:"戈";s:3:"⼾";s:3:"戶";s:3:"⼿";s:3:"手";s:3:"⽀";s:3:"支";s:3:"⽁";s:3:"攴";s:3:"⽂";s:3:"文";s:3:"⽃";s:3:"斗";s:3:"⽄";s:3:"斤";s:3:"⽅";s:3:"方";s:3:"⽆";s:3:"无";s:3:"⽇";s:3:"日";s:3:"⽈";s:3:"曰";s:3:"⽉";s:3:"月";s:3:"⽊";s:3:"木";s:3:"⽋";s:3:"欠";s:3:"⽌";s:3:"止";s:3:"⽍";s:3:"歹";s:3:"⽎";s:3:"殳";s:3:"⽏";s:3:"毋";s:3:"⽐";s:3:"比";s:3:"⽑";s:3:"毛";s:3:"⽒";s:3:"氏";s:3:"⽓";s:3:"气";s:3:"⽔";s:3:"水";s:3:"⽕";s:3:"火";s:3:"⽖";s:3:"爪";s:3:"⽗";s:3:"父";s:3:"⽘";s:3:"爻";s:3:"⽙";s:3:"爿";s:3:"⽚";s:3:"片";s:3:"⽛";s:3:"牙";s:3:"⽜";s:3:"牛";s:3:"⽝";s:3:"犬";s:3:"⽞";s:3:"玄";s:3:"⽟";s:3:"玉";s:3:"⽠";s:3:"瓜";s:3:"⽡";s:3:"瓦";s:3:"⽢";s:3:"甘";s:3:"⽣";s:3:"生";s:3:"⽤";s:3:"用";s:3:"⽥";s:3:"田";s:3:"⽦";s:3:"疋";s:3:"⽧";s:3:"疒";s:3:"⽨";s:3:"癶";s:3:"⽩";s:3:"白";s:3:"⽪";s:3:"皮";s:3:"⽫";s:3:"皿";s:3:"⽬";s:3:"目";s:3:"⽭";s:3:"矛";s:3:"⽮";s:3:"矢";s:3:"⽯";s:3:"石";s:3:"⽰";s:3:"示";s:3:"⽱";s:3:"禸";s:3:"⽲";s:3:"禾";s:3:"⽳";s:3:"穴";s:3:"⽴";s:3:"立";s:3:"⽵";s:3:"竹";s:3:"⽶";s:3:"米";s:3:"⽷";s:3:"糸";s:3:"⽸";s:3:"缶";s:3:"⽹";s:3:"网";s:3:"⽺";s:3:"羊";s:3:"⽻";s:3:"羽";s:3:"⽼";s:3:"老";s:3:"⽽";s:3:"而";s:3:"⽾";s:3:"耒";s:3:"⽿";s:3:"耳";s:3:"⾀";s:3:"聿";s:3:"⾁";s:3:"肉";s:3:"⾂";s:3:"臣";s:3:"⾃";s:3:"自";s:3:"⾄";s:3:"至";s:3:"⾅";s:3:"臼";s:3:"⾆";s:3:"舌";s:3:"⾇";s:3:"舛";s:3:"⾈";s:3:"舟";s:3:"⾉";s:3:"艮";s:3:"⾊";s:3:"色";s:3:"⾋";s:3:"艸";s:3:"⾌";s:3:"虍";s:3:"⾍";s:3:"虫";s:3:"⾎";s:3:"血";s:3:"⾏";s:3:"行";s:3:"⾐";s:3:"衣";s:3:"⾑";s:3:"襾";s:3:"⾒";s:3:"見";s:3:"⾓";s:3:"角";s:3:"⾔";s:3:"言";s:3:"⾕";s:3:"谷";s:3:"⾖";s:3:"豆";s:3:"⾗";s:3:"豕";s:3:"⾘";s:3:"豸";s:3:"⾙";s:3:"貝";s:3:"⾚";s:3:"赤";s:3:"⾛";s:3:"走";s:3:"⾜";s:3:"足";s:3:"⾝";s:3:"身";s:3:"⾞";s:3:"車";s:3:"⾟";s:3:"辛";s:3:"⾠";s:3:"辰";s:3:"⾡";s:3:"辵";s:3:"⾢";s:3:"邑";s:3:"⾣";s:3:"酉";s:3:"⾤";s:3:"釆";s:3:"⾥";s:3:"里";s:3:"⾦";s:3:"金";s:3:"⾧";s:3:"長";s:3:"⾨";s:3:"門";s:3:"⾩";s:3:"阜";s:3:"⾪";s:3:"隶";s:3:"⾫";s:3:"隹";s:3:"⾬";s:3:"雨";s:3:"⾭";s:3:"靑";s:3:"⾮";s:3:"非";s:3:"⾯";s:3:"面";s:3:"⾰";s:3:"革";s:3:"⾱";s:3:"韋";s:3:"⾲";s:3:"韭";s:3:"⾳";s:3:"音";s:3:"⾴";s:3:"頁";s:3:"⾵";s:3:"風";s:3:"⾶";s:3:"飛";s:3:"⾷";s:3:"食";s:3:"⾸";s:3:"首";s:3:"⾹";s:3:"香";s:3:"⾺";s:3:"馬";s:3:"⾻";s:3:"骨";s:3:"⾼";s:3:"高";s:3:"⾽";s:3:"髟";s:3:"⾾";s:3:"鬥";s:3:"⾿";s:3:"鬯";s:3:"⿀";s:3:"鬲";s:3:"⿁";s:3:"鬼";s:3:"⿂";s:3:"魚";s:3:"⿃";s:3:"鳥";s:3:"⿄";s:3:"鹵";s:3:"⿅";s:3:"鹿";s:3:"⿆";s:3:"麥";s:3:"⿇";s:3:"麻";s:3:"⿈";s:3:"黃";s:3:"⿉";s:3:"黍";s:3:"⿊";s:3:"黑";s:3:"⿋";s:3:"黹";s:3:"⿌";s:3:"黽";s:3:"⿍";s:3:"鼎";s:3:"⿎";s:3:"鼓";s:3:"⿏";s:3:"鼠";s:3:"⿐";s:3:"鼻";s:3:"⿑";s:3:"齊";s:3:"⿒";s:3:"齒";s:3:"⿓";s:3:"龍";s:3:"⿔";s:3:"龜";s:3:"⿕";s:3:"龠";s:3:" ";s:1:" ";s:3:"〶";s:3:"〒";s:3:"〸";s:3:"十";s:3:"〹";s:3:"卄";s:3:"〺";s:3:"卅";s:3:"゛";s:4:" ゙";s:3:"゜";s:4:" ゚";s:3:"ゟ";s:6:"より";s:3:"ヿ";s:6:"コト";s:3:"ㄱ";s:3:"ᄀ";s:3:"ㄲ";s:3:"ᄁ";s:3:"ㄳ";s:3:"ᆪ";s:3:"ㄴ";s:3:"ᄂ";s:3:"ㄵ";s:3:"ᆬ";s:3:"ㄶ";s:3:"ᆭ";s:3:"ㄷ";s:3:"ᄃ";s:3:"ㄸ";s:3:"ᄄ";s:3:"ㄹ";s:3:"ᄅ";s:3:"ㄺ";s:3:"ᆰ";s:3:"ㄻ";s:3:"ᆱ";s:3:"ㄼ";s:3:"ᆲ";s:3:"ㄽ";s:3:"ᆳ";s:3:"ㄾ";s:3:"ᆴ";s:3:"ㄿ";s:3:"ᆵ";s:3:"ㅀ";s:3:"ᄚ";s:3:"ㅁ";s:3:"ᄆ";s:3:"ㅂ";s:3:"ᄇ";s:3:"ㅃ";s:3:"ᄈ";s:3:"ㅄ";s:3:"ᄡ";s:3:"ㅅ";s:3:"ᄉ";s:3:"ㅆ";s:3:"ᄊ";s:3:"ㅇ";s:3:"ᄋ";s:3:"ㅈ";s:3:"ᄌ";s:3:"ㅉ";s:3:"ᄍ";s:3:"ㅊ";s:3:"ᄎ";s:3:"ㅋ";s:3:"ᄏ";s:3:"ㅌ";s:3:"ᄐ";s:3:"ㅍ";s:3:"ᄑ";s:3:"ㅎ";s:3:"ᄒ";s:3:"ㅏ";s:3:"ᅡ";s:3:"ㅐ";s:3:"ᅢ";s:3:"ㅑ";s:3:"ᅣ";s:3:"ㅒ";s:3:"ᅤ";s:3:"ㅓ";s:3:"ᅥ";s:3:"ㅔ";s:3:"ᅦ";s:3:"ㅕ";s:3:"ᅧ";s:3:"ㅖ";s:3:"ᅨ";s:3:"ㅗ";s:3:"ᅩ";s:3:"ㅘ";s:3:"ᅪ";s:3:"ㅙ";s:3:"ᅫ";s:3:"ㅚ";s:3:"ᅬ";s:3:"ㅛ";s:3:"ᅭ";s:3:"ㅜ";s:3:"ᅮ";s:3:"ㅝ";s:3:"ᅯ";s:3:"ㅞ";s:3:"ᅰ";s:3:"ㅟ";s:3:"ᅱ";s:3:"ㅠ";s:3:"ᅲ";s:3:"ㅡ";s:3:"ᅳ";s:3:"ㅢ";s:3:"ᅴ";s:3:"ㅣ";s:3:"ᅵ";s:3:"ㅤ";s:3:"ᅠ";s:3:"ㅥ";s:3:"ᄔ";s:3:"ㅦ";s:3:"ᄕ";s:3:"ㅧ";s:3:"ᇇ";s:3:"ㅨ";s:3:"ᇈ";s:3:"ㅩ";s:3:"ᇌ";s:3:"ㅪ";s:3:"ᇎ";s:3:"ㅫ";s:3:"ᇓ";s:3:"ㅬ";s:3:"ᇗ";s:3:"ㅭ";s:3:"ᇙ";s:3:"ㅮ";s:3:"ᄜ";s:3:"ㅯ";s:3:"ᇝ";s:3:"ㅰ";s:3:"ᇟ";s:3:"ㅱ";s:3:"ᄝ";s:3:"ㅲ";s:3:"ᄞ";s:3:"ㅳ";s:3:"ᄠ";s:3:"ㅴ";s:3:"ᄢ";s:3:"ㅵ";s:3:"ᄣ";s:3:"ㅶ";s:3:"ᄧ";s:3:"ㅷ";s:3:"ᄩ";s:3:"ㅸ";s:3:"ᄫ";s:3:"ㅹ";s:3:"ᄬ";s:3:"ㅺ";s:3:"ᄭ";s:3:"ㅻ";s:3:"ᄮ";s:3:"ㅼ";s:3:"ᄯ";s:3:"ㅽ";s:3:"ᄲ";s:3:"ㅾ";s:3:"ᄶ";s:3:"ㅿ";s:3:"ᅀ";s:3:"ㆀ";s:3:"ᅇ";s:3:"ㆁ";s:3:"ᅌ";s:3:"ㆂ";s:3:"ᇱ";s:3:"ㆃ";s:3:"ᇲ";s:3:"ㆄ";s:3:"ᅗ";s:3:"ㆅ";s:3:"ᅘ";s:3:"ㆆ";s:3:"ᅙ";s:3:"ㆇ";s:3:"ᆄ";s:3:"ㆈ";s:3:"ᆅ";s:3:"ㆉ";s:3:"ᆈ";s:3:"ㆊ";s:3:"ᆑ";s:3:"ㆋ";s:3:"ᆒ";s:3:"ㆌ";s:3:"ᆔ";s:3:"ㆍ";s:3:"ᆞ";s:3:"ㆎ";s:3:"ᆡ";s:3:"㆒";s:3:"一";s:3:"㆓";s:3:"二";s:3:"㆔";s:3:"三";s:3:"㆕";s:3:"四";s:3:"㆖";s:3:"上";s:3:"㆗";s:3:"中";s:3:"㆘";s:3:"下";s:3:"㆙";s:3:"甲";s:3:"㆚";s:3:"乙";s:3:"㆛";s:3:"丙";s:3:"㆜";s:3:"丁";s:3:"㆝";s:3:"天";s:3:"㆞";s:3:"地";s:3:"㆟";s:3:"人";s:3:"㈀";s:5:"(ᄀ)";s:3:"㈁";s:5:"(ᄂ)";s:3:"㈂";s:5:"(ᄃ)";s:3:"㈃";s:5:"(ᄅ)";s:3:"㈄";s:5:"(ᄆ)";s:3:"㈅";s:5:"(ᄇ)";s:3:"㈆";s:5:"(ᄉ)";s:3:"㈇";s:5:"(ᄋ)";s:3:"㈈";s:5:"(ᄌ)";s:3:"㈉";s:5:"(ᄎ)";s:3:"㈊";s:5:"(ᄏ)";s:3:"㈋";s:5:"(ᄐ)";s:3:"㈌";s:5:"(ᄑ)";s:3:"㈍";s:5:"(ᄒ)";s:3:"㈎";s:8:"(가)";s:3:"㈏";s:8:"(나)";s:3:"㈐";s:8:"(다)";s:3:"㈑";s:8:"(라)";s:3:"㈒";s:8:"(마)";s:3:"㈓";s:8:"(바)";s:3:"㈔";s:8:"(사)";s:3:"㈕";s:8:"(아)";s:3:"㈖";s:8:"(자)";s:3:"㈗";s:8:"(차)";s:3:"㈘";s:8:"(카)";s:3:"㈙";s:8:"(타)";s:3:"㈚";s:8:"(파)";s:3:"㈛";s:8:"(하)";s:3:"㈜";s:8:"(주)";s:3:"㈝";s:17:"(오전)";s:3:"㈞";s:14:"(오후)";s:3:"㈠";s:5:"(一)";s:3:"㈡";s:5:"(二)";s:3:"㈢";s:5:"(三)";s:3:"㈣";s:5:"(四)";s:3:"㈤";s:5:"(五)";s:3:"㈥";s:5:"(六)";s:3:"㈦";s:5:"(七)";s:3:"㈧";s:5:"(八)";s:3:"㈨";s:5:"(九)";s:3:"㈩";s:5:"(十)";s:3:"㈪";s:5:"(月)";s:3:"㈫";s:5:"(火)";s:3:"㈬";s:5:"(水)";s:3:"㈭";s:5:"(木)";s:3:"㈮";s:5:"(金)";s:3:"㈯";s:5:"(土)";s:3:"㈰";s:5:"(日)";s:3:"㈱";s:5:"(株)";s:3:"㈲";s:5:"(有)";s:3:"㈳";s:5:"(社)";s:3:"㈴";s:5:"(名)";s:3:"㈵";s:5:"(特)";s:3:"㈶";s:5:"(財)";s:3:"㈷";s:5:"(祝)";s:3:"㈸";s:5:"(労)";s:3:"㈹";s:5:"(代)";s:3:"㈺";s:5:"(呼)";s:3:"㈻";s:5:"(学)";s:3:"㈼";s:5:"(監)";s:3:"㈽";s:5:"(企)";s:3:"㈾";s:5:"(資)";s:3:"㈿";s:5:"(協)";s:3:"㉀";s:5:"(祭)";s:3:"㉁";s:5:"(休)";s:3:"㉂";s:5:"(自)";s:3:"㉃";s:5:"(至)";s:3:"㉄";s:3:"問";s:3:"㉅";s:3:"幼";s:3:"㉆";s:3:"文";s:3:"㉇";s:3:"箏";s:3:"㉐";s:3:"PTE";s:3:"㉑";s:2:"21";s:3:"㉒";s:2:"22";s:3:"㉓";s:2:"23";s:3:"㉔";s:2:"24";s:3:"㉕";s:2:"25";s:3:"㉖";s:2:"26";s:3:"㉗";s:2:"27";s:3:"㉘";s:2:"28";s:3:"㉙";s:2:"29";s:3:"㉚";s:2:"30";s:3:"㉛";s:2:"31";s:3:"㉜";s:2:"32";s:3:"㉝";s:2:"33";s:3:"㉞";s:2:"34";s:3:"㉟";s:2:"35";s:3:"㉠";s:3:"ᄀ";s:3:"㉡";s:3:"ᄂ";s:3:"㉢";s:3:"ᄃ";s:3:"㉣";s:3:"ᄅ";s:3:"㉤";s:3:"ᄆ";s:3:"㉥";s:3:"ᄇ";s:3:"㉦";s:3:"ᄉ";s:3:"㉧";s:3:"ᄋ";s:3:"㉨";s:3:"ᄌ";s:3:"㉩";s:3:"ᄎ";s:3:"㉪";s:3:"ᄏ";s:3:"㉫";s:3:"ᄐ";s:3:"㉬";s:3:"ᄑ";s:3:"㉭";s:3:"ᄒ";s:3:"㉮";s:6:"가";s:3:"㉯";s:6:"나";s:3:"㉰";s:6:"다";s:3:"㉱";s:6:"라";s:3:"㉲";s:6:"마";s:3:"㉳";s:6:"바";s:3:"㉴";s:6:"사";s:3:"㉵";s:6:"아";s:3:"㉶";s:6:"자";s:3:"㉷";s:6:"차";s:3:"㉸";s:6:"카";s:3:"㉹";s:6:"타";s:3:"㉺";s:6:"파";s:3:"㉻";s:6:"하";s:3:"㉼";s:15:"참고";s:3:"㉽";s:12:"주의";s:3:"㉾";s:6:"우";s:3:"㊀";s:3:"一";s:3:"㊁";s:3:"二";s:3:"㊂";s:3:"三";s:3:"㊃";s:3:"四";s:3:"㊄";s:3:"五";s:3:"㊅";s:3:"六";s:3:"㊆";s:3:"七";s:3:"㊇";s:3:"八";s:3:"㊈";s:3:"九";s:3:"㊉";s:3:"十";s:3:"㊊";s:3:"月";s:3:"㊋";s:3:"火";s:3:"㊌";s:3:"水";s:3:"㊍";s:3:"木";s:3:"㊎";s:3:"金";s:3:"㊏";s:3:"土";s:3:"㊐";s:3:"日";s:3:"㊑";s:3:"株";s:3:"㊒";s:3:"有";s:3:"㊓";s:3:"社";s:3:"㊔";s:3:"名";s:3:"㊕";s:3:"特";s:3:"㊖";s:3:"財";s:3:"㊗";s:3:"祝";s:3:"㊘";s:3:"労";s:3:"㊙";s:3:"秘";s:3:"㊚";s:3:"男";s:3:"㊛";s:3:"女";s:3:"㊜";s:3:"適";s:3:"㊝";s:3:"優";s:3:"㊞";s:3:"印";s:3:"㊟";s:3:"注";s:3:"㊠";s:3:"項";s:3:"㊡";s:3:"休";s:3:"㊢";s:3:"写";s:3:"㊣";s:3:"正";s:3:"㊤";s:3:"上";s:3:"㊥";s:3:"中";s:3:"㊦";s:3:"下";s:3:"㊧";s:3:"左";s:3:"㊨";s:3:"右";s:3:"㊩";s:3:"医";s:3:"㊪";s:3:"宗";s:3:"㊫";s:3:"学";s:3:"㊬";s:3:"監";s:3:"㊭";s:3:"企";s:3:"㊮";s:3:"資";s:3:"㊯";s:3:"協";s:3:"㊰";s:3:"夜";s:3:"㊱";s:2:"36";s:3:"㊲";s:2:"37";s:3:"㊳";s:2:"38";s:3:"㊴";s:2:"39";s:3:"㊵";s:2:"40";s:3:"㊶";s:2:"41";s:3:"㊷";s:2:"42";s:3:"㊸";s:2:"43";s:3:"㊹";s:2:"44";s:3:"㊺";s:2:"45";s:3:"㊻";s:2:"46";s:3:"㊼";s:2:"47";s:3:"㊽";s:2:"48";s:3:"㊾";s:2:"49";s:3:"㊿";s:2:"50";s:3:"㋀";s:4:"1月";s:3:"㋁";s:4:"2月";s:3:"㋂";s:4:"3月";s:3:"㋃";s:4:"4月";s:3:"㋄";s:4:"5月";s:3:"㋅";s:4:"6月";s:3:"㋆";s:4:"7月";s:3:"㋇";s:4:"8月";s:3:"㋈";s:4:"9月";s:3:"㋉";s:5:"10月";s:3:"㋊";s:5:"11月";s:3:"㋋";s:5:"12月";s:3:"㋌";s:2:"Hg";s:3:"㋍";s:3:"erg";s:3:"㋎";s:2:"eV";s:3:"㋏";s:3:"LTD";s:3:"㋐";s:3:"ア";s:3:"㋑";s:3:"イ";s:3:"㋒";s:3:"ウ";s:3:"㋓";s:3:"エ";s:3:"㋔";s:3:"オ";s:3:"㋕";s:3:"カ";s:3:"㋖";s:3:"キ";s:3:"㋗";s:3:"ク";s:3:"㋘";s:3:"ケ";s:3:"㋙";s:3:"コ";s:3:"㋚";s:3:"サ";s:3:"㋛";s:3:"シ";s:3:"㋜";s:3:"ス";s:3:"㋝";s:3:"セ";s:3:"㋞";s:3:"ソ";s:3:"㋟";s:3:"タ";s:3:"㋠";s:3:"チ";s:3:"㋡";s:3:"ツ";s:3:"㋢";s:3:"テ";s:3:"㋣";s:3:"ト";s:3:"㋤";s:3:"ナ";s:3:"㋥";s:3:"ニ";s:3:"㋦";s:3:"ヌ";s:3:"㋧";s:3:"ネ";s:3:"㋨";s:3:"ノ";s:3:"㋩";s:3:"ハ";s:3:"㋪";s:3:"ヒ";s:3:"㋫";s:3:"フ";s:3:"㋬";s:3:"ヘ";s:3:"㋭";s:3:"ホ";s:3:"㋮";s:3:"マ";s:3:"㋯";s:3:"ミ";s:3:"㋰";s:3:"ム";s:3:"㋱";s:3:"メ";s:3:"㋲";s:3:"モ";s:3:"㋳";s:3:"ヤ";s:3:"㋴";s:3:"ユ";s:3:"㋵";s:3:"ヨ";s:3:"㋶";s:3:"ラ";s:3:"㋷";s:3:"リ";s:3:"㋸";s:3:"ル";s:3:"㋹";s:3:"レ";s:3:"㋺";s:3:"ロ";s:3:"㋻";s:3:"ワ";s:3:"㋼";s:3:"ヰ";s:3:"㋽";s:3:"ヱ";s:3:"㋾";s:3:"ヲ";s:3:"㌀";s:15:"アパート";s:3:"㌁";s:12:"アルファ";s:3:"㌂";s:15:"アンペア";s:3:"㌃";s:9:"アール";s:3:"㌄";s:15:"イニング";s:3:"㌅";s:9:"インチ";s:3:"㌆";s:9:"ウォン";s:3:"㌇";s:18:"エスクード";s:3:"㌈";s:12:"エーカー";s:3:"㌉";s:9:"オンス";s:3:"㌊";s:9:"オーム";s:3:"㌋";s:9:"カイリ";s:3:"㌌";s:12:"カラット";s:3:"㌍";s:12:"カロリー";s:3:"㌎";s:12:"ガロン";s:3:"㌏";s:12:"ガンマ";s:3:"㌐";s:12:"ギガ";s:3:"㌑";s:12:"ギニー";s:3:"㌒";s:12:"キュリー";s:3:"㌓";s:18:"ギルダー";s:3:"㌔";s:6:"キロ";s:3:"㌕";s:18:"キログラム";s:3:"㌖";s:18:"キロメートル";s:3:"㌗";s:15:"キロワット";s:3:"㌘";s:12:"グラム";s:3:"㌙";s:18:"グラムトン";s:3:"㌚";s:18:"クルゼイロ";s:3:"㌛";s:12:"クローネ";s:3:"㌜";s:9:"ケース";s:3:"㌝";s:9:"コルナ";s:3:"㌞";s:12:"コーポ";s:3:"㌟";s:12:"サイクル";s:3:"㌠";s:15:"サンチーム";s:3:"㌡";s:15:"シリング";s:3:"㌢";s:9:"センチ";s:3:"㌣";s:9:"セント";s:3:"㌤";s:12:"ダース";s:3:"㌥";s:9:"デシ";s:3:"㌦";s:9:"ドル";s:3:"㌧";s:6:"トン";s:3:"㌨";s:6:"ナノ";s:3:"㌩";s:9:"ノット";s:3:"㌪";s:9:"ハイツ";s:3:"㌫";s:18:"パーセント";s:3:"㌬";s:12:"パーツ";s:3:"㌭";s:15:"バーレル";s:3:"㌮";s:18:"ピアストル";s:3:"㌯";s:12:"ピクル";s:3:"㌰";s:9:"ピコ";s:3:"㌱";s:9:"ビル";s:3:"㌲";s:18:"ファラッド";s:3:"㌳";s:12:"フィート";s:3:"㌴";s:18:"ブッシェル";s:3:"㌵";s:9:"フラン";s:3:"㌶";s:15:"ヘクタール";s:3:"㌷";s:9:"ペソ";s:3:"㌸";s:12:"ペニヒ";s:3:"㌹";s:9:"ヘルツ";s:3:"㌺";s:12:"ペンス";s:3:"㌻";s:15:"ページ";s:3:"㌼";s:12:"ベータ";s:3:"㌽";s:15:"ポイント";s:3:"㌾";s:12:"ボルト";s:3:"㌿";s:6:"ホン";s:3:"㍀";s:15:"ポンド";s:3:"㍁";s:9:"ホール";s:3:"㍂";s:9:"ホーン";s:3:"㍃";s:12:"マイクロ";s:3:"㍄";s:9:"マイル";s:3:"㍅";s:9:"マッハ";s:3:"㍆";s:9:"マルク";s:3:"㍇";s:15:"マンション";s:3:"㍈";s:12:"ミクロン";s:3:"㍉";s:6:"ミリ";s:3:"㍊";s:18:"ミリバール";s:3:"㍋";s:9:"メガ";s:3:"㍌";s:15:"メガトン";s:3:"㍍";s:12:"メートル";s:3:"㍎";s:12:"ヤード";s:3:"㍏";s:9:"ヤール";s:3:"㍐";s:9:"ユアン";s:3:"㍑";s:12:"リットル";s:3:"㍒";s:6:"リラ";s:3:"㍓";s:12:"ルピー";s:3:"㍔";s:15:"ルーブル";s:3:"㍕";s:6:"レム";s:3:"㍖";s:18:"レントゲン";s:3:"㍗";s:9:"ワット";s:3:"㍘";s:4:"0点";s:3:"㍙";s:4:"1点";s:3:"㍚";s:4:"2点";s:3:"㍛";s:4:"3点";s:3:"㍜";s:4:"4点";s:3:"㍝";s:4:"5点";s:3:"㍞";s:4:"6点";s:3:"㍟";s:4:"7点";s:3:"㍠";s:4:"8点";s:3:"㍡";s:4:"9点";s:3:"㍢";s:5:"10点";s:3:"㍣";s:5:"11点";s:3:"㍤";s:5:"12点";s:3:"㍥";s:5:"13点";s:3:"㍦";s:5:"14点";s:3:"㍧";s:5:"15点";s:3:"㍨";s:5:"16点";s:3:"㍩";s:5:"17点";s:3:"㍪";s:5:"18点";s:3:"㍫";s:5:"19点";s:3:"㍬";s:5:"20点";s:3:"㍭";s:5:"21点";s:3:"㍮";s:5:"22点";s:3:"㍯";s:5:"23点";s:3:"㍰";s:5:"24点";s:3:"㍱";s:3:"hPa";s:3:"㍲";s:2:"da";s:3:"㍳";s:2:"AU";s:3:"㍴";s:3:"bar";s:3:"㍵";s:2:"oV";s:3:"㍶";s:2:"pc";s:3:"㍷";s:2:"dm";s:3:"㍸";s:3:"dm2";s:3:"㍹";s:3:"dm3";s:3:"㍺";s:2:"IU";s:3:"㍻";s:6:"平成";s:3:"㍼";s:6:"昭和";s:3:"㍽";s:6:"大正";s:3:"㍾";s:6:"明治";s:3:"㍿";s:12:"株式会社";s:3:"㎀";s:2:"pA";s:3:"㎁";s:2:"nA";s:3:"㎂";s:3:"μA";s:3:"㎃";s:2:"mA";s:3:"㎄";s:2:"kA";s:3:"㎅";s:2:"KB";s:3:"㎆";s:2:"MB";s:3:"㎇";s:2:"GB";s:3:"㎈";s:3:"cal";s:3:"㎉";s:4:"kcal";s:3:"㎊";s:2:"pF";s:3:"㎋";s:2:"nF";s:3:"㎌";s:3:"μF";s:3:"㎍";s:3:"μg";s:3:"㎎";s:2:"mg";s:3:"㎏";s:2:"kg";s:3:"㎐";s:2:"Hz";s:3:"㎑";s:3:"kHz";s:3:"㎒";s:3:"MHz";s:3:"㎓";s:3:"GHz";s:3:"㎔";s:3:"THz";s:3:"㎕";s:3:"μl";s:3:"㎖";s:2:"ml";s:3:"㎗";s:2:"dl";s:3:"㎘";s:2:"kl";s:3:"㎙";s:2:"fm";s:3:"㎚";s:2:"nm";s:3:"㎛";s:3:"μm";s:3:"㎜";s:2:"mm";s:3:"㎝";s:2:"cm";s:3:"㎞";s:2:"km";s:3:"㎟";s:3:"mm2";s:3:"㎠";s:3:"cm2";s:3:"㎡";s:2:"m2";s:3:"㎢";s:3:"km2";s:3:"㎣";s:3:"mm3";s:3:"㎤";s:3:"cm3";s:3:"㎥";s:2:"m3";s:3:"㎦";s:3:"km3";s:3:"㎧";s:5:"m∕s";s:3:"㎨";s:6:"m∕s2";s:3:"㎩";s:2:"Pa";s:3:"㎪";s:3:"kPa";s:3:"㎫";s:3:"MPa";s:3:"㎬";s:3:"GPa";s:3:"㎭";s:3:"rad";s:3:"㎮";s:7:"rad∕s";s:3:"㎯";s:8:"rad∕s2";s:3:"㎰";s:2:"ps";s:3:"㎱";s:2:"ns";s:3:"㎲";s:3:"μs";s:3:"㎳";s:2:"ms";s:3:"㎴";s:2:"pV";s:3:"㎵";s:2:"nV";s:3:"㎶";s:3:"μV";s:3:"㎷";s:2:"mV";s:3:"㎸";s:2:"kV";s:3:"㎹";s:2:"MV";s:3:"㎺";s:2:"pW";s:3:"㎻";s:2:"nW";s:3:"㎼";s:3:"μW";s:3:"㎽";s:2:"mW";s:3:"㎾";s:2:"kW";s:3:"㎿";s:2:"MW";s:3:"㏀";s:3:"kΩ";s:3:"㏁";s:3:"MΩ";s:3:"㏂";s:4:"a.m.";s:3:"㏃";s:2:"Bq";s:3:"㏄";s:2:"cc";s:3:"㏅";s:2:"cd";s:3:"㏆";s:6:"C∕kg";s:3:"㏇";s:3:"Co.";s:3:"㏈";s:2:"dB";s:3:"㏉";s:2:"Gy";s:3:"㏊";s:2:"ha";s:3:"㏋";s:2:"HP";s:3:"㏌";s:2:"in";s:3:"㏍";s:2:"KK";s:3:"㏎";s:2:"KM";s:3:"㏏";s:2:"kt";s:3:"㏐";s:2:"lm";s:3:"㏑";s:2:"ln";s:3:"㏒";s:3:"log";s:3:"㏓";s:2:"lx";s:3:"㏔";s:2:"mb";s:3:"㏕";s:3:"mil";s:3:"㏖";s:3:"mol";s:3:"㏗";s:2:"PH";s:3:"㏘";s:4:"p.m.";s:3:"㏙";s:3:"PPM";s:3:"㏚";s:2:"PR";s:3:"㏛";s:2:"sr";s:3:"㏜";s:2:"Sv";s:3:"㏝";s:2:"Wb";s:3:"㏞";s:5:"V∕m";s:3:"㏟";s:5:"A∕m";s:3:"㏠";s:4:"1日";s:3:"㏡";s:4:"2日";s:3:"㏢";s:4:"3日";s:3:"㏣";s:4:"4日";s:3:"㏤";s:4:"5日";s:3:"㏥";s:4:"6日";s:3:"㏦";s:4:"7日";s:3:"㏧";s:4:"8日";s:3:"㏨";s:4:"9日";s:3:"㏩";s:5:"10日";s:3:"㏪";s:5:"11日";s:3:"㏫";s:5:"12日";s:3:"㏬";s:5:"13日";s:3:"㏭";s:5:"14日";s:3:"㏮";s:5:"15日";s:3:"㏯";s:5:"16日";s:3:"㏰";s:5:"17日";s:3:"㏱";s:5:"18日";s:3:"㏲";s:5:"19日";s:3:"㏳";s:5:"20日";s:3:"㏴";s:5:"21日";s:3:"㏵";s:5:"22日";s:3:"㏶";s:5:"23日";s:3:"㏷";s:5:"24日";s:3:"㏸";s:5:"25日";s:3:"㏹";s:5:"26日";s:3:"㏺";s:5:"27日";s:3:"㏻";s:5:"28日";s:3:"㏼";s:5:"29日";s:3:"㏽";s:5:"30日";s:3:"㏾";s:5:"31日";s:3:"㏿";s:3:"gal";s:3:"ꝰ";s:3:"ꝯ";s:3:"ꟸ";s:2:"Ħ";s:3:"ꟹ";s:2:"œ";s:3:"ff";s:2:"ff";s:3:"fi";s:2:"fi";s:3:"fl";s:2:"fl";s:3:"ffi";s:3:"ffi";s:3:"ffl";s:3:"ffl";s:3:"ſt";s:2:"st";s:3:"st";s:2:"st";s:3:"ﬓ";s:4:"մն";s:3:"ﬔ";s:4:"մե";s:3:"ﬕ";s:4:"մի";s:3:"ﬖ";s:4:"վն";s:3:"ﬗ";s:4:"մխ";s:3:"ﬠ";s:2:"ע";s:3:"ﬡ";s:2:"א";s:3:"ﬢ";s:2:"ד";s:3:"ﬣ";s:2:"ה";s:3:"ﬤ";s:2:"כ";s:3:"ﬥ";s:2:"ל";s:3:"ﬦ";s:2:"ם";s:3:"ﬧ";s:2:"ר";s:3:"ﬨ";s:2:"ת";s:3:"﬩";s:1:"+";s:3:"ﭏ";s:4:"אל";s:3:"ﭐ";s:2:"ٱ";s:3:"ﭑ";s:2:"ٱ";s:3:"ﭒ";s:2:"ٻ";s:3:"ﭓ";s:2:"ٻ";s:3:"ﭔ";s:2:"ٻ";s:3:"ﭕ";s:2:"ٻ";s:3:"ﭖ";s:2:"پ";s:3:"ﭗ";s:2:"پ";s:3:"ﭘ";s:2:"پ";s:3:"ﭙ";s:2:"پ";s:3:"ﭚ";s:2:"ڀ";s:3:"ﭛ";s:2:"ڀ";s:3:"ﭜ";s:2:"ڀ";s:3:"ﭝ";s:2:"ڀ";s:3:"ﭞ";s:2:"ٺ";s:3:"ﭟ";s:2:"ٺ";s:3:"ﭠ";s:2:"ٺ";s:3:"ﭡ";s:2:"ٺ";s:3:"ﭢ";s:2:"ٿ";s:3:"ﭣ";s:2:"ٿ";s:3:"ﭤ";s:2:"ٿ";s:3:"ﭥ";s:2:"ٿ";s:3:"ﭦ";s:2:"ٹ";s:3:"ﭧ";s:2:"ٹ";s:3:"ﭨ";s:2:"ٹ";s:3:"ﭩ";s:2:"ٹ";s:3:"ﭪ";s:2:"ڤ";s:3:"ﭫ";s:2:"ڤ";s:3:"ﭬ";s:2:"ڤ";s:3:"ﭭ";s:2:"ڤ";s:3:"ﭮ";s:2:"ڦ";s:3:"ﭯ";s:2:"ڦ";s:3:"ﭰ";s:2:"ڦ";s:3:"ﭱ";s:2:"ڦ";s:3:"ﭲ";s:2:"ڄ";s:3:"ﭳ";s:2:"ڄ";s:3:"ﭴ";s:2:"ڄ";s:3:"ﭵ";s:2:"ڄ";s:3:"ﭶ";s:2:"ڃ";s:3:"ﭷ";s:2:"ڃ";s:3:"ﭸ";s:2:"ڃ";s:3:"ﭹ";s:2:"ڃ";s:3:"ﭺ";s:2:"چ";s:3:"ﭻ";s:2:"چ";s:3:"ﭼ";s:2:"چ";s:3:"ﭽ";s:2:"چ";s:3:"ﭾ";s:2:"ڇ";s:3:"ﭿ";s:2:"ڇ";s:3:"ﮀ";s:2:"ڇ";s:3:"ﮁ";s:2:"ڇ";s:3:"ﮂ";s:2:"ڍ";s:3:"ﮃ";s:2:"ڍ";s:3:"ﮄ";s:2:"ڌ";s:3:"ﮅ";s:2:"ڌ";s:3:"ﮆ";s:2:"ڎ";s:3:"ﮇ";s:2:"ڎ";s:3:"ﮈ";s:2:"ڈ";s:3:"ﮉ";s:2:"ڈ";s:3:"ﮊ";s:2:"ژ";s:3:"ﮋ";s:2:"ژ";s:3:"ﮌ";s:2:"ڑ";s:3:"ﮍ";s:2:"ڑ";s:3:"ﮎ";s:2:"ک";s:3:"ﮏ";s:2:"ک";s:3:"ﮐ";s:2:"ک";s:3:"ﮑ";s:2:"ک";s:3:"ﮒ";s:2:"گ";s:3:"ﮓ";s:2:"گ";s:3:"ﮔ";s:2:"گ";s:3:"ﮕ";s:2:"گ";s:3:"ﮖ";s:2:"ڳ";s:3:"ﮗ";s:2:"ڳ";s:3:"ﮘ";s:2:"ڳ";s:3:"ﮙ";s:2:"ڳ";s:3:"ﮚ";s:2:"ڱ";s:3:"ﮛ";s:2:"ڱ";s:3:"ﮜ";s:2:"ڱ";s:3:"ﮝ";s:2:"ڱ";s:3:"ﮞ";s:2:"ں";s:3:"ﮟ";s:2:"ں";s:3:"ﮠ";s:2:"ڻ";s:3:"ﮡ";s:2:"ڻ";s:3:"ﮢ";s:2:"ڻ";s:3:"ﮣ";s:2:"ڻ";s:3:"ﮤ";s:4:"ۀ";s:3:"ﮥ";s:4:"ۀ";s:3:"ﮦ";s:2:"ہ";s:3:"ﮧ";s:2:"ہ";s:3:"ﮨ";s:2:"ہ";s:3:"ﮩ";s:2:"ہ";s:3:"ﮪ";s:2:"ھ";s:3:"ﮫ";s:2:"ھ";s:3:"ﮬ";s:2:"ھ";s:3:"ﮭ";s:2:"ھ";s:3:"ﮮ";s:2:"ے";s:3:"ﮯ";s:2:"ے";s:3:"ﮰ";s:4:"ۓ";s:3:"ﮱ";s:4:"ۓ";s:3:"ﯓ";s:2:"ڭ";s:3:"ﯔ";s:2:"ڭ";s:3:"ﯕ";s:2:"ڭ";s:3:"ﯖ";s:2:"ڭ";s:3:"ﯗ";s:2:"ۇ";s:3:"ﯘ";s:2:"ۇ";s:3:"ﯙ";s:2:"ۆ";s:3:"ﯚ";s:2:"ۆ";s:3:"ﯛ";s:2:"ۈ";s:3:"ﯜ";s:2:"ۈ";s:3:"ﯝ";s:4:"ۇٴ";s:3:"ﯞ";s:2:"ۋ";s:3:"ﯟ";s:2:"ۋ";s:3:"ﯠ";s:2:"ۅ";s:3:"ﯡ";s:2:"ۅ";s:3:"ﯢ";s:2:"ۉ";s:3:"ﯣ";s:2:"ۉ";s:3:"ﯤ";s:2:"ې";s:3:"ﯥ";s:2:"ې";s:3:"ﯦ";s:2:"ې";s:3:"ﯧ";s:2:"ې";s:3:"ﯨ";s:2:"ى";s:3:"ﯩ";s:2:"ى";s:3:"ﯪ";s:6:"ئا";s:3:"ﯫ";s:6:"ئا";s:3:"ﯬ";s:6:"ئە";s:3:"ﯭ";s:6:"ئە";s:3:"ﯮ";s:6:"ئو";s:3:"ﯯ";s:6:"ئو";s:3:"ﯰ";s:6:"ئۇ";s:3:"ﯱ";s:6:"ئۇ";s:3:"ﯲ";s:6:"ئۆ";s:3:"ﯳ";s:6:"ئۆ";s:3:"ﯴ";s:6:"ئۈ";s:3:"ﯵ";s:6:"ئۈ";s:3:"ﯶ";s:6:"ئې";s:3:"ﯷ";s:6:"ئې";s:3:"ﯸ";s:6:"ئې";s:3:"ﯹ";s:6:"ئى";s:3:"ﯺ";s:6:"ئى";s:3:"ﯻ";s:6:"ئى";s:3:"ﯼ";s:2:"ی";s:3:"ﯽ";s:2:"ی";s:3:"ﯾ";s:2:"ی";s:3:"ﯿ";s:2:"ی";s:3:"ﰀ";s:6:"ئج";s:3:"ﰁ";s:6:"ئح";s:3:"ﰂ";s:6:"ئم";s:3:"ﰃ";s:6:"ئى";s:3:"ﰄ";s:6:"ئي";s:3:"ﰅ";s:4:"بج";s:3:"ﰆ";s:4:"بح";s:3:"ﰇ";s:4:"بخ";s:3:"ﰈ";s:4:"بم";s:3:"ﰉ";s:4:"بى";s:3:"ﰊ";s:4:"بي";s:3:"ﰋ";s:4:"تج";s:3:"ﰌ";s:4:"تح";s:3:"ﰍ";s:4:"تخ";s:3:"ﰎ";s:4:"تم";s:3:"ﰏ";s:4:"تى";s:3:"ﰐ";s:4:"تي";s:3:"ﰑ";s:4:"ثج";s:3:"ﰒ";s:4:"ثم";s:3:"ﰓ";s:4:"ثى";s:3:"ﰔ";s:4:"ثي";s:3:"ﰕ";s:4:"جح";s:3:"ﰖ";s:4:"جم";s:3:"ﰗ";s:4:"حج";s:3:"ﰘ";s:4:"حم";s:3:"ﰙ";s:4:"خج";s:3:"ﰚ";s:4:"خح";s:3:"ﰛ";s:4:"خم";s:3:"ﰜ";s:4:"سج";s:3:"ﰝ";s:4:"سح";s:3:"ﰞ";s:4:"سخ";s:3:"ﰟ";s:4:"سم";s:3:"ﰠ";s:4:"صح";s:3:"ﰡ";s:4:"صم";s:3:"ﰢ";s:4:"ضج";s:3:"ﰣ";s:4:"ضح";s:3:"ﰤ";s:4:"ضخ";s:3:"ﰥ";s:4:"ضم";s:3:"ﰦ";s:4:"طح";s:3:"ﰧ";s:4:"طم";s:3:"ﰨ";s:4:"ظم";s:3:"ﰩ";s:4:"عج";s:3:"ﰪ";s:4:"عم";s:3:"ﰫ";s:4:"غج";s:3:"ﰬ";s:4:"غم";s:3:"ﰭ";s:4:"فج";s:3:"ﰮ";s:4:"فح";s:3:"ﰯ";s:4:"فخ";s:3:"ﰰ";s:4:"فم";s:3:"ﰱ";s:4:"فى";s:3:"ﰲ";s:4:"في";s:3:"ﰳ";s:4:"قح";s:3:"ﰴ";s:4:"قم";s:3:"ﰵ";s:4:"قى";s:3:"ﰶ";s:4:"قي";s:3:"ﰷ";s:4:"كا";s:3:"ﰸ";s:4:"كج";s:3:"ﰹ";s:4:"كح";s:3:"ﰺ";s:4:"كخ";s:3:"ﰻ";s:4:"كل";s:3:"ﰼ";s:4:"كم";s:3:"ﰽ";s:4:"كى";s:3:"ﰾ";s:4:"كي";s:3:"ﰿ";s:4:"لج";s:3:"ﱀ";s:4:"لح";s:3:"ﱁ";s:4:"لخ";s:3:"ﱂ";s:4:"لم";s:3:"ﱃ";s:4:"لى";s:3:"ﱄ";s:4:"لي";s:3:"ﱅ";s:4:"مج";s:3:"ﱆ";s:4:"مح";s:3:"ﱇ";s:4:"مخ";s:3:"ﱈ";s:4:"مم";s:3:"ﱉ";s:4:"مى";s:3:"ﱊ";s:4:"مي";s:3:"ﱋ";s:4:"نج";s:3:"ﱌ";s:4:"نح";s:3:"ﱍ";s:4:"نخ";s:3:"ﱎ";s:4:"نم";s:3:"ﱏ";s:4:"نى";s:3:"ﱐ";s:4:"ني";s:3:"ﱑ";s:4:"هج";s:3:"ﱒ";s:4:"هم";s:3:"ﱓ";s:4:"هى";s:3:"ﱔ";s:4:"هي";s:3:"ﱕ";s:4:"يج";s:3:"ﱖ";s:4:"يح";s:3:"ﱗ";s:4:"يخ";s:3:"ﱘ";s:4:"يم";s:3:"ﱙ";s:4:"يى";s:3:"ﱚ";s:4:"يي";s:3:"ﱛ";s:4:"ذٰ";s:3:"ﱜ";s:4:"رٰ";s:3:"ﱝ";s:4:"ىٰ";s:3:"ﱞ";s:5:" ٌّ";s:3:"ﱟ";s:5:" ٍّ";s:3:"ﱠ";s:5:" َّ";s:3:"ﱡ";s:5:" ُّ";s:3:"ﱢ";s:5:" ِّ";s:3:"ﱣ";s:5:" ّٰ";s:3:"ﱤ";s:6:"ئر";s:3:"ﱥ";s:6:"ئز";s:3:"ﱦ";s:6:"ئم";s:3:"ﱧ";s:6:"ئن";s:3:"ﱨ";s:6:"ئى";s:3:"ﱩ";s:6:"ئي";s:3:"ﱪ";s:4:"بر";s:3:"ﱫ";s:4:"بز";s:3:"ﱬ";s:4:"بم";s:3:"ﱭ";s:4:"بن";s:3:"ﱮ";s:4:"بى";s:3:"ﱯ";s:4:"بي";s:3:"ﱰ";s:4:"تر";s:3:"ﱱ";s:4:"تز";s:3:"ﱲ";s:4:"تم";s:3:"ﱳ";s:4:"تن";s:3:"ﱴ";s:4:"تى";s:3:"ﱵ";s:4:"تي";s:3:"ﱶ";s:4:"ثر";s:3:"ﱷ";s:4:"ثز";s:3:"ﱸ";s:4:"ثم";s:3:"ﱹ";s:4:"ثن";s:3:"ﱺ";s:4:"ثى";s:3:"ﱻ";s:4:"ثي";s:3:"ﱼ";s:4:"فى";s:3:"ﱽ";s:4:"في";s:3:"ﱾ";s:4:"قى";s:3:"ﱿ";s:4:"قي";s:3:"ﲀ";s:4:"كا";s:3:"ﲁ";s:4:"كل";s:3:"ﲂ";s:4:"كم";s:3:"ﲃ";s:4:"كى";s:3:"ﲄ";s:4:"كي";s:3:"ﲅ";s:4:"لم";s:3:"ﲆ";s:4:"لى";s:3:"ﲇ";s:4:"لي";s:3:"ﲈ";s:4:"ما";s:3:"ﲉ";s:4:"مم";s:3:"ﲊ";s:4:"نر";s:3:"ﲋ";s:4:"نز";s:3:"ﲌ";s:4:"نم";s:3:"ﲍ";s:4:"نن";s:3:"ﲎ";s:4:"نى";s:3:"ﲏ";s:4:"ني";s:3:"ﲐ";s:4:"ىٰ";s:3:"ﲑ";s:4:"ير";s:3:"ﲒ";s:4:"يز";s:3:"ﲓ";s:4:"يم";s:3:"ﲔ";s:4:"ين";s:3:"ﲕ";s:4:"يى";s:3:"ﲖ";s:4:"يي";s:3:"ﲗ";s:6:"ئج";s:3:"ﲘ";s:6:"ئح";s:3:"ﲙ";s:6:"ئخ";s:3:"ﲚ";s:6:"ئم";s:3:"ﲛ";s:6:"ئه";s:3:"ﲜ";s:4:"بج";s:3:"ﲝ";s:4:"بح";s:3:"ﲞ";s:4:"بخ";s:3:"ﲟ";s:4:"بم";s:3:"ﲠ";s:4:"به";s:3:"ﲡ";s:4:"تج";s:3:"ﲢ";s:4:"تح";s:3:"ﲣ";s:4:"تخ";s:3:"ﲤ";s:4:"تم";s:3:"ﲥ";s:4:"ته";s:3:"ﲦ";s:4:"ثم";s:3:"ﲧ";s:4:"جح";s:3:"ﲨ";s:4:"جم";s:3:"ﲩ";s:4:"حج";s:3:"ﲪ";s:4:"حم";s:3:"ﲫ";s:4:"خج";s:3:"ﲬ";s:4:"خم";s:3:"ﲭ";s:4:"سج";s:3:"ﲮ";s:4:"سح";s:3:"ﲯ";s:4:"سخ";s:3:"ﲰ";s:4:"سم";s:3:"ﲱ";s:4:"صح";s:3:"ﲲ";s:4:"صخ";s:3:"ﲳ";s:4:"صم";s:3:"ﲴ";s:4:"ضج";s:3:"ﲵ";s:4:"ضح";s:3:"ﲶ";s:4:"ضخ";s:3:"ﲷ";s:4:"ضم";s:3:"ﲸ";s:4:"طح";s:3:"ﲹ";s:4:"ظم";s:3:"ﲺ";s:4:"عج";s:3:"ﲻ";s:4:"عم";s:3:"ﲼ";s:4:"غج";s:3:"ﲽ";s:4:"غم";s:3:"ﲾ";s:4:"فج";s:3:"ﲿ";s:4:"فح";s:3:"ﳀ";s:4:"فخ";s:3:"ﳁ";s:4:"فم";s:3:"ﳂ";s:4:"قح";s:3:"ﳃ";s:4:"قم";s:3:"ﳄ";s:4:"كج";s:3:"ﳅ";s:4:"كح";s:3:"ﳆ";s:4:"كخ";s:3:"ﳇ";s:4:"كل";s:3:"ﳈ";s:4:"كم";s:3:"ﳉ";s:4:"لج";s:3:"ﳊ";s:4:"لح";s:3:"ﳋ";s:4:"لخ";s:3:"ﳌ";s:4:"لم";s:3:"ﳍ";s:4:"له";s:3:"ﳎ";s:4:"مج";s:3:"ﳏ";s:4:"مح";s:3:"ﳐ";s:4:"مخ";s:3:"ﳑ";s:4:"مم";s:3:"ﳒ";s:4:"نج";s:3:"ﳓ";s:4:"نح";s:3:"ﳔ";s:4:"نخ";s:3:"ﳕ";s:4:"نم";s:3:"ﳖ";s:4:"نه";s:3:"ﳗ";s:4:"هج";s:3:"ﳘ";s:4:"هم";s:3:"ﳙ";s:4:"هٰ";s:3:"ﳚ";s:4:"يج";s:3:"ﳛ";s:4:"يح";s:3:"ﳜ";s:4:"يخ";s:3:"ﳝ";s:4:"يم";s:3:"ﳞ";s:4:"يه";s:3:"ﳟ";s:6:"ئم";s:3:"ﳠ";s:6:"ئه";s:3:"ﳡ";s:4:"بم";s:3:"ﳢ";s:4:"به";s:3:"ﳣ";s:4:"تم";s:3:"ﳤ";s:4:"ته";s:3:"ﳥ";s:4:"ثم";s:3:"ﳦ";s:4:"ثه";s:3:"ﳧ";s:4:"سم";s:3:"ﳨ";s:4:"سه";s:3:"ﳩ";s:4:"شم";s:3:"ﳪ";s:4:"شه";s:3:"ﳫ";s:4:"كل";s:3:"ﳬ";s:4:"كم";s:3:"ﳭ";s:4:"لم";s:3:"ﳮ";s:4:"نم";s:3:"ﳯ";s:4:"نه";s:3:"ﳰ";s:4:"يم";s:3:"ﳱ";s:4:"يه";s:3:"ﳲ";s:6:"ـَّ";s:3:"ﳳ";s:6:"ـُّ";s:3:"ﳴ";s:6:"ـِّ";s:3:"ﳵ";s:4:"طى";s:3:"ﳶ";s:4:"طي";s:3:"ﳷ";s:4:"عى";s:3:"ﳸ";s:4:"عي";s:3:"ﳹ";s:4:"غى";s:3:"ﳺ";s:4:"غي";s:3:"ﳻ";s:4:"سى";s:3:"ﳼ";s:4:"سي";s:3:"ﳽ";s:4:"شى";s:3:"ﳾ";s:4:"شي";s:3:"ﳿ";s:4:"حى";s:3:"ﴀ";s:4:"حي";s:3:"ﴁ";s:4:"جى";s:3:"ﴂ";s:4:"جي";s:3:"ﴃ";s:4:"خى";s:3:"ﴄ";s:4:"خي";s:3:"ﴅ";s:4:"صى";s:3:"ﴆ";s:4:"صي";s:3:"ﴇ";s:4:"ضى";s:3:"ﴈ";s:4:"ضي";s:3:"ﴉ";s:4:"شج";s:3:"ﴊ";s:4:"شح";s:3:"ﴋ";s:4:"شخ";s:3:"ﴌ";s:4:"شم";s:3:"ﴍ";s:4:"شر";s:3:"ﴎ";s:4:"سر";s:3:"ﴏ";s:4:"صر";s:3:"ﴐ";s:4:"ضر";s:3:"ﴑ";s:4:"طى";s:3:"ﴒ";s:4:"طي";s:3:"ﴓ";s:4:"عى";s:3:"ﴔ";s:4:"عي";s:3:"ﴕ";s:4:"غى";s:3:"ﴖ";s:4:"غي";s:3:"ﴗ";s:4:"سى";s:3:"ﴘ";s:4:"سي";s:3:"ﴙ";s:4:"شى";s:3:"ﴚ";s:4:"شي";s:3:"ﴛ";s:4:"حى";s:3:"ﴜ";s:4:"حي";s:3:"ﴝ";s:4:"جى";s:3:"ﴞ";s:4:"جي";s:3:"ﴟ";s:4:"خى";s:3:"ﴠ";s:4:"خي";s:3:"ﴡ";s:4:"صى";s:3:"ﴢ";s:4:"صي";s:3:"ﴣ";s:4:"ضى";s:3:"ﴤ";s:4:"ضي";s:3:"ﴥ";s:4:"شج";s:3:"ﴦ";s:4:"شح";s:3:"ﴧ";s:4:"شخ";s:3:"ﴨ";s:4:"شم";s:3:"ﴩ";s:4:"شر";s:3:"ﴪ";s:4:"سر";s:3:"ﴫ";s:4:"صر";s:3:"ﴬ";s:4:"ضر";s:3:"ﴭ";s:4:"شج";s:3:"ﴮ";s:4:"شح";s:3:"ﴯ";s:4:"شخ";s:3:"ﴰ";s:4:"شم";s:3:"ﴱ";s:4:"سه";s:3:"ﴲ";s:4:"شه";s:3:"ﴳ";s:4:"طم";s:3:"ﴴ";s:4:"سج";s:3:"ﴵ";s:4:"سح";s:3:"ﴶ";s:4:"سخ";s:3:"ﴷ";s:4:"شج";s:3:"ﴸ";s:4:"شح";s:3:"ﴹ";s:4:"شخ";s:3:"ﴺ";s:4:"طم";s:3:"ﴻ";s:4:"ظم";s:3:"ﴼ";s:4:"اً";s:3:"ﴽ";s:4:"اً";s:3:"ﵐ";s:6:"تجم";s:3:"ﵑ";s:6:"تحج";s:3:"ﵒ";s:6:"تحج";s:3:"ﵓ";s:6:"تحم";s:3:"ﵔ";s:6:"تخم";s:3:"ﵕ";s:6:"تمج";s:3:"ﵖ";s:6:"تمح";s:3:"ﵗ";s:6:"تمخ";s:3:"ﵘ";s:6:"جمح";s:3:"ﵙ";s:6:"جمح";s:3:"ﵚ";s:6:"حمي";s:3:"ﵛ";s:6:"حمى";s:3:"ﵜ";s:6:"سحج";s:3:"ﵝ";s:6:"سجح";s:3:"ﵞ";s:6:"سجى";s:3:"ﵟ";s:6:"سمح";s:3:"ﵠ";s:6:"سمح";s:3:"ﵡ";s:6:"سمج";s:3:"ﵢ";s:6:"سمم";s:3:"ﵣ";s:6:"سمم";s:3:"ﵤ";s:6:"صحح";s:3:"ﵥ";s:6:"صحح";s:3:"ﵦ";s:6:"صمم";s:3:"ﵧ";s:6:"شحم";s:3:"ﵨ";s:6:"شحم";s:3:"ﵩ";s:6:"شجي";s:3:"ﵪ";s:6:"شمخ";s:3:"ﵫ";s:6:"شمخ";s:3:"ﵬ";s:6:"شمم";s:3:"ﵭ";s:6:"شمم";s:3:"ﵮ";s:6:"ضحى";s:3:"ﵯ";s:6:"ضخم";s:3:"ﵰ";s:6:"ضخم";s:3:"ﵱ";s:6:"طمح";s:3:"ﵲ";s:6:"طمح";s:3:"ﵳ";s:6:"طمم";s:3:"ﵴ";s:6:"طمي";s:3:"ﵵ";s:6:"عجم";s:3:"ﵶ";s:6:"عمم";s:3:"ﵷ";s:6:"عمم";s:3:"ﵸ";s:6:"عمى";s:3:"ﵹ";s:6:"غمم";s:3:"ﵺ";s:6:"غمي";s:3:"ﵻ";s:6:"غمى";s:3:"ﵼ";s:6:"فخم";s:3:"ﵽ";s:6:"فخم";s:3:"ﵾ";s:6:"قمح";s:3:"ﵿ";s:6:"قمم";s:3:"ﶀ";s:6:"لحم";s:3:"ﶁ";s:6:"لحي";s:3:"ﶂ";s:6:"لحى";s:3:"ﶃ";s:6:"لجج";s:3:"ﶄ";s:6:"لجج";s:3:"ﶅ";s:6:"لخم";s:3:"ﶆ";s:6:"لخم";s:3:"ﶇ";s:6:"لمح";s:3:"ﶈ";s:6:"لمح";s:3:"ﶉ";s:6:"محج";s:3:"ﶊ";s:6:"محم";s:3:"ﶋ";s:6:"محي";s:3:"ﶌ";s:6:"مجح";s:3:"ﶍ";s:6:"مجم";s:3:"ﶎ";s:6:"مخج";s:3:"ﶏ";s:6:"مخم";s:3:"ﶒ";s:6:"مجخ";s:3:"ﶓ";s:6:"همج";s:3:"ﶔ";s:6:"همم";s:3:"ﶕ";s:6:"نحم";s:3:"ﶖ";s:6:"نحى";s:3:"ﶗ";s:6:"نجم";s:3:"ﶘ";s:6:"نجم";s:3:"ﶙ";s:6:"نجى";s:3:"ﶚ";s:6:"نمي";s:3:"ﶛ";s:6:"نمى";s:3:"ﶜ";s:6:"يمم";s:3:"ﶝ";s:6:"يمم";s:3:"ﶞ";s:6:"بخي";s:3:"ﶟ";s:6:"تجي";s:3:"ﶠ";s:6:"تجى";s:3:"ﶡ";s:6:"تخي";s:3:"ﶢ";s:6:"تخى";s:3:"ﶣ";s:6:"تمي";s:3:"ﶤ";s:6:"تمى";s:3:"ﶥ";s:6:"جمي";s:3:"ﶦ";s:6:"جحى";s:3:"ﶧ";s:6:"جمى";s:3:"ﶨ";s:6:"سخى";s:3:"ﶩ";s:6:"صحي";s:3:"ﶪ";s:6:"شحي";s:3:"ﶫ";s:6:"ضحي";s:3:"ﶬ";s:6:"لجي";s:3:"ﶭ";s:6:"لمي";s:3:"ﶮ";s:6:"يحي";s:3:"ﶯ";s:6:"يجي";s:3:"ﶰ";s:6:"يمي";s:3:"ﶱ";s:6:"ممي";s:3:"ﶲ";s:6:"قمي";s:3:"ﶳ";s:6:"نحي";s:3:"ﶴ";s:6:"قمح";s:3:"ﶵ";s:6:"لحم";s:3:"ﶶ";s:6:"عمي";s:3:"ﶷ";s:6:"كمي";s:3:"ﶸ";s:6:"نجح";s:3:"ﶹ";s:6:"مخي";s:3:"ﶺ";s:6:"لجم";s:3:"ﶻ";s:6:"كمم";s:3:"ﶼ";s:6:"لجم";s:3:"ﶽ";s:6:"نجح";s:3:"ﶾ";s:6:"جحي";s:3:"ﶿ";s:6:"حجي";s:3:"ﷀ";s:6:"مجي";s:3:"ﷁ";s:6:"فمي";s:3:"ﷂ";s:6:"بحي";s:3:"ﷃ";s:6:"كمم";s:3:"ﷄ";s:6:"عجم";s:3:"ﷅ";s:6:"صمم";s:3:"ﷆ";s:6:"سخي";s:3:"ﷇ";s:6:"نجي";s:3:"ﷰ";s:6:"صلے";s:3:"ﷱ";s:6:"قلے";s:3:"ﷲ";s:8:"الله";s:3:"ﷳ";s:8:"اكبر";s:3:"ﷴ";s:8:"محمد";s:3:"ﷵ";s:8:"صلعم";s:3:"ﷶ";s:8:"رسول";s:3:"ﷷ";s:8:"عليه";s:3:"ﷸ";s:8:"وسلم";s:3:"ﷹ";s:6:"صلى";s:3:"ﷺ";s:33:"صلى الله عليه وسلم";s:3:"ﷻ";s:15:"جل جلاله";s:3:"﷼";s:8:"ریال";s:3:"︐";s:1:",";s:3:"︑";s:3:"、";s:3:"︒";s:3:"。";s:3:"︓";s:1:":";s:3:"︔";s:1:";";s:3:"︕";s:1:"!";s:3:"︖";s:1:"?";s:3:"︗";s:3:"〖";s:3:"︘";s:3:"〗";s:3:"︙";s:3:"...";s:3:"︰";s:2:"..";s:3:"︱";s:3:"—";s:3:"︲";s:3:"–";s:3:"︳";s:1:"_";s:3:"︴";s:1:"_";s:3:"︵";s:1:"(";s:3:"︶";s:1:")";s:3:"︷";s:1:"{";s:3:"︸";s:1:"}";s:3:"︹";s:3:"〔";s:3:"︺";s:3:"〕";s:3:"︻";s:3:"【";s:3:"︼";s:3:"】";s:3:"︽";s:3:"《";s:3:"︾";s:3:"》";s:3:"︿";s:3:"〈";s:3:"﹀";s:3:"〉";s:3:"﹁";s:3:"「";s:3:"﹂";s:3:"」";s:3:"﹃";s:3:"『";s:3:"﹄";s:3:"』";s:3:"﹇";s:1:"[";s:3:"﹈";s:1:"]";s:3:"﹉";s:3:" ̅";s:3:"﹊";s:3:" ̅";s:3:"﹋";s:3:" ̅";s:3:"﹌";s:3:" ̅";s:3:"﹍";s:1:"_";s:3:"﹎";s:1:"_";s:3:"﹏";s:1:"_";s:3:"﹐";s:1:",";s:3:"﹑";s:3:"、";s:3:"﹒";s:1:".";s:3:"﹔";s:1:";";s:3:"﹕";s:1:":";s:3:"﹖";s:1:"?";s:3:"﹗";s:1:"!";s:3:"﹘";s:3:"—";s:3:"﹙";s:1:"(";s:3:"﹚";s:1:")";s:3:"﹛";s:1:"{";s:3:"﹜";s:1:"}";s:3:"﹝";s:3:"〔";s:3:"﹞";s:3:"〕";s:3:"﹟";s:1:"#";s:3:"﹠";s:1:"&";s:3:"﹡";s:1:"*";s:3:"﹢";s:1:"+";s:3:"﹣";s:1:"-";s:3:"﹤";s:1:"<";s:3:"﹥";s:1:">";s:3:"﹦";s:1:"=";s:3:"﹨";s:1:"\";s:3:"﹩";s:1:"$";s:3:"﹪";s:1:"%";s:3:"﹫";s:1:"@";s:3:"ﹰ";s:3:" ً";s:3:"ﹱ";s:4:"ـً";s:3:"ﹲ";s:3:" ٌ";s:3:"ﹴ";s:3:" ٍ";s:3:"ﹶ";s:3:" َ";s:3:"ﹷ";s:4:"ـَ";s:3:"ﹸ";s:3:" ُ";s:3:"ﹹ";s:4:"ـُ";s:3:"ﹺ";s:3:" ِ";s:3:"ﹻ";s:4:"ـِ";s:3:"ﹼ";s:3:" ّ";s:3:"ﹽ";s:4:"ـّ";s:3:"ﹾ";s:3:" ْ";s:3:"ﹿ";s:4:"ـْ";s:3:"ﺀ";s:2:"ء";s:3:"ﺁ";s:4:"آ";s:3:"ﺂ";s:4:"آ";s:3:"ﺃ";s:4:"أ";s:3:"ﺄ";s:4:"أ";s:3:"ﺅ";s:4:"ؤ";s:3:"ﺆ";s:4:"ؤ";s:3:"ﺇ";s:4:"إ";s:3:"ﺈ";s:4:"إ";s:3:"ﺉ";s:4:"ئ";s:3:"ﺊ";s:4:"ئ";s:3:"ﺋ";s:4:"ئ";s:3:"ﺌ";s:4:"ئ";s:3:"ﺍ";s:2:"ا";s:3:"ﺎ";s:2:"ا";s:3:"ﺏ";s:2:"ب";s:3:"ﺐ";s:2:"ب";s:3:"ﺑ";s:2:"ب";s:3:"ﺒ";s:2:"ب";s:3:"ﺓ";s:2:"ة";s:3:"ﺔ";s:2:"ة";s:3:"ﺕ";s:2:"ت";s:3:"ﺖ";s:2:"ت";s:3:"ﺗ";s:2:"ت";s:3:"ﺘ";s:2:"ت";s:3:"ﺙ";s:2:"ث";s:3:"ﺚ";s:2:"ث";s:3:"ﺛ";s:2:"ث";s:3:"ﺜ";s:2:"ث";s:3:"ﺝ";s:2:"ج";s:3:"ﺞ";s:2:"ج";s:3:"ﺟ";s:2:"ج";s:3:"ﺠ";s:2:"ج";s:3:"ﺡ";s:2:"ح";s:3:"ﺢ";s:2:"ح";s:3:"ﺣ";s:2:"ح";s:3:"ﺤ";s:2:"ح";s:3:"ﺥ";s:2:"خ";s:3:"ﺦ";s:2:"خ";s:3:"ﺧ";s:2:"خ";s:3:"ﺨ";s:2:"خ";s:3:"ﺩ";s:2:"د";s:3:"ﺪ";s:2:"د";s:3:"ﺫ";s:2:"ذ";s:3:"ﺬ";s:2:"ذ";s:3:"ﺭ";s:2:"ر";s:3:"ﺮ";s:2:"ر";s:3:"ﺯ";s:2:"ز";s:3:"ﺰ";s:2:"ز";s:3:"ﺱ";s:2:"س";s:3:"ﺲ";s:2:"س";s:3:"ﺳ";s:2:"س";s:3:"ﺴ";s:2:"س";s:3:"ﺵ";s:2:"ش";s:3:"ﺶ";s:2:"ش";s:3:"ﺷ";s:2:"ش";s:3:"ﺸ";s:2:"ش";s:3:"ﺹ";s:2:"ص";s:3:"ﺺ";s:2:"ص";s:3:"ﺻ";s:2:"ص";s:3:"ﺼ";s:2:"ص";s:3:"ﺽ";s:2:"ض";s:3:"ﺾ";s:2:"ض";s:3:"ﺿ";s:2:"ض";s:3:"ﻀ";s:2:"ض";s:3:"ﻁ";s:2:"ط";s:3:"ﻂ";s:2:"ط";s:3:"ﻃ";s:2:"ط";s:3:"ﻄ";s:2:"ط";s:3:"ﻅ";s:2:"ظ";s:3:"ﻆ";s:2:"ظ";s:3:"ﻇ";s:2:"ظ";s:3:"ﻈ";s:2:"ظ";s:3:"ﻉ";s:2:"ع";s:3:"ﻊ";s:2:"ع";s:3:"ﻋ";s:2:"ع";s:3:"ﻌ";s:2:"ع";s:3:"ﻍ";s:2:"غ";s:3:"ﻎ";s:2:"غ";s:3:"ﻏ";s:2:"غ";s:3:"ﻐ";s:2:"غ";s:3:"ﻑ";s:2:"ف";s:3:"ﻒ";s:2:"ف";s:3:"ﻓ";s:2:"ف";s:3:"ﻔ";s:2:"ف";s:3:"ﻕ";s:2:"ق";s:3:"ﻖ";s:2:"ق";s:3:"ﻗ";s:2:"ق";s:3:"ﻘ";s:2:"ق";s:3:"ﻙ";s:2:"ك";s:3:"ﻚ";s:2:"ك";s:3:"ﻛ";s:2:"ك";s:3:"ﻜ";s:2:"ك";s:3:"ﻝ";s:2:"ل";s:3:"ﻞ";s:2:"ل";s:3:"ﻟ";s:2:"ل";s:3:"ﻠ";s:2:"ل";s:3:"ﻡ";s:2:"م";s:3:"ﻢ";s:2:"م";s:3:"ﻣ";s:2:"م";s:3:"ﻤ";s:2:"م";s:3:"ﻥ";s:2:"ن";s:3:"ﻦ";s:2:"ن";s:3:"ﻧ";s:2:"ن";s:3:"ﻨ";s:2:"ن";s:3:"ﻩ";s:2:"ه";s:3:"ﻪ";s:2:"ه";s:3:"ﻫ";s:2:"ه";s:3:"ﻬ";s:2:"ه";s:3:"ﻭ";s:2:"و";s:3:"ﻮ";s:2:"و";s:3:"ﻯ";s:2:"ى";s:3:"ﻰ";s:2:"ى";s:3:"ﻱ";s:2:"ي";s:3:"ﻲ";s:2:"ي";s:3:"ﻳ";s:2:"ي";s:3:"ﻴ";s:2:"ي";s:3:"ﻵ";s:6:"لآ";s:3:"ﻶ";s:6:"لآ";s:3:"ﻷ";s:6:"لأ";s:3:"ﻸ";s:6:"لأ";s:3:"ﻹ";s:6:"لإ";s:3:"ﻺ";s:6:"لإ";s:3:"ﻻ";s:4:"لا";s:3:"ﻼ";s:4:"لا";s:3:"!";s:1:"!";s:3:""";s:1:""";s:3:"#";s:1:"#";s:3:"$";s:1:"$";s:3:"%";s:1:"%";s:3:"&";s:1:"&";s:3:"'";s:1:"'";s:3:"(";s:1:"(";s:3:")";s:1:")";s:3:"*";s:1:"*";s:3:"+";s:1:"+";s:3:",";s:1:",";s:3:"-";s:1:"-";s:3:".";s:1:".";s:3:"/";s:1:"/";s:3:"0";s:1:"0";s:3:"1";s:1:"1";s:3:"2";s:1:"2";s:3:"3";s:1:"3";s:3:"4";s:1:"4";s:3:"5";s:1:"5";s:3:"6";s:1:"6";s:3:"7";s:1:"7";s:3:"8";s:1:"8";s:3:"9";s:1:"9";s:3:":";s:1:":";s:3:";";s:1:";";s:3:"<";s:1:"<";s:3:"=";s:1:"=";s:3:">";s:1:">";s:3:"?";s:1:"?";s:3:"@";s:1:"@";s:3:"A";s:1:"A";s:3:"B";s:1:"B";s:3:"C";s:1:"C";s:3:"D";s:1:"D";s:3:"E";s:1:"E";s:3:"F";s:1:"F";s:3:"G";s:1:"G";s:3:"H";s:1:"H";s:3:"I";s:1:"I";s:3:"J";s:1:"J";s:3:"K";s:1:"K";s:3:"L";s:1:"L";s:3:"M";s:1:"M";s:3:"N";s:1:"N";s:3:"O";s:1:"O";s:3:"P";s:1:"P";s:3:"Q";s:1:"Q";s:3:"R";s:1:"R";s:3:"S";s:1:"S";s:3:"T";s:1:"T";s:3:"U";s:1:"U";s:3:"V";s:1:"V";s:3:"W";s:1:"W";s:3:"X";s:1:"X";s:3:"Y";s:1:"Y";s:3:"Z";s:1:"Z";s:3:"[";s:1:"[";s:3:"\";s:1:"\";s:3:"]";s:1:"]";s:3:"^";s:1:"^";s:3:"_";s:1:"_";s:3:"`";s:1:"`";s:3:"a";s:1:"a";s:3:"b";s:1:"b";s:3:"c";s:1:"c";s:3:"d";s:1:"d";s:3:"e";s:1:"e";s:3:"f";s:1:"f";s:3:"g";s:1:"g";s:3:"h";s:1:"h";s:3:"i";s:1:"i";s:3:"j";s:1:"j";s:3:"k";s:1:"k";s:3:"l";s:1:"l";s:3:"m";s:1:"m";s:3:"n";s:1:"n";s:3:"o";s:1:"o";s:3:"p";s:1:"p";s:3:"q";s:1:"q";s:3:"r";s:1:"r";s:3:"s";s:1:"s";s:3:"t";s:1:"t";s:3:"u";s:1:"u";s:3:"v";s:1:"v";s:3:"w";s:1:"w";s:3:"x";s:1:"x";s:3:"y";s:1:"y";s:3:"z";s:1:"z";s:3:"{";s:1:"{";s:3:"|";s:1:"|";s:3:"}";s:1:"}";s:3:"~";s:1:"~";s:3:"⦅";s:3:"⦅";s:3:"⦆";s:3:"⦆";s:3:"。";s:3:"。";s:3:"「";s:3:"「";s:3:"」";s:3:"」";s:3:"、";s:3:"、";s:3:"・";s:3:"・";s:3:"ヲ";s:3:"ヲ";s:3:"ァ";s:3:"ァ";s:3:"ィ";s:3:"ィ";s:3:"ゥ";s:3:"ゥ";s:3:"ェ";s:3:"ェ";s:3:"ォ";s:3:"ォ";s:3:"ャ";s:3:"ャ";s:3:"ュ";s:3:"ュ";s:3:"ョ";s:3:"ョ";s:3:"ッ";s:3:"ッ";s:3:"ー";s:3:"ー";s:3:"ア";s:3:"ア";s:3:"イ";s:3:"イ";s:3:"ウ";s:3:"ウ";s:3:"エ";s:3:"エ";s:3:"オ";s:3:"オ";s:3:"カ";s:3:"カ";s:3:"キ";s:3:"キ";s:3:"ク";s:3:"ク";s:3:"ケ";s:3:"ケ";s:3:"コ";s:3:"コ";s:3:"サ";s:3:"サ";s:3:"シ";s:3:"シ";s:3:"ス";s:3:"ス";s:3:"セ";s:3:"セ";s:3:"ソ";s:3:"ソ";s:3:"タ";s:3:"タ";s:3:"チ";s:3:"チ";s:3:"ツ";s:3:"ツ";s:3:"テ";s:3:"テ";s:3:"ト";s:3:"ト";s:3:"ナ";s:3:"ナ";s:3:"ニ";s:3:"ニ";s:3:"ヌ";s:3:"ヌ";s:3:"ネ";s:3:"ネ";s:3:"ノ";s:3:"ノ";s:3:"ハ";s:3:"ハ";s:3:"ヒ";s:3:"ヒ";s:3:"フ";s:3:"フ";s:3:"ヘ";s:3:"ヘ";s:3:"ホ";s:3:"ホ";s:3:"マ";s:3:"マ";s:3:"ミ";s:3:"ミ";s:3:"ム";s:3:"ム";s:3:"メ";s:3:"メ";s:3:"モ";s:3:"モ";s:3:"ヤ";s:3:"ヤ";s:3:"ユ";s:3:"ユ";s:3:"ヨ";s:3:"ヨ";s:3:"ラ";s:3:"ラ";s:3:"リ";s:3:"リ";s:3:"ル";s:3:"ル";s:3:"レ";s:3:"レ";s:3:"ロ";s:3:"ロ";s:3:"ワ";s:3:"ワ";s:3:"ン";s:3:"ン";s:3:"゙";s:3:"゙";s:3:"゚";s:3:"゚";s:3:"ᅠ";s:3:"ᅠ";s:3:"ᄀ";s:3:"ᄀ";s:3:"ᄁ";s:3:"ᄁ";s:3:"ᆪ";s:3:"ᆪ";s:3:"ᄂ";s:3:"ᄂ";s:3:"ᆬ";s:3:"ᆬ";s:3:"ᆭ";s:3:"ᆭ";s:3:"ᄃ";s:3:"ᄃ";s:3:"ᄄ";s:3:"ᄄ";s:3:"ᄅ";s:3:"ᄅ";s:3:"ᆰ";s:3:"ᆰ";s:3:"ᆱ";s:3:"ᆱ";s:3:"ᆲ";s:3:"ᆲ";s:3:"ᆳ";s:3:"ᆳ";s:3:"ᆴ";s:3:"ᆴ";s:3:"ᆵ";s:3:"ᆵ";s:3:"ᄚ";s:3:"ᄚ";s:3:"ᄆ";s:3:"ᄆ";s:3:"ᄇ";s:3:"ᄇ";s:3:"ᄈ";s:3:"ᄈ";s:3:"ᄡ";s:3:"ᄡ";s:3:"ᄉ";s:3:"ᄉ";s:3:"ᄊ";s:3:"ᄊ";s:3:"ᄋ";s:3:"ᄋ";s:3:"ᄌ";s:3:"ᄌ";s:3:"ᄍ";s:3:"ᄍ";s:3:"ᄎ";s:3:"ᄎ";s:3:"ᄏ";s:3:"ᄏ";s:3:"ᄐ";s:3:"ᄐ";s:3:"ᄑ";s:3:"ᄑ";s:3:"ᄒ";s:3:"ᄒ";s:3:"ᅡ";s:3:"ᅡ";s:3:"ᅢ";s:3:"ᅢ";s:3:"ᅣ";s:3:"ᅣ";s:3:"ᅤ";s:3:"ᅤ";s:3:"ᅥ";s:3:"ᅥ";s:3:"ᅦ";s:3:"ᅦ";s:3:"ᅧ";s:3:"ᅧ";s:3:"ᅨ";s:3:"ᅨ";s:3:"ᅩ";s:3:"ᅩ";s:3:"ᅪ";s:3:"ᅪ";s:3:"ᅫ";s:3:"ᅫ";s:3:"ᅬ";s:3:"ᅬ";s:3:"ᅭ";s:3:"ᅭ";s:3:"ᅮ";s:3:"ᅮ";s:3:"ᅯ";s:3:"ᅯ";s:3:"ᅰ";s:3:"ᅰ";s:3:"ᅱ";s:3:"ᅱ";s:3:"ᅲ";s:3:"ᅲ";s:3:"ᅳ";s:3:"ᅳ";s:3:"ᅴ";s:3:"ᅴ";s:3:"ᅵ";s:3:"ᅵ";s:3:"¢";s:2:"¢";s:3:"£";s:2:"£";s:3:"¬";s:2:"¬";s:3:" ̄";s:3:" ̄";s:3:"¦";s:2:"¦";s:3:"¥";s:2:"¥";s:3:"₩";s:3:"₩";s:3:"│";s:3:"│";s:3:"←";s:3:"←";s:3:"↑";s:3:"↑";s:3:"→";s:3:"→";s:3:"↓";s:3:"↓";s:3:"■";s:3:"■";s:3:"○";s:3:"○";s:4:"𝐀";s:1:"A";s:4:"𝐁";s:1:"B";s:4:"𝐂";s:1:"C";s:4:"𝐃";s:1:"D";s:4:"𝐄";s:1:"E";s:4:"𝐅";s:1:"F";s:4:"𝐆";s:1:"G";s:4:"𝐇";s:1:"H";s:4:"𝐈";s:1:"I";s:4:"𝐉";s:1:"J";s:4:"𝐊";s:1:"K";s:4:"𝐋";s:1:"L";s:4:"𝐌";s:1:"M";s:4:"𝐍";s:1:"N";s:4:"𝐎";s:1:"O";s:4:"𝐏";s:1:"P";s:4:"𝐐";s:1:"Q";s:4:"𝐑";s:1:"R";s:4:"𝐒";s:1:"S";s:4:"𝐓";s:1:"T";s:4:"𝐔";s:1:"U";s:4:"𝐕";s:1:"V";s:4:"𝐖";s:1:"W";s:4:"𝐗";s:1:"X";s:4:"𝐘";s:1:"Y";s:4:"𝐙";s:1:"Z";s:4:"𝐚";s:1:"a";s:4:"𝐛";s:1:"b";s:4:"𝐜";s:1:"c";s:4:"𝐝";s:1:"d";s:4:"𝐞";s:1:"e";s:4:"𝐟";s:1:"f";s:4:"𝐠";s:1:"g";s:4:"𝐡";s:1:"h";s:4:"𝐢";s:1:"i";s:4:"𝐣";s:1:"j";s:4:"𝐤";s:1:"k";s:4:"𝐥";s:1:"l";s:4:"𝐦";s:1:"m";s:4:"𝐧";s:1:"n";s:4:"𝐨";s:1:"o";s:4:"𝐩";s:1:"p";s:4:"𝐪";s:1:"q";s:4:"𝐫";s:1:"r";s:4:"𝐬";s:1:"s";s:4:"𝐭";s:1:"t";s:4:"𝐮";s:1:"u";s:4:"𝐯";s:1:"v";s:4:"𝐰";s:1:"w";s:4:"𝐱";s:1:"x";s:4:"𝐲";s:1:"y";s:4:"𝐳";s:1:"z";s:4:"𝐴";s:1:"A";s:4:"𝐵";s:1:"B";s:4:"𝐶";s:1:"C";s:4:"𝐷";s:1:"D";s:4:"𝐸";s:1:"E";s:4:"𝐹";s:1:"F";s:4:"𝐺";s:1:"G";s:4:"𝐻";s:1:"H";s:4:"𝐼";s:1:"I";s:4:"𝐽";s:1:"J";s:4:"𝐾";s:1:"K";s:4:"𝐿";s:1:"L";s:4:"𝑀";s:1:"M";s:4:"𝑁";s:1:"N";s:4:"𝑂";s:1:"O";s:4:"𝑃";s:1:"P";s:4:"𝑄";s:1:"Q";s:4:"𝑅";s:1:"R";s:4:"𝑆";s:1:"S";s:4:"𝑇";s:1:"T";s:4:"𝑈";s:1:"U";s:4:"𝑉";s:1:"V";s:4:"𝑊";s:1:"W";s:4:"𝑋";s:1:"X";s:4:"𝑌";s:1:"Y";s:4:"𝑍";s:1:"Z";s:4:"𝑎";s:1:"a";s:4:"𝑏";s:1:"b";s:4:"𝑐";s:1:"c";s:4:"𝑑";s:1:"d";s:4:"𝑒";s:1:"e";s:4:"𝑓";s:1:"f";s:4:"𝑔";s:1:"g";s:4:"𝑖";s:1:"i";s:4:"𝑗";s:1:"j";s:4:"𝑘";s:1:"k";s:4:"𝑙";s:1:"l";s:4:"𝑚";s:1:"m";s:4:"𝑛";s:1:"n";s:4:"𝑜";s:1:"o";s:4:"𝑝";s:1:"p";s:4:"𝑞";s:1:"q";s:4:"𝑟";s:1:"r";s:4:"𝑠";s:1:"s";s:4:"𝑡";s:1:"t";s:4:"𝑢";s:1:"u";s:4:"𝑣";s:1:"v";s:4:"𝑤";s:1:"w";s:4:"𝑥";s:1:"x";s:4:"𝑦";s:1:"y";s:4:"𝑧";s:1:"z";s:4:"𝑨";s:1:"A";s:4:"𝑩";s:1:"B";s:4:"𝑪";s:1:"C";s:4:"𝑫";s:1:"D";s:4:"𝑬";s:1:"E";s:4:"𝑭";s:1:"F";s:4:"𝑮";s:1:"G";s:4:"𝑯";s:1:"H";s:4:"𝑰";s:1:"I";s:4:"𝑱";s:1:"J";s:4:"𝑲";s:1:"K";s:4:"𝑳";s:1:"L";s:4:"𝑴";s:1:"M";s:4:"𝑵";s:1:"N";s:4:"𝑶";s:1:"O";s:4:"𝑷";s:1:"P";s:4:"𝑸";s:1:"Q";s:4:"𝑹";s:1:"R";s:4:"𝑺";s:1:"S";s:4:"𝑻";s:1:"T";s:4:"𝑼";s:1:"U";s:4:"𝑽";s:1:"V";s:4:"𝑾";s:1:"W";s:4:"𝑿";s:1:"X";s:4:"𝒀";s:1:"Y";s:4:"𝒁";s:1:"Z";s:4:"𝒂";s:1:"a";s:4:"𝒃";s:1:"b";s:4:"𝒄";s:1:"c";s:4:"𝒅";s:1:"d";s:4:"𝒆";s:1:"e";s:4:"𝒇";s:1:"f";s:4:"𝒈";s:1:"g";s:4:"𝒉";s:1:"h";s:4:"𝒊";s:1:"i";s:4:"𝒋";s:1:"j";s:4:"𝒌";s:1:"k";s:4:"𝒍";s:1:"l";s:4:"𝒎";s:1:"m";s:4:"𝒏";s:1:"n";s:4:"𝒐";s:1:"o";s:4:"𝒑";s:1:"p";s:4:"𝒒";s:1:"q";s:4:"𝒓";s:1:"r";s:4:"𝒔";s:1:"s";s:4:"𝒕";s:1:"t";s:4:"𝒖";s:1:"u";s:4:"𝒗";s:1:"v";s:4:"𝒘";s:1:"w";s:4:"𝒙";s:1:"x";s:4:"𝒚";s:1:"y";s:4:"𝒛";s:1:"z";s:4:"𝒜";s:1:"A";s:4:"𝒞";s:1:"C";s:4:"𝒟";s:1:"D";s:4:"𝒢";s:1:"G";s:4:"𝒥";s:1:"J";s:4:"𝒦";s:1:"K";s:4:"𝒩";s:1:"N";s:4:"𝒪";s:1:"O";s:4:"𝒫";s:1:"P";s:4:"𝒬";s:1:"Q";s:4:"𝒮";s:1:"S";s:4:"𝒯";s:1:"T";s:4:"𝒰";s:1:"U";s:4:"𝒱";s:1:"V";s:4:"𝒲";s:1:"W";s:4:"𝒳";s:1:"X";s:4:"𝒴";s:1:"Y";s:4:"𝒵";s:1:"Z";s:4:"𝒶";s:1:"a";s:4:"𝒷";s:1:"b";s:4:"𝒸";s:1:"c";s:4:"𝒹";s:1:"d";s:4:"𝒻";s:1:"f";s:4:"𝒽";s:1:"h";s:4:"𝒾";s:1:"i";s:4:"𝒿";s:1:"j";s:4:"𝓀";s:1:"k";s:4:"𝓁";s:1:"l";s:4:"𝓂";s:1:"m";s:4:"𝓃";s:1:"n";s:4:"𝓅";s:1:"p";s:4:"𝓆";s:1:"q";s:4:"𝓇";s:1:"r";s:4:"𝓈";s:1:"s";s:4:"𝓉";s:1:"t";s:4:"𝓊";s:1:"u";s:4:"𝓋";s:1:"v";s:4:"𝓌";s:1:"w";s:4:"𝓍";s:1:"x";s:4:"𝓎";s:1:"y";s:4:"𝓏";s:1:"z";s:4:"𝓐";s:1:"A";s:4:"𝓑";s:1:"B";s:4:"𝓒";s:1:"C";s:4:"𝓓";s:1:"D";s:4:"𝓔";s:1:"E";s:4:"𝓕";s:1:"F";s:4:"𝓖";s:1:"G";s:4:"𝓗";s:1:"H";s:4:"𝓘";s:1:"I";s:4:"𝓙";s:1:"J";s:4:"𝓚";s:1:"K";s:4:"𝓛";s:1:"L";s:4:"𝓜";s:1:"M";s:4:"𝓝";s:1:"N";s:4:"𝓞";s:1:"O";s:4:"𝓟";s:1:"P";s:4:"𝓠";s:1:"Q";s:4:"𝓡";s:1:"R";s:4:"𝓢";s:1:"S";s:4:"𝓣";s:1:"T";s:4:"𝓤";s:1:"U";s:4:"𝓥";s:1:"V";s:4:"𝓦";s:1:"W";s:4:"𝓧";s:1:"X";s:4:"𝓨";s:1:"Y";s:4:"𝓩";s:1:"Z";s:4:"𝓪";s:1:"a";s:4:"𝓫";s:1:"b";s:4:"𝓬";s:1:"c";s:4:"𝓭";s:1:"d";s:4:"𝓮";s:1:"e";s:4:"𝓯";s:1:"f";s:4:"𝓰";s:1:"g";s:4:"𝓱";s:1:"h";s:4:"𝓲";s:1:"i";s:4:"𝓳";s:1:"j";s:4:"𝓴";s:1:"k";s:4:"𝓵";s:1:"l";s:4:"𝓶";s:1:"m";s:4:"𝓷";s:1:"n";s:4:"𝓸";s:1:"o";s:4:"𝓹";s:1:"p";s:4:"𝓺";s:1:"q";s:4:"𝓻";s:1:"r";s:4:"𝓼";s:1:"s";s:4:"𝓽";s:1:"t";s:4:"𝓾";s:1:"u";s:4:"𝓿";s:1:"v";s:4:"𝔀";s:1:"w";s:4:"𝔁";s:1:"x";s:4:"𝔂";s:1:"y";s:4:"𝔃";s:1:"z";s:4:"𝔄";s:1:"A";s:4:"𝔅";s:1:"B";s:4:"𝔇";s:1:"D";s:4:"𝔈";s:1:"E";s:4:"𝔉";s:1:"F";s:4:"𝔊";s:1:"G";s:4:"𝔍";s:1:"J";s:4:"𝔎";s:1:"K";s:4:"𝔏";s:1:"L";s:4:"𝔐";s:1:"M";s:4:"𝔑";s:1:"N";s:4:"𝔒";s:1:"O";s:4:"𝔓";s:1:"P";s:4:"𝔔";s:1:"Q";s:4:"𝔖";s:1:"S";s:4:"𝔗";s:1:"T";s:4:"𝔘";s:1:"U";s:4:"𝔙";s:1:"V";s:4:"𝔚";s:1:"W";s:4:"𝔛";s:1:"X";s:4:"𝔜";s:1:"Y";s:4:"𝔞";s:1:"a";s:4:"𝔟";s:1:"b";s:4:"𝔠";s:1:"c";s:4:"𝔡";s:1:"d";s:4:"𝔢";s:1:"e";s:4:"𝔣";s:1:"f";s:4:"𝔤";s:1:"g";s:4:"𝔥";s:1:"h";s:4:"𝔦";s:1:"i";s:4:"𝔧";s:1:"j";s:4:"𝔨";s:1:"k";s:4:"𝔩";s:1:"l";s:4:"𝔪";s:1:"m";s:4:"𝔫";s:1:"n";s:4:"𝔬";s:1:"o";s:4:"𝔭";s:1:"p";s:4:"𝔮";s:1:"q";s:4:"𝔯";s:1:"r";s:4:"𝔰";s:1:"s";s:4:"𝔱";s:1:"t";s:4:"𝔲";s:1:"u";s:4:"𝔳";s:1:"v";s:4:"𝔴";s:1:"w";s:4:"𝔵";s:1:"x";s:4:"𝔶";s:1:"y";s:4:"𝔷";s:1:"z";s:4:"𝔸";s:1:"A";s:4:"𝔹";s:1:"B";s:4:"𝔻";s:1:"D";s:4:"𝔼";s:1:"E";s:4:"𝔽";s:1:"F";s:4:"𝔾";s:1:"G";s:4:"𝕀";s:1:"I";s:4:"𝕁";s:1:"J";s:4:"𝕂";s:1:"K";s:4:"𝕃";s:1:"L";s:4:"𝕄";s:1:"M";s:4:"𝕆";s:1:"O";s:4:"𝕊";s:1:"S";s:4:"𝕋";s:1:"T";s:4:"𝕌";s:1:"U";s:4:"𝕍";s:1:"V";s:4:"𝕎";s:1:"W";s:4:"𝕏";s:1:"X";s:4:"𝕐";s:1:"Y";s:4:"𝕒";s:1:"a";s:4:"𝕓";s:1:"b";s:4:"𝕔";s:1:"c";s:4:"𝕕";s:1:"d";s:4:"𝕖";s:1:"e";s:4:"𝕗";s:1:"f";s:4:"𝕘";s:1:"g";s:4:"𝕙";s:1:"h";s:4:"𝕚";s:1:"i";s:4:"𝕛";s:1:"j";s:4:"𝕜";s:1:"k";s:4:"𝕝";s:1:"l";s:4:"𝕞";s:1:"m";s:4:"𝕟";s:1:"n";s:4:"𝕠";s:1:"o";s:4:"𝕡";s:1:"p";s:4:"𝕢";s:1:"q";s:4:"𝕣";s:1:"r";s:4:"𝕤";s:1:"s";s:4:"𝕥";s:1:"t";s:4:"𝕦";s:1:"u";s:4:"𝕧";s:1:"v";s:4:"𝕨";s:1:"w";s:4:"𝕩";s:1:"x";s:4:"𝕪";s:1:"y";s:4:"𝕫";s:1:"z";s:4:"𝕬";s:1:"A";s:4:"𝕭";s:1:"B";s:4:"𝕮";s:1:"C";s:4:"𝕯";s:1:"D";s:4:"𝕰";s:1:"E";s:4:"𝕱";s:1:"F";s:4:"𝕲";s:1:"G";s:4:"𝕳";s:1:"H";s:4:"𝕴";s:1:"I";s:4:"𝕵";s:1:"J";s:4:"𝕶";s:1:"K";s:4:"𝕷";s:1:"L";s:4:"𝕸";s:1:"M";s:4:"𝕹";s:1:"N";s:4:"𝕺";s:1:"O";s:4:"𝕻";s:1:"P";s:4:"𝕼";s:1:"Q";s:4:"𝕽";s:1:"R";s:4:"𝕾";s:1:"S";s:4:"𝕿";s:1:"T";s:4:"𝖀";s:1:"U";s:4:"𝖁";s:1:"V";s:4:"𝖂";s:1:"W";s:4:"𝖃";s:1:"X";s:4:"𝖄";s:1:"Y";s:4:"𝖅";s:1:"Z";s:4:"𝖆";s:1:"a";s:4:"𝖇";s:1:"b";s:4:"𝖈";s:1:"c";s:4:"𝖉";s:1:"d";s:4:"𝖊";s:1:"e";s:4:"𝖋";s:1:"f";s:4:"𝖌";s:1:"g";s:4:"𝖍";s:1:"h";s:4:"𝖎";s:1:"i";s:4:"𝖏";s:1:"j";s:4:"𝖐";s:1:"k";s:4:"𝖑";s:1:"l";s:4:"𝖒";s:1:"m";s:4:"𝖓";s:1:"n";s:4:"𝖔";s:1:"o";s:4:"𝖕";s:1:"p";s:4:"𝖖";s:1:"q";s:4:"𝖗";s:1:"r";s:4:"𝖘";s:1:"s";s:4:"𝖙";s:1:"t";s:4:"𝖚";s:1:"u";s:4:"𝖛";s:1:"v";s:4:"𝖜";s:1:"w";s:4:"𝖝";s:1:"x";s:4:"𝖞";s:1:"y";s:4:"𝖟";s:1:"z";s:4:"𝖠";s:1:"A";s:4:"𝖡";s:1:"B";s:4:"𝖢";s:1:"C";s:4:"𝖣";s:1:"D";s:4:"𝖤";s:1:"E";s:4:"𝖥";s:1:"F";s:4:"𝖦";s:1:"G";s:4:"𝖧";s:1:"H";s:4:"𝖨";s:1:"I";s:4:"𝖩";s:1:"J";s:4:"𝖪";s:1:"K";s:4:"𝖫";s:1:"L";s:4:"𝖬";s:1:"M";s:4:"𝖭";s:1:"N";s:4:"𝖮";s:1:"O";s:4:"𝖯";s:1:"P";s:4:"𝖰";s:1:"Q";s:4:"𝖱";s:1:"R";s:4:"𝖲";s:1:"S";s:4:"𝖳";s:1:"T";s:4:"𝖴";s:1:"U";s:4:"𝖵";s:1:"V";s:4:"𝖶";s:1:"W";s:4:"𝖷";s:1:"X";s:4:"𝖸";s:1:"Y";s:4:"𝖹";s:1:"Z";s:4:"𝖺";s:1:"a";s:4:"𝖻";s:1:"b";s:4:"𝖼";s:1:"c";s:4:"𝖽";s:1:"d";s:4:"𝖾";s:1:"e";s:4:"𝖿";s:1:"f";s:4:"𝗀";s:1:"g";s:4:"𝗁";s:1:"h";s:4:"𝗂";s:1:"i";s:4:"𝗃";s:1:"j";s:4:"𝗄";s:1:"k";s:4:"𝗅";s:1:"l";s:4:"𝗆";s:1:"m";s:4:"𝗇";s:1:"n";s:4:"𝗈";s:1:"o";s:4:"𝗉";s:1:"p";s:4:"𝗊";s:1:"q";s:4:"𝗋";s:1:"r";s:4:"𝗌";s:1:"s";s:4:"𝗍";s:1:"t";s:4:"𝗎";s:1:"u";s:4:"𝗏";s:1:"v";s:4:"𝗐";s:1:"w";s:4:"𝗑";s:1:"x";s:4:"𝗒";s:1:"y";s:4:"𝗓";s:1:"z";s:4:"𝗔";s:1:"A";s:4:"𝗕";s:1:"B";s:4:"𝗖";s:1:"C";s:4:"𝗗";s:1:"D";s:4:"𝗘";s:1:"E";s:4:"𝗙";s:1:"F";s:4:"𝗚";s:1:"G";s:4:"𝗛";s:1:"H";s:4:"𝗜";s:1:"I";s:4:"𝗝";s:1:"J";s:4:"𝗞";s:1:"K";s:4:"𝗟";s:1:"L";s:4:"𝗠";s:1:"M";s:4:"𝗡";s:1:"N";s:4:"𝗢";s:1:"O";s:4:"𝗣";s:1:"P";s:4:"𝗤";s:1:"Q";s:4:"𝗥";s:1:"R";s:4:"𝗦";s:1:"S";s:4:"𝗧";s:1:"T";s:4:"𝗨";s:1:"U";s:4:"𝗩";s:1:"V";s:4:"𝗪";s:1:"W";s:4:"𝗫";s:1:"X";s:4:"𝗬";s:1:"Y";s:4:"𝗭";s:1:"Z";s:4:"𝗮";s:1:"a";s:4:"𝗯";s:1:"b";s:4:"𝗰";s:1:"c";s:4:"𝗱";s:1:"d";s:4:"𝗲";s:1:"e";s:4:"𝗳";s:1:"f";s:4:"𝗴";s:1:"g";s:4:"𝗵";s:1:"h";s:4:"𝗶";s:1:"i";s:4:"𝗷";s:1:"j";s:4:"𝗸";s:1:"k";s:4:"𝗹";s:1:"l";s:4:"𝗺";s:1:"m";s:4:"𝗻";s:1:"n";s:4:"𝗼";s:1:"o";s:4:"𝗽";s:1:"p";s:4:"𝗾";s:1:"q";s:4:"𝗿";s:1:"r";s:4:"𝘀";s:1:"s";s:4:"𝘁";s:1:"t";s:4:"𝘂";s:1:"u";s:4:"𝘃";s:1:"v";s:4:"𝘄";s:1:"w";s:4:"𝘅";s:1:"x";s:4:"𝘆";s:1:"y";s:4:"𝘇";s:1:"z";s:4:"𝘈";s:1:"A";s:4:"𝘉";s:1:"B";s:4:"𝘊";s:1:"C";s:4:"𝘋";s:1:"D";s:4:"𝘌";s:1:"E";s:4:"𝘍";s:1:"F";s:4:"𝘎";s:1:"G";s:4:"𝘏";s:1:"H";s:4:"𝘐";s:1:"I";s:4:"𝘑";s:1:"J";s:4:"𝘒";s:1:"K";s:4:"𝘓";s:1:"L";s:4:"𝘔";s:1:"M";s:4:"𝘕";s:1:"N";s:4:"𝘖";s:1:"O";s:4:"𝘗";s:1:"P";s:4:"𝘘";s:1:"Q";s:4:"𝘙";s:1:"R";s:4:"𝘚";s:1:"S";s:4:"𝘛";s:1:"T";s:4:"𝘜";s:1:"U";s:4:"𝘝";s:1:"V";s:4:"𝘞";s:1:"W";s:4:"𝘟";s:1:"X";s:4:"𝘠";s:1:"Y";s:4:"𝘡";s:1:"Z";s:4:"𝘢";s:1:"a";s:4:"𝘣";s:1:"b";s:4:"𝘤";s:1:"c";s:4:"𝘥";s:1:"d";s:4:"𝘦";s:1:"e";s:4:"𝘧";s:1:"f";s:4:"𝘨";s:1:"g";s:4:"𝘩";s:1:"h";s:4:"𝘪";s:1:"i";s:4:"𝘫";s:1:"j";s:4:"𝘬";s:1:"k";s:4:"𝘭";s:1:"l";s:4:"𝘮";s:1:"m";s:4:"𝘯";s:1:"n";s:4:"𝘰";s:1:"o";s:4:"𝘱";s:1:"p";s:4:"𝘲";s:1:"q";s:4:"𝘳";s:1:"r";s:4:"𝘴";s:1:"s";s:4:"𝘵";s:1:"t";s:4:"𝘶";s:1:"u";s:4:"𝘷";s:1:"v";s:4:"𝘸";s:1:"w";s:4:"𝘹";s:1:"x";s:4:"𝘺";s:1:"y";s:4:"𝘻";s:1:"z";s:4:"𝘼";s:1:"A";s:4:"𝘽";s:1:"B";s:4:"𝘾";s:1:"C";s:4:"𝘿";s:1:"D";s:4:"𝙀";s:1:"E";s:4:"𝙁";s:1:"F";s:4:"𝙂";s:1:"G";s:4:"𝙃";s:1:"H";s:4:"𝙄";s:1:"I";s:4:"𝙅";s:1:"J";s:4:"𝙆";s:1:"K";s:4:"𝙇";s:1:"L";s:4:"𝙈";s:1:"M";s:4:"𝙉";s:1:"N";s:4:"𝙊";s:1:"O";s:4:"𝙋";s:1:"P";s:4:"𝙌";s:1:"Q";s:4:"𝙍";s:1:"R";s:4:"𝙎";s:1:"S";s:4:"𝙏";s:1:"T";s:4:"𝙐";s:1:"U";s:4:"𝙑";s:1:"V";s:4:"𝙒";s:1:"W";s:4:"𝙓";s:1:"X";s:4:"𝙔";s:1:"Y";s:4:"𝙕";s:1:"Z";s:4:"𝙖";s:1:"a";s:4:"𝙗";s:1:"b";s:4:"𝙘";s:1:"c";s:4:"𝙙";s:1:"d";s:4:"𝙚";s:1:"e";s:4:"𝙛";s:1:"f";s:4:"𝙜";s:1:"g";s:4:"𝙝";s:1:"h";s:4:"𝙞";s:1:"i";s:4:"𝙟";s:1:"j";s:4:"𝙠";s:1:"k";s:4:"𝙡";s:1:"l";s:4:"𝙢";s:1:"m";s:4:"𝙣";s:1:"n";s:4:"𝙤";s:1:"o";s:4:"𝙥";s:1:"p";s:4:"𝙦";s:1:"q";s:4:"𝙧";s:1:"r";s:4:"𝙨";s:1:"s";s:4:"𝙩";s:1:"t";s:4:"𝙪";s:1:"u";s:4:"𝙫";s:1:"v";s:4:"𝙬";s:1:"w";s:4:"𝙭";s:1:"x";s:4:"𝙮";s:1:"y";s:4:"𝙯";s:1:"z";s:4:"𝙰";s:1:"A";s:4:"𝙱";s:1:"B";s:4:"𝙲";s:1:"C";s:4:"𝙳";s:1:"D";s:4:"𝙴";s:1:"E";s:4:"𝙵";s:1:"F";s:4:"𝙶";s:1:"G";s:4:"𝙷";s:1:"H";s:4:"𝙸";s:1:"I";s:4:"𝙹";s:1:"J";s:4:"𝙺";s:1:"K";s:4:"𝙻";s:1:"L";s:4:"𝙼";s:1:"M";s:4:"𝙽";s:1:"N";s:4:"𝙾";s:1:"O";s:4:"𝙿";s:1:"P";s:4:"𝚀";s:1:"Q";s:4:"𝚁";s:1:"R";s:4:"𝚂";s:1:"S";s:4:"𝚃";s:1:"T";s:4:"𝚄";s:1:"U";s:4:"𝚅";s:1:"V";s:4:"𝚆";s:1:"W";s:4:"𝚇";s:1:"X";s:4:"𝚈";s:1:"Y";s:4:"𝚉";s:1:"Z";s:4:"𝚊";s:1:"a";s:4:"𝚋";s:1:"b";s:4:"𝚌";s:1:"c";s:4:"𝚍";s:1:"d";s:4:"𝚎";s:1:"e";s:4:"𝚏";s:1:"f";s:4:"𝚐";s:1:"g";s:4:"𝚑";s:1:"h";s:4:"𝚒";s:1:"i";s:4:"𝚓";s:1:"j";s:4:"𝚔";s:1:"k";s:4:"𝚕";s:1:"l";s:4:"𝚖";s:1:"m";s:4:"𝚗";s:1:"n";s:4:"𝚘";s:1:"o";s:4:"𝚙";s:1:"p";s:4:"𝚚";s:1:"q";s:4:"𝚛";s:1:"r";s:4:"𝚜";s:1:"s";s:4:"𝚝";s:1:"t";s:4:"𝚞";s:1:"u";s:4:"𝚟";s:1:"v";s:4:"𝚠";s:1:"w";s:4:"𝚡";s:1:"x";s:4:"𝚢";s:1:"y";s:4:"𝚣";s:1:"z";s:4:"𝚤";s:2:"ı";s:4:"𝚥";s:2:"ȷ";s:4:"𝚨";s:2:"Α";s:4:"𝚩";s:2:"Β";s:4:"𝚪";s:2:"Γ";s:4:"𝚫";s:2:"Δ";s:4:"𝚬";s:2:"Ε";s:4:"𝚭";s:2:"Ζ";s:4:"𝚮";s:2:"Η";s:4:"𝚯";s:2:"Θ";s:4:"𝚰";s:2:"Ι";s:4:"𝚱";s:2:"Κ";s:4:"𝚲";s:2:"Λ";s:4:"𝚳";s:2:"Μ";s:4:"𝚴";s:2:"Ν";s:4:"𝚵";s:2:"Ξ";s:4:"𝚶";s:2:"Ο";s:4:"𝚷";s:2:"Π";s:4:"𝚸";s:2:"Ρ";s:4:"𝚹";s:2:"Θ";s:4:"𝚺";s:2:"Σ";s:4:"𝚻";s:2:"Τ";s:4:"𝚼";s:2:"Υ";s:4:"𝚽";s:2:"Φ";s:4:"𝚾";s:2:"Χ";s:4:"𝚿";s:2:"Ψ";s:4:"𝛀";s:2:"Ω";s:4:"𝛁";s:3:"∇";s:4:"𝛂";s:2:"α";s:4:"𝛃";s:2:"β";s:4:"𝛄";s:2:"γ";s:4:"𝛅";s:2:"δ";s:4:"𝛆";s:2:"ε";s:4:"𝛇";s:2:"ζ";s:4:"𝛈";s:2:"η";s:4:"𝛉";s:2:"θ";s:4:"𝛊";s:2:"ι";s:4:"𝛋";s:2:"κ";s:4:"𝛌";s:2:"λ";s:4:"𝛍";s:2:"μ";s:4:"𝛎";s:2:"ν";s:4:"𝛏";s:2:"ξ";s:4:"𝛐";s:2:"ο";s:4:"𝛑";s:2:"π";s:4:"𝛒";s:2:"ρ";s:4:"𝛓";s:2:"ς";s:4:"𝛔";s:2:"σ";s:4:"𝛕";s:2:"τ";s:4:"𝛖";s:2:"υ";s:4:"𝛗";s:2:"φ";s:4:"𝛘";s:2:"χ";s:4:"𝛙";s:2:"ψ";s:4:"𝛚";s:2:"ω";s:4:"𝛛";s:3:"∂";s:4:"𝛜";s:2:"ε";s:4:"𝛝";s:2:"θ";s:4:"𝛞";s:2:"κ";s:4:"𝛟";s:2:"φ";s:4:"𝛠";s:2:"ρ";s:4:"𝛡";s:2:"π";s:4:"𝛢";s:2:"Α";s:4:"𝛣";s:2:"Β";s:4:"𝛤";s:2:"Γ";s:4:"𝛥";s:2:"Δ";s:4:"𝛦";s:2:"Ε";s:4:"𝛧";s:2:"Ζ";s:4:"𝛨";s:2:"Η";s:4:"𝛩";s:2:"Θ";s:4:"𝛪";s:2:"Ι";s:4:"𝛫";s:2:"Κ";s:4:"𝛬";s:2:"Λ";s:4:"𝛭";s:2:"Μ";s:4:"𝛮";s:2:"Ν";s:4:"𝛯";s:2:"Ξ";s:4:"𝛰";s:2:"Ο";s:4:"𝛱";s:2:"Π";s:4:"𝛲";s:2:"Ρ";s:4:"𝛳";s:2:"Θ";s:4:"𝛴";s:2:"Σ";s:4:"𝛵";s:2:"Τ";s:4:"𝛶";s:2:"Υ";s:4:"𝛷";s:2:"Φ";s:4:"𝛸";s:2:"Χ";s:4:"𝛹";s:2:"Ψ";s:4:"𝛺";s:2:"Ω";s:4:"𝛻";s:3:"∇";s:4:"𝛼";s:2:"α";s:4:"𝛽";s:2:"β";s:4:"𝛾";s:2:"γ";s:4:"𝛿";s:2:"δ";s:4:"𝜀";s:2:"ε";s:4:"𝜁";s:2:"ζ";s:4:"𝜂";s:2:"η";s:4:"𝜃";s:2:"θ";s:4:"𝜄";s:2:"ι";s:4:"𝜅";s:2:"κ";s:4:"𝜆";s:2:"λ";s:4:"𝜇";s:2:"μ";s:4:"𝜈";s:2:"ν";s:4:"𝜉";s:2:"ξ";s:4:"𝜊";s:2:"ο";s:4:"𝜋";s:2:"π";s:4:"𝜌";s:2:"ρ";s:4:"𝜍";s:2:"ς";s:4:"𝜎";s:2:"σ";s:4:"𝜏";s:2:"τ";s:4:"𝜐";s:2:"υ";s:4:"𝜑";s:2:"φ";s:4:"𝜒";s:2:"χ";s:4:"𝜓";s:2:"ψ";s:4:"𝜔";s:2:"ω";s:4:"𝜕";s:3:"∂";s:4:"𝜖";s:2:"ε";s:4:"𝜗";s:2:"θ";s:4:"𝜘";s:2:"κ";s:4:"𝜙";s:2:"φ";s:4:"𝜚";s:2:"ρ";s:4:"𝜛";s:2:"π";s:4:"𝜜";s:2:"Α";s:4:"𝜝";s:2:"Β";s:4:"𝜞";s:2:"Γ";s:4:"𝜟";s:2:"Δ";s:4:"𝜠";s:2:"Ε";s:4:"𝜡";s:2:"Ζ";s:4:"𝜢";s:2:"Η";s:4:"𝜣";s:2:"Θ";s:4:"𝜤";s:2:"Ι";s:4:"𝜥";s:2:"Κ";s:4:"𝜦";s:2:"Λ";s:4:"𝜧";s:2:"Μ";s:4:"𝜨";s:2:"Ν";s:4:"𝜩";s:2:"Ξ";s:4:"𝜪";s:2:"Ο";s:4:"𝜫";s:2:"Π";s:4:"𝜬";s:2:"Ρ";s:4:"𝜭";s:2:"Θ";s:4:"𝜮";s:2:"Σ";s:4:"𝜯";s:2:"Τ";s:4:"𝜰";s:2:"Υ";s:4:"𝜱";s:2:"Φ";s:4:"𝜲";s:2:"Χ";s:4:"𝜳";s:2:"Ψ";s:4:"𝜴";s:2:"Ω";s:4:"𝜵";s:3:"∇";s:4:"𝜶";s:2:"α";s:4:"𝜷";s:2:"β";s:4:"𝜸";s:2:"γ";s:4:"𝜹";s:2:"δ";s:4:"𝜺";s:2:"ε";s:4:"𝜻";s:2:"ζ";s:4:"𝜼";s:2:"η";s:4:"𝜽";s:2:"θ";s:4:"𝜾";s:2:"ι";s:4:"𝜿";s:2:"κ";s:4:"𝝀";s:2:"λ";s:4:"𝝁";s:2:"μ";s:4:"𝝂";s:2:"ν";s:4:"𝝃";s:2:"ξ";s:4:"𝝄";s:2:"ο";s:4:"𝝅";s:2:"π";s:4:"𝝆";s:2:"ρ";s:4:"𝝇";s:2:"ς";s:4:"𝝈";s:2:"σ";s:4:"𝝉";s:2:"τ";s:4:"𝝊";s:2:"υ";s:4:"𝝋";s:2:"φ";s:4:"𝝌";s:2:"χ";s:4:"𝝍";s:2:"ψ";s:4:"𝝎";s:2:"ω";s:4:"𝝏";s:3:"∂";s:4:"𝝐";s:2:"ε";s:4:"𝝑";s:2:"θ";s:4:"𝝒";s:2:"κ";s:4:"𝝓";s:2:"φ";s:4:"𝝔";s:2:"ρ";s:4:"𝝕";s:2:"π";s:4:"𝝖";s:2:"Α";s:4:"𝝗";s:2:"Β";s:4:"𝝘";s:2:"Γ";s:4:"𝝙";s:2:"Δ";s:4:"𝝚";s:2:"Ε";s:4:"𝝛";s:2:"Ζ";s:4:"𝝜";s:2:"Η";s:4:"𝝝";s:2:"Θ";s:4:"𝝞";s:2:"Ι";s:4:"𝝟";s:2:"Κ";s:4:"𝝠";s:2:"Λ";s:4:"𝝡";s:2:"Μ";s:4:"𝝢";s:2:"Ν";s:4:"𝝣";s:2:"Ξ";s:4:"𝝤";s:2:"Ο";s:4:"𝝥";s:2:"Π";s:4:"𝝦";s:2:"Ρ";s:4:"𝝧";s:2:"Θ";s:4:"𝝨";s:2:"Σ";s:4:"𝝩";s:2:"Τ";s:4:"𝝪";s:2:"Υ";s:4:"𝝫";s:2:"Φ";s:4:"𝝬";s:2:"Χ";s:4:"𝝭";s:2:"Ψ";s:4:"𝝮";s:2:"Ω";s:4:"𝝯";s:3:"∇";s:4:"𝝰";s:2:"α";s:4:"𝝱";s:2:"β";s:4:"𝝲";s:2:"γ";s:4:"𝝳";s:2:"δ";s:4:"𝝴";s:2:"ε";s:4:"𝝵";s:2:"ζ";s:4:"𝝶";s:2:"η";s:4:"𝝷";s:2:"θ";s:4:"𝝸";s:2:"ι";s:4:"𝝹";s:2:"κ";s:4:"𝝺";s:2:"λ";s:4:"𝝻";s:2:"μ";s:4:"𝝼";s:2:"ν";s:4:"𝝽";s:2:"ξ";s:4:"𝝾";s:2:"ο";s:4:"𝝿";s:2:"π";s:4:"𝞀";s:2:"ρ";s:4:"𝞁";s:2:"ς";s:4:"𝞂";s:2:"σ";s:4:"𝞃";s:2:"τ";s:4:"𝞄";s:2:"υ";s:4:"𝞅";s:2:"φ";s:4:"𝞆";s:2:"χ";s:4:"𝞇";s:2:"ψ";s:4:"𝞈";s:2:"ω";s:4:"𝞉";s:3:"∂";s:4:"𝞊";s:2:"ε";s:4:"𝞋";s:2:"θ";s:4:"𝞌";s:2:"κ";s:4:"𝞍";s:2:"φ";s:4:"𝞎";s:2:"ρ";s:4:"𝞏";s:2:"π";s:4:"𝞐";s:2:"Α";s:4:"𝞑";s:2:"Β";s:4:"𝞒";s:2:"Γ";s:4:"𝞓";s:2:"Δ";s:4:"𝞔";s:2:"Ε";s:4:"𝞕";s:2:"Ζ";s:4:"𝞖";s:2:"Η";s:4:"𝞗";s:2:"Θ";s:4:"𝞘";s:2:"Ι";s:4:"𝞙";s:2:"Κ";s:4:"𝞚";s:2:"Λ";s:4:"𝞛";s:2:"Μ";s:4:"𝞜";s:2:"Ν";s:4:"𝞝";s:2:"Ξ";s:4:"𝞞";s:2:"Ο";s:4:"𝞟";s:2:"Π";s:4:"𝞠";s:2:"Ρ";s:4:"𝞡";s:2:"Θ";s:4:"𝞢";s:2:"Σ";s:4:"𝞣";s:2:"Τ";s:4:"𝞤";s:2:"Υ";s:4:"𝞥";s:2:"Φ";s:4:"𝞦";s:2:"Χ";s:4:"𝞧";s:2:"Ψ";s:4:"𝞨";s:2:"Ω";s:4:"𝞩";s:3:"∇";s:4:"𝞪";s:2:"α";s:4:"𝞫";s:2:"β";s:4:"𝞬";s:2:"γ";s:4:"𝞭";s:2:"δ";s:4:"𝞮";s:2:"ε";s:4:"𝞯";s:2:"ζ";s:4:"𝞰";s:2:"η";s:4:"𝞱";s:2:"θ";s:4:"𝞲";s:2:"ι";s:4:"𝞳";s:2:"κ";s:4:"𝞴";s:2:"λ";s:4:"𝞵";s:2:"μ";s:4:"𝞶";s:2:"ν";s:4:"𝞷";s:2:"ξ";s:4:"𝞸";s:2:"ο";s:4:"𝞹";s:2:"π";s:4:"𝞺";s:2:"ρ";s:4:"𝞻";s:2:"ς";s:4:"𝞼";s:2:"σ";s:4:"𝞽";s:2:"τ";s:4:"𝞾";s:2:"υ";s:4:"𝞿";s:2:"φ";s:4:"𝟀";s:2:"χ";s:4:"𝟁";s:2:"ψ";s:4:"𝟂";s:2:"ω";s:4:"𝟃";s:3:"∂";s:4:"𝟄";s:2:"ε";s:4:"𝟅";s:2:"θ";s:4:"𝟆";s:2:"κ";s:4:"𝟇";s:2:"φ";s:4:"𝟈";s:2:"ρ";s:4:"𝟉";s:2:"π";s:4:"𝟊";s:2:"Ϝ";s:4:"𝟋";s:2:"ϝ";s:4:"𝟎";s:1:"0";s:4:"𝟏";s:1:"1";s:4:"𝟐";s:1:"2";s:4:"𝟑";s:1:"3";s:4:"𝟒";s:1:"4";s:4:"𝟓";s:1:"5";s:4:"𝟔";s:1:"6";s:4:"𝟕";s:1:"7";s:4:"𝟖";s:1:"8";s:4:"𝟗";s:1:"9";s:4:"𝟘";s:1:"0";s:4:"𝟙";s:1:"1";s:4:"𝟚";s:1:"2";s:4:"𝟛";s:1:"3";s:4:"𝟜";s:1:"4";s:4:"𝟝";s:1:"5";s:4:"𝟞";s:1:"6";s:4:"𝟟";s:1:"7";s:4:"𝟠";s:1:"8";s:4:"𝟡";s:1:"9";s:4:"𝟢";s:1:"0";s:4:"𝟣";s:1:"1";s:4:"𝟤";s:1:"2";s:4:"𝟥";s:1:"3";s:4:"𝟦";s:1:"4";s:4:"𝟧";s:1:"5";s:4:"𝟨";s:1:"6";s:4:"𝟩";s:1:"7";s:4:"𝟪";s:1:"8";s:4:"𝟫";s:1:"9";s:4:"𝟬";s:1:"0";s:4:"𝟭";s:1:"1";s:4:"𝟮";s:1:"2";s:4:"𝟯";s:1:"3";s:4:"𝟰";s:1:"4";s:4:"𝟱";s:1:"5";s:4:"𝟲";s:1:"6";s:4:"𝟳";s:1:"7";s:4:"𝟴";s:1:"8";s:4:"𝟵";s:1:"9";s:4:"𝟶";s:1:"0";s:4:"𝟷";s:1:"1";s:4:"𝟸";s:1:"2";s:4:"𝟹";s:1:"3";s:4:"𝟺";s:1:"4";s:4:"𝟻";s:1:"5";s:4:"𝟼";s:1:"6";s:4:"𝟽";s:1:"7";s:4:"𝟾";s:1:"8";s:4:"𝟿";s:1:"9";s:4:"𞸀";s:2:"ا";s:4:"𞸁";s:2:"ب";s:4:"𞸂";s:2:"ج";s:4:"𞸃";s:2:"د";s:4:"𞸅";s:2:"و";s:4:"𞸆";s:2:"ز";s:4:"𞸇";s:2:"ح";s:4:"𞸈";s:2:"ط";s:4:"𞸉";s:2:"ي";s:4:"𞸊";s:2:"ك";s:4:"𞸋";s:2:"ل";s:4:"𞸌";s:2:"م";s:4:"𞸍";s:2:"ن";s:4:"𞸎";s:2:"س";s:4:"𞸏";s:2:"ع";s:4:"𞸐";s:2:"ف";s:4:"𞸑";s:2:"ص";s:4:"𞸒";s:2:"ق";s:4:"𞸓";s:2:"ر";s:4:"𞸔";s:2:"ش";s:4:"𞸕";s:2:"ت";s:4:"𞸖";s:2:"ث";s:4:"𞸗";s:2:"خ";s:4:"𞸘";s:2:"ذ";s:4:"𞸙";s:2:"ض";s:4:"𞸚";s:2:"ظ";s:4:"𞸛";s:2:"غ";s:4:"𞸜";s:2:"ٮ";s:4:"𞸝";s:2:"ں";s:4:"𞸞";s:2:"ڡ";s:4:"𞸟";s:2:"ٯ";s:4:"𞸡";s:2:"ب";s:4:"𞸢";s:2:"ج";s:4:"𞸤";s:2:"ه";s:4:"𞸧";s:2:"ح";s:4:"𞸩";s:2:"ي";s:4:"𞸪";s:2:"ك";s:4:"𞸫";s:2:"ل";s:4:"𞸬";s:2:"م";s:4:"𞸭";s:2:"ن";s:4:"𞸮";s:2:"س";s:4:"𞸯";s:2:"ع";s:4:"𞸰";s:2:"ف";s:4:"𞸱";s:2:"ص";s:4:"𞸲";s:2:"ق";s:4:"𞸴";s:2:"ش";s:4:"𞸵";s:2:"ت";s:4:"𞸶";s:2:"ث";s:4:"𞸷";s:2:"خ";s:4:"𞸹";s:2:"ض";s:4:"𞸻";s:2:"غ";s:4:"𞹂";s:2:"ج";s:4:"𞹇";s:2:"ح";s:4:"𞹉";s:2:"ي";s:4:"𞹋";s:2:"ل";s:4:"𞹍";s:2:"ن";s:4:"𞹎";s:2:"س";s:4:"𞹏";s:2:"ع";s:4:"𞹑";s:2:"ص";s:4:"𞹒";s:2:"ق";s:4:"𞹔";s:2:"ش";s:4:"𞹗";s:2:"خ";s:4:"𞹙";s:2:"ض";s:4:"𞹛";s:2:"غ";s:4:"𞹝";s:2:"ں";s:4:"𞹟";s:2:"ٯ";s:4:"𞹡";s:2:"ب";s:4:"𞹢";s:2:"ج";s:4:"𞹤";s:2:"ه";s:4:"𞹧";s:2:"ح";s:4:"𞹨";s:2:"ط";s:4:"𞹩";s:2:"ي";s:4:"𞹪";s:2:"ك";s:4:"𞹬";s:2:"م";s:4:"𞹭";s:2:"ن";s:4:"𞹮";s:2:"س";s:4:"𞹯";s:2:"ع";s:4:"𞹰";s:2:"ف";s:4:"𞹱";s:2:"ص";s:4:"𞹲";s:2:"ق";s:4:"𞹴";s:2:"ش";s:4:"𞹵";s:2:"ت";s:4:"𞹶";s:2:"ث";s:4:"𞹷";s:2:"خ";s:4:"𞹹";s:2:"ض";s:4:"𞹺";s:2:"ظ";s:4:"𞹻";s:2:"غ";s:4:"𞹼";s:2:"ٮ";s:4:"𞹾";s:2:"ڡ";s:4:"𞺀";s:2:"ا";s:4:"𞺁";s:2:"ب";s:4:"𞺂";s:2:"ج";s:4:"𞺃";s:2:"د";s:4:"𞺄";s:2:"ه";s:4:"𞺅";s:2:"و";s:4:"𞺆";s:2:"ز";s:4:"𞺇";s:2:"ح";s:4:"𞺈";s:2:"ط";s:4:"𞺉";s:2:"ي";s:4:"𞺋";s:2:"ل";s:4:"𞺌";s:2:"م";s:4:"𞺍";s:2:"ن";s:4:"𞺎";s:2:"س";s:4:"𞺏";s:2:"ع";s:4:"𞺐";s:2:"ف";s:4:"𞺑";s:2:"ص";s:4:"𞺒";s:2:"ق";s:4:"𞺓";s:2:"ر";s:4:"𞺔";s:2:"ش";s:4:"𞺕";s:2:"ت";s:4:"𞺖";s:2:"ث";s:4:"𞺗";s:2:"خ";s:4:"𞺘";s:2:"ذ";s:4:"𞺙";s:2:"ض";s:4:"𞺚";s:2:"ظ";s:4:"𞺛";s:2:"غ";s:4:"𞺡";s:2:"ب";s:4:"𞺢";s:2:"ج";s:4:"𞺣";s:2:"د";s:4:"𞺥";s:2:"و";s:4:"𞺦";s:2:"ز";s:4:"𞺧";s:2:"ح";s:4:"𞺨";s:2:"ط";s:4:"𞺩";s:2:"ي";s:4:"𞺫";s:2:"ل";s:4:"𞺬";s:2:"م";s:4:"𞺭";s:2:"ن";s:4:"𞺮";s:2:"س";s:4:"𞺯";s:2:"ع";s:4:"𞺰";s:2:"ف";s:4:"𞺱";s:2:"ص";s:4:"𞺲";s:2:"ق";s:4:"𞺳";s:2:"ر";s:4:"𞺴";s:2:"ش";s:4:"𞺵";s:2:"ت";s:4:"𞺶";s:2:"ث";s:4:"𞺷";s:2:"خ";s:4:"𞺸";s:2:"ذ";s:4:"𞺹";s:2:"ض";s:4:"𞺺";s:2:"ظ";s:4:"𞺻";s:2:"غ";s:4:"🄀";s:2:"0.";s:4:"🄁";s:2:"0,";s:4:"🄂";s:2:"1,";s:4:"🄃";s:2:"2,";s:4:"🄄";s:2:"3,";s:4:"🄅";s:2:"4,";s:4:"🄆";s:2:"5,";s:4:"🄇";s:2:"6,";s:4:"🄈";s:2:"7,";s:4:"🄉";s:2:"8,";s:4:"🄊";s:2:"9,";s:4:"🄐";s:3:"(A)";s:4:"🄑";s:3:"(B)";s:4:"🄒";s:3:"(C)";s:4:"🄓";s:3:"(D)";s:4:"🄔";s:3:"(E)";s:4:"🄕";s:3:"(F)";s:4:"🄖";s:3:"(G)";s:4:"🄗";s:3:"(H)";s:4:"🄘";s:3:"(I)";s:4:"🄙";s:3:"(J)";s:4:"🄚";s:3:"(K)";s:4:"🄛";s:3:"(L)";s:4:"🄜";s:3:"(M)";s:4:"🄝";s:3:"(N)";s:4:"🄞";s:3:"(O)";s:4:"🄟";s:3:"(P)";s:4:"🄠";s:3:"(Q)";s:4:"🄡";s:3:"(R)";s:4:"🄢";s:3:"(S)";s:4:"🄣";s:3:"(T)";s:4:"🄤";s:3:"(U)";s:4:"🄥";s:3:"(V)";s:4:"🄦";s:3:"(W)";s:4:"🄧";s:3:"(X)";s:4:"🄨";s:3:"(Y)";s:4:"🄩";s:3:"(Z)";s:4:"🄪";s:7:"〔S〕";s:4:"🄫";s:1:"C";s:4:"🄬";s:1:"R";s:4:"🄭";s:2:"CD";s:4:"🄮";s:2:"WZ";s:4:"🄰";s:1:"A";s:4:"🄱";s:1:"B";s:4:"🄲";s:1:"C";s:4:"🄳";s:1:"D";s:4:"🄴";s:1:"E";s:4:"🄵";s:1:"F";s:4:"🄶";s:1:"G";s:4:"🄷";s:1:"H";s:4:"🄸";s:1:"I";s:4:"🄹";s:1:"J";s:4:"🄺";s:1:"K";s:4:"🄻";s:1:"L";s:4:"🄼";s:1:"M";s:4:"🄽";s:1:"N";s:4:"🄾";s:1:"O";s:4:"🄿";s:1:"P";s:4:"🅀";s:1:"Q";s:4:"🅁";s:1:"R";s:4:"🅂";s:1:"S";s:4:"🅃";s:1:"T";s:4:"🅄";s:1:"U";s:4:"🅅";s:1:"V";s:4:"🅆";s:1:"W";s:4:"🅇";s:1:"X";s:4:"🅈";s:1:"Y";s:4:"🅉";s:1:"Z";s:4:"🅊";s:2:"HV";s:4:"🅋";s:2:"MV";s:4:"🅌";s:2:"SD";s:4:"🅍";s:2:"SS";s:4:"🅎";s:3:"PPV";s:4:"🅏";s:2:"WC";s:4:"🅪";s:2:"MC";s:4:"🅫";s:2:"MD";s:4:"🆐";s:2:"DJ";s:4:"🈀";s:6:"ほか";s:4:"🈁";s:6:"ココ";s:4:"🈂";s:3:"サ";s:4:"🈐";s:3:"手";s:4:"🈑";s:3:"字";s:4:"🈒";s:3:"双";s:4:"🈓";s:6:"デ";s:4:"🈔";s:3:"二";s:4:"🈕";s:3:"多";s:4:"🈖";s:3:"解";s:4:"🈗";s:3:"天";s:4:"🈘";s:3:"交";s:4:"🈙";s:3:"映";s:4:"🈚";s:3:"無";s:4:"🈛";s:3:"料";s:4:"🈜";s:3:"前";s:4:"🈝";s:3:"後";s:4:"🈞";s:3:"再";s:4:"🈟";s:3:"新";s:4:"🈠";s:3:"初";s:4:"🈡";s:3:"終";s:4:"🈢";s:3:"生";s:4:"🈣";s:3:"販";s:4:"🈤";s:3:"声";s:4:"🈥";s:3:"吹";s:4:"🈦";s:3:"演";s:4:"🈧";s:3:"投";s:4:"🈨";s:3:"捕";s:4:"🈩";s:3:"一";s:4:"🈪";s:3:"三";s:4:"🈫";s:3:"遊";s:4:"🈬";s:3:"左";s:4:"🈭";s:3:"中";s:4:"🈮";s:3:"右";s:4:"🈯";s:3:"指";s:4:"🈰";s:3:"走";s:4:"🈱";s:3:"打";s:4:"🈲";s:3:"禁";s:4:"🈳";s:3:"空";s:4:"🈴";s:3:"合";s:4:"🈵";s:3:"満";s:4:"🈶";s:3:"有";s:4:"🈷";s:3:"月";s:4:"🈸";s:3:"申";s:4:"🈹";s:3:"割";s:4:"🈺";s:3:"営";s:4:"🉀";s:9:"〔本〕";s:4:"🉁";s:9:"〔三〕";s:4:"🉂";s:9:"〔二〕";s:4:"🉃";s:9:"〔安〕";s:4:"🉄";s:9:"〔点〕";s:4:"🉅";s:9:"〔打〕";s:4:"🉆";s:9:"〔盗〕";s:4:"🉇";s:9:"〔勝〕";s:4:"🉈";s:9:"〔敗〕";s:4:"🉐";s:3:"得";s:4:"🉑";s:3:"可";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/lowerCase.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/lowerCase.ser deleted file mode 100644 index bfe7c4a7..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/lowerCase.ser +++ /dev/null @@ -1 +0,0 @@ -a:1043:{s:1:"A";s:1:"a";s:1:"B";s:1:"b";s:1:"C";s:1:"c";s:1:"D";s:1:"d";s:1:"E";s:1:"e";s:1:"F";s:1:"f";s:1:"G";s:1:"g";s:1:"H";s:1:"h";s:1:"I";s:1:"i";s:1:"J";s:1:"j";s:1:"K";s:1:"k";s:1:"L";s:1:"l";s:1:"M";s:1:"m";s:1:"N";s:1:"n";s:1:"O";s:1:"o";s:1:"P";s:1:"p";s:1:"Q";s:1:"q";s:1:"R";s:1:"r";s:1:"S";s:1:"s";s:1:"T";s:1:"t";s:1:"U";s:1:"u";s:1:"V";s:1:"v";s:1:"W";s:1:"w";s:1:"X";s:1:"x";s:1:"Y";s:1:"y";s:1:"Z";s:1:"z";s:2:"À";s:2:"à";s:2:"Á";s:2:"á";s:2:"Â";s:2:"â";s:2:"Ã";s:2:"ã";s:2:"Ä";s:2:"ä";s:2:"Å";s:2:"å";s:2:"Æ";s:2:"æ";s:2:"Ç";s:2:"ç";s:2:"È";s:2:"è";s:2:"É";s:2:"é";s:2:"Ê";s:2:"ê";s:2:"Ë";s:2:"ë";s:2:"Ì";s:2:"ì";s:2:"Í";s:2:"í";s:2:"Î";s:2:"î";s:2:"Ï";s:2:"ï";s:2:"Ð";s:2:"ð";s:2:"Ñ";s:2:"ñ";s:2:"Ò";s:2:"ò";s:2:"Ó";s:2:"ó";s:2:"Ô";s:2:"ô";s:2:"Õ";s:2:"õ";s:2:"Ö";s:2:"ö";s:2:"Ø";s:2:"ø";s:2:"Ù";s:2:"ù";s:2:"Ú";s:2:"ú";s:2:"Û";s:2:"û";s:2:"Ü";s:2:"ü";s:2:"Ý";s:2:"ý";s:2:"Þ";s:2:"þ";s:2:"Ā";s:2:"ā";s:2:"Ă";s:2:"ă";s:2:"Ą";s:2:"ą";s:2:"Ć";s:2:"ć";s:2:"Ĉ";s:2:"ĉ";s:2:"Ċ";s:2:"ċ";s:2:"Č";s:2:"č";s:2:"Ď";s:2:"ď";s:2:"Đ";s:2:"đ";s:2:"Ē";s:2:"ē";s:2:"Ĕ";s:2:"ĕ";s:2:"Ė";s:2:"ė";s:2:"Ę";s:2:"ę";s:2:"Ě";s:2:"ě";s:2:"Ĝ";s:2:"ĝ";s:2:"Ğ";s:2:"ğ";s:2:"Ġ";s:2:"ġ";s:2:"Ģ";s:2:"ģ";s:2:"Ĥ";s:2:"ĥ";s:2:"Ħ";s:2:"ħ";s:2:"Ĩ";s:2:"ĩ";s:2:"Ī";s:2:"ī";s:2:"Ĭ";s:2:"ĭ";s:2:"Į";s:2:"į";s:2:"İ";s:1:"i";s:2:"IJ";s:2:"ij";s:2:"Ĵ";s:2:"ĵ";s:2:"Ķ";s:2:"ķ";s:2:"Ĺ";s:2:"ĺ";s:2:"Ļ";s:2:"ļ";s:2:"Ľ";s:2:"ľ";s:2:"Ŀ";s:2:"ŀ";s:2:"Ł";s:2:"ł";s:2:"Ń";s:2:"ń";s:2:"Ņ";s:2:"ņ";s:2:"Ň";s:2:"ň";s:2:"Ŋ";s:2:"ŋ";s:2:"Ō";s:2:"ō";s:2:"Ŏ";s:2:"ŏ";s:2:"Ő";s:2:"ő";s:2:"Œ";s:2:"œ";s:2:"Ŕ";s:2:"ŕ";s:2:"Ŗ";s:2:"ŗ";s:2:"Ř";s:2:"ř";s:2:"Ś";s:2:"ś";s:2:"Ŝ";s:2:"ŝ";s:2:"Ş";s:2:"ş";s:2:"Š";s:2:"š";s:2:"Ţ";s:2:"ţ";s:2:"Ť";s:2:"ť";s:2:"Ŧ";s:2:"ŧ";s:2:"Ũ";s:2:"ũ";s:2:"Ū";s:2:"ū";s:2:"Ŭ";s:2:"ŭ";s:2:"Ů";s:2:"ů";s:2:"Ű";s:2:"ű";s:2:"Ų";s:2:"ų";s:2:"Ŵ";s:2:"ŵ";s:2:"Ŷ";s:2:"ŷ";s:2:"Ÿ";s:2:"ÿ";s:2:"Ź";s:2:"ź";s:2:"Ż";s:2:"ż";s:2:"Ž";s:2:"ž";s:2:"Ɓ";s:2:"ɓ";s:2:"Ƃ";s:2:"ƃ";s:2:"Ƅ";s:2:"ƅ";s:2:"Ɔ";s:2:"ɔ";s:2:"Ƈ";s:2:"ƈ";s:2:"Ɖ";s:2:"ɖ";s:2:"Ɗ";s:2:"ɗ";s:2:"Ƌ";s:2:"ƌ";s:2:"Ǝ";s:2:"ǝ";s:2:"Ə";s:2:"ə";s:2:"Ɛ";s:2:"ɛ";s:2:"Ƒ";s:2:"ƒ";s:2:"Ɠ";s:2:"ɠ";s:2:"Ɣ";s:2:"ɣ";s:2:"Ɩ";s:2:"ɩ";s:2:"Ɨ";s:2:"ɨ";s:2:"Ƙ";s:2:"ƙ";s:2:"Ɯ";s:2:"ɯ";s:2:"Ɲ";s:2:"ɲ";s:2:"Ɵ";s:2:"ɵ";s:2:"Ơ";s:2:"ơ";s:2:"Ƣ";s:2:"ƣ";s:2:"Ƥ";s:2:"ƥ";s:2:"Ʀ";s:2:"ʀ";s:2:"Ƨ";s:2:"ƨ";s:2:"Ʃ";s:2:"ʃ";s:2:"Ƭ";s:2:"ƭ";s:2:"Ʈ";s:2:"ʈ";s:2:"Ư";s:2:"ư";s:2:"Ʊ";s:2:"ʊ";s:2:"Ʋ";s:2:"ʋ";s:2:"Ƴ";s:2:"ƴ";s:2:"Ƶ";s:2:"ƶ";s:2:"Ʒ";s:2:"ʒ";s:2:"Ƹ";s:2:"ƹ";s:2:"Ƽ";s:2:"ƽ";s:2:"DŽ";s:2:"dž";s:2:"Dž";s:2:"dž";s:2:"LJ";s:2:"lj";s:2:"Lj";s:2:"lj";s:2:"NJ";s:2:"nj";s:2:"Nj";s:2:"nj";s:2:"Ǎ";s:2:"ǎ";s:2:"Ǐ";s:2:"ǐ";s:2:"Ǒ";s:2:"ǒ";s:2:"Ǔ";s:2:"ǔ";s:2:"Ǖ";s:2:"ǖ";s:2:"Ǘ";s:2:"ǘ";s:2:"Ǚ";s:2:"ǚ";s:2:"Ǜ";s:2:"ǜ";s:2:"Ǟ";s:2:"ǟ";s:2:"Ǡ";s:2:"ǡ";s:2:"Ǣ";s:2:"ǣ";s:2:"Ǥ";s:2:"ǥ";s:2:"Ǧ";s:2:"ǧ";s:2:"Ǩ";s:2:"ǩ";s:2:"Ǫ";s:2:"ǫ";s:2:"Ǭ";s:2:"ǭ";s:2:"Ǯ";s:2:"ǯ";s:2:"DZ";s:2:"dz";s:2:"Dz";s:2:"dz";s:2:"Ǵ";s:2:"ǵ";s:2:"Ƕ";s:2:"ƕ";s:2:"Ƿ";s:2:"ƿ";s:2:"Ǹ";s:2:"ǹ";s:2:"Ǻ";s:2:"ǻ";s:2:"Ǽ";s:2:"ǽ";s:2:"Ǿ";s:2:"ǿ";s:2:"Ȁ";s:2:"ȁ";s:2:"Ȃ";s:2:"ȃ";s:2:"Ȅ";s:2:"ȅ";s:2:"Ȇ";s:2:"ȇ";s:2:"Ȉ";s:2:"ȉ";s:2:"Ȋ";s:2:"ȋ";s:2:"Ȍ";s:2:"ȍ";s:2:"Ȏ";s:2:"ȏ";s:2:"Ȑ";s:2:"ȑ";s:2:"Ȓ";s:2:"ȓ";s:2:"Ȕ";s:2:"ȕ";s:2:"Ȗ";s:2:"ȗ";s:2:"Ș";s:2:"ș";s:2:"Ț";s:2:"ț";s:2:"Ȝ";s:2:"ȝ";s:2:"Ȟ";s:2:"ȟ";s:2:"Ƞ";s:2:"ƞ";s:2:"Ȣ";s:2:"ȣ";s:2:"Ȥ";s:2:"ȥ";s:2:"Ȧ";s:2:"ȧ";s:2:"Ȩ";s:2:"ȩ";s:2:"Ȫ";s:2:"ȫ";s:2:"Ȭ";s:2:"ȭ";s:2:"Ȯ";s:2:"ȯ";s:2:"Ȱ";s:2:"ȱ";s:2:"Ȳ";s:2:"ȳ";s:2:"Ⱥ";s:3:"ⱥ";s:2:"Ȼ";s:2:"ȼ";s:2:"Ƚ";s:2:"ƚ";s:2:"Ⱦ";s:3:"ⱦ";s:2:"Ɂ";s:2:"ɂ";s:2:"Ƀ";s:2:"ƀ";s:2:"Ʉ";s:2:"ʉ";s:2:"Ʌ";s:2:"ʌ";s:2:"Ɇ";s:2:"ɇ";s:2:"Ɉ";s:2:"ɉ";s:2:"Ɋ";s:2:"ɋ";s:2:"Ɍ";s:2:"ɍ";s:2:"Ɏ";s:2:"ɏ";s:2:"Ͱ";s:2:"ͱ";s:2:"Ͳ";s:2:"ͳ";s:2:"Ͷ";s:2:"ͷ";s:2:"Ά";s:2:"ά";s:2:"Έ";s:2:"έ";s:2:"Ή";s:2:"ή";s:2:"Ί";s:2:"ί";s:2:"Ό";s:2:"ό";s:2:"Ύ";s:2:"ύ";s:2:"Ώ";s:2:"ώ";s:2:"Α";s:2:"α";s:2:"Β";s:2:"β";s:2:"Γ";s:2:"γ";s:2:"Δ";s:2:"δ";s:2:"Ε";s:2:"ε";s:2:"Ζ";s:2:"ζ";s:2:"Η";s:2:"η";s:2:"Θ";s:2:"θ";s:2:"Ι";s:2:"ι";s:2:"Κ";s:2:"κ";s:2:"Λ";s:2:"λ";s:2:"Μ";s:2:"μ";s:2:"Ν";s:2:"ν";s:2:"Ξ";s:2:"ξ";s:2:"Ο";s:2:"ο";s:2:"Π";s:2:"π";s:2:"Ρ";s:2:"ρ";s:2:"Σ";s:2:"σ";s:2:"Τ";s:2:"τ";s:2:"Υ";s:2:"υ";s:2:"Φ";s:2:"φ";s:2:"Χ";s:2:"χ";s:2:"Ψ";s:2:"ψ";s:2:"Ω";s:2:"ω";s:2:"Ϊ";s:2:"ϊ";s:2:"Ϋ";s:2:"ϋ";s:2:"Ϗ";s:2:"ϗ";s:2:"Ϙ";s:2:"ϙ";s:2:"Ϛ";s:2:"ϛ";s:2:"Ϝ";s:2:"ϝ";s:2:"Ϟ";s:2:"ϟ";s:2:"Ϡ";s:2:"ϡ";s:2:"Ϣ";s:2:"ϣ";s:2:"Ϥ";s:2:"ϥ";s:2:"Ϧ";s:2:"ϧ";s:2:"Ϩ";s:2:"ϩ";s:2:"Ϫ";s:2:"ϫ";s:2:"Ϭ";s:2:"ϭ";s:2:"Ϯ";s:2:"ϯ";s:2:"ϴ";s:2:"θ";s:2:"Ϸ";s:2:"ϸ";s:2:"Ϲ";s:2:"ϲ";s:2:"Ϻ";s:2:"ϻ";s:2:"Ͻ";s:2:"ͻ";s:2:"Ͼ";s:2:"ͼ";s:2:"Ͽ";s:2:"ͽ";s:2:"Ѐ";s:2:"ѐ";s:2:"Ё";s:2:"ё";s:2:"Ђ";s:2:"ђ";s:2:"Ѓ";s:2:"ѓ";s:2:"Є";s:2:"є";s:2:"Ѕ";s:2:"ѕ";s:2:"І";s:2:"і";s:2:"Ї";s:2:"ї";s:2:"Ј";s:2:"ј";s:2:"Љ";s:2:"љ";s:2:"Њ";s:2:"њ";s:2:"Ћ";s:2:"ћ";s:2:"Ќ";s:2:"ќ";s:2:"Ѝ";s:2:"ѝ";s:2:"Ў";s:2:"ў";s:2:"Џ";s:2:"џ";s:2:"А";s:2:"а";s:2:"Б";s:2:"б";s:2:"В";s:2:"в";s:2:"Г";s:2:"г";s:2:"Д";s:2:"д";s:2:"Е";s:2:"е";s:2:"Ж";s:2:"ж";s:2:"З";s:2:"з";s:2:"И";s:2:"и";s:2:"Й";s:2:"й";s:2:"К";s:2:"к";s:2:"Л";s:2:"л";s:2:"М";s:2:"м";s:2:"Н";s:2:"н";s:2:"О";s:2:"о";s:2:"П";s:2:"п";s:2:"Р";s:2:"р";s:2:"С";s:2:"с";s:2:"Т";s:2:"т";s:2:"У";s:2:"у";s:2:"Ф";s:2:"ф";s:2:"Х";s:2:"х";s:2:"Ц";s:2:"ц";s:2:"Ч";s:2:"ч";s:2:"Ш";s:2:"ш";s:2:"Щ";s:2:"щ";s:2:"Ъ";s:2:"ъ";s:2:"Ы";s:2:"ы";s:2:"Ь";s:2:"ь";s:2:"Э";s:2:"э";s:2:"Ю";s:2:"ю";s:2:"Я";s:2:"я";s:2:"Ѡ";s:2:"ѡ";s:2:"Ѣ";s:2:"ѣ";s:2:"Ѥ";s:2:"ѥ";s:2:"Ѧ";s:2:"ѧ";s:2:"Ѩ";s:2:"ѩ";s:2:"Ѫ";s:2:"ѫ";s:2:"Ѭ";s:2:"ѭ";s:2:"Ѯ";s:2:"ѯ";s:2:"Ѱ";s:2:"ѱ";s:2:"Ѳ";s:2:"ѳ";s:2:"Ѵ";s:2:"ѵ";s:2:"Ѷ";s:2:"ѷ";s:2:"Ѹ";s:2:"ѹ";s:2:"Ѻ";s:2:"ѻ";s:2:"Ѽ";s:2:"ѽ";s:2:"Ѿ";s:2:"ѿ";s:2:"Ҁ";s:2:"ҁ";s:2:"Ҋ";s:2:"ҋ";s:2:"Ҍ";s:2:"ҍ";s:2:"Ҏ";s:2:"ҏ";s:2:"Ґ";s:2:"ґ";s:2:"Ғ";s:2:"ғ";s:2:"Ҕ";s:2:"ҕ";s:2:"Җ";s:2:"җ";s:2:"Ҙ";s:2:"ҙ";s:2:"Қ";s:2:"қ";s:2:"Ҝ";s:2:"ҝ";s:2:"Ҟ";s:2:"ҟ";s:2:"Ҡ";s:2:"ҡ";s:2:"Ң";s:2:"ң";s:2:"Ҥ";s:2:"ҥ";s:2:"Ҧ";s:2:"ҧ";s:2:"Ҩ";s:2:"ҩ";s:2:"Ҫ";s:2:"ҫ";s:2:"Ҭ";s:2:"ҭ";s:2:"Ү";s:2:"ү";s:2:"Ұ";s:2:"ұ";s:2:"Ҳ";s:2:"ҳ";s:2:"Ҵ";s:2:"ҵ";s:2:"Ҷ";s:2:"ҷ";s:2:"Ҹ";s:2:"ҹ";s:2:"Һ";s:2:"һ";s:2:"Ҽ";s:2:"ҽ";s:2:"Ҿ";s:2:"ҿ";s:2:"Ӏ";s:2:"ӏ";s:2:"Ӂ";s:2:"ӂ";s:2:"Ӄ";s:2:"ӄ";s:2:"Ӆ";s:2:"ӆ";s:2:"Ӈ";s:2:"ӈ";s:2:"Ӊ";s:2:"ӊ";s:2:"Ӌ";s:2:"ӌ";s:2:"Ӎ";s:2:"ӎ";s:2:"Ӑ";s:2:"ӑ";s:2:"Ӓ";s:2:"ӓ";s:2:"Ӕ";s:2:"ӕ";s:2:"Ӗ";s:2:"ӗ";s:2:"Ә";s:2:"ә";s:2:"Ӛ";s:2:"ӛ";s:2:"Ӝ";s:2:"ӝ";s:2:"Ӟ";s:2:"ӟ";s:2:"Ӡ";s:2:"ӡ";s:2:"Ӣ";s:2:"ӣ";s:2:"Ӥ";s:2:"ӥ";s:2:"Ӧ";s:2:"ӧ";s:2:"Ө";s:2:"ө";s:2:"Ӫ";s:2:"ӫ";s:2:"Ӭ";s:2:"ӭ";s:2:"Ӯ";s:2:"ӯ";s:2:"Ӱ";s:2:"ӱ";s:2:"Ӳ";s:2:"ӳ";s:2:"Ӵ";s:2:"ӵ";s:2:"Ӷ";s:2:"ӷ";s:2:"Ӹ";s:2:"ӹ";s:2:"Ӻ";s:2:"ӻ";s:2:"Ӽ";s:2:"ӽ";s:2:"Ӿ";s:2:"ӿ";s:2:"Ԁ";s:2:"ԁ";s:2:"Ԃ";s:2:"ԃ";s:2:"Ԅ";s:2:"ԅ";s:2:"Ԇ";s:2:"ԇ";s:2:"Ԉ";s:2:"ԉ";s:2:"Ԋ";s:2:"ԋ";s:2:"Ԍ";s:2:"ԍ";s:2:"Ԏ";s:2:"ԏ";s:2:"Ԑ";s:2:"ԑ";s:2:"Ԓ";s:2:"ԓ";s:2:"Ԕ";s:2:"ԕ";s:2:"Ԗ";s:2:"ԗ";s:2:"Ԙ";s:2:"ԙ";s:2:"Ԛ";s:2:"ԛ";s:2:"Ԝ";s:2:"ԝ";s:2:"Ԟ";s:2:"ԟ";s:2:"Ԡ";s:2:"ԡ";s:2:"Ԣ";s:2:"ԣ";s:2:"Ԥ";s:2:"ԥ";s:2:"Ԧ";s:2:"ԧ";s:2:"Ա";s:2:"ա";s:2:"Բ";s:2:"բ";s:2:"Գ";s:2:"գ";s:2:"Դ";s:2:"դ";s:2:"Ե";s:2:"ե";s:2:"Զ";s:2:"զ";s:2:"Է";s:2:"է";s:2:"Ը";s:2:"ը";s:2:"Թ";s:2:"թ";s:2:"Ժ";s:2:"ժ";s:2:"Ի";s:2:"ի";s:2:"Լ";s:2:"լ";s:2:"Խ";s:2:"խ";s:2:"Ծ";s:2:"ծ";s:2:"Կ";s:2:"կ";s:2:"Հ";s:2:"հ";s:2:"Ձ";s:2:"ձ";s:2:"Ղ";s:2:"ղ";s:2:"Ճ";s:2:"ճ";s:2:"Մ";s:2:"մ";s:2:"Յ";s:2:"յ";s:2:"Ն";s:2:"ն";s:2:"Շ";s:2:"շ";s:2:"Ո";s:2:"ո";s:2:"Չ";s:2:"չ";s:2:"Պ";s:2:"պ";s:2:"Ջ";s:2:"ջ";s:2:"Ռ";s:2:"ռ";s:2:"Ս";s:2:"ս";s:2:"Վ";s:2:"վ";s:2:"Տ";s:2:"տ";s:2:"Ր";s:2:"ր";s:2:"Ց";s:2:"ց";s:2:"Ւ";s:2:"ւ";s:2:"Փ";s:2:"փ";s:2:"Ք";s:2:"ք";s:2:"Օ";s:2:"օ";s:2:"Ֆ";s:2:"ֆ";s:3:"Ⴀ";s:3:"ⴀ";s:3:"Ⴁ";s:3:"ⴁ";s:3:"Ⴂ";s:3:"ⴂ";s:3:"Ⴃ";s:3:"ⴃ";s:3:"Ⴄ";s:3:"ⴄ";s:3:"Ⴅ";s:3:"ⴅ";s:3:"Ⴆ";s:3:"ⴆ";s:3:"Ⴇ";s:3:"ⴇ";s:3:"Ⴈ";s:3:"ⴈ";s:3:"Ⴉ";s:3:"ⴉ";s:3:"Ⴊ";s:3:"ⴊ";s:3:"Ⴋ";s:3:"ⴋ";s:3:"Ⴌ";s:3:"ⴌ";s:3:"Ⴍ";s:3:"ⴍ";s:3:"Ⴎ";s:3:"ⴎ";s:3:"Ⴏ";s:3:"ⴏ";s:3:"Ⴐ";s:3:"ⴐ";s:3:"Ⴑ";s:3:"ⴑ";s:3:"Ⴒ";s:3:"ⴒ";s:3:"Ⴓ";s:3:"ⴓ";s:3:"Ⴔ";s:3:"ⴔ";s:3:"Ⴕ";s:3:"ⴕ";s:3:"Ⴖ";s:3:"ⴖ";s:3:"Ⴗ";s:3:"ⴗ";s:3:"Ⴘ";s:3:"ⴘ";s:3:"Ⴙ";s:3:"ⴙ";s:3:"Ⴚ";s:3:"ⴚ";s:3:"Ⴛ";s:3:"ⴛ";s:3:"Ⴜ";s:3:"ⴜ";s:3:"Ⴝ";s:3:"ⴝ";s:3:"Ⴞ";s:3:"ⴞ";s:3:"Ⴟ";s:3:"ⴟ";s:3:"Ⴠ";s:3:"ⴠ";s:3:"Ⴡ";s:3:"ⴡ";s:3:"Ⴢ";s:3:"ⴢ";s:3:"Ⴣ";s:3:"ⴣ";s:3:"Ⴤ";s:3:"ⴤ";s:3:"Ⴥ";s:3:"ⴥ";s:3:"Ⴧ";s:3:"ⴧ";s:3:"Ⴭ";s:3:"ⴭ";s:3:"Ḁ";s:3:"ḁ";s:3:"Ḃ";s:3:"ḃ";s:3:"Ḅ";s:3:"ḅ";s:3:"Ḇ";s:3:"ḇ";s:3:"Ḉ";s:3:"ḉ";s:3:"Ḋ";s:3:"ḋ";s:3:"Ḍ";s:3:"ḍ";s:3:"Ḏ";s:3:"ḏ";s:3:"Ḑ";s:3:"ḑ";s:3:"Ḓ";s:3:"ḓ";s:3:"Ḕ";s:3:"ḕ";s:3:"Ḗ";s:3:"ḗ";s:3:"Ḙ";s:3:"ḙ";s:3:"Ḛ";s:3:"ḛ";s:3:"Ḝ";s:3:"ḝ";s:3:"Ḟ";s:3:"ḟ";s:3:"Ḡ";s:3:"ḡ";s:3:"Ḣ";s:3:"ḣ";s:3:"Ḥ";s:3:"ḥ";s:3:"Ḧ";s:3:"ḧ";s:3:"Ḩ";s:3:"ḩ";s:3:"Ḫ";s:3:"ḫ";s:3:"Ḭ";s:3:"ḭ";s:3:"Ḯ";s:3:"ḯ";s:3:"Ḱ";s:3:"ḱ";s:3:"Ḳ";s:3:"ḳ";s:3:"Ḵ";s:3:"ḵ";s:3:"Ḷ";s:3:"ḷ";s:3:"Ḹ";s:3:"ḹ";s:3:"Ḻ";s:3:"ḻ";s:3:"Ḽ";s:3:"ḽ";s:3:"Ḿ";s:3:"ḿ";s:3:"Ṁ";s:3:"ṁ";s:3:"Ṃ";s:3:"ṃ";s:3:"Ṅ";s:3:"ṅ";s:3:"Ṇ";s:3:"ṇ";s:3:"Ṉ";s:3:"ṉ";s:3:"Ṋ";s:3:"ṋ";s:3:"Ṍ";s:3:"ṍ";s:3:"Ṏ";s:3:"ṏ";s:3:"Ṑ";s:3:"ṑ";s:3:"Ṓ";s:3:"ṓ";s:3:"Ṕ";s:3:"ṕ";s:3:"Ṗ";s:3:"ṗ";s:3:"Ṙ";s:3:"ṙ";s:3:"Ṛ";s:3:"ṛ";s:3:"Ṝ";s:3:"ṝ";s:3:"Ṟ";s:3:"ṟ";s:3:"Ṡ";s:3:"ṡ";s:3:"Ṣ";s:3:"ṣ";s:3:"Ṥ";s:3:"ṥ";s:3:"Ṧ";s:3:"ṧ";s:3:"Ṩ";s:3:"ṩ";s:3:"Ṫ";s:3:"ṫ";s:3:"Ṭ";s:3:"ṭ";s:3:"Ṯ";s:3:"ṯ";s:3:"Ṱ";s:3:"ṱ";s:3:"Ṳ";s:3:"ṳ";s:3:"Ṵ";s:3:"ṵ";s:3:"Ṷ";s:3:"ṷ";s:3:"Ṹ";s:3:"ṹ";s:3:"Ṻ";s:3:"ṻ";s:3:"Ṽ";s:3:"ṽ";s:3:"Ṿ";s:3:"ṿ";s:3:"Ẁ";s:3:"ẁ";s:3:"Ẃ";s:3:"ẃ";s:3:"Ẅ";s:3:"ẅ";s:3:"Ẇ";s:3:"ẇ";s:3:"Ẉ";s:3:"ẉ";s:3:"Ẋ";s:3:"ẋ";s:3:"Ẍ";s:3:"ẍ";s:3:"Ẏ";s:3:"ẏ";s:3:"Ẑ";s:3:"ẑ";s:3:"Ẓ";s:3:"ẓ";s:3:"Ẕ";s:3:"ẕ";s:3:"ẞ";s:2:"ß";s:3:"Ạ";s:3:"ạ";s:3:"Ả";s:3:"ả";s:3:"Ấ";s:3:"ấ";s:3:"Ầ";s:3:"ầ";s:3:"Ẩ";s:3:"ẩ";s:3:"Ẫ";s:3:"ẫ";s:3:"Ậ";s:3:"ậ";s:3:"Ắ";s:3:"ắ";s:3:"Ằ";s:3:"ằ";s:3:"Ẳ";s:3:"ẳ";s:3:"Ẵ";s:3:"ẵ";s:3:"Ặ";s:3:"ặ";s:3:"Ẹ";s:3:"ẹ";s:3:"Ẻ";s:3:"ẻ";s:3:"Ẽ";s:3:"ẽ";s:3:"Ế";s:3:"ế";s:3:"Ề";s:3:"ề";s:3:"Ể";s:3:"ể";s:3:"Ễ";s:3:"ễ";s:3:"Ệ";s:3:"ệ";s:3:"Ỉ";s:3:"ỉ";s:3:"Ị";s:3:"ị";s:3:"Ọ";s:3:"ọ";s:3:"Ỏ";s:3:"ỏ";s:3:"Ố";s:3:"ố";s:3:"Ồ";s:3:"ồ";s:3:"Ổ";s:3:"ổ";s:3:"Ỗ";s:3:"ỗ";s:3:"Ộ";s:3:"ộ";s:3:"Ớ";s:3:"ớ";s:3:"Ờ";s:3:"ờ";s:3:"Ở";s:3:"ở";s:3:"Ỡ";s:3:"ỡ";s:3:"Ợ";s:3:"ợ";s:3:"Ụ";s:3:"ụ";s:3:"Ủ";s:3:"ủ";s:3:"Ứ";s:3:"ứ";s:3:"Ừ";s:3:"ừ";s:3:"Ử";s:3:"ử";s:3:"Ữ";s:3:"ữ";s:3:"Ự";s:3:"ự";s:3:"Ỳ";s:3:"ỳ";s:3:"Ỵ";s:3:"ỵ";s:3:"Ỷ";s:3:"ỷ";s:3:"Ỹ";s:3:"ỹ";s:3:"Ỻ";s:3:"ỻ";s:3:"Ỽ";s:3:"ỽ";s:3:"Ỿ";s:3:"ỿ";s:3:"Ἀ";s:3:"ἀ";s:3:"Ἁ";s:3:"ἁ";s:3:"Ἂ";s:3:"ἂ";s:3:"Ἃ";s:3:"ἃ";s:3:"Ἄ";s:3:"ἄ";s:3:"Ἅ";s:3:"ἅ";s:3:"Ἆ";s:3:"ἆ";s:3:"Ἇ";s:3:"ἇ";s:3:"Ἐ";s:3:"ἐ";s:3:"Ἑ";s:3:"ἑ";s:3:"Ἒ";s:3:"ἒ";s:3:"Ἓ";s:3:"ἓ";s:3:"Ἔ";s:3:"ἔ";s:3:"Ἕ";s:3:"ἕ";s:3:"Ἠ";s:3:"ἠ";s:3:"Ἡ";s:3:"ἡ";s:3:"Ἢ";s:3:"ἢ";s:3:"Ἣ";s:3:"ἣ";s:3:"Ἤ";s:3:"ἤ";s:3:"Ἥ";s:3:"ἥ";s:3:"Ἦ";s:3:"ἦ";s:3:"Ἧ";s:3:"ἧ";s:3:"Ἰ";s:3:"ἰ";s:3:"Ἱ";s:3:"ἱ";s:3:"Ἲ";s:3:"ἲ";s:3:"Ἳ";s:3:"ἳ";s:3:"Ἴ";s:3:"ἴ";s:3:"Ἵ";s:3:"ἵ";s:3:"Ἶ";s:3:"ἶ";s:3:"Ἷ";s:3:"ἷ";s:3:"Ὀ";s:3:"ὀ";s:3:"Ὁ";s:3:"ὁ";s:3:"Ὂ";s:3:"ὂ";s:3:"Ὃ";s:3:"ὃ";s:3:"Ὄ";s:3:"ὄ";s:3:"Ὅ";s:3:"ὅ";s:3:"Ὑ";s:3:"ὑ";s:3:"Ὓ";s:3:"ὓ";s:3:"Ὕ";s:3:"ὕ";s:3:"Ὗ";s:3:"ὗ";s:3:"Ὠ";s:3:"ὠ";s:3:"Ὡ";s:3:"ὡ";s:3:"Ὢ";s:3:"ὢ";s:3:"Ὣ";s:3:"ὣ";s:3:"Ὤ";s:3:"ὤ";s:3:"Ὥ";s:3:"ὥ";s:3:"Ὦ";s:3:"ὦ";s:3:"Ὧ";s:3:"ὧ";s:3:"ᾈ";s:3:"ᾀ";s:3:"ᾉ";s:3:"ᾁ";s:3:"ᾊ";s:3:"ᾂ";s:3:"ᾋ";s:3:"ᾃ";s:3:"ᾌ";s:3:"ᾄ";s:3:"ᾍ";s:3:"ᾅ";s:3:"ᾎ";s:3:"ᾆ";s:3:"ᾏ";s:3:"ᾇ";s:3:"ᾘ";s:3:"ᾐ";s:3:"ᾙ";s:3:"ᾑ";s:3:"ᾚ";s:3:"ᾒ";s:3:"ᾛ";s:3:"ᾓ";s:3:"ᾜ";s:3:"ᾔ";s:3:"ᾝ";s:3:"ᾕ";s:3:"ᾞ";s:3:"ᾖ";s:3:"ᾟ";s:3:"ᾗ";s:3:"ᾨ";s:3:"ᾠ";s:3:"ᾩ";s:3:"ᾡ";s:3:"ᾪ";s:3:"ᾢ";s:3:"ᾫ";s:3:"ᾣ";s:3:"ᾬ";s:3:"ᾤ";s:3:"ᾭ";s:3:"ᾥ";s:3:"ᾮ";s:3:"ᾦ";s:3:"ᾯ";s:3:"ᾧ";s:3:"Ᾰ";s:3:"ᾰ";s:3:"Ᾱ";s:3:"ᾱ";s:3:"Ὰ";s:3:"ὰ";s:3:"Ά";s:3:"ά";s:3:"ᾼ";s:3:"ᾳ";s:3:"Ὲ";s:3:"ὲ";s:3:"Έ";s:3:"έ";s:3:"Ὴ";s:3:"ὴ";s:3:"Ή";s:3:"ή";s:3:"ῌ";s:3:"ῃ";s:3:"Ῐ";s:3:"ῐ";s:3:"Ῑ";s:3:"ῑ";s:3:"Ὶ";s:3:"ὶ";s:3:"Ί";s:3:"ί";s:3:"Ῠ";s:3:"ῠ";s:3:"Ῡ";s:3:"ῡ";s:3:"Ὺ";s:3:"ὺ";s:3:"Ύ";s:3:"ύ";s:3:"Ῥ";s:3:"ῥ";s:3:"Ὸ";s:3:"ὸ";s:3:"Ό";s:3:"ό";s:3:"Ὼ";s:3:"ὼ";s:3:"Ώ";s:3:"ώ";s:3:"ῼ";s:3:"ῳ";s:3:"Ω";s:2:"ω";s:3:"K";s:1:"k";s:3:"Å";s:2:"å";s:3:"Ⅎ";s:3:"ⅎ";s:3:"Ⅰ";s:3:"ⅰ";s:3:"Ⅱ";s:3:"ⅱ";s:3:"Ⅲ";s:3:"ⅲ";s:3:"Ⅳ";s:3:"ⅳ";s:3:"Ⅴ";s:3:"ⅴ";s:3:"Ⅵ";s:3:"ⅵ";s:3:"Ⅶ";s:3:"ⅶ";s:3:"Ⅷ";s:3:"ⅷ";s:3:"Ⅸ";s:3:"ⅸ";s:3:"Ⅹ";s:3:"ⅹ";s:3:"Ⅺ";s:3:"ⅺ";s:3:"Ⅻ";s:3:"ⅻ";s:3:"Ⅼ";s:3:"ⅼ";s:3:"Ⅽ";s:3:"ⅽ";s:3:"Ⅾ";s:3:"ⅾ";s:3:"Ⅿ";s:3:"ⅿ";s:3:"Ↄ";s:3:"ↄ";s:3:"Ⓐ";s:3:"ⓐ";s:3:"Ⓑ";s:3:"ⓑ";s:3:"Ⓒ";s:3:"ⓒ";s:3:"Ⓓ";s:3:"ⓓ";s:3:"Ⓔ";s:3:"ⓔ";s:3:"Ⓕ";s:3:"ⓕ";s:3:"Ⓖ";s:3:"ⓖ";s:3:"Ⓗ";s:3:"ⓗ";s:3:"Ⓘ";s:3:"ⓘ";s:3:"Ⓙ";s:3:"ⓙ";s:3:"Ⓚ";s:3:"ⓚ";s:3:"Ⓛ";s:3:"ⓛ";s:3:"Ⓜ";s:3:"ⓜ";s:3:"Ⓝ";s:3:"ⓝ";s:3:"Ⓞ";s:3:"ⓞ";s:3:"Ⓟ";s:3:"ⓟ";s:3:"Ⓠ";s:3:"ⓠ";s:3:"Ⓡ";s:3:"ⓡ";s:3:"Ⓢ";s:3:"ⓢ";s:3:"Ⓣ";s:3:"ⓣ";s:3:"Ⓤ";s:3:"ⓤ";s:3:"Ⓥ";s:3:"ⓥ";s:3:"Ⓦ";s:3:"ⓦ";s:3:"Ⓧ";s:3:"ⓧ";s:3:"Ⓨ";s:3:"ⓨ";s:3:"Ⓩ";s:3:"ⓩ";s:3:"Ⰰ";s:3:"ⰰ";s:3:"Ⰱ";s:3:"ⰱ";s:3:"Ⰲ";s:3:"ⰲ";s:3:"Ⰳ";s:3:"ⰳ";s:3:"Ⰴ";s:3:"ⰴ";s:3:"Ⰵ";s:3:"ⰵ";s:3:"Ⰶ";s:3:"ⰶ";s:3:"Ⰷ";s:3:"ⰷ";s:3:"Ⰸ";s:3:"ⰸ";s:3:"Ⰹ";s:3:"ⰹ";s:3:"Ⰺ";s:3:"ⰺ";s:3:"Ⰻ";s:3:"ⰻ";s:3:"Ⰼ";s:3:"ⰼ";s:3:"Ⰽ";s:3:"ⰽ";s:3:"Ⰾ";s:3:"ⰾ";s:3:"Ⰿ";s:3:"ⰿ";s:3:"Ⱀ";s:3:"ⱀ";s:3:"Ⱁ";s:3:"ⱁ";s:3:"Ⱂ";s:3:"ⱂ";s:3:"Ⱃ";s:3:"ⱃ";s:3:"Ⱄ";s:3:"ⱄ";s:3:"Ⱅ";s:3:"ⱅ";s:3:"Ⱆ";s:3:"ⱆ";s:3:"Ⱇ";s:3:"ⱇ";s:3:"Ⱈ";s:3:"ⱈ";s:3:"Ⱉ";s:3:"ⱉ";s:3:"Ⱊ";s:3:"ⱊ";s:3:"Ⱋ";s:3:"ⱋ";s:3:"Ⱌ";s:3:"ⱌ";s:3:"Ⱍ";s:3:"ⱍ";s:3:"Ⱎ";s:3:"ⱎ";s:3:"Ⱏ";s:3:"ⱏ";s:3:"Ⱐ";s:3:"ⱐ";s:3:"Ⱑ";s:3:"ⱑ";s:3:"Ⱒ";s:3:"ⱒ";s:3:"Ⱓ";s:3:"ⱓ";s:3:"Ⱔ";s:3:"ⱔ";s:3:"Ⱕ";s:3:"ⱕ";s:3:"Ⱖ";s:3:"ⱖ";s:3:"Ⱗ";s:3:"ⱗ";s:3:"Ⱘ";s:3:"ⱘ";s:3:"Ⱙ";s:3:"ⱙ";s:3:"Ⱚ";s:3:"ⱚ";s:3:"Ⱛ";s:3:"ⱛ";s:3:"Ⱜ";s:3:"ⱜ";s:3:"Ⱝ";s:3:"ⱝ";s:3:"Ⱞ";s:3:"ⱞ";s:3:"Ⱡ";s:3:"ⱡ";s:3:"Ɫ";s:2:"ɫ";s:3:"Ᵽ";s:3:"ᵽ";s:3:"Ɽ";s:2:"ɽ";s:3:"Ⱨ";s:3:"ⱨ";s:3:"Ⱪ";s:3:"ⱪ";s:3:"Ⱬ";s:3:"ⱬ";s:3:"Ɑ";s:2:"ɑ";s:3:"Ɱ";s:2:"ɱ";s:3:"Ɐ";s:2:"ɐ";s:3:"Ɒ";s:2:"ɒ";s:3:"Ⱳ";s:3:"ⱳ";s:3:"Ⱶ";s:3:"ⱶ";s:3:"Ȿ";s:2:"ȿ";s:3:"Ɀ";s:2:"ɀ";s:3:"Ⲁ";s:3:"ⲁ";s:3:"Ⲃ";s:3:"ⲃ";s:3:"Ⲅ";s:3:"ⲅ";s:3:"Ⲇ";s:3:"ⲇ";s:3:"Ⲉ";s:3:"ⲉ";s:3:"Ⲋ";s:3:"ⲋ";s:3:"Ⲍ";s:3:"ⲍ";s:3:"Ⲏ";s:3:"ⲏ";s:3:"Ⲑ";s:3:"ⲑ";s:3:"Ⲓ";s:3:"ⲓ";s:3:"Ⲕ";s:3:"ⲕ";s:3:"Ⲗ";s:3:"ⲗ";s:3:"Ⲙ";s:3:"ⲙ";s:3:"Ⲛ";s:3:"ⲛ";s:3:"Ⲝ";s:3:"ⲝ";s:3:"Ⲟ";s:3:"ⲟ";s:3:"Ⲡ";s:3:"ⲡ";s:3:"Ⲣ";s:3:"ⲣ";s:3:"Ⲥ";s:3:"ⲥ";s:3:"Ⲧ";s:3:"ⲧ";s:3:"Ⲩ";s:3:"ⲩ";s:3:"Ⲫ";s:3:"ⲫ";s:3:"Ⲭ";s:3:"ⲭ";s:3:"Ⲯ";s:3:"ⲯ";s:3:"Ⲱ";s:3:"ⲱ";s:3:"Ⲳ";s:3:"ⲳ";s:3:"Ⲵ";s:3:"ⲵ";s:3:"Ⲷ";s:3:"ⲷ";s:3:"Ⲹ";s:3:"ⲹ";s:3:"Ⲻ";s:3:"ⲻ";s:3:"Ⲽ";s:3:"ⲽ";s:3:"Ⲿ";s:3:"ⲿ";s:3:"Ⳁ";s:3:"ⳁ";s:3:"Ⳃ";s:3:"ⳃ";s:3:"Ⳅ";s:3:"ⳅ";s:3:"Ⳇ";s:3:"ⳇ";s:3:"Ⳉ";s:3:"ⳉ";s:3:"Ⳋ";s:3:"ⳋ";s:3:"Ⳍ";s:3:"ⳍ";s:3:"Ⳏ";s:3:"ⳏ";s:3:"Ⳑ";s:3:"ⳑ";s:3:"Ⳓ";s:3:"ⳓ";s:3:"Ⳕ";s:3:"ⳕ";s:3:"Ⳗ";s:3:"ⳗ";s:3:"Ⳙ";s:3:"ⳙ";s:3:"Ⳛ";s:3:"ⳛ";s:3:"Ⳝ";s:3:"ⳝ";s:3:"Ⳟ";s:3:"ⳟ";s:3:"Ⳡ";s:3:"ⳡ";s:3:"Ⳣ";s:3:"ⳣ";s:3:"Ⳬ";s:3:"ⳬ";s:3:"Ⳮ";s:3:"ⳮ";s:3:"Ⳳ";s:3:"ⳳ";s:3:"Ꙁ";s:3:"ꙁ";s:3:"Ꙃ";s:3:"ꙃ";s:3:"Ꙅ";s:3:"ꙅ";s:3:"Ꙇ";s:3:"ꙇ";s:3:"Ꙉ";s:3:"ꙉ";s:3:"Ꙋ";s:3:"ꙋ";s:3:"Ꙍ";s:3:"ꙍ";s:3:"Ꙏ";s:3:"ꙏ";s:3:"Ꙑ";s:3:"ꙑ";s:3:"Ꙓ";s:3:"ꙓ";s:3:"Ꙕ";s:3:"ꙕ";s:3:"Ꙗ";s:3:"ꙗ";s:3:"Ꙙ";s:3:"ꙙ";s:3:"Ꙛ";s:3:"ꙛ";s:3:"Ꙝ";s:3:"ꙝ";s:3:"Ꙟ";s:3:"ꙟ";s:3:"Ꙡ";s:3:"ꙡ";s:3:"Ꙣ";s:3:"ꙣ";s:3:"Ꙥ";s:3:"ꙥ";s:3:"Ꙧ";s:3:"ꙧ";s:3:"Ꙩ";s:3:"ꙩ";s:3:"Ꙫ";s:3:"ꙫ";s:3:"Ꙭ";s:3:"ꙭ";s:3:"Ꚁ";s:3:"ꚁ";s:3:"Ꚃ";s:3:"ꚃ";s:3:"Ꚅ";s:3:"ꚅ";s:3:"Ꚇ";s:3:"ꚇ";s:3:"Ꚉ";s:3:"ꚉ";s:3:"Ꚋ";s:3:"ꚋ";s:3:"Ꚍ";s:3:"ꚍ";s:3:"Ꚏ";s:3:"ꚏ";s:3:"Ꚑ";s:3:"ꚑ";s:3:"Ꚓ";s:3:"ꚓ";s:3:"Ꚕ";s:3:"ꚕ";s:3:"Ꚗ";s:3:"ꚗ";s:3:"Ꜣ";s:3:"ꜣ";s:3:"Ꜥ";s:3:"ꜥ";s:3:"Ꜧ";s:3:"ꜧ";s:3:"Ꜩ";s:3:"ꜩ";s:3:"Ꜫ";s:3:"ꜫ";s:3:"Ꜭ";s:3:"ꜭ";s:3:"Ꜯ";s:3:"ꜯ";s:3:"Ꜳ";s:3:"ꜳ";s:3:"Ꜵ";s:3:"ꜵ";s:3:"Ꜷ";s:3:"ꜷ";s:3:"Ꜹ";s:3:"ꜹ";s:3:"Ꜻ";s:3:"ꜻ";s:3:"Ꜽ";s:3:"ꜽ";s:3:"Ꜿ";s:3:"ꜿ";s:3:"Ꝁ";s:3:"ꝁ";s:3:"Ꝃ";s:3:"ꝃ";s:3:"Ꝅ";s:3:"ꝅ";s:3:"Ꝇ";s:3:"ꝇ";s:3:"Ꝉ";s:3:"ꝉ";s:3:"Ꝋ";s:3:"ꝋ";s:3:"Ꝍ";s:3:"ꝍ";s:3:"Ꝏ";s:3:"ꝏ";s:3:"Ꝑ";s:3:"ꝑ";s:3:"Ꝓ";s:3:"ꝓ";s:3:"Ꝕ";s:3:"ꝕ";s:3:"Ꝗ";s:3:"ꝗ";s:3:"Ꝙ";s:3:"ꝙ";s:3:"Ꝛ";s:3:"ꝛ";s:3:"Ꝝ";s:3:"ꝝ";s:3:"Ꝟ";s:3:"ꝟ";s:3:"Ꝡ";s:3:"ꝡ";s:3:"Ꝣ";s:3:"ꝣ";s:3:"Ꝥ";s:3:"ꝥ";s:3:"Ꝧ";s:3:"ꝧ";s:3:"Ꝩ";s:3:"ꝩ";s:3:"Ꝫ";s:3:"ꝫ";s:3:"Ꝭ";s:3:"ꝭ";s:3:"Ꝯ";s:3:"ꝯ";s:3:"Ꝺ";s:3:"ꝺ";s:3:"Ꝼ";s:3:"ꝼ";s:3:"Ᵹ";s:3:"ᵹ";s:3:"Ꝿ";s:3:"ꝿ";s:3:"Ꞁ";s:3:"ꞁ";s:3:"Ꞃ";s:3:"ꞃ";s:3:"Ꞅ";s:3:"ꞅ";s:3:"Ꞇ";s:3:"ꞇ";s:3:"Ꞌ";s:3:"ꞌ";s:3:"Ɥ";s:2:"ɥ";s:3:"Ꞑ";s:3:"ꞑ";s:3:"Ꞓ";s:3:"ꞓ";s:3:"Ꞡ";s:3:"ꞡ";s:3:"Ꞣ";s:3:"ꞣ";s:3:"Ꞥ";s:3:"ꞥ";s:3:"Ꞧ";s:3:"ꞧ";s:3:"Ꞩ";s:3:"ꞩ";s:3:"Ɦ";s:2:"ɦ";s:3:"A";s:3:"a";s:3:"B";s:3:"b";s:3:"C";s:3:"c";s:3:"D";s:3:"d";s:3:"E";s:3:"e";s:3:"F";s:3:"f";s:3:"G";s:3:"g";s:3:"H";s:3:"h";s:3:"I";s:3:"i";s:3:"J";s:3:"j";s:3:"K";s:3:"k";s:3:"L";s:3:"l";s:3:"M";s:3:"m";s:3:"N";s:3:"n";s:3:"O";s:3:"o";s:3:"P";s:3:"p";s:3:"Q";s:3:"q";s:3:"R";s:3:"r";s:3:"S";s:3:"s";s:3:"T";s:3:"t";s:3:"U";s:3:"u";s:3:"V";s:3:"v";s:3:"W";s:3:"w";s:3:"X";s:3:"x";s:3:"Y";s:3:"y";s:3:"Z";s:3:"z";s:4:"𐐀";s:4:"𐐨";s:4:"𐐁";s:4:"𐐩";s:4:"𐐂";s:4:"𐐪";s:4:"𐐃";s:4:"𐐫";s:4:"𐐄";s:4:"𐐬";s:4:"𐐅";s:4:"𐐭";s:4:"𐐆";s:4:"𐐮";s:4:"𐐇";s:4:"𐐯";s:4:"𐐈";s:4:"𐐰";s:4:"𐐉";s:4:"𐐱";s:4:"𐐊";s:4:"𐐲";s:4:"𐐋";s:4:"𐐳";s:4:"𐐌";s:4:"𐐴";s:4:"𐐍";s:4:"𐐵";s:4:"𐐎";s:4:"𐐶";s:4:"𐐏";s:4:"𐐷";s:4:"𐐐";s:4:"𐐸";s:4:"𐐑";s:4:"𐐹";s:4:"𐐒";s:4:"𐐺";s:4:"𐐓";s:4:"𐐻";s:4:"𐐔";s:4:"𐐼";s:4:"𐐕";s:4:"𐐽";s:4:"𐐖";s:4:"𐐾";s:4:"𐐗";s:4:"𐐿";s:4:"𐐘";s:4:"𐑀";s:4:"𐐙";s:4:"𐑁";s:4:"𐐚";s:4:"𐑂";s:4:"𐐛";s:4:"𐑃";s:4:"𐐜";s:4:"𐑄";s:4:"𐐝";s:4:"𐑅";s:4:"𐐞";s:4:"𐑆";s:4:"𐐟";s:4:"𐑇";s:4:"𐐠";s:4:"𐑈";s:4:"𐐡";s:4:"𐑉";s:4:"𐐢";s:4:"𐑊";s:4:"𐐣";s:4:"𐑋";s:4:"𐐤";s:4:"𐑌";s:4:"𐐥";s:4:"𐑍";s:4:"𐐦";s:4:"𐑎";s:4:"𐐧";s:4:"𐑏";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/upperCase.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/upperCase.ser deleted file mode 100644 index a3182d4f..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/upperCase.ser +++ /dev/null @@ -1 +0,0 @@ -a:1051:{s:1:"a";s:1:"A";s:1:"b";s:1:"B";s:1:"c";s:1:"C";s:1:"d";s:1:"D";s:1:"e";s:1:"E";s:1:"f";s:1:"F";s:1:"g";s:1:"G";s:1:"h";s:1:"H";s:1:"i";s:1:"I";s:1:"j";s:1:"J";s:1:"k";s:1:"K";s:1:"l";s:1:"L";s:1:"m";s:1:"M";s:1:"n";s:1:"N";s:1:"o";s:1:"O";s:1:"p";s:1:"P";s:1:"q";s:1:"Q";s:1:"r";s:1:"R";s:1:"s";s:1:"S";s:1:"t";s:1:"T";s:1:"u";s:1:"U";s:1:"v";s:1:"V";s:1:"w";s:1:"W";s:1:"x";s:1:"X";s:1:"y";s:1:"Y";s:1:"z";s:1:"Z";s:2:"µ";s:2:"Μ";s:2:"à";s:2:"À";s:2:"á";s:2:"Á";s:2:"â";s:2:"Â";s:2:"ã";s:2:"Ã";s:2:"ä";s:2:"Ä";s:2:"å";s:2:"Å";s:2:"æ";s:2:"Æ";s:2:"ç";s:2:"Ç";s:2:"è";s:2:"È";s:2:"é";s:2:"É";s:2:"ê";s:2:"Ê";s:2:"ë";s:2:"Ë";s:2:"ì";s:2:"Ì";s:2:"í";s:2:"Í";s:2:"î";s:2:"Î";s:2:"ï";s:2:"Ï";s:2:"ð";s:2:"Ð";s:2:"ñ";s:2:"Ñ";s:2:"ò";s:2:"Ò";s:2:"ó";s:2:"Ó";s:2:"ô";s:2:"Ô";s:2:"õ";s:2:"Õ";s:2:"ö";s:2:"Ö";s:2:"ø";s:2:"Ø";s:2:"ù";s:2:"Ù";s:2:"ú";s:2:"Ú";s:2:"û";s:2:"Û";s:2:"ü";s:2:"Ü";s:2:"ý";s:2:"Ý";s:2:"þ";s:2:"Þ";s:2:"ÿ";s:2:"Ÿ";s:2:"ā";s:2:"Ā";s:2:"ă";s:2:"Ă";s:2:"ą";s:2:"Ą";s:2:"ć";s:2:"Ć";s:2:"ĉ";s:2:"Ĉ";s:2:"ċ";s:2:"Ċ";s:2:"č";s:2:"Č";s:2:"ď";s:2:"Ď";s:2:"đ";s:2:"Đ";s:2:"ē";s:2:"Ē";s:2:"ĕ";s:2:"Ĕ";s:2:"ė";s:2:"Ė";s:2:"ę";s:2:"Ę";s:2:"ě";s:2:"Ě";s:2:"ĝ";s:2:"Ĝ";s:2:"ğ";s:2:"Ğ";s:2:"ġ";s:2:"Ġ";s:2:"ģ";s:2:"Ģ";s:2:"ĥ";s:2:"Ĥ";s:2:"ħ";s:2:"Ħ";s:2:"ĩ";s:2:"Ĩ";s:2:"ī";s:2:"Ī";s:2:"ĭ";s:2:"Ĭ";s:2:"į";s:2:"Į";s:2:"ı";s:1:"I";s:2:"ij";s:2:"IJ";s:2:"ĵ";s:2:"Ĵ";s:2:"ķ";s:2:"Ķ";s:2:"ĺ";s:2:"Ĺ";s:2:"ļ";s:2:"Ļ";s:2:"ľ";s:2:"Ľ";s:2:"ŀ";s:2:"Ŀ";s:2:"ł";s:2:"Ł";s:2:"ń";s:2:"Ń";s:2:"ņ";s:2:"Ņ";s:2:"ň";s:2:"Ň";s:2:"ŋ";s:2:"Ŋ";s:2:"ō";s:2:"Ō";s:2:"ŏ";s:2:"Ŏ";s:2:"ő";s:2:"Ő";s:2:"œ";s:2:"Œ";s:2:"ŕ";s:2:"Ŕ";s:2:"ŗ";s:2:"Ŗ";s:2:"ř";s:2:"Ř";s:2:"ś";s:2:"Ś";s:2:"ŝ";s:2:"Ŝ";s:2:"ş";s:2:"Ş";s:2:"š";s:2:"Š";s:2:"ţ";s:2:"Ţ";s:2:"ť";s:2:"Ť";s:2:"ŧ";s:2:"Ŧ";s:2:"ũ";s:2:"Ũ";s:2:"ū";s:2:"Ū";s:2:"ŭ";s:2:"Ŭ";s:2:"ů";s:2:"Ů";s:2:"ű";s:2:"Ű";s:2:"ų";s:2:"Ų";s:2:"ŵ";s:2:"Ŵ";s:2:"ŷ";s:2:"Ŷ";s:2:"ź";s:2:"Ź";s:2:"ż";s:2:"Ż";s:2:"ž";s:2:"Ž";s:2:"ſ";s:1:"S";s:2:"ƀ";s:2:"Ƀ";s:2:"ƃ";s:2:"Ƃ";s:2:"ƅ";s:2:"Ƅ";s:2:"ƈ";s:2:"Ƈ";s:2:"ƌ";s:2:"Ƌ";s:2:"ƒ";s:2:"Ƒ";s:2:"ƕ";s:2:"Ƕ";s:2:"ƙ";s:2:"Ƙ";s:2:"ƚ";s:2:"Ƚ";s:2:"ƞ";s:2:"Ƞ";s:2:"ơ";s:2:"Ơ";s:2:"ƣ";s:2:"Ƣ";s:2:"ƥ";s:2:"Ƥ";s:2:"ƨ";s:2:"Ƨ";s:2:"ƭ";s:2:"Ƭ";s:2:"ư";s:2:"Ư";s:2:"ƴ";s:2:"Ƴ";s:2:"ƶ";s:2:"Ƶ";s:2:"ƹ";s:2:"Ƹ";s:2:"ƽ";s:2:"Ƽ";s:2:"ƿ";s:2:"Ƿ";s:2:"Dž";s:2:"DŽ";s:2:"dž";s:2:"DŽ";s:2:"Lj";s:2:"LJ";s:2:"lj";s:2:"LJ";s:2:"Nj";s:2:"NJ";s:2:"nj";s:2:"NJ";s:2:"ǎ";s:2:"Ǎ";s:2:"ǐ";s:2:"Ǐ";s:2:"ǒ";s:2:"Ǒ";s:2:"ǔ";s:2:"Ǔ";s:2:"ǖ";s:2:"Ǖ";s:2:"ǘ";s:2:"Ǘ";s:2:"ǚ";s:2:"Ǚ";s:2:"ǜ";s:2:"Ǜ";s:2:"ǝ";s:2:"Ǝ";s:2:"ǟ";s:2:"Ǟ";s:2:"ǡ";s:2:"Ǡ";s:2:"ǣ";s:2:"Ǣ";s:2:"ǥ";s:2:"Ǥ";s:2:"ǧ";s:2:"Ǧ";s:2:"ǩ";s:2:"Ǩ";s:2:"ǫ";s:2:"Ǫ";s:2:"ǭ";s:2:"Ǭ";s:2:"ǯ";s:2:"Ǯ";s:2:"Dz";s:2:"DZ";s:2:"dz";s:2:"DZ";s:2:"ǵ";s:2:"Ǵ";s:2:"ǹ";s:2:"Ǹ";s:2:"ǻ";s:2:"Ǻ";s:2:"ǽ";s:2:"Ǽ";s:2:"ǿ";s:2:"Ǿ";s:2:"ȁ";s:2:"Ȁ";s:2:"ȃ";s:2:"Ȃ";s:2:"ȅ";s:2:"Ȅ";s:2:"ȇ";s:2:"Ȇ";s:2:"ȉ";s:2:"Ȉ";s:2:"ȋ";s:2:"Ȋ";s:2:"ȍ";s:2:"Ȍ";s:2:"ȏ";s:2:"Ȏ";s:2:"ȑ";s:2:"Ȑ";s:2:"ȓ";s:2:"Ȓ";s:2:"ȕ";s:2:"Ȕ";s:2:"ȗ";s:2:"Ȗ";s:2:"ș";s:2:"Ș";s:2:"ț";s:2:"Ț";s:2:"ȝ";s:2:"Ȝ";s:2:"ȟ";s:2:"Ȟ";s:2:"ȣ";s:2:"Ȣ";s:2:"ȥ";s:2:"Ȥ";s:2:"ȧ";s:2:"Ȧ";s:2:"ȩ";s:2:"Ȩ";s:2:"ȫ";s:2:"Ȫ";s:2:"ȭ";s:2:"Ȭ";s:2:"ȯ";s:2:"Ȯ";s:2:"ȱ";s:2:"Ȱ";s:2:"ȳ";s:2:"Ȳ";s:2:"ȼ";s:2:"Ȼ";s:2:"ȿ";s:3:"Ȿ";s:2:"ɀ";s:3:"Ɀ";s:2:"ɂ";s:2:"Ɂ";s:2:"ɇ";s:2:"Ɇ";s:2:"ɉ";s:2:"Ɉ";s:2:"ɋ";s:2:"Ɋ";s:2:"ɍ";s:2:"Ɍ";s:2:"ɏ";s:2:"Ɏ";s:2:"ɐ";s:3:"Ɐ";s:2:"ɑ";s:3:"Ɑ";s:2:"ɒ";s:3:"Ɒ";s:2:"ɓ";s:2:"Ɓ";s:2:"ɔ";s:2:"Ɔ";s:2:"ɖ";s:2:"Ɖ";s:2:"ɗ";s:2:"Ɗ";s:2:"ə";s:2:"Ə";s:2:"ɛ";s:2:"Ɛ";s:2:"ɠ";s:2:"Ɠ";s:2:"ɣ";s:2:"Ɣ";s:2:"ɥ";s:3:"Ɥ";s:2:"ɦ";s:3:"Ɦ";s:2:"ɨ";s:2:"Ɨ";s:2:"ɩ";s:2:"Ɩ";s:2:"ɫ";s:3:"Ɫ";s:2:"ɯ";s:2:"Ɯ";s:2:"ɱ";s:3:"Ɱ";s:2:"ɲ";s:2:"Ɲ";s:2:"ɵ";s:2:"Ɵ";s:2:"ɽ";s:3:"Ɽ";s:2:"ʀ";s:2:"Ʀ";s:2:"ʃ";s:2:"Ʃ";s:2:"ʈ";s:2:"Ʈ";s:2:"ʉ";s:2:"Ʉ";s:2:"ʊ";s:2:"Ʊ";s:2:"ʋ";s:2:"Ʋ";s:2:"ʌ";s:2:"Ʌ";s:2:"ʒ";s:2:"Ʒ";s:2:"ͅ";s:2:"Ι";s:2:"ͱ";s:2:"Ͱ";s:2:"ͳ";s:2:"Ͳ";s:2:"ͷ";s:2:"Ͷ";s:2:"ͻ";s:2:"Ͻ";s:2:"ͼ";s:2:"Ͼ";s:2:"ͽ";s:2:"Ͽ";s:2:"ά";s:2:"Ά";s:2:"έ";s:2:"Έ";s:2:"ή";s:2:"Ή";s:2:"ί";s:2:"Ί";s:2:"α";s:2:"Α";s:2:"β";s:2:"Β";s:2:"γ";s:2:"Γ";s:2:"δ";s:2:"Δ";s:2:"ε";s:2:"Ε";s:2:"ζ";s:2:"Ζ";s:2:"η";s:2:"Η";s:2:"θ";s:2:"Θ";s:2:"ι";s:2:"Ι";s:2:"κ";s:2:"Κ";s:2:"λ";s:2:"Λ";s:2:"μ";s:2:"Μ";s:2:"ν";s:2:"Ν";s:2:"ξ";s:2:"Ξ";s:2:"ο";s:2:"Ο";s:2:"π";s:2:"Π";s:2:"ρ";s:2:"Ρ";s:2:"ς";s:2:"Σ";s:2:"σ";s:2:"Σ";s:2:"τ";s:2:"Τ";s:2:"υ";s:2:"Υ";s:2:"φ";s:2:"Φ";s:2:"χ";s:2:"Χ";s:2:"ψ";s:2:"Ψ";s:2:"ω";s:2:"Ω";s:2:"ϊ";s:2:"Ϊ";s:2:"ϋ";s:2:"Ϋ";s:2:"ό";s:2:"Ό";s:2:"ύ";s:2:"Ύ";s:2:"ώ";s:2:"Ώ";s:2:"ϐ";s:2:"Β";s:2:"ϑ";s:2:"Θ";s:2:"ϕ";s:2:"Φ";s:2:"ϖ";s:2:"Π";s:2:"ϗ";s:2:"Ϗ";s:2:"ϙ";s:2:"Ϙ";s:2:"ϛ";s:2:"Ϛ";s:2:"ϝ";s:2:"Ϝ";s:2:"ϟ";s:2:"Ϟ";s:2:"ϡ";s:2:"Ϡ";s:2:"ϣ";s:2:"Ϣ";s:2:"ϥ";s:2:"Ϥ";s:2:"ϧ";s:2:"Ϧ";s:2:"ϩ";s:2:"Ϩ";s:2:"ϫ";s:2:"Ϫ";s:2:"ϭ";s:2:"Ϭ";s:2:"ϯ";s:2:"Ϯ";s:2:"ϰ";s:2:"Κ";s:2:"ϱ";s:2:"Ρ";s:2:"ϲ";s:2:"Ϲ";s:2:"ϵ";s:2:"Ε";s:2:"ϸ";s:2:"Ϸ";s:2:"ϻ";s:2:"Ϻ";s:2:"а";s:2:"А";s:2:"б";s:2:"Б";s:2:"в";s:2:"В";s:2:"г";s:2:"Г";s:2:"д";s:2:"Д";s:2:"е";s:2:"Е";s:2:"ж";s:2:"Ж";s:2:"з";s:2:"З";s:2:"и";s:2:"И";s:2:"й";s:2:"Й";s:2:"к";s:2:"К";s:2:"л";s:2:"Л";s:2:"м";s:2:"М";s:2:"н";s:2:"Н";s:2:"о";s:2:"О";s:2:"п";s:2:"П";s:2:"р";s:2:"Р";s:2:"с";s:2:"С";s:2:"т";s:2:"Т";s:2:"у";s:2:"У";s:2:"ф";s:2:"Ф";s:2:"х";s:2:"Х";s:2:"ц";s:2:"Ц";s:2:"ч";s:2:"Ч";s:2:"ш";s:2:"Ш";s:2:"щ";s:2:"Щ";s:2:"ъ";s:2:"Ъ";s:2:"ы";s:2:"Ы";s:2:"ь";s:2:"Ь";s:2:"э";s:2:"Э";s:2:"ю";s:2:"Ю";s:2:"я";s:2:"Я";s:2:"ѐ";s:2:"Ѐ";s:2:"ё";s:2:"Ё";s:2:"ђ";s:2:"Ђ";s:2:"ѓ";s:2:"Ѓ";s:2:"є";s:2:"Є";s:2:"ѕ";s:2:"Ѕ";s:2:"і";s:2:"І";s:2:"ї";s:2:"Ї";s:2:"ј";s:2:"Ј";s:2:"љ";s:2:"Љ";s:2:"њ";s:2:"Њ";s:2:"ћ";s:2:"Ћ";s:2:"ќ";s:2:"Ќ";s:2:"ѝ";s:2:"Ѝ";s:2:"ў";s:2:"Ў";s:2:"џ";s:2:"Џ";s:2:"ѡ";s:2:"Ѡ";s:2:"ѣ";s:2:"Ѣ";s:2:"ѥ";s:2:"Ѥ";s:2:"ѧ";s:2:"Ѧ";s:2:"ѩ";s:2:"Ѩ";s:2:"ѫ";s:2:"Ѫ";s:2:"ѭ";s:2:"Ѭ";s:2:"ѯ";s:2:"Ѯ";s:2:"ѱ";s:2:"Ѱ";s:2:"ѳ";s:2:"Ѳ";s:2:"ѵ";s:2:"Ѵ";s:2:"ѷ";s:2:"Ѷ";s:2:"ѹ";s:2:"Ѹ";s:2:"ѻ";s:2:"Ѻ";s:2:"ѽ";s:2:"Ѽ";s:2:"ѿ";s:2:"Ѿ";s:2:"ҁ";s:2:"Ҁ";s:2:"ҋ";s:2:"Ҋ";s:2:"ҍ";s:2:"Ҍ";s:2:"ҏ";s:2:"Ҏ";s:2:"ґ";s:2:"Ґ";s:2:"ғ";s:2:"Ғ";s:2:"ҕ";s:2:"Ҕ";s:2:"җ";s:2:"Җ";s:2:"ҙ";s:2:"Ҙ";s:2:"қ";s:2:"Қ";s:2:"ҝ";s:2:"Ҝ";s:2:"ҟ";s:2:"Ҟ";s:2:"ҡ";s:2:"Ҡ";s:2:"ң";s:2:"Ң";s:2:"ҥ";s:2:"Ҥ";s:2:"ҧ";s:2:"Ҧ";s:2:"ҩ";s:2:"Ҩ";s:2:"ҫ";s:2:"Ҫ";s:2:"ҭ";s:2:"Ҭ";s:2:"ү";s:2:"Ү";s:2:"ұ";s:2:"Ұ";s:2:"ҳ";s:2:"Ҳ";s:2:"ҵ";s:2:"Ҵ";s:2:"ҷ";s:2:"Ҷ";s:2:"ҹ";s:2:"Ҹ";s:2:"һ";s:2:"Һ";s:2:"ҽ";s:2:"Ҽ";s:2:"ҿ";s:2:"Ҿ";s:2:"ӂ";s:2:"Ӂ";s:2:"ӄ";s:2:"Ӄ";s:2:"ӆ";s:2:"Ӆ";s:2:"ӈ";s:2:"Ӈ";s:2:"ӊ";s:2:"Ӊ";s:2:"ӌ";s:2:"Ӌ";s:2:"ӎ";s:2:"Ӎ";s:2:"ӏ";s:2:"Ӏ";s:2:"ӑ";s:2:"Ӑ";s:2:"ӓ";s:2:"Ӓ";s:2:"ӕ";s:2:"Ӕ";s:2:"ӗ";s:2:"Ӗ";s:2:"ә";s:2:"Ә";s:2:"ӛ";s:2:"Ӛ";s:2:"ӝ";s:2:"Ӝ";s:2:"ӟ";s:2:"Ӟ";s:2:"ӡ";s:2:"Ӡ";s:2:"ӣ";s:2:"Ӣ";s:2:"ӥ";s:2:"Ӥ";s:2:"ӧ";s:2:"Ӧ";s:2:"ө";s:2:"Ө";s:2:"ӫ";s:2:"Ӫ";s:2:"ӭ";s:2:"Ӭ";s:2:"ӯ";s:2:"Ӯ";s:2:"ӱ";s:2:"Ӱ";s:2:"ӳ";s:2:"Ӳ";s:2:"ӵ";s:2:"Ӵ";s:2:"ӷ";s:2:"Ӷ";s:2:"ӹ";s:2:"Ӹ";s:2:"ӻ";s:2:"Ӻ";s:2:"ӽ";s:2:"Ӽ";s:2:"ӿ";s:2:"Ӿ";s:2:"ԁ";s:2:"Ԁ";s:2:"ԃ";s:2:"Ԃ";s:2:"ԅ";s:2:"Ԅ";s:2:"ԇ";s:2:"Ԇ";s:2:"ԉ";s:2:"Ԉ";s:2:"ԋ";s:2:"Ԋ";s:2:"ԍ";s:2:"Ԍ";s:2:"ԏ";s:2:"Ԏ";s:2:"ԑ";s:2:"Ԑ";s:2:"ԓ";s:2:"Ԓ";s:2:"ԕ";s:2:"Ԕ";s:2:"ԗ";s:2:"Ԗ";s:2:"ԙ";s:2:"Ԙ";s:2:"ԛ";s:2:"Ԛ";s:2:"ԝ";s:2:"Ԝ";s:2:"ԟ";s:2:"Ԟ";s:2:"ԡ";s:2:"Ԡ";s:2:"ԣ";s:2:"Ԣ";s:2:"ԥ";s:2:"Ԥ";s:2:"ԧ";s:2:"Ԧ";s:2:"ա";s:2:"Ա";s:2:"բ";s:2:"Բ";s:2:"գ";s:2:"Գ";s:2:"դ";s:2:"Դ";s:2:"ե";s:2:"Ե";s:2:"զ";s:2:"Զ";s:2:"է";s:2:"Է";s:2:"ը";s:2:"Ը";s:2:"թ";s:2:"Թ";s:2:"ժ";s:2:"Ժ";s:2:"ի";s:2:"Ի";s:2:"լ";s:2:"Լ";s:2:"խ";s:2:"Խ";s:2:"ծ";s:2:"Ծ";s:2:"կ";s:2:"Կ";s:2:"հ";s:2:"Հ";s:2:"ձ";s:2:"Ձ";s:2:"ղ";s:2:"Ղ";s:2:"ճ";s:2:"Ճ";s:2:"մ";s:2:"Մ";s:2:"յ";s:2:"Յ";s:2:"ն";s:2:"Ն";s:2:"շ";s:2:"Շ";s:2:"ո";s:2:"Ո";s:2:"չ";s:2:"Չ";s:2:"պ";s:2:"Պ";s:2:"ջ";s:2:"Ջ";s:2:"ռ";s:2:"Ռ";s:2:"ս";s:2:"Ս";s:2:"վ";s:2:"Վ";s:2:"տ";s:2:"Տ";s:2:"ր";s:2:"Ր";s:2:"ց";s:2:"Ց";s:2:"ւ";s:2:"Ւ";s:2:"փ";s:2:"Փ";s:2:"ք";s:2:"Ք";s:2:"օ";s:2:"Օ";s:2:"ֆ";s:2:"Ֆ";s:3:"ᵹ";s:3:"Ᵹ";s:3:"ᵽ";s:3:"Ᵽ";s:3:"ḁ";s:3:"Ḁ";s:3:"ḃ";s:3:"Ḃ";s:3:"ḅ";s:3:"Ḅ";s:3:"ḇ";s:3:"Ḇ";s:3:"ḉ";s:3:"Ḉ";s:3:"ḋ";s:3:"Ḋ";s:3:"ḍ";s:3:"Ḍ";s:3:"ḏ";s:3:"Ḏ";s:3:"ḑ";s:3:"Ḑ";s:3:"ḓ";s:3:"Ḓ";s:3:"ḕ";s:3:"Ḕ";s:3:"ḗ";s:3:"Ḗ";s:3:"ḙ";s:3:"Ḙ";s:3:"ḛ";s:3:"Ḛ";s:3:"ḝ";s:3:"Ḝ";s:3:"ḟ";s:3:"Ḟ";s:3:"ḡ";s:3:"Ḡ";s:3:"ḣ";s:3:"Ḣ";s:3:"ḥ";s:3:"Ḥ";s:3:"ḧ";s:3:"Ḧ";s:3:"ḩ";s:3:"Ḩ";s:3:"ḫ";s:3:"Ḫ";s:3:"ḭ";s:3:"Ḭ";s:3:"ḯ";s:3:"Ḯ";s:3:"ḱ";s:3:"Ḱ";s:3:"ḳ";s:3:"Ḳ";s:3:"ḵ";s:3:"Ḵ";s:3:"ḷ";s:3:"Ḷ";s:3:"ḹ";s:3:"Ḹ";s:3:"ḻ";s:3:"Ḻ";s:3:"ḽ";s:3:"Ḽ";s:3:"ḿ";s:3:"Ḿ";s:3:"ṁ";s:3:"Ṁ";s:3:"ṃ";s:3:"Ṃ";s:3:"ṅ";s:3:"Ṅ";s:3:"ṇ";s:3:"Ṇ";s:3:"ṉ";s:3:"Ṉ";s:3:"ṋ";s:3:"Ṋ";s:3:"ṍ";s:3:"Ṍ";s:3:"ṏ";s:3:"Ṏ";s:3:"ṑ";s:3:"Ṑ";s:3:"ṓ";s:3:"Ṓ";s:3:"ṕ";s:3:"Ṕ";s:3:"ṗ";s:3:"Ṗ";s:3:"ṙ";s:3:"Ṙ";s:3:"ṛ";s:3:"Ṛ";s:3:"ṝ";s:3:"Ṝ";s:3:"ṟ";s:3:"Ṟ";s:3:"ṡ";s:3:"Ṡ";s:3:"ṣ";s:3:"Ṣ";s:3:"ṥ";s:3:"Ṥ";s:3:"ṧ";s:3:"Ṧ";s:3:"ṩ";s:3:"Ṩ";s:3:"ṫ";s:3:"Ṫ";s:3:"ṭ";s:3:"Ṭ";s:3:"ṯ";s:3:"Ṯ";s:3:"ṱ";s:3:"Ṱ";s:3:"ṳ";s:3:"Ṳ";s:3:"ṵ";s:3:"Ṵ";s:3:"ṷ";s:3:"Ṷ";s:3:"ṹ";s:3:"Ṹ";s:3:"ṻ";s:3:"Ṻ";s:3:"ṽ";s:3:"Ṽ";s:3:"ṿ";s:3:"Ṿ";s:3:"ẁ";s:3:"Ẁ";s:3:"ẃ";s:3:"Ẃ";s:3:"ẅ";s:3:"Ẅ";s:3:"ẇ";s:3:"Ẇ";s:3:"ẉ";s:3:"Ẉ";s:3:"ẋ";s:3:"Ẋ";s:3:"ẍ";s:3:"Ẍ";s:3:"ẏ";s:3:"Ẏ";s:3:"ẑ";s:3:"Ẑ";s:3:"ẓ";s:3:"Ẓ";s:3:"ẕ";s:3:"Ẕ";s:3:"ẛ";s:3:"Ṡ";s:3:"ạ";s:3:"Ạ";s:3:"ả";s:3:"Ả";s:3:"ấ";s:3:"Ấ";s:3:"ầ";s:3:"Ầ";s:3:"ẩ";s:3:"Ẩ";s:3:"ẫ";s:3:"Ẫ";s:3:"ậ";s:3:"Ậ";s:3:"ắ";s:3:"Ắ";s:3:"ằ";s:3:"Ằ";s:3:"ẳ";s:3:"Ẳ";s:3:"ẵ";s:3:"Ẵ";s:3:"ặ";s:3:"Ặ";s:3:"ẹ";s:3:"Ẹ";s:3:"ẻ";s:3:"Ẻ";s:3:"ẽ";s:3:"Ẽ";s:3:"ế";s:3:"Ế";s:3:"ề";s:3:"Ề";s:3:"ể";s:3:"Ể";s:3:"ễ";s:3:"Ễ";s:3:"ệ";s:3:"Ệ";s:3:"ỉ";s:3:"Ỉ";s:3:"ị";s:3:"Ị";s:3:"ọ";s:3:"Ọ";s:3:"ỏ";s:3:"Ỏ";s:3:"ố";s:3:"Ố";s:3:"ồ";s:3:"Ồ";s:3:"ổ";s:3:"Ổ";s:3:"ỗ";s:3:"Ỗ";s:3:"ộ";s:3:"Ộ";s:3:"ớ";s:3:"Ớ";s:3:"ờ";s:3:"Ờ";s:3:"ở";s:3:"Ở";s:3:"ỡ";s:3:"Ỡ";s:3:"ợ";s:3:"Ợ";s:3:"ụ";s:3:"Ụ";s:3:"ủ";s:3:"Ủ";s:3:"ứ";s:3:"Ứ";s:3:"ừ";s:3:"Ừ";s:3:"ử";s:3:"Ử";s:3:"ữ";s:3:"Ữ";s:3:"ự";s:3:"Ự";s:3:"ỳ";s:3:"Ỳ";s:3:"ỵ";s:3:"Ỵ";s:3:"ỷ";s:3:"Ỷ";s:3:"ỹ";s:3:"Ỹ";s:3:"ỻ";s:3:"Ỻ";s:3:"ỽ";s:3:"Ỽ";s:3:"ỿ";s:3:"Ỿ";s:3:"ἀ";s:3:"Ἀ";s:3:"ἁ";s:3:"Ἁ";s:3:"ἂ";s:3:"Ἂ";s:3:"ἃ";s:3:"Ἃ";s:3:"ἄ";s:3:"Ἄ";s:3:"ἅ";s:3:"Ἅ";s:3:"ἆ";s:3:"Ἆ";s:3:"ἇ";s:3:"Ἇ";s:3:"ἐ";s:3:"Ἐ";s:3:"ἑ";s:3:"Ἑ";s:3:"ἒ";s:3:"Ἒ";s:3:"ἓ";s:3:"Ἓ";s:3:"ἔ";s:3:"Ἔ";s:3:"ἕ";s:3:"Ἕ";s:3:"ἠ";s:3:"Ἠ";s:3:"ἡ";s:3:"Ἡ";s:3:"ἢ";s:3:"Ἢ";s:3:"ἣ";s:3:"Ἣ";s:3:"ἤ";s:3:"Ἤ";s:3:"ἥ";s:3:"Ἥ";s:3:"ἦ";s:3:"Ἦ";s:3:"ἧ";s:3:"Ἧ";s:3:"ἰ";s:3:"Ἰ";s:3:"ἱ";s:3:"Ἱ";s:3:"ἲ";s:3:"Ἲ";s:3:"ἳ";s:3:"Ἳ";s:3:"ἴ";s:3:"Ἴ";s:3:"ἵ";s:3:"Ἵ";s:3:"ἶ";s:3:"Ἶ";s:3:"ἷ";s:3:"Ἷ";s:3:"ὀ";s:3:"Ὀ";s:3:"ὁ";s:3:"Ὁ";s:3:"ὂ";s:3:"Ὂ";s:3:"ὃ";s:3:"Ὃ";s:3:"ὄ";s:3:"Ὄ";s:3:"ὅ";s:3:"Ὅ";s:3:"ὑ";s:3:"Ὑ";s:3:"ὓ";s:3:"Ὓ";s:3:"ὕ";s:3:"Ὕ";s:3:"ὗ";s:3:"Ὗ";s:3:"ὠ";s:3:"Ὠ";s:3:"ὡ";s:3:"Ὡ";s:3:"ὢ";s:3:"Ὢ";s:3:"ὣ";s:3:"Ὣ";s:3:"ὤ";s:3:"Ὤ";s:3:"ὥ";s:3:"Ὥ";s:3:"ὦ";s:3:"Ὦ";s:3:"ὧ";s:3:"Ὧ";s:3:"ὰ";s:3:"Ὰ";s:3:"ά";s:3:"Ά";s:3:"ὲ";s:3:"Ὲ";s:3:"έ";s:3:"Έ";s:3:"ὴ";s:3:"Ὴ";s:3:"ή";s:3:"Ή";s:3:"ὶ";s:3:"Ὶ";s:3:"ί";s:3:"Ί";s:3:"ὸ";s:3:"Ὸ";s:3:"ό";s:3:"Ό";s:3:"ὺ";s:3:"Ὺ";s:3:"ύ";s:3:"Ύ";s:3:"ὼ";s:3:"Ὼ";s:3:"ώ";s:3:"Ώ";s:3:"ᾀ";s:3:"ᾈ";s:3:"ᾁ";s:3:"ᾉ";s:3:"ᾂ";s:3:"ᾊ";s:3:"ᾃ";s:3:"ᾋ";s:3:"ᾄ";s:3:"ᾌ";s:3:"ᾅ";s:3:"ᾍ";s:3:"ᾆ";s:3:"ᾎ";s:3:"ᾇ";s:3:"ᾏ";s:3:"ᾐ";s:3:"ᾘ";s:3:"ᾑ";s:3:"ᾙ";s:3:"ᾒ";s:3:"ᾚ";s:3:"ᾓ";s:3:"ᾛ";s:3:"ᾔ";s:3:"ᾜ";s:3:"ᾕ";s:3:"ᾝ";s:3:"ᾖ";s:3:"ᾞ";s:3:"ᾗ";s:3:"ᾟ";s:3:"ᾠ";s:3:"ᾨ";s:3:"ᾡ";s:3:"ᾩ";s:3:"ᾢ";s:3:"ᾪ";s:3:"ᾣ";s:3:"ᾫ";s:3:"ᾤ";s:3:"ᾬ";s:3:"ᾥ";s:3:"ᾭ";s:3:"ᾦ";s:3:"ᾮ";s:3:"ᾧ";s:3:"ᾯ";s:3:"ᾰ";s:3:"Ᾰ";s:3:"ᾱ";s:3:"Ᾱ";s:3:"ᾳ";s:3:"ᾼ";s:3:"ι";s:2:"Ι";s:3:"ῃ";s:3:"ῌ";s:3:"ῐ";s:3:"Ῐ";s:3:"ῑ";s:3:"Ῑ";s:3:"ῠ";s:3:"Ῠ";s:3:"ῡ";s:3:"Ῡ";s:3:"ῥ";s:3:"Ῥ";s:3:"ῳ";s:3:"ῼ";s:3:"ⅎ";s:3:"Ⅎ";s:3:"ⅰ";s:3:"Ⅰ";s:3:"ⅱ";s:3:"Ⅱ";s:3:"ⅲ";s:3:"Ⅲ";s:3:"ⅳ";s:3:"Ⅳ";s:3:"ⅴ";s:3:"Ⅴ";s:3:"ⅵ";s:3:"Ⅵ";s:3:"ⅶ";s:3:"Ⅶ";s:3:"ⅷ";s:3:"Ⅷ";s:3:"ⅸ";s:3:"Ⅸ";s:3:"ⅹ";s:3:"Ⅹ";s:3:"ⅺ";s:3:"Ⅺ";s:3:"ⅻ";s:3:"Ⅻ";s:3:"ⅼ";s:3:"Ⅼ";s:3:"ⅽ";s:3:"Ⅽ";s:3:"ⅾ";s:3:"Ⅾ";s:3:"ⅿ";s:3:"Ⅿ";s:3:"ↄ";s:3:"Ↄ";s:3:"ⓐ";s:3:"Ⓐ";s:3:"ⓑ";s:3:"Ⓑ";s:3:"ⓒ";s:3:"Ⓒ";s:3:"ⓓ";s:3:"Ⓓ";s:3:"ⓔ";s:3:"Ⓔ";s:3:"ⓕ";s:3:"Ⓕ";s:3:"ⓖ";s:3:"Ⓖ";s:3:"ⓗ";s:3:"Ⓗ";s:3:"ⓘ";s:3:"Ⓘ";s:3:"ⓙ";s:3:"Ⓙ";s:3:"ⓚ";s:3:"Ⓚ";s:3:"ⓛ";s:3:"Ⓛ";s:3:"ⓜ";s:3:"Ⓜ";s:3:"ⓝ";s:3:"Ⓝ";s:3:"ⓞ";s:3:"Ⓞ";s:3:"ⓟ";s:3:"Ⓟ";s:3:"ⓠ";s:3:"Ⓠ";s:3:"ⓡ";s:3:"Ⓡ";s:3:"ⓢ";s:3:"Ⓢ";s:3:"ⓣ";s:3:"Ⓣ";s:3:"ⓤ";s:3:"Ⓤ";s:3:"ⓥ";s:3:"Ⓥ";s:3:"ⓦ";s:3:"Ⓦ";s:3:"ⓧ";s:3:"Ⓧ";s:3:"ⓨ";s:3:"Ⓨ";s:3:"ⓩ";s:3:"Ⓩ";s:3:"ⰰ";s:3:"Ⰰ";s:3:"ⰱ";s:3:"Ⰱ";s:3:"ⰲ";s:3:"Ⰲ";s:3:"ⰳ";s:3:"Ⰳ";s:3:"ⰴ";s:3:"Ⰴ";s:3:"ⰵ";s:3:"Ⰵ";s:3:"ⰶ";s:3:"Ⰶ";s:3:"ⰷ";s:3:"Ⰷ";s:3:"ⰸ";s:3:"Ⰸ";s:3:"ⰹ";s:3:"Ⰹ";s:3:"ⰺ";s:3:"Ⰺ";s:3:"ⰻ";s:3:"Ⰻ";s:3:"ⰼ";s:3:"Ⰼ";s:3:"ⰽ";s:3:"Ⰽ";s:3:"ⰾ";s:3:"Ⰾ";s:3:"ⰿ";s:3:"Ⰿ";s:3:"ⱀ";s:3:"Ⱀ";s:3:"ⱁ";s:3:"Ⱁ";s:3:"ⱂ";s:3:"Ⱂ";s:3:"ⱃ";s:3:"Ⱃ";s:3:"ⱄ";s:3:"Ⱄ";s:3:"ⱅ";s:3:"Ⱅ";s:3:"ⱆ";s:3:"Ⱆ";s:3:"ⱇ";s:3:"Ⱇ";s:3:"ⱈ";s:3:"Ⱈ";s:3:"ⱉ";s:3:"Ⱉ";s:3:"ⱊ";s:3:"Ⱊ";s:3:"ⱋ";s:3:"Ⱋ";s:3:"ⱌ";s:3:"Ⱌ";s:3:"ⱍ";s:3:"Ⱍ";s:3:"ⱎ";s:3:"Ⱎ";s:3:"ⱏ";s:3:"Ⱏ";s:3:"ⱐ";s:3:"Ⱐ";s:3:"ⱑ";s:3:"Ⱑ";s:3:"ⱒ";s:3:"Ⱒ";s:3:"ⱓ";s:3:"Ⱓ";s:3:"ⱔ";s:3:"Ⱔ";s:3:"ⱕ";s:3:"Ⱕ";s:3:"ⱖ";s:3:"Ⱖ";s:3:"ⱗ";s:3:"Ⱗ";s:3:"ⱘ";s:3:"Ⱘ";s:3:"ⱙ";s:3:"Ⱙ";s:3:"ⱚ";s:3:"Ⱚ";s:3:"ⱛ";s:3:"Ⱛ";s:3:"ⱜ";s:3:"Ⱜ";s:3:"ⱝ";s:3:"Ⱝ";s:3:"ⱞ";s:3:"Ⱞ";s:3:"ⱡ";s:3:"Ⱡ";s:3:"ⱥ";s:2:"Ⱥ";s:3:"ⱦ";s:2:"Ⱦ";s:3:"ⱨ";s:3:"Ⱨ";s:3:"ⱪ";s:3:"Ⱪ";s:3:"ⱬ";s:3:"Ⱬ";s:3:"ⱳ";s:3:"Ⱳ";s:3:"ⱶ";s:3:"Ⱶ";s:3:"ⲁ";s:3:"Ⲁ";s:3:"ⲃ";s:3:"Ⲃ";s:3:"ⲅ";s:3:"Ⲅ";s:3:"ⲇ";s:3:"Ⲇ";s:3:"ⲉ";s:3:"Ⲉ";s:3:"ⲋ";s:3:"Ⲋ";s:3:"ⲍ";s:3:"Ⲍ";s:3:"ⲏ";s:3:"Ⲏ";s:3:"ⲑ";s:3:"Ⲑ";s:3:"ⲓ";s:3:"Ⲓ";s:3:"ⲕ";s:3:"Ⲕ";s:3:"ⲗ";s:3:"Ⲗ";s:3:"ⲙ";s:3:"Ⲙ";s:3:"ⲛ";s:3:"Ⲛ";s:3:"ⲝ";s:3:"Ⲝ";s:3:"ⲟ";s:3:"Ⲟ";s:3:"ⲡ";s:3:"Ⲡ";s:3:"ⲣ";s:3:"Ⲣ";s:3:"ⲥ";s:3:"Ⲥ";s:3:"ⲧ";s:3:"Ⲧ";s:3:"ⲩ";s:3:"Ⲩ";s:3:"ⲫ";s:3:"Ⲫ";s:3:"ⲭ";s:3:"Ⲭ";s:3:"ⲯ";s:3:"Ⲯ";s:3:"ⲱ";s:3:"Ⲱ";s:3:"ⲳ";s:3:"Ⲳ";s:3:"ⲵ";s:3:"Ⲵ";s:3:"ⲷ";s:3:"Ⲷ";s:3:"ⲹ";s:3:"Ⲹ";s:3:"ⲻ";s:3:"Ⲻ";s:3:"ⲽ";s:3:"Ⲽ";s:3:"ⲿ";s:3:"Ⲿ";s:3:"ⳁ";s:3:"Ⳁ";s:3:"ⳃ";s:3:"Ⳃ";s:3:"ⳅ";s:3:"Ⳅ";s:3:"ⳇ";s:3:"Ⳇ";s:3:"ⳉ";s:3:"Ⳉ";s:3:"ⳋ";s:3:"Ⳋ";s:3:"ⳍ";s:3:"Ⳍ";s:3:"ⳏ";s:3:"Ⳏ";s:3:"ⳑ";s:3:"Ⳑ";s:3:"ⳓ";s:3:"Ⳓ";s:3:"ⳕ";s:3:"Ⳕ";s:3:"ⳗ";s:3:"Ⳗ";s:3:"ⳙ";s:3:"Ⳙ";s:3:"ⳛ";s:3:"Ⳛ";s:3:"ⳝ";s:3:"Ⳝ";s:3:"ⳟ";s:3:"Ⳟ";s:3:"ⳡ";s:3:"Ⳡ";s:3:"ⳣ";s:3:"Ⳣ";s:3:"ⳬ";s:3:"Ⳬ";s:3:"ⳮ";s:3:"Ⳮ";s:3:"ⳳ";s:3:"Ⳳ";s:3:"ⴀ";s:3:"Ⴀ";s:3:"ⴁ";s:3:"Ⴁ";s:3:"ⴂ";s:3:"Ⴂ";s:3:"ⴃ";s:3:"Ⴃ";s:3:"ⴄ";s:3:"Ⴄ";s:3:"ⴅ";s:3:"Ⴅ";s:3:"ⴆ";s:3:"Ⴆ";s:3:"ⴇ";s:3:"Ⴇ";s:3:"ⴈ";s:3:"Ⴈ";s:3:"ⴉ";s:3:"Ⴉ";s:3:"ⴊ";s:3:"Ⴊ";s:3:"ⴋ";s:3:"Ⴋ";s:3:"ⴌ";s:3:"Ⴌ";s:3:"ⴍ";s:3:"Ⴍ";s:3:"ⴎ";s:3:"Ⴎ";s:3:"ⴏ";s:3:"Ⴏ";s:3:"ⴐ";s:3:"Ⴐ";s:3:"ⴑ";s:3:"Ⴑ";s:3:"ⴒ";s:3:"Ⴒ";s:3:"ⴓ";s:3:"Ⴓ";s:3:"ⴔ";s:3:"Ⴔ";s:3:"ⴕ";s:3:"Ⴕ";s:3:"ⴖ";s:3:"Ⴖ";s:3:"ⴗ";s:3:"Ⴗ";s:3:"ⴘ";s:3:"Ⴘ";s:3:"ⴙ";s:3:"Ⴙ";s:3:"ⴚ";s:3:"Ⴚ";s:3:"ⴛ";s:3:"Ⴛ";s:3:"ⴜ";s:3:"Ⴜ";s:3:"ⴝ";s:3:"Ⴝ";s:3:"ⴞ";s:3:"Ⴞ";s:3:"ⴟ";s:3:"Ⴟ";s:3:"ⴠ";s:3:"Ⴠ";s:3:"ⴡ";s:3:"Ⴡ";s:3:"ⴢ";s:3:"Ⴢ";s:3:"ⴣ";s:3:"Ⴣ";s:3:"ⴤ";s:3:"Ⴤ";s:3:"ⴥ";s:3:"Ⴥ";s:3:"ⴧ";s:3:"Ⴧ";s:3:"ⴭ";s:3:"Ⴭ";s:3:"ꙁ";s:3:"Ꙁ";s:3:"ꙃ";s:3:"Ꙃ";s:3:"ꙅ";s:3:"Ꙅ";s:3:"ꙇ";s:3:"Ꙇ";s:3:"ꙉ";s:3:"Ꙉ";s:3:"ꙋ";s:3:"Ꙋ";s:3:"ꙍ";s:3:"Ꙍ";s:3:"ꙏ";s:3:"Ꙏ";s:3:"ꙑ";s:3:"Ꙑ";s:3:"ꙓ";s:3:"Ꙓ";s:3:"ꙕ";s:3:"Ꙕ";s:3:"ꙗ";s:3:"Ꙗ";s:3:"ꙙ";s:3:"Ꙙ";s:3:"ꙛ";s:3:"Ꙛ";s:3:"ꙝ";s:3:"Ꙝ";s:3:"ꙟ";s:3:"Ꙟ";s:3:"ꙡ";s:3:"Ꙡ";s:3:"ꙣ";s:3:"Ꙣ";s:3:"ꙥ";s:3:"Ꙥ";s:3:"ꙧ";s:3:"Ꙧ";s:3:"ꙩ";s:3:"Ꙩ";s:3:"ꙫ";s:3:"Ꙫ";s:3:"ꙭ";s:3:"Ꙭ";s:3:"ꚁ";s:3:"Ꚁ";s:3:"ꚃ";s:3:"Ꚃ";s:3:"ꚅ";s:3:"Ꚅ";s:3:"ꚇ";s:3:"Ꚇ";s:3:"ꚉ";s:3:"Ꚉ";s:3:"ꚋ";s:3:"Ꚋ";s:3:"ꚍ";s:3:"Ꚍ";s:3:"ꚏ";s:3:"Ꚏ";s:3:"ꚑ";s:3:"Ꚑ";s:3:"ꚓ";s:3:"Ꚓ";s:3:"ꚕ";s:3:"Ꚕ";s:3:"ꚗ";s:3:"Ꚗ";s:3:"ꜣ";s:3:"Ꜣ";s:3:"ꜥ";s:3:"Ꜥ";s:3:"ꜧ";s:3:"Ꜧ";s:3:"ꜩ";s:3:"Ꜩ";s:3:"ꜫ";s:3:"Ꜫ";s:3:"ꜭ";s:3:"Ꜭ";s:3:"ꜯ";s:3:"Ꜯ";s:3:"ꜳ";s:3:"Ꜳ";s:3:"ꜵ";s:3:"Ꜵ";s:3:"ꜷ";s:3:"Ꜷ";s:3:"ꜹ";s:3:"Ꜹ";s:3:"ꜻ";s:3:"Ꜻ";s:3:"ꜽ";s:3:"Ꜽ";s:3:"ꜿ";s:3:"Ꜿ";s:3:"ꝁ";s:3:"Ꝁ";s:3:"ꝃ";s:3:"Ꝃ";s:3:"ꝅ";s:3:"Ꝅ";s:3:"ꝇ";s:3:"Ꝇ";s:3:"ꝉ";s:3:"Ꝉ";s:3:"ꝋ";s:3:"Ꝋ";s:3:"ꝍ";s:3:"Ꝍ";s:3:"ꝏ";s:3:"Ꝏ";s:3:"ꝑ";s:3:"Ꝑ";s:3:"ꝓ";s:3:"Ꝓ";s:3:"ꝕ";s:3:"Ꝕ";s:3:"ꝗ";s:3:"Ꝗ";s:3:"ꝙ";s:3:"Ꝙ";s:3:"ꝛ";s:3:"Ꝛ";s:3:"ꝝ";s:3:"Ꝝ";s:3:"ꝟ";s:3:"Ꝟ";s:3:"ꝡ";s:3:"Ꝡ";s:3:"ꝣ";s:3:"Ꝣ";s:3:"ꝥ";s:3:"Ꝥ";s:3:"ꝧ";s:3:"Ꝧ";s:3:"ꝩ";s:3:"Ꝩ";s:3:"ꝫ";s:3:"Ꝫ";s:3:"ꝭ";s:3:"Ꝭ";s:3:"ꝯ";s:3:"Ꝯ";s:3:"ꝺ";s:3:"Ꝺ";s:3:"ꝼ";s:3:"Ꝼ";s:3:"ꝿ";s:3:"Ꝿ";s:3:"ꞁ";s:3:"Ꞁ";s:3:"ꞃ";s:3:"Ꞃ";s:3:"ꞅ";s:3:"Ꞅ";s:3:"ꞇ";s:3:"Ꞇ";s:3:"ꞌ";s:3:"Ꞌ";s:3:"ꞑ";s:3:"Ꞑ";s:3:"ꞓ";s:3:"Ꞓ";s:3:"ꞡ";s:3:"Ꞡ";s:3:"ꞣ";s:3:"Ꞣ";s:3:"ꞥ";s:3:"Ꞥ";s:3:"ꞧ";s:3:"Ꞧ";s:3:"ꞩ";s:3:"Ꞩ";s:3:"a";s:3:"A";s:3:"b";s:3:"B";s:3:"c";s:3:"C";s:3:"d";s:3:"D";s:3:"e";s:3:"E";s:3:"f";s:3:"F";s:3:"g";s:3:"G";s:3:"h";s:3:"H";s:3:"i";s:3:"I";s:3:"j";s:3:"J";s:3:"k";s:3:"K";s:3:"l";s:3:"L";s:3:"m";s:3:"M";s:3:"n";s:3:"N";s:3:"o";s:3:"O";s:3:"p";s:3:"P";s:3:"q";s:3:"Q";s:3:"r";s:3:"R";s:3:"s";s:3:"S";s:3:"t";s:3:"T";s:3:"u";s:3:"U";s:3:"v";s:3:"V";s:3:"w";s:3:"W";s:3:"x";s:3:"X";s:3:"y";s:3:"Y";s:3:"z";s:3:"Z";s:4:"𐐨";s:4:"𐐀";s:4:"𐐩";s:4:"𐐁";s:4:"𐐪";s:4:"𐐂";s:4:"𐐫";s:4:"𐐃";s:4:"𐐬";s:4:"𐐄";s:4:"𐐭";s:4:"𐐅";s:4:"𐐮";s:4:"𐐆";s:4:"𐐯";s:4:"𐐇";s:4:"𐐰";s:4:"𐐈";s:4:"𐐱";s:4:"𐐉";s:4:"𐐲";s:4:"𐐊";s:4:"𐐳";s:4:"𐐋";s:4:"𐐴";s:4:"𐐌";s:4:"𐐵";s:4:"𐐍";s:4:"𐐶";s:4:"𐐎";s:4:"𐐷";s:4:"𐐏";s:4:"𐐸";s:4:"𐐐";s:4:"𐐹";s:4:"𐐑";s:4:"𐐺";s:4:"𐐒";s:4:"𐐻";s:4:"𐐓";s:4:"𐐼";s:4:"𐐔";s:4:"𐐽";s:4:"𐐕";s:4:"𐐾";s:4:"𐐖";s:4:"𐐿";s:4:"𐐗";s:4:"𐑀";s:4:"𐐘";s:4:"𐑁";s:4:"𐐙";s:4:"𐑂";s:4:"𐐚";s:4:"𐑃";s:4:"𐐛";s:4:"𐑄";s:4:"𐐜";s:4:"𐑅";s:4:"𐐝";s:4:"𐑆";s:4:"𐐞";s:4:"𐑇";s:4:"𐐟";s:4:"𐑈";s:4:"𐐠";s:4:"𐑉";s:4:"𐐡";s:4:"𐑊";s:4:"𐐢";s:4:"𐑋";s:4:"𐐣";s:4:"𐑌";s:4:"𐐤";s:4:"𐑍";s:4:"𐐥";s:4:"𐑎";s:4:"𐐦";s:4:"𐑏";s:4:"𐐧";} \ No newline at end of file diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8.php b/vendor/patchwork/utf8/class/Patchwork/Utf8.php deleted file mode 100644 index 663cdb25..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8.php +++ /dev/null @@ -1,480 +0,0 @@ - $width) - { - $w = self::str_split($w); - - do - { - $result[] = implode('', array_slice($w, 0, $width)); - $line = implode('', $w = array_slice($w, $width)); - $lineLen = $wLen -= $width; - } - while ($wLen > $width); - - $w = implode('', $w); - } - - $line = $w; - $lineLen = $wLen; - } - } - } - - $line && $result[] = $line; - - return implode($break, $result); - } - - static function chr($c) - { - if (0x80 > $c %= 0x200000) return chr($c); - if (0x800 > $c) return chr(0xC0 | $c>>6) . chr(0x80 | $c & 0x3F); - if (0x10000 > $c) return chr(0xE0 | $c>>12) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F); - return chr(0xF0 | $c>>18) . chr(0x80 | $c>>12 & 0x3F) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F); - } - - static function count_chars($s, $mode = 0) - { - if (1 != $mode) user_error(__METHOD__ . '(): the only allowed $mode is 1', E_USER_WARNING); - $s = self::str_split($s); - return array_count_values($s); - } - - static function ltrim($s, $charlist = INF) - { - $charlist = INF === $charlist ? '\s' : self::rxClass($charlist); - return preg_replace("/^{$charlist}+/u", '', $s); - } - - static function ord($s) - { - $a = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; - if (0xF0 <= $a) return (($a - 0xF0)<<18) + (($s[2] - 0x80)<<12) + (($s[3] - 0x80)<<6) + $s[4] - 0x80; - if (0xE0 <= $a) return (($a - 0xE0)<<12) + (($s[2] - 0x80)<<6) + $s[3] - 0x80; - if (0xC0 <= $a) return (($a - 0xC0)<<6) + $s[2] - 0x80; - return $a; - } - - static function rtrim($s, $charlist = INF) - { - $charlist = INF === $charlist ? '\s' : self::rxClass($charlist); - return preg_replace("/{$charlist}+$/u", '', $s); - } - - static function trim($s, $charlist = INF) {return self::rtrim(self::ltrim($s, $charlist), $charlist);} - - static function str_ireplace($search, $replace, $subject, &$count = null) - { - $search = (array) $search; - foreach ($search as &$s) $s = '' !== (string) $s ? '/' . preg_quote($s, '/') . '/ui' : '/^(?<=.)$/'; - $subject = preg_replace($search, $replace, $subject, -1, $replace); - $count = $replace; - return $subject; - } - - static function str_pad($s, $len, $pad = ' ', $type = STR_PAD_RIGHT) - { - $slen = grapheme_strlen($s); - if ($len <= $slen) return $s; - - $padlen = grapheme_strlen($pad); - $freelen = $len - $slen; - $len = $freelen % $padlen; - - if (STR_PAD_RIGHT == $type) return $s . str_repeat($pad, $freelen / $padlen) . ($len ? grapheme_substr($pad, 0, $len) : ''); - if (STR_PAD_LEFT == $type) return str_repeat($pad, $freelen / $padlen) . ($len ? grapheme_substr($pad, 0, $len) : '') . $s; - if (STR_PAD_BOTH == $type) - { - $freelen /= 2; - - $type = ceil($freelen); - $len = $type % $padlen; - $s .= str_repeat($pad, $type / $padlen) . ($len ? grapheme_substr($pad, 0, $len) : ''); - - $type = floor($freelen); - $len = $type % $padlen; - return str_repeat($pad, $type / $padlen) . ($len ? grapheme_substr($pad, 0, $len) : '') . $s; - } - - user_error(__METHOD__ . '(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH.'); - } - - static function str_shuffle($s) - { - $s = self::str_split($s); - shuffle($s); - return implode('', $s); - } - - static function str_split($s, $len = 1) - { - if (1 > $len = (int) $len) - { - $len = func_get_arg(1); - return str_split($s, $len); - } - -/**/ if (extension_loaded('intl')) -/**/ { - $a = array(); - $p = 0; - $l = strlen($s); - - while ($p < $l) $a[] = grapheme_extract($s, 1, GRAPHEME_EXTR_COUNT, $p, $p); -/**/ } -/**/ else -/**/ { - preg_match_all('/' . GRAPHEME_CLUSTER_RX . '/u', $s, $a); - $a = $a[0]; -/**/ } - - if (1 == $len) return $a; - - $s = array(); - $p = -1; - - foreach ($a as $l => $a) - { - if ($l % $len) $s[$p] .= $a; - else $s[++$p] = $a; - } - - return $s; - } - - static function str_word_count($s, $format = 0, $charlist = '') - { - $charlist = self::rxClass($charlist, '\pL'); - $s = preg_split("/({$charlist}+(?:[\p{Pd}’']{$charlist}+)*)/u", $s, -1, PREG_SPLIT_DELIM_CAPTURE); - - $charlist = array(); - $len = count($s); - - if (1 == $format) for ($i = 1; $i < $len; $i+=2) $charlist[] = $s[$i]; - else if (2 == $format) - { - $offset = grapheme_strlen($s[0]); - for ($i = 1; $i < $len; $i+=2) - { - $charlist[$offset] = $s[$i]; - $offset += grapheme_strlen($s[$i]) + grapheme_strlen($s[$i+1]); - } - } - else $charlist = ($len - 1) / 2; - - return $charlist; - } - - static function strcmp ($a, $b) {return (string) $a === (string) $b ? 0 : strcmp(n::normalize($a, n::NFD), n::normalize($b, n::NFD));} - static function strnatcmp ($a, $b) {return (string) $a === (string) $b ? 0 : strnatcmp(self::strtonatfold($a), self::strtonatfold($b));} - static function strcasecmp ($a, $b) {return self::strcmp (self::strtocasefold($a), self::strtocasefold($b));} - static function strnatcasecmp($a, $b) {return self::strnatcmp(self::strtocasefold($a), self::strtocasefold($b));} - static function strncasecmp ($a, $b, $len) {return self::strncmp(self::strtocasefold($a), self::strtocasefold($b), $len);} - static function strncmp ($a, $b, $len) {return self::strcmp(self::substr($a, 0, $len), self::substr($b, 0, $len));} - - static function strcspn($s, $charlist, $start = 0, $len = 2147483647) - { - if ('' === (string) $charlist) return null; - if ($start || 2147483647 != $len) $s = self::substr($s, $start, $len); - - return preg_match('/^(.*?)' . self::rxClass($charlist) . '/us', $s, $len) ? grapheme_strlen($len[1]) : grapheme_strlen($s); - } - - static function strpbrk($s, $charlist) - { - if (preg_match('/' . self::rxClass($charlist) . '/us', $s, $m)) return substr($s, strpos($s, $m[0])); - else return false; - } - - static function strrev($s) - { - $s = self::str_split($s); - return implode('', array_reverse($s)); - } - - static function strspn($s, $mask, $start = 0, $len = 2147483647) - { - if ($start || 2147483647 != $len) $s = self::substr($s, $start, $len); - return preg_match('/^' . self::rxClass($mask) . '+/u', $s, $s) ? grapheme_strlen($s[0]) : 0; - } - - static function strtr($s, $from, $to = INF) - { - if (INF !== $to) - { - $from = self::str_split($from); - $to = self::str_split($to); - - $a = count($from); - $b = count($to); - - if ($a > $b) $from = array_slice($from, 0, $b); - else if ($a < $b) $to = array_slice($to , 0, $a); - - $from = array_combine($from, $to); - } - - return strtr($s, $from); - } - - static function substr_compare($a, $b, $offset, $len = 2147483647, $i = 0) - { - $a = self::substr($a, $offset, $len); - return $i ? self::strcasecmp($a, $b) : self::strcmp($a, $b); - } - - static function substr_count($s, $needle, $offset = 0, $len = 2147483647) - { - return substr_count(self::substr($s, $offset, $len), $needle); - } - - static function substr_replace($s, $replace, $start, $len = 2147483647) - { - $s = self::str_split($s); - $replace = self::str_split($replace); - array_splice($s, $start, $len, $replace); - return implode('', $s); - } - - static function ucfirst($s) - { - $c = iconv_substr($s, 0, 1, 'UTF-8'); - return self::ucwords($c) . substr($s, strlen($c)); - } - - static function lcfirst($s) - { - $c = iconv_substr($s, 0, 1, 'UTF-8'); - return mb_strtolower($c, 'UTF-8') . substr($s, strlen($c)); - } - - static function ucwords($s) - { - return mb_convert_case($s, MB_CASE_TITLE, 'UTF-8'); - } - - static function number_format($number, $decimals = 0, $dec_point = '.', $thousands_sep = ',') - { -/**/ if (PHP_VERSION_ID < 50400) -/**/ { - if (isset($thousands_sep[1]) || isset($dec_point[1])) - { - return str_replace( - array('.', ','), - array($dec_point, $thousands_sep), - number_format($number, $decimals, '.', ',') - ); - } -/**/ } - - return number_format($number, $decimals, $dec_point, $thousands_sep); - } - - static function utf8_encode($s) - { - $s = utf8_encode($s); - if (false === strpos($s, "\xC2")) return $s; - else return str_replace(self::$cp1252, self::$utf8, $s); - } - - static function utf8_decode($s) - { - $s = str_replace(self::$utf8, self::$cp1252, $s); - return utf8_decode($s); - } - - - protected static function rxClass($s, $class = '') - { - $class = array($class); - - foreach (self::str_split($s) as $s) - { - if ('-' === $s) $class[0] = '-' . $class[0]; - else if (!isset($s[2])) $class[0] .= preg_quote($s, '/'); - else if (1 === iconv_strlen($s, 'UTF-8')) $class[0] .= $s; - else $class[] = $s; - } - - $class[0] = '[' . $class[0] . ']'; - - if (1 === count($class)) return $class[0]; - else return '(?:' . implode('|', $class) . ')'; - } - - protected static function getData($file) - { - $file = __DIR__ . '/Utf8/data/' . $file . '.ser'; - if (file_exists($file)) return unserialize(file_get_contents($file)); - else return false; - } -} diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php deleted file mode 100644 index 015b6ac7..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php +++ /dev/null @@ -1,223 +0,0 @@ -= "\x80" && false !== $w && isset($pre_lead_comb[0]) && preg_match('/^\p{Mn}/u', $v)) - { - // Prevent leading combining chars - // for NFC-safe concatenations. - $v = $pre_lead_comb . $v; - } - } - } - - reset($a[$i]); - unset($a[$i]); - } - } -} diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/iconv.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/iconv.php deleted file mode 100644 index 2d2d6b2b..00000000 --- a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/iconv.php +++ /dev/null @@ -1,48 +0,0 @@ -";i:204;s:2:"<<";i:205;s:2:">>";i:206;s:1:"[";i:207;s:1:"]";i:208;s:1:"[";i:209;s:1:"]";i:210;s:1:"[";i:211;s:1:"]";i:212;s:1:",";i:213;s:1:".";i:214;s:1:"[";i:215;s:1:"]";i:216;s:2:"<<";i:217;s:2:">>";i:218;s:1:"<";i:219;s:1:">";i:220;s:1:"/";i:221;s:2:"||";i:222;s:2:"((";i:223;s:2:"))";}} \ No newline at end of file diff --git a/vendor/patchwork/utf8/composer.json b/vendor/patchwork/utf8/composer.json deleted file mode 100644 index 2180c255..00000000 --- a/vendor/patchwork/utf8/composer.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "patchwork/utf8", - "type": "library", - "description": "UTF-8 strings handling for PHP 5.3: portable, performant and extended", - "keywords": ["utf8","utf-8","unicode","i18n"], - "homepage": "https://github.com/nicolas-grekas/Patchwork-UTF8", - "license": "(Apache-2.0 or GPL-2.0)", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com", - "role": "Developer" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-0": { - "Patchwork": "class/", - "Normalizer": "class/" - } - } -} diff --git a/vendor/psr/log/.gitignore b/vendor/psr/log/.gitignore deleted file mode 100644 index 22d0d82f..00000000 --- a/vendor/psr/log/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor diff --git a/vendor/psr/log/LICENSE b/vendor/psr/log/LICENSE deleted file mode 100644 index 474c952b..00000000 --- a/vendor/psr/log/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/psr/log/Psr/Log/AbstractLogger.php b/vendor/psr/log/Psr/Log/AbstractLogger.php deleted file mode 100644 index 00f90345..00000000 --- a/vendor/psr/log/Psr/Log/AbstractLogger.php +++ /dev/null @@ -1,120 +0,0 @@ -log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * @return null - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * @return null - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * @return null - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * @return null - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * @return null - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * @return null - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * @return null - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } -} diff --git a/vendor/psr/log/Psr/Log/InvalidArgumentException.php b/vendor/psr/log/Psr/Log/InvalidArgumentException.php deleted file mode 100644 index 67f852d1..00000000 --- a/vendor/psr/log/Psr/Log/InvalidArgumentException.php +++ /dev/null @@ -1,7 +0,0 @@ -logger = $logger; - } -} diff --git a/vendor/psr/log/Psr/Log/LoggerInterface.php b/vendor/psr/log/Psr/Log/LoggerInterface.php deleted file mode 100644 index 476bb962..00000000 --- a/vendor/psr/log/Psr/Log/LoggerInterface.php +++ /dev/null @@ -1,114 +0,0 @@ -log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * @return null - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * @return null - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * @return null - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * @return null - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * @return null - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * @return null - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * @return null - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * @return null - */ - abstract public function log($level, $message, array $context = array()); -} diff --git a/vendor/psr/log/Psr/Log/NullLogger.php b/vendor/psr/log/Psr/Log/NullLogger.php deleted file mode 100644 index 553a3c59..00000000 --- a/vendor/psr/log/Psr/Log/NullLogger.php +++ /dev/null @@ -1,27 +0,0 @@ -logger) { }` - * blocks. - */ -class NullLogger extends AbstractLogger -{ - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * @return null - */ - public function log($level, $message, array $context = array()) - { - // noop - } -} diff --git a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php b/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php deleted file mode 100644 index a9328151..00000000 --- a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php +++ /dev/null @@ -1,116 +0,0 @@ - " - * - * Example ->error('Foo') would yield "error Foo" - * - * @return string[] - */ - abstract function getLogs(); - - public function testImplements() - { - $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger()); - } - - /** - * @dataProvider provideLevelsAndMessages - */ - public function testLogsAtAllLevels($level, $message) - { - $logger = $this->getLogger(); - $logger->{$level}($message, array('user' => 'Bob')); - $logger->log($level, $message, array('user' => 'Bob')); - - $expected = array( - $level.' message of level '.$level.' with context: Bob', - $level.' message of level '.$level.' with context: Bob', - ); - $this->assertEquals($expected, $this->getLogs()); - } - - public function provideLevelsAndMessages() - { - return array( - LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), - LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), - LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), - LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), - LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), - LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), - LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), - LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), - ); - } - - /** - * @expectedException Psr\Log\InvalidArgumentException - */ - public function testThrowsOnInvalidLevel() - { - $logger = $this->getLogger(); - $logger->log('invalid level', 'Foo'); - } - - public function testContextReplacement() - { - $logger = $this->getLogger(); - $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); - - $expected = array('info {Message {nothing} Bob Bar a}'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testObjectCastToString() - { - $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString')); - $dummy->expects($this->once()) - ->method('__toString') - ->will($this->returnValue('DUMMY')); - - $this->getLogger()->warning($dummy); - } - - public function testContextCanContainAnything() - { - $context = array( - 'bool' => true, - 'null' => null, - 'string' => 'Foo', - 'int' => 0, - 'float' => 0.5, - 'nested' => array('with object' => new DummyTest), - 'object' => new \DateTime, - 'resource' => fopen('php://memory', 'r'), - ); - - $this->getLogger()->warning('Crazy context data', $context); - } - - public function testContextExceptionKeyCanBeExceptionOrOtherValues() - { - $this->getLogger()->warning('Random message', array('exception' => 'oops')); - $this->getLogger()->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); - } -} - -class DummyTest -{ -} \ No newline at end of file diff --git a/vendor/psr/log/README.md b/vendor/psr/log/README.md deleted file mode 100644 index 574bc1cb..00000000 --- a/vendor/psr/log/README.md +++ /dev/null @@ -1,45 +0,0 @@ -PSR Log -======= - -This repository holds all interfaces/classes/traits related to -[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). - -Note that this is not a logger of its own. It is merely an interface that -describes a logger. See the specification for more details. - -Usage ------ - -If you need a logger, you can use the interface like this: - -```php -logger = $logger; - } - - public function doSomething() - { - if ($this->logger) { - $this->logger->info('Doing work'); - } - - // do something useful - } -} -``` - -You can then pick one of the implementations of the interface to get a logger. - -If you want to implement the interface, you can require this package and -implement `Psr\Log\LoggerInterface` in your code. Please read the -[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -for details. diff --git a/vendor/psr/log/composer.json b/vendor/psr/log/composer.json deleted file mode 100644 index 6bdcc219..00000000 --- a/vendor/psr/log/composer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "psr/log", - "description": "Common interface for logging libraries", - "keywords": ["psr", "psr-3", "log"], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/.gitignore b/vendor/swiftmailer/swiftmailer/.gitignore deleted file mode 100644 index efafaf19..00000000 --- a/vendor/swiftmailer/swiftmailer/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.DS_Store -tests/acceptance.conf.php -tests/smoke.conf.php -build/* -.project -.settings/* -/vendor/ diff --git a/vendor/swiftmailer/swiftmailer/CHANGES b/vendor/swiftmailer/swiftmailer/CHANGES deleted file mode 100644 index 646d838f..00000000 --- a/vendor/swiftmailer/swiftmailer/CHANGES +++ /dev/null @@ -1,121 +0,0 @@ -Changelog -========= - -5.0.0 (2013-04-30) ------------------- - - * changed the license from LGPL to MIT - -4.3.1 (2013-04-11) ------------------- - - * removed usage of the native QP encoder when the charset is not UTF-8 - * fixed usage of uniqid to avoid collisions - * made a performance improvement when tokenizing large headers - * fixed usage of the PHP native QP encoder on PHP 5.4.7+ - -4.3.0 (2013-01-08) ------------------- - - * made the temporary directory configurable via the TMPDIR env variable - * added S/MIME signer and encryption support - -4.2.2 (2012-10-25) ------------------- - - * added the possibility to throttle messages per second in ThrottlerPlugin (mostly for Amazon SES) - * switched mime.qpcontentencoder to automatically use the PHP native encoder on PHP 5.4.7+ - * allowed specifying a whitelist with regular expressions in RedirectingPlugin - -4.2.1 (2012-07-13) ------------------- - - * changed the coding standards to PSR-1/2 - * fixed issue with autoloading - * added NativeQpContentEncoder to enhance performance (for PHP 5.3+) - -4.2.0 (2012-06-29) ------------------- - - * added documentation about how to use the Japanese support introduced in 4.1.8 - * added a way to override the default configuration in a lazy way - * changed the PEAR init script to lazy-load the initialization - * fixed a bug when calling Swift_Preferences before anything else (regression introduced in 4.1.8) - -4.1.8 (2012-06-17) ------------------- - - * added Japanese iso-2022-jp support - * changed the init script to lazy-load the initialization - * fixed docblocks (@id) which caused some problems with libraries parsing the dobclocks - * fixed Swift_Mime_Headers_IdentificationHeader::setId() when passed an array of ids - * fixed encoding of email addresses in headers - * added replacements setter to the Decorator plugin - -4.1.7 (2012-04-26) ------------------- - - * fixed QpEncoder safeMapShareId property - -4.1.6 (2012-03-23) ------------------- - - * reduced the size of serialized Messages - -4.1.5 (2012-01-04) ------------------- - - * enforced Swift_Spool::queueMessage() to return a Boolean - * made an optimization to the memory spool: start the transport only when required - * prevented stream_socket_client() from generating an error and throw a Swift_TransportException instead - * fixed a PHP warning when calling to mail() when safe_mode is off - * many doc tweaks - -4.1.4 (2011-12-16) ------------------- - - * added a memory spool (Swift_MemorySpool) - * fixed too many opened files when sending emails with attachments - -4.1.3 (2011-10-27) ------------------- - - * added STARTTLS support - * added missing @return tags on fluent methods - * added a MessageLogger plugin that logs all sent messages - * added composer.json - -4.1.2 (2011-09-13) ------------------- - - * fixed wrong detection of magic_quotes_runtime - * fixed fatal errors when no To or Subject header has been set - * fixed charset on parameter header continuations - * added documentation about how to install Swiftmailer from the PEAR channel - * fixed various typos and markup problem in the documentation - * fixed warning when cache directory does not exist - * fixed "slashes are escaped" bug - * changed require_once() to require() in autoload - -4.1.1 (2011-07-04) ------------------- - - * added missing file in PEAR package - -4.1.0 (2011-06-30) ------------------- - - * documentation has been converted to ReST - -4.1.0 RC1 (2011-06-17) ----------------------- - -New features: - - * changed the Decorator Plugin to allow replacements in all headers - * added Swift_Mime_Grammar and Swift_Validate to validate an email address - * modified the autoloader to lazy-initialize Swiftmailer - * removed Swift_Mailer::batchSend() - * added NullTransport - * added new plugins: RedirectingPlugin and ImpersonatePlugin - * added a way to send messages asynchronously (Spool) diff --git a/vendor/swiftmailer/swiftmailer/LICENSE b/vendor/swiftmailer/swiftmailer/LICENSE deleted file mode 100644 index fc8a5de7..00000000 --- a/vendor/swiftmailer/swiftmailer/LICENSE +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/vendor/swiftmailer/swiftmailer/README b/vendor/swiftmailer/swiftmailer/README deleted file mode 100644 index eb5f8bcf..00000000 --- a/vendor/swiftmailer/swiftmailer/README +++ /dev/null @@ -1,16 +0,0 @@ -Swift Mailer ------------- - -Swift Mailer is a component based mailing solution for PHP 5. -It is released under the MIT license. - -Homepage: http://swiftmailer.org -Documentation: http://swiftmailer.org/docs -Mailing List: http://groups.google.com/group/swiftmailer -Bugs: https://github.com/swiftmailer/swiftmailer/issues -Repository: https://github.com/swiftmailer/swiftmailer - -Swift Mailer is highly object-oriented by design and lends itself -to use in complex web application with a great deal of flexibility. - -For full details on usage, see the documentation. diff --git a/vendor/swiftmailer/swiftmailer/README.git b/vendor/swiftmailer/swiftmailer/README.git deleted file mode 100644 index b0b4e915..00000000 --- a/vendor/swiftmailer/swiftmailer/README.git +++ /dev/null @@ -1,67 +0,0 @@ -This README applies to anyone who checks out the source from git. - -If you're reading this page on github.com, and you don't have git -installed or know about git, you can download this repository by -using the "download" button on github.com, right above the file -list. - -PREAMBLE: ---------- - -The git repository is structured in the expected way where "master" is the -main branch you should use if you want to have bleeding-edge updates. Any -other branch should be ignored since it will likely contain unstable -and/or experimental developments. - -Generally speaking you should feel safe using the "master" branch in -production code. Anything likely to break will be committed to another -branch. Only bugfixes and clean non-breaking feature additions will be -performed in master. - -All releases (post version 4.0.0) are tagged using the version number of -that release. Earlier versions exist in a subversion repository at the -old sourceforge project page. - - -WHAT IS SWIFT MAILER? ---------------------- - -Swift Mailer is a component based mailing solution for PHP 5. -It is released under the MIT license. - -Homepage: http://swiftmailer.org/ -Documentation: http://swiftmailer.org/docs -Mailing List: http://groups.google.com/group/swiftmailer -Bugs: https://github.com/swiftmailer/swiftmailer/issues -Repository: https://github.com/swiftmailer/swiftmailer - -Swift Mailer is highly object-oriented by design and lends itself -to use in complex web application with a great deal of flexibility. - -For full details on usage, see the documentation. - - -WHY SO MUCH CLUTTER? --------------------- -As you can probably see, there are a lot more files in here than you find in -the pre-packaged versions. That's because I store notes (UML, RFCs etc) in -the repository. - -The main library files live in /lib and the tests live in /tests. You can run -the tests by pointing your web browser at /test-suite, or by running the -command "php test-suite/run.php". Some tests will be "skipped" if -tests/smoke.conf.php and tests/acceptance.conf.php are not editted. This is -harmless and normal. - -If you want to create a bundled-up package from subversion you can do so if -you have Ant (http://ant.apache.org/) installed. Simply run "ant package" -from this directory and the tar.gz file will be created in the /build -directory. - -Running the command "ant" with no arguments will bundle up the package without -compressing it into a tar.gz file. - -Tests can also be run using "ant test" provided php is on your PATH -environment variable. - -EoM diff --git a/vendor/swiftmailer/swiftmailer/VERSION b/vendor/swiftmailer/swiftmailer/VERSION deleted file mode 100644 index eaecc91a..00000000 --- a/vendor/swiftmailer/swiftmailer/VERSION +++ /dev/null @@ -1 +0,0 @@ -Swift-5.0.0 diff --git a/vendor/swiftmailer/swiftmailer/build.xml b/vendor/swiftmailer/swiftmailer/build.xml deleted file mode 100644 index c4e234f6..00000000 --- a/vendor/swiftmailer/swiftmailer/build.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/swiftmailer/swiftmailer/composer.json b/vendor/swiftmailer/swiftmailer/composer.json deleted file mode 100644 index c77793ac..00000000 --- a/vendor/swiftmailer/swiftmailer/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "swiftmailer/swiftmailer", - "type": "library", - "description": "Swiftmailer, free feature-rich PHP mailer", - "keywords": ["mail","mailer"], - "homepage": "http://swiftmailer.org", - "license": "MIT", - "authors": [ - { - "name": "Chris Corbyn" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "require": { - "php": ">=5.2.4" - }, - "autoload": { - "files": ["lib/swift_required.php"] - }, - "extra": { - "branch-alias": { - "dev-master": "5.0-dev" - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/create_pear_package.php b/vendor/swiftmailer/swiftmailer/create_pear_package.php deleted file mode 100644 index 521d6501..00000000 --- a/vendor/swiftmailer/swiftmailer/create_pear_package.php +++ /dev/null @@ -1,42 +0,0 @@ - date('Y-m-d'), - 'time' => date('H:m:00'), - 'version' => $argv[1], - 'api_version' => $argv[1], - 'stability' => $argv[2], - 'api_stability' => $argv[2], -); - -$context['files'] = ''; -$path = realpath(dirname(__FILE__).'/lib/classes/Swift'); -foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::LEAVES_ONLY) as $file) -{ - if (preg_match('/\.php$/', $file)) - { - $name = str_replace($path.'/', '', $file); - $context['files'] .= ' '."\n"; - } -} - -$template = file_get_contents(dirname(__FILE__).'/package.xml.tpl'); -$content = preg_replace_callback('/\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/', 'replace_parameters', $template); -file_put_contents(dirname(__FILE__).'/package.xml', $content); - -function replace_parameters($matches) -{ - global $context; - - return isset($context[$matches[1]]) ? $context[$matches[1]] : null; -} diff --git a/vendor/swiftmailer/swiftmailer/doc/headers.rst b/vendor/swiftmailer/swiftmailer/doc/headers.rst deleted file mode 100644 index 5a7b5396..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/headers.rst +++ /dev/null @@ -1,742 +0,0 @@ -Message Headers -=============== - -Sometimes you'll want to add your own headers to a message or modify/remove -headers that are already present. You work with the message's HeaderSet to do -this. - -Header Basics -------------- - -All MIME entities in Swift Mailer -- including the message itself -- -store their headers in a single object called a HeaderSet. This HeaderSet is -retrieved with the ``getHeaders()`` method. - -As mentioned in the previous chapter, everything that forms a part of a message -in Swift Mailer is a MIME entity that is represented by an instance of -``Swift_Mime_MimeEntity``. This includes -- most notably -- the message object -itself, attachments, MIME parts and embedded images. Each of these MIME entities -consists of a body and a set of headers that describe the body. - -For all of the "standard" headers in these MIME entities, such as the -``Content-Type``, there are named methods for working with them, such as -``setContentType()`` and ``getContentType()``. This is because headers are a -moderately complex area of the library. Each header has a slightly different -required structure that it must meet in order to comply with the standards that -govern email (and that are checked by spam blockers etc). - -You fetch the HeaderSet from a MIME entity like so: - -.. code-block:: php - - $message = Swift_Message::newInstance(); - - // Fetch the HeaderSet from a Message object - $headers = $message->getHeaders(); - - $attachment = Swift_Attachment::fromPath('document.pdf'); - - // Fetch the HeaderSet from an attachment object - $headers = $attachment->getHeaders(); - -The job of the HeaderSet is to contain and manage instances of Header objects. -Depending upon the MIME entity the HeaderSet came from, the contents of the -HeaderSet will be different, since an attachment for example has a different -set of headers to those in a message. - -You can find out what the HeaderSet contains with a quick loop, dumping out -the names of the headers: - -.. code-block:: php - - foreach ($headers->getAll() as $header) { - printf("%s
\n", $header->getFieldName()); - } - - /* - Content-Transfer-Encoding - Content-Type - MIME-Version - Date - Message-ID - From - Subject - To - */ - -You can also dump out the rendered HeaderSet by calling its ``toString()`` -method: - -.. code-block:: php - - echo $headers->toString(); - - /* - Message-ID: <1234869991.499a9ee7f1d5e@swift.generated> - Date: Tue, 17 Feb 2009 22:26:31 +1100 - Subject: Awesome subject! - From: sender@example.org - To: recipient@example.org - MIME-Version: 1.0 - Content-Type: text/plain; charset=utf-8 - Content-Transfer-Encoding: quoted-printable - */ - -Where the complexity comes in is when you want to modify an existing header. -This complexity comes from the fact that each header can be of a slightly -different type (such as a Date header, or a header that contains email -addresses, or a header that has key-value parameters on it!). Each header in the -HeaderSet is an instance of ``Swift_Mime_Header``. They all have common -functionality, but knowing exactly what type of header you're working with will -allow you a little more control. - -You can determine the type of header by comparing the return value of its -``getFieldType()`` method with the constants ``TYPE_TEXT``, -``TYPE_PARAMETERIZED``, ``TYPE_DATE``, ``TYPE_MAILBOX``, ``TYPE_ID`` and -``TYPE_PATH`` which are defined in ``Swift_Mime_Header``. - - -.. code-block:: php - - foreach ($headers->getAll() as $header) { - switch ($header->getFieldType()) { - case Swift_Mime_Header::TYPE_TEXT: $type = 'text'; - break; - case Swift_Mime_Header::TYPE_PARAMETERIZED: $type = 'parameterized'; - break; - case Swift_Mime_Header::TYPE_MAILBOX: $type = 'mailbox'; - break; - case Swift_Mime_Header::TYPE_DATE: $type = 'date'; - break; - case Swift_Mime_Header::TYPE_ID: $type = 'ID'; - break; - case Swift_Mime_Header::TYPE_PATH: $type = 'path'; - break; - } - printf("%s: is a %s header
\n", $header->getFieldName(), $type); - } - - /* - Content-Transfer-Encoding: is a text header - Content-Type: is a parameterized header - MIME-Version: is a text header - Date: is a date header - Message-ID: is a ID header - From: is a mailbox header - Subject: is a text header - To: is a mailbox header - */ - -Headers can be removed from the set, modified within the set, or added to the -set. - -The following sections show you how to work with the HeaderSet and explain the -details of each implementation of ``Swift_Mime_Header`` that may -exist within the HeaderSet. - -Header Types ------------- - -Because all headers are modeled on different data (dates, addresses, text!) -there are different types of Header in Swift Mailer. Swift Mailer attempts to -categorize all possible MIME headers into more general groups, defined by a -small number of classes. - -Text Headers -~~~~~~~~~~~~ - -Text headers are the simplest type of Header. They contain textual information -with no special information included within it -- for example the Subject -header in a message. - -There's nothing particularly interesting about a text header, though it is -probably the one you'd opt to use if you need to add a custom header to a -message. It represents text just like you'd think it does. If the text -contains characters that are not permitted in a message header (such as new -lines, or non-ascii characters) then the header takes care of encoding the -text so that it can be used. - -No header -- including text headers -- in Swift Mailer is vulnerable to -header-injection attacks. Swift Mailer breaks any attempt at header injection by -encoding the dangerous data into a non-dangerous form. - -It's easy to add a new text header to a HeaderSet. You do this by calling the -HeaderSet's ``addTextHeader()`` method. - -.. code-block:: php - - $message = Swift_Message::newInstance(); - - $headers = $message->getHeaders(); - - $headers->addTextHeader('Your-Header-Name', 'the header value'); - -Changing the value of an existing text header is done by calling it's -``setValue()`` method. - -.. code-block:: php - - $subject = $message->getHeaders()->get('Subject'); - - $subject->setValue('new subject'); - -When output via ``toString()``, a text header produces something like the -following: - -.. code-block:: php - - $subject = $message->getHeaders()->get('Subject'); - - $subject->setValue('amazing subject line'); - - echo $subject->toString(); - - /* - - Subject: amazing subject line - - */ - -If the header contains any characters that are outside of the US-ASCII range -however, they will be encoded. This is nothing to be concerned about since -mail clients will decode them back. - -.. code-block:: php - - $subject = $message->getHeaders()->get('Subject'); - - $subject->setValue('contains – dash'); - - echo $subject->toString(); - - /* - - Subject: contains =?utf-8?Q?=E2=80=93?= dash - - */ - -Parameterized Headers -~~~~~~~~~~~~~~~~~~~~~ - -Parameterized headers are text headers that contain key-value parameters -following the textual content. The Content-Type header of a message is a -parameterized header since it contains charset information after the content -type. - -The parameterized header type is a special type of text header. It extends the -text header by allowing additional information to follow it. All of the methods -from text headers are available in addition to the methods described here. - -Adding a parameterized header to a HeaderSet is done by using the -``addParameterizedHeader()`` method which takes a text value like -``addTextHeader()`` but it also accepts an associative array of -key-value parameters. - -.. code-block:: php - - $message = Swift_Message::newInstance(); - - $headers = $message->getHeaders(); - - $headers->addParameterizedHeader( - 'Header-Name', 'header value', - array('foo' => 'bar') - ); - -To change the text value of the header, call it's ``setValue()`` method just as -you do with text headers. - -To change the parameters in the header, call the header's ``setParameters()`` -method or the ``setParameter()`` method (note the pluralization). - -.. code-block:: php - - $type = $message->getHeaders()->get('Content-Type'); - - // setParameters() takes an associative array - $type->setParameters(array( - 'name' => 'file.txt', - 'charset' => 'iso-8859-1' - )); - - // setParameter() takes two args for $key and $value - $type->setParameter('charset', 'iso-8859-1'); - -When output via ``toString()``, a parameterized header produces something like -the following: - -.. code-block:: php - - $type = $message->getHeaders()->get('Content-Type'); - - $type->setValue('text/html'); - $type->setParameter('charset', 'utf-8'); - - echo $type->toString(); - - /* - - Content-Type: text/html; charset=utf-8 - - */ - -If the header contains any characters that are outside of the US-ASCII range -however, they will be encoded, just like they are for text headers. This is -nothing to be concerned about since mail clients will decode them back. -Likewise, if the parameters contain any non-ascii characters they will be -encoded so that they can be transmitted safely. - -.. code-block:: php - - $attachment = Swift_Attachment::newInstance(); - - $disp = $attachment->getHeaders()->get('Content-Disposition'); - - $disp->setValue('attachment'); - $disp->setParameter('filename', 'report–may.pdf'); - - echo $disp->toString(); - - /* - - Content-Disposition: attachment; filename*=utf-8''report%E2%80%93may.pdf - - */ - -Date Headers -~~~~~~~~~~~~ - -Date headers contains an RFC 2822 formatted date (i.e. what PHP's ``date('r')`` -returns). They are used anywhere a date or time is needed to be presented as a -message header. - -The data on which a date header is modeled is simply a UNIX timestamp such as -that returned by ``time()`` or ``strtotime()``. The timestamp is used to create -a correctly structured RFC 2822 formatted date such as -``Tue, 17 Feb 2009 22:26:31 +1100``. - -The obvious place this header type is used is in the ``Date:`` header of the -message itself. - -It's easy to add a new date header to a HeaderSet. You do this by calling -the HeaderSet's ``addDateHeader()`` method. - -.. code-block:: php - - $message = Swift_Message::newInstance(); - - $headers = $message->getHeaders(); - - $headers->addDateHeader('Your-Header-Name', strtotime('3 days ago')); - -Changing the value of an existing date header is done by calling it's -``setTimestamp()`` method. - -.. code-block:: php - - $date = $message->getHeaders()->get('Date'); - - $date->setTimestamp(time()); - -When output via ``toString()``, a date header produces something like the -following: - -.. code-block:: php - - $date = $message->getHeaders()->get('Date'); - - echo $date->toString(); - - /* - - Date: Wed, 18 Feb 2009 13:35:02 +1100 - - */ - -Mailbox (e-mail address) Headers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Mailbox headers contain one or more email addresses, possibly with -personalized names attached to them. The data on which they are modeled is -represented by an associative array of email addresses and names. - -Mailbox headers are probably the most complex header type to understand in -Swift Mailer because they accept their input as an array which can take various -forms, as described in the previous chapter. - -All of the headers that contain e-mail addresses in a message -- with the -exception of ``Return-Path:`` which has a stricter syntax -- use this header -type. That is, ``To:``, ``From:`` etc. - -You add a new mailbox header to a HeaderSet by calling the HeaderSet's -``addMailboxHeader()`` method. - -.. code-block:: php - - $message = Swift_Message::newInstance(); - - $headers = $message->getHeaders(); - - $headers->addMailboxHeader('Your-Header-Name', array( - 'person1@example.org' => 'Person Name One', - 'person2@example.org', - 'person3@example.org', - 'person4@example.org' => 'Another named person' - )); - -Changing the value of an existing mailbox header is done by calling it's -``setNameAddresses()`` method. - -.. code-block:: php - - $to = $message->getHeaders()->get('To'); - - $to->setNameAddresses(array( - 'joe@example.org' => 'Joe Bloggs', - 'john@example.org' => 'John Doe', - 'no-name@example.org' - )); - -If you don't wish to concern yourself with the complicated accepted input -formats accepted by ``setNameAddresses()`` as described in the previous chapter -and you only want to set one or more addresses (not names) then you can just -use the ``setAddresses()`` method instead. - -.. code-block:: php - - $to = $message->getHeaders()->get('To'); - - $to->setAddresses(array( - 'joe@example.org', - 'john@example.org', - 'no-name@example.org' - )); - -.. note:: - - Both methods will accept the above input format in practice. - -If all you want to do is set a single address in the header, you can use a -string as the input parameter to ``setAddresses()`` and/or -``setNameAddresses()``. - -.. code-block:: php - - $to = $message->getHeaders()->get('To'); - - $to->setAddresses('joe-bloggs@example.org'); - -When output via ``toString()``, a mailbox header produces something like the -following: - -.. code-block:: php - - $to = $message->getHeaders()->get('To'); - - $to->setNameAddresses(array( - 'person1@example.org' => 'Name of Person', - 'person2@example.org', - 'person3@example.org' => 'Another Person' - )); - - echo $to->toString(); - - /* - - To: Name of Person , person2@example.org, Another Person - - - */ - -ID Headers -~~~~~~~~~~ - -ID headers contain identifiers for the entity (or the message). The most -notable ID header is the Message-ID header on the message itself. - -An ID that exists inside an ID header looks more-or-less less like an email -address. For example, ``<1234955437.499becad62ec2@example.org>``. -The part to the left of the @ sign is usually unique, based on the current time -and some random factor. The part on the right is usually a domain name. - -Any ID passed to the header's ``setId()`` method absolutely MUST conform to -this structure, otherwise you'll get an Exception thrown at you by Swift Mailer -(a ``Swift_RfcComplianceException``). This is to ensure that the generated -email complies with relevant RFC documents and therefore is less likely to be -blocked as spam. - -It's easy to add a new ID header to a HeaderSet. You do this by calling -the HeaderSet's ``addIdHeader()`` method. - -.. code-block:: php - - $message = Swift_Message::newInstance(); - - $headers = $message->getHeaders(); - - $headers->addIdHeader('Your-Header-Name', '123456.unqiue@example.org'); - -Changing the value of an existing date header is done by calling its -``setId()`` method. - -.. code-block:: php - - $msgId = $message->getHeaders()->get('Message-ID'); - - $msgId->setId(time() . '.' . uniqid('thing') . '@example.org'); - -When output via ``toString()``, an ID header produces something like the -following: - -.. code-block:: php - - $msgId = $message->getHeaders()->get('Message-ID'); - - echo $msgId->toString(); - - /* - - Message-ID: <1234955437.499becad62ec2@example.org> - - */ - -Path Headers -~~~~~~~~~~~~ - -Path headers are like very-restricted mailbox headers. They contain a single -email address with no associated name. The Return-Path header of a message is -a path header. - -You add a new path header to a HeaderSet by calling the HeaderSet's -``addPathHeader()`` method. - -.. code-block:: php - - $message = Swift_Message::newInstance(); - - $headers = $message->getHeaders(); - - $headers->addPathHeader('Your-Header-Name', 'person@example.org'); - - -Changing the value of an existing path header is done by calling its -``setAddress()`` method. - -.. code-block:: php - - $return = $message->getHeaders()->get('Return-Path'); - - $return->setAddress('my-address@example.org'); - -When output via ``toString()``, a path header produces something like the -following: - -.. code-block:: php - - $return = $message->getHeaders()->get('Return-Path'); - - $return->setAddress('person@example.org'); - - echo $return->toString(); - - /* - - Return-Path: - - */ - -Header Operations ------------------ - -Working with the headers in a message involves knowing how to use the methods -on the HeaderSet and on the individual Headers within the HeaderSet. - -Adding new Headers -~~~~~~~~~~~~~~~~~~ - -New headers can be added to the HeaderSet by using one of the provided -``add..Header()`` methods. - -To add a header to a MIME entity (such as the message): - -Get the HeaderSet from the entity by via its ``getHeaders()`` method. - -* Add the header to the HeaderSet by calling one of the ``add..Header()`` - methods. - -The added header will appear in the message when it is sent. - -.. code-block:: php - - // Adding a custom header to a message - $message = Swift_Message::newInstance(); - $headers = $message->getHeaders(); - $headers->addTextHeader('X-Mine', 'something here'); - - // Adding a custom header to an attachment - $attachment = Swift_Attachment::fromPath('/path/to/doc.pdf'); - $attachment->getHeaders()->addDateHeader('X-Created-Time', time()); - -Retrieving Headers -~~~~~~~~~~~~~~~~~~ - -Headers are retrieved through the HeaderSet's ``get()`` and ``getAll()`` -methods. - -To get a header, or several headers from a MIME entity: - -* Get the HeaderSet from the entity by via its ``getHeaders()`` method. - -* Get the header(s) from the HeaderSet by calling either ``get()`` or - ``getAll()``. - -When using ``get()`` a single header is returned that matches the name (case -insensitive) that is passed to it. When using ``getAll()`` with a header name, -an array of headers with that name are returned. Calling ``getAll()`` with no -arguments returns an array of all headers present in the entity. - -.. note:: - - It's valid for some headers to appear more than once in a message (e.g. - the Received header). For this reason ``getAll()`` exists to fetch all - headers with a specified name. In addition, ``get()`` accepts an optional - numerical index, starting from zero to specify which header you want more - specifically. - -.. note:: - - If you want to modify the contents of the header and you don't know for - sure what type of header it is then you may need to check the type by - calling its ``getFieldType()`` method. - - .. code-block:: php - - $headers = $message->getHeaders(); - - // Get the To: header - $toHeader = $headers->get('To'); - - // Get all headers named "X-Foo" - $fooHeaders = $headers->getAll('X-Foo'); - - // Get the second header named "X-Foo" - $foo = $headers->get('X-Foo', 1); - - // Get all headers that are present - $all = $headers->getAll(); - -Check if a Header Exists -~~~~~~~~~~~~~~~~~~~~~~~~ - -You can check if a named header is present in a HeaderSet by calling its -``has()`` method. - -To check if a header exists: - -* Get the HeaderSet from the entity by via its ``getHeaders()`` method. - -* Call the HeaderSet's ``has()`` method specifying the header you're looking - for. - -If the header exists, ``true`` will be returned or ``false`` if not. - -.. note:: - - It's valid for some headers to appear more than once in a message (e.g. - the Received header). For this reason ``has()`` accepts an optional - numerical index, starting from zero to specify which header you want to - check more specifically. - - .. code-block:: php - - $headers = $message->getHeaders(); - - // Check if the To: header exists - if ($headers->has('To')) { - echo 'To: exists'; - } - - // Check if an X-Foo header exists twice (i.e. check for the 2nd one) - if ($headers->has('X-Foo', 1)) { - echo 'Second X-Foo header exists'; - } - -Removing Headers -~~~~~~~~~~~~~~~~ - -Removing a Header from the HeaderSet is done by calling the HeaderSet's -``remove()`` or ``removeAll()`` methods. - -To remove an existing header: - -* Get the HeaderSet from the entity by via its ``getHeaders()`` method. - -* Call the HeaderSet's ``remove()`` or ``removeAll()`` methods specifying the - header you want to remove. - -When calling ``remove()`` a single header will be removed. When calling -``removeAll()`` all headers with the given name will be removed. If no headers -exist with the given name, no errors will occur. - -.. note:: - - It's valid for some headers to appear more than once in a message (e.g. - the Received header). For this reason ``remove()`` accepts an optional - numerical index, starting from zero to specify which header you want to - check more specifically. For the same reason, ``removeAll()`` exists to - remove all headers that have the given name. - - .. code-block:: php - - $headers = $message->getHeaders(); - - // Remove the Subject: header - $headers->remove('Subject'); - - // Remove all X-Foo headers - $headers->removeAll('X-Foo'); - - // Remove only the second X-Foo header - $headers->remove('X-Foo', 1); - -Modifying a Header's Content -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To change a Header's content you should know what type of header it is and then -call it's appropriate setter method. All headers also have a -``setFieldBodyModel()`` method that accepts a mixed parameter and delegates to -the correct setter. - -To modify an existing header: - -* Get the HeaderSet from the entity by via its ``getHeaders()`` method. - -* Get the Header by using the HeaderSet's ``get()``. - -* Call the Header's appropriate setter method or call the header's - ``setFieldBodyModel()`` method. - -The header will be updated inside the HeaderSet and the changes will be seen -when the message is sent. - -.. code-block:: php - - $headers = $message->getHeaders(); - - // Change the Subject: header - $subj = $headers->get('Subject'); - $subj->setValue('new subject here'); - - // Change the To: header - $to = $headers->get('To'); - $to->setNameAddresses(array( - 'person@example.org' => 'Person', - 'thing@example.org' - )); - - // Using the setFieldBodyModel() just delegates to the correct method - // So here to calls setNameAddresses() - $to->setFieldBodyModel(array( - 'person@example.org' => 'Person', - 'thing@example.org' - )); diff --git a/vendor/swiftmailer/swiftmailer/doc/help-resources.rst b/vendor/swiftmailer/swiftmailer/doc/help-resources.rst deleted file mode 100644 index 98206536..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/help-resources.rst +++ /dev/null @@ -1,44 +0,0 @@ -Getting Help -============ - -There are a number of ways you can get help when using Swift Mailer, depending -upon the nature of your problem. For bug reports and feature requests create a -new ticket in Github. For general advice ask on the Google Group -(swiftmailer). - -Submitting Bugs & Feature Requests ----------------------------------- - -Bugs and feature requests should be posted on Github. - -If you post a bug or request a feature in the forum, or on the Google Group -you will most likely be asked to create a ticket in `Github`_ since it is -the simply not feasible to manage such requests from a number of a different -sources. - -When you go to Github you will be asked to create a username and password -before you can create a ticket. This is free and takes very little time. - -When you create your ticket, do not assign it to any milestones. A developer -will assess your ticket and re-assign it as needed. - -If your ticket is reporting a bug present in the current version, which was -not present in the previous version please include the tag "regression" in -your ticket. - -Github will update you when work is performed on your ticket. - -Ask on the Google Group ------------------------ - -You can seek advice at Google Groups, within the "swiftmailer" `group`_. - -You can post messages to this group if you want help, or there's something you -wish to discuss with the developers and with other users. - -This is probably the fastest way to get help since it is primarily email-based -for most users, though bug reports should not be posted here since they may -not be resolved. - -.. _`Github`: https://github.com/swiftmailer/swiftmailer/issues -.. _`group`: http://groups.google.com/group/swiftmailer diff --git a/vendor/swiftmailer/swiftmailer/doc/including-the-files.rst b/vendor/swiftmailer/swiftmailer/doc/including-the-files.rst deleted file mode 100644 index 978dca20..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/including-the-files.rst +++ /dev/null @@ -1,46 +0,0 @@ -Including Swift Mailer (Autoloading) -==================================== - -If you are using Composer, Swift Mailer will be automatically autoloaded. - -If not, you can use the built-in autoloader by requiring the -``swift_required.php`` file:: - - require_once '/path/to/swift-mailer/lib/swift_required.php'; - - /* rest of code goes here */ - -If you want to override the default Swift Mailer configuration, call the -``init()`` method on the ``Swift`` class and pass it a valid PHP callable (a -PHP function name, a PHP 5.3 anonymous function, ...):: - - require_once '/path/to/swift-mailer/lib/swift_required.php'; - - function swiftmailer_configurator() { - // configure Swift Mailer - - Swift_DependencyContainer::getInstance()->... - Swift_Preferences::getInstance()->... - } - - Swift::init('swiftmailer_configurator'); - - /* rest of code goes here */ - -The advantage of using the ``init()`` method is that your code will be -executed only if you use Swift Mailer in your script. - -.. note:: - - While Swift Mailer's autoloader is designed to play nicely with other - autoloaders, sometimes you may have a need to avoid using Swift Mailer's - autoloader and use your own instead. Include the ``swift_init.php`` - instead of the ``swift_required.php`` if you need to do this. The very - minimum include is the ``swift_init.php`` file since Swift Mailer will not - work without the dependency injection this file sets up: - - .. code-block:: php - - require_once '/path/to/swift-mailer/lib/swift_init.php'; - - /* rest of code goes here */ diff --git a/vendor/swiftmailer/swiftmailer/doc/index.rst b/vendor/swiftmailer/swiftmailer/doc/index.rst deleted file mode 100644 index a1a0a924..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/index.rst +++ /dev/null @@ -1,16 +0,0 @@ -Swiftmailer -=========== - -.. toctree:: - :maxdepth: 2 - - introduction - overview - installing - help-resources - including-the-files - messages - headers - sending - plugins - japanese diff --git a/vendor/swiftmailer/swiftmailer/doc/installing.rst b/vendor/swiftmailer/swiftmailer/doc/installing.rst deleted file mode 100644 index 80bdb421..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/installing.rst +++ /dev/null @@ -1,200 +0,0 @@ -Installing the Library -====================== - -Installing Swift Mailer is trivial. Usually it's just a case of uploading the -extracted source files to your web server. - -Installing from PEAR --------------------- - -If you want to install Swift Mailer globally on your machine, the easiest -installation method is using the PEAR channel. - -To install the Swift Mailer PEAR package: - -* Run the command ``pear channel-discover pear.swiftmailer.org``. - -* Then, run the command ``pear install swift/swift``. - -Installing from a Package -------------------------- - -Most users will download a package from the Swift Mailer website and install -Swift Mailer using this. - -If you downloaded Swift Mailer as a ``.tar.gz`` or -``.zip`` file installation is as simple as extracting the archive -and uploading it to your web server. - -Extracting the Library -~~~~~~~~~~~~~~~~~~~~~~ - -You extract the archive by using your favorite unarchiving tool such as -``tar`` or 7-Zip. - -You will need to have access to a program that can open uncompress the -archive. On Windows computers, 7-Zip will work. On Mac and Linux systems you -can use ``tar`` on the command line. - -To extract your downloaded package: - -* Use the "extract" facility of your archiving software. - -The source code will be placed into a directory with the same name as the -archive (e.g. Swift-4.0.0-b1). - -The following example shows the process on Mac OS X and Linux systems using -the ``tar`` command. - -.. code-block:: bash - - $ ls - Swift-4.0.0-dev.tar.gz - $ tar xvzf Swift-4.0.0-dev.tar.gz - Swift-4.0.0-dev/ - Swift-4.0.0-dev/lib/ - Swift-4.0.0-dev/lib/classes/ - Swift-4.0.0-dev/lib/classes/Swift/ - Swift-4.0.0-dev/lib/classes/Swift/ByteStream/ - Swift-4.0.0-dev/lib/classes/Swift/CharacterReader/ - Swift-4.0.0-dev/lib/classes/Swift/CharacterReaderFactory/ - Swift-4.0.0-dev/lib/classes/Swift/CharacterStream/ - Swift-4.0.0-dev/lib/classes/Swift/Encoder/ - - ... etc etc ... - - Swift-4.0.0-dev/tests/unit/Swift/Transport/LoadBalancedTransportTest.php - Swift-4.0.0-dev/tests/unit/Swift/Transport/SendmailTransportTest.php - Swift-4.0.0-dev/tests/unit/Swift/Transport/StreamBufferTest.php - $ cd Swift-4.0.0-dev - $ ls - CHANGES LICENSE ... - $ - -Installing from Git -------------------- - -It's possible to download and install Swift Mailer directly from github.com if -you want to keep up-to-date with ease. - -Swift Mailer's source code is kept in a git repository at github.com so you -can get the source directly from the repository. - -.. note:: - - You do not need to have git installed to use Swift Mailer from github. If - you don't have git installed, go to `github`_ and click the "Download" - button. - -Cloning the Repository -~~~~~~~~~~~~~~~~~~~~~~ - -The repository can be cloned from git://github.com/swiftmailer/swiftmailer.git -using the ``git clone`` command. - -You will need to have ``git`` installed before you can use the -``git clone`` command. - -To clone the repository: - -* Open your favorite terminal environment (command line). - -* Move to the directory you want to clone to. - -* Run the command ``git clone git://github.com/swiftmailer/swiftmailer.git - swiftmailer``. - -The source code will be downloaded into a directory called "swiftmailer". - -The example shows the process on a UNIX-like system such as Linux, BSD or Mac -OS X. - -.. code-block:: bash - - $ cd source_code/ - $ git clone git://github.com/swiftmailer/swiftmailer.git swiftmailer - Initialized empty Git repository in /Users/chris/source_code/swiftmailer/.git/ - remote: Counting objects: 6815, done. - remote: Compressing objects: 100% (2761/2761), done. - remote: Total 6815 (delta 3641), reused 6326 (delta 3286) - Receiving objects: 100% (6815/6815), 4.35 MiB | 162 KiB/s, done. - Resolving deltas: 100% (3641/3641), done. - Checking out files: 100% (1847/1847), done. - $ cd swiftmailer/ - $ ls - CHANGES LICENSE ... - $ - -Uploading to your Host ----------------------- - -You only need to upload the "lib/" directory to your web host for production -use. All other files and directories are support files not needed in -production. - -You will need FTP, ``rsync`` or similar software installed in order to upload -the "lib/" directory to your web host. - -To upload Swift Mailer: - -* Open your FTP program, or a command line if you prefer rsync/scp. - -* Upload the "lib/" directory to your hosting account. - -The files needed to use Swift Mailer should now be accessible to PHP on your -host. - -The following example shows show you can upload the files using -``rsync`` on Linux or OS X. - -.. note:: - - You do not need to place the files inside your web root. They only need to - be in a place where your PHP scripts can "include" them. - - .. code-block:: bash - - $ rsync -rvz lib d11wtq@swiftmailer.org:swiftmailer - building file list ... done - created directory swiftmailer - lib/ - lib/mime_types.php - lib/preferences.php - lib/swift_required.php - lib/classes/ - lib/classes/Swift/ - lib/classes/Swift/Attachment.php - lib/classes/Swift/CharacterReader.php - ... etc etc ... - lib/dependency_maps/ - lib/dependency_maps/cache_deps.php - lib/dependency_maps/mime_deps.php - lib/dependency_maps/transport_deps.php - - sent 151692 bytes received 2974 bytes 5836.45 bytes/sec - total size is 401405 speedup is 2.60 - $ - -.. _`github`: http://github.com/swiftmailer/swiftmailer - -Troubleshooting ---------------- - -Swift Mailer does not work when used with function overloading as implemented -by ``mbstring`` (``mbstring.func_overload`` set to ``2``). A workaround is to -temporarily change the internal encoding to ``ASCII`` when sending an email: - -.. code-block:: php - - if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) - { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('ASCII'); - } - - // Create your message and send it with Swift Mailer - - if (isset($mbEncoding)) - { - mb_internal_encoding($mbEncoding); - } diff --git a/vendor/swiftmailer/swiftmailer/doc/introduction.rst b/vendor/swiftmailer/swiftmailer/doc/introduction.rst deleted file mode 100644 index 39ab034d..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/introduction.rst +++ /dev/null @@ -1,135 +0,0 @@ -Introduction -============ - -Swift Mailer is a component-based library for sending e-mails from PHP -applications. - -Organization of this Book -------------------------- - -This book has been written so that those who need information quickly are able -to find what they need, and those who wish to learn more advanced topics can -read deeper into each chapter. - -The book begins with an overview of Swift Mailer, discussing what's included -in the package and preparing you for the remainder of the book. - -It is possible to read this user guide just like any other book (from -beginning to end). Each chapter begins with a discussion of the contents it -contains, followed by a short code sample designed to give you a head start. -As you get further into a chapter you will learn more about Swift Mailer's -capabilities, but often you will be able to head directly to the topic you -wish to learn about. - -Throughout this book you will be presented with code samples, which most -people should find ample to implement Swift Mailer appropriately in their own -projects. We will also use diagrams where appropriate, and where we believe -readers may find it helpful we will discuss some related theory, including -reference to certain documents you are able to find online. - -Code Samples ------------- - -Code samples presented in this book will be displayed on a different colored -background in a monospaced font. Samples are not to be taken as copy & paste -code snippets. - -Code examples are used through the book to clarify what is written in text. -They will sometimes be usable as-is, but they should always be taken as -outline/pseudo code only. - -A code sample will look like this:: - - class AClass - { - ... - } - - //A Comment - $obj = new AClass($arg1, $arg2, ... ); - - /* A note about another way of doing something - $obj = AClass::newInstance($arg1, $arg2, ... ); - - */ - -The presence of 3 dots ``...`` in a code sample indicates that we have left -out a chunk of the code for brevity, they are not actually part of the code. - -We will often place multi-line comments ``/* ... */`` in the code so that we -can show alternative ways of achieving the same result. - -You should read the code examples given and try to understand them. They are -kept concise so that you are not overwhelmed with information. - -History of Swift Mailer ------------------------ - -Swift Mailer began back in 2005 as a one-class project for sending mail over -SMTP. It has since grown into the flexible component-based library that is in -development today. - -Chris Corbyn first posted Swift Mailer on a web forum asking for comments from -other developers. It was never intended as a fully supported open source -project, but members of the forum began to adopt it and make use of it. - -Very quickly feature requests were coming for the ability to add attachments -and use SMTP authentication, along with a number of other "obvious" missing -features. Considering the only alternative was PHPMailer it seemed like a good -time to bring some fresh tools to the table. Chris began working towards a -more component based, PHP5-like approach unlike the existing single-class, -legacy PHP4 approach taken by PHPMailer. - -Members of the forum offered a lot of advice and critique on the code as he -worked through this project and released versions 2 and 3 of the library in -2005 and 2006, which by then had been broken down into smaller classes -offering more flexibility and supporting plugins. To this day the Swift Mailer -team still receive a lot of feature requests from users both on the forum and -in by email. - -Until 2008 Chris was the sole developer of Swift Mailer, but entering 2009 he -gained the support of two experienced developers well-known to him: Paul -Annesley and Christopher Thompson. This has been an extremely welcome change. - -As of September 2009, Chris handed over the maintenance of Swift Mailer to -Fabien Potencier. - -Now 2009 and in its fourth major version Swift Mailer is more object-oriented -and flexible than ever, both from a usability standpoint and from a -development standpoint. - -By no means is Swift Mailer ready to call "finished". There are still many -features that can be added to the library along with the constant refactoring -that happens behind the scenes. - -It's a Library! ---------------- - -Swift Mailer is not an application - it's a library. - -To most experienced developers this is probably an obvious point to make, but -it's certainly worth mentioning. Many people often contact us having gotten -the completely wrong end of the stick in terms of what Swift Mailer is -actually for. - -It's not an application. It does not have a graphical user interface. It -cannot be opened in your web browser directly. - -It's a library (or a framework if you like). It provides a whole lot of -classes that do some very complicated things, so that you don't have to. You -"use" Swift Mailer within an application so that your application can have the -ability to send emails. - -The component-based structure of the library means that you are free to -implement it in a number of different ways and that you can pick and choose -what you want to use. - -An application on the other hand (such as a blog or a forum) is already "put -together" in a particular way, (usually) provides a graphical user interface -and most likely doesn't offer a great deal of integration with your own -application. - -Embrace the structure of the library and use the components it offers to your -advantage. Learning what the components do, rather than blindly copying and -pasting existing code will put you in a great position to build a powerful -application! diff --git a/vendor/swiftmailer/swiftmailer/doc/japanese.rst b/vendor/swiftmailer/swiftmailer/doc/japanese.rst deleted file mode 100644 index 34afa7b8..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/japanese.rst +++ /dev/null @@ -1,22 +0,0 @@ -Using Swift Mailer for Japanese Emails -====================================== - -To send emails in Japanese, you need to tweak the default configuration. - -After requiring the Swift Mailer autoloader (by including the -``swift_required.php`` file), call the ``Swift::init()`` method with the -following code:: - - require_once '/path/to/swift-mailer/lib/swift_required.php'; - - Swift::init(function () { - Swift_DependencyContainer::getInstance() - ->register('mime.qpheaderencoder') - ->asAliasOf('mime.base64headerencoder'); - - Swift_Preferences::getInstance()->setCharset('iso-2022-jp'); - }); - - /* rest of code goes here */ - -That's all! diff --git a/vendor/swiftmailer/swiftmailer/doc/messages.rst b/vendor/swiftmailer/swiftmailer/doc/messages.rst deleted file mode 100644 index 4a5b54fd..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/messages.rst +++ /dev/null @@ -1,1046 +0,0 @@ -Creating Messages -================= - -Creating messages in Swift Mailer is done by making use of the various MIME -entities provided with the library. Complex messages can be quickly created -with very little effort. - -Quick Reference for Creating a Message ---------------------------------------- - -You can think of creating a Message as being similar to the steps you perform -when you click the Compose button in your mail client. You give it a subject, -specify some recipients, add any attachments and write your message. - -To create a Message: - -* Call the ``newInstance()`` method of ``Swift_Message``. - -* Set your sender address (``From:``) with ``setFrom()`` or ``setSender()``. - -* Set a subject line with ``setSubject()``. - -* Set recipients with ``setTo()``, ``setCc()`` and/or ``setBcc()``. - -* Set a body with ``setBody()``. - -* Add attachments with ``attach()``. - -.. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the message - $message = Swift_Message::newInstance() - - // Give the message a subject - ->setSubject('Your subject') - - // Set the From address with an associative array - ->setFrom(array('john@doe.com' => 'John Doe')) - - // Set the To addresses with an associative array - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - - // Give it a body - ->setBody('Here is the message itself') - - // And optionally an alternative body - ->addPart('Here is the message itself', 'text/html') - - // Optionally add any attachments - ->attach(Swift_Attachment::fromPath('my-document.pdf')) - ; - -Message Basics --------------- - -A message is a container for anything you want to send to somebody else. There -are several basic aspects of a message that you should know. - -An e-mail message is made up of several relatively simple entities that are -combined in different ways to achieve different results. All of these entities -have the same fundamental outline but serve a different purpose. The Message -itself can be defined as a MIME entity, an Attachment is a MIME entity, all -MIME parts are MIME entities -- and so on! - -The basic units of each MIME entity -- be it the Message itself, or an -Attachment -- are its Headers and its body: - -.. code-block:: text - - Header-Name: A header value - Other-Header: Another value - - The body content itself - -The Headers of a MIME entity, and its body must conform to some strict -standards defined by various RFC documents. Swift Mailer ensures that these -specifications are followed by using various types of object, including -Encoders and different Header types to generate the entity. - -The Structure of a Message -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Of all of the MIME entities, a message -- ``Swift_Message`` -is the largest and most complex. It has many properties that can be updated -and it can contain other MIME entities -- attachments for example -- -nested inside it. - -A Message has a lot of different Headers which are there to present -information about the message to the recipients' mail client. Most of these -headers will be familiar to the majority of users, but we'll list the basic -ones. Although it's possible to work directly with the Headers of a Message -(or other MIME entity), the standard Headers have accessor methods provided to -abstract away the complex details for you. For example, although the Date on a -message is written with a strict format, you only need to pass a UNIX -timestamp to ``setDate()``. - -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| Header | Description | Accessors | -+===============================+====================================================================================================================================+=============================================+ -| ``Message-ID`` | Identifies this message with a unique ID, usually containing the domain name and time generated | ``getId()`` / ``setId()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``Return-Path`` | Specifies where bounces should go (Swift Mailer reads this for other uses) | ``getReturnPath()`` / ``setReturnPath()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``From`` | Specifies the address of the person who the message is from. This can be multiple addresses if multiple people wrote the message. | ``getFrom()`` / ``setFrom()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``Sender`` | Specifies the address of the person who physically sent the message (higher precedence than ``From:``) | ``getSender()`` / ``setSender()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``To`` | Specifies the addresses of the intended recipients | ``getTo()`` / ``setTo()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``Cc`` | Specifies the addresses of recipients who will be copied in on the message | ``getCc()`` / ``setCc()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``Bcc`` | Specifies the addresses of recipients who the message will be blind-copied to. Other recipients will not be aware of these copies. | ``getBcc()`` / ``setBcc()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``Reply-To`` | Specifies the address where replies are sent to | ``getReplyTo()`` / ``setReplyTo()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``Subject`` | Specifies the subject line that is displayed in the recipients' mail client | ``getSubject()`` / ``setSubject()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``Date`` | Specifies the date at which the message was sent | ``getDate()`` / ``setDate()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``Content-Type`` | Specifies the format of the message (usually text/plain or text/html) | ``getContentType()`` / ``setContentType()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ -| ``Content-Transfer-Encoding`` | Specifies the encoding scheme in the message | ``getEncoder()`` / ``setEncoder()`` | -+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ - -Working with a Message Object -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Although there are a lot of available methods on a message object, you only -need to make use of a small subset of them. Usually you'll use -``setSubject()``, ``setTo()`` and -``setFrom()`` before setting the body of your message with -``setBody()``. - -Calling methods is simple. You just call them like functions, but using the -object operator "``->``" to do so. If you've created -a message object and called it ``$message`` then you'd set a -subject on it like so: - -.. code-block:: php - - require_once 'lib/swift_required.php'; - - $message = Swift_Message::newInstance(); - $message->setSubject('My subject'); - -All MIME entities (including a message) have a ``toString()`` -method that you can call if you want to take a look at what is going to be -sent. For example, if you ``echo -$message->toString();`` you would see something like this: - -.. code-block:: bash - - Message-ID: <1230173678.4952f5eeb1432@swift.generated> - Date: Thu, 25 Dec 2008 13:54:38 +1100 - Subject: Example subject - From: Chris Corbyn - To: Receiver Name - MIME-Version: 1.0 - Content-Type: text/plain; charset=utf-8 - Content-Transfer-Encoding: quoted-printable - - Here is the message - -We'll take a closer look at the methods you use to create your message in the -following sections. - -Adding Content to Your Message ------------------------------- - -Rich content can be added to messages in Swift Mailer with relative ease by -calling methods such as ``setSubject()``, ``setBody()``, ``addPart()`` and -``attach()``. - -Setting the Subject Line -~~~~~~~~~~~~~~~~~~~~~~~~ - -The subject line, displayed in the recipients' mail client can be set with the -``setSubject()`` method, or as a parameter to ``Swift_Message::newInstance()``. - -To set the subject of your Message: - -* Call the ``setSubject()`` method of the Message, or specify it at the time - you create the message. - - .. code-block:: php - - // Pass it as a parameter when you create the message - $message = Swift_Message::newInstance('My amazing subject'); - - // Or set it after like this - $message->setSubject('My amazing subject'); - -Setting the Body Content -~~~~~~~~~~~~~~~~~~~~~~~~ - -The body of the message -- seen when the user opens the message -- -is specified by calling the ``setBody()`` method. If an alternative body is to -be included ``addPart()`` can be used. - -The body of a message is the main part that is read by the user. Often people -want to send a message in HTML format (``text/html``), other -times people want to send in plain text (``text/plain``), or -sometimes people want to send both versions and allow the recipient to choose -how they view the message. - -As a rule of thumb, if you're going to send a HTML email, always include a -plain-text equivalent of the same content so that users who prefer to read -plain text can do so. - -To set the body of your Message: - -* Call the ``setBody()`` method of the Message, or specify it at the time you - create the message. - -* Add any alternative bodies with ``addPart()``. - -If the recipient's mail client offers preferences for displaying text vs. HTML -then the mail client will present that part to the user where available. In -other cases the mail client will display the "best" part it can - usually HTML -if you've included HTML. - -.. code-block:: php - - // Pass it as a parameter when you create the message - $message = Swift_Message::newInstance('Subject here', 'My amazing body'); - - // Or set it after like this - $message->setBody('My amazing body', 'text/html'); - - // Add alternative parts with addPart() - $message->addPart('My amazing body in plain text', 'text/plain'); - -Attaching Files ---------------- - -Attachments are downloadable parts of a message and can be added by calling -the ``attach()`` method on the message. You can add attachments that exist on -disk, or you can create attachments on-the-fly. - -Attachments are actually an interesting area of Swift Mailer and something -that could put a lot of power at your fingertips if you grasp the concept -behind the way a message is held together. - -Although we refer to files sent over e-mails as "attachments" -- because -they're attached to the message -- lots of other parts of the message are -actually "attached" even if we don't refer to these parts as attachments. - -File attachments are created by the ``Swift_Attachment`` class -and then attached to the message via the ``attach()`` method on -it. For all of the "every day" MIME types such as all image formats, word -documents, PDFs and spreadsheets you don't need to explicitly set the -content-type of the attachment, though it would do no harm to do so. For less -common formats you should set the content-type -- which we'll cover in a -moment. - -Attaching Existing Files -~~~~~~~~~~~~~~~~~~~~~~~~ - -Files that already exist, either on disk or at a URL can be attached to a -message with just one line of code, using ``Swift_Attachment::fromPath()``. - -You can attach files that exist locally, or if your PHP installation has -``allow_url_fopen`` turned on you can attach files from other -websites. - -To attach an existing file: - -* Create an attachment with ``Swift_Attachment::fromPath()``. - -* Add the attachment to the message with ``attach()``. - -The attachment will be presented to the recipient as a downloadable file with -the same filename as the one you attached. - -.. code-block:: php - - // Create the attachment - // * Note that you can technically leave the content-type parameter out - $attachment = Swift_Attachment::fromPath('/path/to/image.jpg', 'image/jpeg'); - - // Attach it to the message - $message->attach($attachment); - - - // The two statements above could be written in one line instead - $message->attach(Swift_Attachment::fromPath('/path/to/image.jpg')); - - - // You can attach files from a URL if allow_url_fopen is on in php.ini - $message->attach(Swift_Attachment::fromPath('http://site.tld/logo.png')); - -Setting the Filename -~~~~~~~~~~~~~~~~~~~~ - -Usually you don't need to explicitly set the filename of an attachment because -the name of the attached file will be used by default, but if you want to set -the filename you use the ``setFilename()`` method of the Attachment. - -To change the filename of an attachment: - -* Call its ``setFilename()`` method. - -The attachment will be attached in the normal way, but meta-data sent inside -the email will rename the file to something else. - -.. code-block:: php - - // Create the attachment and call its setFilename() method - $attachment = Swift_Attachment::fromPath('/path/to/image.jpg') - ->setFilename('cool.jpg'); - - - // Because there's a fluid interface, you can do this in one statement - $message->attach( - Swift_Attachment::fromPath('/path/to/image.jpg')->setFilename('cool.jpg') - ); - -Attaching Dynamic Content -~~~~~~~~~~~~~~~~~~~~~~~~~ - -Files that are generated at runtime, such as PDF documents or images created -via GD can be attached directly to a message without writing them out to disk. -Use the standard ``Swift_Attachment::newInstance()`` method. - -To attach dynamically created content: - -* Create your content as you normally would. - -* Create an attachment with ``Swift_Attachment::newInstance()``, specifying - the source data of your content along with a name and the content-type. - -* Add the attachment to the message with ``attach()``. - -The attachment will be presented to the recipient as a downloadable file -with the filename and content-type you specify. - -.. note:: - - If you would usually write the file to disk anyway you should just attach - it with ``Swift_Attachment::fromPath()`` since this will use less memory: - - .. code-block:: php - - // Create your file contents in the normal way, but don't write them to disk - $data = create_my_pdf_data(); - - // Create the attachment with your data - $attachment = Swift_Attachment::newInstance($data, 'my-file.pdf', 'application/pdf'); - - // Attach it to the message - $message->attach($attachment); - - - // You can alternatively use method chaining to build the attachment - $attachment = Swift_Attachment::newInstance() - ->setFilename('my-file.pdf') - ->setContentType('application/pdf') - ->setBody($data) - ; - -Changing the Disposition -~~~~~~~~~~~~~~~~~~~~~~~~ - -Attachments just appear as files that can be saved to the Desktop if desired. -You can make attachment appear inline where possible by using the -``setDisposition()`` method of an attachment. - -To make an attachment appear inline: - -* Call its ``setDisposition()`` method. - -The attachment will be displayed within the email viewing window if the mail -client knows how to display it. - -.. note:: - - If you try to create an inline attachment for a non-displayable file type - such as a ZIP file, the mail client should just present the attachment as - normal: - - .. code-block:: php - - // Create the attachment and call its setDisposition() method - $attachment = Swift_Attachment::fromPath('/path/to/image.jpg') - ->setDisposition('inline'); - - - // Because there's a fluid interface, you can do this in one statement - $message->attach( - Swift_Attachment::fromPath('/path/to/image.jpg')->setDisposition('inline') - ); - -Embedding Inline Media Files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Often people want to include an image or other content inline with a HTML -message. It's easy to do this with HTML linking to remote resources, but this -approach is usually blocked by mail clients. Swift Mailer allows you to embed -your media directly into the message. - -Mail clients usually block downloads from remote resources because this -technique was often abused as a mean of tracking who opened an email. If -you're sending a HTML email and you want to include an image in the message -another approach you can take is to embed the image directly. - -Swift Mailer makes embedding files into messages extremely streamlined. You -embed a file by calling the ``embed()`` method of the message, -which returns a value you can use in a ``src`` or -``href`` attribute in your HTML. - -Just like with attachments, it's possible to embed dynamically generated -content without having an existing file available. - -The embedded files are sent in the email as a special type of attachment that -has a unique ID used to reference them within your HTML attributes. On mail -clients that do not support embedded files they may appear as attachments. - -Although this is commonly done for images, in theory it will work for any -displayable (or playable) media type. Support for other media types (such as -video) is dependent on the mail client however. - -Embedding Existing Files -........................ - -Files that already exist, either on disk or at a URL can be embedded in a -message with just one line of code, using ``Swift_EmbeddedFile::fromPath()``. - -You can embed files that exist locally, or if your PHP installation has -``allow_url_fopen`` turned on you can embed files from other websites. - -To embed an existing file: - -* Create a message object with ``Swift_Message::newInstance()``. - -* Set the body as HTML, and embed a file at the correct point in the message with ``embed()``. - -The file will be displayed with the message inline with the HTML wherever its ID -is used as a ``src`` attribute. - -.. note:: - - ``Swift_Image`` and ``Swift_EmbeddedFile`` are just aliases of one - another. ``Swift_Image`` exists for semantic purposes. - -.. note:: - - You can embed files in two stages if you prefer. Just capture the return - value of ``embed()`` in a variable and use that as the ``src`` attribute. - - .. code-block:: php - - // Create the message - $message = Swift_Message::newInstance('My subject'); - - // Set the body - $message->setBody( - '' . - ' ' . - ' ' . - ' Here is an image Image' . - ' Rest of message' . - ' ' . - '', - 'text/html' // Mark the content-type as HTML - ); - - // You can embed files from a URL if allow_url_fopen is on in php.ini - $message->setBody( - '' . - ' ' . - ' ' . - ' Here is an image Image' . - ' Rest of message' . - ' ' . - '', - 'text/html' - ); - - - // If placing the embed() code inline becomes cumbersome - // it's easy to do this in two steps - $cid = $message->embed(Swift_Image::fromPath('image.png')); - - $message->setBody( - '' . - ' ' . - ' ' . - ' Here is an image Image' . - ' Rest of message' . - ' ' . - '', - 'text/html' // Mark the content-type as HTML - ); - -Embedding Dynamic Content -......................... - -Images that are generated at runtime, such as images created via GD can be -embedded directly to a message without writing them out to disk. Use the -standard ``Swift_Image::newInstance()`` method. - -To embed dynamically created content: - -* Create a message object with ``Swift_Message::newInstance()``. - -* Set the body as HTML, and embed a file at the correct point in the message - with ``embed()``. You will need to specify a filename and a content-type. - -The file will be displayed with the message inline with the HTML wherever its ID -is used as a ``src`` attribute. - -.. note:: - - ``Swift_Image`` and ``Swift_EmbeddedFile`` are just aliases of one - another. ``Swift_Image`` exists for semantic purposes. - -.. note:: - - You can embed files in two stages if you prefer. Just capture the return - value of ``embed()`` in a variable and use that as the ``src`` attribute. - - .. code-block:: php - - // Create your file contents in the normal way, but don't write them to disk - $img_data = create_my_image_data(); - - //Create the message - $message = Swift_Message::newInstance('My subject'); - - //Set the body - $message->setBody( - '' . - ' ' . - ' ' . - ' Here is an image Image' . - ' Rest of message' . - ' ' . - '', - 'text/html' // Mark the content-type as HTML - ); - - - // If placing the embed() code inline becomes cumbersome - // it's easy to do this in two steps - $cid = $message->embed(Swift_Image::newInstance($img_data, 'image.jpg', 'image/jpeg')); - - $message->setBody( - '' . - ' ' . - ' ' . - ' Here is an image Image' . - ' Rest of message' . - ' ' . - '', - 'text/html' // Mark the content-type as HTML - ); - -Adding Recipients to Your Message ---------------------------------- - -Recipients are specified within the message itself via ``setTo()``, ``setCc()`` -and ``setBcc()``. Swift Mailer reads these recipients from the message when it -gets sent so that it knows where to send the message to. - -Message recipients are one of three types: - -* ``To:`` recipients -- the primary recipients (required) - -* ``Cc:`` recipients -- receive a copy of the message (optional) - -* ``Bcc:`` recipients -- hidden from other recipients (optional) - -Each type can contain one, or several addresses. It's possible to list only -the addresses of the recipients, or you can personalize the address by -providing the real name of the recipient. - -.. sidebar:: Syntax for Addresses - - If you only wish to refer to a single email address (for example your - ``From:`` address) then you can just use a string. - - .. code-block:: php - - $message->setFrom('some@address.tld'); - - If you want to include a name then you must use an associative array. - - .. code-block:: php - - $message->setFrom(array('some@address.tld' => 'The Name')); - - If you want to include multiple addresses then you must use an array. - - .. code-block:: php - - $message->setTo(array('some@address.tld', 'other@address.tld')); - - You can mix personalized (addresses with a name) and non-personalized - addresses in the same list by mixing the use of associative and - non-associative array syntax. - - .. code-block:: php - - $message->setTo(array( - 'recipient-with-name@example.org' => 'Recipient Name One', - 'no-name@example.org', // Note that this is not a key-value pair - 'named-recipient@example.org' => 'Recipient Name Two' - )); - -Setting ``To:`` Recipients -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``To:`` recipients are required in a message and are set with the -``setTo()`` or ``addTo()`` methods of the message. - -To set ``To:`` recipients, create the message object using either -``new Swift_Message( ... )`` or ``Swift_Message::newInstance( ... )``, -then call the ``setTo()`` method with a complete array of addresses, or use the -``addTo()`` method to iteratively add recipients. - -The ``setTo()`` method accepts input in various formats as described earlier in -this chapter. The ``addTo()`` method takes either one or two parameters. The -first being the email address and the second optional parameter being the name -of the recipient. - -``To:`` recipients are visible in the message headers and will be -seen by the other recipients. - -.. note:: - - Multiple calls to ``setTo()`` will not add new recipients -- each - call overrides the previous calls. If you want to iteratively add - recipients, use the ``addTo()`` method. - - .. code-block:: php - - // Using setTo() to set all recipients in one go - $message->setTo(array( - 'person1@example.org', - 'person2@otherdomain.org' => 'Person 2 Name', - 'person3@example.org', - 'person4@example.org', - 'person5@example.org' => 'Person 5 Name' - )); - - // Using addTo() to add recipients iteratively - $message->addTo('person1@example.org'); - $message->addTo('person2@example.org', 'Person 2 Name'); - -Setting ``Cc:`` Recipients -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``Cc:`` recipients are set with the ``setCc()`` or ``addCc()`` methods of the -message. - -To set ``Cc:`` recipients, create the message object using either -``new Swift_Message( ... )`` or ``Swift_Message::newInstance( ... )``, then call -the ``setCc()`` method with a complete array of addresses, or use the -``addCc()`` method to iteratively add recipients. - -The ``setCc()`` method accepts input in various formats as described earlier in -this chapter. The ``addCc()`` method takes either one or two parameters. The -first being the email address and the second optional parameter being the name -of the recipient. - -``Cc:`` recipients are visible in the message headers and will be -seen by the other recipients. - -.. note:: - - Multiple calls to ``setCc()`` will not add new recipients -- each - call overrides the previous calls. If you want to iteratively add Cc: - recipients, use the ``addCc()`` method. - - .. code-block:: php - - // Using setCc() to set all recipients in one go - $message->setCc(array( - 'person1@example.org', - 'person2@otherdomain.org' => 'Person 2 Name', - 'person3@example.org', - 'person4@example.org', - 'person5@example.org' => 'Person 5 Name' - )); - - // Using addCc() to add recipients iteratively - $message->addCc('person1@example.org'); - $message->addCc('person2@example.org', 'Person 2 Name'); - -Setting ``Bcc:`` Recipients -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``Bcc:`` recipients receive a copy of the message without anybody else knowing -it, and are set with the ``setBcc()`` or ``addBcc()`` methods of the message. - -To set ``Bcc:`` recipients, create the message object using either ``new -Swift_Message( ... )`` or ``Swift_Message::newInstance( ... )``, then call the -``setBcc()`` method with a complete array of addresses, or use -the ``addBcc()`` method to iteratively add recipients. - -The ``setBcc()`` method accepts input in various formats as described earlier in -this chapter. The ``addBcc()`` method takes either one or two parameters. The -first being the email address and the second optional parameter being the name -of the recipient. - -Only the individual ``Bcc:`` recipient will see their address in the message -headers. Other recipients (including other ``Bcc:`` recipients) will not see the -address. - -.. note:: - - Multiple calls to ``setBcc()`` will not add new recipients -- each - call overrides the previous calls. If you want to iteratively add Bcc: - recipients, use the ``addBcc()`` method. - - .. code-block:: php - - // Using setBcc() to set all recipients in one go - $message->setBcc(array( - 'person1@example.org', - 'person2@otherdomain.org' => 'Person 2 Name', - 'person3@example.org', - 'person4@example.org', - 'person5@example.org' => 'Person 5 Name' - )); - - // Using addBcc() to add recipients iteratively - $message->addBcc('person1@example.org'); - $message->addBcc('person2@example.org', 'Person 2 Name'); - -Specifying Sender Details -------------------------- - -An email must include information about who sent it. Usually this is managed -by the ``From:`` address, however there are other options. - -The sender information is contained in three possible places: - -* ``From:`` -- the address(es) of who wrote the message (required) - -* ``Sender:`` -- the address of the single person who sent the message - (optional) - -* ``Return-Path:`` -- the address where bounces should go to (optional) - -You must always include a ``From:`` address by using ``setFrom()`` on the -message. Swift Mailer will use this as the default ``Return-Path:`` unless -otherwise specified. - -The ``Sender:`` address exists because the person who actually sent the email -may not be the person who wrote the email. It has a higher precedence than the -``From:`` address and will be used as the ``Return-Path:`` unless otherwise -specified. - -Setting the ``From:`` Address -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -A ``From:`` address is required and is set with the ``setFrom()`` method of the -message. ``From:`` addresses specify who actually wrote the email, and usually who sent it. - -What most people probably don't realise is that you can have more than one -``From:`` address if more than one person wrote the email -- for example if an -email was put together by a committee. - -To set the ``From:`` address(es): - -* Call the ``setFrom()`` method on the Message. - -The ``From:`` address(es) are visible in the message headers and -will be seen by the recipients. - -.. note:: - - If you set multiple ``From:`` addresses then you absolutely must set a - ``Sender:`` address to indicate who physically sent the message. - - .. code-block:: php - - // Set a single From: address - $message->setFrom('your@address.tld'); - - // Set a From: address including a name - $message->setFrom(array('your@address.tld' => 'Your Name')); - - // Set multiple From: addresses if multiple people wrote the email - $message->setFrom(array( - 'person1@example.org' => 'Sender One', - 'person2@example.org' => 'Sender Two' - )); - -Setting the ``Sender:`` Address -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -A ``Sender:`` address specifies who sent the message and is set with the -``setSender()`` method of the message. - -To set the ``Sender:`` address: - -* Call the ``setSender()`` method on the Message. - -The ``Sender:`` address is visible in the message headers and will be seen by -the recipients. - -This address will be used as the ``Return-Path:`` unless otherwise specified. - -.. note:: - - If you set multiple ``From:`` addresses then you absolutely must set a - ``Sender:`` address to indicate who physically sent the message. - -You must not set more than one sender address on a message because it's not -possible for more than one person to send a single message. - -.. code-block:: php - - $message->setSender('your@address.tld'); - -Setting the ``Return-Path:`` (Bounce) Address -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``Return-Path:`` address specifies where bounce notifications should -be sent and is set with the ``setReturnPath()`` method of the message. - -You can only have one ``Return-Path:`` and it must not include -a personal name. - -To set the ``Return-Path:`` address: - -* Call the ``setReturnPath()`` method on the Message. - -Bounce notifications will be sent to this address. - -.. code-block:: php - - $message->setReturnPath('bounces@address.tld'); - - -Signed/Encrypted Message ------------------------- - -To increase the integrity/security of a message it is possible to sign and/or -encrypt an message using one or multiple signers. - -S/MIME -~~~~~~ - -S/MIME can sign and/or encrypt a message using the OpenSSL extension. - -When signing a message, the signer creates a signature of the entire content of the message (including attachments). - -The certificate and private key must be PEM encoded, and can be either created using for example OpenSSL or -obtained at an official Certificate Authority (CA). - -**The recipient must have the CA certificate in the list of trusted issuers in order to verify the signature.** - -**Make sure the certificate supports emailProtection.** - -When using OpenSSL this can done by the including the *-addtrust emailProtection* parameter when creating the certificate. - -.. code-block:: php - - $message = Swift_SignedMessage::newInstance(); - - $smimeSigner = Swift_Signers_SMimeSigner::newInstance(); - $smimeSigner->setSignCertificate('/path/to/certificate.pem', '/path/to/private-key.pem'); - $message->attachSigner($smimeSigner); - -When the private key is secured using a passphrase use the following instead. - -.. code-block:: php - - $message = Swift_SignedMessage::newInstance(); - - $smimeSigner = Swift_Signers_SMimeSigner::newInstance(); - $smimeSigner->setSignCertificate('/path/to/certificate.pem', array('/path/to/private-key.pem', 'passphrase')); - $message->attachSigner($smimeSigner); - -By default the signature is added as attachment, -making the message still readable for mailing agents not supporting signed messages. - -Storing the message as binary is also possible but not recommended. - -.. code-block:: php - - $smimeSigner->setSignCertificate('/path/to/certificate.pem', '/path/to/private-key.pem', PKCS7_BINARY); - -When encrypting the message (also known as enveloping), the entire message (including attachments) -is encrypted using a certificate, and the recipient can then decrypt the message using corresponding private key. - -Encrypting ensures nobody can read the contents of the message without the private key. - -Normally the recipient provides a certificate for encrypting and keeping the decryption key private. - -Using both signing and encrypting is also possible. - -.. code-block:: php - - $message = Swift_SignedMessage::newInstance(); - - $smimeSigner = Swift_Signers_SMimeSigner::newInstance(); - $smimeSigner->setSignCertificate('/path/to/sign-certificate.pem', '/path/to/private-key.pem'); - $smimeSigner->setEncryptCertificate('/path/to/encrypt-certificate.pem'); - $message->attachSigner($smimeSigner); - -The used encryption cipher can be set as the second parameter of setEncryptCertificate() - -See http://php.net/manual/openssl.ciphers for a list of supported ciphers. - -By default the message is first signed and then encrypted, this can be changed by adding. - -.. code-block:: php - - $smimeSigner->setSignThenEncrypt(false); - -**Changing this is not recommended as most mail agents don't support this none-standard way.** - -Only when having trouble with sign then encrypt method, this should be changed. - -Requesting a Read Receipt -------------------------- - -It is possible to request a read-receipt to be sent to an address when the -email is opened. To request a read receipt set the address with -``setReadReceiptTo()``. - -To request a read receipt: - -* Set the address you want the receipt to be sent to with the - ``setReadReceiptTo()`` method on the Message. - -When the email is opened, if the mail client supports it a notification will be sent to this address. - -.. note:: - - Read receipts won't work for the majority of recipients since many mail - clients auto-disable them. Those clients that will send a read receipt - will make the user aware that one has been requested. - - .. code-block:: php - - $message->setReadReceiptTo('your@address.tld'); - -Setting the Character Set -------------------------- - -The character set of the message (and it's MIME parts) is set with the -``setCharset()`` method. You can also change the global default of UTF-8 by -working with the ``Swift_Preferences`` class. - -Swift Mailer will default to the UTF-8 character set unless otherwise -overridden. UTF-8 will work in most instances since it includes all of the -standard US keyboard characters in addition to most international characters. - -It is absolutely vital however that you know what character set your message -(or it's MIME parts) are written in otherwise your message may be received -completely garbled. - -There are two places in Swift Mailer where you can change the character set: - -* In the ``Swift_Preferences`` class - -* On each individual message and/or MIME part - -To set the character set of your Message: - -* Change the global UTF-8 setting by calling - ``Swift_Preferences::setCharset()``; or - -* Call the ``setCharset()`` method on the message or the MIME part. - - .. code-block:: php - - // Approach 1: Change the global setting (suggested) - Swift_Preferences::getInstance()->setCharset('iso-8859-2'); - - // Approach 2: Call the setCharset() method of the message - $message = Swift_Message::newInstance() - ->setCharset('iso-8859-2'); - - // Approach 3: Specify the charset when setting the body - $message->setBody('My body', 'text/html', 'iso-8859-2'); - - // Approach 4: Specify the charset for each part added - $message->addPart('My part', 'text/plain', 'iso-8859-2'); - -Setting the Line Length ------------------------ - -The length of lines in a message can be changed by using the ``setMaxLineLength()`` method on the message. It should be kept to less than -1000 characters. - -Swift Mailer defaults to using 78 characters per line in a message. This is -done for historical reasons and so that the message can be easily viewed in -plain-text terminals. - -To change the maximum length of lines in your Message: - -* Call the ``setMaxLineLength()`` method on the Message. - -Lines that are longer than the line length specified will be wrapped between -words. - -.. note:: - - You should never set a maximum length longer than 1000 characters - according to RFC 2822. Doing so could have unspecified side-effects such - as truncating parts of your message when it is transported between SMTP - servers. - - .. code-block:: php - - $message->setMaxLineLength(1000); - -Setting the Message Priority ----------------------------- - -You can change the priority of the message with ``setPriority()``. Setting the -priority will not change the way your email is sent -- it is purely an -indicative setting for the recipient. - -The priority of a message is an indication to the recipient what significance -it has. Swift Mailer allows you to set the priority by calling the ``setPriority`` method. This method takes an integer value between 1 and 5: - -* Highest -* High -* Normal -* Low -* Lowest - -To set the message priority: - -* Set the priority as an integer between 1 and 5 with the ``setPriority()`` - method on the Message. - -.. code-block:: php - - // Indicate "High" priority - $message->setPriority(2); diff --git a/vendor/swiftmailer/swiftmailer/doc/overview.rst b/vendor/swiftmailer/swiftmailer/doc/overview.rst deleted file mode 100644 index c9126173..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/overview.rst +++ /dev/null @@ -1,161 +0,0 @@ -Library Overview -================ - -Most features (and more) of your every day mail client software are provided -by Swift Mailer, using object-oriented PHP code as the interface. - -In this chapter we will take a short tour of the various components, which put -together form the Swift Mailer library as a whole. You will learn key -terminology used throughout the rest of this book and you will gain a little -understanding of the classes you will work with as you integrate Swift Mailer -into your application. - -This chapter is intended to prepare you for the information contained in the -subsequent chapters of this book. You may choose to skip this chapter if you -are fairly technically minded, though it is likely to save you some time in -the long run if you at least read between the lines here. - -System Requirements -------------------- - -The basic requirements to operate Swift Mailer are extremely minimal and -easily achieved. Historically, Swift Mailer has supported both PHP 4 and PHP 5 -by following a parallel development workflow. Now in it's fourth major -version, and Swift Mailer operates on servers running PHP 5.2 or higher. - -The library aims to work with as many PHP 5 projects as possible: - -* PHP 5.2 or higher, with the SPL extension (standard) - -* Limited network access to connect to remote SMTP servers - -* 8 MB or more memory limit (Swift Mailer uses around 2 MB) - -Component Breakdown -------------------- - -Swift Mailer is made up of many classes. Each of these classes can be grouped -into a general "component" group which describes the task it is designed to -perform. - -We'll take a brief look at the components which form Swift Mailer in this -section of the book. - -The Mailer -~~~~~~~~~~ - -The mailer class, ``Swift_Mailer`` is the central class in the library where -all of the other components meet one another. ``Swift_Mailer`` acts as a sort -of message dispatcher, communicating with the underlying Transport to deliver -your Message to all intended recipients. - -If you were to dig around in the source code for Swift Mailer you'd notice -that ``Swift_Mailer`` itself is pretty bare. It delegates to other objects for -most tasks and in theory, if you knew the internals of Swift Mailer well you -could by-pass this class entirely. We wouldn't advise doing such a thing -however -- there are reasons this class exists: - -* for consistency, regardless of the Transport used - -* to provide abstraction from the internals in the event internal API changes - are made - -* to provide convenience wrappers around aspects of the internal API - -An instance of ``Swift_Mailer`` is created by the developer before sending any -Messages. - -Transports -~~~~~~~~~~ - -Transports are the classes in Swift Mailer that are responsible for -communicating with a service in order to deliver a Message. There are several -types of Transport in Swift Mailer, all of which implement the Swift_Transport -interface and offer underlying start(), stop() and send() methods. - -Typically you will not need to know how a Transport works under-the-surface, -you will only need to know how to create an instance of one, and which one to -use for your environment. - -+---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| Class | Features | Pros/cons | -+=================================+=============================================================================================+===============================================================================================================================================+ -| ``Swift_SmtpTransport`` | Sends messages over SMTP; Supports Authentication; Supports Encryption | Very portable; Pleasingly predictable results; Provides good feedback | -+---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``Swift_SendmailTransport`` | Communicates with a locally installed ``sendmail`` executable (Linux/UNIX) | Quick time-to-run; Provides less-accurate feedback than SMTP; Requires ``sendmail`` installation | -+---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``Swift_MailTransport`` | Uses PHP's built-in ``mail()`` function | Very portable; Potentially unpredictable results; Provides extremely weak feedback | -+---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``Swift_LoadBalancedTransport`` | Cycles through a collection of the other Transports to manage load-reduction | Provides graceful fallback if one Transport fails (e.g. an SMTP server is down); Keeps the load on remote services down by spreading the work | -+---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| ``Swift_FailoverTransport`` | Works in conjunction with a collection of the other Transports to provide high-availability | Provides graceful fallback if one Transport fails (e.g. an SMTP server is down) | -+---------------------------------+---------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - -MIME Entities -~~~~~~~~~~~~~ - -Everything that forms part of a Message is called a MIME Entity. All MIME -entities in Swift Mailer share a common set of features. There are various -types of MIME entity that serve different purposes such as Attachments and -MIME parts. - -An e-mail message is made up of several relatively simple entities that are -combined in different ways to achieve different results. All of these entities -have the same fundamental outline but serve a different purpose. The Message -itself can be defined as a MIME entity, an Attachment is a MIME entity, all -MIME parts are MIME entities -- and so on! - -The basic units of each MIME entity -- be it the Message itself, or an -Attachment -- are its Headers and its body: - -.. code-block:: text - - Other-Header: Another value - - The body content itself - -The Headers of a MIME entity, and its body must conform to some strict -standards defined by various RFC documents. Swift Mailer ensures that these -specifications are followed by using various types of object, including -Encoders and different Header types to generate the entity. - -Each MIME component implements the base ``Swift_Mime_MimeEntity`` interface, -which offers methods for retrieving Headers, adding new Headers, changing the -Encoder, updating the body and so on! - -All MIME entities have one Header in common -- the Content-Type Header, -updated with the entity's ``setContentType()`` method. - -Encoders -~~~~~~~~ - -Encoders are used to transform the content of Messages generated in Swift -Mailer into a format that is safe to send across the internet and that -conforms to RFC specifications. - -Generally speaking you will not need to interact with the Encoders in Swift -Mailer -- the correct settings will be handled by the library itself. -However they are probably worth a brief mention in the event that you do want -to play with them. - -Both the Headers and the body of all MIME entities (including the Message -itself) use Encoders to ensure the data they contain can be sent over the -internet without becoming corrupted or misinterpreted. - -There are two types of Encoder: Base64 and Quoted-Printable. - -Plugins -~~~~~~~ - -Plugins exist to extend, or modify the behaviour of Swift Mailer. They respond -to Events that are fired within the Transports during sending. - -There are a number of Plugins provided as part of the base Swift Mailer -package and they all follow a common interface to respond to Events fired -within the library. Interfaces are provided to "listen" to each type of Event -fired and to act as desired when a listened-to Event occurs. - -Although several plugins are provided with Swift Mailer out-of-the-box, the -Events system has been specifically designed to make it easy for experienced -object-oriented developers to write their own plugins in order to achieve -goals that may not be possible with the base library. diff --git a/vendor/swiftmailer/swiftmailer/doc/plugins.rst b/vendor/swiftmailer/swiftmailer/doc/plugins.rst deleted file mode 100644 index 4a2efa91..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/plugins.rst +++ /dev/null @@ -1,385 +0,0 @@ -Plugins -======= - -Plugins are provided with Swift Mailer and can be used to extend the behavior -of the library in situations where using simple class inheritance would be more complex. - -AntiFlood Plugin ----------------- - -Many SMTP servers have limits on the number of messages that may be sent -during any single SMTP connection. The AntiFlood plugin provides a way to stay -within this limit while still managing a large number of emails. - -A typical limit for a single connection is 100 emails. If the server you -connect to imposes such a limit, it expects you to disconnect after that -number of emails has been sent. You could manage this manually within a loop, -but the AntiFlood plugin provides the necessary wrapper code so that you don't -need to worry about this logic. - -Regardless of limits imposed by the server, it's usually a good idea to be -conservative with the resources of the SMTP server. Sending will become -sluggish if the server is being over-used so using the AntiFlood plugin will -not be a bad idea even if no limits exist. - -The AntiFlood plugin's logic is basically to disconnect and the immediately -re-connect with the SMTP server every X number of emails sent, where X is a -number you specify to the plugin. - -You can also specify a time period in seconds that Swift Mailer should pause -for between the disconnect/re-connect process. It's a good idea to pause for a -short time (say 30 seconds every 100 emails) simply to give the SMTP server a -chance to process its queue and recover some resources. - -Using the AntiFlood Plugin -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The AntiFlood Plugin -- like all plugins -- is added with the Mailer class' -``registerPlugin()`` method. It takes two constructor parameters: the number of -emails to pause after, and optionally the number of seconds to pause for. - -To use the AntiFlood plugin: - -* Create an instance of the Mailer using any Transport you choose. - -* Create an instance of the ``Swift_Plugins_AntiFloodPlugin`` class, passing - in one or two constructor parameters. - -* Register the plugin using the Mailer's ``registerPlugin()`` method. - -* Continue using Swift Mailer to send messages as normal. - -When Swift Mailer sends messages it will count the number of messages that -have been sent since the last re-connect. Once the number hits your specified -threshold it will disconnect and re-connect, optionally pausing for a -specified amount of time. - -.. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the Mailer using any Transport - $mailer = Swift_Mailer::newInstance( - Swift_SmtpTransport::newInstance('smtp.example.org', 25) - ); - - // Use AntiFlood to re-connect after 100 emails - $mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(100)); - - // And specify a time in seconds to pause for (30 secs) - $mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(100, 30)); - - // Continue sending as normal - for ($lotsOfRecipients as $recipient) { - ... - - $mailer->send( ... ); - } - -Throttler Plugin ----------------- - -If your SMTP server has restrictions in place to limit the rate at which you -send emails, then your code will need to be aware of this rate-limiting. The -Throttler plugin makes Swift Mailer run at a rate-limited speed. - -Many shared hosts don't open their SMTP servers as a free-for-all. Usually -they have policies in place (probably to discourage spammers) that only allow -you to send a fixed number of emails per-hour/day. - -The Throttler plugin supports two modes of rate-limiting and with each, you -will need to do that math to figure out the values you want. The plugin can -limit based on the number of emails per minute, or the number of -bytes-transferred per-minute. - -Using the Throttler Plugin -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The Throttler Plugin -- like all plugins -- is added with the Mailer class' -``registerPlugin()`` method. It has two required constructor parameters that -tell it how to do its rate-limiting. - -To use the Throttler plugin: - -* Create an instance of the Mailer using any Transport you choose. - -* Create an instance of the ``Swift_Plugins_ThrottlerPlugin`` class, passing - the number of emails, or bytes you wish to limit by, along with the mode - you're using. - -* Register the plugin using the Mailer's ``registerPlugin()`` method. - -* Continue using Swift Mailer to send messages as normal. - -When Swift Mailer sends messages it will keep track of the rate at which sending -messages is occurring. If it realises that sending is happening too fast, it -will cause your program to ``sleep()`` for enough time to average out the rate. - -.. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the Mailer using any Transport - $mailer = Swift_Mailer::newInstance( - Swift_SmtpTransport::newInstance('smtp.example.org', 25) - ); - - // Rate limit to 100 emails per-minute - $mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin( - 100, Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE - )); - - // Rate limit to 10MB per-minute - $mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin( - 1024 * 1024 * 10, Swift_Plugins_ThrottlerPlugin::BYTES_PER_MINUTE - )); - - // Continue sending as normal - for ($lotsOfRecipients as $recipient) { - ... - - $mailer->send( ... ); - } - -Logger Plugin -------------- - -The Logger plugins helps with debugging during the process of sending. It can -help to identify why an SMTP server is rejecting addresses, or any other -hard-to-find problems that may arise. - -The Logger plugin comes in two parts. There's the plugin itself, along with -one of a number of possible Loggers that you may choose to use. For example, -the logger may output messages directly in realtime, or it may capture -messages in an array. - -One other notable feature is the way in which the Logger plugin changes -Exception messages. If Exceptions are being thrown but the error message does -not provide conclusive information as to the source of the problem (such as an -ambiguous SMTP error) the Logger plugin includes the entire SMTP transcript in -the error message so that debugging becomes a simpler task. - -There are a few available Loggers included with Swift Mailer, but writing your -own implementation is incredibly simple and is achieved by creating a short -class that implements the ``Swift_Plugins_Logger`` interface. - -* ``Swift_Plugins_Loggers_ArrayLogger``: Keeps a collection of log messages - inside an array. The array content can be cleared or dumped out to the - screen. - -* ``Swift_Plugins_Loggers_EchoLogger``: Prints output to the screen in - realtime. Handy for very rudimentary debug output. - -Using the Logger Plugin -~~~~~~~~~~~~~~~~~~~~~~~ - -The Logger Plugin -- like all plugins -- is added with the Mailer class' -``registerPlugin()`` method. It accepts an instance of ``Swift_Plugins_Logger`` -in its constructor. - -To use the Logger plugin: - -* Create an instance of the Mailer using any Transport you choose. - -* Create an instance of the a Logger implementation of - ``Swift_Plugins_Logger``. - -* Create an instance of the ``Swift_Plugins_LoggerPlugin`` class, passing the - created Logger instance to its constructor. - -* Register the plugin using the Mailer's ``registerPlugin()`` method. - -* Continue using Swift Mailer to send messages as normal. - -* Dump the contents of the log with the logger's ``dump()`` method. - -When Swift Mailer sends messages it will keep a log of all the interactions -with the underlying Transport being used. Depending upon the Logger that has -been used the behaviour will differ, but all implementations offer a way to -get the contents of the log. - -.. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the Mailer using any Transport - $mailer = Swift_Mailer::newInstance( - Swift_SmtpTransport::newInstance('smtp.example.org', 25) - ); - - // To use the ArrayLogger - $logger = new Swift_Plugins_Loggers_ArrayLogger(); - $mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger)); - - // Or to use the Echo Logger - $logger = new Swift_Plugins_Loggers_EchoLogger(); - $mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger)); - - // Continue sending as normal - for ($lotsOfRecipients as $recipient) { - ... - - $mailer->send( ... ); - } - - // Dump the log contents - // NOTE: The EchoLogger dumps in realtime so dump() does nothing for it - echo $logger->dump(); - -Decorator Plugin ----------------- - -Often there's a need to send the same message to multiple recipients, but with -tiny variations such as the recipient's name being used inside the message -body. The Decorator plugin aims to provide a solution for allowing these small -differences. - -The decorator plugin works by intercepting the sending process of Swift -Mailer, reading the email address in the To: field and then looking up a set -of replacements for a template. - -While the use of this plugin is simple, it is probably the most commonly -misunderstood plugin due to the way in which it works. The typical mistake -users make is to try registering the plugin multiple times (once for each -recipient) -- inside a loop for example. This is incorrect. - -The Decorator plugin should be registered just once, but containing the list -of all recipients prior to sending. It will use this list of recipients to -find the required replacements during sending. - -Using the Decorator Plugin -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To use the Decorator plugin, simply create an associative array of replacements -based on email addresses and then use the mailer's ``registerPlugin()`` method -to add the plugin. - -First create an associative array of replacements based on the email addresses -you'll be sending the message to. - -.. note:: - - The replacements array becomes a 2-dimensional array whose keys are the - email addresses and whose values are an associative array of replacements - for that email address. The curly braces used in this example can be any - type of syntax you choose, provided they match the placeholders in your - email template. - - .. code-block:: php - - $replacements = array(); - foreach ($users as $user) { - $replacements[$user['email']] = array( - '{username}'=>$user['username'], - '{password}'=>$user['password'] - ); - } - -Now create an instance of the Decorator plugin using this array of replacements -and then register it with the Mailer. Do this only once! - -.. code-block:: php - - $decorator = new Swift_Plugins_DecoratorPlugin($replacements); - - $mailer->registerPlugin($decorator); - -When you create your message, replace elements in the body (and/or the subject -line) with your placeholders. - -.. code-block:: php - - $message = Swift_Message::newInstance() - ->setSubject('Important notice for {username}') - ->setBody( - "Hello {username}, we have reset your password to {password}\n" . - "Please log in and change it at your earliest convenience." - ) - ; - - foreach ($users as $user) { - $message->addTo($user['email']); - } - -When you send this message to each of your recipients listed in your -``$replacements`` array they will receive a message customized for just -themselves. For example, the message used above when received may appear like -this to one user: - -.. code-block:: text - - Subject: Important notice for smilingsunshine2009 - - Hello smilingsunshine2009, we have reset your password to rainyDays - Please log in and change it at your earliest convenience. - -While another use may receive the message as: - -.. code-block:: text - - Subject: Important notice for billy-bo-bob - - Hello billy-bo-bob, we have reset your password to dancingOctopus - Please log in and change it at your earliest convenience. - -While the decorator plugin provides a means to solve this problem, there are -various ways you could tackle this problem without the need for a plugin. -We're trying to come up with a better way ourselves and while we have several -(obvious) ideas we don't quite have the perfect solution to go ahead and -implement it. Watch this space. - -Providing Your Own Replacements Lookup for the Decorator -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Filling an array with replacements may not be the best solution for providing -replacement information to the decorator. If you have a more elegant algorithm -that performs replacement lookups on-the-fly you may provide your own -implementation. - -Providing your own replacements lookup implementation for the Decorator is -simply a matter of passing an instance of ``Swift_Plugins_Decorator_Replacements`` to the decorator plugin's constructor, -rather than passing in an array. - -The Replacements interface is very simple to implement since it has just one -method: ``getReplacementsFor($address)``. - -Imagine you want to look up replacements from a database on-the-fly, you might -provide an implementation that does this. You need to create a small class. - -.. code-block:: php - - class DbReplacements implements Swift_Plugins_Decorator_Replacements { - public function getReplacementsFor($address) { - $sql = sprintf( - "SELECT * FROM user WHERE email = '%s'", - mysql_real_escape_string($address) - ); - - $result = mysql_query($sql); - - if ($row = mysql_fetch_assoc($result)) { - return array( - '{username}'=>$row['username'], - '{password}'=>$row['password'] - ); - } - } - } - -Now all you need to do is pass an instance of your class into the Decorator -plugin's constructor instead of passing an array. - -.. code-block:: php - - $decorator = new Swift_Plugins_DecoratorPlugin(new DbReplacements()); - - $mailer->registerPlugin($decorator); - -For each message sent, the plugin will call your class' ``getReplacementsFor()`` -method to find the array of replacements it needs. - -.. note:: - - If your lookup algorithm is case sensitive, you should transform the - ``$address`` argument as appropriate -- for example by passing it - through ``strtolower()``. diff --git a/vendor/swiftmailer/swiftmailer/doc/sending.rst b/vendor/swiftmailer/swiftmailer/doc/sending.rst deleted file mode 100644 index b3ba9afb..00000000 --- a/vendor/swiftmailer/swiftmailer/doc/sending.rst +++ /dev/null @@ -1,592 +0,0 @@ -Sending Messages -================ - -Quick Reference for Sending a Message -------------------------------------- - -Sending a message is very straightforward. You create a Transport, use it to -create the Mailer, then you use the Mailer to send the message. - -To send a Message: - -* Create a Transport from one of the provided Transports -- - ``Swift_SmtpTransport``, ``Swift_SendmailTransport``, ``Swift_MailTransport`` - or one of the aggregate Transports. - -* Create an instance of the ``Swift_Mailer`` class, using the Transport as - it's constructor parameter. - -* Create a Message. - -* Send the message via the ``send()`` method on the Mailer object. - -.. caution:: - - The ``Swift_SmtpTransport`` and ``Swift_SendmailTransport`` transports use - ``proc_*`` PHP functions, which might not be available on your PHP - installation. You can easily check if that's the case by running the - following PHP script: ``setUsername('your username') - ->setPassword('your password') - ; - - /* - You could alternatively use a different transport such as Sendmail or Mail: - - // Sendmail - $transport = Swift_SendmailTransport::newInstance('/usr/sbin/sendmail -bs'); - - // Mail - $transport = Swift_MailTransport::newInstance(); - */ - - // Create the Mailer using your created Transport - $mailer = Swift_Mailer::newInstance($transport); - - // Create a message - $message = Swift_Message::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - ->setBody('Here is the message itself') - ; - - // Send the message - $result = $mailer->send($message); - -Transport Types -~~~~~~~~~~~~~~~ - -A Transport is the component which actually does the sending. You need to -provide a Transport object to the Mailer class and there are several possible -options. - -Typically you will not need to know how a Transport works under-the-surface, -you will only need to know how to create an instance of one, and which one to -use for your environment. - -The SMTP Transport -.................. - -The SMTP Transport sends messages over the (standardized) Simple Message -Transfer Protocol. It can deal with encryption and authentication. - -The SMTP Transport, ``Swift_SmtpTransport`` is without doubt the most commonly -used Transport because it will work on 99% of web servers (I just made that -number up, but you get the idea). All the server needs is the ability to -connect to a remote (or even local) SMTP server on the correct port number -(usually 25). - -SMTP servers often require users to authenticate with a username and password -before any mail can be sent to other domains. This is easily achieved using -Swift Mailer with the SMTP Transport. - -SMTP is a protocol -- in other words it's a "way" of communicating a job -to be done (i.e. sending a message). The SMTP protocol is the fundamental -basis on which messages are delivered all over the internet 7 days a week, 365 -days a year. For this reason it's the most "direct" method of sending messages -you can use and it's the one that will give you the most power and feedback -(such as delivery failures) when using Swift Mailer. - -Because SMTP is generally run as a remote service (i.e. you connect to it over -the network/internet) it's extremely portable from server-to-server. You can -easily store the SMTP server address and port number in a configuration file -within your application and adjust the settings accordingly if the code is -moved or if the SMTP server is changed. - -Some SMTP servers -- Google for example -- use encryption for security reasons. -Swift Mailer supports using both SSL and TLS encryption settings. - -Using the SMTP Transport -^^^^^^^^^^^^^^^^^^^^^^^^ - -The SMTP Transport is easy to use. Most configuration options can be set with -the constructor. - -To use the SMTP Transport you need to know which SMTP server your code needs -to connect to. Ask your web host if you're not sure. Lots of people ask me who -to connect to -- I really can't answer that since it's a setting that's -extremely specific to your hosting environment. - -To use the SMTP Transport: - -* Call ``Swift_SmtpTransport::newInstance()`` with the SMTP server name and - optionally with a port number (defaults to 25). - -* Use the returned object to create the Mailer. - -A connection to the SMTP server will be established upon the first call to -``send()``. - -.. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the Transport - $transport = Swift_SmtpTransport::newInstance('smtp.example.org', 25); - - // Create the Mailer using your created Transport - $mailer = Swift_Mailer::newInstance($transport); - - /* - It's also possible to use multiple method calls - - $transport = Swift_SmtpTransport::newInstance() - ->setHost('smtp.example.org') - ->setPort(25) - ; - */ - -Encrypted SMTP -^^^^^^^^^^^^^^ - -You can use SSL or TLS encryption with the SMTP Transport by specifying it as -a parameter or with a method call. - -To use encryption with the SMTP Transport: - -* Pass the encryption setting as a third parameter to - ``Swift_SmtpTransport::newInstance()``; or - -* Call the ``setEncryption()`` method on the Transport. - -A connection to the SMTP server will be established upon the first call to -``send()``. The connection will be initiated with the correct encryption -settings. - -.. note:: - - For SSL or TLS encryption to work your PHP installation must have - appropriate OpenSSL transports wrappers. You can check if "tls" and/or - "ssl" are present in your PHP installation by using the PHP function - ``stream_get_transports()`` - - .. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the Transport - $transport = Swift_SmtpTransport::newInstance('smtp.example.org', 587, 'ssl'); - - // Create the Mailer using your created Transport - $mailer = Swift_Mailer::newInstance($transport); - - /* - It's also possible to use multiple method calls - - $transport = Swift_SmtpTransport::newInstance() - ->setHost('smtp.example.org') - ->setPort(587) - ->setEncryption('ssl') - ; - */ - -SMTP with a Username and Password -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Some servers require authentication. You can provide a username and password -with ``setUsername()`` and ``setPassword()`` methods. - -To use a username and password with the SMTP Transport: - -* Create the Transport with ``Swift_SmtpTransport::newInstance()``. - -* Call the ``setUsername()`` and ``setPassword()`` methods on the Transport. - -Your username and password will be used to authenticate upon first connect -when ``send()`` are first used on the Mailer. - -If authentication fails, an Exception of type ``Swift_TransportException`` will -be thrown. - -.. note:: - - If you need to know early whether or not authentication has failed and an - Exception is going to be thrown, call the ``start()`` method on the - created Transport. - - .. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the Transport the call setUsername() and setPassword() - $transport = Swift_SmtpTransport::newInstance('smtp.example.org', 25) - ->setUsername('username') - ->setPassword('password') - ; - - // Create the Mailer using your created Transport - $mailer = Swift_Mailer::newInstance($transport); - -The Sendmail Transport -...................... - -The Sendmail Transport sends messages by communicating with a locally -installed MTA -- such as ``sendmail``. - -The Sendmail Transport, ``Swift_SendmailTransport`` does not directly connect to -any remote services. It is designed for Linux servers that have ``sendmail`` -installed. The Transport starts a local ``sendmail`` process and sends messages -to it. Usually the ``sendmail`` process will respond quickly as it spools your -messages to disk before sending them. - -The Transport is named the Sendmail Transport for historical reasons -(``sendmail`` was the "standard" UNIX tool for sending e-mail for years). It -will send messages using other transfer agents such as Exim or Postfix despite -its name, provided they have the relevant sendmail wrappers so that they can be -started with the correct command-line flags. - -It's a common misconception that because the Sendmail Transport returns a -result very quickly it must therefore deliver messages to recipients quickly --- this is not true. It's not slow by any means, but it's certainly not -faster than SMTP when it comes to getting messages to the intended recipients. -This is because sendmail itself sends the messages over SMTP once they have -been quickly spooled to disk. - -The Sendmail Transport has the potential to be just as smart of the SMTP -Transport when it comes to notifying Swift Mailer about which recipients were -rejected, but in reality the majority of locally installed ``sendmail`` -instances are not configured well enough to provide any useful feedback. As such -Swift Mailer may report successful deliveries where they did in fact fail before -they even left your server. - -You can run the Sendmail Transport in two different modes specified by command -line flags: - -* "``-bs``" runs in SMTP mode so theoretically it will act like the SMTP - Transport - -* "``-t``" runs in piped mode with no feedback, but theoretically faster, - though not advised - -You can think of the Sendmail Transport as a sort of asynchronous SMTP Transport --- though if you have problems with delivery failures you should try using the -SMTP Transport instead. Swift Mailer isn't doing the work here, it's simply -passing the work to somebody else (i.e. ``sendmail``). - -Using the Sendmail Transport -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -To use the Sendmail Transport you simply need to call -``Swift_SendmailTransport::newInstance()`` with the command as a parameter. - -To use the Sendmail Transport you need to know where ``sendmail`` or another MTA -exists on the server. Swift Mailer uses a default value of -``/usr/sbin/sendmail``, which should work on most systems. - -You specify the entire command as a parameter (i.e. including the command line -flags). Swift Mailer supports operational modes of "``-bs``" (default) and -"``-t``". - -.. note:: - - If you run sendmail in "``-t``" mode you will get no feedback as to whether - or not sending has succeeded. Use "``-bs``" unless you have a reason not to. - -To use the Sendmail Transport: - -* Call ``Swift_SendmailTransport::newInstance()`` with the command, including - the correct command line flags. The default is to use ``/usr/sbin/sendmail - -bs`` if this is not specified. - -* Use the returned object to create the Mailer. - -A sendmail process will be started upon the first call to ``send()``. If the -process cannot be started successfully an Exception of type -``Swift_TransportException`` will be thrown. - -.. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the Transport - $transport = Swift_SendmailTransport::newInstance('/usr/sbin/exim -bs'); - - // Create the Mailer using your created Transport - $mailer = Swift_Mailer::newInstance($transport); - -The Mail Transport -.................. - -The Mail Transport sends messages by delegating to PHP's internal -``mail()`` function. - -In my experience -- and others' -- the ``mail()`` function is not particularly -predictable, or helpful. - -Quite notably, the ``mail()`` function behaves entirely differently between -Linux and Windows servers. On linux it uses ``sendmail``, but on Windows it uses -SMTP. - -In order for the ``mail()`` function to even work at all ``php.ini`` needs to be -configured correctly, specifying the location of sendmail or of an SMTP server. - -The problem with ``mail()`` is that it "tries" to simplify things to the point -that it actually makes things more complex due to poor interface design. The -developers of Swift Mailer have gone to a lot of effort to make the Mail -Transport work with a reasonable degree of consistency. - -Serious drawbacks when using this Transport are: - -* Unpredictable message headers - -* Lack of feedback regarding delivery failures - -* Lack of support for several plugins that require real-time delivery feedback - -It's a last resort, and we say that with a passion! - -Using the Mail Transport -^^^^^^^^^^^^^^^^^^^^^^^^ - -To use the Mail Transport you simply need to call -``Swift_MailTransport::newInstance()``. It's unlikely you'll need to configure -the Transport. - -To use the Mail Transport: - -* Call ``Swift_MailTransport::newInstance()``. - -* Use the returned object to create the Mailer. - -Messages will be sent using the ``mail()`` function. - -.. note:: - - The ``mail()`` function can take a ``$additional_parameters`` parameter. - Swift Mailer sets this to "``-f%s``" by default, where the "%s" is - substituted with the address of the sender (via a ``sprintf()``) at send - time. You may override this default by passing an argument to - ``newInstance()``. - - .. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the Transport - $transport = Swift_MailTransport::newInstance(); - - // Create the Mailer using your created Transport - $mailer = Swift_Mailer::newInstance($transport); - -Available Methods for Sending Messages -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The Mailer class offers two methods for sending Messages -- ``send()``. -Each behaves in a slightly different way. - -When a message is sent in Swift Mailer, the Mailer class communicates with -whichever Transport class you have chosen to use. - -Each recipient in the message should either be accepted or rejected by the -Transport. For example, if the domain name on the email address is not -reachable the SMTP Transport may reject the address because it cannot process -it. Whichever method you use -- ``send()`` -- Swift Mailer will return -an integer indicating the number of accepted recipients. - -.. note:: - - It's possible to find out which recipients were rejected -- we'll cover that - later in this chapter. - -Using the ``send()`` Method -........................... - -The ``send()`` method of the ``Swift_Mailer`` class sends a message using -exactly the same logic as your Desktop mail client would use. Just pass it a -Message and get a result. - -To send a Message with ``send()``: - -* Create a Transport from one of the provided Transports -- - ``Swift_SmtpTransport``, ``Swift_SendmailTransport``, - ``Swift_MailTransport`` or one of the aggregate Transports. - -* Create an instance of the ``Swift_Mailer`` class, using the Transport as - it's constructor parameter. - -* Create a Message. - -* Send the message via the ``send()`` method on the Mailer object. - -The message will be sent just like it would be sent if you used your mail -client. An integer is returned which includes the number of successful -recipients. If none of the recipients could be sent to then zero will be -returned, which equates to a boolean ``false``. If you set two -``To:`` recipients and three ``Bcc:`` recipients in the message and all of the -recipients are delivered to successfully then the value 5 will be returned. - -.. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the Transport - $transport = Swift_SmtpTransport::newInstance('localhost', 25); - - // Create the Mailer using your created Transport - $mailer = Swift_Mailer::newInstance($transport); - - // Create a message - $message = Swift_Message::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - ->setBody('Here is the message itself') - ; - - // Send the message - $numSent = $mailer->send($message); - - printf("Sent %d messages\n", $numSent); - - /* Note that often that only the boolean equivalent of the - return value is of concern (zero indicates FALSE) - - if ($mailer->send($message)) - { - echo "Sent\n"; - } - else - { - echo "Failed\n"; - } - - */ - -Sending Emails in Batch -....................... - -If you want to send a separate message to each recipient so that only their -own address shows up in the ``To:`` field, follow the following recipe: - -* Create a Transport from one of the provided Transports -- - ``Swift_SmtpTransport``, ``Swift_SendmailTransport``, - ``Swift_MailTransport`` or one of the aggregate Transports. - -* Create an instance of the ``Swift_Mailer`` class, using the Transport as - it's constructor parameter. - -* Create a Message. - -* Iterate over the recipients and send message via the ``send()`` method on - the Mailer object. - -Each recipient of the messages receives a different copy with only their own -email address on the ``To:`` field. - -.. note:: - - In the following example, two emails are sent. One to each of - ``receiver@domain.org`` and ``other@domain.org``. These recipients will - not be aware of each other. - - .. code-block:: php - - require_once 'lib/swift_required.php'; - - // Create the Transport - $transport = Swift_SmtpTransport::newInstance('localhost', 25); - - // Create the Mailer using your created Transport - $mailer = Swift_Mailer::newInstance($transport); - - // Create a message - $message = Swift_Message::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setBody('Here is the message itself') - ; - - // Send the message - $failedRecipients = array(); - $numSent = 0; - $to = array('receiver@domain.org', 'other@domain.org' => 'A name'); - - foreach ($to as $address => $name) - { - if (is_int($address)) { - $message->setTo($name); - } else { - $message->setTo(array($address => $name)); - } - - $numSent += $mailer->send($message, $failedRecipients); - } - - printf("Sent %d messages\n", $numSent); - -Finding out Rejected Addresses -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -It's possible to get a list of addresses that were rejected by the Transport -by using a by-reference parameter to ``send()``. - -As Swift Mailer attempts to send the message to each address given to it, if a -recipient is rejected it will be added to the array. You can pass an existing -array, otherwise one will be created by-reference. - -Collecting the list of recipients that were rejected can be useful in -circumstances where you need to "prune" a mailing list for example when some -addresses cannot be delivered to. - -Getting Failures By-reference -............................. - -Collecting delivery failures by-reference with the ``send()`` method is as -simple as passing a variable name to the method call. - -To get failed recipients by-reference: - -* Pass a by-reference variable name to the ``send()`` method of the Mailer - class. - -If the Transport rejects any of the recipients, the culprit addresses will be -added to the array provided by-reference. - -.. note:: - - If the variable name does not yet exist, it will be initialized as an - empty array and then failures will be added to that array. If the variable - already exists it will be type-cast to an array and failures will be added - to it. - - .. code-block:: php - - $mailer = Swift_Mailer::newInstance( ... ); - - $message = Swift_Message::newInstance( ... ) - ->setFrom( ... ) - ->setTo(array( - 'receiver@bad-domain.org' => 'Receiver Name', - 'other@domain.org' => 'A name', - 'other-receiver@bad-domain.org' => 'Other Name' - )) - ->setBody( ... ) - ; - - // Pass a variable name to the send() method - if (!$mailer->send($message, $failures)) - { - echo "Failures:"; - print_r($failures); - } - - /* - Failures: - Array ( - 0 => receiver@bad-domain.org, - 1 => other-receiver@bad-domain.org - ) - */ diff --git a/vendor/swiftmailer/swiftmailer/doc/uml/Encoders.graffle b/vendor/swiftmailer/swiftmailer/doc/uml/Encoders.graffle deleted file mode 100644 index f895752b..00000000 Binary files a/vendor/swiftmailer/swiftmailer/doc/uml/Encoders.graffle and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/doc/uml/Mime.graffle b/vendor/swiftmailer/swiftmailer/doc/uml/Mime.graffle deleted file mode 100644 index e1e33cbf..00000000 Binary files a/vendor/swiftmailer/swiftmailer/doc/uml/Mime.graffle and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/doc/uml/Transports.graffle b/vendor/swiftmailer/swiftmailer/doc/uml/Transports.graffle deleted file mode 100644 index 5670e2b6..00000000 Binary files a/vendor/swiftmailer/swiftmailer/doc/uml/Transports.graffle and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php deleted file mode 100644 index ecaf0ef3..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php +++ /dev/null @@ -1,81 +0,0 @@ -createDependenciesFor('mime.attachment') - ); - - $this->setBody($data); - $this->setFilename($filename); - if ($contentType) { - $this->setContentType($contentType); - } - } - - /** - * Create a new Attachment. - * - * @param string|Swift_OutputByteStream $data - * @param string $filename - * @param string $contentType - * - * @return Swift_Mime_Attachment - */ - public static function newInstance($data = null, $filename = null, $contentType = null) - { - return new self($data, $filename, $contentType); - } - - /** - * Create a new Attachment from a filesystem path. - * - * @param string $path - * @param string $contentType optional - * - * @return Swift_Mime_Attachment - */ - public static function fromPath($path, $contentType = null) - { - return self::newInstance()->setFile( - new Swift_ByteStream_FileByteStream($path), - $contentType - ); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php deleted file mode 100644 index 87b64284..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php +++ /dev/null @@ -1,183 +0,0 @@ -_filters[$key] = $filter; - } - - /** - * Remove an already present StreamFilter based on its $key. - * - * @param string $key - */ - public function removeFilter($key) - { - unset($this->_filters[$key]); - } - - /** - * Writes $bytes to the end of the stream. - * - * @param string $bytes - * - * @return integer - * - * @throws Swift_IoException - */ - public function write($bytes) - { - $this->_writeBuffer .= $bytes; - foreach ($this->_filters as $filter) { - if ($filter->shouldBuffer($this->_writeBuffer)) { - return; - } - } - $this->_doWrite($this->_writeBuffer); - - return ++$this->_sequence; - } - - /** - * For any bytes that are currently buffered inside the stream, force them - * off the buffer. - * - * @throws Swift_IoException - */ - public function commit() - { - $this->_doWrite($this->_writeBuffer); - } - - /** - * Attach $is to this stream. - * - * The stream acts as an observer, receiving all data that is written. - * All {@link write()} and {@link flushBuffers()} operations will be mirrored. - * - * @param Swift_InputByteStream $is - */ - public function bind(Swift_InputByteStream $is) - { - $this->_mirrors[] = $is; - } - - /** - * Remove an already bound stream. - * - * If $is is not bound, no errors will be raised. - * If the stream currently has any buffered data it will be written to $is - * before unbinding occurs. - * - * @param Swift_InputByteStream $is - */ - public function unbind(Swift_InputByteStream $is) - { - foreach ($this->_mirrors as $k => $stream) { - if ($is === $stream) { - if ($this->_writeBuffer !== '') { - $stream->write($this->_filter($this->_writeBuffer)); - } - unset($this->_mirrors[$k]); - } - } - } - - /** - * Flush the contents of the stream (empty it) and set the internal pointer - * to the beginning. - * - * @throws Swift_IoException - */ - public function flushBuffers() - { - if ($this->_writeBuffer !== '') { - $this->_doWrite($this->_writeBuffer); - } - $this->_flush(); - - foreach ($this->_mirrors as $stream) { - $stream->flushBuffers(); - } - } - - // -- Private methods - - /** Run $bytes through all filters */ - private function _filter($bytes) - { - foreach ($this->_filters as $filter) { - $bytes = $filter->filter($bytes); - } - - return $bytes; - } - - /** Just write the bytes to the stream */ - private function _doWrite($bytes) - { - $this->_commit($this->_filter($bytes)); - - foreach ($this->_mirrors as $stream) { - $stream->write($bytes); - } - - $this->_writeBuffer = ''; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php deleted file mode 100644 index 5c162483..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php +++ /dev/null @@ -1,186 +0,0 @@ -_array = $stack; - $this->_arraySize = count($stack); - } elseif (is_string($stack)) { - $this->write($stack); - } else { - $this->_array = array(); - } - } - - /** - * Reads $length bytes from the stream into a string and moves the pointer - * through the stream by $length. - * - * If less bytes exist than are requested the - * remaining bytes are given instead. If no bytes are remaining at all, boolean - * false is returned. - * - * @param integer $length - * - * @return string - */ - public function read($length) - { - if ($this->_offset == $this->_arraySize) { - return false; - } - - // Don't use array slice - $end = $length + $this->_offset; - $end = $this->_arraySize<$end - ?$this->_arraySize - :$end; - $ret = ''; - for (; $this->_offset < $end; ++$this->_offset) { - $ret .= $this->_array[$this->_offset]; - } - - return $ret; - } - - /** - * Writes $bytes to the end of the stream. - * - * @param string $bytes - */ - public function write($bytes) - { - $to_add = str_split($bytes); - foreach ($to_add as $value) { - $this->_array[] = $value; - } - $this->_arraySize = count($this->_array); - - foreach ($this->_mirrors as $stream) { - $stream->write($bytes); - } - } - - /** - * Not used. - */ - public function commit() - { - } - - /** - * Attach $is to this stream. - * - * The stream acts as an observer, receiving all data that is written. - * All {@link write()} and {@link flushBuffers()} operations will be mirrored. - * - * @param Swift_InputByteStream $is - */ - public function bind(Swift_InputByteStream $is) - { - $this->_mirrors[] = $is; - } - - /** - * Remove an already bound stream. - * - * If $is is not bound, no errors will be raised. - * If the stream currently has any buffered data it will be written to $is - * before unbinding occurs. - * - * @param Swift_InputByteStream $is - */ - public function unbind(Swift_InputByteStream $is) - { - foreach ($this->_mirrors as $k => $stream) { - if ($is === $stream) { - unset($this->_mirrors[$k]); - } - } - } - - /** - * Move the internal read pointer to $byteOffset in the stream. - * - * @param integer $byteOffset - * - * @return boolean - */ - public function setReadPointer($byteOffset) - { - if ($byteOffset > $this->_arraySize) { - $byteOffset = $this->_arraySize; - } elseif ($byteOffset < 0) { - $byteOffset = 0; - } - - $this->_offset = $byteOffset; - } - - /** - * Flush the contents of the stream (empty it) and set the internal pointer - * to the beginning. - */ - public function flushBuffers() - { - $this->_offset = 0; - $this->_array = array(); - $this->_arraySize = 0; - - foreach ($this->_mirrors as $stream) { - $stream->flushBuffers(); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php deleted file mode 100644 index 405f8b05..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php +++ /dev/null @@ -1,225 +0,0 @@ -_path = $path; - $this->_mode = $writable ? 'w+b' : 'rb'; - - if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() == 1) { - $this->_quotes = true; - } - } - - /** - * Get the complete path to the file. - * - * @return string - */ - public function getPath() - { - return $this->_path; - } - - /** - * Reads $length bytes from the stream into a string and moves the pointer - * through the stream by $length. - * - * If less bytes exist than are requested the - * remaining bytes are given instead. If no bytes are remaining at all, boolean - * false is returned. - * - * @param integer $length - * - * @return string - * - * @throws Swift_IoException - */ - public function read($length) - { - $fp = $this->_getReadHandle(); - if (!feof($fp)) { - if ($this->_quotes) { - ini_set('magic_quotes_runtime', 0); - } - $bytes = fread($fp, $length); - if ($this->_quotes) { - ini_set('magic_quotes_runtime', 1); - } - $this->_offset = ftell($fp); - - return $bytes; - } else { - $this->_resetReadHandle(); - - return false; - } - } - - /** - * Move the internal read pointer to $byteOffset in the stream. - * - * @param integer $byteOffset - * - * @return boolean - */ - public function setReadPointer($byteOffset) - { - if (isset($this->_reader)) { - $this->_seekReadStreamToPosition($byteOffset); - } - $this->_offset = $byteOffset; - } - - // -- Private methods - - /** Just write the bytes to the file */ - protected function _commit($bytes) - { - fwrite($this->_getWriteHandle(), $bytes); - $this->_resetReadHandle(); - } - - /** Not used */ - protected function _flush() - { - } - - /** Get the resource for reading */ - private function _getReadHandle() - { - if (!isset($this->_reader)) { - if (!$this->_reader = fopen($this->_path, 'rb')) { - throw new Swift_IoException( - 'Unable to open file for reading [' . $this->_path . ']' - ); - } - if ($this->_offset <> 0) { - $this->_getReadStreamSeekableStatus(); - $this->_seekReadStreamToPosition($this->_offset); - } - } - - return $this->_reader; - } - - /** Get the resource for writing */ - private function _getWriteHandle() - { - if (!isset($this->_writer)) { - if (!$this->_writer = fopen($this->_path, $this->_mode)) { - throw new Swift_IoException( - 'Unable to open file for writing [' . $this->_path . ']' - ); - } - } - - return $this->_writer; - } - - /** Force a reload of the resource for reading */ - private function _resetReadHandle() - { - if (isset($this->_reader)) { - fclose($this->_reader); - $this->_reader = null; - } - } - - /** Check if ReadOnly Stream is seekable */ - private function _getReadStreamSeekableStatus() - { - $metas = stream_get_meta_data($this->_reader); - $this->_seekable = $metas['seekable']; - } - - /** Streams in a readOnly stream ensuring copy if needed */ - private function _seekReadStreamToPosition($offset) - { - if ($this->_seekable===null) { - $this->_getReadStreamSeekableStatus(); - } - if ($this->_seekable === false) { - $currentPos = ftell($this->_reader); - if ($currentPos<$offset) { - $toDiscard = $offset-$currentPos; - fread($this->_reader, $toDiscard); - - return; - } - $this->_copyReadStream(); - } - fseek($this->_reader, $offset, SEEK_SET); - } - - /** Copy a readOnly Stream to ensure seekability */ - private function _copyReadStream() - { - if ($tmpFile = fopen('php://temp/maxmemory:4096', 'w+b')) { - /* We have opened a php:// Stream Should work without problem */ - } elseif (function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()) && ($tmpFile = tmpfile())) { - /* We have opened a tmpfile */ - } else { - throw new Swift_IoException('Unable to copy the file to make it seekable, sys_temp_dir is not writable, php://memory not available'); - } - $currentPos = ftell($this->_reader); - fclose($this->_reader); - $source = fopen($this->_path, 'rb'); - if (!$source) { - throw new Swift_IoException('Unable to open file for copying [' . $this->_path . ']'); - } - fseek($tmpFile, 0, SEEK_SET); - while (!feof($source)) { - fwrite($tmpFile, fread($source, 4096)); - } - fseek($tmpFile, $currentPos, SEEK_SET); - fclose($source); - $this->_reader = $tmpFile; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php deleted file mode 100644 index f35f885e..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php +++ /dev/null @@ -1,44 +0,0 @@ -getPath())) === false) { - throw new Swift_IoException('Failed to get temporary file content.'); - } - - return $content; - } - - public function __destruct() - { - if (file_exists($this->getPath())) { - @unlink($this->getPath()); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php deleted file mode 100644 index df64d8a3..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php +++ /dev/null @@ -1,69 +0,0 @@ - - */ -interface Swift_CharacterReader -{ - const MAP_TYPE_INVALID = 0x01; - const MAP_TYPE_FIXED_LEN = 0x02; - const MAP_TYPE_POSITIONS = 0x03; - - /** - * Returns the complete character map - * - * @param string $string - * @param integer $startOffset - * @param array $currentMap - * @param mixed $ignoredChars - * - * @return integer - */ - public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars); - - /** - * Returns the mapType, see constants. - * - * @return integer - */ - public function getMapType(); - - /** - * Returns an integer which specifies how many more bytes to read. - * - * A positive integer indicates the number of more bytes to fetch before invoking - * this method again. - * - * A value of zero means this is already a valid character. - * A value of -1 means this cannot possibly be a valid character. - * - * @param integer[] $bytes - * @param integer $size - * - * @return integer - */ - public function validateByteSequence($bytes, $size); - - /** - * Returns the number of bytes which should be read to start each character. - * - * For fixed width character sets this should be the number of octets-per-character. - * For multibyte character sets this will probably be 1. - * - * @return integer - */ - public function getInitialByteSize(); -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php deleted file mode 100644 index 49d7398c..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php +++ /dev/null @@ -1,99 +0,0 @@ - - */ -class Swift_CharacterReader_GenericFixedWidthReader implements Swift_CharacterReader -{ - /** - * The number of bytes in a single character. - * - * @var integer - */ - private $_width; - - /** - * Creates a new GenericFixedWidthReader using $width bytes per character. - * - * @param integer $width - */ - public function __construct($width) - { - $this->_width = $width; - } - - /** - * Returns the complete character map. - * - * @param string $string - * @param integer $startOffset - * @param array $currentMap - * @param mixed $ignoredChars - * - * @return integer - */ - public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) - { - $strlen = strlen($string); - // % and / are CPU intensive, so, maybe find a better way - $ignored = $strlen % $this->_width; - $ignoredChars = substr($string, - $ignored); - $currentMap = $this->_width; - - return ($strlen - $ignored) / $this->_width; - } - - /** - * Returns the mapType. - * - * @return integer - */ - public function getMapType() - { - return self::MAP_TYPE_FIXED_LEN; - } - - /** - * Returns an integer which specifies how many more bytes to read. - * - * A positive integer indicates the number of more bytes to fetch before invoking - * this method again. - * - * A value of zero means this is already a valid character. - * A value of -1 means this cannot possibly be a valid character. - * - * @param string $bytes - * @param integer $size - * - * @return integer - */ - public function validateByteSequence($bytes, $size) - { - $needed = $this->_width - $size; - - return ($needed > -1) ? $needed : -1; - } - - /** - * Returns the number of bytes which should be read to start each character. - * - * @return integer - */ - public function getInitialByteSize() - { - return $this->_width; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php deleted file mode 100644 index 18f3b04c..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php +++ /dev/null @@ -1,85 +0,0 @@ -"\x07F") { // Invalid char - $currentMap[$i+$startOffset]=$string[$i]; - } - } - - return $strlen; - } - - /** - * Returns mapType - * - * @return integer mapType - */ - public function getMapType() - { - return self::MAP_TYPE_INVALID; - } - - /** - * Returns an integer which specifies how many more bytes to read. - * - * A positive integer indicates the number of more bytes to fetch before invoking - * this method again. - * A value of zero means this is already a valid character. - * A value of -1 means this cannot possibly be a valid character. - * - * @param string $bytes - * @param integer $size - * - * @return integer - */ - public function validateByteSequence($bytes, $size) - { - $byte = reset($bytes); - if (1 == count($bytes) && $byte >= 0x00 && $byte <= 0x7F) { - return 0; - } else { - return -1; - } - } - - /** - * Returns the number of bytes which should be read to start each character. - * - * @return integer - */ - public function getInitialByteSize() - { - return 1; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php deleted file mode 100644 index dd3a60fb..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php +++ /dev/null @@ -1,181 +0,0 @@ - - */ -class Swift_CharacterReader_Utf8Reader implements Swift_CharacterReader -{ - /** Pre-computed for optimization */ - private static $length_map=array( - //N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x0N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x1N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x2N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x3N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x4N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x5N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x6N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x7N - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0x8N - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0x9N - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0xAN - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0xBN - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, //0xCN - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, //0xDN - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, //0xEN - 4,4,4,4,4,4,4,4,5,5,5,5,6,6,0,0 //0xFN - ); - - private static $s_length_map=array( - "\x00"=>1, "\x01"=>1, "\x02"=>1, "\x03"=>1, "\x04"=>1, "\x05"=>1, "\x06"=>1, "\x07"=>1, - "\x08"=>1, "\x09"=>1, "\x0a"=>1, "\x0b"=>1, "\x0c"=>1, "\x0d"=>1, "\x0e"=>1, "\x0f"=>1, - "\x10"=>1, "\x11"=>1, "\x12"=>1, "\x13"=>1, "\x14"=>1, "\x15"=>1, "\x16"=>1, "\x17"=>1, - "\x18"=>1, "\x19"=>1, "\x1a"=>1, "\x1b"=>1, "\x1c"=>1, "\x1d"=>1, "\x1e"=>1, "\x1f"=>1, - "\x20"=>1, "\x21"=>1, "\x22"=>1, "\x23"=>1, "\x24"=>1, "\x25"=>1, "\x26"=>1, "\x27"=>1, - "\x28"=>1, "\x29"=>1, "\x2a"=>1, "\x2b"=>1, "\x2c"=>1, "\x2d"=>1, "\x2e"=>1, "\x2f"=>1, - "\x30"=>1, "\x31"=>1, "\x32"=>1, "\x33"=>1, "\x34"=>1, "\x35"=>1, "\x36"=>1, "\x37"=>1, - "\x38"=>1, "\x39"=>1, "\x3a"=>1, "\x3b"=>1, "\x3c"=>1, "\x3d"=>1, "\x3e"=>1, "\x3f"=>1, - "\x40"=>1, "\x41"=>1, "\x42"=>1, "\x43"=>1, "\x44"=>1, "\x45"=>1, "\x46"=>1, "\x47"=>1, - "\x48"=>1, "\x49"=>1, "\x4a"=>1, "\x4b"=>1, "\x4c"=>1, "\x4d"=>1, "\x4e"=>1, "\x4f"=>1, - "\x50"=>1, "\x51"=>1, "\x52"=>1, "\x53"=>1, "\x54"=>1, "\x55"=>1, "\x56"=>1, "\x57"=>1, - "\x58"=>1, "\x59"=>1, "\x5a"=>1, "\x5b"=>1, "\x5c"=>1, "\x5d"=>1, "\x5e"=>1, "\x5f"=>1, - "\x60"=>1, "\x61"=>1, "\x62"=>1, "\x63"=>1, "\x64"=>1, "\x65"=>1, "\x66"=>1, "\x67"=>1, - "\x68"=>1, "\x69"=>1, "\x6a"=>1, "\x6b"=>1, "\x6c"=>1, "\x6d"=>1, "\x6e"=>1, "\x6f"=>1, - "\x70"=>1, "\x71"=>1, "\x72"=>1, "\x73"=>1, "\x74"=>1, "\x75"=>1, "\x76"=>1, "\x77"=>1, - "\x78"=>1, "\x79"=>1, "\x7a"=>1, "\x7b"=>1, "\x7c"=>1, "\x7d"=>1, "\x7e"=>1, "\x7f"=>1, - "\x80"=>0, "\x81"=>0, "\x82"=>0, "\x83"=>0, "\x84"=>0, "\x85"=>0, "\x86"=>0, "\x87"=>0, - "\x88"=>0, "\x89"=>0, "\x8a"=>0, "\x8b"=>0, "\x8c"=>0, "\x8d"=>0, "\x8e"=>0, "\x8f"=>0, - "\x90"=>0, "\x91"=>0, "\x92"=>0, "\x93"=>0, "\x94"=>0, "\x95"=>0, "\x96"=>0, "\x97"=>0, - "\x98"=>0, "\x99"=>0, "\x9a"=>0, "\x9b"=>0, "\x9c"=>0, "\x9d"=>0, "\x9e"=>0, "\x9f"=>0, - "\xa0"=>0, "\xa1"=>0, "\xa2"=>0, "\xa3"=>0, "\xa4"=>0, "\xa5"=>0, "\xa6"=>0, "\xa7"=>0, - "\xa8"=>0, "\xa9"=>0, "\xaa"=>0, "\xab"=>0, "\xac"=>0, "\xad"=>0, "\xae"=>0, "\xaf"=>0, - "\xb0"=>0, "\xb1"=>0, "\xb2"=>0, "\xb3"=>0, "\xb4"=>0, "\xb5"=>0, "\xb6"=>0, "\xb7"=>0, - "\xb8"=>0, "\xb9"=>0, "\xba"=>0, "\xbb"=>0, "\xbc"=>0, "\xbd"=>0, "\xbe"=>0, "\xbf"=>0, - "\xc0"=>2, "\xc1"=>2, "\xc2"=>2, "\xc3"=>2, "\xc4"=>2, "\xc5"=>2, "\xc6"=>2, "\xc7"=>2, - "\xc8"=>2, "\xc9"=>2, "\xca"=>2, "\xcb"=>2, "\xcc"=>2, "\xcd"=>2, "\xce"=>2, "\xcf"=>2, - "\xd0"=>2, "\xd1"=>2, "\xd2"=>2, "\xd3"=>2, "\xd4"=>2, "\xd5"=>2, "\xd6"=>2, "\xd7"=>2, - "\xd8"=>2, "\xd9"=>2, "\xda"=>2, "\xdb"=>2, "\xdc"=>2, "\xdd"=>2, "\xde"=>2, "\xdf"=>2, - "\xe0"=>3, "\xe1"=>3, "\xe2"=>3, "\xe3"=>3, "\xe4"=>3, "\xe5"=>3, "\xe6"=>3, "\xe7"=>3, - "\xe8"=>3, "\xe9"=>3, "\xea"=>3, "\xeb"=>3, "\xec"=>3, "\xed"=>3, "\xee"=>3, "\xef"=>3, - "\xf0"=>4, "\xf1"=>4, "\xf2"=>4, "\xf3"=>4, "\xf4"=>4, "\xf5"=>4, "\xf6"=>4, "\xf7"=>4, - "\xf8"=>5, "\xf9"=>5, "\xfa"=>5, "\xfb"=>5, "\xfc"=>6, "\xfd"=>6, "\xfe"=>0, "\xff"=>0, - ); - - /** - * Returns the complete character map. - * - * @param string $string - * @param integer $startOffset - * @param array $currentMap - * @param mixed $ignoredChars - * - * @return integer - */ - public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) - { - if (!isset($currentMap['i']) || ! isset($currentMap['p'])) { - $currentMap['p'] = $currentMap['i'] = array(); - } - - $strlen=strlen($string); - $charPos=count($currentMap['p']); - $foundChars=0; - $invalid=false; - for ($i = 0; $i < $strlen; ++$i) { - $char = $string[$i]; - $size = self::$s_length_map[$char]; - if ($size == 0) { - /* char is invalid, we must wait for a resync */ - $invalid = true; - continue; - } else { - if ($invalid == true) { - /* We mark the chars as invalid and start a new char */ - $currentMap['p'][$charPos + $foundChars] = $startOffset + $i; - $currentMap['i'][$charPos + $foundChars] = true; - ++$foundChars; - $invalid = false; - } - if (($i + $size) > $strlen) { - $ignoredChars = substr($string, $i); - break; - } - for ($j = 1; $j < $size; ++$j) { - $char = $string[$i + $j]; - if ($char > "\x7F" && $char < "\xC0") { - // Valid - continue parsing - } else { - /* char is invalid, we must wait for a resync */ - $invalid = true; - continue 2; - } - } - /* Ok we got a complete char here */ - $currentMap['p'][$charPos + $foundChars] = $startOffset + $i + $size; - $i += $j - 1; - ++$foundChars; - } - } - - return $foundChars; - } - - /** - * Returns mapType. - * - * @return integer mapType - */ - public function getMapType() - { - return self::MAP_TYPE_POSITIONS; - } - - /** - * Returns an integer which specifies how many more bytes to read. - * - * A positive integer indicates the number of more bytes to fetch before invoking - * this method again. - * A value of zero means this is already a valid character. - * A value of -1 means this cannot possibly be a valid character. - * - * @param string $bytes - * @param integer $size - * - * @return integer - */ - public function validateByteSequence($bytes, $size) - { - if ($size<1) { - return -1; - } - $needed = self::$length_map[$bytes[0]] - $size; - - return ($needed > -1) - ? $needed - : -1 - ; - } - - /** - * Returns the number of bytes which should be read to start each character. - * - * @return integer - */ - public function getInitialByteSize() - { - return 1; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php deleted file mode 100644 index d653b813..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php +++ /dev/null @@ -1,28 +0,0 @@ -init(); - } - - public function __wakeup() - { - $this->init(); - } - - public function init() - { - if (count(self::$_map) > 0) { - return; - } - - $prefix = 'Swift_CharacterReader_'; - - $singleByte = array( - 'class' => $prefix . 'GenericFixedWidthReader', - 'constructor' => array(1) - ); - - $doubleByte = array( - 'class' => $prefix . 'GenericFixedWidthReader', - 'constructor' => array(2) - ); - - $fourBytes = array( - 'class' => $prefix . 'GenericFixedWidthReader', - 'constructor' => array(4) - ); - - //Utf-8 - self::$_map['utf-?8'] = array( - 'class' => $prefix . 'Utf8Reader', - 'constructor' => array() - ); - - //7-8 bit charsets - self::$_map['(us-)?ascii'] = $singleByte; - self::$_map['(iso|iec)-?8859-?[0-9]+'] = $singleByte; - self::$_map['windows-?125[0-9]'] = $singleByte; - self::$_map['cp-?[0-9]+'] = $singleByte; - self::$_map['ansi'] = $singleByte; - self::$_map['macintosh'] = $singleByte; - self::$_map['koi-?7'] = $singleByte; - self::$_map['koi-?8-?.+'] = $singleByte; - self::$_map['mik'] = $singleByte; - self::$_map['(cork|t1)'] = $singleByte; - self::$_map['v?iscii'] = $singleByte; - - //16 bits - self::$_map['(ucs-?2|utf-?16)'] = $doubleByte; - - //32 bits - self::$_map['(ucs-?4|utf-?32)'] = $fourBytes; - - //Fallback - self::$_map['.*'] = $singleByte; - } - - /** - * Returns a CharacterReader suitable for the charset applied. - * - * @param string $charset - * - * @return Swift_CharacterReader - */ - public function getReaderFor($charset) - { - $charset = trim(strtolower($charset)); - foreach (self::$_map as $pattern => $spec) { - $re = '/^' . $pattern . '$/D'; - if (preg_match($re, $charset)) { - if (!array_key_exists($pattern, self::$_loaded)) { - $reflector = new ReflectionClass($spec['class']); - if ($reflector->getConstructor()) { - $reader = $reflector->newInstanceArgs($spec['constructor']); - } else { - $reader = $reflector->newInstance(); - } - self::$_loaded[$pattern] = $reader; - } - - return self::$_loaded[$pattern]; - } - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php deleted file mode 100644 index 29462001..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php +++ /dev/null @@ -1,91 +0,0 @@ -setCharacterReaderFactory($factory); - $this->setCharacterSet($charset); - } - - /** - * Set the character set used in this CharacterStream. - * - * @param string $charset - */ - public function setCharacterSet($charset) - { - $this->_charset = $charset; - $this->_charReader = null; - } - - /** - * Set the CharacterReaderFactory for multi charset support. - * - * @param Swift_CharacterReaderFactory $factory - */ - public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory) - { - $this->_charReaderFactory = $factory; - } - - /** - * Overwrite this character stream using the byte sequence in the byte stream. - * - * @param Swift_OutputByteStream $os output stream to read from - */ - public function importByteStream(Swift_OutputByteStream $os) - { - if (!isset($this->_charReader)) { - $this->_charReader = $this->_charReaderFactory - ->getReaderFor($this->_charset); - } - - $startLength = $this->_charReader->getInitialByteSize(); - while (false !== $bytes = $os->read($startLength)) { - $c = array(); - for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { - $c[] = self::$_byteMap[$bytes[$i]]; - } - $size = count($c); - $need = $this->_charReader - ->validateByteSequence($c, $size); - if ($need > 0 && - false !== $bytes = $os->read($need)) - { - for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { - $c[] = self::$_byteMap[$bytes[$i]]; - } - } - $this->_array[] = $c; - ++$this->_array_size; - } - } - - /** - * Import a string a bytes into this CharacterStream, overwriting any existing - * data in the stream. - * - * @param string $string - */ - public function importString($string) - { - $this->flushContents(); - $this->write($string); - } - - /** - * Read $length characters from the stream and move the internal pointer - * $length further into the stream. - * - * @param integer $length - * - * @return string - */ - public function read($length) - { - if ($this->_offset == $this->_array_size) { - return false; - } - - // Don't use array slice - $arrays = array(); - $end = $length + $this->_offset; - for ($i = $this->_offset; $i < $end; ++$i) { - if (!isset($this->_array[$i])) { - break; - } - $arrays[] = $this->_array[$i]; - } - $this->_offset += $i - $this->_offset; // Limit function calls - $chars = false; - foreach ($arrays as $array) { - $chars .= implode('', array_map('chr', $array)); - } - - return $chars; - } - - /** - * Read $length characters from the stream and return a 1-dimensional array - * containing there octet values. - * - * @param integer $length - * - * @return integer[] - */ - public function readBytes($length) - { - if ($this->_offset == $this->_array_size) { - return false; - } - $arrays = array(); - $end = $length + $this->_offset; - for ($i = $this->_offset; $i < $end; ++$i) { - if (!isset($this->_array[$i])) { - break; - } - $arrays[] = $this->_array[$i]; - } - $this->_offset += ($i - $this->_offset); // Limit function calls - - return call_user_func_array('array_merge', $arrays); - } - - /** - * Write $chars to the end of the stream. - * - * @param string $chars - */ - public function write($chars) - { - if (!isset($this->_charReader)) { - $this->_charReader = $this->_charReaderFactory->getReaderFor( - $this->_charset); - } - - $startLength = $this->_charReader->getInitialByteSize(); - - $fp = fopen('php://memory', 'w+b'); - fwrite($fp, $chars); - unset($chars); - fseek($fp, 0, SEEK_SET); - - $buffer = array(0); - $buf_pos = 1; - $buf_len = 1; - $has_datas = true; - do { - $bytes = array(); - // Buffer Filing - if ($buf_len - $buf_pos < $startLength) { - $buf = array_splice($buffer, $buf_pos); - $new = $this->_reloadBuffer($fp, 100); - if ($new) { - $buffer = array_merge($buf, $new); - $buf_len = count($buffer); - $buf_pos = 0; - } else { - $has_datas = false; - } - } - if ($buf_len - $buf_pos > 0) { - $size = 0; - for ($i = 0; $i < $startLength && isset($buffer[$buf_pos]); ++$i) { - ++$size; - $bytes[] = $buffer[$buf_pos++]; - } - $need = $this->_charReader->validateByteSequence( - $bytes, $size); - if ($need > 0) { - if ($buf_len - $buf_pos < $need) { - $new = $this->_reloadBuffer($fp, $need); - - if ($new) { - $buffer = array_merge($buffer, $new); - $buf_len = count($buffer); - } - } - for ($i = 0; $i < $need && isset($buffer[$buf_pos]); ++$i) { - $bytes[] = $buffer[$buf_pos++]; - } - } - $this->_array[] = $bytes; - ++$this->_array_size; - } - } while ($has_datas); - - fclose($fp); - } - - /** - * Move the internal pointer to $charOffset in the stream. - * - * @param integer $charOffset - */ - public function setPointer($charOffset) - { - if ($charOffset > $this->_array_size) { - $charOffset = $this->_array_size; - } elseif ($charOffset < 0) { - $charOffset = 0; - } - $this->_offset = $charOffset; - } - - /** - * Empty the stream and reset the internal pointer. - */ - public function flushContents() - { - $this->_offset = 0; - $this->_array = array(); - $this->_array_size = 0; - } - - private function _reloadBuffer($fp, $len) - { - if (!feof($fp) && ($bytes = fread($fp, $len)) !== false) { - $buf = array(); - for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) { - $buf[] = self::$_byteMap[$bytes[$i]]; - } - - return $buf; - } - - return false; - } - - private static function _initializeMaps() - { - if (!isset(self::$_charMap)) { - self::$_charMap = array(); - for ($byte = 0; $byte < 256; ++$byte) { - self::$_charMap[$byte] = chr($byte); - } - self::$_byteMap = array_flip(self::$_charMap); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php deleted file mode 100644 index 98aabab7..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php +++ /dev/null @@ -1,277 +0,0 @@ - - */ - -class Swift_CharacterStream_NgCharacterStream implements Swift_CharacterStream -{ - /** - * The char reader (lazy-loaded) for the current charset. - * - * @var Swift_CharacterReader - */ - private $_charReader; - - /** - * A factory for creating CharacterReader instances. - * - * @var Swift_CharacterReaderFactory - */ - private $_charReaderFactory; - - /** - * The character set this stream is using. - * - * @var string - */ - private $_charset; - - /** - * The data's stored as-is. - * - * @var string - */ - private $_datas = ''; - - /** - * Number of bytes in the stream - * - * @var integer - */ - private $_datasSize = 0; - - /** - * Map. - * - * @var mixed - */ - private $_map; - - /** - * Map Type. - * - * @var integer - */ - private $_mapType = 0; - - /** - * Number of characters in the stream. - * - * @var integer - */ - private $_charCount = 0; - - /** - * Position in the stream. - * - * @var integer - */ - private $_currentPos = 0; - - /** - * Constructor. - * - * @param Swift_CharacterReaderFactory $factory - * @param string $charset - */ - public function __construct(Swift_CharacterReaderFactory $factory, $charset) - { - $this->setCharacterReaderFactory($factory); - $this->setCharacterSet($charset); - } - - /* -- Changing parameters of the stream -- */ - - /** - * Set the character set used in this CharacterStream. - * - * @param string $charset - */ - public function setCharacterSet($charset) - { - $this->_charset = $charset; - $this->_charReader = null; - $this->_mapType = 0; - } - - /** - * Set the CharacterReaderFactory for multi charset support. - * - * @param Swift_CharacterReaderFactory $factory - */ - public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory) - { - $this->_charReaderFactory = $factory; - } - - /** - * @see Swift_CharacterStream::flushContents() - */ - public function flushContents() - { - $this->_datas = null; - $this->_map = null; - $this->_charCount = 0; - $this->_currentPos = 0; - $this->_datasSize = 0; - } - - /** - * @see Swift_CharacterStream::importByteStream() - * - * @param Swift_OutputByteStream $os - */ - public function importByteStream(Swift_OutputByteStream $os) - { - $this->flushContents(); - $blocks=512; - $os->setReadPointer(0); - while(false!==($read = $os->read($blocks))) - $this->write($read); - } - - /** - * @see Swift_CharacterStream::importString() - * - * @param string $string - */ - public function importString($string) - { - $this->flushContents(); - $this->write($string); - } - - /** - * @see Swift_CharacterStream::read() - * - * @param integer $length - * - * @return string - */ - public function read($length) - { - if ($this->_currentPos>=$this->_charCount) { - return false; - } - $ret=false; - $length = ($this->_currentPos+$length > $this->_charCount) - ? $this->_charCount - $this->_currentPos - : $length; - switch ($this->_mapType) { - case Swift_CharacterReader::MAP_TYPE_FIXED_LEN: - $len = $length*$this->_map; - $ret = substr($this->_datas, - $this->_currentPos * $this->_map, - $len); - $this->_currentPos += $length; - break; - - case Swift_CharacterReader::MAP_TYPE_INVALID: - $end = $this->_currentPos + $length; - $end = $end > $this->_charCount - ?$this->_charCount - :$end; - $ret = ''; - for (; $this->_currentPos < $length; ++$this->_currentPos) { - if (isset ($this->_map[$this->_currentPos])) { - $ret .= '?'; - } else { - $ret .= $this->_datas[$this->_currentPos]; - } - } - break; - - case Swift_CharacterReader::MAP_TYPE_POSITIONS: - $end = $this->_currentPos + $length; - $end = $end > $this->_charCount - ?$this->_charCount - :$end; - $ret = ''; - $start = 0; - if ($this->_currentPos>0) { - $start = $this->_map['p'][$this->_currentPos-1]; - } - $to = $start; - for (; $this->_currentPos < $end; ++$this->_currentPos) { - if (isset($this->_map['i'][$this->_currentPos])) { - $ret .= substr($this->_datas, $start, $to - $start).'?'; - $start = $this->_map['p'][$this->_currentPos]; - } else { - $to = $this->_map['p'][$this->_currentPos]; - } - } - $ret .= substr($this->_datas, $start, $to - $start); - break; - } - - return $ret; - } - - /** - * @see Swift_CharacterStream::readBytes() - * - * @param integer $length - * - * @return integer[] - */ - public function readBytes($length) - { - $read=$this->read($length); - if ($read!==false) { - $ret = array_map('ord', str_split($read, 1)); - - return $ret; - } - - return false; - } - - /** - * @see Swift_CharacterStream::setPointer() - * - * @param integer $charOffset - */ - public function setPointer($charOffset) - { - if ($this->_charCount<$charOffset) { - $charOffset=$this->_charCount; - } - $this->_currentPos = $charOffset; - } - - /** - * @see Swift_CharacterStream::write() - * - * @param string $chars - */ - public function write($chars) - { - if (!isset($this->_charReader)) { - $this->_charReader = $this->_charReaderFactory->getReaderFor( - $this->_charset); - $this->_map = array(); - $this->_mapType = $this->_charReader->getMapType(); - } - $ignored=''; - $this->_datas .= $chars; - $this->_charCount += $this->_charReader->getCharPositions(substr($this->_datas, $this->_datasSize), $this->_datasSize, $this->_map, $ignored); - if ($ignored!==false) { - $this->_datasSize=strlen($this->_datas)-strlen($ignored); - } else { - $this->_datasSize=strlen($this->_datas); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php deleted file mode 100644 index 58d52752..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Base class for Spools (implements time and message limits). - * - * @package Swift - * @author Fabien Potencier - */ -abstract class Swift_ConfigurableSpool implements Swift_Spool -{ - /** The maximum number of messages to send per flush */ - private $_message_limit; - - /** The time limit per flush */ - private $_time_limit; - - /** - * Sets the maximum number of messages to send per flush. - * - * @param integer $limit - */ - public function setMessageLimit($limit) - { - $this->_message_limit = (int) $limit; - } - - /** - * Gets the maximum number of messages to send per flush. - * - * @return integer The limit - */ - public function getMessageLimit() - { - return $this->_message_limit; - } - - /** - * Sets the time limit (in seconds) per flush. - * - * @param integer $limit The limit - */ - public function setTimeLimit($limit) - { - $this->_time_limit = (int) $limit; - } - - /** - * Gets the time limit (in seconds) per flush. - * - * @return integer The limit - */ - public function getTimeLimit() - { - return $this->_time_limit; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php deleted file mode 100644 index b7178615..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php +++ /dev/null @@ -1,373 +0,0 @@ -_store); - } - - /** - * Test if an item is registered in this container with the given name. - * - * @see register() - * - * @param string $itemName - * - * @return boolean - */ - public function has($itemName) - { - return array_key_exists($itemName, $this->_store) - && isset($this->_store[$itemName]['lookupType']); - } - - /** - * Lookup the item with the given $itemName. - * - * @see register() - * - * @param string $itemName - * - * @return mixed - * - * @throws Swift_DependencyException If the dependency is not found - */ - public function lookup($itemName) - { - if (!$this->has($itemName)) { - throw new Swift_DependencyException( - 'Cannot lookup dependency "' . $itemName . '" since it is not registered.' - ); - } - - switch ($this->_store[$itemName]['lookupType']) { - case self::TYPE_ALIAS: - return $this->_createAlias($itemName); - case self::TYPE_VALUE: - return $this->_getValue($itemName); - case self::TYPE_INSTANCE: - return $this->_createNewInstance($itemName); - case self::TYPE_SHARED: - return $this->_createSharedInstance($itemName); - } - } - - /** - * Create an array of arguments passed to the constructor of $itemName. - * - * @param string $itemName - * - * @return array - */ - public function createDependenciesFor($itemName) - { - $args = array(); - if (isset($this->_store[$itemName]['args'])) { - $args = $this->_resolveArgs($this->_store[$itemName]['args']); - } - - return $args; - } - - /** - * Register a new dependency with $itemName. - * - * This method returns the current DependencyContainer instance because it - * requires the use of the fluid interface to set the specific details for the - * dependency. - * @see asNewInstanceOf(), asSharedInstanceOf(), asValue() - * - * @param string $itemName - * - * @return Swift_DependencyContainer - */ - public function register($itemName) - { - $this->_store[$itemName] = array(); - $this->_endPoint =& $this->_store[$itemName]; - - return $this; - } - - /** - * Specify the previously registered item as a literal value. - * - * {@link register()} must be called before this will work. - * - * @param mixed $value - * - * @return Swift_DependencyContainer - */ - public function asValue($value) - { - $endPoint =& $this->_getEndPoint(); - $endPoint['lookupType'] = self::TYPE_VALUE; - $endPoint['value'] = $value; - - return $this; - } - - /** - * Specify the previously registered item as an alias of another item. - * - * @param string $lookup - * - * @return Swift_DependencyContainer - */ - public function asAliasOf($lookup) - { - $endPoint =& $this->_getEndPoint(); - $endPoint['lookupType'] = self::TYPE_ALIAS; - $endPoint['ref'] = $lookup; - - return $this; - } - - /** - * Specify the previously registered item as a new instance of $className. - * - * {@link register()} must be called before this will work. - * Any arguments can be set with {@link withDependencies()}, - * {@link addConstructorValue()} or {@link addConstructorLookup()}. - * - * @see withDependencies(), addConstructorValue(), addConstructorLookup() - * - * @param string $className - * - * @return Swift_DependencyContainer - */ - public function asNewInstanceOf($className) - { - $endPoint =& $this->_getEndPoint(); - $endPoint['lookupType'] = self::TYPE_INSTANCE; - $endPoint['className'] = $className; - - return $this; - } - - /** - * Specify the previously registered item as a shared instance of $className. - * - * {@link register()} must be called before this will work. - * - * @param string $className - * - * @return Swift_DependencyContainer - */ - public function asSharedInstanceOf($className) - { - $endPoint =& $this->_getEndPoint(); - $endPoint['lookupType'] = self::TYPE_SHARED; - $endPoint['className'] = $className; - - return $this; - } - - /** - * Specify a list of injected dependencies for the previously registered item. - * - * This method takes an array of lookup names. - * - * @see addConstructorValue(), addConstructorLookup() - * - * @param array $lookups - * - * @return Swift_DependencyContainer - */ - public function withDependencies(array $lookups) - { - $endPoint =& $this->_getEndPoint(); - $endPoint['args'] = array(); - foreach ($lookups as $lookup) { - $this->addConstructorLookup($lookup); - } - - return $this; - } - - /** - * Specify a literal (non looked up) value for the constructor of the - * previously registered item. - * - * @see withDependencies(), addConstructorLookup() - * - * @param mixed $value - * - * @return Swift_DependencyContainer - */ - public function addConstructorValue($value) - { - $endPoint =& $this->_getEndPoint(); - if (!isset($endPoint['args'])) { - $endPoint['args'] = array(); - } - $endPoint['args'][] = array('type' => 'value', 'item' => $value); - - return $this; - } - - /** - * Specify a dependency lookup for the constructor of the previously - * registered item. - * - * @see withDependencies(), addConstructorValue() - * - * @param string $lookup - * - * @return Swift_DependencyContainer - */ - public function addConstructorLookup($lookup) - { - $endPoint =& $this->_getEndPoint(); - if (!isset($this->_endPoint['args'])) { - $endPoint['args'] = array(); - } - $endPoint['args'][] = array('type' => 'lookup', 'item' => $lookup); - - return $this; - } - - // -- Private methods - - /** Get the literal value with $itemName */ - private function _getValue($itemName) - { - return $this->_store[$itemName]['value']; - } - - /** Resolve an alias to another item */ - private function _createAlias($itemName) - { - return $this->lookup($this->_store[$itemName]['ref']); - } - - /** Create a fresh instance of $itemName */ - private function _createNewInstance($itemName) - { - $reflector = new ReflectionClass($this->_store[$itemName]['className']); - if ($reflector->getConstructor()) { - return $reflector->newInstanceArgs( - $this->createDependenciesFor($itemName) - ); - } else { - return $reflector->newInstance(); - } - } - - /** Create and register a shared instance of $itemName */ - private function _createSharedInstance($itemName) - { - if (!isset($this->_store[$itemName]['instance'])) { - $this->_store[$itemName]['instance'] = $this->_createNewInstance($itemName); - } - - return $this->_store[$itemName]['instance']; - } - - /** Get the current endpoint in the store */ - private function &_getEndPoint() - { - if (!isset($this->_endPoint)) { - throw new BadMethodCallException( - 'Component must first be registered by calling register()' - ); - } - - return $this->_endPoint; - } - - /** Get an argument list with dependencies resolved */ - private function _resolveArgs(array $args) - { - $resolved = array(); - foreach ($args as $argDefinition) { - switch ($argDefinition['type']) { - case 'lookup': - $resolved[] = $this->_lookupRecursive($argDefinition['item']); - break; - case 'value': - $resolved[] = $argDefinition['item']; - break; - } - } - - return $resolved; - } - - /** Resolve a single dependency with an collections */ - private function _lookupRecursive($item) - { - if (is_array($item)) { - $collection = array(); - foreach ($item as $k => $v) { - $collection[$k] = $this->_lookupRecursive($v); - } - - return $collection; - } else { - return $this->lookup($item); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php deleted file mode 100644 index b3f01709..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php +++ /dev/null @@ -1,28 +0,0 @@ -createDependenciesFor('mime.embeddedfile') - ); - - $this->setBody($data); - $this->setFilename($filename); - if ($contentType) { - $this->setContentType($contentType); - } - } - - /** - * Create a new EmbeddedFile. - * - * @param string|Swift_OutputByteStream $data - * @param string $filename - * @param string $contentType - * - * @return Swift_Mime_EmbeddedFile - */ - public static function newInstance($data = null, $filename = null, $contentType = null) - { - return new self($data, $filename, $contentType); - } - - /** - * Create a new EmbeddedFile from a filesystem path. - * - * @param string $path - * - * @return Swift_Mime_EmbeddedFile - */ - public static function fromPath($path) - { - return self::newInstance()->setFile( - new Swift_ByteStream_FileByteStream($path) - ); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php deleted file mode 100644 index 53e88b8c..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php +++ /dev/null @@ -1,29 +0,0 @@ -= $maxLineLength || 76 < $maxLineLength) { - $maxLineLength = 76; - } - - $encodedString = base64_encode($string); - $firstLine = ''; - - if (0 != $firstLineOffset) { - $firstLine = substr( - $encodedString, 0, $maxLineLength - $firstLineOffset - ) . "\r\n"; - $encodedString = substr( - $encodedString, $maxLineLength - $firstLineOffset - ); - } - - return $firstLine . trim(chunk_split($encodedString, $maxLineLength, "\r\n")); - } - - /** - * Does nothing. - */ - public function charsetChanged($charset) - { - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php deleted file mode 100644 index 61cf31bd..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php +++ /dev/null @@ -1,286 +0,0 @@ - '=00', 1 => '=01', 2 => '=02', 3 => '=03', 4 => '=04', - 5 => '=05', 6 => '=06', 7 => '=07', 8 => '=08', 9 => '=09', - 10 => '=0A', 11 => '=0B', 12 => '=0C', 13 => '=0D', 14 => '=0E', - 15 => '=0F', 16 => '=10', 17 => '=11', 18 => '=12', 19 => '=13', - 20 => '=14', 21 => '=15', 22 => '=16', 23 => '=17', 24 => '=18', - 25 => '=19', 26 => '=1A', 27 => '=1B', 28 => '=1C', 29 => '=1D', - 30 => '=1E', 31 => '=1F', 32 => '=20', 33 => '=21', 34 => '=22', - 35 => '=23', 36 => '=24', 37 => '=25', 38 => '=26', 39 => '=27', - 40 => '=28', 41 => '=29', 42 => '=2A', 43 => '=2B', 44 => '=2C', - 45 => '=2D', 46 => '=2E', 47 => '=2F', 48 => '=30', 49 => '=31', - 50 => '=32', 51 => '=33', 52 => '=34', 53 => '=35', 54 => '=36', - 55 => '=37', 56 => '=38', 57 => '=39', 58 => '=3A', 59 => '=3B', - 60 => '=3C', 61 => '=3D', 62 => '=3E', 63 => '=3F', 64 => '=40', - 65 => '=41', 66 => '=42', 67 => '=43', 68 => '=44', 69 => '=45', - 70 => '=46', 71 => '=47', 72 => '=48', 73 => '=49', 74 => '=4A', - 75 => '=4B', 76 => '=4C', 77 => '=4D', 78 => '=4E', 79 => '=4F', - 80 => '=50', 81 => '=51', 82 => '=52', 83 => '=53', 84 => '=54', - 85 => '=55', 86 => '=56', 87 => '=57', 88 => '=58', 89 => '=59', - 90 => '=5A', 91 => '=5B', 92 => '=5C', 93 => '=5D', 94 => '=5E', - 95 => '=5F', 96 => '=60', 97 => '=61', 98 => '=62', 99 => '=63', - 100 => '=64', 101 => '=65', 102 => '=66', 103 => '=67', 104 => '=68', - 105 => '=69', 106 => '=6A', 107 => '=6B', 108 => '=6C', 109 => '=6D', - 110 => '=6E', 111 => '=6F', 112 => '=70', 113 => '=71', 114 => '=72', - 115 => '=73', 116 => '=74', 117 => '=75', 118 => '=76', 119 => '=77', - 120 => '=78', 121 => '=79', 122 => '=7A', 123 => '=7B', 124 => '=7C', - 125 => '=7D', 126 => '=7E', 127 => '=7F', 128 => '=80', 129 => '=81', - 130 => '=82', 131 => '=83', 132 => '=84', 133 => '=85', 134 => '=86', - 135 => '=87', 136 => '=88', 137 => '=89', 138 => '=8A', 139 => '=8B', - 140 => '=8C', 141 => '=8D', 142 => '=8E', 143 => '=8F', 144 => '=90', - 145 => '=91', 146 => '=92', 147 => '=93', 148 => '=94', 149 => '=95', - 150 => '=96', 151 => '=97', 152 => '=98', 153 => '=99', 154 => '=9A', - 155 => '=9B', 156 => '=9C', 157 => '=9D', 158 => '=9E', 159 => '=9F', - 160 => '=A0', 161 => '=A1', 162 => '=A2', 163 => '=A3', 164 => '=A4', - 165 => '=A5', 166 => '=A6', 167 => '=A7', 168 => '=A8', 169 => '=A9', - 170 => '=AA', 171 => '=AB', 172 => '=AC', 173 => '=AD', 174 => '=AE', - 175 => '=AF', 176 => '=B0', 177 => '=B1', 178 => '=B2', 179 => '=B3', - 180 => '=B4', 181 => '=B5', 182 => '=B6', 183 => '=B7', 184 => '=B8', - 185 => '=B9', 186 => '=BA', 187 => '=BB', 188 => '=BC', 189 => '=BD', - 190 => '=BE', 191 => '=BF', 192 => '=C0', 193 => '=C1', 194 => '=C2', - 195 => '=C3', 196 => '=C4', 197 => '=C5', 198 => '=C6', 199 => '=C7', - 200 => '=C8', 201 => '=C9', 202 => '=CA', 203 => '=CB', 204 => '=CC', - 205 => '=CD', 206 => '=CE', 207 => '=CF', 208 => '=D0', 209 => '=D1', - 210 => '=D2', 211 => '=D3', 212 => '=D4', 213 => '=D5', 214 => '=D6', - 215 => '=D7', 216 => '=D8', 217 => '=D9', 218 => '=DA', 219 => '=DB', - 220 => '=DC', 221 => '=DD', 222 => '=DE', 223 => '=DF', 224 => '=E0', - 225 => '=E1', 226 => '=E2', 227 => '=E3', 228 => '=E4', 229 => '=E5', - 230 => '=E6', 231 => '=E7', 232 => '=E8', 233 => '=E9', 234 => '=EA', - 235 => '=EB', 236 => '=EC', 237 => '=ED', 238 => '=EE', 239 => '=EF', - 240 => '=F0', 241 => '=F1', 242 => '=F2', 243 => '=F3', 244 => '=F4', - 245 => '=F5', 246 => '=F6', 247 => '=F7', 248 => '=F8', 249 => '=F9', - 250 => '=FA', 251 => '=FB', 252 => '=FC', 253 => '=FD', 254 => '=FE', - 255 => '=FF' - ); - - protected static $_safeMapShare = array(); - - /** - * A map of non-encoded ascii characters. - * - * @var string[] - */ - protected $_safeMap = array(); - - /** - * Creates a new QpEncoder for the given CharacterStream. - * - * @param Swift_CharacterStream $charStream to use for reading characters - * @param Swift_StreamFilter $filter if input should be canonicalized - */ - public function __construct(Swift_CharacterStream $charStream, Swift_StreamFilter $filter = null) - { - $this->_charStream = $charStream; - if (!isset(self::$_safeMapShare[$this->getSafeMapShareId()])) { - $this->initSafeMap(); - self::$_safeMapShare[$this->getSafeMapShareId()] = $this->_safeMap; - } else { - $this->_safeMap = self::$_safeMapShare[$this->getSafeMapShareId()]; - } - $this->_filter = $filter; - } - - public function __sleep() - { - return array('_charStream', '_filter'); - } - - public function __wakeup() - { - if (!isset(self::$_safeMapShare[$this->getSafeMapShareId()])) { - $this->initSafeMap(); - self::$_safeMapShare[$this->getSafeMapShareId()] = $this->_safeMap; - } else { - $this->_safeMap = self::$_safeMapShare[$this->getSafeMapShareId()]; - } - } - - protected function getSafeMapShareId() - { - return get_class($this); - } - - protected function initSafeMap() - { - foreach (array_merge( - array(0x09, 0x20), range(0x21, 0x3C), range(0x3E, 0x7E)) as $byte) - { - $this->_safeMap[$byte] = chr($byte); - } - } - - /** - * Takes an unencoded string and produces a QP encoded string from it. - * - * QP encoded strings have a maximum line length of 76 characters. - * If the first line needs to be shorter, indicate the difference with - * $firstLineOffset. - * - * @param string $string to encode - * @param integer $firstLineOffset, optional - * @param integer $maxLineLength, optional 0 indicates the default of 76 chars - * - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) - { - if ($maxLineLength > 76 || $maxLineLength <= 0) { - $maxLineLength = 76; - } - - $thisLineLength = $maxLineLength - $firstLineOffset; - - $lines = array(); - $lNo = 0; - $lines[$lNo] = ''; - $currentLine =& $lines[$lNo++]; - $size=$lineLen=0; - - $this->_charStream->flushContents(); - $this->_charStream->importString($string); - - // Fetching more than 4 chars at one is slower, as is fetching fewer bytes - // Conveniently 4 chars is the UTF-8 safe number since UTF-8 has up to 6 - // bytes per char and (6 * 4 * 3 = 72 chars per line) * =NN is 3 bytes - while (false !== $bytes = $this->_nextSequence()) { - //If we're filtering the input - if (isset($this->_filter)) { - //If we can't filter because we need more bytes - while ($this->_filter->shouldBuffer($bytes)) { - //Then collect bytes into the buffer - if (false === $moreBytes = $this->_nextSequence(1)) { - break; - } - - foreach ($moreBytes as $b) { - $bytes[] = $b; - } - } - //And filter them - $bytes = $this->_filter->filter($bytes); - } - - $enc = $this->_encodeByteSequence($bytes, $size); - if ($currentLine && $lineLen+$size >= $thisLineLength) { - $lines[$lNo] = ''; - $currentLine =& $lines[$lNo++]; - $thisLineLength = $maxLineLength; - $lineLen=0; - } - $lineLen+=$size; - $currentLine .= $enc; - } - - return $this->_standardize(implode("=\r\n", $lines)); - } - - /** - * Updates the charset used. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->_charStream->setCharacterSet($charset); - } - - // -- Protected methods - - /** - * Encode the given byte array into a verbatim QP form. - * - * @param integer[] $bytes - * @param integer $size - * - * @return string - */ - protected function _encodeByteSequence(array $bytes, &$size) - { - $ret = ''; - $size=0; - foreach ($bytes as $b) { - if (isset($this->_safeMap[$b])) { - $ret .= $this->_safeMap[$b]; - ++$size; - } else { - $ret .= self::$_qpMap[$b]; - $size+=3; - } - } - - return $ret; - } - - /** - * Get the next sequence of bytes to read from the char stream. - * - * @param integer $size number of bytes to read - * - * @return integer[] - */ - protected function _nextSequence($size = 4) - { - return $this->_charStream->readBytes($size); - } - - /** - * Make sure CRLF is correct and HT/SPACE are in valid places. - * - * @param string $string - * - * @return string - */ - protected function _standardize($string) - { - $string = str_replace(array("\t=0D=0A", " =0D=0A", "=0D=0A"), - array("=09\r\n", "=20\r\n", "\r\n"), $string - ); - switch ($end = ord(substr($string, -1))) { - case 0x09: - case 0x20: - $string = substr_replace($string, self::$_qpMap[$end], -1); - } - - return $string; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php deleted file mode 100644 index 37e30c1d..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php +++ /dev/null @@ -1,86 +0,0 @@ -_charStream = $charStream; - } - - /** - * Takes an unencoded string and produces a string encoded according to - * RFC 2231 from it. - * - * @param string $string - * @param integer $firstLineOffset - * @param integer $maxLineLength optional, 0 indicates the default of 75 bytes - * - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) - { - $lines = array(); $lineCount = 0; - $lines[] = ''; - $currentLine =& $lines[$lineCount++]; - - if (0 >= $maxLineLength) { - $maxLineLength = 75; - } - - $this->_charStream->flushContents(); - $this->_charStream->importString($string); - - $thisLineLength = $maxLineLength - $firstLineOffset; - - while (false !== $char = $this->_charStream->read(4)) { - $encodedChar = rawurlencode($char); - if (0 != strlen($currentLine) - && strlen($currentLine . $encodedChar) > $thisLineLength) - { - $lines[] = ''; - $currentLine =& $lines[$lineCount++]; - $thisLineLength = $maxLineLength; - } - $currentLine .= $encodedChar; - } - - return implode("\r\n", $lines); - } - - /** - * Updates the charset used. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->_charStream->setCharacterSet($charset); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoding.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoding.php deleted file mode 100644 index 96391949..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoding.php +++ /dev/null @@ -1,66 +0,0 @@ -lookup($key); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php deleted file mode 100644 index fa4f4447..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php +++ /dev/null @@ -1,67 +0,0 @@ -_command = $command; - $this->_successCodes = $successCodes; - } - - /** - * Get the command which was sent to the server. - * - * @return string - */ - public function getCommand() - { - return $this->_command; - } - - /** - * Get the numeric response codes which indicate success for this command. - * - * @return integer[] - */ - public function getSuccessCodes() - { - return $this->_successCodes; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php deleted file mode 100644 index 68009047..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php +++ /dev/null @@ -1,26 +0,0 @@ -_source = $source; - } - - /** - * Get the source object of this event. - * - * @return object - */ - public function getSource() - { - return $this->_source; - } - - /** - * Prevent this Event from bubbling any further up the stack. - * - * @param boolean $cancel, optional - */ - public function cancelBubble($cancel = true) - { - $this->_bubbleCancelled = $cancel; - } - - /** - * Returns true if this Event will not bubble any further up the stack. - * - * @return boolean - */ - public function bubbleCancelled() - { - return $this->_bubbleCancelled; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php deleted file mode 100644 index 6b9117cb..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php +++ /dev/null @@ -1,68 +0,0 @@ -_response = $response; - $this->_valid = $valid; - } - - /** - * Get the response which was received from the server. - * - * @return string - */ - public function getResponse() - { - return $this->_response; - } - - /** - * Get the success status of this Event. - * - * @return boolean - */ - public function isValid() - { - return $this->_valid; - } - -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php deleted file mode 100644 index a39ba435..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php +++ /dev/null @@ -1,26 +0,0 @@ -_message = $message; - $this->_result = self::RESULT_PENDING; - } - - /** - * Get the Transport used to send the Message. - * - * @return Swift_Transport - */ - public function getTransport() - { - return $this->getSource(); - } - - /** - * Get the Message being sent. - * - * @return Swift_Mime_Message - */ - public function getMessage() - { - return $this->_message; - } - - /** - * Set the array of addresses that failed in sending. - * - * @param array $recipients - */ - public function setFailedRecipients($recipients) - { - $this->_failedRecipients = $recipients; - } - - /** - * Get an recipient addresses which were not accepted for delivery. - * - * @return string[] - */ - public function getFailedRecipients() - { - return $this->_failedRecipients; - } - - /** - * Set the result of sending. - * - * @param integer $result - */ - public function setResult($result) - { - $this->_result = $result; - } - - /** - * Get the result of this Event. - * - * The return value is a bitmask from - * {@see RESULT_PENDING, RESULT_SUCCESS, RESULT_TENTATIVE, RESULT_FAILED} - * - * @return integer - */ - public function getResult() - { - return $this->_result; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php deleted file mode 100644 index bc914f54..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php +++ /dev/null @@ -1,33 +0,0 @@ -_eventMap = array( - 'Swift_Events_CommandEvent' => 'Swift_Events_CommandListener', - 'Swift_Events_ResponseEvent' => 'Swift_Events_ResponseListener', - 'Swift_Events_SendEvent' => 'Swift_Events_SendListener', - 'Swift_Events_TransportChangeEvent' => 'Swift_Events_TransportChangeListener', - 'Swift_Events_TransportExceptionEvent' => 'Swift_Events_TransportExceptionListener' - ); - } - - /** - * Create a new SendEvent for $source and $message. - * - * @param Swift_Transport $source - * @param Swift_Mime_Message - * - * @return Swift_Events_SendEvent - */ - public function createSendEvent(Swift_Transport $source, Swift_Mime_Message $message) - { - return new Swift_Events_SendEvent($source, $message); - } - - /** - * Create a new CommandEvent for $source and $command. - * - * @param Swift_Transport $source - * @param string $command That will be executed - * @param array $successCodes That are needed - * - * @return Swift_Events_CommandEvent - */ - public function createCommandEvent(Swift_Transport $source, $command, $successCodes = array()) - { - return new Swift_Events_CommandEvent($source, $command, $successCodes); - } - - /** - * Create a new ResponseEvent for $source and $response. - * - * @param Swift_Transport $source - * @param string $response - * @param boolean $valid If the response is valid - * - * @return Swift_Events_ResponseEvent - */ - public function createResponseEvent(Swift_Transport $source, $response, $valid) - { - return new Swift_Events_ResponseEvent($source, $response, $valid); - } - - /** - * Create a new TransportChangeEvent for $source. - * - * @param Swift_Transport $source - * - * @return Swift_Events_TransportChangeEvent - */ - public function createTransportChangeEvent(Swift_Transport $source) - { - return new Swift_Events_TransportChangeEvent($source); - } - - /** - * Create a new TransportExceptionEvent for $source. - * - * @param Swift_Transport $source - * @param Swift_TransportException $ex - * - * @return Swift_Events_TransportExceptionEvent - */ - public function createTransportExceptionEvent(Swift_Transport $source, Swift_TransportException $ex) - { - return new Swift_Events_TransportExceptionEvent($source, $ex); - } - - /** - * Bind an event listener to this dispatcher. - * - * @param Swift_Events_EventListener $listener - */ - public function bindEventListener(Swift_Events_EventListener $listener) - { - foreach ($this->_listeners as $l) { - //Already loaded - if ($l === $listener) { - return; - } - } - $this->_listeners[] = $listener; - } - - /** - * Dispatch the given Event to all suitable listeners. - * - * @param Swift_Events_EventObject $evt - * @param string $target method - */ - public function dispatchEvent(Swift_Events_EventObject $evt, $target) - { - $this->_prepareBubbleQueue($evt); - $this->_bubble($evt, $target); - } - - // -- Private methods - - /** Queue listeners on a stack ready for $evt to be bubbled up it */ - private function _prepareBubbleQueue(Swift_Events_EventObject $evt) - { - $this->_bubbleQueue = array(); - $evtClass = get_class($evt); - foreach ($this->_listeners as $listener) { - if (array_key_exists($evtClass, $this->_eventMap) - && ($listener instanceof $this->_eventMap[$evtClass])) - { - $this->_bubbleQueue[] = $listener; - } - } - } - - /** Bubble $evt up the stack calling $target() on each listener */ - private function _bubble(Swift_Events_EventObject $evt, $target) - { - if (!$evt->bubbleCancelled() && $listener = array_shift($this->_bubbleQueue)) { - $listener->$target($evt); - $this->_bubble($evt, $target); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php deleted file mode 100644 index d8b5316b..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php +++ /dev/null @@ -1,29 +0,0 @@ -getSource(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php deleted file mode 100644 index 15550370..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php +++ /dev/null @@ -1,47 +0,0 @@ -_exception = $ex; - } - - /** - * Get the TransportException thrown. - * - * @return Swift_TransportException - */ - public function getException() - { - return $this->_exception; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php deleted file mode 100644 index 709abda3..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php +++ /dev/null @@ -1,26 +0,0 @@ -createDependenciesFor('transport.failover') - ); - - $this->setTransports($transports); - } - - /** - * Create a new FailoverTransport instance. - * - * @param Swift_Transport[] $transports - * - * @return Swift_FailoverTransport - */ - public static function newInstance($transports = array()) - { - return new self($transports); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php deleted file mode 100644 index e458c073..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php +++ /dev/null @@ -1,201 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Stores Messages on the filesystem. - * - * @package Swift - * @author Fabien Potencier - * @author Xavier De Cock - */ -class Swift_FileSpool extends Swift_ConfigurableSpool -{ - /** The spool directory */ - private $_path; - - /** - * File WriteRetry Limit - * - * @var int - */ - private $_retryLimit=10; - - /** - * Create a new FileSpool. - * - * @param string $path - * - * @throws Swift_IoException - */ - public function __construct($path) - { - $this->_path = $path; - - if (!file_exists($this->_path)) { - if (!mkdir($this->_path, 0777, true)) { - throw new Swift_IoException('Unable to create Path ['.$this->_path.']'); - } - } - } - - /** - * Tests if this Spool mechanism has started. - * - * @return boolean - */ - public function isStarted() - { - return true; - } - - /** - * Starts this Spool mechanism. - */ - public function start() - { - } - - /** - * Stops this Spool mechanism. - */ - public function stop() - { - } - - /** - * Allow to manage the enqueuing retry limit. - * - * Default, is ten and allows over 64^20 different fileNames - * - * @param integer $limit - */ - public function setRetryLimit($limit) - { - $this->_retryLimit=$limit; - } - - /** - * Queues a message. - * - * @param Swift_Mime_Message $message The message to store - * - * @return boolean - * - * @throws Swift_IoException - */ - public function queueMessage(Swift_Mime_Message $message) - { - $ser = serialize($message); - $fileName = $this->_path . '/' . $this->getRandomString(10); - for ($i = 0; $i < $this->_retryLimit; ++$i) { - /* We try an exclusive creation of the file. This is an atomic operation, it avoid locking mechanism */ - $fp = @fopen($fileName . '.message', 'x'); - if (false !== $fp) { - if (false === fwrite($fp, $ser)) { - return false; - } - - return fclose($fp); - } else { - /* The file already exists, we try a longer fileName */ - $fileName .= $this->getRandomString(1); - } - } - - throw new Swift_IoException('Unable to create a file for enqueuing Message'); - } - - /** - * Execute a recovery if for any reason a process is sending for too long. - * - * @param integer $timeout in second Defaults is for very slow smtp responses - */ - public function recover($timeout = 900) - { - foreach (new DirectoryIterator($this->_path) as $file) { - $file = $file->getRealPath(); - - if (substr($file, - 16) == '.message.sending') { - $lockedtime = filectime($file); - if ((time() - $lockedtime) > $timeout) { - rename($file, substr($file, 0, - 8)); - } - } - } - } - - /** - * Sends messages using the given transport instance. - * - * @param Swift_Transport $transport A transport instance - * @param string[] $failedRecipients An array of failures by-reference - * - * @return integer The number of sent e-mail's - */ - public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) - { - if (!$transport->isStarted()) { - $transport->start(); - } - - $failedRecipients = (array) $failedRecipients; - $count = 0; - $time = time(); - foreach (new DirectoryIterator($this->_path) as $file) { - $file = $file->getRealPath(); - - if (substr($file, -8) != '.message') { - continue; - } - - /* We try a rename, it's an atomic operation, and avoid locking the file */ - if (rename($file, $file.'.sending')) { - $message = unserialize(file_get_contents($file.'.sending')); - - $count += $transport->send($message, $failedRecipients); - - unlink($file.'.sending'); - } else { - /* This message has just been catched by another process */ - continue; - } - - if ($this->getMessageLimit() && $count >= $this->getMessageLimit()) { - break; - } - - if ($this->getTimeLimit() && (time() - $time) >= $this->getTimeLimit()) { - break; - } - } - - return $count; - } - - /** - * Returns a random string needed to generate a fileName for the queue. - * - * @param integer $count - * - * @return string - */ - protected function getRandomString($count) - { - // This string MUST stay FS safe, avoid special chars - $base = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-."; - $ret = ''; - $strlen = strlen($base); - for ($i = 0; $i < $count; ++$i) { - $ret .= $base[((int) rand(0, $strlen - 1))]; - } - - return $ret; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php deleted file mode 100644 index 567633ec..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php +++ /dev/null @@ -1,26 +0,0 @@ -setFile( - new Swift_ByteStream_FileByteStream($path) - ); - - return $image; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php deleted file mode 100644 index ae81e5d9..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php +++ /dev/null @@ -1,77 +0,0 @@ -_stream = $stream; - } - - /** - * Set a string into the cache under $itemKey for the namespace $nsKey. - * - * @see MODE_WRITE, MODE_APPEND - * - * @param string $nsKey - * @param string $itemKey - * @param string $string - * @param integer $mode - */ - public function setString($nsKey, $itemKey, $string, $mode) - { - $this->_prepareCache($nsKey); - switch ($mode) { - case self::MODE_WRITE: - $this->_contents[$nsKey][$itemKey] = $string; - break; - case self::MODE_APPEND: - if (!$this->hasKey($nsKey, $itemKey)) { - $this->_contents[$nsKey][$itemKey] = ''; - } - $this->_contents[$nsKey][$itemKey] .= $string; - break; - default: - throw new Swift_SwiftException( - 'Invalid mode [' . $mode . '] used to set nsKey='. - $nsKey . ', itemKey=' . $itemKey - ); - } - } - - /** - * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. - * - * @see MODE_WRITE, MODE_APPEND - * - * @param string $nsKey - * @param string $itemKey - * @param Swift_OutputByteStream $os - * @param integer $mode - */ - public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode) - { - $this->_prepareCache($nsKey); - switch ($mode) { - case self::MODE_WRITE: - $this->clearKey($nsKey, $itemKey); - case self::MODE_APPEND: - if (!$this->hasKey($nsKey, $itemKey)) { - $this->_contents[$nsKey][$itemKey] = ''; - } - while (false !== $bytes = $os->read(8192)) { - $this->_contents[$nsKey][$itemKey] .= $bytes; - } - break; - default: - throw new Swift_SwiftException( - 'Invalid mode [' . $mode . '] used to set nsKey='. - $nsKey . ', itemKey=' . $itemKey - ); - } - } - - /** - * Provides a ByteStream which when written to, writes data to $itemKey. - * - * NOTE: The stream will always write in append mode. - * - * @param string $nsKey - * @param string $itemKey - * @param Swift_InputByteStream $writeThrough - * - * @return Swift_InputByteStream - */ - public function getInputByteStream($nsKey, $itemKey, Swift_InputByteStream $writeThrough = null) - { - $is = clone $this->_stream; - $is->setKeyCache($this); - $is->setNsKey($nsKey); - $is->setItemKey($itemKey); - if (isset($writeThrough)) { - $is->setWriteThroughStream($writeThrough); - } - - return $is; - } - - /** - * Get data back out of the cache as a string. - * - * @param string $nsKey - * @param string $itemKey - * - * @return string - */ - public function getString($nsKey, $itemKey) - { - $this->_prepareCache($nsKey); - if ($this->hasKey($nsKey, $itemKey)) { - return $this->_contents[$nsKey][$itemKey]; - } - } - - /** - * Get data back out of the cache as a ByteStream. - * - * @param string $nsKey - * @param string $itemKey - * @param Swift_InputByteStream $is to write the data to - */ - public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) - { - $this->_prepareCache($nsKey); - $is->write($this->getString($nsKey, $itemKey)); - } - - /** - * Check if the given $itemKey exists in the namespace $nsKey. - * - * @param string $nsKey - * @param string $itemKey - * - * @return boolean - */ - public function hasKey($nsKey, $itemKey) - { - $this->_prepareCache($nsKey); - - return array_key_exists($itemKey, $this->_contents[$nsKey]); - } - - /** - * Clear data for $itemKey in the namespace $nsKey if it exists. - * - * @param string $nsKey - * @param string $itemKey - */ - public function clearKey($nsKey, $itemKey) - { - unset($this->_contents[$nsKey][$itemKey]); - } - - /** - * Clear all data in the namespace $nsKey if it exists. - * - * @param string $nsKey - */ - public function clearAll($nsKey) - { - unset($this->_contents[$nsKey]); - } - - // -- Private methods - - /** - * Initialize the namespace of $nsKey if needed. - * - * @param string $nsKey - */ - private function _prepareCache($nsKey) - { - if (!array_key_exists($nsKey, $this->_contents)) { - $this->_contents[$nsKey] = array(); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php deleted file mode 100644 index 740897a5..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php +++ /dev/null @@ -1,328 +0,0 @@ -_stream = $stream; - $this->_path = $path; - - if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() == 1) { - $this->_quotes = true; - } - } - - /** - * Set a string into the cache under $itemKey for the namespace $nsKey. - * - * @see MODE_WRITE, MODE_APPEND - * - * @param string $nsKey - * @param string $itemKey - * @param string $string - * @param integer $mode - * - * @throws Swift_IoException - */ - public function setString($nsKey, $itemKey, $string, $mode) - { - $this->_prepareCache($nsKey); - switch ($mode) { - case self::MODE_WRITE: - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); - break; - case self::MODE_APPEND: - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END); - break; - default: - throw new Swift_SwiftException( - 'Invalid mode [' . $mode . '] used to set nsKey='. - $nsKey . ', itemKey=' . $itemKey - ); - break; - } - fwrite($fp, $string); - $this->_freeHandle($nsKey, $itemKey); - } - - /** - * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. - * - * @see MODE_WRITE, MODE_APPEND - * - * @param string $nsKey - * @param string $itemKey - * @param Swift_OutputByteStream $os - * @param integer $mode - * - * @throws Swift_IoException - */ - public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode) - { - $this->_prepareCache($nsKey); - switch ($mode) { - case self::MODE_WRITE: - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); - break; - case self::MODE_APPEND: - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END); - break; - default: - throw new Swift_SwiftException( - 'Invalid mode [' . $mode . '] used to set nsKey='. - $nsKey . ', itemKey=' . $itemKey - ); - break; - } - while (false !== $bytes = $os->read(8192)) { - fwrite($fp, $bytes); - } - $this->_freeHandle($nsKey, $itemKey); - } - - /** - * Provides a ByteStream which when written to, writes data to $itemKey. - * - * NOTE: The stream will always write in append mode. - * - * @param string $nsKey - * @param string $itemKey - * @param Swift_InputByteStream $writeThrough - * - * @return Swift_InputByteStream - */ - public function getInputByteStream($nsKey, $itemKey, Swift_InputByteStream $writeThrough = null) - { - $is = clone $this->_stream; - $is->setKeyCache($this); - $is->setNsKey($nsKey); - $is->setItemKey($itemKey); - if (isset($writeThrough)) { - $is->setWriteThroughStream($writeThrough); - } - - return $is; - } - - /** - * Get data back out of the cache as a string. - * - * @param string $nsKey - * @param string $itemKey - * - * @return string - * - * @throws Swift_IoException - */ - public function getString($nsKey, $itemKey) - { - $this->_prepareCache($nsKey); - if ($this->hasKey($nsKey, $itemKey)) { - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); - if ($this->_quotes) { - ini_set('magic_quotes_runtime', 0); - } - $str = ''; - while (!feof($fp) && false !== $bytes = fread($fp, 8192)) { - $str .= $bytes; - } - if ($this->_quotes) { - ini_set('magic_quotes_runtime', 1); - } - $this->_freeHandle($nsKey, $itemKey); - - return $str; - } - } - - /** - * Get data back out of the cache as a ByteStream. - * - * @param string $nsKey - * @param string $itemKey - * @param Swift_InputByteStream $is to write the data to - */ - public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) - { - if ($this->hasKey($nsKey, $itemKey)) { - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); - if ($this->_quotes) { - ini_set('magic_quotes_runtime', 0); - } - while (!feof($fp) && false !== $bytes = fread($fp, 8192)) { - $is->write($bytes); - } - if ($this->_quotes) { - ini_set('magic_quotes_runtime', 1); - } - $this->_freeHandle($nsKey, $itemKey); - } - } - - /** - * Check if the given $itemKey exists in the namespace $nsKey. - * - * @param string $nsKey - * @param string $itemKey - * - * @return boolean - */ - public function hasKey($nsKey, $itemKey) - { - return is_file($this->_path . '/' . $nsKey . '/' . $itemKey); - } - - /** - * Clear data for $itemKey in the namespace $nsKey if it exists. - * - * @param string $nsKey - * @param string $itemKey - */ - public function clearKey($nsKey, $itemKey) - { - if ($this->hasKey($nsKey, $itemKey)) { - $this->_freeHandle($nsKey, $itemKey); - unlink($this->_path . '/' . $nsKey . '/' . $itemKey); - } - } - - /** - * Clear all data in the namespace $nsKey if it exists. - * - * @param string $nsKey - */ - public function clearAll($nsKey) - { - if (array_key_exists($nsKey, $this->_keys)) { - foreach ($this->_keys[$nsKey] as $itemKey=>$null) { - $this->clearKey($nsKey, $itemKey); - } - if (is_dir($this->_path . '/' . $nsKey)) { - rmdir($this->_path . '/' . $nsKey); - } - unset($this->_keys[$nsKey]); - } - } - - // -- Private methods - - /** - * Initialize the namespace of $nsKey if needed. - * - * @param string $nsKey - */ - private function _prepareCache($nsKey) - { - $cacheDir = $this->_path . '/' . $nsKey; - if (!is_dir($cacheDir)) { - if (!mkdir($cacheDir)) { - throw new Swift_IoException('Failed to create cache directory ' . $cacheDir); - } - $this->_keys[$nsKey] = array(); - } - } - - /** - * Get a file handle on the cache item. - * - * @param string $nsKey - * @param string $itemKey - * @param integer $position - * - * @return resource - */ - private function _getHandle($nsKey, $itemKey, $position) - { - if (!isset($this->_keys[$nsKey][$itemKey])) { - $openMode = $this->hasKey($nsKey, $itemKey) - ? 'r+b' - : 'w+b' - ; - $fp = fopen($this->_path . '/' . $nsKey . '/' . $itemKey, $openMode); - $this->_keys[$nsKey][$itemKey] = $fp; - } - if (self::POSITION_START == $position) { - fseek($this->_keys[$nsKey][$itemKey], 0, SEEK_SET); - } elseif (self::POSITION_END == $position) { - fseek($this->_keys[$nsKey][$itemKey], 0, SEEK_END); - } - - return $this->_keys[$nsKey][$itemKey]; - } - - private function _freeHandle($nsKey, $itemKey) - { - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_CURRENT); - fclose($fp); - $this->_keys[$nsKey][$itemKey] = null; - } - - /** - * Destructor. - */ - public function __destruct() - { - foreach ($this->_keys as $nsKey=>$null) { - $this->clearAll($nsKey); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php deleted file mode 100644 index f4f8adb9..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php +++ /dev/null @@ -1,53 +0,0 @@ -_keyCache = $keyCache; - } - - /** - * Specify a stream to write through for each write(). - * - * @param Swift_InputByteStream $is - */ - public function setWriteThroughStream(Swift_InputByteStream $is) - { - $this->_writeThrough = $is; - } - - /** - * Writes $bytes to the end of the stream. - * - * @param string $bytes - * @param Swift_InputByteStream $is optional - */ - public function write($bytes, Swift_InputByteStream $is = null) - { - $this->_keyCache->setString( - $this->_nsKey, $this->_itemKey, $bytes, Swift_KeyCache::MODE_APPEND - ); - if (isset($is)) { - $is->write($bytes); - } - if (isset($this->_writeThrough)) { - $this->_writeThrough->write($bytes); - } - } - - /** - * Not used. - */ - public function commit() - { - } - - /** - * Not used. - */ - public function bind(Swift_InputByteStream $is) - { - } - - /** - * Not used. - */ - public function unbind(Swift_InputByteStream $is) - { - } - - /** - * Flush the contents of the stream (empty it) and set the internal pointer - * to the beginning. - */ - public function flushBuffers() - { - $this->_keyCache->clearKey($this->_nsKey, $this->_itemKey); - } - - /** - * Set the nsKey which will be written to. - * - * @param string $nsKey - */ - public function setNsKey($nsKey) - { - $this->_nsKey = $nsKey; - } - - /** - * Set the itemKey which will be written to. - * - * @param string $itemKey - */ - public function setItemKey($itemKey) - { - $this->_itemKey = $itemKey; - } - - /** - * Any implementation should be cloneable, allowing the clone to access a - * separate $nsKey and $itemKey. - */ - public function __clone() - { - $this->_writeThrough = null; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php deleted file mode 100644 index 6eb3db70..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php +++ /dev/null @@ -1,47 +0,0 @@ -createDependenciesFor('transport.loadbalanced') - ); - - $this->setTransports($transports); - } - - /** - * Create a new LoadBalancedTransport instance. - * - * @param array $transports - * - * @return Swift_LoadBalancedTransport - */ - public static function newInstance($transports = array()) - { - return new self($transports); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php deleted file mode 100644 index 6c579396..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php +++ /dev/null @@ -1,47 +0,0 @@ -createDependenciesFor('transport.mail') - ); - - $this->setExtraParams($extraParams); - } - - /** - * Create a new MailTransport instance. - * - * @param string $extraParams To be passed to mail() - * - * @return Swift_MailTransport - */ - public static function newInstance($extraParams = '-f%s') - { - return new self($extraParams); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php deleted file mode 100644 index b6703dee..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php +++ /dev/null @@ -1,115 +0,0 @@ -_transport = $transport; - } - - /** - * Create a new Mailer instance. - * - * @param Swift_Transport $transport - * - * @return Swift_Mailer - */ - public static function newInstance(Swift_Transport $transport) - { - return new self($transport); - } - - /** - * Create a new class instance of one of the message services. - * - * For example 'mimepart' would create a 'message.mimepart' instance - * - * @param string $service - * - * @return object - */ - public function createMessage($service = 'message') - { - return Swift_DependencyContainer::getInstance() - ->lookup('message.'.$service); - } - - /** - * Send the given Message like it would be sent in a mail client. - * - * All recipients (with the exception of Bcc) will be able to see the other - * recipients this message was sent to. - * - * Recipient/sender data will be retrieved from the Message object. - * - * The return value is the number of recipients who were accepted for - * delivery. - * - * @param Swift_Mime_Message $message - * @param array $failedRecipients An array of failures by-reference - * - * @return integer - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $failedRecipients = (array) $failedRecipients; - - if (!$this->_transport->isStarted()) { - $this->_transport->start(); - } - - $sent = 0; - - try { - $sent = $this->_transport->send($message, $failedRecipients); - } catch (Swift_RfcComplianceException $e) { - foreach ($message->getTo() as $address => $name) { - $failedRecipients[] = $address; - } - } - - return $sent; - } - - /** - * Register a plugin using a known unique key (e.g. myPlugin). - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - $this->_transport->registerPlugin($plugin); - } - - /** - * The Transport used to send messages. - * - * @return Swift_Transport - */ - public function getTransport() - { - return $this->_transport; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php deleted file mode 100644 index 37e98daf..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php +++ /dev/null @@ -1,57 +0,0 @@ -_recipients = $recipients; - } - - /** - * Returns true only if there are more recipients to send to. - * - * @return boolean - */ - public function hasNext() - { - return !empty($this->_recipients); - } - - /** - * Returns an array where the keys are the addresses of recipients and the - * values are the names. e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL) - * - * @return array - */ - public function nextRecipient() - { - return array_splice($this->_recipients, 0, 1); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php deleted file mode 100644 index 073bce15..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php +++ /dev/null @@ -1,34 +0,0 @@ - 'Foo') or ('foo@bar' => NULL) - * - * @return array - */ - public function nextRecipient(); -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php deleted file mode 100644 index 764b5aa2..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Stores Messages in memory. - * - * @package Swift - * @author Fabien Potencier - */ -class Swift_MemorySpool implements Swift_Spool -{ - protected $messages = array(); - - /** - * Tests if this Transport mechanism has started. - * - * @return boolean - */ - public function isStarted() - { - return true; - } - - /** - * Starts this Transport mechanism. - */ - public function start() - { - } - - /** - * Stops this Transport mechanism. - */ - public function stop() - { - } - - /** - * Stores a message in the queue. - * - * @param Swift_Mime_Message $message The message to store - * - * @return boolean Whether the operation has succeeded - */ - public function queueMessage(Swift_Mime_Message $message) - { - $this->messages[] = $message; - - return true; - } - - /** - * Sends messages using the given transport instance. - * - * @param Swift_Transport $transport A transport instance - * @param string[] $failedRecipients An array of failures by-reference - * - * @return integer The number of sent emails - */ - public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) - { - if (!$this->messages) { - return 0; - } - - if (!$transport->isStarted()) { - $transport->start(); - } - - $count = 0; - while ($message = array_pop($this->messages)) { - $count += $transport->send($message, $failedRecipients); - } - - return $count; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php deleted file mode 100644 index 158ea25c..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php +++ /dev/null @@ -1,85 +0,0 @@ -createDependenciesFor('mime.message') - ); - - if (!isset($charset)) { - $charset = Swift_DependencyContainer::getInstance() - ->lookup('properties.charset'); - } - $this->setSubject($subject); - $this->setBody($body); - $this->setCharset($charset); - if ($contentType) { - $this->setContentType($contentType); - } - } - - /** - * Create a new Message. - * - * @param string $subject - * @param string $body - * @param string $contentType - * @param string $charset - * - * @return Swift_Message - */ - public static function newInstance($subject = null, $body = null, $contentType = null, $charset = null) - { - return new self($subject, $body, $contentType, $charset); - } - - /** - * Add a MimePart to this Message. - * - * @param string|Swift_OutputByteStream $body - * @param string $contentType - * @param string $charset - * - * @return Swift_Mime_SimpleMessage - */ - public function addPart($body, $contentType = null, $charset = null) - { - return $this->attach(Swift_MimePart::newInstance( - $body, $contentType, $charset - )); - } - - public function __wakeup() - { - Swift_DependencyContainer::getInstance()->createDependenciesFor('mime.message'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php deleted file mode 100644 index faf358fa..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php +++ /dev/null @@ -1,155 +0,0 @@ -setDisposition('attachment'); - $this->setContentType('application/octet-stream'); - $this->_mimeTypes = $mimeTypes; - } - - /** - * Get the nesting level used for this attachment. - * - * Always returns {@link LEVEL_MIXED}. - * - * @return integer - */ - public function getNestingLevel() - { - return self::LEVEL_MIXED; - } - - /** - * Get the Content-Disposition of this attachment. - * - * By default attachments have a disposition of "attachment". - * - * @return string - */ - public function getDisposition() - { - return $this->_getHeaderFieldModel('Content-Disposition'); - } - - /** - * Set the Content-Disposition of this attachment. - * - * @param string $disposition - * - * @return Swift_Mime_Attachment - */ - public function setDisposition($disposition) - { - if (!$this->_setHeaderFieldModel('Content-Disposition', $disposition)) { - $this->getHeaders()->addParameterizedHeader( - 'Content-Disposition', $disposition - ); - } - - return $this; - } - - /** - * Get the filename of this attachment when downloaded. - * - * @return string - */ - public function getFilename() - { - return $this->_getHeaderParameter('Content-Disposition', 'filename'); - } - - /** - * Set the filename of this attachment. - * - * @param string $filename - * - * @return Swift_Mime_Attachment - */ - public function setFilename($filename) - { - $this->_setHeaderParameter('Content-Disposition', 'filename', $filename); - $this->_setHeaderParameter('Content-Type', 'name', $filename); - - return $this; - } - - /** - * Get the file size of this attachment. - * - * @return integer - */ - public function getSize() - { - return $this->_getHeaderParameter('Content-Disposition', 'size'); - } - - /** - * Set the file size of this attachment. - * - * @param integer $size - * - * @return Swift_Mime_Attachment - */ - public function setSize($size) - { - $this->_setHeaderParameter('Content-Disposition', 'size', $size); - - return $this; - } - - /** - * Set the file that this attachment is for. - * - * @param Swift_FileStream $file - * @param string $contentType optional - * - * @return Swift_Mime_Attachment - */ - public function setFile(Swift_FileStream $file, $contentType = null) - { - $this->setFilename(basename($file->getPath())); - $this->setBody($file, $contentType); - if (!isset($contentType)) { - $extension = strtolower(substr( - $file->getPath(), strrpos($file->getPath(), '.') + 1 - )); - - if (array_key_exists($extension, $this->_mimeTypes)) { - $this->setContentType($this->_mimeTypes[$extension]); - } - } - - return $this; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php deleted file mode 100644 index bfd41edf..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php +++ /dev/null @@ -1,26 +0,0 @@ -= $maxLineLength || 76 < $maxLineLength) { - $maxLineLength = 76; - } - - $remainder = 0; - - while (false !== $bytes = $os->read(8190)) { - $encoded = base64_encode($bytes); - $encodedTransformed = ''; - $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; - - while ($thisMaxLineLength < strlen($encoded)) { - $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength) . "\r\n"; - $firstLineOffset = 0; - $encoded = substr($encoded, $thisMaxLineLength); - $thisMaxLineLength = $maxLineLength; - $remainder = 0; - } - - if (0 < $remainingLength = strlen($encoded)) { - $remainder += $remainingLength; - $encodedTransformed .= $encoded; - $encoded = null; - } - - $is->write($encodedTransformed); - } - } - - /** - * Get the name of this encoding scheme. - * Returns the string 'base64'. - * - * @return string - */ - public function getName() - { - return 'base64'; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php deleted file mode 100644 index e6e9e529..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php +++ /dev/null @@ -1,125 +0,0 @@ -charset = $charset ?: 'utf-8'; - } - - /** - * Notify this observer that the entity's charset has changed. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->charset = $charset; - } - - /** - * Encode $in to $out. - * - * @param Swift_OutputByteStream $os to read from - * @param Swift_InputByteStream $is to write to - * @param integer $firstLineOffset - * @param integer $maxLineLength 0 indicates the default length for this encoding - * - * @throws RuntimeException - */ - public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) - { - if ($this->charset !== 'utf-8') { - throw new RuntimeException( - sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset)); - } - - $string = ''; - - while (false !== $bytes = $os->read(8192)) { - $string .= $bytes; - } - - $is->write($this->encodeString($string)); - } - - /** - * Get the MIME name of this content encoding scheme. - * - * @return string - */ - public function getName() - { - return 'quoted-printable'; - } - - /** - * Encode a given string to produce an encoded string. - * - * @param string $string - * @param integer $firstLineOffset if first line needs to be shorter - * @param integer $maxLineLength 0 indicates the default length for this encoding - * - * @return string - * - * @throws RuntimeException - */ - public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) - { - if ($this->charset !== 'utf-8') { - throw new RuntimeException( - sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset)); - } - - return $this->_standardize(quoted_printable_encode($string)); - } - - /** - * Make sure CRLF is correct and HT/SPACE are in valid places. - * - * @param string $string - * - * @return string - */ - protected function _standardize($string) - { - // transform CR or LF to CRLF - $string = preg_replace('~=0D(?!=0A)|(?_name = $name; - $this->_canonical = $canonical; - } - - /** - * Encode a given string to produce an encoded string. - * - * @param string $string - * @param integer $firstLineOffset ignored - * @param integer $maxLineLength - 0 means no wrapping will occur - * - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) - { - if ($this->_canonical) { - $string = $this->_canonicalize($string); - } - - return $this->_safeWordWrap($string, $maxLineLength, "\r\n"); - } - - /** - * Encode stream $in to stream $out. - * - * @param Swift_OutputByteStream $os - * @param Swift_InputByteStream $is - * @param integer $firstLineOffset ignored - * @param integer $maxLineLength optional, 0 means no wrapping will occur - */ - public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) - { - $leftOver = ''; - while (false !== $bytes = $os->read(8192)) { - $toencode = $leftOver . $bytes; - if ($this->_canonical) { - $toencode = $this->_canonicalize($toencode); - } - $wrapped = $this->_safeWordWrap($toencode, $maxLineLength, "\r\n"); - $lastLinePos = strrpos($wrapped, "\r\n"); - $leftOver = substr($wrapped, $lastLinePos); - $wrapped = substr($wrapped, 0, $lastLinePos); - - $is->write($wrapped); - } - if (strlen($leftOver)) { - $is->write($leftOver); - } - } - - /** - * Get the name of this encoding scheme. - * - * @return string - */ - public function getName() - { - return $this->_name; - } - - /** - * Not used. - */ - public function charsetChanged($charset) - { - } - - // -- Private methods - - /** - * A safer (but weaker) wordwrap for unicode. - * - * @param string $string - * @param integer $length - * @param string $le - * - * @return string - */ - private function _safeWordwrap($string, $length = 75, $le = "\r\n") - { - if (0 >= $length) { - return $string; - } - - $originalLines = explode($le, $string); - - $lines = array(); - $lineCount = 0; - - foreach ($originalLines as $originalLine) { - $lines[] = ''; - $currentLine =& $lines[$lineCount++]; - - //$chunks = preg_split('/(?<=[\ \t,\.!\?\-&\+\/])/', $originalLine); - $chunks = preg_split('/(?<=\s)/', $originalLine); - - foreach ($chunks as $chunk) { - if (0 != strlen($currentLine) - && strlen($currentLine . $chunk) > $length) - { - $lines[] = ''; - $currentLine =& $lines[$lineCount++]; - } - $currentLine .= $chunk; - } - } - - return implode("\r\n", $lines); - } - - /** - * Canonicalize string input (fix CRLF). - * - * @param string $string - * - * @return string - */ - private function _canonicalize($string) - { - return str_replace( - array("\r\n", "\r", "\n"), - array("\n", "\n", "\r\n"), - $string - ); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php deleted file mode 100644 index 059c53d4..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php +++ /dev/null @@ -1,125 +0,0 @@ -_dotEscape = $dotEscape; - parent::__construct($charStream, $filter); - } - - public function __sleep() - { - return array('_charStream', '_filter', '_dotEscape'); - } - - protected function getSafeMapShareId() - { - return get_class($this).($this->_dotEscape ? '.dotEscape' : ''); - } - - protected function initSafeMap() - { - parent::initSafeMap(); - if ($this->_dotEscape) { - /* Encode . as =2e for buggy remote servers */ - unset($this->_safeMap[0x2e]); - } - } - - /** - * Encode stream $in to stream $out. - * - * QP encoded strings have a maximum line length of 76 characters. - * If the first line needs to be shorter, indicate the difference with - * $firstLineOffset. - * - * @param Swift_OutputByteStream $os output stream - * @param Swift_InputByteStream $is input stream - * @param integer $firstLineOffset - * @param integer $maxLineLength - */ - public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) - { - if ($maxLineLength > 76 || $maxLineLength <= 0) { - $maxLineLength = 76; - } - - $thisLineLength = $maxLineLength - $firstLineOffset; - - $this->_charStream->flushContents(); - $this->_charStream->importByteStream($os); - - $currentLine = ''; - $prepend = ''; - $size=$lineLen=0; - - while (false !== $bytes = $this->_nextSequence()) { - //If we're filtering the input - if (isset($this->_filter)) { - //If we can't filter because we need more bytes - while ($this->_filter->shouldBuffer($bytes)) { - //Then collect bytes into the buffer - if (false === $moreBytes = $this->_nextSequence(1)) { - break; - } - - foreach ($moreBytes as $b) { - $bytes[] = $b; - } - } - //And filter them - $bytes = $this->_filter->filter($bytes); - } - - $enc = $this->_encodeByteSequence($bytes, $size); - if ($currentLine && $lineLen+$size >= $thisLineLength) { - $is->write($prepend . $this->_standardize($currentLine)); - $currentLine = ''; - $prepend = "=\r\n"; - $thisLineLength = $maxLineLength; - $lineLen=0; - } - $lineLen+=$size; - $currentLine .= $enc; - } - if (strlen($currentLine)) { - $is->write($prepend . $this->_standardize($currentLine)); - } - } - - /** - * Get the name of this encoding scheme. - * Returns the string 'quoted-printable'. - * - * @return string - */ - public function getName() - { - return 'quoted-printable'; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php deleted file mode 100644 index 491409ac..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php +++ /dev/null @@ -1,90 +0,0 @@ - - */ -class Swift_Mime_ContentEncoder_QpContentEncoderProxy implements Swift_Mime_ContentEncoder -{ - /** - * @var Swift_Mime_ContentEncoder_QpContentEncoder - */ - private $safeEncoder; - - /** - * @var Swift_Mime_ContentEncoder_NativeQpContentEncoder - */ - private $nativeEncoder; - - /** - * @var null|string - */ - private $charset; - - /** - * Constructor. - * - * @param Swift_Mime_ContentEncoder_QpContentEncoder $safeEncoder - * @param Swift_Mime_ContentEncoder_NativeQpContentEncoder $nativeEncoder - * @param string|null $charset - */ - public function __construct(Swift_Mime_ContentEncoder_QpContentEncoder $safeEncoder, Swift_Mime_ContentEncoder_NativeQpContentEncoder $nativeEncoder, $charset) - { - $this->safeEncoder = $safeEncoder; - $this->nativeEncoder = $nativeEncoder; - $this->charset = $charset; - } - - /** - * {@inheritdoc} - */ - public function charsetChanged($charset) - { - $this->charset = $charset; - } - - /** - * {@inheritdoc} - */ - public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) - { - $this->getEncoder()->encodeByteStream($os, $is, $firstLineOffset, $maxLineLength); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'quoted-printable'; - } - - /** - * {@inheritdoc} - */ - public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) - { - return $this->getEncoder()->encodeString($string, $firstLineOffset, $maxLineLength); - } - - /** - * @return Swift_Mime_ContentEncoder - */ - private function getEncoder() - { - return 'utf-8' === $this->charset ? $this->nativeEncoder : $this->safeEncoder; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php deleted file mode 100644 index 8f1f9b57..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php +++ /dev/null @@ -1,65 +0,0 @@ - - */ -class Swift_Mime_ContentEncoder_RawContentEncoder implements Swift_Mime_ContentEncoder -{ - /** - * Encode a given string to produce an encoded string. - * - * @param string $string - * @param int $firstLineOffset ignored - * @param int $maxLineLength ignored - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) - { - return $string; - } - - /** - * Encode stream $in to stream $out. - * - * @param Swift_OutputByteStream $in - * @param Swift_InputByteStream $out - * @param int $firstLineOffset ignored - * @param int $maxLineLength ignored - */ - public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) - { - while (false !== ($bytes = $os->read(8192))) { - $is->write($bytes); - } - } - - /** - * Get the name of this encoding scheme. - * - * @return string - */ - public function getName() - { - return 'raw'; - } - - /** - * Not used. - */ - public function charsetChanged($charset) - { - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php deleted file mode 100644 index 05e06e21..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php +++ /dev/null @@ -1,47 +0,0 @@ -setDisposition('inline'); - $this->setId($this->getId()); - } - - /** - * Get the nesting level of this EmbeddedFile. - * - * Returns {@see LEVEL_RELATED}. - * - * @return integer - */ - public function getNestingLevel() - { - return self::LEVEL_RELATED; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php deleted file mode 100644 index e7e6f20d..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php +++ /dev/null @@ -1,26 +0,0 @@ -init(); - } - - public function __wakeup() - { - $this->init(); - } - - protected function init() - { - if (count(self::$_specials) > 0) { - return; - } - - self::$_specials = array( - '(', ')', '<', '>', '[', ']', - ':', ';', '@', ',', '.', '"' - ); - - /*** Refer to RFC 2822 for ABNF grammar ***/ - - //All basic building blocks - self::$_grammar['NO-WS-CTL'] = '[\x01-\x08\x0B\x0C\x0E-\x19\x7F]'; - self::$_grammar['WSP'] = '[ \t]'; - self::$_grammar['CRLF'] = '(?:\r\n)'; - self::$_grammar['FWS'] = '(?:(?:' . self::$_grammar['WSP'] . '*' . - self::$_grammar['CRLF'] . ')?' . self::$_grammar['WSP'] . ')'; - self::$_grammar['text'] = '[\x00-\x08\x0B\x0C\x0E-\x7F]'; - self::$_grammar['quoted-pair'] = '(?:\\\\' . self::$_grammar['text'] . ')'; - self::$_grammar['ctext'] = '(?:' . self::$_grammar['NO-WS-CTL'] . - '|[\x21-\x27\x2A-\x5B\x5D-\x7E])'; - //Uses recursive PCRE (?1) -- could be a weak point?? - self::$_grammar['ccontent'] = '(?:' . self::$_grammar['ctext'] . '|' . - self::$_grammar['quoted-pair'] . '|(?1))'; - self::$_grammar['comment'] = '(\((?:' . self::$_grammar['FWS'] . '|' . - self::$_grammar['ccontent']. ')*' . self::$_grammar['FWS'] . '?\))'; - self::$_grammar['CFWS'] = '(?:(?:' . self::$_grammar['FWS'] . '?' . - self::$_grammar['comment'] . ')*(?:(?:' . self::$_grammar['FWS'] . '?' . - self::$_grammar['comment'] . ')|' . self::$_grammar['FWS'] . '))'; - self::$_grammar['qtext'] = '(?:' . self::$_grammar['NO-WS-CTL'] . - '|[\x21\x23-\x5B\x5D-\x7E])'; - self::$_grammar['qcontent'] = '(?:' . self::$_grammar['qtext'] . '|' . - self::$_grammar['quoted-pair'] . ')'; - self::$_grammar['quoted-string'] = '(?:' . self::$_grammar['CFWS'] . '?"' . - '(' . self::$_grammar['FWS'] . '?' . self::$_grammar['qcontent'] . ')*' . - self::$_grammar['FWS'] . '?"' . self::$_grammar['CFWS'] . '?)'; - self::$_grammar['atext'] = '[a-zA-Z0-9!#\$%&\'\*\+\-\/=\?\^_`\{\}\|~]'; - self::$_grammar['atom'] = '(?:' . self::$_grammar['CFWS'] . '?' . - self::$_grammar['atext'] . '+' . self::$_grammar['CFWS'] . '?)'; - self::$_grammar['dot-atom-text'] = '(?:' . self::$_grammar['atext'] . '+' . - '(\.' . self::$_grammar['atext'] . '+)*)'; - self::$_grammar['dot-atom'] = '(?:' . self::$_grammar['CFWS'] . '?' . - self::$_grammar['dot-atom-text'] . '+' . self::$_grammar['CFWS'] . '?)'; - self::$_grammar['word'] = '(?:' . self::$_grammar['atom'] . '|' . - self::$_grammar['quoted-string'] . ')'; - self::$_grammar['phrase'] = '(?:' . self::$_grammar['word'] . '+?)'; - self::$_grammar['no-fold-quote'] = '(?:"(?:' . self::$_grammar['qtext'] . - '|' . self::$_grammar['quoted-pair'] . ')*")'; - self::$_grammar['dtext'] = '(?:' . self::$_grammar['NO-WS-CTL'] . - '|[\x21-\x5A\x5E-\x7E])'; - self::$_grammar['no-fold-literal'] = '(?:\[(?:' . self::$_grammar['dtext'] . - '|' . self::$_grammar['quoted-pair'] . ')*\])'; - - //Message IDs - self::$_grammar['id-left'] = '(?:' . self::$_grammar['dot-atom-text'] . '|' . - self::$_grammar['no-fold-quote'] . ')'; - self::$_grammar['id-right'] = '(?:' . self::$_grammar['dot-atom-text'] . '|' . - self::$_grammar['no-fold-literal'] . ')'; - - //Addresses, mailboxes and paths - self::$_grammar['local-part'] = '(?:' . self::$_grammar['dot-atom'] . '|' . - self::$_grammar['quoted-string'] . ')'; - self::$_grammar['dcontent'] = '(?:' . self::$_grammar['dtext'] . '|' . - self::$_grammar['quoted-pair'] . ')'; - self::$_grammar['domain-literal'] = '(?:' . self::$_grammar['CFWS'] . '?\[(' . - self::$_grammar['FWS'] . '?' . self::$_grammar['dcontent'] . ')*?' . - self::$_grammar['FWS'] . '?\]' . self::$_grammar['CFWS'] . '?)'; - self::$_grammar['domain'] = '(?:' . self::$_grammar['dot-atom'] . '|' . - self::$_grammar['domain-literal'] . ')'; - self::$_grammar['addr-spec'] = '(?:' . self::$_grammar['local-part'] . '@' . - self::$_grammar['domain'] . ')'; - } - - /** - * Get the grammar defined for $name token. - * - * @param string $name exactly as written in the RFC - * - * @return string - */ - public function getDefinition($name) - { - if (array_key_exists($name, self::$_grammar)) { - return self::$_grammar[$name]; - } else { - throw new Swift_RfcComplianceException( - "No such grammar '" . $name . "' defined." - ); - } - } - - /** - * Returns the tokens defined in RFC 2822 (and some related RFCs). - * - * @return array - */ - public function getGrammarDefinitions() - { - return self::$_grammar; - } - - /** - * Returns the current special characters used in the syntax which need to be escaped. - * - * @return array - */ - public function getSpecials() - { - return self::$_specials; - } - - /** - * Escape special characters in a string (convert to quoted-pairs). - * - * @param string $token - * @param string[] $include additional chars to escape - * @param string[] $exclude chars from escaping - * - * @return string - */ - public function escapeSpecials($token, $include = array(), $exclude = array()) - { - foreach (array_merge(array('\\'), array_diff(self::$_specials, $exclude), $include) as $char) { - $token = str_replace($char, '\\' . $char, $token); - } - - return $token; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Header.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Header.php deleted file mode 100644 index 55d3ab8a..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Header.php +++ /dev/null @@ -1,95 +0,0 @@ -getName(), "\r\n"); - mb_internal_encoding($old); - - return $newstring; - } - - return parent::encodeString($string, $firstLineOffset, $maxLineLength); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php deleted file mode 100644 index c9bbe710..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php +++ /dev/null @@ -1,67 +0,0 @@ -_safeMap[$byte] = chr($byte); - } - } - - /** - * Get the name of this encoding scheme. - * - * Returns the string 'Q'. - * - * @return string - */ - public function getName() - { - return 'Q'; - } - - /** - * Takes an unencoded string and produces a QP encoded string from it. - * - * @param string $string string to encode - * @param integer $firstLineOffset optional - * @param integer $maxLineLength optional, 0 indicates the default of 76 chars - * - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) - { - return str_replace(array(' ', '=20', "=\r\n"), array('_', '_', "\r\n"), - parent::encodeString($string, $firstLineOffset, $maxLineLength) - ); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php deleted file mode 100644 index 7cab133c..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php +++ /dev/null @@ -1,80 +0,0 @@ -setGrammar($grammar); - } - - /** - * Set the character set used in this Header. - * - * @param string $charset - */ - public function setCharset($charset) - { - $this->clearCachedValueIf($charset != $this->_charset); - $this->_charset = $charset; - if (isset($this->_encoder)) { - $this->_encoder->charsetChanged($charset); - } - } - - /** - * Get the character set used in this Header. - * - * @return string - */ - public function getCharset() - { - return $this->_charset; - } - - /** - * Set the language used in this Header. - * - * For example, for US English, 'en-us'. - * This can be unspecified. - * - * @param string $lang - */ - public function setLanguage($lang) - { - $this->clearCachedValueIf($this->_lang != $lang); - $this->_lang = $lang; - } - - /** - * Get the language used in this Header. - * - * @return string - */ - public function getLanguage() - { - return $this->_lang; - } - - /** - * Set the encoder used for encoding the header. - * - * @param Swift_Mime_HeaderEncoder $encoder - */ - public function setEncoder(Swift_Mime_HeaderEncoder $encoder) - { - $this->_encoder = $encoder; - $this->setCachedValue(null); - } - - /** - * Get the encoder used for encoding this Header. - * - * @return Swift_Mime_HeaderEncoder - */ - public function getEncoder() - { - return $this->_encoder; - } - - /** - * Set the grammar used for the header. - * - * @param Swift_Mime_Grammar $grammar - */ - public function setGrammar(Swift_Mime_Grammar $grammar) - { - $this->_grammar = $grammar; - $this->setCachedValue(null); - } - - /** - * Get the grammar used for this Header. - * - * @return Swift_Mime_Grammar - */ - public function getGrammar() - { - return $this->_grammar; - } - - /** - * Get the name of this header (e.g. charset). - * - * @return string - */ - public function getFieldName() - { - return $this->_name; - } - - /** - * Set the maximum length of lines in the header (excluding EOL). - * - * @param integer $lineLength - */ - public function setMaxLineLength($lineLength) - { - $this->clearCachedValueIf($this->_lineLength != $lineLength); - $this->_lineLength = $lineLength; - } - - /** - * Get the maximum permitted length of lines in this Header. - * - * @return int - */ - public function getMaxLineLength() - { - return $this->_lineLength; - } - - /** - * Get this Header rendered as a RFC 2822 compliant string. - * - * @return string - * - * @throws Swift_RfcComplianceException - */ - public function toString() - { - return $this->_tokensToString($this->toTokens()); - } - - /** - * Returns a string representation of this object. - * - * @return string - * - * @see toString() - */ - public function __toString() - { - return $this->toString(); - } - - // -- Points of extension - - /** - * Set the name of this Header field. - * - * @param string $name - */ - protected function setFieldName($name) - { - $this->_name = $name; - } - - /** - * Produces a compliant, formatted RFC 2822 'phrase' based on the string given. - * - * @param Swift_Mime_Header $header - * @param string $string as displayed - * @param string $charset of the text - * @param Swift_Mime_HeaderEncoder $encoder - * @param boolean $shorten the first line to make remove for header name - * - * @return string - */ - protected function createPhrase(Swift_Mime_Header $header, $string, $charset, Swift_Mime_HeaderEncoder $encoder = null, $shorten = false) - { - //Treat token as exactly what was given - $phraseStr = $string; - //If it's not valid - if (!preg_match('/^' . $this->getGrammar()->getDefinition('phrase') . '$/D', $phraseStr)) { - // .. but it is just ascii text, try escaping some characters - // and make it a quoted-string - if (preg_match('/^' . $this->getGrammar()->getDefinition('text') . '*$/D', $phraseStr)) { - $phraseStr = $this->getGrammar()->escapeSpecials( - $phraseStr, array('"'), $this->getGrammar()->getSpecials() - ); - $phraseStr = '"' . $phraseStr . '"'; - } else { // ... otherwise it needs encoding - //Determine space remaining on line if first line - if ($shorten) { - $usedLength = strlen($header->getFieldName() . ': '); - } else { - $usedLength = 0; - } - $phraseStr = $this->encodeWords($header, $string, $usedLength); - } - } - - return $phraseStr; - } - - /** - * Encode needed word tokens within a string of input. - * - * @param Swift_Mime_Header $header - * @param string $input - * @param string $usedLength optional - * - * @return string - */ - protected function encodeWords(Swift_Mime_Header $header, $input, $usedLength = -1) - { - $value = ''; - - $tokens = $this->getEncodableWordTokens($input); - - foreach ($tokens as $token) { - //See RFC 2822, Sect 2.2 (really 2.2 ??) - if ($this->tokenNeedsEncoding($token)) { - //Don't encode starting WSP - $firstChar = substr($token, 0, 1); - switch ($firstChar) { - case ' ': - case "\t": - $value .= $firstChar; - $token = substr($token, 1); - } - - if (-1 == $usedLength) { - $usedLength = strlen($header->getFieldName() . ': ') + strlen($value); - } - $value .= $this->getTokenAsEncodedWord($token, $usedLength); - - $header->setMaxLineLength(76); //Forcefully override - } else { - $value .= $token; - } - } - - return $value; - } - - /** - * Test if a token needs to be encoded or not. - * - * @param string $token - * - * @return boolean - */ - protected function tokenNeedsEncoding($token) - { - return preg_match('~[\x00-\x08\x10-\x19\x7F-\xFF\r\n]~', $token); - } - - /** - * Splits a string into tokens in blocks of words which can be encoded quickly. - * - * @param string $string - * - * @return string[] - */ - protected function getEncodableWordTokens($string) - { - $tokens = array(); - - $encodedToken = ''; - //Split at all whitespace boundaries - foreach (preg_split('~(?=[\t ])~', $string) as $token) { - if ($this->tokenNeedsEncoding($token)) { - $encodedToken .= $token; - } else { - if (strlen($encodedToken) > 0) { - $tokens[] = $encodedToken; - $encodedToken = ''; - } - $tokens[] = $token; - } - } - if (strlen($encodedToken)) { - $tokens[] = $encodedToken; - } - - return $tokens; - } - - /** - * Get a token as an encoded word for safe insertion into headers. - * - * @param string $token token to encode - * @param integer $firstLineOffset optional - * - * @return string - */ - protected function getTokenAsEncodedWord($token, $firstLineOffset = 0) - { - //Adjust $firstLineOffset to account for space needed for syntax - $charsetDecl = $this->_charset; - if (isset($this->_lang)) { - $charsetDecl .= '*' . $this->_lang; - } - $encodingWrapperLength = strlen( - '=?' . $charsetDecl . '?' . $this->_encoder->getName() . '??=' - ); - - if ($firstLineOffset >= 75) { //Does this logic need to be here? - $firstLineOffset = 0; - } - - $encodedTextLines = explode("\r\n", - $this->_encoder->encodeString( - $token, $firstLineOffset, 75 - $encodingWrapperLength, $this->_charset - ) - ); - - if (strtolower($this->_charset) !== 'iso-2022-jp') { // special encoding for iso-2022-jp using mb_encode_mimeheader - foreach ($encodedTextLines as $lineNum => $line) { - $encodedTextLines[$lineNum] = '=?' . $charsetDecl . - '?' . $this->_encoder->getName() . - '?' . $line . '?='; - } - } - - return implode("\r\n ", $encodedTextLines); - } - - /** - * Generates tokens from the given string which include CRLF as individual tokens. - * - * @param string $token - * - * @return string[] - */ - protected function generateTokenLines($token) - { - return preg_split('~(\r\n)~', $token, -1, PREG_SPLIT_DELIM_CAPTURE); - } - - /** - * Set a value into the cache. - * - * @param string $value - */ - protected function setCachedValue($value) - { - $this->_cachedValue = $value; - } - - /** - * Get the value in the cache. - * - * @return string - */ - protected function getCachedValue() - { - return $this->_cachedValue; - } - - /** - * Clear the cached value if $condition is met. - * - * @param boolean $condition - */ - protected function clearCachedValueIf($condition) - { - if ($condition) { - $this->setCachedValue(null); - } - } - - // -- Private methods - - /** - * Generate a list of all tokens in the final header. - * - * @param string $string The string to tokenize - * - * @return array An array of tokens as strings - */ - protected function toTokens($string = null) - { - if (is_null($string)) { - $string = $this->getFieldBody(); - } - - $tokens = array(); - - //Generate atoms; split at all invisible boundaries followed by WSP - foreach (preg_split('~(?=[ \t])~', $string) as $token) { - $newTokens = $this->generateTokenLines($token); - foreach ($newTokens as $newToken) { - $tokens[] = $newToken; - } - } - return $tokens; - } - - /** - * Takes an array of tokens which appear in the header and turns them into - * an RFC 2822 compliant string, adding FWSP where needed. - * - * @param string[] $tokens - * - * @return string - */ - private function _tokensToString(array $tokens) - { - $lineCount = 0; - $headerLines = array(); - $headerLines[] = $this->_name . ': '; - $currentLine =& $headerLines[$lineCount++]; - - //Build all tokens back into compliant header - foreach ($tokens as $i => $token) { - //Line longer than specified maximum or token was just a new line - if (("\r\n" == $token) || - ($i > 0 && strlen($currentLine . $token) > $this->_lineLength) - && 0 < strlen($currentLine)) - { - $headerLines[] = ''; - $currentLine =& $headerLines[$lineCount++]; - } - - //Append token to the line - if ("\r\n" != $token) { - $currentLine .= $token; - } - } - - //Implode with FWS (RFC 2822, 2.2.3) - return implode("\r\n", $headerLines) . "\r\n"; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php deleted file mode 100644 index 9127cc22..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * - * - * @param string $name of Header - * @param Swift_Mime_Grammar $grammar - */ - public function __construct($name, Swift_Mime_Grammar $grammar) - { - $this->setFieldName($name); - parent::__construct($grammar); - } - - /** - * Get the type of Header that this instance represents. - * - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - * - * @return int - */ - public function getFieldType() - { - return self::TYPE_DATE; - } - - /** - * Set the model for the field body. - * - * This method takes a UNIX timestamp. - * - * @param integer $model - */ - public function setFieldBodyModel($model) - { - $this->setTimestamp($model); - } - - /** - * Get the model for the field body. - * - * This method returns a UNIX timestamp. - * - * @return mixed - */ - public function getFieldBodyModel() - { - return $this->getTimestamp(); - } - - /** - * Get the UNIX timestamp of the Date in this Header. - * - * @return int - */ - public function getTimestamp() - { - return $this->_timestamp; - } - - /** - * Set the UNIX timestamp of the Date in this Header. - * - * @param integer $timestamp - */ - public function setTimestamp($timestamp) - { - if (!is_null($timestamp)) { - $timestamp = (int) $timestamp; - } - $this->clearCachedValueIf($this->_timestamp != $timestamp); - $this->_timestamp = $timestamp; - } - - /** - * Get the string value of the body in this Header. - * - * This is not necessarily RFC 2822 compliant since folding white space will - * not be added at this stage (see {@link toString()} for that). - * - * @see toString() - * - * @return string - */ - public function getFieldBody() - { - if (!$this->getCachedValue()) { - if (isset($this->_timestamp)) { - $this->setCachedValue(date('r', $this->_timestamp)); - } - } - - return $this->getCachedValue(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php deleted file mode 100644 index 1d00015e..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php +++ /dev/null @@ -1,183 +0,0 @@ -setFieldName($name); - parent::__construct($grammar); - } - - /** - * Get the type of Header that this instance represents. - * - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - * - * @return int - */ - public function getFieldType() - { - return self::TYPE_ID; - } - - /** - * Set the model for the field body. - * - * This method takes a string ID, or an array of IDs. - * - * @param mixed $model - * - * @throws Swift_RfcComplianceException - */ - public function setFieldBodyModel($model) - { - $this->setId($model); - } - - /** - * Get the model for the field body. - * - * This method returns an array of IDs - * - * @return array - */ - public function getFieldBodyModel() - { - return $this->getIds(); - } - - /** - * Set the ID used in the value of this header. - * - * @param string|array $id - * - * @throws Swift_RfcComplianceException - */ - public function setId($id) - { - $this->setIds(is_array($id) ? $id : array($id)); - } - - /** - * Get the ID used in the value of this Header. - * - * If multiple IDs are set only the first is returned. - * - * @return string - */ - public function getId() - { - if (count($this->_ids) > 0) { - return $this->_ids[0]; - } - } - - /** - * Set a collection of IDs to use in the value of this Header. - * - * @param string[] $ids - * - * @throws Swift_RfcComplianceException - */ - public function setIds(array $ids) - { - $actualIds = array(); - - foreach ($ids as $id) { - $this->_assertValidId($id); - $actualIds[] = $id; - } - - $this->clearCachedValueIf($this->_ids != $actualIds); - $this->_ids = $actualIds; - } - - /** - * Get the list of IDs used in this Header. - * - * @return string[] - */ - public function getIds() - { - return $this->_ids; - } - - /** - * Get the string value of the body in this Header. - * - * This is not necessarily RFC 2822 compliant since folding white space will - * not be added at this stage (see {@see toString()} for that). - * - * @see toString() - * - * @return string - * - * @throws Swift_RfcComplianceException - */ - public function getFieldBody() - { - if (!$this->getCachedValue()) { - $angleAddrs = array(); - - foreach ($this->_ids as $id) { - $angleAddrs[] = '<' . $id . '>'; - } - - $this->setCachedValue(implode(' ', $angleAddrs)); - } - - return $this->getCachedValue(); - } - - /** - * Throws an Exception if the id passed does not comply with RFC 2822. - * - * @param string $id - * - * @throws Swift_RfcComplianceException - */ - private function _assertValidId($id) - { - if (!preg_match( - '/^' . $this->getGrammar()->getDefinition('id-left') . '@' . - $this->getGrammar()->getDefinition('id-right') . '$/D', - $id - )) - { - throw new Swift_RfcComplianceException( - 'Invalid ID given <' . $id . '>' - ); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php deleted file mode 100644 index 0fda5ae9..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php +++ /dev/null @@ -1,358 +0,0 @@ -setFieldName($name); - $this->setEncoder($encoder); - parent::__construct($grammar); - } - - /** - * Get the type of Header that this instance represents. - * - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - * - * @return int - */ - public function getFieldType() - { - return self::TYPE_MAILBOX; - } - - /** - * Set the model for the field body. - * - * This method takes a string, or an array of addresses. - * - * @param mixed $model - * - * @throws Swift_RfcComplianceException - */ - public function setFieldBodyModel($model) - { - $this->setNameAddresses($model); - } - - /** - * Get the model for the field body. - * - * This method returns an associative array like {@link getNameAddresses()} - * - * @return array - * - * @throws Swift_RfcComplianceException - */ - public function getFieldBodyModel() - { - return $this->getNameAddresses(); - } - - /** - * Set a list of mailboxes to be shown in this Header. - * - * The mailboxes can be a simple array of addresses, or an array of - * key=>value pairs where (email => personalName). - * Example: - * - * setNameAddresses(array( - * 'chris@swiftmailer.org' => 'Chris Corbyn', - * 'mark@swiftmailer.org' //No associated personal name - * )); - * ?> - * - * - * @see __construct() - * @see setAddresses() - * @see setValue() - * - * @param string|string[] $mailboxes - * - * @throws Swift_RfcComplianceException - */ - public function setNameAddresses($mailboxes) - { - $this->_mailboxes = $this->normalizeMailboxes((array) $mailboxes); - $this->setCachedValue(null); //Clear any cached value - } - - /** - * Get the full mailbox list of this Header as an array of valid RFC 2822 strings. - * - * Example: - * - * 'Chris Corbyn', - * 'mark@swiftmailer.org' => 'Mark Corbyn') - * ); - * print_r($header->getNameAddressStrings()); - * // array ( - * // 0 => Chris Corbyn , - * // 1 => Mark Corbyn - * // ) - * ?> - * - * - * @see getNameAddresses() - * @see toString() - * - * @return string[] - * - * @throws Swift_RfcComplianceException - */ - public function getNameAddressStrings() - { - return $this->_createNameAddressStrings($this->getNameAddresses()); - } - - /** - * Get all mailboxes in this Header as key=>value pairs. - * - * The key is the address and the value is the name (or null if none set). - * Example: - * - * 'Chris Corbyn', - * 'mark@swiftmailer.org' => 'Mark Corbyn') - * ); - * print_r($header->getNameAddresses()); - * // array ( - * // chris@swiftmailer.org => Chris Corbyn, - * // mark@swiftmailer.org => Mark Corbyn - * // ) - * ?> - * - * - * @see getAddresses() - * @see getNameAddressStrings() - * - * @return string[] - */ - public function getNameAddresses() - { - return $this->_mailboxes; - } - - /** - * Makes this Header represent a list of plain email addresses with no names. - * - * Example: - * - * setAddresses( - * array('one@domain.tld', 'two@domain.tld', 'three@domain.tld') - * ); - * ?> - * - * - * @see setNameAddresses() - * @see setValue() - * - * @param string[] $addresses - * - * @throws Swift_RfcComplianceException - */ - public function setAddresses($addresses) - { - $this->setNameAddresses(array_values((array) $addresses)); - } - - /** - * Get all email addresses in this Header. - * - * @see getNameAddresses() - * - * @return string[] - */ - public function getAddresses() - { - return array_keys($this->_mailboxes); - } - - /** - * Remove one or more addresses from this Header. - * - * @param string|string[] $addresses - */ - public function removeAddresses($addresses) - { - $this->setCachedValue(null); - foreach ((array) $addresses as $address) { - unset($this->_mailboxes[$address]); - } - } - - /** - * Get the string value of the body in this Header. - * - * This is not necessarily RFC 2822 compliant since folding white space will - * not be added at this stage (see {@link toString()} for that). - * - * @see toString() - * - * @return string - * - * @throws Swift_RfcComplianceException - */ - public function getFieldBody() - { - //Compute the string value of the header only if needed - if (is_null($this->getCachedValue())) { - $this->setCachedValue($this->createMailboxListString($this->_mailboxes)); - } - - return $this->getCachedValue(); - } - - // -- Points of extension - - /** - * Normalizes a user-input list of mailboxes into consistent key=>value pairs. - * - * @param string[] $mailboxes - * - * @return string[] - */ - protected function normalizeMailboxes(array $mailboxes) - { - $actualMailboxes = array(); - - foreach ($mailboxes as $key => $value) { - if (is_string($key)) { //key is email addr - $address = $key; - $name = $value; - } else { - $address = $value; - $name = null; - } - $this->_assertValidAddress($address); - $actualMailboxes[$address] = $name; - } - - return $actualMailboxes; - } - - /** - * Produces a compliant, formatted display-name based on the string given. - * - * @param string $displayName as displayed - * @param boolean $shorten the first line to make remove for header name - * - * @return string - */ - protected function createDisplayNameString($displayName, $shorten = false) - { - return $this->createPhrase($this, $displayName, - $this->getCharset(), $this->getEncoder(), $shorten - ); - } - - /** - * Creates a string form of all the mailboxes in the passed array. - * - * @param string[] $mailboxes - * - * @return string - * - * @throws Swift_RfcComplianceException - */ - protected function createMailboxListString(array $mailboxes) - { - return implode(', ', $this->_createNameAddressStrings($mailboxes)); - } - - /** - * Redefine the encoding requirements for mailboxes. - * - * Commas and semicolons are used to separate - * multiple addresses, and should therefore be encoded - * - * @param string $token - * - * @return boolean - */ - protected function tokenNeedsEncoding($token) - { - return preg_match('/[,;]/', $token) || parent::tokenNeedsEncoding($token); - } - - // -- Private methods - - /** - * Return an array of strings conforming the the name-addr spec of RFC 2822. - * - * @param string[] $mailboxes - * - * @return string[] - */ - private function _createNameAddressStrings(array $mailboxes) - { - $strings = array(); - - foreach ($mailboxes as $email => $name) { - $mailboxStr = $email; - if (!is_null($name)) { - $nameStr = $this->createDisplayNameString($name, empty($strings)); - $mailboxStr = $nameStr . ' <' . $mailboxStr . '>'; - } - $strings[] = $mailboxStr; - } - - return $strings; - } - - /** - * Throws an Exception if the address passed does not comply with RFC 2822. - * - * @param string $address - * - * @throws Swift_RfcComplianceException If invalid. - */ - private function _assertValidAddress($address) - { - if (!preg_match('/^' . $this->getGrammar()->getDefinition('addr-spec') . '$/D', - $address)) - { - throw new Swift_RfcComplianceException( - 'Address in mailbox given [' . $address . - '] does not comply with RFC 2822, 3.6.2.' - ); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php deleted file mode 100644 index 3ef628c1..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php +++ /dev/null @@ -1,265 +0,0 @@ -_paramEncoder = $paramEncoder; - } - - /** - * Get the type of Header that this instance represents. - * - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - * - * @return int - */ - public function getFieldType() - { - return self::TYPE_PARAMETERIZED; - } - - /** - * Set the character set used in this Header. - * - * @param string $charset - */ - public function setCharset($charset) - { - parent::setCharset($charset); - if (isset($this->_paramEncoder)) { - $this->_paramEncoder->charsetChanged($charset); - } - } - - /** - * Set the value of $parameter. - * - * @param string $parameter - * @param string $value - */ - public function setParameter($parameter, $value) - { - $this->setParameters(array_merge($this->getParameters(), array($parameter => $value))); - } - - /** - * Get the value of $parameter. - * - * @param string $parameter - * - * @return string - */ - public function getParameter($parameter) - { - $params = $this->getParameters(); - - return array_key_exists($parameter, $params) - ? $params[$parameter] - : null; - } - - /** - * Set an associative array of parameter names mapped to values. - * - * @param string[] $parameters - */ - public function setParameters(array $parameters) - { - $this->clearCachedValueIf($this->_params != $parameters); - $this->_params = $parameters; - } - - /** - * Returns an associative array of parameter names mapped to values. - * - * @return string[] - */ - public function getParameters() - { - return $this->_params; - } - - /** - * Get the value of this header prepared for rendering. - * - * @return string - */ - public function getFieldBody() //TODO: Check caching here - { - $body = parent::getFieldBody(); - foreach ($this->_params as $name => $value) { - if (!is_null($value)) { - //Add the parameter - $body .= '; ' . $this->_createParameter($name, $value); - } - } - - return $body; - } - - // -- Protected methods - - /** - * Generate a list of all tokens in the final header. - * - * This doesn't need to be overridden in theory, but it is for implementation - * reasons to prevent potential breakage of attributes. - * - * @param string $string The string to tokenize - * - * @return array An array of tokens as strings - */ - protected function toTokens($string = null) - { - $tokens = parent::toTokens(parent::getFieldBody()); - - //Try creating any parameters - foreach ($this->_params as $name => $value) { - if (!is_null($value)) { - //Add the semi-colon separator - $tokens[count($tokens)-1] .= ';'; - $tokens = array_merge($tokens, $this->generateTokenLines( - ' ' . $this->_createParameter($name, $value) - )); - } - } - - return $tokens; - } - - // -- Private methods - - /** - * Render a RFC 2047 compliant header parameter from the $name and $value. - * - * @param string $name - * @param string $value - * - * @return string - */ - private function _createParameter($name, $value) - { - $origValue = $value; - - $encoded = false; - //Allow room for parameter name, indices, "=" and DQUOTEs - $maxValueLength = $this->getMaxLineLength() - strlen($name . '=*N"";') - 1; - $firstLineOffset = 0; - - //If it's not already a valid parameter value... - if (!preg_match('/^' . self::TOKEN_REGEX . '$/D', $value)) { - //TODO: text, or something else?? - //... and it's not ascii - if (!preg_match('/^' . $this->getGrammar()->getDefinition('text') . '*$/D', $value)) { - $encoded = true; - //Allow space for the indices, charset and language - $maxValueLength = $this->getMaxLineLength() - strlen($name . '*N*="";') - 1; - $firstLineOffset = strlen( - $this->getCharset() . "'" . $this->getLanguage() . "'" - ); - } - } - - //Encode if we need to - if ($encoded || strlen($value) > $maxValueLength) { - if (isset($this->_paramEncoder)) { - $value = $this->_paramEncoder->encodeString( - $origValue, $firstLineOffset, $maxValueLength, $this->getCharset() - ); - } else { //We have to go against RFC 2183/2231 in some areas for interoperability - $value = $this->getTokenAsEncodedWord($origValue); - $encoded = false; - } - } - - $valueLines = isset($this->_paramEncoder) ? explode("\r\n", $value) : array($value); - - //Need to add indices - if (count($valueLines) > 1) { - $paramLines = array(); - foreach ($valueLines as $i => $line) { - $paramLines[] = $name . '*' . $i . - $this->_getEndOfParameterValue($line, true, $i == 0); - } - - return implode(";\r\n ", $paramLines); - } else { - return $name . $this->_getEndOfParameterValue( - $valueLines[0], $encoded, true - ); - } - } - - /** - * Returns the parameter value from the "=" and beyond. - * - * @param string $value to append - * @param boolean $encoded - * @param boolean $firstLine - * - * @return string - */ - private function _getEndOfParameterValue($value, $encoded = false, $firstLine = false) - { - if (!preg_match('/^' . self::TOKEN_REGEX . '$/D', $value)) { - $value = '"' . $value . '"'; - } - $prepend = '='; - if ($encoded) { - $prepend = '*='; - if ($firstLine) { - $prepend = '*=' . $this->getCharset() . "'" . $this->getLanguage() . - "'"; - } - } - - return $prepend . $value; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php deleted file mode 100644 index bfecf3f4..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php +++ /dev/null @@ -1,146 +0,0 @@ -setFieldName($name); - parent::__construct($grammar); - } - - /** - * Get the type of Header that this instance represents. - * - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - * - * @return int - */ - public function getFieldType() - { - return self::TYPE_PATH; - } - - /** - * Set the model for the field body. - * This method takes a string for an address. - * - * @param string $model - * - * @throws Swift_RfcComplianceException - */ - public function setFieldBodyModel($model) - { - $this->setAddress($model); - } - - /** - * Get the model for the field body. - * This method returns a string email address. - * - * @return mixed - */ - public function getFieldBodyModel() - { - return $this->getAddress(); - } - - /** - * Set the Address which should appear in this Header. - * - * @param string $address - * - * @throws Swift_RfcComplianceException - */ - public function setAddress($address) - { - if (is_null($address)) { - $this->_address = null; - } elseif ('' == $address) { - $this->_address = ''; - } else { - $this->_assertValidAddress($address); - $this->_address = $address; - } - $this->setCachedValue(null); - } - - /** - * Get the address which is used in this Header (if any). - * - * Null is returned if no address is set. - * - * @return string - */ - public function getAddress() - { - return $this->_address; - } - - /** - * Get the string value of the body in this Header. - * - * This is not necessarily RFC 2822 compliant since folding white space will - * not be added at this stage (see {@link toString()} for that). - * - * @see toString() - * - * @return string - */ - public function getFieldBody() - { - if (!$this->getCachedValue()) { - if (isset($this->_address)) { - $this->setCachedValue('<' . $this->_address . '>'); - } - } - - return $this->getCachedValue(); - } - - /** - * Throws an Exception if the address passed does not comply with RFC 2822. - * - * @param string $address - * - * @throws Swift_RfcComplianceException If address is invalid - */ - private function _assertValidAddress($address) - { - if (!preg_match('/^' . $this->getGrammar()->getDefinition('addr-spec') . '$/D', - $address)) - { - throw new Swift_RfcComplianceException( - 'Address set in PathHeader does not comply with addr-spec of RFC 2822.' - ); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php deleted file mode 100644 index 2de49b4d..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php +++ /dev/null @@ -1,114 +0,0 @@ -setFieldName($name); - $this->setEncoder($encoder); - parent::__construct($grammar); - } - - /** - * Get the type of Header that this instance represents. - * - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - * - * @return int - */ - public function getFieldType() - { - return self::TYPE_TEXT; - } - - /** - * Set the model for the field body. - * - * This method takes a string for the field value. - * - * @param string $model - */ - public function setFieldBodyModel($model) - { - $this->setValue($model); - } - - /** - * Get the model for the field body. - * - * This method returns a string. - * - * @return string - */ - public function getFieldBodyModel() - { - return $this->getValue(); - } - - /** - * Get the (unencoded) value of this header. - * - * @return string - */ - public function getValue() - { - return $this->_value; - } - - /** - * Set the (unencoded) value of this header. - * - * @param string $value - */ - public function setValue($value) - { - $this->clearCachedValueIf($this->_value != $value); - $this->_value = $value; - } - - /** - * Get the value of this header prepared for rendering. - * - * @return string - */ - public function getFieldBody() - { - if (!$this->getCachedValue()) { - $this->setCachedValue( - $this->encodeWords($this, $this->_value) - ); - } - - return $this->getCachedValue(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Message.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Message.php deleted file mode 100644 index bce3af3c..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Message.php +++ /dev/null @@ -1,225 +0,0 @@ - 'Real Name'). - * - * If the second parameter is provided and the first is a string, then $name - * is associated with the address. - * - * @param mixed $address - * @param string $name optional - */ - public function setSender($address, $name = null); - - /** - * Get the sender address for this message. - * - * This has a higher significance than the From address. - * - * @return string - */ - public function getSender(); - - /** - * Set the From address of this message. - * - * It is permissible for multiple From addresses to be set using an array. - * - * If multiple From addresses are used, you SHOULD set the Sender address and - * according to RFC 2822, MUST set the sender address. - * - * An array can be used if display names are to be provided: i.e. - * array('email@address.com' => 'Real Name'). - * - * If the second parameter is provided and the first is a string, then $name - * is associated with the address. - * - * @param mixed $addresses - * @param string $name optional - */ - public function setFrom($addresses, $name = null); - - /** - * Get the From address(es) of this message. - * - * This method always returns an associative array where the keys are the - * addresses. - * - * @return string[] - */ - public function getFrom(); - - /** - * Set the Reply-To address(es). - * - * Any replies from the receiver will be sent to this address. - * - * It is permissible for multiple reply-to addresses to be set using an array. - * - * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. - * - * If the second parameter is provided and the first is a string, then $name - * is associated with the address. - * - * @param mixed $addresses - * @param string $name optional - */ - public function setReplyTo($addresses, $name = null); - - /** - * Get the Reply-To addresses for this message. - * - * This method always returns an associative array where the keys provide the - * email addresses. - * - * @return string[] - */ - public function getReplyTo(); - - /** - * Set the To address(es). - * - * Recipients set in this field will receive a copy of this message. - * - * This method has the same synopsis as {@link setFrom()} and {@link setCc()}. - * - * If the second parameter is provided and the first is a string, then $name - * is associated with the address. - * - * @param mixed $addresses - * @param string $name optional - */ - public function setTo($addresses, $name = null); - - /** - * Get the To addresses for this message. - * - * This method always returns an associative array, whereby the keys provide - * the actual email addresses. - * - * @return string[] - */ - public function getTo(); - - /** - * Set the Cc address(es). - * - * Recipients set in this field will receive a 'carbon-copy' of this message. - * - * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. - * - * @param mixed $addresses - * @param string $name optional - */ - public function setCc($addresses, $name = null); - - /** - * Get the Cc addresses for this message. - * - * This method always returns an associative array, whereby the keys provide - * the actual email addresses. - * - * @return string[] - */ - public function getCc(); - - /** - * Set the Bcc address(es). - * - * Recipients set in this field will receive a 'blind-carbon-copy' of this - * message. - * - * In other words, they will get the message, but any other recipients of the - * message will have no such knowledge of their receipt of it. - * - * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. - * - * @param mixed $addresses - * @param string $name optional - */ - public function setBcc($addresses, $name = null); - - /** - * Get the Bcc addresses for this message. - * - * This method always returns an associative array, whereby the keys provide - * the actual email addresses. - * - * @return string[] - */ - public function getBcc(); -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php deleted file mode 100644 index bc9f2ad3..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php +++ /dev/null @@ -1,117 +0,0 @@ -setContentType('text/plain'); - if (!is_null($charset)) { - $this->setCharset($charset); - } - } - - /** - * Set the body of this entity, either as a string, or as an instance of - * {@link Swift_OutputByteStream}. - * - * @param mixed $body - * @param string $contentType optional - * @param string $charset optional - * - * @return Swift_Mime_MimePart - */ - public function setBody($body, $contentType = null, $charset = null) - { - if (isset($charset)) { - $this->setCharset($charset); - } - $body = $this->_convertString($body); - - parent::setBody($body, $contentType); - - return $this; - } - - /** - * Get the character set of this entity. - * - * @return string - */ - public function getCharset() - { - return $this->_getHeaderParameter('Content-Type', 'charset'); - } - - /** - * Set the character set of this entity. - * - * @param string $charset - * - * @return Swift_Mime_MimePart - */ - public function setCharset($charset) - { - $this->_setHeaderParameter('Content-Type', 'charset', $charset); - if ($charset !== $this->_userCharset) { - $this->_clearCache(); - } - $this->_userCharset = $charset; - parent::charsetChanged($charset); - - return $this; - } - - /** - * Get the format of this entity (i.e. flowed or fixed). - * - * @return string - */ - public function getFormat() - { - return $this->_getHeaderParameter('Content-Type', 'format'); - } - - /** - * Set the format of this entity (flowed or fixed). - * - * @param string $format - * - * @return Swift_Mime_MimePart - */ - public function setFormat($format) - { - $this->_setHeaderParameter('Content-Type', 'format', $format); - $this->_userFormat = $format; - - return $this; - } - - /** - * Test if delsp is being used for this entity. - * - * @return boolean - */ - public function getDelSp() - { - return ($this->_getHeaderParameter('Content-Type', 'delsp') == 'yes') - ? true - : false; - } - - /** - * Turn delsp on or off for this entity. - * - * @param boolean $delsp - * - * @return Swift_Mime_MimePart - */ - public function setDelSp($delsp = true) - { - $this->_setHeaderParameter('Content-Type', 'delsp', $delsp ? 'yes' : null); - $this->_userDelSp = $delsp; - - return $this; - } - - /** - * Get the nesting level of this entity. - * - * @see LEVEL_TOP, LEVEL_ALTERNATIVE, LEVEL_MIXED, LEVEL_RELATED - * - * @return int - */ - public function getNestingLevel() - { - return $this->_nestingLevel; - } - - /** - * Receive notification that the charset has changed on this document, or a - * parent document. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->setCharset($charset); - } - - // -- Protected methods - - /** Fix the content-type and encoding of this entity */ - protected function _fixHeaders() - { - parent::_fixHeaders(); - if (count($this->getChildren())) { - $this->_setHeaderParameter('Content-Type', 'charset', null); - $this->_setHeaderParameter('Content-Type', 'format', null); - $this->_setHeaderParameter('Content-Type', 'delsp', null); - } else { - $this->setCharset($this->_userCharset); - $this->setFormat($this->_userFormat); - $this->setDelSp($this->_userDelSp); - } - } - - /** Set the nesting level of this entity */ - protected function _setNestingLevel($level) - { - $this->_nestingLevel = $level; - } - - /** Encode charset when charset is not utf-8 */ - protected function _convertString($string) - { - $charset = strtolower($this->getCharset()); - if (!in_array($charset, array('utf-8', 'iso-8859-1', ''))) { - // mb_convert_encoding must be the first one to check, since iconv cannot convert some words. - if (function_exists('mb_convert_encoding')) { - $string = mb_convert_encoding($string, $charset, 'utf-8'); - } elseif (function_exists('iconv')) { - $string = iconv($charset, 'utf-8//TRANSLIT//IGNORE', $string); - } else { - throw new Swift_SwiftException('No suitable convert encoding function (use UTF-8 as your charset or install the mbstring or iconv extension).'); - } - - return $string; - } - - return $string; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php deleted file mode 100644 index 95172ec4..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php +++ /dev/null @@ -1,36 +0,0 @@ -_encoder = $encoder; - $this->_paramEncoder = $paramEncoder; - $this->_grammar = $grammar; - $this->_charset = $charset; - } - - /** - * Create a new Mailbox Header with a list of $addresses. - * - * @param string $name - * @param array|string|null $addresses - * - * @return Swift_Mime_Header - */ - public function createMailboxHeader($name, $addresses = null) - { - $header = new Swift_Mime_Headers_MailboxHeader($name, $this->_encoder, $this->_grammar); - if (isset($addresses)) { - $header->setFieldBodyModel($addresses); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Create a new Date header using $timestamp (UNIX time). - * @param string $name - * @param integer|null $timestamp - * - * @return Swift_Mime_Header - */ - public function createDateHeader($name, $timestamp = null) - { - $header = new Swift_Mime_Headers_DateHeader($name, $this->_grammar); - if (isset($timestamp)) { - $header->setFieldBodyModel($timestamp); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Create a new basic text header with $name and $value. - * - * @param string $name - * @param string $value - * - * @return Swift_Mime_Header - */ - public function createTextHeader($name, $value = null) - { - $header = new Swift_Mime_Headers_UnstructuredHeader($name, $this->_encoder, $this->_grammar); - if (isset($value)) { - $header->setFieldBodyModel($value); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Create a new ParameterizedHeader with $name, $value and $params. - * - * @param string $name - * @param string $value - * @param array $params - * - * @return Swift_Mime_ParameterizedHeader - */ - public function createParameterizedHeader($name, $value = null, - $params = array()) - { - $header = new Swift_Mime_Headers_ParameterizedHeader($name, - $this->_encoder, (strtolower($name) == 'content-disposition') - ? $this->_paramEncoder - : null, - $this->_grammar - ); - if (isset($value)) { - $header->setFieldBodyModel($value); - } - foreach ($params as $k => $v) { - $header->setParameter($k, $v); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Create a new ID header for Message-ID or Content-ID. - * - * @param string $name - * @param string|array $ids - * - * @return Swift_Mime_Header - */ - public function createIdHeader($name, $ids = null) - { - $header = new Swift_Mime_Headers_IdentificationHeader($name, $this->_grammar); - if (isset($ids)) { - $header->setFieldBodyModel($ids); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Create a new Path header with an address (path) in it. - * - * @param string $name - * @param string $path - * - * @return Swift_Mime_Header - */ - public function createPathHeader($name, $path = null) - { - $header = new Swift_Mime_Headers_PathHeader($name, $this->_grammar); - if (isset($path)) { - $header->setFieldBodyModel($path); - } - $this->_setHeaderCharset($header); - - return $header; - } - - /** - * Notify this observer that the entity's charset has changed. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->_charset = $charset; - $this->_encoder->charsetChanged($charset); - $this->_paramEncoder->charsetChanged($charset); - } - - // -- Private methods - - /** Apply the charset to the Header */ - private function _setHeaderCharset(Swift_Mime_Header $header) - { - if (isset($this->_charset)) { - $header->setCharset($this->_charset); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php deleted file mode 100644 index e06f9360..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php +++ /dev/null @@ -1,387 +0,0 @@ -_factory = $factory; - if (isset($charset)) { - $this->setCharset($charset); - } - } - - /** - * Set the charset used by these headers. - * - * @param string $charset - */ - public function setCharset($charset) - { - $this->_charset = $charset; - $this->_factory->charsetChanged($charset); - $this->_notifyHeadersOfCharset($charset); - } - - /** - * Add a new Mailbox Header with a list of $addresses. - * - * @param string $name - * @param array|string $addresses - */ - public function addMailboxHeader($name, $addresses = null) - { - $this->_storeHeader($name, - $this->_factory->createMailboxHeader($name, $addresses)); - } - - /** - * Add a new Date header using $timestamp (UNIX time). - * - * @param string $name - * @param integer $timestamp - */ - public function addDateHeader($name, $timestamp = null) - { - $this->_storeHeader($name, - $this->_factory->createDateHeader($name, $timestamp)); - } - - /** - * Add a new basic text header with $name and $value. - * - * @param string $name - * @param string $value - */ - public function addTextHeader($name, $value = null) - { - $this->_storeHeader($name, - $this->_factory->createTextHeader($name, $value)); - } - - /** - * Add a new ParameterizedHeader with $name, $value and $params. - * - * @param string $name - * @param string $value - * @param array $params - */ - public function addParameterizedHeader($name, $value = null, $params = array()) - { - $this->_storeHeader($name, $this->_factory->createParameterizedHeader($name, $value, $params)); - } - - /** - * Add a new ID header for Message-ID or Content-ID. - * - * @param string $name - * @param string|array $ids - */ - public function addIdHeader($name, $ids = null) - { - $this->_storeHeader($name, $this->_factory->createIdHeader($name, $ids)); - } - - /** - * Add a new Path header with an address (path) in it. - * - * @param string $name - * @param string $path - */ - public function addPathHeader($name, $path = null) - { - $this->_storeHeader($name, $this->_factory->createPathHeader($name, $path)); - } - - /** - * Returns true if at least one header with the given $name exists. - * - * If multiple headers match, the actual one may be specified by $index. - * - * @param string $name - * @param integer $index - * - * @return boolean - */ - public function has($name, $index = 0) - { - $lowerName = strtolower($name); - - return array_key_exists($lowerName, $this->_headers) && array_key_exists($index, $this->_headers[$lowerName]); - } - - /** - * Set a header in the HeaderSet. - * - * The header may be a previously fetched header via {@link get()} or it may - * be one that has been created separately. - * - * If $index is specified, the header will be inserted into the set at this - * offset. - * - * @param Swift_Mime_Header $header - * @param integer $index - */ - public function set(Swift_Mime_Header $header, $index = 0) - { - $this->_storeHeader($header->getFieldName(), $header, $index); - } - - /** - * Get the header with the given $name. - * - * If multiple headers match, the actual one may be specified by $index. - * Returns NULL if none present. - * - * @param string $name - * @param integer $index - * - * @return Swift_Mime_Header - */ - public function get($name, $index = 0) - { - if ($this->has($name, $index)) { - $lowerName = strtolower($name); - - return $this->_headers[$lowerName][$index]; - } - } - - /** - * Get all headers with the given $name. - * - * @param string $name - * - * @return array - */ - public function getAll($name = null) - { - if (!isset($name)) { - $headers = array(); - foreach ($this->_headers as $collection) { - $headers = array_merge($headers, $collection); - } - - return $headers; - } - - $lowerName = strtolower($name); - if (!array_key_exists($lowerName, $this->_headers)) { - return array(); - } - - return $this->_headers[$lowerName]; - } - - /** - * Return the name of all Headers - * - * @return array - */ - public function listAll() - { - $headers = $this->_headers; - if ($this->_canSort()) { - uksort($headers, array($this, '_sortHeaders')); - } - - return array_keys($headers); - } - - /** - * Remove the header with the given $name if it's set. - * - * If multiple headers match, the actual one may be specified by $index. - * - * @param string $name - * @param integer $index - */ - public function remove($name, $index = 0) - { - $lowerName = strtolower($name); - unset($this->_headers[$lowerName][$index]); - } - - /** - * Remove all headers with the given $name. - * - * @param string $name - */ - public function removeAll($name) - { - $lowerName = strtolower($name); - unset($this->_headers[$lowerName]); - } - - /** - * Create a new instance of this HeaderSet. - * - * @return Swift_Mime_HeaderSet - */ - public function newInstance() - { - return new self($this->_factory); - } - - /** - * Define a list of Header names as an array in the correct order. - * - * These Headers will be output in the given order where present. - * - * @param array $sequence - */ - public function defineOrdering(array $sequence) - { - $this->_order = array_flip(array_map('strtolower', $sequence)); - } - - /** - * Set a list of header names which must always be displayed when set. - * - * Usually headers without a field value won't be output unless set here. - * - * @param array $names - */ - public function setAlwaysDisplayed(array $names) - { - $this->_required = array_flip(array_map('strtolower', $names)); - } - - /** - * Notify this observer that the entity's charset has changed. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->setCharset($charset); - } - - /** - * Returns a string with a representation of all headers. - * - * @return string - */ - public function toString() - { - $string = ''; - $headers = $this->_headers; - if ($this->_canSort()) { - uksort($headers, array($this, '_sortHeaders')); - } - foreach ($headers as $collection) { - foreach ($collection as $header) { - if ($this->_isDisplayed($header) || $header->getFieldBody() != '') { - $string .= $header->toString(); - } - } - } - - return $string; - } - - /** - * Returns a string representation of this object. - * - * @return string - * - * @see toString() - */ - public function __toString() - { - return $this->toString(); - } - - // -- Private methods - - /** Save a Header to the internal collection */ - private function _storeHeader($name, Swift_Mime_Header $header, $offset = null) - { - if (!isset($this->_headers[strtolower($name)])) { - $this->_headers[strtolower($name)] = array(); - } - if (!isset($offset)) { - $this->_headers[strtolower($name)][] = $header; - } else { - $this->_headers[strtolower($name)][$offset] = $header; - } - } - - /** Test if the headers can be sorted */ - private function _canSort() - { - return count($this->_order) > 0; - } - - /** uksort() algorithm for Header ordering */ - private function _sortHeaders($a, $b) - { - $lowerA = strtolower($a); - $lowerB = strtolower($b); - $aPos = array_key_exists($lowerA, $this->_order) - ? $this->_order[$lowerA] - : -1; - $bPos = array_key_exists($lowerB, $this->_order) - ? $this->_order[$lowerB] - : -1; - - if ($aPos == -1) { - return 1; - } elseif ($bPos == -1) { - return -1; - } - - return ($aPos < $bPos) ? -1 : 1; - } - - /** Test if the given Header is always displayed */ - private function _isDisplayed(Swift_Mime_Header $header) - { - return array_key_exists(strtolower($header->getFieldName()), $this->_required); - } - - /** Notify all Headers of the new charset */ - private function _notifyHeadersOfCharset($charset) - { - foreach ($this->_headers as $headerGroup) { - foreach ($headerGroup as $header) { - $header->setCharset($charset); - } - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php deleted file mode 100644 index b203644b..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php +++ /dev/null @@ -1,655 +0,0 @@ -getHeaders()->defineOrdering(array( - 'Return-Path', - 'Received', - 'DKIM-Signature', - 'DomainKey-Signature', - 'Sender', - 'Message-ID', - 'Date', - 'Subject', - 'From', - 'Reply-To', - 'To', - 'Cc', - 'Bcc', - 'MIME-Version', - 'Content-Type', - 'Content-Transfer-Encoding' - )); - $this->getHeaders()->setAlwaysDisplayed(array('Date', 'Message-ID', 'From')); - $this->getHeaders()->addTextHeader('MIME-Version', '1.0'); - $this->setDate(time()); - $this->setId($this->getId()); - $this->getHeaders()->addMailboxHeader('From'); - } - - /** - * Always returns {@link LEVEL_TOP} for a message instance. - * - * @return int - */ - public function getNestingLevel() - { - return self::LEVEL_TOP; - } - - /** - * Set the subject of this message. - * - * @param string $subject - * - * @return Swift_Mime_SimpleMessage - */ - public function setSubject($subject) - { - if (!$this->_setHeaderFieldModel('Subject', $subject)) { - $this->getHeaders()->addTextHeader('Subject', $subject); - } - - return $this; - } - - /** - * Get the subject of this message. - * - * @return string - */ - public function getSubject() - { - return $this->_getHeaderFieldModel('Subject'); - } - - /** - * Set the date at which this message was created. - * - * @param integer $date - * - * @return Swift_Mime_SimpleMessage - */ - public function setDate($date) - { - if (!$this->_setHeaderFieldModel('Date', $date)) { - $this->getHeaders()->addDateHeader('Date', $date); - } - - return $this; - } - - /** - * Get the date at which this message was created. - * - * @return integer - */ - public function getDate() - { - return $this->_getHeaderFieldModel('Date'); - } - - /** - * Set the return-path (the bounce address) of this message. - * - * @param string $address - * - * @return Swift_Mime_SimpleMessage - */ - public function setReturnPath($address) - { - if (!$this->_setHeaderFieldModel('Return-Path', $address)) { - $this->getHeaders()->addPathHeader('Return-Path', $address); - } - - return $this; - } - - /** - * Get the return-path (bounce address) of this message. - * - * @return string - */ - public function getReturnPath() - { - return $this->_getHeaderFieldModel('Return-Path'); - } - - /** - * Set the sender of this message. - * - * This does not override the From field, but it has a higher significance. - * - * @param string $address - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function setSender($address, $name = null) - { - if (!is_array($address) && isset($name)) { - $address = array($address => $name); - } - - if (!$this->_setHeaderFieldModel('Sender', (array) $address)) { - $this->getHeaders()->addMailboxHeader('Sender', (array) $address); - } - - return $this; - } - - /** - * Get the sender of this message. - * - * @return string - */ - public function getSender() - { - return $this->_getHeaderFieldModel('Sender'); - } - - /** - * Add a From: address to this message. - * - * If $name is passed this name will be associated with the address. - * - * @param string $address - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function addFrom($address, $name = null) - { - $current = $this->getFrom(); - $current[$address] = $name; - - return $this->setFrom($current); - } - - /** - * Set the from address of this message. - * - * You may pass an array of addresses if this message is from multiple people. - * - * If $name is passed and the first parameter is a string, this name will be - * associated with the address. - * - * @param string $addresses - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function setFrom($addresses, $name = null) - { - if (!is_array($addresses) && isset($name)) { - $addresses = array($addresses => $name); - } - - if (!$this->_setHeaderFieldModel('From', (array) $addresses)) { - $this->getHeaders()->addMailboxHeader('From', (array) $addresses); - } - - return $this; - } - - /** - * Get the from address of this message. - * - * @return string - */ - public function getFrom() - { - return $this->_getHeaderFieldModel('From'); - } - - /** - * Add a Reply-To: address to this message. - * - * If $name is passed this name will be associated with the address. - * - * @param string $address - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function addReplyTo($address, $name = null) - { - $current = $this->getReplyTo(); - $current[$address] = $name; - - return $this->setReplyTo($current); - } - - /** - * Set the reply-to address of this message. - * - * You may pass an array of addresses if replies will go to multiple people. - * - * If $name is passed and the first parameter is a string, this name will be - * associated with the address. - * - * @param string $addresses - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function setReplyTo($addresses, $name = null) - { - if (!is_array($addresses) && isset($name)) { - $addresses = array($addresses => $name); - } - - if (!$this->_setHeaderFieldModel('Reply-To', (array) $addresses)) { - $this->getHeaders()->addMailboxHeader('Reply-To', (array) $addresses); - } - - return $this; - } - - /** - * Get the reply-to address of this message. - * - * @return string - */ - public function getReplyTo() - { - return $this->_getHeaderFieldModel('Reply-To'); - } - - /** - * Add a To: address to this message. - * - * If $name is passed this name will be associated with the address. - * - * @param string $address - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function addTo($address, $name = null) - { - $current = $this->getTo(); - $current[$address] = $name; - - return $this->setTo($current); - } - - /** - * Set the to addresses of this message. - * - * If multiple recipients will receive the message and array should be used. - * - * If $name is passed and the first parameter is a string, this name will be - * associated with the address. - * - * @param mixed $addresses - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function setTo($addresses, $name = null) - { - if (!is_array($addresses) && isset($name)) { - $addresses = array($addresses => $name); - } - - if (!$this->_setHeaderFieldModel('To', (array) $addresses)) { - $this->getHeaders()->addMailboxHeader('To', (array) $addresses); - } - - return $this; - } - - /** - * Get the To addresses of this message. - * - * @return array - */ - public function getTo() - { - return $this->_getHeaderFieldModel('To'); - } - - /** - * Add a Cc: address to this message. - * - * If $name is passed this name will be associated with the address. - * - * @param string $address - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function addCc($address, $name = null) - { - $current = $this->getCc(); - $current[$address] = $name; - - return $this->setCc($current); - } - - /** - * Set the Cc addresses of this message. - * - * If $name is passed and the first parameter is a string, this name will be - * associated with the address. - * - * @param mixed $addresses - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function setCc($addresses, $name = null) - { - if (!is_array($addresses) && isset($name)) { - $addresses = array($addresses => $name); - } - - if (!$this->_setHeaderFieldModel('Cc', (array) $addresses)) { - $this->getHeaders()->addMailboxHeader('Cc', (array) $addresses); - } - - return $this; - } - - /** - * Get the Cc address of this message. - * - * @return array - */ - public function getCc() - { - return $this->_getHeaderFieldModel('Cc'); - } - - /** - * Add a Bcc: address to this message. - * - * If $name is passed this name will be associated with the address. - * - * @param string $address - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function addBcc($address, $name = null) - { - $current = $this->getBcc(); - $current[$address] = $name; - - return $this->setBcc($current); - } - - /** - * Set the Bcc addresses of this message. - * - * If $name is passed and the first parameter is a string, this name will be - * associated with the address. - * - * @param mixed $addresses - * @param string $name optional - * - * @return Swift_Mime_SimpleMessage - */ - public function setBcc($addresses, $name = null) - { - if (!is_array($addresses) && isset($name)) { - $addresses = array($addresses => $name); - } - - if (!$this->_setHeaderFieldModel('Bcc', (array) $addresses)) { - $this->getHeaders()->addMailboxHeader('Bcc', (array) $addresses); - } - - return $this; - } - - /** - * Get the Bcc addresses of this message. - * - * @return array - */ - public function getBcc() - { - return $this->_getHeaderFieldModel('Bcc'); - } - - /** - * Set the priority of this message. - * - * The value is an integer where 1 is the highest priority and 5 is the lowest. - * - * @param integer $priority - * - * @return Swift_Mime_SimpleMessage - */ - public function setPriority($priority) - { - $priorityMap = array( - 1 => 'Highest', - 2 => 'High', - 3 => 'Normal', - 4 => 'Low', - 5 => 'Lowest' - ); - $pMapKeys = array_keys($priorityMap); - if ($priority > max($pMapKeys)) { - $priority = max($pMapKeys); - } elseif ($priority < min($pMapKeys)) { - $priority = min($pMapKeys); - } - if (!$this->_setHeaderFieldModel('X-Priority', - sprintf('%d (%s)', $priority, $priorityMap[$priority]))) - { - $this->getHeaders()->addTextHeader('X-Priority', - sprintf('%d (%s)', $priority, $priorityMap[$priority])); - } - - return $this; - } - - /** - * Get the priority of this message. - * - * The returned value is an integer where 1 is the highest priority and 5 - * is the lowest. - * - * @return integer - */ - public function getPriority() - { - list($priority) = sscanf($this->_getHeaderFieldModel('X-Priority'), - '%[1-5]' - ); - - return isset($priority) ? $priority : 3; - } - - /** - * Ask for a delivery receipt from the recipient to be sent to $addresses - * - * @param array $addresses - * - * @return Swift_Mime_SimpleMessage - */ - public function setReadReceiptTo($addresses) - { - if (!$this->_setHeaderFieldModel('Disposition-Notification-To', $addresses)) { - $this->getHeaders() - ->addMailboxHeader('Disposition-Notification-To', $addresses); - } - - return $this; - } - - /** - * Get the addresses to which a read-receipt will be sent. - * - * @return string - */ - public function getReadReceiptTo() - { - return $this->_getHeaderFieldModel('Disposition-Notification-To'); - } - - /** - * Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart. - * - * @param Swift_Mime_MimeEntity $entity - * - * @return Swift_Mime_SimpleMessage - */ - public function attach(Swift_Mime_MimeEntity $entity) - { - $this->setChildren(array_merge($this->getChildren(), array($entity))); - - return $this; - } - - /** - * Remove an already attached entity. - * - * @param Swift_Mime_MimeEntity $entity - * - * @return Swift_Mime_SimpleMessage - */ - public function detach(Swift_Mime_MimeEntity $entity) - { - $newChildren = array(); - foreach ($this->getChildren() as $child) { - if ($entity !== $child) { - $newChildren[] = $child; - } - } - $this->setChildren($newChildren); - - return $this; - } - - /** - * Attach a {@link Swift_Mime_MimeEntity} and return it's CID source. - * This method should be used when embedding images or other data in a message. - * - * @param Swift_Mime_MimeEntity $entity - * - * @return string - */ - public function embed(Swift_Mime_MimeEntity $entity) - { - $this->attach($entity); - - return 'cid:' . $entity->getId(); - } - - /** - * Get this message as a complete string. - * - * @return string - */ - public function toString() - { - if (count($children = $this->getChildren()) > 0 && $this->getBody() != '') { - $this->setChildren(array_merge(array($this->_becomeMimePart()), $children)); - $string = parent::toString(); - $this->setChildren($children); - } else { - $string = parent::toString(); - } - - return $string; - } - - /** - * Returns a string representation of this object. - * - * @see toString() - * - * @return string - */ - public function __toString() - { - return $this->toString(); - } - - /** - * Write this message to a {@link Swift_InputByteStream}. - * - * @param Swift_InputByteStream $is - */ - public function toByteStream(Swift_InputByteStream $is) - { - if (count($children = $this->getChildren()) > 0 && $this->getBody() != '') { - $this->setChildren(array_merge(array($this->_becomeMimePart()), $children)); - parent::toByteStream($is); - $this->setChildren($children); - } else { - parent::toByteStream($is); - } - } - - // -- Protected methods - - /** @see Swift_Mime_SimpleMimeEntity::_getIdField() */ - protected function _getIdField() - { - return 'Message-ID'; - } - - /** Turn the body of this message into a child of itself if needed */ - protected function _becomeMimePart() - { - $part = new parent($this->getHeaders()->newInstance(), $this->getEncoder(), - $this->_getCache(), $this->_getGrammar(), $this->_userCharset - ); - $part->setContentType($this->_userContentType); - $part->setBody($this->getBody()); - $part->setFormat($this->_userFormat); - $part->setDelSp($this->_userDelSp); - $part->_setNestingLevel($this->_getTopNestingLevel()); - - return $part; - } - - // -- Private methods - - /** Get the highest nesting level nested inside this message */ - private function _getTopNestingLevel() - { - $highestLevel = $this->getNestingLevel(); - foreach ($this->getChildren() as $child) { - $childLevel = $child->getNestingLevel(); - if ($highestLevel < $childLevel) { - $highestLevel = $childLevel; - } - } - - return $highestLevel; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php deleted file mode 100644 index 36e10ffe..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php +++ /dev/null @@ -1,857 +0,0 @@ - array(self::LEVEL_TOP, self::LEVEL_MIXED), - 'multipart/alternative' => array(self::LEVEL_MIXED, self::LEVEL_ALTERNATIVE), - 'multipart/related' => array(self::LEVEL_ALTERNATIVE, self::LEVEL_RELATED) - ); - - /** A set of filter rules to define what level an entity should be nested at */ - private $_compoundLevelFilters = array(); - - /** The nesting level of this entity */ - private $_nestingLevel = self::LEVEL_ALTERNATIVE; - - /** A KeyCache instance used during encoding and streaming */ - private $_cache; - - /** Direct descendants of this entity */ - private $_immediateChildren = array(); - - /** All descendants of this entity */ - private $_children = array(); - - /** The maximum line length of the body of this entity */ - private $_maxLineLength = 78; - - /** The order in which alternative mime types should appear */ - private $_alternativePartOrder = array( - 'text/plain' => 1, - 'text/html' => 2, - 'multipart/related' => 3 - ); - - /** The CID of this entity */ - private $_id; - - /** The key used for accessing the cache */ - private $_cacheKey; - - protected $_userContentType; - - /** - * Create a new SimpleMimeEntity with $headers, $encoder and $cache. - * - * @param Swift_Mime_HeaderSet $headers - * @param Swift_Mime_ContentEncoder $encoder - * @param Swift_KeyCache $cache - * @param Swift_Mime_Grammar $grammar - */ - public function __construct(Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar) - { - $this->_cacheKey = md5(uniqid(getmypid().mt_rand(), true)); - $this->_cache = $cache; - $this->_headers = $headers; - $this->_grammar = $grammar; - $this->setEncoder($encoder); - $this->_headers->defineOrdering(array('Content-Type', 'Content-Transfer-Encoding')); - - // This array specifies that, when the entire MIME document contains - // $compoundLevel, then for each child within $level, if its Content-Type - // is $contentType then it should be treated as if it's level is - // $neededLevel instead. I tried to write that unambiguously! :-\ - // Data Structure: - // array ( - // $compoundLevel => array( - // $level => array( - // $contentType => $neededLevel - // ) - // ) - // ) - - $this->_compoundLevelFilters = array( - (self::LEVEL_ALTERNATIVE + self::LEVEL_RELATED) => array( - self::LEVEL_ALTERNATIVE => array( - 'text/plain' => self::LEVEL_ALTERNATIVE, - 'text/html' => self::LEVEL_RELATED - ) - ) - ); - - $this->_id = $this->getRandomId(); - } - - /** - * Generate a new Content-ID or Message-ID for this MIME entity. - * - * @return string - */ - public function generateId() - { - $this->setId($this->getRandomId()); - - return $this->_id; - } - - /** - * Get the {@link Swift_Mime_HeaderSet} for this entity. - * - * @return Swift_Mime_HeaderSet - */ - public function getHeaders() - { - return $this->_headers; - } - - /** - * Get the nesting level of this entity. - * - * @see LEVEL_TOP, LEVEL_MIXED, LEVEL_RELATED, LEVEL_ALTERNATIVE - * - * @return integer - */ - public function getNestingLevel() - { - return $this->_nestingLevel; - } - - /** - * Get the Content-type of this entity. - * - * @return string - */ - public function getContentType() - { - return $this->_getHeaderFieldModel('Content-Type'); - } - - /** - * Set the Content-type of this entity. - * - * @param string $type - * - * @return Swift_Mime_SimpleMimeEntity - */ - public function setContentType($type) - { - $this->_setContentTypeInHeaders($type); - // Keep track of the value so that if the content-type changes automatically - // due to added child entities, it can be restored if they are later removed - $this->_userContentType = $type; - - return $this; - } - - /** - * Get the CID of this entity. - * - * The CID will only be present in headers if a Content-ID header is present. - * - * @return string - */ - public function getId() - { - return $this->_headers->has($this->_getIdField()) ? current((array) $this->_getHeaderFieldModel($this->_getIdField())) : $this->_id; - } - - /** - * Set the CID of this entity. - * - * @param string $id - * - * @return Swift_Mime_SimpleMimeEntity - */ - public function setId($id) - { - if (!$this->_setHeaderFieldModel($this->_getIdField(), $id)) { - $this->_headers->addIdHeader($this->_getIdField(), $id); - } - $this->_id = $id; - - return $this; - } - - /** - * Get the description of this entity. - * - * This value comes from the Content-Description header if set. - * - * @return string - */ - public function getDescription() - { - return $this->_getHeaderFieldModel('Content-Description'); - } - - /** - * Set the description of this entity. - * - * This method sets a value in the Content-ID header. - * - * @param string $description - * - * @return Swift_Mime_SimpleMimeEntity - */ - public function setDescription($description) - { - if (!$this->_setHeaderFieldModel('Content-Description', $description)) { - $this->_headers->addTextHeader('Content-Description', $description); - } - - return $this; - } - - /** - * Get the maximum line length of the body of this entity. - * - * @return integer - */ - public function getMaxLineLength() - { - return $this->_maxLineLength; - } - - /** - * Set the maximum line length of lines in this body. - * - * Though not enforced by the library, lines should not exceed 1000 chars. - * - * @param integer $length - * - * @return Swift_Mime_SimpleMimeEntity - */ - public function setMaxLineLength($length) - { - $this->_maxLineLength = $length; - - return $this; - } - - /** - * Get all children added to this entity. - * - * @return array of Swift_Mime_Entity - */ - public function getChildren() - { - return $this->_children; - } - - /** - * Set all children of this entity. - * - * @param array $children Swift_Mime_Entity instances - * @param integer $compoundLevel For internal use only - * - * @return Swift_Mime_SimpleMimeEntity - */ - public function setChildren(array $children, $compoundLevel = null) - { - //TODO: Try to refactor this logic - - $compoundLevel = isset($compoundLevel) - ? $compoundLevel - : $this->_getCompoundLevel($children) - ; - - $immediateChildren = array(); - $grandchildren = array(); - $newContentType = $this->_userContentType; - - foreach ($children as $child) { - $level = $this->_getNeededChildLevel($child, $compoundLevel); - if (empty($immediateChildren)) { //first iteration - $immediateChildren = array($child); - } else { - $nextLevel = $this->_getNeededChildLevel($immediateChildren[0], $compoundLevel); - if ($nextLevel == $level) { - $immediateChildren[] = $child; - } elseif ($level < $nextLevel) { - //Re-assign immediateChildren to grandchildren - $grandchildren = array_merge($grandchildren, $immediateChildren); - //Set new children - $immediateChildren = array($child); - } else { - $grandchildren[] = $child; - } - } - } - - if (!empty($immediateChildren)) { - $lowestLevel = $this->_getNeededChildLevel($immediateChildren[0], $compoundLevel); - - //Determine which composite media type is needed to accommodate the - // immediate children - foreach ($this->_compositeRanges as $mediaType => $range) { - if ($lowestLevel > $range[0] - && $lowestLevel <= $range[1]) - { - $newContentType = $mediaType; - break; - } - } - - //Put any grandchildren in a subpart - if (!empty($grandchildren)) { - $subentity = $this->_createChild(); - $subentity->_setNestingLevel($lowestLevel); - $subentity->setChildren($grandchildren, $compoundLevel); - array_unshift($immediateChildren, $subentity); - } - } - - $this->_immediateChildren = $immediateChildren; - $this->_children = $children; - $this->_setContentTypeInHeaders($newContentType); - $this->_fixHeaders(); - $this->_sortChildren(); - - return $this; - } - - /** - * Get the body of this entity as a string. - * - * @return string - */ - public function getBody() - { - return ($this->_body instanceof Swift_OutputByteStream) - ? $this->_readStream($this->_body) - : $this->_body; - } - - /** - * Set the body of this entity, either as a string, or as an instance of - * {@link Swift_OutputByteStream}. - * - * @param mixed $body - * @param string $contentType optional - * - * @return Swift_Mime_SimpleMimeEntity - */ - public function setBody($body, $contentType = null) - { - if ($body !== $this->_body) { - $this->_clearCache(); - } - - $this->_body = $body; - if (isset($contentType)) { - $this->setContentType($contentType); - } - - return $this; - } - - /** - * Get the encoder used for the body of this entity. - * - * @return Swift_Mime_ContentEncoder - */ - public function getEncoder() - { - return $this->_encoder; - } - - /** - * Set the encoder used for the body of this entity. - * - * @param Swift_Mime_ContentEncoder $encoder - * - * @return Swift_Mime_SimpleMimeEntity - */ - public function setEncoder(Swift_Mime_ContentEncoder $encoder) - { - if ($encoder !== $this->_encoder) { - $this->_clearCache(); - } - - $this->_encoder = $encoder; - $this->_setEncoding($encoder->getName()); - $this->_notifyEncoderChanged($encoder); - - return $this; - } - - /** - * Get the boundary used to separate children in this entity. - * - * @return string - */ - public function getBoundary() - { - if (!isset($this->_boundary)) { - $this->_boundary = '_=_swift_v4_' . time() . '_' . md5(getmypid().mt_rand().uniqid('', true)) . '_=_'; - } - - return $this->_boundary; - } - - /** - * Set the boundary used to separate children in this entity. - * - * @param string $boundary - * - * @return Swift_Mime_SimpleMimeEntity - * - * @throws Swift_RfcComplianceException - */ - public function setBoundary($boundary) - { - $this->_assertValidBoundary($boundary); - $this->_boundary = $boundary; - - return $this; - } - - /** - * Receive notification that the charset of this entity, or a parent entity - * has changed. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->_notifyCharsetChanged($charset); - } - - /** - * Receive notification that the encoder of this entity or a parent entity - * has changed. - * - * @param Swift_Mime_ContentEncoder $encoder - */ - public function encoderChanged(Swift_Mime_ContentEncoder $encoder) - { - $this->_notifyEncoderChanged($encoder); - } - - /** - * Get this entire entity as a string. - * - * @return string - */ - public function toString() - { - $string = $this->_headers->toString(); - $string .= $this->_bodyToString(); - - return $string; - } - - /** - * Get this entire entity as a string. - * - * @return string - */ - protected function _bodyToString() - { - $string = ''; - - if (isset($this->_body) && empty($this->_immediateChildren)) { - if ($this->_cache->hasKey($this->_cacheKey, 'body')) { - $body = $this->_cache->getString($this->_cacheKey, 'body'); - } else { - $body = "\r\n" . $this->_encoder->encodeString($this->getBody(), 0, - $this->getMaxLineLength() - ); - $this->_cache->setString($this->_cacheKey, 'body', $body, - Swift_KeyCache::MODE_WRITE - ); - } - $string .= $body; - } - - if (!empty($this->_immediateChildren)) { - foreach ($this->_immediateChildren as $child) { - $string .= "\r\n\r\n--" . $this->getBoundary() . "\r\n"; - $string .= $child->toString(); - } - $string .= "\r\n\r\n--" . $this->getBoundary() . "--\r\n"; - } - - return $string; - } - - /** - * Returns a string representation of this object. - * - * @see toString() - * - * @return string - */ - public function __toString() - { - return $this->toString(); - } - - /** - * Write this entire entity to a {@see Swift_InputByteStream}. - * - * @param Swift_InputByteStream - */ - public function toByteStream(Swift_InputByteStream $is) - { - $is->write($this->_headers->toString()); - $is->commit(); - - $this->_bodyToByteStream($is); - } - - /** - * Write this entire entity to a {@link Swift_InputByteStream}. - * - * @param Swift_InputByteStream - */ - protected function _bodyToByteStream(Swift_InputByteStream $is) - { - if (empty($this->_immediateChildren)) { - if (isset($this->_body)) { - if ($this->_cache->hasKey($this->_cacheKey, 'body')) { - $this->_cache->exportToByteStream($this->_cacheKey, 'body', $is); - } else { - $cacheIs = $this->_cache->getInputByteStream($this->_cacheKey, 'body'); - if ($cacheIs) { - $is->bind($cacheIs); - } - - $is->write("\r\n"); - - if ($this->_body instanceof Swift_OutputByteStream) { - $this->_body->setReadPointer(0); - - $this->_encoder->encodeByteStream($this->_body, $is, 0, $this->getMaxLineLength()); - } else { - $is->write($this->_encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength())); - } - - if ($cacheIs) { - $is->unbind($cacheIs); - } - } - } - } - - if (!empty($this->_immediateChildren)) { - foreach ($this->_immediateChildren as $child) { - $is->write("\r\n\r\n--" . $this->getBoundary() . "\r\n"); - $child->toByteStream($is); - } - $is->write("\r\n\r\n--" . $this->getBoundary() . "--\r\n"); - } - } - - // -- Protected methods - - /** - * Get the name of the header that provides the ID of this entity - */ - protected function _getIdField() - { - return 'Content-ID'; - } - - /** - * Get the model data (usually an array or a string) for $field. - */ - protected function _getHeaderFieldModel($field) - { - if ($this->_headers->has($field)) { - return $this->_headers->get($field)->getFieldBodyModel(); - } - } - - /** - * Set the model data for $field. - */ - protected function _setHeaderFieldModel($field, $model) - { - if ($this->_headers->has($field)) { - $this->_headers->get($field)->setFieldBodyModel($model); - - return true; - } else { - return false; - } - } - - /** - * Get the parameter value of $parameter on $field header. - */ - protected function _getHeaderParameter($field, $parameter) - { - if ($this->_headers->has($field)) { - return $this->_headers->get($field)->getParameter($parameter); - } - } - - /** - * Set the parameter value of $parameter on $field header. - */ - protected function _setHeaderParameter($field, $parameter, $value) - { - if ($this->_headers->has($field)) { - $this->_headers->get($field)->setParameter($parameter, $value); - - return true; - } else { - return false; - } - } - - /** - * Re-evaluate what content type and encoding should be used on this entity. - */ - protected function _fixHeaders() - { - if (count($this->_immediateChildren)) { - $this->_setHeaderParameter('Content-Type', 'boundary', - $this->getBoundary() - ); - $this->_headers->remove('Content-Transfer-Encoding'); - } else { - $this->_setHeaderParameter('Content-Type', 'boundary', null); - $this->_setEncoding($this->_encoder->getName()); - } - } - - /** - * Get the KeyCache used in this entity. - * - * @return Swift_KeyCache - */ - protected function _getCache() - { - return $this->_cache; - } - - /** - * Get the grammar used for validation. - * - * @return Swift_Mime_Grammar - */ - protected function _getGrammar() - { - return $this->_grammar; - } - - /** - * Empty the KeyCache for this entity. - */ - protected function _clearCache() - { - $this->_cache->clearKey($this->_cacheKey, 'body'); - } - - /** - * Returns a random Content-ID or Message-ID. - * - * @return string - */ - protected function getRandomId() - { - $idLeft = md5(getmypid() . '.' . time() . '.' . uniqid(mt_rand(), true)); - $idRight = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'swift.generated'; - $id = $idLeft . '@' . $idRight; - - try { - $this->_assertValidId($id); - } catch (Swift_RfcComplianceException $e) { - $id = $idLeft . '@swift.generated'; - } - - return $id; - } - - // -- Private methods - - private function _readStream(Swift_OutputByteStream $os) - { - $string = ''; - while (false !== $bytes = $os->read(8192)) { - $string .= $bytes; - } - - return $string; - } - - private function _setEncoding($encoding) - { - if (!$this->_setHeaderFieldModel('Content-Transfer-Encoding', $encoding)) { - $this->_headers->addTextHeader('Content-Transfer-Encoding', $encoding); - } - } - - private function _assertValidBoundary($boundary) - { - if (!preg_match( - '/^[a-z0-9\'\(\)\+_\-,\.\/:=\?\ ]{0,69}[a-z0-9\'\(\)\+_\-,\.\/:=\?]$/Di', - $boundary)) - { - throw new Swift_RfcComplianceException('Mime boundary set is not RFC 2046 compliant.'); - } - } - - private function _setContentTypeInHeaders($type) - { - if (!$this->_setHeaderFieldModel('Content-Type', $type)) { - $this->_headers->addParameterizedHeader('Content-Type', $type); - } - } - - private function _setNestingLevel($level) - { - $this->_nestingLevel = $level; - } - - private function _getCompoundLevel($children) - { - $level = 0; - foreach ($children as $child) { - $level |= $child->getNestingLevel(); - } - - return $level; - } - - private function _getNeededChildLevel($child, $compoundLevel) - { - $filter = array(); - foreach ($this->_compoundLevelFilters as $bitmask => $rules) { - if (($compoundLevel & $bitmask) === $bitmask) { - $filter = $rules + $filter; - } - } - - $realLevel = $child->getNestingLevel(); - $lowercaseType = strtolower($child->getContentType()); - - if (isset($filter[$realLevel]) - && isset($filter[$realLevel][$lowercaseType])) - { - return $filter[$realLevel][$lowercaseType]; - } else { - return $realLevel; - } - } - - private function _createChild() - { - return new self($this->_headers->newInstance(), - $this->_encoder, $this->_cache, $this->_grammar); - } - - private function _notifyEncoderChanged(Swift_Mime_ContentEncoder $encoder) - { - foreach ($this->_immediateChildren as $child) { - $child->encoderChanged($encoder); - } - } - - private function _notifyCharsetChanged($charset) - { - $this->_encoder->charsetChanged($charset); - $this->_headers->charsetChanged($charset); - foreach ($this->_immediateChildren as $child) { - $child->charsetChanged($charset); - } - } - - private function _sortChildren() - { - $shouldSort = false; - foreach ($this->_immediateChildren as $child) { - //NOTE: This include alternative parts moved into a related part - if ($child->getNestingLevel() == self::LEVEL_ALTERNATIVE) { - $shouldSort = true; - break; - } - } - - //Sort in order of preference, if there is one - if ($shouldSort) { - usort($this->_immediateChildren, array($this, '_childSortAlgorithm')); - } - } - - private function _childSortAlgorithm($a, $b) - { - $typePrefs = array(); - $types = array( - strtolower($a->getContentType()), - strtolower($b->getContentType()) - ); - foreach ($types as $type) { - $typePrefs[] = (array_key_exists($type, $this->_alternativePartOrder)) - ? $this->_alternativePartOrder[$type] - : (max($this->_alternativePartOrder) + 1); - } - - return ($typePrefs[0] >= $typePrefs[1]) ? 1 : -1; - } - - // -- Destructor - - /** - * Empties it's own contents from the cache. - */ - public function __destruct() - { - $this->_cache->clearAll($this->_cacheKey); - } - - /** - * Throws an Exception if the id passed does not comply with RFC 2822. - * - * @param string $id - * - * @throws Swift_RfcComplianceException - */ - private function _assertValidId($id) - { - if (!preg_match( - '/^' . $this->_grammar->getDefinition('id-left') . '@' . - $this->_grammar->getDefinition('id-right') . '$/D', - $id - )) - { - throw new Swift_RfcComplianceException( - 'Invalid ID given <' . $id . '>' - ); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php deleted file mode 100644 index 10a4f3c8..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php +++ /dev/null @@ -1,61 +0,0 @@ -createDependenciesFor('mime.part') - ); - - if (!isset($charset)) { - $charset = Swift_DependencyContainer::getInstance() - ->lookup('properties.charset'); - } - $this->setBody($body); - $this->setCharset($charset); - if ($contentType) { - $this->setContentType($contentType); - } - } - - /** - * Create a new MimePart. - * - * @param string $body - * @param string $contentType - * @param string $charset - * - * @return Swift_Mime_MimePart - */ - public static function newInstance($body = null, $contentType = null, $charset = null) - { - return new self($body, $contentType, $charset); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php deleted file mode 100644 index 335c4793..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Pretends messages have been sent, but just ignores them. - * - * @package Swift - * @author Fabien Potencier - */ -class Swift_NullTransport extends Swift_Transport_NullTransport -{ - /** - * Create a new NullTransport. - */ - public function __construct() - { - call_user_func_array( - array($this, 'Swift_Transport_NullTransport::__construct'), - Swift_DependencyContainer::getInstance() - ->createDependenciesFor('transport.null') - ); - } - - /** - * Create a new NullTransport instance. - * - * @return Swift_NullTransport - */ - public static function newInstance() - { - return new self(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php deleted file mode 100644 index 2ff74491..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php +++ /dev/null @@ -1,48 +0,0 @@ -setThreshold($threshold); - $this->setSleepTime($sleep); - $this->_sleeper = $sleeper; - } - - /** - * Set the number of emails to send before restarting. - * - * @param integer $threshold - */ - public function setThreshold($threshold) - { - $this->_threshold = $threshold; - } - - /** - * Get the number of emails to send before restarting. - * - * @return int - */ - public function getThreshold() - { - return $this->_threshold; - } - - /** - * Set the number of seconds to sleep for during a restart. - * - * @param integer $sleep time - */ - public function setSleepTime($sleep) - { - $this->_sleep = $sleep; - } - - /** - * Get the number of seconds to sleep for during a restart. - * - * @return int - */ - public function getSleepTime() - { - return $this->_sleep; - } - - /** - * Invoked immediately before the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - } - - /** - * Invoked immediately after the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - ++$this->_counter; - if ($this->_counter >= $this->_threshold) { - $transport = $evt->getTransport(); - $transport->stop(); - if ($this->_sleep) { - $this->sleep($this->_sleep); - } - $transport->start(); - $this->_counter = 0; - } - } - - /** - * Sleep for $seconds. - * - * @param integer $seconds - */ - public function sleep($seconds) - { - if (isset($this->_sleeper)) { - $this->_sleeper->sleep($seconds); - } else { - sleep($seconds); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php deleted file mode 100644 index 8794aacf..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php +++ /dev/null @@ -1,166 +0,0 @@ -getMessage(); - $message->toByteStream($this); - } - - /** - * Invoked immediately following a command being sent. - * - * @param Swift_Events_CommandEvent $evt - */ - public function commandSent(Swift_Events_CommandEvent $evt) - { - $command = $evt->getCommand(); - $this->_out += strlen($command); - } - - /** - * Invoked immediately following a response coming back. - * - * @param Swift_Events_ResponseEvent $evt - */ - public function responseReceived(Swift_Events_ResponseEvent $evt) - { - $response = $evt->getResponse(); - $this->_in += strlen($response); - } - - /** - * Called when a message is sent so that the outgoing counter can be increased. - * - * @param string $bytes - */ - public function write($bytes) - { - $this->_out += strlen($bytes); - foreach ($this->_mirrors as $stream) { - $stream->write($bytes); - } - } - - /** - * Not used. - */ - public function commit() - { - } - - /** - * Attach $is to this stream. - * - * The stream acts as an observer, receiving all data that is written. - * All {@link write()} and {@link flushBuffers()} operations will be mirrored. - * - * @param Swift_InputByteStream $is - */ - public function bind(Swift_InputByteStream $is) - { - $this->_mirrors[] = $is; - } - - /** - * Remove an already bound stream. - * - * If $is is not bound, no errors will be raised. - * If the stream currently has any buffered data it will be written to $is - * before unbinding occurs. - * - * @param Swift_InputByteStream $is - */ - public function unbind(Swift_InputByteStream $is) - { - foreach ($this->_mirrors as $k => $stream) { - if ($is === $stream) { - unset($this->_mirrors[$k]); - } - } - } - - /** - * Not used. - */ - public function flushBuffers() - { - foreach ($this->_mirrors as $stream) { - $stream->flushBuffers(); - } - } - - /** - * Get the total number of bytes sent to the server. - * - * @return int - */ - public function getBytesOut() - { - return $this->_out; - } - - /** - * Get the total number of bytes received from the server. - * - * @return int - */ - public function getBytesIn() - { - return $this->_in; - } - - /** - * Reset the internal counters to zero. - */ - public function reset() - { - $this->_out = 0; - $this->_in = 0; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php deleted file mode 100644 index 3269c698..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php +++ /dev/null @@ -1,33 +0,0 @@ - - * $replacements = array( - * "address1@domain.tld" => array("{a}" => "b", "{c}" => "d"), - * "address2@domain.tld" => array("{a}" => "x", "{c}" => "y") - * ) - * - * - * When using an instance of {@link Swift_Plugins_Decorator_Replacements}, - * the object should return just the array of replacements for the address - * given to {@link Swift_Plugins_Decorator_Replacements::getReplacementsFor()}. - * - * @param mixed $replacements Array or Swift_Plugins_Decorator_Replacements - */ - public function __construct($replacements) - { - $this->setReplacements($replacements); - } - - /** - * Sets replacements. - * - * @param mixed $replacements Array or Swift_Plugins_Decorator_Replacements - * - * @see __construct() - */ - public function setReplacements($replacements) - { - if (!($replacements instanceof \Swift_Plugins_Decorator_Replacements)) { - $this->_replacements = (array) $replacements; - } else { - $this->_replacements = $replacements; - } - } - - /** - * Invoked immediately before the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - $message = $evt->getMessage(); - $this->_restoreMessage($message); - $to = array_keys($message->getTo()); - $address = array_shift($to); - if ($replacements = $this->getReplacementsFor($address)) { - $body = $message->getBody(); - $search = array_keys($replacements); - $replace = array_values($replacements); - $bodyReplaced = str_replace( - $search, $replace, $body - ); - if ($body != $bodyReplaced) { - $this->_originalBody = $body; - $message->setBody($bodyReplaced); - } - - foreach ($message->getHeaders()->getAll() as $header) { - $body = $header->getFieldBodyModel(); - $count = 0; - if (is_array($body)) { - $bodyReplaced = array(); - foreach ($body as $key => $value) { - $count1 = 0; - $count2 = 0; - $key = is_string($key) ? str_replace($search, $replace, $key, $count1) : $key; - $value = is_string($value) ? str_replace($search, $replace, $value, $count2) : $value; - $bodyReplaced[$key] = $value; - - if (!$count && ($count1 || $count2)) { - $count = 1; - } - } - } else { - $bodyReplaced = str_replace($search, $replace, $body, $count); - } - - if ($count) { - $this->_originalHeaders[$header->getFieldName()] = $body; - $header->setFieldBodyModel($bodyReplaced); - } - } - - $children = (array) $message->getChildren(); - foreach ($children as $child) { - list($type, ) = sscanf($child->getContentType(), '%[^/]/%s'); - if ('text' == $type) { - $body = $child->getBody(); - $bodyReplaced = str_replace( - $search, $replace, $body - ); - if ($body != $bodyReplaced) { - $child->setBody($bodyReplaced); - $this->_originalChildBodies[$child->getId()] = $body; - } - } - } - $this->_lastMessage = $message; - } - } - - /** - * Find a map of replacements for the address. - * - * If this plugin was provided with a delegate instance of - * {@link Swift_Plugins_Decorator_Replacements} then the call will be - * delegated to it. Otherwise, it will attempt to find the replacements - * from the array provided in the constructor. - * - * If no replacements can be found, an empty value (NULL) is returned. - * - * @param string $address - * - * @return array - */ - public function getReplacementsFor($address) - { - if ($this->_replacements instanceof Swift_Plugins_Decorator_Replacements) { - return $this->_replacements->getReplacementsFor($address); - } else { - return isset($this->_replacements[$address]) - ? $this->_replacements[$address] - : null - ; - } - } - - /** - * Invoked immediately after the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - $this->_restoreMessage($evt->getMessage()); - } - - // -- Private methods - - /** Restore a changed message back to its original state */ - private function _restoreMessage(Swift_Mime_Message $message) - { - if ($this->_lastMessage === $message) { - if (isset($this->_originalBody)) { - $message->setBody($this->_originalBody); - $this->_originalBody = null; - } - if (!empty($this->_originalHeaders)) { - foreach ($message->getHeaders()->getAll() as $header) { - if (array_key_exists($header->getFieldName(), $this->_originalHeaders)) { - $header->setFieldBodyModel($this->_originalHeaders[$header->getFieldName()]); - } - } - $this->_originalHeaders = array(); - } - if (!empty($this->_originalChildBodies)) { - $children = (array) $message->getChildren(); - foreach ($children as $child) { - $id = $child->getId(); - if (array_key_exists($id, $this->_originalChildBodies)) { - $child->setBody($this->_originalChildBodies[$id]); - } - } - $this->_originalChildBodies = array(); - } - $this->_lastMessage = null; - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php deleted file mode 100644 index 1f1e4430..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php +++ /dev/null @@ -1,70 +0,0 @@ -_sender = $sender; - } - - /** - * Invoked immediately before the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - $message = $evt->getMessage(); - $headers = $message->getHeaders(); - - // save current recipients - $headers->addPathHeader('X-Swift-Return-Path', $message->getReturnPath()); - - // replace them with the one to send to - $message->setReturnPath($this->_sender); - } - - /** - * Invoked immediately after the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - $message = $evt->getMessage(); - - // restore original headers - $headers = $message->getHeaders(); - - if ($headers->has('X-Swift-Return-Path')) { - $message->setReturnPath($headers->get('X-Swift-Return-Path')->getAddress()); - $headers->removeAll('X-Swift-Return-Path'); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php deleted file mode 100644 index 81c1d9bb..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php +++ /dev/null @@ -1,38 +0,0 @@ -_logger = $logger; - } - - /** - * Add a log entry. - * - * @param string $entry - */ - public function add($entry) - { - $this->_logger->add($entry); - } - - /** - * Clear the log contents. - */ - public function clear() - { - $this->_logger->clear(); - } - - /** - * Get this log as a string. - * - * @return string - */ - public function dump() - { - return $this->_logger->dump(); - } - - /** - * Invoked immediately following a command being sent. - * - * @param Swift_Events_CommandEvent $evt - */ - public function commandSent(Swift_Events_CommandEvent $evt) - { - $command = $evt->getCommand(); - $this->_logger->add(sprintf(">> %s", $command)); - } - - /** - * Invoked immediately following a response coming back. - * - * @param Swift_Events_ResponseEvent $evt - */ - public function responseReceived(Swift_Events_ResponseEvent $evt) - { - $response = $evt->getResponse(); - $this->_logger->add(sprintf("<< %s", $response)); - } - - /** - * Invoked just before a Transport is started. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) - { - $transportName = get_class($evt->getSource()); - $this->_logger->add(sprintf("++ Starting %s", $transportName)); - } - - /** - * Invoked immediately after the Transport is started. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function transportStarted(Swift_Events_TransportChangeEvent $evt) - { - $transportName = get_class($evt->getSource()); - $this->_logger->add(sprintf("++ %s started", $transportName)); - } - - /** - * Invoked just before a Transport is stopped. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) - { - $transportName = get_class($evt->getSource()); - $this->_logger->add(sprintf("++ Stopping %s", $transportName)); - } - - /** - * Invoked immediately after the Transport is stopped. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function transportStopped(Swift_Events_TransportChangeEvent $evt) - { - $transportName = get_class($evt->getSource()); - $this->_logger->add(sprintf("++ %s stopped", $transportName)); - } - - /** - * Invoked as a TransportException is thrown in the Transport system. - * - * @param Swift_Events_TransportExceptionEvent $evt - */ - public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt) - { - $e = $evt->getException(); - $message = $e->getMessage(); - $this->_logger->add(sprintf("!! %s", $message)); - $message .= PHP_EOL; - $message .= 'Log data:' . PHP_EOL; - $message .= $this->_logger->dump(); - $evt->cancelBubble(); - throw new Swift_TransportException($message); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php deleted file mode 100644 index eb362ef8..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php +++ /dev/null @@ -1,74 +0,0 @@ -_size = $size; - } - - /** - * Add a log entry. - * - * @param string $entry - */ - public function add($entry) - { - $this->_log[] = $entry; - while (count($this->_log) > $this->_size) { - array_shift($this->_log); - } - } - - /** - * Clear the log contents. - */ - public function clear() - { - $this->_log = array(); - } - - /** - * Get this log as a string. - * - * @return string - */ - public function dump() - { - return implode(PHP_EOL, $this->_log); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php deleted file mode 100644 index c542169f..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php +++ /dev/null @@ -1,60 +0,0 @@ -_isHtml = $isHtml; - } - - /** - * Add a log entry. - * - * @param string $entry - */ - public function add($entry) - { - if ($this->_isHtml) { - printf('%s%s%s', htmlspecialchars($entry, ENT_QUOTES), '
', PHP_EOL); - } else { - printf('%s%s', $entry, PHP_EOL); - } - } - - /** - * Not implemented. - */ - public function clear() - { - } - - /** - * Not implemented. - */ - public function dump() - { - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php deleted file mode 100644 index 35d5de53..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php +++ /dev/null @@ -1,77 +0,0 @@ -messages = array(); - } - - /** - * Get the message list - * - * @return array - */ - public function getMessages() - { - return $this->messages; - } - - /** - * Get the message count - * - * @return integer count - */ - public function countMessages() - { - return count($this->messages); - } - - /** - * Empty the message list - * - */ - public function clear() - { - $this->messages = array(); - } - - /** - * Invoked immediately before the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - $this->messages[] = clone $evt->getMessage(); - } - - /** - * Invoked immediately after the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php deleted file mode 100644 index d2417215..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php +++ /dev/null @@ -1,33 +0,0 @@ -_host = $host; - $this->_port = $port; - $this->_crypto = $crypto; - } - - /** - * Create a new PopBeforeSmtpPlugin for $host and $port. - * - * @param string $host - * @param integer $port - * @param string $crypto as "tls" or "ssl" - * - * @return Swift_Plugins_PopBeforeSmtpPlugin - */ - public static function newInstance($host, $port = 110, $crypto = null) - { - return new self($host, $port, $crypto); - } - - /** - * Set a Pop3Connection to delegate to instead of connecting directly. - * - * @param Swift_Plugins_Pop_Pop3Connection $connection - * - * @return Swift_Plugins_PopBeforeSmtpPlugin - */ - public function setConnection(Swift_Plugins_Pop_Pop3Connection $connection) - { - $this->_connection = $connection; - - return $this; - } - - /** - * Bind this plugin to a specific SMTP transport instance. - * - * @param Swift_Transport - */ - public function bindSmtp(Swift_Transport $smtp) - { - $this->_transport = $smtp; - } - - /** - * Set the connection timeout in seconds (default 10). - * - * @param integer $timeout - * - * @return Swift_Plugins_PopBeforeSmtpPlugin - */ - public function setTimeout($timeout) - { - $this->_timeout = (int) $timeout; - - return $this; - } - - /** - * Set the username to use when connecting (if needed). - * - * @param string $username - * - * @return Swift_Plugins_PopBeforeSmtpPlugin - */ - public function setUsername($username) - { - $this->_username = $username; - - return $this; - } - - /** - * Set the password to use when connecting (if needed). - * - * @param string $password - * - * @return Swift_Plugins_PopBeforeSmtpPlugin - */ - public function setPassword($password) - { - $this->_password = $password; - - return $this; - } - - /** - * Connect to the POP3 host and authenticate. - * - * @throws Swift_Plugins_Pop_Pop3Exception if connection fails - */ - public function connect() - { - if (isset($this->_connection)) { - $this->_connection->connect(); - } else { - if (!isset($this->_socket)) { - if (!$socket = fsockopen( - $this->_getHostString(), $this->_port, $errno, $errstr, $this->_timeout)) - { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to connect to POP3 host [%s]: %s', $this->_host, $errstr) - ); - } - $this->_socket = $socket; - - if (false === $greeting = fgets($this->_socket)) { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to connect to POP3 host [%s]', trim($greeting)) - ); - } - - $this->_assertOk($greeting); - - if ($this->_username) { - $this->_command(sprintf("USER %s\r\n", $this->_username)); - $this->_command(sprintf("PASS %s\r\n", $this->_password)); - } - } - } - } - - /** - * Disconnect from the POP3 host. - */ - public function disconnect() - { - if (isset($this->_connection)) { - $this->_connection->disconnect(); - } else { - $this->_command("QUIT\r\n"); - if (!fclose($this->_socket)) { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('POP3 host [%s] connection could not be stopped', $this->_host) - ); - } - $this->_socket = null; - } - } - - /** - * Invoked just before a Transport is started. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) - { - if (isset($this->_transport)) { - if ($this->_transport !== $evt->getTransport()) { - return; - } - } - - $this->connect(); - $this->disconnect(); - } - - /** - * Not used. - */ - public function transportStarted(Swift_Events_TransportChangeEvent $evt) - { - } - - /** - * Not used. - */ - public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) - { - } - - /** - * Not used. - */ - public function transportStopped(Swift_Events_TransportChangeEvent $evt) - { - } - - // -- Private Methods - - private function _command($command) - { - if (!fwrite($this->_socket, $command)) { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to write command [%s] to POP3 host', trim($command)) - ); - } - - if (false === $response = fgets($this->_socket)) { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to read from POP3 host after command [%s]', trim($command)) - ); - } - - $this->_assertOk($response); - - return $response; - } - - private function _assertOk($response) - { - if (substr($response, 0, 3) != '+OK') { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('POP3 command failed [%s]', trim($response)) - ); - } - } - - private function _getHostString() - { - $host = $this->_host; - switch (strtolower($this->_crypto)) { - case 'ssl': - $host = 'ssl://' . $host; - break; - - case 'tls': - $host = 'tls://' . $host; - break; - } - - return $host; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php deleted file mode 100644 index a27db78a..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php +++ /dev/null @@ -1,204 +0,0 @@ -_recipient = $recipient; - $this->_whitelist = $whitelist; - } - - /** - * Set the recipient of all messages. - * - * @param string $recipient - */ - public function setRecipient($recipient) - { - $this->_recipient = $recipient; - } - - /** - * Get the recipient of all messages. - * - * @return int - */ - public function getRecipient() - { - return $this->_recipient; - } - - /** - * Set a list of regular expressions to whitelist certain recipients - * - * @param array $whitelist - */ - public function setWhitelist(array $whitelist) - { - $this->_whitelist = $whitelist; - } - - /** - * Get the whitelist - * - * @return array - */ - public function getWhitelist() - { - return $this->_whitelist; - } - - /** - * Invoked immediately before the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - $message = $evt->getMessage(); - $headers = $message->getHeaders(); - - // conditionally save current recipients - - if ($headers->has('to')) { - $headers->addMailboxHeader('X-Swift-To', $message->getTo()); - } - - if ($headers->has('cc')) { - $headers->addMailboxHeader('X-Swift-Cc', $message->getCc()); - } - - if ($headers->has('bcc')) { - $headers->addMailboxHeader('X-Swift-Bcc', $message->getBcc()); - } - - // Add hard coded recipient - $message->addTo($this->_recipient); - - // Filter remaining headers against whitelist - $this->_filterHeaderSet($headers, 'To'); - $this->_filterHeaderSet($headers, 'Cc'); - $this->_filterHeaderSet($headers, 'Bcc'); - } - - /** - * Filter header set against a whitelist of regular expressions - * - * @param Swift_Mime_HeaderSet $headerSet - * @param string $type - */ - private function _filterHeaderSet(Swift_Mime_HeaderSet $headerSet, $type) - { - foreach ($headerSet->getAll($type) as $headers) { - $headers->setNameAddresses($this->_filterNameAddresses($headers->getNameAddresses())); - } - } - - /** - * Filtered list of addresses => name pairs - * - * @param array $recipients - * @return array - */ - private function _filterNameAddresses(array $recipients) - { - $filtered = array(); - - foreach ($recipients as $address => $name) { - if ($this->_isWhitelisted($address)) { - $filtered[$address] = $name; - } - } - - return $filtered; - } - - /** - * Matches address against whitelist of regular expressions - * - * @param $recipient - * @return bool - */ - protected function _isWhitelisted($recipient) - { - if ($recipient === $this->_recipient) { - return true; - } - - foreach ($this->_whitelist as $pattern) { - if (preg_match($pattern, $recipient)) { - return true; - } - } - - return false; - } - - /** - * Invoked immediately after the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - $this->_restoreMessage($evt->getMessage()); - } - - // -- Private methods - - private function _restoreMessage(Swift_Mime_Message $message) - { - // restore original headers - $headers = $message->getHeaders(); - - if ($headers->has('X-Swift-To')) { - $message->setTo($headers->get('X-Swift-To')->getNameAddresses()); - $headers->removeAll('X-Swift-To'); - } - - if ($headers->has('X-Swift-Cc')) { - $message->setCc($headers->get('X-Swift-Cc')->getNameAddresses()); - $headers->removeAll('X-Swift-Cc'); - } - - if ($headers->has('X-Swift-Bcc')) { - $message->setBcc($headers->get('X-Swift-Bcc')->getNameAddresses()); - $headers->removeAll('X-Swift-Bcc'); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php deleted file mode 100644 index 0dfa22d8..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php +++ /dev/null @@ -1,34 +0,0 @@ -_reporter = $reporter; - } - - /** - * Not used. - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - } - - /** - * Invoked immediately after the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - $message = $evt->getMessage(); - $failures = array_flip($evt->getFailedRecipients()); - foreach ((array) $message->getTo() as $address => $null) { - $this->_reporter->notify( - $message, $address, (array_key_exists($address, $failures) - ? Swift_Plugins_Reporter::RESULT_FAIL - : Swift_Plugins_Reporter::RESULT_PASS) - ); - } - foreach ((array) $message->getCc() as $address => $null) { - $this->_reporter->notify( - $message, $address, (array_key_exists($address, $failures) - ? Swift_Plugins_Reporter::RESULT_FAIL - : Swift_Plugins_Reporter::RESULT_PASS) - ); - } - foreach ((array) $message->getBcc() as $address => $null) { - $this->_reporter->notify( - $message, $address, (array_key_exists($address, $failures) - ? Swift_Plugins_Reporter::RESULT_FAIL - : Swift_Plugins_Reporter::RESULT_PASS) - ); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php deleted file mode 100644 index 844e2a18..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php +++ /dev/null @@ -1,61 +0,0 @@ -_failures_cache[$address])) { - $this->_failures[] = $address; - $this->_failures_cache[$address] = true; - } - } - - /** - * Get an array of addresses for which delivery failed. - * - * @return array - */ - public function getFailedRecipients() - { - return $this->_failures; - } - - /** - * Clear the buffer (empty the list). - */ - public function clear() - { - $this->_failures = $this->_failures_cache = array(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php deleted file mode 100644 index 7b8c1889..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php +++ /dev/null @@ -1,41 +0,0 @@ -" . PHP_EOL; - echo "PASS " . $address . PHP_EOL; - echo "" . PHP_EOL; - flush(); - } else { - echo "
" . PHP_EOL; - echo "FAIL " . $address . PHP_EOL; - echo "
" . PHP_EOL; - flush(); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php deleted file mode 100644 index c491f63d..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php +++ /dev/null @@ -1,26 +0,0 @@ -_rate = $rate; - $this->_mode = $mode; - $this->_sleeper = $sleeper; - $this->_timer = $timer; - } - - /** - * Invoked immediately before the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - $time = $this->getTimestamp(); - if (!isset($this->_start)) { - $this->_start = $time; - } - $duration = $time - $this->_start; - - switch($this->_mode) { - case self::BYTES_PER_MINUTE : - $sleep = $this->_throttleBytesPerMinute($duration); - break; - case self::MESSAGES_PER_SECOND : - $sleep = $this->_throttleMessagesPerSecond($duration); - break; - case self::MESSAGES_PER_MINUTE : - $sleep = $this->_throttleMessagesPerMinute($duration); - break; - default : - $sleep = 0; - break; - } - - if ($sleep > 0) { - $this->sleep($sleep); - } - } - - /** - * Invoked when a Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - parent::sendPerformed($evt); - ++$this->_messages; - } - - /** - * Sleep for $seconds. - * - * @param integer $seconds - */ - public function sleep($seconds) - { - if (isset($this->_sleeper)) { - $this->_sleeper->sleep($seconds); - } else { - sleep($seconds); - } - } - - /** - * Get the current UNIX timestamp. - * - * @return int - */ - public function getTimestamp() - { - if (isset($this->_timer)) { - return $this->_timer->getTimestamp(); - } else { - return time(); - } - } - - // -- Private methods - - /** - * Get a number of seconds to sleep for. - * - * @param integer $timePassed - * - * @return int - */ - private function _throttleBytesPerMinute($timePassed) - { - $expectedDuration = $this->getBytesOut() / ($this->_rate / 60); - - return (int) ceil($expectedDuration - $timePassed); - } - - /** - * Get a number of seconds to sleep for. - * - * @param int $timePassed - * - * @return int - */ - private function _throttleMessagesPerSecond($timePassed) - { - $expectedDuration = $this->_messages / ($this->_rate); - - return (int) ceil($expectedDuration - $timePassed); - } - - /** - * Get a number of seconds to sleep for. - * - * @param integer $timePassed - * - * @return int - */ - private function _throttleMessagesPerMinute($timePassed) - { - $expectedDuration = $this->_messages / ($this->_rate / 60); - - return (int) ceil($expectedDuration - $timePassed); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php deleted file mode 100644 index 12dd09b8..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php +++ /dev/null @@ -1,26 +0,0 @@ -register('properties.charset')->asValue($charset); - - return $this; - } - - /** - * Set the directory where temporary files can be saved. - * - * @param string $dir - * - * @return Swift_Preferences - */ - public function setTempDir($dir) - { - Swift_DependencyContainer::getInstance() - ->register('tempdir')->asValue($dir); - - return $this; - } - - /** - * Set the type of cache to use (i.e. "disk" or "array"). - * - * @param string $type - * - * @return Swift_Preferences - */ - public function setCacheType($type) - { - Swift_DependencyContainer::getInstance() - ->register('cache')->asAliasOf(sprintf('cache.%s', $type)); - - return $this; - } - - /** - * Set the QuotedPrintable dot escaper preference. - * - * @param boolean $dotEscape - * - * @return Swift_Preferences - */ - public function setQPDotEscape($dotEscape) - { - $dotEscape = !empty($dotEscape); - Swift_DependencyContainer::getInstance() - ->register('mime.qpcontentencoder') - ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') - ->withDependencies(array('mime.charstream', 'mime.bytecanonicalizer')) - ->addConstructorValue($dotEscape); - - return $this; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php deleted file mode 100644 index 4b6eed58..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php +++ /dev/null @@ -1,28 +0,0 @@ -createDependenciesFor('transport.sendmail') - ); - - $this->setCommand($command); - } - - /** - * Create a new SendmailTransport instance. - * - * @param string $command - * - * @return Swift_SendmailTransport - */ - public static function newInstance($command = '/usr/sbin/sendmail -bs') - { - return new self($command); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SignedMessage.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SignedMessage.php deleted file mode 100644 index 1a073e4b..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SignedMessage.php +++ /dev/null @@ -1,165 +0,0 @@ - - */ -class Swift_SignedMessage extends Swift_Message -{ - /** - * @var Swift_Signers_HeaderSigner[] - */ - private $headerSigners = array(); - - /** - * @var Swift_Signers_BodySigner[] - */ - private $bodySigners = array(); - - /** - * @var array - */ - private $savedMessage = array(); - - /** - * Create a new Message. - * - * @param string $subject - * @param string $body - * @param string $contentType - * @param string $charset - * - * @return Swift_SignedMessage - */ - public static function newInstance($subject = null, $body = null, $contentType = null, $charset = null) - { - return new self($subject, $body, $contentType, $charset); - } - - /** - * Attach a new signature handler to the message. - * - * @param Swift_Signer $signer - * @return Swift_SignedMessage - */ - public function attachSigner(Swift_Signer $signer) - { - if ($signer instanceof Swift_Signers_HeaderSigner) { - $this->headerSigners[] = $signer; - } - elseif ($signer instanceof Swift_Signers_BodySigner) { - $this->bodySigners[] = $signer; - } - - return $this; - } - - /** - * Get this message as a complete string. - * - * @return string - */ - public function toString() - { - $this->saveMessage(); - - $this->doSign(); - $string = parent::toString(); - $this->restoreMessage(); - - return $string; - } - - /** - * Write this message to a {@link Swift_InputByteStream}. - * - * @param Swift_InputByteStream $is - */ - public function toByteStream(Swift_InputByteStream $is) - { - $this->saveMessage(); - $this->doSign(); - - parent::toByteStream($is); - $this->restoreMessage(); - } - - protected function doSign() - { - foreach ($this->bodySigners as $signer) { - $altered = $signer->getAlteredHeaders(); - $this->saveHeaders($altered); - $signer->signMessage($this); - } - - foreach ($this->headerSigners as $signer) { - $altered = $signer->getAlteredHeaders(); - $this->saveHeaders($altered); - $signer->reset(); - - $signer->setHeaders($this->getHeaders()); - - $signer->startBody(); - $this->_bodyToByteStream($signer); - $signer->endBody(); - - $signer->addSignature($this->getHeaders()); - } - } - - protected function saveMessage() - { - $this->savedMessage = array('headers'=> array()); - $this->savedMessage['body'] = $this->getBody(); - $this->savedMessage['children'] = $this->getChildren(); - if (count($this->savedMessage['children']) > 0 && $this->getBody() != '') { - $this->setChildren(array_merge(array($this->_becomeMimePart()), $this->savedMessage['children'])); - $this->setBody(''); - } - } - - protected function saveHeaders(array $altered) - { - foreach ($altered as $head) { - $lc = strtolower($head); - - if (!isset($this->savedMessage['headers'][$lc])) { - $this->savedMessage['headers'][$lc] = $this->getHeaders()->getAll($head); - } - } - } - - protected function restoreHeaders() - { - foreach ($this->savedMessage['headers'] as $name => $savedValue) { - $headers = $this->getHeaders()->getAll($name); - - foreach ($headers as $key => $value) { - if (!isset($savedValue[$key])) { - $this->getHeaders()->remove($name, $key); - } - } - } - } - - protected function restoreMessage() - { - $this->setBody($this->savedMessage['body']); - $this->setChildren($this->savedMessage['children']); - - $this->restoreHeaders(); - $this->savedMessage = array(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php deleted file mode 100644 index 865f557e..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ -interface Swift_Signer -{ - public function reset(); -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php deleted file mode 100644 index 3a653a33..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -interface Swift_Signers_BodySigner extends Swift_Signer -{ - /** - * Change the Swift_Signed_Message to apply the singing. - * - * @param Swift_Signed_Message $message - * - * @return Swift_Signers_BodySigner - */ - public function signMessage(Swift_SignedMessage $message); - - /** - * Return the list of header a signer might tamper - * - * @return array - */ - public function getAlteredHeaders(); -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php deleted file mode 100644 index 09a2ccde..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php +++ /dev/null @@ -1,669 +0,0 @@ - - */ -class Swift_Signers_DKIMSigner implements Swift_Signers_HeaderSigner -{ - /** - * PrivateKey - * - * @var string - */ - protected $_privateKey; - - /** - * DomainName - * - * @var string - */ - protected $_domainName; - - /** - * Selector - * - * @var string - */ - protected $_selector; - - /** - * Hash algorithm used - * - * @var string - */ - protected $_hashAlgorithm = 'rsa-sha1'; - - /** - * Body canon method - * - * @var string - */ - protected $_bodyCanon = 'simple'; - - /** - * Header canon method - * - * @var string - */ - protected $_headerCanon = 'simple'; - - /** - * Headers not being signed - * - * @var array - */ - protected $_ignoredHeaders = array(); - - /** - * Signer identity - * - * @var unknown_type - */ - protected $_signerIdentity; - - /** - * BodyLength - * - * @var int - */ - protected $_bodyLen = 0; - - /** - * Maximum signedLen - * - * @var int - */ - protected $_maxLen = PHP_INT_MAX; - - /** - * Embbed bodyLen in signature - * - * @var boolean - */ - protected $_showLen = false; - - /** - * When the signature has been applied (true means time()), false means not embedded - * - * @var mixed - */ - protected $_signatureTimestamp = true; - - /** - * When will the signature expires false means not embedded, if sigTimestamp is auto - * Expiration is relative, otherwhise it's absolute - * - * @var int - */ - protected $_signatureExpiration = false; - - /** - * Must we embed signed headers? - * - * @var boolean - */ - protected $_debugHeaders = false; - - // work variables - /** - * Headers used to generate hash - * - * @var array - */ - protected $_signedHeaders = array(); - - /** - * If debugHeaders is set store debugDatas here - * - * @var string - */ - private $_debugHeadersData = ''; - - /** - * Stores the bodyHash - * - * @var string - */ - private $_bodyHash = ''; - - /** - * Stores the signature header - * - * @var Swift_Mime_Headers_ParameterizedHeader - */ - protected $_dkimHeader; - - /** - * Hash Handler - * - * @var hash_ressource - */ - private $_headerHashHandler; - - private $_bodyHashHandler; - - private $_headerHash; - - private $_headerCanonData = ''; - - private $_bodyCanonEmptyCounter = 0; - - private $_bodyCanonIgnoreStart = 2; - - private $_bodyCanonSpace = false; - - private $_bodyCanonLastChar = null; - - private $_bodyCanonLine = ''; - - private $_bound = array(); - - /** - * Constructor - * - * @param string $privateKey - * @param string $domainName - * @param string $selector - */ - public function __construct($privateKey, $domainName, $selector) - { - $this->_privateKey = $privateKey; - $this->_domainName = $domainName; - $this->_signerIdentity = '@' . $domainName; - $this->_selector = $selector; - } - - public function reset() - { - $this->_headerHash = null; - $this->_signedHeaders = array(); - $this->_headerHashHandler = null; - $this->_bodyHash = null; - $this->_bodyHashHandler = null; - $this->_bodyCanonIgnoreStart = 2; - $this->_bodyCanonEmptyCounter = 0; - $this->_bodyCanonLastChar = NULL; - $this->_bodyCanonSpace = false; - } - - /** - * Writes $bytes to the end of the stream. - * - * Writing may not happen immediately if the stream chooses to buffer. If - * you want to write these bytes with immediate effect, call {@link commit()} - * after calling write(). - * - * This method returns the sequence ID of the write (i.e. 1 for first, 2 for - * second, etc etc). - * - * @param string $bytes - * @return int - * @throws Swift_IoException - */ - public function write($bytes) - { - $this->_canonicalizeBody($bytes); - foreach ($this->_bound as $is) { - $is->write($bytes); - } - } - - /** - * For any bytes that are currently buffered inside the stream, force them - * off the buffer. - * - * @throws Swift_IoException - */ - public function commit() - { - // Nothing to do - return; - } - - /** - * Attach $is to this stream. - * The stream acts as an observer, receiving all data that is written. - * All {@link write()} and {@link flushBuffers()} operations will be mirrored. - * - * @param Swift_InputByteStream $is - */ - public function bind(Swift_InputByteStream $is) - { - // Don't have to mirror anything - $this->_bound[] = $is; - - return; - } - - /** - * Remove an already bound stream. - * If $is is not bound, no errors will be raised. - * If the stream currently has any buffered data it will be written to $is - * before unbinding occurs. - * - * @param Swift_InputByteStream $is - */ - public function unbind(Swift_InputByteStream $is) - { - // Don't have to mirror anything - foreach ($this->_bound as $k => $el) { - if ($el == $is) { - unset($this->_bound[$k]); - - return; - } - } - - return; - } - - /** - * Flush the contents of the stream (empty it) and set the internal pointer - * to the beginning. - * - * @throws Swift_IoException - */ - public function flushBuffers() - { - $this->reset(); - } - - /** - * Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256 - * - * @param string $hash - * @return Swift_Signers_DKIMSigner - */ - public function setHashAlgorithm($hash) - { - // Unable to sign with rsa-sha256 - if ($hash == 'rsa-sha1') { - $this->_hashAlgorithm = 'rsa-sha1'; - } else { - $this->_hashAlgorithm = 'rsa-sha256'; - } - - return $this; - } - - /** - * Set the body canonicalization algorithm - * - * @param string $canon - * @return Swift_Signers_DKIMSigner - */ - public function setBodyCanon($canon) - { - if ($canon == 'relaxed') { - $this->_bodyCanon = 'relaxed'; - } else { - $this->_bodyCanon = 'simple'; - } - - return $this; - } - - /** - * Set the header canonicalization algorithm - * - * @param string $canon - * @return Swift_Signers_DKIMSigner - */ - public function setHeaderCanon($canon) - { - if ($canon == 'relaxed') { - $this->_headerCanon = 'relaxed'; - } else { - $this->_headerCanon = 'simple'; - } - - return $this; - } - - /** - * Set the signer identity - * - * @param string $identity - * @return Swift_Signers_DKIMSigner - */ - public function setSignerIdentity($identity) - { - $this->_signerIdentity = $identity; - - return $this; - } - - /** - * Set the length of the body to sign - * - * @param mixed $len (bool or int) - * @return Swift_Signers_DKIMSigner - */ - public function setBodySignedLen($len) - { - if ($len === true) { - $this->_showLen = true; - $this->_maxLen = PHP_INT_MAX; - } elseif ($len === false) { - $this->showLen = false; - $this->_maxLen = PHP_INT_MAX; - } else { - $this->_showLen = true; - $this->_maxLen = (int) $len; - } - - return $this; - } - - /** - * Set the signature timestamp - * - * @param timestamp $time - * @return Swift_Signers_DKIMSigner - */ - public function setSignatureTimestamp($time) - { - $this->_signatureTimestamp = $time; - - return $this; - } - - /** - * Set the signature expiration timestamp - * - * @param timestamp $time - * @return Swift_Signers_DKIMSigner - */ - public function setSignatureExpiration($time) - { - $this->_signatureExpiration = $time; - - return $this; - } - - /** - * Enable / disable the DebugHeaders - * - * @param boolean $debug - * @return Swift_Signers_DKIMSigner - */ - public function setDebugHeaders($debug) - { - $this->_debugHeaders = (bool) $debug; - - return $this; - } - - /** - * Start Body - * - */ - public function startBody() - { - // Init - switch ($this->_hashAlgorithm) { - case 'rsa-sha256' : - $this->_bodyHashHandler = hash_init('sha256'); - break; - case 'rsa-sha1' : - $this->_bodyHashHandler = hash_init('sha1'); - break; - } - $this->_bodyCanonLine = ''; - } - - /** - * End Body - * - */ - public function endBody() - { - $this->_endOfBody(); - } - - /** - * Returns the list of Headers Tampered by this plugin - * - * @return array - */ - public function getAlteredHeaders() - { - if ($this->_debugHeaders) { - return array('DKIM-Signature', 'X-DebugHash'); - } else { - return array('DKIM-Signature'); - } - } - - /** - * Adds an ignored Header - * - * @param string $header_name - * @return Swift_Signers_DKIMSigner - */ - public function ignoreHeader($header_name) - { - $this->_ignoredHeaders[strtolower($header_name)] = true; - - return $this; - } - - /** - * Set the headers to sign - * - * @param Swift_Mime_HeaderSet $headers - * @return Swift_Signers_DKIMSigner - */ - public function setHeaders(Swift_Mime_HeaderSet $headers) - { - $this->_headerCanonData = ''; - // Loop through Headers - $listHeaders = $headers->listAll(); - foreach ($listHeaders as $hName) { - // Check if we need to ignore Header - if (! isset($this->_ignoredHeaders[strtolower($hName)])) { - if ($headers->has($hName)) { - $tmp = $headers->getAll($hName); - foreach ($tmp as $header) { - if ($header->getFieldBody() != '') { - $this->_addHeader($header->toString()); - $this->_signedHeaders[] = $header->getFieldName(); - } - } - } - } - } - - return $this; - } - - /** - * Add the signature to the given Headers - * - * @param Swift_Mime_HeaderSet $headers - * @return Swift_Signers_DKIMSigner - */ - public function addSignature(Swift_Mime_HeaderSet $headers) - { - // Prepare the DKIM-Signature - $params = array('v' => '1', 'a' => $this->_hashAlgorithm, 'bh' => base64_encode($this->_bodyHash), 'd' => $this->_domainName, 'h' => implode(': ', $this->_signedHeaders), 'i' => $this->_signerIdentity, 's' => $this->_selector); - if ($this->_bodyCanon != 'simple') { - $params['c'] = $this->_headerCanon . '/' . $this->_bodyCanon; - } elseif ($this->_headerCanon != 'simple') { - $params['c'] = $this->_headerCanon; - } - if ($this->_showLen) { - $params['l'] = $this->_bodyLen; - } - if ($this->_signatureTimestamp === true) { - $params['t'] = time(); - if ($this->_signatureExpiration !== false) { - $params['x'] = $params['t'] + $this->_signatureExpiration; - } - } else { - if ($this->_signatureTimestamp !== false) { - $params['t'] = $this->_signatureTimestamp; - } - if ($this->_signatureExpiration !== false) { - $params['x'] = $this->_signatureExpiration; - } - } - if ($this->_debugHeaders) { - $params['z'] = implode('|', $this->_debugHeadersData); - } - $string = ''; - foreach ($params as $k => $v) { - $string .= $k . '=' . $v . '; '; - } - $string = trim($string); - $headers->addTextHeader('DKIM-Signature', $string); - // Add the last DKIM-Signature - $tmp = $headers->getAll('DKIM-Signature'); - $this->_dkimHeader = end($tmp); - $this->_addHeader(trim($this->_dkimHeader->toString()) . "\r\n b=", true); - $this->_endOfHeaders(); - if ($this->_debugHeaders) { - $headers->addTextHeader('X-DebugHash', base64_encode($this->_headerHash)); - } - $this->_dkimHeader->setValue($string . " b=" . trim(chunk_split(base64_encode($this->_getEncryptedHash()), 73, " "))); - - return $this; - } - - /* Private helpers */ - - protected function _addHeader($header, $is_sig = false) - { - switch ($this->_headerCanon) { - case 'relaxed' : - // Prepare Header and cascade - $exploded = explode(':', $header, 2); - $name = strtolower(trim($exploded[0])); - $value = str_replace("\r\n", "", $exploded[1]); - $value = preg_replace("/[ \t][ \t]+/", " ", $value); - $header = $name . ":" . trim($value) . ($is_sig ? '' : "\r\n"); - case 'simple' : - // Nothing to do - } - $this->_addToHeaderHash($header); - } - - protected function _endOfHeaders() - { - //$this->_headerHash=hash_final($this->_headerHashHandler, true); - } - - protected function _canonicalizeBody($string) - { - $len = strlen($string); - $canon = ''; - $method = ($this->_bodyCanon == "relaxed"); - for ($i = 0; $i < $len; ++$i) { - if ($this->_bodyCanonIgnoreStart > 0) { - --$this->_bodyCanonIgnoreStart; - continue; - } - switch ($string[$i]) { - case "\r" : - $this->_bodyCanonLastChar = "\r"; - break; - case "\n" : - if ($this->_bodyCanonLastChar == "\r") { - if ($method) { - $this->_bodyCanonSpace = false; - } - if ($this->_bodyCanonLine == '') { - ++$this->_bodyCanonEmptyCounter; - } else { - $this->_bodyCanonLine = ''; - $canon .= "\r\n"; - } - } else { - // Wooops Error - // todo handle it but should never happen - } - break; - case " " : - case "\t" : - if ($method) { - $this->_bodyCanonSpace = true; - break; - } - default : - if ($this->_bodyCanonEmptyCounter > 0) { - $canon .= str_repeat("\r\n", $this->_bodyCanonEmptyCounter); - $this->_bodyCanonEmptyCounter = 0; - } - if ($this->_bodyCanonSpace) { - $this->_bodyCanonLine .= ' '; - $canon .= ' '; - $this->_bodyCanonSpace = false; - } - $this->_bodyCanonLine .= $string[$i]; - $canon .= $string[$i]; - } - } - $this->_addToBodyHash($canon); - } - - protected function _endOfBody() - { - // Add trailing Line return if last line is non empty - if (strlen($this->_bodyCanonLine) > 0) { - $this->_addToBodyHash("\r\n"); - } - $this->_bodyHash = hash_final($this->_bodyHashHandler, true); - } - - private function _addToBodyHash($string) - { - $len = strlen($string); - if ($len > ($new_len = ($this->_maxLen - $this->_bodyLen))) { - $string = substr($string, 0, $new_len); - $len = $new_len; - } - hash_update($this->_bodyHashHandler, $string); - $this->_bodyLen += $len; - } - - private function _addToHeaderHash($header) - { - if ($this->_debugHeaders) { - $this->_debugHeadersData[] = trim($header); - } - $this->_headerCanonData .= $header; - } - - private function _getEncryptedHash() - { - $signature = ''; - switch ($this->_hashAlgorithm) { - case 'rsa-sha1': - $algorithm = 'sha1'; - break; - case 'rsa-sha256': - $algorithm = 'sha256'; - break; - } - $pkeyId=openssl_get_privatekey($this->_privateKey); - if (!$pkeyId) { - throw new Swift_SwiftException('Unable to load DKIM Private Key ['.openssl_error_string().']'); - } - if (openssl_sign($this->_headerCanonData, $signature, $this->_privateKey, $algorithm)) { - return $signature; - } - throw new Swift_SwiftException('Unable to sign DKIM Hash ['.openssl_error_string().']'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php deleted file mode 100644 index f817e45b..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php +++ /dev/null @@ -1,505 +0,0 @@ - - */ -class Swift_Signers_DomainKeySigner implements Swift_Signers_HeaderSigner -{ - /** - * PrivateKey - * - * @var string - */ - protected $_privateKey; - - /** - * DomainName - * - * @var string - */ - protected $_domainName; - - /** - * Selector - * - * @var string - */ - protected $_selector; - - /** - * Hash algorithm used - * - * @var string - */ - protected $_hashAlgorithm = 'rsa-sha1'; - - /** - * Canonisation method - * - * @var string - */ - protected $_canon = 'simple'; - - /** - * Headers not being signed - * - * @var array - */ - protected $_ignoredHeaders = array(); - - /** - * Signer identity - * - * @var unknown_type - */ - protected $_signerIdentity; - - /** - * Must we embed signed headers? - * - * @var boolean - */ - protected $_debugHeaders = false; - - // work variables - /** - * Headers used to generate hash - * - * @var array - */ - private $_signedHeaders = array(); - - /** - * If debugHeaders is set store debugDatas here - * - * @var string - */ - private $_debugHeadersData = ''; - - /** - * Stores the signature header - * - * @var Swift_Mime_Headers_ParameterizedHeader - */ - protected $_domainKeyHeader; - - /** - * Hash Handler - * - * @var hash_ressource - */ - private $_hashHandler; - - private $_hash; - - private $_canonData = ''; - - private $_bodyCanonEmptyCounter = 0; - - private $_bodyCanonIgnoreStart = 2; - - private $_bodyCanonSpace = false; - - private $_bodyCanonLastChar = null; - - private $_bodyCanonLine = ''; - - private $_bound = array(); - - /** - * Constructor - * - * @param string $privateKey - * @param string $domainName - * @param string $selector - */ - public function __construct($privateKey, $domainName, $selector) - { - $this->_privateKey = $privateKey; - $this->_domainName = $domainName; - $this->_signerIdentity = '@' . $domainName; - $this->_selector = $selector; - } - - /** - * Resets internal states - * - * @return Swift_Signers_DomainKeysSigner - */ - public function reset() - { - $this->_hash = null; - $this->_hashHandler = null; - $this->_bodyCanonIgnoreStart = 2; - $this->_bodyCanonEmptyCounter = 0; - $this->_bodyCanonLastChar = NULL; - $this->_bodyCanonSpace = false; - - return $this; - } - - /** - * Writes $bytes to the end of the stream. - * - * Writing may not happen immediately if the stream chooses to buffer. If - * you want to write these bytes with immediate effect, call {@link commit()} - * after calling write(). - * - * This method returns the sequence ID of the write (i.e. 1 for first, 2 for - * second, etc etc). - * - * @param string $bytes - * @return int - * @throws Swift_IoException - * @return Swift_Signers_DomainKeysSigner - */ - public function write($bytes) - { - $this->_canonicalizeBody($bytes); - foreach ($this->_bound as $is) { - $is->write($bytes); - } - - return $this; - } - - /** - * For any bytes that are currently buffered inside the stream, force them - * off the buffer. - * - * @throws Swift_IoException - * @return Swift_Signers_DomainKeysSigner - */ - public function commit() - { - // Nothing to do - return $this; - } - - /** - * Attach $is to this stream. - * The stream acts as an observer, receiving all data that is written. - * All {@link write()} and {@link flushBuffers()} operations will be mirrored. - * - * @param Swift_InputByteStream $is - * @return Swift_Signers_DomainKeysSigner - */ - public function bind(Swift_InputByteStream $is) - { - // Don't have to mirror anything - $this->_bound[] = $is; - - return $this; - } - - /** - * Remove an already bound stream. - * If $is is not bound, no errors will be raised. - * If the stream currently has any buffered data it will be written to $is - * before unbinding occurs. - * - * @param Swift_InputByteStream $is - * @return Swift_Signers_DomainKeysSigner - */ - public function unbind(Swift_InputByteStream $is) - { - // Don't have to mirror anything - foreach ($this->_bound as $k => $el) { - if ($el == $is) { - unset($this->_bound[$k]); - - return; - } - } - - return $this; - } - - /** - * Flush the contents of the stream (empty it) and set the internal pointer - * to the beginning. - * - * @throws Swift_IoException - * @return Swift_Signers_DomainKeysSigner - */ - public function flushBuffers() - { - $this->reset(); - - return $this; - } - - /** - * Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256 - * - * @param string $hash - * @return Swift_Signers_DomainKeysSigner - */ - public function setHashAlgorithm($hash) - { - $this->_hashAlgorithm = 'rsa-sha1'; - - return $this; - } - - /** - * Set the canonicalization algorithm - * - * @param string $canon simple | nofws defaults to simple - * @return Swift_Signers_DomainKeysSigner - */ - public function setCanon($canon) - { - if ($canon == 'nofws') { - $this->_canon = 'nofws'; - } else { - $this->_canon = 'simple'; - } - - return $this; - } - - /** - * Set the signer identity - * - * @param string $identity - * @return Swift_Signers_DomainKeySigner - */ - public function setSignerIdentity($identity) - { - $this->_signerIdentity = $identity; - - return $this; - } - - /** - * Enable / disable the DebugHeaders - * - * @param boolean $debug - * @return Swift_Signers_DomainKeySigner - */ - public function setDebugHeaders($debug) - { - $this->_debugHeaders = (bool) $debug; - - return $this; - } - - /** - * Start Body - * - */ - public function startBody() - { - } - - /** - * End Body - * - */ - public function endBody() - { - $this->_endOfBody(); - } - - /** - * Returns the list of Headers Tampered by this plugin - * - * @return array - */ - public function getAlteredHeaders() - { - if ($this->_debugHeaders) { - return array('DomainKey-Signature', 'X-DebugHash'); - } else { - return array('DomainKey-Signature'); - } - } - - /** - * Adds an ignored Header - * - * @param string $header_name - * @return Swift_Signers_DomainKeySigner - */ - public function ignoreHeader($header_name) - { - $this->_ignoredHeaders[strtolower($header_name)] = true; - - return $this; - } - - /** - * Set the headers to sign - * - * @param Swift_Mime_HeaderSet $headers - * @return Swift_Signers_DomainKeySigner - */ - public function setHeaders(Swift_Mime_HeaderSet $headers) - { - $this->_startHash(); - $this->_canonData = ''; - // Loop through Headers - $listHeaders = $headers->listAll(); - foreach ($listHeaders as $hName) { - // Check if we need to ignore Header - if (! isset($this->_ignoredHeaders[strtolower($hName)])) { - if ($headers->has($hName)) { - $tmp = $headers->getAll($hName); - foreach ($tmp as $header) { - if ($header->getFieldBody() != '') { - $this->_addHeader($header->toString()); - $this->_signedHeaders[] = $header->getFieldName(); - } - } - } - } - } - $this->_endOfHeaders(); - - return $this; - } - - /** - * Add the signature to the given Headers - * - * @param Swift_Mime_HeaderSet $headers - * @return Swift_Signers_DomainKeySigner - */ - public function addSignature(Swift_Mime_HeaderSet $headers) - { - // Prepare the DomainKey-Signature Header - $params = array('a' => $this->_hashAlgorithm, 'b' => chunk_split(base64_encode($this->_getEncryptedHash()), 73, " "), 'c' => $this->_canon, 'd' => $this->_domainName, 'h' => implode(': ', $this->_signedHeaders), 'q' => 'dns', 's' => $this->_selector); - $string = ''; - foreach ($params as $k => $v) { - $string .= $k . '=' . $v . '; '; - } - $string = trim($string); - $headers->addTextHeader('DomainKey-Signature', $string); - - return $this; - } - - /* Private helpers */ - - protected function _addHeader($header) - { - switch ($this->_canon) { - case 'nofws' : - // Prepare Header and cascade - $exploded = explode(':', $header, 2); - $name = strtolower(trim($exploded[0])); - $value = str_replace("\r\n", "", $exploded[1]); - $value = preg_replace("/[ \t][ \t]+/", " ", $value); - $header = $name . ":" . trim($value) . "\r\n"; - case 'simple' : - // Nothing to do - } - $this->_addToHash($header); - } - - protected function _endOfHeaders() - { - $this->_bodyCanonEmptyCounter = 1; - } - - protected function _canonicalizeBody($string) - { - $len = strlen($string); - $canon = ''; - $nofws = ($this->_canon == "nofws"); - for ($i = 0; $i < $len; ++$i) { - if ($this->_bodyCanonIgnoreStart > 0) { - --$this->_bodyCanonIgnoreStart; - continue; - } - switch ($string[$i]) { - case "\r" : - $this->_bodyCanonLastChar = "\r"; - break; - case "\n" : - if ($this->_bodyCanonLastChar == "\r") { - if ($nofws) { - $this->_bodyCanonSpace = false; - } - if ($this->_bodyCanonLine == '') { - ++$this->_bodyCanonEmptyCounter; - } else { - $this->_bodyCanonLine = ''; - $canon .= "\r\n"; - } - } else { - // Wooops Error - throw new Swift_SwiftException('Invalid new line sequence in mail found \n without preceding \r'); - } - break; - case " " : - case "\t" : - case "\x09": //HTAB - if ($nofws) { - $this->_bodyCanonSpace = true; - break; - } - default : - if ($this->_bodyCanonEmptyCounter > 0) { - $canon .= str_repeat("\r\n", $this->_bodyCanonEmptyCounter); - $this->_bodyCanonEmptyCounter = 0; - } - $this->_bodyCanonLine .= $string[$i]; - $canon .= $string[$i]; - } - } - $this->_addToHash($canon); - } - - protected function _endOfBody() - { - if (strlen($this->_bodyCanonLine) > 0) { - $this->_addToHash("\r\n"); - } - $this->_hash = hash_final($this->_hashHandler, true); - } - - private function _addToHash($string) - { - echo $string; - $this->_canonData .= $string; - hash_update($this->_hashHandler, $string); - } - - private function _startHash() - { - // Init - switch ($this->_hashAlgorithm) { - case 'rsa-sha1' : - $this->_hashHandler = hash_init('sha1'); - break; - } - $this->_canonLine = ''; - } - - private function _getEncryptedHash() - { - $signature = ''; - $pkeyId=openssl_get_privatekey($this->_privateKey); - if (!$pkeyId) { - throw new Swift_SwiftException('Unable to load DomainKey Private Key ['.openssl_error_string().']'); - } - if (openssl_sign($this->_canonData, $signature, $pkeyId, 'sha1')) { - return $signature; - } - throw new Swift_SwiftException('Unable to sign DomainKey Hash ['.openssl_error_string().']'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php deleted file mode 100644 index 47091dba..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php +++ /dev/null @@ -1,67 +0,0 @@ - - */ -interface Swift_Signers_HeaderSigner extends Swift_Signer, Swift_InputByteStream -{ - /** - * Exclude an header from the signed headers - * - * @param string $header_name - * - * @return Swift_Signers_HeaderSigner - */ - public function ignoreHeader($header_name); - - /** - * Prepare the Signer to get a new Body - * - * @return Swift_Signers_HeaderSigner - */ - public function startBody(); - - /** - * Give the signal that the body has finished streaming - * - * @return Swift_Signers_HeaderSigner - */ - public function endBody(); - - /** - * Give the headers already given - * - * @param Swift_Mime_SimpleHeaderSet $headers - * - * @return Swift_Signers_HeaderSigner - */ - public function setHeaders(Swift_Mime_HeaderSet $headers); - - /** - * Add the header(s) to the headerSet - * - * @param Swift_Mime_HeaderSet $headers - * - * @return Swift_Signers_HeaderSigner - */ - public function addSignature(Swift_Mime_HeaderSet $headers); - - /** - * Return the list of header a signer might tamper - * - * @return array - */ - public function getAlteredHeaders(); -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php deleted file mode 100644 index 47c0a3dc..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php +++ /dev/null @@ -1,430 +0,0 @@ - - */ -class Swift_Signers_SMimeSigner implements Swift_Signers_BodySigner -{ - protected $signCertificate; - protected $signPrivateKey; - protected $encryptCert; - protected $signThenEncrypt = true; - protected $signLevel; - protected $encryptLevel; - protected $signOptions; - protected $encryptOptions; - protected $encryptCipher; - - /** - * @var Swift_StreamFilters_StringReplacementFilterFactory - */ - protected $replacementFactory; - - /** - * @var Swift_Mime_HeaderFactory - */ - protected $headerFactory; - - /** - * Constructor. - * - * @param string $certificate - * @param string $privateKey - * @param string $encryptCertificate - */ - public function __construct($signCertificate = null, $signPrivateKey = null, $encryptCertificate = null) - { - if (null !== $signPrivateKey) { - $this->setSignCertificate($signCertificate, $signPrivateKey); - } - - if (null !== $encryptCertificate) { - $this->setEncryptCertificate($encryptCertificate); - } - - $this->replacementFactory = Swift_DependencyContainer::getInstance() - ->lookup('transport.replacementfactory'); - - $this->signOptions = PKCS7_DETACHED; - - // Supported since php5.4 - if (defined('OPENSSL_CIPHER_AES_128_CBC')) { - $this->encryptCipher = OPENSSL_CIPHER_AES_128_CBC; - } else { - $this->encryptCipher = OPENSSL_CIPHER_RC2_128; - } - } - - /** - * Returns an new Swift_Signers_SMimeSigner instance. - * - * @param string $certificate - * @param string $privateKey - * - * @return Swift_Signers_SMimeSigner - */ - public static function newInstance($certificate = null, $privateKey = null) - { - return new static($certificate, $privateKey); - } - - /** - * Set the certificate location to use for signing. - * - * @link http://www.php.net/manual/en/openssl.pkcs7.flags.php - * - * @param string $certificate - * @param string|array $privateKey If the key needs an passphrase use array('file-location', 'passphrase') instead - * @param integer $signOptions Bitwise operator options for openssl_pkcs7_sign() - * - * @return Swift_Signers_SMimeSigner - */ - public function setSignCertificate($certificate, $privateKey = null, $signOptions = PKCS7_DETACHED) - { - $this->signCertificate = 'file://' . str_replace('\\', '/', realpath($certificate)); - - if (null !== $privateKey) { - if (is_array($privateKey)) { - $this->signPrivateKey = $privateKey; - $this->signPrivateKey[0] = 'file://' . str_replace('\\', '/', realpath($privateKey[0])); - } else { - $this->signPrivateKey = 'file://' . str_replace('\\', '/', realpath($privateKey)); - } - } - - $this->signOptions = $signOptions; - - return $this; - } - - /** - * Set the certificate location to use for encryption. - * - * @link http://www.php.net/manual/en/openssl.pkcs7.flags.php - * @link http://nl3.php.net/manual/en/openssl.ciphers.php - * - * @param string|array $recipientCerts Either an single X.509 certificate, or an assoc array of X.509 certificates. - * @param integer $cipher - * - * @return Swift_Signers_SMimeSigner - */ - public function setEncryptCertificate($recipientCerts, $cipher = null) - { - if (is_array($recipientCerts)) { - $this->encryptCert = array(); - - foreach ($recipientCerts as $cert) { - $this->encryptCert[] = 'file://' . str_replace('\\', '/', realpath($cert)); - } - } else { - $this->encryptCert = 'file://' . str_replace('\\', '/', realpath($recipientCerts)); - } - - if (null !== $cipher) { - $this->encryptCipher = $cipher; - } - - return $this; - } - - /** - * @return string - */ - public function getSignCertificate() - { - return $this->signCertificate; - } - - /** - * @return string - */ - public function getSignPrivateKey() - { - return $this->signPrivateKey; - } - - /** - * Set perform signing before encryption. - * - * The default is to first sign the message and then encrypt. - * But some older mail clients, namely Microsoft Outlook 2000 will work when the message first encrypted. - * As this goes against the official specs, its recommended to only use 'encryption -> signing' when specifically targeting these 'broken' clients. - * - * @param string $signThenEncrypt - * - * @return Swift_Signers_SMimeSigner - */ - public function setSignThenEncrypt($signThenEncrypt = true) - { - $this->signThenEncrypt = $signThenEncrypt; - - return $this; - } - - /** - * @return Boolean - */ - public function isSignThenEncrypt() - { - return $this->signThenEncrypt; - } - - /** - * Resets internal states. - * - * @return Swift_Signers_SMimeSigner - */ - public function reset() - { - return $this; - } - - /** - * Change the Swift_SignedMessage to apply the singing. - * - * @param Swift_SignedMessage $message - * - * @return Swift_Signers_SMimeSigner - */ - public function signMessage(Swift_SignedMessage $message) - { - if (null === $this->signCertificate && null === $this->encryptCert) { - return $this; - } - - // Store the message using ByteStream to a file{1} - // Remove all Children - // Sign file{1}, parse the new MIME headers and set them on the primary MimeEntity - // Set the singed-body as the new body (without boundary) - - $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); - $this->toSMimeByteStream($messageStream, $message); - $message->setEncoder(Swift_DependencyContainer::getInstance()->lookup('mime.rawcontentencoder')); - - $message->setChildren(array()); - $this->streamToMime($messageStream, $message); - - } - - /** - * Return the list of header a signer might tamper. - * - * @return array - */ - public function getAlteredHeaders() - { - return array('Content-Type', 'Content-Transfer-Encoding', 'Content-Disposition'); - } - - /** - * @param Swift_InputByteStream $inputStream - * @param Swift_SignedMessage $mimeEntity - */ - protected function toSMimeByteStream(Swift_InputByteStream $inputStream, Swift_SignedMessage $message) - { - $mimeEntity = $this->createMessage($message); - $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); - - $mimeEntity->toByteStream($messageStream); - $messageStream->commit(); - - if (null !== $this->signCertificate && null !== $this->encryptCert) { - $temporaryStream = new Swift_ByteStream_TemporaryFileByteStream(); - - if ($this->signThenEncrypt) { - $this->messageStreamToSignedByteStream($messageStream, $temporaryStream); - $this->messageStreamToEncryptedByteStream($temporaryStream, $inputStream); - } else { - $this->messageStreamToEncryptedByteStream($messageStream, $temporaryStream); - $this->messageStreamToSignedByteStream($temporaryStream, $inputStream); - } - } elseif ($this->signCertificate !== null) { - $this->messageStreamToSignedByteStream($messageStream, $inputStream); - } else { - $this->messageStreamToEncryptedByteStream($messageStream, $inputStream); - } - } - - /** - * @param Swift_SignedMessage $message - * - * @return Swift_Message - */ - protected function createMessage(Swift_SignedMessage $message) - { - $mimeEntity = new Swift_Message('', $message->getBody(), $message->getContentType(), $message->getCharset()); - $mimeEntity->setChildren($message->getChildren()); - - $messageHeaders = $mimeEntity->getHeaders(); - $messageHeaders->remove('Message-ID'); - $messageHeaders->remove('Date'); - $messageHeaders->remove('Subject'); - $messageHeaders->remove('MIME-Version'); - $messageHeaders->remove('To'); - $messageHeaders->remove('From'); - - return $mimeEntity; - } - - /** - * @param Swift_FileStream $outputStream - * @param Swift_InputByteStream $inputStream - * - * @throws Swift_IoException - */ - protected function messageStreamToSignedByteStream(Swift_FileStream $outputStream, Swift_InputByteStream $inputStream) - { - $signedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); - - if (!openssl_pkcs7_sign($outputStream->getPath(), $signedMessageStream->getPath(), $this->signCertificate, $this->signPrivateKey, array(), $this->signOptions)) { - throw new Swift_IoException(sprintf('Failed to sign S/Mime message. Error: "%s".', openssl_error_string())); - } - - $this->copyFromOpenSSLOutput($signedMessageStream, $inputStream); - } - - /** - * @param Swift_FileStream $outputStream - * @param Swift_InputByteStream $is - * - * @throws Swift_IoException - */ - protected function messageStreamToEncryptedByteStream(Swift_FileStream $outputStream, Swift_InputByteStream $is) - { - $encryptedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); - - if (!openssl_pkcs7_encrypt($outputStream->getPath(), $encryptedMessageStream->getPath(), $this->encryptCert, array())) { - throw new Swift_IoException(sprintf('Failed to encrypt S/Mime message. Error: "%s".', openssl_error_string())); - } - - $this->copyFromOpenSSLOutput($encryptedMessageStream, $is); - } - - /** - * @param Swift_OutputByteStream $fromStream - * @param Swift_InputByteStream $toStream - */ - protected function copyFromOpenSSLOutput(Swift_OutputByteStream $fromStream, Swift_InputByteStream $toStream) - { - $bufferLength = 4096; - $filteredStream = new Swift_ByteStream_TemporaryFileByteStream(); - $filteredStream->addFilter($this->replacementFactory->createFilter("\r\n", "\n"), 'CRLF to LF'); - $filteredStream->addFilter($this->replacementFactory->createFilter("\n", "\r\n"), 'LF to CRLF'); - - while (false !== ($buffer = $fromStream->read($bufferLength))) { - $filteredStream->write($buffer); - } - - $filteredStream->flushBuffers(); - - while (false !== ($buffer = $filteredStream->read($bufferLength))) { - $toStream->write($buffer); - } - - $toStream->commit(); - } - - /** - * Merges an OutputByteStream to Swift_SignedMessage. - * - * @param Swift_OutputByteStream $fromStream - * @param Swift_Message $message - */ - protected function streamToMime(Swift_OutputByteStream $fromStream, Swift_Message $message) - { - $bufferLength = 78; - $headerData = ''; - - $fromStream->setReadPointer(0); - - while (($buffer = $fromStream->read($bufferLength)) !== false) { - $headerData .= $buffer; - - if (false !== strpos($buffer, "\r\n\r\n")) { - break; - } - } - - $headersPosEnd = strpos($headerData, "\r\n\r\n"); - $headerData = trim($headerData); - $headerData = substr($headerData, 0, $headersPosEnd); - $headerLines = explode("\r\n", $headerData); - unset($headerData); - - $headers = array(); - $currentHeaderName = ''; - - foreach ($headerLines as $headerLine) { - // Line separated - if (ctype_space($headerLines[0]) || false === strpos($headerLine, ':')) { - $headers[$currentHeaderName] .= ' ' . trim($headerLine); - continue; - } - - $header = explode(':', $headerLine, 2); - $currentHeaderName = strtolower($header[0]); - $headers[$currentHeaderName] = trim($header[1]); - } - - $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); - $messageStream->addFilter($this->replacementFactory->createFilter("\r\n", "\n"), 'CRLF to LF'); - $messageStream->addFilter($this->replacementFactory->createFilter("\n", "\r\n"), 'LF to CRLF'); - - $messageHeaders = $message->getHeaders(); - - // No need to check for 'application/pkcs7-mime', as this is always base64 - if ('multipart/signed;' === substr($headers['content-type'], 0, 17)) { - if (!preg_match('/boundary=("[^"]+"|(?:[^\s]+|$))/is', $headers['content-type'], $contentTypeData)) { - throw new Swift_SwiftException('Failed to find Boundary parameter'); - } - - $boundary = trim($contentTypeData['1'], '"'); - $boundaryLen = strlen($boundary); - - // Skip the header and CRLF CRLF - $fromStream->setReadPointer($headersPosEnd + 4); - - while (false !== ($buffer = $fromStream->read($bufferLength))) { - $messageStream->write($buffer); - } - - $messageStream->commit(); - - $messageHeaders->remove('Content-Transfer-Encoding'); - $message->setContentType($headers['content-type']); - $message->setBoundary($boundary); - $message->setBody($messageStream); - } else { - $fromStream->setReadPointer($headersPosEnd + 4); - - if (null === $this->headerFactory) { - $this->headerFactory = Swift_DependencyContainer::getInstance()->lookup('mime.headerfactory'); - } - - $message->setContentType($headers['content-type']); - $messageHeaders->set($this->headerFactory->createTextHeader('Content-Transfer-Encoding', $headers['content-transfer-encoding'])); - $messageHeaders->set($this->headerFactory->createTextHeader('Content-Disposition', $headers['content-disposition'])); - - while (false !== ($buffer = $fromStream->read($bufferLength))) { - $messageStream->write($buffer); - } - - $messageStream->commit(); - $message->setBody($messageStream); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php deleted file mode 100644 index 4fc750a8..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php +++ /dev/null @@ -1,53 +0,0 @@ -createDependenciesFor('transport.smtp') - ); - - $this->setHost($host); - $this->setPort($port); - $this->setEncryption($security); - } - - /** - * Create a new SmtpTransport instance. - * - * @param string $host - * @param integer $port - * @param string $security - * - * @return Swift_SmtpTransport - */ - public static function newInstance($host = 'localhost', $port = 25, $security = null) - { - return new self($host, $port, $security); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php deleted file mode 100644 index 981c1781..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Interface for spools. - * - * @package Swift - * @author Fabien Potencier - */ -interface Swift_Spool -{ - /** - * Starts this Spool mechanism. - */ - public function start(); - - /** - * Stops this Spool mechanism. - */ - public function stop(); - - /** - * Tests if this Spool mechanism has started. - * - * @return boolean - */ - public function isStarted(); - - /** - * Queues a message. - * - * @param Swift_Mime_Message $message The message to store - * - * @return boolean Whether the operation has succeeded - */ - public function queueMessage(Swift_Mime_Message $message); - - /** - * Sends messages using the given transport instance. - * - * @param Swift_Transport $transport A transport instance - * @param string[] $failedRecipients An array of failures by-reference - * - * @return integer The number of sent emails - */ - public function flushQueue(Swift_Transport $transport, &$failedRecipients = null); -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php deleted file mode 100644 index 8a135d4c..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Stores Messages in a queue. - * - * @package Swift - * @author Fabien Potencier - */ -class Swift_SpoolTransport extends Swift_Transport_SpoolTransport -{ - /** - * Create a new SpoolTransport. - * - * @param Swift_Spool $spool - */ - public function __construct(Swift_Spool $spool) - { - $arguments = Swift_DependencyContainer::getInstance() - ->createDependenciesFor('transport.spool'); - - $arguments[] = $spool; - - call_user_func_array( - array($this, 'Swift_Transport_SpoolTransport::__construct'), - $arguments - ); - } - - /** - * Create a new SpoolTransport instance. - * - * @param Swift_Spool $spool - * - * @return Swift_SpoolTransport - */ - public static function newInstance(Swift_Spool $spool) - { - return new self($spool); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php deleted file mode 100644 index 8b887bf6..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php +++ /dev/null @@ -1,36 +0,0 @@ -_search = $search; - $this->_index = array(); - $this->_tree = array(); - $this->_replace = array(); - $this->_repSize = array(); - - $tree = null; - $i = null; - $last_size = $size = 0; - foreach ($search as $i => $search_element) { - if ($tree !== null) { - $tree[-1] = min (count($replace) - 1, $i - 1); - $tree[-2] = $last_size; - } - $tree = &$this->_tree; - if (is_array ($search_element)) { - foreach ($search_element as $k => $char) { - $this->_index[$char] = true; - if (!isset($tree[$char])) { - $tree[$char] = array(); - } - $tree = &$tree[$char]; - } - $last_size = $k+1; - $size = max($size, $last_size); - } else { - $last_size = 1; - if (!isset($tree[$search_element])) { - $tree[$search_element] = array(); - } - $tree = &$tree[$search_element]; - $size = max($last_size, $size); - $this->_index[$search_element] = true; - } - } - if ($i !== null) { - $tree[-1] = min (count ($replace) - 1, $i); - $tree[-2] = $last_size; - $this->_treeMaxLen = $size; - } - foreach ($replace as $rep) { - if (!is_array($rep)) { - $rep = array ($rep); - } - $this->_replace[] = $rep; - } - for ($i = count($this->_replace) - 1; $i >= 0; --$i) { - $this->_replace[$i] = $rep = $this->filter($this->_replace[$i], $i); - $this->_repSize[$i] = count($rep); - } - } - - /** - * Returns true if based on the buffer passed more bytes should be buffered. - * - * @param array $buffer - * - * @return boolean - */ - public function shouldBuffer($buffer) - { - $endOfBuffer = end($buffer); - - return isset ($this->_index[$endOfBuffer]); - } - - /** - * Perform the actual replacements on $buffer and return the result. - * - * @param array $buffer - * @param integer $_minReplaces - * - * @return array - */ - public function filter($buffer, $_minReplaces = -1) - { - if ($this->_treeMaxLen == 0) { - return $buffer; - } - - $newBuffer = array(); - $buf_size = count($buffer); - for ($i = 0; $i < $buf_size; ++$i) { - $search_pos = $this->_tree; - $last_found = PHP_INT_MAX; - // We try to find if the next byte is part of a search pattern - for ($j = 0; $j <= $this->_treeMaxLen; ++$j) { - // We have a new byte for a search pattern - if (isset ($buffer [$p = $i + $j]) && isset($search_pos[$buffer[$p]])) { - $search_pos = $search_pos[$buffer[$p]]; - // We have a complete pattern, save, in case we don't find a better match later - if (isset($search_pos[- 1]) && $search_pos[-1] < $last_found - && $search_pos[-1] > $_minReplaces) - { - $last_found = $search_pos[-1]; - $last_size = $search_pos[-2]; - } - } - // We got a complete pattern - elseif ($last_found !== PHP_INT_MAX) { - // Adding replacement datas to output buffer - $rep_size = $this->_repSize[$last_found]; - for ($j = 0; $j < $rep_size; ++$j) { - $newBuffer[] = $this->_replace[$last_found][$j]; - } - // We Move cursor forward - $i += $last_size - 1; - // Edge Case, last position in buffer - if ($i >= $buf_size) { - $newBuffer[] = $buffer[$i]; - } - - // We start the next loop - continue 2; - } else { - // this byte is not in a pattern and we haven't found another pattern - break; - } - } - // Normal byte, move it to output buffer - $newBuffer[] = $buffer[$i]; - } - - return $newBuffer; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php deleted file mode 100644 index ca7454ee..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php +++ /dev/null @@ -1,67 +0,0 @@ -_search = $search; - $this->_replace = $replace; - } - - /** - * Returns true if based on the buffer passed more bytes should be buffered. - * - * @param string $buffer - * - * @return boolean - */ - public function shouldBuffer($buffer) - { - $endOfBuffer = substr($buffer, -1); - foreach ((array) $this->_search as $needle) { - if (false !== strpos($needle, $endOfBuffer)) { - return true; - } - } - - return false; - } - - /** - * Perform the actual replacements on $buffer and return the result. - * - * @param string $buffer - * - * @return string - */ - public function filter($buffer) - { - return str_replace($this->_search, $this->_replace, $buffer); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php deleted file mode 100644 index bb4af778..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php +++ /dev/null @@ -1,46 +0,0 @@ -_filters[$search][$replace])) { - if (!isset($this->_filters[$search])) { - $this->_filters[$search] = array(); - } - - if (!isset($this->_filters[$search][$replace])) { - $this->_filters[$search][$replace] = array(); - } - - $this->_filters[$search][$replace] = new Swift_StreamFilters_StringReplacementFilter($search, $replace); - } - - return $this->_filters[$search][$replace]; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php deleted file mode 100644 index f3bcbed9..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php +++ /dev/null @@ -1,28 +0,0 @@ -_eventDispatcher = $dispatcher; - $this->_buffer = $buf; - $this->_lookupHostname(); - } - - /** - * Set the name of the local domain which Swift will identify itself as. - * - * This should be a fully-qualified domain name and should be truly the domain - * you're using. - * - * If your server doesn't have a domain name, use the IP in square - * brackets (i.e. [127.0.0.1]). - * - * @param string $domain - * - * @return Swift_Transport_AbstractSmtpTransport - */ - public function setLocalDomain($domain) - { - $this->_domain = $domain; - - return $this; - } - - /** - * Get the name of the domain Swift will identify as. - * - * @return string - */ - public function getLocalDomain() - { - return $this->_domain; - } - - /** - * Sets the source IP. - * - * @param string $source - */ - public function setSourceIp($source) - { - $this->_sourceIp=$source; - } - - /** - * Returns the IP used to connect to the destination - * - * @return string - */ - public function getSourceIp() - { - return $this->_sourceIp; - } - - /** - * Start the SMTP connection. - */ - public function start() - { - if (!$this->_started) { - if ($evt = $this->_eventDispatcher->createTransportChangeEvent($this)) { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeTransportStarted'); - if ($evt->bubbleCancelled()) { - return; - } - } - - try { - $this->_buffer->initialize($this->_getBufferParams()); - } catch (Swift_TransportException $e) { - $this->_throwException($e); - } - $this->_readGreeting(); - $this->_doHeloCommand(); - - if ($evt) { - $this->_eventDispatcher->dispatchEvent($evt, 'transportStarted'); - } - - $this->_started = true; - } - } - - /** - * Test if an SMTP connection has been established. - * - * @return boolean - */ - public function isStarted() - { - return $this->_started; - } - - /** - * Send the given Message. - * - * Recipient/sender data will be retrieved from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * - * @param Swift_Mime_Message $message - * @param string[] $failedRecipients An array of failures by-reference - * - * @return int - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $sent = 0; - $failedRecipients = (array) $failedRecipients; - - if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); - if ($evt->bubbleCancelled()) { - return 0; - } - } - - if (!$reversePath = $this->_getReversePath($message)) { - throw new Swift_TransportException( - 'Cannot send message without a sender address' - ); - } - - $to = (array) $message->getTo(); - $cc = (array) $message->getCc(); - $bcc = (array) $message->getBcc(); - - $message->setBcc(array()); - - try { - $sent += $this->_sendTo($message, $reversePath, $to, $failedRecipients); - $sent += $this->_sendCc($message, $reversePath, $cc, $failedRecipients); - $sent += $this->_sendBcc($message, $reversePath, $bcc, $failedRecipients); - } catch (Exception $e) { - $message->setBcc($bcc); - throw $e; - } - - $message->setBcc($bcc); - - if ($evt) { - if ($sent == count($to) + count($cc) + count($bcc)) { - $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); - } elseif ($sent > 0) { - $evt->setResult(Swift_Events_SendEvent::RESULT_TENTATIVE); - } else { - $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); - } - $evt->setFailedRecipients($failedRecipients); - $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - - $message->generateId(); //Make sure a new Message ID is used - - return $sent; - } - - /** - * Stop the SMTP connection. - */ - public function stop() - { - if ($this->_started) { - if ($evt = $this->_eventDispatcher->createTransportChangeEvent($this)) { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeTransportStopped'); - if ($evt->bubbleCancelled()) { - return; - } - } - - try { - $this->executeCommand("QUIT\r\n", array(221)); - } catch (Swift_TransportException $e) {} - - try { - $this->_buffer->terminate(); - - if ($evt) { - $this->_eventDispatcher->dispatchEvent($evt, 'transportStopped'); - } - } catch (Swift_TransportException $e) { - $this->_throwException($e); - } - } - $this->_started = false; - } - - /** - * Register a plugin. - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - $this->_eventDispatcher->bindEventListener($plugin); - } - - /** - * Reset the current mail transaction. - */ - public function reset() - { - $this->executeCommand("RSET\r\n", array(250)); - } - - /** - * Get the IoBuffer where read/writes are occurring. - * - * @return Swift_Transport_IoBuffer - */ - public function getBuffer() - { - return $this->_buffer; - } - - /** - * Run a command against the buffer, expecting the given response codes. - * - * If no response codes are given, the response will not be validated. - * If codes are given, an exception will be thrown on an invalid response. - * - * @param string $command - * @param int[] $codes - * @param string[] $failures An array of failures by-reference - * - * @return string - */ - public function executeCommand($command, $codes = array(), &$failures = null) - { - $failures = (array) $failures; - $seq = $this->_buffer->write($command); - $response = $this->_getFullResponse($seq); - if ($evt = $this->_eventDispatcher->createCommandEvent($this, $command, $codes)) { - $this->_eventDispatcher->dispatchEvent($evt, 'commandSent'); - } - $this->_assertResponseCode($response, $codes); - - return $response; - } - - // -- Protected methods - - /** Read the opening SMTP greeting */ - protected function _readGreeting() - { - $this->_assertResponseCode($this->_getFullResponse(0), array(220)); - } - - /** Send the HELO welcome */ - protected function _doHeloCommand() - { - $this->executeCommand( - sprintf("HELO %s\r\n", $this->_domain), array(250) - ); - } - - /** Send the MAIL FROM command */ - protected function _doMailFromCommand($address) - { - $this->executeCommand( - sprintf("MAIL FROM: <%s>\r\n", $address), array(250) - ); - } - - /** Send the RCPT TO command */ - protected function _doRcptToCommand($address) - { - $this->executeCommand( - sprintf("RCPT TO: <%s>\r\n", $address), array(250, 251, 252) - ); - } - - /** Send the DATA command */ - protected function _doDataCommand() - { - $this->executeCommand("DATA\r\n", array(354)); - } - - /** Stream the contents of the message over the buffer */ - protected function _streamMessage(Swift_Mime_Message $message) - { - $this->_buffer->setWriteTranslations(array("\r\n." => "\r\n..")); - try { - $message->toByteStream($this->_buffer); - $this->_buffer->flushBuffers(); - } catch (Swift_TransportException $e) { - $this->_throwException($e); - } - $this->_buffer->setWriteTranslations(array()); - $this->executeCommand("\r\n.\r\n", array(250)); - } - - /** Determine the best-use reverse path for this message */ - protected function _getReversePath(Swift_Mime_Message $message) - { - $return = $message->getReturnPath(); - $sender = $message->getSender(); - $from = $message->getFrom(); - $path = null; - if (!empty($return)) { - $path = $return; - } elseif (!empty($sender)) { - // Don't use array_keys - reset($sender); // Reset Pointer to first pos - $path = key($sender); // Get key - } elseif (!empty($from)) { - reset($from); // Reset Pointer to first pos - $path = key($from); // Get key - } - - return $path; - } - - /** Throw a TransportException, first sending it to any listeners */ - protected function _throwException(Swift_TransportException $e) - { - if ($evt = $this->_eventDispatcher->createTransportExceptionEvent($this, $e)) { - $this->_eventDispatcher->dispatchEvent($evt, 'exceptionThrown'); - if (!$evt->bubbleCancelled()) { - throw $e; - } - } else { - throw $e; - } - } - - /** Throws an Exception if a response code is incorrect */ - protected function _assertResponseCode($response, $wanted) - { - list($code) = sscanf($response, '%3d'); - $valid = (empty($wanted) || in_array($code, $wanted)); - - if ($evt = $this->_eventDispatcher->createResponseEvent($this, $response, - $valid)) - { - $this->_eventDispatcher->dispatchEvent($evt, 'responseReceived'); - } - - if (!$valid) { - $this->_throwException( - new Swift_TransportException( - 'Expected response code ' . implode('/', $wanted) . ' but got code ' . - '"' . $code . '", with message "' . $response . '"', - $code) - ); - } - } - - /** Get an entire multi-line response using its sequence number */ - protected function _getFullResponse($seq) - { - $response = ''; - try { - do { - $line = $this->_buffer->readLine($seq); - $response .= $line; - } while (null !== $line && false !== $line && ' ' != $line{3}); - } catch (Swift_TransportException $e) { - $this->_throwException($e); - } - - return $response; - } - - // -- Private methods - - /** Send an email to the given recipients from the given reverse path */ - private function _doMailTransaction($message, $reversePath, array $recipients, array &$failedRecipients) - { - $sent = 0; - $this->_doMailFromCommand($reversePath); - foreach ($recipients as $forwardPath) { - try { - $this->_doRcptToCommand($forwardPath); - $sent++; - } catch (Swift_TransportException $e) { - $failedRecipients[] = $forwardPath; - } - } - - if ($sent != 0) { - $this->_doDataCommand(); - $this->_streamMessage($message); - } else { - $this->reset(); - } - - return $sent; - } - - /** Send a message to the given To: recipients */ - private function _sendTo(Swift_Mime_Message $message, $reversePath, array $to, array &$failedRecipients) - { - if (empty($to)) { - return 0; - } - - return $this->_doMailTransaction($message, $reversePath, array_keys($to), - $failedRecipients); - } - - /** Send a message to the given Cc: recipients */ - private function _sendCc(Swift_Mime_Message $message, $reversePath, array $cc, array &$failedRecipients) - { - if (empty($cc)) { - return 0; - } - - return $this->_doMailTransaction($message, $reversePath, array_keys($cc), - $failedRecipients); - } - - /** Send a message to all Bcc: recipients */ - private function _sendBcc(Swift_Mime_Message $message, $reversePath, array $bcc, array &$failedRecipients) - { - $sent = 0; - foreach ($bcc as $forwardPath => $name) { - $message->setBcc(array($forwardPath => $name)); - $sent += $this->_doMailTransaction( - $message, $reversePath, array($forwardPath), $failedRecipients - ); - } - - return $sent; - } - - /** Try to determine the hostname of the server this is run on */ - private function _lookupHostname() - { - if (!empty($_SERVER['SERVER_NAME']) - && $this->_isFqdn($_SERVER['SERVER_NAME'])) - { - $this->_domain = $_SERVER['SERVER_NAME']; - } elseif (!empty($_SERVER['SERVER_ADDR'])) { - $this->_domain = sprintf('[%s]', $_SERVER['SERVER_ADDR']); - } - } - - /** Determine is the $hostname is a fully-qualified name */ - private function _isFqdn($hostname) - { - //We could do a really thorough check, but there's really no point - if (false !== $dotPos = strpos($hostname, '.')) { - return ($dotPos > 0) && ($dotPos != strlen($hostname) - 1); - } else { - return false; - } - } - - /** - * Destructor. - */ - public function __destruct() - { - $this->stop(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php deleted file mode 100644 index 80b47127..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php +++ /dev/null @@ -1,83 +0,0 @@ -executeCommand("AUTH CRAM-MD5\r\n", array(334)); - $challenge = base64_decode(substr($challenge, 4)); - $message = base64_encode( - $username . ' ' . $this->_getResponse($password, $challenge) - ); - $agent->executeCommand(sprintf("%s\r\n", $message), array(235)); - - return true; - } catch (Swift_TransportException $e) { - $agent->executeCommand("RSET\r\n", array(250)); - - return false; - } - } - - /** - * Generate a CRAM-MD5 response from a server challenge. - * - * @param string $secret - * @param string $challenge - * - * @return string - */ - private function _getResponse($secret, $challenge) - { - if (strlen($secret) > 64) { - $secret = pack('H32', md5($secret)); - } - - if (strlen($secret) < 64) { - $secret = str_pad($secret, 64, chr(0)); - } - - $k_ipad = substr($secret, 0, 64) ^ str_repeat(chr(0x36), 64); - $k_opad = substr($secret, 0, 64) ^ str_repeat(chr(0x5C), 64); - - $inner = pack('H32', md5($k_ipad . $challenge)); - $digest = md5($k_opad . $inner); - - return $digest; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php deleted file mode 100644 index deca3a5d..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php +++ /dev/null @@ -1,53 +0,0 @@ -executeCommand("AUTH LOGIN\r\n", array(334)); - $agent->executeCommand(sprintf("%s\r\n", base64_encode($username)), array(334)); - $agent->executeCommand(sprintf("%s\r\n", base64_encode($password)), array(235)); - - return true; - } catch (Swift_TransportException $e) { - $agent->executeCommand("RSET\r\n", array(250)); - - return false; - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php deleted file mode 100644 index ffa9af3d..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php +++ /dev/null @@ -1,52 +0,0 @@ -executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), array(235)); - - return true; - } catch (Swift_TransportException $e) { - $agent->executeCommand("RSET\r\n", array(250)); - - return false; - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php deleted file mode 100644 index 40b0908c..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php +++ /dev/null @@ -1,268 +0,0 @@ -setAuthenticators($authenticators); - } - - /** - * Set the Authenticators which can process a login request. - * - * @param Swift_Transport_Esmtp_Authenticator[] $authenticators - */ - public function setAuthenticators(array $authenticators) - { - $this->_authenticators = $authenticators; - } - - /** - * Get the Authenticators which can process a login request. - * - * @return Swift_Transport_Esmtp_Authenticator[] - */ - public function getAuthenticators() - { - return $this->_authenticators; - } - - /** - * Set the username to authenticate with. - * - * @param string $username - */ - public function setUsername($username) - { - $this->_username = $username; - } - - /** - * Get the username to authenticate with. - * - * @return string - */ - public function getUsername() - { - return $this->_username; - } - - /** - * Set the password to authenticate with. - * - * @param string $password - */ - public function setPassword($password) - { - $this->_password = $password; - } - - /** - * Get the password to authenticate with. - * - * @return string - */ - public function getPassword() - { - return $this->_password; - } - - /** - * Set the auth mode to use to authenticate. - * - * @param string $mode - */ - public function setAuthMode($mode) - { - $this->_auth_mode = $mode; - } - - /** - * Get the auth mode to use to authenticate. - * - * @return string - */ - public function getAuthMode() - { - return $this->_auth_mode; - } - - /** - * Get the name of the ESMTP extension this handles. - * - * @return boolean - */ - public function getHandledKeyword() - { - return 'AUTH'; - } - - /** - * Set the parameters which the EHLO greeting indicated. - * - * @param string[] $parameters - */ - public function setKeywordParams(array $parameters) - { - $this->_esmtpParams = $parameters; - } - - /** - * Runs immediately after a EHLO has been issued. - * - * @param Swift_Transport_SmtpAgent $agent to read/write - */ - public function afterEhlo(Swift_Transport_SmtpAgent $agent) - { - if ($this->_username) { - $count = 0; - foreach ($this->_getAuthenticatorsForAgent() as $authenticator) { - if (in_array(strtolower($authenticator->getAuthKeyword()), - array_map('strtolower', $this->_esmtpParams))) - { - $count++; - if ($authenticator->authenticate($agent, $this->_username, $this->_password)) { - return; - } - } - } - throw new Swift_TransportException( - 'Failed to authenticate on SMTP server with username "' . - $this->_username . '" using ' . $count . ' possible authenticators' - ); - } - } - - /** - * Not used. - */ - public function getMailParams() - { - return array(); - } - - /** - * Not used. - */ - public function getRcptParams() - { - return array(); - } - - /** - * Not used. - */ - public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = array(), &$failedRecipients = null, &$stop = false) - { - } - - /** - * Returns +1, -1 or 0 according to the rules for usort(). - * - * This method is called to ensure extensions can be execute in an appropriate order. - * - * @param string $esmtpKeyword to compare with - * - * @return int - */ - public function getPriorityOver($esmtpKeyword) - { - return 0; - } - - /** - * Returns an array of method names which are exposed to the Esmtp class. - * - * @return string[] - */ - public function exposeMixinMethods() - { - return array('setUsername', 'getUsername', 'setPassword', 'getPassword', 'setAuthMode', 'getAuthMode'); - } - - /** - * Not used. - */ - public function resetState() - { - } - - // -- Protected methods - - /** - * Returns the authenticator list for the given agent. - * - * @param Swift_Transport_SmtpAgent $agent - * - * @return array - */ - protected function _getAuthenticatorsForAgent() - { - if (!$mode = strtolower($this->_auth_mode)) { - return $this->_authenticators; - } - - foreach ($this->_authenticators as $authenticator) { - if (strtolower($authenticator->getAuthKeyword()) == $mode) { - return array($authenticator); - } - } - - throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php deleted file mode 100644 index 0c6dc2e4..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php +++ /dev/null @@ -1,37 +0,0 @@ -. - * - * @return string[] - */ - public function getMailParams(); - - /** - * Get params which are appended to RCPT TO:<>. - * - * @return string[] - */ - public function getRcptParams(); - - /** - * Runs when a command is due to be sent. - * - * @param Swift_Transport_SmtpAgent $agent to read/write - * @param string $command to send - * @param int[] $codes expected in response - * @param string[] $failedRecipients to collect failures - * @param boolean $stop to be set true by-reference if the command is now sent - */ - public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = array(), &$failedRecipients = null, &$stop = false); - - /** - * Returns +1, -1 or 0 according to the rules for usort(). - * - * This method is called to ensure extensions can be execute in an appropriate order. - * - * @param string $esmtpKeyword to compare with - * - * @return int - */ - public function getPriorityOver($esmtpKeyword); - - /** - * Returns an array of method names which are exposed to the Esmtp class. - * - * @return string[] - */ - public function exposeMixinMethods(); - - /** - * Tells this handler to clear any buffers and reset its state. - */ - public function resetState(); -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php deleted file mode 100644 index 19e2d770..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php +++ /dev/null @@ -1,393 +0,0 @@ - 'tcp', - 'host' => 'localhost', - 'port' => 25, - 'timeout' => 30, - 'blocking' => 1, - 'tls' => false, - 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET - ); - - /** - * Creates a new EsmtpTransport using the given I/O buffer. - * - * @param Swift_Transport_IoBuffer $buf - * @param Swift_Transport_EsmtpHandler[] $extensionHandlers - * @param Swift_Events_EventDispatcher $dispatcher - */ - public function __construct(Swift_Transport_IoBuffer $buf, array $extensionHandlers, Swift_Events_EventDispatcher $dispatcher) - { - parent::__construct($buf, $dispatcher); - $this->setExtensionHandlers($extensionHandlers); - } - - /** - * Set the host to connect to. - * - * @param string $host - * - * @return Swift_Transport_EsmtpTransport - */ - public function setHost($host) - { - $this->_params['host'] = $host; - - return $this; - } - - /** - * Get the host to connect to. - * - * @return string - */ - public function getHost() - { - return $this->_params['host']; - } - - /** - * Set the port to connect to. - * - * @param integer $port - * - * @return Swift_Transport_EsmtpTransport - */ - public function setPort($port) - { - $this->_params['port'] = (int) $port; - - return $this; - } - - /** - * Get the port to connect to. - * - * @return int - */ - public function getPort() - { - return $this->_params['port']; - } - - /** - * Set the connection timeout. - * - * @param integer $timeout seconds - * - * @return Swift_Transport_EsmtpTransport - */ - public function setTimeout($timeout) - { - $this->_params['timeout'] = (int) $timeout; - $this->_buffer->setParam('timeout', (int) $timeout); - - return $this; - } - - /** - * Get the connection timeout. - * - * @return int - */ - public function getTimeout() - { - return $this->_params['timeout']; - } - - /** - * Set the encryption type (tls or ssl) - * - * @param string $encryption - * - * @return Swift_Transport_EsmtpTransport - */ - public function setEncryption($encryption) - { - if ('tls' == $encryption) { - $this->_params['protocol'] = 'tcp'; - $this->_params['tls'] = true; - } else { - $this->_params['protocol'] = $encryption; - $this->_params['tls'] = false; - } - - return $this; - } - - /** - * Get the encryption type. - * - * @return string - */ - public function getEncryption() - { - return $this->_params['tls'] ? 'tls' : $this->_params['protocol']; - } - - /** - * Sets the source IP. - * - * @param string $source - * - * @return Swift_Transport_EsmtpTransport - */ - public function setSourceIp($source) - { - $this->_params['sourceIp']=$source; - - return $this; - } - - /** - * Returns the IP used to connect to the destination. - * - * @return string - */ - public function getSourceIp() - { - return $this->_params['sourceIp']; - } - - /** - * Set ESMTP extension handlers. - * - * @param Swift_Transport_EsmtpHandler[] $handlers - * - * @return Swift_Transport_EsmtpTransport - */ - public function setExtensionHandlers(array $handlers) - { - $assoc = array(); - foreach ($handlers as $handler) { - $assoc[$handler->getHandledKeyword()] = $handler; - } - uasort($assoc, array($this, '_sortHandlers')); - $this->_handlers = $assoc; - $this->_setHandlerParams(); - - return $this; - } - - /** - * Get ESMTP extension handlers. - * - * @return Swift_Transport_EsmtpHandler[] - */ - public function getExtensionHandlers() - { - return array_values($this->_handlers); - } - - /** - * Run a command against the buffer, expecting the given response codes. - * - * If no response codes are given, the response will not be validated. - * If codes are given, an exception will be thrown on an invalid response. - * - * @param string $command - * @param int[] $codes - * @param string[] $failures An array of failures by-reference - * - * @return string - */ - public function executeCommand($command, $codes = array(), &$failures = null) - { - $failures = (array) $failures; - $stopSignal = false; - $response = null; - foreach ($this->_getActiveHandlers() as $handler) { - $response = $handler->onCommand( - $this, $command, $codes, $failures, $stopSignal - ); - if ($stopSignal) { - return $response; - } - } - - return parent::executeCommand($command, $codes, $failures); - } - - // -- Mixin invocation code - - /** Mixin handling method for ESMTP handlers */ - public function __call($method, $args) - { - foreach ($this->_handlers as $handler) { - if (in_array(strtolower($method), - array_map('strtolower', (array) $handler->exposeMixinMethods()) - )) - { - $return = call_user_func_array(array($handler, $method), $args); - //Allow fluid method calls - if (is_null($return) && substr($method, 0, 3) == 'set') { - return $this; - } else { - return $return; - } - } - } - trigger_error('Call to undefined method ' . $method, E_USER_ERROR); - } - - // -- Protected methods - - /** Get the params to initialize the buffer */ - protected function _getBufferParams() - { - return $this->_params; - } - - /** Overridden to perform EHLO instead */ - protected function _doHeloCommand() - { - try { - $response = $this->executeCommand( - sprintf("EHLO %s\r\n", $this->_domain), array(250) - ); - } catch (Swift_TransportException $e) { - return parent::_doHeloCommand(); - } - - if ($this->_params['tls']) { - try { - $this->executeCommand("STARTTLS\r\n", array(220)); - - if (!$this->_buffer->startTLS()) { - throw new Swift_TransportException('Unable to connect with TLS encryption'); - } - - try { - $response = $this->executeCommand( - sprintf("EHLO %s\r\n", $this->_domain), array(250) - ); - } catch (Swift_TransportException $e) { - return parent::_doHeloCommand(); - } - } catch (Swift_TransportException $e) { - $this->_throwException($e); - } - } - - $this->_capabilities = $this->_getCapabilities($response); - $this->_setHandlerParams(); - foreach ($this->_getActiveHandlers() as $handler) { - $handler->afterEhlo($this); - } - } - - /** Overridden to add Extension support */ - protected function _doMailFromCommand($address) - { - $handlers = $this->_getActiveHandlers(); - $params = array(); - foreach ($handlers as $handler) { - $params = array_merge($params, (array) $handler->getMailParams()); - } - $paramStr = !empty($params) ? ' ' . implode(' ', $params) : ''; - $this->executeCommand( - sprintf("MAIL FROM: <%s>%s\r\n", $address, $paramStr), array(250) - ); - } - - /** Overridden to add Extension support */ - protected function _doRcptToCommand($address) - { - $handlers = $this->_getActiveHandlers(); - $params = array(); - foreach ($handlers as $handler) { - $params = array_merge($params, (array) $handler->getRcptParams()); - } - $paramStr = !empty($params) ? ' ' . implode(' ', $params) : ''; - $this->executeCommand( - sprintf("RCPT TO: <%s>%s\r\n", $address, $paramStr), array(250, 251, 252) - ); - } - - // -- Private methods - - /** Determine ESMTP capabilities by function group */ - private function _getCapabilities($ehloResponse) - { - $capabilities = array(); - $ehloResponse = trim($ehloResponse); - $lines = explode("\r\n", $ehloResponse); - array_shift($lines); - foreach ($lines as $line) { - if (preg_match('/^[0-9]{3}[ -]([A-Z0-9-]+)((?:[ =].*)?)$/Di', $line, $matches)) { - $keyword = strtoupper($matches[1]); - $paramStr = strtoupper(ltrim($matches[2], ' =')); - $params = !empty($paramStr) ? explode(' ', $paramStr) : array(); - $capabilities[$keyword] = $params; - } - } - - return $capabilities; - } - - /** Set parameters which are used by each extension handler */ - private function _setHandlerParams() - { - foreach ($this->_handlers as $keyword => $handler) { - if (array_key_exists($keyword, $this->_capabilities)) { - $handler->setKeywordParams($this->_capabilities[$keyword]); - } - } - } - - /** Get ESMTP handlers which are currently ok to use */ - private function _getActiveHandlers() - { - $handlers = array(); - foreach ($this->_handlers as $keyword => $handler) { - if (array_key_exists($keyword, $this->_capabilities)) { - $handlers[] = $handler; - } - } - - return $handlers; - } - - /** Custom sort for extension handler ordering */ - private function _sortHandlers($a, $b) - { - return $a->getPriorityOver($b->getHandledKeyword()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php deleted file mode 100644 index d0d3f69b..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php +++ /dev/null @@ -1,90 +0,0 @@ -_transports); - $sent = 0; - - for ($i = 0; $i < $maxTransports - && $transport = $this->_getNextTransport(); ++$i) - { - try { - if (!$transport->isStarted()) { - $transport->start(); - } - - return $transport->send($message, $failedRecipients); - } catch (Swift_TransportException $e) { - $this->_killCurrentTransport(); - } - } - - if (count($this->_transports) == 0) { - throw new Swift_TransportException( - 'All Transports in FailoverTransport failed, or no Transports available' - ); - } - - return $sent; - } - - // -- Protected methods - - protected function _getNextTransport() - { - if (!isset($this->_currentTransport)) { - $this->_currentTransport = parent::_getNextTransport(); - } - - return $this->_currentTransport; - } - - protected function _killCurrentTransport() - { - $this->_currentTransport = null; - parent::_killCurrentTransport(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php deleted file mode 100644 index 7559ebfd..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php +++ /dev/null @@ -1,69 +0,0 @@ -_transports = $transports; - $this->_deadTransports = array(); - } - - /** - * Get $transports to delegate to. - * - * @return Swift_Transport[] - */ - public function getTransports() - { - return array_merge($this->_transports, $this->_deadTransports); - } - - /** - * Test if this Transport mechanism has started. - * - * @return boolean - */ - public function isStarted() - { - return count($this->_transports) > 0; - } - - /** - * Start this Transport mechanism. - */ - public function start() - { - $this->_transports = array_merge($this->_transports, $this->_deadTransports); - } - - /** - * Stop this Transport mechanism. - */ - public function stop() - { - foreach ($this->_transports as $transport) { - $transport->stop(); - } - } - - /** - * Send the given Message. - * - * Recipient/sender data will be retrieved from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * - * @param Swift_Mime_Message $message - * @param string[] $failedRecipients An array of failures by-reference - * - * @return int - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $maxTransports = count($this->_transports); - $sent = 0; - - for ($i = 0; $i < $maxTransports - && $transport = $this->_getNextTransport(); ++$i) - { - try { - if (!$transport->isStarted()) { - $transport->start(); - } - if ($sent = $transport->send($message, $failedRecipients)) { - break; - } - } catch (Swift_TransportException $e) { - $this->_killCurrentTransport(); - } - } - - if (count($this->_transports) == 0) { - throw new Swift_TransportException( - 'All Transports in LoadBalancedTransport failed, or no Transports available' - ); - } - - return $sent; - } - - /** - * Register a plugin. - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - foreach ($this->_transports as $transport) { - $transport->registerPlugin($plugin); - } - } - - // -- Protected methods - - /** - * Rotates the transport list around and returns the first instance. - * - * @return Swift_Transport - */ - protected function _getNextTransport() - { - if ($next = array_shift($this->_transports)) { - $this->_transports[] = $next; - } - - return $next; - } - - /** - * Tag the currently used (top of stack) transport as dead/useless. - */ - protected function _killCurrentTransport() - { - if ($transport = array_pop($this->_transports)) { - try { - $transport->stop(); - } catch (Exception $e) { - } - $this->_deadTransports[] = $transport; - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php deleted file mode 100644 index a9bff690..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php +++ /dev/null @@ -1,34 +0,0 @@ -_invoker = $invoker; - $this->_eventDispatcher = $eventDispatcher; - } - - /** - * Not used. - */ - public function isStarted() - { - return false; - } - - /** - * Not used. - */ - public function start() - { - } - - /** - * Not used. - */ - public function stop() - { - } - - /** - * Set the additional parameters used on the mail() function. - * - * This string is formatted for sprintf() where %s is the sender address. - * - * @param string $params - * - * @return Swift_Transport_MailTransport - */ - public function setExtraParams($params) - { - $this->_extraParams = $params; - - return $this; - } - - /** - * Get the additional parameters used on the mail() function. - * - * This string is formatted for sprintf() where %s is the sender address. - * - * @return string - */ - public function getExtraParams() - { - return $this->_extraParams; - } - - /** - * Send the given Message. - * - * Recipient/sender data will be retrieved from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * - * @param Swift_Mime_Message $message - * @param string[] $failedRecipients An array of failures by-reference - * - * @return int - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $failedRecipients = (array) $failedRecipients; - - if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); - if ($evt->bubbleCancelled()) { - return 0; - } - } - - $count = ( - count((array) $message->getTo()) - + count((array) $message->getCc()) - + count((array) $message->getBcc()) - ); - - $toHeader = $message->getHeaders()->get('To'); - $subjectHeader = $message->getHeaders()->get('Subject'); - - if (!$toHeader) { - throw new Swift_TransportException( - 'Cannot send message without a recipient' - ); - } - $to = $toHeader->getFieldBody(); - $subject = $subjectHeader ? $subjectHeader->getFieldBody() : ''; - - $reversePath = $this->_getReversePath($message); - - //Remove headers that would otherwise be duplicated - $message->getHeaders()->remove('To'); - $message->getHeaders()->remove('Subject'); - - $messageStr = $message->toString(); - - $message->getHeaders()->set($toHeader); - $message->getHeaders()->set($subjectHeader); - - //Separate headers from body - if (false !== $endHeaders = strpos($messageStr, "\r\n\r\n")) { - $headers = substr($messageStr, 0, $endHeaders) . "\r\n"; //Keep last EOL - $body = substr($messageStr, $endHeaders + 4); - } else { - $headers = $messageStr . "\r\n"; - $body = ''; - } - - unset($messageStr); - - if ("\r\n" != PHP_EOL) { - //Non-windows (not using SMTP) - $headers = str_replace("\r\n", PHP_EOL, $headers); - $body = str_replace("\r\n", PHP_EOL, $body); - } else { - //Windows, using SMTP - $headers = str_replace("\r\n.", "\r\n..", $headers); - $body = str_replace("\r\n.", "\r\n..", $body); - } - - if ($this->_invoker->mail($to, $subject, $body, $headers, - sprintf($this->_extraParams, $reversePath))) - { - if ($evt) { - $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); - $evt->setFailedRecipients($failedRecipients); - $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - } else { - $failedRecipients = array_merge( - $failedRecipients, - array_keys((array) $message->getTo()), - array_keys((array) $message->getCc()), - array_keys((array) $message->getBcc()) - ); - - if ($evt) { - $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); - $evt->setFailedRecipients($failedRecipients); - $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - - $message->generateId(); - - $count = 0; - } - - return $count; - } - - /** - * Register a plugin. - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - $this->_eventDispatcher->bindEventListener($plugin); - } - - // -- Private methods - - /** Determine the best-use reverse path for this message */ - private function _getReversePath(Swift_Mime_Message $message) - { - $return = $message->getReturnPath(); - $sender = $message->getSender(); - $from = $message->getFrom(); - $path = null; - if (!empty($return)) { - $path = $return; - } elseif (!empty($sender)) { - $keys = array_keys($sender); - $path = array_shift($keys); - } elseif (!empty($from)) { - $keys = array_keys($from); - $path = array_shift($keys); - } - - return $path; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php deleted file mode 100644 index ce136d3c..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Pretends messages have been sent, but just ignores them. - * - * @package Swift - * @author Fabien Potencier - */ -class Swift_Transport_NullTransport implements Swift_Transport -{ - /** The event dispatcher from the plugin API */ - private $_eventDispatcher; - - /** - * Constructor. - */ - public function __construct(Swift_Events_EventDispatcher $eventDispatcher) - { - $this->_eventDispatcher = $eventDispatcher; - } - - /** - * Tests if this Transport mechanism has started. - * - * @return boolean - */ - public function isStarted() - { - return true; - } - - /** - * Starts this Transport mechanism. - */ - public function start() - { - } - - /** - * Stops this Transport mechanism. - */ - public function stop() - { - } - - /** - * Sends the given message. - * - * @param Swift_Mime_Message $message - * @param string[] $failedRecipients An array of failures by-reference - * - * @return integer The number of sent emails - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); - if ($evt->bubbleCancelled()) { - return 0; - } - } - - if ($evt) { - $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); - $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - - return 0; - } - - /** - * Register a plugin. - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - $this->_eventDispatcher->bindEventListener($plugin); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php deleted file mode 100644 index 95c2e4a0..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php +++ /dev/null @@ -1,163 +0,0 @@ - 30, - 'blocking' => 1, - 'command' => '/usr/sbin/sendmail -bs', - 'type' => Swift_Transport_IoBuffer::TYPE_PROCESS - ); - - /** - * Create a new SendmailTransport with $buf for I/O. - * - * @param Swift_Transport_IoBuffer $buf - * @param Swift_Events_EventDispatcher $dispatcher - */ - public function __construct(Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher) - { - parent::__construct($buf, $dispatcher); - } - - /** - * Start the standalone SMTP session if running in -bs mode. - */ - public function start() - { - if (false !== strpos($this->getCommand(), ' -bs')) { - parent::start(); - } - } - - /** - * Set the command to invoke. - * - * If using -t mode you are strongly advised to include -oi or -i in the flags. - * For example: /usr/sbin/sendmail -oi -t - * Swift will append a -f flag if one is not present. - * - * The recommended mode is "-bs" since it is interactive and failure notifications - * are hence possible. - * - * @param string $command - * - * @return Swift_Transport_SendmailTransport - */ - public function setCommand($command) - { - $this->_params['command'] = $command; - - return $this; - } - - /** - * Get the sendmail command which will be invoked. - * - * @return string - */ - public function getCommand() - { - return $this->_params['command']; - } - - /** - * Send the given Message. - * - * Recipient/sender data will be retrieved from the Message API. - * - * The return value is the number of recipients who were accepted for delivery. - * NOTE: If using 'sendmail -t' you will not be aware of any failures until - * they bounce (i.e. send() will always return 100% success). - * - * @param Swift_Mime_Message $message - * @param string[] $failedRecipients An array of failures by-reference - * - * @return int - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $failedRecipients = (array) $failedRecipients; - $command = $this->getCommand(); - $buffer = $this->getBuffer(); - - if (false !== strpos($command, ' -t')) { - if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); - if ($evt->bubbleCancelled()) { - return 0; - } - } - - if (false === strpos($command, ' -f')) { - $command .= ' -f' . $this->_getReversePath($message); - } - - $buffer->initialize(array_merge($this->_params, array('command' => $command))); - - if (false === strpos($command, ' -i') && false === strpos($command, ' -oi')) { - $buffer->setWriteTranslations(array("\r\n" => "\n", "\n." => "\n..")); - } else { - $buffer->setWriteTranslations(array("\r\n"=>"\n")); - } - - $count = count((array) $message->getTo()) - + count((array) $message->getCc()) - + count((array) $message->getBcc()) - ; - $message->toByteStream($buffer); - $buffer->flushBuffers(); - $buffer->setWriteTranslations(array()); - $buffer->terminate(); - - if ($evt) { - $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); - $evt->setFailedRecipients($failedRecipients); - $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - - $message->generateId(); - } elseif (false !== strpos($command, ' -bs')) { - $count = parent::send($message, $failedRecipients); - } else { - $this->_throwException(new Swift_TransportException( - 'Unsupported sendmail command flags [' . $command . ']. ' . - 'Must be one of "-bs" or "-t" but can include additional flags.' - )); - } - - return $count; - } - - // -- Protected methods - - /** Get the params to initialize the buffer */ - protected function _getBufferParams() - { - return $this->_params; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php deleted file mode 100644 index 91157e5e..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Stores Messages in a queue. - * - * @package Swift - * @author Fabien Potencier - */ -class Swift_Transport_SpoolTransport implements Swift_Transport -{ - /** The spool instance */ - private $_spool; - - /** The event dispatcher from the plugin API */ - private $_eventDispatcher; - - /** - * Constructor. - */ - public function __construct(Swift_Events_EventDispatcher $eventDispatcher, Swift_Spool $spool = null) - { - $this->_eventDispatcher = $eventDispatcher; - $this->_spool = $spool; - } - - /** - * Sets the spool object. - * - * @param Swift_Spool $spool - * - * @return Swift_Transport_SpoolTransport - */ - public function setSpool(Swift_Spool $spool) - { - $this->_spool = $spool; - - return $this; - } - - /** - * Get the spool object. - * - * @return Swift_Spool - */ - public function getSpool() - { - return $this->_spool; - } - - /** - * Tests if this Transport mechanism has started. - * - * @return boolean - */ - public function isStarted() - { - return true; - } - - /** - * Starts this Transport mechanism. - */ - public function start() - { - } - - /** - * Stops this Transport mechanism. - */ - public function stop() - { - } - - /** - * Sends the given message. - * - * @param Swift_Mime_Message $message - * @param string[] $failedRecipients An array of failures by-reference - * - * @return integer The number of sent e-mail's - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); - if ($evt->bubbleCancelled()) { - return 0; - } - } - - $success = $this->_spool->queueMessage($message); - - if ($evt) { - $evt->setResult($success ? Swift_Events_SendEvent::RESULT_SUCCESS : Swift_Events_SendEvent::RESULT_FAILED); - $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - - return 1; - } - - /** - * Register a plugin. - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - $this->_eventDispatcher->bindEventListener($plugin); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php deleted file mode 100644 index c42ee00a..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php +++ /dev/null @@ -1,315 +0,0 @@ -_replacementFactory = $replacementFactory; - } - - /** - * Perform any initialization needed, using the given $params. - * - * Parameters will vary depending upon the type of IoBuffer used. - * - * @param array $params - */ - public function initialize(array $params) - { - $this->_params = $params; - switch ($params['type']) { - case self::TYPE_PROCESS: - $this->_establishProcessConnection(); - break; - case self::TYPE_SOCKET: - default: - $this->_establishSocketConnection(); - break; - } - } - - /** - * Set an individual param on the buffer (e.g. switching to SSL). - * - * @param string $param - * @param mixed $value - */ - public function setParam($param, $value) - { - if (isset($this->_stream)) { - switch ($param) { - case 'timeout': - if ($this->_stream) { - stream_set_timeout($this->_stream, $value); - } - break; - - case 'blocking': - if ($this->_stream) { - stream_set_blocking($this->_stream, 1); - } - - } - } - $this->_params[$param] = $value; - } - - public function startTLS() - { - return stream_socket_enable_crypto($this->_stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT); - } - - /** - * Perform any shutdown logic needed. - */ - public function terminate() - { - if (isset($this->_stream)) { - switch ($this->_params['type']) { - case self::TYPE_PROCESS: - fclose($this->_in); - fclose($this->_out); - proc_close($this->_stream); - break; - case self::TYPE_SOCKET: - default: - fclose($this->_stream); - break; - } - } - $this->_stream = null; - $this->_out = null; - $this->_in = null; - } - - /** - * Set an array of string replacements which should be made on data written - * to the buffer. - * - * This could replace LF with CRLF for example. - * - * @param string[] $replacements - */ - public function setWriteTranslations(array $replacements) - { - foreach ($this->_translations as $search => $replace) { - if (!isset($replacements[$search])) { - $this->removeFilter($search); - unset($this->_translations[$search]); - } - } - - foreach ($replacements as $search => $replace) { - if (!isset($this->_translations[$search])) { - $this->addFilter( - $this->_replacementFactory->createFilter($search, $replace), $search - ); - $this->_translations[$search] = true; - } - } - } - - /** - * Get a line of output (including any CRLF). - * - * The $sequence number comes from any writes and may or may not be used - * depending upon the implementation. - * - * @param integer $sequence of last write to scan from - * - * @return string - * - * @throws Swift_IoException - */ - public function readLine($sequence) - { - if (isset($this->_out) && !feof($this->_out)) { - $line = fgets($this->_out); - if (strlen($line)==0) { - $metas = stream_get_meta_data($this->_out); - if ($metas['timed_out']) { - throw new Swift_IoException( - 'Connection to ' . - $this->_getReadConnectionDescription() . - ' Timed Out' - ); - } - } - - return $line; - } - } - - /** - * Reads $length bytes from the stream into a string and moves the pointer - * through the stream by $length. - * - * If less bytes exist than are requested the remaining bytes are given instead. - * If no bytes are remaining at all, boolean false is returned. - * - * @param integer $length - * - * @return string|boolean - * - * @throws Swift_IoException - */ - public function read($length) - { - if (isset($this->_out) && !feof($this->_out)) { - $ret = fread($this->_out, $length); - if (strlen($ret)==0) { - $metas = stream_get_meta_data($this->_out); - if ($metas['timed_out']) { - throw new Swift_IoException( - 'Connection to ' . - $this->_getReadConnectionDescription() . - ' Timed Out' - ); - } - } - - return $ret; - } - } - - /** Not implemented */ - public function setReadPointer($byteOffset) - { - } - - // -- Protected methods - - /** Flush the stream contents */ - protected function _flush() - { - if (isset($this->_in)) { - fflush($this->_in); - } - } - - /** Write this bytes to the stream */ - protected function _commit($bytes) - { - if (isset($this->_in) - && fwrite($this->_in, $bytes)) - { - return ++$this->_sequence; - } - } - - // -- Private methods - - /** - * Establishes a connection to a remote server. - */ - private function _establishSocketConnection() - { - $host = $this->_params['host']; - if (!empty($this->_params['protocol'])) { - $host = $this->_params['protocol'] . '://' . $host; - } - $timeout = 15; - if (!empty($this->_params['timeout'])) { - $timeout = $this->_params['timeout']; - } - $options = array(); - if (!empty($this->_params['sourceIp'])) { - $options['socket']['bindto']=$this->_params['sourceIp'].':0'; - } - $this->_stream = @stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, stream_context_create($options)); - if (false === $this->_stream) { - throw new Swift_TransportException( - 'Connection could not be established with host ' . $this->_params['host'] . - ' [' . $errstr . ' #' . $errno . ']' - ); - } - if (!empty($this->_params['blocking'])) { - stream_set_blocking($this->_stream, 1); - } else { - stream_set_blocking($this->_stream, 0); - } - stream_set_timeout($this->_stream, $timeout); - $this->_in =& $this->_stream; - $this->_out =& $this->_stream; - } - - /** - * Opens a process for input/output. - */ - private function _establishProcessConnection() - { - $command = $this->_params['command']; - $descriptorSpec = array( - 0 => array('pipe', 'r'), - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w') - ); - $this->_stream = proc_open($command, $descriptorSpec, $pipes); - stream_set_blocking($pipes[2], 0); - if ($err = stream_get_contents($pipes[2])) { - throw new Swift_TransportException( - 'Process could not be started [' . $err . ']' - ); - } - $this->_in =& $pipes[0]; - $this->_out =& $pipes[1]; - } - - private function _getReadConnectionDescription() - { - switch ($this->_params['type']) { - case self::TYPE_PROCESS: - return 'Process '.$this->_params['command']; - break; - - case self::TYPE_SOCKET: - default: - $host = $this->_params['host']; - if (!empty($this->_params['protocol'])) { - $host = $this->_params['protocol'] . '://' . $host; - } - $host.=':'.$this->_params['port']; - - return $host; - break; - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php deleted file mode 100644 index 48e41d16..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -class Swift_Validate -{ - /** - * Grammar Object - * - * @var Swift_Mime_Grammar - */ - private static $grammar = null; - - /** - * Checks if an e-mail address matches the current grammars. - * - * @param string $email - * - * @return boolean - */ - public static function email($email) - { - if (self::$grammar===null) { - self::$grammar = Swift_DependencyContainer::getInstance() - ->lookup('mime.grammar'); - } - - return preg_match( - '/^' . self::$grammar->getDefinition('addr-spec') . '$/D', - $email - ); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php deleted file mode 100644 index 6023448e..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php +++ /dev/null @@ -1,23 +0,0 @@ -register('cache') - ->asAliasOf('cache.array') - - ->register('tempdir') - ->asValue('/tmp') - - ->register('cache.null') - ->asSharedInstanceOf('Swift_KeyCache_NullKeyCache') - - ->register('cache.array') - ->asSharedInstanceOf('Swift_KeyCache_ArrayKeyCache') - ->withDependencies(array('cache.inputstream')) - - ->register('cache.disk') - ->asSharedInstanceOf('Swift_KeyCache_DiskKeyCache') - ->withDependencies(array('cache.inputstream', 'tempdir')) - - ->register('cache.inputstream') - ->asNewInstanceOf('Swift_KeyCache_SimpleKeyCacheInputStream') -; diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php deleted file mode 100644 index 64d69d21..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php +++ /dev/null @@ -1,9 +0,0 @@ -register('message.message') - ->asNewInstanceOf('Swift_Message') - - ->register('message.mimepart') - ->asNewInstanceOf('Swift_MimePart') -; diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php deleted file mode 100644 index a13472e9..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php +++ /dev/null @@ -1,123 +0,0 @@ -register('properties.charset') - ->asValue('utf-8') - - ->register('mime.grammar') - ->asSharedInstanceOf('Swift_Mime_Grammar') - - ->register('mime.message') - ->asNewInstanceOf('Swift_Mime_SimpleMessage') - ->withDependencies(array( - 'mime.headerset', - 'mime.qpcontentencoder', - 'cache', - 'mime.grammar', - 'properties.charset' - )) - - ->register('mime.part') - ->asNewInstanceOf('Swift_Mime_MimePart') - ->withDependencies(array( - 'mime.headerset', - 'mime.qpcontentencoder', - 'cache', - 'mime.grammar', - 'properties.charset' - )) - - ->register('mime.attachment') - ->asNewInstanceOf('Swift_Mime_Attachment') - ->withDependencies(array( - 'mime.headerset', - 'mime.base64contentencoder', - 'cache', - 'mime.grammar' - )) - ->addConstructorValue($swift_mime_types) - - ->register('mime.embeddedfile') - ->asNewInstanceOf('Swift_Mime_EmbeddedFile') - ->withDependencies(array( - 'mime.headerset', - 'mime.base64contentencoder', - 'cache', - 'mime.grammar' - )) - ->addConstructorValue($swift_mime_types) - - ->register('mime.headerfactory') - ->asNewInstanceOf('Swift_Mime_SimpleHeaderFactory') - ->withDependencies(array( - 'mime.qpheaderencoder', - 'mime.rfc2231encoder', - 'mime.grammar', - 'properties.charset' - )) - - ->register('mime.headerset') - ->asNewInstanceOf('Swift_Mime_SimpleHeaderSet') - ->withDependencies(array('mime.headerfactory', 'properties.charset')) - - ->register('mime.qpheaderencoder') - ->asNewInstanceOf('Swift_Mime_HeaderEncoder_QpHeaderEncoder') - ->withDependencies(array('mime.charstream')) - - ->register('mime.base64headerencoder') - ->asNewInstanceOf('Swift_Mime_HeaderEncoder_Base64HeaderEncoder') - ->withDependencies(array('mime.charstream')) - - ->register('mime.charstream') - ->asNewInstanceOf('Swift_CharacterStream_NgCharacterStream') - ->withDependencies(array('mime.characterreaderfactory', 'properties.charset')) - - ->register('mime.bytecanonicalizer') - ->asSharedInstanceOf('Swift_StreamFilters_ByteArrayReplacementFilter') - ->addConstructorValue(array(array(0x0D, 0x0A), array(0x0D), array(0x0A))) - ->addConstructorValue(array(array(0x0A), array(0x0A), array(0x0D, 0x0A))) - - ->register('mime.characterreaderfactory') - ->asSharedInstanceOf('Swift_CharacterReaderFactory_SimpleCharacterReaderFactory') - - ->register('mime.safeqpcontentencoder') - ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') - ->withDependencies(array('mime.charstream', 'mime.bytecanonicalizer')) - - ->register('mime.rawcontentencoder') - ->asNewInstanceOf('Swift_Mime_ContentEncoder_RawContentEncoder') - - ->register('mime.nativeqpcontentencoder') - ->withDependencies(array('properties.charset')) - ->asNewInstanceOf('Swift_Mime_ContentEncoder_NativeQpContentEncoder') - - ->register('mime.qpcontentencoderproxy') - ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoderProxy') - ->withDependencies(array('mime.safeqpcontentencoder', 'mime.nativeqpcontentencoder', 'properties.charset')) - - ->register('mime.7bitcontentencoder') - ->asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder') - ->addConstructorValue('7bit') - ->addConstructorValue(true) - - ->register('mime.8bitcontentencoder') - ->asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder') - ->addConstructorValue('8bit') - ->addConstructorValue(true) - - ->register('mime.base64contentencoder') - ->asSharedInstanceOf('Swift_Mime_ContentEncoder_Base64ContentEncoder') - - ->register('mime.rfc2231encoder') - ->asNewInstanceOf('Swift_Encoder_Rfc2231Encoder') - ->withDependencies(array('mime.charstream')) - - // As of PHP 5.4.7, the quoted_printable_encode() function behaves correctly. - // see https://github.com/php/php-src/commit/18bb426587d62f93c54c40bf8535eb8416603629 - ->register('mime.qpcontentencoder') - ->asAliasOf(version_compare(phpversion(), '5.4.7', '>=') ? 'mime.qpcontentencoderproxy' : 'mime.safeqpcontentencoder') -; - -unset($swift_mime_types); diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php deleted file mode 100644 index f5605a04..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php +++ /dev/null @@ -1,68 +0,0 @@ -register('transport.smtp') - ->asNewInstanceOf('Swift_Transport_EsmtpTransport') - ->withDependencies(array( - 'transport.buffer', - array('transport.authhandler'), - 'transport.eventdispatcher' - )) - - ->register('transport.sendmail') - ->asNewInstanceOf('Swift_Transport_SendmailTransport') - ->withDependencies(array( - 'transport.buffer', - 'transport.eventdispatcher' - )) - - ->register('transport.mail') - ->asNewInstanceOf('Swift_Transport_MailTransport') - ->withDependencies(array('transport.mailinvoker', 'transport.eventdispatcher')) - - ->register('transport.loadbalanced') - ->asNewInstanceOf('Swift_Transport_LoadBalancedTransport') - - ->register('transport.failover') - ->asNewInstanceOf('Swift_Transport_FailoverTransport') - - ->register('transport.spool') - ->asNewInstanceOf('Swift_Transport_SpoolTransport') - ->withDependencies(array('transport.eventdispatcher')) - - ->register('transport.null') - ->asNewInstanceOf('Swift_Transport_NullTransport') - ->withDependencies(array('transport.eventdispatcher')) - - ->register('transport.mailinvoker') - ->asSharedInstanceOf('Swift_Transport_SimpleMailInvoker') - - ->register('transport.buffer') - ->asNewInstanceOf('Swift_Transport_StreamBuffer') - ->withDependencies(array('transport.replacementfactory')) - - ->register('transport.authhandler') - ->asNewInstanceOf('Swift_Transport_Esmtp_AuthHandler') - ->withDependencies(array( - array( - 'transport.crammd5auth', - 'transport.loginauth', - 'transport.plainauth' - ) - )) - - ->register('transport.crammd5auth') - ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_CramMd5Authenticator') - - ->register('transport.loginauth') - ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_LoginAuthenticator') - - ->register('transport.plainauth') - ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_PlainAuthenticator') - - ->register('transport.eventdispatcher') - ->asNewInstanceOf('Swift_Events_SimpleEventDispatcher') - - ->register('transport.replacementfactory') - ->asSharedInstanceOf('Swift_StreamFilters_StringReplacementFilterFactory') -; diff --git a/vendor/swiftmailer/swiftmailer/lib/mime_types.php b/vendor/swiftmailer/swiftmailer/lib/mime_types.php deleted file mode 100644 index 3baebb22..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/mime_types.php +++ /dev/null @@ -1,76 +0,0 @@ - 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'avi' => 'video/avi', - 'bmp' => 'image/bmp', - 'bz2' => 'application/x-bz2', - 'csv' => 'text/csv', - 'dmg' => 'application/x-apple-diskimage', - 'doc' => 'application/msword', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'eml' => 'message/rfc822', - 'aps' => 'application/postscript', - 'exe' => 'application/x-ms-dos-executable', - 'flv' => 'video/x-flv', - 'gif' => 'image/gif', - 'gz' => 'application/x-gzip', - 'hqx' => 'application/stuffit', - 'htm' => 'text/html', - 'html' => 'text/html', - 'jar' => 'application/x-java-archive', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'm3u' => 'audio/x-mpegurl', - 'm4a' => 'audio/mp4', - 'mdb' => 'application/x-msaccess', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mov' => 'video/quicktime', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'odg' => 'vnd.oasis.opendocument.graphics', - 'odp' => 'vnd.oasis.opendocument.presentation', - 'odt' => 'vnd.oasis.opendocument.text', - 'ods' => 'vnd.oasis.opendocument.spreadsheet', - 'ogg' => 'audio/ogg', - 'pdf' => 'application/pdf', - 'png' => 'image/png', - 'ppt' => 'application/vnd.ms-powerpoint', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'ps' => 'application/postscript', - 'rar' => 'application/x-rar-compressed', - 'rtf' => 'application/rtf', - 'tar' => 'application/x-tar', - 'sit' => 'application/x-stuffit', - 'svg' => 'image/svg+xml', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'ttf' => 'application/x-font-truetype', - 'txt' => 'text/plain', - 'vcf' => 'text/x-vcard', - 'wav' => 'audio/wav', - 'wma' => 'audio/x-ms-wma', - 'wmv' => 'audio/x-ms-wmv', - 'xls' => 'application/excel', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xml' => 'application/xml', - 'zip' => 'application/zip' -); diff --git a/vendor/swiftmailer/swiftmailer/lib/preferences.php b/vendor/swiftmailer/swiftmailer/lib/preferences.php deleted file mode 100644 index 42239437..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/preferences.php +++ /dev/null @@ -1,35 +0,0 @@ -setCharset('utf-8'); - -// Without these lines the default caching mechanism is "array" but this uses a lot of memory. -// If possible, use a disk cache to enable attaching large attachments etc. -// You can override the default temporary directory by setting the TMPDIR environment variable. - -// The @ operator in front of is_writable calls is to avoid PHP warnings -// when using open_basedir -$tmp = getenv('TMPDIR'); -if ($tmp && @is_writable($tmp)) { - $preferences - ->setTempDir($tmp) - ->setCacheType('disk'); -} elseif (function_exists('sys_get_temp_dir') && @is_writable(sys_get_temp_dir())) { - $preferences - ->setTempDir(sys_get_temp_dir()) - ->setCacheType('disk'); -} - -// this should only be done when Swiftmailer won't use the native QP content encoder -// see mime_deps.php -if (version_compare(phpversion(), '5.4.7', '<')) { - $preferences->setQPDotEscape(false); -} diff --git a/vendor/swiftmailer/swiftmailer/lib/swift_init.php b/vendor/swiftmailer/swiftmailer/lib/swift_init.php deleted file mode 100644 index 5897e6ff..00000000 --- a/vendor/swiftmailer/swiftmailer/lib/swift_init.php +++ /dev/null @@ -1,28 +0,0 @@ - - - Some test message - chris@w3style.co.uk - mark@swiftmailer.org - chris.corbyn@sitepoint.com - text/plain - - Here's a recipe for beef stifado - - - text/html - - This is the other part - - - - application/pdf - stifado.pdf - /path/to/stifado.pdf - - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc0821.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc0821.txt deleted file mode 100644 index d877b72c..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc0821.txt +++ /dev/null @@ -1,4050 +0,0 @@ - - - - RFC 821 - - - - - - SIMPLE MAIL TRANSFER PROTOCOL - - - - Jonathan B. Postel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - August 1982 - - - - Information Sciences Institute - University of Southern California - 4676 Admiralty Way - Marina del Rey, California 90291 - - (213) 822-1511 - - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - TABLE OF CONTENTS - - 1. INTRODUCTION .................................................. 1 - - 2. THE SMTP MODEL ................................................ 2 - - 3. THE SMTP PROCEDURE ............................................ 4 - - 3.1. Mail ..................................................... 4 - 3.2. Forwarding ............................................... 7 - 3.3. Verifying and Expanding .................................. 8 - 3.4. Sending and Mailing ..................................... 11 - 3.5. Opening and Closing ..................................... 13 - 3.6. Relaying ................................................ 14 - 3.7. Domains ................................................. 17 - 3.8. Changing Roles .......................................... 18 - - 4. THE SMTP SPECIFICATIONS ...................................... 19 - - 4.1. SMTP Commands ........................................... 19 - 4.1.1. Command Semantics ..................................... 19 - 4.1.2. Command Syntax ........................................ 27 - 4.2. SMTP Replies ............................................ 34 - 4.2.1. Reply Codes by Function Group ......................... 35 - 4.2.2. Reply Codes in Numeric Order .......................... 36 - 4.3. Sequencing of Commands and Replies ...................... 37 - 4.4. State Diagrams .......................................... 39 - 4.5. Details ................................................. 41 - 4.5.1. Minimum Implementation ................................ 41 - 4.5.2. Transparency .......................................... 41 - 4.5.3. Sizes ................................................. 42 - - APPENDIX A: TCP ................................................. 44 - APPENDIX B: NCP ................................................. 45 - APPENDIX C: NITS ................................................ 46 - APPENDIX D: X.25 ................................................ 47 - APPENDIX E: Theory of Reply Codes ............................... 48 - APPENDIX F: Scenarios ........................................... 51 - - GLOSSARY ......................................................... 64 - - REFERENCES ....................................................... 67 - - - - -Network Working Group J. Postel -Request for Comments: DRAFT ISI -Replaces: RFC 788, 780, 772 August 1982 - - SIMPLE MAIL TRANSFER PROTOCOL - - -1. INTRODUCTION - - The objective of Simple Mail Transfer Protocol (SMTP) is to transfer - mail reliably and efficiently. - - SMTP is independent of the particular transmission subsystem and - requires only a reliable ordered data stream channel. Appendices A, - B, C, and D describe the use of SMTP with various transport services. - A Glossary provides the definitions of terms as used in this - document. - - An important feature of SMTP is its capability to relay mail across - transport service environments. A transport service provides an - interprocess communication environment (IPCE). An IPCE may cover one - network, several networks, or a subset of a network. It is important - to realize that transport systems (or IPCEs) are not one-to-one with - networks. A process can communicate directly with another process - through any mutually known IPCE. Mail is an application or use of - interprocess communication. Mail can be communicated between - processes in different IPCEs by relaying through a process connected - to two (or more) IPCEs. More specifically, mail can be relayed - between hosts on different transport systems by a host on both - transport systems. - - - - - - - - - - - - - - - - - - - - - - - - -Postel [Page 1] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - -2. THE SMTP MODEL - - The SMTP design is based on the following model of communication: as - the result of a user mail request, the sender-SMTP establishes a - two-way transmission channel to a receiver-SMTP. The receiver-SMTP - may be either the ultimate destination or an intermediate. SMTP - commands are generated by the sender-SMTP and sent to the - receiver-SMTP. SMTP replies are sent from the receiver-SMTP to the - sender-SMTP in response to the commands. - - Once the transmission channel is established, the SMTP-sender sends a - MAIL command indicating the sender of the mail. If the SMTP-receiver - can accept mail it responds with an OK reply. The SMTP-sender then - sends a RCPT command identifying a recipient of the mail. If the - SMTP-receiver can accept mail for that recipient it responds with an - OK reply; if not, it responds with a reply rejecting that recipient - (but not the whole mail transaction). The SMTP-sender and - SMTP-receiver may negotiate several recipients. When the recipients - have been negotiated the SMTP-sender sends the mail data, terminating - with a special sequence. If the SMTP-receiver successfully processes - the mail data it responds with an OK reply. The dialog is purposely - lock-step, one-at-a-time. - - ------------------------------------------------------------- - - - +----------+ +----------+ - +------+ | | | | - | User |<-->| | SMTP | | - +------+ | Sender- |Commands/Replies| Receiver-| - +------+ | SMTP |<-------------->| SMTP | +------+ - | File |<-->| | and Mail | |<-->| File | - |System| | | | | |System| - +------+ +----------+ +----------+ +------+ - - - Sender-SMTP Receiver-SMTP - - Model for SMTP Use - - Figure 1 - - ------------------------------------------------------------- - - The SMTP provides mechanisms for the transmission of mail; directly - from the sending user's host to the receiving user's host when the - - - -[Page 2] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - two host are connected to the same transport service, or via one or - more relay SMTP-servers when the source and destination hosts are not - connected to the same transport service. - - To be able to provide the relay capability the SMTP-server must be - supplied with the name of the ultimate destination host as well as - the destination mailbox name. - - The argument to the MAIL command is a reverse-path, which specifies - who the mail is from. The argument to the RCPT command is a - forward-path, which specifies who the mail is to. The forward-path - is a source route, while the reverse-path is a return route (which - may be used to return a message to the sender when an error occurs - with a relayed message). - - When the same message is sent to multiple recipients the SMTP - encourages the transmission of only one copy of the data for all the - recipients at the same destination host. - - The mail commands and replies have a rigid syntax. Replies also have - a numeric code. In the following, examples appear which use actual - commands and replies. The complete lists of commands and replies - appears in Section 4 on specifications. - - Commands and replies are not case sensitive. That is, a command or - reply word may be upper case, lower case, or any mixture of upper and - lower case. Note that this is not true of mailbox user names. For - some hosts the user name is case sensitive, and SMTP implementations - must take case to preserve the case of user names as they appear in - mailbox arguments. Host names are not case sensitive. - - Commands and replies are composed of characters from the ASCII - character set [1]. When the transport service provides an 8-bit byte - (octet) transmission channel, each 7-bit character is transmitted - right justified in an octet with the high order bit cleared to zero. - - When specifying the general form of a command or reply, an argument - (or special symbol) will be denoted by a meta-linguistic variable (or - constant), for example, "" or "". Here the - angle brackets indicate these are meta-linguistic variables. - However, some arguments use the angle brackets literally. For - example, an actual reverse-path is enclosed in angle brackets, i.e., - "" is an instance of (the - angle brackets are actually transmitted in the command or reply). - - - - - -Postel [Page 3] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - -3. THE SMTP PROCEDURES - - This section presents the procedures used in SMTP in several parts. - First comes the basic mail procedure defined as a mail transaction. - Following this are descriptions of forwarding mail, verifying mailbox - names and expanding mailing lists, sending to terminals instead of or - in combination with mailboxes, and the opening and closing exchanges. - At the end of this section are comments on relaying, a note on mail - domains, and a discussion of changing roles. Throughout this section - are examples of partial command and reply sequences, several complete - scenarios are presented in Appendix F. - - 3.1. MAIL - - There are three steps to SMTP mail transactions. The transaction - is started with a MAIL command which gives the sender - identification. A series of one or more RCPT commands follows - giving the receiver information. Then a DATA command gives the - mail data. And finally, the end of mail data indicator confirms - the transaction. - - The first step in the procedure is the MAIL command. The - contains the source mailbox. - - MAIL FROM: - - This command tells the SMTP-receiver that a new mail - transaction is starting and to reset all its state tables and - buffers, including any recipients or mail data. It gives the - reverse-path which can be used to report errors. If accepted, - the receiver-SMTP returns a 250 OK reply. - - The can contain more than just a mailbox. The - is a reverse source routing list of hosts and - source mailbox. The first host in the should be - the host sending this command. - - The second step in the procedure is the RCPT command. - - RCPT TO: - - This command gives a forward-path identifying one recipient. - If accepted, the receiver-SMTP returns a 250 OK reply, and - stores the forward-path. If the recipient is unknown the - receiver-SMTP returns a 550 Failure reply. This second step of - the procedure can be repeated any number of times. - - - -[Page 4] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - The can contain more than just a mailbox. The - is a source routing list of hosts and the - destination mailbox. The first host in the - should be the host receiving this command. - - The third step in the procedure is the DATA command. - - DATA - - If accepted, the receiver-SMTP returns a 354 Intermediate reply - and considers all succeeding lines to be the message text. - When the end of text is received and stored the SMTP-receiver - sends a 250 OK reply. - - Since the mail data is sent on the transmission channel the end - of the mail data must be indicated so that the command and - reply dialog can be resumed. SMTP indicates the end of the - mail data by sending a line containing only a period. A - transparency procedure is used to prevent this from interfering - with the user's text (see Section 4.5.2). - - Please note that the mail data includes the memo header - items such as Date, Subject, To, Cc, From [2]. - - The end of mail data indicator also confirms the mail - transaction and tells the receiver-SMTP to now process the - stored recipients and mail data. If accepted, the - receiver-SMTP returns a 250 OK reply. The DATA command should - fail only if the mail transaction was incomplete (for example, - no recipients), or if resources are not available. - - The above procedure is an example of a mail transaction. These - commands must be used only in the order discussed above. - Example 1 (below) illustrates the use of these commands in a mail - transaction. - - - - - - - - - - - - - - -Postel [Page 5] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - ------------------------------------------------------------- - - Example of the SMTP Procedure - - This SMTP example shows mail sent by Smith at host Alpha.ARPA, - to Jones, Green, and Brown at host Beta.ARPA. Here we assume - that host Alpha contacts host Beta directly. - - S: MAIL FROM: - R: 250 OK - - S: RCPT TO: - R: 250 OK - - S: RCPT TO: - R: 550 No such user here - - S: RCPT TO: - R: 250 OK - - S: DATA - R: 354 Start mail input; end with . - S: Blah blah blah... - S: ...etc. etc. etc. - S: . - R: 250 OK - - The mail has now been accepted for Jones and Brown. Green did - not have a mailbox at host Beta. - - Example 1 - - ------------------------------------------------------------- - - - - - - - - - - - - - - - - -[Page 6] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - 3.2. FORWARDING - - There are some cases where the destination information in the - is incorrect, but the receiver-SMTP knows the - correct destination. In such cases, one of the following replies - should be used to allow the sender to contact the correct - destination. - - 251 User not local; will forward to - - This reply indicates that the receiver-SMTP knows the user's - mailbox is on another host and indicates the correct - forward-path to use in the future. Note that either the - host or user or both may be different. The receiver takes - responsibility for delivering the message. - - 551 User not local; please try - - This reply indicates that the receiver-SMTP knows the user's - mailbox is on another host and indicates the correct - forward-path to use. Note that either the host or user or - both may be different. The receiver refuses to accept mail - for this user, and the sender must either redirect the mail - according to the information provided or return an error - response to the originating user. - - Example 2 illustrates the use of these responses. - - ------------------------------------------------------------- - - Example of Forwarding - - Either - - S: RCPT TO: - R: 251 User not local; will forward to - - Or - - S: RCPT TO: - R: 551 User not local; please try - - Example 2 - - ------------------------------------------------------------- - - - - -Postel [Page 7] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - 3.3. VERIFYING AND EXPANDING - - SMTP provides as additional features, commands to verify a user - name or expand a mailing list. This is done with the VRFY and - EXPN commands, which have character string arguments. For the - VRFY command, the string is a user name, and the response may - include the full name of the user and must include the mailbox of - the user. For the EXPN command, the string identifies a mailing - list, and the multiline response may include the full name of the - users and must give the mailboxes on the mailing list. - - "User name" is a fuzzy term and used purposely. If a host - implements the VRFY or EXPN commands then at least local mailboxes - must be recognized as "user names". If a host chooses to - recognize other strings as "user names" that is allowed. - - In some hosts the distinction between a mailing list and an alias - for a single mailbox is a bit fuzzy, since a common data structure - may hold both types of entries, and it is possible to have mailing - lists of one mailbox. If a request is made to verify a mailing - list a positive response can be given if on receipt of a message - so addressed it will be delivered to everyone on the list, - otherwise an error should be reported (e.g., "550 That is a - mailing list, not a user"). If a request is made to expand a user - name a positive response can be formed by returning a list - containing one name, or an error can be reported (e.g., "550 That - is a user name, not a mailing list"). - - In the case of a multiline reply (normal for EXPN) exactly one - mailbox is to be specified on each line of the reply. In the case - of an ambiguous request, for example, "VRFY Smith", where there - are two Smith's the response must be "553 User ambiguous". - - The case of verifying a user name is straightforward as shown in - example 3. - - - - - - - - - - - - - - -[Page 8] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - ------------------------------------------------------------- - - Example of Verifying a User Name - - Either - - S: VRFY Smith - R: 250 Fred Smith - - Or - - S: VRFY Smith - R: 251 User not local; will forward to - - Or - - S: VRFY Jones - R: 550 String does not match anything. - - Or - - S: VRFY Jones - R: 551 User not local; please try - - Or - - S: VRFY Gourzenkyinplatz - R: 553 User ambiguous. - - Example 3 - - ------------------------------------------------------------- - - - - - - - - - - - - - - - - - -Postel [Page 9] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - The case of expanding a mailbox list requires a multiline reply as - shown in example 4. - - ------------------------------------------------------------- - - Example of Expanding a Mailing List - - Either - - S: EXPN Example-People - R: 250-Jon Postel - R: 250-Fred Fonebone - R: 250-Sam Q. Smith - R: 250-Quincy Smith <@USC-ISIF.ARPA:Q-Smith@ISI-VAXA.ARPA> - R: 250- - R: 250 - - Or - - S: EXPN Executive-Washroom-List - R: 550 Access Denied to You. - - Example 4 - - ------------------------------------------------------------- - - The character string arguments of the VRFY and EXPN commands - cannot be further restricted due to the variety of implementations - of the user name and mailbox list concepts. On some systems it - may be appropriate for the argument of the EXPN command to be a - file name for a file containing a mailing list, but again there is - a variety of file naming conventions in the Internet. - - The VRFY and EXPN commands are not included in the minimum - implementation (Section 4.5.1), and are not required to work - across relays when they are implemented. - - - - - - - - - - - - - -[Page 10] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - 3.4. SENDING AND MAILING - - The main purpose of SMTP is to deliver messages to user's - mailboxes. A very similar service provided by some hosts is to - deliver messages to user's terminals (provided the user is active - on the host). The delivery to the user's mailbox is called - "mailing", the delivery to the user's terminal is called - "sending". Because in many hosts the implementation of sending is - nearly identical to the implementation of mailing these two - functions are combined in SMTP. However the sending commands are - not included in the required minimum implementation - (Section 4.5.1). Users should have the ability to control the - writing of messages on their terminals. Most hosts permit the - users to accept or refuse such messages. - - The following three command are defined to support the sending - options. These are used in the mail transaction instead of the - MAIL command and inform the receiver-SMTP of the special semantics - of this transaction: - - SEND FROM: - - The SEND command requires that the mail data be delivered to - the user's terminal. If the user is not active (or not - accepting terminal messages) on the host a 450 reply may - returned to a RCPT command. The mail transaction is - successful if the message is delivered the terminal. - - SOML FROM: - - The Send Or MaiL command requires that the mail data be - delivered to the user's terminal if the user is active (and - accepting terminal messages) on the host. If the user is - not active (or not accepting terminal messages) then the - mail data is entered into the user's mailbox. The mail - transaction is successful if the message is delivered either - to the terminal or the mailbox. - - SAML FROM: - - The Send And MaiL command requires that the mail data be - delivered to the user's terminal if the user is active (and - accepting terminal messages) on the host. In any case the - mail data is entered into the user's mailbox. The mail - transaction is successful if the message is delivered the - mailbox. - - - -Postel [Page 11] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - The same reply codes that are used for the MAIL commands are used - for these commands. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Page 12] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - 3.5. OPENING AND CLOSING - - At the time the transmission channel is opened there is an - exchange to ensure that the hosts are communicating with the hosts - they think they are. - - The following two commands are used in transmission channel - opening and closing: - - HELO - - QUIT - - In the HELO command the host sending the command identifies - itself; the command may be interpreted as saying "Hello, I am - ". - - ------------------------------------------------------------- - - Example of Connection Opening - - R: 220 BBN-UNIX.ARPA Simple Mail Transfer Service Ready - S: HELO USC-ISIF.ARPA - R: 250 BBN-UNIX.ARPA - - Example 5 - - ------------------------------------------------------------- - - ------------------------------------------------------------- - - Example of Connection Closing - - S: QUIT - R: 221 BBN-UNIX.ARPA Service closing transmission channel - - Example 6 - - ------------------------------------------------------------- - - - - - - - - - - -Postel [Page 13] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - 3.6. RELAYING - - The forward-path may be a source route of the form - "@ONE,@TWO:JOE@THREE", where ONE, TWO, and THREE are hosts. This - form is used to emphasize the distinction between an address and a - route. The mailbox is an absolute address, and the route is - information about how to get there. The two concepts should not - be confused. - - Conceptually the elements of the forward-path are moved to the - reverse-path as the message is relayed from one server-SMTP to - another. The reverse-path is a reverse source route, (i.e., a - source route from the current location of the message to the - originator of the message). When a server-SMTP deletes its - identifier from the forward-path and inserts it into the - reverse-path, it must use the name it is known by in the - environment it is sending into, not the environment the mail came - from, in case the server-SMTP is known by different names in - different environments. - - If when the message arrives at an SMTP the first element of the - forward-path is not the identifier of that SMTP the element is not - deleted from the forward-path and is used to determine the next - SMTP to send the message to. In any case, the SMTP adds its own - identifier to the reverse-path. - - Using source routing the receiver-SMTP receives mail to be relayed - to another server-SMTP The receiver-SMTP may accept or reject the - task of relaying the mail in the same way it accepts or rejects - mail for a local user. The receiver-SMTP transforms the command - arguments by moving its own identifier from the forward-path to - the beginning of the reverse-path. The receiver-SMTP then becomes - a sender-SMTP, establishes a transmission channel to the next SMTP - in the forward-path, and sends it the mail. - - The first host in the reverse-path should be the host sending the - SMTP commands, and the first host in the forward-path should be - the host receiving the SMTP commands. - - Notice that the forward-path and reverse-path appear in the SMTP - commands and replies, but not necessarily in the message. That - is, there is no need for these paths and especially this syntax to - appear in the "To:" , "From:", "CC:", etc. fields of the message - header. - - If a server-SMTP has accepted the task of relaying the mail and - - - -[Page 14] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - later finds that the forward-path is incorrect or that the mail - cannot be delivered for whatever reason, then it must construct an - "undeliverable mail" notification message and send it to the - originator of the undeliverable mail (as indicated by the - reverse-path). - - This notification message must be from the server-SMTP at this - host. Of course, server-SMTPs should not send notification - messages about problems with notification messages. One way to - prevent loops in error reporting is to specify a null reverse-path - in the MAIL command of a notification message. When such a - message is relayed it is permissible to leave the reverse-path - null. A MAIL command with a null reverse-path appears as follows: - - MAIL FROM:<> - - An undeliverable mail notification message is shown in example 7. - This notification is in response to a message originated by JOE at - HOSTW and sent via HOSTX to HOSTY with instructions to relay it on - to HOSTZ. What we see in the example is the transaction between - HOSTY and HOSTX, which is the first step in the return of the - notification message. - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel [Page 15] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - ------------------------------------------------------------- - - Example Undeliverable Mail Notification Message - - S: MAIL FROM:<> - R: 250 ok - S: RCPT TO:<@HOSTX.ARPA:JOE@HOSTW.ARPA> - R: 250 ok - S: DATA - R: 354 send the mail data, end with . - S: Date: 23 Oct 81 11:22:33 - S: From: SMTP@HOSTY.ARPA - S: To: JOE@HOSTW.ARPA - S: Subject: Mail System Problem - S: - S: Sorry JOE, your message to SAM@HOSTZ.ARPA lost. - S: HOSTZ.ARPA said this: - S: "550 No Such User" - S: . - R: 250 ok - - Example 7 - - ------------------------------------------------------------- - - - - - - - - - - - - - - - - - - - - - - - - - -[Page 16] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - 3.7. DOMAINS - - Domains are a recently introduced concept in the ARPA Internet - mail system. The use of domains changes the address space from a - flat global space of simple character string host names to a - hierarchically structured rooted tree of global addresses. The - host name is replaced by a domain and host designator which is a - sequence of domain element strings separated by periods with the - understanding that the domain elements are ordered from the most - specific to the most general. - - For example, "USC-ISIF.ARPA", "Fred.Cambridge.UK", and - "PC7.LCS.MIT.ARPA" might be host-and-domain identifiers. - - Whenever domain names are used in SMTP only the official names are - used, the use of nicknames or aliases is not allowed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel [Page 17] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - 3.8. CHANGING ROLES - - The TURN command may be used to reverse the roles of the two - programs communicating over the transmission channel. - - If program-A is currently the sender-SMTP and it sends the TURN - command and receives an ok reply (250) then program-A becomes the - receiver-SMTP. - - If program-B is currently the receiver-SMTP and it receives the - TURN command and sends an ok reply (250) then program-B becomes - the sender-SMTP. - - To refuse to change roles the receiver sends the 502 reply. - - Please note that this command is optional. It would not normally - be used in situations where the transmission channel is TCP. - However, when the cost of establishing the transmission channel is - high, this command may be quite useful. For example, this command - may be useful in supporting be mail exchange using the public - switched telephone system as a transmission channel, especially if - some hosts poll other hosts for mail exchanges. - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Page 18] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - -4. THE SMTP SPECIFICATIONS - - 4.1. SMTP COMMANDS - - 4.1.1. COMMAND SEMANTICS - - The SMTP commands define the mail transfer or the mail system - function requested by the user. SMTP commands are character - strings terminated by . The command codes themselves are - alphabetic characters terminated by if parameters follow - and otherwise. The syntax of mailboxes must conform to - receiver site conventions. The SMTP commands are discussed - below. The SMTP replies are discussed in the Section 4.2. - - A mail transaction involves several data objects which are - communicated as arguments to different commands. The - reverse-path is the argument of the MAIL command, the - forward-path is the argument of the RCPT command, and the mail - data is the argument of the DATA command. These arguments or - data objects must be transmitted and held pending the - confirmation communicated by the end of mail data indication - which finalizes the transaction. The model for this is that - distinct buffers are provided to hold the types of data - objects, that is, there is a reverse-path buffer, a - forward-path buffer, and a mail data buffer. Specific commands - cause information to be appended to a specific buffer, or cause - one or more buffers to be cleared. - - HELLO (HELO) - - This command is used to identify the sender-SMTP to the - receiver-SMTP. The argument field contains the host name of - the sender-SMTP. - - The receiver-SMTP identifies itself to the sender-SMTP in - the connection greeting reply, and in the response to this - command. - - This command and an OK reply to it confirm that both the - sender-SMTP and the receiver-SMTP are in the initial state, - that is, there is no transaction in progress and all state - tables and buffers are cleared. - - - - - - - -Postel [Page 19] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - MAIL (MAIL) - - This command is used to initiate a mail transaction in which - the mail data is delivered to one or more mailboxes. The - argument field contains a reverse-path. - - The reverse-path consists of an optional list of hosts and - the sender mailbox. When the list of hosts is present, it - is a "reverse" source route and indicates that the mail was - relayed through each host on the list (the first host in the - list was the most recent relay). This list is used as a - source route to return non-delivery notices to the sender. - As each relay host adds itself to the beginning of the list, - it must use its name as known in the IPCE to which it is - relaying the mail rather than the IPCE from which the mail - came (if they are different). In some types of error - reporting messages (for example, undeliverable mail - notifications) the reverse-path may be null (see Example 7). - - This command clears the reverse-path buffer, the - forward-path buffer, and the mail data buffer; and inserts - the reverse-path information from this command into the - reverse-path buffer. - - RECIPIENT (RCPT) - - This command is used to identify an individual recipient of - the mail data; multiple recipients are specified by multiple - use of this command. - - The forward-path consists of an optional list of hosts and a - required destination mailbox. When the list of hosts is - present, it is a source route and indicates that the mail - must be relayed to the next host on the list. If the - receiver-SMTP does not implement the relay function it may - user the same reply it would for an unknown local user - (550). - - When mail is relayed, the relay host must remove itself from - the beginning forward-path and put itself at the beginning - of the reverse-path. When mail reaches its ultimate - destination (the forward-path contains only a destination - mailbox), the receiver-SMTP inserts it into the destination - mailbox in accordance with its host mail conventions. - - - - - -[Page 20] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - For example, mail received at relay host A with arguments - - FROM: - TO:<@HOSTA.ARPA,@HOSTB.ARPA:USERC@HOSTD.ARPA> - - will be relayed on to host B with arguments - - FROM:<@HOSTA.ARPA:USERX@HOSTY.ARPA> - TO:<@HOSTB.ARPA:USERC@HOSTD.ARPA>. - - This command causes its forward-path argument to be appended - to the forward-path buffer. - - DATA (DATA) - - The receiver treats the lines following the command as mail - data from the sender. This command causes the mail data - from this command to be appended to the mail data buffer. - The mail data may contain any of the 128 ASCII character - codes. - - The mail data is terminated by a line containing only a - period, that is the character sequence "." (see - Section 4.5.2 on Transparency). This is the end of mail - data indication. - - The end of mail data indication requires that the receiver - must now process the stored mail transaction information. - This processing consumes the information in the reverse-path - buffer, the forward-path buffer, and the mail data buffer, - and on the completion of this command these buffers are - cleared. If the processing is successful the receiver must - send an OK reply. If the processing fails completely the - receiver must send a failure reply. - - When the receiver-SMTP accepts a message either for relaying - or for final delivery it inserts at the beginning of the - mail data a time stamp line. The time stamp line indicates - the identity of the host that sent the message, and the - identity of the host that received the message (and is - inserting this time stamp), and the date and time the - message was received. Relayed messages will have multiple - time stamp lines. - - When the receiver-SMTP makes the "final delivery" of a - message it inserts at the beginning of the mail data a - - - -Postel [Page 21] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - return path line. The return path line preserves the - information in the from the MAIL command. - Here, final delivery means the message leaves the SMTP - world. Normally, this would mean it has been delivered to - the destination user, but in some cases it may be further - processed and transmitted by another mail system. - - It is possible for the mailbox in the return path be - different from the actual sender's mailbox, for example, - if error responses are to be delivered a special error - handling mailbox rather than the message senders. - - The preceding two paragraphs imply that the final mail data - will begin with a return path line, followed by one or more - time stamp lines. These lines will be followed by the mail - data header and body [2]. See Example 8. - - Special mention is needed of the response and further action - required when the processing following the end of mail data - indication is partially successful. This could arise if - after accepting several recipients and the mail data, the - receiver-SMTP finds that the mail data can be successfully - delivered to some of the recipients, but it cannot be to - others (for example, due to mailbox space allocation - problems). In such a situation, the response to the DATA - command must be an OK reply. But, the receiver-SMTP must - compose and send an "undeliverable mail" notification - message to the originator of the message. Either a single - notification which lists all of the recipients that failed - to get the message, or separate notification messages must - be sent for each failed recipient (see Example 7). All - undeliverable mail notification messages are sent using the - MAIL command (even if they result from processing a SEND, - SOML, or SAML command). - - - - - - - - - - - - - - - -[Page 22] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - ------------------------------------------------------------- - - Example of Return Path and Received Time Stamps - - Return-Path: <@GHI.ARPA,@DEF.ARPA,@ABC.ARPA:JOE@ABC.ARPA> - Received: from GHI.ARPA by JKL.ARPA ; 27 Oct 81 15:27:39 PST - Received: from DEF.ARPA by GHI.ARPA ; 27 Oct 81 15:15:13 PST - Received: from ABC.ARPA by DEF.ARPA ; 27 Oct 81 15:01:59 PST - Date: 27 Oct 81 15:01:01 PST - From: JOE@ABC.ARPA - Subject: Improved Mailing System Installed - To: SAM@JKL.ARPA - - This is to inform you that ... - - Example 8 - - ------------------------------------------------------------- - - SEND (SEND) - - This command is used to initiate a mail transaction in which - the mail data is delivered to one or more terminals. The - argument field contains a reverse-path. This command is - successful if the message is delivered to a terminal. - - The reverse-path consists of an optional list of hosts and - the sender mailbox. When the list of hosts is present, it - is a "reverse" source route and indicates that the mail was - relayed through each host on the list (the first host in the - list was the most recent relay). This list is used as a - source route to return non-delivery notices to the sender. - As each relay host adds itself to the beginning of the list, - it must use its name as known in the IPCE to which it is - relaying the mail rather than the IPCE from which the mail - came (if they are different). - - This command clears the reverse-path buffer, the - forward-path buffer, and the mail data buffer; and inserts - the reverse-path information from this command into the - reverse-path buffer. - - SEND OR MAIL (SOML) - - This command is used to initiate a mail transaction in which - the mail data is delivered to one or more terminals or - - - -Postel [Page 23] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - mailboxes. For each recipient the mail data is delivered to - the recipient's terminal if the recipient is active on the - host (and accepting terminal messages), otherwise to the - recipient's mailbox. The argument field contains a - reverse-path. This command is successful if the message is - delivered to a terminal or the mailbox. - - The reverse-path consists of an optional list of hosts and - the sender mailbox. When the list of hosts is present, it - is a "reverse" source route and indicates that the mail was - relayed through each host on the list (the first host in the - list was the most recent relay). This list is used as a - source route to return non-delivery notices to the sender. - As each relay host adds itself to the beginning of the list, - it must use its name as known in the IPCE to which it is - relaying the mail rather than the IPCE from which the mail - came (if they are different). - - This command clears the reverse-path buffer, the - forward-path buffer, and the mail data buffer; and inserts - the reverse-path information from this command into the - reverse-path buffer. - - SEND AND MAIL (SAML) - - This command is used to initiate a mail transaction in which - the mail data is delivered to one or more terminals and - mailboxes. For each recipient the mail data is delivered to - the recipient's terminal if the recipient is active on the - host (and accepting terminal messages), and for all - recipients to the recipient's mailbox. The argument field - contains a reverse-path. This command is successful if the - message is delivered to the mailbox. - - The reverse-path consists of an optional list of hosts and - the sender mailbox. When the list of hosts is present, it - is a "reverse" source route and indicates that the mail was - relayed through each host on the list (the first host in the - list was the most recent relay). This list is used as a - source route to return non-delivery notices to the sender. - As each relay host adds itself to the beginning of the list, - it must use its name as known in the IPCE to which it is - relaying the mail rather than the IPCE from which the mail - came (if they are different). - - This command clears the reverse-path buffer, the - - - -[Page 24] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - forward-path buffer, and the mail data buffer; and inserts - the reverse-path information from this command into the - reverse-path buffer. - - RESET (RSET) - - This command specifies that the current mail transaction is - to be aborted. Any stored sender, recipients, and mail data - must be discarded, and all buffers and state tables cleared. - The receiver must send an OK reply. - - VERIFY (VRFY) - - This command asks the receiver to confirm that the argument - identifies a user. If it is a user name, the full name of - the user (if known) and the fully specified mailbox are - returned. - - This command has no effect on any of the reverse-path - buffer, the forward-path buffer, or the mail data buffer. - - EXPAND (EXPN) - - This command asks the receiver to confirm that the argument - identifies a mailing list, and if so, to return the - membership of that list. The full name of the users (if - known) and the fully specified mailboxes are returned in a - multiline reply. - - This command has no effect on any of the reverse-path - buffer, the forward-path buffer, or the mail data buffer. - - HELP (HELP) - - This command causes the receiver to send helpful information - to the sender of the HELP command. The command may take an - argument (e.g., any command name) and return more specific - information as a response. - - This command has no effect on any of the reverse-path - buffer, the forward-path buffer, or the mail data buffer. - - - - - - - - -Postel [Page 25] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - NOOP (NOOP) - - This command does not affect any parameters or previously - entered commands. It specifies no action other than that - the receiver send an OK reply. - - This command has no effect on any of the reverse-path - buffer, the forward-path buffer, or the mail data buffer. - - QUIT (QUIT) - - This command specifies that the receiver must send an OK - reply, and then close the transmission channel. - - The receiver should not close the transmission channel until - it receives and replies to a QUIT command (even if there was - an error). The sender should not close the transmission - channel until it send a QUIT command and receives the reply - (even if there was an error response to a previous command). - If the connection is closed prematurely the receiver should - act as if a RSET command had been received (canceling any - pending transaction, but not undoing any previously - completed transaction), the sender should act as if the - command or transaction in progress had received a temporary - error (4xx). - - TURN (TURN) - - This command specifies that the receiver must either (1) - send an OK reply and then take on the role of the - sender-SMTP, or (2) send a refusal reply and retain the role - of the receiver-SMTP. - - If program-A is currently the sender-SMTP and it sends the - TURN command and receives an OK reply (250) then program-A - becomes the receiver-SMTP. Program-A is then in the initial - state as if the transmission channel just opened, and it - then sends the 220 service ready greeting. - - If program-B is currently the receiver-SMTP and it receives - the TURN command and sends an OK reply (250) then program-B - becomes the sender-SMTP. Program-B is then in the initial - state as if the transmission channel just opened, and it - then expects to receive the 220 service ready greeting. - - To refuse to change roles the receiver sends the 502 reply. - - - -[Page 26] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - There are restrictions on the order in which these command may - be used. - - The first command in a session must be the HELO command. - The HELO command may be used later in a session as well. If - the HELO command argument is not acceptable a 501 failure - reply must be returned and the receiver-SMTP must stay in - the same state. - - The NOOP, HELP, EXPN, and VRFY commands can be used at any - time during a session. - - The MAIL, SEND, SOML, or SAML commands begin a mail - transaction. Once started a mail transaction consists of - one of the transaction beginning commands, one or more RCPT - commands, and a DATA command, in that order. A mail - transaction may be aborted by the RSET command. There may - be zero or more transactions in a session. - - If the transaction beginning command argument is not - acceptable a 501 failure reply must be returned and the - receiver-SMTP must stay in the same state. If the commands - in a transaction are out of order a 503 failure reply must - be returned and the receiver-SMTP must stay in the same - state. - - The last command in a session must be the QUIT command. The - QUIT command can not be used at any other time in a session. - - 4.1.2. COMMAND SYNTAX - - The commands consist of a command code followed by an argument - field. Command codes are four alphabetic characters. Upper - and lower case alphabetic characters are to be treated - identically. Thus, any of the following may represent the mail - command: - - MAIL Mail mail MaIl mAIl - - This also applies to any symbols representing parameter values, - such as "TO" or "to" for the forward-path. Command codes and - the argument fields are separated by one or more spaces. - However, within the reverse-path and forward-path arguments - case is important. In particular, in some hosts the user - "smith" is different from the user "Smith". - - - - -Postel [Page 27] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - The argument field consists of a variable length character - string ending with the character sequence . The receiver - is to take no action until this sequence is received. - - Square brackets denote an optional argument field. If the - option is not taken, the appropriate default is implied. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Page 28] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - The following are the SMTP commands: - - HELO - - MAIL FROM: - - RCPT TO: - - DATA - - RSET - - SEND FROM: - - SOML FROM: - - SAML FROM: - - VRFY - - EXPN - - HELP [ ] - - NOOP - - QUIT - - TURN - - - - - - - - - - - - - - - - - - - - -Postel [Page 29] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - The syntax of the above argument fields (using BNF notation - where applicable) is given below. The "..." notation indicates - that a field may be repeated one or more times. - - ::= - - ::= - - ::= "<" [ ":" ] ">" - - ::= | "," - - ::= "@" - - ::= | "." - - ::= | "#" | "[" "]" - - ::= "@" - - ::= | - - ::=
- - ::= | - - ::= | - - ::= | | "-" - - ::= | "." - - ::= | - - ::= """ """ - - ::= "\" | "\" | | - - ::= | "\" - - ::= "." "." "." - - ::= | - - ::= - - - - -[Page 30] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - ::= the carriage return character (ASCII code 13) - - ::= the line feed character (ASCII code 10) - - ::= the space character (ASCII code 32) - - ::= one, two, or three digits representing a decimal - integer value in the range 0 through 255 - - ::= any one of the 52 alphabetic characters A through Z - in upper case and a through z in lower case - - ::= any one of the 128 ASCII characters, but not any - or - - ::= any one of the ten digits 0 through 9 - - ::= any one of the 128 ASCII characters except , - , quote ("), or backslash (\) - - ::= any one of the 128 ASCII characters (no exceptions) - - ::= "<" | ">" | "(" | ")" | "[" | "]" | "\" | "." - | "," | ";" | ":" | "@" """ | the control - characters (ASCII codes 0 through 31 inclusive and - 127) - - Note that the backslash, "\", is a quote character, which is - used to indicate that the next character is to be used - literally (instead of its normal interpretation). For example, - "Joe\,Smith" could be used to indicate a single nine character - user field with comma being the fourth character of the field. - - Hosts are generally known by names which are translated to - addresses in each host. Note that the name elements of domains - are the official names -- no use of nicknames or aliases is - allowed. - - Sometimes a host is not known to the translation function and - communication is blocked. To bypass this barrier two numeric - forms are also allowed for host "names". One form is a decimal - integer prefixed by a pound sign, "#", which indicates the - number is the address of the host. Another form is four small - decimal integers separated by dots and enclosed by brackets, - e.g., "[123.255.37.2]", which indicates a 32-bit ARPA Internet - Address in four 8-bit fields. - - - -Postel [Page 31] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - The time stamp line and the return path line are formally - defined as follows: - - ::= "Return-Path:" - - ::= "Received:" - - ::= ";" - - - ::= "FROM" - - ::= "BY" - - ::= [] [] [] [] - - ::= "VIA" - - ::= "WITH" - - ::= "ID" - - ::= "FOR" - - ::= The standard names for links are registered with - the Network Information Center. - - ::= The standard names for protocols are - registered with the Network Information Center. - - ::=
::= the one or two decimal integer day of the month in - the range 1 to 31. - - ::= "JAN" | "FEB" | "MAR" | "APR" | "MAY" | "JUN" | - "JUL" | "AUG" | "SEP" | "OCT" | "NOV" | "DEC" - - ::= the two decimal integer year of the century in the - range 00 to 99. - - - - - -[Page 32] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - ::= the two decimal integer hour of the day in the - range 00 to 24. - - ::= the two decimal integer minute of the hour in the - range 00 to 59. - - ::= the two decimal integer second of the minute in the - range 00 to 59. - - ::= "UT" for Universal Time (the default) or other - time zone designator (as in [2]). - - - - ------------------------------------------------------------- - - Return Path Example - - Return-Path: <@CHARLIE.ARPA,@BAKER.ARPA:JOE@ABLE.ARPA> - - Example 9 - - ------------------------------------------------------------- - - ------------------------------------------------------------- - - Time Stamp Line Example - - Received: FROM ABC.ARPA BY XYZ.ARPA ; 22 OCT 81 09:23:59 PDT - - Received: from ABC.ARPA by XYZ.ARPA via TELENET with X25 - id M12345 for Smith@PDQ.ARPA ; 22 OCT 81 09:23:59 PDT - - Example 10 - - ------------------------------------------------------------- - - - - - - - - - - - - - -Postel [Page 33] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - 4.2. SMTP REPLIES - - Replies to SMTP commands are devised to ensure the synchronization - of requests and actions in the process of mail transfer, and to - guarantee that the sender-SMTP always knows the state of the - receiver-SMTP. Every command must generate exactly one reply. - - The details of the command-reply sequence are made explicit in - Section 5.3 on Sequencing and Section 5.4 State Diagrams. - - An SMTP reply consists of a three digit number (transmitted as - three alphanumeric characters) followed by some text. The number - is intended for use by automata to determine what state to enter - next; the text is meant for the human user. It is intended that - the three digits contain enough encoded information that the - sender-SMTP need not examine the text and may either discard it or - pass it on to the user, as appropriate. In particular, the text - may be receiver-dependent and context dependent, so there are - likely to be varying texts for each reply code. A discussion of - the theory of reply codes is given in Appendix E. Formally, a - reply is defined to be the sequence: a three-digit code, , - one line of text, and , or a multiline reply (as defined in - Appendix E). Only the EXPN and HELP commands are expected to - result in multiline replies in normal circumstances, however - multiline replies are allowed for any command. - - - - - - - - - - - - - - - - - - - - - - - - -[Page 34] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - 4.2.1. REPLY CODES BY FUNCTION GROUPS - - 500 Syntax error, command unrecognized - [This may include errors such as command line too long] - 501 Syntax error in parameters or arguments - 502 Command not implemented - 503 Bad sequence of commands - 504 Command parameter not implemented - - 211 System status, or system help reply - 214 Help message - [Information on how to use the receiver or the meaning of a - particular non-standard command; this reply is useful only - to the human user] - - 220 Service ready - 221 Service closing transmission channel - 421 Service not available, - closing transmission channel - [This may be a reply to any command if the service knows it - must shut down] - - 250 Requested mail action okay, completed - 251 User not local; will forward to - 450 Requested mail action not taken: mailbox unavailable - [E.g., mailbox busy] - 550 Requested action not taken: mailbox unavailable - [E.g., mailbox not found, no access] - 451 Requested action aborted: error in processing - 551 User not local; please try - 452 Requested action not taken: insufficient system storage - 552 Requested mail action aborted: exceeded storage allocation - 553 Requested action not taken: mailbox name not allowed - [E.g., mailbox syntax incorrect] - 354 Start mail input; end with . - 554 Transaction failed - - - - - - - - - - - - - -Postel [Page 35] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - 4.2.2. NUMERIC ORDER LIST OF REPLY CODES - - 211 System status, or system help reply - 214 Help message - [Information on how to use the receiver or the meaning of a - particular non-standard command; this reply is useful only - to the human user] - 220 Service ready - 221 Service closing transmission channel - 250 Requested mail action okay, completed - 251 User not local; will forward to - - 354 Start mail input; end with . - - 421 Service not available, - closing transmission channel - [This may be a reply to any command if the service knows it - must shut down] - 450 Requested mail action not taken: mailbox unavailable - [E.g., mailbox busy] - 451 Requested action aborted: local error in processing - 452 Requested action not taken: insufficient system storage - - 500 Syntax error, command unrecognized - [This may include errors such as command line too long] - 501 Syntax error in parameters or arguments - 502 Command not implemented - 503 Bad sequence of commands - 504 Command parameter not implemented - 550 Requested action not taken: mailbox unavailable - [E.g., mailbox not found, no access] - 551 User not local; please try - 552 Requested mail action aborted: exceeded storage allocation - 553 Requested action not taken: mailbox name not allowed - [E.g., mailbox syntax incorrect] - 554 Transaction failed - - - - - - - - - - - - - -[Page 36] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - 4.3. SEQUENCING OF COMMANDS AND REPLIES - - The communication between the sender and receiver is intended to - be an alternating dialogue, controlled by the sender. As such, - the sender issues a command and the receiver responds with a - reply. The sender must wait for this response before sending - further commands. - - One important reply is the connection greeting. Normally, a - receiver will send a 220 "Service ready" reply when the connection - is completed. The sender should wait for this greeting message - before sending any commands. - - Note: all the greeting type replies have the official name of - the server host as the first word following the reply code. - - For example, - - 220 USC-ISIF.ARPA Service ready - - The table below lists alternative success and failure replies for - each command. These must be strictly adhered to; a receiver may - substitute text in the replies, but the meaning and action implied - by the code numbers and by the specific command reply sequence - cannot be altered. - - COMMAND-REPLY SEQUENCES - - Each command is listed with its possible replies. The prefixes - used before the possible replies are "P" for preliminary (not - used in SMTP), "I" for intermediate, "S" for success, "F" for - failure, and "E" for error. The 421 reply (service not - available, closing transmission channel) may be given to any - command if the SMTP-receiver knows it must shut down. This - listing forms the basis for the State Diagrams in Section 4.4. - - CONNECTION ESTABLISHMENT - S: 220 - F: 421 - HELO - S: 250 - E: 500, 501, 504, 421 - MAIL - S: 250 - F: 552, 451, 452 - E: 500, 501, 421 - - - -Postel [Page 37] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - RCPT - S: 250, 251 - F: 550, 551, 552, 553, 450, 451, 452 - E: 500, 501, 503, 421 - DATA - I: 354 -> data -> S: 250 - F: 552, 554, 451, 452 - F: 451, 554 - E: 500, 501, 503, 421 - RSET - S: 250 - E: 500, 501, 504, 421 - SEND - S: 250 - F: 552, 451, 452 - E: 500, 501, 502, 421 - SOML - S: 250 - F: 552, 451, 452 - E: 500, 501, 502, 421 - SAML - S: 250 - F: 552, 451, 452 - E: 500, 501, 502, 421 - VRFY - S: 250, 251 - F: 550, 551, 553 - E: 500, 501, 502, 504, 421 - EXPN - S: 250 - F: 550 - E: 500, 501, 502, 504, 421 - HELP - S: 211, 214 - E: 500, 501, 502, 504, 421 - NOOP - S: 250 - E: 500, 421 - QUIT - S: 221 - E: 500 - TURN - S: 250 - F: 502 - E: 500, 503 - - - - -[Page 38] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - 4.4. STATE DIAGRAMS - - Following are state diagrams for a simple-minded SMTP - implementation. Only the first digit of the reply codes is used. - There is one state diagram for each group of SMTP commands. The - command groupings were determined by constructing a model for each - command and then collecting together the commands with - structurally identical models. - - For each command there are three possible outcomes: "success" - (S), "failure" (F), and "error" (E). In the state diagrams below - we use the symbol B for "begin", and the symbol W for "wait for - reply". - - First, the diagram that represents most of the SMTP commands: - - - 1,3 +---+ - ----------->| E | - | +---+ - | - +---+ cmd +---+ 2 +---+ - | B |---------->| W |---------->| S | - +---+ +---+ +---+ - | - | 4,5 +---+ - ----------->| F | - +---+ - - - This diagram models the commands: - - HELO, MAIL, RCPT, RSET, SEND, SOML, SAML, VRFY, EXPN, HELP, - NOOP, QUIT, TURN. - - - - - - - - - - - - - - - -Postel [Page 39] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - A more complex diagram models the DATA command: - - - +---+ DATA +---+ 1,2 +---+ - | B |---------->| W |-------------------->| E | - +---+ +---+ ------------>+---+ - 3| |4,5 | - | | | - -------------- ----- | - | | | +---+ - | ---------- -------->| S | - | | | | +---+ - | | ------------ - | | | | - V 1,3| |2 | - +---+ data +---+ --------------->+---+ - | |---------->| W | | F | - +---+ +---+-------------------->+---+ - 4,5 - - - Note that the "data" here is a series of lines sent from the - sender to the receiver with no response expected until the last - line is sent. - - - - - - - - - - - - - - - - - - - - - - - - - -[Page 40] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - 4.5. DETAILS - - 4.5.1. MINIMUM IMPLEMENTATION - - In order to make SMTP workable, the following minimum - implementation is required for all receivers: - - COMMANDS -- HELO - MAIL - RCPT - DATA - RSET - NOOP - QUIT - - 4.5.2. TRANSPARENCY - - Without some provision for data transparency the character - sequence "." ends the mail text and cannot be sent - by the user. In general, users are not aware of such - "forbidden" sequences. To allow all user composed text to be - transmitted transparently the following procedures are used. - - 1. Before sending a line of mail text the sender-SMTP checks - the first character of the line. If it is a period, one - additional period is inserted at the beginning of the line. - - 2. When a line of mail text is received by the receiver-SMTP - it checks the line. If the line is composed of a single - period it is the end of mail. If the first character is a - period and there are other characters on the line, the first - character is deleted. - - The mail data may contain any of the 128 ASCII characters. All - characters are to be delivered to the recipient's mailbox - including format effectors and other control characters. If - the transmission channel provides an 8-bit byte (octets) data - stream, the 7-bit ASCII codes are transmitted right justified - in the octets with the high order bits cleared to zero. - - In some systems it may be necessary to transform the data as - it is received and stored. This may be necessary for hosts - that use a different character set than ASCII as their local - character set, or that store data in records rather than - - - - - -Postel [Page 41] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - strings. If such transforms are necessary, they must be - reversible -- especially if such transforms are applied to - mail being relayed. - - 4.5.3. SIZES - - There are several objects that have required minimum maximum - sizes. That is, every implementation must be able to receive - objects of at least these sizes, but must not send objects - larger than these sizes. - - - **************************************************** - * * - * TO THE MAXIMUM EXTENT POSSIBLE, IMPLEMENTATION * - * TECHNIQUES WHICH IMPOSE NO LIMITS ON THE LENGTH * - * OF THESE OBJECTS SHOULD BE USED. * - * * - **************************************************** - - user - - The maximum total length of a user name is 64 characters. - - domain - - The maximum total length of a domain name or number is 64 - characters. - - path - - The maximum total length of a reverse-path or - forward-path is 256 characters (including the punctuation - and element separators). - - command line - - The maximum total length of a command line including the - command word and the is 512 characters. - - reply line - - The maximum total length of a reply line including the - reply code and the is 512 characters. - - - - - -[Page 42] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - text line - - The maximum total length of a text line including the - is 1000 characters (but not counting the leading - dot duplicated for transparency). - - recipients buffer - - The maximum total number of recipients that must be - buffered is 100 recipients. - - - **************************************************** - * * - * TO THE MAXIMUM EXTENT POSSIBLE, IMPLEMENTATION * - * TECHNIQUES WHICH IMPOSE NO LIMITS ON THE LENGTH * - * OF THESE OBJECTS SHOULD BE USED. * - * * - **************************************************** - - Errors due to exceeding these limits may be reported by using - the reply codes, for example: - - 500 Line too long. - - 501 Path too long - - 552 Too many recipients. - - 552 Too much mail data. - - - - - - - - - - - - - - - - - - - -Postel [Page 43] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - -APPENDIX A - - TCP Transport service - - The Transmission Control Protocol [3] is used in the ARPA - Internet, and in any network following the US DoD standards for - internetwork protocols. - - Connection Establishment - - The SMTP transmission channel is a TCP connection established - between the sender process port U and the receiver process port - L. This single full duplex connection is used as the - transmission channel. This protocol is assigned the service - port 25 (31 octal), that is L=25. - - Data Transfer - - The TCP connection supports the transmission of 8-bit bytes. - The SMTP data is 7-bit ASCII characters. Each character is - transmitted as an 8-bit byte with the high-order bit cleared to - zero. - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Page 44] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - -APPENDIX B - - NCP Transport service - - The ARPANET Host-to-Host Protocol [4] (implemented by the Network - Control Program) may be used in the ARPANET. - - Connection Establishment - - The SMTP transmission channel is established via NCP between - the sender process socket U and receiver process socket L. The - Initial Connection Protocol [5] is followed resulting in a pair - of simplex connections. This pair of connections is used as - the transmission channel. This protocol is assigned the - contact socket 25 (31 octal), that is L=25. - - Data Transfer - - The NCP data connections are established in 8-bit byte mode. - The SMTP data is 7-bit ASCII characters. Each character is - transmitted as an 8-bit byte with the high-order bit cleared to - zero. - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel [Page 45] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - -APPENDIX C - - NITS - - The Network Independent Transport Service [6] may be used. - - Connection Establishment - - The SMTP transmission channel is established via NITS between - the sender process and receiver process. The sender process - executes the CONNECT primitive, and the waiting receiver - process executes the ACCEPT primitive. - - Data Transfer - - The NITS connection supports the transmission of 8-bit bytes. - The SMTP data is 7-bit ASCII characters. Each character is - transmitted as an 8-bit byte with the high-order bit cleared to - zero. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Page 46] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - -APPENDIX D - - X.25 Transport service - - It may be possible to use the X.25 service [7] as provided by the - Public Data Networks directly, however, it is suggested that a - reliable end-to-end protocol such as TCP be used on top of X.25 - connections. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel [Page 47] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - -APPENDIX E - - Theory of Reply Codes - - The three digits of the reply each have a special significance. - The first digit denotes whether the response is good, bad or - incomplete. An unsophisticated sender-SMTP will be able to - determine its next action (proceed as planned, redo, retrench, - etc.) by simply examining this first digit. A sender-SMTP that - wants to know approximately what kind of error occurred (e.g., - mail system error, command syntax error) may examine the second - digit, reserving the third digit for the finest gradation of - information. - - There are five values for the first digit of the reply code: - - 1yz Positive Preliminary reply - - The command has been accepted, but the requested action - is being held in abeyance, pending confirmation of the - information in this reply. The sender-SMTP should send - another command specifying whether to continue or abort - the action. - - [Note: SMTP does not have any commands that allow this - type of reply, and so does not have the continue or - abort commands.] - - 2yz Positive Completion reply - - The requested action has been successfully completed. A - new request may be initiated. - - 3yz Positive Intermediate reply - - The command has been accepted, but the requested action - is being held in abeyance, pending receipt of further - information. The sender-SMTP should send another command - specifying this information. This reply is used in - command sequence groups. - - 4yz Transient Negative Completion reply - - The command was not accepted and the requested action did - not occur. However, the error condition is temporary and - the action may be requested again. The sender should - - - -[Page 48] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - return to the beginning of the command sequence (if any). - It is difficult to assign a meaning to "transient" when - two different sites (receiver- and sender- SMTPs) must - agree on the interpretation. Each reply in this category - might have a different time value, but the sender-SMTP is - encouraged to try again. A rule of thumb to determine if - a reply fits into the 4yz or the 5yz category (see below) - is that replies are 4yz if they can be repeated without - any change in command form or in properties of the sender - or receiver. (E.g., the command is repeated identically - and the receiver does not put up a new implementation.) - - 5yz Permanent Negative Completion reply - - The command was not accepted and the requested action did - not occur. The sender-SMTP is discouraged from repeating - the exact request (in the same sequence). Even some - "permanent" error conditions can be corrected, so the - human user may want to direct the sender-SMTP to - reinitiate the command sequence by direct action at some - point in the future (e.g., after the spelling has been - changed, or the user has altered the account status). - - The second digit encodes responses in specific categories: - - x0z Syntax -- These replies refer to syntax errors, - syntactically correct commands that don't fit any - functional category, and unimplemented or superfluous - commands. - - x1z Information -- These are replies to requests for - information, such as status or help. - - x2z Connections -- These are replies referring to the - transmission channel. - - x3z Unspecified as yet. - - x4z Unspecified as yet. - - x5z Mail system -- These replies indicate the status of - the receiver mail system vis-a-vis the requested - transfer or other mail system action. - - The third digit gives a finer gradation of meaning in each - category specified by the second digit. The list of replies - - - -Postel [Page 49] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - illustrates this. Each reply text is recommended rather than - mandatory, and may even change according to the command with - which it is associated. On the other hand, the reply codes - must strictly follow the specifications in this section. - Receiver implementations should not invent new codes for - slightly different situations from the ones described here, but - rather adapt codes already defined. - - For example, a command such as NOOP whose successful execution - does not offer the sender-SMTP any new information will return - a 250 reply. The response is 502 when the command requests an - unimplemented non-site-specific action. A refinement of that - is the 504 reply for a command that is implemented, but that - requests an unimplemented parameter. - - The reply text may be longer than a single line; in these cases - the complete text must be marked so the sender-SMTP knows when it - can stop reading the reply. This requires a special format to - indicate a multiple line reply. - - The format for multiline replies requires that every line, - except the last, begin with the reply code, followed - immediately by a hyphen, "-" (also known as minus), followed by - text. The last line will begin with the reply code, followed - immediately by , optionally some text, and . - - For example: - 123-First line - 123-Second line - 123-234 text beginning with numbers - 123 The last line - - In many cases the sender-SMTP then simply needs to search for - the reply code followed by at the beginning of a line, and - ignore all preceding lines. In a few cases, there is important - data for the sender in the reply "text". The sender will know - these cases from the current context. - - - - - - - - - - - - -[Page 50] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - -APPENDIX F - - Scenarios - - This section presents complete scenarios of several types of SMTP - sessions. - - A Typical SMTP Transaction Scenario - - This SMTP example shows mail sent by Smith at host USC-ISIF, to - Jones, Green, and Brown at host BBN-UNIX. Here we assume that - host USC-ISIF contacts host BBN-UNIX directly. The mail is - accepted for Jones and Brown. Green does not have a mailbox at - host BBN-UNIX. - - ------------------------------------------------------------- - - R: 220 BBN-UNIX.ARPA Simple Mail Transfer Service Ready - S: HELO USC-ISIF.ARPA - R: 250 BBN-UNIX.ARPA - - S: MAIL FROM: - R: 250 OK - - S: RCPT TO: - R: 250 OK - - S: RCPT TO: - R: 550 No such user here - - S: RCPT TO: - R: 250 OK - - S: DATA - R: 354 Start mail input; end with . - S: Blah blah blah... - S: ...etc. etc. etc. - S: . - R: 250 OK - - S: QUIT - R: 221 BBN-UNIX.ARPA Service closing transmission channel - - Scenario 1 - - ------------------------------------------------------------- - - - -Postel [Page 51] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - Aborted SMTP Transaction Scenario - - ------------------------------------------------------------- - - R: 220 MIT-Multics.ARPA Simple Mail Transfer Service Ready - S: HELO ISI-VAXA.ARPA - R: 250 MIT-Multics.ARPA - - S: MAIL FROM: - R: 250 OK - - S: RCPT TO: - R: 250 OK - - S: RCPT TO: - R: 550 No such user here - - S: RSET - R: 250 OK - - S: QUIT - R: 221 MIT-Multics.ARPA Service closing transmission channel - - Scenario 2 - - ------------------------------------------------------------- - - - - - - - - - - - - - - - - - - - - - - - -[Page 52] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - Relayed Mail Scenario - - ------------------------------------------------------------- - - Step 1 -- Source Host to Relay Host - - R: 220 USC-ISIE.ARPA Simple Mail Transfer Service Ready - S: HELO MIT-AI.ARPA - R: 250 USC-ISIE.ARPA - - S: MAIL FROM: - R: 250 OK - - S: RCPT TO:<@USC-ISIE.ARPA:Jones@BBN-VAX.ARPA> - R: 250 OK - - S: DATA - R: 354 Start mail input; end with . - S: Date: 2 Nov 81 22:33:44 - S: From: John Q. Public - S: Subject: The Next Meeting of the Board - S: To: Jones@BBN-Vax.ARPA - S: - S: Bill: - S: The next meeting of the board of directors will be - S: on Tuesday. - S: John. - S: . - R: 250 OK - - S: QUIT - R: 221 USC-ISIE.ARPA Service closing transmission channel - - - - - - - - - - - - - - - - - -Postel [Page 53] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - Step 2 -- Relay Host to Destination Host - - R: 220 BBN-VAX.ARPA Simple Mail Transfer Service Ready - S: HELO USC-ISIE.ARPA - R: 250 BBN-VAX.ARPA - - S: MAIL FROM:<@USC-ISIE.ARPA:JQP@MIT-AI.ARPA> - R: 250 OK - - S: RCPT TO: - R: 250 OK - - S: DATA - R: 354 Start mail input; end with . - S: Received: from MIT-AI.ARPA by USC-ISIE.ARPA ; - 2 Nov 81 22:40:10 UT - S: Date: 2 Nov 81 22:33:44 - S: From: John Q. Public - S: Subject: The Next Meeting of the Board - S: To: Jones@BBN-Vax.ARPA - S: - S: Bill: - S: The next meeting of the board of directors will be - S: on Tuesday. - S: John. - S: . - R: 250 OK - - S: QUIT - R: 221 USC-ISIE.ARPA Service closing transmission channel - - Scenario 3 - - ------------------------------------------------------------- - - - - - - - - - - - - - - - -[Page 54] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - Verifying and Sending Scenario - - ------------------------------------------------------------- - - R: 220 SU-SCORE.ARPA Simple Mail Transfer Service Ready - S: HELO MIT-MC.ARPA - R: 250 SU-SCORE.ARPA - - S: VRFY Crispin - R: 250 Mark Crispin - - S: SEND FROM: - R: 250 OK - - S: RCPT TO: - R: 250 OK - - S: DATA - R: 354 Start mail input; end with . - S: Blah blah blah... - S: ...etc. etc. etc. - S: . - R: 250 OK - - S: QUIT - R: 221 SU-SCORE.ARPA Service closing transmission channel - - Scenario 4 - - ------------------------------------------------------------- - - - - - - - - - - - - - - - - - - - -Postel [Page 55] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - Sending and Mailing Scenarios - - First the user's name is verified, then an attempt is made to - send to the user's terminal. When that fails, the messages is - mailed to the user's mailbox. - - ------------------------------------------------------------- - - R: 220 SU-SCORE.ARPA Simple Mail Transfer Service Ready - S: HELO MIT-MC.ARPA - R: 250 SU-SCORE.ARPA - - S: VRFY Crispin - R: 250 Mark Crispin - - S: SEND FROM: - R: 250 OK - - S: RCPT TO: - R: 450 User not active now - - S: RSET - R: 250 OK - - S: MAIL FROM: - R: 250 OK - - S: RCPT TO: - R: 250 OK - - S: DATA - R: 354 Start mail input; end with . - S: Blah blah blah... - S: ...etc. etc. etc. - S: . - R: 250 OK - - S: QUIT - R: 221 SU-SCORE.ARPA Service closing transmission channel - - Scenario 5 - - ------------------------------------------------------------- - - - - - - -[Page 56] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - Doing the preceding scenario more efficiently. - - ------------------------------------------------------------- - - R: 220 SU-SCORE.ARPA Simple Mail Transfer Service Ready - S: HELO MIT-MC.ARPA - R: 250 SU-SCORE.ARPA - - S: VRFY Crispin - R: 250 Mark Crispin - - S: SOML FROM: - R: 250 OK - - S: RCPT TO: - R: 250 User not active now, so will do mail. - - S: DATA - R: 354 Start mail input; end with . - S: Blah blah blah... - S: ...etc. etc. etc. - S: . - R: 250 OK - - S: QUIT - R: 221 SU-SCORE.ARPA Service closing transmission channel - - Scenario 6 - - ------------------------------------------------------------- - - - - - - - - - - - - - - - - - - - -Postel [Page 57] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - Mailing List Scenario - - First each of two mailing lists are expanded in separate sessions - with different hosts. Then the message is sent to everyone that - appeared on either list (but no duplicates) via a relay host. - - ------------------------------------------------------------- - - Step 1 -- Expanding the First List - - R: 220 MIT-AI.ARPA Simple Mail Transfer Service Ready - S: HELO SU-SCORE.ARPA - R: 250 MIT-AI.ARPA - - S: EXPN Example-People - R: 250- - R: 250-Fred Fonebone - R: 250-Xenon Y. Zither - R: 250-Quincy Smith <@USC-ISIF.ARPA:Q-Smith@ISI-VAXA.ARPA> - R: 250- - R: 250 - - S: QUIT - R: 221 MIT-AI.ARPA Service closing transmission channel - - - - - - - - - - - - - - - - - - - - - - - - - -[Page 58] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - Step 2 -- Expanding the Second List - - R: 220 MIT-MC.ARPA Simple Mail Transfer Service Ready - S: HELO SU-SCORE.ARPA - R: 250 MIT-MC.ARPA - - S: EXPN Interested-Parties - R: 250-Al Calico - R: 250- - R: 250-Quincy Smith <@USC-ISIF.ARPA:Q-Smith@ISI-VAXA.ARPA> - R: 250- - R: 250 - - S: QUIT - R: 221 MIT-MC.ARPA Service closing transmission channel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Postel [Page 59] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - Step 3 -- Mailing to All via a Relay Host - - R: 220 USC-ISIE.ARPA Simple Mail Transfer Service Ready - S: HELO SU-SCORE.ARPA - R: 250 USC-ISIE.ARPA - - S: MAIL FROM: - R: 250 OK - S: RCPT TO:<@USC-ISIE.ARPA:ABC@MIT-MC.ARPA> - R: 250 OK - S: RCPT TO:<@USC-ISIE.ARPA:Fonebone@USC-ISIQA.ARPA> - R: 250 OK - S: RCPT TO:<@USC-ISIE.ARPA:XYZ@MIT-AI.ARPA> - R: 250 OK - S: RCPT - TO:<@USC-ISIE.ARPA,@USC-ISIF.ARPA:Q-Smith@ISI-VAXA.ARPA> - R: 250 OK - S: RCPT TO:<@USC-ISIE.ARPA:joe@FOO-UNIX.ARPA> - R: 250 OK - S: RCPT TO:<@USC-ISIE.ARPA:xyz@BAR-UNIX.ARPA> - R: 250 OK - S: RCPT TO:<@USC-ISIE.ARPA:fred@BBN-UNIX.ARPA> - R: 250 OK - - S: DATA - R: 354 Start mail input; end with . - S: Blah blah blah... - S: ...etc. etc. etc. - S: . - R: 250 OK - - S: QUIT - R: 221 USC-ISIE.ARPA Service closing transmission channel - - Scenario 7 - - ------------------------------------------------------------- - - - - - - - - - - - - -[Page 60] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - Forwarding Scenarios - - ------------------------------------------------------------- - - R: 220 USC-ISIF.ARPA Simple Mail Transfer Service Ready - S: HELO LBL-UNIX.ARPA - R: 250 USC-ISIF.ARPA - - S: MAIL FROM: - R: 250 OK - - S: RCPT TO: - R: 251 User not local; will forward to - - S: DATA - R: 354 Start mail input; end with . - S: Blah blah blah... - S: ...etc. etc. etc. - S: . - R: 250 OK - - S: QUIT - R: 221 USC-ISIF.ARPA Service closing transmission channel - - Scenario 8 - - ------------------------------------------------------------- - - - - - - - - - - - - - - - - - - - - - - -Postel [Page 61] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - ------------------------------------------------------------- - - Step 1 -- Trying the Mailbox at the First Host - - R: 220 USC-ISIF.ARPA Simple Mail Transfer Service Ready - S: HELO LBL-UNIX.ARPA - R: 250 USC-ISIF.ARPA - - S: MAIL FROM: - R: 250 OK - - S: RCPT TO: - R: 251 User not local; will forward to - - S: RSET - R: 250 OK - - S: QUIT - R: 221 USC-ISIF.ARPA Service closing transmission channel - - Step 2 -- Delivering the Mail at the Second Host - - R: 220 USC-ISI.ARPA Simple Mail Transfer Service Ready - S: HELO LBL-UNIX.ARPA - R: 250 USC-ISI.ARPA - - S: MAIL FROM: - R: 250 OK - - S: RCPT TO: - R: OK - - S: DATA - R: 354 Start mail input; end with . - S: Blah blah blah... - S: ...etc. etc. etc. - S: . - R: 250 OK - - S: QUIT - R: 221 USC-ISI.ARPA Service closing transmission channel - - Scenario 9 - - ------------------------------------------------------------- - - - - -[Page 62] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - Too Many Recipients Scenario - - ------------------------------------------------------------- - - R: 220 BERKELEY.ARPA Simple Mail Transfer Service Ready - S: HELO USC-ISIF.ARPA - R: 250 BERKELEY.ARPA - - S: MAIL FROM: - R: 250 OK - - S: RCPT TO: - R: 250 OK - - S: RCPT TO: - R: 552 Recipient storage full, try again in another transaction - - S: DATA - R: 354 Start mail input; end with . - S: Blah blah blah... - S: ...etc. etc. etc. - S: . - R: 250 OK - - S: MAIL FROM: - R: 250 OK - - S: RCPT TO: - R: 250 OK - - S: DATA - R: 354 Start mail input; end with . - S: Blah blah blah... - S: ...etc. etc. etc. - S: . - R: 250 OK - - S: QUIT - R: 221 BERKELEY.ARPA Service closing transmission channel - - Scenario 10 - - ------------------------------------------------------------- - - Note that a real implementation must handle many recipients as - specified in Section 4.5.3. - - - -Postel [Page 63] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - -GLOSSARY - - ASCII - - American Standard Code for Information Interchange [1]. - - command - - A request for a mail service action sent by the sender-SMTP to the - receiver-SMTP. - - domain - - The hierarchially structured global character string address of a - host computer in the mail system. - - end of mail data indication - - A special sequence of characters that indicates the end of the - mail data. In particular, the five characters carriage return, - line feed, period, carriage return, line feed, in that order. - - host - - A computer in the internetwork environment on which mailboxes or - SMTP processes reside. - - line - - A a sequence of ASCII characters ending with a . - - mail data - - A sequence of ASCII characters of arbitrary length, which conforms - to the standard set in the Standard for the Format of ARPA - Internet Text Messages (RFC 822 [2]). - - mailbox - - A character string (address) which identifies a user to whom mail - is to be sent. Mailbox normally consists of the host and user - specifications. The standard mailbox naming convention is defined - to be "user@domain". Additionally, the "container" in which mail - is stored. - - - - - -[Page 64] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - - receiver-SMTP process - - A process which transfers mail in cooperation with a sender-SMTP - process. It waits for a connection to be established via the - transport service. It receives SMTP commands from the - sender-SMTP, sends replies, and performs the specified operations. - - reply - - A reply is an acknowledgment (positive or negative) sent from - receiver to sender via the transmission channel in response to a - command. The general form of a reply is a completion code - (including error codes) followed by a text string. The codes are - for use by programs and the text is usually intended for human - users. - - sender-SMTP process - - A process which transfers mail in cooperation with a receiver-SMTP - process. A local language may be used in the user interface - command/reply dialogue. The sender-SMTP initiates the transport - service connection. It initiates SMTP commands, receives replies, - and governs the transfer of mail. - - session - - The set of exchanges that occur while the transmission channel is - open. - - transaction - - The set of exchanges required for one message to be transmitted - for one or more recipients. - - transmission channel - - A full-duplex communication path between a sender-SMTP and a - receiver-SMTP for the exchange of commands, replies, and mail - text. - - transport service - - Any reliable stream-oriented data communication services. For - example, NCP, TCP, NITS. - - - - - -Postel [Page 65] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - user - - A human being (or a process on behalf of a human being) wishing to - obtain mail transfer service. In addition, a recipient of - computer mail. - - word - - A sequence of printing characters. - - - - The characters carriage return and line feed (in that order). - - - - The space character. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Page 66] Postel - - - -RFC 821 August 1982 - Simple Mail Transfer Protocol - - - -REFERENCES - - [1] ASCII - - ASCII, "USA Code for Information Interchange", United States of - America Standards Institute, X3.4, 1968. Also in: Feinler, E. - and J. Postel, eds., "ARPANET Protocol Handbook", NIC 7104, for - the Defense Communications Agency by SRI International, Menlo - Park, California, Revised January 1978. - - [2] RFC 822 - - Crocker, D., "Standard for the Format of ARPA Internet Text - Messages," RFC 822, Department of Electrical Engineering, - University of Delaware, August 1982. - - [3] TCP - - Postel, J., ed., "Transmission Control Protocol - DARPA Internet - Program Protocol Specification", RFC 793, USC/Information Sciences - Institute, NTIS AD Number A111091, September 1981. Also in: - Feinler, E. and J. Postel, eds., "Internet Protocol Transition - Workbook", SRI International, Menlo Park, California, March 1982. - - [4] NCP - - McKenzie,A., "Host/Host Protocol for the ARPA Network", NIC 8246, - January 1972. Also in: Feinler, E. and J. Postel, eds., "ARPANET - Protocol Handbook", NIC 7104, for the Defense Communications - Agency by SRI International, Menlo Park, California, Revised - January 1978. - - [5] Initial Connection Protocol - - Postel, J., "Official Initial Connection Protocol", NIC 7101, - 11 June 1971. Also in: Feinler, E. and J. Postel, eds., "ARPANET - Protocol Handbook", NIC 7104, for the Defense Communications - Agency by SRI International, Menlo Park, California, Revised - January 1978. - - [6] NITS - - PSS/SG3, "A Network Independent Transport Service", Study Group 3, - The Post Office PSS Users Group, February 1980. Available from - the DCPU, National Physical Laboratory, Teddington, UK. - - - - -Postel [Page 67] - - - -August 1982 RFC 821 -Simple Mail Transfer Protocol - - - - [7] X.25 - - CCITT, "Recommendation X.25 - Interface Between Data Terminal - Equipment (DTE) and Data Circuit-terminating Equipment (DCE) for - Terminals Operating in the Packet Mode on Public Data Networks," - CCITT Orange Book, Vol. VIII.2, International Telephone and - Telegraph Consultative Committee, Geneva, 1976. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Page 68] Postel - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc0822.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc0822.txt deleted file mode 100644 index 35b09a3c..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc0822.txt +++ /dev/null @@ -1,2901 +0,0 @@ - - - - - - - RFC # 822 - - Obsoletes: RFC #733 (NIC #41952) - - - - - - - - - - - - - STANDARD FOR THE FORMAT OF - - ARPA INTERNET TEXT MESSAGES - - - - - - - August 13, 1982 - - - - - - - Revised by - - David H. Crocker - - - Dept. of Electrical Engineering - University of Delaware, Newark, DE 19711 - Network: DCrocker @ UDel-Relay - - - - - - - - - - - - - - - - Standard for ARPA Internet Text Messages - - - TABLE OF CONTENTS - - - PREFACE .................................................... ii - - 1. INTRODUCTION ........................................... 1 - - 1.1. Scope ............................................ 1 - 1.2. Communication Framework .......................... 2 - - 2. NOTATIONAL CONVENTIONS ................................. 3 - - 3. LEXICAL ANALYSIS OF MESSAGES ........................... 5 - - 3.1. General Description .............................. 5 - 3.2. Header Field Definitions ......................... 9 - 3.3. Lexical Tokens ................................... 10 - 3.4. Clarifications ................................... 11 - - 4. MESSAGE SPECIFICATION .................................. 17 - - 4.1. Syntax ........................................... 17 - 4.2. Forwarding ....................................... 19 - 4.3. Trace Fields ..................................... 20 - 4.4. Originator Fields ................................ 21 - 4.5. Receiver Fields .................................. 23 - 4.6. Reference Fields ................................. 23 - 4.7. Other Fields ..................................... 24 - - 5. DATE AND TIME SPECIFICATION ............................ 26 - - 5.1. Syntax ........................................... 26 - 5.2. Semantics ........................................ 26 - - 6. ADDRESS SPECIFICATION .................................. 27 - - 6.1. Syntax ........................................... 27 - 6.2. Semantics ........................................ 27 - 6.3. Reserved Address ................................. 33 - - 7. BIBLIOGRAPHY ........................................... 34 - - - APPENDIX - - A. EXAMPLES ............................................... 36 - B. SIMPLE FIELD PARSING ................................... 40 - C. DIFFERENCES FROM RFC #733 .............................. 41 - D. ALPHABETICAL LISTING OF SYNTAX RULES ................... 44 - - - August 13, 1982 - i - RFC #822 - - - - - Standard for ARPA Internet Text Messages - - - PREFACE - - - By 1977, the Arpanet employed several informal standards for - the text messages (mail) sent among its host computers. It was - felt necessary to codify these practices and provide for those - features that seemed imminent. The result of that effort was - Request for Comments (RFC) #733, "Standard for the Format of ARPA - Network Text Message", by Crocker, Vittal, Pogran, and Henderson. - The specification attempted to avoid major changes in existing - software, while permitting several new features. - - This document revises the specifications in RFC #733, in - order to serve the needs of the larger and more complex ARPA - Internet. Some of RFC #733's features failed to gain adequate - acceptance. In order to simplify the standard and the software - that follows it, these features have been removed. A different - addressing scheme is used, to handle the case of inter-network - mail; and the concept of re-transmission has been introduced. - - This specification is intended for use in the ARPA Internet. - However, an attempt has been made to free it of any dependence on - that environment, so that it can be applied to other network text - message systems. - - The specification of RFC #733 took place over the course of - one year, using the ARPANET mail environment, itself, to provide - an on-going forum for discussing the capabilities to be included. - More than twenty individuals, from across the country, partici- - pated in the original discussion. The development of this - revised specification has, similarly, utilized network mail-based - group discussion. Both specification efforts greatly benefited - from the comments and ideas of the participants. - - The syntax of the standard, in RFC #733, was originally - specified in the Backus-Naur Form (BNF) meta-language. Ken L. - Harrenstien, of SRI International, was responsible for re-coding - the BNF into an augmented BNF that makes the representation - smaller and easier to understand. - - - - - - - - - - - - - August 13, 1982 - ii - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 1. INTRODUCTION - - 1.1. SCOPE - - This standard specifies a syntax for text messages that are - sent among computer users, within the framework of "electronic - mail". The standard supersedes the one specified in ARPANET - Request for Comments #733, "Standard for the Format of ARPA Net- - work Text Messages". - - In this context, messages are viewed as having an envelope - and contents. The envelope contains whatever information is - needed to accomplish transmission and delivery. The contents - compose the object to be delivered to the recipient. This stan- - dard applies only to the format and some of the semantics of mes- - sage contents. It contains no specification of the information - in the envelope. - - However, some message systems may use information from the - contents to create the envelope. It is intended that this stan- - dard facilitate the acquisition of such information by programs. - - Some message systems may store messages in formats that - differ from the one specified in this standard. This specifica- - tion is intended strictly as a definition of what message content - format is to be passed BETWEEN hosts. - - Note: This standard is NOT intended to dictate the internal for- - mats used by sites, the specific message system features - that they are expected to support, or any of the charac- - teristics of user interface programs that create or read - messages. - - A distinction should be made between what the specification - REQUIRES and what it ALLOWS. Messages can be made complex and - rich with formally-structured components of information or can be - kept small and simple, with a minimum of such information. Also, - the standard simplifies the interpretation of differing visual - formats in messages; only the visual aspect of a message is - affected and not the interpretation of information within it. - Implementors may choose to retain such visual distinctions. - - The formal definition is divided into four levels. The bot- - tom level describes the meta-notation used in this document. The - second level describes basic lexical analyzers that feed tokens - to higher-level parsers. Next is an overall specification for - messages; it permits distinguishing individual fields. Finally, - there is definition of the contents of several structured fields. - - - - August 13, 1982 - 1 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 1.2. COMMUNICATION FRAMEWORK - - Messages consist of lines of text. No special provisions - are made for encoding drawings, facsimile, speech, or structured - text. No significant consideration has been given to questions - of data compression or to transmission and storage efficiency, - and the standard tends to be free with the number of bits con- - sumed. For example, field names are specified as free text, - rather than special terse codes. - - A general "memo" framework is used. That is, a message con- - sists of some information in a rigid format, followed by the main - part of the message, with a format that is not specified in this - document. The syntax of several fields of the rigidly-formated - ("headers") section is defined in this specification; some of - these fields must be included in all messages. - - The syntax that distinguishes between header fields is - specified separately from the internal syntax for particular - fields. This separation is intended to allow simple parsers to - operate on the general structure of messages, without concern for - the detailed structure of individual header fields. Appendix B - is provided to facilitate construction of these parsers. - - In addition to the fields specified in this document, it is - expected that other fields will gain common use. As necessary, - the specifications for these "extension-fields" will be published - through the same mechanism used to publish this document. Users - may also wish to extend the set of fields that they use - privately. Such "user-defined fields" are permitted. - - The framework severely constrains document tone and appear- - ance and is primarily useful for most intra-organization communi- - cations and well-structured inter-organization communication. - It also can be used for some types of inter-process communica- - tion, such as simple file transfer and remote job entry. A more - robust framework might allow for multi-font, multi-color, multi- - dimension encoding of information. A less robust one, as is - present in most single-machine message systems, would more - severely constrain the ability to add fields and the decision to - include specific fields. In contrast with paper-based communica- - tion, it is interesting to note that the RECEIVER of a message - can exercise an extraordinary amount of control over the - message's appearance. The amount of actual control available to - message receivers is contingent upon the capabilities of their - individual message systems. - - - - - - August 13, 1982 - 2 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 2. NOTATIONAL CONVENTIONS - - This specification uses an augmented Backus-Naur Form (BNF) - notation. The differences from standard BNF involve naming rules - and indicating repetition and "local" alternatives. - - 2.1. RULE NAMING - - Angle brackets ("<", ">") are not used, in general. The - name of a rule is simply the name itself, rather than "". - Quotation-marks enclose literal text (which may be upper and/or - lower case). Certain basic rules are in uppercase, such as - SPACE, TAB, CRLF, DIGIT, ALPHA, etc. Angle brackets are used in - rule definitions, and in the rest of this document, whenever - their presence will facilitate discerning the use of rule names. - - 2.2. RULE1 / RULE2: ALTERNATIVES - - Elements separated by slash ("/") are alternatives. There- - fore "foo / bar" will accept foo or bar. - - 2.3. (RULE1 RULE2): LOCAL ALTERNATIVES - - Elements enclosed in parentheses are treated as a single - element. Thus, "(elem (foo / bar) elem)" allows the token - sequences "elem foo elem" and "elem bar elem". - - 2.4. *RULE: REPETITION - - The character "*" preceding an element indicates repetition. - The full form is: - - *element - - indicating at least and at most occurrences of element. - Default values are 0 and infinity so that "*(element)" allows any - number, including zero; "1*element" requires at least one; and - "1*2element" allows one or two. - - 2.5. [RULE]: OPTIONAL - - Square brackets enclose optional elements; "[foo bar]" is - equivalent to "*1(foo bar)". - - 2.6. NRULE: SPECIFIC REPETITION - - "(element)" is equivalent to "*(element)"; that is, - exactly occurrences of (element). Thus 2DIGIT is a 2-digit - number, and 3ALPHA is a string of three alphabetic characters. - - - August 13, 1982 - 3 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 2.7. #RULE: LISTS - - A construct "#" is defined, similar to "*", as follows: - - #element - - indicating at least and at most elements, each separated - by one or more commas (","). This makes the usual form of lists - very easy; a rule such as '(element *("," element))' can be shown - as "1#element". Wherever this construct is used, null elements - are allowed, but do not contribute to the count of elements - present. That is, "(element),,(element)" is permitted, but - counts as only two elements. Therefore, where at least one ele- - ment is required, at least one non-null element must be present. - Default values are 0 and infinity so that "#(element)" allows any - number, including zero; "1#element" requires at least one; and - "1#2element" allows one or two. - - 2.8. ; COMMENTS - - A semi-colon, set off some distance to the right of rule - text, starts a comment that continues to the end of line. This - is a simple way of including useful notes in parallel with the - specifications. - - - - - - - - - - - - - - - - - - - - - - - - - - - - August 13, 1982 - 4 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 3. LEXICAL ANALYSIS OF MESSAGES - - 3.1. GENERAL DESCRIPTION - - A message consists of header fields and, optionally, a body. - The body is simply a sequence of lines containing ASCII charac- - ters. It is separated from the headers by a null line (i.e., a - line with nothing preceding the CRLF). - - 3.1.1. LONG HEADER FIELDS - - Each header field can be viewed as a single, logical line of - ASCII characters, comprising a field-name and a field-body. - For convenience, the field-body portion of this conceptual - entity can be split into a multiple-line representation; this - is called "folding". The general rule is that wherever there - may be linear-white-space (NOT simply LWSP-chars), a CRLF - immediately followed by AT LEAST one LWSP-char may instead be - inserted. Thus, the single line - - To: "Joe & J. Harvey" , JJV @ BBN - - can be represented as: - - To: "Joe & J. Harvey" , - JJV@BBN - - and - - To: "Joe & J. Harvey" - , JJV - @BBN - - and - - To: "Joe & - J. Harvey" , JJV @ BBN - - The process of moving from this folded multiple-line - representation of a header field to its single line represen- - tation is called "unfolding". Unfolding is accomplished by - regarding CRLF immediately followed by a LWSP-char as - equivalent to the LWSP-char. - - Note: While the standard permits folding wherever linear- - white-space is permitted, it is recommended that struc- - tured fields, such as those containing addresses, limit - folding to higher-level syntactic breaks. For address - fields, it is recommended that such folding occur - - - August 13, 1982 - 5 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - between addresses, after the separating comma. - - 3.1.2. STRUCTURE OF HEADER FIELDS - - Once a field has been unfolded, it may be viewed as being com- - posed of a field-name followed by a colon (":"), followed by a - field-body, and terminated by a carriage-return/line-feed. - The field-name must be composed of printable ASCII characters - (i.e., characters that have values between 33. and 126., - decimal, except colon). The field-body may be composed of any - ASCII characters, except CR or LF. (While CR and/or LF may be - present in the actual text, they are removed by the action of - unfolding the field.) - - Certain field-bodies of headers may be interpreted according - to an internal syntax that some systems may wish to parse. - These fields are called "structured fields". Examples - include fields containing dates and addresses. Other fields, - such as "Subject" and "Comments", are regarded simply as - strings of text. - - Note: Any field which has a field-body that is defined as - other than simply is to be treated as a struc- - tured field. - - Field-names, unstructured field bodies and structured - field bodies each are scanned by their own, independent - "lexical" analyzers. - - 3.1.3. UNSTRUCTURED FIELD BODIES - - For some fields, such as "Subject" and "Comments", no struc- - turing is assumed, and they are treated simply as s, as - in the message body. Rules of folding apply to these fields, - so that such field bodies which occupy several lines must - therefore have the second and successive lines indented by at - least one LWSP-char. - - 3.1.4. STRUCTURED FIELD BODIES - - To aid in the creation and reading of structured fields, the - free insertion of linear-white-space (which permits folding - by inclusion of CRLFs) is allowed between lexical tokens. - Rather than obscuring the syntax specifications for these - structured fields with explicit syntax for this linear-white- - space, the existence of another "lexical" analyzer is assumed. - This analyzer does not apply for unstructured field bodies - that are simply strings of text, as described above. The - analyzer provides an interpretation of the unfolded text - - - August 13, 1982 - 6 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - composing the body of the field as a sequence of lexical sym- - bols. - - These symbols are: - - - individual special characters - - quoted-strings - - domain-literals - - comments - - atoms - - The first four of these symbols are self-delimiting. Atoms - are not; they are delimited by the self-delimiting symbols and - by linear-white-space. For the purposes of regenerating - sequences of atoms and quoted-strings, exactly one SPACE is - assumed to exist, and should be used, between them. (Also, in - the "Clarifications" section on "White Space", below, note the - rules about treatment of multiple contiguous LWSP-chars.) - - So, for example, the folded body of an address field - - ":sysmail"@ Some-Group. Some-Org, - Muhammed.(I am the greatest) Ali @(the)Vegas.WBA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - August 13, 1982 - 7 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - is analyzed into the following lexical symbols and types: - - :sysmail quoted string - @ special - Some-Group atom - . special - Some-Org atom - , special - Muhammed atom - . special - (I am the greatest) comment - Ali atom - @ atom - (the) comment - Vegas atom - . special - WBA atom - - The canonical representations for the data in these addresses - are the following strings: - - ":sysmail"@Some-Group.Some-Org - - and - - Muhammed.Ali@Vegas.WBA - - Note: For purposes of display, and when passing such struc- - tured information to other systems, such as mail proto- - col services, there must be NO linear-white-space - between s that are separated by period (".") or - at-sign ("@") and exactly one SPACE between all other - s. Also, headers should be in a folded form. - - - - - - - - - - - - - - - - - - - August 13, 1982 - 8 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 3.2. HEADER FIELD DEFINITIONS - - These rules show a field meta-syntax, without regard for the - particular type or internal syntax. Their purpose is to permit - detection of fields; also, they present to higher-level parsers - an image of each field as fitting on one line. - - field = field-name ":" [ field-body ] CRLF - - field-name = 1* - - field-body = field-body-contents - [CRLF LWSP-char field-body] - - field-body-contents = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - August 13, 1982 - 9 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 3.3. LEXICAL TOKENS - - The following rules are used to define an underlying lexical - analyzer, which feeds tokens to higher level parsers. See the - ANSI references, in the Bibliography. - - ; ( Octal, Decimal.) - CHAR = ; ( 0-177, 0.-127.) - ALPHA = - ; (101-132, 65.- 90.) - ; (141-172, 97.-122.) - DIGIT = ; ( 60- 71, 48.- 57.) - CTL = ; ( 177, 127.) - CR = ; ( 15, 13.) - LF = ; ( 12, 10.) - SPACE = ; ( 40, 32.) - HTAB = ; ( 11, 9.) - <"> = ; ( 42, 34.) - CRLF = CR LF - - LWSP-char = SPACE / HTAB ; semantics = SPACE - - linear-white-space = 1*([CRLF] LWSP-char) ; semantics = SPACE - ; CRLF => folding - - specials = "(" / ")" / "<" / ">" / "@" ; Must be in quoted- - / "," / ";" / ":" / "\" / <"> ; string, to use - / "." / "[" / "]" ; within a word. - - delimiters = specials / linear-white-space / comment - - text = atoms, specials, - CR & bare LF, but NOT ; comments and - including CRLF> ; quoted-strings are - ; NOT recognized. - - atom = 1* - - quoted-string = <"> *(qtext/quoted-pair) <">; Regular qtext or - ; quoted chars. - - qtext = , ; => may be folded - "\" & CR, and including - linear-white-space> - - domain-literal = "[" *(dtext / quoted-pair) "]" - - - - - August 13, 1982 - 10 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - dtext = may be folded - "]", "\" & CR, & including - linear-white-space> - - comment = "(" *(ctext / quoted-pair / comment) ")" - - ctext = may be folded - ")", "\" & CR, & including - linear-white-space> - - quoted-pair = "\" CHAR ; may quote any char - - phrase = 1*word ; Sequence of words - - word = atom / quoted-string - - - 3.4. CLARIFICATIONS - - 3.4.1. QUOTING - - Some characters are reserved for special interpretation, such - as delimiting lexical tokens. To permit use of these charac- - ters as uninterpreted data, a quoting mechanism is provided. - To quote a character, precede it with a backslash ("\"). - - This mechanism is not fully general. Characters may be quoted - only within a subset of the lexical constructs. In particu- - lar, quoting is limited to use within: - - - quoted-string - - domain-literal - - comment - - Within these constructs, quoting is REQUIRED for CR and "\" - and for the character(s) that delimit the token (e.g., "(" and - ")" for a comment). However, quoting is PERMITTED for any - character. - - Note: In particular, quoting is NOT permitted within atoms. - For example when the local-part of an addr-spec must - contain a special character, a quoted string must be - used. Therefore, a specification such as: - - Full\ Name@Domain - - is not legal and must be specified as: - - "Full Name"@Domain - - - August 13, 1982 - 11 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 3.4.2. WHITE SPACE - - Note: In structured field bodies, multiple linear space ASCII - characters (namely HTABs and SPACEs) are treated as - single spaces and may freely surround any symbol. In - all header fields, the only place in which at least one - LWSP-char is REQUIRED is at the beginning of continua- - tion lines in a folded field. - - When passing text to processes that do not interpret text - according to this standard (e.g., mail protocol servers), then - NO linear-white-space characters should occur between a period - (".") or at-sign ("@") and a . Exactly ONE SPACE should - be used in place of arbitrary linear-white-space and comment - sequences. - - Note: Within systems conforming to this standard, wherever a - member of the list of delimiters is allowed, LWSP-chars - may also occur before and/or after it. - - Writers of mail-sending (i.e., header-generating) programs - should realize that there is no network-wide definition of the - effect of ASCII HT (horizontal-tab) characters on the appear- - ance of text at another network host; therefore, the use of - tabs in message headers, though permitted, is discouraged. - - 3.4.3. COMMENTS - - A comment is a set of ASCII characters, which is enclosed in - matching parentheses and which is not within a quoted-string - The comment construct permits message originators to add text - which will be useful for human readers, but which will be - ignored by the formal semantics. Comments should be retained - while the message is subject to interpretation according to - this standard. However, comments must NOT be included in - other cases, such as during protocol exchanges with mail - servers. - - Comments nest, so that if an unquoted left parenthesis occurs - in a comment string, there must also be a matching right - parenthesis. When a comment acts as the delimiter between a - sequence of two lexical symbols, such as two atoms, it is lex- - ically equivalent with a single SPACE, for the purposes of - regenerating the sequence, such as when passing the sequence - onto a mail protocol server. Comments are detected as such - only within field-bodies of structured fields. - - If a comment is to be "folded" onto multiple lines, then the - syntax for folding must be adhered to. (See the "Lexical - - - August 13, 1982 - 12 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - Analysis of Messages" section on "Folding Long Header Fields" - above, and the section on "Case Independence" below.) Note - that the official semantics therefore do not "see" any - unquoted CRLFs that are in comments, although particular pars- - ing programs may wish to note their presence. For these pro- - grams, it would be reasonable to interpret a "CRLF LWSP-char" - as being a CRLF that is part of the comment; i.e., the CRLF is - kept and the LWSP-char is discarded. Quoted CRLFs (i.e., a - backslash followed by a CR followed by a LF) still must be - followed by at least one LWSP-char. - - 3.4.4. DELIMITING AND QUOTING CHARACTERS - - The quote character (backslash) and characters that delimit - syntactic units are not, generally, to be taken as data that - are part of the delimited or quoted unit(s). In particular, - the quotation-marks that define a quoted-string, the - parentheses that define a comment and the backslash that - quotes a following character are NOT part of the quoted- - string, comment or quoted character. A quotation-mark that is - to be part of a quoted-string, a parenthesis that is to be - part of a comment and a backslash that is to be part of either - must each be preceded by the quote-character backslash ("\"). - Note that the syntax allows any character to be quoted within - a quoted-string or comment; however only certain characters - MUST be quoted to be included as data. These characters are - the ones that are not part of the alternate text group (i.e., - ctext or qtext). - - The one exception to this rule is that a single SPACE is - assumed to exist between contiguous words in a phrase, and - this interpretation is independent of the actual number of - LWSP-chars that the creator places between the words. To - include more than one SPACE, the creator must make the LWSP- - chars be part of a quoted-string. - - Quotation marks that delimit a quoted string and backslashes - that quote the following character should NOT accompany the - quoted-string when the string is passed to processes that do - not interpret data according to this specification (e.g., mail - protocol servers). - - 3.4.5. QUOTED-STRINGS - - Where permitted (i.e., in words in structured fields) quoted- - strings are treated as a single symbol. That is, a quoted- - string is equivalent to an atom, syntactically. If a quoted- - string is to be "folded" onto multiple lines, then the syntax - for folding must be adhered to. (See the "Lexical Analysis of - - - August 13, 1982 - 13 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - Messages" section on "Folding Long Header Fields" above, and - the section on "Case Independence" below.) Therefore, the - official semantics do not "see" any bare CRLFs that are in - quoted-strings; however particular parsing programs may wish - to note their presence. For such programs, it would be rea- - sonable to interpret a "CRLF LWSP-char" as being a CRLF which - is part of the quoted-string; i.e., the CRLF is kept and the - LWSP-char is discarded. Quoted CRLFs (i.e., a backslash fol- - lowed by a CR followed by a LF) are also subject to rules of - folding, but the presence of the quoting character (backslash) - explicitly indicates that the CRLF is data to the quoted - string. Stripping off the first following LWSP-char is also - appropriate when parsing quoted CRLFs. - - 3.4.6. BRACKETING CHARACTERS - - There is one type of bracket which must occur in matched pairs - and may have pairs nested within each other: - - o Parentheses ("(" and ")") are used to indicate com- - ments. - - There are three types of brackets which must occur in matched - pairs, and which may NOT be nested: - - o Colon/semi-colon (":" and ";") are used in address - specifications to indicate that the included list of - addresses are to be treated as a group. - - o Angle brackets ("<" and ">") are generally used to - indicate the presence of a one machine-usable refer- - ence (e.g., delimiting mailboxes), possibly including - source-routing to the machine. - - o Square brackets ("[" and "]") are used to indicate the - presence of a domain-literal, which the appropriate - name-domain is to use directly, bypassing normal - name-resolution mechanisms. - - 3.4.7. CASE INDEPENDENCE - - Except as noted, alphabetic strings may be represented in any - combination of upper and lower case. The only syntactic units - - - - - - - - - August 13, 1982 - 14 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - which requires preservation of case information are: - - - text - - qtext - - dtext - - ctext - - quoted-pair - - local-part, except "Postmaster" - - When matching any other syntactic unit, case is to be ignored. - For example, the field-names "From", "FROM", "from", and even - "FroM" are semantically equal and should all be treated ident- - ically. - - When generating these units, any mix of upper and lower case - alphabetic characters may be used. The case shown in this - specification is suggested for message-creating processes. - - Note: The reserved local-part address unit, "Postmaster", is - an exception. When the value "Postmaster" is being - interpreted, it must be accepted in any mixture of - case, including "POSTMASTER", and "postmaster". - - 3.4.8. FOLDING LONG HEADER FIELDS - - Each header field may be represented on exactly one line con- - sisting of the name of the field and its body, and terminated - by a CRLF; this is what the parser sees. For readability, the - field-body portion of long header fields may be "folded" onto - multiple lines of the actual field. "Long" is commonly inter- - preted to mean greater than 65 or 72 characters. The former - length serves as a limit, when the message is to be viewed on - most simple terminals which use simple display software; how- - ever, the limit is not imposed by this standard. - - Note: Some display software often can selectively fold lines, - to suit the display terminal. In such cases, sender- - provided folding can interfere with the display - software. - - 3.4.9. BACKSPACE CHARACTERS - - ASCII BS characters (Backspace, decimal 8) may be included in - texts and quoted-strings to effect overstriking. However, any - use of backspaces which effects an overstrike to the left of - the beginning of the text or quoted-string is prohibited. - - - - - - August 13, 1982 - 15 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 3.4.10. NETWORK-SPECIFIC TRANSFORMATIONS - - During transmission through heterogeneous networks, it may be - necessary to force data to conform to a network's local con- - ventions. For example, it may be required that a CR be fol- - lowed either by LF, making a CRLF, or by , if the CR is - to stand alone). Such transformations are reversed, when the - message exits that network. - - When crossing network boundaries, the message should be - treated as passing through two modules. It will enter the - first module containing whatever network-specific transforma- - tions that were necessary to permit migration through the - "current" network. It then passes through the modules: - - o Transformation Reversal - - The "current" network's idiosyncracies are removed and - the message is returned to the canonical form speci- - fied in this standard. - - o Transformation - - The "next" network's local idiosyncracies are imposed - on the message. - - ------------------ - From ==> | Remove Net-A | - Net-A | idiosyncracies | - ------------------ - || - \/ - Conformance - with standard - || - \/ - ------------------ - | Impose Net-B | ==> To - | idiosyncracies | Net-B - ------------------ - - - - - - - - - - - - August 13, 1982 - 16 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 4. MESSAGE SPECIFICATION - - 4.1. SYNTAX - - Note: Due to an artifact of the notational conventions, the syn- - tax indicates that, when present, some fields, must be in - a particular order. Header fields are NOT required to - occur in any particular order, except that the message - body must occur AFTER the headers. It is recommended - that, if present, headers be sent in the order "Return- - Path", "Received", "Date", "From", "Subject", "Sender", - "To", "cc", etc. - - This specification permits multiple occurrences of most - fields. Except as noted, their interpretation is not - specified here, and their use is discouraged. - - The following syntax for the bodies of various fields should - be thought of as describing each field body as a single long - string (or line). The "Lexical Analysis of Message" section on - "Long Header Fields", above, indicates how such long strings can - be represented on more than one line in the actual transmitted - message. - - message = fields *( CRLF *text ) ; Everything after - ; first null line - ; is message body - - fields = dates ; Creation time, - source ; author id & one - 1*destination ; address required - *optional-field ; others optional - - source = [ trace ] ; net traversals - originator ; original mail - [ resent ] ; forwarded - - trace = return ; path to sender - 1*received ; receipt tags - - return = "Return-path" ":" route-addr ; return address - - received = "Received" ":" ; one per relay - ["from" domain] ; sending host - ["by" domain] ; receiving host - ["via" atom] ; physical path - *("with" atom) ; link/mail protocol - ["id" msg-id] ; receiver msg id - ["for" addr-spec] ; initial form - - - August 13, 1982 - 17 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - ";" date-time ; time received - - originator = authentic ; authenticated addr - [ "Reply-To" ":" 1#address] ) - - authentic = "From" ":" mailbox ; Single author - / ( "Sender" ":" mailbox ; Actual submittor - "From" ":" 1#mailbox) ; Multiple authors - ; or not sender - - resent = resent-authentic - [ "Resent-Reply-To" ":" 1#address] ) - - resent-authentic = - = "Resent-From" ":" mailbox - / ( "Resent-Sender" ":" mailbox - "Resent-From" ":" 1#mailbox ) - - dates = orig-date ; Original - [ resent-date ] ; Forwarded - - orig-date = "Date" ":" date-time - - resent-date = "Resent-Date" ":" date-time - - destination = "To" ":" 1#address ; Primary - / "Resent-To" ":" 1#address - / "cc" ":" 1#address ; Secondary - / "Resent-cc" ":" 1#address - / "bcc" ":" #address ; Blind carbon - / "Resent-bcc" ":" #address - - optional-field = - / "Message-ID" ":" msg-id - / "Resent-Message-ID" ":" msg-id - / "In-Reply-To" ":" *(phrase / msg-id) - / "References" ":" *(phrase / msg-id) - / "Keywords" ":" #phrase - / "Subject" ":" *text - / "Comments" ":" *text - / "Encrypted" ":" 1#2word - / extension-field ; To be defined - / user-defined-field ; May be pre-empted - - msg-id = "<" addr-spec ">" ; Unique message id - - - - - - - August 13, 1982 - 18 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - extension-field = - - - user-defined-field = - - - 4.2. FORWARDING - - Some systems permit mail recipients to forward a message, - retaining the original headers, by adding some new fields. This - standard supports such a service, through the "Resent-" prefix to - field names. - - Whenever the string "Resent-" begins a field name, the field - has the same semantics as a field whose name does not have the - prefix. However, the message is assumed to have been forwarded - by an original recipient who attached the "Resent-" field. This - new field is treated as being more recent than the equivalent, - original field. For example, the "Resent-From", indicates the - person that forwarded the message, whereas the "From" field indi- - cates the original author. - - Use of such precedence information depends upon partici- - pants' communication needs. For example, this standard does not - dictate when a "Resent-From:" address should receive replies, in - lieu of sending them to the "From:" address. - - Note: In general, the "Resent-" fields should be treated as con- - taining a set of information that is independent of the - set of original fields. Information for one set should - not automatically be taken from the other. The interpre- - tation of multiple "Resent-" fields, of the same type, is - undefined. - - In the remainder of this specification, occurrence of legal - "Resent-" fields are treated identically with the occurrence of - - - - - - - - - August 13, 1982 - 19 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - fields whose names do not contain this prefix. - - 4.3. TRACE FIELDS - - Trace information is used to provide an audit trail of mes- - sage handling. In addition, it indicates a route back to the - sender of the message. - - The list of known "via" and "with" values are registered - with the Network Information Center, SRI International, Menlo - Park, California. - - 4.3.1. RETURN-PATH - - This field is added by the final transport system that - delivers the message to its recipient. The field is intended - to contain definitive information about the address and route - back to the message's originator. - - Note: The "Reply-To" field is added by the originator and - serves to direct replies, whereas the "Return-Path" - field is used to identify a path back to the origina- - tor. - - While the syntax indicates that a route specification is - optional, every attempt should be made to provide that infor- - mation in this field. - - 4.3.2. RECEIVED - - A copy of this field is added by each transport service that - relays the message. The information in the field can be quite - useful for tracing transport problems. - - The names of the sending and receiving hosts and time-of- - receipt may be specified. The "via" parameter may be used, to - indicate what physical mechanism the message was sent over, - such as Arpanet or Phonenet, and the "with" parameter may be - used to indicate the mail-, or connection-, level protocol - that was used, such as the SMTP mail protocol, or X.25 tran- - sport protocol. - - Note: Several "with" parameters may be included, to fully - specify the set of protocols that were used. - - Some transport services queue mail; the internal message iden- - tifier that is assigned to the message may be noted, using the - "id" parameter. When the sending host uses a destination - address specification that the receiving host reinterprets, by - - - August 13, 1982 - 20 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - expansion or transformation, the receiving host may wish to - record the original specification, using the "for" parameter. - For example, when a copy of mail is sent to the member of a - distribution list, this parameter may be used to record the - original address that was used to specify the list. - - 4.4. ORIGINATOR FIELDS - - The standard allows only a subset of the combinations possi- - ble with the From, Sender, Reply-To, Resent-From, Resent-Sender, - and Resent-Reply-To fields. The limitation is intentional. - - 4.4.1. FROM / RESENT-FROM - - This field contains the identity of the person(s) who wished - this message to be sent. The message-creation process should - default this field to be a single, authenticated machine - address, indicating the AGENT (person, system or process) - entering the message. If this is not done, the "Sender" field - MUST be present. If the "From" field IS defaulted this way, - the "Sender" field is optional and is redundant with the - "From" field. In all cases, addresses in the "From" field - must be machine-usable (addr-specs) and may not contain named - lists (groups). - - 4.4.2. SENDER / RESENT-SENDER - - This field contains the authenticated identity of the AGENT - (person, system or process) that sends the message. It is - intended for use when the sender is not the author of the mes- - sage, or to indicate who among a group of authors actually - sent the message. If the contents of the "Sender" field would - be completely redundant with the "From" field, then the - "Sender" field need not be present and its use is discouraged - (though still legal). In particular, the "Sender" field MUST - be present if it is NOT the same as the "From" Field. - - The Sender mailbox specification includes a word sequence - which must correspond to a specific agent (i.e., a human user - or a computer program) rather than a standard address. This - indicates the expectation that the field will identify the - single AGENT (person, system, or process) responsible for - sending the mail and not simply include the name of a mailbox - from which the mail was sent. For example in the case of a - shared login name, the name, by itself, would not be adequate. - The local-part address unit, which refers to this agent, is - expected to be a computer system term, and not (for example) a - generalized person reference which can be used outside the - network text message context. - - - August 13, 1982 - 21 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - Since the critical function served by the "Sender" field is - identification of the agent responsible for sending mail and - since computer programs cannot be held accountable for their - behavior, it is strongly recommended that when a computer pro- - gram generates a message, the HUMAN who is responsible for - that program be referenced as part of the "Sender" field mail- - box specification. - - 4.4.3. REPLY-TO / RESENT-REPLY-TO - - This field provides a general mechanism for indicating any - mailbox(es) to which responses are to be sent. Three typical - uses for this feature can be distinguished. In the first - case, the author(s) may not have regular machine-based mail- - boxes and therefore wish(es) to indicate an alternate machine - address. In the second case, an author may wish additional - persons to be made aware of, or responsible for, replies. A - somewhat different use may be of some help to "text message - teleconferencing" groups equipped with automatic distribution - services: include the address of that service in the "Reply- - To" field of all messages submitted to the teleconference; - then participants can "reply" to conference submissions to - guarantee the correct distribution of any submission of their - own. - - Note: The "Return-Path" field is added by the mail transport - service, at the time of final deliver. It is intended - to identify a path back to the orginator of the mes- - sage. The "Reply-To" field is added by the message - originator and is intended to direct replies. - - 4.4.4. AUTOMATIC USE OF FROM / SENDER / REPLY-TO - - For systems which automatically generate address lists for - replies to messages, the following recommendations are made: - - o The "Sender" field mailbox should be sent notices of - any problems in transport or delivery of the original - messages. If there is no "Sender" field, then the - "From" field mailbox should be used. - - o The "Sender" field mailbox should NEVER be used - automatically, in a recipient's reply message. - - o If the "Reply-To" field exists, then the reply should - go to the addresses indicated in that field and not to - the address(es) indicated in the "From" field. - - - - - August 13, 1982 - 22 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - o If there is a "From" field, but no "Reply-To" field, - the reply should be sent to the address(es) indicated - in the "From" field. - - Sometimes, a recipient may actually wish to communicate with - the person that initiated the message transfer. In such - cases, it is reasonable to use the "Sender" address. - - This recommendation is intended only for automated use of - originator-fields and is not intended to suggest that replies - may not also be sent to other recipients of messages. It is - up to the respective mail-handling programs to decide what - additional facilities will be provided. - - Examples are provided in Appendix A. - - 4.5. RECEIVER FIELDS - - 4.5.1. TO / RESENT-TO - - This field contains the identity of the primary recipients of - the message. - - 4.5.2. CC / RESENT-CC - - This field contains the identity of the secondary (informa- - tional) recipients of the message. - - 4.5.3. BCC / RESENT-BCC - - This field contains the identity of additional recipients of - the message. The contents of this field are not included in - copies of the message sent to the primary and secondary reci- - pients. Some systems may choose to include the text of the - "Bcc" field only in the author(s)'s copy, while others may - also include it in the text sent to all those indicated in the - "Bcc" list. - - 4.6. REFERENCE FIELDS - - 4.6.1. MESSAGE-ID / RESENT-MESSAGE-ID - - This field contains a unique identifier (the local-part - address unit) which refers to THIS version of THIS message. - The uniqueness of the message identifier is guaranteed by the - host which generates it. This identifier is intended to be - machine readable and not necessarily meaningful to humans. A - message identifier pertains to exactly one instantiation of a - particular message; subsequent revisions to the message should - - - August 13, 1982 - 23 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - each receive new message identifiers. - - 4.6.2. IN-REPLY-TO - - The contents of this field identify previous correspon- - dence which this message answers. Note that if message iden- - tifiers are used in this field, they must use the msg-id - specification format. - - 4.6.3. REFERENCES - - The contents of this field identify other correspondence - which this message references. Note that if message identif- - iers are used, they must use the msg-id specification format. - - 4.6.4. KEYWORDS - - This field contains keywords or phrases, separated by - commas. - - 4.7. OTHER FIELDS - - 4.7.1. SUBJECT - - This is intended to provide a summary, or indicate the - nature, of the message. - - 4.7.2. COMMENTS - - Permits adding text comments onto the message without - disturbing the contents of the message's body. - - 4.7.3. ENCRYPTED - - Sometimes, data encryption is used to increase the - privacy of message contents. If the body of a message has - been encrypted, to keep its contents private, the "Encrypted" - field can be used to note the fact and to indicate the nature - of the encryption. The first parameter indicates the - software used to encrypt the body, and the second, optional - is intended to aid the recipient in selecting the - proper decryption key. This code word may be viewed as an - index to a table of keys held by the recipient. - - Note: Unfortunately, headers must contain envelope, as well - as contents, information. Consequently, it is neces- - sary that they remain unencrypted, so that mail tran- - sport services may access them. Since names, - addresses, and "Subject" field contents may contain - - - August 13, 1982 - 24 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - sensitive information, this requirement limits total - message privacy. - - Names of encryption software are registered with the Net- - work Information Center, SRI International, Menlo Park, Cali- - fornia. - - 4.7.4. EXTENSION-FIELD - - A limited number of common fields have been defined in - this document. As network mail requirements dictate, addi- - tional fields may be standardized. To provide user-defined - fields with a measure of safety, in name selection, such - extension-fields will never have names that begin with the - string "X-". - - Names of Extension-fields are registered with the Network - Information Center, SRI International, Menlo Park, California. - - 4.7.5. USER-DEFINED-FIELD - - Individual users of network mail are free to define and - use additional header fields. Such fields must have names - which are not already used in the current specification or in - any definitions of extension-fields, and the overall syntax of - these user-defined-fields must conform to this specification's - rules for delimiting and folding fields. Due to the - extension-field publishing process, the name of a user- - defined-field may be pre-empted - - Note: The prefatory string "X-" will never be used in the - names of Extension-fields. This provides user-defined - fields with a protected set of names. - - - - - - - - - - - - - - - - - - - August 13, 1982 - 25 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 5. DATE AND TIME SPECIFICATION - - 5.1. SYNTAX - - date-time = [ day "," ] date time ; dd mm yy - ; hh:mm:ss zzz - - day = "Mon" / "Tue" / "Wed" / "Thu" - / "Fri" / "Sat" / "Sun" - - date = 1*2DIGIT month 2DIGIT ; day month year - ; e.g. 20 Jun 82 - - month = "Jan" / "Feb" / "Mar" / "Apr" - / "May" / "Jun" / "Jul" / "Aug" - / "Sep" / "Oct" / "Nov" / "Dec" - - time = hour zone ; ANSI and Military - - hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT] - ; 00:00:00 - 23:59:59 - - zone = "UT" / "GMT" ; Universal Time - ; North American : UT - / "EST" / "EDT" ; Eastern: - 5/ - 4 - / "CST" / "CDT" ; Central: - 6/ - 5 - / "MST" / "MDT" ; Mountain: - 7/ - 6 - / "PST" / "PDT" ; Pacific: - 8/ - 7 - / 1ALPHA ; Military: Z = UT; - ; A:-1; (J not used) - ; M:-12; N:+1; Y:+12 - / ( ("+" / "-") 4DIGIT ) ; Local differential - ; hours+min. (HHMM) - - 5.2. SEMANTICS - - If included, day-of-week must be the day implied by the date - specification. - - Time zone may be indicated in several ways. "UT" is Univer- - sal Time (formerly called "Greenwich Mean Time"); "GMT" is per- - mitted as a reference to Universal Time. The military standard - uses a single character for each zone. "Z" is Universal Time. - "A" indicates one hour earlier, and "M" indicates 12 hours ear- - lier; "N" is one hour later, and "Y" is 12 hours later. The - letter "J" is not used. The other remaining two forms are taken - from ANSI standard X3.51-1975. One allows explicit indication of - the amount of offset from UT; the other uses common 3-character - strings for indicating time zones in North America. - - - August 13, 1982 - 26 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 6. ADDRESS SPECIFICATION - - 6.1. SYNTAX - - address = mailbox ; one addressee - / group ; named list - - group = phrase ":" [#mailbox] ";" - - mailbox = addr-spec ; simple address - / phrase route-addr ; name & addr-spec - - route-addr = "<" [route] addr-spec ">" - - route = 1#("@" domain) ":" ; path-relative - - addr-spec = local-part "@" domain ; global address - - local-part = word *("." word) ; uninterpreted - ; case-preserved - - domain = sub-domain *("." sub-domain) - - sub-domain = domain-ref / domain-literal - - domain-ref = atom ; symbolic reference - - 6.2. SEMANTICS - - A mailbox receives mail. It is a conceptual entity which - does not necessarily pertain to file storage. For example, some - sites may choose to print mail on their line printer and deliver - the output to the addressee's desk. - - A mailbox specification comprises a person, system or pro- - cess name reference, a domain-dependent string, and a name-domain - reference. The name reference is optional and is usually used to - indicate the human name of a recipient. The name-domain refer- - ence specifies a sequence of sub-domains. The domain-dependent - string is uninterpreted, except by the final sub-domain; the rest - of the mail service merely transmits it as a literal string. - - 6.2.1. DOMAINS - - A name-domain is a set of registered (mail) names. A name- - domain specification resolves to a subordinate name-domain - specification or to a terminal domain-dependent string. - Hence, domain specification is extensible, permitting any - number of registration levels. - - - August 13, 1982 - 27 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - Name-domains model a global, logical, hierarchical addressing - scheme. The model is logical, in that an address specifica- - tion is related to name registration and is not necessarily - tied to transmission path. The model's hierarchy is a - directed graph, called an in-tree, such that there is a single - path from the root of the tree to any node in the hierarchy. - If more than one path actually exists, they are considered to - be different addresses. - - The root node is common to all addresses; consequently, it is - not referenced. Its children constitute "top-level" name- - domains. Usually, a service has access to its own full domain - specification and to the names of all top-level name-domains. - - The "top" of the domain addressing hierarchy -- a child of the - root -- is indicated by the right-most field, in a domain - specification. Its child is specified to the left, its child - to the left, and so on. - - Some groups provide formal registration services; these con- - stitute name-domains that are independent logically of - specific machines. In addition, networks and machines impli- - citly compose name-domains, since their membership usually is - registered in name tables. - - In the case of formal registration, an organization implements - a (distributed) data base which provides an address-to-route - mapping service for addresses of the form: - - person@registry.organization - - Note that "organization" is a logical entity, separate from - any particular communication network. - - A mechanism for accessing "organization" is universally avail- - able. That mechanism, in turn, seeks an instantiation of the - registry; its location is not indicated in the address specif- - ication. It is assumed that the system which operates under - the name "organization" knows how to find a subordinate regis- - try. The registry will then use the "person" string to deter- - mine where to send the mail specification. - - The latter, network-oriented case permits simple, direct, - attachment-related address specification, such as: - - user@host.network - - Once the network is accessed, it is expected that a message - will go directly to the host and that the host will resolve - - - August 13, 1982 - 28 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - the user name, placing the message in the user's mailbox. - - 6.2.2. ABBREVIATED DOMAIN SPECIFICATION - - Since any number of levels is possible within the domain - hierarchy, specification of a fully qualified address can - become inconvenient. This standard permits abbreviated domain - specification, in a special case: - - For the address of the sender, call the left-most - sub-domain Level N. In a header address, if all of - the sub-domains above (i.e., to the right of) Level N - are the same as those of the sender, then they do not - have to appear in the specification. Otherwise, the - address must be fully qualified. - - This feature is subject to approval by local sub- - domains. Individual sub-domains may require their - member systems, which originate mail, to provide full - domain specification only. When permitted, abbrevia- - tions may be present only while the message stays - within the sub-domain of the sender. - - Use of this mechanism requires the sender's sub-domain - to reserve the names of all top-level domains, so that - full specifications can be distinguished from abbrevi- - ated specifications. - - For example, if a sender's address is: - - sender@registry-A.registry-1.organization-X - - and one recipient's address is: - - recipient@registry-B.registry-1.organization-X - - and another's is: - - recipient@registry-C.registry-2.organization-X - - then ".registry-1.organization-X" need not be specified in the - the message, but "registry-C.registry-2" DOES have to be - specified. That is, the first two addresses may be abbrevi- - ated, but the third address must be fully specified. - - When a message crosses a domain boundary, all addresses must - be specified in the full format, ending with the top-level - name-domain in the right-most field. It is the responsibility - of mail forwarding services to ensure that addresses conform - - - August 13, 1982 - 29 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - with this requirement. In the case of abbreviated addresses, - the relaying service must make the necessary expansions. It - should be noted that it often is difficult for such a service - to locate all occurrences of address abbreviations. For exam- - ple, it will not be possible to find such abbreviations within - the body of the message. The "Return-Path" field can aid - recipients in recovering from these errors. - - Note: When passing any portion of an addr-spec onto a process - which does not interpret data according to this stan- - dard (e.g., mail protocol servers). There must be NO - LWSP-chars preceding or following the at-sign or any - delimiting period ("."), such as shown in the above - examples, and only ONE SPACE between contiguous - s. - - 6.2.3. DOMAIN TERMS - - A domain-ref must be THE official name of a registry, network, - or host. It is a symbolic reference, within a name sub- - domain. At times, it is necessary to bypass standard mechan- - isms for resolving such references, using more primitive - information, such as a network host address rather than its - associated host name. - - To permit such references, this standard provides the domain- - literal construct. Its contents must conform with the needs - of the sub-domain in which it is interpreted. - - Domain-literals which refer to domains within the ARPA Inter- - net specify 32-bit Internet addresses, in four 8-bit fields - noted in decimal, as described in Request for Comments #820, - "Assigned Numbers." For example: - - [10.0.3.19] - - Note: THE USE OF DOMAIN-LITERALS IS STRONGLY DISCOURAGED. It - is permitted only as a means of bypassing temporary - system limitations, such as name tables which are not - complete. - - The names of "top-level" domains, and the names of domains - under in the ARPA Internet, are registered with the Network - Information Center, SRI International, Menlo Park, California. - - 6.2.4. DOMAIN-DEPENDENT LOCAL STRING - - The local-part of an addr-spec in a mailbox specification - (i.e., the host's name for the mailbox) is understood to be - - - August 13, 1982 - 30 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - whatever the receiving mail protocol server allows. For exam- - ple, some systems do not understand mailbox references of the - form "P. D. Q. Bach", but others do. - - This specification treats periods (".") as lexical separators. - Hence, their presence in local-parts which are not quoted- - strings, is detected. However, such occurrences carry NO - semantics. That is, if a local-part has periods within it, an - address parser will divide the local-part into several tokens, - but the sequence of tokens will be treated as one uninter- - preted unit. The sequence will be re-assembled, when the - address is passed outside of the system such as to a mail pro- - tocol service. - - For example, the address: - - First.Last@Registry.Org - - is legal and does not require the local-part to be surrounded - with quotation-marks. (However, "First Last" DOES require - quoting.) The local-part of the address, when passed outside - of the mail system, within the Registry.Org domain, is - "First.Last", again without quotation marks. - - 6.2.5. BALANCING LOCAL-PART AND DOMAIN - - In some cases, the boundary between local-part and domain can - be flexible. The local-part may be a simple string, which is - used for the final determination of the recipient's mailbox. - All other levels of reference are, therefore, part of the - domain. - - For some systems, in the case of abbreviated reference to the - local and subordinate sub-domains, it may be possible to - specify only one reference within the domain part and place - the other, subordinate name-domain references within the - local-part. This would appear as: - - mailbox.sub1.sub2@this-domain - - Such a specification would be acceptable to address parsers - which conform to RFC #733, but do not support this newer - Internet standard. While contrary to the intent of this stan- - dard, the form is legal. - - Also, some sub-domains have a specification syntax which does - not conform to this standard. For example: - - sub-net.mailbox@sub-domain.domain - - - August 13, 1982 - 31 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - uses a different parsing sequence for local-part than for - domain. - - Note: As a rule, the domain specification should contain - fields which are encoded according to the syntax of - this standard and which contain generally-standardized - information. The local-part specification should con- - tain only that portion of the address which deviates - from the form or intention of the domain field. - - 6.2.6. MULTIPLE MAILBOXES - - An individual may have several mailboxes and wish to receive - mail at whatever mailbox is convenient for the sender to - access. This standard does not provide a means of specifying - "any member of" a list of mailboxes. - - A set of individuals may wish to receive mail as a single unit - (i.e., a distribution list). The construct permits - specification of such a list. Recipient mailboxes are speci- - fied within the bracketed part (":" - ";"). A copy of the - transmitted message is to be sent to each mailbox listed. - This standard does not permit recursive specification of - groups within groups. - - While a list must be named, it is not required that the con- - tents of the list be included. In this case, the
- serves only as an indication of group distribution and would - appear in the form: - - name:; - - Some mail services may provide a group-list distribution - facility, accepting a single mailbox reference, expanding it - to the full distribution list, and relaying the mail to the - list's members. This standard provides no additional syntax - for indicating such a service. Using the address - alternative, while listing one mailbox in it, can mean either - that the mailbox reference will be expanded to a list or that - there is a group with one member. - - 6.2.7. EXPLICIT PATH SPECIFICATION - - At times, a message originator may wish to indicate the - transmission path that a message should follow. This is - called source routing. The normal addressing scheme, used in - an addr-spec, is carefully separated from such information; - the portion of a route-addr is provided for such occa- - sions. It specifies the sequence of hosts and/or transmission - - - August 13, 1982 - 32 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - services that are to be traversed. Both domain-refs and - domain-literals may be used. - - Note: The use of source routing is discouraged. Unless the - sender has special need of path restriction, the choice - of transmission route should be left to the mail tran- - sport service. - - 6.3. RESERVED ADDRESS - - It often is necessary to send mail to a site, without know- - ing any of its valid addresses. For example, there may be mail - system dysfunctions, or a user may wish to find out a person's - correct address, at that site. - - This standard specifies a single, reserved mailbox address - (local-part) which is to be valid at each site. Mail sent to - that address is to be routed to a person responsible for the - site's mail system or to a person with responsibility for general - site operation. The name of the reserved local-part address is: - - Postmaster - - so that "Postmaster@domain" is required to be valid. - - Note: This reserved local-part must be matched without sensi- - tivity to alphabetic case, so that "POSTMASTER", "postmas- - ter", and even "poStmASteR" is to be accepted. - - - - - - - - - - - - - - - - - - - - - - - - August 13, 1982 - 33 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - 7. BIBLIOGRAPHY - - - ANSI. "USA Standard Code for Information Interchange," X3.4. - American National Standards Institute: New York (1968). Also - in: Feinler, E. and J. Postel, eds., "ARPANET Protocol Hand- - book", NIC 7104. - - ANSI. "Representations of Universal Time, Local Time Differen- - tials, and United States Time Zone References for Information - Interchange," X3.51-1975. American National Standards Insti- - tute: New York (1975). - - Bemer, R.W., "Time and the Computer." In: Interface Age (Feb. - 1979). - - Bennett, C.J. "JNT Mail Protocol". Joint Network Team, Ruther- - ford and Appleton Laboratory: Didcot, England. - - Bhushan, A.K., Pogran, K.T., Tomlinson, R.S., and White, J.E. - "Standardizing Network Mail Headers," ARPANET Request for - Comments No. 561, Network Information Center No. 18516; SRI - International: Menlo Park (September 1973). - - Birrell, A.D., Levin, R., Needham, R.M., and Schroeder, M.D. - "Grapevine: An Exercise in Distributed Computing," Communica- - tions of the ACM 25, 4 (April 1982), 260-274. - - Crocker, D.H., Vittal, J.J., Pogran, K.T., Henderson, D.A. - "Standard for the Format of ARPA Network Text Message," - ARPANET Request for Comments No. 733, Network Information - Center No. 41952. SRI International: Menlo Park (November - 1977). - - Feinler, E.J. and Postel, J.B. ARPANET Protocol Handbook, Net- - work Information Center No. 7104 (NTIS AD A003890). SRI - International: Menlo Park (April 1976). - - Harary, F. "Graph Theory". Addison-Wesley: Reading, Mass. - (1969). - - Levin, R. and Schroeder, M. "Transport of Electronic Messages - through a Network," TeleInformatics 79, pp. 29-33. North - Holland (1979). Also as Xerox Palo Alto Research Center - Technical Report CSL-79-4. - - Myer, T.H. and Henderson, D.A. "Message Transmission Protocol," - ARPANET Request for Comments, No. 680, Network Information - Center No. 32116. SRI International: Menlo Park (1975). - - - August 13, 1982 - 34 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - NBS. "Specification of Message Format for Computer Based Message - Systems, Recommended Federal Information Processing Standard." - National Bureau of Standards: Gaithersburg, Maryland - (October 1981). - - NIC. Internet Protocol Transition Workbook. Network Information - Center, SRI-International, Menlo Park, California (March - 1982). - - Oppen, D.C. and Dalal, Y.K. "The Clearinghouse: A Decentralized - Agent for Locating Named Objects in a Distributed Environ- - ment," OPD-T8103. Xerox Office Products Division: Palo Alto, - CA. (October 1981). - - Postel, J.B. "Assigned Numbers," ARPANET Request for Comments, - No. 820. SRI International: Menlo Park (August 1982). - - Postel, J.B. "Simple Mail Transfer Protocol," ARPANET Request - for Comments, No. 821. SRI International: Menlo Park (August - 1982). - - Shoch, J.F. "Internetwork naming, addressing and routing," in - Proc. 17th IEEE Computer Society International Conference, pp. - 72-79, Sept. 1978, IEEE Cat. No. 78 CH 1388-8C. - - Su, Z. and Postel, J. "The Domain Naming Convention for Internet - User Applications," ARPANET Request for Comments, No. 819. - SRI International: Menlo Park (August 1982). - - - - - - - - - - - - - - - - - - - - - - - - August 13, 1982 - 35 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - APPENDIX - - - A. EXAMPLES - - A.1. ADDRESSES - - A.1.1. Alfred Neuman - - A.1.2. Neuman@BBN-TENEXA - - These two "Alfred Neuman" examples have identical seman- - tics, as far as the operation of the local host's mail sending - (distribution) program (also sometimes called its "mailer") - and the remote host's mail protocol server are concerned. In - the first example, the "Alfred Neuman" is ignored by the - mailer, as "Neuman@BBN-TENEXA" completely specifies the reci- - pient. The second example contains no superfluous informa- - tion, and, again, "Neuman@BBN-TENEXA" is the intended reci- - pient. - - Note: When the message crosses name-domain boundaries, then - these specifications must be changed, so as to indicate - the remainder of the hierarchy, starting with the top - level. - - A.1.3. "George, Ted" - - This form might be used to indicate that a single mailbox - is shared by several users. The quoted string is ignored by - the originating host's mailer, because "Shared@Group.Arpanet" - completely specifies the destination mailbox. - - A.1.4. Wilt . (the Stilt) Chamberlain@NBA.US - - The "(the Stilt)" is a comment, which is NOT included in - the destination mailbox address handed to the originating - system's mailer. The local-part of the address is the string - "Wilt.Chamberlain", with NO space between the first and second - words. - - A.1.5. Address Lists - - Gourmets: Pompous Person , - Childs@WGBH.Boston, Galloping Gourmet@ - ANT.Down-Under (Australian National Television), - Cheapie@Discount-Liquors;, - Cruisers: Port@Portugal, Jones@SEA;, - Another@Somewhere.SomeOrg - - - August 13, 1982 - 36 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - This group list example points out the use of comments and the - mixing of addresses and groups. - - A.2. ORIGINATOR ITEMS - - A.2.1. Author-sent - - George Jones logs into his host as "Jones". He sends - mail himself. - - From: Jones@Group.Org - - or - - From: George Jones - - A.2.2. Secretary-sent - - George Jones logs in as Jones on his host. His secre- - tary, who logs in as Secy sends mail for him. Replies to the - mail should go to George. - - From: George Jones - Sender: Secy@Other-Group - - A.2.3. Secretary-sent, for user of shared directory - - George Jones' secretary sends mail for George. Replies - should go to George. - - From: George Jones - Sender: Secy@Other-Group - - Note that there need not be a space between "Jones" and the - "<", but adding a space enhances readability (as is the case - in other examples. - - A.2.4. Committee activity, with one author - - George is a member of a committee. He wishes to have any - replies to his message go to all committee members. - - From: George Jones - Sender: Jones@Host - Reply-To: The Committee: Jones@Host.Net, - Smith@Other.Org, - Doe@Somewhere-Else; - - Note that if George had not included himself in the - - - August 13, 1982 - 37 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - enumeration of The Committee, he would not have gotten an - implicit reply; the presence of the "Reply-to" field SUPER- - SEDES the sending of a reply to the person named in the "From" - field. - - A.2.5. Secretary acting as full agent of author - - George Jones asks his secretary (Secy@Host) to send a - message for him in his capacity as Group. He wants his secre- - tary to handle all replies. - - From: George Jones - Sender: Secy@Host - Reply-To: Secy@Host - - A.2.6. Agent for user without online mailbox - - A friend of George's, Sarah, is visiting. George's - secretary sends some mail to a friend of Sarah in computer- - land. Replies should go to George, whose mailbox is Jones at - Registry. - - From: Sarah Friendly - Sender: Secy-Name - Reply-To: Jones@Registry. - - A.2.7. Agent for member of a committee - - George's secretary sends out a message which was authored - jointly by all the members of a committee. Note that the name - of the committee cannot be specified, since names are - not permitted in the From field. - - From: Jones@Host, - Smith@Other-Host, - Doe@Somewhere-Else - Sender: Secy@SHost - - - - - - - - - - - - - - - August 13, 1982 - 38 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - A.3. COMPLETE HEADERS - - A.3.1. Minimum required - - Date: 26 Aug 76 1429 EDT Date: 26 Aug 76 1429 EDT - From: Jones@Registry.Org or From: Jones@Registry.Org - Bcc: To: Smith@Registry.Org - - Note that the "Bcc" field may be empty, while the "To" field - is required to have at least one address. - - A.3.2. Using some of the additional fields - - Date: 26 Aug 76 1430 EDT - From: George Jones - Sender: Secy@SHOST - To: "Al Neuman"@Mad-Host, - Sam.Irving@Other-Host - Message-ID: - - A.3.3. About as complex as you're going to get - - Date : 27 Aug 76 0932 PDT - From : Ken Davis - Subject : Re: The Syntax in the RFC - Sender : KSecy@Other-Host - Reply-To : Sam.Irving@Reg.Organization - To : George Jones , - Al.Neuman@MAD.Publisher - cc : Important folk: - Tom Softwood , - "Sam Irving"@Other-Host;, - Standard Distribution: - /main/davis/people/standard@Other-Host, - "standard.dist.3"@Tops-20-Host>; - Comment : Sam is away on business. He asked me to handle - his mail for him. He'll be able to provide a - more accurate explanation when he returns - next week. - In-Reply-To: , George's message - X-Special-action: This is a sample of user-defined field- - names. There could also be a field-name - "Special-action", but its name might later be - preempted - Message-ID: <4231.629.XYzi-What@Other-Host> - - - - - - - August 13, 1982 - 39 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - B. SIMPLE FIELD PARSING - - Some mail-reading software systems may wish to perform only - minimal processing, ignoring the internal syntax of structured - field-bodies and treating them the same as unstructured-field- - bodies. Such software will need only to distinguish: - - o Header fields from the message body, - - o Beginnings of fields from lines which continue fields, - - o Field-names from field-contents. - - The abbreviated set of syntactic rules which follows will - suffice for this purpose. It describes a limited view of mes- - sages and is a subset of the syntactic rules provided in the main - part of this specification. One small exception is that the con- - tents of field-bodies consist only of text: - - B.1. SYNTAX - - - message = *field *(CRLF *text) - - field = field-name ":" [field-body] CRLF - - field-name = 1* - - field-body = *text [CRLF LWSP-char field-body] - - - B.2. SEMANTICS - - Headers occur before the message body and are terminated by - a null line (i.e., two contiguous CRLFs). - - A line which continues a header field begins with a SPACE or - HTAB character, while a line beginning a field starts with a - printable character which is not a colon. - - A field-name consists of one or more printable characters - (excluding colon, space, and control-characters). A field-name - MUST be contained on one line. Upper and lower case are not dis- - tinguished when comparing field-names. - - - - - - - - August 13, 1982 - 40 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - C. DIFFERENCES FROM RFC #733 - - The following summarizes the differences between this stan- - dard and the one specified in Arpanet Request for Comments #733, - "Standard for the Format of ARPA Network Text Messages". The - differences are listed in the order of their occurrence in the - current specification. - - C.1. FIELD DEFINITIONS - - C.1.1. FIELD NAMES - - These now must be a sequence of printable characters. They - may not contain any LWSP-chars. - - C.2. LEXICAL TOKENS - - C.2.1. SPECIALS - - The characters period ("."), left-square bracket ("["), and - right-square bracket ("]") have been added. For presentation - purposes, and when passing a specification to a system that - does not conform to this standard, periods are to be contigu- - ous with their surrounding lexical tokens. No linear-white- - space is permitted between them. The presence of one LWSP- - char between other tokens is still directed. - - C.2.2. ATOM - - Atoms may not contain SPACE. - - C.2.3. SPECIAL TEXT - - ctext and qtext have had backslash ("\") added to the list of - prohibited characters. - - C.2.4. DOMAINS - - The lexical tokens and have been - added. - - C.3. MESSAGE SPECIFICATION - - C.3.1. TRACE - - The "Return-path:" and "Received:" fields have been specified. - - - - - - August 13, 1982 - 41 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - C.3.2. FROM - - The "From" field must contain machine-usable addresses (addr- - spec). Multiple addresses may be specified, but named-lists - (groups) may not. - - C.3.3. RESENT - - The meta-construct of prefacing field names with the string - "Resent-" has been added, to indicate that a message has been - forwarded by an intermediate recipient. - - C.3.4. DESTINATION - - A message must contain at least one destination address field. - "To" and "CC" are required to contain at least one address. - - C.3.5. IN-REPLY-TO - - The field-body is no longer a comma-separated list, although a - sequence is still permitted. - - C.3.6. REFERENCE - - The field-body is no longer a comma-separated list, although a - sequence is still permitted. - - C.3.7. ENCRYPTED - - A field has been specified that permits senders to indicate - that the body of a message has been encrypted. - - C.3.8. EXTENSION-FIELD - - Extension fields are prohibited from beginning with the char- - acters "X-". - - C.4. DATE AND TIME SPECIFICATION - - C.4.1. SIMPLIFICATION - - Fewer optional forms are permitted and the list of three- - letter time zones has been shortened. - - C.5. ADDRESS SPECIFICATION - - - - - - - August 13, 1982 - 42 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - C.5.1. ADDRESS - - The use of quoted-string, and the ":"-atom-":" construct, have - been removed. An address now is either a single mailbox - reference or is a named list of addresses. The latter indi- - cates a group distribution. - - C.5.2. GROUPS - - Group lists are now required to to have a name. Group lists - may not be nested. - - C.5.3. MAILBOX - - A mailbox specification may indicate a person's name, as - before. Such a named list no longer may specify multiple - mailboxes and may not be nested. - - C.5.4. ROUTE ADDRESSING - - Addresses now are taken to be absolute, global specifications, - independent of transmission paths. The construct has - been provided, to permit explicit specification of transmis- - sion path. RFC #733's use of multiple at-signs ("@") was - intended as a general syntax for indicating routing and/or - hierarchical addressing. The current standard separates these - specifications and only one at-sign is permitted. - - C.5.5. AT-SIGN - - The string " at " no longer is used as an address delimiter. - Only at-sign ("@") serves the function. - - C.5.6. DOMAINS - - Hierarchical, logical name-domains have been added. - - C.6. RESERVED ADDRESS - - The local-part "Postmaster" has been reserved, so that users can - be guaranteed at least one valid address at a site. - - - - - - - - - - - August 13, 1982 - 43 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - D. ALPHABETICAL LISTING OF SYNTAX RULES - - address = mailbox ; one addressee - / group ; named list - addr-spec = local-part "@" domain ; global address - ALPHA = - ; (101-132, 65.- 90.) - ; (141-172, 97.-122.) - atom = 1* - authentic = "From" ":" mailbox ; Single author - / ( "Sender" ":" mailbox ; Actual submittor - "From" ":" 1#mailbox) ; Multiple authors - ; or not sender - CHAR = ; ( 0-177, 0.-127.) - comment = "(" *(ctext / quoted-pair / comment) ")" - CR = ; ( 15, 13.) - CRLF = CR LF - ctext = may be folded - ")", "\" & CR, & including - linear-white-space> - CTL = ; ( 177, 127.) - date = 1*2DIGIT month 2DIGIT ; day month year - ; e.g. 20 Jun 82 - dates = orig-date ; Original - [ resent-date ] ; Forwarded - date-time = [ day "," ] date time ; dd mm yy - ; hh:mm:ss zzz - day = "Mon" / "Tue" / "Wed" / "Thu" - / "Fri" / "Sat" / "Sun" - delimiters = specials / linear-white-space / comment - destination = "To" ":" 1#address ; Primary - / "Resent-To" ":" 1#address - / "cc" ":" 1#address ; Secondary - / "Resent-cc" ":" 1#address - / "bcc" ":" #address ; Blind carbon - / "Resent-bcc" ":" #address - DIGIT = ; ( 60- 71, 48.- 57.) - domain = sub-domain *("." sub-domain) - domain-literal = "[" *(dtext / quoted-pair) "]" - domain-ref = atom ; symbolic reference - dtext = may be folded - "]", "\" & CR, & including - linear-white-space> - extension-field = - - - - August 13, 1982 - 44 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - field = field-name ":" [ field-body ] CRLF - fields = dates ; Creation time, - source ; author id & one - 1*destination ; address required - *optional-field ; others optional - field-body = field-body-contents - [CRLF LWSP-char field-body] - field-body-contents = - - field-name = 1* - group = phrase ":" [#mailbox] ";" - hour = 2DIGIT ":" 2DIGIT [":" 2DIGIT] - ; 00:00:00 - 23:59:59 - HTAB = ; ( 11, 9.) - LF = ; ( 12, 10.) - linear-white-space = 1*([CRLF] LWSP-char) ; semantics = SPACE - ; CRLF => folding - local-part = word *("." word) ; uninterpreted - ; case-preserved - LWSP-char = SPACE / HTAB ; semantics = SPACE - mailbox = addr-spec ; simple address - / phrase route-addr ; name & addr-spec - message = fields *( CRLF *text ) ; Everything after - ; first null line - ; is message body - month = "Jan" / "Feb" / "Mar" / "Apr" - / "May" / "Jun" / "Jul" / "Aug" - / "Sep" / "Oct" / "Nov" / "Dec" - msg-id = "<" addr-spec ">" ; Unique message id - optional-field = - / "Message-ID" ":" msg-id - / "Resent-Message-ID" ":" msg-id - / "In-Reply-To" ":" *(phrase / msg-id) - / "References" ":" *(phrase / msg-id) - / "Keywords" ":" #phrase - / "Subject" ":" *text - / "Comments" ":" *text - / "Encrypted" ":" 1#2word - / extension-field ; To be defined - / user-defined-field ; May be pre-empted - orig-date = "Date" ":" date-time - originator = authentic ; authenticated addr - [ "Reply-To" ":" 1#address] ) - phrase = 1*word ; Sequence of words - - - - - August 13, 1982 - 45 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - qtext = , ; => may be folded - "\" & CR, and including - linear-white-space> - quoted-pair = "\" CHAR ; may quote any char - quoted-string = <"> *(qtext/quoted-pair) <">; Regular qtext or - ; quoted chars. - received = "Received" ":" ; one per relay - ["from" domain] ; sending host - ["by" domain] ; receiving host - ["via" atom] ; physical path - *("with" atom) ; link/mail protocol - ["id" msg-id] ; receiver msg id - ["for" addr-spec] ; initial form - ";" date-time ; time received - - resent = resent-authentic - [ "Resent-Reply-To" ":" 1#address] ) - resent-authentic = - = "Resent-From" ":" mailbox - / ( "Resent-Sender" ":" mailbox - "Resent-From" ":" 1#mailbox ) - resent-date = "Resent-Date" ":" date-time - return = "Return-path" ":" route-addr ; return address - route = 1#("@" domain) ":" ; path-relative - route-addr = "<" [route] addr-spec ">" - source = [ trace ] ; net traversals - originator ; original mail - [ resent ] ; forwarded - SPACE = ; ( 40, 32.) - specials = "(" / ")" / "<" / ">" / "@" ; Must be in quoted- - / "," / ";" / ":" / "\" / <"> ; string, to use - / "." / "[" / "]" ; within a word. - sub-domain = domain-ref / domain-literal - text = atoms, specials, - CR & bare LF, but NOT ; comments and - including CRLF> ; quoted-strings are - ; NOT recognized. - time = hour zone ; ANSI and Military - trace = return ; path to sender - 1*received ; receipt tags - user-defined-field = - - word = atom / quoted-string - - - - - August 13, 1982 - 46 - RFC #822 - - - - Standard for ARPA Internet Text Messages - - - zone = "UT" / "GMT" ; Universal Time - ; North American : UT - / "EST" / "EDT" ; Eastern: - 5/ - 4 - / "CST" / "CDT" ; Central: - 6/ - 5 - / "MST" / "MDT" ; Mountain: - 7/ - 6 - / "PST" / "PDT" ; Pacific: - 8/ - 7 - / 1ALPHA ; Military: Z = UT; - <"> = ; ( 42, 34.) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - August 13, 1982 - 47 - RFC #822 - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1341.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1341.txt deleted file mode 100644 index 1be6f7d6..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1341.txt +++ /dev/null @@ -1,5265 +0,0 @@ - - - - - - - Network Working Group N. Borenstein, Bellcore - Request for Comments: 1341 N. Freed, Innosoft - June 1992 - - - - MIME (Multipurpose Internet Mail Extensions): - - - Mechanisms for Specifying and Describing - the Format of Internet Message Bodies - - - Status of this Memo - - This RFC specifies an IAB standards track protocol for the - Internet community, and requests discussion and suggestions - for improvements. Please refer to the current edition of - the "IAB Official Protocol Standards" for the - standardization state and status of this protocol. - Distribution of this memo is unlimited. - - Abstract - - RFC 822 defines a message representation protocol which - specifies considerable detail about message headers, but - which leaves the message content, or message body, as flat - ASCII text. This document redefines the format of message - bodies to allow multi-part textual and non-textual message - bodies to be represented and exchanged without loss of - information. This is based on earlier work documented in - RFC 934 and RFC 1049, but extends and revises that work. - Because RFC 822 said so little about message bodies, this - document is largely orthogonal to (rather than a revision - of) RFC 822. - - In particular, this document is designed to provide - facilities to include multiple objects in a single message, - to represent body text in character sets other than US- - ASCII, to represent formatted multi-font text messages, to - represent non-textual material such as images and audio - fragments, and generally to facilitate later extensions - defining new types of Internet mail for use by cooperating - mail agents. - - This document does NOT extend Internet mail header fields to - permit anything other than US-ASCII text data. It is - recognized that such extensions are necessary, and they are - the subject of a companion document [RFC -1342]. - - A table of contents appears at the end of this document. - - - - - - - Borenstein & Freed [Page i] - - - - - - - - 1 Introduction - - Since its publication in 1982, RFC 822 [RFC-822] has defined - the standard format of textual mail messages on the - Internet. Its success has been such that the RFC 822 format - has been adopted, wholly or partially, well beyond the - confines of the Internet and the Internet SMTP transport - defined by RFC 821 [RFC-821]. As the format has seen wider - use, a number of limitations have proven increasingly - restrictive for the user community. - - RFC 822 was intended to specify a format for text messages. - As such, non-text messages, such as multimedia messages that - might include audio or images, are simply not mentioned. - Even in the case of text, however, RFC 822 is inadequate for - the needs of mail users whose languages require the use of - character sets richer than US ASCII [US-ASCII]. Since RFC - 822 does not specify mechanisms for mail containing audio, - video, Asian language text, or even text in most European - languages, additional specifications are needed - - One of the notable limitations of RFC 821/822 based mail - systems is the fact that they limit the contents of - electronic mail messages to relatively short lines of - seven-bit ASCII. This forces users to convert any non- - textual data that they may wish to send into seven-bit bytes - representable as printable ASCII characters before invoking - a local mail UA (User Agent, a program with which human - users send and receive mail). Examples of such encodings - currently used in the Internet include pure hexadecimal, - uuencode, the 3-in-4 base 64 scheme specified in RFC 1113, - the Andrew Toolkit Representation [ATK], and many others. - - The limitations of RFC 822 mail become even more apparent as - gateways are designed to allow for the exchange of mail - messages between RFC 822 hosts and X.400 hosts. X.400 [X400] - specifies mechanisms for the inclusion of non-textual body - parts within electronic mail messages. The current - standards for the mapping of X.400 messages to RFC 822 - messages specify that either X.400 non-textual body parts - should be converted to (not encoded in) an ASCII format, or - that they should be discarded, notifying the RFC 822 user - that discarding has occurred. This is clearly undesirable, - as information that a user may wish to receive is lost. - Even though a user's UA may not have the capability of - dealing with the non-textual body part, the user might have - some mechanism external to the UA that can extract useful - information from the body part. Moreover, it does not allow - for the fact that the message may eventually be gatewayed - back into an X.400 message handling system (i.e., the X.400 - message is "tunneled" through Internet mail), where the - non-textual information would definitely become useful - again. - - - - - Borenstein & Freed [Page 1] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - This document describes several mechanisms that combine to - solve most of these problems without introducing any serious - incompatibilities with the existing world of RFC 822 mail. - In particular, it describes: - - 1. A MIME-Version header field, which uses a version number - to declare a message to be conformant with this - specification and allows mail processing agents to - distinguish between such messages and those generated - by older or non-conformant software, which is presumed - to lack such a field. - - 2. A Content-Type header field, generalized from RFC 1049 - [RFC-1049], which can be used to specify the type and - subtype of data in the body of a message and to fully - specify the native representation (encoding) of such - data. - - 2.a. A "text" Content-Type value, which can be used to - represent textual information in a number of - character sets and formatted text description - languages in a standardized manner. - - 2.b. A "multipart" Content-Type value, which can be - used to combine several body parts, possibly of - differing types of data, into a single message. - - 2.c. An "application" Content-Type value, which can be - used to transmit application data or binary data, - and hence, among other uses, to implement an - electronic mail file transfer service. - - 2.d. A "message" Content-Type value, for encapsulating - a mail message. - - 2.e An "image" Content-Type value, for transmitting - still image (picture) data. - - 2.f. An "audio" Content-Type value, for transmitting - audio or voice data. - - 2.g. A "video" Content-Type value, for transmitting - video or moving image data, possibly with audio as - part of the composite video data format. - - 3. A Content-Transfer-Encoding header field, which can be - used to specify an auxiliary encoding that was applied - to the data in order to allow it to pass through mail - transport mechanisms which may have data or character - set limitations. - - 4. Two optional header fields that can be used to further - describe the data in a message body, the Content-ID and - Content-Description header fields. - - - - Borenstein & Freed [Page 2] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - MIME has been carefully designed as an extensible mechanism, - and it is expected that the set of content-type/subtype - pairs and their associated parameters will grow - significantly with time. Several other MIME fields, notably - including character set names, are likely to have new values - defined over time. In order to ensure that the set of such - values is developed in an orderly, well-specified, and - public manner, MIME defines a registration process which - uses the Internet Assigned Numbers Authority (IANA) as a - central registry for such values. Appendix F provides - details about how IANA registration is accomplished. - - Finally, to specify and promote interoperability, Appendix A - of this document provides a basic applicability statement - for a subset of the above mechanisms that defines a minimal - level of "conformance" with this document. - - HISTORICAL NOTE: Several of the mechanisms described in - this document may seem somewhat strange or even baroque at - first reading. It is important to note that compatibility - with existing standards AND robustness across existing - practice were two of the highest priorities of the working - group that developed this document. In particular, - compatibility was always favored over elegance. - - 2 Notations, Conventions, and Generic BNF Grammar - - This document is being published in two versions, one as - plain ASCII text and one as PostScript. The latter is - recommended, though the textual contents are identical. An - Andrew-format copy of this document is also available from - the first author (Borenstein). - - Although the mechanisms specified in this document are all - described in prose, most are also described formally in the - modified BNF notation of RFC 822. Implementors will need to - be familiar with this notation in order to understand this - specification, and are referred to RFC 822 for a complete - explanation of the modified BNF notation. - - Some of the modified BNF in this document makes reference to - syntactic entities that are defined in RFC 822 and not in - this document. A complete formal grammar, then, is obtained - by combining the collected grammar appendix of this document - with that of RFC 822. - - The term CRLF, in this document, refers to the sequence of - the two ASCII characters CR (13) and LF (10) which, taken - together, in this order, denote a line break in RFC 822 - mail. - - The term "character set", wherever it is used in this - document, refers to a coded character set, in the sense of - ISO character set standardization work, and must not be - - - - Borenstein & Freed [Page 3] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - misinterpreted as meaning "a set of characters." - - The term "message", when not further qualified, means either - the (complete or "top-level") message being transferred on a - network, or a message encapsulated in a body of type - "message". - - The term "body part", in this document, means one of the - parts of the body of a multipart entity. A body part has a - header and a body, so it makes sense to speak about the body - of a body part. - - The term "entity", in this document, means either a message - or a body part. All kinds of entities share the property - that they have a header and a body. - - The term "body", when not further qualified, means the body - of an entity, that is the body of either a message or of a - body part. - - Note : the previous four definitions are clearly circular. - This is unavoidable, since the overal structure of a MIME - message is indeed recursive. - - In this document, all numeric and octet values are given in - decimal notation. - - It must be noted that Content-Type values, subtypes, and - parameter names as defined in this document are case- - insensitive. However, parameter values are case-sensitive - unless otherwise specified for the specific parameter. - - FORMATTING NOTE: This document has been carefully formatted - for ease of reading. The PostScript version of this - document, in particular, places notes like this one, which - may be skipped by the reader, in a smaller, italicized, - font, and indents it as well. In the text version, only the - indentation is preserved, so if you are reading the text - version of this you might consider using the PostScript - version instead. However, all such notes will be indented - and preceded by "NOTE:" or some similar introduction, even - in the text version. - - The primary purpose of these non-essential notes is to - convey information about the rationale of this document, or - to place this document in the proper historical or - evolutionary context. Such information may be skipped by - those who are focused entirely on building a compliant - implementation, but may be of use to those who wish to - understand why this document is written as it is. - - For ease of recognition, all BNF definitions have been - placed in a fixed-width font in the PostScript version of - this document. - - - - Borenstein & Freed [Page 4] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 3 The MIME-Version Header Field - - Since RFC 822 was published in 1982, there has really been - only one format standard for Internet messages, and there - has been little perceived need to declare the format - standard in use. This document is an independent document - that complements RFC 822. Although the extensions in this - document have been defined in such a way as to be compatible - with RFC 822, there are still circumstances in which it - might be desirable for a mail-processing agent to know - whether a message was composed with the new standard in - mind. - - Therefore, this document defines a new header field, "MIME- - Version", which is to be used to declare the version of the - Internet message body format standard in use. - - Messages composed in accordance with this document MUST - include such a header field, with the following verbatim - text: - - MIME-Version: 1.0 - - The presence of this header field is an assertion that the - message has been composed in compliance with this document. - - Since it is possible that a future document might extend the - message format standard again, a formal BNF is given for the - content of the MIME-Version field: - - MIME-Version := text - - Thus, future format specifiers, which might replace or - extend "1.0", are (minimally) constrained by the definition - of "text", which appears in RFC 822. - - Note that the MIME-Version header field is required at the - top level of a message. It is not required for each body - part of a multipart entity. It is required for the embedded - headers of a body of type "message" if and only if the - embedded message is itself claimed to be MIME-compliant. - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 5] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 4 The Content-Type Header Field - - The purpose of the Content-Type field is to describe the - data contained in the body fully enough that the receiving - user agent can pick an appropriate agent or mechanism to - present the data to the user, or otherwise deal with the - data in an appropriate manner. - - HISTORICAL NOTE: The Content-Type header field was first - defined in RFC 1049. RFC 1049 Content-types used a simpler - and less powerful syntax, but one that is largely compatible - with the mechanism given here. - - The Content-Type header field is used to specify the nature - of the data in the body of an entity, by giving type and - subtype identifiers, and by providing auxiliary information - that may be required for certain types. After the type and - subtype names, the remainder of the header field is simply a - set of parameters, specified in an attribute/value notation. - The set of meaningful parameters differs for the different - types. The ordering of parameters is not significant. - Among the defined parameters is a "charset" parameter by - which the character set used in the body may be declared. - Comments are allowed in accordance with RFC 822 rules for - structured header fields. - - In general, the top-level Content-Type is used to declare - the general type of data, while the subtype specifies a - specific format for that type of data. Thus, a Content-Type - of "image/xyz" is enough to tell a user agent that the data - is an image, even if the user agent has no knowledge of the - specific image format "xyz". Such information can be used, - for example, to decide whether or not to show a user the raw - data from an unrecognized subtype -- such an action might be - reasonable for unrecognized subtypes of text, but not for - unrecognized subtypes of image or audio. For this reason, - registered subtypes of audio, image, text, and video, should - not contain embedded information that is really of a - different type. Such compound types should be represented - using the "multipart" or "application" types. - - Parameters are modifiers of the content-subtype, and do not - fundamentally affect the requirements of the host system. - Although most parameters make sense only with certain - content-types, others are "global" in the sense that they - might apply to any subtype. For example, the "boundary" - parameter makes sense only for the "multipart" content-type, - but the "charset" parameter might make sense with several - content-types. - - An initial set of seven Content-Types is defined by this - document. This set of top-level names is intended to be - substantially complete. It is expected that additions to - the larger set of supported types can generally be - - - - Borenstein & Freed [Page 6] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - accomplished by the creation of new subtypes of these - initial types. In the future, more top-level types may be - defined only by an extension to this standard. If another - primary type is to be used for any reason, it must be given - a name starting with "X-" to indicate its non-standard - status and to avoid a potential conflict with a future - official name. - - In the Extended BNF notation of RFC 822, a Content-Type - header field value is defined as follows: - - Content-Type := type "/" subtype *[";" parameter] - - type := "application" / "audio" - / "image" / "message" - / "multipart" / "text" - / "video" / x-token - - x-token := - - subtype := token - - parameter := attribute "=" value - - attribute := token - - value := token / quoted-string - - token := 1* - - tspecials := "(" / ")" / "<" / ">" / "@" ; Must be in - / "," / ";" / ":" / "\" / <"> ; quoted-string, - / "/" / "[" / "]" / "?" / "." ; to use within - / "=" ; parameter values - - Note that the definition of "tspecials" is the same as the - RFC 822 definition of "specials" with the addition of the - three characters "/", "?", and "=". - - Note also that a subtype specification is MANDATORY. There - are no default subtypes. - - The type, subtype, and parameter names are not case - sensitive. For example, TEXT, Text, and TeXt are all - equivalent. Parameter values are normally case sensitive, - but certain parameters are interpreted to be case- - insensitive, depending on the intended use. (For example, - multipart boundaries are case-sensitive, but the "access- - type" for message/External-body is not case-sensitive.) - - Beyond this syntax, the only constraint on the definition of - subtype names is the desire that their uses must not - conflict. That is, it would be undesirable to have two - - - - Borenstein & Freed [Page 7] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - different communities using "Content-Type: - application/foobar" to mean two different things. The - process of defining new content-subtypes, then, is not - intended to be a mechanism for imposing restrictions, but - simply a mechanism for publicizing the usages. There are, - therefore, two acceptable mechanisms for defining new - Content-Type subtypes: - - 1. Private values (starting with "X-") may be - defined bilaterally between two cooperating - agents without outside registration or - standardization. - - 2. New standard values must be documented, - registered with, and approved by IANA, as - described in Appendix F. Where intended for - public use, the formats they refer to must - also be defined by a published specification, - and possibly offered for standardization. - - The seven standard initial predefined Content-Types are - detailed in the bulk of this document. They are: - - text -- textual information. The primary subtype, - "plain", indicates plain (unformatted) text. No - special software is required to get the full - meaning of the text, aside from support for the - indicated character set. Subtypes are to be used - for enriched text in forms where application - software may enhance the appearance of the text, - but such software must not be required in order to - get the general idea of the content. Possible - subtypes thus include any readable word processor - format. A very simple and portable subtype, - richtext, is defined in this document. - multipart -- data consisting of multiple parts of - independent data types. Four initial subtypes - are defined, including the primary "mixed" - subtype, "alternative" for representing the same - data in multiple formats, "parallel" for parts - intended to be viewed simultaneously, and "digest" - for multipart entities in which each part is of - type "message". - message -- an encapsulated message. A body of - Content-Type "message" is itself a fully formatted - RFC 822 conformant message which may contain its - own different Content-Type header field. The - primary subtype is "rfc822". The "partial" - subtype is defined for partial messages, to permit - the fragmented transmission of bodies that are - thought to be too large to be passed through mail - transport facilities. Another subtype, - "External-body", is defined for specifying large - bodies by reference to an external data source. - - - - Borenstein & Freed [Page 8] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - image -- image data. Image requires a display device - (such as a graphical display, a printer, or a FAX - machine) to view the information. Initial - subtypes are defined for two widely-used image - formats, jpeg and gif. - audio -- audio data, with initial subtype "basic". - Audio requires an audio output device (such as a - speaker or a telephone) to "display" the contents. - video -- video data. Video requires the capability to - display moving images, typically including - specialized hardware and software. The initial - subtype is "mpeg". - application -- some other kind of data, typically - either uninterpreted binary data or information to - be processed by a mail-based application. The - primary subtype, "octet-stream", is to be used in - the case of uninterpreted binary data, in which - case the simplest recommended action is to offer - to write the information into a file for the user. - Two additional subtypes, "ODA" and "PostScript", - are defined for transporting ODA and PostScript - documents in bodies. Other expected uses for - "application" include spreadsheets, data for - mail-based scheduling systems, and languages for - "active" (computational) email. (Note that active - email entails several securityconsiderations, - which are discussed later in this memo, - particularly in the context of - application/PostScript.) - - Default RFC 822 messages are typed by this protocol as plain - text in the US-ASCII character set, which can be explicitly - specified as "Content-type: text/plain; charset=us-ascii". - If no Content-Type is specified, either by error or by an - older user agent, this default is assumed. In the presence - of a MIME-Version header field, a receiving User Agent can - also assume that plain US-ASCII text was the sender's - intent. In the absence of a MIME-Version specification, - plain US-ASCII text must still be assumed, but the sender's - intent might have been otherwise. - - RATIONALE: In the absence of any Content-Type header field - or MIME-Version header field, it is impossible to be certain - that a message is actually text in the US-ASCII character - set, since it might well be a message that, using the - conventions that predate this document, includes text in - another character set or non-textual data in a manner that - cannot be automatically recognized (e.g., a uuencoded - compressed UNIX tar file). Although there is no fully - acceptable alternative to treating such untyped messages as - "text/plain; charset=us-ascii", implementors should remain - aware that if a message lacks both the MIME-Version and the - Content-Type header fields, it may in practice contain - almost anything. - - - - Borenstein & Freed [Page 9] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - It should be noted that the list of Content-Type values - given here may be augmented in time, via the mechanisms - described above, and that the set of subtypes is expected to - grow substantially. - - When a mail reader encounters mail with an unknown Content- - type value, it should generally treat it as equivalent to - "application/octet-stream", as described later in this - document. - - 5 The Content-Transfer-Encoding Header Field - - Many Content-Types which could usefully be transported via - email are represented, in their "natural" format, as 8-bit - character or binary data. Such data cannot be transmitted - over some transport protocols. For example, RFC 821 - restricts mail messages to 7-bit US-ASCII data with 1000 - character lines. - - It is necessary, therefore, to define a standard mechanism - for re-encoding such data into a 7-bit short-line format. - This document specifies that such encodings will be - indicated by a new "Content-Transfer-Encoding" header field. - The Content-Transfer-Encoding field is used to indicate the - type of transformation that has been used in order to - represent the body in an acceptable manner for transport. - - Unlike Content-Types, a proliferation of Content-Transfer- - Encoding values is undesirable and unnecessary. However, - establishing only a single Content-Transfer-Encoding - mechanism does not seem possible. There is a tradeoff - between the desire for a compact and efficient encoding of - largely-binary data and the desire for a readable encoding - of data that is mostly, but not entirely, 7-bit data. For - this reason, at least two encoding mechanisms are necessary: - a "readable" encoding and a "dense" encoding. - - The Content-Transfer-Encoding field is designed to specify - an invertible mapping between the "native" representation of - a type of data and a representation that can be readily - exchanged using 7 bit mail transport protocols, such as - those defined by RFC 821 (SMTP). This field has not been - defined by any previous standard. The field's value is a - single token specifying the type of encoding, as enumerated - below. Formally: - - Content-Transfer-Encoding := "BASE64" / "QUOTED-PRINTABLE" / - "8BIT" / "7BIT" / - "BINARY" / x-token - - These values are not case sensitive. That is, Base64 and - BASE64 and bAsE64 are all equivalent. An encoding type of - 7BIT requires that the body is already in a seven-bit mail- - ready representation. This is the default value -- that is, - - - - Borenstein & Freed [Page 10] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - "Content-Transfer-Encoding: 7BIT" is assumed if the - Content-Transfer-Encoding header field is not present. - - The values "8bit", "7bit", and "binary" all imply that NO - encoding has been performed. However, they are potentially - useful as indications of the kind of data contained in the - object, and therefore of the kind of encoding that might - need to be performed for transmission in a given transport - system. "7bit" means that the data is all represented as - short lines of US-ASCII data. "8bit" means that the lines - are short, but there may be non-ASCII characters (octets - with the high-order bit set). "Binary" means that not only - may non-ASCII characters be present, but also that the lines - are not necessarily short enough for SMTP transport. - - The difference between "8bit" (or any other conceivable - bit-width token) and the "binary" token is that "binary" - does not require adherence to any limits on line length or - to the SMTP CRLF semantics, while the bit-width tokens do - require such adherence. If the body contains data in any - bit-width other than 7-bit, the appropriate bit-width - Content-Transfer-Encoding token must be used (e.g., "8bit" - for unencoded 8 bit wide data). If the body contains binary - data, the "binary" Content-Transfer-Encoding token must be - used. - - NOTE: The distinction between the Content-Transfer-Encoding - values of "binary," "8bit," etc. may seem unimportant, in - that all of them really mean "none" -- that is, there has - been no encoding of the data for transport. However, clear - labeling will be of enormous value to gateways between - future mail transport systems with differing capabilities in - transporting data that do not meet the restrictions of RFC - 821 transport. - - As of the publication of this document, there are no - standardized Internet transports for which it is legitimate - to include unencoded 8-bit or binary data in mail bodies. - Thus there are no circumstances in which the "8bit" or - "binary" Content-Transfer-Encoding is actually legal on the - Internet. However, in the event that 8-bit or binary mail - transport becomes a reality in Internet mail, or when this - document is used in conjunction with any other 8-bit or - binary-capable transport mechanism, 8-bit or binary bodies - should be labeled as such using this mechanism. - - NOTE: The five values defined for the Content-Transfer- - Encoding field imply nothing about the Content-Type other - than the algorithm by which it was encoded or the transport - system requirements if unencoded. - - Implementors may, if necessary, define new Content- - Transfer-Encoding values, but must use an x-token, which is - a name prefixed by "X-" to indicate its non-standard status, - - - - Borenstein & Freed [Page 11] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - e.g., "Content-Transfer-Encoding: x-my-new-encoding". - However, unlike Content-Types and subtypes, the creation of - new Content-Transfer-Encoding values is explicitly and - strongly discouraged, as it seems likely to hinder - interoperability with little potential benefit. Their use - is allowed only as the result of an agreement between - cooperating user agents. - - If a Content-Transfer-Encoding header field appears as part - of a message header, it applies to the entire body of that - message. If a Content-Transfer-Encoding header field - appears as part of a body part's headers, it applies only to - the body of that body part. If an entity is of type - "multipart" or "message", the Content-Transfer-Encoding is - not permitted to have any value other than a bit width - (e.g., "7bit", "8bit", etc.) or "binary". - - It should be noted that email is character-oriented, so that - the mechanisms described here are mechanisms for encoding - arbitrary byte streams, not bit streams. If a bit stream is - to be encoded via one of these mechanisms, it must first be - converted to an 8-bit byte stream using the network standard - bit order ("big-endian"), in which the earlier bits in a - stream become the higher-order bits in a byte. A bit stream - not ending at an 8-bit boundary must be padded with zeroes. - This document provides a mechanism for noting the addition - of such padding in the case of the application Content-Type, - which has a "padding" parameter. - - The encoding mechanisms defined here explicitly encode all - data in ASCII. Thus, for example, suppose an entity has - header fields such as: - - Content-Type: text/plain; charset=ISO-8859-1 - Content-transfer-encoding: base64 - - This should be interpreted to mean that the body is a base64 - ASCII encoding of data that was originally in ISO-8859-1, - and will be in that character set again after decoding. - - The following sections will define the two standard encoding - mechanisms. The definition of new content-transfer- - encodings is explicitly discouraged and should only occur - when absolutely necessary. All content-transfer-encoding - namespace except that beginning with "X-" is explicitly - reserved to the IANA for future use. Private agreements - about content-transfer-encodings are also explicitly - discouraged. - - Certain Content-Transfer-Encoding values may only be used on - certain Content-Types. In particular, it is expressly - forbidden to use any encodings other than "7bit", "8bit", or - "binary" with any Content-Type that recursively includes - other Content-Type fields, notably the "multipart" and - - - - Borenstein & Freed [Page 12] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - "message" Content-Types. All encodings that are desired for - bodies of type multipart or message must be done at the - innermost level, by encoding the actual body that needs to - be encoded. - - NOTE ON ENCODING RESTRICTIONS: Though the prohibition - against using content-transfer-encodings on data of type - multipart or message may seem overly restrictive, it is - necessary to prevent nested encodings, in which data are - passed through an encoding algorithm multiple times, and - must be decoded multiple times in order to be properly - viewed. Nested encodings add considerable complexity to - user agents: aside from the obvious efficiency problems - with such multiple encodings, they can obscure the basic - structure of a message. In particular, they can imply that - several decoding operations are necessary simply to find out - what types of objects a message contains. Banning nested - encodings may complicate the job of certain mail gateways, - but this seems less of a problem than the effect of nested - encodings on user agents. - - NOTE ON THE RELATIONSHIP BETWEEN CONTENT-TYPE AND CONTENT- - TRANSFER-ENCODING: It may seem that the Content-Transfer- - Encoding could be inferred from the characteristics of the - Content-Type that is to be encoded, or, at the very least, - that certain Content-Transfer-Encodings could be mandated - for use with specific Content-Types. There are several - reasons why this is not the case. First, given the varying - types of transports used for mail, some encodings may be - appropriate for some Content-Type/transport combinations and - not for others. (For example, in an 8-bit transport, no - encoding would be required for text in certain character - sets, while such encodings are clearly required for 7-bit - SMTP.) Second, certain Content-Types may require different - types of transfer encoding under different circumstances. - For example, many PostScript bodies might consist entirely - of short lines of 7-bit data and hence require little or no - encoding. Other PostScript bodies (especially those using - Level 2 PostScript's binary encoding mechanism) may only be - reasonably represented using a binary transport encoding. - Finally, since Content-Type is intended to be an open-ended - specification mechanism, strict specification of an - association between Content-Types and encodings effectively - couples the specification of an application protocol with a - specific lower-level transport. This is not desirable since - the developers of a Content-Type should not have to be aware - of all the transports in use and what their limitations are. - - NOTE ON TRANSLATING ENCODINGS: The quoted-printable and - base64 encodings are designed so that conversion between - them is possible. The only issue that arises in such a - conversion is the handling of line breaks. When converting - from quoted-printable to base64 a line break must be - converted into a CRLF sequence. Similarly, a CRLF sequence - - - - Borenstein & Freed [Page 13] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - in base64 data should be converted to a quoted-printable - line break, but ONLY when converting text data. - - NOTE ON CANONICAL ENCODING MODEL: There was some - confusion, in earlier drafts of this memo, regarding the - model for when email data was to be converted to canonical - form and encoded, and in particular how this process would - affect the treatment of CRLFs, given that the representation - of newlines varies greatly from system to system. For this - reason, a canonical model for encoding is presented as - Appendix H. - - 5.1 Quoted-Printable Content-Transfer-Encoding - - The Quoted-Printable encoding is intended to represent data - that largely consists of octets that correspond to printable - characters in the ASCII character set. It encodes the data - in such a way that the resulting octets are unlikely to be - modified by mail transport. If the data being encoded are - mostly ASCII text, the encoded form of the data remains - largely recognizable by humans. A body which is entirely - ASCII may also be encoded in Quoted-Printable to ensure the - integrity of the data should the message pass through a - character-translating, and/or line-wrapping gateway. - - In this encoding, octets are to be represented as determined - by the following rules: - - Rule #1: (General 8-bit representation) Any octet, - except those indicating a line break according to the - newline convention of the canonical form of the data - being encoded, may be represented by an "=" followed by - a two digit hexadecimal representation of the octet's - value. The digits of the hexadecimal alphabet, for this - purpose, are "0123456789ABCDEF". Uppercase letters must - be - used when sending hexadecimal data, though a robust - implementation may choose to recognize lowercase - letters on receipt. Thus, for example, the value 12 - (ASCII form feed) can be represented by "=0C", and the - value 61 (ASCII EQUAL SIGN) can be represented by - "=3D". Except when the following rules allow an - alternative encoding, this rule is mandatory. - - Rule #2: (Literal representation) Octets with decimal - values of 33 through 60 inclusive, and 62 through 126, - inclusive, MAY be represented as the ASCII characters - which correspond to those octets (EXCLAMATION POINT - through LESS THAN, and GREATER THAN through TILDE, - respectively). - - Rule #3: (White Space): Octets with values of 9 and 32 - MAY be represented as ASCII TAB (HT) and SPACE - characters, respectively, but MUST NOT be so - - - - Borenstein & Freed [Page 14] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - represented at the end of an encoded line. Any TAB (HT) - or SPACE characters on an encoded line MUST thus be - followed on that line by a printable character. In - particular, an "=" at the end of an encoded line, - indicating a soft line break (see rule #5) may follow - one or more TAB (HT) or SPACE characters. It follows - that an octet with value 9 or 32 appearing at the end - of an encoded line must be represented according to - Rule #1. This rule is necessary because some MTAs - (Message Transport Agents, programs which transport - messages from one user to another, or perform a part of - such transfers) are known to pad lines of text with - SPACEs, and others are known to remove "white space" - characters from the end of a line. Therefore, when - decoding a Quoted-Printable body, any trailing white - space on a line must be deleted, as it will necessarily - have been added by intermediate transport agents. - - Rule #4 (Line Breaks): A line break in a text body - part, independent of what its representation is - following the canonical representation of the data - being encoded, must be represented by a (RFC 822) line - break, which is a CRLF sequence, in the Quoted- - Printable encoding. If isolated CRs and LFs, or LF CR - and CR LF sequences are allowed to appear in binary - data according to the canonical form, they must be - represented using the "=0D", "=0A", "=0A=0D" and - "=0D=0A" notations respectively. - - Note that many implementation may elect to encode the - local representation of various content types directly. - In particular, this may apply to plain text material on - systems that use newline conventions other than CRLF - delimiters. Such an implementation is permissible, but - the generation of line breaks must be generalized to - account for the case where alternate representations of - newline sequences are used. - - Rule #5 (Soft Line Breaks): The Quoted-Printable - encoding REQUIRES that encoded lines be no more than 76 - characters long. If longer lines are to be encoded with - the Quoted-Printable encoding, 'soft' line breaks must - be used. An equal sign as the last character on a - encoded line indicates such a non-significant ('soft') - line break in the encoded text. Thus if the "raw" form - of the line is a single unencoded line that says: - - Now's the time for all folk to come to the aid of - their country. - - This can be represented, in the Quoted-Printable - encoding, as - - - - - - Borenstein & Freed [Page 15] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Now's the time = - for all folk to come= - to the aid of their country. - - This provides a mechanism with which long lines are - encoded in such a way as to be restored by the user - agent. The 76 character limit does not count the - trailing CRLF, but counts all other characters, - including any equal signs. - - Since the hyphen character ("-") is represented as itself in - the Quoted-Printable encoding, care must be taken, when - encapsulating a quoted-printable encoded body in a multipart - entity, to ensure that the encapsulation boundary does not - appear anywhere in the encoded body. (A good strategy is to - choose a boundary that includes a character sequence such as - "=_" which can never appear in a quoted-printable body. See - the definition of multipart messages later in this - document.) - - NOTE: The quoted-printable encoding represents something of - a compromise between readability and reliability in - transport. Bodies encoded with the quoted-printable - encoding will work reliably over most mail gateways, but may - not work perfectly over a few gateways, notably those - involving translation into EBCDIC. (In theory, an EBCDIC - gateway could decode a quoted-printable body and re-encode - it using base64, but such gateways do not yet exist.) A - higher level of confidence is offered by the base64 - Content-Transfer-Encoding. A way to get reasonably reliable - transport through EBCDIC gateways is to also quote the ASCII - characters - - !"#$@[\]^`{|}~ - - according to rule #1. See Appendix B for more information. - - Because quoted-printable data is generally assumed to be - line-oriented, it is to be expected that the breaks between - the lines of quoted printable data may be altered in - transport, in the same manner that plain text mail has - always been altered in Internet mail when passing between - systems with differing newline conventions. If such - alterations are likely to constitute a corruption of the - data, it is probably more sensible to use the base64 - encoding rather than the quoted-printable encoding. - - - - - - - - - - - - Borenstein & Freed [Page 16] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 5.2 Base64 Content-Transfer-Encoding - - The Base64 Content-Transfer-Encoding is designed to - represent arbitrary sequences of octets in a form that is - not humanly readable. The encoding and decoding algorithms - are simple, but the encoded data are consistently only about - 33 percent larger than the unencoded data. This encoding is - based on the one used in Privacy Enhanced Mail applications, - as defined in RFC 1113. The base64 encoding is adapted - from RFC 1113, with one change: base64 eliminates the "*" - mechanism for embedded clear text. - - A 65-character subset of US-ASCII is used, enabling 6 bits - to be represented per printable character. (The extra 65th - character, "=", is used to signify a special processing - function.) - - NOTE: This subset has the important property that it is - represented identically in all versions of ISO 646, - including US ASCII, and all characters in the subset are - also represented identically in all versions of EBCDIC. - Other popular encodings, such as the encoding used by the - UUENCODE utility and the base85 encoding specified as part - of Level 2 PostScript, do not share these properties, and - thus do not fulfill the portability requirements a binary - transport encoding for mail must meet. - - The encoding process represents 24-bit groups of input bits - as output strings of 4 encoded characters. Proceeding from - left to right, a 24-bit input group is formed by - concatenating 3 8-bit input groups. These 24 bits are then - treated as 4 concatenated 6-bit groups, each of which is - translated into a single digit in the base64 alphabet. When - encoding a bit stream via the base64 encoding, the bit - stream must be presumed to be ordered with the most- - significant-bit first. That is, the first bit in the stream - will be the high-order bit in the first byte, and the eighth - bit will be the low-order bit in the first byte, and so on. - - Each 6-bit group is used as an index into an array of 64 - printable characters. The character referenced by the index - is placed in the output string. These characters, identified - in Table 1, below, are selected so as to be universally - representable, and the set excludes characters with - particular significance to SMTP (e.g., ".", "CR", "LF") and - to the encapsulation boundaries defined in this document - (e.g., "-"). - - - - - - - - - - - Borenstein & Freed [Page 17] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Table 1: The Base64 Alphabet - - Value Encoding Value Encoding Value Encoding Value - Encoding - 0 A 17 R 34 i 51 z - 1 B 18 S 35 j 52 0 - 2 C 19 T 36 k 53 1 - 3 D 20 U 37 l 54 2 - 4 E 21 V 38 m 55 3 - 5 F 22 W 39 n 56 4 - 6 G 23 X 40 o 57 5 - 7 H 24 Y 41 p 58 6 - 8 I 25 Z 42 q 59 7 - 9 J 26 a 43 r 60 8 - 10 K 27 b 44 s 61 9 - 11 L 28 c 45 t 62 + - 12 M 29 d 46 u 63 / - 13 N 30 e 47 v - 14 O 31 f 48 w (pad) = - 15 P 32 g 49 x - 16 Q 33 h 50 y - - The output stream (encoded bytes) must be represented in - lines of no more than 76 characters each. All line breaks - or other characters not found in Table 1 must be ignored by - decoding software. In base64 data, characters other than - those in Table 1, line breaks, and other white space - probably indicate a transmission error, about which a - warning message or even a message rejection might be - appropriate under some circumstances. - - Special processing is performed if fewer than 24 bits are - available at the end of the data being encoded. A full - encoding quantum is always completed at the end of a body. - When fewer than 24 input bits are available in an input - group, zero bits are added (on the right) to form an - integral number of 6-bit groups. Output character positions - which are not required to represent actual input data are - set to the character "=". Since all base64 input is an - integral number of octets, only the following cases can - arise: (1) the final quantum of encoding input is an - integral multiple of 24 bits; here, the final unit of - encoded output will be an integral multiple of 4 characters - with no "=" padding, (2) the final quantum of encoding input - is exactly 8 bits; here, the final unit of encoded output - will be two characters followed by two "=" padding - characters, or (3) the final quantum of encoding input is - exactly 16 bits; here, the final unit of encoded output will - be three characters followed by one "=" padding character. - - Care must be taken to use the proper octets for line breaks - if base64 encoding is applied directly to text material that - has not been converted to canonical form. In particular, - text line breaks should be converted into CRLF sequences - - - - Borenstein & Freed [Page 18] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - prior to base64 encoding. The important thing to note is - that this may be done directly by the encoder rather than in - a prior canonicalization step in some implementations. - - NOTE: There is no need to worry about quoting apparent - encapsulation boundaries within base64-encoded parts of - multipart entities because no hyphen characters are used in - the base64 encoding. - - 6 Additional Optional Content- Header Fields - - 6.1 Optional Content-ID Header Field - - In constructing a high-level user agent, it may be desirable - to allow one body to make reference to another. - Accordingly, bodies may be labeled using the "Content-ID" - header field, which is syntactically identical to the - "Message-ID" header field: - - Content-ID := msg-id - - Like the Message-ID values, Content-ID values must be - generated to be as unique as possible. - - 6.2 Optional Content-Description Header Field - - The ability to associate some descriptive information with a - given body is often desirable. For example, it may be useful - to mark an "image" body as "a picture of the Space Shuttle - Endeavor." Such text may be placed in the Content- - Description header field. - - Content-Description := *text - - The description is presumed to be given in the US-ASCII - character set, although the mechanism specified in [RFC- - 1342] may be used for non-US-ASCII Content-Description - values. - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 19] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 7 The Predefined Content-Type Values - - This document defines seven initial Content-Type values and - an extension mechanism for private or experimental types. - Further standard types must be defined by new published - specifications. It is expected that most innovation in new - types of mail will take place as subtypes of the seven types - defined here. The most essential characteristics of the - seven content-types are summarized in Appendix G. - - 7.1 The Text Content-Type - - The text Content-Type is intended for sending material which - is principally textual in form. It is the default Content- - Type. A "charset" parameter may be used to indicate the - character set of the body text. The primary subtype of text - is "plain". This indicates plain (unformatted) text. The - default Content-Type for Internet mail is "text/plain; - charset=us-ascii". - - Beyond plain text, there are many formats for representing - what might be known as "extended text" -- text with embedded - formatting and presentation information. An interesting - characteristic of many such representations is that they are - to some extent readable even without the software that - interprets them. It is useful, then, to distinguish them, - at the highest level, from such unreadable data as images, - audio, or text represented in an unreadable form. In the - absence of appropriate interpretation software, it is - reasonable to show subtypes of text to the user, while it is - not reasonable to do so with most nontextual data. - - Such formatted textual data should be represented using - subtypes of text. Plausible subtypes of text are typically - given by the common name of the representation format, e.g., - "text/richtext". - - 7.1.1 The charset parameter - - A critical parameter that may be specified in the Content- - Type field for text data is the character set. This is - specified with a "charset" parameter, as in: - - Content-type: text/plain; charset=us-ascii - - Unlike some other parameter values, the values of the - charset parameter are NOT case sensitive. The default - character set, which must be assumed in the absence of a - charset parameter, is US-ASCII. - - An initial list of predefined character set names can be - found at the end of this section. Additional character sets - may be registered with IANA as described in Appendix F, - although the standardization of their use requires the usual - - - - Borenstein & Freed [Page 20] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - IAB review and approval. Note that if the specified - character set includes 8-bit data, a Content-Transfer- - Encoding header field and a corresponding encoding on the - data are required in order to transmit the body via some - mail transfer protocols, such as SMTP. - - The default character set, US-ASCII, has been the subject of - some confusion and ambiguity in the past. Not only were - there some ambiguities in the definition, there have been - wide variations in practice. In order to eliminate such - ambiguity and variations in the future, it is strongly - recommended that new user agents explicitly specify a - character set via the Content-Type header field. "US-ASCII" - does not indicate an arbitrary seven-bit character code, but - specifies that the body uses character coding that uses the - exact correspondence of codes to characters specified in - ASCII. National use variations of ISO 646 [ISO-646] are NOT - ASCII and their use in Internet mail is explicitly - discouraged. The omission of the ISO 646 character set is - deliberate in this regard. The character set name of "US- - ASCII" explicitly refers to ANSI X3.4-1986 [US-ASCII] only. - The character set name "ASCII" is reserved and must not be - used for any purpose. - - NOTE: RFC 821 explicitly specifies "ASCII", and references - an earlier version of the American Standard. Insofar as one - of the purposes of specifying a Content-Type and character - set is to permit the receiver to unambiguously determine how - the sender intended the coded message to be interpreted, - assuming anything other than "strict ASCII" as the default - would risk unintentional and incompatible changes to the - semantics of messages now being transmitted. This also - implies that messages containing characters coded according - to national variations on ISO 646, or using code-switching - procedures (e.g., those of ISO 2022), as well as 8-bit or - multiple octet character encodings MUST use an appropriate - character set specification to be consistent with this - specification. - - The complete US-ASCII character set is listed in [US-ASCII]. - Note that the control characters including DEL (0-31, 127) - have no defined meaning apart from the combination CRLF - (ASCII values 13 and 10) indicating a new line. Two of the - characters have de facto meanings in wide use: FF (12) often - means "start subsequent text on the beginning of a new - page"; and TAB or HT (9) often (though not always) means - "move the cursor to the next available column after the - current position where the column number is a multiple of 8 - (counting the first column as column 0)." Apart from this, - any use of the control characters or DEL in a body must be - part of a private agreement between the sender and - recipient. Such private agreements are discouraged and - should be replaced by the other capabilities of this - document. - - - - Borenstein & Freed [Page 21] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - NOTE: Beyond US-ASCII, an enormous proliferation of - character sets is possible. It is the opinion of the IETF - working group that a large number of character sets is NOT a - good thing. We would prefer to specify a single character - set that can be used universally for representing all of the - world's languages in electronic mail. Unfortunately, - existing practice in several communities seems to point to - the continued use of multiple character sets in the near - future. For this reason, we define names for a small number - of character sets for which a strong constituent base - exists. It is our hope that ISO 10646 or some other - effort will eventually define a single world character set - which can then be specified for use in Internet mail, but in - the advance of that definition we cannot specify the use of - ISO 10646, Unicode, or any other character set whose - definition is, as of this writing, incomplete. - - The defined charset values are: - - US-ASCII -- as defined in [US-ASCII]. - - ISO-8859-X -- where "X" is to be replaced, as - necessary, for the parts of ISO-8859 [ISO- - 8859]. Note that the ISO 646 character sets - have deliberately been omitted in favor of - their 8859 replacements, which are the - designated character sets for Internet mail. - As of the publication of this document, the - legitimate values for "X" are the digits 1 - through 9. - - Note that the character set used, if anything other than - US-ASCII, must always be explicitly specified in the - Content-Type field. - - No other character set name may be used in Internet mail - without the publication of a formal specification and its - registration with IANA as described in Appendix F, or by - private agreement, in which case the character set name must - begin with "X-". - - Implementors are discouraged from defining new character - sets for mail use unless absolutely necessary. - - The "charset" parameter has been defined primarily for the - purpose of textual data, and is described in this section - for that reason. However, it is conceivable that non- - textual data might also wish to specify a charset value for - some purpose, in which case the same syntax and values - should be used. - - In general, mail-sending software should always use the - "lowest common denominator" character set possible. For - example, if a body contains only US-ASCII characters, it - - - - Borenstein & Freed [Page 22] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - should be marked as being in the US-ASCII character set, not - ISO-8859-1, which, like all the ISO-8859 family of character - sets, is a superset of US-ASCII. More generally, if a - widely-used character set is a subset of another character - set, and a body contains only characters in the widely-used - subset, it should be labeled as being in that subset. This - will increase the chances that the recipient will be able to - view the mail correctly. - - 7.1.2 The Text/plain subtype - - The primary subtype of text is "plain". This indicates - plain (unformatted) text. The default Content-Type for - Internet mail, "text/plain; charset=us-ascii", describes - existing Internet practice, that is, it is the type of body - defined by RFC 822. - - 7.1.3 The Text/richtext subtype - - In order to promote the wider interoperability of simple - formatted text, this document defines an extremely simple - subtype of "text", the "richtext" subtype. This subtype was - designed to meet the following criteria: - - 1. The syntax must be extremely simple to parse, - so that even teletype-oriented mail systems can - easily strip away the formatting information and - leave only the readable text. - - 2. The syntax must be extensible to allow for new - formatting commands that are deemed essential. - - 3. The capabilities must be extremely limited, to - ensure that it can represent no more than is - likely to be representable by the user's primary - word processor. While this limits what can be - sent, it increases the likelihood that what is - sent can be properly displayed. - - 4. The syntax must be compatible with SGML, so - that, with an appropriate DTD (Document Type - Definition, the standard mechanism for defining a - document type using SGML), a general SGML parser - could be made to parse richtext. However, despite - this compatibility, the syntax should be far - simpler than full SGML, so that no SGML knowledge - is required in order to implement it. - - The syntax of "richtext" is very simple. It is assumed, at - the top-level, to be in the US-ASCII character set, unless - of course a different charset parameter was specified in the - Content-type field. All characters represent themselves, - with the exception of the "<" character (ASCII 60), which is - used to mark the beginning of a formatting command. - - - - Borenstein & Freed [Page 23] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Formatting instructions consist of formatting commands - surrounded by angle brackets ("<>", ASCII 60 and 62). Each - formatting command may be no more than 40 characters in - length, all in US-ASCII, restricted to the alphanumeric and - hyphen ("-") characters. Formatting commands may be preceded - by a forward slash or solidus ("/", ASCII 47), making them - negations, and such negations must always exist to balance - the initial opening commands, except as noted below. Thus, - if the formatting command "" appears at some point, - there must later be a "" to balance it. There are - only three exceptions to this "balancing" rule: First, the - command "" is used to represent a literal "<" character. - Second, the command "" is used to represent a required - line break. (Otherwise, CRLFs in the data are treated as - equivalent to a single SPACE character.) Finally, the - command "" is used to represent a page break. (NOTE: - The 40 character limit on formatting commands does not - include the "<", ">", or "/" characters that might be - attached to such commands.) - - Initially defined formatting commands, not all of which will - be implemented by all richtext implementations, include: - - Bold -- causes the subsequent text to be in a bold - font. - Italic -- causes the subsequent text to be in an italic - font. - Fixed -- causes the subsequent text to be in a fixed - width font. - Smaller -- causes the subsequent text to be in a - smaller font. - Bigger -- causes the subsequent text to be in a bigger - font. - Underline -- causes the subsequent text to be - underlined. - Center -- causes the subsequent text to be centered. - FlushLeft -- causes the subsequent text to be left - justified. - FlushRight -- causes the subsequent text to be right - justified. - Indent -- causes the subsequent text to be indented at - the left margin. - IndentRight -- causes the subsequent text to be - indented at the right margin. - Outdent -- causes the subsequent text to be outdented - at the left margin. - OutdentRight -- causes the subsequent text to be - outdented at the right margin. - SamePage -- causes the subsequent text to be grouped, - if possible, on one page. - Subscript -- causes the subsequent text to be - interpreted as a subscript. - - - - - - Borenstein & Freed [Page 24] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Superscript -- causes the subsequent text to be - interpreted as a superscript. - Heading -- causes the subsequent text to be interpreted - as a page heading. - Footing -- causes the subsequent text to be interpreted - as a page footing. - ISO-8859-X (for any value of X that is legal as a - "charset" parameter) -- causes the subsequent text - to be interpreted as text in the appropriate - character set. - US-ASCII -- causes the subsequent text to be - interpreted as text in the US-ASCII character set. - Excerpt -- causes the subsequent text to be interpreted - as a textual excerpt from another source. - Typically this will be displayed using indentation - and an alternate font, but such decisions are up - to the viewer. - Paragraph -- causes the subsequent text to be - interpreted as a single paragraph, with - appropriate paragraph breaks (typically blank - space) before and after. - Signature -- causes the subsequent text to be - interpreted as a "signature". Some systems may - wish to display signatures in a smaller font or - otherwise set them apart from the main text of the - message. - Comment -- causes the subsequent text to be interpreted - as a comment, and hence not shown to the reader. - No-op -- has no effect on the subsequent text. - lt -- is replaced by a literal "<" character. No - balancing is allowed. - nl -- causes a line break. No balancing is - allowed. - np -- causes a page break. No balancing is - allowed. - - Each positive formatting command affects all subsequent text - until the matching negative formatting command. Such pairs - of formatting commands must be properly balanced and nested. - Thus, a proper way to describe text in bold italics is: - - the-text - - or, alternately, - - the-text - - but, in particular, the following is illegal - richtext: - - the-text - - NOTE: The nesting requirement for formatting commands - imposes a slightly higher burden upon the composers of - - - - Borenstein & Freed [Page 25] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - richtext bodies, but potentially simplifies richtext - displayers by allowing them to be stack-based. The main - goal of richtext is to be simple enough to make multifont, - formatted email widely readable, so that those with the - capability of sending it will be able to do so with - confidence. Thus slightly increased complexity in the - composing software was deemed a reasonable tradeoff for - simplified reading software. Nonetheless, implementors of - richtext readers are encouraged to follow the general - Internet guidelines of being conservative in what you send - and liberal in what you accept. Those implementations that - can do so are encouraged to deal reasonably with improperly - nested richtext. - - Implementations must regard any unrecognized formatting - command as equivalent to "No-op", thus facilitating future - extensions to "richtext". Private extensions may be defined - using formatting commands that begin with "X-", by analogy - to Internet mail header field names. - - It is worth noting that no special behavior is required for - the TAB (HT) character. It is recommended, however, that, at - least when fixed-width fonts are in use, the common - semantics of the TAB (HT) character should be observed, - namely that it moves to the next column position that is a - multiple of 8. (In other words, if a TAB (HT) occurs in - column n, where the leftmost column is column 0, then that - TAB (HT) should be replaced by 8-(n mod 8) SPACE - characters.) - - Richtext also differentiates between "hard" and "soft" line - breaks. A line break (CRLF) in the richtext data stream is - interpreted as a "soft" line break, one that is included - only for purposes of mail transport, and is to be treated as - white space by richtext interpreters. To include a "hard" - line break (one that must be displayed as such), the "" - or " formatting constructs should be used. In - general, a soft line break should be treated as white space, - but when soft line breaks immediately follow a or a - tag they should be ignored rather than treated - as white space. - - Putting all this together, the following "text/richtext" - body fragment: - - Now is the time for - all good men - (and women>) to - come - - to the aid of their - - - - - - - Borenstein & Freed [Page 26] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - beloved country. Stupid - quote! -- the end - - represents the following formatted text (which will, no - doubt, look cryptic in the text-only version of this - document): - - Now is the time for all good men (and ) to - come to the aid of their - beloved - - country. -- the end - - Richtext conformance: A minimal richtext implementation is - one that simply converts "" to "<", converts CRLFs to - SPACE, converts to a newline according to local newline - convention, removes everything between a command - and the next balancing command, and removes all - other formatting commands (all text enclosed in angle - brackets). - - NOTE ON THE RELATIONSHIP OF RICHTEXT TO SGML: Richtext is - decidedly not SGML, and must not be used to transport - arbitrary SGML documents. Those who wish to use SGML - document types as a mail transport format must define a new - text or application subtype, e.g., "text/sgml-dtd-whatever" - or "application/sgml-dtd-whatever", depending on the - perceived readability of the DTD in use. Richtext is - designed to be compatible with SGML, and specifically so - that it will be possible to define a richtext DTD if one is - needed. However, this does not imply that arbitrary SGML - can be called richtext, nor that richtext implementors have - any need to understand SGML; the description in this - document is a complete definition of richtext, which is far - simpler than complete SGML. - - NOTE ON THE INTENDED USE OF RICHTEXT: It is recognized that - implementors of future mail systems will want rich text - functionality far beyond that currently defined for - richtext. The intent of richtext is to provide a common - format for expressing that functionality in a form in which - much of it, at least, will be understood by interoperating - software. Thus, in particular, software with a richer - notion of formatted text than richtext can still use - richtext as its basic representation, but can extend it with - new formatting commands and by hiding information specific - to that software system in richtext comments. As such - systems evolve, it is expected that the definition of - richtext will be further refined by future published - specifications, but richtext as defined here provides a - platform on which evolutionary refinements can be based. - - IMPLEMENTATION NOTE: In some environments, it might be - impossible to combine certain richtext formatting commands, - - - - Borenstein & Freed [Page 27] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - whereas in others they might be combined easily. For - example, the combination of and might - produce bold italics on systems that support such fonts, but - there exist systems that can make text bold or italicized, - but not both. In such cases, the most recently issued - recognized formatting command should be preferred. - - One of the major goals in the design of richtext was to make - it so simple that even text-only mailers will implement - richtext-to-plain-text translators, thus increasing the - likelihood that multifont text will become "safe" to use - very widely. To demonstrate this simplicity, an extremely - simple 35-line C program that converts richtext input into - plain text output is included in Appendix D. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 28] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 7.2 The Multipart Content-Type - - In the case of multiple part messages, in which one or more - different sets of data are combined in a single body, a - "multipart" Content-Type field must appear in the entity's - header. The body must then contain one or more "body parts," - each preceded by an encapsulation boundary, and the last one - followed by a closing boundary. Each part starts with an - encapsulation boundary, and then contains a body part - consisting of header area, a blank line, and a body area. - Thus a body part is similar to an RFC 822 message in syntax, - but different in meaning. - - A body part is NOT to be interpreted as actually being an - RFC 822 message. To begin with, NO header fields are - actually required in body parts. A body part that starts - with a blank line, therefore, is allowed and is a body part - for which all default values are to be assumed. In such a - case, the absence of a Content-Type header field implies - that the encapsulation is plain US-ASCII text. The only - header fields that have defined meaning for body parts are - those the names of which begin with "Content-". All other - header fields are generally to be ignored in body parts. - Although they should generally be retained in mail - processing, they may be discarded by gateways if necessary. - Such other fields are permitted to appear in body parts but - should not be depended on. "X-" fields may be created for - experimental or private purposes, with the recognition that - the information they contain may be lost at some gateways. - - The distinction between an RFC 822 message and a body part - is subtle, but important. A gateway between Internet and - X.400 mail, for example, must be able to tell the difference - between a body part that contains an image and a body part - that contains an encapsulated message, the body of which is - an image. In order to represent the latter, the body part - must have "Content-Type: message", and its body (after the - blank line) must be the encapsulated message, with its own - "Content-Type: image" header field. The use of similar - syntax facilitates the conversion of messages to body parts, - and vice versa, but the distinction between the two must be - understood by implementors. (For the special case in which - all parts actually are messages, a "digest" subtype is also - defined.) - - As stated previously, each body part is preceded by an - encapsulation boundary. The encapsulation boundary MUST NOT - appear inside any of the encapsulated parts. Thus, it is - crucial that the composing agent be able to choose and - specify the unique boundary that will separate the parts. - - All present and future subtypes of the "multipart" type must - use an identical syntax. Subtypes may differ in their - semantics, and may impose additional restrictions on syntax, - - - - Borenstein & Freed [Page 29] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - but must conform to the required syntax for the multipart - type. This requirement ensures that all conformant user - agents will at least be able to recognize and separate the - parts of any multipart entity, even of an unrecognized - subtype. - - As stated in the definition of the Content-Transfer-Encoding - field, no encoding other than "7bit", "8bit", or "binary" is - permitted for entities of type "multipart". The multipart - delimiters and header fields are always 7-bit ASCII in any - case, and data within the body parts can be encoded on a - part-by-part basis, with Content-Transfer-Encoding fields - for each appropriate body part. - - Mail gateways, relays, and other mail handling agents are - commonly known to alter the top-level header of an RFC 822 - message. In particular, they frequently add, remove, or - reorder header fields. Such alterations are explicitly - forbidden for the body part headers embedded in the bodies - of messages of type "multipart." - - 7.2.1 Multipart: The common syntax - - All subtypes of "multipart" share a common syntax, defined - in this section. A simple example of a multipart message - also appears in this section. An example of a more complex - multipart message is given in Appendix C. - - The Content-Type field for multipart entities requires one - parameter, "boundary", which is used to specify the - encapsulation boundary. The encapsulation boundary is - defined as a line consisting entirely of two hyphen - characters ("-", decimal code 45) followed by the boundary - parameter value from the Content-Type header field. - - NOTE: The hyphens are for rough compatibility with the - earlier RFC 934 method of message encapsulation, and for - ease of searching for the boundaries in some - implementations. However, it should be noted that multipart - messages are NOT completely compatible with RFC 934 - encapsulations; in particular, they do not obey RFC 934 - quoting conventions for embedded lines that begin with - hyphens. This mechanism was chosen over the RFC 934 - mechanism because the latter causes lines to grow with each - level of quoting. The combination of this growth with the - fact that SMTP implementations sometimes wrap long lines - made the RFC 934 mechanism unsuitable for use in the event - that deeply-nested multipart structuring is ever desired. - - Thus, a typical multipart Content-Type header field might - look like this: - - Content-Type: multipart/mixed; - - - - - Borenstein & Freed [Page 30] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - boundary=gc0p4Jq0M2Yt08jU534c0p - - This indicates that the entity consists of several parts, - each itself with a structure that is syntactically identical - to an RFC 822 message, except that the header area might be - completely empty, and that the parts are each preceded by - the line - - --gc0p4Jq0M2Yt08jU534c0p - - Note that the encapsulation boundary must occur at the - beginning of a line, i.e., following a CRLF, and that that - initial CRLF is considered to be part of the encapsulation - boundary rather than part of the preceding part. The - boundary must be followed immediately either by another CRLF - and the header fields for the next part, or by two CRLFs, in - which case there are no header fields for the next part (and - it is therefore assumed to be of Content-Type text/plain). - - NOTE: The CRLF preceding the encapsulation line is - considered part of the boundary so that it is possible to - have a part that does not end with a CRLF (line break). - Body parts that must be considered to end with line breaks, - therefore, should have two CRLFs preceding the encapsulation - line, the first of which is part of the preceding body part, - and the second of which is part of the encapsulation - boundary. - - The requirement that the encapsulation boundary begins with - a CRLF implies that the body of a multipart entity must - itself begin with a CRLF before the first encapsulation line - -- that is, if the "preamble" area is not used, the entity - headers must be followed by TWO CRLFs. This is indeed how - such entities should be composed. A tolerant mail reading - program, however, may interpret a body of type multipart - that begins with an encapsulation line NOT initiated by a - CRLF as also being an encapsulation boundary, but a - compliant mail sending program must not generate such - entities. - - Encapsulation boundaries must not appear within the - encapsulations, and must be no longer than 70 characters, - not counting the two leading hyphens. - - The encapsulation boundary following the last body part is a - distinguished delimiter that indicates that no further body - parts will follow. Such a delimiter is identical to the - previous delimiters, with the addition of two more hyphens - at the end of the line: - - --gc0p4Jq0M2Yt08jU534c0p-- - - There appears to be room for additional information prior to - the first encapsulation boundary and following the final - - - - Borenstein & Freed [Page 31] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - boundary. These areas should generally be left blank, and - implementations should ignore anything that appears before - the first boundary or after the last one. - - NOTE: These "preamble" and "epilogue" areas are not used - because of the lack of proper typing of these parts and the - lack of clear semantics for handling these areas at - gateways, particularly X.400 gateways. - - NOTE: Because encapsulation boundaries must not appear in - the body parts being encapsulated, a user agent must - exercise care to choose a unique boundary. The boundary in - the example above could have been the result of an algorithm - designed to produce boundaries with a very low probability - of already existing in the data to be encapsulated without - having to prescan the data. Alternate algorithms might - result in more 'readable' boundaries for a recipient with an - old user agent, but would require more attention to the - possibility that the boundary might appear in the - encapsulated part. The simplest boundary possible is - something like "---", with a closing boundary of "-----". - - As a very simple example, the following multipart message - has two parts, both of them plain text, one of them - explicitly typed and one of them implicitly typed: - - From: Nathaniel Borenstein - To: Ned Freed - Subject: Sample message - MIME-Version: 1.0 - Content-type: multipart/mixed; boundary="simple - boundary" - - This is the preamble. It is to be ignored, though it - is a handy place for mail composers to include an - explanatory note to non-MIME compliant readers. - --simple boundary - - This is implicitly typed plain ASCII text. - It does NOT end with a linebreak. - --simple boundary - Content-type: text/plain; charset=us-ascii - - This is explicitly typed plain ASCII text. - It DOES end with a linebreak. - - --simple boundary-- - This is the epilogue. It is also to be ignored. - - The use of a Content-Type of multipart in a body part within - another multipart entity is explicitly allowed. In such - cases, for obvious reasons, care must be taken to ensure - that each nested multipart entity must use a different - boundary delimiter. See Appendix C for an example of nested - - - - Borenstein & Freed [Page 32] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - multipart entities. - - The use of the multipart Content-Type with only a single - body part may be useful in certain contexts, and is - explicitly permitted. - - The only mandatory parameter for the multipart Content-Type - is the boundary parameter, which consists of 1 to 70 - characters from a set of characters known to be very robust - through email gateways, and NOT ending with white space. - (If a boundary appears to end with white space, the white - space must be presumed to have been added by a gateway, and - should be deleted.) It is formally specified by the - following BNF: - - boundary := 0*69 bcharsnospace - - bchars := bcharsnospace / " " - - bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" / "+" / - "_" - / "," / "-" / "." / "/" / ":" / "=" / "?" - - Overall, the body of a multipart entity may be specified as - follows: - - multipart-body := preamble 1*encapsulation - close-delimiter epilogue - - encapsulation := delimiter CRLF body-part - - delimiter := CRLF "--" boundary ; taken from Content-Type - field. - ; when content-type is - multipart - ; There must be no space - ; between "--" and boundary. - - close-delimiter := delimiter "--" ; Again, no space before - "--" - - preamble := *text ; to be ignored upon - receipt. - - epilogue := *text ; to be ignored upon - receipt. - - body-part = <"message" as defined in RFC 822, - with all header fields optional, and with the - specified delimiter not occurring anywhere in - the message body, either on a line by itself - or as a substring anywhere. Note that the - - - - - - Borenstein & Freed [Page 33] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - semantics of a part differ from the semantics - of a message, as described in the text.> - - NOTE: Conspicuously missing from the multipart type is a - notion of structured, related body parts. In general, it - seems premature to try to standardize interpart structure - yet. It is recommended that those wishing to provide a more - structured or integrated multipart messaging facility should - define a subtype of multipart that is syntactically - identical, but that always expects the inclusion of a - distinguished part that can be used to specify the structure - and integration of the other parts, probably referring to - them by their Content-ID field. If this approach is used, - other implementations will not recognize the new subtype, - but will treat it as the primary subtype (multipart/mixed) - and will thus be able to show the user the parts that are - recognized. - - 7.2.2 The Multipart/mixed (primary) subtype - - The primary subtype for multipart, "mixed", is intended for - use when the body parts are independent and intended to be - displayed serially. Any multipart subtypes that an - implementation does not recognize should be treated as being - of subtype "mixed". - - 7.2.3 The Multipart/alternative subtype - - The multipart/alternative type is syntactically identical to - multipart/mixed, but the semantics are different. In - particular, each of the parts is an "alternative" version of - the same information. User agents should recognize that the - content of the various parts are interchangeable. The user - agent should either choose the "best" type based on the - user's environment and preferences, or offer the user the - available alternatives. In general, choosing the best type - means displaying only the LAST part that can be displayed. - This may be used, for example, to send mail in a fancy text - format in such a way that it can easily be displayed - anywhere: - - From: Nathaniel Borenstein - To: Ned Freed - Subject: Formatted text mail - MIME-Version: 1.0 - Content-Type: multipart/alternative; boundary=boundary42 - - - --boundary42 - Content-Type: text/plain; charset=us-ascii - - ...plain text version of message goes here.... - - - - - - Borenstein & Freed [Page 34] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - --boundary42 - Content-Type: text/richtext - - .... richtext version of same message goes here ... - --boundary42 - Content-Type: text/x-whatever - - .... fanciest formatted version of same message goes here - ... - --boundary42-- - - In this example, users whose mail system understood the - "text/x-whatever" format would see only the fancy version, - while other users would see only the richtext or plain text - version, depending on the capabilities of their system. - - In general, user agents that compose multipart/alternative - entities should place the body parts in increasing order of - preference, that is, with the preferred format last. For - fancy text, the sending user agent should put the plainest - format first and the richest format last. Receiving user - agents should pick and display the last format they are - capable of displaying. In the case where one of the - alternatives is itself of type "multipart" and contains - unrecognized sub-parts, the user agent may choose either to - show that alternative, an earlier alternative, or both. - - NOTE: From an implementor's perspective, it might seem more - sensible to reverse this ordering, and have the plainest - alternative last. However, placing the plainest alternative - first is the friendliest possible option when - mutlipart/alternative entities are viewed using a non-MIME- - compliant mail reader. While this approach does impose some - burden on compliant mail readers, interoperability with - older mail readers was deemed to be more important in this - case. - - It may be the case that some user agents, if they can - recognize more than one of the formats, will prefer to offer - the user the choice of which format to view. This makes - sense, for example, if mail includes both a nicely-formatted - image version and an easily-edited text version. What is - most critical, however, is that the user not automatically - be shown multiple versions of the same data. Either the - user should be shown the last recognized version or should - explicitly be given the choice. - - - - - - - - - - - - Borenstein & Freed [Page 35] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 7.2.4 The Multipart/digest subtype - - This document defines a "digest" subtype of the multipart - Content-Type. This type is syntactically identical to - multipart/mixed, but the semantics are different. In - particular, in a digest, the default Content-Type value for - a body part is changed from "text/plain" to - "message/rfc822". This is done to allow a more readable - digest format that is largely compatible (except for the - quoting convention) with RFC 934. - - A digest in this format might, then, look something like - this: - - From: Moderator-Address - MIME-Version: 1.0 - Subject: Internet Digest, volume 42 - Content-Type: multipart/digest; - boundary="---- next message ----" - - - ------ next message ---- - - From: someone-else - Subject: my opinion - - ...body goes here ... - - ------ next message ---- - - From: someone-else-again - Subject: my different opinion - - ... another body goes here... - - ------ next message ------ - - 7.2.5 The Multipart/parallel subtype - - This document defines a "parallel" subtype of the multipart - Content-Type. This type is syntactically identical to - multipart/mixed, but the semantics are different. In - particular, in a parallel entity, all of the parts are - intended to be presented in parallel, i.e., simultaneously, - on hardware and software that are capable of doing so. - Composing agents should be aware that many mail readers will - lack this capability and will show the parts serially in any - event. - - - - - - - - - - Borenstein & Freed [Page 36] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 7.3 The Message Content-Type - - It is frequently desirable, in sending mail, to encapsulate - another mail message. For this common operation, a special - Content-Type, "message", is defined. The primary subtype, - message/rfc822, has no required parameters in the Content- - Type field. Additional subtypes, "partial" and "External- - body", do have required parameters. These subtypes are - explained below. - - NOTE: It has been suggested that subtypes of message might - be defined for forwarded or rejected messages. However, - forwarded and rejected messages can be handled as multipart - messages in which the first part contains any control or - descriptive information, and a second part, of type - message/rfc822, is the forwarded or rejected message. - Composing rejection and forwarding messages in this manner - will preserve the type information on the original message - and allow it to be correctly presented to the recipient, and - hence is strongly encouraged. - - As stated in the definition of the Content-Transfer-Encoding - field, no encoding other than "7bit", "8bit", or "binary" is - permitted for messages or parts of type "message". The - message header fields are always US-ASCII in any case, and - data within the body can still be encoded, in which case the - Content-Transfer-Encoding header field in the encapsulated - message will reflect this. Non-ASCII text in the headers of - an encapsulated message can be specified using the - mechanisms described in [RFC-1342]. - - Mail gateways, relays, and other mail handling agents are - commonly known to alter the top-level header of an RFC 822 - message. In particular, they frequently add, remove, or - reorder header fields. Such alterations are explicitly - forbidden for the encapsulated headers embedded in the - bodies of messages of type "message." - - 7.3.1 The Message/rfc822 (primary) subtype - - A Content-Type of "message/rfc822" indicates that the body - contains an encapsulated message, with the syntax of an RFC - 822 message. - - 7.3.2 The Message/Partial subtype - - A subtype of message, "partial", is defined in order to - allow large objects to be delivered as several separate - pieces of mail and automatically reassembled by the - receiving user agent. (The concept is similar to IP - fragmentation/reassembly in the basic Internet Protocols.) - This mechanism can be used when intermediate transport - agents limit the size of individual messages that can be - sent. Content-Type "message/partial" thus indicates that - - - - Borenstein & Freed [Page 37] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - the body contains a fragment of a larger message. - - Three parameters must be specified in the Content-Type field - of type message/partial: The first, "id", is a unique - identifier, as close to a world-unique identifier as - possible, to be used to match the parts together. (In - general, the identifier is essentially a message-id; if - placed in double quotes, it can be any message-id, in - accordance with the BNF for "parameter" given earlier in - this specification.) The second, "number", an integer, is - the part number, which indicates where this part fits into - the sequence of fragments. The third, "total", another - integer, is the total number of parts. This third subfield - is required on the final part, and is optional on the - earlier parts. Note also that these parameters may be given - in any order. - - Thus, part 2 of a 3-part message may have either of the - following header fields: - - Content-Type: Message/Partial; - number=2; total=3; - id="oc=jpbe0M2Yt4s@thumper.bellcore.com"; - - Content-Type: Message/Partial; - id="oc=jpbe0M2Yt4s@thumper.bellcore.com"; - number=2 - - But part 3 MUST specify the total number of parts: - - Content-Type: Message/Partial; - number=3; total=3; - id="oc=jpbe0M2Yt4s@thumper.bellcore.com"; - - Note that part numbering begins with 1, not 0. - - When the parts of a message broken up in this manner are put - together, the result is a complete RFC 822 format message, - which may have its own Content-Type header field, and thus - may contain any other data type. - - Message fragmentation and reassembly: The semantics of a - reassembled partial message must be those of the "inner" - message, rather than of a message containing the inner - message. This makes it possible, for example, to send a - large audio message as several partial messages, and still - have it appear to the recipient as a simple audio message - rather than as an encapsulated message containing an audio - message. That is, the encapsulation of the message is - considered to be "transparent". - - When generating and reassembling the parts of a - message/partial message, the headers of the encapsulated - message must be merged with the headers of the enclosing - - - - Borenstein & Freed [Page 38] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - entities. In this process the following rules must be - observed: - - (1) All of the headers from the initial enclosing - entity (part one), except those that start with - "Content-" and "Message-ID", must be copied, in - order, to the new message. - - (2) Only those headers in the enclosed message - which start with "Content-" and "Message-ID" must - be appended, in order, to the headers of the new - message. Any headers in the enclosed message - which do not start with "Content-" (except for - "Message-ID") will be ignored. - - (3) All of the headers from the second and any - subsequent messages will be ignored. - - For example, if an audio message is broken into two parts, - the first part might look something like this: - - X-Weird-Header-1: Foo - From: Bill@host.com - To: joe@otherhost.com - Subject: Audio mail - Message-ID: id1@host.com - MIME-Version: 1.0 - Content-type: message/partial; - id="ABC@host.com"; - number=1; total=2 - - X-Weird-Header-1: Bar - X-Weird-Header-2: Hello - Message-ID: anotherid@foo.com - Content-type: audio/basic - Content-transfer-encoding: base64 - - ... first half of encoded audio data goes here... - - and the second half might look something like this: - - From: Bill@host.com - To: joe@otherhost.com - Subject: Audio mail - MIME-Version: 1.0 - Message-ID: id2@host.com - Content-type: message/partial; - id="ABC@host.com"; number=2; total=2 - - ... second half of encoded audio data goes here... - - Then, when the fragmented message is reassembled, the - resulting message to be displayed to the user should look - something like this: - - - - Borenstein & Freed [Page 39] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - X-Weird-Header-1: Foo - From: Bill@host.com - To: joe@otherhost.com - Subject: Audio mail - Message-ID: anotherid@foo.com - MIME-Version: 1.0 - Content-type: audio/basic - Content-transfer-encoding: base64 - - ... first half of encoded audio data goes here... - ... second half of encoded audio data goes here... - - It should be noted that, because some message transfer - agents may choose to automatically fragment large messages, - and because such agents may use different fragmentation - thresholds, it is possible that the pieces of a partial - message, upon reassembly, may prove themselves to comprise a - partial message. This is explicitly permitted. - - It should also be noted that the inclusion of a "References" - field in the headers of the second and subsequent pieces of - a fragmented message that references the Message-Id on the - previous piece may be of benefit to mail readers that - understand and track references. However, the generation of - such "References" fields is entirely optional. - - 7.3.3 The Message/External-Body subtype - - The external-body subtype indicates that the actual body - data are not included, but merely referenced. In this case, - the parameters describe a mechanism for accessing the - external data. - - When a message body or body part is of type - "message/external-body", it consists of a header, two - consecutive CRLFs, and the message header for the - encapsulated message. If another pair of consecutive CRLFs - appears, this of course ends the message header for the - encapsulated message. However, since the encapsulated - message's body is itself external, it does NOT appear in the - area that follows. For example, consider the following - message: - - Content-type: message/external-body; access- - type=local-file; - name=/u/nsb/Me.gif - - Content-type: image/gif - - THIS IS NOT REALLY THE BODY! - - The area at the end, which might be called the "phantom - body", is ignored for most external-body messages. However, - it may be used to contain auxilliary information for some - - - - Borenstein & Freed [Page 40] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - such messages, as indeed it is when the access-type is - "mail-server". Of the access-types defined by this - document, the phantom body is used only when the access-type - is "mail-server". In all other cases, the phantom body is - ignored. - - The only always-mandatory parameter for message/external- - body is "access-type"; all of the other parameters may be - mandatory or optional depending on the value of access-type. - - ACCESS-TYPE -- One or more case-insensitive words, - comma-separated, indicating supported access - mechanisms by which the file or data may be - obtained. Values include, but are not limited to, - "FTP", "ANON-FTP", "TFTP", "AFS", "LOCAL-FILE", - and "MAIL-SERVER". Future values, except for - experimental values beginning with "X-", must be - registered with IANA, as described in Appendix F . - - In addition, the following two parameters are optional for - ALL access-types: - - EXPIRATION -- The date (in the RFC 822 "date-time" - syntax, as extended by RFC 1123 to permit 4 digits - in the date field) after which the existence of - the external data is not guaranteed. - - SIZE -- The size (in octets) of the data. The - intent of this parameter is to help the recipient - decide whether or not to expend the necessary - resources to retrieve the external data. - - PERMISSION -- A field that indicates whether or - not it is expected that clients might also attempt - to overwrite the data. By default, or if - permission is "read", the assumption is that they - are not, and that if the data is retrieved once, - it is never needed again. If PERMISSION is "read- - write", this assumption is invalid, and any local - copy must be considered no more than a cache. - "Read" and "Read-write" are the only defined - values of permission. - - The precise semantics of the access-types defined here are - described in the sections that follow. - - 7.3.3.1 The "ftp" and "tftp" access-types - - An access-type of FTP or TFTP indicates that the message - body is accessible as a file using the FTP [RFC-959] or TFTP - [RFC-783] protocols, respectively. For these access-types, - the following additional parameters are mandatory: - - - - - - Borenstein & Freed [Page 41] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - NAME -- The name of the file that contains the - actual body data. - - SITE -- A machine from which the file may be - obtained, using the given protocol - - Before the data is retrieved, using these protocols, the - user will generally need to be asked to provide a login id - and a password for the machine named by the site parameter. - - In addition, the following optional parameters may also - appear when the access-type is FTP or ANON-FTP: - - DIRECTORY -- A directory from which the data named - by NAME should be retrieved. - - MODE -- A transfer mode for retrieving the - information, e.g. "image". - - 7.3.3.2 The "anon-ftp" access-type - - The "anon-ftp" access-type is identical to the "ftp" access - type, except that the user need not be asked to provide a - name and password for the specified site. Instead, the ftp - protocol will be used with login "anonymous" and a password - that corresponds to the user's email address. - - 7.3.3.3 The "local-file" and "afs" access-types - - An access-type of "local-file" indicates that the actual - body is accessible as a file on the local machine. An - access-type of "afs" indicates that the file is accessible - via the global AFS file system. In both cases, only a - single parameter is required: - - NAME -- The name of the file that contains the - actual body data. - - The following optional parameter may be used to describe the - locality of reference for the data, that is, the site or - sites at which the file is expected to be visible: - - SITE -- A domain specifier for a machine or set of - machines that are known to have access to the data - file. Asterisks may be used for wildcard matching - to a part of a domain name, such as - "*.bellcore.com", to indicate a set of machines on - which the data should be directly visible, while a - single asterisk may be used to indicate a file - that is expected to be universally available, - e.g., via a global file system. - - 7.3.3.4 The "mail-server" access-type - - - - - Borenstein & Freed [Page 42] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - The "mail-server" access-type indicates that the actual body - is available from a mail server. The mandatory parameter - for this access-type is: - - SERVER -- The email address of the mail server - from which the actual body data can be obtained. - - Because mail servers accept a variety of syntax, some of - which is multiline, the full command to be sent to a mail - server is not included as a parameter on the content-type - line. Instead, it may be provided as the "phantom body" - when the content-type is message/external-body and the - access-type is mail-server. - - Note that MIME does not define a mail server syntax. - Rather, it allows the inclusion of arbitrary mail server - commands in the phantom body. Implementations should - include the phantom body in the body of the message it sends - to the mail server address to retrieve the relevant data. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 43] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 7.3.3.5 Examples and Further Explanations - - With the emerging possibility of very wide-area file - systems, it becomes very hard to know in advance the set of - machines where a file will and will not be accessible - directly from the file system. Therefore it may make sense - to provide both a file name, to be tried directly, and the - name of one or more sites from which the file is known to be - accessible. An implementation can try to retrieve remote - files using FTP or any other protocol, using anonymous file - retrieval or prompting the user for the necessary name and - password. If an external body is accessible via multiple - mechanisms, the sender may include multiple parts of type - message/external-body within an entity of type - multipart/alternative. - - However, the external-body mechanism is not intended to be - limited to file retrieval, as shown by the mail-server - access-type. Beyond this, one can imagine, for example, - using a video server for external references to video clips. - - If an entity is of type "message/external-body", then the - body of the entity will contain the header fields of the - encapsulated message. The body itself is to be found in the - external location. This means that if the body of the - "message/external-body" message contains two consecutive - CRLFs, everything after those pairs is NOT part of the - message itself. For most message/external-body messages, - this trailing area must simply be ignored. However, it is a - convenient place for additional data that cannot be included - in the content-type header field. In particular, if the - "access-type" value is "mail-server", then the trailing area - must contain commands to be sent to the mail server at the - address given by NAME@SITE, where NAME and SITE are the - values of the NAME and SITE parameters, respectively. - - The embedded message header fields which appear in the body - of the message/external-body data can be used to declare the - Content-type of the external body. Thus a complete - message/external-body message, referring to a document in - PostScript format, might look like this: - - From: Whomever - Subject: whatever - MIME-Version: 1.0 - Message-ID: id1@host.com - Content-Type: multipart/alternative; boundary=42 - - - --42 - Content-Type: message/external-body; - name="BodyFormats.ps"; - - - - - - Borenstein & Freed [Page 44] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - site="thumper.bellcore.com"; - access-type=ANON-FTP; - directory="pub"; - mode="image"; - expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" - - Content-type: application/postscript - - --42 - Content-Type: message/external-body; - name="/u/nsb/writing/rfcs/RFC-XXXX.ps"; - site="thumper.bellcore.com"; - access-type=AFS - expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" - - Content-type: application/postscript - - --42 - Content-Type: message/external-body; - access-type=mail-server - server="listserv@bogus.bitnet"; - expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" - - Content-type: application/postscript - - get rfc-xxxx doc - - --42-- - - Like the message/partial type, the message/external-body - type is intended to be transparent, that is, to convey the - data type in the external body rather than to convey a - message with a body of that type. Thus the headers on the - outer and inner parts must be merged using the same rules as - for message/partial. In particular, this means that the - Content-type header is overridden, but the From and Subject - headers are preserved. - - Note that since the external bodies are not transported as - mail, they need not conform to the 7-bit and line length - requirements, but might in fact be binary files. Thus a - Content-Transfer-Encoding is not generally necessary, though - it is permitted. - - Note that the body of a message of type "message/external- - body" is governed by the basic syntax for an RFC 822 - message. In particular, anything before the first - consecutive pair of CRLFs is header information, while - anything after it is body information, which is ignored for - most access-types. - - - - - - - - Borenstein & Freed [Page 45] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 7.4 The Application Content-Type - - The "application" Content-Type is to be used for data which - do not fit in any of the other categories, and particularly - for data to be processed by mail-based uses of application - programs. This is information which must be processed by an - application before it is viewable or usable to a user. - Expected uses for Content-Type application include mail- - based file transfer, spreadsheets, data for mail-based - scheduling systems, and languages for "active" - (computational) email. (The latter, in particular, can pose - security problems which should be understood by - implementors, and are considered in detail in the discussion - of the application/PostScript content-type.) - - For example, a meeting scheduler might define a standard - representation for information about proposed meeting dates. - An intelligent user agent would use this information to - conduct a dialog with the user, and might then send further - mail based on that dialog. More generally, there have been - several "active" messaging languages developed in which - programs in a suitably specialized language are sent through - the mail and automatically run in the recipient's - environment. - - Such applications may be defined as subtypes of the - "application" Content-Type. This document defines three - subtypes: octet-stream, ODA, and PostScript. - - In general, the subtype of application will often be the - name of the application for which the data are intended. - This does not mean, however, that any application program - name may be used freely as a subtype of application. Such - usages must be registered with IANA, as described in - Appendix F. - - 7.4.1 The Application/Octet-Stream (primary) subtype - - The primary subtype of application, "octet-stream", may be - used to indicate that a body contains binary data. The set - of possible parameters includes, but is not limited to: - - NAME -- a suggested name for the binary data if - stored as a file. - - TYPE -- the general type or category of binary - data. This is intended as information for the - human recipient rather than for any automatic - processing. - - CONVERSIONS -- the set of operations that have - been performed on the data before putting it in - the mail (and before any Content-Transfer-Encoding - that might have been applied). If multiple - - - - Borenstein & Freed [Page 46] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - conversions have occurred, they must be separated - by commas and specified in the order they were - applied -- that is, the leftmost conversion must - have occurred first, and conversions are undone - from right to left. Note that NO conversion - values are defined by this document. Any - conversion values that that do not begin with "X-" - must be preceded by a published specification and - by registration with IANA, as described in - Appendix F. - - PADDING -- the number of bits of padding that were - appended to the bitstream comprising the actual - contents to produce the enclosed byte-oriented - data. This is useful for enclosing a bitstream in - a body when the total number of bits is not a - multiple of the byte size. - - The values for these attributes are left undefined at - present, but may require specification in the future. An - example of a common (though UNIX-specific) usage might be: - - Content-Type: application/octet-stream; - name=foo.tar.Z; type=tar; - conversions="x-encrypt,x-compress" - - However, it should be noted that the use of such conversions - is explicitly discouraged due to a lack of portability and - standardization. The use of uuencode is particularly - discouraged, in favor of the Content-Transfer-Encoding - mechanism, which is both more standardized and more portable - across mail boundaries. - - The recommended action for an implementation that receives - application/octet-stream mail is to simply offer to put the - data in a file, with any Content-Transfer-Encoding undone, - or perhaps to use it as input to a user-specified process. - - To reduce the danger of transmitting rogue programs through - the mail, it is strongly recommended that implementations - NOT implement a path-search mechanism whereby an arbitrary - program named in the Content-Type parameter (e.g., an - "interpreter=" parameter) is found and executed using the - mail body as input. - - 7.4.2 The Application/PostScript subtype - - A Content-Type of "application/postscript" indicates a - PostScript program. The language is defined in - [POSTSCRIPT]. It is recommended that Postscript as sent - through email should use Postscript document structuring - conventions if at all possible, and correctly. - - - - - - Borenstein & Freed [Page 47] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - The execution of general-purpose PostScript interpreters - entails serious security risks, and implementors are - discouraged from simply sending PostScript email bodies to - "off-the-shelf" interpreters. While it is usually safe to - send PostScript to a printer, where the potential for harm - is greatly constrained, implementors should consider all of - the following before they add interactive display of - PostScript bodies to their mail readers. - - The remainder of this section outlines some, though probably - not all, of the possible problems with sending PostScript - through the mail. - - Dangerous operations in the PostScript language include, but - may not be limited to, the PostScript operators deletefile, - renamefile, filenameforall, and file. File is only - dangerous when applied to something other than standard - input or output. Implementations may also define additional - nonstandard file operators; these may also pose a threat to - security. Filenameforall, the wildcard file search - operator, may appear at first glance to be harmless. Note, - however, that this operator has the potential to reveal - information about what files the recipient has access to, - and this information may itself be sensitive. Message - senders should avoid the use of potentially dangerous file - operators, since these operators are quite likely to be - unavailable in secure PostScript implementations. Message- - receiving and -displaying software should either completely - disable all potentially dangerous file operators or take - special care not to delegate any special authority to their - operation. These operators should be viewed as being done by - an outside agency when interpreting PostScript documents. - Such disabling and/or checking should be done completely - outside of the reach of the PostScript language itself; care - should be taken to insure that no method exists for - reenabling full-function versions of these operators. - - The PostScript language provides facilities for exiting the - normal interpreter, or server, loop. Changes made in this - "outer" environment are customarily retained across - documents, and may in some cases be retained semipermanently - in nonvolatile memory. The operators associated with exiting - the interpreter loop have the potential to interfere with - subsequent document processing. As such, their unrestrained - use constitutes a threat of service denial. PostScript - operators that exit the interpreter loop include, but may - not be limited to, the exitserver and startjob operators. - Message-sending software should not generate PostScript that - depends on exiting the interpreter loop to operate. The - ability to exit will probably be unavailable in secure - PostScript implementations. Message-receiving and - -displaying software should, if possible, disable the - ability to make retained changes to the PostScript - environment. Eliminate the startjob and exitserver commands. - - - - Borenstein & Freed [Page 48] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - If these commands cannot be eliminated, at least set the - password associated with them to a hard-to-guess value. - - PostScript provides operators for setting system-wide and - device-specific parameters. These parameter settings may be - retained across jobs and may potentially pose a threat to - the correct operation of the interpreter. The PostScript - operators that set system and device parameters include, but - may not be limited to, the setsystemparams and setdevparams - operators. Message-sending software should not generate - PostScript that depends on the setting of system or device - parameters to operate correctly. The ability to set these - parameters will probably be unavailable in secure PostScript - implementations. Message-receiving and -displaying software - should, if possible, disable the ability to change system - and device parameters. If these operators cannot be - disabled, at least set the password associated with them to - a hard-to-guess value. - - Some PostScript implementations provide nonstandard - facilities for the direct loading and execution of machine - code. Such facilities are quite obviously open to - substantial abuse. Message-sending software should not - make use of such features. Besides being totally hardware- - specific, they are also likely to be unavailable in secure - implementations of PostScript. Message-receiving and - -displaying software should not allow such operators to be - used if they exist. - - PostScript is an extensible language, and many, if not most, - implementations of it provide a number of their own - extensions. This document does not deal with such extensions - explicitly since they constitute an unknown factor. - Message-sending software should not make use of nonstandard - extensions; they are likely to be missing from some - implementations. Message-receiving and -displaying software - should make sure that any nonstandard PostScript operators - are secure and don't present any kind of threat. - - It is possible to write PostScript that consumes huge - amounts of various system resources. It is also possible to - write PostScript programs that loop infinitely. Both types - of programs have the potential to cause damage if sent to - unsuspecting recipients. Message-sending software should - avoid the construction and dissemination of such programs, - which is antisocial. Message-receiving and -displaying - software should provide appropriate mechanisms to abort - processing of a document after a reasonable amount of time - has elapsed. In addition, PostScript interpreters should be - limited to the consumption of only a reasonable amount of - any given system resource. - - Finally, bugs may exist in some PostScript interpreters - which could possibly be exploited to gain unauthorized - - - - Borenstein & Freed [Page 49] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - access to a recipient's system. Apart from noting this - possibility, there is no specific action to take to prevent - this, apart from the timely correction of such bugs if any - are found. - - 7.4.3 The Application/ODA subtype - - The "ODA" subtype of application is used to indicate that a - body contains information encoded according to the Office - Document Architecture [ODA] standards, using the ODIF - representation format. For application/oda, the Content- - Type line should also specify an attribute/value pair that - indicates the document application profile (DAP), using the - key word "profile". Thus an appropriate header field might - look like this: - - Content-Type: application/oda; profile=Q112 - - Consult the ODA standard [ODA] for further information. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 50] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 7.5 The Image Content-Type - - A Content-Type of "image" indicates that the bodycontains an - image. The subtype names the specific image format. These - names are case insensitive. Two initial subtypes are "jpeg" - for the JPEG format, JFIF encoding, and "gif" for GIF format - [GIF]. - - The list of image subtypes given here is neither exclusive - nor exhaustive, and is expected to grow as more types are - registered with IANA, as described in Appendix F. - - 7.6 The Audio Content-Type - - A Content-Type of "audio" indicates that the body contains - audio data. Although there is not yet a consensus on an - "ideal" audio format for use with computers, there is a - pressing need for a format capable of providing - interoperable behavior. - - The initial subtype of "basic" is specified to meet this - requirement by providing an absolutely minimal lowest common - denominator audio format. It is expected that richer - formats for higher quality and/or lower bandwidth audio will - be defined by a later document. - - The content of the "audio/basic" subtype is audio encoded - using 8-bit ISDN u-law [PCM]. When this subtype is present, - a sample rate of 8000 Hz and a single channel is assumed. - - 7.7 The Video Content-Type - - A Content-Type of "video" indicates that the body contains a - time-varying-picture image, possibly with color and - coordinated sound. The term "video" is used extremely - generically, rather than with reference to any particular - technology or format, and is not meant to preclude subtypes - such as animated drawings encoded compactly. The subtype - "mpeg" refers to video coded according to the MPEG standard - [MPEG]. - - Note that although in general this document strongly - discourages the mixing of multiple media in a single body, - it is recognized that many so-called "video" formats include - a representation for synchronized audio, and this is - explicitly permitted for subtypes of "video". - - 7.8 Experimental Content-Type Values - - A Content-Type value beginning with the characters "X-" is a - private value, to be used by consenting mail systems by - mutual agreement. Any format without a rigorous and public - definition must be named with an "X-" prefix, and publicly - specified values shall never begin with "X-". (Older - - - - Borenstein & Freed [Page 51] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - versions of the widely-used Andrew system use the "X-BE2" - name, so new systems should probably choose a different - name.) - - In general, the use of "X-" top-level types is strongly - discouraged. Implementors should invent subtypes of the - existing types whenever possible. The invention of new - types is intended to be restricted primarily to the - development of new media types for email, such as digital - odors or holography, and not for new data formats in - general. In many cases, a subtype of application will be - more appropriate than a new top-level type. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 52] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Summary - - Using the MIME-Version, Content-Type, and Content-Transfer- - Encoding header fields, it is possible to include, in a - standardized way, arbitrary types of data objects with RFC - 822 conformant mail messages. No restrictions imposed by - either RFC 821 or RFC 822 are violated, and care has been - taken to avoid problems caused by additional restrictions - imposed by the characteristics of some Internet mail - transport mechanisms (see Appendix B). The "multipart" and - "message" Content-Types allow mixing and hierarchical - structuring of objects of different types in a single - message. Further Content-Types provide a standardized - mechanism for tagging messages or body parts as audio, - image, or several other kinds of data. A distinguished - parameter syntax allows further specification of data format - details, particularly the specification of alternate - character sets. Additional optional header fields provide - mechanisms for certain extensions deemed desirable by many - implementors. Finally, a number of useful Content-Types are - defined for general use by consenting user agents, notably - text/richtext, message/partial, and message/external-body. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 53] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Acknowledgements - - This document is the result of the collective effort of a - large number of people, at several IETF meetings, on the - IETF-SMTP and IETF-822 mailing lists, and elsewhere. - Although any enumeration seems doomed to suffer from - egregious omissions, the following are among the many - contributors to this effort: - - Harald Tveit Alvestrand Timo Lehtinen - Randall Atkinson John R. MacMillan - Philippe Brandon Rick McGowan - Kevin Carosso Leo Mclaughlin - Uhhyung Choi Goli Montaser-Kohsari - Cristian Constantinof Keith Moore - Mark Crispin Tom Moore - Dave Crocker Erik Naggum - Terry Crowley Mark Needleman - Walt Daniels John Noerenberg - Frank Dawson Mats Ohrman - Hitoshi Doi Julian Onions - Kevin Donnelly Michael Patton - Keith Edwards David J. Pepper - Chris Eich Blake C. Ramsdell - Johnny Eriksson Luc Rooijakkers - Craig Everhart Marshall T. Rose - Patrik Faeltstroem Jonathan Rosenberg - Erik E. Fair Jan Rynning - Roger Fajman Harri Salminen - Alain Fontaine Michael Sanderson - James M. Galvin Masahiro Sekiguchi - Philip Gladstone Mark Sherman - Thomas Gordon Keld Simonsen - Phill Gross Bob Smart - James Hamilton Peter Speck - Steve Hardcastle-Kille Henry Spencer - David Herron Einar Stefferud - Bruce Howard Michael Stein - Bill Janssen Klaus Steinberger - Olle Jaernefors Peter Svanberg - Risto Kankkunen James Thompson - Phil Karn Steve Uhler - Alan Katz Stuart Vance - Tim Kehres Erik van der Poel - Neil Katin Guido van Rossum - Kyuho Kim Peter Vanderbilt - Anders Klemets Greg Vaudreuil - John Klensin Ed Vielmetti - Valdis Kletniek Ryan Waldron - Jim Knowles Wally Wedel - Stev Knowles Sven-Ove Westberg - Bob Kummerfeld Brian Wideen - - - - - - Borenstein & Freed [Page 54] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Pekka Kytolaakso John Wobus - Stellan Lagerstr.m Glenn Wright - Vincent Lau Rayan Zachariassen - Donald Lindsay David Zimmerman - The authors apologize for any omissions from this list, - which are certainly unintentional. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 55] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Appendix A -- Minimal MIME-Conformance - - The mechanisms described in this document are open-ended. - It is definitely not expected that all implementations will - support all of the Content-Types described, nor that they - will all share the same extensions. In order to promote - interoperability, however, it is useful to define the - concept of "MIME-conformance" to define a certain level of - implementation that allows the useful interworking of - messages with content that differs from US ASCII text. In - this section, we specify the requirements for such - conformance. - - A mail user agent that is MIME-conformant MUST: - - 1. Always generate a "MIME-Version: 1.0" header - field. - - 2. Recognize the Content-Transfer-Encoding header - field, and decode all received data encoded with - either the quoted-printable or base64 - implementations. Encode any data sent that is - not in seven-bit mail-ready representation using - one of these transformations and include the - appropriate Content-Transfer-Encoding header - field, unless the underlying transport mechanism - supports non-seven-bit data, as SMTP does not. - - 3. Recognize and interpret the Content-Type - header field, and avoid showing users raw data - with a Content-Type field other than text. Be - able to send at least text/plain messages, with - the character set specified as a parameter if it - is not US-ASCII. - - 4. Explicitly handle the following Content-Type - values, to at least the following extents: - - Text: - -- Recognize and display "text" mail - with the character set "US-ASCII." - -- Recognize other character sets at - least to the extent of being able - to inform the user about what - character set the message uses. - -- Recognize the "ISO-8859-*" character - sets to the extent of being able to - display those characters that are - common to ISO-8859-* and US-ASCII, - namely all characters represented - by octet values 0-127. - -- For unrecognized subtypes, show or - offer to show the user the "raw" - version of the data. An ability at - - - - Borenstein & Freed [Page 56] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - least to convert "text/richtext" to - plain text, as shown in Appendix D, - is encouraged, but not required for - conformance. - Message: - --Recognize and display at least the - primary (822) encapsulation. - Multipart: - -- Recognize the primary (mixed) - subtype. Display all relevant - information on the message level - and the body part header level and - then display or offer to display - each of the body parts - individually. - -- Recognize the "alternative" subtype, - and avoid showing the user - redundant parts of - multipart/alternative mail. - -- Treat any unrecognized subtypes as if - they were "mixed". - Application: - -- Offer the ability to remove either of - the two types of Content-Transfer- - Encoding defined in this document - and put the resulting information - in a user file. - - 5. Upon encountering any unrecognized Content- - Type, an implementation must treat it as if it had - a Content-Type of "application/octet-stream" with - no parameter sub-arguments. How such data are - handled is up to an implementation, but likely - options for handling such unrecognized data - include offering the user to write it into a file - (decoded from its mail transport format) or - offering the user to name a program to which the - decoded data should be passed as input. - Unrecognized predefined types, which in a MIME- - conformant mailer might still include audio, - image, or video, should also be treated in this - way. - - A user agent that meets the above conditions is said to be - MIME-conformant. The meaning of this phrase is that it is - assumed to be "safe" to send virtually any kind of - properly-marked data to users of such mail systems, because - such systems will at least be able to treat the data as - undifferentiated binary, and will not simply splash it onto - the screen of unsuspecting users. There is another sense - in which it is always "safe" to send data in a format that - is MIME-conformant, which is that such data will not break - or be broken by any known systems that are conformant with - RFC 821 and RFC 822. User agents that are MIME-conformant - - - - Borenstein & Freed [Page 57] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - have the additional guarantee that the user will not be - shown data that were never intended to be viewed as text. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 58] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Appendix B -- General Guidelines For Sending Email Data - - Internet email is not a perfect, homogeneous system. Mail - may become corrupted at several stages in its travel to a - final destination. Specifically, email sent throughout the - Internet may travel across many networking technologies. - Many networking and mail technologies do not support the - full functionality possible in the SMTP transport - environment. Mail traversing these systems is likely to be - modified in such a way that it can be transported. - - There exist many widely-deployed non-conformant MTAs in the - Internet. These MTAs, speaking the SMTP protocol, alter - messages on the fly to take advantage of the internal data - structure of the hosts they are implemented on, or are just - plain broken. - - The following guidelines may be useful to anyone devising a - data format (Content-Type) that will survive the widest - range of networking technologies and known broken MTAs - unscathed. Note that anything encoded in the base64 - encoding will satisfy these rules, but that some well-known - mechanisms, notably the UNIX uuencode facility, will not. - Note also that anything encoded in the Quoted-Printable - encoding will survive most gateways intact, but possibly not - some gateways to systems that use the EBCDIC character set. - - (1) Under some circumstances the encoding used for - data may change as part of normal gateway or user - agent operation. In particular, conversion from - base64 to quoted-printable and vice versa may be - necessary. This may result in the confusion of - CRLF sequences with line breaks in text body - parts. As such, the persistence of CRLF as - something other than a line break should not be - relied on. - - (2) Many systems may elect to represent and store - text data using local newline conventions. Local - newline conventions may not match the RFC822 CRLF - convention -- systems are known that use plain CR, - plain LF, CRLF, or counted records. The result is - that isolated CR and LF characters are not well - tolerated in general; they may be lost or - converted to delimiters on some systems, and hence - should not be relied on. - - (3) TAB (HT) characters may be misinterpreted or - may be automatically converted to variable numbers - of spaces. This is unavoidable in some - environments, notably those not based on the ASCII - character set. Such conversion is STRONGLY - DISCOURAGED, but it may occur, and mail formats - should not rely on the persistence of TAB (HT) - - - - Borenstein & Freed [Page 59] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - characters. - - (4) Lines longer than 76 characters may be wrapped - or truncated in some environments. Line wrapping - and line truncation are STRONGLY DISCOURAGED, but - unavoidable in some cases. Applications which - require long lines should somehow differentiate - between soft and hard line breaks. (A simple way - to do this is to use the quoted-printable - encoding.) - - (5) Trailing "white space" characters (SPACE, TAB - (HT)) on a line may be discarded by some transport - agents, while other transport agents may pad lines - with these characters so that all lines in a mail - file are of equal length. The persistence of - trailing white space, therefore, should not be - relied on. - - (6) Many mail domains use variations on the ASCII - character set, or use character sets such as - EBCDIC which contain most but not all of the US- - ASCII characters. The correct translation of - characters not in the "invariant" set cannot be - depended on across character converting gateways. - For example, this situation is a problem when - sending uuencoded information across BITNET, an - EBCDIC system. Similar problems can occur without - crossing a gateway, since many Internet hosts use - character sets other than ASCII internally. The - definition of Printable Strings in X.400 adds - further restrictions in certain special cases. In - particular, the only characters that are known to - be consistent across all gateways are the 73 - characters that correspond to the upper and lower - case letters A-Z and a-z, the 10 digits 0-9, and - the following eleven special characters: - - "'" (ASCII code 39) - "(" (ASCII code 40) - ")" (ASCII code 41) - "+" (ASCII code 43) - "," (ASCII code 44) - "-" (ASCII code 45) - "." (ASCII code 46) - "/" (ASCII code 47) - ":" (ASCII code 58) - "=" (ASCII code 61) - "?" (ASCII code 63) - - A maximally portable mail representation, such as - the base64 encoding, will confine itself to - relatively short lines of text in which the only - meaningful characters are taken from this set of - - - - Borenstein & Freed [Page 60] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - 73 characters. - - Please note that the above list is NOT a list of recommended - practices for MTAs. RFC 821 MTAs are prohibited from - altering the character of white space or wrapping long - lines. These BAD and illegal practices are known to occur - on established networks, and implementions should be robust - in dealing with the bad effects they can cause. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 61] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Appendix C -- A Complex Multipart Example - - What follows is the outline of a complex multipart message. - This message has five parts to be displayed serially: two - introductory plain text parts, an embedded multipart - message, a richtext part, and a closing encapsulated text - message in a non-ASCII character set. The embedded - multipart message has two parts to be displayed in parallel, - a picture and an audio fragment. - - MIME-Version: 1.0 - From: Nathaniel Borenstein - Subject: A multipart example - Content-Type: multipart/mixed; - boundary=unique-boundary-1 - - This is the preamble area of a multipart message. - Mail readers that understand multipart format - should ignore this preamble. - If you are reading this text, you might want to - consider changing to a mail reader that understands - how to properly display multipart messages. - --unique-boundary-1 - - ...Some text appears here... - [Note that the preceding blank line means - no header fields were given and this is text, - with charset US ASCII. It could have been - done with explicit typing as in the next part.] - - --unique-boundary-1 - Content-type: text/plain; charset=US-ASCII - - This could have been part of the previous part, - but illustrates explicit versus implicit - typing of body parts. - - --unique-boundary-1 - Content-Type: multipart/parallel; - boundary=unique-boundary-2 - - - --unique-boundary-2 - Content-Type: audio/basic - Content-Transfer-Encoding: base64 - - ... base64-encoded 8000 Hz single-channel - u-law-format audio data goes here.... - - --unique-boundary-2 - Content-Type: image/gif - Content-Transfer-Encoding: Base64 - - - - - - Borenstein & Freed [Page 62] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - ... base64-encoded image data goes here.... - - --unique-boundary-2-- - - --unique-boundary-1 - Content-type: text/richtext - - This is richtext. - Isn't it - cool? - - --unique-boundary-1 - Content-Type: message/rfc822 - - From: (name in US-ASCII) - Subject: (subject in US-ASCII) - Content-Type: Text/plain; charset=ISO-8859-1 - Content-Transfer-Encoding: Quoted-printable - - ... Additional text in ISO-8859-1 goes here ... - - --unique-boundary-1-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 63] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Appendix D -- A Simple Richtext-to-Text Translator in C - - One of the major goals in the design of the richtext subtype - of the text Content-Type is to make formatted text so simple - that even text-only mailers will implement richtext-to- - plain-text translators, thus increasing the likelihood that - multifont text will become "safe" to use very widely. To - demonstrate this simplicity, what follows is an extremely - simple 44-line C program that converts richtext input into - plain text output: - - #include - #include - main() { - int c, i; - char token[50]; - - while((c = getc(stdin)) != EOF) { - if (c == '<') { - for (i=0; (i<49 && (c = getc(stdin)) != '>' - && c != EOF); ++i) { - token[i] = isupper(c) ? tolower(c) : c; - } - if (c == EOF) break; - if (c != '>') while ((c = getc(stdin)) != - '>' - && c != EOF) {;} - if (c == EOF) break; - token[i] = '\0'; - if (!strcmp(token, "lt")) { - putc('<', stdout); - } else if (!strcmp(token, "nl")) { - putc('\n', stdout); - } else if (!strcmp(token, "/paragraph")) { - fputs("\n\n", stdout); - } else if (!strcmp(token, "comment")) { - int commct=1; - while (commct > 0) { - while ((c = getc(stdin)) != '<' - && c != EOF) ; - if (c == EOF) break; - for (i=0; (c = getc(stdin)) != '>' - && c != EOF; ++i) { - token[i] = isupper(c) ? - tolower(c) : c; - } - if (c== EOF) break; - token[i] = NULL; - if (!strcmp(token, "/comment")) -- - commct; - if (!strcmp(token, "comment")) - ++commct; - - - - - - Borenstein & Freed [Page 64] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - } - } /* Ignore all other tokens */ - } else if (c != '\n') putc(c, stdout); - } - putc('\n', stdout); /* for good measure */ - } - It should be noted that one can do considerably better than - this in displaying richtext data on a dumb terminal. In - particular, one can replace font information such as "bold" - with textual emphasis (like *this* or _T_H_I_S_). One can - also properly handle the richtext formatting commands - regarding indentation, justification, and others. However, - the above program is all that is necessary in order to - present richtext on a dumb terminal. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 65] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Appendix E -- Collected Grammar - - This appendix contains the complete BNF grammar for all the - syntax specified by this document. - - By itself, however, this grammar is incomplete. It refers - to several entities that are defined by RFC 822. Rather - than reproduce those definitions here, and risk - unintentional differences between the two, this document - simply refers the reader to RFC 822 for the remaining - definitions. Wherever a term is undefined, it refers to the - RFC 822 definition. - - attribute := token - - body-part = <"message" as defined in RFC 822, - with all header fields optional, and with the - specified delimiter not occurring anywhere in - the message body, either on a line by itself - or as a substring anywhere.> - - boundary := 0*69 bcharsnospace - - bchars := bcharsnospace / " " - - bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" / "+" / - "_" - / "," / "-" / "." / "/" / ":" / "=" / "?" - - close-delimiter := delimiter "--" - - Content-Description := *text - - Content-ID := msg-id - - Content-Transfer-Encoding := "BASE64" / "QUOTED- - PRINTABLE" / - "8BIT" / "7BIT" / - "BINARY" / x-token - - Content-Type := type "/" subtype *[";" parameter] - - delimiter := CRLF "--" boundary ; taken from Content-Type - field. - ; when content-type is - multipart - ; There should be no space - ; between "--" and boundary. - - encapsulation := delimiter CRLF body-part - - epilogue := *text ; to be ignored upon - receipt. - - - - - Borenstein & Freed [Page 66] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - MIME-Version := 1*text - - multipart-body := preamble 1*encapsulation close-delimiter - epilogue - - parameter := attribute "=" value - - preamble := *text ; to be ignored upon - receipt. - - subtype := token - - token := 1* - - tspecials := "(" / ")" / "<" / ">" / "@" ; Must be in - / "," / ";" / ":" / "\" / <"> ; quoted-string, - / "/" / "[" / "]" / "?" / "." ; to use within - / "=" ; parameter values - - - type := "application" / "audio" ; case- - insensitive - / "image" / "message" - / "multipart" / "text" - / "video" / x-token - - value := token / quoted-string - - x-token := - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 67] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Appendix F -- IANA Registration Procedures - - MIME has been carefully designed to have extensible - mechanisms, and it is expected that the set of content- - type/subtype pairs and their associated parameters will grow - significantly with time. Several other MIME fields, notably - character set names, access-type parameters for the - message/external-body type, conversions parameters for the - application type, and possibly even Content-Transfer- - Encoding values, are likely to have new values defined over - time. In order to ensure that the set of such values is - developed in an orderly, well-specified, and public manner, - MIME defines a registration process which uses the Internet - Assigned Numbers Authority (IANA) as a central registry for - such values. - - In general, parameters in the content-type header field are - used to convey supplemental information for various content - types, and their use is defined when the content-type and - subtype are defined. New parameters should not be defined - as a way to introduce new functionality. - - In order to simplify and standardize the registration - process, this appendix gives templates for the registration - of new values with IANA. Each of these is given in the form - of an email message template, to be filled in by the - registering party. - - F.1 Registration of New Content-type/subtype Values - - Note that MIME is generally expected to be extended by - subtypes. If a new fundamental top-level type is needed, - its specification should be published as an RFC or - submitted in a form suitable to become an RFC, and be - subject to the Internet standards process. - - To: IANA@isi.edu - Subject: Registration of new MIME content-type/subtype - - MIME type name: - - (If the above is not an existing top-level MIME type, - please explain why an existing type cannot be used.) - - MIME subtype name: - - Required parameters: - - Optional parameters: - - Encoding considerations: - - Security considerations: - - - - - Borenstein & Freed [Page 68] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Published specification: - - (The published specification must be an Internet RFC or - RFC-to-be if a new top-level type is being defined, and - must be a publicly available specification in any - case.) - - Person & email address to contact for further - information: - F.2 Registration of New Character Set Values - - To: IANA@isi.edu - Subject: Registration of new MIME character set value - - MIME character set name: - - Published specification: - - (The published specification must be an Internet RFC or - RFC-to-be or an international standard.) - - Person & email address to contact for further - information: - - F.3 Registration of New Access-type Values for - Message/external-body - - To: IANA@isi.edu - Subject: Registration of new MIME Access-type for - Message/external-body content-type - - MIME access-type name: - - Required parameters: - - Optional parameters: - - Published specification: - - (The published specification must be an Internet RFC or - RFC-to-be.) - - Person & email address to contact for further - information: - - - F.4 Registration of New Conversions Values for Application - - To: IANA@isi.edu - Subject: Registration of new MIME Conversions value - for Application content-type - - MIME Conversions name: - - - - - Borenstein & Freed [Page 69] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Published specification: - - (The published specification must be an Internet RFC or - RFC-to-be.) - - Person & email address to contact for further - information: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 70] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Appendix G -- Summary of the Seven Content-types - - Content-type: text - - Subtypes defined by this document: plain, richtext - - Important Parameters: charset - - Encoding notes: quoted-printable generally preferred if an - encoding is needed and the character set is mostly an - ASCII superset. - - Security considerations: Rich text formats such as TeX and - Troff often contain mechanisms for executing arbitrary - commands or file system operations, and should not be - used automatically unless these security problems have - been addressed. Even plain text may contain control - characters that can be used to exploit the capabilities - of "intelligent" terminals and cause security - violations. User interfaces designed to run on such - terminals should be aware of and try to prevent such - problems. - ________________________________________________________________ - - Content-type: multipart - - Subtypes defined by this document: mixed, alternative, - digest, parallel. - - Important Parameters: boundary - - Encoding notes: No content-transfer-encoding is permitted. - - ________________________________________________________________ - - Content-type: message - - Subtypes defined by this document: rfc822, partial, - external-body - - Important Parameters: id, number, total - - Encoding notes: No content-transfer-encoding is permitted. - - ________________________________________________________________ - - Content-type: application - - Subtypes defined by this document: octet-stream, - postscript, oda - - Important Parameters: profile - - - - - - Borenstein & Freed [Page 71] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Encoding notes: base64 generally preferred for octet-stream - or other unreadable subtypes. - - Security considerations: This type is intended for the - transmission of data to be interpreted by locally-installed - programs. If used, for example, to transmit executable - binary programs or programs in general-purpose interpreted - languages, such as LISP programs or shell scripts, severe - security problems could result. In general, authors of - mail-reading agents are cautioned against giving their - systems the power to execute mail-based application data - without carefully considering the security implications. - While it is certainly possible to define safe application - formats and even safe interpreters for unsafe formats, each - interpreter should be evaluated separately for possible - security problems. - ________________________________________________________________ - - Content-type: image - - Subtypes defined by this document: jpeg, gif - - Important Parameters: none - - Encoding notes: base64 generally preferred - - ________________________________________________________________ - - Content-type: audio - - Subtypes defined by this document: basic - - Important Parameters: none - - Encoding notes: base64 generally preferred - - ________________________________________________________________ - - Content-type: video - - Subtypes defined by this document: mpeg - - Important Parameters: none - - Encoding notes: base64 generally preferred - - - - - - - - - - - - - Borenstein & Freed [Page 72] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Appendix H -- Canonical Encoding Model - - - - There was some confusion, in earlier drafts of this memo, - regarding the model for when email data was to be converted - to canonical form and encoded, and in particular how this - process would affect the treatment of CRLFs, given that the - representation of newlines varies greatly from system to - system. For this reason, a canonical model for encoding is - presented below. - - The process of composing a MIME message part can be modelled - as being done in a number of steps. Note that these steps - are roughly similar to those steps used in RFC1113: - - Step 1. Creation of local form. - - The body part to be transmitted is created in the system's - native format. The native character set is used, and where - appropriate local end of line conventions are used as well. - The may be a UNIX-style text file, or a Sun raster image, or - a VMS indexed file, or audio data in a system-dependent - format stored only in memory, or anything else that - corresponds to the local model for the representation of - some form of information. - - Step 2. Conversion to canonical form. - - The entire body part, including "out-of-band" information - such as record lengths and possibly file attribute - information, is converted to a universal canonical form. - The specific content type of the body part as well as its - associated attributes dictate the nature of the canonical - form that is used. Conversion to the proper canonical form - may involve character set conversion, transformation of - audio data, compression, or various other operations - specific to the various content types. - - For example, in the case of text/plain data, the text must - be converted to a supported character set and lines must be - delimited with CRLF delimiters in accordance with RFC822. - Note that the restriction on line lengths implied by RFC822 - is eliminated if the next step employs either quoted- - printable or base64 encoding. - - Step 3. Apply transfer encoding. - - A Content-Transfer-Encoding appropriate for this body part - is applied. Note that there is no fixed relationship - between the content type and the transfer encoding. In - particular, it may be appropriate to base the choice of - base64 or quoted-printable on character frequency counts - which are specific to a given instance of body part. - - - - Borenstein & Freed [Page 73] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Step 4. Insertion into message. - - The encoded object is inserted into a MIME message with - appropriate body part headers and boundary markers. - - It is vital to note that these steps are only a model; they - are specifically NOT a blueprint for how an actual system - would be built. In particular, the model fails to account - for two common designs: - - 1. In many cases the conversion to a canonical - form prior to encoding will be subsumed into the - encoder itself, which understands local formats - directly. For example, the local newline - convention for text bodyparts might be carried - through to the encoder itself along with knowledge - of what that format is. - - 2. The output of the encoders may have to pass - through one or more additional steps prior to - being transmitted as a message. As such, the - output of the encoder may not be compliant with - the formats specified by RFC822. In particular, - once again it may be appropriate for the - converter's output to be expressed using local - newline conventions rather than using the standard - RFC822 CRLF delimiters. - - Other implementation variations are conceivable as well. - The only important aspect of this discussion is that the - resulting messages are consistent with those produced by the - model described here. - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 74] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - References - - [US-ASCII] Coded Character Set--7-Bit American Standard Code - for Information Interchange, ANSI X3.4-1986. - - [ATK] Borenstein, Nathaniel S., Multimedia Applications - Development with the Andrew Toolkit, Prentice-Hall, 1990. - - [GIF] Graphics Interchange Format (Version 89a), Compuserve, - Inc., Columbus, Ohio, 1990. - - [ISO-2022] International Standard--Information Processing-- - ISO 7-bit and 8-bit coded character sets--Code extension - techniques, ISO 2022:1986. - - [ISO-8859] Information Processing -- 8-bit Single-Byte Coded - Graphic Character Sets -- Part 1: Latin Alphabet No. 1, ISO - 8859-1:1987. Part 2: Latin alphabet No. 2, ISO 8859-2, - 1987. Part 3: Latin alphabet No. 3, ISO 8859-3, 1988. Part - 4: Latin alphabet No. 4, ISO 8859-4, 1988. Part 5: - Latin/Cyrillic alphabet, ISO 8859-5, 1988. Part 6: - Latin/Arabic alphabet, ISO 8859-6, 1987. Part 7: - Latin/Greek alphabet, ISO 8859-7, 1987. Part 8: - Latin/Hebrew alphabet, ISO 8859-8, 1988. Part 9: Latin - alphabet No. 5, ISO 8859-9, 1990. - - [ISO-646] International Standard--Information Processing-- - ISO 7-bit coded character set for information interchange, - ISO 646:1983. - - [MPEG] Video Coding Draft Standard ISO 11172 CD, ISO - IEC/TJC1/SC2/WG11 (Motion Picture Experts Group), May, 1991. - - [ODA] ISO 8613; Information Processing: Text and Office - System; Office Document Architecture (ODA) and Interchange - Format (ODIF), Part 1-8, 1989. - - [PCM] CCITT, Fascicle III.4 - Recommendation G.711, Geneva, - 1972, "Pulse Code Modulation (PCM) of Voice Frequencies". - - [POSTSCRIPT] Adobe Systems, Inc., PostScript Language - Reference Manual, Addison-Wesley, 1985. - - [X400] Schicker, Pietro, "Message Handling Systems, X.400", - Message Handling Systems and Distributed Applications, E. - Stefferud, O-j. Jacobsen, and P. Schicker, eds., North- - Holland, 1989, pp. 3-41. - - [RFC-783] Sollins, K.R. TFTP Protocol (revision 2). June, - 1981, MIT, RFC-783. - - [RFC-821] Postel, J.B. Simple Mail Transfer Protocol. - August, 1982, USC/Information Sciences Institute, RFC-821. - - - - - Borenstein & Freed [Page 75] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - [RFC-822] Crocker, D. Standard for the format of ARPA - Internet text messages. August, 1982, UDEL, RFC-822. - - [RFC-934] Rose, M.T.; Stefferud, E.A. Proposed standard - for message encapsulation. January, 1985, Delaware - and NMA, RFC-934. - - [RFC-959] Postel, J.B.; Reynolds, J.K. File Transfer - Protocol. October, 1985, USC/Information Sciences - Institute, RFC-959. - - [RFC-1049] Sirbu, M.A. Content-Type header field for - Internet messages. March, 1988, CMU, RFC-1049. - - [RFC-1113] Linn, J. Privacy enhancement for Internet - electronic mail: Part I - message encipherment and - authentication procedures. August, 1989, IAB Privacy Task - Force, RFC-1113. - - [RFC-1154] Robinson, D.; Ullmann, R. Encoding header field - for Internet messages. April, 1990, Prime Computer, - Inc., RFC-1154. - - [RFC-1342] Moore, Keith, Representation of Non-Ascii Text in - Internet Message Headers. June, 1992, University of - Tennessee, RFC-1342. - - Security Considerations - - Security issues are discussed in Section 7.4.2 and in - Appendix G. Implementors should pay special attention to - the security implications of any mail content-types that can - cause the remote execution of any actions in the recipient's - environment. In such cases, the discussion of the - applicaton/postscript content-type in Section 7.4.2 may - serve as a model for considering other content-types with - remote execution capabilities. - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 76] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - Authors' Addresses - - For more information, the authors of this document may be - contacted via Internet mail: - - Nathaniel S. Borenstein - MRE 2D-296, Bellcore - 445 South St. - Morristown, NJ 07962-1910 - - Phone: +1 201 829 4270 - Fax: +1 201 829 7019 - Email: nsb@bellcore.com - - - Ned Freed - Innosoft International, Inc. - 250 West First Street - Suite 240 - Claremont, CA 91711 - - Phone: +1 714 624 7907 - Fax: +1 714 621 5319 - Email: ned@innosoft.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page 77] - - - - - RFC 1341MIME: Multipurpose Internet Mail ExtensionsJune 1992 - - - - - - THIS PAGE INTENTIONALLY LEFT BLANK. - - Please discard this page and place the following table of - contents after the title page. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page i] - - - - - - - - - Table of Contents - - - 1 Introduction....................................... 1 - 2 Notations, Conventions, and Generic BNF Grammar.... 3 - 3 The MIME-Version Header Field...................... 5 - 4 The Content-Type Header Field...................... 6 - 5 The Content-Transfer-Encoding Header Field......... 10 - 5.1 Quoted-Printable Content-Transfer-Encoding......... 14 - 5.2 Base64 Content-Transfer-Encoding................... 17 - 6 Additional Optional Content- Header Fields......... 19 - 6.1 Optional Content-ID Header Field................... 19 - 6.2 Optional Content-Description Header Field.......... 19 - 7 The Predefined Content-Type Values................. 20 - 7.1 The Text Content-Type.............................. 20 - 7.1.1 The charset parameter.............................. 20 - 7.1.2 The Text/plain subtype............................. 23 - 7.1.3 The Text/richtext subtype.......................... 23 - 7.2 The Multipart Content-Type......................... 29 - 7.2.1 Multipart: The common syntax...................... 30 - 7.2.2 The Multipart/mixed (primary) subtype.............. 34 - 7.2.3 The Multipart/alternative subtype.................. 34 - 7.2.4 The Multipart/digest subtype....................... 36 - 7.2.5 The Multipart/parallel subtype..................... 36 - 7.3 The Message Content-Type........................... 37 - 7.3.1 The Message/rfc822 (primary) subtype............... 37 - 7.3.2 The Message/Partial subtype........................ 37 - 7.3.3 The Message/External-Body subtype.................. 40 - 7.4 The Application Content-Type....................... 46 - 7.4.1 The Application/Octet-Stream (primary) subtype..... 46 - 7.4.2 The Application/PostScript subtype................. 47 - 7.4.3 The Application/ODA subtype........................ 50 - 7.5 The Image Content-Type............................. 51 - 7.6 The Audio Content-Type............................. 51 - 7.7 The Video Content-Type............................. 51 - 7.8 Experimental Content-Type Values................... 51 - Summary............................................ 53 - Acknowledgements................................... 54 - Appendix A -- Minimal MIME-Conformance............. 56 - Appendix B -- General Guidelines For Sending Email Data59 - Appendix C -- A Complex Multipart Example.......... 62 - Appendix D -- A Simple Richtext-to-Text Translator in C64 - Appendix E -- Collected Grammar.................... 66 - Appendix F -- IANA Registration Procedures......... 68 - F.1 Registration of New Content-type/subtype Values..68 - F.2 Registration of New Character Set Values...... 69 - F.3 Registration of New Access-type Values for Message/external-body69 - F.4 Registration of New Conversions Values for Application69 - Appendix G -- Summary of the Seven Content-types... 71 - Appendix H -- Canonical Encoding Model............. 73 - References......................................... 75 - Security Considerations............................ 76 - Authors' Addresses................................. 77 - - - - Borenstein & Freed [Page ii] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Borenstein & Freed [Page iii] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1521.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1521.txt deleted file mode 100644 index 074ba415..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1521.txt +++ /dev/null @@ -1,4539 +0,0 @@ - - - - - - -Network Working Group N. Borenstein -Request for Comments: 1521 Bellcore -Obsoletes: 1341 N. Freed -Category: Standards Track Innosoft - September 1993 - - - MIME (Multipurpose Internet Mail Extensions) Part One: - Mechanisms for Specifying and Describing - the Format of Internet Message Bodies - -Status of this Memo - - This RFC specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" for the standardization state and status - of this protocol. Distribution of this memo is unlimited. - -Abstract - - STD 11, RFC 822 defines a message representation protocol which - specifies considerable detail about message headers, but which leaves - the message content, or message body, as flat ASCII text. This - document redefines the format of message bodies to allow multi-part - textual and non-textual message bodies to be represented and - exchanged without loss of information. This is based on earlier work - documented in RFC 934 and STD 11, RFC 1049, but extends and revises - that work. Because RFC 822 said so little about message bodies, this - document is largely orthogonal to (rather than a revision of) RFC - 822. - - In particular, this document is designed to provide facilities to - include multiple objects in a single message, to represent body text - in character sets other than US-ASCII, to represent formatted multi- - font text messages, to represent non-textual material such as images - and audio fragments, and generally to facilitate later extensions - defining new types of Internet mail for use by cooperating mail - agents. - - This document does NOT extend Internet mail header fields to permit - anything other than US-ASCII text data. Such extensions are the - subject of a companion document [RFC-1522]. - - This document is a revision of RFC 1341. Significant differences - from RFC 1341 are summarized in Appendix H. - - - - - -Borenstein & Freed [Page 1] - -RFC 1521 MIME September 1993 - - -Table of Contents - - 1. Introduction....................................... 3 - 2. Notations, Conventions, and Generic BNF Grammar.... 6 - 3. The MIME-Version Header Field...................... 7 - 4. The Content-Type Header Field...................... 9 - 5. The Content-Transfer-Encoding Header Field......... 13 - 5.1. Quoted-Printable Content-Transfer-Encoding......... 18 - 5.2. Base64 Content-Transfer-Encoding................... 21 - 6. Additional Content-Header Fields................... 23 - 6.1. Optional Content-ID Header Field................... 23 - 6.2. Optional Content-Description Header Field.......... 24 - 7. The Predefined Content-Type Values................. 24 - 7.1. The Text Content-Type.............................. 24 - 7.1.1. The charset parameter.............................. 25 - 7.1.2. The Text/plain subtype............................. 28 - 7.2. The Multipart Content-Type......................... 28 - 7.2.1. Multipart: The common syntax...................... 29 - 7.2.2. The Multipart/mixed (primary) subtype.............. 34 - 7.2.3. The Multipart/alternative subtype.................. 34 - 7.2.4. The Multipart/digest subtype....................... 36 - 7.2.5. The Multipart/parallel subtype..................... 37 - 7.2.6. Other Multipart subtypes........................... 37 - 7.3. The Message Content-Type........................... 38 - 7.3.1. The Message/rfc822 (primary) subtype............... 38 - 7.3.2. The Message/Partial subtype........................ 39 - 7.3.3. The Message/External-Body subtype.................. 42 - 7.3.3.1. The "ftp" and "tftp" access-types............... 44 - 7.3.3.2. The "anon-ftp" access-type...................... 45 - 7.3.3.3. The "local-file" and "afs" access-types......... 45 - 7.3.3.4. The "mail-server" access-type................... 45 - 7.3.3.5. Examples and Further Explanations............... 46 - 7.4. The Application Content-Type....................... 49 - 7.4.1. The Application/Octet-Stream (primary) subtype..... 50 - 7.4.2. The Application/PostScript subtype................. 50 - 7.4.3. Other Application subtypes......................... 53 - 7.5. The Image Content-Type............................. 53 - 7.6. The Audio Content-Type............................. 54 - 7.7. The Video Content-Type............................. 54 - 7.8. Experimental Content-Type Values................... 54 - 8. Summary............................................ 56 - 9. Security Considerations............................ 56 - 10. Authors' Addresses................................. 57 - 11. Acknowledgements................................... 58 - Appendix A -- Minimal MIME-Conformance.................... 60 - Appendix B -- General Guidelines For Sending Email Data... 63 - Appendix C -- A Complex Multipart Example................. 66 - Appendix D -- Collected Grammar........................... 68 - - - -Borenstein & Freed [Page 2] - -RFC 1521 MIME September 1993 - - - Appendix E -- IANA Registration Procedures................ 72 - E.1 Registration of New Content-type/subtype Values...... 72 - E.2 Registration of New Access-type Values - for Message/external-body............................ 73 - Appendix F -- Summary of the Seven Content-types.......... 74 - Appendix G -- Canonical Encoding Model.................... 76 - Appendix H -- Changes from RFC 1341....................... 78 - References................................................ 80 - -1. Introduction - - Since its publication in 1982, STD 11, RFC 822 [RFC-822] has defined - the standard format of textual mail messages on the Internet. Its - success has been such that the RFC 822 format has been adopted, - wholly or partially, well beyond the confines of the Internet and the - Internet SMTP transport defined by STD 10, RFC 821 [RFC-821]. As the - format has seen wider use, a number of limitations have proven - increasingly restrictive for the user community. - - RFC 822 was intended to specify a format for text messages. As such, - non-text messages, such as multimedia messages that might include - audio or images, are simply not mentioned. Even in the case of text, - however, RFC 822 is inadequate for the needs of mail users whose - languages require the use of character sets richer than US ASCII - [US-ASCII]. Since RFC 822 does not specify mechanisms for mail - containing audio, video, Asian language text, or even text in most - European languages, additional specifications are needed. - - One of the notable limitations of RFC 821/822 based mail systems is - the fact that they limit the contents of electronic mail messages to - relatively short lines of seven-bit ASCII. This forces users to - convert any non-textual data that they may wish to send into seven- - bit bytes representable as printable ASCII characters before invoking - a local mail UA (User Agent, a program with which human users send - and receive mail). Examples of such encodings currently used in the - Internet include pure hexadecimal, uuencode, the 3-in-4 base 64 - scheme specified in RFC 1421, the Andrew Toolkit Representation - [ATK], and many others. - - The limitations of RFC 822 mail become even more apparent as gateways - are designed to allow for the exchange of mail messages between RFC - 822 hosts and X.400 hosts. X.400 [X400] specifies mechanisms for the - inclusion of non-textual body parts within electronic mail messages. - The current standards for the mapping of X.400 messages to RFC 822 - messages specify either that X.400 non-textual body parts must be - converted to (not encoded in) an ASCII format, or that they must be - discarded, notifying the RFC 822 user that discarding has occurred. - This is clearly undesirable, as information that a user may wish to - - - -Borenstein & Freed [Page 3] - -RFC 1521 MIME September 1993 - - - receive is lost. Even though a user's UA may not have the capability - of dealing with the non-textual body part, the user might have some - mechanism external to the UA that can extract useful information from - the body part. Moreover, it does not allow for the fact that the - message may eventually be gatewayed back into an X.400 message - handling system (i.e., the X.400 message is "tunneled" through - Internet mail), where the non-textual information would definitely - become useful again. - - This document describes several mechanisms that combine to solve most - of these problems without introducing any serious incompatibilities - with the existing world of RFC 822 mail. In particular, it - describes: - - 1. A MIME-Version header field, which uses a version number to - declare a message to be conformant with this specification and - allows mail processing agents to distinguish between such - messages and those generated by older or non-conformant software, - which is presumed to lack such a field. - - 2. A Content-Type header field, generalized from RFC 1049 [RFC-1049], - which can be used to specify the type and subtype of data in the - body of a message and to fully specify the native representation - (encoding) of such data. - - 2.a. A "text" Content-Type value, which can be used to represent - textual information in a number of character sets and - formatted text description languages in a standardized - manner. - - 2.b. A "multipart" Content-Type value, which can be used to - combine several body parts, possibly of differing types of - data, into a single message. - - 2.c. An "application" Content-Type value, which can be used to - transmit application data or binary data, and hence, among - other uses, to implement an electronic mail file transfer - service. - - 2.d. A "message" Content-Type value, for encapsulating another - mail message. - - 2.e An "image" Content-Type value, for transmitting still image - (picture) data. - - 2.f. An "audio" Content-Type value, for transmitting audio or - voice data. - - - - -Borenstein & Freed [Page 4] - -RFC 1521 MIME September 1993 - - - 2.g. A "video" Content-Type value, for transmitting video or - moving image data, possibly with audio as part of the - composite video data format. - - 3. A Content-Transfer-Encoding header field, which can be used to - specify an auxiliary encoding that was applied to the data in - order to allow it to pass through mail transport mechanisms which - may have data or character set limitations. - - 4. Two additional header fields that can be used to further describe - the data in a message body, the Content-ID and Content- - Description header fields. - - MIME has been carefully designed as an extensible mechanism, and it - is expected that the set of content-type/subtype pairs and their - associated parameters will grow significantly with time. Several - other MIME fields, notably including character set names, are likely - to have new values defined over time. In order to ensure that the - set of such values is developed in an orderly, well-specified, and - public manner, MIME defines a registration process which uses the - Internet Assigned Numbers Authority (IANA) as a central registry for - such values. Appendix E provides details about how IANA registration - is accomplished. - - Finally, to specify and promote interoperability, Appendix A of this - document provides a basic applicability statement for a subset of the - above mechanisms that defines a minimal level of "conformance" with - this document. - - HISTORICAL NOTE: Several of the mechanisms described in this - document may seem somewhat strange or even baroque at first - reading. It is important to note that compatibility with existing - standards AND robustness across existing practice were two of the - highest priorities of the working group that developed this - document. In particular, compatibility was always favored over - elegance. - - MIME was first defined and published as RFCs 1341 and 1342 [RFC-1341] - [RFC-1342]. This document is a relatively minor updating of RFC - 1341, and is intended to supersede it. The differences between this - document and RFC 1341 are summarized in Appendix H. Please refer to - the current edition of the "IAB Official Protocol Standards" for the - standardization state and status of this protocol. Several other RFC - documents will be of interest to the MIME implementor, in particular - [RFC 1343], [RFC-1344], and [RFC-1345]. - - - - - - -Borenstein & Freed [Page 5] - -RFC 1521 MIME September 1993 - - -2. Notations, Conventions, and Generic BNF Grammar - - This document is being published in two versions, one as plain ASCII - text and one as PostScript (PostScript is a trademark of Adobe - Systems Incorporated.). While the text version is the official - specification, some will find the PostScript version easier to read. - The textual contents are identical. An Andrew-format copy of this - document is also available from the first author (Borenstein). - - Although the mechanisms specified in this document are all described - in prose, most are also described formally in the modified BNF - notation of RFC 822. Implementors will need to be familiar with this - notation in order to understand this specification, and are referred - to RFC 822 for a complete explanation of the modified BNF notation. - - Some of the modified BNF in this document makes reference to - syntactic entities that are defined in RFC 822 and not in this - document. A complete formal grammar, then, is obtained by combining - the collected grammar appendix of this document with that of RFC 822 - plus the modifications to RFC 822 defined in RFC 1123, which - specifically changes the syntax for `return', `date' and `mailbox'. - - The term CRLF, in this document, refers to the sequence of the two - ASCII characters CR (13) and LF (10) which, taken together, in this - order, denote a line break in RFC 822 mail. - - The term "character set" is used in this document to refer to a - method used with one or more tables to convert encoded text to a - series of octets. This definition is intended to allow various kinds - of text encodings, from simple single-table mappings such as ASCII to - complex table switching methods such as those that use ISO 2022's - techniques. However, a MIME character set name must fully specify - the mapping to be performed. - - The term "message", when not further qualified, means either the - (complete or "top-level") message being transferred on a network, or - a message encapsulated in a body of type "message". - - The term "body part", in this document, means one of the parts of the - body of a multipart entity. A body part has a header and a body, so - it makes sense to speak about the body of a body part. - - The term "entity", in this document, means either a message or a body - part. All kinds of entities share the property that they have a - header and a body. - - The term "body", when not further qualified, means the body of an - entity, that is the body of either a message or of a body part. - - - -Borenstein & Freed [Page 6] - -RFC 1521 MIME September 1993 - - - NOTE: The previous four definitions are clearly circular. This is - unavoidable, since the overall structure of a MIME message is - indeed recursive. - - In this document, all numeric and octet values are given in decimal - notation. - - It must be noted that Content-Type values, subtypes, and parameter - names as defined in this document are case-insensitive. However, - parameter values are case-sensitive unless otherwise specified for - the specific parameter. - - FORMATTING NOTE: This document has been carefully formatted for - ease of reading. The PostScript version of this document, in - particular, places notes like this one, which may be skipped by - the reader, in a smaller, italicized, font, and indents it as - well. In the text version, only the indentation is preserved, so - if you are reading the text version of this you might consider - using the PostScript version instead. However, all such notes will - be indented and preceded by "NOTE:" or some similar introduction, - even in the text version. - - The primary purpose of these non-essential notes is to convey - information about the rationale of this document, or to place this - document in the proper historical or evolutionary context. Such - information may be skipped by those who are focused entirely on - building a conformant implementation, but may be of use to those - who wish to understand why this document is written as it is. - - For ease of recognition, all BNF definitions have been placed in a - fixed-width font in the PostScript version of this document. - -3. The MIME-Version Header Field - - Since RFC 822 was published in 1982, there has really been only one - format standard for Internet messages, and there has been little - perceived need to declare the format standard in use. This document - is an independent document that complements RFC 822. Although the - extensions in this document have been defined in such a way as to be - compatible with RFC 822, there are still circumstances in which it - might be desirable for a mail-processing agent to know whether a - message was composed with the new standard in mind. - - Therefore, this document defines a new header field, "MIME-Version", - which is to be used to declare the version of the Internet message - body format standard in use. - - Messages composed in accordance with this document MUST include such - - - -Borenstein & Freed [Page 7] - -RFC 1521 MIME September 1993 - - - a header field, with the following verbatim text: - - MIME-Version: 1.0 - - The presence of this header field is an assertion that the message - has been composed in compliance with this document. - - Since it is possible that a future document might extend the message - format standard again, a formal BNF is given for the content of the - MIME-Version field: - - version := "MIME-Version" ":" 1*DIGIT "." 1*DIGIT - - Thus, future format specifiers, which might replace or extend "1.0", - are constrained to be two integer fields, separated by a period. If - a message is received with a MIME-version value other than "1.0", it - cannot be assumed to conform with this specification. - - Note that the MIME-Version header field is required at the top level - of a message. It is not required for each body part of a multipart - entity. It is required for the embedded headers of a body of type - "message" if and only if the embedded message is itself claimed to be - MIME-conformant. - - It is not possible to fully specify how a mail reader that conforms - with MIME as defined in this document should treat a message that - might arrive in the future with some value of MIME-Version other than - "1.0". However, conformant software is encouraged to check the - version number and at least warn the user if an unrecognized MIME- - version is encountered. - - It is also worth noting that version control for specific content- - types is not accomplished using the MIME-Version mechanism. In - particular, some formats (such as application/postscript) have - version numbering conventions that are internal to the document - format. Where such conventions exist, MIME does nothing to supersede - them. Where no such conventions exist, a MIME type might use a - "version" parameter in the content-type field if necessary. - - NOTE TO IMPLEMENTORS: All header fields defined in this document, - including MIME-Version, Content-type, etc., are subject to the - general syntactic rules for header fields specified in RFC 822. In - particular, all can include comments, which means that the following - two MIME-Version fields are equivalent: - - MIME-Version: 1.0 - MIME-Version: 1.0 (Generated by GBD-killer 3.7) - - - - -Borenstein & Freed [Page 8] - -RFC 1521 MIME September 1993 - - -4. The Content-Type Header Field - - The purpose of the Content-Type field is to describe the data - contained in the body fully enough that the receiving user agent can - pick an appropriate agent or mechanism to present the data to the - user, or otherwise deal with the data in an appropriate manner. - - HISTORICAL NOTE: The Content-Type header field was first defined in - RFC 1049. RFC 1049 Content-types used a simpler and less powerful - syntax, but one that is largely compatible with the mechanism given - here. - - The Content-Type header field is used to specify the nature of the - data in the body of an entity, by giving type and subtype - identifiers, and by providing auxiliary information that may be - required for certain types. After the type and subtype names, the - remainder of the header field is simply a set of parameters, - specified in an attribute/value notation. The set of meaningful - parameters differs for the different types. In particular, there are - NO globally-meaningful parameters that apply to all content-types. - Global mechanisms are best addressed, in the MIME model, by the - definition of additional Content-* header fields. The ordering of - parameters is not significant. Among the defined parameters is a - "charset" parameter by which the character set used in the body may - be declared. Comments are allowed in accordance with RFC 822 rules - for structured header fields. - - In general, the top-level Content-Type is used to declare the general - type of data, while the subtype specifies a specific format for that - type of data. Thus, a Content-Type of "image/xyz" is enough to tell - a user agent that the data is an image, even if the user agent has no - knowledge of the specific image format "xyz". Such information can - be used, for example, to decide whether or not to show a user the raw - data from an unrecognized subtype -- such an action might be - reasonable for unrecognized subtypes of text, but not for - unrecognized subtypes of image or audio. For this reason, registered - subtypes of audio, image, text, and video, should not contain - embedded information that is really of a different type. Such - compound types should be represented using the "multipart" or - "application" types. - - Parameters are modifiers of the content-subtype, and do not - fundamentally affect the requirements of the host system. Although - most parameters make sense only with certain content-types, others - are "global" in the sense that they might apply to any subtype. For - example, the "boundary" parameter makes sense only for the - "multipart" content-type, but the "charset" parameter might make - sense with several content-types. - - - -Borenstein & Freed [Page 9] - -RFC 1521 MIME September 1993 - - - An initial set of seven Content-Types is defined by this document. - This set of top-level names is intended to be substantially complete. - It is expected that additions to the larger set of supported types - can generally be accomplished by the creation of new subtypes of - these initial types. In the future, more top-level types may be - defined only by an extension to this standard. If another primary - type is to be used for any reason, it must be given a name starting - with "X-" to indicate its non-standard status and to avoid a - potential conflict with a future official name. - - In the Augmented BNF notation of RFC 822, a Content-Type header field - value is defined as follows: - - content := "Content-Type" ":" type "/" subtype *(";" - parameter) - ; case-insensitive matching of type and subtype - - type := "application" / "audio" - / "image" / "message" - / "multipart" / "text" - / "video" / extension-token - ; All values case-insensitive - - extension-token := x-token / iana-token - - iana-token := - - x-token := - - subtype := token ; case-insensitive - - parameter := attribute "=" value - - attribute := token ; case-insensitive - - value := token / quoted-string - - token := 1* - - tspecials := "(" / ")" / "<" / ">" / "@" - / "," / ";" / ":" / "\" / <"> - / "/" / "[" / "]" / "?" / "=" - ; Must be in quoted-string, - ; to use within parameter values - - - -Borenstein & Freed [Page 10] - -RFC 1521 MIME September 1993 - - - Note that the definition of "tspecials" is the same as the RFC 822 - definition of "specials" with the addition of the three characters - "/", "?", and "=", and the removal of ".". - - Note also that a subtype specification is MANDATORY. There are no - default subtypes. - - The type, subtype, and parameter names are not case sensitive. For - example, TEXT, Text, and TeXt are all equivalent. Parameter values - are normally case sensitive, but certain parameters are interpreted - to be case-insensitive, depending on the intended use. (For example, - multipart boundaries are case-sensitive, but the "access-type" for - message/External-body is not case-sensitive.) - - Beyond this syntax, the only constraint on the definition of subtype - names is the desire that their uses must not conflict. That is, it - would be undesirable to have two different communities using - "Content-Type: application/foobar" to mean two different things. The - process of defining new content-subtypes, then, is not intended to be - a mechanism for imposing restrictions, but simply a mechanism for - publicizing the usages. There are, therefore, two acceptable - mechanisms for defining new Content-Type subtypes: - - 1. Private values (starting with "X-") may be - defined bilaterally between two cooperating - agents without outside registration or - standardization. - - 2. New standard values must be documented, - registered with, and approved by IANA, as - described in Appendix E. Where intended for - public use, the formats they refer to must - also be defined by a published specification, - and possibly offered for standardization. - - The seven standard initial predefined Content-Types are detailed in - the bulk of this document. They are: - - text -- textual information. The primary subtype, - "plain", indicates plain (unformatted) text. No - special software is required to get the full - meaning of the text, aside from support for the - indicated character set. Subtypes are to be used - for enriched text in forms where application - software may enhance the appearance of the text, - but such software must not be required in order to - get the general idea of the content. Possible - subtypes thus include any readable word processor - - - -Borenstein & Freed [Page 11] - -RFC 1521 MIME September 1993 - - - format. A very simple and portable subtype, - richtext, was defined in RFC 1341, with a future - revision expected. - - multipart -- data consisting of multiple parts of - independent data types. Four initial subtypes - are defined, including the primary "mixed" - subtype, "alternative" for representing the same - data in multiple formats, "parallel" for parts - intended to be viewed simultaneously, and "digest" - for multipart entities in which each part is of - type "message". - - message -- an encapsulated message. A body of - Content-Type "message" is itself all or part of a - fully formatted RFC 822 conformant message which - may contain its own different Content-Type header - field. The primary subtype is "rfc822". The - "partial" subtype is defined for partial messages, - to permit the fragmented transmission of bodies - that are thought to be too large to be passed - through mail transport facilities. Another - subtype, "External-body", is defined for - specifying large bodies by reference to an - external data source. - - image -- image data. Image requires a display device - (such as a graphical display, a printer, or a FAX - machine) to view the information. Initial - subtypes are defined for two widely-used image - formats, jpeg and gif. - - audio -- audio data, with initial subtype "basic". - Audio requires an audio output device (such as a - speaker or a telephone) to "display" the contents. - - video -- video data. Video requires the capability to - display moving images, typically including - specialized hardware and software. The initial - subtype is "mpeg". - - application -- some other kind of data, typically - either uninterpreted binary data or information to - be processed by a mail-based application. The - primary subtype, "octet-stream", is to be used in - the case of uninterpreted binary data, in which - case the simplest recommended action is to offer - to write the information into a file for the user. - - - -Borenstein & Freed [Page 12] - -RFC 1521 MIME September 1993 - - - An additional subtype, "PostScript", is defined - for transporting PostScript documents in bodies. - Other expected uses for "application" include - spreadsheets, data for mail-based scheduling - systems, and languages for "active" - (computational) email. (Note that active email - and other application data may entail several - security considerations, which are discussed later - in this memo, particularly in the context of - application/PostScript.) - - Default RFC 822 messages are typed by this protocol as plain text in - the US-ASCII character set, which can be explicitly specified as - "Content-type: text/plain; charset=us-ascii". If no Content-Type is - specified, this default is assumed. In the presence of a MIME- - Version header field, a receiving User Agent can also assume that - plain US-ASCII text was the sender's intent. In the absence of a - MIME-Version specification, plain US-ASCII text must still be - assumed, but the sender's intent might have been otherwise. - - RATIONALE: In the absence of any Content-Type header field or - MIME-Version header field, it is impossible to be certain that a - message is actually text in the US-ASCII character set, since it - might well be a message that, using the conventions that predate - this document, includes text in another character set or non- - textual data in a manner that cannot be automatically recognized - (e.g., a uuencoded compressed UNIX tar file). Although there is - no fully acceptable alternative to treating such untyped messages - as "text/plain; charset=us-ascii", implementors should remain - aware that if a message lacks both the MIME-Version and the - Content-Type header fields, it may in practice contain almost - anything. - - It should be noted that the list of Content-Type values given here - may be augmented in time, via the mechanisms described above, and - that the set of subtypes is expected to grow substantially. - - When a mail reader encounters mail with an unknown Content-type - value, it should generally treat it as equivalent to - "application/octet-stream", as described later in this document. - -5. The Content-Transfer-Encoding Header Field - - Many Content-Types which could usefully be transported via email are - represented, in their "natural" format, as 8-bit character or binary - data. Such data cannot be transmitted over some transport protocols. - For example, RFC 821 restricts mail messages to 7-bit US-ASCII data - with lines no longer than 1000 characters. - - - -Borenstein & Freed [Page 13] - -RFC 1521 MIME September 1993 - - - It is necessary, therefore, to define a standard mechanism for re- - encoding such data into a 7-bit short-line format. This document - specifies that such encodings will be indicated by a new "Content- - Transfer-Encoding" header field. The Content-Transfer-Encoding field - is used to indicate the type of transformation that has been used in - order to represent the body in an acceptable manner for transport. - - Unlike Content-Types, a proliferation of Content-Transfer-Encoding - values is undesirable and unnecessary. However, establishing only a - single Content-Transfer-Encoding mechanism does not seem possible. - There is a tradeoff between the desire for a compact and efficient - encoding of largely-binary data and the desire for a readable - encoding of data that is mostly, but not entirely, 7-bit data. For - this reason, at least two encoding mechanisms are necessary: a - "readable" encoding and a "dense" encoding. - - The Content-Transfer-Encoding field is designed to specify an - invertible mapping between the "native" representation of a type of - data and a representation that can be readily exchanged using 7 bit - mail transport protocols, such as those defined by RFC 821 (SMTP). - This field has not been defined by any previous standard. The field's - value is a single token specifying the type of encoding, as - enumerated below. Formally: - - encoding := "Content-Transfer-Encoding" ":" mechanism - - mechanism := "7bit" ; case-insensitive - / "quoted-printable" - / "base64" - / "8bit" - / "binary" - / x-token - - These values are not case sensitive. That is, Base64 and BASE64 and - bAsE64 are all equivalent. An encoding type of 7BIT requires that - the body is already in a seven-bit mail-ready representation. This - is the default value -- that is, "Content-Transfer-Encoding: 7BIT" is - assumed if the Content-Transfer-Encoding header field is not present. - - The values "8bit", "7bit", and "binary" all mean that NO encoding has - been performed. However, they are potentially useful as indications - of the kind of data contained in the object, and therefore of the - kind of encoding that might need to be performed for transmission in - a given transport system. In particular: - - "7bit" means that the data is all represented as short - lines of US-ASCII data. - - - - -Borenstein & Freed [Page 14] - -RFC 1521 MIME September 1993 - - - "8bit" means that the lines are short, but there may be - non-ASCII characters (octets with the high-order - bit set). - - "Binary" means that not only may non-ASCII characters - be present, but also that the lines are not - necessarily short enough for SMTP transport. - - The difference between "8bit" (or any other conceivable bit-width - token) and the "binary" token is that "binary" does not require - adherence to any limits on line length or to the SMTP CRLF semantics, - while the bit-width tokens do require such adherence. If the body - contains data in any bit-width other than 7-bit, the appropriate - bit-width Content-Transfer-Encoding token must be used (e.g., "8bit" - for unencoded 8 bit wide data). If the body contains binary data, - the "binary" Content-Transfer-Encoding token must be used. - - NOTE: The distinction between the Content-Transfer-Encoding values - of "binary", "8bit", etc. may seem unimportant, in that all of - them really mean "none" -- that is, there has been no encoding of - the data for transport. However, clear labeling will be of - enormous value to gateways between future mail transport systems - with differing capabilities in transporting data that do not meet - the restrictions of RFC 821 transport. - - Mail transport for unencoded 8-bit data is defined in RFC-1426 - [RFC-1426]. As of the publication of this document, there are no - standardized Internet mail transports for which it is legitimate - to include unencoded binary data in mail bodies. Thus there are - no circumstances in which the "binary" Content-Transfer-Encoding - is actually legal on the Internet. However, in the event that - binary mail transport becomes a reality in Internet mail, or when - this document is used in conjunction with any other binary-capable - transport mechanism, binary bodies should be labeled as such using - this mechanism. - - NOTE: The five values defined for the Content-Transfer-Encoding - field imply nothing about the Content-Type other than the - algorithm by which it was encoded or the transport system - requirements if unencoded. - - Implementors may, if necessary, define new Content-Transfer-Encoding - values, but must use an x-token, which is a name prefixed by "X-" to - indicate its non-standard status, e.g., "Content-Transfer-Encoding: - x-my-new-encoding". However, unlike Content-Types and subtypes, the - creation of new Content-Transfer-Encoding values is explicitly and - strongly discouraged, as it seems likely to hinder interoperability - with little potential benefit. Their use is allowed only as the - - - -Borenstein & Freed [Page 15] - -RFC 1521 MIME September 1993 - - - result of an agreement between cooperating user agents. - - If a Content-Transfer-Encoding header field appears as part of a - message header, it applies to the entire body of that message. If a - Content-Transfer-Encoding header field appears as part of a body - part's headers, it applies only to the body of that body part. If an - entity is of type "multipart" or "message", the Content-Transfer- - Encoding is not permitted to have any value other than a bit width - (e.g., "7bit", "8bit", etc.) or "binary". - - It should be noted that email is character-oriented, so that the - mechanisms described here are mechanisms for encoding arbitrary octet - streams, not bit streams. If a bit stream is to be encoded via one - of these mechanisms, it must first be converted to an 8-bit byte - stream using the network standard bit order ("big-endian"), in which - the earlier bits in a stream become the higher-order bits in a byte. - A bit stream not ending at an 8-bit boundary must be padded with - zeroes. This document provides a mechanism for noting the addition - of such padding in the case of the application Content-Type, which - has a "padding" parameter. - - The encoding mechanisms defined here explicitly encode all data in - ASCII. Thus, for example, suppose an entity has header fields such - as: - - Content-Type: text/plain; charset=ISO-8859-1 - Content-transfer-encoding: base64 - - This must be interpreted to mean that the body is a base64 ASCII - encoding of data that was originally in ISO-8859-1, and will be in - that character set again after decoding. - - The following sections will define the two standard encoding - mechanisms. The definition of new content-transfer-encodings is - explicitly discouraged and should only occur when absolutely - necessary. All content-transfer-encoding namespace except that - beginning with "X-" is explicitly reserved to the IANA for future - use. Private agreements about content-transfer-encodings are also - explicitly discouraged. - - Certain Content-Transfer-Encoding values may only be used on certain - Content-Types. In particular, it is expressly forbidden to use any - encodings other than "7bit", "8bit", or "binary" with any Content- - Type that recursively includes other Content-Type fields, notably the - "multipart" and "message" Content-Types. All encodings that are - desired for bodies of type multipart or message must be done at the - innermost level, by encoding the actual body that needs to be - encoded. - - - -Borenstein & Freed [Page 16] - -RFC 1521 MIME September 1993 - - - NOTE ON ENCODING RESTRICTIONS: Though the prohibition against - using content-transfer-encodings on data of type multipart or - message may seem overly restrictive, it is necessary to prevent - nested encodings, in which data are passed through an encoding - algorithm multiple times, and must be decoded multiple times in - order to be properly viewed. Nested encodings add considerable - complexity to user agents: aside from the obvious efficiency - problems with such multiple encodings, they can obscure the basic - structure of a message. In particular, they can imply that - several decoding operations are necessary simply to find out what - types of objects a message contains. Banning nested encodings may - complicate the job of certain mail gateways, but this seems less - of a problem than the effect of nested encodings on user agents. - - NOTE ON THE RELATIONSHIP BETWEEN CONTENT-TYPE AND CONTENT- - TRANSFER-ENCODING: It may seem that the Content-Transfer-Encoding - could be inferred from the characteristics of the Content-Type - that is to be encoded, or, at the very least, that certain - Content-Transfer-Encodings could be mandated for use with specific - Content-Types. There are several reasons why this is not the case. - First, given the varying types of transports used for mail, some - encodings may be appropriate for some Content-Type/transport - combinations and not for others. (For example, in an 8-bit - transport, no encoding would be required for text in certain - character sets, while such encodings are clearly required for 7- - bit SMTP.) Second, certain Content-Types may require different - types of transfer encoding under different circumstances. For - example, many PostScript bodies might consist entirely of short - lines of 7-bit data and hence require little or no encoding. - Other PostScript bodies (especially those using Level 2 - PostScript's binary encoding mechanism) may only be reasonably - represented using a binary transport encoding. Finally, since - Content-Type is intended to be an open-ended specification - mechanism, strict specification of an association between - Content-Types and encodings effectively couples the specification - of an application protocol with a specific lower-level transport. - This is not desirable since the developers of a Content-Type - should not have to be aware of all the transports in use and what - their limitations are. - - NOTE ON TRANSLATING ENCODINGS: The quoted-printable and base64 - encodings are designed so that conversion between them is - possible. The only issue that arises in such a conversion is the - handling of line breaks. When converting from quoted-printable to - base64 a line break must be converted into a CRLF sequence. - Similarly, a CRLF sequence in base64 data must be converted to a - quoted-printable line break, but ONLY when converting text data. - - - - -Borenstein & Freed [Page 17] - -RFC 1521 MIME September 1993 - - - NOTE ON CANONICAL ENCODING MODEL: There was some confusion, in - earlier drafts of this memo, regarding the model for when email - data was to be converted to canonical form and encoded, and in - particular how this process would affect the treatment of CRLFs, - given that the representation of newlines varies greatly from - system to system, and the relationship between content-transfer- - encodings and character sets. For this reason, a canonical model - for encoding is presented as Appendix G. - -5.1. Quoted-Printable Content-Transfer-Encoding - - The Quoted-Printable encoding is intended to represent data that - largely consists of octets that correspond to printable characters in - the ASCII character set. It encodes the data in such a way that the - resulting octets are unlikely to be modified by mail transport. If - the data being encoded are mostly ASCII text, the encoded form of the - data remains largely recognizable by humans. A body which is - entirely ASCII may also be encoded in Quoted-Printable to ensure the - integrity of the data should the message pass through a character- - translating, and/or line-wrapping gateway. - - In this encoding, octets are to be represented as determined by the - following rules: - - Rule #1: (General 8-bit representation) Any octet, except those - indicating a line break according to the newline convention of the - canonical (standard) form of the data being encoded, may be - represented by an "=" followed by a two digit hexadecimal - representation of the octet's value. The digits of the - hexadecimal alphabet, for this purpose, are "0123456789ABCDEF". - Uppercase letters must be used when sending hexadecimal data, - though a robust implementation may choose to recognize lowercase - letters on receipt. Thus, for example, the value 12 (ASCII form - feed) can be represented by "=0C", and the value 61 (ASCII EQUAL - SIGN) can be represented by "=3D". Except when the following - rules allow an alternative encoding, this rule is mandatory. - - Rule #2: (Literal representation) Octets with decimal values of 33 - through 60 inclusive, and 62 through 126, inclusive, MAY be - represented as the ASCII characters which correspond to those - octets (EXCLAMATION POINT through LESS THAN, and GREATER THAN - through TILDE, respectively). - - Rule #3: (White Space): Octets with values of 9 and 32 MAY be - represented as ASCII TAB (HT) and SPACE characters, respectively, - but MUST NOT be so represented at the end of an encoded line. Any - TAB (HT) or SPACE characters on an encoded line MUST thus be - followed on that line by a printable character. In particular, an - - - -Borenstein & Freed [Page 18] - -RFC 1521 MIME September 1993 - - - "=" at the end of an encoded line, indicating a soft line break - (see rule #5) may follow one or more TAB (HT) or SPACE characters. - It follows that an octet with value 9 or 32 appearing at the end - of an encoded line must be represented according to Rule #1. This - rule is necessary because some MTAs (Message Transport Agents, - programs which transport messages from one user to another, or - perform a part of such transfers) are known to pad lines of text - with SPACEs, and others are known to remove "white space" - characters from the end of a line. Therefore, when decoding a - Quoted-Printable body, any trailing white space on a line must be - deleted, as it will necessarily have been added by intermediate - transport agents. - - Rule #4 (Line Breaks): A line break in a text body, independent of - what its representation is following the canonical representation - of the data being encoded, must be represented by a (RFC 822) line - break, which is a CRLF sequence, in the Quoted-Printable encoding. - Since the canonical representation of types other than text do not - generally include the representation of line breaks, no hard line - breaks (i.e. line breaks that are intended to be meaningful and - to be displayed to the user) should occur in the quoted-printable - encoding of such types. Of course, occurrences of "=0D", "=0A", - "0A=0D" and "=0D=0A" will eventually be encountered. In general, - however, base64 is preferred over quoted-printable for binary - data. - - Note that many implementations may elect to encode the local - representation of various content types directly, as described in - Appendix G. In particular, this may apply to plain text material - on systems that use newline conventions other than CRLF - delimiters. Such an implementation is permissible, but the - generation of line breaks must be generalized to account for the - case where alternate representations of newline sequences are - used. - - Rule #5 (Soft Line Breaks): The Quoted-Printable encoding REQUIRES - that encoded lines be no more than 76 characters long. If longer - lines are to be encoded with the Quoted-Printable encoding, 'soft' - line breaks must be used. An equal sign as the last character on a - encoded line indicates such a non-significant ('soft') line break - in the encoded text. Thus if the "raw" form of the line is a - single unencoded line that says: - - Now's the time for all folk to come to the aid of - their country. - - This can be represented, in the Quoted-Printable encoding, as - - - - -Borenstein & Freed [Page 19] - -RFC 1521 MIME September 1993 - - - Now's the time = - for all folk to come= - to the aid of their country. - - This provides a mechanism with which long lines are encoded in - such a way as to be restored by the user agent. The 76 character - limit does not count the trailing CRLF, but counts all other - characters, including any equal signs. - - Since the hyphen character ("-") is represented as itself in the - Quoted-Printable encoding, care must be taken, when encapsulating a - quoted-printable encoded body in a multipart entity, to ensure that - the encapsulation boundary does not appear anywhere in the encoded - body. (A good strategy is to choose a boundary that includes a - character sequence such as "=_" which can never appear in a quoted- - printable body. See the definition of multipart messages later in - this document.) - - NOTE: The quoted-printable encoding represents something of a - compromise between readability and reliability in transport. - Bodies encoded with the quoted-printable encoding will work - reliably over most mail gateways, but may not work perfectly over - a few gateways, notably those involving translation into EBCDIC. - (In theory, an EBCDIC gateway could decode a quoted-printable body - and re-encode it using base64, but such gateways do not yet - exist.) A higher level of confidence is offered by the base64 - Content-Transfer-Encoding. A way to get reasonably reliable - transport through EBCDIC gateways is to also quote the ASCII - characters - - !"#$@[\]^`{|}~ - - according to rule #1. See Appendix B for more information. - - Because quoted-printable data is generally assumed to be line- - oriented, it is to be expected that the representation of the breaks - between the lines of quoted printable data may be altered in - transport, in the same manner that plain text mail has always been - altered in Internet mail when passing between systems with differing - newline conventions. If such alterations are likely to constitute a - corruption of the data, it is probably more sensible to use the - base64 encoding rather than the quoted-printable encoding. - - WARNING TO IMPLEMENTORS: If binary data are encoded in quoted- - printable, care must be taken to encode CR and LF characters as "=0D" - and "=0A", respectively. In particular, a CRLF sequence in binary - data should be encoded as "=0D=0A". Otherwise, if CRLF were - represented as a hard line break, it might be incorrectly decoded on - - - -Borenstein & Freed [Page 20] - -RFC 1521 MIME September 1993 - - - platforms with different line break conventions. - - For formalists, the syntax of quoted-printable data is described by - the following grammar: - - quoted-printable := ([*(ptext / SPACE / TAB) ptext] ["="] CRLF) - ; Maximum line length of 76 characters excluding CRLF - - ptext := octet / 127, =, SPACE, or TAB, - ; and is recommended for any characters not listed in - ; Appendix B as "mail-safe". - -5.2. Base64 Content-Transfer-Encoding - - The Base64 Content-Transfer-Encoding is designed to represent - arbitrary sequences of octets in a form that need not be humanly - readable. The encoding and decoding algorithms are simple, but the - encoded data are consistently only about 33 percent larger than the - unencoded data. This encoding is virtually identical to the one used - in Privacy Enhanced Mail (PEM) applications, as defined in RFC 1421. - The base64 encoding is adapted from RFC 1421, with one change: base64 - eliminates the "*" mechanism for embedded clear text. - - A 65-character subset of US-ASCII is used, enabling 6 bits to be - represented per printable character. (The extra 65th character, "=", - is used to signify a special processing function.) - - NOTE: This subset has the important property that it is - represented identically in all versions of ISO 646, including US - ASCII, and all characters in the subset are also represented - identically in all versions of EBCDIC. Other popular encodings, - such as the encoding used by the uuencode utility and the base85 - encoding specified as part of Level 2 PostScript, do not share - these properties, and thus do not fulfill the portability - requirements a binary transport encoding for mail must meet. - - The encoding process represents 24-bit groups of input bits as output - strings of 4 encoded characters. Proceeding from left to right, a - 24-bit input group is formed by concatenating 3 8-bit input groups. - These 24 bits are then treated as 4 concatenated 6-bit groups, each - of which is translated into a single digit in the base64 alphabet. - When encoding a bit stream via the base64 encoding, the bit stream - must be presumed to be ordered with the most-significant-bit first. - - - -Borenstein & Freed [Page 21] - -RFC 1521 MIME September 1993 - - - That is, the first bit in the stream will be the high-order bit in - the first byte, and the eighth bit will be the low-order bit in the - first byte, and so on. - - Each 6-bit group is used as an index into an array of 64 printable - characters. The character referenced by the index is placed in the - output string. These characters, identified in Table 1, below, are - selected so as to be universally representable, and the set excludes - characters with particular significance to SMTP (e.g., ".", CR, LF) - and to the encapsulation boundaries defined in this document (e.g., - "-"). - - Table 1: The Base64 Alphabet - - Value Encoding Value Encoding Value Encoding Value Encoding - 0 A 17 R 34 i 51 z - 1 B 18 S 35 j 52 0 - 2 C 19 T 36 k 53 1 - 3 D 20 U 37 l 54 2 - 4 E 21 V 38 m 55 3 - 5 F 22 W 39 n 56 4 - 6 G 23 X 40 o 57 5 - 7 H 24 Y 41 p 58 6 - 8 I 25 Z 42 q 59 7 - 9 J 26 a 43 r 60 8 - 10 K 27 b 44 s 61 9 - 11 L 28 c 45 t 62 + - 12 M 29 d 46 u 63 / - 13 N 30 e 47 v - 14 O 31 f 48 w (pad) = - 15 P 32 g 49 x - 16 Q 33 h 50 y - - The output stream (encoded bytes) must be represented in lines of no - more than 76 characters each. All line breaks or other characters - not found in Table 1 must be ignored by decoding software. In base64 - data, characters other than those in Table 1, line breaks, and other - white space probably indicate a transmission error, about which a - warning message or even a message rejection might be appropriate - under some circumstances. - - Special processing is performed if fewer than 24 bits are available - at the end of the data being encoded. A full encoding quantum is - always completed at the end of a body. When fewer than 24 input bits - are available in an input group, zero bits are added (on the right) - to form an integral number of 6-bit groups. Padding at the end of - the data is performed using the '=' character. Since all base64 - input is an integral number of octets, only the following cases can - - - -Borenstein & Freed [Page 22] - -RFC 1521 MIME September 1993 - - - arise: (1) the final quantum of encoding input is an integral - multiple of 24 bits; here, the final unit of encoded output will be - an integral multiple of 4 characters with no "=" padding, (2) the - final quantum of encoding input is exactly 8 bits; here, the final - unit of encoded output will be two characters followed by two "=" - padding characters, or (3) the final quantum of encoding input is - exactly 16 bits; here, the final unit of encoded output will be three - characters followed by one "=" padding character. - - Because it is used only for padding at the end of the data, the - occurrence of any '=' characters may be taken as evidence that the - end of the data has been reached (without truncation in transit). No - such assurance is possible, however, when the number of octets - transmitted was a multiple of three. - - Any characters outside of the base64 alphabet are to be ignored in - base64-encoded data. The same applies to any illegal sequence of - characters in the base64 encoding, such as "=====" - - Care must be taken to use the proper octets for line breaks if base64 - encoding is applied directly to text material that has not been - converted to canonical form. In particular, text line breaks must be - converted into CRLF sequences prior to base64 encoding. The important - thing to note is that this may be done directly by the encoder rather - than in a prior canonicalization step in some implementations. - - NOTE: There is no need to worry about quoting apparent - encapsulation boundaries within base64-encoded parts of multipart - entities because no hyphen characters are used in the base64 - encoding. - -6. Additional Content-Header Fields - -6.1. Optional Content-ID Header Field - - In constructing a high-level user agent, it may be desirable to allow - one body to make reference to another. Accordingly, bodies may be - labeled using the "Content-ID" header field, which is syntactically - identical to the "Message-ID" header field: - - id := "Content-ID" ":" msg-id - Like the Message-ID values, Content-ID values must be generated to be - world-unique. - - The Content-ID value may be used for uniquely identifying MIME - entities in several contexts, particularly for cacheing data - referenced by the message/external-body mechanism. Although the - Content-ID header is generally optional, its use is mandatory in - - - -Borenstein & Freed [Page 23] - -RFC 1521 MIME September 1993 - - - implementations which generate data of the optional MIME Content-type - "message/external-body". That is, each message/external-body entity - must have a Content-ID field to permit cacheing of such data. - - It is also worth noting that the Content-ID value has special - semantics in the case of the multipart/alternative content-type. - This is explained in the section of this document dealing with - multipart/alternative. - -6.2. Optional Content-Description Header Field - - The ability to associate some descriptive information with a given - body is often desirable. For example, it may be useful to mark an - "image" body as "a picture of the Space Shuttle Endeavor." Such text - may be placed in the Content-Description header field. - - description := "Content-Description" ":" *text - - The description is presumed to be given in the US-ASCII character - set, although the mechanism specified in [RFC-1522] may be used for - non-US-ASCII Content-Description values. - -7. The Predefined Content-Type Values - - This document defines seven initial Content-Type values and an - extension mechanism for private or experimental types. Further - standard types must be defined by new published specifications. It - is expected that most innovation in new types of mail will take place - as subtypes of the seven types defined here. The most essential - characteristics of the seven content-types are summarized in Appendix - F. - -7.1 The Text Content-Type - - The text Content-Type is intended for sending material which is - principally textual in form. It is the default Content-Type. A - "charset" parameter may be used to indicate the character set of the - body text for some text subtypes, notably including the primary - subtype, "text/plain", which indicates plain (unformatted) text. The - default Content-Type for Internet mail is "text/plain; charset=us- - ascii". - - Beyond plain text, there are many formats for representing what might - be known as "extended text" -- text with embedded formatting and - presentation information. An interesting characteristic of many such - representations is that they are to some extent readable even without - the software that interprets them. It is useful, then, to - distinguish them, at the highest level, from such unreadable data as - - - -Borenstein & Freed [Page 24] - -RFC 1521 MIME September 1993 - - - images, audio, or text represented in an unreadable form. In the - absence of appropriate interpretation software, it is reasonable to - show subtypes of text to the user, while it is not reasonable to do - so with most nontextual data. - - Such formatted textual data should be represented using subtypes of - text. Plausible subtypes of text are typically given by the common - name of the representation format, e.g., "text/richtext" [RFC-1341]. - -7.1.1. The charset parameter - - A critical parameter that may be specified in the Content-Type field - for text/plain data is the character set. This is specified with a - "charset" parameter, as in: - - Content-type: text/plain; charset=us-ascii - - Unlike some other parameter values, the values of the charset - parameter are NOT case sensitive. The default character set, which - must be assumed in the absence of a charset parameter, is US-ASCII. - - The specification for any future subtypes of "text" must specify - whether or not they will also utilize a "charset" parameter, and may - possibly restrict its values as well. When used with a particular - body, the semantics of the "charset" parameter should be identical to - those specified here for "text/plain", i.e., the body consists - entirely of characters in the given charset. In particular, definers - of future text subtypes should pay close attention the the - implications of multibyte character sets for their subtype - definitions. - - This RFC specifies the definition of the charset parameter for the - purposes of MIME to be a unique mapping of a byte stream to glyphs, a - mapping which does not require external profiling information. - - An initial list of predefined character set names can be found at the - end of this section. Additional character sets may be registered - with IANA, although the standardization of their use requires the - usual IESG [RFC-1340] review and approval. Note that if the - specified character set includes 8-bit data, a Content-Transfer- - Encoding header field and a corresponding encoding on the data are - required in order to transmit the body via some mail transfer - protocols, such as SMTP. - - The default character set, US-ASCII, has been the subject of some - confusion and ambiguity in the past. Not only were there some - ambiguities in the definition, there have been wide variations in - practice. In order to eliminate such ambiguity and variations in the - - - -Borenstein & Freed [Page 25] - -RFC 1521 MIME September 1993 - - - future, it is strongly recommended that new user agents explicitly - specify a character set via the Content-Type header field. "US- - ASCII" does not indicate an arbitrary seven-bit character code, but - specifies that the body uses character coding that uses the exact - correspondence of codes to characters specified in ASCII. National - use variations of ISO 646 [ISO-646] are NOT ASCII and their use in - Internet mail is explicitly discouraged. The omission of the ISO 646 - character set is deliberate in this regard. The character set name - of "US-ASCII" explicitly refers to ANSI X3.4-1986 [US-ASCII] only. - The character set name "ASCII" is reserved and must not be used for - any purpose. - - NOTE: RFC 821 explicitly specifies "ASCII", and references an - earlier version of the American Standard. Insofar as one of the - purposes of specifying a Content-Type and character set is to - permit the receiver to unambiguously determine how the sender - intended the coded message to be interpreted, assuming anything - other than "strict ASCII" as the default would risk unintentional - and incompatible changes to the semantics of messages now being - transmitted. This also implies that messages containing - characters coded according to national variations on ISO 646, or - using code-switching procedures (e.g., those of ISO 2022), as well - as 8-bit or multiple octet character encodings MUST use an - appropriate character set specification to be consistent with this - specification. - - The complete US-ASCII character set is listed in [US-ASCII]. Note - that the control characters including DEL (0-31, 127) have no defined - meaning apart from the combination CRLF (ASCII values 13 and 10) - indicating a new line. Two of the characters have de facto meanings - in wide use: FF (12) often means "start subsequent text on the - beginning of a new page"; and TAB or HT (9) often (though not always) - means "move the cursor to the next available column after the current - position where the column number is a multiple of 8 (counting the - first column as column 0)." Apart from this, any use of the control - characters or DEL in a body must be part of a private agreement - between the sender and recipient. Such private agreements are - discouraged and should be replaced by the other capabilities of this - document. - - NOTE: Beyond US-ASCII, an enormous proliferation of character sets - is possible. It is the opinion of the IETF working group that a - large number of character sets is NOT a good thing. We would - prefer to specify a single character set that can be used - universally for representing all of the world's languages in - electronic mail. Unfortunately, existing practice in several - communities seems to point to the continued use of multiple - character sets in the near future. For this reason, we define - - - -Borenstein & Freed [Page 26] - -RFC 1521 MIME September 1993 - - - names for a small number of character sets for which a strong - constituent base exists. - - The defined charset values are: - - US-ASCII -- as defined in [US-ASCII]. - - ISO-8859-X -- where "X" is to be replaced, as necessary, for the - parts of ISO-8859 [ISO-8859]. Note that the ISO 646 - character sets have deliberately been omitted in favor of - their 8859 replacements, which are the designated character - sets for Internet mail. As of the publication of this - document, the legitimate values for "X" are the digits 1 - through 9. - - The character sets specified above are the ones that were relatively - uncontroversial during the drafting of MIME. This document does not - endorse the use of any particular character set other than US-ASCII, - and recognizes that the future evolution of world character sets - remains unclear. It is expected that in the future, additional - character sets will be registered for use in MIME. - - Note that the character set used, if anything other than US-ASCII, - must always be explicitly specified in the Content-Type field. - - No other character set name may be used in Internet mail without the - publication of a formal specification and its registration with IANA, - or by private agreement, in which case the character set name must - begin with "X-". - - Implementors are discouraged from defining new character sets for - mail use unless absolutely necessary. - - The "charset" parameter has been defined primarily for the purpose of - textual data, and is described in this section for that reason. - However, it is conceivable that non-textual data might also wish to - specify a charset value for some purpose, in which case the same - syntax and values should be used. - - In general, mail-sending software must always use the "lowest common - denominator" character set possible. For example, if a body contains - only US-ASCII characters, it must be marked as being in the US-ASCII - character set, not ISO-8859-1, which, like all the ISO-8859 family of - character sets, is a superset of US-ASCII. More generally, if a - widely-used character set is a subset of another character set, and a - body contains only characters in the widely-used subset, it must be - labeled as being in that subset. This will increase the chances that - the recipient will be able to view the mail correctly. - - - -Borenstein & Freed [Page 27] - -RFC 1521 MIME September 1993 - - -7.1.2. The Text/plain subtype - - The primary subtype of text is "plain". This indicates plain - (unformatted) text. The default Content-Type for Internet mail, - "text/plain; charset=us-ascii", describes existing Internet practice. - That is, it is the type of body defined by RFC 822. - - No other text subtype is defined by this document. - - The formal grammar for the content-type header field for text is as - follows: - - text-type := "text" "/" text-subtype [";" "charset" "=" charset] - - text-subtype := "plain" / extension-token - - charset := "us-ascii"/ "iso-8859-1"/ "iso-8859-2"/ "iso-8859-3" - / "iso-8859-4"/ "iso-8859-5"/ "iso-8859-6"/ "iso-8859-7" - / "iso-8859-8" / "iso-8859-9" / extension-token - ; case insensitive - -7.2. The Multipart Content-Type - - In the case of multiple part entities, in which one or more different - sets of data are combined in a single body, a "multipart" Content- - Type field must appear in the entity's header. The body must then - contain one or more "body parts," each preceded by an encapsulation - boundary, and the last one followed by a closing boundary. Each part - starts with an encapsulation boundary, and then contains a body part - consisting of header area, a blank line, and a body area. Thus a - body part is similar to an RFC 822 message in syntax, but different - in meaning. - - A body part is NOT to be interpreted as actually being an RFC 822 - message. To begin with, NO header fields are actually required in - body parts. A body part that starts with a blank line, therefore, is - allowed and is a body part for which all default values are to be - assumed. In such a case, the absence of a Content-Type header field - implies that the corresponding body is plain US-ASCII text. The only - header fields that have defined meaning for body parts are those the - names of which begin with "Content-". All other header fields are - generally to be ignored in body parts. Although they should - generally be retained in mail processing, they may be discarded by - gateways if necessary. Such other fields are permitted to appear in - body parts but must not be depended on. "X-" fields may be created - for experimental or private purposes, with the recognition that the - information they contain may be lost at some gateways. - - - - -Borenstein & Freed [Page 28] - -RFC 1521 MIME September 1993 - - - NOTE: The distinction between an RFC 822 message and a body part - is subtle, but important. A gateway between Internet and X.400 - mail, for example, must be able to tell the difference between a - body part that contains an image and a body part that contains an - encapsulated message, the body of which is an image. In order to - represent the latter, the body part must have "Content-Type: - message", and its body (after the blank line) must be the - encapsulated message, with its own "Content-Type: image" header - field. The use of similar syntax facilitates the conversion of - messages to body parts, and vice versa, but the distinction - between the two must be understood by implementors. (For the - special case in which all parts actually are messages, a "digest" - subtype is also defined.) - - As stated previously, each body part is preceded by an encapsulation - boundary. The encapsulation boundary MUST NOT appear inside any of - the encapsulated parts. Thus, it is crucial that the composing agent - be able to choose and specify the unique boundary that will separate - the parts. - - All present and future subtypes of the "multipart" type must use an - identical syntax. Subtypes may differ in their semantics, and may - impose additional restrictions on syntax, but must conform to the - required syntax for the multipart type. This requirement ensures - that all conformant user agents will at least be able to recognize - and separate the parts of any multipart entity, even of an - unrecognized subtype. - - As stated in the definition of the Content-Transfer-Encoding field, - no encoding other than "7bit", "8bit", or "binary" is permitted for - entities of type "multipart". The multipart delimiters and header - fields are always represented as 7-bit ASCII in any case (though the - header fields may encode non-ASCII header text as per [RFC-1522]), - and data within the body parts can be encoded on a part-by-part - basis, with Content-Transfer-Encoding fields for each appropriate - body part. - - Mail gateways, relays, and other mail handling agents are commonly - known to alter the top-level header of an RFC 822 message. In - particular, they frequently add, remove, or reorder header fields. - Such alterations are explicitly forbidden for the body part headers - embedded in the bodies of messages of type "multipart." - -7.2.1. Multipart: The common syntax - - All subtypes of "multipart" share a common syntax, defined in this - section. A simple example of a multipart message also appears in - this section. An example of a more complex multipart message is - - - -Borenstein & Freed [Page 29] - -RFC 1521 MIME September 1993 - - - given in Appendix C. - - The Content-Type field for multipart entities requires one parameter, - "boundary", which is used to specify the encapsulation boundary. The - encapsulation boundary is defined as a line consisting entirely of - two hyphen characters ("-", decimal code 45) followed by the boundary - parameter value from the Content-Type header field. - - NOTE: The hyphens are for rough compatibility with the earlier RFC - 934 method of message encapsulation, and for ease of searching for - the boundaries in some implementations. However, it should be - noted that multipart messages are NOT completely compatible with - RFC 934 encapsulations; in particular, they do not obey RFC 934 - quoting conventions for embedded lines that begin with hyphens. - This mechanism was chosen over the RFC 934 mechanism because the - latter causes lines to grow with each level of quoting. The - combination of this growth with the fact that SMTP implementations - sometimes wrap long lines made the RFC 934 mechanism unsuitable - for use in the event that deeply-nested multipart structuring is - ever desired. - - WARNING TO IMPLEMENTORS: The grammar for parameters on the Content- - type field is such that it is often necessary to enclose the - boundaries in quotes on the Content-type line. This is not always - necessary, but never hurts. Implementors should be sure to study the - grammar carefully in order to avoid producing illegal Content-type - fields. Thus, a typical multipart Content-Type header field might - look like this: - - Content-Type: multipart/mixed; - boundary=gc0p4Jq0M2Yt08jU534c0p - - But the following is illegal: - - Content-Type: multipart/mixed; - boundary=gc0p4Jq0M:2Yt08jU534c0p - - (because of the colon) and must instead be represented as - - Content-Type: multipart/mixed; - boundary="gc0p4Jq0M:2Yt08jU534c0p" - - This indicates that the entity consists of several parts, each itself - with a structure that is syntactically identical to an RFC 822 - message, except that the header area might be completely empty, and - that the parts are each preceded by the line - - --gc0p4Jq0M:2Yt08jU534c0p - - - -Borenstein & Freed [Page 30] - -RFC 1521 MIME September 1993 - - - Note that the encapsulation boundary must occur at the beginning of a - line, i.e., following a CRLF, and that the initial CRLF is considered - to be attached to the encapsulation boundary rather than part of the - preceding part. The boundary must be followed immediately either by - another CRLF and the header fields for the next part, or by two - CRLFs, in which case there are no header fields for the next part - (and it is therefore assumed to be of Content-Type text/plain). - - NOTE: The CRLF preceding the encapsulation line is conceptually - attached to the boundary so that it is possible to have a part - that does not end with a CRLF (line break). Body parts that must - be considered to end with line breaks, therefore, must have two - CRLFs preceding the encapsulation line, the first of which is part - of the preceding body part, and the second of which is part of the - encapsulation boundary. - - Encapsulation boundaries must not appear within the encapsulations, - and must be no longer than 70 characters, not counting the two - leading hyphens. - - The encapsulation boundary following the last body part is a - distinguished delimiter that indicates that no further body parts - will follow. Such a delimiter is identical to the previous - delimiters, with the addition of two more hyphens at the end of the - line: - - --gc0p4Jq0M2Yt08jU534c0p-- - - There appears to be room for additional information prior to the - first encapsulation boundary and following the final boundary. These - areas should generally be left blank, and implementations must ignore - anything that appears before the first boundary or after the last - one. - - NOTE: These "preamble" and "epilogue" areas are generally not used - because of the lack of proper typing of these parts and the lack - of clear semantics for handling these areas at gateways, - particularly X.400 gateways. However, rather than leaving the - preamble area blank, many MIME implementations have found this to - be a convenient place to insert an explanatory note for recipients - who read the message with pre-MIME software, since such notes will - be ignored by MIME-compliant software. - - NOTE: Because encapsulation boundaries must not appear in the body - parts being encapsulated, a user agent must exercise care to - choose a unique boundary. The boundary in the example above could - have been the result of an algorithm designed to produce - boundaries with a very low probability of already existing in the - - - -Borenstein & Freed [Page 31] - -RFC 1521 MIME September 1993 - - - data to be encapsulated without having to prescan the data. - Alternate algorithms might result in more 'readable' boundaries - for a recipient with an old user agent, but would require more - attention to the possibility that the boundary might appear in the - encapsulated part. The simplest boundary possible is something - like "---", with a closing boundary of "-----". - - As a very simple example, the following multipart message has two - parts, both of them plain text, one of them explicitly typed and one - of them implicitly typed: - - From: Nathaniel Borenstein - To: Ned Freed - Subject: Sample message - MIME-Version: 1.0 - Content-type: multipart/mixed; boundary="simple - boundary" - - This is the preamble. It is to be ignored, though it - is a handy place for mail composers to include an - explanatory note to non-MIME conformant readers. - --simple boundary - - This is implicitly typed plain ASCII text. - It does NOT end with a linebreak. - --simple boundary - Content-type: text/plain; charset=us-ascii - - This is explicitly typed plain ASCII text. - It DOES end with a linebreak. - - --simple boundary-- - This is the epilogue. It is also to be ignored. - - The use of a Content-Type of multipart in a body part within another - multipart entity is explicitly allowed. In such cases, for obvious - reasons, care must be taken to ensure that each nested multipart - entity must use a different boundary delimiter. See Appendix C for an - example of nested multipart entities. - - The use of the multipart Content-Type with only a single body part - may be useful in certain contexts, and is explicitly permitted. - - The only mandatory parameter for the multipart Content-Type is the - boundary parameter, which consists of 1 to 70 characters from a set - of characters known to be very robust through email gateways, and NOT - ending with white space. (If a boundary appears to end with white - space, the white space must be presumed to have been added by a - - - -Borenstein & Freed [Page 32] - -RFC 1521 MIME September 1993 - - - gateway, and must be deleted.) It is formally specified by the - following BNF: - - boundary := 0*69 bcharsnospace - - bchars := bcharsnospace / " " - - bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" / "+" /"_" - / "," / "-" / "." / "/" / ":" / "=" / "?" - - Overall, the body of a multipart entity may be specified as - follows: - - multipart-body := preamble 1*encapsulation - close-delimiter epilogue - - encapsulation := delimiter body-part CRLF - - delimiter := "--" boundary CRLF ; taken from Content-Type field. - ; There must be no space - ; between "--" and boundary. - - close-delimiter := "--" boundary "--" CRLF ; Again, no space - by "--", - - preamble := discard-text ; to be ignored upon receipt. - - epilogue := discard-text ; to be ignored upon receipt. - - discard-text := *(*text CRLF) - - body-part := <"message" as defined in RFC 822, - with all header fields optional, and with the - specified delimiter not occurring anywhere in - the message body, either on a line by itself - or as a substring anywhere. Note that the - semantics of a part differ from the semantics - of a message, as described in the text.> - - NOTE: In certain transport enclaves, RFC 822 restrictions such as - the one that limits bodies to printable ASCII characters may not - be in force. (That is, the transport domains may resemble - standard Internet mail transport as specified in RFC821 and - assumed by RFC822, but without certain restrictions.) The - relaxation of these restrictions should be construed as locally - extending the definition of bodies, for example to include octets - outside of the ASCII range, as long as these extensions are - supported by the transport and adequately documented in the - - - -Borenstein & Freed [Page 33] - -RFC 1521 MIME September 1993 - - - Content-Transfer-Encoding header field. However, in no event are - headers (either message headers or body-part headers) allowed to - contain anything other than ASCII characters. - - NOTE: Conspicuously missing from the multipart type is a notion of - structured, related body parts. In general, it seems premature to - try to standardize interpart structure yet. It is recommended - that those wishing to provide a more structured or integrated - multipart messaging facility should define a subtype of multipart - that is syntactically identical, but that always expects the - inclusion of a distinguished part that can be used to specify the - structure and integration of the other parts, probably referring - to them by their Content-ID field. If this approach is used, - other implementations will not recognize the new subtype, but will - treat it as the primary subtype (multipart/mixed) and will thus be - able to show the user the parts that are recognized. - -7.2.2. The Multipart/mixed (primary) subtype - - The primary subtype for multipart, "mixed", is intended for use when - the body parts are independent and need to be bundled in a particular - order. Any multipart subtypes that an implementation does not - recognize must be treated as being of subtype "mixed". - -7.2.3. The Multipart/alternative subtype - - The multipart/alternative type is syntactically identical to - multipart/mixed, but the semantics are different. In particular, - each of the parts is an "alternative" version of the same - information. - - Systems should recognize that the content of the various parts are - interchangeable. Systems should choose the "best" type based on the - local environment and preferences, in some cases even through user - interaction. As with multipart/mixed, the order of body parts is - significant. In this case, the alternatives appear in an order of - increasing faithfulness to the original content. In general, the best - choice is the LAST part of a type supported by the recipient system's - local environment. - - Multipart/alternative may be used, for example, to send mail in a - fancy text format in such a way that it can easily be displayed - anywhere: - - - - - - - - -Borenstein & Freed [Page 34] - -RFC 1521 MIME September 1993 - - - From: Nathaniel Borenstein - To: Ned Freed - Subject: Formatted text mail - MIME-Version: 1.0 - Content-Type: multipart/alternative; boundary=boundary42 - - --boundary42 - - Content-Type: text/plain; charset=us-ascii - - ...plain text version of message goes here.... - --boundary42 - Content-Type: text/richtext - - .... RFC 1341 richtext version of same message goes here ... - --boundary42 - Content-Type: text/x-whatever - - .... fanciest formatted version of same message goes here - ... - --boundary42-- - - In this example, users whose mail system understood the "text/x- - whatever" format would see only the fancy version, while other users - would see only the richtext or plain text version, depending on the - capabilities of their system. - - In general, user agents that compose multipart/alternative entities - must place the body parts in increasing order of preference, that is, - with the preferred format last. For fancy text, the sending user - agent should put the plainest format first and the richest format - last. Receiving user agents should pick and display the last format - they are capable of displaying. In the case where one of the - alternatives is itself of type "multipart" and contains unrecognized - sub-parts, the user agent may choose either to show that alternative, - an earlier alternative, or both. - - NOTE: From an implementor's perspective, it might seem more - sensible to reverse this ordering, and have the plainest - alternative last. However, placing the plainest alternative first - is the friendliest possible option when multipart/alternative - entities are viewed using a non-MIME-conformant mail reader. - While this approach does impose some burden on conformant mail - readers, interoperability with older mail readers was deemed to be - more important in this case. - - It may be the case that some user agents, if they can recognize more - than one of the formats, will prefer to offer the user the choice of - - - -Borenstein & Freed [Page 35] - -RFC 1521 MIME September 1993 - - - which format to view. This makes sense, for example, if mail - includes both a nicely-formatted image version and an easily-edited - text version. What is most critical, however, is that the user not - automatically be shown multiple versions of the same data. Either - the user should be shown the last recognized version or should be - given the choice. - - NOTE ON THE SEMANTICS OF CONTENT-ID IN MULTIPART/ALTERNATIVE: Each - part of a multipart/alternative entity represents the same data, but - the mappings between the two are not necessarily without information - loss. For example, information is lost when translating ODA to - PostScript or plain text. It is recommended that each part should - have a different Content-ID value in the case where the information - content of the two parts is not identical. However, where the - information content is identical -- for example, where several parts - of type "application/external- body" specify alternate ways to access - the identical data -- the same Content-ID field value should be used, - to optimize any cacheing mechanisms that might be present on the - recipient's end. However, it is recommended that the Content-ID - values used by the parts should not be the same Content-ID value that - describes the multipart/alternative as a whole, if there is any such - Content-ID field. That is, one Content-ID value will refer to the - multipart/alternative entity, while one or more other Content-ID - values will refer to the parts inside it. - -7.2.4. The Multipart/digest subtype - - This document defines a "digest" subtype of the multipart Content- - Type. This type is syntactically identical to multipart/mixed, but - the semantics are different. In particular, in a digest, the default - Content-Type value for a body part is changed from "text/plain" to - "message/rfc822". This is done to allow a more readable digest - format that is largely compatible (except for the quoting convention) - with RFC 934. - - - - - - - - - - - - - - - - - -Borenstein & Freed [Page 36] - -RFC 1521 MIME September 1993 - - - A digest in this format might, then, look something like this: - - From: Moderator-Address - To: Recipient-List - MIME-Version: 1.0 - Subject: Internet Digest, volume 42 - Content-Type: multipart/digest; - boundary="---- next message ----" - - ------ next message ---- - - From: someone-else - Subject: my opinion - - ...body goes here ... - - ------ next message ---- - - From: someone-else-again - Subject: my different opinion - - ... another body goes here... - - ------ next message ------ - -7.2.5. The Multipart/parallel subtype - - This document defines a "parallel" subtype of the multipart Content- - Type. This type is syntactically identical to multipart/mixed, but - the semantics are different. In particular, in a parallel entity, - the order of body parts is not significant. - - A common presentation of this type is to display all of the parts - simultaneously on hardware and software that are capable of doing so. - However, composing agents should be aware that many mail readers will - lack this capability and will show the parts serially in any event. - -7.2.6. Other Multipart subtypes - - Other multipart subtypes are expected in the future. MIME - implementations must in general treat unrecognized subtypes of - multipart as being equivalent to "multipart/mixed". - - The formal grammar for content-type header fields for multipart data - is given by: - - multipart-type := "multipart" "/" multipart-subtype - ";" "boundary" "=" boundary - - - -Borenstein & Freed [Page 37] - -RFC 1521 MIME September 1993 - - - multipart-subtype := "mixed" / "parallel" / "digest" - / "alternative" / extension-token - -7.3. The Message Content-Type - - It is frequently desirable, in sending mail, to encapsulate another - mail message. For this common operation, a special Content-Type, - "message", is defined. The primary subtype, message/rfc822, has no - required parameters in the Content-Type field. Additional subtypes, - "partial" and "External-body", do have required parameters. These - subtypes are explained below. - - NOTE: It has been suggested that subtypes of message might be - defined for forwarded or rejected messages. However, forwarded - and rejected messages can be handled as multipart messages in - which the first part contains any control or descriptive - information, and a second part, of type message/rfc822, is the - forwarded or rejected message. Composing rejection and forwarding - messages in this manner will preserve the type information on the - original message and allow it to be correctly presented to the - recipient, and hence is strongly encouraged. - - As stated in the definition of the Content-Transfer-Encoding field, - no encoding other than "7bit", "8bit", or "binary" is permitted for - messages or parts of type "message". Even stronger restrictions - apply to the subtypes "message/partial" and "message/external-body", - as specified below. The message header fields are always US-ASCII in - any case, and data within the body can still be encoded, in which - case the Content-Transfer-Encoding header field in the encapsulated - message will reflect this. Non-ASCII text in the headers of an - encapsulated message can be specified using the mechanisms described - in [RFC-1522]. - - Mail gateways, relays, and other mail handling agents are commonly - known to alter the top-level header of an RFC 822 message. In - particular, they frequently add, remove, or reorder header fields. - Such alterations are explicitly forbidden for the encapsulated - headers embedded in the bodies of messages of type "message." - -7.3.1. The Message/rfc822 (primary) subtype - - A Content-Type of "message/rfc822" indicates that the body contains - an encapsulated message, with the syntax of an RFC 822 message. - However, unlike top-level RFC 822 messages, it is not required that - each message/rfc822 body must include a "From", "Subject", and at - least one destination header. - - It should be noted that, despite the use of the numbers "822", a - - - -Borenstein & Freed [Page 38] - -RFC 1521 MIME September 1993 - - - message/rfc822 entity can include enhanced information as defined in - this document. In other words, a message/rfc822 message may be a - MIME message. - -7.3.2. The Message/Partial subtype - - A subtype of message, "partial", is defined in order to allow large - objects to be delivered as several separate pieces of mail and - automatically reassembled by the receiving user agent. (The concept - is similar to IP fragmentation/reassembly in the basic Internet - Protocols.) This mechanism can be used when intermediate transport - agents limit the size of individual messages that can be sent. - Content-Type "message/partial" thus indicates that the body contains - a fragment of a larger message. - - Three parameters must be specified in the Content-Type field of type - message/partial: The first, "id", is a unique identifier, as close to - a world-unique identifier as possible, to be used to match the parts - together. (In general, the identifier is essentially a message-id; - if placed in double quotes, it can be any message-id, in accordance - with the BNF for "parameter" given earlier in this specification.) - The second, "number", an integer, is the part number, which indicates - where this part fits into the sequence of fragments. The third, - "total", another integer, is the total number of parts. This third - subfield is required on the final part, and is optional (though - encouraged) on the earlier parts. Note also that these parameters - may be given in any order. - - Thus, part 2 of a 3-part message may have either of the following - header fields: - - Content-Type: Message/Partial; - number=2; total=3; - id="oc=jpbe0M2Yt4s@thumper.bellcore.com" - - Content-Type: Message/Partial; - id="oc=jpbe0M2Yt4s@thumper.bellcore.com"; - number=2 - - But part 3 MUST specify the total number of parts: - - Content-Type: Message/Partial; - number=3; total=3; - id="oc=jpbe0M2Yt4s@thumper.bellcore.com" - - Note that part numbering begins with 1, not 0. - - When the parts of a message broken up in this manner are put - - - -Borenstein & Freed [Page 39] - -RFC 1521 MIME September 1993 - - - together, the result is a complete MIME entity, which may have its - own Content-Type header field, and thus may contain any other data - type. - - Message fragmentation and reassembly: The semantics of a reassembled - partial message must be those of the "inner" message, rather than of - a message containing the inner message. This makes it possible, for - example, to send a large audio message as several partial messages, - and still have it appear to the recipient as a simple audio message - rather than as an encapsulated message containing an audio message. - That is, the encapsulation of the message is considered to be - "transparent". - - When generating and reassembling the parts of a message/partial - message, the headers of the encapsulated message must be merged with - the headers of the enclosing entities. In this process the following - rules must be observed: - - (1) All of the header fields from the initial enclosing entity - (part one), except those that start with "Content-" and the - specific header fields "Message-ID", "Encrypted", and "MIME- - Version", must be copied, in order, to the new message. - - (2) Only those header fields in the enclosed message which start - with "Content-" and "Message-ID", "Encrypted", and "MIME-Version" - must be appended, in order, to the header fields of the new - message. Any header fields in the enclosed message which do not - start with "Content-" (except for "Message-ID", "Encrypted", and - "MIME-Version") will be ignored. - - (3) All of the header fields from the second and any subsequent - messages will be ignored. - - For example, if an audio message is broken into two parts, the first - part might look something like this: - - X-Weird-Header-1: Foo - From: Bill@host.com - To: joe@otherhost.com - Subject: Audio mail - Message-ID: - MIME-Version: 1.0 - Content-type: message/partial; - id="ABC@host.com"; - number=1; total=2 - - X-Weird-Header-1: Bar - X-Weird-Header-2: Hello - - - -Borenstein & Freed [Page 40] - -RFC 1521 MIME September 1993 - - - Message-ID: - MIME-Version: 1.0 - Content-type: audio/basic - Content-transfer-encoding: base64 - - ... first half of encoded audio data goes here... - - and the second half might look something like this: - - From: Bill@host.com - To: joe@otherhost.com - Subject: Audio mail - MIME-Version: 1.0 - Message-ID: - Content-type: message/partial; - id="ABC@host.com"; number=2; total=2 - - ... second half of encoded audio data goes here... - - Then, when the fragmented message is reassembled, the resulting - message to be displayed to the user should look something like this: - - X-Weird-Header-1: Foo - From: Bill@host.com - To: joe@otherhost.com - Subject: Audio mail - Message-ID: - MIME-Version: 1.0 - Content-type: audio/basic - Content-transfer-encoding: base64 - - ... first half of encoded audio data goes here... - ... second half of encoded audio data goes here... - - Note on encoding of MIME entities encapsulated inside message/partial - entities: Because data of type "message" may never be encoded in - base64 or quoted-printable, a problem might arise if message/partial - entities are constructed in an environment that supports binary or - 8-bit transport. The problem is that the binary data would be split - into multiple message/partial objects, each of them requiring binary - transport. If such objects were encountered at a gateway into a 7- - bit transport environment, there would be no way to properly encode - them for the 7-bit world, aside from waiting for all of the parts, - reassembling the message, and then encoding the reassembled data in - base64 or quoted-printable. Since it is possible that different - parts might go through different gateways, even this is not an - acceptable solution. For this reason, it is specified that MIME - entities of type message/partial must always have a content- - - - -Borenstein & Freed [Page 41] - -RFC 1521 MIME September 1993 - - - transfer-encoding of 7-bit (the default). In particular, even in - environments that support binary or 8-bit transport, the use of a - content-transfer-encoding of "8bit" or "binary" is explicitly - prohibited for entities of type message/partial. - - It should be noted that, because some message transfer agents may - choose to automatically fragment large messages, and because such - agents may use different fragmentation thresholds, it is possible - that the pieces of a partial message, upon reassembly, may prove - themselves to comprise a partial message. This is explicitly - permitted. - - It should also be noted that the inclusion of a "References" field in - the headers of the second and subsequent pieces of a fragmented - message that references the Message-Id on the previous piece may be - of benefit to mail readers that understand and track references. - However, the generation of such "References" fields is entirely - optional. - - Finally, it should be noted that the "Encrypted" header field has - been made obsolete by Privacy Enhanced Messaging (PEM), but the rules - above are believed to describe the correct way to treat it if it is - encountered in the context of conversion to and from message/partial - fragments. - -7.3.3. The Message/External-Body subtype - - The external-body subtype indicates that the actual body data are not - included, but merely referenced. In this case, the parameters - describe a mechanism for accessing the external data. - - When an entity is of type "message/external-body", it consists of a - header, two consecutive CRLFs, and the message header for the - encapsulated message. If another pair of consecutive CRLFs appears, - this of course ends the message header for the encapsulated message. - However, since the encapsulated message's body is itself external, it - does NOT appear in the area that follows. For example, consider the - following message: - - Content-type: message/external-body; access- - type=local-file; - - name="/u/nsb/Me.gif" - - Content-type: image/gif - Content-ID: - Content-Transfer-Encoding: binary - - - - -Borenstein & Freed [Page 42] - -RFC 1521 MIME September 1993 - - - THIS IS NOT REALLY THE BODY! - - The area at the end, which might be called the "phantom body", is - ignored for most external-body messages. However, it may be used to - contain auxiliary information for some such messages, as indeed it is - when the access-type is "mail-server". Of the access-types defined - by this document, the phantom body is used only when the access-type - is "mail-server". In all other cases, the phantom body is ignored. - - The only always-mandatory parameter for message/external-body is - "access-type"; all of the other parameters may be mandatory or - optional depending on the value of access-type. - - ACCESS-TYPE -- A case-insensitive word, indicating the supported - access mechanism by which the file or data may be obtained. - Values include, but are not limited to, "FTP", "ANON-FTP", "TFTP", - "AFS", "LOCAL-FILE", and "MAIL-SERVER". Future values, except for - experimental values beginning with "X-" must be registered with - IANA, as described in Appendix E . - - In addition, the following three parameters are optional for ALL - access-types: - - EXPIRATION -- The date (in the RFC 822 "date-time" syntax, as - extended by RFC 1123 to permit 4 digits in the year field) after - which the existence of the external data is not guaranteed. - - SIZE -- The size (in octets) of the data. The intent of this - parameter is to help the recipient decide whether or not to expend - the necessary resources to retrieve the external data. Note that - this describes the size of the data in its canonical form, that - is, before any Content- Transfer-Encoding has been applied or - after the data have been decoded. - - PERMISSION -- A case-insensitive field that indicates whether or - not it is expected that clients might also attempt to overwrite - the data. By default, or if permission is "read", the assumption - is that they are not, and that if the data is retrieved once, it - is never needed again. If PERMISSION is "read-write", this - assumption is invalid, and any local copy must be considered no - more than a cache. "Read" and "Read-write" are the only defined - values of permission. - - The precise semantics of the access-types defined here are described - in the sections that follow. - - The encapsulated headers in ALL message/external-body entities MUST - include a Content-ID header field to give a unique identifier by - - - -Borenstein & Freed [Page 43] - -RFC 1521 MIME September 1993 - - - which to reference the data. This identifier may be used for - cacheing mechanisms, and for recognizing the receipt of the data when - the access-type is "mail-server". - - Note that, as specified here, the tokens that describe external-body - data, such as file names and mail server commands, are required to be - in the US-ASCII character set. If this proves problematic in - practice, a new mechanism may be required as a future extension to - MIME, either as newly defined access-types for message/external-body - or by some other mechanism. - - As with message/partial, it is specified that MIME entities of type - message/external-body must always have a content-transfer-encoding of - 7-bit (the default). In particular, even in environments that - support binary or 8-bit transport, the use of a content-transfer- - encoding of "8bit" or "binary" is explicitly prohibited for entities - of type message/external-body. - -7.3.3.1. The "ftp" and "tftp" access-types - - An access-type of FTP or TFTP indicates that the message body is - accessible as a file using the FTP [RFC-959] or TFTP [RFC-783] - protocols, respectively. For these access-types, the following - additional parameters are mandatory: - - NAME -- The name of the file that contains the actual body data. - - SITE -- A machine from which the file may be obtained, using the - given protocol. This must be a fully qualified domain name, not a - nickname. - - Before any data are retrieved, using FTP, the user will generally - need to be asked to provide a login id and a password for the machine - named by the site parameter. For security reasons, such an id and - password are not specified as content-type parameters, but must be - obtained from the user. - - In addition, the following parameters are optional: - - DIRECTORY -- A directory from which the data named by NAME should - be retrieved. - - MODE -- A case-insensitive string indicating the mode to be used - when retrieving the information. The legal values for access-type - "TFTP" are "NETASCII", "OCTET", and "MAIL", as specified by the - TFTP protocol [RFC-783]. The legal values for access-type "FTP" - are "ASCII", "EBCDIC", "IMAGE", and "LOCALn" where "n" is a - decimal integer, typically 8. These correspond to the - - - -Borenstein & Freed [Page 44] - -RFC 1521 MIME September 1993 - - - representation types "A" "E" "I" and "L n" as specified by the FTP - protocol [RFC-959]. Note that "BINARY" and "TENEX" are not valid - values for MODE, but that "OCTET" or "IMAGE" or "LOCAL8" should be - used instead. IF MODE is not specified, the default value is - "NETASCII" for TFTP and "ASCII" otherwise. - -7.3.3.2. The "anon-ftp" access-type - - The "anon-ftp" access-type is identical to the "ftp" access type, - except that the user need not be asked to provide a name and password - for the specified site. Instead, the ftp protocol will be used with - login "anonymous" and a password that corresponds to the user's email - address. - -7.3.3.3. The "local-file" and "afs" access-types - - An access-type of "local-file" indicates that the actual body is - accessible as a file on the local machine. An access-type of "afs" - indicates that the file is accessible via the global AFS file system. - In both cases, only a single parameter is required: - - NAME -- The name of the file that contains the actual body data. - - The following optional parameter may be used to describe the locality - of reference for the data, that is, the site or sites at which the - file is expected to be visible: - - SITE -- A domain specifier for a machine or set of machines that - are known to have access to the data file. Asterisks may be used - for wildcard matching to a part of a domain name, such as - "*.bellcore.com", to indicate a set of machines on which the data - should be directly visible, while a single asterisk may be used to - indicate a file that is expected to be universally available, - e.g., via a global file system. - -7.3.3.4. The "mail-server" access-type - - The "mail-server" access-type indicates that the actual body is - available from a mail server. The mandatory parameter for this - access-type is: - - SERVER -- The email address of the mail server from which the - actual body data can be obtained. - - Because mail servers accept a variety of syntaxes, some of which is - multiline, the full command to be sent to a mail server is not - included as a parameter on the content-type line. Instead, it is - provided as the "phantom body" when the content-type is - - - -Borenstein & Freed [Page 45] - -RFC 1521 MIME September 1993 - - - message/external-body and the access- type is mail-server. - - An optional parameter for this access-type is: - - SUBJECT -- The subject that is to be used in the mail that is sent - to obtain the data. Note that keying mail servers on Subject lines - is NOT recommended, but such mail servers are known to exist. - - Note that MIME does not define a mail server syntax. Rather, it - allows the inclusion of arbitrary mail server commands in the phantom - body. Implementations must include the phantom body in the body of - the message it sends to the mail server address to retrieve the - relevant data. - - It is worth noting that, unlike other access-types, mail-server - access is asynchronous and will happen at an unpredictable time in - the future. For this reason, it is important that there be a - mechanism by which the returned data can be matched up with the - original message/external-body entity. MIME mailservers must use the - same Content-ID field on the returned message that was used in the - original message/external-body entity, to facilitate such matching. - -7.3.3.5. Examples and Further Explanations - - With the emerging possibility of very wide-area file systems, it - becomes very hard to know in advance the set of machines where a file - will and will not be accessible directly from the file system. - Therefore it may make sense to provide both a file name, to be tried - directly, and the name of one or more sites from which the file is - known to be accessible. An implementation can try to retrieve remote - files using FTP or any other protocol, using anonymous file retrieval - or prompting the user for the necessary name and password. If an - external body is accessible via multiple mechanisms, the sender may - include multiple parts of type message/external-body within an entity - of type multipart/alternative. - - However, the external-body mechanism is not intended to be limited to - file retrieval, as shown by the mail-server access-type. Beyond - this, one can imagine, for example, using a video server for external - references to video clips. - - If an entity is of type "message/external-body", then the body of the - entity will contain the header fields of the encapsulated message. - The body itself is to be found in the external location. This means - that if the body of the "message/external-body" message contains two - consecutive CRLFs, everything after those pairs is NOT part of the - message itself. For most message/external-body messages, this - trailing area must simply be ignored. However, it is a convenient - - - -Borenstein & Freed [Page 46] - -RFC 1521 MIME September 1993 - - - place for additional data that cannot be included in the content-type - header field. In particular, if the "access-type" value is "mail- - server", then the trailing area must contain commands to be sent to - the mail server at the address given by the value of the SERVER - parameter. - - The embedded message header fields which appear in the body of the - message/external-body data must be used to declare the Content-type - of the external body if it is anything other than plain ASCII text, - since the external body does not have a header section to declare its - type. Similarly, any Content-transfer-encoding other than "7bit" - must also be declared here. Thus a complete message/external-body - message, referring to a document in PostScript format, might look - like this: - - From: Whomever - To: Someone - Subject: whatever - MIME-Version: 1.0 - Message-ID: - Content-Type: multipart/alternative; boundary=42 - Content-ID: - - --42 - Content-Type: message/external-body; - name="BodyFormats.ps"; - site="thumper.bellcore.com"; - access-type=ANON-FTP; - directory="pub"; - mode="image"; - expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" - - Content-type: application/postscript - Content-ID: - - --42 - Content-Type: message/external-body; - name="/u/nsb/writing/rfcs/RFC-MIME.ps"; - site="thumper.bellcore.com"; - access-type=AFS - expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" - - Content-type: application/postscript - Content-ID: - - --42 - Content-Type: message/external-body; - access-type=mail-server - - - -Borenstein & Freed [Page 47] - -RFC 1521 MIME September 1993 - - - server="listserv@bogus.bitnet"; - expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" - - Content-type: application/postscript - Content-ID: - - get RFC-MIME.DOC - - --42-- - - Note that in the above examples, the default Content-transfer- - encoding of "7bit" is assumed for the external postscript data. - - Like the message/partial type, the message/external-body type is - intended to be transparent, that is, to convey the data type in the - external body rather than to convey a message with a body of that - type. Thus the headers on the outer and inner parts must be merged - using the same rules as for message/partial. In particular, this - means that the Content-type header is overridden, but the From and - Subject headers are preserved. - - Note that since the external bodies are not transported as mail, they - need not conform to the 7-bit and line length requirements, but might - in fact be binary files. Thus a Content-Transfer-Encoding is not - generally necessary, though it is permitted. - - Note that the body of a message of type "message/external-body" is - governed by the basic syntax for an RFC 822 message. In particular, - anything before the first consecutive pair of CRLFs is header - information, while anything after it is body information, which is - ignored for most access-types. - - The formal grammar for content-type header fields for data of type - message is given by: - - message-type := "message" "/" message-subtype - - message-subtype := "rfc822" - / "partial" 2#3partial-param - / "external-body" 1*external-param - / extension-token - - partial-param := (";" "id" "=" value) - / (";" "number" "=" 1*DIGIT) - / (";" "total" "=" 1*DIGIT) - ; id & number required; total required for last part - - external-param := (";" "access-type" "=" atype) - - - -Borenstein & Freed [Page 48] - -RFC 1521 MIME September 1993 - - - / (";" "expiration" "=" date-time) - ; Note that date-time is quoted - / (";" "size" "=" 1*DIGIT) - / (";" "permission" "=" ("read" / "read-write")) - ; Permission is case-insensitive - / (";" "name" "=" value) - / (";" "site" "=" value) - / (";" "dir" "=" value) - / (";" "mode" "=" value) - / (";" "server" "=" value) - / (";" "subject" "=" value) - ; access-type required;others required based on access-type - - atype := "ftp" / "anon-ftp" / "tftp" / "local-file" - / "afs" / "mail-server" / extension-token - ; Case-insensitive - -7.4. The Application Content-Type - - The "application" Content-Type is to be used for data which do not - fit in any of the other categories, and particularly for data to be - processed by mail-based uses of application programs. This is - information which must be processed by an application before it is - viewable or usable to a user. Expected uses for Content-Type - application include mail-based file transfer, spreadsheets, data for - mail-based scheduling systems, and languages for "active" - (computational) email. (The latter, in particular, can pose security - problems which must be understood by implementors, and are considered - in detail in the discussion of the application/PostScript content- - type.) - - For example, a meeting scheduler might define a standard - representation for information about proposed meeting dates. An - intelligent user agent would use this information to conduct a dialog - with the user, and might then send further mail based on that dialog. - More generally, there have been several "active" messaging languages - developed in which programs in a suitably specialized language are - sent through the mail and automatically run in the recipient's - environment. - - Such applications may be defined as subtypes of the "application" - Content-Type. This document defines two subtypes: octet-stream, and - PostScript. - - In general, the subtype of application will often be the name of the - application for which the data are intended. This does not mean, - however, that any application program name may be used freely as a - subtype of application. Such usages (other than subtypes beginning - - - -Borenstein & Freed [Page 49] - -RFC 1521 MIME September 1993 - - - with "x-") must be registered with IANA, as described in Appendix E. - -7.4.1. The Application/Octet-Stream (primary) subtype - - The primary subtype of application, "octet-stream", may be used to - indicate that a body contains binary data. The set of possible - parameters includes, but is not limited to: - - TYPE -- the general type or category of binary data. This is - intended as information for the human recipient rather than for - any automatic processing. - - PADDING -- the number of bits of padding that were appended to the - bit-stream comprising the actual contents to produce the enclosed - byte-oriented data. This is useful for enclosing a bit-stream in - a body when the total number of bits is not a multiple of the byte - size. - - An additional parameter, "conversions", was defined in [RFC-1341] but - has been removed. - - RFC 1341 also defined the use of a "NAME" parameter which gave a - suggested file name to be used if the data were to be written to a - file. This has been deprecated in anticipation of a separate - Content-Disposition header field, to be defined in a subsequent RFC. - - The recommended action for an implementation that receives - application/octet-stream mail is to simply offer to put the data in a - file, with any Content-Transfer-Encoding undone, or perhaps to use it - as input to a user-specified process. - - To reduce the danger of transmitting rogue programs through the mail, - it is strongly recommended that implementations NOT implement a - path-search mechanism whereby an arbitrary program named in the - Content-Type parameter (e.g., an "interpreter=" parameter) is found - and executed using the mail body as input. - -7.4.2. The Application/PostScript subtype - - A Content-Type of "application/postscript" indicates a PostScript - program. Currently two variants of the PostScript language are - allowed; the original level 1 variant is described in [POSTSCRIPT] - and the more recent level 2 variant is described in [POSTSCRIPT2]. - - PostScript is a registered trademark of Adobe Systems, Inc. Use of - the MIME content-type "application/postscript" implies recognition of - that trademark and all the rights it entails. - - - - -Borenstein & Freed [Page 50] - -RFC 1521 MIME September 1993 - - - The PostScript language definition provides facilities for internal - labeling of the specific language features a given program uses. This - labeling, called the PostScript document structuring conventions, is - very general and provides substantially more information than just - the language level. - - The use of document structuring conventions, while not required, is - strongly recommended as an aid to interoperability. Documents which - lack proper structuring conventions cannot be tested to see whether - or not they will work in a given environment. As such, some systems - may assume the worst and refuse to process unstructured documents. - - The execution of general-purpose PostScript interpreters entails - serious security risks, and implementors are discouraged from simply - sending PostScript email bodies to "off-the-shelf" interpreters. - While it is usually safe to send PostScript to a printer, where the - potential for harm is greatly constrained, implementors should - consider all of the following before they add interactive display of - PostScript bodies to their mail readers. - - The remainder of this section outlines some, though probably not all, - of the possible problems with sending PostScript through the mail. - - Dangerous operations in the PostScript language include, but may not - be limited to, the PostScript operators deletefile, renamefile, - filenameforall, and file. File is only dangerous when applied to - something other than standard input or output. Implementations may - also define additional nonstandard file operators; these may also - pose a threat to security. Filenameforall, the wildcard file search - operator, may appear at first glance to be harmless. Note, however, - that this operator has the potential to reveal information about what - files the recipient has access to, and this information may itself be - sensitive. Message senders should avoid the use of potentially - dangerous file operators, since these operators are quite likely to - be unavailable in secure PostScript implementations. Message- - receiving and -displaying software should either completely disable - all potentially dangerous file operators or take special care not to - delegate any special authority to their operation. These operators - should be viewed as being done by an outside agency when interpreting - PostScript documents. Such disabling and/or checking should be done - completely outside of the reach of the PostScript language itself; - care should be taken to insure that no method exists for re-enabling - full-function versions of these operators. - - The PostScript language provides facilities for exiting the normal - interpreter, or server, loop. Changes made in this "outer" - environment are customarily retained across documents, and may in - some cases be retained semipermanently in nonvolatile memory. The - - - -Borenstein & Freed [Page 51] - -RFC 1521 MIME September 1993 - - - operators associated with exiting the interpreter loop have the - potential to interfere with subsequent document processing. As such, - their unrestrained use constitutes a threat of service denial. - PostScript operators that exit the interpreter loop include, but may - not be limited to, the exitserver and startjob operators. Message- - sending software should not generate PostScript that depends on - exiting the interpreter loop to operate. The ability to exit will - probably be unavailable in secure PostScript implementations. - Message-receiving and -displaying software should, if possible, - disable the ability to make retained changes to the PostScript - environment, and eliminate the startjob and exitserver commands. If - these commands cannot be eliminated, the password associated with - them should at least be set to a hard-to-guess value. - - PostScript provides operators for setting system-wide and device- - specific parameters. These parameter settings may be retained across - jobs and may potentially pose a threat to the correct operation of - the interpreter. The PostScript operators that set system and device - parameters include, but may not be limited to, the setsystemparams - and setdevparams operators. Message-sending software should not - generate PostScript that depends on the setting of system or device - parameters to operate correctly. The ability to set these parameters - will probably be unavailable in secure PostScript implementations. - Message-receiving and -displaying software should, if possible, - disable the ability to change system and device parameters. If these - operators cannot be disabled, the password associated with them - should at least be set to a hard-to-guess value. - - Some PostScript implementations provide nonstandard facilities for - the direct loading and execution of machine code. Such facilities - are quite obviously open to substantial abuse. Message-sending - software should not make use of such features. Besides being totally - hardware- specific, they are also likely to be unavailable in secure - implementations of PostScript. Message-receiving and -displaying - software should not allow such operators to be used if they exist. - - PostScript is an extensible language, and many, if not most, - implementations of it provide a number of their own extensions. This - document does not deal with such extensions explicitly since they - constitute an unknown factor. Message-sending software should not - make use of nonstandard extensions; they are likely to be missing - from some implementations. Message-receiving and -displaying software - should make sure that any nonstandard PostScript operators are secure - and don't present any kind of threat. - - It is possible to write PostScript that consumes huge amounts of - various system resources. It is also possible to write PostScript - programs that loop infinitely. Both types of programs have the - - - -Borenstein & Freed [Page 52] - -RFC 1521 MIME September 1993 - - - potential to cause damage if sent to unsuspecting recipients. - Message-sending software should avoid the construction and - dissemination of such programs, which is antisocial. Message- - receiving and -displaying software should provide appropriate - mechanisms to abort processing of a document after a reasonable - amount of time has elapsed. In addition, PostScript interpreters - should be limited to the consumption of only a reasonable amount of - any given system resource. - - Finally, bugs may exist in some PostScript interpreters which could - possibly be exploited to gain unauthorized access to a recipient's - system. Apart from noting this possibility, there is no specific - action to take to prevent this, apart from the timely correction of - such bugs if any are found. - -7.4.3. Other Application subtypes - - It is expected that many other subtypes of application will be - defined in the future. MIME implementations must generally treat any - unrecognized subtypes as being equivalent to application/octet- - stream. - - The formal grammar for content-type header fields for application - data is given by: - - application-type := "application" "/" application-subtype - - application-subtype := ("octet-stream" *stream-param) - / "postscript" / extension-token - - stream-param := (";" "type" "=" value) - / (";" "padding" "=" padding) - - padding := "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" - -7.5. The Image Content-Type - - A Content-Type of "image" indicates that the body contains an image. - The subtype names the specific image format. These names are case - insensitive. Two initial subtypes are "jpeg" for the JPEG format, - JFIF encoding, and "gif" for GIF format [GIF]. - - The list of image subtypes given here is neither exclusive nor - exhaustive, and is expected to grow as more types are registered with - IANA, as described in Appendix E. - - The formal grammar for the content-type header field for data of type - image is given by: - - - -Borenstein & Freed [Page 53] - -RFC 1521 MIME September 1993 - - - image-type := "image" "/" ("gif" / "jpeg" / extension-token) - -7.6. The Audio Content-Type - - A Content-Type of "audio" indicates that the body contains audio - data. Although there is not yet a consensus on an "ideal" audio - format for use with computers, there is a pressing need for a format - capable of providing interoperable behavior. - - The initial subtype of "basic" is specified to meet this requirement - by providing an absolutely minimal lowest common denominator audio - format. It is expected that richer formats for higher quality and/or - lower bandwidth audio will be defined by a later document. - - The content of the "audio/basic" subtype is audio encoded using 8-bit - ISDN mu-law [PCM]. When this subtype is present, a sample rate of - 8000 Hz and a single channel is assumed. - - The formal grammar for the content-type header field for data of type - audio is given by: - - audio-type := "audio" "/" ("basic" / extension-token) - -7.7. The Video Content-Type - - A Content-Type of "video" indicates that the body contains a time- - varying-picture image, possibly with color and coordinated sound. - The term "video" is used extremely generically, rather than with - reference to any particular technology or format, and is not meant to - preclude subtypes such as animated drawings encoded compactly. The - subtype "mpeg" refers to video coded according to the MPEG standard - [MPEG]. - - Note that although in general this document strongly discourages the - mixing of multiple media in a single body, it is recognized that many - so-called "video" formats include a representation for synchronized - audio, and this is explicitly permitted for subtypes of "video". - - The formal grammar for the content-type header field for data of type - video is given by: - - video-type := "video" "/" ("mpeg" / extension-token) - -7.8. Experimental Content-Type Values - - A Content-Type value beginning with the characters "X-" is a private - value, to be used by consenting mail systems by mutual agreement. - Any format without a rigorous and public definition must be named - - - -Borenstein & Freed [Page 54] - -RFC 1521 MIME September 1993 - - - with an "X-" prefix, and publicly specified values shall never begin - with "X-". (Older versions of the widely-used Andrew system use the - "X-BE2" name, so new systems should probably choose a different - name.) - - In general, the use of "X-" top-level types is strongly discouraged. - Implementors should invent subtypes of the existing types whenever - possible. The invention of new types is intended to be restricted - primarily to the development of new media types for email, such as - digital odors or holography, and not for new data formats in general. - In many cases, a subtype of application will be more appropriate than - a new top-level type. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Borenstein & Freed [Page 55] - -RFC 1521 MIME September 1993 - - -8. Summary - - Using the MIME-Version, Content-Type, and Content-Transfer-Encoding - header fields, it is possible to include, in a standardized way, - arbitrary types of data objects with RFC 822 conformant mail - messages. No restrictions imposed by either RFC 821 or RFC 822 are - violated, and care has been taken to avoid problems caused by - additional restrictions imposed by the characteristics of some - Internet mail transport mechanisms (see Appendix B). The "multipart" - and "message" Content-Types allow mixing and hierarchical structuring - of objects of different types in a single message. Further Content- - Types provide a standardized mechanism for tagging messages or body - parts as audio, image, or several other kinds of data. A - distinguished parameter syntax allows further specification of data - format details, particularly the specification of alternate character - sets. Additional optional header fields provide mechanisms for - certain extensions deemed desirable by many implementors. Finally, a - number of useful Content-Types are defined for general use by - consenting user agents, notably message/partial, and - message/external-body. - -9. Security Considerations - - Security issues are discussed in Section 7.4.2 and in Appendix F. - Implementors should pay special attention to the security - implications of any mail content-types that can cause the remote - execution of any actions in the recipient's environment. In such - cases, the discussion of the application/postscript content-type in - Section 7.4.2 may serve as a model for considering other content- - types with remote execution capabilities. - - - - - - - - - - - - - - - - - - - - - -Borenstein & Freed [Page 56] - -RFC 1521 MIME September 1993 - - -10. Authors' Addresses - - For more information, the authors of this document may be contacted - via Internet mail: - - Nathaniel S. Borenstein - MRE 2D-296, Bellcore - 445 South St. - Morristown, NJ 07962-1910 - - Phone: +1 201 829 4270 - Fax: +1 201 829 7019 - Email: nsb@bellcore.com - - - Ned Freed - Innosoft International, Inc. - 250 West First Street - Suite 240 - Claremont, CA 91711 - - Phone: +1 909 624 7907 - Fax: +1 909 621 5319 - Email: ned@innosoft.com - - MIME is a result of the work of the Internet Engineering Task Force - Working Group on Email Extensions. The chairman of that group, Greg - Vaudreuil, may be reached at: - - Gregory M. Vaudreuil - Tigon Corporation - 17060 Dallas Parkway - Dallas Texas, 75248 - - Phone: +1 214-733-2722 - EMail: gvaudre@cnri.reston.va.us - - - - - - - - - - - - - - - -Borenstein & Freed [Page 57] - -RFC 1521 MIME September 1993 - - -11. Acknowledgements - - This document is the result of the collective effort of a large - number of people, at several IETF meetings, on the IETF-SMTP and - IETF-822 mailing lists, and elsewhere. Although any enumeration - seems doomed to suffer from egregious omissions, the following are - among the many contributors to this effort: - - Harald Tveit Alvestrand Timo Lehtinen - Randall Atkinson John R. MacMillan - Philippe Brandon Rick McGowan - Kevin Carosso Leo Mclaughlin - Uhhyung Choi Goli Montaser-Kohsari - Cristian Constantinof Keith Moore - Mark Crispin Tom Moore - Dave Crocker Erik Naggum - Terry Crowley Mark Needleman - Walt Daniels John Noerenberg - Frank Dawson Mats Ohrman - Hitoshi Doi Julian Onions - Kevin Donnelly Michael Patton - Keith Edwards David J. Pepper - Chris Eich Blake C. Ramsdell - Johnny Eriksson Luc Rooijakkers - Craig Everhart Marshall T. Rose - Patrik Faeltstroem Jonathan Rosenberg - Erik E. Fair Jan Rynning - Roger Fajman Harri Salminen - Alain Fontaine Michael Sanderson - James M. Galvin Masahiro Sekiguchi - Philip Gladstone Mark Sherman - Thomas Gordon Keld Simonsen - Phill Gross Bob Smart - James Hamilton Peter Speck - Steve Hardcastle-Kille Henry Spencer - David Herron Einar Stefferud - Bruce Howard Michael Stein - Bill Janssen Klaus Steinberger - Olle Jaernefors Peter Svanberg - Risto Kankkunen James Thompson - Phil Karn Steve Uhler - Alan Katz Stuart Vance - Tim Kehres Erik van der Poel - Neil Katin Guido van Rossum - Kyuho Kim Peter Vanderbilt - Anders Klemets Greg Vaudreuil - John Klensin Ed Vielmetti - Valdis Kletniek Ryan Waldron - - - -Borenstein & Freed [Page 58] - -RFC 1521 MIME September 1993 - - - Jim Knowles Wally Wedel - Stev Knowles Sven-Ove Westberg - Bob Kummerfeld Brian Wideen - Pekka Kytolaakso John Wobus - Stellan Lagerstrom Glenn Wright - Vincent Lau Rayan Zachariassen - Donald Lindsay David Zimmerman - Marc Andreessen Bob Braden - Brian Capouch Peter Clitherow - Dave Collier-Brown John Coonrod - Stephen Crocker Jim Davis - Axel Deininger Dana S Emery - Martin Forssen Stephen Gildea - Terry Gray Mark Horton - Warner Losh Carlyn Lowery - Laurence Lundblade Charles Lynn - Larry Masinter Michael J. McInerny - Jon Postel Christer Romson - Yutaka Sato Markku Savela - Richard Alan Schafer Larry W. Virden - Rhys Weatherly Jay Weber - Dave Wecker - -The authors apologize for any omissions from this list, which are -certainly unintentional. - - - - - - - - - - - - - - - - - - - - - - - - - - -Borenstein & Freed [Page 59] - -RFC 1521 MIME September 1993 - - -Appendix A -- Minimal MIME-Conformance - - The mechanisms described in this document are open-ended. It is - definitely not expected that all implementations will support all of - the Content-Types described, nor that they will all share the same - extensions. In order to promote interoperability, however, it is - useful to define the concept of "MIME-conformance" to define a - certain level of implementation that allows the useful interworking - of messages with content that differs from US ASCII text. In this - section, we specify the requirements for such conformance. - - A mail user agent that is MIME-conformant MUST: - - 1. Always generate a "MIME-Version: 1.0" header field. - - 2. Recognize the Content-Transfer-Encoding header field, and - decode all received data encoded with either the quoted-printable - or base64 implementations. Encode any data sent that is not in - seven-bit mail-ready representation using one of these - transformations and include the appropriate Content-Transfer- - Encoding header field, unless the underlying transport mechanism - supports non-seven-bit data, as SMTP does not. - - 3. Recognize and interpret the Content-Type header field, and - avoid showing users raw data with a Content-Type field other than - text. Be able to send at least text/plain messages, with the - character set specified as a parameter if it is not US-ASCII. - - 4. Explicitly handle the following Content-Type values, to at - least the following extents: - - Text: - - -- Recognize and display "text" mail - with the character set "US-ASCII." - - -- Recognize other character sets at - least to the extent of being able - to inform the user about what - character set the message uses. - - -- Recognize the "ISO-8859-*" character - sets to the extent of being able to - display those characters that are - common to ISO-8859-* and US-ASCII, - namely all characters represented - by octet values 0-127. - - - - -Borenstein & Freed [Page 60] - -RFC 1521 MIME September 1993 - - - -- For unrecognized subtypes, show or - offer to show the user the "raw" - version of the data after - conversion of the content from - canonical form to local form. - - Message: - - -- Recognize and display at least the - primary (822) encapsulation. - - Multipart: - - -- Recognize the primary (mixed) - subtype. Display all relevant - information on the message level - and the body part header level and - then display or offer to display - each of the body parts individually. - - -- Recognize the "alternative" subtype, - and avoid showing the user - redundant parts of - multipart/alternative mail. - - -- Treat any unrecognized subtypes as if - they were "mixed". - - Application: - - -- Offer the ability to remove either of - the two types of Content-Transfer- - Encoding defined in this document - and put the resulting information - in a user file. - - 5. Upon encountering any unrecognized Content- Type, an - implementation must treat it as if it had a Content-Type of - "application/octet-stream" with no parameter sub-arguments. How - such data are handled is up to an implementation, but likely - options for handling such unrecognized data include offering the - user to write it into a file (decoded from its mail transport - format) or offering the user to name a program to which the - decoded data should be passed as input. Unrecognized predefined - types, which in a MIME-conformant mailer might still include - audio, image, or video, should also be treated in this way. - - A user agent that meets the above conditions is said to be MIME- - - - -Borenstein & Freed [Page 61] - -RFC 1521 MIME September 1993 - - - conformant. The meaning of this phrase is that it is assumed to be - "safe" to send virtually any kind of properly-marked data to users of - such mail systems, because such systems will at least be able to - treat the data as undifferentiated binary, and will not simply splash - it onto the screen of unsuspecting users. There is another sense in - which it is always "safe" to send data in a format that is MIME- - conformant, which is that such data will not break or be broken by - any known systems that are conformant with RFC 821 and RFC 822. User - agents that are MIME-conformant have the additional guarantee that - the user will not be shown data that were never intended to be viewed - as text. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Borenstein & Freed [Page 62] - -RFC 1521 MIME September 1993 - - -Appendix B -- General Guidelines For Sending Email Data - - Internet email is not a perfect, homogeneous system. Mail may become - corrupted at several stages in its travel to a final destination. - Specifically, email sent throughout the Internet may travel across - many networking technologies. Many networking and mail technologies - do not support the full functionality possible in the SMTP transport - environment. Mail traversing these systems is likely to be modified - in such a way that it can be transported. - - There exist many widely-deployed non-conformant MTAs in the Internet. - These MTAs, speaking the SMTP protocol, alter messages on the fly to - take advantage of the internal data structure of the hosts they are - implemented on, or are just plain broken. - - The following guidelines may be useful to anyone devising a data - format (Content-Type) that will survive the widest range of - networking technologies and known broken MTAs unscathed. Note that - anything encoded in the base64 encoding will satisfy these rules, but - that some well-known mechanisms, notably the UNIX uuencode facility, - will not. Note also that anything encoded in the Quoted-Printable - encoding will survive most gateways intact, but possibly not some - gateways to systems that use the EBCDIC character set. - - (1) Under some circumstances the encoding used for data may change - as part of normal gateway or user agent operation. In particular, - conversion from base64 to quoted-printable and vice versa may be - necessary. This may result in the confusion of CRLF sequences with - line breaks in text bodies. As such, the persistence of CRLF as - something other than a line break must not be relied on. - - (2) Many systems may elect to represent and store text data using - local newline conventions. Local newline conventions may not match - the RFC822 CRLF convention -- systems are known that use plain CR, - plain LF, CRLF, or counted records. The result is that isolated - CR and LF characters are not well tolerated in general; they may - be lost or converted to delimiters on some systems, and hence must - not be relied on. - - (3) TAB (HT) characters may be misinterpreted or may be - automatically converted to variable numbers of spaces. This is - unavoidable in some environments, notably those not based on the - ASCII character set. Such conversion is STRONGLY DISCOURAGED, but - it may occur, and mail formats must not rely on the persistence of - TAB (HT) characters. - - (4) Lines longer than 76 characters may be wrapped or truncated in - some environments. Line wrapping and line truncation are STRONGLY - - - -Borenstein & Freed [Page 63] - -RFC 1521 MIME September 1993 - - - DISCOURAGED, but unavoidable in some cases. Applications which - require long lines must somehow differentiate between soft and - hard line breaks. (A simple way to do this is to use the quoted- - printable encoding.) - - (5) Trailing "white space" characters (SPACE, TAB (HT)) on a line - may be discarded by some transport agents, while other transport - agents may pad lines with these characters so that all lines in a - mail file are of equal length. The persistence of trailing white - space, therefore, must not be relied on. - - (6) Many mail domains use variations on the ASCII character set, - or use character sets such as EBCDIC which contain most but not - all of the US-ASCII characters. The correct translation of - characters not in the "invariant" set cannot be depended on across - character converting gateways. For example, this situation is a - problem when sending uuencoded information across BITNET, an - EBCDIC system. Similar problems can occur without crossing a - gateway, since many Internet hosts use character sets other than - ASCII internally. The definition of Printable Strings in X.400 - adds further restrictions in certain special cases. In - particular, the only characters that are known to be consistent - across all gateways are the 73 characters that correspond to the - upper and lower case letters A-Z and a-z, the 10 digits 0-9, and - the following eleven special characters: - - "'" (ASCII code 39) - "(" (ASCII code 40) - ")" (ASCII code 41) - "+" (ASCII code 43) - "," (ASCII code 44) - "-" (ASCII code 45) - "." (ASCII code 46) - "/" (ASCII code 47) - ":" (ASCII code 58) - "=" (ASCII code 61) - "?" (ASCII code 63) - - A maximally portable mail representation, such as the base64 - encoding, will confine itself to relatively short lines of text in - which the only meaningful characters are taken from this set of 73 - characters. - - (7) Some mail transport agents will corrupt data that includes - certain literal strings. In particular, a period (".") alone on a - line is known to be corrupted by some (incorrect) SMTP - implementations, and a line that starts with the five characters - "From " (the fifth character is a SPACE) are commonly corrupted as - - - -Borenstein & Freed [Page 64] - -RFC 1521 MIME September 1993 - - - well. A careful composition agent can prevent these corruptions - by encoding the data (e.g., in the quoted-printable encoding, - "=46rom " in place of "From " at the start of a line, and "=2E" in - place of "." alone on a line. - - Please note that the above list is NOT a list of recommended - practices for MTAs. RFC 821 MTAs are prohibited from altering the - character of white space or wrapping long lines. These BAD and - illegal practices are known to occur on established networks, and - implementations should be robust in dealing with the bad effects they - can cause. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Borenstein & Freed [Page 65] - -RFC 1521 MIME September 1993 - - -Appendix C -- A Complex Multipart Example - - What follows is the outline of a complex multipart message. This - message has five parts to be displayed serially: two introductory - plain text parts, an embedded multipart message, a richtext part, and - a closing encapsulated text message in a non-ASCII character set. - The embedded multipart message has two parts to be displayed in - parallel, a picture and an audio fragment. - - MIME-Version: 1.0 - From: Nathaniel Borenstein - To: Ned Freed - Subject: A multipart example - Content-Type: multipart/mixed; - boundary=unique-boundary-1 - - This is the preamble area of a multipart message. - Mail readers that understand multipart format - should ignore this preamble. - If you are reading this text, you might want to - consider changing to a mail reader that understands - how to properly display multipart messages. - --unique-boundary-1 - - ...Some text appears here... - [Note that the preceding blank line means - no header fields were given and this is text, - with charset US ASCII. It could have been - done with explicit typing as in the next part.] - - --unique-boundary-1 - Content-type: text/plain; charset=US-ASCII - - This could have been part of the previous part, - but illustrates explicit versus implicit - typing of body parts. - - --unique-boundary-1 - Content-Type: multipart/parallel; - boundary=unique-boundary-2 - - - --unique-boundary-2 - Content-Type: audio/basic - Content-Transfer-Encoding: base64 - - ... base64-encoded 8000 Hz single-channel - mu-law-format audio data goes here.... - - - -Borenstein & Freed [Page 66] - -RFC 1521 MIME September 1993 - - - --unique-boundary-2 - Content-Type: image/gif - Content-Transfer-Encoding: base64 - - ... base64-encoded image data goes here.... - - --unique-boundary-2-- - - --unique-boundary-1 - Content-type: text/richtext - - This is richtext. - as defined in RFC 1341 - Isn't it - cool? - - --unique-boundary-1 - Content-Type: message/rfc822 - - From: (mailbox in US-ASCII) - To: (address in US-ASCII) - Subject: (subject in US-ASCII) - Content-Type: Text/plain; charset=ISO-8859-1 - Content-Transfer-Encoding: Quoted-printable - - ... Additional text in ISO-8859-1 goes here ... - - --unique-boundary-1-- - - - - - - - - - - - - - - - - - - - - - - - -Borenstein & Freed [Page 67] - -RFC 1521 MIME September 1993 - - -Appendix D -- Collected Grammar - - This appendix contains the complete BNF grammar for all the syntax - specified by this document. - - By itself, however, this grammar is incomplete. It refers to several - entities that are defined by RFC 822. Rather than reproduce those - definitions here, and risk unintentional differences between the two, - this document simply refers the reader to RFC 822 for the remaining - definitions. Wherever a term is undefined, it refers to the RFC 822 - definition. - - application-subtype := ("octet-stream" *stream-param) - / "postscript" / extension-token - - application-type := "application" "/" application-subtype - - attribute := token ; case-insensitive - - atype := "ftp" / "anon-ftp" / "tftp" / "local-file" - / "afs" / "mail-server" / extension-token - ; Case-insensitive - - audio-type := "audio" "/" ("basic" / extension-token) - - body-part := <"message" as defined in RFC 822, - with all header fields optional, and with the - specified delimiter not occurring anywhere in - the message body, either on a line by itself - or as a substring anywhere.> - - NOTE: In certain transport enclaves, RFC 822 restrictions such as - the one that limits bodies to printable ASCII characters may not - be in force. (That is, the transport domains may resemble - standard Internet mail transport as specified in RFC821 and - assumed by RFC822, but without certain restrictions.) The - relaxation of these restrictions should be construed as locally - extending the definition of bodies, for example to include octets - outside of the ASCII range, as long as these extensions are - supported by the transport and adequately documented in the - Content-Transfer-Encoding header field. However, in no event are - headers (either message headers or body-part headers) allowed to - contain anything other than ASCII characters. - - - - - - - - -Borenstein & Freed [Page 68] - -RFC 1521 MIME September 1993 - - - boundary := 0*69 bcharsnospace - - bchars := bcharsnospace / " " - - bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" / "+" / "_" - / "," / "-" / "." / "/" / ":" / "=" / "?" - - charset := "us-ascii" / "iso-8859-1" / "iso-8859-2"/ "iso-8859-3" - / "iso-8859-4" / "iso-8859-5" / "iso-8859-6" / "iso-8859-7" - / "iso-8859-8" / "iso-8859-9" / extension-token - ; case insensitive - - close-delimiter := "--" boundary "--" CRLF;Again,no space by "--", - - content := "Content-Type" ":" type "/" subtype *(";" parameter) - ; case-insensitive matching of type and subtype - - delimiter := "--" boundary CRLF ;taken from Content-Type field. - ; There must be no space - ; between "--" and boundary. - - description := "Content-Description" ":" *text - - discard-text := *(*text CRLF) - - encapsulation := delimiter body-part CRLF - - encoding := "Content-Transfer-Encoding" ":" mechanism - - epilogue := discard-text ; to be ignored upon receipt. - - extension-token := x-token / iana-token - - external-param := (";" "access-type" "=" atype) - / (";" "expiration" "=" date-time) - - ; Note that date-time is quoted - / (";" "size" "=" 1*DIGIT) - / (";" "permission" "=" ("read" / "read-write")) - ; Permission is case-insensitive - / (";" "name" "=" value) - / (";" "site" "=" value) - / (";" "dir" "=" value) - / (";" "mode" "=" value) - / (";" "server" "=" value) - / (";" "subject" "=" value) - ;access-type required; others required based on access-type - - - - -Borenstein & Freed [Page 69] - -RFC 1521 MIME September 1993 - - - iana-token := - - id := "Content-ID" ":" msg-id - - image-type := "image" "/" ("gif" / "jpeg" / extension-token) - - mechanism := "7bit" ; case-insensitive - / "quoted-printable" - / "base64" - / "8bit" - / "binary" - / x-token - - message-subtype := "rfc822" - / "partial" 2#3partial-param - / "external-body" 1*external-param - / extension-token - - message-type := "message" "/" message-subtype - - multipart-body :=preamble 1*encapsulation close-delimiter epilogue - - multipart-subtype := "mixed" / "parallel" / "digest" - / "alternative" / extension-token - - multipart-type := "multipart" "/" multipart-subtype - ";" "boundary" "=" boundary - - octet := "=" 2(DIGIT / "A" / "B" / "C" / "D" / "E" / "F") - ; octet must be used for characters > 127, =, SPACE, or - TAB, - ; and is recommended for any characters not listed in - ; Appendix B as "mail-safe". - - padding := "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" - - parameter := attribute "=" value - - partial-param := (";" "id" "=" value) - / (";" "number" "=" 1*DIGIT) - / (";" "total" "=" 1*DIGIT) - ; id & number required;total required for last part - - preamble := discard-text ; to be ignored upon receipt. - - ptext := octet / " / "@" - / "," / ";" / ":" / "\" / <"> - / "/" / "[" / "]" / "?" / "=" - ; Must be in quoted-string, - ; to use within parameter values - - - type := "application" / "audio" ; case-insensitive - / "image" / "message" - / "multipart" / "text" - / "video" / extension-token - ; All values case-insensitive - - value := token / quoted-string - - version := "MIME-Version" ":" 1*DIGIT "." 1*DIGIT - - video-type := "video" "/" ("mpeg" / extension-token) - - x-token := - - - - - - - - - - - - - -Borenstein & Freed [Page 71] - -RFC 1521 MIME September 1993 - - -Appendix E -- IANA Registration Procedures - - MIME has been carefully designed to have extensible mechanisms, and - it is expected that the set of content-type/subtype pairs and their - associated parameters will grow significantly with time. Several - other MIME fields, notably character set names, access-type - parameters for the message/external-body type, and possibly even - Content-Transfer-Encoding values, are likely to have new values - defined over time. In order to ensure that the set of such values is - developed in an orderly, well-specified, and public manner, MIME - defines a registration process which uses the Internet Assigned - Numbers Authority (IANA) as a central registry for such values. - - In general, parameters in the content-type header field are used to - convey supplemental information for various content types, and their - use is defined when the content-type and subtype are defined. New - parameters should not be defined as a way to introduce new - functionality. - - In order to simplify and standardize the registration process, this - appendix gives templates for the registration of new values with - IANA. Each of these is given in the form of an email message - template, to be filled in by the registering party. - - E.1 Registration of New Content-type/subtype Values - - Note that MIME is generally expected to be extended by subtypes. If - a new fundamental top-level type is needed, its specification must be - published as an RFC or submitted in a form suitable to become an RFC, - and be subject to the Internet standards process. - - To: IANA@isi.edu - Subject: Registration of new MIME - content-type/subtype - - MIME type name: - - (If the above is not an existing top-level MIME type, - please explain why an existing type cannot be used.) - - MIME subtype name: - - Required parameters: - - Optional parameters: - - Encoding considerations: - - - - -Borenstein & Freed [Page 72] - -RFC 1521 MIME September 1993 - - - Security considerations: - - Published specification: - - (The published specification must be an Internet RFC or - RFC-to-be if a new top-level type is being defined, and - must be a publicly available specification in any - case.) - - Person & email address to contact for further information: - - E.2 Registration of New Access-type Values - for Message/external-body - - To: IANA@isi.edu - Subject: Registration of new MIME Access-type for - Message/external-body content-type - - MIME access-type name: - - Required parameters: - - Optional parameters: - - Published specification: - - (The published specification must be an Internet RFC or - RFC-to-be.) - - Person & email address to contact for further information: - - - - - - - - - - - - - - - - - - - - - -Borenstein & Freed [Page 73] - -RFC 1521 MIME September 1993 - - -Appendix F -- Summary of the Seven Content-types - - Content-type: text - - Subtypes defined by this document: plain - - Important Parameters: charset - - Encoding notes: quoted-printable generally preferred if an encoding - is needed and the character set is mostly an ASCII superset. - - Security considerations: Rich text formats such as TeX and Troff - often contain mechanisms for executing arbitrary commands or file - system operations, and should not be used automatically unless - these security problems have been addressed. Even plain text may - contain control characters that can be used to exploit the - capabilities of "intelligent" terminals and cause security - violations. User interfaces designed to run on such terminals - should be aware of and try to prevent such problems. - - ________________________________________________________ - Content-type: multipart - - Subtypes defined by this document: mixed, alternative, - digest, parallel. - - Important Parameters: boundary - - Encoding notes: No content-transfer-encoding is permitted. - - ________________________________________________________ - Content-type: message - - Subtypes defined by this document: rfc822, partial, external-body - - Important Parameters: id, number, total, access-type, expiration, - size, permission, name, site, directory, mode, server, subject - - Encoding notes: No content-transfer-encoding is permitted. - Specifically, only "7bit" is permitted for "message/partial" or - "message/external-body", and only "7bit", "8bit", or "binary" are - permitted for other subtypes of "message". - ______________________________________________________________ - Content-type: application - - Subtypes defined by this document: octet-stream, postscript - - Important Parameters: type, padding - - - -Borenstein & Freed [Page 74] - -RFC 1521 MIME September 1993 - - - Deprecated Parameters: name and conversions were - defined in RFC 1341. - - Encoding notes: base64 preferred for unreadable subtypes. - - Security considerations: This type is intended for the - transmission of data to be interpreted by locally-installed - programs. If used, for example, to transmit executable - binary programs or programs in general-purpose interpreted - languages, such as LISP programs or shell scripts, severe - security problems could result. Authors of mail-reading - agents are cautioned against giving their systems the power - to execute mail-based application data without carefully - considering the security implications. While it is - certainly possible to define safe application formats and - even safe interpreters for unsafe formats, each interpreter - should be evaluated separately for possible security - problems. - ________________________________________________________________ - Content-type: image - - Subtypes defined by this document: jpeg, gif - - Important Parameters: none - - Encoding notes: base64 generally preferred - ________________________________________________________________ - Content-type: audio - - Subtypes defined by this document: basic - - Important Parameters: none - - Encoding notes: base64 generally preferred - ________________________________________________________________ - Content-type: video - - Subtypes defined by this document: mpeg - - Important Parameters: none - - Encoding notes: base64 generally preferred - - - - - - - - - -Borenstein & Freed [Page 75] - -RFC 1521 MIME September 1993 - - -Appendix G -- Canonical Encoding Model - - There was some confusion, in earlier drafts of this memo, regarding - the model for when email data was to be converted to canonical form - and encoded, and in particular how this process would affect the - treatment of CRLFs, given that the representation of newlines varies - greatly from system to system. For this reason, a canonical model - for encoding is presented below. - - The process of composing a MIME entity can be modeled as being done - in a number of steps. Note that these steps are roughly similar to - those steps used in RFC 1421 and are performed for each 'innermost - level' body: - - Step 1. Creation of local form. - - The body to be transmitted is created in the system's native format. - The native character set is used, and where appropriate local end of - line conventions are used as well. The body may be a UNIX-style text - file, or a Sun raster image, or a VMS indexed file, or audio data in - a system-dependent format stored only in memory, or anything else - that corresponds to the local model for the representation of some - form of information. Fundamentally, the data is created in the - "native" form specified by the type/subtype information. - - Step 2. Conversion to canonical form. - - The entire body, including "out-of-band" information such as record - lengths and possibly file attribute information, is converted to a - universal canonical form. The specific content type of the body as - well as its associated attributes dictate the nature of the canonical - form that is used. Conversion to the proper canonical form may - involve character set conversion, transformation of audio data, - compression, or various other operations specific to the various - content types. If character set conversion is involved, however, - care must be taken to understand the semantics of the content-type, - which may have strong implications for any character set conversion, - e.g. with regard to syntactically meaningful characters in a text - subtype other than "plain". - - For example, in the case of text/plain data, the text must be - converted to a supported character set and lines must be delimited - with CRLF delimiters in accordance with RFC822. Note that the - restriction on line lengths implied by RFC822 is eliminated if the - next step employs either quoted-printable or base64 encoding. - - - - - - -Borenstein & Freed [Page 76] - -RFC 1521 MIME September 1993 - - - Step 3. Apply transfer encoding. - - A Content-Transfer-Encoding appropriate for this body is applied. - Note that there is no fixed relationship between the content type and - the transfer encoding. In particular, it may be appropriate to base - the choice of base64 or quoted-printable on character frequency - counts which are specific to a given instance of a body. - - Step 4. Insertion into entity. - - The encoded object is inserted into a MIME entity with appropriate - headers. The entity is then inserted into the body of a higher-level - entity (message or multipart) if needed. - - It is vital to note that these steps are only a model; they are - specifically NOT a blueprint for how an actual system would be built. - In particular, the model fails to account for two common designs: - - 1. In many cases the conversion to a canonical form prior to - encoding will be subsumed into the encoder itself, which - understands local formats directly. For example, the local - newline convention for text bodies might be carried through to the - encoder itself along with knowledge of what that format is. - - 2. The output of the encoders may have to pass through one or - more additional steps prior to being transmitted as a message. As - such, the output of the encoder may not be conformant with the - formats specified by RFC822. In particular, once again it may be - appropriate for the converter's output to be expressed using local - newline conventions rather than using the standard RFC822 CRLF - delimiters. - - Other implementation variations are conceivable as well. The vital - aspect of this discussion is that, in spite of any optimizations, - collapsings of required steps, or insertion of additional processing, - the resulting messages must be consistent with those produced by the - model described here. For example, a message with the following - header fields: - - Content-type: text/foo; charset=bar - Content-Transfer-Encoding: base64 - - must be first represented in the text/foo form, then (if necessary) - represented in the "bar" character set, and finally transformed via - the base64 algorithm into a mail-safe form. - - - - - - -Borenstein & Freed [Page 77] - -RFC 1521 MIME September 1993 - - -Appendix H -- Changes from RFC 1341 - - This document is a relatively minor revision of RFC 1341. For - the convenience of those familiar with RFC 1341, the technical - changes from that document are summarized in this appendix. - - 1. The definition of "tspecials" has been changed to no longer - include ".". - - 2. The Content-ID field is now mandatory for message/external-body - parts. - - 3. The text/richtext type (including the old Section 7.1.3 and - Appendix D) has been moved to a separate document. - - 4. The rules on header merging for message/partial data have been - changed to treat the Encrypted and MIME-Version headers as special - cases. - - 5. The definition of the external-body access-type parameter has - been changed so that it can only indicate a single access method - (which was all that made sense). - - 6. There is a new "Subject" parameter for message/external-body, - access-type mail-server, to permit MIME-based use of mail servers - that rely on Subject field information. - - 7. The "conversions" parameter for application/octet-stream has been - removed. - - 8. Section 7.4.1 now deprecates the use of the "name" parameter for - application/octet-stream, as this will be superseded in the future by - a Content-Disposition header. - - 9. The formal grammar for multipart bodies has been changed so that - a CRLF is no longer required before the first boundary line. - - 10. MIME entities of type "message/partial" and "message/external- - body" are now required to use only the "7bit" transfer-encoding. - (Specifically, "binary" and "8bit" are not permitted.) - - 11. The "application/oda" content-type has been removed. - - 12. A note has been added to the end of section 7.2.3, explaining - the semantics of Content-ID in a multipart/alternative MIME entity. - - 13. The formal syntax for the "MIME-Version" field has been - tightened, but in a way that is completely compatible with the only - - - -Borenstein & Freed [Page 78] - -RFC 1521 MIME September 1993 - - - version number defined in RFC 1341. - - 14. In Section 7.3.1, the definition of message/rfc822 has been - relaxed regarding mandatory fields. - - All other changes from RFC 1341 were editorial changes and do not - affect the technical content of MIME. Considerable formal grammar - has been added, but this reflects the prose specification that was - already in place. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Borenstein & Freed [Page 79] - -RFC 1521 MIME September 1993 - - -References - - [US-ASCII] Coded Character Set--7-Bit American Standard Code for - Information Interchange, ANSI X3.4-1986. - - [ATK] Borenstein, Nathaniel S., Multimedia Applications Development - with the Andrew Toolkit, Prentice-Hall, 1990. - - [GIF] Graphics Interchange Format (Version 89a), Compuserve, Inc., - Columbus, Ohio, 1990. - - [ISO-2022] International Standard--Information Processing--ISO 7-bit - and 8-bit coded character sets--Code extension techniques, ISO - 2022:1986. - - [ISO-8859] Information Processing -- 8-bit Single-Byte Coded Graphic - Character Sets -- Part 1: Latin Alphabet No. 1, ISO 8859-1:1987. Part - 2: Latin alphabet No. 2, ISO 8859-2, 1987. Part 3: Latin alphabet - No. 3, ISO 8859-3, 1988. Part 4: Latin alphabet No. 4, ISO 8859-4, - 1988. Part 5: Latin/Cyrillic alphabet, ISO 8859-5, 1988. Part 6: - Latin/Arabic alphabet, ISO 8859-6, 1987. Part 7: Latin/Greek - alphabet, ISO 8859-7, 1987. Part 8: Latin/Hebrew alphabet, ISO - 8859-8, 1988. Part 9: Latin alphabet No. 5, ISO 8859-9, 1990. - - [ISO-646] International Standard--Information Processing--ISO 7-bit - coded character set for information interchange, ISO 646:1983. - - [MPEG] Video Coding Draft Standard ISO 11172 CD, ISO IEC/TJC1/SC2/WG11 - (Motion Picture Experts Group), May, 1991. - - [PCM] CCITT, Fascicle III.4 - Recommendation G.711, Geneva, 1972, - "Pulse Code Modulation (PCM) of Voice Frequencies". - - [POSTSCRIPT] Adobe Systems, Inc., PostScript Language Reference - Manual, Addison-Wesley, 1985. - - [POSTSCRIPT2] Adobe Systems, Inc., PostScript Language Reference - Manual, Addison-Wesley, Second Edition, 1990. - - [X400] Schicker, Pietro, "Message Handling Systems, X.400", Message - Handling Systems and Distributed Applications, E. Stefferud, O-j. - Jacobsen, and P. Schicker, eds., North-Holland, 1989, pp. 3-41. - - [RFC-783] Sollins, K., "TFTP Protocol (revision 2)", RFC 783, MIT, - June 1981. - - [RFC-821] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC - 821, USC/Information Sciences Institute, August 1982. - - - -Borenstein & Freed [Page 80] - -RFC 1521 MIME September 1993 - - - [RFC-822] Crocker, D., "Standard for the Format of ARPA Internet Text - Messages", STD 11, RFC 822, UDEL, August 1982. - - [RFC-934] Rose, M., and E. Stefferud, "Proposed Standard for Message - Encapsulation", RFC 934, Delaware and NMA, January 1985. - - [RFC-959] Postel, J. and J. Reynolds, "File Transfer Protocol", - STD 9, RFC 959, USC/Information Sciences Institute, October 1985. - - [RFC-1049] Sirbu, M., "Content-Type Header Field for Internet - Messages", STD 11, RFC 1049, CMU, March 1988. - - [RFC-1421] Linn, J., "Privacy Enhancement for Internet Electronic Mail: - Part I - Message Encryption and Authentication Procedures", RFC - 1421, IAB IRTF PSRG, IETF PEM WG, February 1993. - - [RFC-1154] Robinson, D. and R. Ullmann, "Encoding Header Field for - Internet Messages", RFC 1154, Prime Computer, Inc., April 1990. - - [RFC-1341] Borenstein, N., and N. Freed, "MIME (Multipurpose Internet - Mail Extensions): Mechanisms for Specifying and Describing the Format - of Internet Message Bodies", RFC 1341, Bellcore, Innosoft, June 1992. - - [RFC-1342] Moore, K., "Representation of Non-Ascii Text in Internet - Message Headers", RFC 1342, University of Tennessee, June 1992. - - [RFC-1343] Borenstein, N., "A User Agent Configuration Mechanism - for Multimedia Mail Format Information", RFC 1343, Bellcore, June - 1992. - - [RFC-1344] Borenstein, N., "Implications of MIME for Internet - Mail Gateways", RFC 1344, Bellcore, June 1992. - - [RFC-1345] Simonsen, K., "Character Mnemonics & Character Sets", - RFC 1345, Rationel Almen Planlaegning, June 1992. - - [RFC-1426] Klensin, J., (WG Chair), Freed, N., (Editor), Rose, M., - Stefferud, E., and D. Crocker, "SMTP Service Extension for 8bit-MIME - transport", RFC 1426, United Nations Universit, Innosoft, Dover Beach - Consulting, Inc., Network Management Associates, Inc., The Branch - Office, February 1993. - - [RFC-1522] Moore, K., "Representation of Non-Ascii Text in Internet - Message Headers" RFC 1522, University of Tennessee, September 1993. - - [RFC-1340] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, RFC - 1340, USC/Information Sciences Institute, July 1992. - - - - -Borenstein & Freed [Page 81] - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1854.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1854.txt deleted file mode 100644 index 7b1a9751..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1854.txt +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - -Network Working Group N. Freed -Request For Comments: 1854 Innosoft International, Inc. -Category: Standards Track A. Cargille, WG Chair - October 1995 - - - SMTP Service Extension - for Command Pipelining - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Abstract - - This memo defines an extension to the SMTP service whereby a server - can indicate the extent of its ability to accept multiple commands in - a single TCP send operation. Using a single TCP send operation for - multiple commands can improve SMTP performance significantly. - -Introduction - - Although SMTP is widely and robustly deployed, certain extensions may - nevertheless prove useful. In particular, many parts of the Internet - make use of high latency network links. - - SMTP's intrinsic one command-one response structure is significantly - penalized by high latency links, often to the point where the factors - contributing to overall connection time are dominated by the time - spent waiting for responses to individual commands (turnaround time). - - In the best of all worlds it would be possible to simply deploy SMTP - client software that makes use of command pipelining: batching up - multiple commands into single TCP send operations. Unfortunately, the - original SMTP specification [1] did not explicitly state that SMTP - servers must support this. As a result a non-trivial number of - Internet SMTP servers cannot adequately handle command pipelining. - Flaws known to exist in deployed servers include: - - (1) Connection handoff and buffer flushes in the middle of - the SMTP dialogue. Creation of server processes for - incoming SMTP connections is a useful, obvious, and - harmless implementation technique. However, some SMTP - servers defer process forking and connection handoff - - - -Freed & Cargille Standards Track [Page 1] - -RFC 1854 SMTP Pipelining October 1995 - - - until some intermediate point in the SMTP dialogue. - When this is done material read from the TCP connection - and kept in process buffers can be lost. - - (2) Flushing the TCP input buffer when an SMTP command - fails. SMTP commands often fail but there is no reason - to flush the TCP input buffer when this happens. - Nevertheless, some SMTP servers do this. - - (3) Improper processing and promulgation of SMTP command - failures. For example, some SMTP servers will refuse to - accept a DATA command if the last RCPT TO command - fails, paying no attention to the success or failure of - prior RCPT TO command results. Other servers will - accept a DATA command even when all previous RCPT TO - commands have failed. Although it is possible to - accommodate this sort of behavior in a client that - employs command pipelining, it does complicate the - construction of the client unnecessarily. - - This memo uses the mechanism described in [2] to define an extension - to the SMTP service whereby an SMTP server can declare that it is - capable of handling pipelined commands. The SMTP client can then - check for this declaration and use pipelining only when the server - declares itself capable of handling it. - -1. Framework for the Command Pipelining Extension - - The Command Pipelining extension is defined as follows: - - (1) the name of the SMTP service extension is Pipelining; - - (2) the EHLO keyword value associated with the extension is - PIPELINING; - - (3) no parameter is used with the PIPELINING EHLO keyword; - - (4) no additional parameters are added to either the MAIL - FROM or RCPT TO commands. - - (5) no additional SMTP verbs are defined by this extension; - and, - - (6) the next section specifies how support for the - extension affects the behavior of a server and client - SMTP. - - - - - -Freed & Cargille Standards Track [Page 2] - -RFC 1854 SMTP Pipelining October 1995 - - -2. The Pipelining Service Extension - - When a client SMTP wishes to employ command pipelining, it first - issues the EHLO command to the server SMTP. If the server SMTP - responds with code 250 to the EHLO command, and the response includes - the EHLO keyword value PIPELINING, then the server SMTP has indicated - that it can accommodate SMTP command pipelining. - -2.1. Client use of pipelining - - Once the client SMTP has confirmed that support exists for the - pipelining extension, the client SMTP may then elect to transmit - groups of SMTP commands in batches without waiting for a response to - each individual command. In particular, the commands RSET, MAIL FROM, - SEND FROM, SOML FROM, SAML FROM, and RCPT TO can all appear anywhere - in a pipelined command group. The EHLO, DATA, VRFY, EXPN, TURN, - QUIT, and NOOP commands can only appear as the last command in a - group since their success or failure produces a change of state which - the client SMTP must accommodate. (NOOP is included in this group so - it can be used as a synchronization point.) - - Additional commands added by other SMTP extensions may only appear as - the last command in a group unless otherwise specified by the - extensions that define the commands. - - The actual transfer of message content is explicitly allowed to be - the first "command" in a group. That is, the RSET/MAIL FROM sequence - necessary to initiate a new message transaction can be placed in the - same group as the final transfer of the headers and body of the - previous message. - - Client SMTP implementations that employ pipelining MUST check ALL - statuses associated with each command in a group. For example, if - none of the RCPT TO recipient addresses were accepted the client must - then check the response to the DATA command -- the client cannot - assume that the DATA command will be rejected just because none of - the RCPT TO commands worked. If the DATA command was properly - rejected the client SMTP can just issue RSET, but if the DATA command - was accepted the client SMTP should send a single dot. - - Command statuses MUST be coordinated with responses by counting each - separate response and correlating that count with the number of - commands known to have been issued. Multiline responses MUST be - supported. Matching on the basis of either the error code value or - associated text is expressly forbidden. - - Client SMTP implementations MAY elect to operate in a nonblocking - fashion, processing server responses immediately upon receipt, even - - - -Freed & Cargille Standards Track [Page 3] - -RFC 1854 SMTP Pipelining October 1995 - - - if there is still data pending transmission from the client's - previous TCP send operation. If nonblocking operation is not - supported, however, client SMTP implementations MUST also check the - TCP window size and make sure that each group of commands fits - entirely within the window. The window size is usually, but not - always, 4K octets. Failure to perform this check can lead to - deadlock conditions. - - Clients MUST NOT confuse responses to multiple commands with - multiline responses. Each command requires one or more lines of - response, the last line not containing a dash between the response - code and the response string. - -2.2. Server support of pipelining - - A server SMTP implementation that offers the pipelining extension: - - (1) MUST NOT flush or otherwise lose the contents of the - TCP input buffer under any circumstances whatsoever. - - (2) SHOULD issue a positive response to the DATA command if - and only if one or more valid RCPT TO addresses have - been previously received. - - (3) MUST NOT, after issuing a positive response to a DATA - command with no valid recipients and subsequently - receiving an empty message, send any message whatsoever - to anybody. - - (4) SHOULD elect to store responses to grouped RSET, MAIL - FROM, SEND FROM, SOML FROM, SAML FROM, and RCPT TO - commands in an internal buffer so they can sent as a - unit. - - (5) MUST NOT buffer responses to EHLO, DATA, VRFY, EXPN, - TURN, QUIT, and NOOP. - - (6) MUST NOT buffer responses to unrecognized commands. - - (7) MUST send all pending responses immediately whenever - the local TCP input buffer is emptied. - - (8) MUST NOT make assumptions about commands that are yet - to be received. - - (9) SHOULD issue response text that indicates, either - implicitly or explicitly, what command the response - matches. - - - -Freed & Cargille Standards Track [Page 4] - -RFC 1854 SMTP Pipelining October 1995 - - - The overriding intent of these server requirements is to make it as - easy as possible for servers to conform to these pipelining - extensions. - -3. Examples - - Consider the following SMTP dialogue that does not use pipelining: - - S: - C: - S: 220 innosoft.com SMTP service ready - C: HELO dbc.mtview.ca.us - S: 250 innosoft.com - C: MAIL FROM: - S: 250 sender OK - C: RCPT TO: - S: 250 recipient OK - C: RCPT TO: - S: 250 recipient OK - C: RCPT TO: - S: 250 recipient OK - C: DATA - S: 354 enter mail, end with line containing only "." - ... - C: . - S: 250 message sent - C: QUIT - S: 221 goodbye - - The client waits for a server response a total of 9 times in this - simple example. But if pipelining is employed the following dialogue - is possible: - - S: - C: - S: 220 innosoft.com SMTP service ready - C: EHLO dbc.mtview.ca.us - S: 250-innosoft.com - S: 250 PIPELINING - C: MAIL FROM: - C: RCPT TO: - C: RCPT TO: - C: RCPT TO: - C: DATA - S: 250 sender OK - S: 250 recipient OK - S: 250 recipient OK - S: 250 recipient OK - - - -Freed & Cargille Standards Track [Page 5] - -RFC 1854 SMTP Pipelining October 1995 - - - S: 354 enter mail, end with line containing only "." - ... - C: . - C: QUIT - S: 250 message sent - S: 221 goodbye - - The total number of turnarounds has been reduced from 9 to 4. - - The next example illustrates one possible form of behavior when - pipelining is used and all recipients are rejected: - - S: - C: - S: 220 innosoft.com SMTP service ready - C: EHLO dbc.mtview.ca.us - S: 250-innosoft.com - S: 250 PIPELINING - C: MAIL FROM: - C: RCPT TO: - C: RCPT TO: - C: DATA - S: 250 sender OK - S: 550 remote mail to not allowed - S: 550 remote mail to not allowed - S: 554 no valid recipients given - C: QUIT - S: 221 goodbye - - The client SMTP waits for the server 4 times here as well. If the - server SMTP does not check for at least one valid recipient prior to - accepting the DATA command, the following dialogue would result: - - S: - C: - S: 220 innosoft.com SMTP service ready - C: EHLO dbc.mtview.ca.us - S: 250-innosoft.com - S: 250 PIPELINING - C: MAIL FROM: - C: RCPT TO: - C: RCPT TO: - C: DATA - S: 250 sender OK - S: 550 remote mail to not allowed - S: 550 remote mail to not allowed - S: 354 enter mail, end with line containing only "." - C: . - - - -Freed & Cargille Standards Track [Page 6] - -RFC 1854 SMTP Pipelining October 1995 - - - C: QUIT - S: 554 no valid recipients - S: 221 goodbye - -4. Security Considerations - - This RFC does not discuss security issues and is not believed to - raise any security issues not endemic in electronic mail and present - in fully conforming implementations of [1]. - -5. Acknowledgements - - This document is based on the SMTP service extension model presented - in RFC 1425. Marshall Rose's description of SMTP command pipelining - in his book "The Internet Message" also served as a source of - inspiration for this extension. - -6. References - - [1] Postel, J., "Simple Mail Transfer Protocol", STD 10 - RFC 821, USC/Information Sciences Institute, August - 1982. - - [2] Klensin, J., Freed, N., Rose, M., Stefferud, E., - and D. Crocker, "SMTP Service Extensions", RFC 1651, - MCI, Innosoft, Dover Beach Consulting, Inc., - Network Management Associates, Inc., Silicon Graphics, - Inc., July 1994. - -7. Author's Address - - Ned Freed - Innosoft International, Inc. - 1050 East Garvey Avenue South - West Covina, CA 91790 - USA - - Phone: +1 818 919 3600 - Fax: +1 818 919 3614 - EMail: ned@innosoft.com - - - - - - - - - - - -Freed & Cargille Standards Track [Page 7] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2015.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2015.txt deleted file mode 100644 index d075983f..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2015.txt +++ /dev/null @@ -1,450 +0,0 @@ - - - - - -Network Working Group M. Elkins -Request for Comments: 2015 The Aerospace Corporation -Category: Standards Track October 1996 - - - MIME Security with Pretty Good Privacy (PGP) - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Abstract - - This document describes how Pretty Good Privacy (PGP) can be used to - provide privacy and authentication using the Multipurpose Internet - Mail Extensions (MIME) security content types described in RFC1847. - -1. Introduction - - Previous work on integrating PGP with MIME (including the since - withdrawn application/pgp content type) has suffered from a number of - problems, the most significant of which is the inability to recover - signed message bodies without parsing data structures specific to - PGP. This work makes use of the elegant solution proposed in - RFC1847, which defines security multipart formats for MIME. The - security multiparts clearly separate the signed message body from the - signature, and have a number of other desirable properties. This - document is styled after RFC 1848, which defines MIME Object Security - Services (MOSS) for providing security and authentication. - - This document defines three new content types for implementing - security and privacy with PGP: application/pgp-encrypted, - application/pgp-signature and application/pgp-keys. - -1.1 Compliance - - In order for an implementation to be compliant with this - specification, is it absolutely necessary for it to obey all items - labeled as MUST or REQUIRED. - - - - - - - - -Elkins Standards Track [Page 1] - -RFC 2015 MIME Security with PGP October 1996 - - -2. PGP data formats - - PGP can generate either ASCII armor (described in [3]) or 8-bit - binary output when encrypting data, generating a digital signature, - or extracting public key data. The ASCII armor output is the - REQUIRED method for data transfer. This allows those users who do - not have the means to interpret the formats described in this - document to be able extract and use the PGP information in the - message. - - When the amount of data to be transmitted requires that it be sent in - many parts, the MIME message/partial mechanism should be used rather - than the multipart ASCII armor PGP format. - -3. Content-Transfer-Encoding restrictions - - Multipart/signed and multipart/encrypted are to be treated by agents - as opaque, meaning that the data is not to be altered in any way [1]. - However, many existing mail gateways will detect if the next hop does - not support MIME or 8-bit data and perform conversion to either - Quoted-Printable or Base64. This presents serious problems for - multipart/signed, in particular, where the signature is invalidated - when such an operation occurs. For this reason all data signed - according to this protocol MUST be constrained to 7 bits (8- bit data - should be encoded using either Quoted-Printable or Base64). Note - that this also includes the case where a signed object is also - encrypted (see section 6). This restriction will increase the - likelihood that the signature will be valid upon receipt. - - Data that is ONLY to be encrypted is allowed to contain 8-bit - characters and therefore need not be converted to a 7-bit format. - - Implementor's note: It cannot be stressed enough that applications - using this standard should follow MIME's suggestion that you "be - conservative in what you generate, and liberal in what you accept." - In this particular case it means it would be wise for an - implementation to accept messages with any content-transfer- - encoding, but restrict generation to the 7-bit format required by - this memo. This will allow future compatibility in the event the - Internet SMTP framework becomes 8-bit friendly. - -4. PGP encrypted data - - Before encryption with PGP, the data should be written in MIME - canonical format (body and headers). - - PGP encrypted data is denoted by the "multipart/encrypted" content - type, described in [1], and MUST have a "protocol" parameter value of - - - -Elkins Standards Track [Page 2] - -RFC 2015 MIME Security with PGP October 1996 - - - "application/pgp-encrypted". Note that the value of the parameter - MUST be enclosed in quotes. - - The multipart/encrypted MUST consist of exactly two parts. The first - MIME body part must have a content type of "application/pgp- - encrypted". This body contains the control information. A message - complying with this standard MUST contain a "Version: 1" field in - this body. Since the PGP packet format contains all other - information necessary for decrypting, no other information is - required here. - - The second MIME body part MUST contain the actual encrypted data. It - must be labeled with a content type of "application/octet- stream". - - Example message: - - From: Michael Elkins - To: Michael Elkins - Mime-Version: 1.0 - Content-Type: multipart/encrypted; boundary=foo; - protocol="application/pgp-encrypted" - - --foo - Content-Type: application/pgp-encrypted - - Version: 1 - - --foo - Content-Type: application/octet-stream - - -----BEGIN PGP MESSAGE----- - Version: 2.6.2 - - hIwDY32hYGCE8MkBA/wOu7d45aUxF4Q0RKJprD3v5Z9K1YcRJ2fve87lMlDlx4Oj - eW4GDdBfLbJE7VUpp13N19GL8e/AqbyyjHH4aS0YoTk10QQ9nnRvjY8nZL3MPXSZ - g9VGQxFeGqzykzmykU6A26MSMexR4ApeeON6xzZWfo+0yOqAq6lb46wsvldZ96YA - AABH78hyX7YX4uT1tNCWEIIBoqqvCeIMpp7UQ2IzBrXg6GtukS8NxbukLeamqVW3 - 1yt21DYOjuLzcMNe/JNsD9vDVCvOOG3OCi8= - =zzaA - -----END PGP MESSAGE----- - - --foo-- - -5. PGP signed data - - PGP signed messages are denoted by the "multipart/signed" content - type, described in [1], with a "protocol" parameter which MUST have a - value of "application/pgp-signature" (MUST be quoted). The "micalg" - - - -Elkins Standards Track [Page 3] - -RFC 2015 MIME Security with PGP October 1996 - - - parameter MUST have a value of "pgp-", where identifies the message integrity check (MIC) used to generate - the signature. The currently defined values for are - "md5" for the MD5 checksum, and "sha1" for the SHA.1 algorithm. - - The multipart/signed body MUST consist of exactly two parts. The - first part contains the signed data in MIME canonical format, - including a set of appropriate content headers describing the data. - - The second body MUST contain the PGP digital signature. It MUST be - labeled with a content type of "application/pgp-signature". - - When the PGP digital signature is generated: - - (1) The data to be signed must first be converted to its - type/subtype specific canonical form. For text/plain, this - means conversion to an appropriate character set and conversion - of line endings to the canonical sequence. - - (2) An appropriate Content-Transfer-Encoding is then applied. Each - line of the encoded data MUST end with the canonical - sequence. - - (3) MIME content headers are then added to the body, each ending - with the canonical sequence. - - (4) As described in [1], the digital signature MUST be calculated - over both the data to be signed and its set of content headers. - - (5) The signature MUST be generated detached from the signed data - so that the process does not alter the signed data in any way. - - Example message: - - From: Michael Elkins - To: Michael Elkins - Mime-Version: 1.0 - Content-Type: multipart/signed; boundary=bar; micalg=pgp-md5; - protocol="application/pgp-signature" - - --bar - & Content-Type: text/plain; charset=iso-8859-1 - & Content-Transfer-Encoding: quoted-printable - & - & =A1Hola! - & - & Did you know that talking to yourself is a sign of senility? - & - - - -Elkins Standards Track [Page 4] - -RFC 2015 MIME Security with PGP October 1996 - - - & It's generally a good idea to encode lines that begin with - & From=20because some mail transport agents will insert a greater- - & than (>) sign, thus invalidating the signature. - & - & Also, in some cases it might be desirable to encode any =20 - &railing whitespace that occurs on lines in order to ensure =20 - & that the message signature is not invalidated when passing =20 - & a gateway that modifies such whitespace (like BITNET). =20 - & - & me - - --bar - Content-Type: application/pgp-signature - - -----BEGIN PGP MESSAGE----- - Version: 2.6.2 - - iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC// - jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq - uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn - HOxEa44b+EI= - =ndaj - -----END PGP MESSAGE----- - - --bar-- - - The "&"s in the previous example indicate the portion of the data - over which the signature was calculated. - - Though not required, it is generally a good idea to use Quoted- - Printable encoding in the first step (writing out the data to be - signed in MIME canonical format) if any of the lines in the data - begin with "From ", and encode the "F". This will avoid an MTA - inserting a ">" in front of the line, thus invalidating the - signature! - - Upon receipt of a signed message, an application MUST: - - (1) Convert line endings to the canonical sequence before - the signature can be verified. This is necessary since the - local MTA may have converted to a local end of line convention. - - (2) Pass both the signed data and its associated content headers - along with the PGP signature to the signature verification - service. - - - - - - -Elkins Standards Track [Page 5] - -RFC 2015 MIME Security with PGP October 1996 - - -6. Encrypted and Signed Data - - Sometimes it is desirable to both digitally sign and then encrypt a - message to be sent. This protocol allows for two methods of - accomplishing this task. - -6.1 RFC1847 Encapsulation - - [1], it is stated that the data should first be signed as a - multipart/signature body, and then encrypted to form the final - multipart/encrypted body, i.e., - - Content-Type: multipart/encrypted; - protocol="application/pgp-encrypted"; boundary=foo - - --foo - Content-Type: application/pgp-encrypted - - Version: 1 - - --foo - Content-Type: application/octet-stream - - -----BEGIN PGP MESSAGE----- - & Content-Type: multipart/signed; micalg=pgp-md5 - & protocol="application/pgp-signature"; boundary=bar - & - & --bar - & Content-Type: text/plain; charset=us-ascii - & - & This message was first signed, and then encrypted. - & - & --bar - & Content-Type: application/pgp-signature - & - & -----BEGIN PGP MESSAGE----- - & Version: 2.6.2 - & - & iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC// - & jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq - & uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn - & HOxEa44b+EI= - & =ndaj - & -----END PGP MESSAGE----- - & - & --bar-- - -----END PGP MESSAGE----- - - - - -Elkins Standards Track [Page 6] - -RFC 2015 MIME Security with PGP October 1996 - - - --foo-- - - (The text preceded by '&' indicates that it is really - encrypted, but presented as text for clarity.) - -6.2 Combined method - - Versions 2.x of PGP also allow data to be signed and encrypted in one - operation. This method is an acceptable shortcut, and has the - benefit of less overhead. The resulting data should be formed as a - "multipart/encrypted" object as described above. - - Messages which are encrypted and signed in this combined fashion are - REQUIRED to follow the same canonicalization rules as for - multipart/signed objects. - - It is explicitly allowed for an agent to decrypt a combined message - and rewrite it as a multipart/signed object using the signature data - embedded in the encrypted version. - -7. Distribution of PGP public keys - - Content-Type: application/pgp-keys - Required parameters: none - Optional parameters: none - - This is the content type which should be used for relaying public key - blocks. - -8. Notes - - PGP and Pretty Good Privacy are trademarks of Philip Zimmermann. - -9. Security Considerations - - Use of this protocol has the same security considerations as PGP, and - is not known to either increase or decrease the security of messages - using it; see [3] for more information. - -10. Author's Address - - Michael Elkins - P.O. Box 92957 - M1/102 - Los Angeles, CA 90009-2957 - - Phone: +1 310 336 8040 - Fax: +1 310 336 4402 - - - - -Elkins Standards Track [Page 7] - -RFC 2015 MIME Security with PGP October 1996 - - -References - - [1] Galvin, J., Murphy, G., Crocker, S., and N. Freed, "Security - Multiparts for MIME: Multipart/Signed and Multipart/Encrypted", - RFC 1847, October 1995. - - [2] Galvin, J., Murphy, G., Crocker, S., and N. Freed, "MIME Object - Security Services", RFC 1848, October 1995. - - [3] Atkins, D., Stallings, W., and P. Zimmermann, "PGP Message - Exchange Formats", RFC 1991, August 1996. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Elkins Standards Track [Page 8] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2045.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2045.txt deleted file mode 100644 index 9f286b1a..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2045.txt +++ /dev/null @@ -1,1739 +0,0 @@ - - - - - - -Network Working Group N. Freed -Request for Comments: 2045 Innosoft -Obsoletes: 1521, 1522, 1590 N. Borenstein -Category: Standards Track First Virtual - November 1996 - - - Multipurpose Internet Mail Extensions - (MIME) Part One: - Format of Internet Message Bodies - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Abstract - - STD 11, RFC 822, defines a message representation protocol specifying - considerable detail about US-ASCII message headers, and leaves the - message content, or message body, as flat US-ASCII text. This set of - documents, collectively called the Multipurpose Internet Mail - Extensions, or MIME, redefines the format of messages to allow for - - (1) textual message bodies in character sets other than - US-ASCII, - - (2) an extensible set of different formats for non-textual - message bodies, - - (3) multi-part message bodies, and - - (4) textual header information in character sets other than - US-ASCII. - - These documents are based on earlier work documented in RFC 934, STD - 11, and RFC 1049, but extends and revises them. Because RFC 822 said - so little about message bodies, these documents are largely - orthogonal to (rather than a revision of) RFC 822. - - This initial document specifies the various headers used to describe - the structure of MIME messages. The second document, RFC 2046, - defines the general structure of the MIME media typing system and - defines an initial set of media types. The third document, RFC 2047, - describes extensions to RFC 822 to allow non-US-ASCII text data in - - - -Freed & Borenstein Standards Track [Page 1] - -RFC 2045 Internet Message Bodies November 1996 - - - Internet mail header fields. The fourth document, RFC 2048, specifies - various IANA registration procedures for MIME-related facilities. The - fifth and final document, RFC 2049, describes MIME conformance - criteria as well as providing some illustrative examples of MIME - message formats, acknowledgements, and the bibliography. - - These documents are revisions of RFCs 1521, 1522, and 1590, which - themselves were revisions of RFCs 1341 and 1342. An appendix in RFC - 2049 describes differences and changes from previous versions. - -Table of Contents - - 1. Introduction ......................................... 3 - 2. Definitions, Conventions, and Generic BNF Grammar .... 5 - 2.1 CRLF ................................................ 5 - 2.2 Character Set ....................................... 6 - 2.3 Message ............................................. 6 - 2.4 Entity .............................................. 6 - 2.5 Body Part ........................................... 7 - 2.6 Body ................................................ 7 - 2.7 7bit Data ........................................... 7 - 2.8 8bit Data ........................................... 7 - 2.9 Binary Data ......................................... 7 - 2.10 Lines .............................................. 7 - 3. MIME Header Fields ................................... 8 - 4. MIME-Version Header Field ............................ 8 - 5. Content-Type Header Field ............................ 10 - 5.1 Syntax of the Content-Type Header Field ............. 12 - 5.2 Content-Type Defaults ............................... 14 - 6. Content-Transfer-Encoding Header Field ............... 14 - 6.1 Content-Transfer-Encoding Syntax .................... 14 - 6.2 Content-Transfer-Encodings Semantics ................ 15 - 6.3 New Content-Transfer-Encodings ...................... 16 - 6.4 Interpretation and Use .............................. 16 - 6.5 Translating Encodings ............................... 18 - 6.6 Canonical Encoding Model ............................ 19 - 6.7 Quoted-Printable Content-Transfer-Encoding .......... 19 - 6.8 Base64 Content-Transfer-Encoding .................... 24 - 7. Content-ID Header Field .............................. 26 - 8. Content-Description Header Field ..................... 27 - 9. Additional MIME Header Fields ........................ 27 - 10. Summary ............................................. 27 - 11. Security Considerations ............................. 27 - 12. Authors' Addresses .................................. 28 - A. Collected Grammar .................................... 29 - - - - - - -Freed & Borenstein Standards Track [Page 2] - -RFC 2045 Internet Message Bodies November 1996 - - -1. Introduction - - Since its publication in 1982, RFC 822 has defined the standard - format of textual mail messages on the Internet. Its success has - been such that the RFC 822 format has been adopted, wholly or - partially, well beyond the confines of the Internet and the Internet - SMTP transport defined by RFC 821. As the format has seen wider use, - a number of limitations have proven increasingly restrictive for the - user community. - - RFC 822 was intended to specify a format for text messages. As such, - non-text messages, such as multimedia messages that might include - audio or images, are simply not mentioned. Even in the case of text, - however, RFC 822 is inadequate for the needs of mail users whose - languages require the use of character sets richer than US-ASCII. - Since RFC 822 does not specify mechanisms for mail containing audio, - video, Asian language text, or even text in most European languages, - additional specifications are needed. - - One of the notable limitations of RFC 821/822 based mail systems is - the fact that they limit the contents of electronic mail messages to - relatively short lines (e.g. 1000 characters or less [RFC-821]) of - 7bit US-ASCII. This forces users to convert any non-textual data - that they may wish to send into seven-bit bytes representable as - printable US-ASCII characters before invoking a local mail UA (User - Agent, a program with which human users send and receive mail). - Examples of such encodings currently used in the Internet include - pure hexadecimal, uuencode, the 3-in-4 base 64 scheme specified in - RFC 1421, the Andrew Toolkit Representation [ATK], and many others. - - The limitations of RFC 822 mail become even more apparent as gateways - are designed to allow for the exchange of mail messages between RFC - 822 hosts and X.400 hosts. X.400 [X400] specifies mechanisms for the - inclusion of non-textual material within electronic mail messages. - The current standards for the mapping of X.400 messages to RFC 822 - messages specify either that X.400 non-textual material must be - converted to (not encoded in) IA5Text format, or that they must be - discarded, notifying the RFC 822 user that discarding has occurred. - This is clearly undesirable, as information that a user may wish to - receive is lost. Even though a user agent may not have the - capability of dealing with the non-textual material, the user might - have some mechanism external to the UA that can extract useful - information from the material. Moreover, it does not allow for the - fact that the message may eventually be gatewayed back into an X.400 - message handling system (i.e., the X.400 message is "tunneled" - through Internet mail), where the non-textual information would - definitely become useful again. - - - - -Freed & Borenstein Standards Track [Page 3] - -RFC 2045 Internet Message Bodies November 1996 - - - This document describes several mechanisms that combine to solve most - of these problems without introducing any serious incompatibilities - with the existing world of RFC 822 mail. In particular, it - describes: - - (1) A MIME-Version header field, which uses a version - number to declare a message to be conformant with MIME - and allows mail processing agents to distinguish - between such messages and those generated by older or - non-conformant software, which are presumed to lack - such a field. - - (2) A Content-Type header field, generalized from RFC 1049, - which can be used to specify the media type and subtype - of data in the body of a message and to fully specify - the native representation (canonical form) of such - data. - - (3) A Content-Transfer-Encoding header field, which can be - used to specify both the encoding transformation that - was applied to the body and the domain of the result. - Encoding transformations other than the identity - transformation are usually applied to data in order to - allow it to pass through mail transport mechanisms - which may have data or character set limitations. - - (4) Two additional header fields that can be used to - further describe the data in a body, the Content-ID and - Content-Description header fields. - - All of the header fields defined in this document are subject to the - general syntactic rules for header fields specified in RFC 822. In - particular, all of these header fields except for Content-Disposition - can include RFC 822 comments, which have no semantic content and - should be ignored during MIME processing. - - Finally, to specify and promote interoperability, RFC 2049 provides a - basic applicability statement for a subset of the above mechanisms - that defines a minimal level of "conformance" with this document. - - HISTORICAL NOTE: Several of the mechanisms described in this set of - documents may seem somewhat strange or even baroque at first reading. - It is important to note that compatibility with existing standards - AND robustness across existing practice were two of the highest - priorities of the working group that developed this set of documents. - In particular, compatibility was always favored over elegance. - - - - - -Freed & Borenstein Standards Track [Page 4] - -RFC 2045 Internet Message Bodies November 1996 - - - Please refer to the current edition of the "Internet Official - Protocol Standards" for the standardization state and status of this - protocol. RFC 822 and STD 3, RFC 1123 also provide essential - background for MIME since no conforming implementation of MIME can - violate them. In addition, several other informational RFC documents - will be of interest to the MIME implementor, in particular RFC 1344, - RFC 1345, and RFC 1524. - -2. Definitions, Conventions, and Generic BNF Grammar - - Although the mechanisms specified in this set of documents are all - described in prose, most are also described formally in the augmented - BNF notation of RFC 822. Implementors will need to be familiar with - this notation in order to understand this set of documents, and are - referred to RFC 822 for a complete explanation of the augmented BNF - notation. - - Some of the augmented BNF in this set of documents makes named - references to syntax rules defined in RFC 822. A complete formal - grammar, then, is obtained by combining the collected grammar - appendices in each document in this set with the BNF of RFC 822 plus - the modifications to RFC 822 defined in RFC 1123 (which specifically - changes the syntax for `return', `date' and `mailbox'). - - All numeric and octet values are given in decimal notation in this - set of documents. All media type values, subtype values, and - parameter names as defined are case-insensitive. However, parameter - values are case-sensitive unless otherwise specified for the specific - parameter. - - FORMATTING NOTE: Notes, such at this one, provide additional - nonessential information which may be skipped by the reader without - missing anything essential. The primary purpose of these non- - essential notes is to convey information about the rationale of this - set of documents, or to place these documents in the proper - historical or evolutionary context. Such information may in - particular be skipped by those who are focused entirely on building a - conformant implementation, but may be of use to those who wish to - understand why certain design choices were made. - -2.1. CRLF - - The term CRLF, in this set of documents, refers to the sequence of - octets corresponding to the two US-ASCII characters CR (decimal value - 13) and LF (decimal value 10) which, taken together, in this order, - denote a line break in RFC 822 mail. - - - - - -Freed & Borenstein Standards Track [Page 5] - -RFC 2045 Internet Message Bodies November 1996 - - -2.2. Character Set - - The term "character set" is used in MIME to refer to a method of - converting a sequence of octets into a sequence of characters. Note - that unconditional and unambiguous conversion in the other direction - is not required, in that not all characters may be representable by a - given character set and a character set may provide more than one - sequence of octets to represent a particular sequence of characters. - - This definition is intended to allow various kinds of character - encodings, from simple single-table mappings such as US-ASCII to - complex table switching methods such as those that use ISO 2022's - techniques, to be used as character sets. However, the definition - associated with a MIME character set name must fully specify the - mapping to be performed. In particular, use of external profiling - information to determine the exact mapping is not permitted. - - NOTE: The term "character set" was originally to describe such - straightforward schemes as US-ASCII and ISO-8859-1 which have a - simple one-to-one mapping from single octets to single characters. - Multi-octet coded character sets and switching techniques make the - situation more complex. For example, some communities use the term - "character encoding" for what MIME calls a "character set", while - using the phrase "coded character set" to denote an abstract mapping - from integers (not octets) to characters. - -2.3. Message - - The term "message", when not further qualified, means either a - (complete or "top-level") RFC 822 message being transferred on a - network, or a message encapsulated in a body of type "message/rfc822" - or "message/partial". - -2.4. Entity - - The term "entity", refers specifically to the MIME-defined header - fields and contents of either a message or one of the parts in the - body of a multipart entity. The specification of such entities is - the essence of MIME. Since the contents of an entity are often - called the "body", it makes sense to speak about the body of an - entity. Any sort of field may be present in the header of an entity, - but only those fields whose names begin with "content-" actually have - any MIME-related meaning. Note that this does NOT imply thay they - have no meaning at all -- an entity that is also a message has non- - MIME header fields whose meanings are defined by RFC 822. - - - - - - -Freed & Borenstein Standards Track [Page 6] - -RFC 2045 Internet Message Bodies November 1996 - - -2.5. Body Part - - The term "body part" refers to an entity inside of a multipart - entity. - -2.6. Body - - The term "body", when not further qualified, means the body of an - entity, that is, the body of either a message or of a body part. - - NOTE: The previous four definitions are clearly circular. This is - unavoidable, since the overall structure of a MIME message is indeed - recursive. - -2.7. 7bit Data - - "7bit data" refers to data that is all represented as relatively - short lines with 998 octets or less between CRLF line separation - sequences [RFC-821]. No octets with decimal values greater than 127 - are allowed and neither are NULs (octets with decimal value 0). CR - (decimal value 13) and LF (decimal value 10) octets only occur as - part of CRLF line separation sequences. - -2.8. 8bit Data - - "8bit data" refers to data that is all represented as relatively - short lines with 998 octets or less between CRLF line separation - sequences [RFC-821]), but octets with decimal values greater than 127 - may be used. As with "7bit data" CR and LF octets only occur as part - of CRLF line separation sequences and no NULs are allowed. - -2.9. Binary Data - - "Binary data" refers to data where any sequence of octets whatsoever - is allowed. - -2.10. Lines - - "Lines" are defined as sequences of octets separated by a CRLF - sequences. This is consistent with both RFC 821 and RFC 822. - "Lines" only refers to a unit of data in a message, which may or may - not correspond to something that is actually displayed by a user - agent. - - - - - - - - -Freed & Borenstein Standards Track [Page 7] - -RFC 2045 Internet Message Bodies November 1996 - - -3. MIME Header Fields - - MIME defines a number of new RFC 822 header fields that are used to - describe the content of a MIME entity. These header fields occur in - at least two contexts: - - (1) As part of a regular RFC 822 message header. - - (2) In a MIME body part header within a multipart - construct. - - The formal definition of these header fields is as follows: - - entity-headers := [ content CRLF ] - [ encoding CRLF ] - [ id CRLF ] - [ description CRLF ] - *( MIME-extension-field CRLF ) - - MIME-message-headers := entity-headers - fields - version CRLF - ; The ordering of the header - ; fields implied by this BNF - ; definition should be ignored. - - MIME-part-headers := entity-headers - [ fields ] - ; Any field not beginning with - ; "content-" can have no defined - ; meaning and may be ignored. - ; The ordering of the header - ; fields implied by this BNF - ; definition should be ignored. - - The syntax of the various specific MIME header fields will be - described in the following sections. - -4. MIME-Version Header Field - - Since RFC 822 was published in 1982, there has really been only one - format standard for Internet messages, and there has been little - perceived need to declare the format standard in use. This document - is an independent specification that complements RFC 822. Although - the extensions in this document have been defined in such a way as to - be compatible with RFC 822, there are still circumstances in which it - might be desirable for a mail-processing agent to know whether a - message was composed with the new standard in mind. - - - -Freed & Borenstein Standards Track [Page 8] - -RFC 2045 Internet Message Bodies November 1996 - - - Therefore, this document defines a new header field, "MIME-Version", - which is to be used to declare the version of the Internet message - body format standard in use. - - Messages composed in accordance with this document MUST include such - a header field, with the following verbatim text: - - MIME-Version: 1.0 - - The presence of this header field is an assertion that the message - has been composed in compliance with this document. - - Since it is possible that a future document might extend the message - format standard again, a formal BNF is given for the content of the - MIME-Version field: - - version := "MIME-Version" ":" 1*DIGIT "." 1*DIGIT - - Thus, future format specifiers, which might replace or extend "1.0", - are constrained to be two integer fields, separated by a period. If - a message is received with a MIME-version value other than "1.0", it - cannot be assumed to conform with this document. - - Note that the MIME-Version header field is required at the top level - of a message. It is not required for each body part of a multipart - entity. It is required for the embedded headers of a body of type - "message/rfc822" or "message/partial" if and only if the embedded - message is itself claimed to be MIME-conformant. - - It is not possible to fully specify how a mail reader that conforms - with MIME as defined in this document should treat a message that - might arrive in the future with some value of MIME-Version other than - "1.0". - - It is also worth noting that version control for specific media types - is not accomplished using the MIME-Version mechanism. In particular, - some formats (such as application/postscript) have version numbering - conventions that are internal to the media format. Where such - conventions exist, MIME does nothing to supersede them. Where no - such conventions exist, a MIME media type might use a "version" - parameter in the content-type field if necessary. - - - - - - - - - - -Freed & Borenstein Standards Track [Page 9] - -RFC 2045 Internet Message Bodies November 1996 - - - NOTE TO IMPLEMENTORS: When checking MIME-Version values any RFC 822 - comment strings that are present must be ignored. In particular, the - following four MIME-Version fields are equivalent: - - MIME-Version: 1.0 - - MIME-Version: 1.0 (produced by MetaSend Vx.x) - - MIME-Version: (produced by MetaSend Vx.x) 1.0 - - MIME-Version: 1.(produced by MetaSend Vx.x)0 - - In the absence of a MIME-Version field, a receiving mail user agent - (whether conforming to MIME requirements or not) may optionally - choose to interpret the body of the message according to local - conventions. Many such conventions are currently in use and it - should be noted that in practice non-MIME messages can contain just - about anything. - - It is impossible to be certain that a non-MIME mail message is - actually plain text in the US-ASCII character set since it might well - be a message that, using some set of nonstandard local conventions - that predate MIME, includes text in another character set or non- - textual data presented in a manner that cannot be automatically - recognized (e.g., a uuencoded compressed UNIX tar file). - -5. Content-Type Header Field - - The purpose of the Content-Type field is to describe the data - contained in the body fully enough that the receiving user agent can - pick an appropriate agent or mechanism to present the data to the - user, or otherwise deal with the data in an appropriate manner. The - value in this field is called a media type. - - HISTORICAL NOTE: The Content-Type header field was first defined in - RFC 1049. RFC 1049 used a simpler and less powerful syntax, but one - that is largely compatible with the mechanism given here. - - The Content-Type header field specifies the nature of the data in the - body of an entity by giving media type and subtype identifiers, and - by providing auxiliary information that may be required for certain - media types. After the media type and subtype names, the remainder - of the header field is simply a set of parameters, specified in an - attribute=value notation. The ordering of parameters is not - significant. - - - - - - -Freed & Borenstein Standards Track [Page 10] - -RFC 2045 Internet Message Bodies November 1996 - - - In general, the top-level media type is used to declare the general - type of data, while the subtype specifies a specific format for that - type of data. Thus, a media type of "image/xyz" is enough to tell a - user agent that the data is an image, even if the user agent has no - knowledge of the specific image format "xyz". Such information can - be used, for example, to decide whether or not to show a user the raw - data from an unrecognized subtype -- such an action might be - reasonable for unrecognized subtypes of text, but not for - unrecognized subtypes of image or audio. For this reason, registered - subtypes of text, image, audio, and video should not contain embedded - information that is really of a different type. Such compound - formats should be represented using the "multipart" or "application" - types. - - Parameters are modifiers of the media subtype, and as such do not - fundamentally affect the nature of the content. The set of - meaningful parameters depends on the media type and subtype. Most - parameters are associated with a single specific subtype. However, a - given top-level media type may define parameters which are applicable - to any subtype of that type. Parameters may be required by their - defining content type or subtype or they may be optional. MIME - implementations must ignore any parameters whose names they do not - recognize. - - For example, the "charset" parameter is applicable to any subtype of - "text", while the "boundary" parameter is required for any subtype of - the "multipart" media type. - - There are NO globally-meaningful parameters that apply to all media - types. Truly global mechanisms are best addressed, in the MIME - model, by the definition of additional Content-* header fields. - - An initial set of seven top-level media types is defined in RFC 2046. - Five of these are discrete types whose content is essentially opaque - as far as MIME processing is concerned. The remaining two are - composite types whose contents require additional handling by MIME - processors. - - This set of top-level media types is intended to be substantially - complete. It is expected that additions to the larger set of - supported types can generally be accomplished by the creation of new - subtypes of these initial types. In the future, more top-level types - may be defined only by a standards-track extension to this standard. - If another top-level type is to be used for any reason, it must be - given a name starting with "X-" to indicate its non-standard status - and to avoid a potential conflict with a future official name. - - - - - -Freed & Borenstein Standards Track [Page 11] - -RFC 2045 Internet Message Bodies November 1996 - - -5.1. Syntax of the Content-Type Header Field - - In the Augmented BNF notation of RFC 822, a Content-Type header field - value is defined as follows: - - content := "Content-Type" ":" type "/" subtype - *(";" parameter) - ; Matching of media type and subtype - ; is ALWAYS case-insensitive. - - type := discrete-type / composite-type - - discrete-type := "text" / "image" / "audio" / "video" / - "application" / extension-token - - composite-type := "message" / "multipart" / extension-token - - extension-token := ietf-token / x-token - - ietf-token := - - x-token := - - subtype := extension-token / iana-token - - iana-token := - - parameter := attribute "=" value - - attribute := token - ; Matching of attributes - ; is ALWAYS case-insensitive. - - value := token / quoted-string - - token := 1* - - tspecials := "(" / ")" / "<" / ">" / "@" / - "," / ";" / ":" / "\" / <"> - "/" / "[" / "]" / "?" / "=" - ; Must be in quoted-string, - ; to use within parameter values - - - -Freed & Borenstein Standards Track [Page 12] - -RFC 2045 Internet Message Bodies November 1996 - - - Note that the definition of "tspecials" is the same as the RFC 822 - definition of "specials" with the addition of the three characters - "/", "?", and "=", and the removal of ".". - - Note also that a subtype specification is MANDATORY -- it may not be - omitted from a Content-Type header field. As such, there are no - default subtypes. - - The type, subtype, and parameter names are not case sensitive. For - example, TEXT, Text, and TeXt are all equivalent top-level media - types. Parameter values are normally case sensitive, but sometimes - are interpreted in a case-insensitive fashion, depending on the - intended use. (For example, multipart boundaries are case-sensitive, - but the "access-type" parameter for message/External-body is not - case-sensitive.) - - Note that the value of a quoted string parameter does not include the - quotes. That is, the quotation marks in a quoted-string are not a - part of the value of the parameter, but are merely used to delimit - that parameter value. In addition, comments are allowed in - accordance with RFC 822 rules for structured header fields. Thus the - following two forms - - Content-type: text/plain; charset=us-ascii (Plain text) - - Content-type: text/plain; charset="us-ascii" - - are completely equivalent. - - Beyond this syntax, the only syntactic constraint on the definition - of subtype names is the desire that their uses must not conflict. - That is, it would be undesirable to have two different communities - using "Content-Type: application/foobar" to mean two different - things. The process of defining new media subtypes, then, is not - intended to be a mechanism for imposing restrictions, but simply a - mechanism for publicizing their definition and usage. There are, - therefore, two acceptable mechanisms for defining new media subtypes: - - (1) Private values (starting with "X-") may be defined - bilaterally between two cooperating agents without - outside registration or standardization. Such values - cannot be registered or standardized. - - (2) New standard values should be registered with IANA as - described in RFC 2048. - - The second document in this set, RFC 2046, defines the initial set of - media types for MIME. - - - -Freed & Borenstein Standards Track [Page 13] - -RFC 2045 Internet Message Bodies November 1996 - - -5.2. Content-Type Defaults - - Default RFC 822 messages without a MIME Content-Type header are taken - by this protocol to be plain text in the US-ASCII character set, - which can be explicitly specified as: - - Content-type: text/plain; charset=us-ascii - - This default is assumed if no Content-Type header field is specified. - It is also recommend that this default be assumed when a - syntactically invalid Content-Type header field is encountered. In - the presence of a MIME-Version header field and the absence of any - Content-Type header field, a receiving User Agent can also assume - that plain US-ASCII text was the sender's intent. Plain US-ASCII - text may still be assumed in the absence of a MIME-Version or the - presence of an syntactically invalid Content-Type header field, but - the sender's intent might have been otherwise. - -6. Content-Transfer-Encoding Header Field - - Many media types which could be usefully transported via email are - represented, in their "natural" format, as 8bit character or binary - data. Such data cannot be transmitted over some transfer protocols. - For example, RFC 821 (SMTP) restricts mail messages to 7bit US-ASCII - data with lines no longer than 1000 characters including any trailing - CRLF line separator. - - It is necessary, therefore, to define a standard mechanism for - encoding such data into a 7bit short line format. Proper labelling - of unencoded material in less restrictive formats for direct use over - less restrictive transports is also desireable. This document - specifies that such encodings will be indicated by a new "Content- - Transfer-Encoding" header field. This field has not been defined by - any previous standard. - -6.1. Content-Transfer-Encoding Syntax - - The Content-Transfer-Encoding field's value is a single token - specifying the type of encoding, as enumerated below. Formally: - - encoding := "Content-Transfer-Encoding" ":" mechanism - - mechanism := "7bit" / "8bit" / "binary" / - "quoted-printable" / "base64" / - ietf-token / x-token - - These values are not case sensitive -- Base64 and BASE64 and bAsE64 - are all equivalent. An encoding type of 7BIT requires that the body - - - -Freed & Borenstein Standards Track [Page 14] - -RFC 2045 Internet Message Bodies November 1996 - - - is already in a 7bit mail-ready representation. This is the default - value -- that is, "Content-Transfer-Encoding: 7BIT" is assumed if the - Content-Transfer-Encoding header field is not present. - -6.2. Content-Transfer-Encodings Semantics - - This single Content-Transfer-Encoding token actually provides two - pieces of information. It specifies what sort of encoding - transformation the body was subjected to and hence what decoding - operation must be used to restore it to its original form, and it - specifies what the domain of the result is. - - The transformation part of any Content-Transfer-Encodings specifies, - either explicitly or implicitly, a single, well-defined decoding - algorithm, which for any sequence of encoded octets either transforms - it to the original sequence of octets which was encoded, or shows - that it is illegal as an encoded sequence. Content-Transfer- - Encodings transformations never depend on any additional external - profile information for proper operation. Note that while decoders - must produce a single, well-defined output for a valid encoding no - such restrictions exist for encoders: Encoding a given sequence of - octets to different, equivalent encoded sequences is perfectly legal. - - Three transformations are currently defined: identity, the "quoted- - printable" encoding, and the "base64" encoding. The domains are - "binary", "8bit" and "7bit". - - The Content-Transfer-Encoding values "7bit", "8bit", and "binary" all - mean that the identity (i.e. NO) encoding transformation has been - performed. As such, they serve simply as indicators of the domain of - the body data, and provide useful information about the sort of - encoding that might be needed for transmission in a given transport - system. The terms "7bit data", "8bit data", and "binary data" are - all defined in Section 2. - - The quoted-printable and base64 encodings transform their input from - an arbitrary domain into material in the "7bit" range, thus making it - safe to carry over restricted transports. The specific definition of - the transformations are given below. - - The proper Content-Transfer-Encoding label must always be used. - Labelling unencoded data containing 8bit characters as "7bit" is not - allowed, nor is labelling unencoded non-line-oriented data as - anything other than "binary" allowed. - - Unlike media subtypes, a proliferation of Content-Transfer-Encoding - values is both undesirable and unnecessary. However, establishing - only a single transformation into the "7bit" domain does not seem - - - -Freed & Borenstein Standards Track [Page 15] - -RFC 2045 Internet Message Bodies November 1996 - - - possible. There is a tradeoff between the desire for a compact and - efficient encoding of largely- binary data and the desire for a - somewhat readable encoding of data that is mostly, but not entirely, - 7bit. For this reason, at least two encoding mechanisms are - necessary: a more or less readable encoding (quoted-printable) and a - "dense" or "uniform" encoding (base64). - - Mail transport for unencoded 8bit data is defined in RFC 1652. As of - the initial publication of this document, there are no standardized - Internet mail transports for which it is legitimate to include - unencoded binary data in mail bodies. Thus there are no - circumstances in which the "binary" Content-Transfer-Encoding is - actually valid in Internet mail. However, in the event that binary - mail transport becomes a reality in Internet mail, or when MIME is - used in conjunction with any other binary-capable mail transport - mechanism, binary bodies must be labelled as such using this - mechanism. - - NOTE: The five values defined for the Content-Transfer-Encoding field - imply nothing about the media type other than the algorithm by which - it was encoded or the transport system requirements if unencoded. - -6.3. New Content-Transfer-Encodings - - Implementors may, if necessary, define private Content-Transfer- - Encoding values, but must use an x-token, which is a name prefixed by - "X-", to indicate its non-standard status, e.g., "Content-Transfer- - Encoding: x-my-new-encoding". Additional standardized Content- - Transfer-Encoding values must be specified by a standards-track RFC. - The requirements such specifications must meet are given in RFC 2048. - As such, all content-transfer-encoding namespace except that - beginning with "X-" is explicitly reserved to the IETF for future - use. - - Unlike media types and subtypes, the creation of new Content- - Transfer-Encoding values is STRONGLY discouraged, as it seems likely - to hinder interoperability with little potential benefit - -6.4. Interpretation and Use - - If a Content-Transfer-Encoding header field appears as part of a - message header, it applies to the entire body of that message. If a - Content-Transfer-Encoding header field appears as part of an entity's - headers, it applies only to the body of that entity. If an entity is - of type "multipart" the Content-Transfer-Encoding is not permitted to - have any value other than "7bit", "8bit" or "binary". Even more - severe restrictions apply to some subtypes of the "message" type. - - - - -Freed & Borenstein Standards Track [Page 16] - -RFC 2045 Internet Message Bodies November 1996 - - - It should be noted that most media types are defined in terms of - octets rather than bits, so that the mechanisms described here are - mechanisms for encoding arbitrary octet streams, not bit streams. If - a bit stream is to be encoded via one of these mechanisms, it must - first be converted to an 8bit byte stream using the network standard - bit order ("big-endian"), in which the earlier bits in a stream - become the higher-order bits in a 8bit byte. A bit stream not ending - at an 8bit boundary must be padded with zeroes. RFC 2046 provides a - mechanism for noting the addition of such padding in the case of the - application/octet-stream media type, which has a "padding" parameter. - - The encoding mechanisms defined here explicitly encode all data in - US-ASCII. Thus, for example, suppose an entity has header fields - such as: - - Content-Type: text/plain; charset=ISO-8859-1 - Content-transfer-encoding: base64 - - This must be interpreted to mean that the body is a base64 US-ASCII - encoding of data that was originally in ISO-8859-1, and will be in - that character set again after decoding. - - Certain Content-Transfer-Encoding values may only be used on certain - media types. In particular, it is EXPRESSLY FORBIDDEN to use any - encodings other than "7bit", "8bit", or "binary" with any composite - media type, i.e. one that recursively includes other Content-Type - fields. Currently the only composite media types are "multipart" and - "message". All encodings that are desired for bodies of type - multipart or message must be done at the innermost level, by encoding - the actual body that needs to be encoded. - - It should also be noted that, by definition, if a composite entity - has a transfer-encoding value such as "7bit", but one of the enclosed - entities has a less restrictive value such as "8bit", then either the - outer "7bit" labelling is in error, because 8bit data are included, - or the inner "8bit" labelling placed an unnecessarily high demand on - the transport system because the actual included data were actually - 7bit-safe. - - NOTE ON ENCODING RESTRICTIONS: Though the prohibition against using - content-transfer-encodings on composite body data may seem overly - restrictive, it is necessary to prevent nested encodings, in which - data are passed through an encoding algorithm multiple times, and - must be decoded multiple times in order to be properly viewed. - Nested encodings add considerable complexity to user agents: Aside - from the obvious efficiency problems with such multiple encodings, - they can obscure the basic structure of a message. In particular, - they can imply that several decoding operations are necessary simply - - - -Freed & Borenstein Standards Track [Page 17] - -RFC 2045 Internet Message Bodies November 1996 - - - to find out what types of bodies a message contains. Banning nested - encodings may complicate the job of certain mail gateways, but this - seems less of a problem than the effect of nested encodings on user - agents. - - Any entity with an unrecognized Content-Transfer-Encoding must be - treated as if it has a Content-Type of "application/octet-stream", - regardless of what the Content-Type header field actually says. - - NOTE ON THE RELATIONSHIP BETWEEN CONTENT-TYPE AND CONTENT-TRANSFER- - ENCODING: It may seem that the Content-Transfer-Encoding could be - inferred from the characteristics of the media that is to be encoded, - or, at the very least, that certain Content-Transfer-Encodings could - be mandated for use with specific media types. There are several - reasons why this is not the case. First, given the varying types of - transports used for mail, some encodings may be appropriate for some - combinations of media types and transports but not for others. (For - example, in an 8bit transport, no encoding would be required for text - in certain character sets, while such encodings are clearly required - for 7bit SMTP.) - - Second, certain media types may require different types of transfer - encoding under different circumstances. For example, many PostScript - bodies might consist entirely of short lines of 7bit data and hence - require no encoding at all. Other PostScript bodies (especially - those using Level 2 PostScript's binary encoding mechanism) may only - be reasonably represented using a binary transport encoding. - Finally, since the Content-Type field is intended to be an open-ended - specification mechanism, strict specification of an association - between media types and encodings effectively couples the - specification of an application protocol with a specific lower-level - transport. This is not desirable since the developers of a media - type should not have to be aware of all the transports in use and - what their limitations are. - -6.5. Translating Encodings - - The quoted-printable and base64 encodings are designed so that - conversion between them is possible. The only issue that arises in - such a conversion is the handling of hard line breaks in quoted- - printable encoding output. When converting from quoted-printable to - base64 a hard line break in the quoted-printable form represents a - CRLF sequence in the canonical form of the data. It must therefore be - converted to a corresponding encoded CRLF in the base64 form of the - data. Similarly, a CRLF sequence in the canonical form of the data - obtained after base64 decoding must be converted to a quoted- - printable hard line break, but ONLY when converting text data. - - - - -Freed & Borenstein Standards Track [Page 18] - -RFC 2045 Internet Message Bodies November 1996 - - -6.6. Canonical Encoding Model - - There was some confusion, in the previous versions of this RFC, - regarding the model for when email data was to be converted to - canonical form and encoded, and in particular how this process would - affect the treatment of CRLFs, given that the representation of - newlines varies greatly from system to system, and the relationship - between content-transfer-encodings and character sets. A canonical - model for encoding is presented in RFC 2049 for this reason. - -6.7. Quoted-Printable Content-Transfer-Encoding - - The Quoted-Printable encoding is intended to represent data that - largely consists of octets that correspond to printable characters in - the US-ASCII character set. It encodes the data in such a way that - the resulting octets are unlikely to be modified by mail transport. - If the data being encoded are mostly US-ASCII text, the encoded form - of the data remains largely recognizable by humans. A body which is - entirely US-ASCII may also be encoded in Quoted-Printable to ensure - the integrity of the data should the message pass through a - character-translating, and/or line-wrapping gateway. - - In this encoding, octets are to be represented as determined by the - following rules: - - (1) (General 8bit representation) Any octet, except a CR or - LF that is part of a CRLF line break of the canonical - (standard) form of the data being encoded, may be - represented by an "=" followed by a two digit - hexadecimal representation of the octet's value. The - digits of the hexadecimal alphabet, for this purpose, - are "0123456789ABCDEF". Uppercase letters must be - used; lowercase letters are not allowed. Thus, for - example, the decimal value 12 (US-ASCII form feed) can - be represented by "=0C", and the decimal value 61 (US- - ASCII EQUAL SIGN) can be represented by "=3D". This - rule must be followed except when the following rules - allow an alternative encoding. - - (2) (Literal representation) Octets with decimal values of - 33 through 60 inclusive, and 62 through 126, inclusive, - MAY be represented as the US-ASCII characters which - correspond to those octets (EXCLAMATION POINT through - LESS THAN, and GREATER THAN through TILDE, - respectively). - - (3) (White Space) Octets with values of 9 and 32 MAY be - represented as US-ASCII TAB (HT) and SPACE characters, - - - -Freed & Borenstein Standards Track [Page 19] - -RFC 2045 Internet Message Bodies November 1996 - - - respectively, but MUST NOT be so represented at the end - of an encoded line. Any TAB (HT) or SPACE characters - on an encoded line MUST thus be followed on that line - by a printable character. In particular, an "=" at the - end of an encoded line, indicating a soft line break - (see rule #5) may follow one or more TAB (HT) or SPACE - characters. It follows that an octet with decimal - value 9 or 32 appearing at the end of an encoded line - must be represented according to Rule #1. This rule is - necessary because some MTAs (Message Transport Agents, - programs which transport messages from one user to - another, or perform a portion of such transfers) are - known to pad lines of text with SPACEs, and others are - known to remove "white space" characters from the end - of a line. Therefore, when decoding a Quoted-Printable - body, any trailing white space on a line must be - deleted, as it will necessarily have been added by - intermediate transport agents. - - (4) (Line Breaks) A line break in a text body, represented - as a CRLF sequence in the text canonical form, must be - represented by a (RFC 822) line break, which is also a - CRLF sequence, in the Quoted-Printable encoding. Since - the canonical representation of media types other than - text do not generally include the representation of - line breaks as CRLF sequences, no hard line breaks - (i.e. line breaks that are intended to be meaningful - and to be displayed to the user) can occur in the - quoted-printable encoding of such types. Sequences - like "=0D", "=0A", "=0A=0D" and "=0D=0A" will routinely - appear in non-text data represented in quoted- - printable, of course. - - Note that many implementations may elect to encode the - local representation of various content types directly - rather than converting to canonical form first, - encoding, and then converting back to local - representation. In particular, this may apply to plain - text material on systems that use newline conventions - other than a CRLF terminator sequence. Such an - implementation optimization is permissible, but only - when the combined canonicalization-encoding step is - equivalent to performing the three steps separately. - - (5) (Soft Line Breaks) The Quoted-Printable encoding - REQUIRES that encoded lines be no more than 76 - characters long. If longer lines are to be encoded - with the Quoted-Printable encoding, "soft" line breaks - - - -Freed & Borenstein Standards Track [Page 20] - -RFC 2045 Internet Message Bodies November 1996 - - - must be used. An equal sign as the last character on a - encoded line indicates such a non-significant ("soft") - line break in the encoded text. - - Thus if the "raw" form of the line is a single unencoded line that - says: - - Now's the time for all folk to come to the aid of their country. - - This can be represented, in the Quoted-Printable encoding, as: - - Now's the time = - for all folk to come= - to the aid of their country. - - This provides a mechanism with which long lines are encoded in such a - way as to be restored by the user agent. The 76 character limit does - not count the trailing CRLF, but counts all other characters, - including any equal signs. - - Since the hyphen character ("-") may be represented as itself in the - Quoted-Printable encoding, care must be taken, when encapsulating a - quoted-printable encoded body inside one or more multipart entities, - to ensure that the boundary delimiter does not appear anywhere in the - encoded body. (A good strategy is to choose a boundary that includes - a character sequence such as "=_" which can never appear in a - quoted-printable body. See the definition of multipart messages in - RFC 2046.) - - NOTE: The quoted-printable encoding represents something of a - compromise between readability and reliability in transport. Bodies - encoded with the quoted-printable encoding will work reliably over - most mail gateways, but may not work perfectly over a few gateways, - notably those involving translation into EBCDIC. A higher level of - confidence is offered by the base64 Content-Transfer-Encoding. A way - to get reasonably reliable transport through EBCDIC gateways is to - also quote the US-ASCII characters - - !"#$@[\]^`{|}~ - - according to rule #1. - - Because quoted-printable data is generally assumed to be line- - oriented, it is to be expected that the representation of the breaks - between the lines of quoted-printable data may be altered in - transport, in the same manner that plain text mail has always been - altered in Internet mail when passing between systems with differing - newline conventions. If such alterations are likely to constitute a - - - -Freed & Borenstein Standards Track [Page 21] - -RFC 2045 Internet Message Bodies November 1996 - - - corruption of the data, it is probably more sensible to use the - base64 encoding rather than the quoted-printable encoding. - - NOTE: Several kinds of substrings cannot be generated according to - the encoding rules for the quoted-printable content-transfer- - encoding, and hence are formally illegal if they appear in the output - of a quoted-printable encoder. This note enumerates these cases and - suggests ways to handle such illegal substrings if any are - encountered in quoted-printable data that is to be decoded. - - (1) An "=" followed by two hexadecimal digits, one or both - of which are lowercase letters in "abcdef", is formally - illegal. A robust implementation might choose to - recognize them as the corresponding uppercase letters. - - (2) An "=" followed by a character that is neither a - hexadecimal digit (including "abcdef") nor the CR - character of a CRLF pair is illegal. This case can be - the result of US-ASCII text having been included in a - quoted-printable part of a message without itself - having been subjected to quoted-printable encoding. A - reasonable approach by a robust implementation might be - to include the "=" character and the following - character in the decoded data without any - transformation and, if possible, indicate to the user - that proper decoding was not possible at this point in - the data. - - (3) An "=" cannot be the ultimate or penultimate character - in an encoded object. This could be handled as in case - (2) above. - - (4) Control characters other than TAB, or CR and LF as - parts of CRLF pairs, must not appear. The same is true - for octets with decimal values greater than 126. If - found in incoming quoted-printable data by a decoder, a - robust implementation might exclude them from the - decoded data and warn the user that illegal characters - were discovered. - - (5) Encoded lines must not be longer than 76 characters, - not counting the trailing CRLF. If longer lines are - found in incoming, encoded data, a robust - implementation might nevertheless decode the lines, and - might report the erroneous encoding to the user. - - - - - - -Freed & Borenstein Standards Track [Page 22] - -RFC 2045 Internet Message Bodies November 1996 - - - WARNING TO IMPLEMENTORS: If binary data is encoded in quoted- - printable, care must be taken to encode CR and LF characters as "=0D" - and "=0A", respectively. In particular, a CRLF sequence in binary - data should be encoded as "=0D=0A". Otherwise, if CRLF were - represented as a hard line break, it might be incorrectly decoded on - platforms with different line break conventions. - - For formalists, the syntax of quoted-printable data is described by - the following grammar: - - quoted-printable := qp-line *(CRLF qp-line) - - qp-line := *(qp-segment transport-padding CRLF) - qp-part transport-padding - - qp-part := qp-section - ; Maximum length of 76 characters - - qp-segment := qp-section *(SPACE / TAB) "=" - ; Maximum length of 76 characters - - qp-section := [*(ptext / SPACE / TAB) ptext] - - ptext := hex-octet / safe-char - - safe-char := - ; Characters not listed as "mail-safe" in - ; RFC 2049 are also not recommended. - - hex-octet := "=" 2(DIGIT / "A" / "B" / "C" / "D" / "E" / "F") - ; Octet must be used for characters > 127, =, - ; SPACEs or TABs at the ends of lines, and is - ; recommended for any character not listed in - ; RFC 2049 as "mail-safe". - - transport-padding := *LWSP-char - ; Composers MUST NOT generate - ; non-zero length transport - ; padding, but receivers MUST - ; be able to handle padding - ; added by message transports. - - IMPORTANT: The addition of LWSP between the elements shown in this - BNF is NOT allowed since this BNF does not specify a structured - header field. - - - - - -Freed & Borenstein Standards Track [Page 23] - -RFC 2045 Internet Message Bodies November 1996 - - -6.8. Base64 Content-Transfer-Encoding - - The Base64 Content-Transfer-Encoding is designed to represent - arbitrary sequences of octets in a form that need not be humanly - readable. The encoding and decoding algorithms are simple, but the - encoded data are consistently only about 33 percent larger than the - unencoded data. This encoding is virtually identical to the one used - in Privacy Enhanced Mail (PEM) applications, as defined in RFC 1421. - - A 65-character subset of US-ASCII is used, enabling 6 bits to be - represented per printable character. (The extra 65th character, "=", - is used to signify a special processing function.) - - NOTE: This subset has the important property that it is represented - identically in all versions of ISO 646, including US-ASCII, and all - characters in the subset are also represented identically in all - versions of EBCDIC. Other popular encodings, such as the encoding - used by the uuencode utility, Macintosh binhex 4.0 [RFC-1741], and - the base85 encoding specified as part of Level 2 PostScript, do not - share these properties, and thus do not fulfill the portability - requirements a binary transport encoding for mail must meet. - - The encoding process represents 24-bit groups of input bits as output - strings of 4 encoded characters. Proceeding from left to right, a - 24-bit input group is formed by concatenating 3 8bit input groups. - These 24 bits are then treated as 4 concatenated 6-bit groups, each - of which is translated into a single digit in the base64 alphabet. - When encoding a bit stream via the base64 encoding, the bit stream - must be presumed to be ordered with the most-significant-bit first. - That is, the first bit in the stream will be the high-order bit in - the first 8bit byte, and the eighth bit will be the low-order bit in - the first 8bit byte, and so on. - - Each 6-bit group is used as an index into an array of 64 printable - characters. The character referenced by the index is placed in the - output string. These characters, identified in Table 1, below, are - selected so as to be universally representable, and the set excludes - characters with particular significance to SMTP (e.g., ".", CR, LF) - and to the multipart boundary delimiters defined in RFC 2046 (e.g., - "-"). - - - - - - - - - - - -Freed & Borenstein Standards Track [Page 24] - -RFC 2045 Internet Message Bodies November 1996 - - - Table 1: The Base64 Alphabet - - Value Encoding Value Encoding Value Encoding Value Encoding - 0 A 17 R 34 i 51 z - 1 B 18 S 35 j 52 0 - 2 C 19 T 36 k 53 1 - 3 D 20 U 37 l 54 2 - 4 E 21 V 38 m 55 3 - 5 F 22 W 39 n 56 4 - 6 G 23 X 40 o 57 5 - 7 H 24 Y 41 p 58 6 - 8 I 25 Z 42 q 59 7 - 9 J 26 a 43 r 60 8 - 10 K 27 b 44 s 61 9 - 11 L 28 c 45 t 62 + - 12 M 29 d 46 u 63 / - 13 N 30 e 47 v - 14 O 31 f 48 w (pad) = - 15 P 32 g 49 x - 16 Q 33 h 50 y - - The encoded output stream must be represented in lines of no more - than 76 characters each. All line breaks or other characters not - found in Table 1 must be ignored by decoding software. In base64 - data, characters other than those in Table 1, line breaks, and other - white space probably indicate a transmission error, about which a - warning message or even a message rejection might be appropriate - under some circumstances. - - Special processing is performed if fewer than 24 bits are available - at the end of the data being encoded. A full encoding quantum is - always completed at the end of a body. When fewer than 24 input bits - are available in an input group, zero bits are added (on the right) - to form an integral number of 6-bit groups. Padding at the end of - the data is performed using the "=" character. Since all base64 - input is an integral number of octets, only the following cases can - arise: (1) the final quantum of encoding input is an integral - multiple of 24 bits; here, the final unit of encoded output will be - an integral multiple of 4 characters with no "=" padding, (2) the - final quantum of encoding input is exactly 8 bits; here, the final - unit of encoded output will be two characters followed by two "=" - padding characters, or (3) the final quantum of encoding input is - exactly 16 bits; here, the final unit of encoded output will be three - characters followed by one "=" padding character. - - Because it is used only for padding at the end of the data, the - occurrence of any "=" characters may be taken as evidence that the - end of the data has been reached (without truncation in transit). No - - - -Freed & Borenstein Standards Track [Page 25] - -RFC 2045 Internet Message Bodies November 1996 - - - such assurance is possible, however, when the number of octets - transmitted was a multiple of three and no "=" characters are - present. - - Any characters outside of the base64 alphabet are to be ignored in - base64-encoded data. - - Care must be taken to use the proper octets for line breaks if base64 - encoding is applied directly to text material that has not been - converted to canonical form. In particular, text line breaks must be - converted into CRLF sequences prior to base64 encoding. The - important thing to note is that this may be done directly by the - encoder rather than in a prior canonicalization step in some - implementations. - - NOTE: There is no need to worry about quoting potential boundary - delimiters within base64-encoded bodies within multipart entities - because no hyphen characters are used in the base64 encoding. - -7. Content-ID Header Field - - In constructing a high-level user agent, it may be desirable to allow - one body to make reference to another. Accordingly, bodies may be - labelled using the "Content-ID" header field, which is syntactically - identical to the "Message-ID" header field: - - id := "Content-ID" ":" msg-id - - Like the Message-ID values, Content-ID values must be generated to be - world-unique. - - The Content-ID value may be used for uniquely identifying MIME - entities in several contexts, particularly for caching data - referenced by the message/external-body mechanism. Although the - Content-ID header is generally optional, its use is MANDATORY in - implementations which generate data of the optional MIME media type - "message/external-body". That is, each message/external-body entity - must have a Content-ID field to permit caching of such data. - - It is also worth noting that the Content-ID value has special - semantics in the case of the multipart/alternative media type. This - is explained in the section of RFC 2046 dealing with - multipart/alternative. - - - - - - - - -Freed & Borenstein Standards Track [Page 26] - -RFC 2045 Internet Message Bodies November 1996 - - -8. Content-Description Header Field - - The ability to associate some descriptive information with a given - body is often desirable. For example, it may be useful to mark an - "image" body as "a picture of the Space Shuttle Endeavor." Such text - may be placed in the Content-Description header field. This header - field is always optional. - - description := "Content-Description" ":" *text - - The description is presumed to be given in the US-ASCII character - set, although the mechanism specified in RFC 2047 may be used for - non-US-ASCII Content-Description values. - -9. Additional MIME Header Fields - - Future documents may elect to define additional MIME header fields - for various purposes. Any new header field that further describes - the content of a message should begin with the string "Content-" to - allow such fields which appear in a message header to be - distinguished from ordinary RFC 822 message header fields. - - MIME-extension-field := - -10. Summary - - Using the MIME-Version, Content-Type, and Content-Transfer-Encoding - header fields, it is possible to include, in a standardized way, - arbitrary types of data with RFC 822 conformant mail messages. No - restrictions imposed by either RFC 821 or RFC 822 are violated, and - care has been taken to avoid problems caused by additional - restrictions imposed by the characteristics of some Internet mail - transport mechanisms (see RFC 2049). - - The next document in this set, RFC 2046, specifies the initial set of - media types that can be labelled and transported using these headers. - -11. Security Considerations - - Security issues are discussed in the second document in this set, RFC - 2046. - - - - - - - - -Freed & Borenstein Standards Track [Page 27] - -RFC 2045 Internet Message Bodies November 1996 - - -12. Authors' Addresses - - For more information, the authors of this document are best contacted - via Internet mail: - - Ned Freed - Innosoft International, Inc. - 1050 East Garvey Avenue South - West Covina, CA 91790 - USA - - Phone: +1 818 919 3600 - Fax: +1 818 919 3614 - EMail: ned@innosoft.com - - - Nathaniel S. Borenstein - First Virtual Holdings - 25 Washington Avenue - Morristown, NJ 07960 - USA - - Phone: +1 201 540 8967 - Fax: +1 201 993 3032 - EMail: nsb@nsb.fv.com - - - MIME is a result of the work of the Internet Engineering Task Force - Working Group on RFC 822 Extensions. The chairman of that group, - Greg Vaudreuil, may be reached at: - - Gregory M. Vaudreuil - Octel Network Services - 17080 Dallas Parkway - Dallas, TX 75248-1905 - USA - - EMail: Greg.Vaudreuil@Octel.Com - - - - - - - - - - - - - -Freed & Borenstein Standards Track [Page 28] - -RFC 2045 Internet Message Bodies November 1996 - - -Appendix A -- Collected Grammar - - This appendix contains the complete BNF grammar for all the syntax - specified by this document. - - By itself, however, this grammar is incomplete. It refers by name to - several syntax rules that are defined by RFC 822. Rather than - reproduce those definitions here, and risk unintentional differences - between the two, this document simply refers the reader to RFC 822 - for the remaining definitions. Wherever a term is undefined, it - refers to the RFC 822 definition. - - attribute := token - ; Matching of attributes - ; is ALWAYS case-insensitive. - - composite-type := "message" / "multipart" / extension-token - - content := "Content-Type" ":" type "/" subtype - *(";" parameter) - ; Matching of media type and subtype - ; is ALWAYS case-insensitive. - - description := "Content-Description" ":" *text - - discrete-type := "text" / "image" / "audio" / "video" / - "application" / extension-token - - encoding := "Content-Transfer-Encoding" ":" mechanism - - entity-headers := [ content CRLF ] - [ encoding CRLF ] - [ id CRLF ] - [ description CRLF ] - *( MIME-extension-field CRLF ) - - extension-token := ietf-token / x-token - - hex-octet := "=" 2(DIGIT / "A" / "B" / "C" / "D" / "E" / "F") - ; Octet must be used for characters > 127, =, - ; SPACEs or TABs at the ends of lines, and is - ; recommended for any character not listed in - ; RFC 2049 as "mail-safe". - - iana-token := - - - - -Freed & Borenstein Standards Track [Page 29] - -RFC 2045 Internet Message Bodies November 1996 - - - ietf-token := - - id := "Content-ID" ":" msg-id - - mechanism := "7bit" / "8bit" / "binary" / - "quoted-printable" / "base64" / - ietf-token / x-token - - MIME-extension-field := - - MIME-message-headers := entity-headers - fields - version CRLF - ; The ordering of the header - ; fields implied by this BNF - ; definition should be ignored. - - MIME-part-headers := entity-headers - [fields] - ; Any field not beginning with - ; "content-" can have no defined - ; meaning and may be ignored. - ; The ordering of the header - ; fields implied by this BNF - ; definition should be ignored. - - parameter := attribute "=" value - - ptext := hex-octet / safe-char - - qp-line := *(qp-segment transport-padding CRLF) - qp-part transport-padding - - qp-part := qp-section - ; Maximum length of 76 characters - - qp-section := [*(ptext / SPACE / TAB) ptext] - - qp-segment := qp-section *(SPACE / TAB) "=" - ; Maximum length of 76 characters - - quoted-printable := qp-line *(CRLF qp-line) - - - - - -Freed & Borenstein Standards Track [Page 30] - -RFC 2045 Internet Message Bodies November 1996 - - - safe-char := - ; Characters not listed as "mail-safe" in - ; RFC 2049 are also not recommended. - - subtype := extension-token / iana-token - - token := 1* - - transport-padding := *LWSP-char - ; Composers MUST NOT generate - ; non-zero length transport - ; padding, but receivers MUST - ; be able to handle padding - ; added by message transports. - - tspecials := "(" / ")" / "<" / ">" / "@" / - "," / ";" / ":" / "\" / <"> - "/" / "[" / "]" / "?" / "=" - ; Must be in quoted-string, - ; to use within parameter values - - type := discrete-type / composite-type - - value := token / quoted-string - - version := "MIME-Version" ":" 1*DIGIT "." 1*DIGIT - - x-token := - - - - - - - - - - - - - - - - - - - - -Freed & Borenstein Standards Track [Page 31] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2046.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2046.txt deleted file mode 100644 index 84d90c10..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2046.txt +++ /dev/null @@ -1,2467 +0,0 @@ - - - - - - -Network Working Group N. Freed -Request for Comments: 2046 Innosoft -Obsoletes: 1521, 1522, 1590 N. Borenstein -Category: Standards Track First Virtual - November 1996 - - - Multipurpose Internet Mail Extensions - (MIME) Part Two: - Media Types - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Abstract - - STD 11, RFC 822 defines a message representation protocol specifying - considerable detail about US-ASCII message headers, but which leaves - the message content, or message body, as flat US-ASCII text. This - set of documents, collectively called the Multipurpose Internet Mail - Extensions, or MIME, redefines the format of messages to allow for - - (1) textual message bodies in character sets other than - US-ASCII, - - (2) an extensible set of different formats for non-textual - message bodies, - - (3) multi-part message bodies, and - - (4) textual header information in character sets other than - US-ASCII. - - These documents are based on earlier work documented in RFC 934, STD - 11, and RFC 1049, but extends and revises them. Because RFC 822 said - so little about message bodies, these documents are largely - orthogonal to (rather than a revision of) RFC 822. - - The initial document in this set, RFC 2045, specifies the various - headers used to describe the structure of MIME messages. This second - document defines the general structure of the MIME media typing - system and defines an initial set of media types. The third document, - RFC 2047, describes extensions to RFC 822 to allow non-US-ASCII text - - - -Freed & Borenstein Standards Track [Page 1] - -RFC 2046 Media Types November 1996 - - - data in Internet mail header fields. The fourth document, RFC 2048, - specifies various IANA registration procedures for MIME-related - facilities. The fifth and final document, RFC 2049, describes MIME - conformance criteria as well as providing some illustrative examples - of MIME message formats, acknowledgements, and the bibliography. - - These documents are revisions of RFCs 1521 and 1522, which themselves - were revisions of RFCs 1341 and 1342. An appendix in RFC 2049 - describes differences and changes from previous versions. - -Table of Contents - - 1. Introduction ......................................... 3 - 2. Definition of a Top-Level Media Type ................. 4 - 3. Overview Of The Initial Top-Level Media Types ........ 4 - 4. Discrete Media Type Values ........................... 6 - 4.1 Text Media Type ..................................... 6 - 4.1.1 Representation of Line Breaks ..................... 7 - 4.1.2 Charset Parameter ................................. 7 - 4.1.3 Plain Subtype ..................................... 11 - 4.1.4 Unrecognized Subtypes ............................. 11 - 4.2 Image Media Type .................................... 11 - 4.3 Audio Media Type .................................... 11 - 4.4 Video Media Type .................................... 12 - 4.5 Application Media Type .............................. 12 - 4.5.1 Octet-Stream Subtype .............................. 13 - 4.5.2 PostScript Subtype ................................ 14 - 4.5.3 Other Application Subtypes ........................ 17 - 5. Composite Media Type Values .......................... 17 - 5.1 Multipart Media Type ................................ 17 - 5.1.1 Common Syntax ..................................... 19 - 5.1.2 Handling Nested Messages and Multiparts ........... 24 - 5.1.3 Mixed Subtype ..................................... 24 - 5.1.4 Alternative Subtype ............................... 24 - 5.1.5 Digest Subtype .................................... 26 - 5.1.6 Parallel Subtype .................................. 27 - 5.1.7 Other Multipart Subtypes .......................... 28 - 5.2 Message Media Type .................................. 28 - 5.2.1 RFC822 Subtype .................................... 28 - 5.2.2 Partial Subtype ................................... 29 - 5.2.2.1 Message Fragmentation and Reassembly ............ 30 - 5.2.2.2 Fragmentation and Reassembly Example ............ 31 - 5.2.3 External-Body Subtype ............................. 33 - 5.2.4 Other Message Subtypes ............................ 40 - 6. Experimental Media Type Values ....................... 40 - 7. Summary .............................................. 41 - 8. Security Considerations .............................. 41 - 9. Authors' Addresses ................................... 42 - - - -Freed & Borenstein Standards Track [Page 2] - -RFC 2046 Media Types November 1996 - - - A. Collected Grammar .................................... 43 - -1. Introduction - - The first document in this set, RFC 2045, defines a number of header - fields, including Content-Type. The Content-Type field is used to - specify the nature of the data in the body of a MIME entity, by - giving media type and subtype identifiers, and by providing auxiliary - information that may be required for certain media types. After the - type and subtype names, the remainder of the header field is simply a - set of parameters, specified in an attribute/value notation. The - ordering of parameters is not significant. - - In general, the top-level media type is used to declare the general - type of data, while the subtype specifies a specific format for that - type of data. Thus, a media type of "image/xyz" is enough to tell a - user agent that the data is an image, even if the user agent has no - knowledge of the specific image format "xyz". Such information can - be used, for example, to decide whether or not to show a user the raw - data from an unrecognized subtype -- such an action might be - reasonable for unrecognized subtypes of "text", but not for - unrecognized subtypes of "image" or "audio". For this reason, - registered subtypes of "text", "image", "audio", and "video" should - not contain embedded information that is really of a different type. - Such compound formats should be represented using the "multipart" or - "application" types. - - Parameters are modifiers of the media subtype, and as such do not - fundamentally affect the nature of the content. The set of - meaningful parameters depends on the media type and subtype. Most - parameters are associated with a single specific subtype. However, a - given top-level media type may define parameters which are applicable - to any subtype of that type. Parameters may be required by their - defining media type or subtype or they may be optional. MIME - implementations must also ignore any parameters whose names they do - not recognize. - - MIME's Content-Type header field and media type mechanism has been - carefully designed to be extensible, and it is expected that the set - of media type/subtype pairs and their associated parameters will grow - significantly over time. Several other MIME facilities, such as - transfer encodings and "message/external-body" access types, are - likely to have new values defined over time. In order to ensure that - the set of such values is developed in an orderly, well-specified, - and public manner, MIME sets up a registration process which uses the - Internet Assigned Numbers Authority (IANA) as a central registry for - MIME's various areas of extensibility. The registration process for - these areas is described in a companion document, RFC 2048. - - - -Freed & Borenstein Standards Track [Page 3] - -RFC 2046 Media Types November 1996 - - - The initial seven standard top-level media type are defined and - described in the remainder of this document. - -2. Definition of a Top-Level Media Type - - The definition of a top-level media type consists of: - - (1) a name and a description of the type, including - criteria for whether a particular type would qualify - under that type, - - (2) the names and definitions of parameters, if any, which - are defined for all subtypes of that type (including - whether such parameters are required or optional), - - (3) how a user agent and/or gateway should handle unknown - subtypes of this type, - - (4) general considerations on gatewaying entities of this - top-level type, if any, and - - (5) any restrictions on content-transfer-encodings for - entities of this top-level type. - -3. Overview Of The Initial Top-Level Media Types - - The five discrete top-level media types are: - - (1) text -- textual information. The subtype "plain" in - particular indicates plain text containing no - formatting commands or directives of any sort. Plain - text is intended to be displayed "as-is". No special - software is required to get the full meaning of the - text, aside from support for the indicated character - set. Other subtypes are to be used for enriched text in - forms where application software may enhance the - appearance of the text, but such software must not be - required in order to get the general idea of the - content. Possible subtypes of "text" thus include any - word processor format that can be read without - resorting to software that understands the format. In - particular, formats that employ embeddded binary - formatting information are not considered directly - readable. A very simple and portable subtype, - "richtext", was defined in RFC 1341, with a further - revision in RFC 1896 under the name "enriched". - - - - - -Freed & Borenstein Standards Track [Page 4] - -RFC 2046 Media Types November 1996 - - - (2) image -- image data. "Image" requires a display device - (such as a graphical display, a graphics printer, or a - FAX machine) to view the information. An initial - subtype is defined for the widely-used image format - JPEG. . subtypes are defined for two widely-used image - formats, jpeg and gif. - - (3) audio -- audio data. "Audio" requires an audio output - device (such as a speaker or a telephone) to "display" - the contents. An initial subtype "basic" is defined in - this document. - - (4) video -- video data. "Video" requires the capability - to display moving images, typically including - specialized hardware and software. An initial subtype - "mpeg" is defined in this document. - - (5) application -- some other kind of data, typically - either uninterpreted binary data or information to be - processed by an application. The subtype "octet- - stream" is to be used in the case of uninterpreted - binary data, in which case the simplest recommended - action is to offer to write the information into a file - for the user. The "PostScript" subtype is also defined - for the transport of PostScript material. Other - expected uses for "application" include spreadsheets, - data for mail-based scheduling systems, and languages - for "active" (computational) messaging, and word - processing formats that are not directly readable. - Note that security considerations may exist for some - types of application data, most notably - "application/PostScript" and any form of active - messaging. These issues are discussed later in this - document. - - The two composite top-level media types are: - - (1) multipart -- data consisting of multiple entities of - independent data types. Four subtypes are initially - defined, including the basic "mixed" subtype specifying - a generic mixed set of parts, "alternative" for - representing the same data in multiple formats, - "parallel" for parts intended to be viewed - simultaneously, and "digest" for multipart entities in - which each part has a default type of "message/rfc822". - - - - - - -Freed & Borenstein Standards Track [Page 5] - -RFC 2046 Media Types November 1996 - - - (2) message -- an encapsulated message. A body of media - type "message" is itself all or a portion of some kind - of message object. Such objects may or may not in turn - contain other entities. The "rfc822" subtype is used - when the encapsulated content is itself an RFC 822 - message. The "partial" subtype is defined for partial - RFC 822 messages, to permit the fragmented transmission - of bodies that are thought to be too large to be passed - through transport facilities in one piece. Another - subtype, "external-body", is defined for specifying - large bodies by reference to an external data source. - - It should be noted that the list of media type values given here may - be augmented in time, via the mechanisms described above, and that - the set of subtypes is expected to grow substantially. - -4. Discrete Media Type Values - - Five of the seven initial media type values refer to discrete bodies. - The content of these types must be handled by non-MIME mechanisms; - they are opaque to MIME processors. - -4.1. Text Media Type - - The "text" media type is intended for sending material which is - principally textual in form. A "charset" parameter may be used to - indicate the character set of the body text for "text" subtypes, - notably including the subtype "text/plain", which is a generic - subtype for plain text. Plain text does not provide for or allow - formatting commands, font attribute specifications, processing - instructions, interpretation directives, or content markup. Plain - text is seen simply as a linear sequence of characters, possibly - interrupted by line breaks or page breaks. Plain text may allow the - stacking of several characters in the same position in the text. - Plain text in scripts like Arabic and Hebrew may also include - facilitites that allow the arbitrary mixing of text segments with - opposite writing directions. - - Beyond plain text, there are many formats for representing what might - be known as "rich text". An interesting characteristic of many such - representations is that they are to some extent readable even without - the software that interprets them. It is useful, then, to - distinguish them, at the highest level, from such unreadable data as - images, audio, or text represented in an unreadable form. In the - absence of appropriate interpretation software, it is reasonable to - show subtypes of "text" to the user, while it is not reasonable to do - so with most nontextual data. Such formatted textual data should be - represented using subtypes of "text". - - - -Freed & Borenstein Standards Track [Page 6] - -RFC 2046 Media Types November 1996 - - -4.1.1. Representation of Line Breaks - - The canonical form of any MIME "text" subtype MUST always represent a - line break as a CRLF sequence. Similarly, any occurrence of CRLF in - MIME "text" MUST represent a line break. Use of CR and LF outside of - line break sequences is also forbidden. - - This rule applies regardless of format or character set or sets - involved. - - NOTE: The proper interpretation of line breaks when a body is - displayed depends on the media type. In particular, while it is - appropriate to treat a line break as a transition to a new line when - displaying a "text/plain" body, this treatment is actually incorrect - for other subtypes of "text" like "text/enriched" [RFC-1896]. - Similarly, whether or not line breaks should be added during display - operations is also a function of the media type. It should not be - necessary to add any line breaks to display "text/plain" correctly, - whereas proper display of "text/enriched" requires the appropriate - addition of line breaks. - - NOTE: Some protocols defines a maximum line length. E.g. SMTP [RFC- - 821] allows a maximum of 998 octets before the next CRLF sequence. - To be transported by such protocols, data which includes too long - segments without CRLF sequences must be encoded with a suitable - content-transfer-encoding. - -4.1.2. Charset Parameter - - A critical parameter that may be specified in the Content-Type field - for "text/plain" data is the character set. This is specified with a - "charset" parameter, as in: - - Content-type: text/plain; charset=iso-8859-1 - - Unlike some other parameter values, the values of the charset - parameter are NOT case sensitive. The default character set, which - must be assumed in the absence of a charset parameter, is US-ASCII. - - The specification for any future subtypes of "text" must specify - whether or not they will also utilize a "charset" parameter, and may - possibly restrict its values as well. For other subtypes of "text" - than "text/plain", the semantics of the "charset" parameter should be - defined to be identical to those specified here for "text/plain", - i.e., the body consists entirely of characters in the given charset. - In particular, definers of future "text" subtypes should pay close - attention to the implications of multioctet character sets for their - subtype definitions. - - - -Freed & Borenstein Standards Track [Page 7] - -RFC 2046 Media Types November 1996 - - - The charset parameter for subtypes of "text" gives a name of a - character set, as "character set" is defined in RFC 2045. The rules - regarding line breaks detailed in the previous section must also be - observed -- a character set whose definition does not conform to - these rules cannot be used in a MIME "text" subtype. - - An initial list of predefined character set names can be found at the - end of this section. Additional character sets may be registered - with IANA. - - Other media types than subtypes of "text" might choose to employ the - charset parameter as defined here, but with the CRLF/line break - restriction removed. Therefore, all character sets that conform to - the general definition of "character set" in RFC 2045 can be - registered for MIME use. - - Note that if the specified character set includes 8-bit characters - and such characters are used in the body, a Content-Transfer-Encoding - header field and a corresponding encoding on the data are required in - order to transmit the body via some mail transfer protocols, such as - SMTP [RFC-821]. - - The default character set, US-ASCII, has been the subject of some - confusion and ambiguity in the past. Not only were there some - ambiguities in the definition, there have been wide variations in - practice. In order to eliminate such ambiguity and variations in the - future, it is strongly recommended that new user agents explicitly - specify a character set as a media type parameter in the Content-Type - header field. "US-ASCII" does not indicate an arbitrary 7-bit - character set, but specifies that all octets in the body must be - interpreted as characters according to the US-ASCII character set. - National and application-oriented versions of ISO 646 [ISO-646] are - usually NOT identical to US-ASCII, and in that case their use in - Internet mail is explicitly discouraged. The omission of the ISO 646 - character set from this document is deliberate in this regard. The - character set name of "US-ASCII" explicitly refers to the character - set defined in ANSI X3.4-1986 [US- ASCII]. The new international - reference version (IRV) of the 1991 edition of ISO 646 is identical - to US-ASCII. The character set name "ASCII" is reserved and must not - be used for any purpose. - - NOTE: RFC 821 explicitly specifies "ASCII", and references an earlier - version of the American Standard. Insofar as one of the purposes of - specifying a media type and character set is to permit the receiver - to unambiguously determine how the sender intended the coded message - to be interpreted, assuming anything other than "strict ASCII" as the - default would risk unintentional and incompatible changes to the - semantics of messages now being transmitted. This also implies that - - - -Freed & Borenstein Standards Track [Page 8] - -RFC 2046 Media Types November 1996 - - - messages containing characters coded according to other versions of - ISO 646 than US-ASCII and the 1991 IRV, or using code-switching - procedures (e.g., those of ISO 2022), as well as 8bit or multiple - octet character encodings MUST use an appropriate character set - specification to be consistent with MIME. - - The complete US-ASCII character set is listed in ANSI X3.4- 1986. - Note that the control characters including DEL (0-31, 127) have no - defined meaning in apart from the combination CRLF (US-ASCII values - 13 and 10) indicating a new line. Two of the characters have de - facto meanings in wide use: FF (12) often means "start subsequent - text on the beginning of a new page"; and TAB or HT (9) often (though - not always) means "move the cursor to the next available column after - the current position where the column number is a multiple of 8 - (counting the first column as column 0)." Aside from these - conventions, any use of the control characters or DEL in a body must - either occur - - (1) because a subtype of text other than "plain" - specifically assigns some additional meaning, or - - (2) within the context of a private agreement between the - sender and recipient. Such private agreements are - discouraged and should be replaced by the other - capabilities of this document. - - NOTE: An enormous proliferation of character sets exist beyond US- - ASCII. A large number of partially or totally overlapping character - sets is NOT a good thing. A SINGLE character set that can be used - universally for representing all of the world's languages in Internet - mail would be preferrable. Unfortunately, existing practice in - several communities seems to point to the continued use of multiple - character sets in the near future. A small number of standard - character sets are, therefore, defined for Internet use in this - document. - - The defined charset values are: - - (1) US-ASCII -- as defined in ANSI X3.4-1986 [US-ASCII]. - - (2) ISO-8859-X -- where "X" is to be replaced, as - necessary, for the parts of ISO-8859 [ISO-8859]. Note - that the ISO 646 character sets have deliberately been - omitted in favor of their 8859 replacements, which are - the designated character sets for Internet mail. As of - the publication of this document, the legitimate values - for "X" are the digits 1 through 10. - - - - -Freed & Borenstein Standards Track [Page 9] - -RFC 2046 Media Types November 1996 - - - Characters in the range 128-159 has no assigned meaning in ISO-8859- - X. Characters with values below 128 in ISO-8859-X have the same - assigned meaning as they do in US-ASCII. - - Part 6 of ISO 8859 (Latin/Arabic alphabet) and part 8 (Latin/Hebrew - alphabet) includes both characters for which the normal writing - direction is right to left and characters for which it is left to - right, but do not define a canonical ordering method for representing - bi-directional text. The charset values "ISO-8859-6" and "ISO-8859- - 8", however, specify that the visual method is used [RFC-1556]. - - All of these character sets are used as pure 7bit or 8bit sets - without any shift or escape functions. The meaning of shift and - escape sequences in these character sets is not defined. - - The character sets specified above are the ones that were relatively - uncontroversial during the drafting of MIME. This document does not - endorse the use of any particular character set other than US-ASCII, - and recognizes that the future evolution of world character sets - remains unclear. - - Note that the character set used, if anything other than US- ASCII, - must always be explicitly specified in the Content-Type field. - - No character set name other than those defined above may be used in - Internet mail without the publication of a formal specification and - its registration with IANA, or by private agreement, in which case - the character set name must begin with "X-". - - Implementors are discouraged from defining new character sets unless - absolutely necessary. - - The "charset" parameter has been defined primarily for the purpose of - textual data, and is described in this section for that reason. - However, it is conceivable that non-textual data might also wish to - specify a charset value for some purpose, in which case the same - syntax and values should be used. - - In general, composition software should always use the "lowest common - denominator" character set possible. For example, if a body contains - only US-ASCII characters, it SHOULD be marked as being in the US- - ASCII character set, not ISO-8859-1, which, like all the ISO-8859 - family of character sets, is a superset of US-ASCII. More generally, - if a widely-used character set is a subset of another character set, - and a body contains only characters in the widely-used subset, it - should be labelled as being in that subset. This will increase the - chances that the recipient will be able to view the resulting entity - correctly. - - - -Freed & Borenstein Standards Track [Page 10] - -RFC 2046 Media Types November 1996 - - -4.1.3. Plain Subtype - - The simplest and most important subtype of "text" is "plain". This - indicates plain text that does not contain any formatting commands or - directives. Plain text is intended to be displayed "as-is", that is, - no interpretation of embedded formatting commands, font attribute - specifications, processing instructions, interpretation directives, - or content markup should be necessary for proper display. The - default media type of "text/plain; charset=us-ascii" for Internet - mail describes existing Internet practice. That is, it is the type - of body defined by RFC 822. - - No other "text" subtype is defined by this document. - -4.1.4. Unrecognized Subtypes - - Unrecognized subtypes of "text" should be treated as subtype "plain" - as long as the MIME implementation knows how to handle the charset. - Unrecognized subtypes which also specify an unrecognized charset - should be treated as "application/octet- stream". - -4.2. Image Media Type - - A media type of "image" indicates that the body contains an image. - The subtype names the specific image format. These names are not - case sensitive. An initial subtype is "jpeg" for the JPEG format - using JFIF encoding [JPEG]. - - The list of "image" subtypes given here is neither exclusive nor - exhaustive, and is expected to grow as more types are registered with - IANA, as described in RFC 2048. - - Unrecognized subtypes of "image" should at a miniumum be treated as - "application/octet-stream". Implementations may optionally elect to - pass subtypes of "image" that they do not specifically recognize to a - secure and robust general-purpose image viewing application, if such - an application is available. - - NOTE: Using of a generic-purpose image viewing application this way - inherits the security problems of the most dangerous type supported - by the application. - -4.3. Audio Media Type - - A media type of "audio" indicates that the body contains audio data. - Although there is not yet a consensus on an "ideal" audio format for - use with computers, there is a pressing need for a format capable of - providing interoperable behavior. - - - -Freed & Borenstein Standards Track [Page 11] - -RFC 2046 Media Types November 1996 - - - The initial subtype of "basic" is specified to meet this requirement - by providing an absolutely minimal lowest common denominator audio - format. It is expected that richer formats for higher quality and/or - lower bandwidth audio will be defined by a later document. - - The content of the "audio/basic" subtype is single channel audio - encoded using 8bit ISDN mu-law [PCM] at a sample rate of 8000 Hz. - - Unrecognized subtypes of "audio" should at a miniumum be treated as - "application/octet-stream". Implementations may optionally elect to - pass subtypes of "audio" that they do not specifically recognize to a - robust general-purpose audio playing application, if such an - application is available. - -4.4. Video Media Type - - A media type of "video" indicates that the body contains a time- - varying-picture image, possibly with color and coordinated sound. - The term 'video' is used in its most generic sense, rather than with - reference to any particular technology or format, and is not meant to - preclude subtypes such as animated drawings encoded compactly. The - subtype "mpeg" refers to video coded according to the MPEG standard - [MPEG]. - - Note that although in general this document strongly discourages the - mixing of multiple media in a single body, it is recognized that many - so-called video formats include a representation for synchronized - audio, and this is explicitly permitted for subtypes of "video". - - Unrecognized subtypes of "video" should at a minumum be treated as - "application/octet-stream". Implementations may optionally elect to - pass subtypes of "video" that they do not specifically recognize to a - robust general-purpose video display application, if such an - application is available. - -4.5. Application Media Type - - The "application" media type is to be used for discrete data which do - not fit in any of the other categories, and particularly for data to - be processed by some type of application program. This is - information which must be processed by an application before it is - viewable or usable by a user. Expected uses for the "application" - media type include file transfer, spreadsheets, data for mail-based - scheduling systems, and languages for "active" (computational) - material. (The latter, in particular, can pose security problems - which must be understood by implementors, and are considered in - detail in the discussion of the "application/PostScript" media type.) - - - - -Freed & Borenstein Standards Track [Page 12] - -RFC 2046 Media Types November 1996 - - - For example, a meeting scheduler might define a standard - representation for information about proposed meeting dates. An - intelligent user agent would use this information to conduct a dialog - with the user, and might then send additional material based on that - dialog. More generally, there have been several "active" messaging - languages developed in which programs in a suitably specialized - language are transported to a remote location and automatically run - in the recipient's environment. - - Such applications may be defined as subtypes of the "application" - media type. This document defines two subtypes: - - octet-stream, and PostScript. - - The subtype of "application" will often be either the name or include - part of the name of the application for which the data are intended. - This does not mean, however, that any application program name may be - used freely as a subtype of "application". - -4.5.1. Octet-Stream Subtype - - The "octet-stream" subtype is used to indicate that a body contains - arbitrary binary data. The set of currently defined parameters is: - - (1) TYPE -- the general type or category of binary data. - This is intended as information for the human recipient - rather than for any automatic processing. - - (2) PADDING -- the number of bits of padding that were - appended to the bit-stream comprising the actual - contents to produce the enclosed 8bit byte-oriented - data. This is useful for enclosing a bit-stream in a - body when the total number of bits is not a multiple of - 8. - - Both of these parameters are optional. - - An additional parameter, "CONVERSIONS", was defined in RFC 1341 but - has since been removed. RFC 1341 also defined the use of a "NAME" - parameter which gave a suggested file name to be used if the data - were to be written to a file. This has been deprecated in - anticipation of a separate Content-Disposition header field, to be - defined in a subsequent RFC. - - The recommended action for an implementation that receives an - "application/octet-stream" entity is to simply offer to put the data - in a file, with any Content-Transfer-Encoding undone, or perhaps to - use it as input to a user-specified process. - - - -Freed & Borenstein Standards Track [Page 13] - -RFC 2046 Media Types November 1996 - - - To reduce the danger of transmitting rogue programs, it is strongly - recommended that implementations NOT implement a path-search - mechanism whereby an arbitrary program named in the Content-Type - parameter (e.g., an "interpreter=" parameter) is found and executed - using the message body as input. - -4.5.2. PostScript Subtype - - A media type of "application/postscript" indicates a PostScript - program. Currently two variants of the PostScript language are - allowed; the original level 1 variant is described in [POSTSCRIPT] - and the more recent level 2 variant is described in [POSTSCRIPT2]. - - PostScript is a registered trademark of Adobe Systems, Inc. Use of - the MIME media type "application/postscript" implies recognition of - that trademark and all the rights it entails. - - The PostScript language definition provides facilities for internal - labelling of the specific language features a given program uses. - This labelling, called the PostScript document structuring - conventions, or DSC, is very general and provides substantially more - information than just the language level. The use of document - structuring conventions, while not required, is strongly recommended - as an aid to interoperability. Documents which lack proper - structuring conventions cannot be tested to see whether or not they - will work in a given environment. As such, some systems may assume - the worst and refuse to process unstructured documents. - - The execution of general-purpose PostScript interpreters entails - serious security risks, and implementors are discouraged from simply - sending PostScript bodies to "off- the-shelf" interpreters. While it - is usually safe to send PostScript to a printer, where the potential - for harm is greatly constrained by typical printer environments, - implementors should consider all of the following before they add - interactive display of PostScript bodies to their MIME readers. - - The remainder of this section outlines some, though probably not all, - of the possible problems with the transport of PostScript entities. - - (1) Dangerous operations in the PostScript language - include, but may not be limited to, the PostScript - operators "deletefile", "renamefile", "filenameforall", - and "file". "File" is only dangerous when applied to - something other than standard input or output. - Implementations may also define additional nonstandard - file operators; these may also pose a threat to - security. "Filenameforall", the wildcard file search - operator, may appear at first glance to be harmless. - - - -Freed & Borenstein Standards Track [Page 14] - -RFC 2046 Media Types November 1996 - - - Note, however, that this operator has the potential to - reveal information about what files the recipient has - access to, and this information may itself be - sensitive. Message senders should avoid the use of - potentially dangerous file operators, since these - operators are quite likely to be unavailable in secure - PostScript implementations. Message receiving and - displaying software should either completely disable - all potentially dangerous file operators or take - special care not to delegate any special authority to - their operation. These operators should be viewed as - being done by an outside agency when interpreting - PostScript documents. Such disabling and/or checking - should be done completely outside of the reach of the - PostScript language itself; care should be taken to - insure that no method exists for re-enabling full- - function versions of these operators. - - (2) The PostScript language provides facilities for exiting - the normal interpreter, or server, loop. Changes made - in this "outer" environment are customarily retained - across documents, and may in some cases be retained - semipermanently in nonvolatile memory. The operators - associated with exiting the interpreter loop have the - potential to interfere with subsequent document - processing. As such, their unrestrained use - constitutes a threat of service denial. PostScript - operators that exit the interpreter loop include, but - may not be limited to, the exitserver and startjob - operators. Message sending software should not - generate PostScript that depends on exiting the - interpreter loop to operate, since the ability to exit - will probably be unavailable in secure PostScript - implementations. Message receiving and displaying - software should completely disable the ability to make - retained changes to the PostScript environment by - eliminating or disabling the "startjob" and - "exitserver" operations. If these operations cannot be - eliminated or completely disabled the password - associated with them should at least be set to a hard- - to-guess value. - - (3) PostScript provides operators for setting system-wide - and device-specific parameters. These parameter - settings may be retained across jobs and may - potentially pose a threat to the correct operation of - the interpreter. The PostScript operators that set - system and device parameters include, but may not be - - - -Freed & Borenstein Standards Track [Page 15] - -RFC 2046 Media Types November 1996 - - - limited to, the "setsystemparams" and "setdevparams" - operators. Message sending software should not - generate PostScript that depends on the setting of - system or device parameters to operate correctly. The - ability to set these parameters will probably be - unavailable in secure PostScript implementations. - Message receiving and displaying software should - disable the ability to change system and device - parameters. If these operators cannot be completely - disabled the password associated with them should at - least be set to a hard-to-guess value. - - (4) Some PostScript implementations provide nonstandard - facilities for the direct loading and execution of - machine code. Such facilities are quite obviously open - to substantial abuse. Message sending software should - not make use of such features. Besides being totally - hardware-specific, they are also likely to be - unavailable in secure implementations of PostScript. - Message receiving and displaying software should not - allow such operators to be used if they exist. - - (5) PostScript is an extensible language, and many, if not - most, implementations of it provide a number of their - own extensions. This document does not deal with such - extensions explicitly since they constitute an unknown - factor. Message sending software should not make use - of nonstandard extensions; they are likely to be - missing from some implementations. Message receiving - and displaying software should make sure that any - nonstandard PostScript operators are secure and don't - present any kind of threat. - - (6) It is possible to write PostScript that consumes huge - amounts of various system resources. It is also - possible to write PostScript programs that loop - indefinitely. Both types of programs have the - potential to cause damage if sent to unsuspecting - recipients. Message-sending software should avoid the - construction and dissemination of such programs, which - is antisocial. Message receiving and displaying - software should provide appropriate mechanisms to abort - processing after a reasonable amount of time has - elapsed. In addition, PostScript interpreters should be - limited to the consumption of only a reasonable amount - of any given system resource. - - - - - -Freed & Borenstein Standards Track [Page 16] - -RFC 2046 Media Types November 1996 - - - (7) It is possible to include raw binary information inside - PostScript in various forms. This is not recommended - for use in Internet mail, both because it is not - supported by all PostScript interpreters and because it - significantly complicates the use of a MIME Content- - Transfer-Encoding. (Without such binary, PostScript - may typically be viewed as line-oriented data. The - treatment of CRLF sequences becomes extremely - problematic if binary and line-oriented data are mixed - in a single Postscript data stream.) - - (8) Finally, bugs may exist in some PostScript interpreters - which could possibly be exploited to gain unauthorized - access to a recipient's system. Apart from noting this - possibility, there is no specific action to take to - prevent this, apart from the timely correction of such - bugs if any are found. - -4.5.3. Other Application Subtypes - - It is expected that many other subtypes of "application" will be - defined in the future. MIME implementations must at a minimum treat - any unrecognized subtypes as being equivalent to "application/octet- - stream". - -5. Composite Media Type Values - - The remaining two of the seven initial Content-Type values refer to - composite entities. Composite entities are handled using MIME - mechanisms -- a MIME processor typically handles the body directly. - -5.1. Multipart Media Type - - In the case of multipart entities, in which one or more different - sets of data are combined in a single body, a "multipart" media type - field must appear in the entity's header. The body must then contain - one or more body parts, each preceded by a boundary delimiter line, - and the last one followed by a closing boundary delimiter line. - After its boundary delimiter line, each body part then consists of a - header area, a blank line, and a body area. Thus a body part is - similar to an RFC 822 message in syntax, but different in meaning. - - A body part is an entity and hence is NOT to be interpreted as - actually being an RFC 822 message. To begin with, NO header fields - are actually required in body parts. A body part that starts with a - blank line, therefore, is allowed and is a body part for which all - default values are to be assumed. In such a case, the absence of a - Content-Type header usually indicates that the corresponding body has - - - -Freed & Borenstein Standards Track [Page 17] - -RFC 2046 Media Types November 1996 - - - a content-type of "text/plain; charset=US-ASCII". - - The only header fields that have defined meaning for body parts are - those the names of which begin with "Content-". All other header - fields may be ignored in body parts. Although they should generally - be retained if at all possible, they may be discarded by gateways if - necessary. Such other fields are permitted to appear in body parts - but must not be depended on. "X-" fields may be created for - experimental or private purposes, with the recognition that the - information they contain may be lost at some gateways. - - NOTE: The distinction between an RFC 822 message and a body part is - subtle, but important. A gateway between Internet and X.400 mail, - for example, must be able to tell the difference between a body part - that contains an image and a body part that contains an encapsulated - message, the body of which is a JPEG image. In order to represent - the latter, the body part must have "Content-Type: message/rfc822", - and its body (after the blank line) must be the encapsulated message, - with its own "Content-Type: image/jpeg" header field. The use of - similar syntax facilitates the conversion of messages to body parts, - and vice versa, but the distinction between the two must be - understood by implementors. (For the special case in which parts - actually are messages, a "digest" subtype is also defined.) - - As stated previously, each body part is preceded by a boundary - delimiter line that contains the boundary delimiter. The boundary - delimiter MUST NOT appear inside any of the encapsulated parts, on a - line by itself or as the prefix of any line. This implies that it is - crucial that the composing agent be able to choose and specify a - unique boundary parameter value that does not contain the boundary - parameter value of an enclosing multipart as a prefix. - - All present and future subtypes of the "multipart" type must use an - identical syntax. Subtypes may differ in their semantics, and may - impose additional restrictions on syntax, but must conform to the - required syntax for the "multipart" type. This requirement ensures - that all conformant user agents will at least be able to recognize - and separate the parts of any multipart entity, even those of an - unrecognized subtype. - - As stated in the definition of the Content-Transfer-Encoding field - [RFC 2045], no encoding other than "7bit", "8bit", or "binary" is - permitted for entities of type "multipart". The "multipart" boundary - delimiters and header fields are always represented as 7bit US-ASCII - in any case (though the header fields may encode non-US-ASCII header - text as per RFC 2047) and data within the body parts can be encoded - on a part-by-part basis, with Content-Transfer-Encoding fields for - each appropriate body part. - - - -Freed & Borenstein Standards Track [Page 18] - -RFC 2046 Media Types November 1996 - - -5.1.1. Common Syntax - - This section defines a common syntax for subtypes of "multipart". - All subtypes of "multipart" must use this syntax. A simple example - of a multipart message also appears in this section. An example of a - more complex multipart message is given in RFC 2049. - - The Content-Type field for multipart entities requires one parameter, - "boundary". The boundary delimiter line is then defined as a line - consisting entirely of two hyphen characters ("-", decimal value 45) - followed by the boundary parameter value from the Content-Type header - field, optional linear whitespace, and a terminating CRLF. - - NOTE: The hyphens are for rough compatibility with the earlier RFC - 934 method of message encapsulation, and for ease of searching for - the boundaries in some implementations. However, it should be noted - that multipart messages are NOT completely compatible with RFC 934 - encapsulations; in particular, they do not obey RFC 934 quoting - conventions for embedded lines that begin with hyphens. This - mechanism was chosen over the RFC 934 mechanism because the latter - causes lines to grow with each level of quoting. The combination of - this growth with the fact that SMTP implementations sometimes wrap - long lines made the RFC 934 mechanism unsuitable for use in the event - that deeply-nested multipart structuring is ever desired. - - WARNING TO IMPLEMENTORS: The grammar for parameters on the Content- - type field is such that it is often necessary to enclose the boundary - parameter values in quotes on the Content-type line. This is not - always necessary, but never hurts. Implementors should be sure to - study the grammar carefully in order to avoid producing invalid - Content-type fields. Thus, a typical "multipart" Content-Type header - field might look like this: - - Content-Type: multipart/mixed; boundary=gc0p4Jq0M2Yt08j34c0p - - But the following is not valid: - - Content-Type: multipart/mixed; boundary=gc0pJq0M:08jU534c0p - - (because of the colon) and must instead be represented as - - Content-Type: multipart/mixed; boundary="gc0pJq0M:08jU534c0p" - - This Content-Type value indicates that the content consists of one or - more parts, each with a structure that is syntactically identical to - an RFC 822 message, except that the header area is allowed to be - completely empty, and that the parts are each preceded by the line - - - - -Freed & Borenstein Standards Track [Page 19] - -RFC 2046 Media Types November 1996 - - - --gc0pJq0M:08jU534c0p - - The boundary delimiter MUST occur at the beginning of a line, i.e., - following a CRLF, and the initial CRLF is considered to be attached - to the boundary delimiter line rather than part of the preceding - part. The boundary may be followed by zero or more characters of - linear whitespace. It is then terminated by either another CRLF and - the header fields for the next part, or by two CRLFs, in which case - there are no header fields for the next part. If no Content-Type - field is present it is assumed to be "message/rfc822" in a - "multipart/digest" and "text/plain" otherwise. - - NOTE: The CRLF preceding the boundary delimiter line is conceptually - attached to the boundary so that it is possible to have a part that - does not end with a CRLF (line break). Body parts that must be - considered to end with line breaks, therefore, must have two CRLFs - preceding the boundary delimiter line, the first of which is part of - the preceding body part, and the second of which is part of the - encapsulation boundary. - - Boundary delimiters must not appear within the encapsulated material, - and must be no longer than 70 characters, not counting the two - leading hyphens. - - The boundary delimiter line following the last body part is a - distinguished delimiter that indicates that no further body parts - will follow. Such a delimiter line is identical to the previous - delimiter lines, with the addition of two more hyphens after the - boundary parameter value. - - --gc0pJq0M:08jU534c0p-- - - NOTE TO IMPLEMENTORS: Boundary string comparisons must compare the - boundary value with the beginning of each candidate line. An exact - match of the entire candidate line is not required; it is sufficient - that the boundary appear in its entirety following the CRLF. - - There appears to be room for additional information prior to the - first boundary delimiter line and following the final boundary - delimiter line. These areas should generally be left blank, and - implementations must ignore anything that appears before the first - boundary delimiter line or after the last one. - - NOTE: These "preamble" and "epilogue" areas are generally not used - because of the lack of proper typing of these parts and the lack of - clear semantics for handling these areas at gateways, particularly - X.400 gateways. However, rather than leaving the preamble area - blank, many MIME implementations have found this to be a convenient - - - -Freed & Borenstein Standards Track [Page 20] - -RFC 2046 Media Types November 1996 - - - place to insert an explanatory note for recipients who read the - message with pre-MIME software, since such notes will be ignored by - MIME-compliant software. - - NOTE: Because boundary delimiters must not appear in the body parts - being encapsulated, a user agent must exercise care to choose a - unique boundary parameter value. The boundary parameter value in the - example above could have been the result of an algorithm designed to - produce boundary delimiters with a very low probability of already - existing in the data to be encapsulated without having to prescan the - data. Alternate algorithms might result in more "readable" boundary - delimiters for a recipient with an old user agent, but would require - more attention to the possibility that the boundary delimiter might - appear at the beginning of some line in the encapsulated part. The - simplest boundary delimiter line possible is something like "---", - with a closing boundary delimiter line of "-----". - - As a very simple example, the following multipart message has two - parts, both of them plain text, one of them explicitly typed and one - of them implicitly typed: - - From: Nathaniel Borenstein - To: Ned Freed - Date: Sun, 21 Mar 1993 23:56:48 -0800 (PST) - Subject: Sample message - MIME-Version: 1.0 - Content-type: multipart/mixed; boundary="simple boundary" - - This is the preamble. It is to be ignored, though it - is a handy place for composition agents to include an - explanatory note to non-MIME conformant readers. - - --simple boundary - - This is implicitly typed plain US-ASCII text. - It does NOT end with a linebreak. - --simple boundary - Content-type: text/plain; charset=us-ascii - - This is explicitly typed plain US-ASCII text. - It DOES end with a linebreak. - - --simple boundary-- - - This is the epilogue. It is also to be ignored. - - - - - - -Freed & Borenstein Standards Track [Page 21] - -RFC 2046 Media Types November 1996 - - - The use of a media type of "multipart" in a body part within another - "multipart" entity is explicitly allowed. In such cases, for obvious - reasons, care must be taken to ensure that each nested "multipart" - entity uses a different boundary delimiter. See RFC 2049 for an - example of nested "multipart" entities. - - The use of the "multipart" media type with only a single body part - may be useful in certain contexts, and is explicitly permitted. - - NOTE: Experience has shown that a "multipart" media type with a - single body part is useful for sending non-text media types. It has - the advantage of providing the preamble as a place to include - decoding instructions. In addition, a number of SMTP gateways move - or remove the MIME headers, and a clever MIME decoder can take a good - guess at multipart boundaries even in the absence of the Content-Type - header and thereby successfully decode the message. - - The only mandatory global parameter for the "multipart" media type is - the boundary parameter, which consists of 1 to 70 characters from a - set of characters known to be very robust through mail gateways, and - NOT ending with white space. (If a boundary delimiter line appears to - end with white space, the white space must be presumed to have been - added by a gateway, and must be deleted.) It is formally specified - by the following BNF: - - boundary := 0*69 bcharsnospace - - bchars := bcharsnospace / " " - - bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" / - "+" / "_" / "," / "-" / "." / - "/" / ":" / "=" / "?" - - Overall, the body of a "multipart" entity may be specified as - follows: - - dash-boundary := "--" boundary - ; boundary taken from the value of - ; boundary parameter of the - ; Content-Type field. - - multipart-body := [preamble CRLF] - dash-boundary transport-padding CRLF - body-part *encapsulation - close-delimiter transport-padding - [CRLF epilogue] - - - - - -Freed & Borenstein Standards Track [Page 22] - -RFC 2046 Media Types November 1996 - - - transport-padding := *LWSP-char - ; Composers MUST NOT generate - ; non-zero length transport - ; padding, but receivers MUST - ; be able to handle padding - ; added by message transports. - - encapsulation := delimiter transport-padding - CRLF body-part - - delimiter := CRLF dash-boundary - - close-delimiter := delimiter "--" - - preamble := discard-text - - epilogue := discard-text - - discard-text := *(*text CRLF) *text - ; May be ignored or discarded. - - body-part := MIME-part-headers [CRLF *OCTET] - ; Lines in a body-part must not start - ; with the specified dash-boundary and - ; the delimiter must not appear anywhere - ; in the body part. Note that the - ; semantics of a body-part differ from - ; the semantics of a message, as - ; described in the text. - - OCTET := - - IMPORTANT: The free insertion of linear-white-space and RFC 822 - comments between the elements shown in this BNF is NOT allowed since - this BNF does not specify a structured header field. - - NOTE: In certain transport enclaves, RFC 822 restrictions such as - the one that limits bodies to printable US-ASCII characters may not - be in force. (That is, the transport domains may exist that resemble - standard Internet mail transport as specified in RFC 821 and assumed - by RFC 822, but without certain restrictions.) The relaxation of - these restrictions should be construed as locally extending the - definition of bodies, for example to include octets outside of the - US-ASCII range, as long as these extensions are supported by the - transport and adequately documented in the Content- Transfer-Encoding - header field. However, in no event are headers (either message - headers or body part headers) allowed to contain anything other than - US-ASCII characters. - - - -Freed & Borenstein Standards Track [Page 23] - -RFC 2046 Media Types November 1996 - - - NOTE: Conspicuously missing from the "multipart" type is a notion of - structured, related body parts. It is recommended that those wishing - to provide more structured or integrated multipart messaging - facilities should define subtypes of multipart that are syntactically - identical but define relationships between the various parts. For - example, subtypes of multipart could be defined that include a - distinguished part which in turn is used to specify the relationships - between the other parts, probably referring to them by their - Content-ID field. Old implementations will not recognize the new - subtype if this approach is used, but will treat it as - multipart/mixed and will thus be able to show the user the parts that - are recognized. - -5.1.2. Handling Nested Messages and Multiparts - - The "message/rfc822" subtype defined in a subsequent section of this - document has no terminating condition other than running out of data. - Similarly, an improperly truncated "multipart" entity may not have - any terminating boundary marker, and can turn up operationally due to - mail system malfunctions. - - It is essential that such entities be handled correctly when they are - themselves imbedded inside of another "multipart" structure. MIME - implementations are therefore required to recognize outer level - boundary markers at ANY level of inner nesting. It is not sufficient - to only check for the next expected marker or other terminating - condition. - -5.1.3. Mixed Subtype - - The "mixed" subtype of "multipart" is intended for use when the body - parts are independent and need to be bundled in a particular order. - Any "multipart" subtypes that an implementation does not recognize - must be treated as being of subtype "mixed". - -5.1.4. Alternative Subtype - - The "multipart/alternative" type is syntactically identical to - "multipart/mixed", but the semantics are different. In particular, - each of the body parts is an "alternative" version of the same - information. - - Systems should recognize that the content of the various parts are - interchangeable. Systems should choose the "best" type based on the - local environment and references, in some cases even through user - interaction. As with "multipart/mixed", the order of body parts is - significant. In this case, the alternatives appear in an order of - increasing faithfulness to the original content. In general, the - - - -Freed & Borenstein Standards Track [Page 24] - -RFC 2046 Media Types November 1996 - - - best choice is the LAST part of a type supported by the recipient - system's local environment. - - "Multipart/alternative" may be used, for example, to send a message - in a fancy text format in such a way that it can easily be displayed - anywhere: - - From: Nathaniel Borenstein - To: Ned Freed - Date: Mon, 22 Mar 1993 09:41:09 -0800 (PST) - Subject: Formatted text mail - MIME-Version: 1.0 - Content-Type: multipart/alternative; boundary=boundary42 - - --boundary42 - Content-Type: text/plain; charset=us-ascii - - ... plain text version of message goes here ... - - --boundary42 - Content-Type: text/enriched - - ... RFC 1896 text/enriched version of same message - goes here ... - - --boundary42 - Content-Type: application/x-whatever - - ... fanciest version of same message goes here ... - - --boundary42-- - - In this example, users whose mail systems understood the - "application/x-whatever" format would see only the fancy version, - while other users would see only the enriched or plain text version, - depending on the capabilities of their system. - - In general, user agents that compose "multipart/alternative" entities - must place the body parts in increasing order of preference, that is, - with the preferred format last. For fancy text, the sending user - agent should put the plainest format first and the richest format - last. Receiving user agents should pick and display the last format - they are capable of displaying. In the case where one of the - alternatives is itself of type "multipart" and contains unrecognized - sub-parts, the user agent may choose either to show that alternative, - an earlier alternative, or both. - - - - - -Freed & Borenstein Standards Track [Page 25] - -RFC 2046 Media Types November 1996 - - - NOTE: From an implementor's perspective, it might seem more sensible - to reverse this ordering, and have the plainest alternative last. - However, placing the plainest alternative first is the friendliest - possible option when "multipart/alternative" entities are viewed - using a non-MIME-conformant viewer. While this approach does impose - some burden on conformant MIME viewers, interoperability with older - mail readers was deemed to be more important in this case. - - It may be the case that some user agents, if they can recognize more - than one of the formats, will prefer to offer the user the choice of - which format to view. This makes sense, for example, if a message - includes both a nicely- formatted image version and an easily-edited - text version. What is most critical, however, is that the user not - automatically be shown multiple versions of the same data. Either - the user should be shown the last recognized version or should be - given the choice. - - THE SEMANTICS OF CONTENT-ID IN MULTIPART/ALTERNATIVE: Each part of a - "multipart/alternative" entity represents the same data, but the - mappings between the two are not necessarily without information - loss. For example, information is lost when translating ODA to - PostScript or plain text. It is recommended that each part should - have a different Content-ID value in the case where the information - content of the two parts is not identical. And when the information - content is identical -- for example, where several parts of type - "message/external-body" specify alternate ways to access the - identical data -- the same Content-ID field value should be used, to - optimize any caching mechanisms that might be present on the - recipient's end. However, the Content-ID values used by the parts - should NOT be the same Content-ID value that describes the - "multipart/alternative" as a whole, if there is any such Content-ID - field. That is, one Content-ID value will refer to the - "multipart/alternative" entity, while one or more other Content-ID - values will refer to the parts inside it. - -5.1.5. Digest Subtype - - This document defines a "digest" subtype of the "multipart" Content- - Type. This type is syntactically identical to "multipart/mixed", but - the semantics are different. In particular, in a digest, the default - Content-Type value for a body part is changed from "text/plain" to - "message/rfc822". This is done to allow a more readable digest - format that is largely compatible (except for the quoting convention) - with RFC 934. - - Note: Though it is possible to specify a Content-Type value for a - body part in a digest which is other than "message/rfc822", such as a - "text/plain" part containing a description of the material in the - - - -Freed & Borenstein Standards Track [Page 26] - -RFC 2046 Media Types November 1996 - - - digest, actually doing so is undesireble. The "multipart/digest" - Content-Type is intended to be used to send collections of messages. - If a "text/plain" part is needed, it should be included as a seperate - part of a "multipart/mixed" message. - - A digest in this format might, then, look something like this: - - From: Moderator-Address - To: Recipient-List - Date: Mon, 22 Mar 1994 13:34:51 +0000 - Subject: Internet Digest, volume 42 - MIME-Version: 1.0 - Content-Type: multipart/mixed; - boundary="---- main boundary ----" - - ------ main boundary ---- - - ...Introductory text or table of contents... - - ------ main boundary ---- - Content-Type: multipart/digest; - boundary="---- next message ----" - - ------ next message ---- - - From: someone-else - Date: Fri, 26 Mar 1993 11:13:32 +0200 - Subject: my opinion - - ...body goes here ... - - ------ next message ---- - - From: someone-else-again - Date: Fri, 26 Mar 1993 10:07:13 -0500 - Subject: my different opinion - - ... another body goes here ... - - ------ next message ------ - - ------ main boundary ------ - -5.1.6. Parallel Subtype - - This document defines a "parallel" subtype of the "multipart" - Content-Type. This type is syntactically identical to - "multipart/mixed", but the semantics are different. In particular, - - - -Freed & Borenstein Standards Track [Page 27] - -RFC 2046 Media Types November 1996 - - - in a parallel entity, the order of body parts is not significant. - - A common presentation of this type is to display all of the parts - simultaneously on hardware and software that are capable of doing so. - However, composing agents should be aware that many mail readers will - lack this capability and will show the parts serially in any event. - -5.1.7. Other Multipart Subtypes - - Other "multipart" subtypes are expected in the future. MIME - implementations must in general treat unrecognized subtypes of - "multipart" as being equivalent to "multipart/mixed". - -5.2. Message Media Type - - It is frequently desirable, in sending mail, to encapsulate another - mail message. A special media type, "message", is defined to - facilitate this. In particular, the "rfc822" subtype of "message" is - used to encapsulate RFC 822 messages. - - NOTE: It has been suggested that subtypes of "message" might be - defined for forwarded or rejected messages. However, forwarded and - rejected messages can be handled as multipart messages in which the - first part contains any control or descriptive information, and a - second part, of type "message/rfc822", is the forwarded or rejected - message. Composing rejection and forwarding messages in this manner - will preserve the type information on the original message and allow - it to be correctly presented to the recipient, and hence is strongly - encouraged. - - Subtypes of "message" often impose restrictions on what encodings are - allowed. These restrictions are described in conjunction with each - specific subtype. - - Mail gateways, relays, and other mail handling agents are commonly - known to alter the top-level header of an RFC 822 message. In - particular, they frequently add, remove, or reorder header fields. - These operations are explicitly forbidden for the encapsulated - headers embedded in the bodies of messages of type "message." - -5.2.1. RFC822 Subtype - - A media type of "message/rfc822" indicates that the body contains an - encapsulated message, with the syntax of an RFC 822 message. - However, unlike top-level RFC 822 messages, the restriction that each - "message/rfc822" body must include a "From", "Date", and at least one - destination header is removed and replaced with the requirement that - at least one of "From", "Subject", or "Date" must be present. - - - -Freed & Borenstein Standards Track [Page 28] - -RFC 2046 Media Types November 1996 - - - It should be noted that, despite the use of the numbers "822", a - "message/rfc822" entity isn't restricted to material in strict - conformance to RFC822, nor are the semantics of "message/rfc822" - objects restricted to the semantics defined in RFC822. More - specifically, a "message/rfc822" message could well be a News article - or a MIME message. - - No encoding other than "7bit", "8bit", or "binary" is permitted for - the body of a "message/rfc822" entity. The message header fields are - always US-ASCII in any case, and data within the body can still be - encoded, in which case the Content-Transfer-Encoding header field in - the encapsulated message will reflect this. Non-US-ASCII text in the - headers of an encapsulated message can be specified using the - mechanisms described in RFC 2047. - -5.2.2. Partial Subtype - - The "partial" subtype is defined to allow large entities to be - delivered as several separate pieces of mail and automatically - reassembled by a receiving user agent. (The concept is similar to IP - fragmentation and reassembly in the basic Internet Protocols.) This - mechanism can be used when intermediate transport agents limit the - size of individual messages that can be sent. The media type - "message/partial" thus indicates that the body contains a fragment of - a larger entity. - - Because data of type "message" may never be encoded in base64 or - quoted-printable, a problem might arise if "message/partial" entities - are constructed in an environment that supports binary or 8bit - transport. The problem is that the binary data would be split into - multiple "message/partial" messages, each of them requiring binary - transport. If such messages were encountered at a gateway into a - 7bit transport environment, there would be no way to properly encode - them for the 7bit world, aside from waiting for all of the fragments, - reassembling the inner message, and then encoding the reassembled - data in base64 or quoted-printable. Since it is possible that - different fragments might go through different gateways, even this is - not an acceptable solution. For this reason, it is specified that - entities of type "message/partial" must always have a content- - transfer-encoding of 7bit (the default). In particular, even in - environments that support binary or 8bit transport, the use of a - content- transfer-encoding of "8bit" or "binary" is explicitly - prohibited for MIME entities of type "message/partial". This in turn - implies that the inner message must not use "8bit" or "binary" - encoding. - - - - - - -Freed & Borenstein Standards Track [Page 29] - -RFC 2046 Media Types November 1996 - - - Because some message transfer agents may choose to automatically - fragment large messages, and because such agents may use very - different fragmentation thresholds, it is possible that the pieces of - a partial message, upon reassembly, may prove themselves to comprise - a partial message. This is explicitly permitted. - - Three parameters must be specified in the Content-Type field of type - "message/partial": The first, "id", is a unique identifier, as close - to a world-unique identifier as possible, to be used to match the - fragments together. (In general, the identifier is essentially a - message-id; if placed in double quotes, it can be ANY message-id, in - accordance with the BNF for "parameter" given in RFC 2045.) The - second, "number", an integer, is the fragment number, which indicates - where this fragment fits into the sequence of fragments. The third, - "total", another integer, is the total number of fragments. This - third subfield is required on the final fragment, and is optional - (though encouraged) on the earlier fragments. Note also that these - parameters may be given in any order. - - Thus, the second piece of a 3-piece message may have either of the - following header fields: - - Content-Type: Message/Partial; number=2; total=3; - id="oc=jpbe0M2Yt4s@thumper.bellcore.com" - - Content-Type: Message/Partial; - id="oc=jpbe0M2Yt4s@thumper.bellcore.com"; - number=2 - - But the third piece MUST specify the total number of fragments: - - Content-Type: Message/Partial; number=3; total=3; - id="oc=jpbe0M2Yt4s@thumper.bellcore.com" - - Note that fragment numbering begins with 1, not 0. - - When the fragments of an entity broken up in this manner are put - together, the result is always a complete MIME entity, which may have - its own Content-Type header field, and thus may contain any other - data type. - -5.2.2.1. Message Fragmentation and Reassembly - - The semantics of a reassembled partial message must be those of the - "inner" message, rather than of a message containing the inner - message. This makes it possible, for example, to send a large audio - message as several partial messages, and still have it appear to the - recipient as a simple audio message rather than as an encapsulated - - - -Freed & Borenstein Standards Track [Page 30] - -RFC 2046 Media Types November 1996 - - - message containing an audio message. That is, the encapsulation of - the message is considered to be "transparent". - - When generating and reassembling the pieces of a "message/partial" - message, the headers of the encapsulated message must be merged with - the headers of the enclosing entities. In this process the following - rules must be observed: - - (1) Fragmentation agents must split messages at line - boundaries only. This restriction is imposed because - splits at points other than the ends of lines in turn - depends on message transports being able to preserve - the semantics of messages that don't end with a CRLF - sequence. Many transports are incapable of preserving - such semantics. - - (2) All of the header fields from the initial enclosing - message, except those that start with "Content-" and - the specific header fields "Subject", "Message-ID", - "Encrypted", and "MIME-Version", must be copied, in - order, to the new message. - - (3) The header fields in the enclosed message which start - with "Content-", plus the "Subject", "Message-ID", - "Encrypted", and "MIME-Version" fields, must be - appended, in order, to the header fields of the new - message. Any header fields in the enclosed message - which do not start with "Content-" (except for the - "Subject", "Message-ID", "Encrypted", and "MIME- - Version" fields) will be ignored and dropped. - - (4) All of the header fields from the second and any - subsequent enclosing messages are discarded by the - reassembly process. - -5.2.2.2. Fragmentation and Reassembly Example - - If an audio message is broken into two pieces, the first piece might - look something like this: - - X-Weird-Header-1: Foo - From: Bill@host.com - To: joe@otherhost.com - Date: Fri, 26 Mar 1993 12:59:38 -0500 (EST) - Subject: Audio mail (part 1 of 2) - Message-ID: - MIME-Version: 1.0 - Content-type: message/partial; id="ABC@host.com"; - - - -Freed & Borenstein Standards Track [Page 31] - -RFC 2046 Media Types November 1996 - - - number=1; total=2 - - X-Weird-Header-1: Bar - X-Weird-Header-2: Hello - Message-ID: - Subject: Audio mail - MIME-Version: 1.0 - Content-type: audio/basic - Content-transfer-encoding: base64 - - ... first half of encoded audio data goes here ... - - and the second half might look something like this: - - From: Bill@host.com - To: joe@otherhost.com - Date: Fri, 26 Mar 1993 12:59:38 -0500 (EST) - Subject: Audio mail (part 2 of 2) - MIME-Version: 1.0 - Message-ID: - Content-type: message/partial; - id="ABC@host.com"; number=2; total=2 - - ... second half of encoded audio data goes here ... - - Then, when the fragmented message is reassembled, the resulting - message to be displayed to the user should look something like this: - - X-Weird-Header-1: Foo - From: Bill@host.com - To: joe@otherhost.com - Date: Fri, 26 Mar 1993 12:59:38 -0500 (EST) - Subject: Audio mail - Message-ID: - MIME-Version: 1.0 - Content-type: audio/basic - Content-transfer-encoding: base64 - - ... first half of encoded audio data goes here ... - ... second half of encoded audio data goes here ... - - The inclusion of a "References" field in the headers of the second - and subsequent pieces of a fragmented message that references the - Message-Id on the previous piece may be of benefit to mail readers - that understand and track references. However, the generation of - such "References" fields is entirely optional. - - - - - -Freed & Borenstein Standards Track [Page 32] - -RFC 2046 Media Types November 1996 - - - Finally, it should be noted that the "Encrypted" header field has - been made obsolete by Privacy Enhanced Messaging (PEM) [RFC-1421, - RFC-1422, RFC-1423, RFC-1424], but the rules above are nevertheless - believed to describe the correct way to treat it if it is encountered - in the context of conversion to and from "message/partial" fragments. - -5.2.3. External-Body Subtype - - The external-body subtype indicates that the actual body data are not - included, but merely referenced. In this case, the parameters - describe a mechanism for accessing the external data. - - When a MIME entity is of type "message/external-body", it consists of - a header, two consecutive CRLFs, and the message header for the - encapsulated message. If another pair of consecutive CRLFs appears, - this of course ends the message header for the encapsulated message. - However, since the encapsulated message's body is itself external, it - does NOT appear in the area that follows. For example, consider the - following message: - - Content-type: message/external-body; - access-type=local-file; - name="/u/nsb/Me.jpeg" - - Content-type: image/jpeg - Content-ID: - Content-Transfer-Encoding: binary - - THIS IS NOT REALLY THE BODY! - - The area at the end, which might be called the "phantom body", is - ignored for most external-body messages. However, it may be used to - contain auxiliary information for some such messages, as indeed it is - when the access-type is "mail- server". The only access-type defined - in this document that uses the phantom body is "mail-server", but - other access-types may be defined in the future in other - specifications that use this area. - - The encapsulated headers in ALL "message/external-body" entities MUST - include a Content-ID header field to give a unique identifier by - which to reference the data. This identifier may be used for caching - mechanisms, and for recognizing the receipt of the data when the - access-type is "mail-server". - - Note that, as specified here, the tokens that describe external-body - data, such as file names and mail server commands, are required to be - in the US-ASCII character set. - - - - -Freed & Borenstein Standards Track [Page 33] - -RFC 2046 Media Types November 1996 - - - If this proves problematic in practice, a new mechanism may be - required as a future extension to MIME, either as newly defined - access-types for "message/external-body" or by some other mechanism. - - As with "message/partial", MIME entities of type "message/external- - body" MUST have a content-transfer-encoding of 7bit (the default). - In particular, even in environments that support binary or 8bit - transport, the use of a content- transfer-encoding of "8bit" or - "binary" is explicitly prohibited for entities of type - "message/external-body". - -5.2.3.1. General External-Body Parameters - - The parameters that may be used with any "message/external- body" - are: - - (1) ACCESS-TYPE -- A word indicating the supported access - mechanism by which the file or data may be obtained. - This word is not case sensitive. Values include, but - are not limited to, "FTP", "ANON-FTP", "TFTP", "LOCAL- - FILE", and "MAIL-SERVER". Future values, except for - experimental values beginning with "X-", must be - registered with IANA, as described in RFC 2048. - This parameter is unconditionally mandatory and MUST be - present on EVERY "message/external-body". - - (2) EXPIRATION -- The date (in the RFC 822 "date-time" - syntax, as extended by RFC 1123 to permit 4 digits in - the year field) after which the existence of the - external data is not guaranteed. This parameter may be - used with ANY access-type and is ALWAYS optional. - - (3) SIZE -- The size (in octets) of the data. The intent - of this parameter is to help the recipient decide - whether or not to expend the necessary resources to - retrieve the external data. Note that this describes - the size of the data in its canonical form, that is, - before any Content-Transfer-Encoding has been applied - or after the data have been decoded. This parameter - may be used with ANY access-type and is ALWAYS - optional. - - (4) PERMISSION -- A case-insensitive field that indicates - whether or not it is expected that clients might also - attempt to overwrite the data. By default, or if - permission is "read", the assumption is that they are - not, and that if the data is retrieved once, it is - never needed again. If PERMISSION is "read-write", - - - -Freed & Borenstein Standards Track [Page 34] - -RFC 2046 Media Types November 1996 - - - this assumption is invalid, and any local copy must be - considered no more than a cache. "Read" and "Read- - write" are the only defined values of permission. This - parameter may be used with ANY access-type and is - ALWAYS optional. - - The precise semantics of the access-types defined here are described - in the sections that follow. - -5.2.3.2. The 'ftp' and 'tftp' Access-Types - - An access-type of FTP or TFTP indicates that the message body is - accessible as a file using the FTP [RFC-959] or TFTP [RFC- 783] - protocols, respectively. For these access-types, the following - additional parameters are mandatory: - - (1) NAME -- The name of the file that contains the actual - body data. - - (2) SITE -- A machine from which the file may be obtained, - using the given protocol. This must be a fully - qualified domain name, not a nickname. - - (3) Before any data are retrieved, using FTP, the user will - generally need to be asked to provide a login id and a - password for the machine named by the site parameter. - For security reasons, such an id and password are not - specified as content-type parameters, but must be - obtained from the user. - - In addition, the following parameters are optional: - - (1) DIRECTORY -- A directory from which the data named by - NAME should be retrieved. - - (2) MODE -- A case-insensitive string indicating the mode - to be used when retrieving the information. The valid - values for access-type "TFTP" are "NETASCII", "OCTET", - and "MAIL", as specified by the TFTP protocol [RFC- - 783]. The valid values for access-type "FTP" are - "ASCII", "EBCDIC", "IMAGE", and "LOCALn" where "n" is a - decimal integer, typically 8. These correspond to the - representation types "A" "E" "I" and "L n" as specified - by the FTP protocol [RFC-959]. Note that "BINARY" and - "TENEX" are not valid values for MODE and that "OCTET" - or "IMAGE" or "LOCAL8" should be used instead. IF MODE - is not specified, the default value is "NETASCII" for - TFTP and "ASCII" otherwise. - - - -Freed & Borenstein Standards Track [Page 35] - -RFC 2046 Media Types November 1996 - - -5.2.3.3. The 'anon-ftp' Access-Type - - The "anon-ftp" access-type is identical to the "ftp" access type, - except that the user need not be asked to provide a name and password - for the specified site. Instead, the ftp protocol will be used with - login "anonymous" and a password that corresponds to the user's mail - address. - -5.2.3.4. The 'local-file' Access-Type - - An access-type of "local-file" indicates that the actual body is - accessible as a file on the local machine. Two additional parameters - are defined for this access type: - - (1) NAME -- The name of the file that contains the actual - body data. This parameter is mandatory for the - "local-file" access-type. - - (2) SITE -- A domain specifier for a machine or set of - machines that are known to have access to the data - file. This optional parameter is used to describe the - locality of reference for the data, that is, the site - or sites at which the file is expected to be visible. - Asterisks may be used for wildcard matching to a part - of a domain name, such as "*.bellcore.com", to indicate - a set of machines on which the data should be directly - visible, while a single asterisk may be used to - indicate a file that is expected to be universally - available, e.g., via a global file system. - -5.2.3.5. The 'mail-server' Access-Type - - The "mail-server" access-type indicates that the actual body is - available from a mail server. Two additional parameters are defined - for this access-type: - - (1) SERVER -- The addr-spec of the mail server from which - the actual body data can be obtained. This parameter - is mandatory for the "mail-server" access-type. - - (2) SUBJECT -- The subject that is to be used in the mail - that is sent to obtain the data. Note that keying mail - servers on Subject lines is NOT recommended, but such - mail servers are known to exist. This is an optional - parameter. - - - - - - -Freed & Borenstein Standards Track [Page 36] - -RFC 2046 Media Types November 1996 - - - Because mail servers accept a variety of syntaxes, some of which is - multiline, the full command to be sent to a mail server is not - included as a parameter in the content-type header field. Instead, - it is provided as the "phantom body" when the media type is - "message/external-body" and the access-type is mail-server. - - Note that MIME does not define a mail server syntax. Rather, it - allows the inclusion of arbitrary mail server commands in the phantom - body. Implementations must include the phantom body in the body of - the message it sends to the mail server address to retrieve the - relevant data. - - Unlike other access-types, mail-server access is asynchronous and - will happen at an unpredictable time in the future. For this reason, - it is important that there be a mechanism by which the returned data - can be matched up with the original "message/external-body" entity. - MIME mail servers must use the same Content-ID field on the returned - message that was used in the original "message/external-body" - entities, to facilitate such matching. - -5.2.3.6. External-Body Security Issues - - "Message/external-body" entities give rise to two important security - issues: - - (1) Accessing data via a "message/external-body" reference - effectively results in the message recipient performing - an operation that was specified by the message - originator. It is therefore possible for the message - originator to trick a recipient into doing something - they would not have done otherwise. For example, an - originator could specify a action that attempts - retrieval of material that the recipient is not - authorized to obtain, causing the recipient to - unwittingly violate some security policy. For this - reason, user agents capable of resolving external - references must always take steps to describe the - action they are to take to the recipient and ask for - explicit permisssion prior to performing it. - - The 'mail-server' access-type is particularly - vulnerable, in that it causes the recipient to send a - new message whose contents are specified by the - original message's originator. Given the potential for - abuse, any such request messages that are constructed - should contain a clear indication that they were - generated automatically (e.g. in a Comments: header - field) in an attempt to resolve a MIME - - - -Freed & Borenstein Standards Track [Page 37] - -RFC 2046 Media Types November 1996 - - - "message/external-body" reference. - - (2) MIME will sometimes be used in environments that - provide some guarantee of message integrity and - authenticity. If present, such guarantees may apply - only to the actual direct content of messages -- they - may or may not apply to data accessed through MIME's - "message/external-body" mechanism. In particular, it - may be possible to subvert certain access mechanisms - even when the messaging system itself is secure. - - It should be noted that this problem exists either with - or without the availabilty of MIME mechanisms. A - casual reference to an FTP site containing a document - in the text of a secure message brings up similar - issues -- the only difference is that MIME provides for - automatic retrieval of such material, and users may - place unwarranted trust is such automatic retrieval - mechanisms. - -5.2.3.7. Examples and Further Explanations - - When the external-body mechanism is used in conjunction with the - "multipart/alternative" media type it extends the functionality of - "multipart/alternative" to include the case where the same entity is - provided in the same format but via different accces mechanisms. - When this is done the originator of the message must order the parts - first in terms of preferred formats and then by preferred access - mechanisms. The recipient's viewer should then evaluate the list - both in terms of format and access mechanisms. - - With the emerging possibility of very wide-area file systems, it - becomes very hard to know in advance the set of machines where a file - will and will not be accessible directly from the file system. - Therefore it may make sense to provide both a file name, to be tried - directly, and the name of one or more sites from which the file is - known to be accessible. An implementation can try to retrieve remote - files using FTP or any other protocol, using anonymous file retrieval - or prompting the user for the necessary name and password. If an - external body is accessible via multiple mechanisms, the sender may - include multiple entities of type "message/external-body" within the - body parts of an enclosing "multipart/alternative" entity. - - However, the external-body mechanism is not intended to be limited to - file retrieval, as shown by the mail-server access-type. Beyond - this, one can imagine, for example, using a video server for external - references to video clips. - - - - -Freed & Borenstein Standards Track [Page 38] - -RFC 2046 Media Types November 1996 - - - The embedded message header fields which appear in the body of the - "message/external-body" data must be used to declare the media type - of the external body if it is anything other than plain US-ASCII - text, since the external body does not have a header section to - declare its type. Similarly, any Content-transfer-encoding other - than "7bit" must also be declared here. Thus a complete - "message/external-body" message, referring to an object in PostScript - format, might look like this: - - From: Whomever - To: Someone - Date: Whenever - Subject: whatever - MIME-Version: 1.0 - Message-ID: - Content-Type: multipart/alternative; boundary=42 - Content-ID: - - --42 - Content-Type: message/external-body; name="BodyFormats.ps"; - site="thumper.bellcore.com"; mode="image"; - access-type=ANON-FTP; directory="pub"; - expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" - - Content-type: application/postscript - Content-ID: - - --42 - Content-Type: message/external-body; access-type=local-file; - name="/u/nsb/writing/rfcs/RFC-MIME.ps"; - site="thumper.bellcore.com"; - expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" - - Content-type: application/postscript - Content-ID: - - --42 - Content-Type: message/external-body; - access-type=mail-server - server="listserv@bogus.bitnet"; - expiration="Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" - - Content-type: application/postscript - Content-ID: - - get RFC-MIME.DOC - - --42-- - - - -Freed & Borenstein Standards Track [Page 39] - -RFC 2046 Media Types November 1996 - - - Note that in the above examples, the default Content-transfer- - encoding of "7bit" is assumed for the external postscript data. - - Like the "message/partial" type, the "message/external-body" media - type is intended to be transparent, that is, to convey the data type - in the external body rather than to convey a message with a body of - that type. Thus the headers on the outer and inner parts must be - merged using the same rules as for "message/partial". In particular, - this means that the Content-type and Subject fields are overridden, - but the From field is preserved. - - Note that since the external bodies are not transported along with - the external body reference, they need not conform to transport - limitations that apply to the reference itself. In particular, - Internet mail transports may impose 7bit and line length limits, but - these do not automatically apply to binary external body references. - Thus a Content-Transfer-Encoding is not generally necessary, though - it is permitted. - - Note that the body of a message of type "message/external-body" is - governed by the basic syntax for an RFC 822 message. In particular, - anything before the first consecutive pair of CRLFs is header - information, while anything after it is body information, which is - ignored for most access-types. - -5.2.4. Other Message Subtypes - - MIME implementations must in general treat unrecognized subtypes of - "message" as being equivalent to "application/octet-stream". - - Future subtypes of "message" intended for use with email should be - restricted to "7bit" encoding. A type other than "message" should be - used if restriction to "7bit" is not possible. - -6. Experimental Media Type Values - - A media type value beginning with the characters "X-" is a private - value, to be used by consenting systems by mutual agreement. Any - format without a rigorous and public definition must be named with an - "X-" prefix, and publicly specified values shall never begin with - "X-". (Older versions of the widely used Andrew system use the "X- - BE2" name, so new systems should probably choose a different name.) - - In general, the use of "X-" top-level types is strongly discouraged. - Implementors should invent subtypes of the existing types whenever - possible. In many cases, a subtype of "application" will be more - appropriate than a new top-level type. - - - - -Freed & Borenstein Standards Track [Page 40] - -RFC 2046 Media Types November 1996 - - -7. Summary - - The five discrete media types provide provide a standardized - mechanism for tagging entities as "audio", "image", or several other - kinds of data. The composite "multipart" and "message" media types - allow mixing and hierarchical structuring of entities of different - types in a single message. A distinguished parameter syntax allows - further specification of data format details, particularly the - specification of alternate character sets. Additional optional - header fields provide mechanisms for certain extensions deemed - desirable by many implementors. Finally, a number of useful media - types are defined for general use by consenting user agents, notably - "message/partial" and "message/external-body". - -9. Security Considerations - - Security issues are discussed in the context of the - "application/postscript" type, the "message/external-body" type, and - in RFC 2048. Implementors should pay special attention to the - security implications of any media types that can cause the remote - execution of any actions in the recipient's environment. In such - cases, the discussion of the "application/postscript" type may serve - as a model for considering other media types with remote execution - capabilities. - - - - - - - - - - - - - - - - - - - - - - - - - - - -Freed & Borenstein Standards Track [Page 41] - -RFC 2046 Media Types November 1996 - - -9. Authors' Addresses - - For more information, the authors of this document are best contacted - via Internet mail: - - Ned Freed - Innosoft International, Inc. - 1050 East Garvey Avenue South - West Covina, CA 91790 - USA - - Phone: +1 818 919 3600 - Fax: +1 818 919 3614 - EMail: ned@innosoft.com - - - Nathaniel S. Borenstein - First Virtual Holdings - 25 Washington Avenue - Morristown, NJ 07960 - USA - - Phone: +1 201 540 8967 - Fax: +1 201 993 3032 - EMail: nsb@nsb.fv.com - - - MIME is a result of the work of the Internet Engineering Task Force - Working Group on RFC 822 Extensions. The chairman of that group, - Greg Vaudreuil, may be reached at: - - Gregory M. Vaudreuil - Octel Network Services - 17080 Dallas Parkway - Dallas, TX 75248-1905 - USA - - EMail: Greg.Vaudreuil@Octel.Com - - - - - - - - - - - - - -Freed & Borenstein Standards Track [Page 42] - -RFC 2046 Media Types November 1996 - - -Appendix A -- Collected Grammar - - This appendix contains the complete BNF grammar for all the syntax - specified by this document. - - By itself, however, this grammar is incomplete. It refers by name to - several syntax rules that are defined by RFC 822. Rather than - reproduce those definitions here, and risk unintentional differences - between the two, this document simply refers the reader to RFC 822 - for the remaining definitions. Wherever a term is undefined, it - refers to the RFC 822 definition. - - boundary := 0*69 bcharsnospace - - bchars := bcharsnospace / " " - - bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" / - "+" / "_" / "," / "-" / "." / - "/" / ":" / "=" / "?" - - body-part := <"message" as defined in RFC 822, with all - header fields optional, not starting with the - specified dash-boundary, and with the - delimiter not occurring anywhere in the - body part. Note that the semantics of a - part differ from the semantics of a message, - as described in the text.> - - close-delimiter := delimiter "--" - - dash-boundary := "--" boundary - ; boundary taken from the value of - ; boundary parameter of the - ; Content-Type field. - - delimiter := CRLF dash-boundary - - discard-text := *(*text CRLF) - ; May be ignored or discarded. - - encapsulation := delimiter transport-padding - CRLF body-part - - epilogue := discard-text - - multipart-body := [preamble CRLF] - dash-boundary transport-padding CRLF - body-part *encapsulation - - - -Freed & Borenstein Standards Track [Page 43] - -RFC 2046 Media Types November 1996 - - - close-delimiter transport-padding - [CRLF epilogue] - - preamble := discard-text - - transport-padding := *LWSP-char - ; Composers MUST NOT generate - ; non-zero length transport - ; padding, but receivers MUST - ; be able to handle padding - ; added by message transports. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Freed & Borenstein Standards Track [Page 44] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2047.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2047.txt deleted file mode 100644 index ff9a744b..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2047.txt +++ /dev/null @@ -1,843 +0,0 @@ - - - - - - -Network Working Group K. Moore -Request for Comments: 2047 University of Tennessee -Obsoletes: 1521, 1522, 1590 November 1996 -Category: Standards Track - - - MIME (Multipurpose Internet Mail Extensions) Part Three: - Message Header Extensions for Non-ASCII Text - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Abstract - - STD 11, RFC 822, defines a message representation protocol specifying - considerable detail about US-ASCII message headers, and leaves the - message content, or message body, as flat US-ASCII text. This set of - documents, collectively called the Multipurpose Internet Mail - Extensions, or MIME, redefines the format of messages to allow for - - (1) textual message bodies in character sets other than US-ASCII, - - (2) an extensible set of different formats for non-textual message - bodies, - - (3) multi-part message bodies, and - - (4) textual header information in character sets other than US-ASCII. - - These documents are based on earlier work documented in RFC 934, STD - 11, and RFC 1049, but extends and revises them. Because RFC 822 said - so little about message bodies, these documents are largely - orthogonal to (rather than a revision of) RFC 822. - - This particular document is the third document in the series. It - describes extensions to RFC 822 to allow non-US-ASCII text data in - Internet mail header fields. - - - - - - - - - -Moore Standards Track [Page 1] - -RFC 2047 Message Header Extensions November 1996 - - - Other documents in this series include: - - + RFC 2045, which specifies the various headers used to describe - the structure of MIME messages. - - + RFC 2046, which defines the general structure of the MIME media - typing system and defines an initial set of media types, - - + RFC 2048, which specifies various IANA registration procedures - for MIME-related facilities, and - - + RFC 2049, which describes MIME conformance criteria and - provides some illustrative examples of MIME message formats, - acknowledgements, and the bibliography. - - These documents are revisions of RFCs 1521, 1522, and 1590, which - themselves were revisions of RFCs 1341 and 1342. An appendix in RFC - 2049 describes differences and changes from previous versions. - -1. Introduction - - RFC 2045 describes a mechanism for denoting textual body parts which - are coded in various character sets, as well as methods for encoding - such body parts as sequences of printable US-ASCII characters. This - memo describes similar techniques to allow the encoding of non-ASCII - text in various portions of a RFC 822 [2] message header, in a manner - which is unlikely to confuse existing message handling software. - - Like the encoding techniques described in RFC 2045, the techniques - outlined here were designed to allow the use of non-ASCII characters - in message headers in a way which is unlikely to be disturbed by the - quirks of existing Internet mail handling programs. In particular, - some mail relaying programs are known to (a) delete some message - header fields while retaining others, (b) rearrange the order of - addresses in To or Cc fields, (c) rearrange the (vertical) order of - header fields, and/or (d) "wrap" message headers at different places - than those in the original message. In addition, some mail reading - programs are known to have difficulty correctly parsing message - headers which, while legal according to RFC 822, make use of - backslash-quoting to "hide" special characters such as "<", ",", or - ":", or which exploit other infrequently-used features of that - specification. - - While it is unfortunate that these programs do not correctly - interpret RFC 822 headers, to "break" these programs would cause - severe operational problems for the Internet mail system. The - extensions described in this memo therefore do not rely on little- - used features of RFC 822. - - - -Moore Standards Track [Page 2] - -RFC 2047 Message Header Extensions November 1996 - - - Instead, certain sequences of "ordinary" printable ASCII characters - (known as "encoded-words") are reserved for use as encoded data. The - syntax of encoded-words is such that they are unlikely to - "accidentally" appear as normal text in message headers. - Furthermore, the characters used in encoded-words are restricted to - those which do not have special meanings in the context in which the - encoded-word appears. - - Generally, an "encoded-word" is a sequence of printable ASCII - characters that begins with "=?", ends with "?=", and has two "?"s in - between. It specifies a character set and an encoding method, and - also includes the original text encoded as graphic ASCII characters, - according to the rules for that encoding method. - - A mail composer that implements this specification will provide a - means of inputting non-ASCII text in header fields, but will - translate these fields (or appropriate portions of these fields) into - encoded-words before inserting them into the message header. - - A mail reader that implements this specification will recognize - encoded-words when they appear in certain portions of the message - header. Instead of displaying the encoded-word "as is", it will - reverse the encoding and display the original text in the designated - character set. - -NOTES - - This memo relies heavily on notation and terms defined RFC 822 and - RFC 2045. In particular, the syntax for the ABNF used in this memo - is defined in RFC 822, as well as many of the terminal or nonterminal - symbols from RFC 822 are used in the grammar for the header - extensions defined here. Among the symbols defined in RFC 822 and - referenced in this memo are: 'addr-spec', 'atom', 'CHAR', 'comment', - 'CTLs', 'ctext', 'linear-white-space', 'phrase', 'quoted-pair'. - 'quoted-string', 'SPACE', and 'word'. Successful implementation of - this protocol extension requires careful attention to the RFC 822 - definitions of these terms. - - When the term "ASCII" appears in this memo, it refers to the "7-Bit - American Standard Code for Information Interchange", ANSI X3.4-1986. - The MIME charset name for this character set is "US-ASCII". When not - specifically referring to the MIME charset name, this document uses - the term "ASCII", both for brevity and for consistency with RFC 822. - However, implementors are warned that the character set name must be - spelled "US-ASCII" in MIME message and body part headers. - - - - - - -Moore Standards Track [Page 3] - -RFC 2047 Message Header Extensions November 1996 - - - This memo specifies a protocol for the representation of non-ASCII - text in message headers. It specifically DOES NOT define any - translation between "8-bit headers" and pure ASCII headers, nor is - any such translation assumed to be possible. - -2. Syntax of encoded-words - - An 'encoded-word' is defined by the following ABNF grammar. The - notation of RFC 822 is used, with the exception that white space - characters MUST NOT appear between components of an 'encoded-word'. - - encoded-word = "=?" charset "?" encoding "?" encoded-text "?=" - - charset = token ; see section 3 - - encoding = token ; see section 4 - - token = 1* - - especials = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / " - <"> / "/" / "[" / "]" / "?" / "." / "=" - - encoded-text = 1* - ; (but see "Use of encoded-words in message - ; headers", section 5) - - Both 'encoding' and 'charset' names are case-independent. Thus the - charset name "ISO-8859-1" is equivalent to "iso-8859-1", and the - encoding named "Q" may be spelled either "Q" or "q". - - An 'encoded-word' may not be more than 75 characters long, including - 'charset', 'encoding', 'encoded-text', and delimiters. If it is - desirable to encode more text than will fit in an 'encoded-word' of - 75 characters, multiple 'encoded-word's (separated by CRLF SPACE) may - be used. - - While there is no limit to the length of a multiple-line header - field, each line of a header field that contains one or more - 'encoded-word's is limited to 76 characters. - - The length restrictions are included both to ease interoperability - through internetwork mail gateways, and to impose a limit on the - amount of lookahead a header parser must employ (while looking for a - final ?= delimiter) before it can decide whether a token is an - "encoded-word" or something else. - - - - - -Moore Standards Track [Page 4] - -RFC 2047 Message Header Extensions November 1996 - - - IMPORTANT: 'encoded-word's are designed to be recognized as 'atom's - by an RFC 822 parser. As a consequence, unencoded white space - characters (such as SPACE and HTAB) are FORBIDDEN within an - 'encoded-word'. For example, the character sequence - - =?iso-8859-1?q?this is some text?= - - would be parsed as four 'atom's, rather than as a single 'atom' (by - an RFC 822 parser) or 'encoded-word' (by a parser which understands - 'encoded-words'). The correct way to encode the string "this is some - text" is to encode the SPACE characters as well, e.g. - - =?iso-8859-1?q?this=20is=20some=20text?= - - The characters which may appear in 'encoded-text' are further - restricted by the rules in section 5. - -3. Character sets - - The 'charset' portion of an 'encoded-word' specifies the character - set associated with the unencoded text. A 'charset' can be any of - the character set names allowed in an MIME "charset" parameter of a - "text/plain" body part, or any character set name registered with - IANA for use with the MIME text/plain content-type. - - Some character sets use code-switching techniques to switch between - "ASCII mode" and other modes. If unencoded text in an 'encoded-word' - contains a sequence which causes the charset interpreter to switch - out of ASCII mode, it MUST contain additional control codes such that - ASCII mode is again selected at the end of the 'encoded-word'. (This - rule applies separately to each 'encoded-word', including adjacent - 'encoded-word's within a single header field.) - - When there is a possibility of using more than one character set to - represent the text in an 'encoded-word', and in the absence of - private agreements between sender and recipients of a message, it is - recommended that members of the ISO-8859-* series be used in - preference to other character sets. - -4. Encodings - - Initially, the legal values for "encoding" are "Q" and "B". These - encodings are described below. The "Q" encoding is recommended for - use when most of the characters to be encoded are in the ASCII - character set; otherwise, the "B" encoding should be used. - Nevertheless, a mail reader which claims to recognize 'encoded-word's - MUST be able to accept either encoding for any character set which it - supports. - - - -Moore Standards Track [Page 5] - -RFC 2047 Message Header Extensions November 1996 - - - Only a subset of the printable ASCII characters may be used in - 'encoded-text'. Space and tab characters are not allowed, so that - the beginning and end of an 'encoded-word' are obvious. The "?" - character is used within an 'encoded-word' to separate the various - portions of the 'encoded-word' from one another, and thus cannot - appear in the 'encoded-text' portion. Other characters are also - illegal in certain contexts. For example, an 'encoded-word' in a - 'phrase' preceding an address in a From header field may not contain - any of the "specials" defined in RFC 822. Finally, certain other - characters are disallowed in some contexts, to ensure reliability for - messages that pass through internetwork mail gateways. - - The "B" encoding automatically meets these requirements. The "Q" - encoding allows a wide range of printable characters to be used in - non-critical locations in the message header (e.g., Subject), with - fewer characters available for use in other locations. - -4.1. The "B" encoding - - The "B" encoding is identical to the "BASE64" encoding defined by RFC - 2045. - -4.2. The "Q" encoding - - The "Q" encoding is similar to the "Quoted-Printable" content- - transfer-encoding defined in RFC 2045. It is designed to allow text - containing mostly ASCII characters to be decipherable on an ASCII - terminal without decoding. - - (1) Any 8-bit value may be represented by a "=" followed by two - hexadecimal digits. For example, if the character set in use - were ISO-8859-1, the "=" character would thus be encoded as - "=3D", and a SPACE by "=20". (Upper case should be used for - hexadecimal digits "A" through "F".) - - (2) The 8-bit hexadecimal value 20 (e.g., ISO-8859-1 SPACE) may be - represented as "_" (underscore, ASCII 95.). (This character may - not pass through some internetwork mail gateways, but its use - will greatly enhance readability of "Q" encoded data with mail - readers that do not support this encoding.) Note that the "_" - always represents hexadecimal 20, even if the SPACE character - occupies a different code position in the character set in use. - - (3) 8-bit values which correspond to printable ASCII characters other - than "=", "?", and "_" (underscore), MAY be represented as those - characters. (But see section 5 for restrictions.) In - particular, SPACE and TAB MUST NOT be represented as themselves - within encoded words. - - - -Moore Standards Track [Page 6] - -RFC 2047 Message Header Extensions November 1996 - - -5. Use of encoded-words in message headers - - An 'encoded-word' may appear in a message header or body part header - according to the following rules: - -(1) An 'encoded-word' may replace a 'text' token (as defined by RFC 822) - in any Subject or Comments header field, any extension message - header field, or any MIME body part field for which the field body - is defined as '*text'. An 'encoded-word' may also appear in any - user-defined ("X-") message or body part header field. - - Ordinary ASCII text and 'encoded-word's may appear together in the - same header field. However, an 'encoded-word' that appears in a - header field defined as '*text' MUST be separated from any adjacent - 'encoded-word' or 'text' by 'linear-white-space'. - -(2) An 'encoded-word' may appear within a 'comment' delimited by "(" and - ")", i.e., wherever a 'ctext' is allowed. More precisely, the RFC - 822 ABNF definition for 'comment' is amended as follows: - - comment = "(" *(ctext / quoted-pair / comment / encoded-word) ")" - - A "Q"-encoded 'encoded-word' which appears in a 'comment' MUST NOT - contain the characters "(", ")" or " - 'encoded-word' that appears in a 'comment' MUST be separated from - any adjacent 'encoded-word' or 'ctext' by 'linear-white-space'. - - It is important to note that 'comment's are only recognized inside - "structured" field bodies. In fields whose bodies are defined as - '*text', "(" and ")" are treated as ordinary characters rather than - comment delimiters, and rule (1) of this section applies. (See RFC - 822, sections 3.1.2 and 3.1.3) - -(3) As a replacement for a 'word' entity within a 'phrase', for example, - one that precedes an address in a From, To, or Cc header. The ABNF - definition for 'phrase' from RFC 822 thus becomes: - - phrase = 1*( encoded-word / word ) - - In this case the set of characters that may be used in a "Q"-encoded - 'encoded-word' is restricted to: . An 'encoded-word' that appears within a - 'phrase' MUST be separated from any adjacent 'word', 'text' or - 'special' by 'linear-white-space'. - - - - - - -Moore Standards Track [Page 7] - -RFC 2047 Message Header Extensions November 1996 - - - These are the ONLY locations where an 'encoded-word' may appear. In - particular: - - + An 'encoded-word' MUST NOT appear in any portion of an 'addr-spec'. - - + An 'encoded-word' MUST NOT appear within a 'quoted-string'. - - + An 'encoded-word' MUST NOT be used in a Received header field. - - + An 'encoded-word' MUST NOT be used in parameter of a MIME - Content-Type or Content-Disposition field, or in any structured - field body except within a 'comment' or 'phrase'. - - The 'encoded-text' in an 'encoded-word' must be self-contained; - 'encoded-text' MUST NOT be continued from one 'encoded-word' to - another. This implies that the 'encoded-text' portion of a "B" - 'encoded-word' will be a multiple of 4 characters long; for a "Q" - 'encoded-word', any "=" character that appears in the 'encoded-text' - portion will be followed by two hexadecimal characters. - - Each 'encoded-word' MUST encode an integral number of octets. The - 'encoded-text' in each 'encoded-word' must be well-formed according - to the encoding specified; the 'encoded-text' may not be continued in - the next 'encoded-word'. (For example, "=?charset?Q?=?= - =?charset?Q?AB?=" would be illegal, because the two hex digits "AB" - must follow the "=" in the same 'encoded-word'.) - - Each 'encoded-word' MUST represent an integral number of characters. - A multi-octet character may not be split across adjacent 'encoded- - word's. - - Only printable and white space character data should be encoded using - this scheme. However, since these encoding schemes allow the - encoding of arbitrary octet values, mail readers that implement this - decoding should also ensure that display of the decoded data on the - recipient's terminal will not cause unwanted side-effects. - - Use of these methods to encode non-textual data (e.g., pictures or - sounds) is not defined by this memo. Use of 'encoded-word's to - represent strings of purely ASCII characters is allowed, but - discouraged. In rare cases it may be necessary to encode ordinary - text that looks like an 'encoded-word'. - - - - - - - - - -Moore Standards Track [Page 8] - -RFC 2047 Message Header Extensions November 1996 - - -6. Support of 'encoded-word's by mail readers - -6.1. Recognition of 'encoded-word's in message headers - - A mail reader must parse the message and body part headers according - to the rules in RFC 822 to correctly recognize 'encoded-word's. - - 'encoded-word's are to be recognized as follows: - - (1) Any message or body part header field defined as '*text', or any - user-defined header field, should be parsed as follows: Beginning - at the start of the field-body and immediately following each - occurrence of 'linear-white-space', each sequence of up to 75 - printable characters (not containing any 'linear-white-space') - should be examined to see if it is an 'encoded-word' according to - the syntax rules in section 2. Any other sequence of printable - characters should be treated as ordinary ASCII text. - - (2) Any header field not defined as '*text' should be parsed - according to the syntax rules for that header field. However, - any 'word' that appears within a 'phrase' should be treated as an - 'encoded-word' if it meets the syntax rules in section 2. - Otherwise it should be treated as an ordinary 'word'. - - (3) Within a 'comment', any sequence of up to 75 printable characters - (not containing 'linear-white-space'), that meets the syntax - rules in section 2, should be treated as an 'encoded-word'. - Otherwise it should be treated as normal comment text. - - (4) A MIME-Version header field is NOT required to be present for - 'encoded-word's to be interpreted according to this - specification. One reason for this is that the mail reader is - not expected to parse the entire message header before displaying - lines that may contain 'encoded-word's. - -6.2. Display of 'encoded-word's - - Any 'encoded-word's so recognized are decoded, and if possible, the - resulting unencoded text is displayed in the original character set. - - NOTE: Decoding and display of encoded-words occurs *after* a - structured field body is parsed into tokens. It is therefore - possible to hide 'special' characters in encoded-words which, when - displayed, will be indistinguishable from 'special' characters in the - surrounding text. For this and other reasons, it is NOT generally - possible to translate a message header containing 'encoded-word's to - an unencoded form which can be parsed by an RFC 822 mail reader. - - - - -Moore Standards Track [Page 9] - -RFC 2047 Message Header Extensions November 1996 - - - When displaying a particular header field that contains multiple - 'encoded-word's, any 'linear-white-space' that separates a pair of - adjacent 'encoded-word's is ignored. (This is to allow the use of - multiple 'encoded-word's to represent long strings of unencoded text, - without having to separate 'encoded-word's where spaces occur in the - unencoded text.) - - In the event other encodings are defined in the future, and the mail - reader does not support the encoding used, it may either (a) display - the 'encoded-word' as ordinary text, or (b) substitute an appropriate - message indicating that the text could not be decoded. - - If the mail reader does not support the character set used, it may - (a) display the 'encoded-word' as ordinary text (i.e., as it appears - in the header), (b) make a "best effort" to display using such - characters as are available, or (c) substitute an appropriate message - indicating that the decoded text could not be displayed. - - If the character set being used employs code-switching techniques, - display of the encoded text implicitly begins in "ASCII mode". In - addition, the mail reader must ensure that the output device is once - again in "ASCII mode" after the 'encoded-word' is displayed. - -6.3. Mail reader handling of incorrectly formed 'encoded-word's - - It is possible that an 'encoded-word' that is legal according to the - syntax defined in section 2, is incorrectly formed according to the - rules for the encoding being used. For example: - - (1) An 'encoded-word' which contains characters which are not legal - for a particular encoding (for example, a "-" in the "B" - encoding, or a SPACE or HTAB in either the "B" or "Q" encoding), - is incorrectly formed. - - (2) Any 'encoded-word' which encodes a non-integral number of - characters or octets is incorrectly formed. - - A mail reader need not attempt to display the text associated with an - 'encoded-word' that is incorrectly formed. However, a mail reader - MUST NOT prevent the display or handling of a message because an - 'encoded-word' is incorrectly formed. - -7. Conformance - - A mail composing program claiming compliance with this specification - MUST ensure that any string of non-white-space printable ASCII - characters within a '*text' or '*ctext' that begins with "=?" and - ends with "?=" be a valid 'encoded-word'. ("begins" means: at the - - - -Moore Standards Track [Page 10] - -RFC 2047 Message Header Extensions November 1996 - - - start of the field-body, immediately following 'linear-white-space', - or immediately following a "(" for an 'encoded-word' within '*ctext'; - "ends" means: at the end of the field-body, immediately preceding - 'linear-white-space', or immediately preceding a ")" for an - 'encoded-word' within '*ctext'.) In addition, any 'word' within a - 'phrase' that begins with "=?" and ends with "?=" must be a valid - 'encoded-word'. - - A mail reading program claiming compliance with this specification - must be able to distinguish 'encoded-word's from 'text', 'ctext', or - 'word's, according to the rules in section 6, anytime they appear in - appropriate places in message headers. It must support both the "B" - and "Q" encodings for any character set which it supports. The - program must be able to display the unencoded text if the character - set is "US-ASCII". For the ISO-8859-* character sets, the mail - reading program must at least be able to display the characters which - are also in the ASCII set. - -8. Examples - - The following are examples of message headers containing 'encoded- - word's: - - From: =?US-ASCII?Q?Keith_Moore?= - To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= - CC: =?ISO-8859-1?Q?Andr=E9?= Pirard - Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= - =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?= - - Note: In the first 'encoded-word' of the Subject field above, the - last "=" at the end of the 'encoded-text' is necessary because each - 'encoded-word' must be self-contained (the "=" character completes a - group of 4 base64 characters representing 2 octets). An additional - octet could have been encoded in the first 'encoded-word' (so that - the encoded-word would contain an exact multiple of 3 encoded - octets), except that the second 'encoded-word' uses a different - 'charset' than the first one. - - From: =?ISO-8859-1?Q?Olle_J=E4rnefors?= - To: ietf-822@dimacs.rutgers.edu, ojarnef@admin.kth.se - Subject: Time for ISO 10646? - - To: Dave Crocker - Cc: ietf-822@dimacs.rutgers.edu, paf@comsol.se - From: =?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= - Subject: Re: RFC-HDR care and feeding - - - - - -Moore Standards Track [Page 11] - -RFC 2047 Message Header Extensions November 1996 - - - From: Nathaniel Borenstein - (=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=) - To: Greg Vaudreuil , Ned Freed - , Keith Moore - Subject: Test of new header generator - MIME-Version: 1.0 - Content-type: text/plain; charset=ISO-8859-1 - - The following examples illustrate how text containing 'encoded-word's - which appear in a structured field body. The rules are slightly - different for fields defined as '*text' because "(" and ")" are not - recognized as 'comment' delimiters. [Section 5, paragraph (1)]. - - In each of the following examples, if the same sequence were to occur - in a '*text' field, the "displayed as" form would NOT be treated as - encoded words, but be identical to the "encoded form". This is - because each of the encoded-words in the following examples is - adjacent to a "(" or ")" character. - - encoded form displayed as - --------------------------------------------------------------------- - (=?ISO-8859-1?Q?a?=) (a) - - (=?ISO-8859-1?Q?a?= b) (a b) - - Within a 'comment', white space MUST appear between an - 'encoded-word' and surrounding text. [Section 5, - paragraph (2)]. However, white space is not needed between - the initial "(" that begins the 'comment', and the - 'encoded-word'. - - - (=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=) (ab) - - White space between adjacent 'encoded-word's is not - displayed. - - (=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=) (ab) - - Even multiple SPACEs between 'encoded-word's are ignored - for the purpose of display. - - (=?ISO-8859-1?Q?a?= (ab) - =?ISO-8859-1?Q?b?=) - - Any amount of linear-space-white between 'encoded-word's, - even if it includes a CRLF followed by one or more SPACEs, - is ignored for the purposes of display. - - - -Moore Standards Track [Page 12] - -RFC 2047 Message Header Extensions November 1996 - - - (=?ISO-8859-1?Q?a_b?=) (a b) - - In order to cause a SPACE to be displayed within a portion - of encoded text, the SPACE MUST be encoded as part of the - 'encoded-word'. - - (=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=) (a b) - - In order to cause a SPACE to be displayed between two strings - of encoded text, the SPACE MAY be encoded as part of one of - the 'encoded-word's. - -9. References - - [RFC 822] Crocker, D., "Standard for the Format of ARPA Internet Text - Messages", STD 11, RFC 822, UDEL, August 1982. - - [RFC 2049] Borenstein, N., and N. Freed, "Multipurpose Internet Mail - Extensions (MIME) Part Five: Conformance Criteria and Examples", - RFC 2049, November 1996. - - [RFC 2045] Borenstein, N., and N. Freed, "Multipurpose Internet Mail - Extensions (MIME) Part One: Format of Internet Message Bodies", - RFC 2045, November 1996. - - [RFC 2046] Borenstein N., and N. Freed, "Multipurpose Internet Mail - Extensions (MIME) Part Two: Media Types", RFC 2046, - November 1996. - - [RFC 2048] Freed, N., Klensin, J., and J. Postel, "Multipurpose - Internet Mail Extensions (MIME) Part Four: Registration - Procedures", RFC 2048, November 1996. - - - - - - - - - - - - - - - - - - - -Moore Standards Track [Page 13] - -RFC 2047 Message Header Extensions November 1996 - - -10. Security Considerations - - Security issues are not discussed in this memo. - -11. Acknowledgements - - The author wishes to thank Nathaniel Borenstein, Issac Chan, Lutz - Donnerhacke, Paul Eggert, Ned Freed, Andreas M. Kirchwitz, Olle - Jarnefors, Mike Rosin, Yutaka Sato, Bart Schaefer, and Kazuhiko - Yamamoto, for their helpful advice, insightful comments, and - illuminating questions in response to earlier versions of this - specification. - -12. Author's Address - - Keith Moore - University of Tennessee - 107 Ayres Hall - Knoxville TN 37996-1301 - - EMail: moore@cs.utk.edu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Moore Standards Track [Page 14] - -RFC 2047 Message Header Extensions November 1996 - - -Appendix - changes since RFC 1522 (in no particular order) - - + explicitly state that the MIME-Version is not requried to use - 'encoded-word's. - - + add explicit note that SPACEs and TABs are not allowed within - 'encoded-word's, explaining that an 'encoded-word' must look like an - 'atom' to an RFC822 parser.values, to be precise). - - + add examples from Olle Jarnefors (thanks!) which illustrate how - encoded-words with adjacent linear-white-space are displayed. - - + explicitly list terms defined in RFC822 and referenced in this memo - - + fix transcription typos that caused one or two lines and a couple of - characters to disappear in the resulting text, due to nroff quirks. - - + clarify that encoded-words are allowed in '*text' fields in both - RFC822 headers and MIME body part headers, but NOT as parameter - values. - - + clarify the requirement to switch back to ASCII within the encoded - portion of an 'encoded-word', for any charset that uses code switching - sequences. - - + add a note about 'encoded-word's being delimited by "(" and ")" - within a comment, but not in a *text (how bizarre!). - - + fix the Andre Pirard example to get rid of the trailing "_" after - the =E9. (no longer needed post-1342). - - + clarification: an 'encoded-word' may appear immediately following - the initial "(" or immediately before the final ")" that delimits a - comment, not just adjacent to "(" and ")" *within* *ctext. - - + add a note to explain that a "B" 'encoded-word' will always have a - multiple of 4 characters in the 'encoded-text' portion. - - + add note about the "=" in the examples - - + note that processing of 'encoded-word's occurs *after* parsing, and - some of the implications thereof. - - + explicitly state that you can't expect to translate between - 1522 and either vanilla 822 or so-called "8-bit headers". - - + explicitly state that 'encoded-word's are not valid within a - 'quoted-string'. - - - -Moore Standards Track [Page 15] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2048.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2048.txt deleted file mode 100644 index a3b18b31..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2048.txt +++ /dev/null @@ -1,1180 +0,0 @@ - - - - - - -Network Working Group N. Freed -Request for Comments: 2048 Innosoft -BCP: 13 J. Klensin -Obsoletes: 1521, 1522, 1590 MCI -Category: Best Current Practice J. Postel - ISI - November 1996 - - - Multipurpose Internet Mail Extensions - (MIME) Part Four: - Registration Procedures - -Status of this Memo - - This document specifies an Internet Best Current Practices for the - Internet Community, and requests discussion and suggestions for - improvements. Distribution of this memo is unlimited. - -Abstract - - STD 11, RFC 822, defines a message representation protocol specifying - considerable detail about US-ASCII message headers, and leaves the - message content, or message body, as flat US-ASCII text. This set of - documents, collectively called the Multipurpose Internet Mail - Extensions, or MIME, redefines the format of messages to allow for - - (1) textual message bodies in character sets other than - US-ASCII, - - (2) an extensible set of different formats for non-textual - message bodies, - - (3) multi-part message bodies, and - - (4) textual header information in character sets other than - US-ASCII. - - These documents are based on earlier work documented in RFC 934, STD - 11, and RFC 1049, but extends and revises them. Because RFC 822 said - so little about message bodies, these documents are largely - orthogonal to (rather than a revision of) RFC 822. - - - - - - - - - -Freed, et. al. Best Current Practice [Page 1] - -RFC 2048 MIME Registration Procedures November 1996 - - - This fourth document, RFC 2048, specifies various IANA registration - procedures for the following MIME facilities: - - (1) media types, - - (2) external body access types, - - (3) content-transfer-encodings. - - Registration of character sets for use in MIME is covered elsewhere - and is no longer addressed by this document. - - These documents are revisions of RFCs 1521 and 1522, which themselves - were revisions of RFCs 1341 and 1342. An appendix in RFC 2049 - describes differences and changes from previous versions. - -Table of Contents - - 1. Introduction ......................................... 3 - 2. Media Type Registration .............................. 4 - 2.1 Registration Trees and Subtype Names ................ 4 - 2.1.1 IETF Tree ......................................... 4 - 2.1.2 Vendor Tree ....................................... 4 - 2.1.3 Personal or Vanity Tree ........................... 5 - 2.1.4 Special `x.' Tree ................................. 5 - 2.1.5 Additional Registration Trees ..................... 6 - 2.2 Registration Requirements ........................... 6 - 2.2.1 Functionality Requirement ......................... 6 - 2.2.2 Naming Requirements ............................... 6 - 2.2.3 Parameter Requirements ............................ 7 - 2.2.4 Canonicalization and Format Requirements .......... 7 - 2.2.5 Interchange Recommendations ....................... 8 - 2.2.6 Security Requirements ............................. 8 - 2.2.7 Usage and Implementation Non-requirements ......... 9 - 2.2.8 Publication Requirements .......................... 10 - 2.2.9 Additional Information ............................ 10 - 2.3 Registration Procedure .............................. 11 - 2.3.1 Present the Media Type to the Community for Review 11 - 2.3.2 IESG Approval ..................................... 12 - 2.3.3 IANA Registration ................................. 12 - 2.4 Comments on Media Type Registrations ................ 12 - 2.5 Location of Registered Media Type List .............. 12 - 2.6 IANA Procedures for Registering Media Types ......... 12 - 2.7 Change Control ...................................... 13 - 2.8 Registration Template ............................... 14 - 3. External Body Access Types ........................... 14 - 3.1 Registration Requirements ........................... 15 - 3.1.1 Naming Requirements ............................... 15 - - - -Freed, et. al. Best Current Practice [Page 2] - -RFC 2048 MIME Registration Procedures November 1996 - - - 3.1.2 Mechanism Specification Requirements .............. 15 - 3.1.3 Publication Requirements .......................... 15 - 3.1.4 Security Requirements ............................. 15 - 3.2 Registration Procedure .............................. 15 - 3.2.1 Present the Access Type to the Community .......... 16 - 3.2.2 Access Type Reviewer .............................. 16 - 3.2.3 IANA Registration ................................. 16 - 3.3 Location of Registered Access Type List ............. 16 - 3.4 IANA Procedures for Registering Access Types ........ 16 - 4. Transfer Encodings ................................... 17 - 4.1 Transfer Encoding Requirements ...................... 17 - 4.1.1 Naming Requirements ............................... 17 - 4.1.2 Algorithm Specification Requirements .............. 18 - 4.1.3 Input Domain Requirements ......................... 18 - 4.1.4 Output Range Requirements ......................... 18 - 4.1.5 Data Integrity and Generality Requirements ........ 18 - 4.1.6 New Functionality Requirements .................... 18 - 4.2 Transfer Encoding Definition Procedure .............. 19 - 4.3 IANA Procedures for Transfer Encoding Registration... 19 - 4.4 Location of Registered Transfer Encodings List ...... 19 - 5. Authors' Addresses ................................... 20 - A. Grandfathered Media Types ............................ 21 - -1. Introduction - - Recent Internet protocols have been carefully designed to be easily - extensible in certain areas. In particular, MIME [RFC 2045] is an - open-ended framework and can accommodate additional object types, - character sets, and access methods without any changes to the basic - protocol. A registration process is needed, however, to ensure that - the set of such values is developed in an orderly, well-specified, - and public manner. - - This document defines registration procedures which use the Internet - Assigned Numbers Authority (IANA) as a central registry for such - values. - - Historical Note: The registration process for media types was - initially defined in the context of the asynchronous Internet mail - environment. In this mail environment there is a need to limit the - number of possible media types to increase the likelihood of - interoperability when the capabilities of the remote mail system are - not known. As media types are used in new environments, where the - proliferation of media types is not a hindrance to interoperability, - the original procedure was excessively restrictive and had to be - generalized. - - - - - -Freed, et. al. Best Current Practice [Page 3] - -RFC 2048 MIME Registration Procedures November 1996 - - -2. Media Type Registration - - Registration of a new media type or types starts with the - construction of a registration proposal. Registration may occur in - several different registration trees, which have different - requirements as discussed below. In general, the new registration - proposal is circulated and reviewed in a fashion appropriate to the - tree involved. The media type is then registered if the proposal is - acceptable. The following sections describe the requirements and - procedures used for each of the different registration trees. - -2.1. Registration Trees and Subtype Names - - In order to increase the efficiency and flexibility of the - registration process, different structures of subtype names may be - registered to accomodate the different natural requirements for, - e.g., a subtype that will be recommended for wide support and - implementation by the Internet Community or a subtype that is used to - move files associated with proprietary software. The following - subsections define registration "trees", distinguished by the use of - faceted names (e.g., names of the form "tree.subtree...type"). Note - that some media types defined prior to this document do not conform - to the naming conventions described below. See Appendix A for a - discussion of them. - -2.1.1. IETF Tree - - The IETF tree is intended for types of general interest to the - Internet Community. Registration in the IETF tree requires approval - by the IESG and publication of the media type registration as some - form of RFC. - - Media types in the IETF tree are normally denoted by names that are - not explicitly faceted, i.e., do not contain period (".", full stop) - characters. - - The "owner" of a media type registration in the IETF tree is assumed - to be the IETF itself. Modification or alteration of the - specification requires the same level of processing (e.g. standards - track) required for the initial registration. - -2.1.2. Vendor Tree - - The vendor tree is used for media types associated with commercially - available products. "Vendor" or "producer" are construed as - equivalent and very broadly in this context. - - - - - -Freed, et. al. Best Current Practice [Page 4] - -RFC 2048 MIME Registration Procedures November 1996 - - - A registration may be placed in the vendor tree by anyone who has - need to interchange files associated with the particular product. - However, the registration formally belongs to the vendor or - organization producing the software or file format. Changes to the - specification will be made at their request, as discussed in - subsequent sections. - - Registrations in the vendor tree will be distinguished by the leading - facet "vnd.". That may be followed, at the discretion of the - registration, by either a media type name from a well-known producer - (e.g., "vnd.mudpie") or by an IANA-approved designation of the - producer's name which is then followed by a media type or product - designation (e.g., vnd.bigcompany.funnypictures). - - While public exposure and review of media types to be registered in - the vendor tree is not required, using the ietf-types list for review - is strongly encouraged to improve the quality of those - specifications. Registrations in the vendor tree may be submitted - directly to the IANA. - -2.1.3. Personal or Vanity Tree - - Registrations for media types created experimentally or as part of - products that are not distributed commercially may be registered in - the personal or vanity tree. The registrations are distinguished by - the leading facet "prs.". - - The owner of "personal" registrations and associated specifications - is the person or entity making the registration, or one to whom - responsibility has been transferred as described below. - - While public exposure and review of media types to be registered in - the personal tree is not required, using the ietf-types list for - review is strongly encouraged to improve the quality of those - specifications. Registrations in the personl tree may be submitted - directly to the IANA. - -2.1.4. Special `x.' Tree - - For convenience and symmetry with this registration scheme, media - type names with "x." as the first facet may be used for the same - purposes for which names starting in "x-" are normally used. These - types are unregistered, experimental, and should be used only with - the active agreement of the parties exchanging them. - - - - - - - -Freed, et. al. Best Current Practice [Page 5] - -RFC 2048 MIME Registration Procedures November 1996 - - - However, with the simplified registration procedures described above - for vendor and personal trees, it should rarely, if ever, be - necessary to use unregistered experimental types, and as such use of - both "x-" and "x." forms is discouraged. - -2.1.5. Additional Registration Trees - - From time to time and as required by the community, the IANA may, - with the advice and consent of the IESG, create new top-level - registration trees. It is explicitly assumed that these trees may be - created for external registration and management by well-known - permanent bodies, such as scientific societies for media types - specific to the sciences they cover. In general, the quality of - review of specifications for one of these additional registration - trees is expected to be equivalent to that which IETF would give to - registrations in its own tree. Establishment of these new trees will - be announced through RFC publication approved by the IESG. - -2.2. Registration Requirements - - Media type registration proposals are all expected to conform to - various requirements laid out in the following sections. Note that - requirement specifics sometimes vary depending on the registration - tree, again as detailed in the following sections. - -2.2.1. Functionality Requirement - - Media types must function as an actual media format: Registration of - things that are better thought of as a transfer encoding, as a - character set, or as a collection of separate entities of another - type, is not allowed. For example, although applications exist to - decode the base64 transfer encoding [RFC 2045], base64 cannot be - registered as a media type. - - This requirement applies regardless of the registration tree - involved. - -2.2.2. Naming Requirements - - All registered media types must be assigned MIME type and subtype - names. The combination of these names then serves to uniquely - identify the media type and the format of the subtype name identifies - the registration tree. - - The choice of top-level type name must take the nature of media type - involved into account. For example, media normally used for - representing still images should be a subtype of the image content - type, whereas media capable of representing audio information belongs - - - -Freed, et. al. Best Current Practice [Page 6] - -RFC 2048 MIME Registration Procedures November 1996 - - - under the audio content type. See RFC 2046 for additional information - on the basic set of top-level types and their characteristics. - - New subtypes of top-level types must conform to the restrictions of - the top-level type, if any. For example, all subtypes of the - multipart content type must use the same encapsulation syntax. - - In some cases a new media type may not "fit" under any currently - defined top-level content type. Such cases are expected to be quite - rare. However, if such a case arises a new top-level type can be - defined to accommodate it. Such a definition must be done via - standards-track RFC; no other mechanism can be used to define - additional top-level content types. - - These requirements apply regardless of the registration tree - involved. - -2.2.3. Parameter Requirements - - Media types may elect to use one or more MIME content type - parameters, or some parameters may be automatically made available to - the media type by virtue of being a subtype of a content type that - defines a set of parameters applicable to any of its subtypes. In - either case, the names, values, and meanings of any parameters must - be fully specified when a media type is registered in the IETF tree, - and should be specified as completely as possible when media types - are registered in the vendor or personal trees. - - New parameters must not be defined as a way to introduce new - functionality in types registered in the IETF tree, although new - parameters may be added to convey additional information that does - not otherwise change existing functionality. An example of this - would be a "revision" parameter to indicate a revision level of an - external specification such as JPEG. Similar behavior is encouraged - for media types registered in the vendor or personal trees but is not - required. - -2.2.4. Canonicalization and Format Requirements - - All registered media types must employ a single, canonical data - format, regardless of registration tree. - - A precise and openly available specification of the format of each - media type is required for all types registered in the IETF tree and - must at a minimum be referenced by, if it isn't actually included in, - the media type registration proposal itself. - - - - - -Freed, et. al. Best Current Practice [Page 7] - -RFC 2048 MIME Registration Procedures November 1996 - - - The specifications of format and processing particulars may or may - not be publically available for media types registered in the vendor - tree, and such registration proposals are explicitly permitted to - include only a specification of which software and version produce or - process such media types. References to or inclusion of format - specifications in registration proposals is encouraged but not - required. - - Format specifications are still required for registration in the - personal tree, but may be either published as RFCs or otherwise - deposited with IANA. The deposited specifications will meet the same - criteria as those required to register a well-known TCP port and, in - particular, need not be made public. - - Some media types involve the use of patented technology. The - registration of media types involving patented technology is - specifically permitted. However, the restrictions set forth in RFC - 1602 on the use of patented technology in standards-track protocols - must be respected when the specification of a media type is part of a - standards-track protocol. - -2.2.5. Interchange Recommendations - - Media types should, whenever possible, interoperate across as many - systems and applications as possible. However, some media types will - inevitably have problems interoperating across different platforms. - Problems with different versions, byte ordering, and specifics of - gateway handling can and will arise. - - Universal interoperability of media types is not required, but known - interoperability issues should be identified whenever possible. - Publication of a media type does not require an exhaustive review of - interoperability, and the interoperability considerations section is - subject to continuing evaluation. - - These recommendations apply regardless of the registration tree - involved. - -2.2.6. Security Requirements - - An analysis of security issues is required for for all types - registered in the IETF Tree. (This is in accordance with the basic - requirements for all IETF protocols.) A similar analysis for media - types registered in the vendor or personal trees is encouraged but - not required. However, regardless of what security analysis has or - has not been done, all descriptions of security issues must be as - accurate as possible regardless of registration tree. In particular, - a statement that there are "no security issues associated with this - - - -Freed, et. al. Best Current Practice [Page 8] - -RFC 2048 MIME Registration Procedures November 1996 - - - type" must not be confused with "the security issues associates with - this type have not been assessed". - - There is absolutely no requirement that media types registered in any - tree be secure or completely free from risks. Nevertheless, all - known security risks must be identified in the registration of a - media type, again regardless of registration tree. - - The security considerations section of all registrations is subject - to continuing evaluation and modification, and in particular may be - extended by use of the "comments on media types" mechanism described - in subsequent sections. - - Some of the issues that should be looked at in a security analysis of - a media type are: - - (1) Complex media types may include provisions for - directives that institute actions on a recipient's - files or other resources. In many cases provision is - made for originators to specify arbitrary actions in an - unrestricted fashion which may then have devastating - effects. See the registration of the - application/postscript media type in RFC 2046 for - an example of such directives and how to handle them. - - (2) Complex media types may include provisions for - directives that institute actions which, while not - directly harmful to the recipient, may result in - disclosure of information that either facilitates a - subsequent attack or else violates a recipient's - privacy in some way. Again, the registration of the - application/postscript media type illustrates how such - directives can be handled. - - (3) A media type might be targeted for applications that - require some sort of security assurance but not provide - the necessary security mechanisms themselves. For - example, a media type could be defined for storage of - confidential medical information which in turn requires - an external confidentiality service. - -2.2.7. Usage and Implementation Non-requirements - - In the asynchronous mail environment, where information on the - capabilities of the remote mail agent is frequently not available to - the sender, maximum interoperability is attained by restricting the - number of media types used to those "common" formats expected to be - widely implemented. This was asserted in the past as a reason to - - - -Freed, et. al. Best Current Practice [Page 9] - -RFC 2048 MIME Registration Procedures November 1996 - - - limit the number of possible media types and resulted in a - registration process with a significant hurdle and delay for those - registering media types. - - However, the need for "common" media types does not require limiting - the registration of new media types. If a limited set of media types - is recommended for a particular application, that should be asserted - by a separate applicability statement specific for the application - and/or environment. - - As such, universal support and implementation of a media type is NOT - a requirement for registration. If, however, a media type is - explicitly intended for limited use, this should be noted in its - registration. - -2.2.8. Publication Requirements - - Proposals for media types registered in the IETF tree must be - published as RFCs. RFC publication of vendor and personal media type - proposals is encouraged but not required. In all cases IANA will - retain copies of all media type proposals and "publish" them as part - of the media types registration tree itself. - - Other than in the IETF tree, the registration of a data type does not - imply endorsement, approval, or recommendation by IANA or IETF or - even certification that the specification is adequate. To become - Internet Standards, protocol, data objects, or whatever must go - through the IETF standards process. This is too difficult and too - lengthy a process for the convenient registration of media types. - - The IETF tree exists for media types that do require require a - substantive review and approval process with the vendor and personal - trees exist for those that do not. It is expected that applicability - statements for particular applications will be published from time to - time that recommend implementation of, and support for, media types - that have proven particularly useful in those contexts. - - As discussed above, registration of a top-level type requires - standards-track processing and, hence, RFC publication. - -2.2.9. Additional Information - - Various sorts of optional information may be included in the - specification of a media type if it is available: - - (1) Magic number(s) (length, octet values). Magic numbers - are byte sequences that are always present and thus can - be used to identify entities as being of a given media - - - -Freed, et. al. Best Current Practice [Page 10] - -RFC 2048 MIME Registration Procedures November 1996 - - - type. - - (2) File extension(s) commonly used on one or more - platforms to indicate that some file containing a given - type of media. - - (3) Macintosh File Type code(s) (4 octets) used to label - files containing a given type of media. - - Such information is often quite useful to implementors and if - available should be provided. - -2.3. Registration Procedure - - The following procedure has been implemented by the IANA for review - and approval of new media types. This is not a formal standards - process, but rather an administrative procedure intended to allow - community comment and sanity checking without excessive time delay. - For registration in the IETF tree, the normal IETF processes should - be followed, treating posting of an internet-draft and announcement - on the ietf-types list (as described in the next subsection) as a - first step. For registrations in the vendor or personal tree, the - initial review step described below may be omitted and the type - registered directly by submitting the template and an explanation - directly to IANA (at iana@iana.org). However, authors of vendor or - personal media type specifications are encouraged to seek community - review and comment whenever that is feasible. - -2.3.1. Present the Media Type to the Community for Review - - Send a proposed media type registration to the "ietf-types@iana.org" - mailing list for a two week review period. This mailing list has - been established for the purpose of reviewing proposed media and - access types. Proposed media types are not formally registered and - must not be used; the "x-" prefix specified in RFC 2045 can be used - until registration is complete. - - The intent of the public posting is to solicit comments and feedback - on the choice of type/subtype name, the unambiguity of the references - with respect to versions and external profiling information, and a - review of any interoperability or security considerations. The - submitter may submit a revised registration, or withdraw the - registration completely, at any time. - - - - - - - - -Freed, et. al. Best Current Practice [Page 11] - -RFC 2048 MIME Registration Procedures November 1996 - - -2.3.2. IESG Approval - - Media types registered in the IETF tree must be submitted to the IESG - for approval. - -2.3.3. IANA Registration - - Provided that the media type meets the requirements for media types - and has obtained approval that is necessary, the author may submit - the registration request to the IANA, which will register the media - type and make the media type registration available to the community. - -2.4. Comments on Media Type Registrations - - Comments on registered media types may be submitted by members of the - community to IANA. These comments will be passed on to the "owner" - of the media type if possible. Submitters of comments may request - that their comment be attached to the media type registration itself, - and if IANA approves of this the comment will be made accessible in - conjunction with the type registration itself. - -2.5. Location of Registered Media Type List - - Media type registrations will be posted in the anonymous FTP - directory "ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/" - and all registered media types will be listed in the periodically - issued "Assigned Numbers" RFC [currently STD 2, RFC 1700]. The media - type description and other supporting material may also be published - as an Informational RFC by sending it to "rfc-editor@isi.edu" (please - follow the instructions to RFC authors [RFC-1543]). - -2.6. IANA Procedures for Registering Media Types - - The IANA will only register media types in the IETF tree in response - to a communication from the IESG stating that a given registration - has been approved. Vendor and personal types will be registered by - the IANA automatically and without any formal review as long as the - following minimal conditions are met: - - (1) Media types must function as an actual media format. - In particular, character sets and transfer encodings - may not be registered as media types. - - (2) All media types must have properly formed type and - subtype names. All type names must be defined by a - standards-track RFC. All subtype names must be unique, - must conform to the MIME grammar for such names, and - must contain the proper tree prefix. - - - -Freed, et. al. Best Current Practice [Page 12] - -RFC 2048 MIME Registration Procedures November 1996 - - - (3) Types registered in the personal tree must either - provide a format specification or a pointer to one. - - (4) Any security considerations given must not be obviously - bogus. (It is neither possible nor necessary for the - IANA to conduct a comprehensive security review of - media type registrations. Nevertheless, IANA has the - authority to identify obviously incompetent material - and exclude it.) - -2.7. Change Control - - Once a media type has been published by IANA, the author may request - a change to its definition. The descriptions of the different - registration trees above designate the "owners" of each type of - registration. The change request follows the same procedure as the - registration request: - - (1) Publish the revised template on the ietf-types list. - - (2) Leave at least two weeks for comments. - - (3) Publish using IANA after formal review if required. - - Changes should be requested only when there are serious omission or - errors in the published specification. When review is required, a - change request may be denied if it renders entities that were valid - under the previous definition invalid under the new definition. - - The owner of a content type may pass responsibility for the content - type to another person or agency by informing IANA and the ietf-types - list; this can be done without discussion or review. - - The IESG may reassign responsibility for a media type. The most - common case of this will be to enable changes to be made to types - where the author of the registration has died, moved out of contact - or is otherwise unable to make changes that are important to the - community. - - Media type registrations may not be deleted; media types which are no - longer believed appropriate for use can be declared OBSOLETE by a - change to their "intended use" field; such media types will be - clearly marked in the lists published by IANA. - - - - - - - - -Freed, et. al. Best Current Practice [Page 13] - -RFC 2048 MIME Registration Procedures November 1996 - - -2.8. Registration Template - - To: ietf-types@iana.org - Subject: Registration of MIME media type XXX/YYY - - MIME media type name: - - MIME subtype name: - - Required parameters: - - Optional parameters: - - Encoding considerations: - - Security considerations: - - Interoperability considerations: - - Published specification: - - Applications which use this media type: - - Additional information: - - Magic number(s): - File extension(s): - Macintosh File Type Code(s): - - Person & email address to contact for further information: - - Intended usage: - - (One of COMMON, LIMITED USE or OBSOLETE) - - Author/Change controller: - - (Any other information that the author deems interesting may be - added below this line.) - -3. External Body Access Types - - RFC 2046 defines the message/external-body media type, whereby a MIME - entity can act as pointer to the actual body data in lieu of - including the data directly in the entity body. Each - message/external-body reference specifies an access type, which - determines the mechanism used to retrieve the actual body data. RFC - 2046 defines an initial set of access types, but allows for the - - - -Freed, et. al. Best Current Practice [Page 14] - -RFC 2048 MIME Registration Procedures November 1996 - - - registration of additional access types to accommodate new retrieval - mechanisms. - -3.1. Registration Requirements - - New access type specifications must conform to a number of - requirements as described below. - -3.1.1. Naming Requirements - - Each access type must have a unique name. This name appears in the - access-type parameter in the message/external-body content-type - header field, and must conform to MIME content type parameter syntax. - -3.1.2. Mechanism Specification Requirements - - All of the protocols, transports, and procedures used by a given - access type must be described, either in the specification of the - access type itself or in some other publicly available specification, - in sufficient detail for the access type to be implemented by any - competent implementor. Use of secret and/or proprietary methods in - access types are expressly prohibited. The restrictions imposed by - RFC 1602 on the standardization of patented algorithms must be - respected as well. - -3.1.3. Publication Requirements - - All access types must be described by an RFC. The RFC may be - informational rather than standards-track, although standard-track - review and approval are encouraged for all access types. - -3.1.4. Security Requirements - - Any known security issues that arise from the use of the access type - must be completely and fully described. It is not required that the - access type be secure or that it be free from risks, but that the - known risks be identified. Publication of a new access type does not - require an exhaustive security review, and the security - considerations section is subject to continuing evaluation. - Additional security considerations should be addressed by publishing - revised versions of the access type specification. - -3.2. Registration Procedure - - Registration of a new access type starts with the construction of a - draft of an RFC. - - - - - -Freed, et. al. Best Current Practice [Page 15] - -RFC 2048 MIME Registration Procedures November 1996 - - -3.2.1. Present the Access Type to the Community - - Send a proposed access type specification to the "ietf- - types@iana.org" mailing list for a two week review period. This - mailing list has been established for the purpose of reviewing - proposed access and media types. Proposed access types are not - formally registered and must not be used. - - The intent of the public posting is to solicit comments and feedback - on the access type specification and a review of any security - considerations. - -3.2.2. Access Type Reviewer - - When the two week period has passed, the access type reviewer, who is - appointed by the IETF Applications Area Director, either forwards the - request to iana@isi.edu, or rejects it because of significant - objections raised on the list. - - Decisions made by the reviewer must be posted to the ietf-types - mailing list within 14 days. Decisions made by the reviewer may be - appealed to the IESG. - -3.2.3. IANA Registration - - Provided that the access type has either passed review or has been - successfully appealed to the IESG, the IANA will register the access - type and make the registration available to the community. The - specification of the access type must also be published as an RFC. - Informational RFCs are published by sending them to "rfc- - editor@isi.edu" (please follow the instructions to RFC authors [RFC- - 1543]). - -3.3. Location of Registered Access Type List - - Access type registrations will be posted in the anonymous FTP - directory "ftp://ftp.isi.edu/in-notes/iana/assignments/access-types/" - and all registered access types will be listed in the periodically - issued "Assigned Numbers" RFC [currently RFC-1700]. - -3.4. IANA Procedures for Registering Access Types - - The identity of the access type reviewer is communicated to the IANA - by the IESG. The IANA then only acts in response to access type - definitions that either are approved by the access type reviewer and - forwarded by the reviewer to the IANA for registration, or in - response to a communication from the IESG that an access type - definition appeal has overturned the access type reviewer's ruling. - - - -Freed, et. al. Best Current Practice [Page 16] - -RFC 2048 MIME Registration Procedures November 1996 - - -4. Transfer Encodings - - Transfer encodings are tranformations applied to MIME media types - after conversion to the media type's canonical form. Transfer - encodings are used for several purposes: - - (1) Many transports, especially message transports, can - only handle data consisting of relatively short lines - of text. There can also be severe restrictions on what - characters can be used in these lines of text -- some - transports are restricted to a small subset of US-ASCII - and others cannot handle certain character sequences. - Transfer encodings are used to transform binary data - into textual form that can survive such transports. - Examples of this sort of transfer encoding include the - base64 and quoted-printable transfer encodings defined - in RFC 2045. - - (2) Image, audio, video, and even application entities are - sometimes quite large. Compression algorithms are often - quite effective in reducing the size of large entities. - Transfer encodings can be used to apply general-purpose - non-lossy compression algorithms to MIME entities. - - (3) Transport encodings can be defined as a means of - representing existing encoding formats in a MIME - context. - - IMPORTANT: The standardization of a large numbers of different - transfer encodings is seen as a significant barrier to widespread - interoperability and is expressely discouraged. Nevertheless, the - following procedure has been defined to provide a means of defining - additional transfer encodings, should standardization actually be - justified. - -4.1. Transfer Encoding Requirements - - Transfer encoding specifications must conform to a number of - requirements as described below. - -4.1.1. Naming Requirements - - Each transfer encoding must have a unique name. This name appears in - the Content-Transfer-Encoding header field and must conform to the - syntax of that field. - - - - - - -Freed, et. al. Best Current Practice [Page 17] - -RFC 2048 MIME Registration Procedures November 1996 - - -4.1.2. Algorithm Specification Requirements - - All of the algorithms used in a transfer encoding (e.g. conversion - to printable form, compression) must be described in their entirety - in the transfer encoding specification. Use of secret and/or - proprietary algorithms in standardized transfer encodings are - expressly prohibited. The restrictions imposed by RFC 1602 on the - standardization of patented algorithms must be respected as well. - -4.1.3. Input Domain Requirements - - All transfer encodings must be applicable to an arbitrary sequence of - octets of any length. Dependence on particular input forms is not - allowed. - - It should be noted that the 7bit and 8bit encodings do not conform to - this requirement. Aside from the undesireability of having - specialized encodings, the intent here is to forbid the addition of - additional encodings along the lines of 7bit and 8bit. - -4.1.4. Output Range Requirements - - There is no requirement that a particular tranfer encoding produce a - particular form of encoded output. However, the output format for - each transfer encoding must be fully and completely documented. In - particular, each specification must clearly state whether the output - format always lies within the confines of 7bit data, 8bit data, or is - simply pure binary data. - -4.1.5. Data Integrity and Generality Requirements - - All transfer encodings must be fully invertible on any platform; it - must be possible for anyone to recover the original data by - performing the corresponding decoding operation. Note that this - requirement effectively excludes all forms of lossy compression as - well as all forms of encryption from use as a transfer encoding. - -4.1.6. New Functionality Requirements - - All transfer encodings must provide some sort of new functionality. - Some degree of functionality overlap with previously defined transfer - encodings is acceptable, but any new transfer encoding must also - offer something no other transfer encoding provides. - - - - - - - - -Freed, et. al. Best Current Practice [Page 18] - -RFC 2048 MIME Registration Procedures November 1996 - - -4.2. Transfer Encoding Definition Procedure - - Definition of a new transfer encoding starts with the construction of - a draft of a standards-track RFC. The RFC must define the transfer - encoding precisely and completely, and must also provide substantial - justification for defining and standardizing a new transfer encoding. - This specification must then be presented to the IESG for - consideration. The IESG can - - (1) reject the specification outright as being - inappropriate for standardization, - - (2) approve the formation of an IETF working group to work - on the specification in accordance with IETF - procedures, or, - - (3) accept the specification as-is and put it directly on - the standards track. - - Transfer encoding specifications on the standards track follow normal - IETF rules for standards track documents. A transfer encoding is - considered to be defined and available for use once it is on the - standards track. - -4.3. IANA Procedures for Transfer Encoding Registration - - There is no need for a special procedure for registering Transfer - Encodings with the IANA. All legitimate transfer encoding - registrations must appear as a standards-track RFC, so it is the - IESG's responsibility to notify the IANA when a new transfer encoding - has been approved. - -4.4. Location of Registered Transfer Encodings List - - Transfer encoding registrations will be posted in the anonymous FTP - directory "ftp://ftp.isi.edu/in-notes/iana/assignments/transfer- - encodings/" and all registered transfer encodings will be listed in - the periodically issued "Assigned Numbers" RFC [currently RFC-1700]. - - - - - - - - - - - - - -Freed, et. al. Best Current Practice [Page 19] - -RFC 2048 MIME Registration Procedures November 1996 - - -5. Authors' Addresses - - For more information, the authors of this document are best - contacted via Internet mail: - - Ned Freed - Innosoft International, Inc. - 1050 East Garvey Avenue South - West Covina, CA 91790 - USA - - Phone: +1 818 919 3600 - Fax: +1 818 919 3614 - EMail: ned@innosoft.com - - - John Klensin - MCI - 2100 Reston Parkway - Reston, VA 22091 - - Phone: +1 703 715-7361 - Fax: +1 703 715-7436 - EMail: klensin@mci.net - - - Jon Postel - USC/Information Sciences Institute - 4676 Admiralty Way - Marina del Rey, CA 90292 - USA - - - Phone: +1 310 822 1511 - Fax: +1 310 823 6714 - EMail: Postel@ISI.EDU - - - - - - - - - - - - - - - -Freed, et. al. Best Current Practice [Page 20] - -RFC 2048 MIME Registration Procedures November 1996 - - -Appendix A -- Grandfathered Media Types - - A number of media types, registered prior to 1996, would, if - registered under the guidelines in this document, be placed into - either the vendor or personal trees. Reregistration of those types - to reflect the appropriate trees is encouraged, but not required. - Ownership and change control principles outlined in this document - apply to those types as if they had been registered in the trees - described above. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Freed, et. al. Best Current Practice [Page 21] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2049.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2049.txt deleted file mode 100644 index 99f174b9..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2049.txt +++ /dev/null @@ -1,1347 +0,0 @@ - - - - - - -Network Working Group N. Freed -Request for Comments: 2049 Innosoft -Obsoletes: 1521, 1522, 1590 N. Borenstein -Category: Standards Track First Virtual - November 1996 - - - Multipurpose Internet Mail Extensions - (MIME) Part Five: - Conformance Criteria and Examples - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Abstract - - STD 11, RFC 822, defines a message representation protocol specifying - considerable detail about US-ASCII message headers, and leaves the - message content, or message body, as flat US-ASCII text. This set of - documents, collectively called the Multipurpose Internet Mail - Extensions, or MIME, redefines the format of messages to allow for - - (1) textual message bodies in character sets other than - US-ASCII, - - (2) an extensible set of different formats for non-textual - message bodies, - - (3) multi-part message bodies, and - - (4) textual header information in character sets other than - US-ASCII. - - These documents are based on earlier work documented in RFC 934, STD - 11, and RFC 1049, but extends and revises them. Because RFC 822 said - so little about message bodies, these documents are largely - orthogonal to (rather than a revision of) RFC 822. - - The initial document in this set, RFC 2045, specifies the various - headers used to describe the structure of MIME messages. The second - document defines the general structure of the MIME media typing - system and defines an initial set of media types. The third - document, RFC 2047, describes extensions to RFC 822 to allow non-US- - - - -Freed & Borenstein Standards Track [Page 1] - -RFC 2049 MIME Conformance November 1996 - - - ASCII text data in Internet mail header fields. The fourth document, - RFC 2048, specifies various IANA registration procedures for MIME- - related facilities. This fifth and final document describes MIME - conformance criteria as well as providing some illustrative examples - of MIME message formats, acknowledgements, and the bibliography. - - These documents are revisions of RFCs 1521, 1522, and 1590, which - themselves were revisions of RFCs 1341 and 1342. Appendix B of this - document describes differences and changes from previous versions. - -Table of Contents - - 1. Introduction .......................................... 2 - 2. MIME Conformance ...................................... 2 - 3. Guidelines for Sending Email Data ..................... 6 - 4. Canonical Encoding Model .............................. 9 - 5. Summary ............................................... 12 - 6. Security Considerations ............................... 12 - 7. Authors' Addresses .................................... 12 - 8. Acknowledgements ...................................... 13 - A. A Complex Multipart Example ........................... 15 - B. Changes from RFC 1521, 1522, and 1590 ................. 16 - C. References ............................................ 20 - -1. Introduction - - The first and second documents in this set define MIME header fields - and the initial set of MIME media types. The third document - describes extensions to RFC822 formats to allow for character sets - other than US-ASCII. This document describes what portions of MIME - must be supported by a conformant MIME implementation. It also - describes various pitfalls of contemporary messaging systems as well - as the canonical encoding model MIME is based on. - -2. MIME Conformance - - The mechanisms described in these documents are open-ended. It is - definitely not expected that all implementations will support all - available media types, nor that they will all share the same - extensions. In order to promote interoperability, however, it is - useful to define the concept of "MIME-conformance" to define a - certain level of implementation that allows the useful interworking - of messages with content that differs from US-ASCII text. In this - section, we specify the requirements for such conformance. - - - - - - - -Freed & Borenstein Standards Track [Page 2] - -RFC 2049 MIME Conformance November 1996 - - - A mail user agent that is MIME-conformant MUST: - - (1) Always generate a "MIME-Version: 1.0" header field in - any message it creates. - - (2) Recognize the Content-Transfer-Encoding header field - and decode all received data encoded by either quoted- - printable or base64 implementations. The identity - transformations 7bit, 8bit, and binary must also be - recognized. - - Any non-7bit data that is sent without encoding must be - properly labelled with a content-transfer-encoding of - 8bit or binary, as appropriate. If the underlying - transport does not support 8bit or binary (as SMTP - [RFC-821] does not), the sender is required to both - encode and label data using an appropriate Content- - Transfer-Encoding such as quoted-printable or base64. - - (3) Must treat any unrecognized Content-Transfer-Encoding - as if it had a Content-Type of "application/octet- - stream", regardless of whether or not the actual - Content-Type is recognized. - - (4) Recognize and interpret the Content-Type header field, - and avoid showing users raw data with a Content-Type - field other than text. Implementations must be able - to send at least text/plain messages, with the - character set specified with the charset parameter if - it is not US-ASCII. - - (5) Ignore any content type parameters whose names they do - not recognize. - - (6) Explicitly handle the following media type values, to - at least the following extents: - - Text: - - -- Recognize and display "text" mail with the - character set "US-ASCII." - - -- Recognize other character sets at least to the - extent of being able to inform the user about what - character set the message uses. - - - - - - -Freed & Borenstein Standards Track [Page 3] - -RFC 2049 MIME Conformance November 1996 - - - -- Recognize the "ISO-8859-*" character sets to the - extent of being able to display those characters that - are common to ISO-8859-* and US-ASCII, namely all - characters represented by octet values 1-127. - - -- For unrecognized subtypes in a known character - set, show or offer to show the user the "raw" version - of the data after conversion of the content from - canonical form to local form. - - -- Treat material in an unknown character set as if - it were "application/octet-stream". - - Image, audio, and video: - - -- At a minumum provide facilities to treat any - unrecognized subtypes as if they were - "application/octet-stream". - - Application: - - -- Offer the ability to remove either of the quoted- - printable or base64 encodings defined in this - document if they were used and put the resulting - information in a user file. - - Multipart: - - -- Recognize the mixed subtype. Display all relevant - information on the message level and the body part - header level and then display or offer to display - each of the body parts individually. - - -- Recognize the "alternative" subtype, and avoid - showing the user redundant parts of - multipart/alternative mail. - - -- Recognize the "multipart/digest" subtype, - specifically using "message/rfc822" rather than - "text/plain" as the default media type for body parts - inside "multipart/digest" entities. - - -- Treat any unrecognized subtypes as if they were - "mixed". - - - - - - - -Freed & Borenstein Standards Track [Page 4] - -RFC 2049 MIME Conformance November 1996 - - - Message: - - -- Recognize and display at least the RFC822 message - encapsulation (message/rfc822) in such a way as to - preserve any recursive structure, that is, displaying - or offering to display the encapsulated data in - accordance with its media type. - - -- Treat any unrecognized subtypes as if they were - "application/octet-stream". - - (7) Upon encountering any unrecognized Content-Type field, - an implementation must treat it as if it had a media - type of "application/octet-stream" with no parameter - sub-arguments. How such data are handled is up to an - implementation, but likely options for handling such - unrecognized data include offering the user to write it - into a file (decoded from its mail transport format) or - offering the user to name a program to which the - decoded data should be passed as input. - - (8) Conformant user agents are required, if they provide - non-standard support for non-MIME messages employing - character sets other than US-ASCII, to do so on - received messages only. Conforming user agents must not - send non-MIME messages containing anything other than - US-ASCII text. - - In particular, the use of non-US-ASCII text in mail - messages without a MIME-Version field is strongly - discouraged as it impedes interoperability when sending - messages between regions with different localization - conventions. Conforming user agents MUST include proper - MIME labelling when sending anything other than plain - text in the US-ASCII character set. - - In addition, non-MIME user agents should be upgraded if - at all possible to include appropriate MIME header - information in the messages they send even if nothing - else in MIME is supported. This upgrade will have - little, if any, effect on non-MIME recipients and will - aid MIME in correctly displaying such messages. It - also provides a smooth transition path to eventual - adoption of other MIME capabilities. - - (9) Conforming user agents must ensure that any string of - non-white-space printable US-ASCII characters within a - "*text" or "*ctext" that begins with "=?" and ends with - - - -Freed & Borenstein Standards Track [Page 5] - -RFC 2049 MIME Conformance November 1996 - - - "?=" be a valid encoded-word. ("begins" means: At the - start of the field-body or immediately following - linear-white-space; "ends" means: At the end of the - field-body or immediately preceding linear-white- - space.) In addition, any "word" within a "phrase" that - begins with "=?" and ends with "?=" must be a valid - encoded-word. - - (10) Conforming user agents must be able to distinguish - encoded-words from "text", "ctext", or "word"s, - according to the rules in section 4, anytime they - appear in appropriate places in message headers. It - must support both the "B" and "Q" encodings for any - character set which it supports. The program must be - able to display the unencoded text if the character set - is "US-ASCII". For the ISO-8859-* character sets, the - mail reading program must at least be able to display - the characters which are also in the US-ASCII set. - - A user agent that meets the above conditions is said to be MIME- - conformant. The meaning of this phrase is that it is assumed to be - "safe" to send virtually any kind of properly-marked data to users of - such mail systems, because such systems will at least be able to - treat the data as undifferentiated binary, and will not simply splash - it onto the screen of unsuspecting users. - - There is another sense in which it is always "safe" to send data in a - format that is MIME-conformant, which is that such data will not - break or be broken by any known systems that are conformant with RFC - 821 and RFC 822. User agents that are MIME-conformant have the - additional guarantee that the user will not be shown data that were - never intended to be viewed as text. - -3. Guidelines for Sending Email Data - - Internet email is not a perfect, homogeneous system. Mail may become - corrupted at several stages in its travel to a final destination. - Specifically, email sent throughout the Internet may travel across - many networking technologies. Many networking and mail technologies - do not support the full functionality possible in the SMTP transport - environment. Mail traversing these systems is likely to be modified - in order that it can be transported. - - There exist many widely-deployed non-conformant MTAs in the Internet. - These MTAs, speaking the SMTP protocol, alter messages on the fly to - take advantage of the internal data structure of the hosts they are - implemented on, or are just plain broken. - - - - -Freed & Borenstein Standards Track [Page 6] - -RFC 2049 MIME Conformance November 1996 - - - The following guidelines may be useful to anyone devising a data - format (media type) that is supposed to survive the widest range of - networking technologies and known broken MTAs unscathed. Note that - anything encoded in the base64 encoding will satisfy these rules, but - that some well-known mechanisms, notably the UNIX uuencode facility, - will not. Note also that anything encoded in the Quoted-Printable - encoding will survive most gateways intact, but possibly not some - gateways to systems that use the EBCDIC character set. - - (1) Under some circumstances the encoding used for data may - change as part of normal gateway or user agent - operation. In particular, conversion from base64 to - quoted-printable and vice versa may be necessary. This - may result in the confusion of CRLF sequences with line - breaks in text bodies. As such, the persistence of - CRLF as something other than a line break must not be - relied on. - - (2) Many systems may elect to represent and store text data - using local newline conventions. Local newline - conventions may not match the RFC822 CRLF convention -- - systems are known that use plain CR, plain LF, CRLF, or - counted records. The result is that isolated CR and LF - characters are not well tolerated in general; they may - be lost or converted to delimiters on some systems, and - hence must not be relied on. - - (3) The transmission of NULs (US-ASCII value 0) is - problematic in Internet mail. (This is largely the - result of NULs being used as a termination character by - many of the standard runtime library routines in the C - programming language.) The practice of using NULs as - termination characters is so entrenched now that - messages should not rely on them being preserved. - - (4) TAB (HT) characters may be misinterpreted or may be - automatically converted to variable numbers of spaces. - This is unavoidable in some environments, notably those - not based on the US-ASCII character set. Such - conversion is STRONGLY DISCOURAGED, but it may occur, - and mail formats must not rely on the persistence of - TAB (HT) characters. - - (5) Lines longer than 76 characters may be wrapped or - truncated in some environments. Line wrapping or line - truncation imposed by mail transports is STRONGLY - DISCOURAGED, but unavoidable in some cases. - Applications which require long lines must somehow - - - -Freed & Borenstein Standards Track [Page 7] - -RFC 2049 MIME Conformance November 1996 - - - differentiate between soft and hard line breaks. (A - simple way to do this is to use the quoted-printable - encoding.) - - (6) Trailing "white space" characters (SPACE, TAB (HT)) on - a line may be discarded by some transport agents, while - other transport agents may pad lines with these - characters so that all lines in a mail file are of - equal length. The persistence of trailing white space, - therefore, must not be relied on. - - (7) Many mail domains use variations on the US-ASCII - character set, or use character sets such as EBCDIC - which contain most but not all of the US-ASCII - characters. The correct translation of characters not - in the "invariant" set cannot be depended on across - character converting gateways. For example, this - situation is a problem when sending uuencoded - information across BITNET, an EBCDIC system. Similar - problems can occur without crossing a gateway, since - many Internet hosts use character sets other than US- - ASCII internally. The definition of Printable Strings - in X.400 adds further restrictions in certain special - cases. In particular, the only characters that are - known to be consistent across all gateways are the 73 - characters that correspond to the upper and lower case - letters A-Z and a-z, the 10 digits 0-9, and the - following eleven special characters: - - "'" (US-ASCII decimal value 39) - "(" (US-ASCII decimal value 40) - ")" (US-ASCII decimal value 41) - "+" (US-ASCII decimal value 43) - "," (US-ASCII decimal value 44) - "-" (US-ASCII decimal value 45) - "." (US-ASCII decimal value 46) - "/" (US-ASCII decimal value 47) - ":" (US-ASCII decimal value 58) - "=" (US-ASCII decimal value 61) - "?" (US-ASCII decimal value 63) - - A maximally portable mail representation will confine - itself to relatively short lines of text in which the - only meaningful characters are taken from this set of - 73 characters. The base64 encoding follows this rule. - - (8) Some mail transport agents will corrupt data that - includes certain literal strings. In particular, a - - - -Freed & Borenstein Standards Track [Page 8] - -RFC 2049 MIME Conformance November 1996 - - - period (".") alone on a line is known to be corrupted - by some (incorrect) SMTP implementations, and a line - that starts with the five characters "From " (the fifth - character is a SPACE) are commonly corrupted as well. - A careful composition agent can prevent these - corruptions by encoding the data (e.g., in the quoted- - printable encoding using "=46rom " in place of "From " - at the start of a line, and "=2E" in place of "." alone - on a line). - - Please note that the above list is NOT a list of recommended - practices for MTAs. RFC 821 MTAs are prohibited from altering the - character of white space or wrapping long lines. These BAD and - invalid practices are known to occur on established networks, and - implementations should be robust in dealing with the bad effects they - can cause. - -4. Canonical Encoding Model - - There was some confusion, in earlier versions of these documents, - regarding the model for when email data was to be converted to - canonical form and encoded, and in particular how this process would - affect the treatment of CRLFs, given that the representation of - newlines varies greatly from system to system. For this reason, a - canonical model for encoding is presented below. - - The process of composing a MIME entity can be modeled as being done - in a number of steps. Note that these steps are roughly similar to - those steps used in PEM [RFC-1421] and are performed for each - "innermost level" body: - - (1) Creation of local form. - - The body to be transmitted is created in the system's - native format. The native character set is used and, - where appropriate, local end of line conventions are - used as well. The body may be a UNIX-style text file, - or a Sun raster image, or a VMS indexed file, or audio - data in a system-dependent format stored only in - memory, or anything else that corresponds to the local - model for the representation of some form of - information. Fundamentally, the data is created in the - "native" form that corresponds to the type specified by - the media type. - - - - - - - -Freed & Borenstein Standards Track [Page 9] - -RFC 2049 MIME Conformance November 1996 - - - (2) Conversion to canonical form. - - The entire body, including "out-of-band" information - such as record lengths and possibly file attribute - information, is converted to a universal canonical - form. The specific media type of the body as well as - its associated attributes dictate the nature of the - canonical form that is used. Conversion to the proper - canonical form may involve character set conversion, - transformation of audio data, compression, or various - other operations specific to the various media types. - If character set conversion is involved, however, care - must be taken to understand the semantics of the media - type, which may have strong implications for any - character set conversion, e.g. with regard to - syntactically meaningful characters in a text subtype - other than "plain". - - For example, in the case of text/plain data, the text - must be converted to a supported character set and - lines must be delimited with CRLF delimiters in - accordance with RFC 822. Note that the restriction on - line lengths implied by RFC 822 is eliminated if the - next step employs either quoted-printable or base64 - encoding. - - (3) Apply transfer encoding. - - A Content-Transfer-Encoding appropriate for this body - is applied. Note that there is no fixed relationship - between the media type and the transfer encoding. In - particular, it may be appropriate to base the choice of - base64 or quoted-printable on character frequency - counts which are specific to a given instance of a - body. - - (4) Insertion into entity. - - The encoded body is inserted into a MIME entity with - appropriate headers. The entity is then inserted into - the body of a higher-level entity (message or - multipart) as needed. - - Conversion from entity form to local form is accomplished by - reversing these steps. Note that reversal of these steps may produce - differing results since there is no guarantee that the original and - final local forms are the same. - - - - -Freed & Borenstein Standards Track [Page 10] - -RFC 2049 MIME Conformance November 1996 - - - It is vital to note that these steps are only a model; they are - specifically NOT a blueprint for how an actual system would be built. - In particular, the model fails to account for two common designs: - - (1) In many cases the conversion to a canonical form prior - to encoding will be subsumed into the encoder itself, - which understands local formats directly. For example, - the local newline convention for text bodies might be - carried through to the encoder itself along with - knowledge of what that format is. - - (2) The output of the encoders may have to pass through one - or more additional steps prior to being transmitted as - a message. As such, the output of the encoder may not - be conformant with the formats specified by RFC 822. - In particular, once again it may be appropriate for the - converter's output to be expressed using local newline - conventions rather than using the standard RFC 822 CRLF - delimiters. - - Other implementation variations are conceivable as well. The vital - aspect of this discussion is that, in spite of any optimizations, - collapsings of required steps, or insertion of additional processing, - the resulting messages must be consistent with those produced by the - model described here. For example, a message with the following - header fields: - - Content-type: text/foo; charset=bar - Content-Transfer-Encoding: base64 - - must be first represented in the text/foo form, then (if necessary) - represented in the "bar" character set, and finally transformed via - the base64 algorithm into a mail-safe form. - - NOTE: Some confusion has been caused by systems that represent - messages in a format which uses local newline conventions which - differ from the RFC822 CRLF convention. It is important to note that - these formats are not canonical RFC822/MIME. These formats are - instead *encodings* of RFC822, where CRLF sequences in the canonical - representation of the message are encoded as the local newline - convention. Note that formats which encode CRLF sequences as, for - example, LF are not capable of representing MIME messages containing - binary data which contains LF octets not part of CRLF line separation - sequences. - - - - - - - -Freed & Borenstein Standards Track [Page 11] - -RFC 2049 MIME Conformance November 1996 - - -5. Summary - - This document defines what is meant by MIME Conformance. It also - details various problems known to exist in the Internet email system - and how to use MIME to overcome them. Finally, it describes MIME's - canonical encoding model. - -6. Security Considerations - - Security issues are discussed in the second document in this set, RFC - 2046. - -7. Authors' Addresses - - For more information, the authors of this document are best contacted - via Internet mail: - - Ned Freed - Innosoft International, Inc. - 1050 East Garvey Avenue South - West Covina, CA 91790 - USA - - Phone: +1 818 919 3600 - Fax: +1 818 919 3614 - EMail: ned@innosoft.com - - Nathaniel S. Borenstein - First Virtual Holdings - 25 Washington Avenue - Morristown, NJ 07960 - USA - - Phone: +1 201 540 8967 - Fax: +1 201 993 3032 - EMail: nsb@nsb.fv.com - - MIME is a result of the work of the Internet Engineering Task Force - Working Group on RFC 822 Extensions. The chairman of that group, - Greg Vaudreuil, may be reached at: - - Gregory M. Vaudreuil - Octel Network Services - 17080 Dallas Parkway - Dallas, TX 75248-1905 - USA - - EMail: Greg.Vaudreuil@Octel.Com - - - -Freed & Borenstein Standards Track [Page 12] - -RFC 2049 MIME Conformance November 1996 - - -8. Acknowledgements - - This document is the result of the collective effort of a large - number of people, at several IETF meetings, on the IETF-SMTP and - IETF-822 mailing lists, and elsewhere. Although any enumeration - seems doomed to suffer from egregious omissions, the following are - among the many contributors to this effort: - - Harald Tveit Alvestrand Marc Andreessen - Randall Atkinson Bob Braden - Philippe Brandon Brian Capouch - Kevin Carosso Uhhyung Choi - Peter Clitherow Dave Collier-Brown - Cristian Constantinof John Coonrod - Mark Crispin Dave Crocker - Stephen Crocker Terry Crowley - Walt Daniels Jim Davis - Frank Dawson Axel Deininger - Hitoshi Doi Kevin Donnelly - Steve Dorner Keith Edwards - Chris Eich Dana S. Emery - Johnny Eriksson Craig Everhart - Patrik Faltstrom Erik E. Fair - Roger Fajman Alain Fontaine - Martin Forssen James M. Galvin - Stephen Gildea Philip Gladstone - Thomas Gordon Keld Simonsen - Terry Gray Phill Gross - James Hamilton David Herron - Mark Horton Bruce Howard - Bill Janssen Olle Jarnefors - Risto Kankkunen Phil Karn - Alan Katz Tim Kehres - Neil Katin Steve Kille - Kyuho Kim Anders Klemets - John Klensin Valdis Kletniek - Jim Knowles Stev Knowles - Bob Kummerfeld Pekka Kytolaakso - Stellan Lagerstrom Vincent Lau - Timo Lehtinen Donald Lindsay - Warner Losh Carlyn Lowery - Laurence Lundblade Charles Lynn - John R. MacMillan Larry Masinter - Rick McGowan Michael J. McInerny - Leo Mclaughlin Goli Montaser-Kohsari - Tom Moore John Gardiner Myers - Erik Naggum Mark Needleman - Chris Newman John Noerenberg - - - -Freed & Borenstein Standards Track [Page 13] - -RFC 2049 MIME Conformance November 1996 - - - Mats Ohrman Julian Onions - Michael Patton David J. Pepper - Erik van der Poel Blake C. Ramsdell - Christer Romson Luc Rooijakkers - Marshall T. Rose Jonathan Rosenberg - Guido van Rossum Jan Rynning - Harri Salminen Michael Sanderson - Yutaka Sato Markku Savela - Richard Alan Schafer Masahiro Sekiguchi - Mark Sherman Bob Smart - Peter Speck Henry Spencer - Einar Stefferud Michael Stein - Klaus Steinberger Peter Svanberg - James Thompson Steve Uhler - Stuart Vance Peter Vanderbilt - Greg Vaudreuil Ed Vielmetti - Larry W. Virden Ryan Waldron - Rhys Weatherly Jay Weber - Dave Wecker Wally Wedel - Sven-Ove Westberg Brian Wideen - John Wobus Glenn Wright - Rayan Zachariassen David Zimmerman - - The authors apologize for any omissions from this list, which are - certainly unintentional. - - - - - - - - - - - - - - - - - - - - - - - - - - -Freed & Borenstein Standards Track [Page 14] - -RFC 2049 MIME Conformance November 1996 - - -Appendix A -- A Complex Multipart Example - - What follows is the outline of a complex multipart message. This - message contains five parts that are to be displayed serially: two - introductory plain text objects, an embedded multipart message, a - text/enriched object, and a closing encapsulated text message in a - non-ASCII character set. The embedded multipart message itself - contains two objects to be displayed in parallel, a picture and an - audio fragment. - - MIME-Version: 1.0 - From: Nathaniel Borenstein - To: Ned Freed - Date: Fri, 07 Oct 1994 16:15:05 -0700 (PDT) - Subject: A multipart example - Content-Type: multipart/mixed; - boundary=unique-boundary-1 - - This is the preamble area of a multipart message. - Mail readers that understand multipart format - should ignore this preamble. - - If you are reading this text, you might want to - consider changing to a mail reader that understands - how to properly display multipart messages. - - --unique-boundary-1 - - ... Some text appears here ... - - [Note that the blank between the boundary and the start - of the text in this part means no header fields were - given and this is text in the US-ASCII character set. - It could have been done with explicit typing as in the - next part.] - - --unique-boundary-1 - Content-type: text/plain; charset=US-ASCII - - This could have been part of the previous part, but - illustrates explicit versus implicit typing of body - parts. - - --unique-boundary-1 - Content-Type: multipart/parallel; boundary=unique-boundary-2 - - --unique-boundary-2 - Content-Type: audio/basic - - - -Freed & Borenstein Standards Track [Page 15] - -RFC 2049 MIME Conformance November 1996 - - - Content-Transfer-Encoding: base64 - - ... base64-encoded 8000 Hz single-channel - mu-law-format audio data goes here ... - - --unique-boundary-2 - Content-Type: image/jpeg - Content-Transfer-Encoding: base64 - - ... base64-encoded image data goes here ... - - --unique-boundary-2-- - - --unique-boundary-1 - Content-type: text/enriched - - This is enriched. - as defined in RFC 1896 - - Isn't it - cool? - - --unique-boundary-1 - Content-Type: message/rfc822 - - From: (mailbox in US-ASCII) - To: (address in US-ASCII) - Subject: (subject in US-ASCII) - Content-Type: Text/plain; charset=ISO-8859-1 - Content-Transfer-Encoding: Quoted-printable - - ... Additional text in ISO-8859-1 goes here ... - - --unique-boundary-1-- - -Appendix B -- Changes from RFC 1521, 1522, and 1590 - - These documents are a revision of RFC 1521, 1522, and 1590. For the - convenience of those familiar with the earlier documents, the changes - from those documents are summarized in this appendix. For further - history, note that Appendix H in RFC 1521 specified how that document - differed from its predecessor, RFC 1341. - - (1) This document has been completely reformatted and split - into multiple documents. This was done to improve the - quality of the plain text version of this document, - which is required to be the reference copy. - - - - -Freed & Borenstein Standards Track [Page 16] - -RFC 2049 MIME Conformance November 1996 - - - (2) BNF describing the overall structure of MIME object - headers has been added. This is a documentation change - only -- the underlying syntax has not changed in any - way. - - (3) The specific BNF for the seven media types in MIME has - been removed. This BNF was incorrect, incomplete, amd - inconsistent with the type-indendependent BNF. And - since the type-independent BNF already fully specifies - the syntax of the various MIME headers, the type- - specific BNF was, in the final analysis, completely - unnecessary and caused more problems than it solved. - - (4) The more specific "US-ASCII" character set name has - replaced the use of the informal term ASCII in many - parts of these documents. - - (5) The informal concept of a primary subtype has been - removed. - - (6) The term "object" was being used inconsistently. The - definition of this term has been clarified, along with - the related terms "body", "body part", and "entity", - and usage has been corrected where appropriate. - - (7) The BNF for the multipart media type has been - rearranged to make it clear that the CRLF preceeding - the boundary marker is actually part of the marker - itself rather than the preceeding body part. - - (8) The prose and BNF describing the multipart media type - have been changed to make it clear that the body parts - within a multipart object MUST NOT contain any lines - beginning with the boundary parameter string. - - (9) In the rules on reassembling "message/partial" MIME - entities, "Subject" is added to the list of headers to - take from the inner message, and the example is - modified to clarify this point. - - (10) "Message/partial" fragmenters are restricted to - splitting MIME objects only at line boundaries. - - (11) In the discussion of the application/postscript type, - an additional paragraph has been added warning about - possible interoperability problems caused by embedding - of binary data inside a PostScript MIME entity. - - - - -Freed & Borenstein Standards Track [Page 17] - -RFC 2049 MIME Conformance November 1996 - - - (12) Added a clarifying note to the basic syntax rules for - the Content-Type header field to make it clear that the - following two forms: - - Content-type: text/plain; charset=us-ascii (comment) - - Content-type: text/plain; charset="us-ascii" - - are completely equivalent. - - (13) The following sentence has been removed from the - discussion of the MIME-Version header: "However, - conformant software is encouraged to check the version - number and at least warn the user if an unrecognized - MIME-version is encountered." - - (14) A typo was fixed that said "application/external-body" - instead of "message/external-body". - - (15) The definition of a character set has been reorganized - to make the requirements clearer. - - (16) The definition of the "image/gif" media type has been - moved to a separate document. This change was made - because of potential conflicts with IETF rules - governing the standardization of patented technology. - - (17) The definitions of "7bit" and "8bit" have been - tightened so that use of bare CR, LF can only be used - as end-of-line sequences. The document also no longer - requires that NUL characters be preserved, which brings - MIME into alignment with real-world implementations. - - (18) The definition of canonical text in MIME has been - tightened so that line breaks must be represented by a - CRLF sequence. CR and LF characters are not allowed - outside of this usage. The definition of quoted- - printable encoding has been altered accordingly. - - (19) The definition of the quoted-printable encoding now - includes a number of suggestions for how quoted- - printable encoders might best handle improperly encoded - material. - - (20) Prose was added to clarify the use of the "7bit", - "8bit", and "binary" transfer-encodings on multipart or - message entities encapsulating "8bit" or "binary" data. - - - - -Freed & Borenstein Standards Track [Page 18] - -RFC 2049 MIME Conformance November 1996 - - - (21) In the section on MIME Conformance, "multipart/digest" - support was added to the list of requirements for - minimal MIME conformance. Also, the requirement for - "message/rfc822" support were strengthened to clarify - the importance of recognizing recursive structure. - - (22) The various restrictions on subtypes of "message" are - now specified entirely on a subtype by subtype basis. - - (23) The definition of "message/rfc822" was changed to - indicate that at least one of the "From", "Subject", or - "Date" headers must be present. - - (24) The required handling of unrecognized subtypes as - "application/octet-stream" has been made more explicit - in both the type definitions sections and the - conformance guidelines. - - (25) Examples using text/richtext were changed to - text/enriched. - - (26) The BNF definition of subtype has been changed to make - it clear that either an IANA registered subtype or a - nonstandard "X-" subtype must be used in a Content-Type - header field. - - (27) MIME media types that are simply registered for use and - those that are standardized by the IETF are now - distinguished in the MIME BNF. - - (28) All of the various MIME registration procedures have - been extensively revised. IANA registration procedures - for character sets have been moved to a separate - document that is no included in this set of documents. - - (29) The use of escape and shift mechanisms in the US-ASCII - and ISO-8859-X character sets these documents define - have been clarified: Such mechanisms should never be - used in conjunction with these character sets and their - effect if they are used is undefined. - - (30) The definition of the AFS access-type for - message/external-body has been removed. - - (31) The handling of the combination of - multipart/alternative and message/external-body is now - specifically addressed. - - - - -Freed & Borenstein Standards Track [Page 19] - -RFC 2049 MIME Conformance November 1996 - - - (32) Security issues specific to message/external-body are - now discussed in some detail. - -Appendix C -- References - - [ATK] - Borenstein, Nathaniel S., Multimedia Applications - Development with the Andrew Toolkit, Prentice-Hall, 1990. - - [ISO-2022] - International Standard -- Information Processing -- - Character Code Structure and Extension Techniques, - ISO/IEC 2022:1994, 4th ed. - - [ISO-8859] - International Standard -- Information Processing -- 8-bit - Single-Byte Coded Graphic Character Sets - - Part 1: Latin Alphabet No. 1, ISO 8859-1:1987, 1st ed. - - Part 2: Latin Alphabet No. 2, ISO 8859-2:1987, 1st ed. - - Part 3: Latin Alphabet No. 3, ISO 8859-3:1988, 1st ed. - - Part 4: Latin Alphabet No. 4, ISO 8859-4:1988, 1st ed. - - Part 5: Latin/Cyrillic Alphabet, ISO 8859-5:1988, 1st - ed. - - Part 6: Latin/Arabic Alphabet, ISO 8859-6:1987, 1st ed. - - Part 7: Latin/Greek Alphabet, ISO 8859-7:1987, 1st ed. - - Part 8: Latin/Hebrew Alphabet, ISO 8859-8:1988, 1st ed. - - Part 9: Latin Alphabet No. 5, ISO/IEC 8859-9:1989, 1st - ed. - International Standard -- Information Technology -- 8-bit - Single-Byte Coded Graphic Character Sets - - Part 10: Latin Alphabet No. 6, ISO/IEC 8859-10:1992, - 1st ed. - - [ISO-646] - International Standard -- Information Technology -- ISO - 7-bit Coded Character Set for Information Interchange, - ISO 646:1991, 3rd ed.. - - [JPEG] - JPEG Draft Standard ISO 10918-1 CD. - - [MPEG] - Video Coding Draft Standard ISO 11172 CD, ISO - IEC/JTC1/SC2/WG11 (Motion Picture Experts Group), May, - 1991. - - - - - - -Freed & Borenstein Standards Track [Page 20] - -RFC 2049 MIME Conformance November 1996 - - - [PCM] - CCITT, Fascicle III.4 - Recommendation G.711, "Pulse Code - Modulation (PCM) of Voice Frequencies", Geneva, 1972. - - [POSTSCRIPT] - Adobe Systems, Inc., PostScript Language Reference - Manual, Addison-Wesley, 1985. - - [POSTSCRIPT2] - Adobe Systems, Inc., PostScript Language Reference - Manual, Addison-Wesley, Second Ed., 1990. - - [RFC-783] - Sollins, K.R., "TFTP Protocol (revision 2)", RFC-783, - MIT, June 1981. - - [RFC-821] - Postel, J.B., "Simple Mail Transfer Protocol", STD 10, - RFC 821, USC/Information Sciences Institute, August 1982. - - [RFC-822] - Crocker, D., "Standard for the Format of ARPA Internet - Text Messages", STD 11, RFC 822, UDEL, August 1982. - - [RFC-934] - Rose, M. and E. Stefferud, "Proposed Standard for Message - Encapsulation", RFC 934, Delaware and NMA, January 1985. - - [RFC-959] - Postel, J. and J. Reynolds, "File Transfer Protocol", STD - 9, RFC 959, USC/Information Sciences Institute, October - 1985. - - [RFC-1049] - Sirbu, M., "Content-Type Header Field for Internet - Messages", RFC 1049, CMU, March 1988. - - [RFC-1154] - Robinson, D., and R. Ullmann, "Encoding Header Field for - Internet Messages", RFC 1154, Prime Computer, Inc., April - 1990. - - [RFC-1341] - Borenstein, N., and N. Freed, "MIME (Multipurpose - Internet Mail Extensions): Mechanisms for Specifying and - Describing the Format of Internet Message Bodies", RFC - 1341, Bellcore, Innosoft, June 1992. - - - - -Freed & Borenstein Standards Track [Page 21] - -RFC 2049 MIME Conformance November 1996 - - - [RFC-1342] - Moore, K., "Representation of Non-Ascii Text in Internet - Message Headers", RFC 1342, University of Tennessee, June - 1992. - - [RFC-1344] - Borenstein, N., "Implications of MIME for Internet Mail - Gateways", RFC 1344, Bellcore, June 1992. - - [RFC-1345] - Simonsen, K., "Character Mnemonics & Character Sets", RFC - 1345, Rationel Almen Planlaegning, June 1992. - - [RFC-1421] - Linn, J., "Privacy Enhancement for Internet Electronic - Mail: Part I -- Message Encryption and Authentication - Procedures", RFC 1421, IAB IRTF PSRG, IETF PEM WG, - February 1993. - - [RFC-1422] - Kent, S., "Privacy Enhancement for Internet Electronic - Mail: Part II -- Certificate-Based Key Management", RFC - 1422, IAB IRTF PSRG, IETF PEM WG, February 1993. - - [RFC-1423] - Balenson, D., "Privacy Enhancement for Internet - Electronic Mail: Part III -- Algorithms, Modes, and - Identifiers", IAB IRTF PSRG, IETF PEM WG, February 1993. - - [RFC-1424] - Kaliski, B., "Privacy Enhancement for Internet Electronic - Mail: Part IV -- Key Certification and Related - Services", IAB IRTF PSRG, IETF PEM WG, February 1993. - - [RFC-1521] - Borenstein, N., and Freed, N., "MIME (Multipurpose - Internet Mail Extensions): Mechanisms for Specifying and - Describing the Format of Internet Message Bodies", RFC - 1521, Bellcore, Innosoft, September, 1993. - - [RFC-1522] - Moore, K., "Representation of Non-ASCII Text in Internet - Message Headers", RFC 1522, University of Tennessee, - September 1993. - - - - - - - -Freed & Borenstein Standards Track [Page 22] - -RFC 2049 MIME Conformance November 1996 - - - [RFC-1524] - Borenstein, N., "A User Agent Configuration Mechanism for - Multimedia Mail Format Information", RFC 1524, Bellcore, - September 1993. - - [RFC-1543] - Postel, J., "Instructions to RFC Authors", RFC 1543, - USC/Information Sciences Institute, October 1993. - - [RFC-1556] - Nussbacher, H., "Handling of Bi-directional Texts in - MIME", RFC 1556, Israeli Inter-University Computer - Center, December 1993. - - [RFC-1590] - Postel, J., "Media Type Registration Procedure", RFC - 1590, USC/Information Sciences Institute, March 1994. - - [RFC-1602] - Internet Architecture Board, Internet Engineering - Steering Group, Huitema, C., Gross, P., "The Internet - Standards Process -- Revision 2", March 1994. - - [RFC-1652] - Klensin, J., (WG Chair), Freed, N., (Editor), Rose, M., - Stefferud, E., and Crocker, D., "SMTP Service Extension - for 8bit-MIME transport", RFC 1652, United Nations - University, Innosoft, Dover Beach Consulting, Inc., - Network Management Associates, Inc., The Branch Office, - March 1994. - - [RFC-1700] - Reynolds, J. and J. Postel, "Assigned Numbers", STD 2, - RFC 1700, USC/Information Sciences Institute, October - 1994. - - [RFC-1741] - Faltstrom, P., Crocker, D., and Fair, E., "MIME Content - Type for BinHex Encoded Files", December 1994. - - [RFC-1896] - Resnick, P., and A. Walker, "The text/enriched MIME - Content-type", RFC 1896, February, 1996. - - - - - - - - -Freed & Borenstein Standards Track [Page 23] - -RFC 2049 MIME Conformance November 1996 - - - [RFC-2045] - Freed, N., and and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part One: Format of Internet Message - Bodies", RFC 2045, Innosoft, First Virtual Holdings, - November 1996. - - [RFC-2046] - Freed, N., and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part Two: Media Types", RFC 2046, - Innosoft, First Virtual Holdings, November 1996. - - [RFC-2047] - Moore, K., "Multipurpose Internet Mail Extensions (MIME) - Part Three: Representation of Non-ASCII Text in Internet - Message Headers", RFC 2047, University of - Tennessee, November 1996. - - [RFC-2048] - Freed, N., Klensin, J., and J. Postel, "Multipurpose - Internet Mail Extensions (MIME) Part Four: MIME - Registration Procedures", RFC 2048, Innosoft, MCI, - ISI, November 1996. - - [RFC-2049] - Freed, N. and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part Five: Conformance Criteria and - Examples", RFC 2049 (this document), Innosoft, First - Virtual Holdings, November 1996. - - [US-ASCII] - Coded Character Set -- 7-Bit American Standard Code for - Information Interchange, ANSI X3.4-1986. - - [X400] - Schicker, Pietro, "Message Handling Systems, X.400", - Message Handling Systems and Distributed Applications, E. - Stefferud, O-j. Jacobsen, and P. Schicker, eds., North- - Holland, 1989, pp. 3-41. - - - - - - - - - - - - - -Freed & Borenstein Standards Track [Page 24] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2183.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2183.txt deleted file mode 100644 index f16f127e..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2183.txt +++ /dev/null @@ -1,675 +0,0 @@ - - - - - - -Network Working Group R. Troost -Request for Comments: 2183 New Century Systems -Updates: 1806 S. Dorner -Category: Standards Track QUALCOMM Incorporated - K. Moore, Editor - University of Tennessee - August 1997 - - - Communicating Presentation Information in - Internet Messages: - The Content-Disposition Header Field - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Abstract - - This memo provides a mechanism whereby messages conforming to the - MIME specifications [RFC 2045, RFC 2046, RFC 2047, RFC 2048, RFC - 2049] can convey presentational information. It specifies the - "Content-Disposition" header field, which is optional and valid for - any MIME entity ("message" or "body part"). Two values for this - header field are described in this memo; one for the ordinary linear - presentation of the body part, and another to facilitate the use of - mail to transfer files. It is expected that more values will be - defined in the future, and procedures are defined for extending this - set of values. - - This document is intended as an extension to MIME. As such, the - reader is assumed to be familiar with the MIME specifications, and - [RFC 822]. The information presented herein supplements but does not - replace that found in those documents. - - This document is a revision to the Experimental protocol defined in - RFC 1806. As compared to RFC 1806, this document contains minor - editorial updates, adds new parameters needed to support the File - Transfer Body Part, and references a separate specification for the - handling of non-ASCII and/or very long parameter values. - - - - - - - -Troost, et. al. Standards Track [Page 1] - -RFC 2183 Content-Disposition August 1997 - - -1. Introduction - - MIME specifies a standard format for encapsulating multiple pieces of - data into a single Internet message. That document does not address - the issue of presentation styles; it provides a framework for the - interchange of message content, but leaves presentation issues solely - in the hands of mail user agent (MUA) implementors. - - Two common ways of presenting multipart electronic messages are as a - main document with a list of separate attachments, and as a single - document with the various parts expanded (displayed) inline. The - display of an attachment is generally construed to require positive - action on the part of the recipient, while inline message components - are displayed automatically when the message is viewed. A mechanism - is needed to allow the sender to transmit this sort of presentational - information to the recipient; the Content-Disposition header provides - this mechanism, allowing each component of a message to be tagged - with an indication of its desired presentation semantics. - - Tagging messages in this manner will often be sufficient for basic - message formatting. However, in many cases a more powerful and - flexible approach will be necessary. The definition of such - approaches is beyond the scope of this memo; however, such approaches - can benefit from additional Content-Disposition values and - parameters, to be defined at a later date. - - In addition to allowing the sender to specify the presentational - disposition of a message component, it is desirable to allow her to - indicate a default archival disposition; a filename. The optional - "filename" parameter provides for this. Further, the creation-date, - modification-date, and read-date parameters allow preservation of - those file attributes when the file is transmitted over MIME email. - - NB: The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, - SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this - document, are to be interpreted as described in [RFC 2119]. - -2. The Content-Disposition Header Field - - Content-Disposition is an optional header field. In its absence, the - MUA may use whatever presentation method it deems suitable. - - It is desirable to keep the set of possible disposition types small - and well defined, to avoid needless complexity. Even so, evolving - usage will likely require the definition of additional disposition - types or parameters, so the set of disposition values is extensible; - see below. - - - - -Troost, et. al. Standards Track [Page 2] - -RFC 2183 Content-Disposition August 1997 - - - In the extended BNF notation of [RFC 822], the Content-Disposition - header field is defined as follows: - - disposition := "Content-Disposition" ":" - disposition-type - *(";" disposition-parm) - - disposition-type := "inline" - / "attachment" - / extension-token - ; values are not case-sensitive - - disposition-parm := filename-parm - / creation-date-parm - / modification-date-parm - / read-date-parm - / size-parm - / parameter - - filename-parm := "filename" "=" value - - creation-date-parm := "creation-date" "=" quoted-date-time - - modification-date-parm := "modification-date" "=" quoted-date-time - - read-date-parm := "read-date" "=" quoted-date-time - - size-parm := "size" "=" 1*DIGIT - - quoted-date-time := quoted-string - ; contents MUST be an RFC 822 `date-time' - ; numeric timezones (+HHMM or -HHMM) MUST be used - - - - NOTE ON PARAMETER VALUE LENGHTS: A short (length <= 78 characters) - parameter value containing only non-`tspecials' characters SHOULD be - represented as a single `token'. A short parameter value containing - only ASCII characters, but including `tspecials' characters, SHOULD - be represented as `quoted-string'. Parameter values longer than 78 - characters, or which contain non-ASCII characters, MUST be encoded as - specified in [RFC 2184]. - - `Extension-token', `parameter', `tspecials' and `value' are defined - according to [RFC 2045] (which references [RFC 822] in the definition - of some of these tokens). `quoted-string' and `DIGIT' are defined in - [RFC 822]. - - - - -Troost, et. al. Standards Track [Page 3] - -RFC 2183 Content-Disposition August 1997 - - -2.1 The Inline Disposition Type - - A bodypart should be marked `inline' if it is intended to be - displayed automatically upon display of the message. Inline - bodyparts should be presented in the order in which they occur, - subject to the normal semantics of multipart messages. - -2.2 The Attachment Disposition Type - - Bodyparts can be designated `attachment' to indicate that they are - separate from the main body of the mail message, and that their - display should not be automatic, but contingent upon some further - action of the user. The MUA might instead present the user of a - bitmap terminal with an iconic representation of the attachments, or, - on character terminals, with a list of attachments from which the - user could select for viewing or storage. - -2.3 The Filename Parameter - - The sender may want to suggest a filename to be used if the entity is - detached and stored in a separate file. If the receiving MUA writes - the entity to a file, the suggested filename should be used as a - basis for the actual filename, where possible. - - It is important that the receiving MUA not blindly use the suggested - filename. The suggested filename SHOULD be checked (and possibly - changed) to see that it conforms to local filesystem conventions, - does not overwrite an existing file, and does not present a security - problem (see Security Considerations below). - - The receiving MUA SHOULD NOT respect any directory path information - that may seem to be present in the filename parameter. The filename - should be treated as a terminal component only. Portable - specification of directory paths might possibly be done in the future - via a separate Content-Disposition parameter, but no provision is - made for it in this draft. - - Current [RFC 2045] grammar restricts parameter values (and hence - Content-Disposition filenames) to US-ASCII. We recognize the great - desirability of allowing arbitrary character sets in filenames, but - it is beyond the scope of this document to define the necessary - mechanisms. We expect that the basic [RFC 1521] `value' - specification will someday be amended to allow use of non-US-ASCII - characters, at which time the same mechanism should be used in the - Content-Disposition filename parameter. - - - - - - -Troost, et. al. Standards Track [Page 4] - -RFC 2183 Content-Disposition August 1997 - - - Beyond the limitation to US-ASCII, the sending MUA may wish to bear - in mind the limitations of common filesystems. Many have severe - length and character set restrictions. Short alphanumeric filenames - are least likely to require modification by the receiving system. - - The presence of the filename parameter does not force an - implementation to write the entity to a separate file. It is - perfectly acceptable for implementations to leave the entity as part - of the normal mail stream unless the user requests otherwise. As a - consequence, the parameter may be used on any MIME entity, even - `inline' ones. These will not normally be written to files, but the - parameter could be used to provide a filename if the receiving user - should choose to write the part to a file. - -2.4 The Creation-Date parameter - - The creation-date parameter MAY be used to indicate the date at which - the file was created. If this parameter is included, the paramter - value MUST be a quoted-string which contains a representation of the - creation date of the file in [RFC 822] `date-time' format. - - UNIX and POSIX implementors are cautioned that the `st_ctime' file - attribute of the `stat' structure is not the creation time of the - file; it is thus not appropriate as a source for the creation-date - parameter value. - -2.5 The Modification-Date parameter - - The modification-date parameter MAY be used to indicate the date at - which the file was last modified. If the modification-date parameter - is included, the paramter value MUST be a quoted-string which - contains a representation of the last modification date of the file - in [RFC 822] `date-time' format. - -2.6 The Read-Date parameter - - The read-date parameter MAY be used to indicate the date at which the - file was last read. If the read-date parameter is included, the - parameter value MUST be a quoted-string which contains a - representation of the last-read date of the file in [RFC 822] `date- - time' format. - -2.7 The Size parameter - - The size parameter indicates an approximate size of the file in - octets. It can be used, for example, to pre-allocate space before - attempting to store the file, or to determine whether enough space - exists. - - - -Troost, et. al. Standards Track [Page 5] - -RFC 2183 Content-Disposition August 1997 - - -2.8 Future Extensions and Unrecognized Disposition Types - - In the likely event that new parameters or disposition types are - needed, they should be registered with the Internet Assigned Numbers - Authority (IANA), in the manner specified in Section 9 of this memo. - - Once new disposition types and parameters are defined, there is of - course the likelihood that implementations will see disposition types - and parameters they do not understand. Furthermore, since x-tokens - are allowed, implementations may also see entirely unregistered - disposition types and parameters. - - Unrecognized parameters should be ignored. Unrecognized disposition - types should be treated as `attachment'. The choice of `attachment' - for unrecognized types is made because a sender who goes to the - trouble of producing a Content-Disposition header with a new - disposition type is more likely aiming for something more elaborate - than inline presentation. - - Unless noted otherwise in the definition of a parameter, Content- - Disposition parameters are valid for all dispositions. (In contrast - to MIME content-type parameters, which are defined on a per-content- - type basis.) Thus, for example, the `filename' parameter still means - the name of the file to which the part should be written, even if the - disposition itself is unrecognized. - -2.9 Content-Disposition and Multipart - - If a Content-Disposition header is used on a multipart body part, it - applies to the multipart as a whole, not the individual subparts. - The disposition types of the subparts do not need to be consulted - until the multipart itself is presented. When the multipart is - displayed, then the dispositions of the subparts should be respected. - - If the `inline' disposition is used, the multipart should be - displayed as normal; however, an `attachment' subpart should require - action from the user to display. - - If the `attachment' disposition is used, presentation of the - multipart should not proceed without explicit user action. Once the - user has chosen to display the multipart, the individual subpart - dispositions should be consulted to determine how to present the - subparts. - - - - - - - - -Troost, et. al. Standards Track [Page 6] - -RFC 2183 Content-Disposition August 1997 - - -2.10 Content-Disposition and the Main Message - - It is permissible to use Content-Disposition on the main body of an - [RFC 822] message. - -3. Examples - - Here is a an example of a body part containing a JPEG image that is - intended to be viewed by the user immediately: - - Content-Type: image/jpeg - Content-Disposition: inline - Content-Description: just a small picture of me - - - - The following body part contains a JPEG image that should be - displayed to the user only if the user requests it. If the JPEG is - written to a file, the file should be named "genome.jpg". The - recipient's user might also choose to set the last-modified date of - the stored file to date in the modification-date parameter: - - Content-Type: image/jpeg - Content-Disposition: attachment; filename=genome.jpeg; - modification-date="Wed, 12 Feb 1997 16:29:51 -0500"; - Content-Description: a complete map of the human genome - - - - The following is an example of the use of the `attachment' - disposition with a multipart body part. The user should see text- - part-1 immediately, then take some action to view multipart-2. After - taking action to view multipart-2, the user will see text-part-2 - right away, and be required to take action to view jpeg-1. Subparts - are indented for clarity; they would not be so indented in a real - message. - - - - - - - - - - - - - - - -Troost, et. al. Standards Track [Page 7] - -RFC 2183 Content-Disposition August 1997 - - - Content-Type: multipart/mixed; boundary=outer - Content-Description: multipart-1 - - --outer - Content-Type: text/plain - Content-Disposition: inline - Content-Description: text-part-1 - - Some text goes here - - --outer - Content-Type: multipart/mixed; boundary=inner - Content-Disposition: attachment - Content-Description: multipart-2 - - --inner - Content-Type: text/plain - Content-Disposition: inline - Content-Description: text-part-2 - - Some more text here. - - --inner - Content-Type: image/jpeg - Content-Disposition: attachment - Content-Description: jpeg-1 - - - --inner-- - --outer-- - -4. Summary - - Content-Disposition takes one of two values, `inline' and - `attachment'. `Inline' indicates that the entity should be - immediately displayed to the user, whereas `attachment' means that - the user should take additional action to view the entity. - - The `filename' parameter can be used to suggest a filename for - storing the bodypart, if the user wishes to store it in an external - file. - - - - - - - - - - -Troost, et. al. Standards Track [Page 8] - -RFC 2183 Content-Disposition August 1997 - - -5. Security Considerations - - There are security issues involved any time users exchange data. - While these are not to be minimized, neither does this memo change - the status quo in that regard, except in one instance. - - Since this memo provides a way for the sender to suggest a filename, - a receiving MUA must take care that the sender's suggested filename - does not represent a hazard. Using UNIX as an example, some hazards - would be: - - + Creating startup files (e.g., ".login"). - - + Creating or overwriting system files (e.g., "/etc/passwd"). - - + Overwriting any existing file. - - + Placing executable files into any command search path - (e.g., "~/bin/more"). - - + Sending the file to a pipe (e.g., "| sh"). - - In general, the receiving MUA should not name or place the file such - that it will get interpreted or executed without the user explicitly - initiating the action. - - It is very important to note that this is not an exhaustive list; it - is intended as a small set of examples only. Implementors must be - alert to the potential hazards on their target systems. - -6. References - - [RFC 2119] - Bradner, S., "Key words for use in RFCs to Indicate Requirement - Levels", RFC 2119, March 1997. - - [RFC 2184] - Freed, N. and K. Moore, "MIME Parameter value and Encoded Words: - Character Sets, Lanaguage, and Continuations", RFC 2184, August - 1997. - - [RFC 2045] - Freed, N. and N. Borenstein, "MIME (Multipurpose Internet Mail - Extensions) Part One: Format of Internet Message Bodies", RFC - 2045, December 1996. - - - - - - -Troost, et. al. Standards Track [Page 9] - -RFC 2183 Content-Disposition August 1997 - - - [RFC 2046] - Freed, N. and N. Borenstein, "MIME (Multipurpose Internet Mail - Extensions) Part Two: Media Types", RFC 2046, December 1996. - - [RFC 2047] - Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part - Three: Message Header Extensions for non-ASCII Text", RFC 2047, - December 1996. - - [RFC 2048] - Freed, N., Klensin, J. and J. Postel, "MIME (Multipurpose - Internet Mail Extensions) Part Four: Registration Procedures", - RFC 2048, December 1996. - - [RFC 2049] - Freed, N. and N. Borenstein, "MIME (Multipurpose Internet Mail - Extensions) Part Five: Conformance Criteria and Examples", RFC - 2049, December 1996. - - [RFC 822] - Crocker, D., "Standard for the Format of ARPA Internet Text - Messages", STD 11, RFC 822, UDEL, August 1982. - -7. Acknowledgements - - We gratefully acknowledge the help these people provided during the - preparation of this draft: - - Nathaniel Borenstein - Ned Freed - Keith Moore - Dave Crocker - Dan Pritchett - - - - - - - - - - - - - - - - - - -Troost, et. al. Standards Track [Page 10] - -RFC 2183 Content-Disposition August 1997 - - -8. Authors' Addresses - - You should blame the editor of this version of the document for any - changes since RFC 1806: - - Keith Moore - Department of Computer Science - University of Tennessee, Knoxville - 107 Ayres Hall - Knoxville TN 37996-1301 - USA - - Phone: +1 (423) 974-5067 - Fax: +1 (423) 974-8296 - Email: moore@cs.utk.edu - - - The authors of RFC 1806 are: - - Rens Troost - New Century Systems - 324 East 41st Street #804 - New York, NY, 10017 USA - - Phone: +1 (212) 557-2050 - Fax: +1 (212) 557-2049 - EMail: rens@century.com - - - Steve Dorner - QUALCOMM Incorporated - 6455 Lusk Boulevard - San Diego, CA 92121 - USA - - EMail: sdorner@qualcomm.com - - -9. Registration of New Content-Disposition Values and Parameters - - New Content-Disposition values (besides "inline" and "attachment") - may be defined only by Internet standards-track documents, or in - Experimental documents approved by the Internet Engineering Steering - Group. - - - - - - - -Troost, et. al. Standards Track [Page 11] - -RFC 2183 Content-Disposition August 1997 - - - New content-disposition parameters may be registered by supplying the - information in the following template and sending it via electronic - mail to IANA@IANA.ORG: - - To: IANA@IANA.ORG - Subject: Registration of new Content-Disposition parameter - - Content-Disposition parameter name: - - Allowable values for this parameter: - (If the parameter can only assume a small number of values, - list each of those values. Otherwise, describe the values - that the parameter can assume.) - Description: - (What is the purpose of this parameter and how is it used?) - -10. Changes since RFC 1806 - - The following changes have been made since the earlier version of - this document, published in RFC 1806 as an Experimental protocol: - - + Updated references to MIME documents. In some cases this - involved substituting a reference to one of the current MIME - RFCs for a reference to RFC 1521; in other cases, a reference to - RFC 1521 was simply replaced with the word "MIME". - - + Added a section on registration procedures, since none of the - procedures in RFC 2048 seemed to be appropriate. - - + Added new parameter types: creation-date, modification-date, - read-date, and size. - - - + Incorporated a reference to draft-freed-pvcsc-* for encoding - long or non-ASCII parameter values. - - + Added reference to RFC 2119 to define MUST, SHOULD, etc. - keywords. - - - - - - - - - - - - - -Troost, et. al. Standards Track [Page 12] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2222.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2222.txt deleted file mode 100644 index 2b0a2abc..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2222.txt +++ /dev/null @@ -1,899 +0,0 @@ - - - - - - -Network Working Group J. Myers -Request for Comments: 2222 Netscape Communications -Category: Standards Track October 1997 - - - Simple Authentication and Security Layer (SASL) - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (1997). All Rights Reserved. - -Table of Contents - - 1. Abstract .............................................. 2 - 2. Organization of this Document ......................... 2 - 2.1. How to Read This Document ............................. 2 - 2.2. Conventions Used in this Document ..................... 2 - 2.3. Examples .............................................. 3 - 3. Introduction and Overview ............................. 3 - 4. Profiling requirements ................................ 4 - 5. Specific issues ....................................... 5 - 5.1. Client sends data first ............................... 5 - 5.2. Server returns success with additional data ........... 5 - 5.3. Multiple authentications .............................. 5 - 6. Registration procedures ............................... 6 - 6.1. Comments on SASL mechanism registrations .............. 6 - 6.2. Location of Registered SASL Mechanism List ............ 6 - 6.3. Change Control ........................................ 7 - 6.4. Registration Template ................................. 7 - 7. Mechanism definitions ................................. 8 - 7.1. Kerberos version 4 mechanism .......................... 8 - 7.2. GSSAPI mechanism ...................................... 9 - 7.2.1 Client side of authentication protocol exchange ....... 9 - 7.2.2 Server side of authentication protocol exchange ....... 10 - 7.2.3 Security layer ........................................ 11 - 7.3. S/Key mechanism ....................................... 11 - 7.4. External mechanism .................................... 12 - 8. References ............................................ 13 - 9. Security Considerations ............................... 13 - 10. Author's Address ...................................... 14 - - - -Myers Standards Track [Page 1] - -RFC 2222 SASL October 1997 - - - Appendix A. Relation of SASL to Transport Security .......... 15 - Full Copyright Statement .................................... 16 - -1. Abstract - - This document describes a method for adding authentication support to - connection-based protocols. To use this specification, a protocol - includes a command for identifying and authenticating a user to a - server and for optionally negotiating protection of subsequent - protocol interactions. If its use is negotiated, a security layer is - inserted between the protocol and the connection. This document - describes how a protocol specifies such a command, defines several - mechanisms for use by the command, and defines the protocol used for - carrying a negotiated security layer over the connection. - -2. Organization of this Document - -2.1. How to Read This Document - - This document is written to serve two different audiences, protocol - designers using this specification to support authentication in their - protocol, and implementors of clients or servers for those protocols - using this specification. - - The sections "Introduction and Overview", "Profiling requirements", - and "Security Considerations" cover issues that protocol designers - need to understand and address in profiling this specification for - use in a specific protocol. - - Implementors of a protocol using this specification need the - protocol-specific profiling information in addition to the - information in this document. - -2.2. Conventions Used in this Document - - In examples, "C:" and "S:" indicate lines sent by the client and - server respectively. - - The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" - in this document are to be interpreted as defined in "Key words for - use in RFCs to Indicate Requirement Levels" [RFC 2119]. - - - - - - - - - - -Myers Standards Track [Page 2] - -RFC 2222 SASL October 1997 - - -2.3. Examples - - Examples in this document are for the IMAP profile [RFC 2060] of this - specification. The base64 encoding of challenges and responses, as - well as the "+ " preceding the responses are part of the IMAP4 - profile, not part of the SASL specification itself. - -3. Introduction and Overview - - The Simple Authentication and Security Layer (SASL) is a method for - adding authentication support to connection-based protocols. To use - this specification, a protocol includes a command for identifying and - authenticating a user to a server and for optionally negotiating a - security layer for subsequent protocol interactions. - - The command has a required argument identifying a SASL mechanism. - SASL mechanisms are named by strings, from 1 to 20 characters in - length, consisting of upper-case letters, digits, hyphens, and/or - underscores. SASL mechanism names must be registered with the IANA. - Procedures for registering new SASL mechanisms are given in the - section "Registration procedures" - - If a server supports the requested mechanism, it initiates an - authentication protocol exchange. This consists of a series of - server challenges and client responses that are specific to the - requested mechanism. The challenges and responses are defined by the - mechanisms as binary tokens of arbitrary length. The protocol's - profile then specifies how these binary tokens are then encoded for - transfer over the connection. - - After receiving the authentication command or any client response, a - server may issue a challenge, indicate failure, or indicate - completion. The protocol's profile specifies how the server - indicates which of the above it is doing. - - After receiving a challenge, a client may issue a response or abort - the exchange. The protocol's profile specifies how the client - indicates which of the above it is doing. - - During the authentication protocol exchange, the mechanism performs - authentication, transmits an authorization identity (frequently known - as a userid) from the client to server, and negotiates the use of a - mechanism-specific security layer. If the use of a security layer is - agreed upon, then the mechanism must also define or negotiate the - maximum cipher-text buffer size that each side is able to receive. - - - - - - -Myers Standards Track [Page 3] - -RFC 2222 SASL October 1997 - - - The transmitted authorization identity may be different than the - identity in the client's authentication credentials. This permits - agents such as proxy servers to authenticate using their own - credentials, yet request the access privileges of the identity for - which they are proxying. With any mechanism, transmitting an - authorization identity of the empty string directs the server to - derive an authorization identity from the client's authentication - credentials. - - If use of a security layer is negotiated, it is applied to all - subsequent data sent over the connection. The security layer takes - effect immediately following the last response of the authentication - exchange for data sent by the client and the completion indication - for data sent by the server. Once the security layer is in effect, - the protocol stream is processed by the security layer into buffers - of cipher-text. Each buffer is transferred over the connection as a - stream of octets prepended with a four octet field in network byte - order that represents the length of the following buffer. The length - of the cipher-text buffer must be no larger than the maximum size - that was defined or negotiated by the other side. - -4. Profiling requirements - - In order to use this specification, a protocol definition must supply - the following information: - - 1. A service name, to be selected from the IANA registry of "service" - elements for the GSSAPI host-based service name form [RFC 2078]. - - 2. A definition of the command to initiate the authentication - protocol exchange. This command must have as a parameter the - mechanism name being selected by the client. - - The command SHOULD have an optional parameter giving an initial - response. This optional parameter allows the client to avoid a - round trip when using a mechanism which is defined to have the - client send data first. When this initial response is sent by the - client and the selected mechanism is defined to have the server - start with an initial challenge, the command fails. See section - 5.1 of this document for further information. - - 3. A definition of the method by which the authentication protocol - exchange is carried out, including how the challenges and - responses are encoded, how the server indicates completion or - failure of the exchange, how the client aborts an exchange, and - how the exchange method interacts with any line length limits in - the protocol. - - - - -Myers Standards Track [Page 4] - -RFC 2222 SASL October 1997 - - - 4. Identification of the octet where any negotiated security layer - starts to take effect, in both directions. - - 5. A specification of how the authorization identity passed from the - client to the server is to be interpreted. - -5. Specific issues - -5.1. Client sends data first - - Some mechanisms specify that the first data sent in the - authentication protocol exchange is from the client to the server. - - If a protocol's profile permits the command which initiates an - authentication protocol exchange to contain an initial client - response, this parameter SHOULD be used with such mechanisms. - - If the initial client response parameter is not given, or if a - protocol's profile does not permit the command which initiates an - authentication protocol exchange to contain an initial client - response, then the server issues a challenge with no data. The - client's response to this challenge is then used as the initial - client response. (The server then proceeds to send the next - challenge, indicates completion, or indicates failure.) - -5.2. Server returns success with additional data - - Some mechanisms may specify that server challenge data be sent to the - client along with an indication of successful completion of the - exchange. This data would, for example, authenticate the server to - the client. - - If a protocol's profile does not permit this server challenge to be - returned with a success indication, then the server issues the server - challenge without an indication of successful completion. The client - then responds with no data. After receiving this empty response, the - server then indicates successful completion. - -5.3. Multiple authentications - - Unless otherwise stated by the protocol's profile, only one - successful SASL negotiation may occur in a protocol session. In this - case, once an authentication protocol exchange has successfully - completed, further attempts to initiate an authentication protocol - exchange fail. - - - - - - -Myers Standards Track [Page 5] - -RFC 2222 SASL October 1997 - - - In the case that a profile explicitly permits multiple successful - SASL negotiations to occur, then in no case may multiple security - layers be simultaneously in effect. If a security layer is in effect - and a subsequent SASL negotiation selects no security layer, the - original security layer remains in effect. If a security layer is in - effect and a subsequent SASL negotiation selects a second security - layer, then the second security layer replaces the first. - -6. Registration procedures - - Registration of a SASL mechanism is done by filling in the template - in section 6.4 and sending it in to iana@isi.edu. IANA has the right - to reject obviously bogus registrations, but will perform no review - of clams made in the registration form. - - There is no naming convention for SASL mechanisms; any name that - conforms to the syntax of a SASL mechanism name can be registered. - - While the registration procedures do not require it, authors of SASL - mechanisms are encouraged to seek community review and comment - whenever that is feasible. Authors may seek community review by - posting a specification of their proposed mechanism as an internet- - draft. SASL mechanisms intended for widespread use should be - standardized through the normal IETF process, when appropriate. - -6.1. Comments on SASL mechanism registrations - - Comments on registered SASL mechanisms should first be sent to the - "owner" of the mechanism. Submitters of comments may, after a - reasonable attempt to contact the owner, request IANA to attach their - comment to the SASL mechanism registration itself. If IANA approves - of this the comment will be made accessible in conjunction with the - SASL mechanism registration itself. - -6.2. Location of Registered SASL Mechanism List - - SASL mechanism registrations will be posted in the anonymous FTP - directory "ftp://ftp.isi.edu/in-notes/iana/assignments/sasl- - mechanisms/" and all registered SASL mechanisms will be listed in the - periodically issued "Assigned Numbers" RFC [currently STD 2, RFC - 1700]. The SASL mechanism description and other supporting material - may also be published as an Informational RFC by sending it to "rfc- - editor@isi.edu" (please follow the instructions to RFC authors [RFC - 2223]). - - - - - - - -Myers Standards Track [Page 6] - -RFC 2222 SASL October 1997 - - -6.3. Change Control - - Once a SASL mechanism registration has been published by IANA, the - author may request a change to its definition. The change request - follows the same procedure as the registration request. - - The owner of a SASL mechanism may pass responsibility for the SASL - mechanism to another person or agency by informing IANA; this can be - done without discussion or review. - - The IESG may reassign responsibility for a SASL mechanism. The most - common case of this will be to enable changes to be made to - mechanisms where the author of the registration has died, moved out - of contact or is otherwise unable to make changes that are important - to the community. - - SASL mechanism registrations may not be deleted; mechanisms which are - no longer believed appropriate for use can be declared OBSOLETE by a - change to their "intended use" field; such SASL mechanisms will be - clearly marked in the lists published by IANA. - - The IESG is considered to be the owner of all SASL mechanisms which - are on the IETF standards track. - -6.4. Registration Template - - To: iana@iana.org - Subject: Registration of SASL mechanism X - - SASL mechanism name: - - Security considerations: - - Published specification (optional, recommended): - - Person & email address to contact for further information: - - Intended usage: - - (One of COMMON, LIMITED USE or OBSOLETE) - - Author/Change controller: - - (Any other information that the author deems interesting may be - added below this line.) - - - - - - -Myers Standards Track [Page 7] - -RFC 2222 SASL October 1997 - - -7. Mechanism definitions - - The following mechanisms are hereby defined. - -7.1. Kerberos version 4 mechanism - - The mechanism name associated with Kerberos version 4 is - "KERBEROS_V4". - - The first challenge consists of a random 32-bit number in network - byte order. The client responds with a Kerberos ticket and an - authenticator for the principal "service.hostname@realm", where - "service" is the service name specified in the protocol's profile, - "hostname" is the first component of the host name of the server with - all letters in lower case, and where "realm" is the Kerberos realm of - the server. The encrypted checksum field included within the - Kerberos authenticator contains the server provided challenge in - network byte order. - - Upon decrypting and verifying the ticket and authenticator, the - server verifies that the contained checksum field equals the original - server provided random 32-bit number. Should the verification be - successful, the server must add one to the checksum and construct 8 - octets of data, with the first four octets containing the incremented - checksum in network byte order, the fifth octet containing a bit-mask - specifying the security layers supported by the server, and the sixth - through eighth octets containing, in network byte order, the maximum - cipher-text buffer size the server is able to receive. The server - must encrypt using DES ECB mode the 8 octets of data in the session - key and issue that encrypted data in a second challenge. The client - considers the server authenticated if the first four octets of the - un-encrypted data is equal to one plus the checksum it previously - sent. - - The client must construct data with the first four octets containing - the original server-issued checksum in network byte order, the fifth - octet containing the bit-mask specifying the selected security layer, - the sixth through eighth octets containing in network byte order the - maximum cipher-text buffer size the client is able to receive, and - the following octets containing the authorization identity. The - client must then append from one to eight zero-valued octets so that - the length of the data is a multiple of eight octets. The client must - then encrypt using DES PCBC mode the data with the session key and - respond with the encrypted data. The server decrypts the data and - verifies the contained checksum. The server must verify that the - principal identified in the Kerberos ticket is authorized to connect - as that authorization identity. After this verification, the - authentication process is complete. - - - -Myers Standards Track [Page 8] - -RFC 2222 SASL October 1997 - - - The security layers and their corresponding bit-masks are as follows: - - 1 No security layer - 2 Integrity (krb_mk_safe) protection - 4 Privacy (krb_mk_priv) protection - - Other bit-masks may be defined in the future; bits which are not - understood must be negotiated off. - - EXAMPLE: The following are two Kerberos version 4 login scenarios to - the IMAP4 protocol (note that the line breaks in the sample - authenticators are for editorial clarity and are not in real - authenticators) - - S: * OK IMAP4 Server - C: A001 AUTHENTICATE KERBEROS_V4 - S: + AmFYig== - C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT - +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd - WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh - S: + or//EoAADZI= - C: DiAF5A4gA+oOIALuBkAAmw== - S: A001 OK Kerberos V4 authentication successful - - - S: * OK IMAP4 Server - C: A001 AUTHENTICATE KERBEROS_V4 - S: + gcfgCA== - C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT - +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd - WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh - S: A001 NO Kerberos V4 authentication failed - -7.2. GSSAPI mechanism - - The mechanism name associated with all mechanisms employing the - GSSAPI [RFC 2078] is "GSSAPI". - -7.2.1 Client side of authentication protocol exchange - - The client calls GSS_Init_sec_context, passing in 0 for - input_context_handle (initially) and a targ_name equal to output_name - from GSS_Import_Name called with input_name_type of - GSS_C_NT_HOSTBASED_SERVICE and input_name_string of - "service@hostname" where "service" is the service name specified in - the protocol's profile, and "hostname" is the fully qualified host - name of the server. The client then responds with the resulting - output_token. If GSS_Init_sec_context returns GSS_S_CONTINUE_NEEDED, - - - -Myers Standards Track [Page 9] - -RFC 2222 SASL October 1997 - - - then the client should expect the server to issue a token in a - subsequent challenge. The client must pass the token to another call - to GSS_Init_sec_context, repeating the actions in this paragraph. - - When GSS_Init_sec_context returns GSS_S_COMPLETE, the client takes - the following actions: If the last call to GSS_Init_sec_context - returned an output_token, then the client responds with the - output_token, otherwise the client responds with no data. The client - should then expect the server to issue a token in a subsequent - challenge. The client passes this token to GSS_Unwrap and interprets - the first octet of resulting cleartext as a bit-mask specifying the - security layers supported by the server and the second through fourth - octets as the maximum size output_message to send to the server. The - client then constructs data, with the first octet containing the - bit-mask specifying the selected security layer, the second through - fourth octets containing in network byte order the maximum size - output_message the client is able to receive, and the remaining - octets containing the authorization identity. The client passes the - data to GSS_Wrap with conf_flag set to FALSE, and responds with the - generated output_message. The client can then consider the server - authenticated. - -7.2.2 Server side of authentication protocol exchange - - The server passes the initial client response to - GSS_Accept_sec_context as input_token, setting input_context_handle - to 0 (initially). If GSS_Accept_sec_context returns - GSS_S_CONTINUE_NEEDED, the server returns the generated output_token - to the client in challenge and passes the resulting response to - another call to GSS_Accept_sec_context, repeating the actions in this - paragraph. - - When GSS_Accept_sec_context returns GSS_S_COMPLETE, the client takes - the following actions: If the last call to GSS_Accept_sec_context - returned an output_token, the server returns it to the client in a - challenge and expects a reply from the client with no data. Whether - or not an output_token was returned (and after receipt of any - response from the client to such an output_token), the server then - constructs 4 octets of data, with the first octet containing a bit- - mask specifying the security layers supported by the server and the - second through fourth octets containing in network byte order the - maximum size output_token the server is able to receive. The server - must then pass the plaintext to GSS_Wrap with conf_flag set to FALSE - and issue the generated output_message to the client in a challenge. - The server must then pass the resulting response to GSS_Unwrap and - interpret the first octet of resulting cleartext as the bit-mask for - the selected security layer, the second through fourth octets as the - maximum size output_message to send to the client, and the remaining - - - -Myers Standards Track [Page 10] - -RFC 2222 SASL October 1997 - - - octets as the authorization identity. The server must verify that - the src_name is authorized to authenticate as the authorization - identity. After these verifications, the authentication process is - complete. - -7.2.3 Security layer - - The security layers and their corresponding bit-masks are as follows: - - 1 No security layer - 2 Integrity protection. - Sender calls GSS_Wrap with conf_flag set to FALSE - 4 Privacy protection. - Sender calls GSS_Wrap with conf_flag set to TRUE - - Other bit-masks may be defined in the future; bits which are not - understood must be negotiated off. - -7.3. S/Key mechanism - - The mechanism name associated with S/Key [RFC 1760] using the MD4 - digest algorithm is "SKEY". - - The client sends an initial response with the authorization identity. - - The server then issues a challenge which contains the decimal - sequence number followed by a single space and the seed string for - the indicated authorization identity. The client responds with the - one-time-password, as either a 64-bit value in network byte order or - encoded in the "six English words" format. - - The server must verify the one-time-password. After this - verification, the authentication process is complete. - - S/Key authentication does not provide for any security layers. - - EXAMPLE: The following are two S/Key login scenarios in the IMAP4 - protocol. - - S: * OK IMAP4 Server - C: A001 AUTHENTICATE SKEY - S: + - C: bW9yZ2Fu - S: + OTUgUWE1ODMwOA== - C: Rk9VUiBNQU5OIFNPT04gRklSIFZBUlkgTUFTSA== - S: A001 OK S/Key authentication successful - - - - - -Myers Standards Track [Page 11] - -RFC 2222 SASL October 1997 - - - S: * OK IMAP4 Server - C: A001 AUTHENTICATE SKEY - S: + - C: c21pdGg= - S: + OTUgUWE1ODMwOA== - C: BsAY3g4gBNo= - S: A001 NO S/Key authentication failed - - The following is an S/Key login scenario in an IMAP4-like protocol - which has an optional "initial response" argument to the AUTHENTICATE - command. - - S: * OK IMAP4-Like Server - C: A001 AUTHENTICATE SKEY bW9yZ2Fu - S: + OTUgUWE1ODMwOA== - C: Rk9VUiBNQU5OIFNPT04gRklSIFZBUlkgTUFTSA== - S: A001 OK S/Key authentication successful - -7.4. External mechanism - - The mechanism name associated with external authentication is - "EXTERNAL". - - The client sends an initial response with the authorization identity. - - The server uses information, external to SASL, to determine whether - the client is authorized to authenticate as the authorization - identity. If the client is so authorized, the server indicates - successful completion of the authentication exchange; otherwise the - server indicates failure. - - The system providing this external information may be, for example, - IPsec or TLS. - - If the client sends the empty string as the authorization identity - (thus requesting the authorization identity be derived from the - client's authentication credentials), the authorization identity is - to be derived from authentication credentials which exist in the - system which is providing the external authentication. - - - - - - - - - - - - -Myers Standards Track [Page 12] - -RFC 2222 SASL October 1997 - - -8. References - - [RFC 2060] Crispin, M., "Internet Message Access Protocol - Version - 4rev1", RFC 2060, December 1996. - - [RFC 2078] Linn, J., "Generic Security Service Application Program - Interface, Version 2", RFC 2078, January 1997. - - [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", RFC 2119, March 1997. - - [RFC 2223] Postel, J., and J. Reynolds, "Instructions to RFC - Authors", RFC 2223, October 1997. - - [RFC 1760] Haller, N., "The S/Key One-Time Password System", RFC - 1760, February 1995. - - [RFC 1700] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, - RFC 1700, October 1994. - -9. Security Considerations - - Security issues are discussed throughout this memo. - - The mechanisms that support integrity protection are designed such - that the negotiation of the security layer and authorization identity - is integrity protected. When the client selects a security layer - with at least integrity protection, this protects against an active - attacker hijacking the connection and modifying the authentication - exchange to negotiate a plaintext connection. - - When a server or client supports multiple authentication mechanisms, - each of which has a different security strength, it is possible for - an active attacker to cause a party to use the least secure mechanism - supported. To protect against this sort of attack, a client or - server which supports mechanisms of different strengths should have a - configurable minimum strength that it will use. It is not sufficient - for this minimum strength check to only be on the server, since an - active attacker can change which mechanisms the client sees as being - supported, causing the client to send authentication credentials for - its weakest supported mechanism. - - - - - - - - - - -Myers Standards Track [Page 13] - -RFC 2222 SASL October 1997 - - - The client's selection of a SASL mechanism is done in the clear and - may be modified by an active attacker. It is important for any new - SASL mechanisms to be designed such that an active attacker cannot - obtain an authentication with weaker security properties by modifying - the SASL mechanism name and/or the challenges and responses. - - Any protocol interactions prior to authentication are performed in - the clear and may be modified by an active attacker. In the case - where a client selects integrity protection, it is important that any - security-sensitive protocol negotiations be performed after - authentication is complete. Protocols should be designed such that - negotiations performed prior to authentication should be either - ignored or revalidated once authentication is complete. - -10. Author's Address - - John G. Myers - Netscape Communications - 501 E. Middlefield Road - Mail Stop MV-029 - Mountain View, CA 94043-4042 - - EMail: jgmyers@netscape.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Myers Standards Track [Page 14] - -RFC 2222 SASL October 1997 - - -Appendix A. Relation of SASL to Transport Security - - Questions have been raised about the relationship between SASL and - various services (such as IPsec and TLS) which provide a secured - connection. - - Two of the key features of SASL are: - - 1. The separation of the authorization identity from the identity in - the client's credentials. This permits agents such as proxy - servers to authenticate using their own credentials, yet request - the access privileges of the identity for which they are proxying. - - 2. Upon successful completion of an authentication exchange, the - server knows the authorization identity the client wishes to use. - This allows servers to move to a "user is authenticated" state in - the protocol. - - These features are extremely important to some application protocols, - yet Transport Security services do not always provide them. To - define SASL mechanisms based on these services would be a very messy - task, as the framing of these services would be redundant with the - framing of SASL and some method of providing these important SASL - features would have to be devised. - - Sometimes it is desired to enable within an existing connection the - use of a security service which does not fit the SASL model. (TLS is - an example of such a service.) This can be done by adding a command, - for example "STARTTLS", to the protocol. Such a command is outside - the scope of SASL, and should be different from the command which - starts a SASL authentication protocol exchange. - - In certain situations, it is reasonable to use SASL underneath one of - these Transport Security services. The transport service would - secure the connection, either service would authenticate the client, - and SASL would negotiate the authorization identity. The SASL - negotiation would be what moves the protocol from "unauthenticated" - to "authenticated" state. The "EXTERNAL" SASL mechanism is - explicitly intended to handle the case where the transport service - secures the connection and authenticates the client and SASL - negotiates the authorization identity. - - When using SASL underneath a sufficiently strong Transport Security - service, a SASL security layer would most likely be redundant. The - client and server would thus probably want to negotiate off the use - of a SASL security layer. - - - - - -Myers Standards Track [Page 15] - -RFC 2222 SASL October 1997 - - -Full Copyright Statement - - Copyright (C) The Internet Society (1997). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implmentation may be prepared, copied, published - andand distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - - - - - - - - - - - - - - - - - - - - - - - - -Myers Standards Track [Page 16] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2231.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2231.txt deleted file mode 100644 index 120f98f8..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2231.txt +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - -Network Working Group N. Freed -Request for Comments: 2231 Innosoft -Updates: 2045, 2047, 2183 K. Moore -Obsoletes: 2184 University of Tennessee -Category: Standards Track November 1997 - - - MIME Parameter Value and Encoded Word Extensions: - Character Sets, Languages, and Continuations - - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (1997). All Rights Reserved. - -1. Abstract - - This memo defines extensions to the RFC 2045 media type and RFC 2183 - disposition parameter value mechanisms to provide - - (1) a means to specify parameter values in character sets - other than US-ASCII, - - (2) to specify the language to be used should the value be - displayed, and - - (3) a continuation mechanism for long parameter values to - avoid problems with header line wrapping. - - This memo also defines an extension to the encoded words defined in - RFC 2047 to allow the specification of the language to be used for - display as well as the character set. - -2. Introduction - - The Multipurpose Internet Mail Extensions, or MIME [RFC-2045, RFC- - 2046, RFC-2047, RFC-2048, RFC-2049], define a message format that - allows for: - - - - - -Freed & Moore Standards Track [Page 1] - -RFC 2231 MIME Value and Encoded Word Extensions November 1997 - - - (1) textual message bodies in character sets other than - US-ASCII, - - (2) non-textual message bodies, - - (3) multi-part message bodies, and - - (4) textual header information in character sets other than - US-ASCII. - - MIME is now widely deployed and is used by a variety of Internet - protocols, including, of course, Internet email. However, MIME's - success has resulted in the need for additional mechanisms that were - not provided in the original protocol specification. - - In particular, existing MIME mechanisms provide for named media type - (content-type field) parameters as well as named disposition - (content-disposition field). A MIME media type may specify any - number of parameters associated with all of its subtypes, and any - specific subtype may specify additional parameters for its own use. A - MIME disposition value may specify any number of associated - parameters, the most important of which is probably the attachment - disposition's filename parameter. - - These parameter names and values end up appearing in the content-type - and content-disposition header fields in Internet email. This - inherently imposes three crucial limitations: - - (1) Lines in Internet email header fields are folded - according to RFC 822 folding rules. This makes long - parameter values problematic. - - (2) MIME headers, like the RFC 822 headers they often - appear in, are limited to 7bit US-ASCII, and the - encoded-word mechanisms of RFC 2047 are not available - to parameter values. This makes it impossible to have - parameter values in character sets other than US-ASCII - without specifying some sort of private per-parameter - encoding. - - (3) It has recently become clear that character set - information is not sufficient to properly display some - sorts of information -- language information is also - needed [RFC-2130]. For example, support for - handicapped users may require reading text string - - - - - - -Freed & Moore Standards Track [Page 2] - -RFC 2231 MIME Value and Encoded Word Extensions November 1997 - - - aloud. The language the text is written in is needed - for this to be done correctly. Some parameter values - may need to be displayed, hence there is a need to - allow for the inclusion of language information. - - The last problem on this list is also an issue for the encoded words - defined by RFC 2047, as encoded words are intended primarily for - display purposes. - - This document defines extensions that address all of these - limitations. All of these extensions are implemented in a fashion - that is completely compatible at a syntactic level with existing MIME - implementations. In addition, the extensions are designed to have as - little impact as possible on existing uses of MIME. - - IMPORTANT NOTE: These mechanisms end up being somewhat gibbous when - they actually are used. As such, these mechanisms should not be used - lightly; they should be reserved for situations where a real need for - them exists. - -2.1. Requirements notation - - This document occasionally uses terms that appear in capital letters. - When the terms "MUST", "SHOULD", "MUST NOT", "SHOULD NOT", and "MAY" - appear capitalized, they are being used to indicate particular - requirements of this specification. A discussion of the meanings of - these terms appears in [RFC- 2119]. - -3. Parameter Value Continuations - - Long MIME media type or disposition parameter values do not interact - well with header line wrapping conventions. In particular, proper - header line wrapping depends on there being places where linear - whitespace (LWSP) is allowed, which may or may not be present in a - parameter value, and even if present may not be recognizable as such - since specific knowledge of parameter value syntax may not be - available to the agent doing the line wrapping. The result is that - long parameter values may end up getting truncated or otherwise - damaged by incorrect line wrapping implementations. - - A mechanism is therefore needed to break up parameter values into - smaller units that are amenable to line wrapping. Any such mechanism - MUST be compatible with existing MIME processors. This means that - - (1) the mechanism MUST NOT change the syntax of MIME media - type and disposition lines, and - - - - - -Freed & Moore Standards Track [Page 3] - -RFC 2231 MIME Value and Encoded Word Extensions November 1997 - - - (2) the mechanism MUST NOT depend on parameter ordering - since MIME states that parameters are not order - sensitive. Note that while MIME does prohibit - modification of MIME headers during transport, it is - still possible that parameters will be reordered when - user agent level processing is done. - - The obvious solution, then, is to use multiple parameters to contain - a single parameter value and to use some kind of distinguished name - to indicate when this is being done. And this obvious solution is - exactly what is specified here: The asterisk character ("*") followed - by a decimal count is employed to indicate that multiple parameters - are being used to encapsulate a single parameter value. The count - starts at 0 and increments by 1 for each subsequent section of the - parameter value. Decimal values are used and neither leading zeroes - nor gaps in the sequence are allowed. - - The original parameter value is recovered by concatenating the - various sections of the parameter, in order. For example, the - content-type field - - Content-Type: message/external-body; access-type=URL; - URL*0="ftp://"; - URL*1="cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar" - - is semantically identical to - - Content-Type: message/external-body; access-type=URL; - URL="ftp://cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar" - - Note that quotes around parameter values are part of the value - syntax; they are NOT part of the value itself. Furthermore, it is - explicitly permitted to have a mixture of quoted and unquoted - continuation fields. - -4. Parameter Value Character Set and Language Information - - Some parameter values may need to be qualified with character set or - language information. It is clear that a distinguished parameter - name is needed to identify when this information is present along - with a specific syntax for the information in the value itself. In - addition, a lightweight encoding mechanism is needed to accommodate 8 - bit information in parameter values. - - - - - - - - -Freed & Moore Standards Track [Page 4] - -RFC 2231 MIME Value and Encoded Word Extensions November 1997 - - - Asterisks ("*") are reused to provide the indicator that language and - character set information is present and encoding is being used. A - single quote ("'") is used to delimit the character set and language - information at the beginning of the parameter value. Percent signs - ("%") are used as the encoding flag, which agrees with RFC 2047. - - Specifically, an asterisk at the end of a parameter name acts as an - indicator that character set and language information may appear at - the beginning of the parameter value. A single quote is used to - separate the character set, language, and actual value information in - the parameter value string, and an percent sign is used to flag - octets encoded in hexadecimal. For example: - - Content-Type: application/x-stuff; - title*=us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A - - Note that it is perfectly permissible to leave either the character - set or language field blank. Note also that the single quote - delimiters MUST be present even when one of the field values is - omitted. This is done when either character set, language, or both - are not relevant to the parameter value at hand. This MUST NOT be - done in order to indicate a default character set or language -- - parameter field definitions MUST NOT assign a default character set - or language. - -4.1. Combining Character Set, Language, and Parameter Continuations - - Character set and language information may be combined with the - parameter continuation mechanism. For example: - - Content-Type: application/x-stuff - title*0*=us-ascii'en'This%20is%20even%20more%20 - title*1*=%2A%2A%2Afun%2A%2A%2A%20 - title*2="isn't it!" - - Note that: - - (1) Language and character set information only appear at - the beginning of a given parameter value. - - (2) Continuations do not provide a facility for using more - than one character set or language in the same - parameter value. - - (3) A value presented using multiple continuations may - contain a mixture of encoded and unencoded segments. - - - - - -Freed & Moore Standards Track [Page 5] - -RFC 2231 MIME Value and Encoded Word Extensions November 1997 - - - (4) The first segment of a continuation MUST be encoded if - language and character set information are given. - - (5) If the first segment of a continued parameter value is - encoded the language and character set field delimiters - MUST be present even when the fields are left blank. - -5. Language specification in Encoded Words - - RFC 2047 provides support for non-US-ASCII character sets in RFC 822 - message header comments, phrases, and any unstructured text field. - This is done by defining an encoded word construct which can appear - in any of these places. Given that these are fields intended for - display, it is sometimes necessary to associate language information - with encoded words as well as just the character set. This - specification extends the definition of an encoded word to allow the - inclusion of such information. This is simply done by suffixing the - character set specification with an asterisk followed by the language - tag. For example: - - From: =?US-ASCII*EN?Q?Keith_Moore?= - -6. IMAP4 Handling of Parameter Values - - IMAP4 [RFC-2060] servers SHOULD decode parameter value continuations - when generating the BODY and BODYSTRUCTURE fetch attributes. - -7. Modifications to MIME ABNF - - The ABNF for MIME parameter values given in RFC 2045 is: - - parameter := attribute "=" value - - attribute := token - ; Matching of attributes - ; is ALWAYS case-insensitive. - - This specification changes this ABNF to: - - parameter := regular-parameter / extended-parameter - - regular-parameter := regular-parameter-name "=" value - - regular-parameter-name := attribute [section] - - attribute := 1*attribute-char - - - - - -Freed & Moore Standards Track [Page 6] - -RFC 2231 MIME Value and Encoded Word Extensions November 1997 - - - attribute-char := - - section := initial-section / other-sections - - initial-section := "*0" - - other-sections := "*" ("1" / "2" / "3" / "4" / "5" / - "6" / "7" / "8" / "9") *DIGIT) - - extended-parameter := (extended-initial-name "=" - extended-value) / - (extended-other-names "=" - extended-other-values) - - extended-initial-name := attribute [initial-section] "*" - - extended-other-names := attribute other-sections "*" - - extended-initial-value := [charset] "'" [language] "'" - extended-other-values - - extended-other-values := *(ext-octet / attribute-char) - - ext-octet := "%" 2(DIGIT / "A" / "B" / "C" / "D" / "E" / "F") - - charset := - - language := - - The ABNF given in RFC 2047 for encoded-words is: - - encoded-word := "=?" charset "?" encoding "?" encoded-text "?=" - - This specification changes this ABNF to: - - encoded-word := "=?" charset ["*" language] "?" encoded-text "?=" - -8. Character sets which allow specification of language - - In the future it is likely that some character sets will provide - facilities for inline language labeling. Such facilities are - inherently more flexible than those defined here as they allow for - language switching in the middle of a string. - - - - - - - -Freed & Moore Standards Track [Page 7] - -RFC 2231 MIME Value and Encoded Word Extensions November 1997 - - - If and when such facilities are developed they SHOULD be used in - preference to the language labeling facilities specified here. Note - that all the mechanisms defined here allow for the omission of - language labels so as to be able to accommodate this possible future - usage. - -9. Security Considerations - - This RFC does not discuss security issues and is not believed to - raise any security issues not already endemic in electronic mail and - present in fully conforming implementations of MIME. - -10. References - - [RFC-822] - Crocker, D., "Standard for the Format of ARPA Internet - Text Messages", STD 11, RFC 822 August 1982. - - [RFC-1766] - Alvestrand, H., "Tags for the Identification of - Languages", RFC 1766, March 1995. - - [RFC-2045] - Freed, N., and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part One: Format of Internet Message - Bodies", RFC 2045, December 1996. - - [RFC-2046] - Freed, N. and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part Two: Media Types", RFC 2046, - December 1996. - - [RFC-2047] - Moore, K., "Multipurpose Internet Mail Extensions (MIME) - Part Three: Representation of Non-ASCII Text in Internet - Message Headers", RFC 2047, December 1996. - - [RFC-2048] - Freed, N., Klensin, J. and J. Postel, "Multipurpose - Internet Mail Extensions (MIME) Part Four: MIME - Registration Procedures", RFC 2048, December 1996. - - [RFC-2049] - Freed, N. and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part Five: Conformance Criteria and - Examples", RFC 2049, December 1996. - - - - - -Freed & Moore Standards Track [Page 8] - -RFC 2231 MIME Value and Encoded Word Extensions November 1997 - - - [RFC-2060] - Crispin, M., "Internet Message Access Protocol - Version - 4rev1", RFC 2060, December 1996. - - [RFC-2119] - Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", RFC 2119, March 1997. - - [RFC-2130] - Weider, C., Preston, C., Simonsen, K., Alvestrand, H., - Atkinson, R., Crispin, M., and P. Svanberg, "Report from the - IAB Character Set Workshop", RFC 2130, April 1997. - - [RFC-2183] - Troost, R., Dorner, S. and K. Moore, "Communicating - Presentation Information in Internet Messages: The - Content-Disposition Header", RFC 2183, August 1997. - -11. Authors' Addresses - - Ned Freed - Innosoft International, Inc. - 1050 Lakes Drive - West Covina, CA 91790 - USA - - Phone: +1 626 919 3600 - Fax: +1 626 919 3614 - EMail: ned.freed@innosoft.com - - - Keith Moore - Computer Science Dept. - University of Tennessee - 107 Ayres Hall - Knoxville, TN 37996-1301 - USA - - EMail: moore@cs.utk.edu - - - - - - - - - - - - -Freed & Moore Standards Track [Page 9] - -RFC 2231 MIME Value and Encoded Word Extensions November 1997 - - -12. Full Copyright Statement - - Copyright (C) The Internet Society (1997). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - - - - - - - - - - - - - - - - - - - - - - - - -Freed & Moore Standards Track [Page 10] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2234.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2234.txt deleted file mode 100644 index edea302f..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2234.txt +++ /dev/null @@ -1,787 +0,0 @@ - - - - - - -Network Working Group D. Crocker, Ed. -Request for Comments: 2234 Internet Mail Consortium -Category: Standards Track P. Overell - Demon Internet Ltd. - November 1997 - - - Augmented BNF for Syntax Specifications: ABNF - - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (1997). All Rights Reserved. - -TABLE OF CONTENTS - - 1. INTRODUCTION .................................................. 2 - - 2. RULE DEFINITION ............................................... 2 - 2.1 RULE NAMING .................................................. 2 - 2.2 RULE FORM .................................................... 3 - 2.3 TERMINAL VALUES .............................................. 3 - 2.4 EXTERNAL ENCODINGS ........................................... 5 - - 3. OPERATORS ..................................................... 5 - 3.1 CONCATENATION RULE1 RULE2 ............................. 5 - 3.2 ALTERNATIVES RULE1 / RULE2 ................................... 6 - 3.3 INCREMENTAL ALTERNATIVES RULE1 =/ RULE2 .................... 6 - 3.4 VALUE RANGE ALTERNATIVES %C##-## ........................... 7 - 3.5 SEQUENCE GROUP (RULE1 RULE2) ................................. 7 - 3.6 VARIABLE REPETITION *RULE .................................... 8 - 3.7 SPECIFIC REPETITION NRULE .................................... 8 - 3.8 OPTIONAL SEQUENCE [RULE] ..................................... 8 - 3.9 ; COMMENT .................................................... 8 - 3.10 OPERATOR PRECEDENCE ......................................... 9 - - 4. ABNF DEFINITION OF ABNF ....................................... 9 - - 5. SECURITY CONSIDERATIONS ....................................... 10 - - - - -Crocker & Overell Standards Track [Page 1] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - - 6. APPENDIX A - CORE ............................................. 11 - 6.1 CORE RULES ................................................... 11 - 6.2 COMMON ENCODING .............................................. 12 - - 7. ACKNOWLEDGMENTS ............................................... 12 - - 8. REFERENCES .................................................... 13 - - 9. CONTACT ....................................................... 13 - - 10. FULL COPYRIGHT STATEMENT ..................................... 14 - -1. INTRODUCTION - - Internet technical specifications often need to define a format - syntax and are free to employ whatever notation their authors deem - useful. Over the years, a modified version of Backus-Naur Form - (BNF), called Augmented BNF (ABNF), has been popular among many - Internet specifications. It balances compactness and simplicity, - with reasonable representational power. In the early days of the - Arpanet, each specification contained its own definition of ABNF. - This included the email specifications, RFC733 and then RFC822 which - have come to be the common citations for defining ABNF. The current - document separates out that definition, to permit selective - reference. Predictably, it also provides some modifications and - enhancements. - - The differences between standard BNF and ABNF involve naming rules, - repetition, alternatives, order-independence, and value ranges. - Appendix A (Core) supplies rule definitions and encoding for a core - lexical analyzer of the type common to several Internet - specifications. It is provided as a convenience and is otherwise - separate from the meta language defined in the body of this document, - and separate from its formal status. - -2. RULE DEFINITION - -2.1 Rule Naming - - The name of a rule is simply the name itself; that is, a sequence of - characters, beginning with an alphabetic character, and followed by - a combination of alphabetics, digits and hyphens (dashes). - - NOTE: Rule names are case-insensitive - - The names , , and all refer - to the same rule. - - - - -Crocker & Overell Standards Track [Page 2] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - - Unlike original BNF, angle brackets ("<", ">") are not required. - However, angle brackets may be used around a rule name whenever their - presence will facilitate discerning the use of a rule name. This is - typically restricted to rule name references in free-form prose, or - to distinguish partial rules that combine into a string not separated - by white space, such as shown in the discussion about repetition, - below. - -2.2 Rule Form - - A rule is defined by the following sequence: - - name = elements crlf - - where is the name of the rule, is one or more rule - names or terminal specifications and is the end-of- line - indicator, carriage return followed by line feed. The equal sign - separates the name from the definition of the rule. The elements - form a sequence of one or more rule names and/or value definitions, - combined according to the various operators, defined in this - document, such as alternative and repetition. - - For visual ease, rule definitions are left aligned. When a rule - requires multiple lines, the continuation lines are indented. The - left alignment and indentation are relative to the first lines of the - ABNF rules and need not match the left margin of the document. - -2.3 Terminal Values - - Rules resolve into a string of terminal values, sometimes called - characters. In ABNF a character is merely a non-negative integer. - In certain contexts a specific mapping (encoding) of values into a - character set (such as ASCII) will be specified. - - Terminals are specified by one or more numeric characters with the - base interpretation of those characters indicated explicitly. The - following bases are currently defined: - - b = binary - - d = decimal - - x = hexadecimal - - - - - - - - -Crocker & Overell Standards Track [Page 3] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - - Hence: - - CR = %d13 - - CR = %x0D - - respectively specify the decimal and hexadecimal representation of - [US-ASCII] for carriage return. - - A concatenated string of such values is specified compactly, using a - period (".") to indicate separation of characters within that value. - Hence: - - CRLF = %d13.10 - - ABNF permits specifying literal text string directly, enclosed in - quotation-marks. Hence: - - command = "command string" - - Literal text strings are interpreted as a concatenated set of - printable characters. - - NOTE: ABNF strings are case-insensitive and - the character set for these strings is us-ascii. - - Hence: - - rulename = "abc" - - and: - - rulename = "aBc" - - will match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC" and "ABC". - - To specify a rule which IS case SENSITIVE, - specify the characters individually. - - For example: - - rulename = %d97 %d98 %d99 - - or - - rulename = %d97.98.99 - - - - - -Crocker & Overell Standards Track [Page 4] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - - will match only the string which comprises only lowercased - characters, abc. - -2.4 External Encodings - - External representations of terminal value characters will vary - according to constraints in the storage or transmission environment. - Hence, the same ABNF-based grammar may have multiple external - encodings, such as one for a 7-bit US-ASCII environment, another for - a binary octet environment and still a different one when 16-bit - Unicode is used. Encoding details are beyond the scope of ABNF, - although Appendix A (Core) provides definitions for a 7-bit US-ASCII - environment as has been common to much of the Internet. - - By separating external encoding from the syntax, it is intended that - alternate encoding environments can be used for the same syntax. - -3. OPERATORS - -3.1 Concatenation Rule1 Rule2 - - A rule can define a simple, ordered string of values -- i.e., a - concatenation of contiguous characters -- by listing a sequence of - rule names. For example: - - foo = %x61 ; a - - bar = %x62 ; b - - mumble = foo bar foo - - So that the rule matches the lowercase string "aba". - - LINEAR WHITE SPACE: Concatenation is at the core of the ABNF - parsing model. A string of contiguous characters (values) is - parsed according to the rules defined in ABNF. For Internet - specifications, there is some history of permitting linear white - space (space and horizontal tab) to be freelyPand - implicitlyPinterspersed around major constructs, such as - delimiting special characters or atomic strings. - - NOTE: This specification for ABNF does not - provide for implicit specification of linear white - space. - - Any grammar which wishes to permit linear white space around - delimiters or string segments must specify it explicitly. It is - often useful to provide for such white space in "core" rules that are - - - -Crocker & Overell Standards Track [Page 5] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - - then used variously among higher-level rules. The "core" rules might - be formed into a lexical analyzer or simply be part of the main - ruleset. - -3.2 Alternatives Rule1 / Rule2 - - Elements separated by forward slash ("/") are alternatives. - Therefore, - - foo / bar - - will accept or . - - NOTE: A quoted string containing alphabetic - characters is special form for specifying alternative - characters and is interpreted as a non-terminal - representing the set of combinatorial strings with the - contained characters, in the specified order but with - any mixture of upper and lower case.. - -3.3 Incremental Alternatives Rule1 =/ Rule2 - - It is sometimes convenient to specify a list of alternatives in - fragments. That is, an initial rule may match one or more - alternatives, with later rule definitions adding to the set of - alternatives. This is particularly useful for otherwise- independent - specifications which derive from the same parent rule set, such as - often occurs with parameter lists. ABNF permits this incremental - definition through the construct: - - oldrule =/ additional-alternatives - - So that the rule set - - ruleset = alt1 / alt2 - - ruleset =/ alt3 - - ruleset =/ alt4 / alt5 - - is the same as specifying - - ruleset = alt1 / alt2 / alt3 / alt4 / alt5 - - - - - - - - -Crocker & Overell Standards Track [Page 6] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - -3.4 Value Range Alternatives %c##-## - - A range of alternative numeric values can be specified compactly, - using dash ("-") to indicate the range of alternative values. Hence: - - DIGIT = %x30-39 - - is equivalent to: - - DIGIT = "0" / "1" / "2" / "3" / "4" / "5" / "6" / - - "7" / "8" / "9" - - Concatenated numeric values and numeric value ranges can not be - specified in the same string. A numeric value may use the dotted - notation for concatenation or it may use the dash notation to specify - one value range. Hence, to specify one printable character, between - end of line sequences, the specification could be: - - char-line = %x0D.0A %x20-7E %x0D.0A - -3.5 Sequence Group (Rule1 Rule2) - - Elements enclosed in parentheses are treated as a single element, - whose contents are STRICTLY ORDERED. Thus, - - elem (foo / bar) blat - - which matches (elem foo blat) or (elem bar blat). - - elem foo / bar blat - - matches (elem foo) or (bar blat). - - NOTE: It is strongly advised to use grouping - notation, rather than to rely on proper reading of - "bare" alternations, when alternatives consist of - multiple rule names or literals. - - Hence it is recommended that instead of the above form, the form: - - (elem foo) / (bar blat) - - be used. It will avoid misinterpretation by casual readers. - - The sequence group notation is also used within free text to set off - an element sequence from the prose. - - - - -Crocker & Overell Standards Track [Page 7] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - -3.6 Variable Repetition *Rule - - The operator "*" preceding an element indicates repetition. The full - form is: - - *element - - where and are optional decimal values, indicating at least - and at most occurrences of element. - - Default values are 0 and infinity so that * allows any - number, including zero; 1* requires at least one; - 3*3 allows exactly 3 and 1*2 allows one or two. - -3.7 Specific Repetition nRule - - A rule of the form: - - element - - is equivalent to - - *element - - That is, exactly occurrences of . Thus 2DIGIT is a - 2-digit number, and 3ALPHA is a string of three alphabetic - characters. - -3.8 Optional Sequence [RULE] - - Square brackets enclose an optional element sequence: - - [foo bar] - - is equivalent to - - *1(foo bar). - -3.9 ; Comment - - A semi-colon starts a comment that continues to the end of line. - This is a simple way of including useful notes in parallel with the - specifications. - - - - - - - - -Crocker & Overell Standards Track [Page 8] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - -3.10 Operator Precedence - - The various mechanisms described above have the following precedence, - from highest (binding tightest) at the top, to lowest and loosest at - the bottom: - - Strings, Names formation - Comment - Value range - Repetition - Grouping, Optional - Concatenation - Alternative - - Use of the alternative operator, freely mixed with concatenations can - be confusing. - - Again, it is recommended that the grouping operator be used to - make explicit concatenation groups. - -4. ABNF DEFINITION OF ABNF - - This syntax uses the rules provided in Appendix A (Core). - - rulelist = 1*( rule / (*c-wsp c-nl) ) - - rule = rulename defined-as elements c-nl - ; continues if next line starts - ; with white space - - rulename = ALPHA *(ALPHA / DIGIT / "-") - - defined-as = *c-wsp ("=" / "=/") *c-wsp - ; basic rules definition and - ; incremental alternatives - - elements = alternation *c-wsp - - c-wsp = WSP / (c-nl WSP) - - c-nl = comment / CRLF - ; comment or newline - - comment = ";" *(WSP / VCHAR) CRLF - - alternation = concatenation - *(*c-wsp "/" *c-wsp concatenation) - - - - -Crocker & Overell Standards Track [Page 9] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - - concatenation = repetition *(1*c-wsp repetition) - - repetition = [repeat] element - - repeat = 1*DIGIT / (*DIGIT "*" *DIGIT) - - element = rulename / group / option / - char-val / num-val / prose-val - - group = "(" *c-wsp alternation *c-wsp ")" - - option = "[" *c-wsp alternation *c-wsp "]" - - char-val = DQUOTE *(%x20-21 / %x23-7E) DQUOTE - ; quoted string of SP and VCHAR - without DQUOTE - - num-val = "%" (bin-val / dec-val / hex-val) - - bin-val = "b" 1*BIT - [ 1*("." 1*BIT) / ("-" 1*BIT) ] - ; series of concatenated bit values - ; or single ONEOF range - - dec-val = "d" 1*DIGIT - [ 1*("." 1*DIGIT) / ("-" 1*DIGIT) ] - - hex-val = "x" 1*HEXDIG - [ 1*("." 1*HEXDIG) / ("-" 1*HEXDIG) ] - - prose-val = "<" *(%x20-3D / %x3F-7E) ">" - ; bracketed string of SP and VCHAR - without angles - ; prose description, to be used as - last resort - - -5. SECURITY CONSIDERATIONS - - Security is truly believed to be irrelevant to this document. - - - - - - - - - - - -Crocker & Overell Standards Track [Page 10] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - -6. APPENDIX A - CORE - - This Appendix is provided as a convenient core for specific grammars. - The definitions may be used as a core set of rules. - -6.1 Core Rules - - Certain basic rules are in uppercase, such as SP, HTAB, CRLF, - DIGIT, ALPHA, etc. - - ALPHA = %x41-5A / %x61-7A ; A-Z / a-z - - BIT = "0" / "1" - - CHAR = %x01-7F - ; any 7-bit US-ASCII character, - excluding NUL - - CR = %x0D - ; carriage return - - CRLF = CR LF - ; Internet standard newline - - CTL = %x00-1F / %x7F - ; controls - - DIGIT = %x30-39 - ; 0-9 - - DQUOTE = %x22 - ; " (Double Quote) - - HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" - - HTAB = %x09 - ; horizontal tab - - LF = %x0A - ; linefeed - - LWSP = *(WSP / CRLF WSP) - ; linear white space (past newline) - - OCTET = %x00-FF - ; 8 bits of data - - SP = %x20 - - - -Crocker & Overell Standards Track [Page 11] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - - ; space - - VCHAR = %x21-7E - ; visible (printing) characters - - WSP = SP / HTAB - ; white space - -6.2 Common Encoding - - Externally, data are represented as "network virtual ASCII", namely - 7-bit US-ASCII in an 8-bit field, with the high (8th) bit set to - zero. A string of values is in "network byte order" with the - higher-valued bytes represented on the left-hand side and being sent - over the network first. - -7. ACKNOWLEDGMENTS - - The syntax for ABNF was originally specified in RFC 733. Ken L. - Harrenstien, of SRI International, was responsible for re-coding the - BNF into an augmented BNF that makes the representation smaller and - easier to understand. - - This recent project began as a simple effort to cull out the portion - of RFC 822 which has been repeatedly cited by non-email specification - writers, namely the description of augmented BNF. Rather than simply - and blindly converting the existing text into a separate document, - the working group chose to give careful consideration to the - deficiencies, as well as benefits, of the existing specification and - related specifications available over the last 15 years and therefore - to pursue enhancement. This turned the project into something rather - more ambitious than first intended. Interestingly the result is not - massively different from that original, although decisions such as - removing the list notation came as a surprise. - - The current round of specification was part of the DRUMS working - group, with significant contributions from Jerome Abela , Harald - Alvestrand, Robert Elz, Roger Fajman, Aviva Garrett, Tom Harsch, Dan - Kohn, Bill McQuillan, Keith Moore, Chris Newman , Pete Resnick and - Henning Schulzrinne. - - - - - - - - - - - -Crocker & Overell Standards Track [Page 12] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - -8. REFERENCES - - [US-ASCII] Coded Character Set--7-Bit American Standard Code for - Information Interchange, ANSI X3.4-1986. - - [RFC733] Crocker, D., Vittal, J., Pogran, K., and D. Henderson, - "Standard for the Format of ARPA Network Text Message," RFC 733, - November 1977. - - [RFC822] Crocker, D., "Standard for the Format of ARPA Internet Text - Messages", STD 11, RFC 822, August 1982. - -9. CONTACT - - David H. Crocker Paul Overell - - Internet Mail Consortium Demon Internet Ltd - 675 Spruce Dr. Dorking Business Park - Sunnyvale, CA 94086 USA Dorking - Surrey, RH4 1HN - UK - - Phone: +1 408 246 8253 - Fax: +1 408 249 6205 - EMail: dcrocker@imc.org paulo@turnpike.com - - - - - - - - - - - - - - - - - - - - - - - - - - -Crocker & Overell Standards Track [Page 13] - -RFC 2234 ABNF for Syntax Specifications November 1997 - - -10. Full Copyright Statement - - Copyright (C) The Internet Society (1997). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - - - - - - - - - - - - - - - - - - - - - - - - -Crocker & Overell Standards Track [Page 14] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2440.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2440.txt deleted file mode 100644 index 902ecee4..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2440.txt +++ /dev/null @@ -1,3642 +0,0 @@ - - - - - -Network Working Group J. Callas -Request for Comments: 2440 Network Associates -Category: Standards Track L. Donnerhacke - IN-Root-CA Individual Network e.V. - H. Finney - Network Associates - R. Thayer - EIS Corporation - November 1998 - - - OpenPGP Message Format - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (1998). All Rights Reserved. - -IESG Note - - This document defines many tag values, yet it doesn't describe a - mechanism for adding new tags (for new features). Traditionally the - Internet Assigned Numbers Authority (IANA) handles the allocation of - new values for future expansion and RFCs usually define the procedure - to be used by the IANA. However, there are subtle (and not so - subtle) interactions that may occur in this protocol between new - features and existing features which result in a significant - reduction in over all security. Therefore, this document does not - define an extension procedure. Instead requests to define new tag - values (say for new encryption algorithms for example) should be - forwarded to the IESG Security Area Directors for consideration or - forwarding to the appropriate IETF Working Group for consideration. - -Abstract - - This document is maintained in order to publish all necessary - information needed to develop interoperable applications based on the - OpenPGP format. It is not a step-by-step cookbook for writing an - application. It describes only the format and methods needed to read, - check, generate, and write conforming packets crossing any network. - It does not deal with storage and implementation questions. It does, - - - -Callas, et. al. Standards Track [Page 1] - -RFC 2440 OpenPGP Message Format November 1998 - - - however, discuss implementation issues necessary to avoid security - flaws. - - Open-PGP software uses a combination of strong public-key and - symmetric cryptography to provide security services for electronic - communications and data storage. These services include - confidentiality, key management, authentication, and digital - signatures. This document specifies the message formats used in - OpenPGP. - -Table of Contents - - Status of this Memo 1 - IESG Note 1 - Abstract 1 - Table of Contents 2 - 1. Introduction 4 - 1.1. Terms 5 - 2. General functions 5 - 2.1. Confidentiality via Encryption 5 - 2.2. Authentication via Digital signature 6 - 2.3. Compression 7 - 2.4. Conversion to Radix-64 7 - 2.5. Signature-Only Applications 7 - 3. Data Element Formats 7 - 3.1. Scalar numbers 8 - 3.2. Multi-Precision Integers 8 - 3.3. Key IDs 8 - 3.4. Text 8 - 3.5. Time fields 9 - 3.6. String-to-key (S2K) specifiers 9 - 3.6.1. String-to-key (S2k) specifier types 9 - 3.6.1.1. Simple S2K 9 - 3.6.1.2. Salted S2K 10 - 3.6.1.3. Iterated and Salted S2K 10 - 3.6.2. String-to-key usage 11 - 3.6.2.1. Secret key encryption 11 - 3.6.2.2. Symmetric-key message encryption 11 - 4. Packet Syntax 12 - 4.1. Overview 12 - 4.2. Packet Headers 12 - 4.2.1. Old-Format Packet Lengths 13 - 4.2.2. New-Format Packet Lengths 13 - 4.2.2.1. One-Octet Lengths 14 - 4.2.2.2. Two-Octet Lengths 14 - 4.2.2.3. Five-Octet Lengths 14 - 4.2.2.4. Partial Body Lengths 14 - 4.2.3. Packet Length Examples 14 - - - -Callas, et. al. Standards Track [Page 2] - -RFC 2440 OpenPGP Message Format November 1998 - - - 4.3. Packet Tags 15 - 5. Packet Types 16 - 5.1. Public-Key Encrypted Session Key Packets (Tag 1) 16 - 5.2. Signature Packet (Tag 2) 17 - 5.2.1. Signature Types 17 - 5.2.2. Version 3 Signature Packet Format 19 - 5.2.3. Version 4 Signature Packet Format 21 - 5.2.3.1. Signature Subpacket Specification 22 - 5.2.3.2. Signature Subpacket Types 24 - 5.2.3.3. Signature creation time 25 - 5.2.3.4. Issuer 25 - 5.2.3.5. Key expiration time 25 - 5.2.3.6. Preferred symmetric algorithms 25 - 5.2.3.7. Preferred hash algorithms 25 - 5.2.3.8. Preferred compression algorithms 26 - 5.2.3.9. Signature expiration time 26 - 5.2.3.10.Exportable Certification 26 - 5.2.3.11.Revocable 27 - 5.2.3.12.Trust signature 27 - 5.2.3.13.Regular expression 27 - 5.2.3.14.Revocation key 27 - 5.2.3.15.Notation Data 28 - 5.2.3.16.Key server preferences 28 - 5.2.3.17.Preferred key server 29 - 5.2.3.18.Primary user id 29 - 5.2.3.19.Policy URL 29 - 5.2.3.20.Key Flags 29 - 5.2.3.21.Signer's User ID 30 - 5.2.3.22.Reason for Revocation 30 - 5.2.4. Computing Signatures 31 - 5.2.4.1. Subpacket Hints 32 - 5.3. Symmetric-Key Encrypted Session-Key Packets (Tag 3) 32 - 5.4. One-Pass Signature Packets (Tag 4) 33 - 5.5. Key Material Packet 34 - 5.5.1. Key Packet Variants 34 - 5.5.1.1. Public Key Packet (Tag 6) 34 - 5.5.1.2. Public Subkey Packet (Tag 14) 34 - 5.5.1.3. Secret Key Packet (Tag 5) 35 - 5.5.1.4. Secret Subkey Packet (Tag 7) 35 - 5.5.2. Public Key Packet Formats 35 - 5.5.3. Secret Key Packet Formats 37 - 5.6. Compressed Data Packet (Tag 8) 38 - 5.7. Symmetrically Encrypted Data Packet (Tag 9) 39 - 5.8. Marker Packet (Obsolete Literal Packet) (Tag 10) 39 - 5.9. Literal Data Packet (Tag 11) 40 - 5.10. Trust Packet (Tag 12) 40 - 5.11. User ID Packet (Tag 13) 41 - 6. Radix-64 Conversions 41 - - - -Callas, et. al. Standards Track [Page 3] - -RFC 2440 OpenPGP Message Format November 1998 - - - 6.1. An Implementation of the CRC-24 in "C" 42 - 6.2. Forming ASCII Armor 42 - 6.3. Encoding Binary in Radix-64 44 - 6.4. Decoding Radix-64 46 - 6.5. Examples of Radix-64 46 - 6.6. Example of an ASCII Armored Message 47 - 7. Cleartext signature framework 47 - 7.1. Dash-Escaped Text 47 - 8. Regular Expressions 48 - 9. Constants 49 - 9.1. Public Key Algorithms 49 - 9.2. Symmetric Key Algorithms 49 - 9.3. Compression Algorithms 50 - 9.4. Hash Algorithms 50 - 10. Packet Composition 50 - 10.1. Transferable Public Keys 50 - 10.2. OpenPGP Messages 52 - 10.3. Detached Signatures 52 - 11. Enhanced Key Formats 52 - 11.1. Key Structures 52 - 11.2. Key IDs and Fingerprints 53 - 12. Notes on Algorithms 54 - 12.1. Symmetric Algorithm Preferences 54 - 12.2. Other Algorithm Preferences 55 - 12.2.1. Compression Preferences 56 - 12.2.2. Hash Algorithm Preferences 56 - 12.3. Plaintext 56 - 12.4. RSA 56 - 12.5. Elgamal 57 - 12.6. DSA 58 - 12.7. Reserved Algorithm Numbers 58 - 12.8. OpenPGP CFB mode 58 - 13. Security Considerations 59 - 14. Implementation Nits 60 - 15. Authors and Working Group Chair 62 - 16. References 63 - 17. Full Copyright Statement 65 - -1. Introduction - - This document provides information on the message-exchange packet - formats used by OpenPGP to provide encryption, decryption, signing, - and key management functions. It builds on the foundation provided in - RFC 1991 "PGP Message Exchange Formats." - - - - - - - -Callas, et. al. Standards Track [Page 4] - -RFC 2440 OpenPGP Message Format November 1998 - - -1.1. Terms - - * OpenPGP - This is a definition for security software that uses - PGP 5.x as a basis. - - * PGP - Pretty Good Privacy. PGP is a family of software systems - developed by Philip R. Zimmermann from which OpenPGP is based. - - * PGP 2.6.x - This version of PGP has many variants, hence the term - PGP 2.6.x. It used only RSA, MD5, and IDEA for its cryptographic - transforms. An informational RFC, RFC 1991, was written - describing this version of PGP. - - * PGP 5.x - This version of PGP is formerly known as "PGP 3" in the - community and also in the predecessor of this document, RFC 1991. - It has new formats and corrects a number of problems in the PGP - 2.6.x design. It is referred to here as PGP 5.x because that - software was the first release of the "PGP 3" code base. - - "PGP", "Pretty Good", and "Pretty Good Privacy" are trademarks of - Network Associates, Inc. and are used with permission. - - This document uses the terms "MUST", "SHOULD", and "MAY" as defined - in RFC 2119, along with the negated forms of those terms. - -2. General functions - - OpenPGP provides data integrity services for messages and data files - by using these core technologies: - - - digital signatures - - - encryption - - - compression - - - radix-64 conversion - - In addition, OpenPGP provides key management and certificate - services, but many of these are beyond the scope of this document. - -2.1. Confidentiality via Encryption - - OpenPGP uses two encryption methods to provide confidentiality: - symmetric-key encryption and public key encryption. With public-key - encryption, the object is encrypted using a symmetric encryption - algorithm. Each symmetric key is used only once. A new "session key" - is generated as a random number for each message. Since it is used - - - -Callas, et. al. Standards Track [Page 5] - -RFC 2440 OpenPGP Message Format November 1998 - - - only once, the session key is bound to the message and transmitted - with it. To protect the key, it is encrypted with the receiver's - public key. The sequence is as follows: - - 1. The sender creates a message. - - 2. The sending OpenPGP generates a random number to be used as a - session key for this message only. - - 3. The session key is encrypted using each recipient's public key. - These "encrypted session keys" start the message. - - 4. The sending OpenPGP encrypts the message using the session key, - which forms the remainder of the message. Note that the message - is also usually compressed. - - 5. The receiving OpenPGP decrypts the session key using the - recipient's private key. - - 6. The receiving OpenPGP decrypts the message using the session key. - If the message was compressed, it will be decompressed. - - With symmetric-key encryption, an object may be encrypted with a - symmetric key derived from a passphrase (or other shared secret), or - a two-stage mechanism similar to the public-key method described - above in which a session key is itself encrypted with a symmetric - algorithm keyed from a shared secret. - - Both digital signature and confidentiality services may be applied to - the same message. First, a signature is generated for the message and - attached to the message. Then, the message plus signature is - encrypted using a symmetric session key. Finally, the session key is - encrypted using public-key encryption and prefixed to the encrypted - block. - -2.2. Authentication via Digital signature - - The digital signature uses a hash code or message digest algorithm, - and a public-key signature algorithm. The sequence is as follows: - - 1. The sender creates a message. - - 2. The sending software generates a hash code of the message. - - 3. The sending software generates a signature from the hash code - using the sender's private key. - - 4. The binary signature is attached to the message. - - - -Callas, et. al. Standards Track [Page 6] - -RFC 2440 OpenPGP Message Format November 1998 - - - 5. The receiving software keeps a copy of the message signature. - - 6. The receiving software generates a new hash code for the - received message and verifies it using the message's signature. - If the verification is successful, the message is accepted as - authentic. - -2.3. Compression - - OpenPGP implementations MAY compress the message after applying the - signature but before encryption. - -2.4. Conversion to Radix-64 - - OpenPGP's underlying native representation for encrypted messages, - signature certificates, and keys is a stream of arbitrary octets. - Some systems only permit the use of blocks consisting of seven-bit, - printable text. For transporting OpenPGP's native raw binary octets - through channels that are not safe to raw binary data, a printable - encoding of these binary octets is needed. OpenPGP provides the - service of converting the raw 8-bit binary octet stream to a stream - of printable ASCII characters, called Radix-64 encoding or ASCII - Armor. - - Implementations SHOULD provide Radix-64 conversions. - - Note that many applications, particularly messaging applications, - will want more advanced features as described in the OpenPGP-MIME - document, RFC 2015. An application that implements OpenPGP for - messaging SHOULD implement OpenPGP-MIME. - -2.5. Signature-Only Applications - - OpenPGP is designed for applications that use both encryption and - signatures, but there are a number of problems that are solved by a - signature-only implementation. Although this specification requires - both encryption and signatures, it is reasonable for there to be - subset implementations that are non-comformant only in that they omit - encryption. - -3. Data Element Formats - - This section describes the data elements used by OpenPGP. - - - - - - - - -Callas, et. al. Standards Track [Page 7] - -RFC 2440 OpenPGP Message Format November 1998 - - -3.1. Scalar numbers - - Scalar numbers are unsigned, and are always stored in big-endian - format. Using n[k] to refer to the kth octet being interpreted, the - value of a two-octet scalar is ((n[0] << 8) + n[1]). The value of a - four-octet scalar is ((n[0] << 24) + (n[1] << 16) + (n[2] << 8) + - n[3]). - -3.2. Multi-Precision Integers - - Multi-Precision Integers (also called MPIs) are unsigned integers - used to hold large integers such as the ones used in cryptographic - calculations. - - An MPI consists of two pieces: a two-octet scalar that is the length - of the MPI in bits followed by a string of octets that contain the - actual integer. - - These octets form a big-endian number; a big-endian number can be - made into an MPI by prefixing it with the appropriate length. - - Examples: - - (all numbers are in hexadecimal) - - The string of octets [00 01 01] forms an MPI with the value 1. The - string [00 09 01 FF] forms an MPI with the value of 511. - - Additional rules: - - The size of an MPI is ((MPI.length + 7) / 8) + 2 octets. - - The length field of an MPI describes the length starting from its - most significant non-zero bit. Thus, the MPI [00 02 01] is not formed - correctly. It should be [00 01 01]. - -3.3. Key IDs - - A Key ID is an eight-octet scalar that identifies a key. - Implementations SHOULD NOT assume that Key IDs are unique. The - section, "Enhanced Key Formats" below describes how Key IDs are - formed. - -3.4. Text - - The default character set for text is the UTF-8 [RFC2279] encoding of - Unicode [ISO10646]. - - - - -Callas, et. al. Standards Track [Page 8] - -RFC 2440 OpenPGP Message Format November 1998 - - -3.5. Time fields - - A time field is an unsigned four-octet number containing the number - of seconds elapsed since midnight, 1 January 1970 UTC. - -3.6. String-to-key (S2K) specifiers - - String-to-key (S2K) specifiers are used to convert passphrase strings - into symmetric-key encryption/decryption keys. They are used in two - places, currently: to encrypt the secret part of private keys in the - private keyring, and to convert passphrases to encryption keys for - symmetrically encrypted messages. - -3.6.1. String-to-key (S2k) specifier types - - There are three types of S2K specifiers currently supported, as - follows: - -3.6.1.1. Simple S2K - - This directly hashes the string to produce the key data. See below - for how this hashing is done. - - Octet 0: 0x00 - Octet 1: hash algorithm - - Simple S2K hashes the passphrase to produce the session key. The - manner in which this is done depends on the size of the session key - (which will depend on the cipher used) and the size of the hash - algorithm's output. If the hash size is greater than or equal to the - session key size, the high-order (leftmost) octets of the hash are - used as the key. - - If the hash size is less than the key size, multiple instances of the - hash context are created -- enough to produce the required key data. - These instances are preloaded with 0, 1, 2, ... octets of zeros (that - is to say, the first instance has no preloading, the second gets - preloaded with 1 octet of zero, the third is preloaded with two - octets of zeros, and so forth). - - As the data is hashed, it is given independently to each hash - context. Since the contexts have been initialized differently, they - will each produce different hash output. Once the passphrase is - hashed, the output data from the multiple hashes is concatenated, - first hash leftmost, to produce the key data, with any excess octets - on the right discarded. - - - - - -Callas, et. al. Standards Track [Page 9] - -RFC 2440 OpenPGP Message Format November 1998 - - -3.6.1.2. Salted S2K - - This includes a "salt" value in the S2K specifier -- some arbitrary - data -- that gets hashed along with the passphrase string, to help - prevent dictionary attacks. - - Octet 0: 0x01 - Octet 1: hash algorithm - Octets 2-9: 8-octet salt value - - Salted S2K is exactly like Simple S2K, except that the input to the - hash function(s) consists of the 8 octets of salt from the S2K - specifier, followed by the passphrase. - -3.6.1.3. Iterated and Salted S2K - - This includes both a salt and an octet count. The salt is combined - with the passphrase and the resulting value is hashed repeatedly. - This further increases the amount of work an attacker must do to try - dictionary attacks. - - Octet 0: 0x03 - Octet 1: hash algorithm - Octets 2-9: 8-octet salt value - Octet 10: count, a one-octet, coded value - - The count is coded into a one-octet number using the following - formula: - - #define EXPBIAS 6 - count = ((Int32)16 + (c & 15)) << ((c >> 4) + EXPBIAS); - - The above formula is in C, where "Int32" is a type for a 32-bit - integer, and the variable "c" is the coded count, Octet 10. - - Iterated-Salted S2K hashes the passphrase and salt data multiple - times. The total number of octets to be hashed is specified in the - encoded count in the S2K specifier. Note that the resulting count - value is an octet count of how many octets will be hashed, not an - iteration count. - - Initially, one or more hash contexts are set up as with the other S2K - algorithms, depending on how many octets of key data are needed. - Then the salt, followed by the passphrase data is repeatedly hashed - until the number of octets specified by the octet count has been - hashed. The one exception is that if the octet count is less than - the size of the salt plus passphrase, the full salt plus passphrase - will be hashed even though that is greater than the octet count. - - - -Callas, et. al. Standards Track [Page 10] - -RFC 2440 OpenPGP Message Format November 1998 - - - After the hashing is done the data is unloaded from the hash - context(s) as with the other S2K algorithms. - -3.6.2. String-to-key usage - - Implementations SHOULD use salted or iterated-and-salted S2K - specifiers, as simple S2K specifiers are more vulnerable to - dictionary attacks. - -3.6.2.1. Secret key encryption - - An S2K specifier can be stored in the secret keyring to specify how - to convert the passphrase to a key that unlocks the secret data. - Older versions of PGP just stored a cipher algorithm octet preceding - the secret data or a zero to indicate that the secret data was - unencrypted. The MD5 hash function was always used to convert the - passphrase to a key for the specified cipher algorithm. - - For compatibility, when an S2K specifier is used, the special value - 255 is stored in the position where the hash algorithm octet would - have been in the old data structure. This is then followed - immediately by a one-octet algorithm identifier, and then by the S2K - specifier as encoded above. - - Therefore, preceding the secret data there will be one of these - possibilities: - - 0: secret data is unencrypted (no pass phrase) - 255: followed by algorithm octet and S2K specifier - Cipher alg: use Simple S2K algorithm using MD5 hash - - This last possibility, the cipher algorithm number with an implicit - use of MD5 and IDEA, is provided for backward compatibility; it MAY - be understood, but SHOULD NOT be generated, and is deprecated. - - These are followed by an 8-octet Initial Vector for the decryption of - the secret values, if they are encrypted, and then the secret key - values themselves. - -3.6.2.2. Symmetric-key message encryption - - OpenPGP can create a Symmetric-key Encrypted Session Key (ESK) packet - at the front of a message. This is used to allow S2K specifiers to - be used for the passphrase conversion or to create messages with a - mix of symmetric-key ESKs and public-key ESKs. This allows a message - to be decrypted either with a passphrase or a public key. - - - - - -Callas, et. al. Standards Track [Page 11] - -RFC 2440 OpenPGP Message Format November 1998 - - - PGP 2.X always used IDEA with Simple string-to-key conversion when - encrypting a message with a symmetric algorithm. This is deprecated, - but MAY be used for backward-compatibility. - -4. Packet Syntax - - This section describes the packets used by OpenPGP. - -4.1. Overview - - An OpenPGP message is constructed from a number of records that are - traditionally called packets. A packet is a chunk of data that has a - tag specifying its meaning. An OpenPGP message, keyring, certificate, - and so forth consists of a number of packets. Some of those packets - may contain other OpenPGP packets (for example, a compressed data - packet, when uncompressed, contains OpenPGP packets). - - Each packet consists of a packet header, followed by the packet body. - The packet header is of variable length. - -4.2. Packet Headers - - The first octet of the packet header is called the "Packet Tag." It - determines the format of the header and denotes the packet contents. - The remainder of the packet header is the length of the packet. - - Note that the most significant bit is the left-most bit, called bit - 7. A mask for this bit is 0x80 in hexadecimal. - - +---------------+ - PTag |7 6 5 4 3 2 1 0| - +---------------+ - Bit 7 -- Always one - Bit 6 -- New packet format if set - - PGP 2.6.x only uses old format packets. Thus, software that - interoperates with those versions of PGP must only use old format - packets. If interoperability is not an issue, either format may be - used. Note that old format packets have four bits of content tags, - and new format packets have six; some features cannot be used and - still be backward-compatible. - - Old format packets contain: - - Bits 5-2 -- content tag - Bits 1-0 - length-type - - - - - -Callas, et. al. Standards Track [Page 12] - -RFC 2440 OpenPGP Message Format November 1998 - - - New format packets contain: - - Bits 5-0 -- content tag - -4.2.1. Old-Format Packet Lengths - - The meaning of the length-type in old-format packets is: - - 0 - The packet has a one-octet length. The header is 2 octets long. - - 1 - The packet has a two-octet length. The header is 3 octets long. - - 2 - The packet has a four-octet length. The header is 5 octets long. - - 3 - The packet is of indeterminate length. The header is 1 octet - long, and the implementation must determine how long the packet - is. If the packet is in a file, this means that the packet - extends until the end of the file. In general, an implementation - SHOULD NOT use indeterminate length packets except where the end - of the data will be clear from the context, and even then it is - better to use a definite length, or a new-format header. The - new-format headers described below have a mechanism for precisely - encoding data of indeterminate length. - -4.2.2. New-Format Packet Lengths - - New format packets have four possible ways of encoding length: - - 1. A one-octet Body Length header encodes packet lengths of up to - 191 octets. - - 2. A two-octet Body Length header encodes packet lengths of 192 to - 8383 octets. - - 3. A five-octet Body Length header encodes packet lengths of up to - 4,294,967,295 (0xFFFFFFFF) octets in length. (This actually - encodes a four-octet scalar number.) - - 4. When the length of the packet body is not known in advance by the - issuer, Partial Body Length headers encode a packet of - indeterminate length, effectively making it a stream. - - - - - - - - - - -Callas, et. al. Standards Track [Page 13] - -RFC 2440 OpenPGP Message Format November 1998 - - -4.2.2.1. One-Octet Lengths - - A one-octet Body Length header encodes a length of from 0 to 191 - octets. This type of length header is recognized because the one - octet value is less than 192. The body length is equal to: - - bodyLen = 1st_octet; - -4.2.2.2. Two-Octet Lengths - - A two-octet Body Length header encodes a length of from 192 to 8383 - octets. It is recognized because its first octet is in the range 192 - to 223. The body length is equal to: - - bodyLen = ((1st_octet - 192) << 8) + (2nd_octet) + 192 - -4.2.2.3. Five-Octet Lengths - - A five-octet Body Length header consists of a single octet holding - the value 255, followed by a four-octet scalar. The body length is - equal to: - - bodyLen = (2nd_octet << 24) | (3rd_octet << 16) | - (4th_octet << 8) | 5th_octet - -4.2.2.4. Partial Body Lengths - - A Partial Body Length header is one octet long and encodes the length - of only part of the data packet. This length is a power of 2, from 1 - to 1,073,741,824 (2 to the 30th power). It is recognized by its one - octet value that is greater than or equal to 224, and less than 255. - The partial body length is equal to: - - partialBodyLen = 1 << (1st_octet & 0x1f); - - Each Partial Body Length header is followed by a portion of the - packet body data. The Partial Body Length header specifies this - portion's length. Another length header (of one of the three types -- - one octet, two-octet, or partial) follows that portion. The last - length header in the packet MUST NOT be a partial Body Length header. - Partial Body Length headers may only be used for the non-final parts - of the packet. - -4.2.3. Packet Length Examples - - These examples show ways that new-format packets might encode the - packet lengths. - - - - -Callas, et. al. Standards Track [Page 14] - -RFC 2440 OpenPGP Message Format November 1998 - - - A packet with length 100 may have its length encoded in one octet: - 0x64. This is followed by 100 octets of data. - - A packet with length 1723 may have its length coded in two octets: - 0xC5, 0xFB. This header is followed by the 1723 octets of data. - - A packet with length 100000 may have its length encoded in five - octets: 0xFF, 0x00, 0x01, 0x86, 0xA0. - - It might also be encoded in the following octet stream: 0xEF, first - 32768 octets of data; 0xE1, next two octets of data; 0xE0, next one - octet of data; 0xF0, next 65536 octets of data; 0xC5, 0xDD, last 1693 - octets of data. This is just one possible encoding, and many - variations are possible on the size of the Partial Body Length - headers, as long as a regular Body Length header encodes the last - portion of the data. Note also that the last Body Length header can - be a zero-length header. - - An implementation MAY use Partial Body Lengths for data packets, be - they literal, compressed, or encrypted. The first partial length MUST - be at least 512 octets long. Partial Body Lengths MUST NOT be used - for any other packet types. - - Please note that in all of these explanations, the total length of - the packet is the length of the header(s) plus the length of the - body. - -4.3. Packet Tags - - The packet tag denotes what type of packet the body holds. Note that - old format headers can only have tags less than 16, whereas new - format headers can have tags as great as 63. The defined tags (in - decimal) are: - - 0 -- Reserved - a packet tag must not have this value - 1 -- Public-Key Encrypted Session Key Packet - 2 -- Signature Packet - 3 -- Symmetric-Key Encrypted Session Key Packet - 4 -- One-Pass Signature Packet - 5 -- Secret Key Packet - 6 -- Public Key Packet - 7 -- Secret Subkey Packet - 8 -- Compressed Data Packet - 9 -- Symmetrically Encrypted Data Packet - 10 -- Marker Packet - 11 -- Literal Data Packet - 12 -- Trust Packet - - - - -Callas, et. al. Standards Track [Page 15] - -RFC 2440 OpenPGP Message Format November 1998 - - - 13 -- User ID Packet - 14 -- Public Subkey Packet - 60 to 63 -- Private or Experimental Values - -5. Packet Types - -5.1. Public-Key Encrypted Session Key Packets (Tag 1) - - A Public-Key Encrypted Session Key packet holds the session key used - to encrypt a message. Zero or more Encrypted Session Key packets - (either Public-Key or Symmetric-Key) may precede a Symmetrically - Encrypted Data Packet, which holds an encrypted message. The message - is encrypted with the session key, and the session key is itself - encrypted and stored in the Encrypted Session Key packet(s). The - Symmetrically Encrypted Data Packet is preceded by one Public-Key - Encrypted Session Key packet for each OpenPGP key to which the - message is encrypted. The recipient of the message finds a session - key that is encrypted to their public key, decrypts the session key, - and then uses the session key to decrypt the message. - - The body of this packet consists of: - - - A one-octet number giving the version number of the packet type. - The currently defined value for packet version is 3. An - implementation should accept, but not generate a version of 2, - which is equivalent to V3 in all other respects. - - - An eight-octet number that gives the key ID of the public key - that the session key is encrypted to. - - - A one-octet number giving the public key algorithm used. - - - A string of octets that is the encrypted session key. This string - takes up the remainder of the packet, and its contents are - dependent on the public key algorithm used. - - Algorithm Specific Fields for RSA encryption - - - multiprecision integer (MPI) of RSA encrypted value m**e mod n. - - Algorithm Specific Fields for Elgamal encryption: - - - MPI of Elgamal (Diffie-Hellman) value g**k mod p. - - - MPI of Elgamal (Diffie-Hellman) value m * y**k mod p. - - - - - - -Callas, et. al. Standards Track [Page 16] - -RFC 2440 OpenPGP Message Format November 1998 - - - The value "m" in the above formulas is derived from the session key - as follows. First the session key is prefixed with a one-octet - algorithm identifier that specifies the symmetric encryption - algorithm used to encrypt the following Symmetrically Encrypted Data - Packet. Then a two-octet checksum is appended which is equal to the - sum of the preceding session key octets, not including the algorithm - identifier, modulo 65536. This value is then padded as described in - PKCS-1 block type 02 [RFC2313] to form the "m" value used in the - formulas above. - - Note that when an implementation forms several PKESKs with one - session key, forming a message that can be decrypted by several keys, - the implementation MUST make new PKCS-1 padding for each key. - - An implementation MAY accept or use a Key ID of zero as a "wild card" - or "speculative" Key ID. In this case, the receiving implementation - would try all available private keys, checking for a valid decrypted - session key. This format helps reduce traffic analysis of messages. - -5.2. Signature Packet (Tag 2) - - A signature packet describes a binding between some public key and - some data. The most common signatures are a signature of a file or a - block of text, and a signature that is a certification of a user ID. - - Two versions of signature packets are defined. Version 3 provides - basic signature information, while version 4 provides an expandable - format with subpackets that can specify more information about the - signature. PGP 2.6.x only accepts version 3 signatures. - - Implementations MUST accept V3 signatures. Implementations SHOULD - generate V4 signatures. Implementations MAY generate a V3 signature - that can be verified by PGP 2.6.x. - - Note that if an implementation is creating an encrypted and signed - message that is encrypted to a V3 key, it is reasonable to create a - V3 signature. - -5.2.1. Signature Types - - There are a number of possible meanings for a signature, which are - specified in a signature type octet in any given signature. These - meanings are: - - 0x00: Signature of a binary document. - Typically, this means the signer owns it, created it, or - certifies that it has not been modified. - - - - -Callas, et. al. Standards Track [Page 17] - -RFC 2440 OpenPGP Message Format November 1998 - - - 0x01: Signature of a canonical text document. - Typically, this means the signer owns it, created it, or - certifies that it has not been modified. The signature is - calculated over the text data with its line endings converted - to and trailing blanks removed. - - 0x02: Standalone signature. - This signature is a signature of only its own subpacket - contents. It is calculated identically to a signature over a - zero-length binary document. Note that it doesn't make sense to - have a V3 standalone signature. - - 0x10: Generic certification of a User ID and Public Key packet. - The issuer of this certification does not make any particular - assertion as to how well the certifier has checked that the - owner of the key is in fact the person described by the user - ID. Note that all PGP "key signatures" are this type of - certification. - - 0x11: Persona certification of a User ID and Public Key packet. - The issuer of this certification has not done any verification - of the claim that the owner of this key is the user ID - specified. - - 0x12: Casual certification of a User ID and Public Key packet. - The issuer of this certification has done some casual - verification of the claim of identity. - - 0x13: Positive certification of a User ID and Public Key packet. - The issuer of this certification has done substantial - verification of the claim of identity. - - Please note that the vagueness of these certification claims is - not a flaw, but a feature of the system. Because PGP places - final authority for validity upon the receiver of a - certification, it may be that one authority's casual - certification might be more rigorous than some other - authority's positive certification. These classifications allow - a certification authority to issue fine-grained claims. - - 0x18: Subkey Binding Signature - This signature is a statement by the top-level signing key - indicates that it owns the subkey. This signature is calculated - directly on the subkey itself, not on any User ID or other - packets. - - - - - - -Callas, et. al. Standards Track [Page 18] - -RFC 2440 OpenPGP Message Format November 1998 - - - 0x1F: Signature directly on a key - This signature is calculated directly on a key. It binds the - information in the signature subpackets to the key, and is - appropriate to be used for subpackets that provide information - about the key, such as the revocation key subpacket. It is also - appropriate for statements that non-self certifiers want to - make about the key itself, rather than the binding between a - key and a name. - - 0x20: Key revocation signature - The signature is calculated directly on the key being revoked. - A revoked key is not to be used. Only revocation signatures by - the key being revoked, or by an authorized revocation key, - should be considered valid revocation signatures. - - 0x28: Subkey revocation signature - The signature is calculated directly on the subkey being - revoked. A revoked subkey is not to be used. Only revocation - signatures by the top-level signature key that is bound to this - subkey, or by an authorized revocation key, should be - considered valid revocation signatures. - - 0x30: Certification revocation signature - This signature revokes an earlier user ID certification - signature (signature class 0x10 through 0x13). It should be - issued by the same key that issued the revoked signature or an - authorized revocation key The signature should have a later - creation date than the signature it revokes. - - 0x40: Timestamp signature. - This signature is only meaningful for the timestamp contained - in it. - -5.2.2. Version 3 Signature Packet Format - - The body of a version 3 Signature Packet contains: - - - One-octet version number (3). - - - One-octet length of following hashed material. MUST be 5. - - - One-octet signature type. - - - Four-octet creation time. - - - Eight-octet key ID of signer. - - - One-octet public key algorithm. - - - -Callas, et. al. Standards Track [Page 19] - -RFC 2440 OpenPGP Message Format November 1998 - - - - One-octet hash algorithm. - - - Two-octet field holding left 16 bits of signed hash value. - - - One or more multi-precision integers comprising the signature. - This portion is algorithm specific, as described below. - - The data being signed is hashed, and then the signature type and - creation time from the signature packet are hashed (5 additional - octets). The resulting hash value is used in the signature - algorithm. The high 16 bits (first two octets) of the hash are - included in the signature packet to provide a quick test to reject - some invalid signatures. - - Algorithm Specific Fields for RSA signatures: - - - multiprecision integer (MPI) of RSA signature value m**d. - - Algorithm Specific Fields for DSA signatures: - - - MPI of DSA value r. - - - MPI of DSA value s. - - The signature calculation is based on a hash of the signed data, as - described above. The details of the calculation are different for - DSA signature than for RSA signatures. - - With RSA signatures, the hash value is encoded as described in PKCS-1 - section 10.1.2, "Data encoding", producing an ASN.1 value of type - DigestInfo, and then padded using PKCS-1 block type 01 [RFC2313]. - This requires inserting the hash value as an octet string into an - ASN.1 structure. The object identifier for the type of hash being - used is included in the structure. The hexadecimal representations - for the currently defined hash algorithms are: - - - MD2: 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x02 - - - MD5: 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05 - - - RIPEMD-160: 0x2B, 0x24, 0x03, 0x02, 0x01 - - - SHA-1: 0x2B, 0x0E, 0x03, 0x02, 0x1A - - - - - - - - -Callas, et. al. Standards Track [Page 20] - -RFC 2440 OpenPGP Message Format November 1998 - - - The ASN.1 OIDs are: - - - MD2: 1.2.840.113549.2.2 - - - MD5: 1.2.840.113549.2.5 - - - RIPEMD-160: 1.3.36.3.2.1 - - - SHA-1: 1.3.14.3.2.26 - - The full hash prefixes for these are: - - MD2: 0x30, 0x20, 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86, - 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x02, 0x05, 0x00, - 0x04, 0x10 - - MD5: 0x30, 0x20, 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86, - 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, 0x05, 0x00, - 0x04, 0x10 - - RIPEMD-160: 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x24, - 0x03, 0x02, 0x01, 0x05, 0x00, 0x04, 0x14 - - SHA-1: 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0E, - 0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14 - - DSA signatures MUST use hashes with a size of 160 bits, to match q, - the size of the group generated by the DSA key's generator value. - The hash function result is treated as a 160 bit number and used - directly in the DSA signature algorithm. - -5.2.3. Version 4 Signature Packet Format - - The body of a version 4 Signature Packet contains: - - - One-octet version number (4). - - - One-octet signature type. - - - One-octet public key algorithm. - - - One-octet hash algorithm. - - - Two-octet scalar octet count for following hashed subpacket - data. Note that this is the length in octets of all of the hashed - subpackets; a pointer incremented by this number will skip over - the hashed subpackets. - - - - -Callas, et. al. Standards Track [Page 21] - -RFC 2440 OpenPGP Message Format November 1998 - - - - Hashed subpacket data. (zero or more subpackets) - - - Two-octet scalar octet count for following unhashed subpacket - data. Note that this is the length in octets of all of the - unhashed subpackets; a pointer incremented by this number will - skip over the unhashed subpackets. - - - Unhashed subpacket data. (zero or more subpackets) - - - Two-octet field holding left 16 bits of signed hash value. - - - One or more multi-precision integers comprising the signature. - This portion is algorithm specific, as described above. - - The data being signed is hashed, and then the signature data from the - version number through the hashed subpacket data (inclusive) is - hashed. The resulting hash value is what is signed. The left 16 bits - of the hash are included in the signature packet to provide a quick - test to reject some invalid signatures. - - There are two fields consisting of signature subpackets. The first - field is hashed with the rest of the signature data, while the second - is unhashed. The second set of subpackets is not cryptographically - protected by the signature and should include only advisory - information. - - The algorithms for converting the hash function result to a signature - are described in a section below. - -5.2.3.1. Signature Subpacket Specification - - The subpacket fields consist of zero or more signature subpackets. - Each set of subpackets is preceded by a two-octet scalar count of the - length of the set of subpackets. - - Each subpacket consists of a subpacket header and a body. The header - consists of: - - - the subpacket length (1, 2, or 5 octets) - - - the subpacket type (1 octet) - - and is followed by the subpacket specific data. - - The length includes the type octet but not this length. Its format is - similar to the "new" format packet header lengths, but cannot have - partial body lengths. That is: - - - - -Callas, et. al. Standards Track [Page 22] - -RFC 2440 OpenPGP Message Format November 1998 - - - if the 1st octet < 192, then - lengthOfLength = 1 - subpacketLen = 1st_octet - - if the 1st octet >= 192 and < 255, then - lengthOfLength = 2 - subpacketLen = ((1st_octet - 192) << 8) + (2nd_octet) + 192 - - if the 1st octet = 255, then - lengthOfLength = 5 - subpacket length = [four-octet scalar starting at 2nd_octet] - - The value of the subpacket type octet may be: - - 2 = signature creation time - 3 = signature expiration time - 4 = exportable certification - 5 = trust signature - 6 = regular expression - 7 = revocable - 9 = key expiration time - 10 = placeholder for backward compatibility - 11 = preferred symmetric algorithms - 12 = revocation key - 16 = issuer key ID - 20 = notation data - 21 = preferred hash algorithms - 22 = preferred compression algorithms - 23 = key server preferences - 24 = preferred key server - 25 = primary user id - 26 = policy URL - 27 = key flags - 28 = signer's user id - 29 = reason for revocation - 100 to 110 = internal or user-defined - - An implementation SHOULD ignore any subpacket of a type that it does - not recognize. - - Bit 7 of the subpacket type is the "critical" bit. If set, it - denotes that the subpacket is one that is critical for the evaluator - of the signature to recognize. If a subpacket is encountered that is - marked critical but is unknown to the evaluating software, the - evaluator SHOULD consider the signature to be in error. - - - - - - -Callas, et. al. Standards Track [Page 23] - -RFC 2440 OpenPGP Message Format November 1998 - - - An evaluator may "recognize" a subpacket, but not implement it. The - purpose of the critical bit is to allow the signer to tell an - evaluator that it would prefer a new, unknown feature to generate an - error than be ignored. - - Implementations SHOULD implement "preferences". - -5.2.3.2. Signature Subpacket Types - - A number of subpackets are currently defined. Some subpackets apply - to the signature itself and some are attributes of the key. - Subpackets that are found on a self-signature are placed on a user id - certification made by the key itself. Note that a key may have more - than one user id, and thus may have more than one self-signature, and - differing subpackets. - - A self-signature is a binding signature made by the key the signature - refers to. There are three types of self-signatures, the - certification signatures (types 0x10-0x13), the direct-key signature - (type 0x1f), and the subkey binding signature (type 0x18). For - certification self-signatures, each user ID may have a self- - signature, and thus different subpackets in those self-signatures. - For subkey binding signatures, each subkey in fact has a self- - signature. Subpackets that appear in a certification self-signature - apply to the username, and subpackets that appear in the subkey - self-signature apply to the subkey. Lastly, subpackets on the direct - key signature apply to the entire key. - - Implementing software should interpret a self-signature's preference - subpackets as narrowly as possible. For example, suppose a key has - two usernames, Alice and Bob. Suppose that Alice prefers the - symmetric algorithm CAST5, and Bob prefers IDEA or Triple-DES. If the - software locates this key via Alice's name, then the preferred - algorithm is CAST5, if software locates the key via Bob's name, then - the preferred algorithm is IDEA. If the key is located by key id, - then algorithm of the default user id of the key provides the default - symmetric algorithm. - - A subpacket may be found either in the hashed or unhashed subpacket - sections of a signature. If a subpacket is not hashed, then the - information in it cannot be considered definitive because it is not - part of the signature proper. - - - - - - - - - -Callas, et. al. Standards Track [Page 24] - -RFC 2440 OpenPGP Message Format November 1998 - - -5.2.3.3. Signature creation time - - (4 octet time field) - - The time the signature was made. - - MUST be present in the hashed area. - -5.2.3.4. Issuer - - (8 octet key ID) - - The OpenPGP key ID of the key issuing the signature. - -5.2.3.5. Key expiration time - - (4 octet time field) - - The validity period of the key. This is the number of seconds after - the key creation time that the key expires. If this is not present - or has a value of zero, the key never expires. This is found only on - a self-signature. - -5.2.3.6. Preferred symmetric algorithms - - (sequence of one-octet values) - - Symmetric algorithm numbers that indicate which algorithms the key - holder prefers to use. The subpacket body is an ordered list of - octets with the most preferred listed first. It is assumed that only - algorithms listed are supported by the recipient's software. - Algorithm numbers in section 9. This is only found on a self- - signature. - -5.2.3.7. Preferred hash algorithms - - (array of one-octet values) - - Message digest algorithm numbers that indicate which algorithms the - key holder prefers to receive. Like the preferred symmetric - algorithms, the list is ordered. Algorithm numbers are in section 6. - This is only found on a self-signature. - - - - - - - - - -Callas, et. al. Standards Track [Page 25] - -RFC 2440 OpenPGP Message Format November 1998 - - -5.2.3.8. Preferred compression algorithms - - (array of one-octet values) - - Compression algorithm numbers that indicate which algorithms the key - holder prefers to use. Like the preferred symmetric algorithms, the - list is ordered. Algorithm numbers are in section 6. If this - subpacket is not included, ZIP is preferred. A zero denotes that - uncompressed data is preferred; the key holder's software might have - no compression software in that implementation. This is only found on - a self-signature. - -5.2.3.9. Signature expiration time - - (4 octet time field) - - The validity period of the signature. This is the number of seconds - after the signature creation time that the signature expires. If this - is not present or has a value of zero, it never expires. - -5.2.3.10. Exportable Certification - - (1 octet of exportability, 0 for not, 1 for exportable) - - This subpacket denotes whether a certification signature is - "exportable", to be used by other users than the signature's issuer. - The packet body contains a boolean flag indicating whether the - signature is exportable. If this packet is not present, the - certification is exportable; it is equivalent to a flag containing a - 1. - - Non-exportable, or "local", certifications are signatures made by a - user to mark a key as valid within that user's implementation only. - Thus, when an implementation prepares a user's copy of a key for - transport to another user (this is the process of "exporting" the - key), any local certification signatures are deleted from the key. - - The receiver of a transported key "imports" it, and likewise trims - any local certifications. In normal operation, there won't be any, - assuming the import is performed on an exported key. However, there - are instances where this can reasonably happen. For example, if an - implementation allows keys to be imported from a key database in - addition to an exported key, then this situation can arise. - - Some implementations do not represent the interest of a single user - (for example, a key server). Such implementations always trim local - certifications from any key they handle. - - - - -Callas, et. al. Standards Track [Page 26] - -RFC 2440 OpenPGP Message Format November 1998 - - -5.2.3.11. Revocable - - (1 octet of revocability, 0 for not, 1 for revocable) - - Signature's revocability status. Packet body contains a boolean flag - indicating whether the signature is revocable. Signatures that are - not revocable have any later revocation signatures ignored. They - represent a commitment by the signer that he cannot revoke his - signature for the life of his key. If this packet is not present, - the signature is revocable. - -5.2.3.12. Trust signature - - (1 octet "level" (depth), 1 octet of trust amount) - - Signer asserts that the key is not only valid, but also trustworthy, - at the specified level. Level 0 has the same meaning as an ordinary - validity signature. Level 1 means that the signed key is asserted to - be a valid trusted introducer, with the 2nd octet of the body - specifying the degree of trust. Level 2 means that the signed key is - asserted to be trusted to issue level 1 trust signatures, i.e. that - it is a "meta introducer". Generally, a level n trust signature - asserts that a key is trusted to issue level n-1 trust signatures. - The trust amount is in a range from 0-255, interpreted such that - values less than 120 indicate partial trust and values of 120 or - greater indicate complete trust. Implementations SHOULD emit values - of 60 for partial trust and 120 for complete trust. - -5.2.3.13. Regular expression - - (null-terminated regular expression) - - Used in conjunction with trust signature packets (of level > 0) to - limit the scope of trust that is extended. Only signatures by the - target key on user IDs that match the regular expression in the body - of this packet have trust extended by the trust signature subpacket. - The regular expression uses the same syntax as the Henry Spencer's - "almost public domain" regular expression package. A description of - the syntax is found in a section below. - -5.2.3.14. Revocation key - - (1 octet of class, 1 octet of algid, 20 octets of fingerprint) - - Authorizes the specified key to issue revocation signatures for this - key. Class octet must have bit 0x80 set. If the bit 0x40 is set, - then this means that the revocation information is sensitive. Other - bits are for future expansion to other kinds of authorizations. This - - - -Callas, et. al. Standards Track [Page 27] - -RFC 2440 OpenPGP Message Format November 1998 - - - is found on a self-signature. - - If the "sensitive" flag is set, the keyholder feels this subpacket - contains private trust information that describes a real-world - sensitive relationship. If this flag is set, implementations SHOULD - NOT export this signature to other users except in cases where the - data needs to be available: when the signature is being sent to the - designated revoker, or when it is accompanied by a revocation - signature from that revoker. Note that it may be appropriate to - isolate this subpacket within a separate signature so that it is not - combined with other subpackets that need to be exported. - -5.2.3.15. Notation Data - - (4 octets of flags, 2 octets of name length (M), - 2 octets of value length (N), - M octets of name data, - N octets of value data) - - This subpacket describes a "notation" on the signature that the - issuer wishes to make. The notation has a name and a value, each of - which are strings of octets. There may be more than one notation in a - signature. Notations can be used for any extension the issuer of the - signature cares to make. The "flags" field holds four octets of - flags. - - All undefined flags MUST be zero. Defined flags are: - - First octet: 0x80 = human-readable. This note is text, a note - from one person to another, and has no - meaning to software. - Other octets: none. - -5.2.3.16. Key server preferences - - (N octets of flags) - - This is a list of flags that indicate preferences that the key holder - has about how the key is handled on a key server. All undefined flags - MUST be zero. - - First octet: 0x80 = No-modify - the key holder requests that this key only be modified or updated - by the key holder or an administrator of the key server. - - This is found only on a self-signature. - - - - - -Callas, et. al. Standards Track [Page 28] - -RFC 2440 OpenPGP Message Format November 1998 - - -5.2.3.17. Preferred key server - - (String) - - This is a URL of a key server that the key holder prefers be used for - updates. Note that keys with multiple user ids can have a preferred - key server for each user id. Note also that since this is a URL, the - key server can actually be a copy of the key retrieved by ftp, http, - finger, etc. - -5.2.3.18. Primary user id - - (1 octet, boolean) - - This is a flag in a user id's self signature that states whether this - user id is the main user id for this key. It is reasonable for an - implementation to resolve ambiguities in preferences, etc. by - referring to the primary user id. If this flag is absent, its value - is zero. If more than one user id in a key is marked as primary, the - implementation may resolve the ambiguity in any way it sees fit. - -5.2.3.19. Policy URL - - (String) - - This subpacket contains a URL of a document that describes the policy - that the signature was issued under. - -5.2.3.20. Key Flags - - (Octet string) - - This subpacket contains a list of binary flags that hold information - about a key. It is a string of octets, and an implementation MUST NOT - assume a fixed size. This is so it can grow over time. If a list is - shorter than an implementation expects, the unstated flags are - considered to be zero. The defined flags are: - - First octet: - - 0x01 - This key may be used to certify other keys. - - 0x02 - This key may be used to sign data. - - 0x04 - This key may be used to encrypt communications. - - 0x08 - This key may be used to encrypt storage. - - - - -Callas, et. al. Standards Track [Page 29] - -RFC 2440 OpenPGP Message Format November 1998 - - - 0x10 - The private component of this key may have been split by a - secret-sharing mechanism. - - 0x80 - The private component of this key may be in the possession - of more than one person. - - Usage notes: - - The flags in this packet may appear in self-signatures or in - certification signatures. They mean different things depending on who - is making the statement -- for example, a certification signature - that has the "sign data" flag is stating that the certification is - for that use. On the other hand, the "communications encryption" flag - in a self-signature is stating a preference that a given key be used - for communications. Note however, that it is a thorny issue to - determine what is "communications" and what is "storage." This - decision is left wholly up to the implementation; the authors of this - document do not claim any special wisdom on the issue, and realize - that accepted opinion may change. - - The "split key" (0x10) and "group key" (0x80) flags are placed on a - self-signature only; they are meaningless on a certification - signature. They SHOULD be placed only on a direct-key signature (type - 0x1f) or a subkey signature (type 0x18), one that refers to the key - the flag applies to. - -5.2.3.21. Signer's User ID - - This subpacket allows a keyholder to state which user id is - responsible for the signing. Many keyholders use a single key for - different purposes, such as business communications as well as - personal communications. This subpacket allows such a keyholder to - state which of their roles is making a signature. - -5.2.3.22. Reason for Revocation - - (1 octet of revocation code, N octets of reason string) - - This subpacket is used only in key revocation and certification - revocation signatures. It describes the reason why the key or - certificate was revoked. - - The first octet contains a machine-readable code that denotes the - reason for the revocation: - - - - - - - -Callas, et. al. Standards Track [Page 30] - -RFC 2440 OpenPGP Message Format November 1998 - - - 0x00 - No reason specified (key revocations or cert revocations) - 0x01 - Key is superceded (key revocations) - 0x02 - Key material has been compromised (key revocations) - 0x03 - Key is no longer used (key revocations) - 0x20 - User id information is no longer valid (cert revocations) - - Following the revocation code is a string of octets which gives - information about the reason for revocation in human-readable form - (UTF-8). The string may be null, that is, of zero length. The length - of the subpacket is the length of the reason string plus one. - -5.2.4. Computing Signatures - - All signatures are formed by producing a hash over the signature - data, and then using the resulting hash in the signature algorithm. - - The signature data is simple to compute for document signatures - (types 0x00 and 0x01), for which the document itself is the data. - For standalone signatures, this is a null string. - - When a signature is made over a key, the hash data starts with the - octet 0x99, followed by a two-octet length of the key, and then body - of the key packet. (Note that this is an old-style packet header for - a key packet with two-octet length.) A subkey signature (type 0x18) - then hashes the subkey, using the same format as the main key. Key - revocation signatures (types 0x20 and 0x28) hash only the key being - revoked. - - A certification signature (type 0x10 through 0x13) hashes the user id - being bound to the key into the hash context after the above data. A - V3 certification hashes the contents of the name packet, without any - header. A V4 certification hashes the constant 0xb4 (which is an - old-style packet header with the length-of-length set to zero), a - four-octet number giving the length of the username, and then the - username data. - - Once the data body is hashed, then a trailer is hashed. A V3 - signature hashes five octets of the packet body, starting from the - signature type field. This data is the signature type, followed by - the four-octet signature time. A V4 signature hashes the packet body - starting from its first field, the version number, through the end of - the hashed subpacket data. Thus, the fields hashed are the signature - version, the signature type, the public key algorithm, the hash - algorithm, the hashed subpacket length, and the hashed subpacket - body. - - - - - - -Callas, et. al. Standards Track [Page 31] - -RFC 2440 OpenPGP Message Format November 1998 - - - V4 signatures also hash in a final trailer of six octets: the version - of the signature packet, i.e. 0x04; 0xFF; a four-octet, big-endian - number that is the length of the hashed data from the signature - packet (note that this number does not include these final six - octets. - - After all this has been hashed, the resulting hash field is used in - the signature algorithm, and placed at the end of the signature - packet. - -5.2.4.1. Subpacket Hints - - An implementation SHOULD put the two mandatory subpackets, creation - time and issuer, as the first subpackets in the subpacket list, - simply to make it easier for the implementer to find them. - - It is certainly possible for a signature to contain conflicting - information in subpackets. For example, a signature may contain - multiple copies of a preference or multiple expiration times. In most - cases, an implementation SHOULD use the last subpacket in the - signature, but MAY use any conflict resolution scheme that makes more - sense. Please note that we are intentionally leaving conflict - resolution to the implementer; most conflicts are simply syntax - errors, and the wishy-washy language here allows a receiver to be - generous in what they accept, while putting pressure on a creator to - be stingy in what they generate. - - Some apparent conflicts may actually make sense -- for example, - suppose a keyholder has an V3 key and a V4 key that share the same - RSA key material. Either of these keys can verify a signature created - by the other, and it may be reasonable for a signature to contain an - issuer subpacket for each key, as a way of explicitly tying those - keys to the signature. - -5.3. Symmetric-Key Encrypted Session-Key Packets (Tag 3) - - The Symmetric-Key Encrypted Session Key packet holds the symmetric- - key encryption of a session key used to encrypt a message. Zero or - more Encrypted Session Key packets and/or Symmetric-Key Encrypted - Session Key packets may precede a Symmetrically Encrypted Data Packet - that holds an encrypted message. The message is encrypted with a - session key, and the session key is itself encrypted and stored in - the Encrypted Session Key packet or the Symmetric-Key Encrypted - Session Key packet. - - If the Symmetrically Encrypted Data Packet is preceded by one or more - Symmetric-Key Encrypted Session Key packets, each specifies a - passphrase that may be used to decrypt the message. This allows a - - - -Callas, et. al. Standards Track [Page 32] - -RFC 2440 OpenPGP Message Format November 1998 - - - message to be encrypted to a number of public keys, and also to one - or more pass phrases. This packet type is new, and is not generated - by PGP 2.x or PGP 5.0. - - The body of this packet consists of: - - - A one-octet version number. The only currently defined version - is 4. - - - A one-octet number describing the symmetric algorithm used. - - - A string-to-key (S2K) specifier, length as defined above. - - - Optionally, the encrypted session key itself, which is decrypted - with the string-to-key object. - - If the encrypted session key is not present (which can be detected on - the basis of packet length and S2K specifier size), then the S2K - algorithm applied to the passphrase produces the session key for - decrypting the file, using the symmetric cipher algorithm from the - Symmetric-Key Encrypted Session Key packet. - - If the encrypted session key is present, the result of applying the - S2K algorithm to the passphrase is used to decrypt just that - encrypted session key field, using CFB mode with an IV of all zeros. - The decryption result consists of a one-octet algorithm identifier - that specifies the symmetric-key encryption algorithm used to encrypt - the following Symmetrically Encrypted Data Packet, followed by the - session key octets themselves. - - Note: because an all-zero IV is used for this decryption, the S2K - specifier MUST use a salt value, either a Salted S2K or an Iterated- - Salted S2K. The salt value will insure that the decryption key is - not repeated even if the passphrase is reused. - -5.4. One-Pass Signature Packets (Tag 4) - - The One-Pass Signature packet precedes the signed data and contains - enough information to allow the receiver to begin calculating any - hashes needed to verify the signature. It allows the Signature - Packet to be placed at the end of the message, so that the signer can - compute the entire signed message in one pass. - - A One-Pass Signature does not interoperate with PGP 2.6.x or earlier. - - The body of this packet consists of: - - - - - -Callas, et. al. Standards Track [Page 33] - -RFC 2440 OpenPGP Message Format November 1998 - - - - A one-octet version number. The current version is 3. - - - A one-octet signature type. Signature types are described in - section 5.2.1. - - - A one-octet number describing the hash algorithm used. - - - A one-octet number describing the public key algorithm used. - - - An eight-octet number holding the key ID of the signing key. - - - A one-octet number holding a flag showing whether the signature - is nested. A zero value indicates that the next packet is - another One-Pass Signature packet that describes another - signature to be applied to the same message data. - - Note that if a message contains more than one one-pass signature, - then the signature packets bracket the message; that is, the first - signature packet after the message corresponds to the last one-pass - packet and the final signature packet corresponds to the first one- - pass packet. - -5.5. Key Material Packet - - A key material packet contains all the information about a public or - private key. There are four variants of this packet type, and two - major versions. Consequently, this section is complex. - -5.5.1. Key Packet Variants - -5.5.1.1. Public Key Packet (Tag 6) - - A Public Key packet starts a series of packets that forms an OpenPGP - key (sometimes called an OpenPGP certificate). - -5.5.1.2. Public Subkey Packet (Tag 14) - - A Public Subkey packet (tag 14) has exactly the same format as a - Public Key packet, but denotes a subkey. One or more subkeys may be - associated with a top-level key. By convention, the top-level key - provides signature services, and the subkeys provide encryption - services. - - Note: in PGP 2.6.x, tag 14 was intended to indicate a comment packet. - This tag was selected for reuse because no previous version of PGP - ever emitted comment packets but they did properly ignore them. - Public Subkey packets are ignored by PGP 2.6.x and do not cause it to - fail, providing a limited degree of backward compatibility. - - - -Callas, et. al. Standards Track [Page 34] - -RFC 2440 OpenPGP Message Format November 1998 - - -5.5.1.3. Secret Key Packet (Tag 5) - - A Secret Key packet contains all the information that is found in a - Public Key packet, including the public key material, but also - includes the secret key material after all the public key fields. - -5.5.1.4. Secret Subkey Packet (Tag 7) - - A Secret Subkey packet (tag 7) is the subkey analog of the Secret Key - packet, and has exactly the same format. - -5.5.2. Public Key Packet Formats - - There are two versions of key-material packets. Version 3 packets - were first generated by PGP 2.6. Version 2 packets are identical in - format to Version 3 packets, but are generated by PGP 2.5 or before. - V2 packets are deprecated and they MUST NOT be generated. PGP 5.0 - introduced version 4 packets, with new fields and semantics. PGP - 2.6.x will not accept key-material packets with versions greater than - 3. - - OpenPGP implementations SHOULD create keys with version 4 format. An - implementation MAY generate a V3 key to ensure interoperability with - old software; note, however, that V4 keys correct some security - deficiencies in V3 keys. These deficiencies are described below. An - implementation MUST NOT create a V3 key with a public key algorithm - other than RSA. - - A version 3 public key or public subkey packet contains: - - - A one-octet version number (3). - - - A four-octet number denoting the time that the key was created. - - - A two-octet number denoting the time in days that this key is - valid. If this number is zero, then it does not expire. - - - A one-octet number denoting the public key algorithm of this key - - - A series of multi-precision integers comprising the key - material: - - - a multiprecision integer (MPI) of RSA public modulus n; - - - an MPI of RSA public encryption exponent e. - - - - - - -Callas, et. al. Standards Track [Page 35] - -RFC 2440 OpenPGP Message Format November 1998 - - - V3 keys SHOULD only be used for backward compatibility because of - three weaknesses in them. First, it is relatively easy to construct a - V3 key that has the same key ID as any other key because the key ID - is simply the low 64 bits of the public modulus. Secondly, because - the fingerprint of a V3 key hashes the key material, but not its - length, which increases the opportunity for fingerprint collisions. - Third, there are minor weaknesses in the MD5 hash algorithm that make - developers prefer other algorithms. See below for a fuller discussion - of key IDs and fingerprints. - - The version 4 format is similar to the version 3 format except for - the absence of a validity period. This has been moved to the - signature packet. In addition, fingerprints of version 4 keys are - calculated differently from version 3 keys, as described in section - "Enhanced Key Formats." - - A version 4 packet contains: - - - A one-octet version number (4). - - - A four-octet number denoting the time that the key was created. - - - A one-octet number denoting the public key algorithm of this key - - - A series of multi-precision integers comprising the key - material. This algorithm-specific portion is: - - Algorithm Specific Fields for RSA public keys: - - - multiprecision integer (MPI) of RSA public modulus n; - - - MPI of RSA public encryption exponent e. - - Algorithm Specific Fields for DSA public keys: - - - MPI of DSA prime p; - - - MPI of DSA group order q (q is a prime divisor of p-1); - - - MPI of DSA group generator g; - - - MPI of DSA public key value y (= g**x where x is secret). - - Algorithm Specific Fields for Elgamal public keys: - - - MPI of Elgamal prime p; - - - MPI of Elgamal group generator g; - - - -Callas, et. al. Standards Track [Page 36] - -RFC 2440 OpenPGP Message Format November 1998 - - - - MPI of Elgamal public key value y (= g**x where x is - secret). - -5.5.3. Secret Key Packet Formats - - The Secret Key and Secret Subkey packets contain all the data of the - Public Key and Public Subkey packets, with additional algorithm- - specific secret key data appended, in encrypted form. - - The packet contains: - - - A Public Key or Public Subkey packet, as described above - - - One octet indicating string-to-key usage conventions. 0 - indicates that the secret key data is not encrypted. 255 - indicates that a string-to-key specifier is being given. Any - other value is a symmetric-key encryption algorithm specifier. - - - [Optional] If string-to-key usage octet was 255, a one-octet - symmetric encryption algorithm. - - - [Optional] If string-to-key usage octet was 255, a string-to-key - specifier. The length of the string-to-key specifier is implied - by its type, as described above. - - - [Optional] If secret data is encrypted, eight-octet Initial - Vector (IV). - - - Encrypted multi-precision integers comprising the secret key - data. These algorithm-specific fields are as described below. - - - Two-octet checksum of the plaintext of the algorithm-specific - portion (sum of all octets, mod 65536). - - Algorithm Specific Fields for RSA secret keys: - - - multiprecision integer (MPI) of RSA secret exponent d. - - - MPI of RSA secret prime value p. - - - MPI of RSA secret prime value q (p < q). - - - MPI of u, the multiplicative inverse of p, mod q. - - Algorithm Specific Fields for DSA secret keys: - - - MPI of DSA secret exponent x. - - - - -Callas, et. al. Standards Track [Page 37] - -RFC 2440 OpenPGP Message Format November 1998 - - - Algorithm Specific Fields for Elgamal secret keys: - - - MPI of Elgamal secret exponent x. - - Secret MPI values can be encrypted using a passphrase. If a string- - to-key specifier is given, that describes the algorithm for - converting the passphrase to a key, else a simple MD5 hash of the - passphrase is used. Implementations SHOULD use a string-to-key - specifier; the simple hash is for backward compatibility. The cipher - for encrypting the MPIs is specified in the secret key packet. - - Encryption/decryption of the secret data is done in CFB mode using - the key created from the passphrase and the Initial Vector from the - packet. A different mode is used with V3 keys (which are only RSA) - than with other key formats. With V3 keys, the MPI bit count prefix - (i.e., the first two octets) is not encrypted. Only the MPI non- - prefix data is encrypted. Furthermore, the CFB state is - resynchronized at the beginning of each new MPI value, so that the - CFB block boundary is aligned with the start of the MPI data. - - With V4 keys, a simpler method is used. All secret MPI values are - encrypted in CFB mode, including the MPI bitcount prefix. - - The 16-bit checksum that follows the algorithm-specific portion is - the algebraic sum, mod 65536, of the plaintext of all the algorithm- - specific octets (including MPI prefix and data). With V3 keys, the - checksum is stored in the clear. With V4 keys, the checksum is - encrypted like the algorithm-specific data. This value is used to - check that the passphrase was correct. - -5.6. Compressed Data Packet (Tag 8) - - The Compressed Data packet contains compressed data. Typically, this - packet is found as the contents of an encrypted packet, or following - a Signature or One-Pass Signature packet, and contains literal data - packets. - - The body of this packet consists of: - - - One octet that gives the algorithm used to compress the packet. - - - The remainder of the packet is compressed data. - - A Compressed Data Packet's body contains an block that compresses - some set of packets. See section "Packet Composition" for details on - how messages are formed. - - - - - -Callas, et. al. Standards Track [Page 38] - -RFC 2440 OpenPGP Message Format November 1998 - - - ZIP-compressed packets are compressed with raw RFC 1951 DEFLATE - blocks. Note that PGP V2.6 uses 13 bits of compression. If an - implementation uses more bits of compression, PGP V2.6 cannot - decompress it. - - ZLIB-compressed packets are compressed with RFC 1950 ZLIB-style - blocks. - -5.7. Symmetrically Encrypted Data Packet (Tag 9) - - The Symmetrically Encrypted Data packet contains data encrypted with - a symmetric-key algorithm. When it has been decrypted, it will - typically contain other packets (often literal data packets or - compressed data packets). - - The body of this packet consists of: - - - Encrypted data, the output of the selected symmetric-key cipher - operating in PGP's variant of Cipher Feedback (CFB) mode. - - The symmetric cipher used may be specified in an Public-Key or - Symmetric-Key Encrypted Session Key packet that precedes the - Symmetrically Encrypted Data Packet. In that case, the cipher - algorithm octet is prefixed to the session key before it is - encrypted. If no packets of these types precede the encrypted data, - the IDEA algorithm is used with the session key calculated as the MD5 - hash of the passphrase. - - The data is encrypted in CFB mode, with a CFB shift size equal to the - cipher's block size. The Initial Vector (IV) is specified as all - zeros. Instead of using an IV, OpenPGP prefixes a 10-octet string to - the data before it is encrypted. The first eight octets are random, - and the 9th and 10th octets are copies of the 7th and 8th octets, - respectively. After encrypting the first 10 octets, the CFB state is - resynchronized if the cipher block size is 8 octets or less. The - last 8 octets of ciphertext are passed through the cipher and the - block boundary is reset. - - The repetition of 16 bits in the 80 bits of random data prefixed to - the message allows the receiver to immediately check whether the - session key is incorrect. - -5.8. Marker Packet (Obsolete Literal Packet) (Tag 10) - - An experimental version of PGP used this packet as the Literal - packet, but no released version of PGP generated Literal packets with - this tag. With PGP 5.x, this packet has been re-assigned and is - reserved for use as the Marker packet. - - - -Callas, et. al. Standards Track [Page 39] - -RFC 2440 OpenPGP Message Format November 1998 - - - The body of this packet consists of: - - - The three octets 0x50, 0x47, 0x50 (which spell "PGP" in UTF-8). - - Such a packet MUST be ignored when received. It may be placed at the - beginning of a message that uses features not available in PGP 2.6.x - in order to cause that version to report that newer software is - necessary to process the message. - -5.9. Literal Data Packet (Tag 11) - - A Literal Data packet contains the body of a message; data that is - not to be further interpreted. - - The body of this packet consists of: - - - A one-octet field that describes how the data is formatted. - - If it is a 'b' (0x62), then the literal packet contains binary data. - If it is a 't' (0x74), then it contains text data, and thus may need - line ends converted to local form, or other text-mode changes. RFC - 1991 also defined a value of 'l' as a 'local' mode for machine-local - conversions. This use is now deprecated. - - - File name as a string (one-octet length, followed by file name), - if the encrypted data should be saved as a file. - - If the special name "_CONSOLE" is used, the message is considered to - be "for your eyes only". This advises that the message data is - unusually sensitive, and the receiving program should process it more - carefully, perhaps avoiding storing the received data to disk, for - example. - - - A four-octet number that indicates the modification date of the - file, or the creation time of the packet, or a zero that - indicates the present time. - - - The remainder of the packet is literal data. - - Text data is stored with text endings (i.e. network-normal - line endings). These should be converted to native line endings by - the receiving software. - -5.10. Trust Packet (Tag 12) - - The Trust packet is used only within keyrings and is not normally - exported. Trust packets contain data that record the user's - specifications of which key holders are trustworthy introducers, - - - -Callas, et. al. Standards Track [Page 40] - -RFC 2440 OpenPGP Message Format November 1998 - - - along with other information that implementing software uses for - trust information. - - Trust packets SHOULD NOT be emitted to output streams that are - transferred to other users, and they SHOULD be ignored on any input - other than local keyring files. - -5.11. User ID Packet (Tag 13) - - A User ID packet consists of data that is intended to represent the - name and email address of the key holder. By convention, it includes - an RFC 822 mail name, but there are no restrictions on its content. - The packet length in the header specifies the length of the user id. - If it is text, it is encoded in UTF-8. - -6. Radix-64 Conversions - - As stated in the introduction, OpenPGP's underlying native - representation for objects is a stream of arbitrary octets, and some - systems desire these objects to be immune to damage caused by - character set translation, data conversions, etc. - - In principle, any printable encoding scheme that met the requirements - of the unsafe channel would suffice, since it would not change the - underlying binary bit streams of the native OpenPGP data structures. - The OpenPGP standard specifies one such printable encoding scheme to - ensure interoperability. - - OpenPGP's Radix-64 encoding is composed of two parts: a base64 - encoding of the binary data, and a checksum. The base64 encoding is - identical to the MIME base64 content-transfer-encoding [RFC2231, - Section 6.8]. An OpenPGP implementation MAY use ASCII Armor to - protect the raw binary data. - - The checksum is a 24-bit CRC converted to four characters of radix-64 - encoding by the same MIME base64 transformation, preceded by an - equals sign (=). The CRC is computed by using the generator 0x864CFB - and an initialization of 0xB704CE. The accumulation is done on the - data before it is converted to radix-64, rather than on the converted - data. A sample implementation of this algorithm is in the next - section. - - The checksum with its leading equal sign MAY appear on the first line - after the Base64 encoded data. - - Rationale for CRC-24: The size of 24 bits fits evenly into printable - base64. The nonzero initialization can detect more errors than a - zero initialization. - - - -Callas, et. al. Standards Track [Page 41] - -RFC 2440 OpenPGP Message Format November 1998 - - -6.1. An Implementation of the CRC-24 in "C" - - #define CRC24_INIT 0xb704ceL - #define CRC24_POLY 0x1864cfbL - - typedef long crc24; - crc24 crc_octets(unsigned char *octets, size_t len) - { - crc24 crc = CRC24_INIT; - int i; - - while (len--) { - crc ^= (*octets++) << 16; - for (i = 0; i < 8; i++) { - crc <<= 1; - if (crc & 0x1000000) - crc ^= CRC24_POLY; - } - } - return crc & 0xffffffL; - } - -6.2. Forming ASCII Armor - - When OpenPGP encodes data into ASCII Armor, it puts specific headers - around the data, so OpenPGP can reconstruct the data later. OpenPGP - informs the user what kind of data is encoded in the ASCII armor - through the use of the headers. - - Concatenating the following data creates ASCII Armor: - - - An Armor Header Line, appropriate for the type of data - - - Armor Headers - - - A blank (zero-length, or containing only whitespace) line - - - The ASCII-Armored data - - - An Armor Checksum - - - The Armor Tail, which depends on the Armor Header Line. - - An Armor Header Line consists of the appropriate header line text - surrounded by five (5) dashes ('-', 0x2D) on either side of the - header line text. The header line text is chosen based upon the type - of data that is being encoded in Armor, and how it is being encoded. - Header line texts include the following strings: - - - -Callas, et. al. Standards Track [Page 42] - -RFC 2440 OpenPGP Message Format November 1998 - - - BEGIN PGP MESSAGE - Used for signed, encrypted, or compressed files. - - BEGIN PGP PUBLIC KEY BLOCK - Used for armoring public keys - - BEGIN PGP PRIVATE KEY BLOCK - Used for armoring private keys - - BEGIN PGP MESSAGE, PART X/Y - Used for multi-part messages, where the armor is split amongst Y - parts, and this is the Xth part out of Y. - - BEGIN PGP MESSAGE, PART X - Used for multi-part messages, where this is the Xth part of an - unspecified number of parts. Requires the MESSAGE-ID Armor Header - to be used. - - BEGIN PGP SIGNATURE - Used for detached signatures, OpenPGP/MIME signatures, and - natures following clearsigned messages. Note that PGP 2.x s BEGIN - PGP MESSAGE for detached signatures. - - The Armor Headers are pairs of strings that can give the user or the - receiving OpenPGP implementation some information about how to decode - or use the message. The Armor Headers are a part of the armor, not a - part of the message, and hence are not protected by any signatures - applied to the message. - - The format of an Armor Header is that of a key-value pair. A colon - (':' 0x38) and a single space (0x20) separate the key and value. - OpenPGP should consider improperly formatted Armor Headers to be - corruption of the ASCII Armor. Unknown keys should be reported to - the user, but OpenPGP should continue to process the message. - - Currently defined Armor Header Keys are: - - - "Version", that states the OpenPGP Version used to encode the - message. - - - "Comment", a user-defined comment. - - - "MessageID", a 32-character string of printable characters. The - string must be the same for all parts of a multi-part message - that uses the "PART X" Armor Header. MessageID strings should be - - - - - - -Callas, et. al. Standards Track [Page 43] - -RFC 2440 OpenPGP Message Format November 1998 - - - unique enough that the recipient of the mail can associate all - the parts of a message with each other. A good checksum or - cryptographic hash function is sufficient. - - - "Hash", a comma-separated list of hash algorithms used in this - message. This is used only in clear-signed messages. - - - "Charset", a description of the character set that the plaintext - is in. Please note that OpenPGP defines text to be in UTF-8 by - default. An implementation will get best results by translating - into and out of UTF-8. However, there are many instances where - this is easier said than done. Also, there are communities of - users who have no need for UTF-8 because they are all happy with - a character set like ISO Latin-5 or a Japanese character set. In - such instances, an implementation MAY override the UTF-8 default - by using this header key. An implementation MAY implement this - key and any translations it cares to; an implementation MAY - ignore it and assume all text is UTF-8. - - The MessageID SHOULD NOT appear unless it is in a multi-part - message. If it appears at all, it MUST be computed from the - finished (encrypted, signed, etc.) message in a deterministic - fashion, rather than contain a purely random value. This is to - allow the legitimate recipient to determine that the MessageID - cannot serve as a covert means of leaking cryptographic key - information. - - The Armor Tail Line is composed in the same manner as the Armor - Header Line, except the string "BEGIN" is replaced by the string - "END." - -6.3. Encoding Binary in Radix-64 - - The encoding process represents 24-bit groups of input bits as output - strings of 4 encoded characters. Proceeding from left to right, a - 24-bit input group is formed by concatenating three 8-bit input - groups. These 24 bits are then treated as four concatenated 6-bit - groups, each of which is translated into a single digit in the - Radix-64 alphabet. When encoding a bit stream with the Radix-64 - encoding, the bit stream must be presumed to be ordered with the - most-significant-bit first. That is, the first bit in the stream will - be the high-order bit in the first 8-bit octet, and the eighth bit - will be the low-order bit in the first 8-bit octet, and so on. - - - - - - - - -Callas, et. al. Standards Track [Page 44] - -RFC 2440 OpenPGP Message Format November 1998 - - - +--first octet--+-second octet--+--third octet--+ - |7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0| - +-----------+---+-------+-------+---+-----------+ - |5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0| - +--1.index--+--2.index--+--3.index--+--4.index--+ - - Each 6-bit group is used as an index into an array of 64 printable - characters from the table below. The character referenced by the - index is placed in the output string. - - Value Encoding Value Encoding Value Encoding Value Encoding - 0 A 17 R 34 i 51 z - 1 B 18 S 35 j 52 0 - 2 C 19 T 36 k 53 1 - 3 D 20 U 37 l 54 2 - 4 E 21 V 38 m 55 3 - 5 F 22 W 39 n 56 4 - 6 G 23 X 40 o 57 5 - 7 H 24 Y 41 p 58 6 - 8 I 25 Z 42 q 59 7 - 9 J 26 a 43 r 60 8 - 10 K 27 b 44 s 61 9 - 11 L 28 c 45 t 62 + - 12 M 29 d 46 u 63 / - 13 N 30 e 47 v - 14 O 31 f 48 w (pad) = - 15 P 32 g 49 x - 16 Q 33 h 50 y - - The encoded output stream must be represented in lines of no more - than 76 characters each. - - Special processing is performed if fewer than 24 bits are available - at the end of the data being encoded. There are three possibilities: - - 1. The last data group has 24 bits (3 octets). No special - processing is needed. - - 2. The last data group has 16 bits (2 octets). The first two 6-bit - groups are processed as above. The third (incomplete) data group - has two zero-value bits added to it, and is processed as above. - A pad character (=) is added to the output. - - 3. The last data group has 8 bits (1 octet). The first 6-bit group - is processed as above. The second (incomplete) data group has - four zero-value bits added to it, and is processed as above. Two - pad characters (=) are added to the output. - - - - -Callas, et. al. Standards Track [Page 45] - -RFC 2440 OpenPGP Message Format November 1998 - - -6.4. Decoding Radix-64 - - Any characters outside of the base64 alphabet are ignored in Radix-64 - data. Decoding software must ignore all line breaks or other - characters not found in the table above. - - In Radix-64 data, characters other than those in the table, line - breaks, and other white space probably indicate a transmission error, - about which a warning message or even a message rejection might be - appropriate under some circumstances. - - Because it is used only for padding at the end of the data, the - occurrence of any "=" characters may be taken as evidence that the - end of the data has been reached (without truncation in transit). No - such assurance is possible, however, when the number of octets - transmitted was a multiple of three and no "=" characters are - present. - -6.5. Examples of Radix-64 - - Input data: 0x14fb9c03d97e - Hex: 1 4 f b 9 c | 0 3 d 9 7 e - 8-bit: 00010100 11111011 10011100 | 00000011 11011001 - 11111110 - 6-bit: 000101 001111 101110 011100 | 000000 111101 100111 - 111110 - Decimal: 5 15 46 28 0 61 37 62 - Output: F P u c A 9 l + - - Input data: 0x14fb9c03d9 - Hex: 1 4 f b 9 c | 0 3 d 9 - 8-bit: 00010100 11111011 10011100 | 00000011 11011001 - pad with 00 - 6-bit: 000101 001111 101110 011100 | 000000 111101 100100 - Decimal: 5 15 46 28 0 61 36 - pad with = - Output: F P u c A 9 k = - - Input data: 0x14fb9c03 - Hex: 1 4 f b 9 c | 0 3 - 8-bit: 00010100 11111011 10011100 | 00000011 - pad with 0000 - 6-bit: 000101 001111 101110 011100 | 000000 110000 - Decimal: 5 15 46 28 0 48 - pad with = = - Output: F P u c A w = = - - - - - -Callas, et. al. Standards Track [Page 46] - -RFC 2440 OpenPGP Message Format November 1998 - - -6.6. Example of an ASCII Armored Message - - - -----BEGIN PGP MESSAGE----- - Version: OpenPrivacy 0.99 - - yDgBO22WxBHv7O8X7O/jygAEzol56iUKiXmV+XmpCtmpqQUKiQrFqclFqUDBovzS - vBSFjNSiVHsuAA== - =njUN - -----END PGP MESSAGE----- - - Note that this example is indented by two spaces. - -7. Cleartext signature framework - - It is desirable to sign a textual octet stream without ASCII armoring - the stream itself, so the signed text is still readable without - special software. In order to bind a signature to such a cleartext, - this framework is used. (Note that RFC 2015 defines another way to - clear sign messages for environments that support MIME.) - - The cleartext signed message consists of: - - - The cleartext header '-----BEGIN PGP SIGNED MESSAGE-----' on a - single line, - - - One or more "Hash" Armor Headers, - - - Exactly one empty line not included into the message digest, - - - The dash-escaped cleartext that is included into the message - digest, - - - The ASCII armored signature(s) including the '-----BEGIN PGP - SIGNATURE-----' Armor Header and Armor Tail Lines. - - If the "Hash" armor header is given, the specified message digest - algorithm is used for the signature. If there are no such headers, - MD5 is used, an implementation MAY omit them for V2.x compatibility. - If more than one message digest is used in the signature, the "Hash" - armor header contains a comma-delimited list of used message digests. - - Current message digest names are described below with the algorithm - IDs. - -7.1. Dash-Escaped Text - - The cleartext content of the message must also be dash-escaped. - - - -Callas, et. al. Standards Track [Page 47] - -RFC 2440 OpenPGP Message Format November 1998 - - - Dash escaped cleartext is the ordinary cleartext where every line - starting with a dash '-' (0x2D) is prefixed by the sequence dash '-' - (0x2D) and space ' ' (0x20). This prevents the parser from - recognizing armor headers of the cleartext itself. The message digest - is computed using the cleartext itself, not the dash escaped form. - - As with binary signatures on text documents, a cleartext signature is - calculated on the text using canonical line endings. The - line ending (i.e. the ) before the '-----BEGIN PGP - SIGNATURE-----' line that terminates the signed text is not - considered part of the signed text. - - Also, any trailing whitespace (spaces, and tabs, 0x09) at the end of - any line is ignored when the cleartext signature is calculated. - -8. Regular Expressions - - A regular expression is zero or more branches, separated by '|'. It - matches anything that matches one of the branches. - - A branch is zero or more pieces, concatenated. It matches a match for - the first, followed by a match for the second, etc. - - A piece is an atom possibly followed by '*', '+', or '?'. An atom - followed by '*' matches a sequence of 0 or more matches of the atom. - An atom followed by '+' matches a sequence of 1 or more matches of - the atom. An atom followed by '?' matches a match of the atom, or the - null string. - - An atom is a regular expression in parentheses (matching a match for - the regular expression), a range (see below), '.' (matching any - single character), '^' (matching the null string at the beginning of - the input string), '$' (matching the null string at the end of the - input string), a '\' followed by a single character (matching that - character), or a single character with no other significance - (matching that character). - - A range is a sequence of characters enclosed in '[]'. It normally - matches any single character from the sequence. If the sequence - begins with '^', it matches any single character not from the rest of - the sequence. If two characters in the sequence are separated by '-', - this is shorthand for the full list of ASCII characters between them - (e.g. '[0-9]' matches any decimal digit). To include a literal ']' in - the sequence, make it the first character (following a possible '^'). - To include a literal '-', make it the first or last character. - - - - - - -Callas, et. al. Standards Track [Page 48] - -RFC 2440 OpenPGP Message Format November 1998 - - -9. Constants - - This section describes the constants used in OpenPGP. - - Note that these tables are not exhaustive lists; an implementation - MAY implement an algorithm not on these lists. - - See the section "Notes on Algorithms" below for more discussion of - the algorithms. - -9.1. Public Key Algorithms - - ID Algorithm - -- --------- - 1 - RSA (Encrypt or Sign) - 2 - RSA Encrypt-Only - 3 - RSA Sign-Only - 16 - Elgamal (Encrypt-Only), see [ELGAMAL] - 17 - DSA (Digital Signature Standard) - 18 - Reserved for Elliptic Curve - 19 - Reserved for ECDSA - 20 - Elgamal (Encrypt or Sign) - - - - - - 21 - Reserved for Diffie-Hellman (X9.42, - as defined for IETF-S/MIME) - 100 to 110 - Private/Experimental algorithm. - - Implementations MUST implement DSA for signatures, and Elgamal for - encryption. Implementations SHOULD implement RSA keys. - Implementations MAY implement any other algorithm. - -9.2. Symmetric Key Algorithms - - ID Algorithm - -- --------- - 0 - Plaintext or unencrypted data - 1 - IDEA [IDEA] - 2 - Triple-DES (DES-EDE, as per spec - - 168 bit key derived from 192) - 3 - CAST5 (128 bit key, as per RFC 2144) - 4 - Blowfish (128 bit key, 16 rounds) [BLOWFISH] - 5 - SAFER-SK128 (13 rounds) [SAFER] - 6 - Reserved for DES/SK - 7 - Reserved for AES with 128-bit key - - - -Callas, et. al. Standards Track [Page 49] - -RFC 2440 OpenPGP Message Format November 1998 - - - 8 - Reserved for AES with 192-bit key - 9 - Reserved for AES with 256-bit key - 100 to 110 - Private/Experimental algorithm. - - Implementations MUST implement Triple-DES. Implementations SHOULD - implement IDEA and CAST5.Implementations MAY implement any other - algorithm. - -9.3. Compression Algorithms - - ID Algorithm - -- --------- - 0 - Uncompressed - 1 - ZIP (RFC 1951) - 2 - ZLIB (RFC 1950) - 100 to 110 - Private/Experimental algorithm. - - Implementations MUST implement uncompressed data. Implementations - SHOULD implement ZIP. Implementations MAY implement ZLIB. - -9.4. Hash Algorithms - - ID Algorithm Text Name - -- --------- ---- ---- - 1 - MD5 "MD5" - 2 - SHA-1 "SHA1" - 3 - RIPE-MD/160 "RIPEMD160" - 4 - Reserved for double-width SHA (experimental) - 5 - MD2 "MD2" - 6 - Reserved for TIGER/192 "TIGER192" - 7 - Reserved for HAVAL (5 pass, 160-bit) - "HAVAL-5-160" - 100 to 110 - Private/Experimental algorithm. - - Implementations MUST implement SHA-1. Implementations SHOULD - implement MD5. - -10. Packet Composition - - OpenPGP packets are assembled into sequences in order to create - messages and to transfer keys. Not all possible packet sequences are - meaningful and correct. This describes the rules for how packets - should be placed into sequences. - -10.1. Transferable Public Keys - - OpenPGP users may transfer public keys. The essential elements of a - transferable public key are: - - - -Callas, et. al. Standards Track [Page 50] - -RFC 2440 OpenPGP Message Format November 1998 - - - - One Public Key packet - - - Zero or more revocation signatures - - - One or more User ID packets - - - After each User ID packet, zero or more signature packets - (certifications) - - - Zero or more Subkey packets - - - After each Subkey packet, one signature packet, optionally a - revocation. - - The Public Key packet occurs first. Each of the following User ID - packets provides the identity of the owner of this public key. If - there are multiple User ID packets, this corresponds to multiple - means of identifying the same unique individual user; for example, a - user may have more than one email address, and construct a User ID - for each one. - - Immediately following each User ID packet, there are zero or more - signature packets. Each signature packet is calculated on the - immediately preceding User ID packet and the initial Public Key - packet. The signature serves to certify the corresponding public key - and user ID. In effect, the signer is testifying to his or her - belief that this public key belongs to the user identified by this - user ID. - - After the User ID packets there may be one or more Subkey packets. - In general, subkeys are provided in cases where the top-level public - key is a signature-only key. However, any V4 key may have subkeys, - and the subkeys may be encryption-only keys, signature-only keys, or - general-purpose keys. - - Each Subkey packet must be followed by one Signature packet, which - should be a subkey binding signature issued by the top level key. - - Subkey and Key packets may each be followed by a revocation Signature - packet to indicate that the key is revoked. Revocation signatures - are only accepted if they are issued by the key itself, or by a key - that is authorized to issue revocations via a revocation key - subpacket in a self-signature by the top level key. - - Transferable public key packet sequences may be concatenated to allow - transferring multiple public keys in one operation. - - - - - -Callas, et. al. Standards Track [Page 51] - -RFC 2440 OpenPGP Message Format November 1998 - - -10.2. OpenPGP Messages - - An OpenPGP message is a packet or sequence of packets that - corresponds to the following grammatical rules (comma represents - sequential composition, and vertical bar separates alternatives): - - OpenPGP Message :- Encrypted Message | Signed Message | - Compressed Message | Literal Message. - - Compressed Message :- Compressed Data Packet. - - Literal Message :- Literal Data Packet. - - ESK :- Public Key Encrypted Session Key Packet | - Symmetric-Key Encrypted Session Key Packet. - - ESK Sequence :- ESK | ESK Sequence, ESK. - - Encrypted Message :- Symmetrically Encrypted Data Packet | - ESK Sequence, Symmetrically Encrypted Data Packet. - - One-Pass Signed Message :- One-Pass Signature Packet, - OpenPGP Message, Corresponding Signature Packet. - - Signed Message :- Signature Packet, OpenPGP Message | - One-Pass Signed Message. - - In addition, decrypting a Symmetrically Encrypted Data packet and - - decompressing a Compressed Data packet must yield a valid OpenPGP - Message. - -10.3. Detached Signatures - - Some OpenPGP applications use so-called "detached signatures." For - example, a program bundle may contain a file, and with it a second - file that is a detached signature of the first file. These detached - signatures are simply a signature packet stored separately from the - data that they are a signature of. - -11. Enhanced Key Formats - -11.1. Key Structures - - The format of an OpenPGP V3 key is as follows. Entries in square - brackets are optional and ellipses indicate repetition. - - - - - -Callas, et. al. Standards Track [Page 52] - -RFC 2440 OpenPGP Message Format November 1998 - - - RSA Public Key - [Revocation Self Signature] - User ID [Signature ...] - [User ID [Signature ...] ...] - - Each signature certifies the RSA public key and the preceding user - ID. The RSA public key can have many user IDs and each user ID can - have many signatures. - - The format of an OpenPGP V4 key that uses two public keys is similar - except that the other keys are added to the end as 'subkeys' of the - primary key. - - Primary-Key - [Revocation Self Signature] - [Direct Key Self Signature...] - User ID [Signature ...] - [User ID [Signature ...] ...] - [[Subkey [Binding-Signature-Revocation] - Primary-Key-Binding-Signature] ...] - - A subkey always has a single signature after it that is issued using - the primary key to tie the two keys together. This binding signature - may be in either V3 or V4 format, but V4 is preferred, of course. - - In the above diagram, if the binding signature of a subkey has been - revoked, the revoked binding signature may be removed, leaving only - one signature. - - In a key that has a main key and subkeys, the primary key MUST be a - key capable of signing. The subkeys may be keys of any other type. - There may be other constructions of V4 keys, too. For example, there - may be a single-key RSA key in V4 format, a DSA primary key with an - RSA encryption key, or RSA primary key with an Elgamal subkey, etc. - - It is also possible to have a signature-only subkey. This permits a - primary key that collects certifications (key signatures) but is used - only used for certifying subkeys that are used for encryption and - signatures. - -11.2. Key IDs and Fingerprints - - For a V3 key, the eight-octet key ID consists of the low 64 bits of - the public modulus of the RSA key. - - The fingerprint of a V3 key is formed by hashing the body (but not - the two-octet length) of the MPIs that form the key material (public - modulus n, followed by exponent e) with MD5. - - - -Callas, et. al. Standards Track [Page 53] - -RFC 2440 OpenPGP Message Format November 1998 - - - A V4 fingerprint is the 160-bit SHA-1 hash of the one-octet Packet - Tag, followed by the two-octet packet length, followed by the entire - Public Key packet starting with the version field. The key ID is the - low order 64 bits of the fingerprint. Here are the fields of the - hash material, with the example of a DSA key: - - a.1) 0x99 (1 octet) - - a.2) high order length octet of (b)-(f) (1 octet) - - a.3) low order length octet of (b)-(f) (1 octet) - - b) version number = 4 (1 octet); - - c) time stamp of key creation (4 octets); - - d) algorithm (1 octet): 17 = DSA (example); - - e) Algorithm specific fields. - - Algorithm Specific Fields for DSA keys (example): - - e.1) MPI of DSA prime p; - - e.2) MPI of DSA group order q (q is a prime divisor of p-1); - - e.3) MPI of DSA group generator g; - - e.4) MPI of DSA public key value y (= g**x where x is secret). - - Note that it is possible for there to be collisions of key IDs -- two - different keys with the same key ID. Note that there is a much - smaller, but still non-zero probability that two different keys have - the same fingerprint. - - Also note that if V3 and V4 format keys share the same RSA key - material, they will have different key ids as well as different - fingerprints. - -12. Notes on Algorithms - -12.1. Symmetric Algorithm Preferences - - The symmetric algorithm preference is an ordered list of algorithms - that the keyholder accepts. Since it is found on a self-signature, it - is possible that a keyholder may have different preferences. For - example, Alice may have TripleDES only specified for "alice@work.com" - but CAST5, Blowfish, and TripleDES specified for "alice@home.org". - - - -Callas, et. al. Standards Track [Page 54] - -RFC 2440 OpenPGP Message Format November 1998 - - - Note that it is also possible for preferences to be in a subkey's - binding signature. - - Since TripleDES is the MUST-implement algorithm, if it is not - explicitly in the list, it is tacitly at the end. However, it is good - form to place it there explicitly. Note also that if an - implementation does not implement the preference, then it is - implicitly a TripleDES-only implementation. - - An implementation MUST not use a symmetric algorithm that is not in - the recipient's preference list. When encrypting to more than one - recipient, the implementation finds a suitable algorithm by taking - the intersection of the preferences of the recipients. Note that the - MUST-implement algorithm, TripleDES, ensures that the intersection is - not null. The implementation may use any mechanism to pick an - algorithm in the intersection. - - If an implementation can decrypt a message that a keyholder doesn't - have in their preferences, the implementation SHOULD decrypt the - message anyway, but MUST warn the keyholder than protocol has been - violated. (For example, suppose that Alice, above, has software that - implements all algorithms in this specification. Nonetheless, she - prefers subsets for work or home. If she is sent a message encrypted - with IDEA, which is not in her preferences, the software warns her - that someone sent her an IDEA-encrypted message, but it would ideally - decrypt it anyway.) - - An implementation that is striving for backward compatibility MAY - consider a V3 key with a V3 self-signature to be an implicit - preference for IDEA, and no ability to do TripleDES. This is - technically non-compliant, but an implementation MAY violate the - above rule in this case only and use IDEA to encrypt the message, - provided that the message creator is warned. Ideally, though, the - implementation would follow the rule by actually generating two - messages, because it is possible that the OpenPGP user's - implementation does not have IDEA, and thus could not read the - message. Consequently, an implementation MAY, but SHOULD NOT use IDEA - in an algorithm conflict with a V3 key. - -12.2. Other Algorithm Preferences - - Other algorithm preferences work similarly to the symmetric algorithm - preference, in that they specify which algorithms the keyholder - accepts. There are two interesting cases that other comments need to - be made about, though, the compression preferences and the hash - preferences. - - - - - -Callas, et. al. Standards Track [Page 55] - -RFC 2440 OpenPGP Message Format November 1998 - - -12.2.1. Compression Preferences - - Compression has been an integral part of PGP since its first days. - OpenPGP and all previous versions of PGP have offered compression. - And in this specification, the default is for messages to be - compressed, although an implementation is not required to do so. - Consequently, the compression preference gives a way for a keyholder - to request that messages not be compressed, presumably because they - are using a minimal implementation that does not include compression. - Additionally, this gives a keyholder a way to state that it can - support alternate algorithms. - - Like the algorithm preferences, an implementation MUST NOT use an - algorithm that is not in the preference vector. If the preferences - are not present, then they are assumed to be [ZIP(1), - UNCOMPRESSED(0)]. - -12.2.2. Hash Algorithm Preferences - - Typically, the choice of a hash algorithm is something the signer - does, rather than the verifier, because a signer does not typically - know who is going to be verifying the signature. This preference, - though, allows a protocol based upon digital signatures ease in - negotiation. - - Thus, if Alice is authenticating herself to Bob with a signature, it - makes sense for her to use a hash algorithm that Bob's software uses. - This preference allows Bob to state in his key which algorithms Alice - may use. - -12.3. Plaintext - - Algorithm 0, "plaintext", may only be used to denote secret keys that - are stored in the clear. Implementations must not use plaintext in - Symmetrically Encrypted Data Packets; they must use Literal Data - Packets to encode unencrypted or literal data. - -12.4. RSA - - There are algorithm types for RSA-signature-only, and RSA-encrypt- - only keys. These types are deprecated. The "key flags" subpacket in a - signature is a much better way to express the same idea, and - generalizes it to all algorithms. An implementation SHOULD NOT create - such a key, but MAY interpret it. - - An implementation SHOULD NOT implement RSA keys of size less than 768 - bits. - - - - -Callas, et. al. Standards Track [Page 56] - -RFC 2440 OpenPGP Message Format November 1998 - - - It is permissible for an implementation to support RSA merely for - backward compatibility; for example, such an implementation would - support V3 keys with IDEA symmetric cryptography. Note that this is - an exception to the other MUST-implement rules. An implementation - that supports RSA in V4 keys MUST implement the MUST-implement - features. - -12.5. Elgamal - - If an Elgamal key is to be used for both signing and encryption, - extra care must be taken in creating the key. - - An ElGamal key consists of a generator g, a prime modulus p, a secret - exponent x, and a public value y = g^x mod p. - - The generator and prime must be chosen so that solving the discrete - log problem is intractable. The group g should generate the - multiplicative group mod p-1 or a large subgroup of it, and the order - of g should have at least one large prime factor. A good choice is - to use a "strong" Sophie-Germain prime in choosing p, so that both p - and (p-1)/2 are primes. In fact, this choice is so good that - implementors SHOULD do it, as it avoids a small subgroup attack. - - In addition, a result of Bleichenbacher [BLEICHENBACHER] shows that - if the generator g has only small prime factors, and if g divides the - order of the group it generates, then signatures can be forged. In - particular, choosing g=2 is a bad choice if the group order may be - even. On the other hand, a generator of 2 is a fine choice for an - encryption-only key, as this will make the encryption faster. - - While verifying Elgamal signatures, note that it is important to test - that r and s are less than p. If this test is not done then - signatures can be trivially forged by using large r values of - approximately twice the length of p. This attack is also discussed - in the Bleichenbacher paper. - - Details on safe use of Elgamal signatures may be found in [MENEZES], - which discusses all the weaknesses described above. - - If an implementation allows Elgamal signatures, then it MUST use the - algorithm identifier 20 for an Elgamal public key that can sign. - - An implementation SHOULD NOT implement Elgamal keys of size less than - 768 bits. For long-term security, Elgamal keys should be 1024 bits or - longer. - - - - - - -Callas, et. al. Standards Track [Page 57] - -RFC 2440 OpenPGP Message Format November 1998 - - -12.6. DSA - - An implementation SHOULD NOT implement DSA keys of size less than 768 - bits. Note that present DSA is limited to a maximum of 1024 bit keys, - which are recommended for long-term use. - -12.7. Reserved Algorithm Numbers - - A number of algorithm IDs have been reserved for algorithms that - would be useful to use in an OpenPGP implementation, yet there are - issues that prevent an implementor from actually implementing the - algorithm. These are marked in the Public Algorithms section as - "(reserved for)". - - The reserved public key algorithms, Elliptic Curve (18), ECDSA (19), - and X9.42 (21) do not have the necessary parameters, parameter order, - or semantics defined. - - The reserved symmetric key algorithm, DES/SK (6), does not have - semantics defined. - - The reserved hash algorithms, TIGER192 (6), and HAVAL-5-160 (7), do - not have OIDs. The reserved algorithm number 4, reserved for a - double-width variant of SHA1, is not presently defined. - - We have reserver three algorithm IDs for the US NIST's Advanced - Encryption Standard. This algorithm will work with (at least) 128, - 192, and 256-bit keys. We expect that this algorithm will be selected - from the candidate algorithms in the year 2000. - -12.8. OpenPGP CFB mode - - OpenPGP does symmetric encryption using a variant of Cipher Feedback - Mode (CFB mode). This section describes the procedure it uses in - detail. This mode is what is used for Symmetrically Encrypted Data - Packets; the mechanism used for encrypting secret key material is - similar, but described in those sections above. - - OpenPGP CFB mode uses an initialization vector (IV) of all zeros, and - prefixes the plaintext with ten octets of random data, such that - octets 9 and 10 match octets 7 and 8. It does a CFB "resync" after - encrypting those ten octets. - - Note that for an algorithm that has a larger block size than 64 bits, - the equivalent function will be done with that entire block. For - example, a 16-octet block algorithm would operate on 16 octets, and - then produce two octets of check, and then work on 16-octet blocks. - - - - -Callas, et. al. Standards Track [Page 58] - -RFC 2440 OpenPGP Message Format November 1998 - - - Step by step, here is the procedure: - - 1. The feedback register (FR) is set to the IV, which is all zeros. - - 2. FR is encrypted to produce FRE (FR Encrypted). This is the - encryption of an all-zero value. - - 3. FRE is xored with the first 8 octets of random data prefixed to - the plaintext to produce C1-C8, the first 8 octets of ciphertext. - - 4. FR is loaded with C1-C8. - - 5. FR is encrypted to produce FRE, the encryption of the first 8 - octets of ciphertext. - - 6. The left two octets of FRE get xored with the next two octets of - data that were prefixed to the plaintext. This produces C9-C10, - the next two octets of ciphertext. - - 7. (The resync step) FR is loaded with C3-C10. - - 8. FR is encrypted to produce FRE. - - 9. FRE is xored with the first 8 octets of the given plaintext, now - that we have finished encrypting the 10 octets of prefixed data. - This produces C11-C18, the next 8 octets of ciphertext. - - 10. FR is loaded with C11-C18 - - 11. FR is encrypted to produce FRE. - - 12. FRE is xored with the next 8 octets of plaintext, to produce the - next 8 octets of ciphertext. These are loaded into FR and the - process is repeated until the plaintext is used up. - -13. Security Considerations - - As with any technology involving cryptography, you should check the - current literature to determine if any algorithms used here have been - found to be vulnerable to attack. - - This specification uses Public Key Cryptography technologies. - Possession of the private key portion of a public-private key pair is - assumed to be controlled by the proper party or parties. - - Certain operations in this specification involve the use of random - numbers. An appropriate entropy source should be used to generate - these numbers. See RFC 1750. - - - -Callas, et. al. Standards Track [Page 59] - -RFC 2440 OpenPGP Message Format November 1998 - - - The MD5 hash algorithm has been found to have weaknesses (pseudo- - collisions in the compress function) that make some people deprecate - its use. They consider the SHA-1 algorithm better. - - Many security protocol designers think that it is a bad idea to use a - single key for both privacy (encryption) and integrity (signatures). - In fact, this was one of the motivating forces behind the V4 key - format with separate signature and encryption keys. If you as an - implementor promote dual-use keys, you should at least be aware of - this controversy. - - The DSA algorithm will work with any 160-bit hash, but it is - sensitive to the quality of the hash algorithm, if the hash algorithm - is broken, it can leak the secret key. The Digital Signature Standard - (DSS) specifies that DSA be used with SHA-1. RIPEMD-160 is - considered by many cryptographers to be as strong. An implementation - should take care which hash algorithms are used with DSA, as a weak - hash can not only allow a signature to be forged, but could leak the - secret key. These same considerations about the quality of the hash - algorithm apply to Elgamal signatures. - - If you are building an authentication system, the recipient may - specify a preferred signing algorithm. However, the signer would be - foolish to use a weak algorithm simply because the recipient requests - it. - - Some of the encryption algorithms mentioned in this document have - been analyzed less than others. For example, although CAST5 is - presently considered strong, it has been analyzed less than Triple- - DES. Other algorithms may have other controversies surrounding them. - - Some technologies mentioned here may be subject to government control - in some countries. - -14. Implementation Nits - - This section is a collection of comments to help an implementer, - particularly with an eye to backward compatibility. Previous - implementations of PGP are not OpenPGP-compliant. Often the - differences are small, but small differences are frequently more - vexing than large differences. Thus, this list of potential problems - and gotchas for a developer who is trying to be backward-compatible. - - * PGP 5.x does not accept V4 signatures for anything other than - key material. - - * PGP 5.x does not recognize the "five-octet" lengths in new-format - headers or in signature subpacket lengths. - - - -Callas, et. al. Standards Track [Page 60] - -RFC 2440 OpenPGP Message Format November 1998 - - - * PGP 5.0 rejects an encrypted session key if the keylength differs - from the S2K symmetric algorithm. This is a bug in its validation - function. - - * PGP 5.0 does not handle multiple one-pass signature headers and - trailers. Signing one will compress the one-pass signed literal - and prefix a V3 signature instead of doing a nested one-pass - signature. - - * When exporting a private key, PGP 2.x generates the header "BEGIN - PGP SECRET KEY BLOCK" instead of "BEGIN PGP PRIVATE KEY BLOCK". - All previous versions ignore the implied data type, and look - directly at the packet data type. - - * In a clear-signed signature, PGP 5.0 will figure out the correct - hash algorithm if there is no "Hash:" header, but it will reject - a mismatch between the header and the actual algorithm used. The - "standard" (i.e. Zimmermann/Finney/et al.) version of PGP 2.x - rejects the "Hash:" header and assumes MD5. There are a number of - enhanced variants of PGP 2.6.x that have been modified for SHA-1 - signatures. - - * PGP 5.0 can read an RSA key in V4 format, but can only recognize - it with a V3 keyid, and can properly use only a V3 format RSA - key. - - * Neither PGP 5.x nor PGP 6.0 recognize Elgamal Encrypt and Sign - keys. They only handle Elgamal Encrypt-only keys. - - * There are many ways possible for two keys to have the same key - material, but different fingerprints (and thus key ids). Perhaps - the most interesting is an RSA key that has been "upgraded" to V4 - format, but since a V4 fingerprint is constructed by hashing the - key creation time along with other things, two V4 keys created at - different times, yet with the same key material will have - different fingerprints. - - * If an implementation is using zlib to interoperate with PGP 2.x, - then the "windowBits" parameter should be set to -13. - - - - - - - - - - - - -Callas, et. al. Standards Track [Page 61] - -RFC 2440 OpenPGP Message Format November 1998 - - -15. Authors and Working Group Chair - - The working group can be contacted via the current chair: - - John W. Noerenberg, II - Qualcomm, Inc - 6455 Lusk Blvd - San Diego, CA 92131 USA - - Phone: +1 619-658-3510 - EMail: jwn2@qualcomm.com - - - The principal authors of this memo are: - - Jon Callas - Network Associates, Inc. - 3965 Freedom Circle - Santa Clara, CA 95054, USA - - Phone: +1 408-346-5860 - EMail: jon@pgp.com, jcallas@nai.com - - - Lutz Donnerhacke - IKS GmbH - Wildenbruchstr. 15 - 07745 Jena, Germany - - Phone: +49-3641-675642 - EMail: lutz@iks-jena.de - - - Hal Finney - Network Associates, Inc. - 3965 Freedom Circle - Santa Clara, CA 95054, USA - - EMail: hal@pgp.com - - - Rodney Thayer - EIS Corporation - Clearwater, FL 33767, USA - - EMail: rodney@unitran.com - - - - - -Callas, et. al. Standards Track [Page 62] - -RFC 2440 OpenPGP Message Format November 1998 - - - This memo also draws on much previous work from a number of other - authors who include: Derek Atkins, Charles Breed, Dave Del Torto, - Marc Dyksterhouse, Gail Haspert, Gene Hoffman, Paul Hoffman, Raph - Levien, Colin Plumb, Will Price, William Stallings, Mark Weaver, and - Philip R. Zimmermann. - -16. References - - [BLEICHENBACHER] Bleichenbacher, Daniel, "Generating ElGamal - signatures without knowing the secret key," - Eurocrypt 96. Note that the version in the - proceedings has an error. A revised version is - available at the time of writing from - - - [BLOWFISH] Schneier, B. "Description of a New Variable-Length - Key, 64-Bit Block Cipher (Blowfish)" Fast Software - Encryption, Cambridge Security Workshop Proceedings - (December 1993), Springer-Verlag, 1994, pp191-204 - - - - [DONNERHACKE] Donnerhacke, L., et. al, "PGP263in - an improved - international version of PGP", ftp://ftp.iks- - jena.de/mitarb/lutz/crypt/software/pgp/ - - [ELGAMAL] T. ElGamal, "A Public-Key Cryptosystem and a - Signature Scheme Based on Discrete Logarithms," IEEE - Transactions on Information Theory, v. IT-31, n. 4, - 1985, pp. 469-472. - - [IDEA] Lai, X, "On the design and security of block - ciphers", ETH Series in Information Processing, J.L. - Massey (editor), Vol. 1, Hartung-Gorre Verlag - Knostanz, Technische Hochschule (Zurich), 1992 - - [ISO-10646] ISO/IEC 10646-1:1993. International Standard -- - Information technology -- Universal Multiple-Octet - Coded Character Set (UCS) -- Part 1: Architecture - and Basic Multilingual Plane. UTF-8 is described in - Annex R, adopted but not yet published. UTF-16 is - described in Annex Q, adopted but not yet published. - - [MENEZES] Alfred Menezes, Paul van Oorschot, and Scott - Vanstone, "Handbook of Applied Cryptography," CRC - Press, 1996. - - - - -Callas, et. al. Standards Track [Page 63] - -RFC 2440 OpenPGP Message Format November 1998 - - - [RFC822] Crocker, D., "Standard for the format of ARPA - Internet text messages", STD 11, RFC 822, August - 1982. - - [RFC1423] Balenson, D., "Privacy Enhancement for Internet - Electronic Mail: Part III: Algorithms, Modes, and - Identifiers", RFC 1423, October 1993. - - [RFC1641] Goldsmith, D. and M. Davis, "Using Unicode with - MIME", RFC 1641, July 1994. - - [RFC1750] Eastlake, D., Crocker, S. and J. Schiller, - "Randomness Recommendations for Security", RFC 1750, - December 1994. - - [RFC1951] Deutsch, P., "DEFLATE Compressed Data Format - Specification version 1.3.", RFC 1951, May 1996. - - [RFC1983] Malkin, G., "Internet Users' Glossary", FYI 18, RFC - 1983, August 1996. - - [RFC1991] Atkins, D., Stallings, W. and P. Zimmermann, "PGP - Message Exchange Formats", RFC 1991, August 1996. - - [RFC2015] Elkins, M., "MIME Security with Pretty Good Privacy - (PGP)", RFC 2015, October 1996. - - [RFC2231] Borenstein, N. and N. Freed, "Multipurpose Internet - Mail Extensions (MIME) Part One: Format of Internet - Message Bodies.", RFC 2231, November 1996. - - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Level", BCP 14, RFC 2119, March 1997. - - [RFC2144] Adams, C., "The CAST-128 Encryption Algorithm", RFC - 2144, May 1997. - - [RFC2279] Yergeau., F., "UTF-8, a transformation format of - Unicode and ISO 10646", RFC 2279, January 1998. - - [RFC2313] Kaliski, B., "PKCS #1: RSA Encryption Standard - version 1.5", RFC 2313, March 1998. - - [SAFER] Massey, J.L. "SAFER K-64: One Year Later", B. - Preneel, editor, Fast Software Encryption, Second - International Workshop (LNCS 1008) pp212-241, - Springer-Verlag 1995 - - - - -Callas, et. al. Standards Track [Page 64] - -RFC 2440 OpenPGP Message Format November 1998 - - -17. Full Copyright Statement - - Copyright (C) The Internet Society (1998). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - - - - - - - - - - - - - - - - - - - - - - - - -Callas, et. al. Standards Track [Page 65] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2487.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2487.txt deleted file mode 100644 index fb1305f0..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2487.txt +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - -Network Working Group P. Hoffman -Request for Comments: 2487 Internet Mail Consortium -Category: Standards Track January 1999 - - - SMTP Service Extension for Secure SMTP over TLS - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (1999). All Rights Reserved. - -1. Abstract - - This document describes an extension to the SMTP service that allows - an SMTP server and client to use transport-layer security to provide - private, authenticated communication over the Internet. This gives - SMTP agents the ability to protect some or all of their - communications from eavesdroppers and attackers. - -2. Introduction - - SMTP [RFC-821] servers and clients normally communicate in the clear - over the Internet. In many cases, this communication goes through one - or more router that is not controlled or trusted by either entity. - Such an untrusted router might allow a third party to monitor or - alter the communications between the server and client. - - Further, there is often a desire for two SMTP agents to be able to - authenticate each others' identities. For example, a secure SMTP - server might only allow communications from other SMTP agents it - knows, or it might act differently for messages received from an - agent it knows than from one it doesn't know. - - TLS [TLS], more commonly known as SSL, is a popular mechanism for - enhancing TCP communications with privacy and authentication. TLS is - in wide use with the HTTP protocol, and is also being used for adding - security to many other common protocols that run over TCP. - - - - - - -Hoffman Standards Track [Page 1] - -RFC 2487 SMTP Service Extension January 1999 - - -2.1 Terminology - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", - "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this - document are to be interpreted as described in [RFC-2119]. - -3. STARTTLS Extension - - The STARTTLS extension to SMTP is laid out as follows: - - (1) the name of the SMTP service defined here is STARTTLS; - - (2) the EHLO keyword value associated with the extension is STARTTLS; - - (3) the STARTTLS keyword has no parameters; - - (4) a new SMTP verb, "STARTTLS", is defined; - - (5) no additional parameters are added to any SMTP command. - -4. The STARTTLS Keyword - - The STARTTLS keyword is used to tell the SMTP client that the SMTP - server allows use of TLS. It takes no parameters. - -5. The STARTTLS Command - - The format for the STARTTLS command is: - - STARTTLS - - with no parameters. - - After the client gives the STARTTLS command, the server responds with - one of the following reply codes: - - 220 Ready to start TLS - 501 Syntax error (no parameters allowed) - 454 TLS not available due to temporary reason - - A publicly-referenced SMTP server MUST NOT require use of the - STARTTLS extension in order to deliver mail locally. This rule - prevents the STARTTLS extension from damaging the interoperability of - the Internet's SMTP infrastructure. A publicly-referenced SMTP server - is an SMTP server which runs on port 25 of an Internet host listed in - the MX record (or A record if an MX record is not present) for the - domain name on the right hand side of an Internet mail address. - - - - -Hoffman Standards Track [Page 2] - -RFC 2487 SMTP Service Extension January 1999 - - - Any SMTP server may refuse to accept messages for relay based on - authentication supplied during the TLS negotiation. An SMTP server - that is not publicly referenced may refuse to accept any messages for - relay or local delivery based on authentication supplied during the - TLS negotiation. - - A SMTP server that is not publicly referenced may choose to require - that the client perform a TLS negotiation before accepting any - commands. In this case, the server SHOULD return the reply code: - - 530 Must issue a STARTTLS command first - - to every command other than NOOP, EHLO, STARTTLS, or QUIT. If the - client and server are using the ENHANCEDSTATUSCODES ESMTP extension - [RFC-2034], the status code to be returned SHOULD be 5.7.0. - - After receiving a 220 response to a STARTTLS command, the client - SHOULD start the TLS negotiation before giving any other SMTP - commands. - - If the SMTP client is using pipelining as defined in RFC 1854, the - STARTTLS command must be the last command in a group. - -5.1 Processing After the STARTTLS Command - - After the TLS handshake has been completed, both parties MUST - immediately decide whether or not to continue based on the - authentication and privacy achieved. The SMTP client and server may - decide to move ahead even if the TLS negotiation ended with no - authentication and/or no privacy because most SMTP services are - performed with no authentication and no privacy, but some SMTP - clients or servers may want to continue only if a particular level of - authentication and/or privacy was achieved. - - If the SMTP client decides that the level of authentication or - privacy is not high enough for it to continue, it SHOULD issue an - SMTP QUIT command immediately after the TLS negotiation is complete. - If the SMTP server decides that the level of authentication or - privacy is not high enough for it to continue, it SHOULD reply to - every SMTP command from the client (other than a QUIT command) with - the 554 reply code (with a possible text string such as "Command - refused due to lack of security"). - - The decision of whether or not to believe the authenticity of the - other party in a TLS negotiation is a local matter. However, some - general rules for the decisions are: - - - - - -Hoffman Standards Track [Page 3] - -RFC 2487 SMTP Service Extension January 1999 - - - - A SMTP client would probably only want to authenticate an SMTP - server whose server certificate has a domain name that is the - domain name that the client thought it was connecting to. - - A publicly-referenced SMTP server would probably want to accept - any certificate from an SMTP client, and would possibly want to - put distinguishing information about the certificate in the - Received header of messages that were relayed or submitted from - the client. - -5.2 Result of the STARTTLS Command - - Upon completion of the TLS handshake, the SMTP protocol is reset to - the initial state (the state in SMTP after a server issues a 220 - service ready greeting). The server MUST discard any knowledge - obtained from the client, such as the argument to the EHLO command, - which was not obtained from the TLS negotiation itself. The client - MUST discard any knowledge obtained from the server, such as the list - of SMTP service extensions, which was not obtained from the TLS - negotiation itself. The client SHOULD send an EHLO command as the - first command after a successful TLS negotiation. - - The list of SMTP service extensions returned in response to an EHLO - command received after the TLS handshake MAY be different than the - list returned before the TLS handshake. For example, an SMTP server - might not want to advertise support for a particular SASL mechanism - [SASL] unless a client has sent an appropriate client certificate - during a TLS handshake. - - Both the client and the server MUST know if there is a TLS session - active. A client MUST NOT attempt to start a TLS session if a TLS - session is already active. A server MUST NOT return the TLS extension - in response to an EHLO command received after a TLS handshake has - completed. - -6. Usage Example - - The following dialog illustrates how a client and server can start a - TLS session: - - S: - C: - S: 220 mail.imc.org SMTP service ready - C: EHLO mail.ietf.org - S: 250-mail.imc.org offers a warm hug of welcome - S: 250 STARTTLS - C: STARTTLS - S: 220 Go ahead - C: - - - -Hoffman Standards Track [Page 4] - -RFC 2487 SMTP Service Extension January 1999 - - - C & S: - C & S: - C: - . . . - -7. Security Considerations - - It should be noted that SMTP is not an end-to-end mechanism. Thus, if - an SMTP client/server pair decide to add TLS privacy, they are not - securing the transport from the originating mail user agent to the - recipient. Further, because delivery of a single piece of mail may - go between more than two SMTP servers, adding TLS privacy to one pair - of servers does not mean that the entire SMTP chain has been made - private. Further, just because an SMTP server can authenticate an - SMTP client, it does not mean that the mail from the SMTP client was - authenticated by the SMTP client when the client received it. - - Both the STMP client and server must check the result of the TLS - negotiation to see whether acceptable authentication or privacy was - achieved. Ignoring this step completely invalidates using TLS for - security. The decision about whether acceptable authentication or - privacy was achieved is made locally, is implementation-dependant, - and is beyond the scope of this document. - - The SMTP client and server should note carefully the result of the - TLS negotiation. If the negotiation results in no privacy, or if it - results in privacy using algorithms or key lengths that are deemed - not strong enough, or if the authentication is not good enough for - either party, the client may choose to end the SMTP session with an - immediate QUIT command, or the server may choose to not accept any - more SMTP commands. - - A server announcing in an EHLO response that it uses a particular TLS - protocol should not pose any security issues, since any use of TLS - will be at least as secure as no use of TLS. - - A man-in-the-middle attack can be launched by deleting the "250 - STARTTLS" response from the server. This would cause the client not - to try to start a TLS session. An SMTP client can protect against - this attack by recording the fact that a particular SMTP server - offers TLS during one session and generating an alarm if it does not - appear in the EHLO response for a later session. The lack of TLS - during a session SHOULD NOT result in the bouncing of email, although - it could result in delayed processing. - - - - - - - -Hoffman Standards Track [Page 5] - -RFC 2487 SMTP Service Extension January 1999 - - - Before the TLS handshake has begun, any protocol interactions are - performed in the clear and may be modified by an active attacker. For - this reason, clients and servers MUST discard any knowledge obtained - prior to the start of the TLS handshake upon completion of the TLS - handshake. - - The STARTTLS extension is not suitable for authenticating the author - of an email message unless every hop in the delivery chain, including - the submission to the first SMTP server, is authenticated. Another - proposal [SMTP-AUTH] can be used to authenticate delivery and MIME - security multiparts [MIME-SEC] can be used to authenticate the author - of an email message. In addition, the [SMTP-AUTH] proposal offers - simpler and more flexible options to authenticate an SMTP client and - the SASL EXTERNAL mechanism [SASL] MAY be used in conjunction with - the STARTTLS command to provide an authorization identity. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Hoffman Standards Track [Page 6] - -RFC 2487 SMTP Service Extension January 1999 - - -A. References - - [RFC-821] Postel, J., "Simple Mail Transfer Protocol", RFC 821, - August 1982. - - [RFC-1869] Klensin, J., Freed, N, Rose, M, Stefferud, E. and D. - Crocker, "SMTP Service Extensions", STD 10, RFC 1869, - November 1995. - - [RFC-2034] Freed, N., "SMTP Service Extension for Returning Enhanced - Error Codes", RFC 2034, October 1996. - - [RFC-2119] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, March 1997. - - [SASL] Myers, J., "Simple Authentication and Security Layer - (SASL)", RFC 2222, October 1997. - - [SMTP-AUTH] "SMTP Service Extension for Authentication", Work in - Progress. - - [TLS] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", - RFC 2246, January 1999. - -B. Author's Address - - Paul Hoffman - Internet Mail Consortium - 127 Segre Place - Santa Cruz, CA 95060 - - Phone: (831) 426-9827 - EMail: phoffman@imc.org - - - - - - - - - - - - - - - - - - -Hoffman Standards Track [Page 7] - -RFC 2487 SMTP Service Extension January 1999 - - -C. Full Copyright Statement - - Copyright (C) The Internet Society (1999). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - - - - - - - - - - - - - - - - - - - - - - - - -Hoffman Standards Track [Page 8] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2554.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2554.txt deleted file mode 100644 index 2922deae..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2554.txt +++ /dev/null @@ -1,619 +0,0 @@ - - - - - - -Network Working Group J. Myers -Request for Comments: 2554 Netscape Communications -Category: Standards Track March 1999 - - - SMTP Service Extension - for Authentication - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (1999). All Rights Reserved. - - -1. Introduction - - This document defines an SMTP service extension [ESMTP] whereby an - SMTP client may indicate an authentication mechanism to the server, - perform an authentication protocol exchange, and optionally negotiate - a security layer for subsequent protocol interactions. This - extension is a profile of the Simple Authentication and Security - Layer [SASL]. - - -2. Conventions Used in this Document - - In examples, "C:" and "S:" indicate lines sent by the client and - server respectively. - - The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" - in this document are to be interpreted as defined in "Key words for - use in RFCs to Indicate Requirement Levels" [KEYWORDS]. - - -3. The Authentication service extension - - - (1) the name of the SMTP service extension is "Authentication" - - (2) the EHLO keyword value associated with this extension is "AUTH" - - - - -Myers Standards Track [Page 1] - -RFC 2554 SMTP Authentication March 1999 - - - (3) The AUTH EHLO keyword contains as a parameter a space separated - list of the names of supported SASL mechanisms. - - (4) a new SMTP verb "AUTH" is defined - - (5) an optional parameter using the keyword "AUTH" is added to the - MAIL FROM command, and extends the maximum line length of the - MAIL FROM command by 500 characters. - - (6) this extension is appropriate for the submission protocol - [SUBMIT]. - - -4. The AUTH command - - AUTH mechanism [initial-response] - - Arguments: - a string identifying a SASL authentication mechanism. - an optional base64-encoded response - - Restrictions: - After an AUTH command has successfully completed, no more AUTH - commands may be issued in the same session. After a successful - AUTH command completes, a server MUST reject any further AUTH - commands with a 503 reply. - - The AUTH command is not permitted during a mail transaction. - - Discussion: - The AUTH command indicates an authentication mechanism to the - server. If the server supports the requested authentication - mechanism, it performs an authentication protocol exchange to - authenticate and identify the user. Optionally, it also - negotiates a security layer for subsequent protocol - interactions. If the requested authentication mechanism is not - supported, the server rejects the AUTH command with a 504 - reply. - - The authentication protocol exchange consists of a series of - server challenges and client answers that are specific to the - authentication mechanism. A server challenge, otherwise known - as a ready response, is a 334 reply with the text part - containing a BASE64 encoded string. The client answer consists - of a line containing a BASE64 encoded string. If the client - wishes to cancel an authentication exchange, it issues a line - with a single "*". If the server receives such an answer, it - MUST reject the AUTH command by sending a 501 reply. - - - -Myers Standards Track [Page 2] - -RFC 2554 SMTP Authentication March 1999 - - - The optional initial-response argument to the AUTH command is - used to save a round trip when using authentication mechanisms - that are defined to send no data in the initial challenge. - When the initial-response argument is used with such a - mechanism, the initial empty challenge is not sent to the - client and the server uses the data in the initial-response - argument as if it were sent in response to the empty challenge. - Unlike a zero-length client answer to a 334 reply, a zero- - length initial response is sent as a single equals sign ("="). - If the client uses an initial-response argument to the AUTH - command with a mechanism that sends data in the initial - challenge, the server rejects the AUTH command with a 535 - reply. - - If the server cannot BASE64 decode the argument, it rejects the - AUTH command with a 501 reply. If the server rejects the - authentication data, it SHOULD reject the AUTH command with a - 535 reply unless a more specific error code, such as one listed - in section 6, is appropriate. Should the client successfully - complete the authentication exchange, the SMTP server issues a - 235 reply. - - The service name specified by this protocol's profile of SASL - is "smtp". - - If a security layer is negotiated through the SASL - authentication exchange, it takes effect immediately following - the CRLF that concludes the authentication exchange for the - client, and the CRLF of the success reply for the server. Upon - a security layer's taking effect, the SMTP protocol is reset to - the initial state (the state in SMTP after a server issues a - 220 service ready greeting). The server MUST discard any - knowledge obtained from the client, such as the argument to the - EHLO command, which was not obtained from the SASL negotiation - itself. The client MUST discard any knowledge obtained from - the server, such as the list of SMTP service extensions, which - was not obtained from the SASL negotiation itself (with the - exception that a client MAY compare the list of advertised SASL - mechanisms before and after authentication in order to detect - an active down-negotiation attack). The client SHOULD send an - EHLO command as the first command after a successful SASL - negotiation which results in the enabling of a security layer. - - The server is not required to support any particular - authentication mechanism, nor are authentication mechanisms - required to support any security layers. If an AUTH command - fails, the client may try another authentication mechanism by - issuing another AUTH command. - - - -Myers Standards Track [Page 3] - -RFC 2554 SMTP Authentication March 1999 - - - If an AUTH command fails, the server MUST behave the same as if - the client had not issued the AUTH command. - - The BASE64 string may in general be arbitrarily long. Clients - and servers MUST be able to support challenges and responses - that are as long as are generated by the authentication - mechanisms they support, independent of any line length - limitations the client or server may have in other parts of its - protocol implementation. - - Examples: - S: 220 smtp.example.com ESMTP server ready - C: EHLO jgm.example.com - S: 250-smtp.example.com - S: 250 AUTH CRAM-MD5 DIGEST-MD5 - C: AUTH FOOBAR - S: 504 Unrecognized authentication type. - C: AUTH CRAM-MD5 - S: 334 - PENCeUxFREJoU0NnbmhNWitOMjNGNndAZWx3b29kLmlubm9zb2Z0LmNvbT4= - C: ZnJlZCA5ZTk1YWVlMDljNDBhZjJiODRhMGMyYjNiYmFlNzg2ZQ== - S: 235 Authentication successful. - - - -5. The AUTH parameter to the MAIL FROM command - - AUTH=addr-spec - - Arguments: - An addr-spec containing the identity which submitted the message - to the delivery system, or the two character sequence "<>" - indicating such an identity is unknown or insufficiently - authenticated. To comply with the restrictions imposed on ESMTP - parameters, the addr-spec is encoded inside an xtext. The syntax - of an xtext is described in section 5 of [ESMTP-DSN]. - - Discussion: - The optional AUTH parameter to the MAIL FROM command allows - cooperating agents in a trusted environment to communicate the - authentication of individual messages. - - If the server trusts the authenticated identity of the client to - assert that the message was originally submitted by the supplied - addr-spec, then the server SHOULD supply the same addr-spec in an - AUTH parameter when relaying the message to any server which - supports the AUTH extension. - - - - -Myers Standards Track [Page 4] - -RFC 2554 SMTP Authentication March 1999 - - - A MAIL FROM parameter of AUTH=<> indicates that the original - submitter of the message is not known. The server MUST NOT treat - the message as having been originally submitted by the client. - - If the AUTH parameter to the MAIL FROM is not supplied, the - client has authenticated, and the server believes the message is - an original submission by the client, the server MAY supply the - client's identity in the addr-spec in an AUTH parameter when - relaying the message to any server which supports the AUTH - extension. - - If the server does not sufficiently trust the authenticated - identity of the client, or if the client is not authenticated, - then the server MUST behave as if the AUTH=<> parameter was - supplied. The server MAY, however, write the value of the AUTH - parameter to a log file. - - If an AUTH=<> parameter was supplied, either explicitly or due to - the requirement in the previous paragraph, then the server MUST - supply the AUTH=<> parameter when relaying the message to any - server which it has authenticated to using the AUTH extension. - - A server MAY treat expansion of a mailing list as a new - submission, setting the AUTH parameter to the mailing list - address or mailing list administration address when relaying the - message to list subscribers. - - It is conforming for an implementation to be hard-coded to treat - all clients as being insufficiently trusted. In that case, the - implementation does nothing more than parse and discard - syntactically valid AUTH parameters to the MAIL FROM command and - supply AUTH=<> parameters to any servers to which it - authenticates using the AUTH extension. - - Examples: - C: MAIL FROM: AUTH=e+3Dmc2@example.com - S: 250 OK - - - - - - - - - - - - - - -Myers Standards Track [Page 5] - -RFC 2554 SMTP Authentication March 1999 - - -6. Error Codes - - The following error codes may be used to indicate various conditions - as described. - - 432 A password transition is needed - - This response to the AUTH command indicates that the user needs to - transition to the selected authentication mechanism. This typically - done by authenticating once using the PLAIN authentication mechanism. - - 534 Authentication mechanism is too weak - - This response to the AUTH command indicates that the selected - authentication mechanism is weaker than server policy permits for - that user. - - 538 Encryption required for requested authentication mechanism - - This response to the AUTH command indicates that the selected - authentication mechanism may only be used when the underlying SMTP - connection is encrypted. - - 454 Temporary authentication failure - - This response to the AUTH command indicates that the authentication - failed due to a temporary server failure. - - 530 Authentication required - - This response may be returned by any command other than AUTH, EHLO, - HELO, NOOP, RSET, or QUIT. It indicates that server policy requires - authentication in order to perform the requested action. - - - - - - - - - - - - - - - - - - -Myers Standards Track [Page 6] - -RFC 2554 SMTP Authentication March 1999 - - -7. Formal Syntax - - The following syntax specification uses the augmented Backus-Naur - Form (BNF) notation as specified in [ABNF]. - - Except as noted otherwise, all alphabetic characters are case- - insensitive. The use of upper or lower case characters to define - token strings is for editorial clarity only. Implementations MUST - accept these strings in a case-insensitive fashion. - - UPALPHA = %x41-5A ;; Uppercase: A-Z - - LOALPHA = %x61-7A ;; Lowercase: a-z - - ALPHA = UPALPHA / LOALPHA ;; case insensitive - - DIGIT = %x30-39 ;; Digits 0-9 - - HEXDIGIT = %x41-46 / DIGIT ;; hexidecimal digit (uppercase) - - hexchar = "+" HEXDIGIT HEXDIGIT - - xchar = %x21-2A / %x2C-3C / %x3E-7E - ;; US-ASCII except for "+", "=", SPACE and CTL - - xtext = *(xchar / hexchar) - - AUTH_CHAR = ALPHA / DIGIT / "-" / "_" - - auth_type = 1*20AUTH_CHAR - - auth_command = "AUTH" SPACE auth_type [SPACE (base64 / "=")] - *(CRLF [base64]) CRLF - - auth_param = "AUTH=" xtext - ;; The decoded form of the xtext MUST be either - ;; an addr-spec or the two characters "<>" - - base64 = base64_terminal / - ( 1*(4base64_CHAR) [base64_terminal] ) - - base64_char = UPALPHA / LOALPHA / DIGIT / "+" / "/" - ;; Case-sensitive - - base64_terminal = (2base64_char "==") / (3base64_char "=") - - continue_req = "334" SPACE [base64] CRLF - - - - -Myers Standards Track [Page 7] - -RFC 2554 SMTP Authentication March 1999 - - - CR = %x0C ;; ASCII CR, carriage return - - CRLF = CR LF - - CTL = %x00-1F / %x7F ;; any ASCII control character and DEL - - LF = %x0A ;; ASCII LF, line feed - - SPACE = %x20 ;; ASCII SP, space - - - - -8. References - - [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax - Specifications: ABNF", RFC 2234, November 1997. - - [CRAM-MD5] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP - AUTHorize Extension for Simple Challenge/Response", RFC - 2195, September 1997. - - [ESMTP] Klensin, J., Freed, N., Rose, M., Stefferud, E. and D. - Crocker, "SMTP Service Extensions", RFC 1869, November - 1995. - - [ESMTP-DSN] Moore, K, "SMTP Service Extension for Delivery Status - Notifications", RFC 1891, January 1996. - - [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, March 1997. - - [SASL] Myers, J., "Simple Authentication and Security Layer - (SASL)", RFC 2222, October 1997. - - [SUBMIT] Gellens, R. and J. Klensin, "Message Submission", RFC - 2476, December 1998. - - [RFC821] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC - 821, August 1982. - - [RFC822] Crocker, D., "Standard for the Format of ARPA Internet - Text Messages", STD 11, RFC 822, August 1982. - - - - - - - - -Myers Standards Track [Page 8] - -RFC 2554 SMTP Authentication March 1999 - - -9. Security Considerations - - Security issues are discussed throughout this memo. - - If a client uses this extension to get an encrypted tunnel through an - insecure network to a cooperating server, it needs to be configured - to never send mail to that server when the connection is not mutually - authenticated and encrypted. Otherwise, an attacker could steal the - client's mail by hijacking the SMTP connection and either pretending - the server does not support the Authentication extension or causing - all AUTH commands to fail. - - Before the SASL negotiation has begun, any protocol interactions are - performed in the clear and may be modified by an active attacker. - For this reason, clients and servers MUST discard any knowledge - obtained prior to the start of the SASL negotiation upon completion - of a SASL negotiation which results in a security layer. - - This mechanism does not protect the TCP port, so an active attacker - may redirect a relay connection attempt to the submission port - [SUBMIT]. The AUTH=<> parameter prevents such an attack from causing - an relayed message without an envelope authentication to pick up the - authentication of the relay client. - - A message submission client may require the user to authenticate - whenever a suitable SASL mechanism is advertised. Therefore, it may - not be desirable for a submission server [SUBMIT] to advertise a SASL - mechanism when use of that mechanism grants the client no benefits - over anonymous submission. - - This extension is not intended to replace or be used instead of end- - to-end message signature and encryption systems such as S/MIME or - PGP. This extension addresses a different problem than end-to-end - systems; it has the following key differences: - - (1) it is generally useful only within a trusted enclave - - (2) it protects the entire envelope of a message, not just the - message's body. - - (3) it authenticates the message submission, not authorship of the - message content - - (4) it can give the sender some assurance the message was - delivered to the next hop in the case where the sender - mutually authenticates with the next hop and negotiates an - appropriate security layer. - - - - -Myers Standards Track [Page 9] - -RFC 2554 SMTP Authentication March 1999 - - - Additional security considerations are mentioned in the SASL - specification [SASL]. - - - -10. Author's Address - - John Gardiner Myers - Netscape Communications - 501 East Middlefield Road - Mail Stop MV-029 - Mountain View, CA 94043 - - EMail: jgmyers@netscape.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Myers Standards Track [Page 10] - -RFC 2554 SMTP Authentication March 1999 - - -11. Full Copyright Statement - - Copyright (C) The Internet Society (1999). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - - - - - - - - - - - - - - - - - - - - - - - - -Myers Standards Track [Page 11] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2821.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2821.txt deleted file mode 100644 index 0eac9118..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2821.txt +++ /dev/null @@ -1,4427 +0,0 @@ - - - - - - -Network Working Group J. Klensin, Editor -Request for Comments: 2821 AT&T Laboratories -Obsoletes: 821, 974, 1869 April 2001 -Updates: 1123 -Category: Standards Track - - - Simple Mail Transfer Protocol - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (2001). All Rights Reserved. - -Abstract - - This document is a self-contained specification of the basic protocol - for the Internet electronic mail transport. It consolidates, updates - and clarifies, but doesn't add new or change existing functionality - of the following: - - - the original SMTP (Simple Mail Transfer Protocol) specification of - RFC 821 [30], - - - domain name system requirements and implications for mail - transport from RFC 1035 [22] and RFC 974 [27], - - - the clarifications and applicability statements in RFC 1123 [2], - and - - - material drawn from the SMTP Extension mechanisms [19]. - - It obsoletes RFC 821, RFC 974, and updates RFC 1123 (replaces the - mail transport materials of RFC 1123). However, RFC 821 specifies - some features that were not in significant use in the Internet by the - mid-1990s and (in appendices) some additional transport models. - Those sections are omitted here in the interest of clarity and - brevity; readers needing them should refer to RFC 821. - - - - - - -Klensin Standards Track [Page 1] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - It also includes some additional material from RFC 1123 that required - amplification. This material has been identified in multiple ways, - mostly by tracking flaming on various lists and newsgroups and - problems of unusual readings or interpretations that have appeared as - the SMTP extensions have been deployed. Where this specification - moves beyond consolidation and actually differs from earlier - documents, it supersedes them technically as well as textually. - - Although SMTP was designed as a mail transport and delivery protocol, - this specification also contains information that is important to its - use as a 'mail submission' protocol, as recommended for POP [3, 26] - and IMAP [6]. Additional submission issues are discussed in RFC 2476 - [15]. - - Section 2.3 provides definitions of terms specific to this document. - Except when the historical terminology is necessary for clarity, this - document uses the current 'client' and 'server' terminology to - identify the sending and receiving SMTP processes, respectively. - - A companion document [32] discusses message headers, message bodies - and formats and structures for them, and their relationship. - -Table of Contents - - 1. Introduction .................................................. 4 - 2. The SMTP Model ................................................ 5 - 2.1 Basic Structure .............................................. 5 - 2.2 The Extension Model .......................................... 7 - 2.2.1 Background ................................................. 7 - 2.2.2 Definition and Registration of Extensions .................. 8 - 2.3 Terminology .................................................. 9 - 2.3.1 Mail Objects ............................................... 10 - 2.3.2 Senders and Receivers ...................................... 10 - 2.3.3 Mail Agents and Message Stores ............................. 10 - 2.3.4 Host ....................................................... 11 - 2.3.5 Domain ..................................................... 11 - 2.3.6 Buffer and State Table ..................................... 11 - 2.3.7 Lines ...................................................... 12 - 2.3.8 Originator, Delivery, Relay, and Gateway Systems ........... 12 - 2.3.9 Message Content and Mail Data .............................. 13 - 2.3.10 Mailbox and Address ....................................... 13 - 2.3.11 Reply ..................................................... 13 - 2.4 General Syntax Principles and Transaction Model .............. 13 - 3. The SMTP Procedures: An Overview .............................. 15 - 3.1 Session Initiation ........................................... 15 - 3.2 Client Initiation ............................................ 16 - 3.3 Mail Transactions ............................................ 16 - 3.4 Forwarding for Address Correction or Updating ................ 19 - - - -Klensin Standards Track [Page 2] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - 3.5 Commands for Debugging Addresses ............................. 20 - 3.5.1 Overview ................................................... 20 - 3.5.2 VRFY Normal Response ....................................... 22 - 3.5.3 Meaning of VRFY or EXPN Success Response ................... 22 - 3.5.4 Semantics and Applications of EXPN ......................... 23 - 3.6 Domains ...................................................... 23 - 3.7 Relaying ..................................................... 24 - 3.8 Mail Gatewaying .............................................. 25 - 3.8.1 Header Fields in Gatewaying ................................ 26 - 3.8.2 Received Lines in Gatewaying ............................... 26 - 3.8.3 Addresses in Gatewaying .................................... 26 - 3.8.4 Other Header Fields in Gatewaying .......................... 27 - 3.8.5 Envelopes in Gatewaying .................................... 27 - 3.9 Terminating Sessions and Connections ......................... 27 - 3.10 Mailing Lists and Aliases ................................... 28 - 3.10.1 Alias ..................................................... 28 - 3.10.2 List ...................................................... 28 - 4. The SMTP Specifications ....................................... 29 - 4.1 SMTP Commands ................................................ 29 - 4.1.1 Command Semantics and Syntax ............................... 29 - 4.1.1.1 Extended HELLO (EHLO) or HELLO (HELO) ................... 29 - 4.1.1.2 MAIL (MAIL) .............................................. 31 - 4.1.1.3 RECIPIENT (RCPT) ......................................... 31 - 4.1.1.4 DATA (DATA) .............................................. 33 - 4.1.1.5 RESET (RSET) ............................................. 34 - 4.1.1.6 VERIFY (VRFY) ............................................ 35 - 4.1.1.7 EXPAND (EXPN) ............................................ 35 - 4.1.1.8 HELP (HELP) .............................................. 35 - 4.1.1.9 NOOP (NOOP) .............................................. 35 - 4.1.1.10 QUIT (QUIT) ............................................. 36 - 4.1.2 Command Argument Syntax .................................... 36 - 4.1.3 Address Literals ........................................... 38 - 4.1.4 Order of Commands .......................................... 39 - 4.1.5 Private-use Commands ....................................... 40 - 4.2 SMTP Replies ................................................ 40 - 4.2.1 Reply Code Severities and Theory ........................... 42 - 4.2.2 Reply Codes by Function Groups ............................. 44 - 4.2.3 Reply Codes in Numeric Order .............................. 45 - 4.2.4 Reply Code 502 ............................................. 46 - 4.2.5 Reply Codes After DATA and the Subsequent . .... 46 - 4.3 Sequencing of Commands and Replies ........................... 47 - 4.3.1 Sequencing Overview ........................................ 47 - 4.3.2 Command-Reply Sequences .................................... 48 - 4.4 Trace Information ............................................ 49 - 4.5 Additional Implementation Issues ............................. 53 - 4.5.1 Minimum Implementation ..................................... 53 - 4.5.2 Transparency ............................................... 53 - 4.5.3 Sizes and Timeouts ......................................... 54 - - - -Klensin Standards Track [Page 3] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - 4.5.3.1 Size limits and minimums ................................. 54 - 4.5.3.2 Timeouts ................................................. 56 - 4.5.4 Retry Strategies ........................................... 57 - 4.5.4.1 Sending Strategy ......................................... 58 - 4.5.4.2 Receiving Strategy ....................................... 59 - 4.5.5 Messages with a null reverse-path .......................... 59 - 5. Address Resolution and Mail Handling .......................... 60 - 6. Problem Detection and Handling ................................ 62 - 6.1 Reliable Delivery and Replies by Email ....................... 62 - 6.2 Loop Detection ............................................... 63 - 6.3 Compensating for Irregularities .............................. 63 - 7. Security Considerations ....................................... 64 - 7.1 Mail Security and Spoofing ................................... 64 - 7.2 "Blind" Copies ............................................... 65 - 7.3 VRFY, EXPN, and Security ..................................... 65 - 7.4 Information Disclosure in Announcements ...................... 66 - 7.5 Information Disclosure in Trace Fields ....................... 66 - 7.6 Information Disclosure in Message Forwarding ................. 67 - 7.7 Scope of Operation of SMTP Servers ........................... 67 - 8. IANA Considerations ........................................... 67 - 9. References .................................................... 68 - 10. Editor's Address ............................................. 70 - 11. Acknowledgments .............................................. 70 - Appendices ....................................................... 71 - A. TCP Transport Service ......................................... 71 - B. Generating SMTP Commands from RFC 822 Headers ................. 71 - C. Source Routes ................................................. 72 - D. Scenarios ..................................................... 73 - E. Other Gateway Issues .......................................... 76 - F. Deprecated Features of RFC 821 ................................ 76 - Full Copyright Statement ......................................... 79 - -1. Introduction - - The objective of the Simple Mail Transfer Protocol (SMTP) is to - transfer mail reliably and efficiently. - - SMTP is independent of the particular transmission subsystem and - requires only a reliable ordered data stream channel. While this - document specifically discusses transport over TCP, other transports - are possible. Appendices to RFC 821 describe some of them. - - An important feature of SMTP is its capability to transport mail - across networks, usually referred to as "SMTP mail relaying" (see - section 3.8). A network consists of the mutually-TCP-accessible - hosts on the public Internet, the mutually-TCP-accessible hosts on a - firewall-isolated TCP/IP Intranet, or hosts in some other LAN or WAN - environment utilizing a non-TCP transport-level protocol. Using - - - -Klensin Standards Track [Page 4] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - SMTP, a process can transfer mail to another process on the same - network or to some other network via a relay or gateway process - accessible to both networks. - - In this way, a mail message may pass through a number of intermediate - relay or gateway hosts on its path from sender to ultimate recipient. - The Mail eXchanger mechanisms of the domain name system [22, 27] (and - section 5 of this document) are used to identify the appropriate - next-hop destination for a message being transported. - -2. The SMTP Model - -2.1 Basic Structure - - The SMTP design can be pictured as: - - +----------+ +----------+ - +------+ | | | | - | User |<-->| | SMTP | | - +------+ | Client- |Commands/Replies| Server- | - +------+ | SMTP |<-------------->| SMTP | +------+ - | File |<-->| | and Mail | |<-->| File | - |System| | | | | |System| - +------+ +----------+ +----------+ +------+ - SMTP client SMTP server - - When an SMTP client has a message to transmit, it establishes a two- - way transmission channel to an SMTP server. The responsibility of an - SMTP client is to transfer mail messages to one or more SMTP servers, - or report its failure to do so. - - The means by which a mail message is presented to an SMTP client, and - how that client determines the domain name(s) to which mail messages - are to be transferred is a local matter, and is not addressed by this - document. In some cases, the domain name(s) transferred to, or - determined by, an SMTP client will identify the final destination(s) - of the mail message. In other cases, common with SMTP clients - associated with implementations of the POP [3, 26] or IMAP [6] - protocols, or when the SMTP client is inside an isolated transport - service environment, the domain name determined will identify an - intermediate destination through which all mail messages are to be - relayed. SMTP clients that transfer all traffic, regardless of the - target domain names associated with the individual messages, or that - do not maintain queues for retrying message transmissions that - initially cannot be completed, may otherwise conform to this - specification but are not considered fully-capable. Fully-capable - SMTP implementations, including the relays used by these less capable - - - - -Klensin Standards Track [Page 5] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - ones, and their destinations, are expected to support all of the - queuing, retrying, and alternate address functions discussed in this - specification. - - The means by which an SMTP client, once it has determined a target - domain name, determines the identity of an SMTP server to which a - copy of a message is to be transferred, and then performs that - transfer, is covered by this document. To effect a mail transfer to - an SMTP server, an SMTP client establishes a two-way transmission - channel to that SMTP server. An SMTP client determines the address - of an appropriate host running an SMTP server by resolving a - destination domain name to either an intermediate Mail eXchanger host - or a final target host. - - An SMTP server may be either the ultimate destination or an - intermediate "relay" (that is, it may assume the role of an SMTP - client after receiving the message) or "gateway" (that is, it may - transport the message further using some protocol other than SMTP). - SMTP commands are generated by the SMTP client and sent to the SMTP - server. SMTP replies are sent from the SMTP server to the SMTP - client in response to the commands. - - In other words, message transfer can occur in a single connection - between the original SMTP-sender and the final SMTP-recipient, or can - occur in a series of hops through intermediary systems. In either - case, a formal handoff of responsibility for the message occurs: the - protocol requires that a server accept responsibility for either - delivering a message or properly reporting the failure to do so. - - Once the transmission channel is established and initial handshaking - completed, the SMTP client normally initiates a mail transaction. - Such a transaction consists of a series of commands to specify the - originator and destination of the mail and transmission of the - message content (including any headers or other structure) itself. - When the same message is sent to multiple recipients, this protocol - encourages the transmission of only one copy of the data for all - recipients at the same destination (or intermediate relay) host. - - The server responds to each command with a reply; replies may - indicate that the command was accepted, that additional commands are - expected, or that a temporary or permanent error condition exists. - Commands specifying the sender or recipients may include server- - permitted SMTP service extension requests as discussed in section - 2.2. The dialog is purposely lock-step, one-at-a-time, although this - can be modified by mutually-agreed extension requests such as command - pipelining [13]. - - - - - -Klensin Standards Track [Page 6] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - Once a given mail message has been transmitted, the client may either - request that the connection be shut down or may initiate other mail - transactions. In addition, an SMTP client may use a connection to an - SMTP server for ancillary services such as verification of email - addresses or retrieval of mailing list subscriber addresses. - - As suggested above, this protocol provides mechanisms for the - transmission of mail. This transmission normally occurs directly - from the sending user's host to the receiving user's host when the - two hosts are connected to the same transport service. When they are - not connected to the same transport service, transmission occurs via - one or more relay SMTP servers. An intermediate host that acts as - either an SMTP relay or as a gateway into some other transmission - environment is usually selected through the use of the domain name - service (DNS) Mail eXchanger mechanism. - - Usually, intermediate hosts are determined via the DNS MX record, not - by explicit "source" routing (see section 5 and appendices C and - F.2). - -2.2 The Extension Model - -2.2.1 Background - - In an effort that started in 1990, approximately a decade after RFC - 821 was completed, the protocol was modified with a "service - extensions" model that permits the client and server to agree to - utilize shared functionality beyond the original SMTP requirements. - The SMTP extension mechanism defines a means whereby an extended SMTP - client and server may recognize each other, and the server can inform - the client as to the service extensions that it supports. - - Contemporary SMTP implementations MUST support the basic extension - mechanisms. For instance, servers MUST support the EHLO command even - if they do not implement any specific extensions and clients SHOULD - preferentially utilize EHLO rather than HELO. (However, for - compatibility with older conforming implementations, SMTP clients and - servers MUST support the original HELO mechanisms as a fallback.) - Unless the different characteristics of HELO must be identified for - interoperability purposes, this document discusses only EHLO. - - SMTP is widely deployed and high-quality implementations have proven - to be very robust. However, the Internet community now considers - some services to be important that were not anticipated when the - protocol was first designed. If support for those services is to be - added, it must be done in a way that permits older implementations to - continue working acceptably. The extension framework consists of: - - - - -Klensin Standards Track [Page 7] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - - The SMTP command EHLO, superseding the earlier HELO, - - - a registry of SMTP service extensions, - - - additional parameters to the SMTP MAIL and RCPT commands, and - - - optional replacements for commands defined in this protocol, such - as for DATA in non-ASCII transmissions [33]. - - SMTP's strength comes primarily from its simplicity. Experience with - many protocols has shown that protocols with few options tend towards - ubiquity, whereas protocols with many options tend towards obscurity. - - Each and every extension, regardless of its benefits, must be - carefully scrutinized with respect to its implementation, deployment, - and interoperability costs. In many cases, the cost of extending the - SMTP service will likely outweigh the benefit. - -2.2.2 Definition and Registration of Extensions - - The IANA maintains a registry of SMTP service extensions. A - corresponding EHLO keyword value is associated with each extension. - Each service extension registered with the IANA must be defined in a - formal standards-track or IESG-approved experimental protocol - document. The definition must include: - - - the textual name of the SMTP service extension; - - - the EHLO keyword value associated with the extension; - - - the syntax and possible values of parameters associated with the - EHLO keyword value; - - - any additional SMTP verbs associated with the extension - (additional verbs will usually be, but are not required to be, the - same as the EHLO keyword value); - - - any new parameters the extension associates with the MAIL or RCPT - verbs; - - - a description of how support for the extension affects the - behavior of a server and client SMTP; and, - - - the increment by which the extension is increasing the maximum - length of the commands MAIL and/or RCPT, over that specified in - this standard. - - - - - -Klensin Standards Track [Page 8] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - In addition, any EHLO keyword value starting with an upper or lower - case "X" refers to a local SMTP service extension used exclusively - through bilateral agreement. Keywords beginning with "X" MUST NOT be - used in a registered service extension. Conversely, keyword values - presented in the EHLO response that do not begin with "X" MUST - correspond to a standard, standards-track, or IESG-approved - experimental SMTP service extension registered with IANA. A - conforming server MUST NOT offer non-"X"-prefixed keyword values that - are not described in a registered extension. - - Additional verbs and parameter names are bound by the same rules as - EHLO keywords; specifically, verbs beginning with "X" are local - extensions that may not be registered or standardized. Conversely, - verbs not beginning with "X" must always be registered. - -2.3 Terminology - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", - "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this - document are to be interpreted as described below. - - 1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that - the definition is an absolute requirement of the specification. - - 2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the - definition is an absolute prohibition of the specification. - - 3. SHOULD This word, or the adjective "RECOMMENDED", mean that - there may exist valid reasons in particular circumstances to - ignore a particular item, but the full implications must be - understood and carefully weighed before choosing a different - course. - - 4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean - that there may exist valid reasons in particular circumstances - when the particular behavior is acceptable or even useful, but the - full implications should be understood and the case carefully - weighed before implementing any behavior described with this - label. - - 5. MAY This word, or the adjective "OPTIONAL", mean that an item is - truly optional. One vendor may choose to include the item because - a particular marketplace requires it or because the vendor feels - that it enhances the product while another vendor may omit the - same item. An implementation which does not include a particular - option MUST be prepared to interoperate with another - implementation which does include the option, though perhaps with - reduced functionality. In the same vein an implementation which - - - -Klensin Standards Track [Page 9] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - does include a particular option MUST be prepared to interoperate - with another implementation which does not include the option - (except, of course, for the feature the option provides.) - -2.3.1 Mail Objects - - SMTP transports a mail object. A mail object contains an envelope - and content. - - The SMTP envelope is sent as a series of SMTP protocol units - (described in section 3). It consists of an originator address (to - which error reports should be directed); one or more recipient - addresses; and optional protocol extension material. Historically, - variations on the recipient address specification command (RCPT TO) - could be used to specify alternate delivery modes, such as immediate - display; those variations have now been deprecated (see appendix F, - section F.6). - - The SMTP content is sent in the SMTP DATA protocol unit and has two - parts: the headers and the body. If the content conforms to other - contemporary standards, the headers form a collection of field/value - pairs structured as in the message format specification [32]; the - body, if structured, is defined according to MIME [12]. The content - is textual in nature, expressed using the US-ASCII repertoire [1]. - Although SMTP extensions (such as "8BITMIME" [20]) may relax this - restriction for the content body, the content headers are always - encoded using the US-ASCII repertoire. A MIME extension [23] defines - an algorithm for representing header values outside the US-ASCII - repertoire, while still encoding them using the US-ASCII repertoire. - -2.3.2 Senders and Receivers - - In RFC 821, the two hosts participating in an SMTP transaction were - described as the "SMTP-sender" and "SMTP-receiver". This document - has been changed to reflect current industry terminology and hence - refers to them as the "SMTP client" (or sometimes just "the client") - and "SMTP server" (or just "the server"), respectively. Since a - given host may act both as server and client in a relay situation, - "receiver" and "sender" terminology is still used where needed for - clarity. - -2.3.3 Mail Agents and Message Stores - - Additional mail system terminology became common after RFC 821 was - published and, where convenient, is used in this specification. In - particular, SMTP servers and clients provide a mail transport service - and therefore act as "Mail Transfer Agents" (MTAs). "Mail User - Agents" (MUAs or UAs) are normally thought of as the sources and - - - -Klensin Standards Track [Page 10] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - targets of mail. At the source, an MUA might collect mail to be - transmitted from a user and hand it off to an MTA; the final - ("delivery") MTA would be thought of as handing the mail off to an - MUA (or at least transferring responsibility to it, e.g., by - depositing the message in a "message store"). However, while these - terms are used with at least the appearance of great precision in - other environments, the implied boundaries between MUAs and MTAs - often do not accurately match common, and conforming, practices with - Internet mail. Hence, the reader should be cautious about inferring - the strong relationships and responsibilities that might be implied - if these terms were used elsewhere. - -2.3.4 Host - - For the purposes of this specification, a host is a computer system - attached to the Internet (or, in some cases, to a private TCP/IP - network) and supporting the SMTP protocol. Hosts are known by names - (see "domain"); identifying them by numerical address is discouraged. - -2.3.5 Domain - - A domain (or domain name) consists of one or more dot-separated - components. These components ("labels" in DNS terminology [22]) are - restricted for SMTP purposes to consist of a sequence of letters, - digits, and hyphens drawn from the ASCII character set [1]. Domain - names are used as names of hosts and of other entities in the domain - name hierarchy. For example, a domain may refer to an alias (label - of a CNAME RR) or the label of Mail eXchanger records to be used to - deliver mail instead of representing a host name. See [22] and - section 5 of this specification. - - The domain name, as described in this document and in [22], is the - entire, fully-qualified name (often referred to as an "FQDN"). A - domain name that is not in FQDN form is no more than a local alias. - Local aliases MUST NOT appear in any SMTP transaction. - -2.3.6 Buffer and State Table - - SMTP sessions are stateful, with both parties carefully maintaining a - common view of the current state. In this document we model this - state by a virtual "buffer" and a "state table" on the server which - may be used by the client to, for example, "clear the buffer" or - "reset the state table," causing the information in the buffer to be - discarded and the state to be returned to some previous state. - - - - - - - -Klensin Standards Track [Page 11] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -2.3.7 Lines - - SMTP commands and, unless altered by a service extension, message - data, are transmitted in "lines". Lines consist of zero or more data - characters terminated by the sequence ASCII character "CR" (hex value - 0D) followed immediately by ASCII character "LF" (hex value 0A). - This termination sequence is denoted as in this document. - Conforming implementations MUST NOT recognize or generate any other - character or character sequence as a line terminator. Limits MAY be - imposed on line lengths by servers (see section 4.5.3). - - In addition, the appearance of "bare" "CR" or "LF" characters in text - (i.e., either without the other) has a long history of causing - problems in mail implementations and applications that use the mail - system as a tool. SMTP client implementations MUST NOT transmit - these characters except when they are intended as line terminators - and then MUST, as indicated above, transmit them only as a - sequence. - -2.3.8 Originator, Delivery, Relay, and Gateway Systems - - This specification makes a distinction among four types of SMTP - systems, based on the role those systems play in transmitting - electronic mail. An "originating" system (sometimes called an SMTP - originator) introduces mail into the Internet or, more generally, - into a transport service environment. A "delivery" SMTP system is - one that receives mail from a transport service environment and - passes it to a mail user agent or deposits it in a message store - which a mail user agent is expected to subsequently access. A - "relay" SMTP system (usually referred to just as a "relay") receives - mail from an SMTP client and transmits it, without modification to - the message data other than adding trace information, to another SMTP - server for further relaying or for delivery. - - A "gateway" SMTP system (usually referred to just as a "gateway") - receives mail from a client system in one transport environment and - transmits it to a server system in another transport environment. - Differences in protocols or message semantics between the transport - environments on either side of a gateway may require that the gateway - system perform transformations to the message that are not permitted - to SMTP relay systems. For the purposes of this specification, - firewalls that rewrite addresses should be considered as gateways, - even if SMTP is used on both sides of them (see [11]). - - - - - - - - -Klensin Standards Track [Page 12] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -2.3.9 Message Content and Mail Data - - The terms "message content" and "mail data" are used interchangeably - in this document to describe the material transmitted after the DATA - command is accepted and before the end of data indication is - transmitted. Message content includes message headers and the - possibly-structured message body. The MIME specification [12] - provides the standard mechanisms for structured message bodies. - -2.3.10 Mailbox and Address - - As used in this specification, an "address" is a character string - that identifies a user to whom mail will be sent or a location into - which mail will be deposited. The term "mailbox" refers to that - depository. The two terms are typically used interchangeably unless - the distinction between the location in which mail is placed (the - mailbox) and a reference to it (the address) is important. An - address normally consists of user and domain specifications. The - standard mailbox naming convention is defined to be "local- - part@domain": contemporary usage permits a much broader set of - applications than simple "user names". Consequently, and due to a - long history of problems when intermediate hosts have attempted to - optimize transport by modifying them, the local-part MUST be - interpreted and assigned semantics only by the host specified in the - domain part of the address. - -2.3.11 Reply - - An SMTP reply is an acknowledgment (positive or negative) sent from - receiver to sender via the transmission channel in response to a - command. The general form of a reply is a numeric completion code - (indicating failure or success) usually followed by a text string. - The codes are for use by programs and the text is usually intended - for human users. Recent work [34] has specified further structuring - of the reply strings, including the use of supplemental and more - specific completion codes. - -2.4 General Syntax Principles and Transaction Model - - SMTP commands and replies have a rigid syntax. All commands begin - with a command verb. All Replies begin with a three digit numeric - code. In some commands and replies, arguments MUST follow the verb - or reply code. Some commands do not accept arguments (after the - verb), and some reply codes are followed, sometimes optionally, by - free form text. In both cases, where text appears, it is separated - from the verb or reply code by a space character. Complete - definitions of commands and replies appear in section 4. - - - - -Klensin Standards Track [Page 13] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - Verbs and argument values (e.g., "TO:" or "to:" in the RCPT command - and extension name keywords) are not case sensitive, with the sole - exception in this specification of a mailbox local-part (SMTP - Extensions may explicitly specify case-sensitive elements). That is, - a command verb, an argument value other than a mailbox local-part, - and free form text MAY be encoded in upper case, lower case, or any - mixture of upper and lower case with no impact on its meaning. This - is NOT true of a mailbox local-part. The local-part of a mailbox - MUST BE treated as case sensitive. Therefore, SMTP implementations - MUST take care to preserve the case of mailbox local-parts. Mailbox - domains are not case sensitive. In particular, for some hosts the - user "smith" is different from the user "Smith". However, exploiting - the case sensitivity of mailbox local-parts impedes interoperability - and is discouraged. - - A few SMTP servers, in violation of this specification (and RFC 821) - require that command verbs be encoded by clients in upper case. - Implementations MAY wish to employ this encoding to accommodate those - servers. - - The argument field consists of a variable length character string - ending with the end of the line, i.e., with the character sequence - . The receiver will take no action until this sequence is - received. - - The syntax for each command is shown with the discussion of that - command. Common elements and parameters are shown in section 4.1.2. - - Commands and replies are composed of characters from the ASCII - character set [1]. When the transport service provides an 8-bit byte - (octet) transmission channel, each 7-bit character is transmitted - right justified in an octet with the high order bit cleared to zero. - More specifically, the unextended SMTP service provides seven bit - transport only. An originating SMTP client which has not - successfully negotiated an appropriate extension with a particular - server MUST NOT transmit messages with information in the high-order - bit of octets. If such messages are transmitted in violation of this - rule, receiving SMTP servers MAY clear the high-order bit or reject - the message as invalid. In general, a relay SMTP SHOULD assume that - the message content it has received is valid and, assuming that the - envelope permits doing so, relay it without inspecting that content. - Of course, if the content is mislabeled and the data path cannot - accept the actual content, this may result in ultimate delivery of a - severely garbled message to the recipient. Delivery SMTP systems MAY - reject ("bounce") such messages rather than deliver them. No sending - SMTP system is permitted to send envelope commands in any character - - - - - -Klensin Standards Track [Page 14] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - set other than US-ASCII; receiving systems SHOULD reject such - commands, normally using "500 syntax error - invalid character" - replies. - - Eight-bit message content transmission MAY be requested of the server - by a client using extended SMTP facilities, notably the "8BITMIME" - extension [20]. 8BITMIME SHOULD be supported by SMTP servers. - However, it MUST not be construed as authorization to transmit - unrestricted eight bit material. 8BITMIME MUST NOT be requested by - senders for material with the high bit on that is not in MIME format - with an appropriate content-transfer encoding; servers MAY reject - such messages. - - The metalinguistic notation used in this document corresponds to the - "Augmented BNF" used in other Internet mail system documents. The - reader who is not familiar with that syntax should consult the ABNF - specification [8]. Metalanguage terms used in running text are - surrounded by pointed brackets (e.g., ) for clarity. - -3. The SMTP Procedures: An Overview - - This section contains descriptions of the procedures used in SMTP: - session initiation, the mail transaction, forwarding mail, verifying - mailbox names and expanding mailing lists, and the opening and - closing exchanges. Comments on relaying, a note on mail domains, and - a discussion of changing roles are included at the end of this - section. Several complete scenarios are presented in appendix D. - -3.1 Session Initiation - - An SMTP session is initiated when a client opens a connection to a - server and the server responds with an opening message. - - SMTP server implementations MAY include identification of their - software and version information in the connection greeting reply - after the 220 code, a practice that permits more efficient isolation - and repair of any problems. Implementations MAY make provision for - SMTP servers to disable the software and version announcement where - it causes security concerns. While some systems also identify their - contact point for mail problems, this is not a substitute for - maintaining the required "postmaster" address (see section 4.5.1). - - The SMTP protocol allows a server to formally reject a transaction - while still allowing the initial connection as follows: a 554 - response MAY be given in the initial connection opening message - instead of the 220. A server taking this approach MUST still wait - for the client to send a QUIT (see section 4.1.1.10) before closing - the connection and SHOULD respond to any intervening commands with - - - -Klensin Standards Track [Page 15] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - "503 bad sequence of commands". Since an attempt to make an SMTP - connection to such a system is probably in error, a server returning - a 554 response on connection opening SHOULD provide enough - information in the reply text to facilitate debugging of the sending - system. - -3.2 Client Initiation - - Once the server has sent the welcoming message and the client has - received it, the client normally sends the EHLO command to the - server, indicating the client's identity. In addition to opening the - session, use of EHLO indicates that the client is able to process - service extensions and requests that the server provide a list of the - extensions it supports. Older SMTP systems which are unable to - support service extensions and contemporary clients which do not - require service extensions in the mail session being initiated, MAY - use HELO instead of EHLO. Servers MUST NOT return the extended - EHLO-style response to a HELO command. For a particular connection - attempt, if the server returns a "command not recognized" response to - EHLO, the client SHOULD be able to fall back and send HELO. - - In the EHLO command the host sending the command identifies itself; - the command may be interpreted as saying "Hello, I am " (and, - in the case of EHLO, "and I support service extension requests"). - -3.3 Mail Transactions - - There are three steps to SMTP mail transactions. The transaction - starts with a MAIL command which gives the sender identification. - (In general, the MAIL command may be sent only when no mail - transaction is in progress; see section 4.1.4.) A series of one or - more RCPT commands follows giving the receiver information. Then a - DATA command initiates transfer of the mail data and is terminated by - the "end of mail" data indicator, which also confirms the - transaction. - - The first step in the procedure is the MAIL command. - - MAIL FROM: [SP ] - - This command tells the SMTP-receiver that a new mail transaction is - starting and to reset all its state tables and buffers, including any - recipients or mail data. The portion of the first or - only argument contains the source mailbox (between "<" and ">" - brackets), which can be used to report errors (see section 4.2 for a - discussion of error reporting). If accepted, the SMTP server returns - a 250 OK reply. If the mailbox specification is not acceptable for - some reason, the server MUST return a reply indicating whether the - - - -Klensin Standards Track [Page 16] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - failure is permanent (i.e., will occur again if the client tries to - send the same address again) or temporary (i.e., the address might be - accepted if the client tries again later). Despite the apparent - scope of this requirement, there are circumstances in which the - acceptability of the reverse-path may not be determined until one or - more forward-paths (in RCPT commands) can be examined. In those - cases, the server MAY reasonably accept the reverse-path (with a 250 - reply) and then report problems after the forward-paths are received - and examined. Normally, failures produce 550 or 553 replies. - - Historically, the can contain more than just a - mailbox, however, contemporary systems SHOULD NOT use source routing - (see appendix C). - - The optional are associated with negotiated SMTP - service extensions (see section 2.2). - - The second step in the procedure is the RCPT command. - - RCPT TO: [ SP ] - - The first or only argument to this command includes a forward-path - (normally a mailbox and domain, always surrounded by "<" and ">" - brackets) identifying one recipient. If accepted, the SMTP server - returns a 250 OK reply and stores the forward-path. If the recipient - is known not to be a deliverable address, the SMTP server returns a - 550 reply, typically with a string such as "no such user - " and the - mailbox name (other circumstances and reply codes are possible). - This step of the procedure can be repeated any number of times. - - The can contain more than just a mailbox. - Historically, the can be a source routing list of - hosts and the destination mailbox, however, contemporary SMTP clients - SHOULD NOT utilize source routes (see appendix C). Servers MUST be - prepared to encounter a list of source routes in the forward path, - but SHOULD ignore the routes or MAY decline to support the relaying - they imply. Similarly, servers MAY decline to accept mail that is - destined for other hosts or systems. These restrictions make a - server useless as a relay for clients that do not support full SMTP - functionality. Consequently, restricted-capability clients MUST NOT - assume that any SMTP server on the Internet can be used as their mail - processing (relaying) site. If a RCPT command appears without a - previous MAIL command, the server MUST return a 503 "Bad sequence of - commands" response. The optional are associated - with negotiated SMTP service extensions (see section 2.2). - - The third step in the procedure is the DATA command (or some - alternative specified in a service extension). - - - -Klensin Standards Track [Page 17] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - DATA - - If accepted, the SMTP server returns a 354 Intermediate reply and - considers all succeeding lines up to but not including the end of - mail data indicator to be the message text. When the end of text is - successfully received and stored the SMTP-receiver sends a 250 OK - reply. - - Since the mail data is sent on the transmission channel, the end of - mail data must be indicated so that the command and reply dialog can - be resumed. SMTP indicates the end of the mail data by sending a - line containing only a "." (period or full stop). A transparency - procedure is used to prevent this from interfering with the user's - text (see section 4.5.2). - - The end of mail data indicator also confirms the mail transaction and - tells the SMTP server to now process the stored recipients and mail - data. If accepted, the SMTP server returns a 250 OK reply. The DATA - command can fail at only two points in the protocol exchange: - - - If there was no MAIL, or no RCPT, command, or all such commands - were rejected, the server MAY return a "command out of sequence" - (503) or "no valid recipients" (554) reply in response to the DATA - command. If one of those replies (or any other 5yz reply) is - received, the client MUST NOT send the message data; more - generally, message data MUST NOT be sent unless a 354 reply is - received. - - - If the verb is initially accepted and the 354 reply issued, the - DATA command should fail only if the mail transaction was - incomplete (for example, no recipients), or if resources were - unavailable (including, of course, the server unexpectedly - becoming unavailable), or if the server determines that the - message should be rejected for policy or other reasons. - - However, in practice, some servers do not perform recipient - verification until after the message text is received. These servers - SHOULD treat a failure for one or more recipients as a "subsequent - failure" and return a mail message as discussed in section 6. Using - a "550 mailbox not found" (or equivalent) reply code after the data - are accepted makes it difficult or impossible for the client to - determine which recipients failed. - - When RFC 822 format [7, 32] is being used, the mail data include the - memo header items such as Date, Subject, To, Cc, From. Server SMTP - systems SHOULD NOT reject messages based on perceived defects in the - RFC 822 or MIME [12] message header or message body. In particular, - - - - -Klensin Standards Track [Page 18] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - they MUST NOT reject messages in which the numbers of Resent-fields - do not match or Resent-to appears without Resent-from and/or Resent- - date. - - Mail transaction commands MUST be used in the order discussed above. - -3.4 Forwarding for Address Correction or Updating - - Forwarding support is most often required to consolidate and simplify - addresses within, or relative to, some enterprise and less frequently - to establish addresses to link a person's prior address with current - one. Silent forwarding of messages (without server notification to - the sender), for security or non-disclosure purposes, is common in - the contemporary Internet. - - In both the enterprise and the "new address" cases, information - hiding (and sometimes security) considerations argue against exposure - of the "final" address through the SMTP protocol as a side-effect of - the forwarding activity. This may be especially important when the - final address may not even be reachable by the sender. Consequently, - the "forwarding" mechanisms described in section 3.2 of RFC 821, and - especially the 251 (corrected destination) and 551 reply codes from - RCPT must be evaluated carefully by implementers and, when they are - available, by those configuring systems. - - In particular: - - * Servers MAY forward messages when they are aware of an address - change. When they do so, they MAY either provide address-updating - information with a 251 code, or may forward "silently" and return - a 250 code. But, if a 251 code is used, they MUST NOT assume that - the client will actually update address information or even return - that information to the user. - - Alternately, - - * Servers MAY reject or bounce messages when they are not - deliverable when addressed. When they do so, they MAY either - provide address-updating information with a 551 code, or may - reject the message as undeliverable with a 550 code and no - address-specific information. But, if a 551 code is used, they - MUST NOT assume that the client will actually update address - information or even return that information to the user. - - SMTP server implementations that support the 251 and/or 551 reply - codes are strongly encouraged to provide configuration mechanisms so - that sites which conclude that they would undesirably disclose - information can disable or restrict their use. - - - -Klensin Standards Track [Page 19] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -3.5 Commands for Debugging Addresses - -3.5.1 Overview - - SMTP provides commands to verify a user name or obtain the content of - a mailing list. This is done with the VRFY and EXPN commands, which - have character string arguments. Implementations SHOULD support VRFY - and EXPN (however, see section 3.5.2 and 7.3). - - For the VRFY command, the string is a user name or a user name and - domain (see below). If a normal (i.e., 250) response is returned, - the response MAY include the full name of the user and MUST include - the mailbox of the user. It MUST be in either of the following - forms: - - User Name - local-part@domain - - When a name that is the argument to VRFY could identify more than one - mailbox, the server MAY either note the ambiguity or identify the - alternatives. In other words, any of the following are legitimate - response to VRFY: - - 553 User ambiguous - - or - - 553- Ambiguous; Possibilities are - 553-Joe Smith - 553-Harry Smith - 553 Melvin Smith - - or - - 553-Ambiguous; Possibilities - 553- - 553- - 553 - - Under normal circumstances, a client receiving a 553 reply would be - expected to expose the result to the user. Use of exactly the forms - given, and the "user ambiguous" or "ambiguous" keywords, possibly - supplemented by extended reply codes such as those described in [34], - will facilitate automated translation into other languages as needed. - Of course, a client that was highly automated or that was operating - in another language than English, might choose to try to translate - the response, to return some other indication to the user than the - - - - -Klensin Standards Track [Page 20] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - literal text of the reply, or to take some automated action such as - consulting a directory service for additional information before - reporting to the user. - - For the EXPN command, the string identifies a mailing list, and the - successful (i.e., 250) multiline response MAY include the full name - of the users and MUST give the mailboxes on the mailing list. - - In some hosts the distinction between a mailing list and an alias for - a single mailbox is a bit fuzzy, since a common data structure may - hold both types of entries, and it is possible to have mailing lists - containing only one mailbox. If a request is made to apply VRFY to a - mailing list, a positive response MAY be given if a message so - addressed would be delivered to everyone on the list, otherwise an - error SHOULD be reported (e.g., "550 That is a mailing list, not a - user" or "252 Unable to verify members of mailing list"). If a - request is made to expand a user name, the server MAY return a - positive response consisting of a list containing one name, or an - error MAY be reported (e.g., "550 That is a user name, not a mailing - list"). - - In the case of a successful multiline reply (normal for EXPN) exactly - one mailbox is to be specified on each line of the reply. The case - of an ambiguous request is discussed above. - - "User name" is a fuzzy term and has been used deliberately. An - implementation of the VRFY or EXPN commands MUST include at least - recognition of local mailboxes as "user names". However, since - current Internet practice often results in a single host handling - mail for multiple domains, hosts, especially hosts that provide this - functionality, SHOULD accept the "local-part@domain" form as a "user - name"; hosts MAY also choose to recognize other strings as "user - names". - - The case of expanding a mailbox list requires a multiline reply, such - as: - - C: EXPN Example-People - S: 250-Jon Postel - S: 250-Fred Fonebone - S: 250 Sam Q. Smith - - or - - C: EXPN Executive-Washroom-List - S: 550 Access Denied to You. - - - - - -Klensin Standards Track [Page 21] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - The character string arguments of the VRFY and EXPN commands cannot - be further restricted due to the variety of implementations of the - user name and mailbox list concepts. On some systems it may be - appropriate for the argument of the EXPN command to be a file name - for a file containing a mailing list, but again there are a variety - of file naming conventions in the Internet. Similarly, historical - variations in what is returned by these commands are such that the - response SHOULD be interpreted very carefully, if at all, and SHOULD - generally only be used for diagnostic purposes. - -3.5.2 VRFY Normal Response - - When normal (2yz or 551) responses are returned from a VRFY or EXPN - request, the reply normally includes the mailbox name, i.e., - "", where "domain" is a fully qualified domain - name, MUST appear in the syntax. In circumstances exceptional enough - to justify violating the intent of this specification, free-form text - MAY be returned. In order to facilitate parsing by both computers - and people, addresses SHOULD appear in pointed brackets. When - addresses, rather than free-form debugging information, are returned, - EXPN and VRFY MUST return only valid domain addresses that are usable - in SMTP RCPT commands. Consequently, if an address implies delivery - to a program or other system, the mailbox name used to reach that - target MUST be given. Paths (explicit source routes) MUST NOT be - returned by VRFY or EXPN. - - Server implementations SHOULD support both VRFY and EXPN. For - security reasons, implementations MAY provide local installations a - way to disable either or both of these commands through configuration - options or the equivalent. When these commands are supported, they - are not required to work across relays when relaying is supported. - Since they were both optional in RFC 821, they MUST be listed as - service extensions in an EHLO response, if they are supported. - -3.5.3 Meaning of VRFY or EXPN Success Response - - A server MUST NOT return a 250 code in response to a VRFY or EXPN - command unless it has actually verified the address. In particular, - a server MUST NOT return 250 if all it has done is to verify that the - syntax given is valid. In that case, 502 (Command not implemented) - or 500 (Syntax error, command unrecognized) SHOULD be returned. As - stated elsewhere, implementation (in the sense of actually validating - addresses and returning information) of VRFY and EXPN are strongly - recommended. Hence, implementations that return 500 or 502 for VRFY - are not in full compliance with this specification. - - - - - - -Klensin Standards Track [Page 22] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - There may be circumstances where an address appears to be valid but - cannot reasonably be verified in real time, particularly when a - server is acting as a mail exchanger for another server or domain. - "Apparent validity" in this case would normally involve at least - syntax checking and might involve verification that any domains - specified were ones to which the host expected to be able to relay - mail. In these situations, reply code 252 SHOULD be returned. These - cases parallel the discussion of RCPT verification discussed in - section 2.1. Similarly, the discussion in section 3.4 applies to the - use of reply codes 251 and 551 with VRFY (and EXPN) to indicate - addresses that are recognized but that would be forwarded or bounced - were mail received for them. Implementations generally SHOULD be - more aggressive about address verification in the case of VRFY than - in the case of RCPT, even if it takes a little longer to do so. - -3.5.4 Semantics and Applications of EXPN - - EXPN is often very useful in debugging and understanding problems - with mailing lists and multiple-target-address aliases. Some systems - have attempted to use source expansion of mailing lists as a means of - eliminating duplicates. The propagation of aliasing systems with - mail on the Internet, for hosts (typically with MX and CNAME DNS - records), for mailboxes (various types of local host aliases), and in - various proxying arrangements, has made it nearly impossible for - these strategies to work consistently, and mail systems SHOULD NOT - attempt them. - -3.6 Domains - - Only resolvable, fully-qualified, domain names (FQDNs) are permitted - when domain names are used in SMTP. In other words, names that can - be resolved to MX RRs or A RRs (as discussed in section 5) are - permitted, as are CNAME RRs whose targets can be resolved, in turn, - to MX or A RRs. Local nicknames or unqualified names MUST NOT be - used. There are two exceptions to the rule requiring FQDNs: - - - The domain name given in the EHLO command MUST BE either a primary - host name (a domain name that resolves to an A RR) or, if the host - has no name, an address literal as described in section 4.1.1.1. - - - The reserved mailbox name "postmaster" may be used in a RCPT - command without domain qualification (see section 4.1.1.3) and - MUST be accepted if so used. - - - - - - - - -Klensin Standards Track [Page 23] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -3.7 Relaying - - In general, the availability of Mail eXchanger records in the domain - name system [22, 27] makes the use of explicit source routes in the - Internet mail system unnecessary. Many historical problems with - their interpretation have made their use undesirable. SMTP clients - SHOULD NOT generate explicit source routes except under unusual - circumstances. SMTP servers MAY decline to act as mail relays or to - accept addresses that specify source routes. When route information - is encountered, SMTP servers are also permitted to ignore the route - information and simply send to the final destination specified as the - last element in the route and SHOULD do so. There has been an - invalid practice of using names that do not appear in the DNS as - destination names, with the senders counting on the intermediate - hosts specified in source routing to resolve any problems. If source - routes are stripped, this practice will cause failures. This is one - of several reasons why SMTP clients MUST NOT generate invalid source - routes or depend on serial resolution of names. - - When source routes are not used, the process described in RFC 821 for - constructing a reverse-path from the forward-path is not applicable - and the reverse-path at the time of delivery will simply be the - address that appeared in the MAIL command. - - A relay SMTP server is usually the target of a DNS MX record that - designates it, rather than the final delivery system. The relay - server may accept or reject the task of relaying the mail in the same - way it accepts or rejects mail for a local user. If it accepts the - task, it then becomes an SMTP client, establishes a transmission - channel to the next SMTP server specified in the DNS (according to - the rules in section 5), and sends it the mail. If it declines to - relay mail to a particular address for policy reasons, a 550 response - SHOULD be returned. - - Many mail-sending clients exist, especially in conjunction with - facilities that receive mail via POP3 or IMAP, that have limited - capability to support some of the requirements of this specification, - such as the ability to queue messages for subsequent delivery - attempts. For these clients, it is common practice to make private - arrangements to send all messages to a single server for processing - and subsequent distribution. SMTP, as specified here, is not ideally - suited for this role, and work is underway on standardized mail - submission protocols that might eventually supercede the current - practices. In any event, because these arrangements are private and - fall outside the scope of this specification, they are not described - here. - - - - - -Klensin Standards Track [Page 24] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - It is important to note that MX records can point to SMTP servers - which act as gateways into other environments, not just SMTP relays - and final delivery systems; see sections 3.8 and 5. - - If an SMTP server has accepted the task of relaying the mail and - later finds that the destination is incorrect or that the mail cannot - be delivered for some other reason, then it MUST construct an - "undeliverable mail" notification message and send it to the - originator of the undeliverable mail (as indicated by the reverse- - path). Formats specified for non-delivery reports by other standards - (see, for example, [24, 25]) SHOULD be used if possible. - - This notification message must be from the SMTP server at the relay - host or the host that first determines that delivery cannot be - accomplished. Of course, SMTP servers MUST NOT send notification - messages about problems transporting notification messages. One way - to prevent loops in error reporting is to specify a null reverse-path - in the MAIL command of a notification message. When such a message - is transmitted the reverse-path MUST be set to null (see section - 4.5.5 for additional discussion). A MAIL command with a null - reverse-path appears as follows: - - MAIL FROM:<> - - As discussed in section 2.4.1, a relay SMTP has no need to inspect or - act upon the headers or body of the message data and MUST NOT do so - except to add its own "Received:" header (section 4.4) and, - optionally, to attempt to detect looping in the mail system (see - section 6.2). - -3.8 Mail Gatewaying - - While the relay function discussed above operates within the Internet - SMTP transport service environment, MX records or various forms of - explicit routing may require that an intermediate SMTP server perform - a translation function between one transport service and another. As - discussed in section 2.3.8, when such a system is at the boundary - between two transport service environments, we refer to it as a - "gateway" or "gateway SMTP". - - Gatewaying mail between different mail environments, such as - different mail formats and protocols, is complex and does not easily - yield to standardization. However, some general requirements may be - given for a gateway between the Internet and another mail - environment. - - - - - - -Klensin Standards Track [Page 25] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -3.8.1 Header Fields in Gatewaying - - Header fields MAY be rewritten when necessary as messages are - gatewayed across mail environment boundaries. This may involve - inspecting the message body or interpreting the local-part of the - destination address in spite of the prohibitions in section 2.4.1. - - Other mail systems gatewayed to the Internet often use a subset of - RFC 822 headers or provide similar functionality with a different - syntax, but some of these mail systems do not have an equivalent to - the SMTP envelope. Therefore, when a message leaves the Internet - environment, it may be necessary to fold the SMTP envelope - information into the message header. A possible solution would be to - create new header fields to carry the envelope information (e.g., - "X-SMTP-MAIL:" and "X-SMTP-RCPT:"); however, this would require - changes in mail programs in foreign environments and might risk - disclosure of private information (see section 7.2). - -3.8.2 Received Lines in Gatewaying - - When forwarding a message into or out of the Internet environment, a - gateway MUST prepend a Received: line, but it MUST NOT alter in any - way a Received: line that is already in the header. - - "Received:" fields of messages originating from other environments - may not conform exactly to this specification. However, the most - important use of Received: lines is for debugging mail faults, and - this debugging can be severely hampered by well-meaning gateways that - try to "fix" a Received: line. As another consequence of trace - fields arising in non-SMTP environments, receiving systems MUST NOT - reject mail based on the format of a trace field and SHOULD be - extremely robust in the light of unexpected information or formats in - those fields. - - The gateway SHOULD indicate the environment and protocol in the "via" - clauses of Received field(s) that it supplies. - -3.8.3 Addresses in Gatewaying - - From the Internet side, the gateway SHOULD accept all valid address - formats in SMTP commands and in RFC 822 headers, and all valid RFC - 822 messages. Addresses and headers generated by gateways MUST - conform to applicable Internet standards (including this one and RFC - 822). Gateways are, of course, subject to the same rules for - handling source routes as those described for other SMTP systems in - section 3.3. - - - - - -Klensin Standards Track [Page 26] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -3.8.4 Other Header Fields in Gatewaying - - The gateway MUST ensure that all header fields of a message that it - forwards into the Internet mail environment meet the requirements for - Internet mail. In particular, all addresses in "From:", "To:", - "Cc:", etc., fields MUST be transformed (if necessary) to satisfy RFC - 822 syntax, MUST reference only fully-qualified domain names, and - MUST be effective and useful for sending replies. The translation - algorithm used to convert mail from the Internet protocols to another - environment's protocol SHOULD ensure that error messages from the - foreign mail environment are delivered to the return path from the - SMTP envelope, not to the sender listed in the "From:" field (or - other fields) of the RFC 822 message. - -3.8.5 Envelopes in Gatewaying - - Similarly, when forwarding a message from another environment into - the Internet, the gateway SHOULD set the envelope return path in - accordance with an error message return address, if supplied by the - foreign environment. If the foreign environment has no equivalent - concept, the gateway must select and use a best approximation, with - the message originator's address as the default of last resort. - -3.9 Terminating Sessions and Connections - - An SMTP connection is terminated when the client sends a QUIT - command. The server responds with a positive reply code, after which - it closes the connection. - - An SMTP server MUST NOT intentionally close the connection except: - - - After receiving a QUIT command and responding with a 221 reply. - - - After detecting the need to shut down the SMTP service and - returning a 421 response code. This response code can be issued - after the server receives any command or, if necessary, - asynchronously from command receipt (on the assumption that the - client will receive it after the next command is issued). - - In particular, a server that closes connections in response to - commands that are not understood is in violation of this - specification. Servers are expected to be tolerant of unknown - commands, issuing a 500 reply and awaiting further instructions from - the client. - - - - - - - -Klensin Standards Track [Page 27] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - An SMTP server which is forcibly shut down via external means SHOULD - attempt to send a line containing a 421 response code to the SMTP - client before exiting. The SMTP client will normally read the 421 - response code after sending its next command. - - SMTP clients that experience a connection close, reset, or other - communications failure due to circumstances not under their control - (in violation of the intent of this specification but sometimes - unavoidable) SHOULD, to maintain the robustness of the mail system, - treat the mail transaction as if a 451 response had been received and - act accordingly. - -3.10 Mailing Lists and Aliases - - An SMTP-capable host SHOULD support both the alias and the list - models of address expansion for multiple delivery. When a message is - delivered or forwarded to each address of an expanded list form, the - return address in the envelope ("MAIL FROM:") MUST be changed to be - the address of a person or other entity who administers the list. - However, in this case, the message header [32] MUST be left - unchanged; in particular, the "From" field of the message header is - unaffected. - - An important mail facility is a mechanism for multi-destination - delivery of a single message, by transforming (or "expanding" or - "exploding") a pseudo-mailbox address into a list of destination - mailbox addresses. When a message is sent to such a pseudo-mailbox - (sometimes called an "exploder"), copies are forwarded or - redistributed to each mailbox in the expanded list. Servers SHOULD - simply utilize the addresses on the list; application of heuristics - or other matching rules to eliminate some addresses, such as that of - the originator, is strongly discouraged. We classify such a pseudo- - mailbox as an "alias" or a "list", depending upon the expansion - rules. - -3.10.1 Alias - - To expand an alias, the recipient mailer simply replaces the pseudo- - mailbox address in the envelope with each of the expanded addresses - in turn; the rest of the envelope and the message body are left - unchanged. The message is then delivered or forwarded to each - expanded address. - -3.10.2 List - - A mailing list may be said to operate by "redistribution" rather than - by "forwarding". To expand a list, the recipient mailer replaces the - pseudo-mailbox address in the envelope with all of the expanded - - - -Klensin Standards Track [Page 28] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - addresses. The return address in the envelope is changed so that all - error messages generated by the final deliveries will be returned to - a list administrator, not to the message originator, who generally - has no control over the contents of the list and will typically find - error messages annoying. - -4. The SMTP Specifications - -4.1 SMTP Commands - -4.1.1 Command Semantics and Syntax - - The SMTP commands define the mail transfer or the mail system - function requested by the user. SMTP commands are character strings - terminated by . The commands themselves are alphabetic - characters terminated by if parameters follow and - otherwise. (In the interest of improved interoperability, SMTP - receivers are encouraged to tolerate trailing white space before the - terminating .) The syntax of the local part of a mailbox must - conform to receiver site conventions and the syntax specified in - section 4.1.2. The SMTP commands are discussed below. The SMTP - replies are discussed in section 4.2. - - A mail transaction involves several data objects which are - communicated as arguments to different commands. The reverse-path is - the argument of the MAIL command, the forward-path is the argument of - the RCPT command, and the mail data is the argument of the DATA - command. These arguments or data objects must be transmitted and - held pending the confirmation communicated by the end of mail data - indication which finalizes the transaction. The model for this is - that distinct buffers are provided to hold the types of data objects, - that is, there is a reverse-path buffer, a forward-path buffer, and a - mail data buffer. Specific commands cause information to be appended - to a specific buffer, or cause one or more buffers to be cleared. - - Several commands (RSET, DATA, QUIT) are specified as not permitting - parameters. In the absence of specific extensions offered by the - server and accepted by the client, clients MUST NOT send such - parameters and servers SHOULD reject commands containing them as - having invalid syntax. - -4.1.1.1 Extended HELLO (EHLO) or HELLO (HELO) - - These commands are used to identify the SMTP client to the SMTP - server. The argument field contains the fully-qualified domain name - of the SMTP client if one is available. In situations in which the - SMTP client system does not have a meaningful domain name (e.g., when - its address is dynamically allocated and no reverse mapping record is - - - -Klensin Standards Track [Page 29] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - available), the client SHOULD send an address literal (see section - 4.1.3), optionally followed by information that will help to identify - the client system. y The SMTP server identifies itself to the SMTP - client in the connection greeting reply and in the response to this - command. - - A client SMTP SHOULD start an SMTP session by issuing the EHLO - command. If the SMTP server supports the SMTP service extensions it - will give a successful response, a failure response, or an error - response. If the SMTP server, in violation of this specification, - does not support any SMTP service extensions it will generate an - error response. Older client SMTP systems MAY, as discussed above, - use HELO (as specified in RFC 821) instead of EHLO, and servers MUST - support the HELO command and reply properly to it. In any event, a - client MUST issue HELO or EHLO before starting a mail transaction. - - These commands, and a "250 OK" reply to one of them, confirm that - both the SMTP client and the SMTP server are in the initial state, - that is, there is no transaction in progress and all state tables and - buffers are cleared. - - Syntax: - - ehlo = "EHLO" SP Domain CRLF - helo = "HELO" SP Domain CRLF - - Normally, the response to EHLO will be a multiline reply. Each line - of the response contains a keyword and, optionally, one or more - parameters. Following the normal syntax for multiline replies, these - keyworks follow the code (250) and a hyphen for all but the last - line, and the code and a space for the last line. The syntax for a - positive response, using the ABNF notation and terminal symbols of - [8], is: - - ehlo-ok-rsp = ( "250" domain [ SP ehlo-greet ] CRLF ) - / ( "250-" domain [ SP ehlo-greet ] CRLF - *( "250-" ehlo-line CRLF ) - "250" SP ehlo-line CRLF ) - - ehlo-greet = 1*(%d0-9 / %d11-12 / %d14-127) - ; string of any characters other than CR or LF - - ehlo-line = ehlo-keyword *( SP ehlo-param ) - - ehlo-keyword = (ALPHA / DIGIT) *(ALPHA / DIGIT / "-") - ; additional syntax of ehlo-params depends on - ; ehlo-keyword - - - - -Klensin Standards Track [Page 30] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - ehlo-param = 1*(%d33-127) - ; any CHAR excluding and all - ; control characters (US-ASCII 0-31 inclusive) - - Although EHLO keywords may be specified in upper, lower, or mixed - case, they MUST always be recognized and processed in a case- - insensitive manner. This is simply an extension of practices - specified in RFC 821 and section 2.4.1. - -4.1.1.2 MAIL (MAIL) - - This command is used to initiate a mail transaction in which the mail - data is delivered to an SMTP server which may, in turn, deliver it to - one or more mailboxes or pass it on to another system (possibly using - SMTP). The argument field contains a reverse-path and may contain - optional parameters. In general, the MAIL command may be sent only - when no mail transaction is in progress, see section 4.1.4. - - The reverse-path consists of the sender mailbox. Historically, that - mailbox might optionally have been preceded by a list of hosts, but - that behavior is now deprecated (see appendix C). In some types of - reporting messages for which a reply is likely to cause a mail loop - (for example, mail delivery and nondelivery notifications), the - reverse-path may be null (see section 3.7). - - This command clears the reverse-path buffer, the forward-path buffer, - and the mail data buffer; and inserts the reverse-path information - from this command into the reverse-path buffer. - - If service extensions were negotiated, the MAIL command may also - carry parameters associated with a particular service extension. - - Syntax: - - "MAIL FROM:" ("<>" / Reverse-Path) - [SP Mail-parameters] CRLF - -4.1.1.3 RECIPIENT (RCPT) - - This command is used to identify an individual recipient of the mail - data; multiple recipients are specified by multiple use of this - command. The argument field contains a forward-path and may contain - optional parameters. - - The forward-path normally consists of the required destination - mailbox. Sending systems SHOULD not generate the optional list of - hosts known as a source route. Receiving systems MUST recognize - - - - -Klensin Standards Track [Page 31] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - source route syntax but SHOULD strip off the source route - specification and utilize the domain name associated with the mailbox - as if the source route had not been provided. - - Similarly, relay hosts SHOULD strip or ignore source routes, and - names MUST NOT be copied into the reverse-path. When mail reaches - its ultimate destination (the forward-path contains only a - destination mailbox), the SMTP server inserts it into the destination - mailbox in accordance with its host mail conventions. - - For example, mail received at relay host xyz.com with envelope - commands - - MAIL FROM: - RCPT TO:<@hosta.int,@jkl.org:userc@d.bar.org> - - will normally be sent directly on to host d.bar.org with envelope - commands - - MAIL FROM: - RCPT TO: - - As provided in appendix C, xyz.com MAY also choose to relay the - message to hosta.int, using the envelope commands - - MAIL FROM: - RCPT TO:<@hosta.int,@jkl.org:userc@d.bar.org> - - or to jkl.org, using the envelope commands - - MAIL FROM: - RCPT TO:<@jkl.org:userc@d.bar.org> - - Of course, since hosts are not required to relay mail at all, xyz.com - may also reject the message entirely when the RCPT command is - received, using a 550 code (since this is a "policy reason"). - - If service extensions were negotiated, the RCPT command may also - carry parameters associated with a particular service extension - offered by the server. The client MUST NOT transmit parameters other - than those associated with a service extension offered by the server - in its EHLO response. - -Syntax: - "RCPT TO:" ("" / "" / Forward-Path) - [SP Rcpt-parameters] CRLF - - - - - -Klensin Standards Track [Page 32] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -4.1.1.4 DATA (DATA) - - The receiver normally sends a 354 response to DATA, and then treats - the lines (strings ending in sequences, as described in - section 2.3.7) following the command as mail data from the sender. - This command causes the mail data to be appended to the mail data - buffer. The mail data may contain any of the 128 ASCII character - codes, although experience has indicated that use of control - characters other than SP, HT, CR, and LF may cause problems and - SHOULD be avoided when possible. - - The mail data is terminated by a line containing only a period, that - is, the character sequence "." (see section 4.5.2). This - is the end of mail data indication. Note that the first of - this terminating sequence is also the that ends the final line - of the data (message text) or, if there was no data, ends the DATA - command itself. An extra MUST NOT be added, as that would - cause an empty line to be added to the message. The only exception - to this rule would arise if the message body were passed to the - originating SMTP-sender with a final "line" that did not end in - ; in that case, the originating SMTP system MUST either reject - the message as invalid or add in order to have the receiving - SMTP server recognize the "end of data" condition. - - The custom of accepting lines ending only in , as a concession to - non-conforming behavior on the part of some UNIX systems, has proven - to cause more interoperability problems than it solves, and SMTP - server systems MUST NOT do this, even in the name of improved - robustness. In particular, the sequence "." (bare line - feeds, without carriage returns) MUST NOT be treated as equivalent to - . as the end of mail data indication. - - Receipt of the end of mail data indication requires the server to - process the stored mail transaction information. This processing - consumes the information in the reverse-path buffer, the forward-path - buffer, and the mail data buffer, and on the completion of this - command these buffers are cleared. If the processing is successful, - the receiver MUST send an OK reply. If the processing fails the - receiver MUST send a failure reply. The SMTP model does not allow - for partial failures at this point: either the message is accepted by - the server for delivery and a positive response is returned or it is - not accepted and a failure reply is returned. In sending a positive - completion reply to the end of data indication, the receiver takes - full responsibility for the message (see section 6.1). Errors that - are diagnosed subsequently MUST be reported in a mail message, as - discussed in section 4.4. - - - - - -Klensin Standards Track [Page 33] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - When the SMTP server accepts a message either for relaying or for - final delivery, it inserts a trace record (also referred to - interchangeably as a "time stamp line" or "Received" line) at the top - of the mail data. This trace record indicates the identity of the - host that sent the message, the identity of the host that received - the message (and is inserting this time stamp), and the date and time - the message was received. Relayed messages will have multiple time - stamp lines. Details for formation of these lines, including their - syntax, is specified in section 4.4. - - Additional discussion about the operation of the DATA command appears - in section 3.3. - - Syntax: - "DATA" CRLF - -4.1.1.5 RESET (RSET) - - This command specifies that the current mail transaction will be - aborted. Any stored sender, recipients, and mail data MUST be - discarded, and all buffers and state tables cleared. The receiver - MUST send a "250 OK" reply to a RSET command with no arguments. A - reset command may be issued by the client at any time. It is - effectively equivalent to a NOOP (i.e., if has no effect) if issued - immediately after EHLO, before EHLO is issued in the session, after - an end-of-data indicator has been sent and acknowledged, or - immediately before a QUIT. An SMTP server MUST NOT close the - connection as the result of receiving a RSET; that action is reserved - for QUIT (see section 4.1.1.10). - - Since EHLO implies some additional processing and response by the - server, RSET will normally be more efficient than reissuing that - command, even though the formal semantics are the same. - - There are circumstances, contrary to the intent of this - specification, in which an SMTP server may receive an indication that - the underlying TCP connection has been closed or reset. To preserve - the robustness of the mail system, SMTP servers SHOULD be prepared - for this condition and SHOULD treat it as if a QUIT had been received - before the connection disappeared. - - Syntax: - "RSET" CRLF - - - - - - - - -Klensin Standards Track [Page 34] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -4.1.1.6 VERIFY (VRFY) - - This command asks the receiver to confirm that the argument - identifies a user or mailbox. If it is a user name, information is - returned as specified in section 3.5. - - This command has no effect on the reverse-path buffer, the forward- - path buffer, or the mail data buffer. - - Syntax: - "VRFY" SP String CRLF - -4.1.1.7 EXPAND (EXPN) - - This command asks the receiver to confirm that the argument - identifies a mailing list, and if so, to return the membership of - that list. If the command is successful, a reply is returned - containing information as described in section 3.5. This reply will - have multiple lines except in the trivial case of a one-member list. - - This command has no effect on the reverse-path buffer, the forward- - path buffer, or the mail data buffer and may be issued at any time. - - Syntax: - "EXPN" SP String CRLF - -4.1.1.8 HELP (HELP) - - This command causes the server to send helpful information to the - client. The command MAY take an argument (e.g., any command name) - and return more specific information as a response. - - This command has no effect on the reverse-path buffer, the forward- - path buffer, or the mail data buffer and may be issued at any time. - - SMTP servers SHOULD support HELP without arguments and MAY support it - with arguments. - - Syntax: - "HELP" [ SP String ] CRLF - -4.1.1.9 NOOP (NOOP) - - This command does not affect any parameters or previously entered - commands. It specifies no action other than that the receiver send - an OK reply. - - - - - -Klensin Standards Track [Page 35] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - This command has no effect on the reverse-path buffer, the forward- - path buffer, or the mail data buffer and may be issued at any time. - If a parameter string is specified, servers SHOULD ignore it. - - Syntax: - "NOOP" [ SP String ] CRLF - -4.1.1.10 QUIT (QUIT) - - This command specifies that the receiver MUST send an OK reply, and - then close the transmission channel. - - The receiver MUST NOT intentionally close the transmission channel - until it receives and replies to a QUIT command (even if there was an - error). The sender MUST NOT intentionally close the transmission - channel until it sends a QUIT command and SHOULD wait until it - receives the reply (even if there was an error response to a previous - command). If the connection is closed prematurely due to violations - of the above or system or network failure, the server MUST cancel any - pending transaction, but not undo any previously completed - transaction, and generally MUST act as if the command or transaction - in progress had received a temporary error (i.e., a 4yz response). - - The QUIT command may be issued at any time. - - Syntax: - "QUIT" CRLF - -4.1.2 Command Argument Syntax - - The syntax of the argument fields of the above commands (using the - syntax specified in [8] where applicable) is given below. Some of - the productions given below are used only in conjunction with source - routes as described in appendix C. Terminals not defined in this - document, such as ALPHA, DIGIT, SP, CR, LF, CRLF, are as defined in - the "core" syntax [8 (section 6)] or in the message format syntax - [32]. - - Reverse-path = Path - Forward-path = Path - Path = "<" [ A-d-l ":" ] Mailbox ">" - A-d-l = At-domain *( "," A-d-l ) - ; Note that this form, the so-called "source route", - ; MUST BE accepted, SHOULD NOT be generated, and SHOULD be - ; ignored. - At-domain = "@" domain - Mail-parameters = esmtp-param *(SP esmtp-param) - Rcpt-parameters = esmtp-param *(SP esmtp-param) - - - -Klensin Standards Track [Page 36] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - esmtp-param = esmtp-keyword ["=" esmtp-value] - esmtp-keyword = (ALPHA / DIGIT) *(ALPHA / DIGIT / "-") - esmtp-value = 1*(%d33-60 / %d62-127) - ; any CHAR excluding "=", SP, and control characters - Keyword = Ldh-str - Argument = Atom - Domain = (sub-domain 1*("." sub-domain)) / address-literal - sub-domain = Let-dig [Ldh-str] - - address-literal = "[" IPv4-address-literal / - IPv6-address-literal / - General-address-literal "]" - ; See section 4.1.3 - - Mailbox = Local-part "@" Domain - - Local-part = Dot-string / Quoted-string - ; MAY be case-sensitive - - Dot-string = Atom *("." Atom) - - Atom = 1*atext - - Quoted-string = DQUOTE *qcontent DQUOTE - - String = Atom / Quoted-string - - While the above definition for Local-part is relatively permissive, - for maximum interoperability, a host that expects to receive mail - SHOULD avoid defining mailboxes where the Local-part requires (or - uses) the Quoted-string form or where the Local-part is case- - sensitive. For any purposes that require generating or comparing - Local-parts (e.g., to specific mailbox names), all quoted forms MUST - be treated as equivalent and the sending system SHOULD transmit the - form that uses the minimum quoting possible. - - Systems MUST NOT define mailboxes in such a way as to require the use - in SMTP of non-ASCII characters (octets with the high order bit set - to one) or ASCII "control characters" (decimal value 0-31 and 127). - These characters MUST NOT be used in MAIL or RCPT commands or other - commands that require mailbox names. - - Note that the backslash, "\", is a quote character, which is used to - indicate that the next character is to be used literally (instead of - its normal interpretation). For example, "Joe\,Smith" indicates a - single nine character user field with the comma being the fourth - character of the field. - - - - -Klensin Standards Track [Page 37] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - To promote interoperability and consistent with long-standing - guidance about conservative use of the DNS in naming and applications - (e.g., see section 2.3.1 of the base DNS document, RFC1035 [22]), - characters outside the set of alphas, digits, and hyphen MUST NOT - appear in domain name labels for SMTP clients or servers. In - particular, the underscore character is not permitted. SMTP servers - that receive a command in which invalid character codes have been - employed, and for which there are no other reasons for rejection, - MUST reject that command with a 501 response. - -4.1.3 Address Literals - - Sometimes a host is not known to the domain name system and - communication (and, in particular, communication to report and repair - the error) is blocked. To bypass this barrier a special literal form - of the address is allowed as an alternative to a domain name. For - IPv4 addresses, this form uses four small decimal integers separated - by dots and enclosed by brackets such as [123.255.37.2], which - indicates an (IPv4) Internet Address in sequence-of-octets form. For - IPv6 and other forms of addressing that might eventually be - standardized, the form consists of a standardized "tag" that - identifies the address syntax, a colon, and the address itself, in a - format specified as part of the IPv6 standards [17]. - - Specifically: - - IPv4-address-literal = Snum 3("." Snum) - IPv6-address-literal = "IPv6:" IPv6-addr - General-address-literal = Standardized-tag ":" 1*dcontent - Standardized-tag = Ldh-str - ; MUST be specified in a standards-track RFC - ; and registered with IANA - - Snum = 1*3DIGIT ; representing a decimal integer - ; value in the range 0 through 255 - Let-dig = ALPHA / DIGIT - Ldh-str = *( ALPHA / DIGIT / "-" ) Let-dig - - IPv6-addr = IPv6-full / IPv6-comp / IPv6v4-full / IPv6v4-comp - IPv6-hex = 1*4HEXDIG - IPv6-full = IPv6-hex 7(":" IPv6-hex) - IPv6-comp = [IPv6-hex *5(":" IPv6-hex)] "::" [IPv6-hex *5(":" - IPv6-hex)] - ; The "::" represents at least 2 16-bit groups of zeros - ; No more than 6 groups in addition to the "::" may be - ; present - IPv6v4-full = IPv6-hex 5(":" IPv6-hex) ":" IPv4-address-literal - IPv6v4-comp = [IPv6-hex *3(":" IPv6-hex)] "::" - - - -Klensin Standards Track [Page 38] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - [IPv6-hex *3(":" IPv6-hex) ":"] IPv4-address-literal - ; The "::" represents at least 2 16-bit groups of zeros - ; No more than 4 groups in addition to the "::" and - ; IPv4-address-literal may be present - -4.1.4 Order of Commands - - There are restrictions on the order in which these commands may be - used. - - A session that will contain mail transactions MUST first be - initialized by the use of the EHLO command. An SMTP server SHOULD - accept commands for non-mail transactions (e.g., VRFY or EXPN) - without this initialization. - - An EHLO command MAY be issued by a client later in the session. If - it is issued after the session begins, the SMTP server MUST clear all - buffers and reset the state exactly as if a RSET command had been - issued. In other words, the sequence of RSET followed immediately by - EHLO is redundant, but not harmful other than in the performance cost - of executing unnecessary commands. - - If the EHLO command is not acceptable to the SMTP server, 501, 500, - or 502 failure replies MUST be returned as appropriate. The SMTP - server MUST stay in the same state after transmitting these replies - that it was in before the EHLO was received. - - The SMTP client MUST, if possible, ensure that the domain parameter - to the EHLO command is a valid principal host name (not a CNAME or MX - name) for its host. If this is not possible (e.g., when the client's - address is dynamically assigned and the client does not have an - obvious name), an address literal SHOULD be substituted for the - domain name and supplemental information provided that will assist in - identifying the client. - - An SMTP server MAY verify that the domain name parameter in the EHLO - command actually corresponds to the IP address of the client. - However, the server MUST NOT refuse to accept a message for this - reason if the verification fails: the information about verification - failure is for logging and tracing only. - - The NOOP, HELP, EXPN, VRFY, and RSET commands can be used at any time - during a session, or without previously initializing a session. SMTP - servers SHOULD process these normally (that is, not return a 503 - code) even if no EHLO command has yet been received; clients SHOULD - open a session with EHLO before sending these commands. - - - - - -Klensin Standards Track [Page 39] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - If these rules are followed, the example in RFC 821 that shows "550 - access denied to you" in response to an EXPN command is incorrect - unless an EHLO command precedes the EXPN or the denial of access is - based on the client's IP address or other authentication or - authorization-determining mechanisms. - - The MAIL command (or the obsolete SEND, SOML, or SAML commands) - begins a mail transaction. Once started, a mail transaction consists - of a transaction beginning command, one or more RCPT commands, and a - DATA command, in that order. A mail transaction may be aborted by - the RSET (or a new EHLO) command. There may be zero or more - transactions in a session. MAIL (or SEND, SOML, or SAML) MUST NOT be - sent if a mail transaction is already open, i.e., it should be sent - only if no mail transaction had been started in the session, or it - the previous one successfully concluded with a successful DATA - command, or if the previous one was aborted with a RSET. - - If the transaction beginning command argument is not acceptable, a - 501 failure reply MUST be returned and the SMTP server MUST stay in - the same state. If the commands in a transaction are out of order to - the degree that they cannot be processed by the server, a 503 failure - reply MUST be returned and the SMTP server MUST stay in the same - state. - - The last command in a session MUST be the QUIT command. The QUIT - command cannot be used at any other time in a session, but SHOULD be - used by the client SMTP to request connection closure, even when no - session opening command was sent and accepted. - -4.1.5 Private-use Commands - - As specified in section 2.2.2, commands starting in "X" may be used - by bilateral agreement between the client (sending) and server - (receiving) SMTP agents. An SMTP server that does not recognize such - a command is expected to reply with "500 Command not recognized". An - extended SMTP server MAY list the feature names associated with these - private commands in the response to the EHLO command. - - Commands sent or accepted by SMTP systems that do not start with "X" - MUST conform to the requirements of section 2.2.2. - -4.2 SMTP Replies - - Replies to SMTP commands serve to ensure the synchronization of - requests and actions in the process of mail transfer and to guarantee - that the SMTP client always knows the state of the SMTP server. - Every command MUST generate exactly one reply. - - - - -Klensin Standards Track [Page 40] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - The details of the command-reply sequence are described in section - 4.3. - - An SMTP reply consists of a three digit number (transmitted as three - numeric characters) followed by some text unless specified otherwise - in this document. The number is for use by automata to determine - what state to enter next; the text is for the human user. The three - digits contain enough encoded information that the SMTP client need - not examine the text and may either discard it or pass it on to the - user, as appropriate. Exceptions are as noted elsewhere in this - document. In particular, the 220, 221, 251, 421, and 551 reply codes - are associated with message text that must be parsed and interpreted - by machines. In the general case, the text may be receiver dependent - and context dependent, so there are likely to be varying texts for - each reply code. A discussion of the theory of reply codes is given - in section 4.2.1. Formally, a reply is defined to be the sequence: a - three-digit code, , one line of text, and , or a multiline - reply (as defined in section 4.2.1). Since, in violation of this - specification, the text is sometimes not sent, clients which do not - receive it SHOULD be prepared to process the code alone (with or - without a trailing space character). Only the EHLO, EXPN, and HELP - commands are expected to result in multiline replies in normal - circumstances, however, multiline replies are allowed for any - command. - - In ABNF, server responses are: - - Greeting = "220 " Domain [ SP text ] CRLF - Reply-line = Reply-code [ SP text ] CRLF - - where "Greeting" appears only in the 220 response that announces that - the server is opening its part of the connection. - - An SMTP server SHOULD send only the reply codes listed in this - document. An SMTP server SHOULD use the text shown in the examples - whenever appropriate. - - An SMTP client MUST determine its actions only by the reply code, not - by the text (except for the "change of address" 251 and 551 and, if - necessary, 220, 221, and 421 replies); in the general case, any text, - including no text at all (although senders SHOULD NOT send bare - codes), MUST be acceptable. The space (blank) following the reply - code is considered part of the text. Whenever possible, a receiver- - SMTP SHOULD test the first digit (severity indication) of the reply - code. - - - - - - -Klensin Standards Track [Page 41] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - The list of codes that appears below MUST NOT be construed as - permanent. While the addition of new codes should be a rare and - significant activity, with supplemental information in the textual - part of the response being preferred, new codes may be added as the - result of new Standards or Standards-track specifications. - Consequently, a sender-SMTP MUST be prepared to handle codes not - specified in this document and MUST do so by interpreting the first - digit only. - -4.2.1 Reply Code Severities and Theory - - The three digits of the reply each have a special significance. The - first digit denotes whether the response is good, bad or incomplete. - An unsophisticated SMTP client, or one that receives an unexpected - code, will be able to determine its next action (proceed as planned, - redo, retrench, etc.) by examining this first digit. An SMTP client - that wants to know approximately what kind of error occurred (e.g., - mail system error, command syntax error) may examine the second - digit. The third digit and any supplemental information that may be - present is reserved for the finest gradation of information. - - There are five values for the first digit of the reply code: - - 1yz Positive Preliminary reply - The command has been accepted, but the requested action is being - held in abeyance, pending confirmation of the information in this - reply. The SMTP client should send another command specifying - whether to continue or abort the action. Note: unextended SMTP - does not have any commands that allow this type of reply, and so - does not have continue or abort commands. - - 2yz Positive Completion reply - The requested action has been successfully completed. A new - request may be initiated. - - 3yz Positive Intermediate reply - The command has been accepted, but the requested action is being - held in abeyance, pending receipt of further information. The - SMTP client should send another command specifying this - information. This reply is used in command sequence groups (i.e., - in DATA). - - 4yz Transient Negative Completion reply - The command was not accepted, and the requested action did not - occur. However, the error condition is temporary and the action - may be requested again. The sender should return to the beginning - of the command sequence (if any). It is difficult to assign a - meaning to "transient" when two different sites (receiver- and - - - -Klensin Standards Track [Page 42] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - sender-SMTP agents) must agree on the interpretation. Each reply - in this category might have a different time value, but the SMTP - client is encouraged to try again. A rule of thumb to determine - whether a reply fits into the 4yz or the 5yz category (see below) - is that replies are 4yz if they can be successful if repeated - without any change in command form or in properties of the sender - or receiver (that is, the command is repeated identically and the - receiver does not put up a new implementation.) - - 5yz Permanent Negative Completion reply - The command was not accepted and the requested action did not - occur. The SMTP client is discouraged from repeating the exact - request (in the same sequence). Even some "permanent" error - conditions can be corrected, so the human user may want to direct - the SMTP client to reinitiate the command sequence by direct - action at some point in the future (e.g., after the spelling has - been changed, or the user has altered the account status). - - The second digit encodes responses in specific categories: - - x0z Syntax: These replies refer to syntax errors, syntactically - correct commands that do not fit any functional category, and - unimplemented or superfluous commands. - - x1z Information: These are replies to requests for information, - such as status or help. - - x2z Connections: These are replies referring to the transmission - channel. - - x3z Unspecified. - - x4z Unspecified. - - x5z Mail system: These replies indicate the status of the receiver - mail system vis-a-vis the requested transfer or other mail system - action. - - The third digit gives a finer gradation of meaning in each category - specified by the second digit. The list of replies illustrates this. - Each reply text is recommended rather than mandatory, and may even - change according to the command with which it is associated. On the - other hand, the reply codes must strictly follow the specifications - in this section. Receiver implementations should not invent new - codes for slightly different situations from the ones described here, - but rather adapt codes already defined. - - - - - -Klensin Standards Track [Page 43] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - For example, a command such as NOOP, whose successful execution does - not offer the SMTP client any new information, will return a 250 - reply. The reply is 502 when the command requests an unimplemented - non-site-specific action. A refinement of that is the 504 reply for - a command that is implemented, but that requests an unimplemented - parameter. - - The reply text may be longer than a single line; in these cases the - complete text must be marked so the SMTP client knows when it can - stop reading the reply. This requires a special format to indicate a - multiple line reply. - - The format for multiline replies requires that every line, except the - last, begin with the reply code, followed immediately by a hyphen, - "-" (also known as minus), followed by text. The last line will - begin with the reply code, followed immediately by , optionally - some text, and . As noted above, servers SHOULD send the - if subsequent text is not sent, but clients MUST be prepared for it - to be omitted. - - For example: - - 123-First line - 123-Second line - 123-234 text beginning with numbers - 123 The last line - - In many cases the SMTP client then simply needs to search for a line - beginning with the reply code followed by or and ignore - all preceding lines. In a few cases, there is important data for the - client in the reply "text". The client will be able to identify - these cases from the current context. - -4.2.2 Reply Codes by Function Groups - - 500 Syntax error, command unrecognized - (This may include errors such as command line too long) - 501 Syntax error in parameters or arguments - 502 Command not implemented (see section 4.2.4) - 503 Bad sequence of commands - 504 Command parameter not implemented - - 211 System status, or system help reply - 214 Help message - (Information on how to use the receiver or the meaning of a - particular non-standard command; this reply is useful only - to the human user) - - - - -Klensin Standards Track [Page 44] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - 220 Service ready - 221 Service closing transmission channel - 421 Service not available, closing transmission channel - (This may be a reply to any command if the service knows it - must shut down) - - 250 Requested mail action okay, completed - 251 User not local; will forward to - (See section 3.4) - 252 Cannot VRFY user, but will accept message and attempt - delivery - (See section 3.5.3) - 450 Requested mail action not taken: mailbox unavailable - (e.g., mailbox busy) - 550 Requested action not taken: mailbox unavailable - (e.g., mailbox not found, no access, or command rejected - for policy reasons) - 451 Requested action aborted: error in processing - 551 User not local; please try - (See section 3.4) - 452 Requested action not taken: insufficient system storage - 552 Requested mail action aborted: exceeded storage allocation - 553 Requested action not taken: mailbox name not allowed - (e.g., mailbox syntax incorrect) - 354 Start mail input; end with . - 554 Transaction failed (Or, in the case of a connection-opening - response, "No SMTP service here") - -4.2.3 Reply Codes in Numeric Order - - 211 System status, or system help reply - 214 Help message - (Information on how to use the receiver or the meaning of a - particular non-standard command; this reply is useful only - to the human user) - 220 Service ready - 221 Service closing transmission channel - 250 Requested mail action okay, completed - 251 User not local; will forward to - (See section 3.4) - 252 Cannot VRFY user, but will accept message and attempt - delivery - (See section 3.5.3) - - 354 Start mail input; end with . - - - - - - -Klensin Standards Track [Page 45] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - 421 Service not available, closing transmission channel - (This may be a reply to any command if the service knows it - must shut down) - 450 Requested mail action not taken: mailbox unavailable - (e.g., mailbox busy) - 451 Requested action aborted: local error in processing - 452 Requested action not taken: insufficient system storage - 500 Syntax error, command unrecognized - (This may include errors such as command line too long) - 501 Syntax error in parameters or arguments - 502 Command not implemented (see section 4.2.4) - 503 Bad sequence of commands - 504 Command parameter not implemented - 550 Requested action not taken: mailbox unavailable - (e.g., mailbox not found, no access, or command rejected - for policy reasons) - 551 User not local; please try - (See section 3.4) - 552 Requested mail action aborted: exceeded storage allocation - 553 Requested action not taken: mailbox name not allowed - (e.g., mailbox syntax incorrect) - 554 Transaction failed (Or, in the case of a connection-opening - response, "No SMTP service here") - -4.2.4 Reply Code 502 - - Questions have been raised as to when reply code 502 (Command not - implemented) SHOULD be returned in preference to other codes. 502 - SHOULD be used when the command is actually recognized by the SMTP - server, but not implemented. If the command is not recognized, code - 500 SHOULD be returned. Extended SMTP systems MUST NOT list - capabilities in response to EHLO for which they will return 502 (or - 500) replies. - -4.2.5 Reply Codes After DATA and the Subsequent . - - When an SMTP server returns a positive completion status (2yz code) - after the DATA command is completed with ., it accepts - responsibility for: - - - delivering the message (if the recipient mailbox exists), or - - - if attempts to deliver the message fail due to transient - conditions, retrying delivery some reasonable number of times at - intervals as specified in section 4.5.4. - - - - - - -Klensin Standards Track [Page 46] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - - if attempts to deliver the message fail due to permanent - conditions, or if repeated attempts to deliver the message fail - due to transient conditions, returning appropriate notification to - the sender of the original message (using the address in the SMTP - MAIL command). - - When an SMTP server returns a permanent error status (5yz) code after - the DATA command is completed with ., it MUST NOT make - any subsequent attempt to deliver that message. The SMTP client - retains responsibility for delivery of that message and may either - return it to the user or requeue it for a subsequent attempt (see - section 4.5.4.1). - - The user who originated the message SHOULD be able to interpret the - return of a transient failure status (by mail message or otherwise) - as a non-delivery indication, just as a permanent failure would be - interpreted. I.e., if the client SMTP successfully handles these - conditions, the user will not receive such a reply. - - When an SMTP server returns a permanent error status (5yz) code after - the DATA command is completely with ., it MUST NOT make - any subsequent attempt to deliver the message. As with temporary - error status codes, the SMTP client retains responsibility for the - message, but SHOULD not again attempt delivery to the same server - without user review and intervention of the message. - -4.3 Sequencing of Commands and Replies - -4.3.1 Sequencing Overview - - The communication between the sender and receiver is an alternating - dialogue, controlled by the sender. As such, the sender issues a - command and the receiver responds with a reply. Unless other - arrangements are negotiated through service extensions, the sender - MUST wait for this response before sending further commands. - - One important reply is the connection greeting. Normally, a receiver - will send a 220 "Service ready" reply when the connection is - completed. The sender SHOULD wait for this greeting message before - sending any commands. - - Note: all the greeting-type replies have the official name (the - fully-qualified primary domain name) of the server host as the first - word following the reply code. Sometimes the host will have no - meaningful name. See 4.1.3 for a discussion of alternatives in these - situations. - - - - - -Klensin Standards Track [Page 47] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - For example, - - 220 ISIF.USC.EDU Service ready - or - 220 mail.foo.com SuperSMTP v 6.1.2 Service ready - or - 220 [10.0.0.1] Clueless host service ready - - The table below lists alternative success and failure replies for - each command. These SHOULD be strictly adhered to: a receiver may - substitute text in the replies, but the meaning and action implied by - the code numbers and by the specific command reply sequence cannot be - altered. - -4.3.2 Command-Reply Sequences - - Each command is listed with its usual possible replies. The prefixes - used before the possible replies are "I" for intermediate, "S" for - success, and "E" for error. Since some servers may generate other - replies under special circumstances, and to allow for future - extension, SMTP clients SHOULD, when possible, interpret only the - first digit of the reply and MUST be prepared to deal with - unrecognized reply codes by interpreting the first digit only. - Unless extended using the mechanisms described in section 2.2, SMTP - servers MUST NOT transmit reply codes to an SMTP client that are - other than three digits or that do not start in a digit between 2 and - 5 inclusive. - - These sequencing rules and, in principle, the codes themselves, can - be extended or modified by SMTP extensions offered by the server and - accepted (requested) by the client. - - In addition to the codes listed below, any SMTP command can return - any of the following codes if the corresponding unusual circumstances - are encountered: - - 500 For the "command line too long" case or if the command name was - not recognized. Note that producing a "command not recognized" - error in response to the required subset of these commands is a - violation of this specification. - - 501 Syntax error in command or arguments. In order to provide for - future extensions, commands that are specified in this document as - not accepting arguments (DATA, RSET, QUIT) SHOULD return a 501 - message if arguments are supplied in the absence of EHLO- - advertised extensions. - - 421 Service shutting down and closing transmission channel - - - -Klensin Standards Track [Page 48] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - Specific sequences are: - - CONNECTION ESTABLISHMENT - S: 220 - E: 554 - EHLO or HELO - S: 250 - E: 504, 550 - MAIL - S: 250 - E: 552, 451, 452, 550, 553, 503 - RCPT - S: 250, 251 (but see section 3.4 for discussion of 251 and 551) - E: 550, 551, 552, 553, 450, 451, 452, 503, 550 - DATA - I: 354 -> data -> S: 250 - E: 552, 554, 451, 452 - E: 451, 554, 503 - RSET - S: 250 - VRFY - S: 250, 251, 252 - E: 550, 551, 553, 502, 504 - EXPN - S: 250, 252 - E: 550, 500, 502, 504 - HELP - S: 211, 214 - E: 502, 504 - NOOP - S: 250 - QUIT - S: 221 - -4.4 Trace Information - - When an SMTP server receives a message for delivery or further - processing, it MUST insert trace ("time stamp" or "Received") - information at the beginning of the message content, as discussed in - section 4.1.1.4. - - This line MUST be structured as follows: - - - The FROM field, which MUST be supplied in an SMTP environment, - SHOULD contain both (1) the name of the source host as presented - in the EHLO command and (2) an address literal containing the IP - address of the source, determined from the TCP connection. - - - - -Klensin Standards Track [Page 49] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - - The ID field MAY contain an "@" as suggested in RFC 822, but this - is not required. - - - The FOR field MAY contain a list of entries when multiple - RCPT commands have been given. This may raise some security - issues and is usually not desirable; see section 7.2. - - An Internet mail program MUST NOT change a Received: line that was - previously added to the message header. SMTP servers MUST prepend - Received lines to messages; they MUST NOT change the order of - existing lines or insert Received lines in any other location. - - As the Internet grows, comparability of Received fields is important - for detecting problems, especially slow relays. SMTP servers that - create Received fields SHOULD use explicit offsets in the dates - (e.g., -0800), rather than time zone names of any type. Local time - (with an offset) is preferred to UT when feasible. This formulation - allows slightly more information about local circumstances to be - specified. If UT is needed, the receiver need merely do some simple - arithmetic to convert the values. Use of UT loses information about - the time zone-location of the server. If it is desired to supply a - time zone name, it SHOULD be included in a comment. - - When the delivery SMTP server makes the "final delivery" of a - message, it inserts a return-path line at the beginning of the mail - data. This use of return-path is required; mail systems MUST support - it. The return-path line preserves the information in the from the MAIL command. Here, final delivery means the message - has left the SMTP environment. Normally, this would mean it had been - delivered to the destination user or an associated mail drop, but in - some cases it may be further processed and transmitted by another - mail system. - - It is possible for the mailbox in the return path to be different - from the actual sender's mailbox, for example, if error responses are - to be delivered to a special error handling mailbox rather than to - the message sender. When mailing lists are involved, this - arrangement is common and useful as a means of directing errors to - the list maintainer rather than the message originator. - - The text above implies that the final mail data will begin with a - return path line, followed by one or more time stamp lines. These - lines will be followed by the mail data headers and body [32]. - - It is sometimes difficult for an SMTP server to determine whether or - not it is making final delivery since forwarding or other operations - may occur after the message is accepted for delivery. Consequently, - - - - -Klensin Standards Track [Page 50] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - any further (forwarding, gateway, or relay) systems MAY remove the - return path and rebuild the MAIL command as needed to ensure that - exactly one such line appears in a delivered message. - - A message-originating SMTP system SHOULD NOT send a message that - already contains a Return-path header. SMTP servers performing a - relay function MUST NOT inspect the message data, and especially not - to the extent needed to determine if Return-path headers are present. - SMTP servers making final delivery MAY remove Return-path headers - before adding their own. - - The primary purpose of the Return-path is to designate the address to - which messages indicating non-delivery or other mail system failures - are to be sent. For this to be unambiguous, exactly one return path - SHOULD be present when the message is delivered. Systems using RFC - 822 syntax with non-SMTP transports SHOULD designate an unambiguous - address, associated with the transport envelope, to which error - reports (e.g., non-delivery messages) should be sent. - - Historical note: Text in RFC 822 that appears to contradict the use - of the Return-path header (or the envelope reverse path address from - the MAIL command) as the destination for error messages is not - applicable on the Internet. The reverse path address (as copied into - the Return-path) MUST be used as the target of any mail containing - delivery error messages. - - In particular: - - - a gateway from SMTP->elsewhere SHOULD insert a return-path header, - unless it is known that the "elsewhere" transport also uses - Internet domain addresses and maintains the envelope sender - address separately. - - - a gateway from elsewhere->SMTP SHOULD delete any return-path - header present in the message, and either copy that information to - the SMTP envelope or combine it with information present in the - envelope of the other transport system to construct the reverse - path argument to the MAIL command in the SMTP envelope. - - The server must give special treatment to cases in which the - processing following the end of mail data indication is only - partially successful. This could happen if, after accepting several - recipients and the mail data, the SMTP server finds that the mail - data could be successfully delivered to some, but not all, of the - recipients. In such cases, the response to the DATA command MUST be - an OK reply. However, the SMTP server MUST compose and send an - "undeliverable mail" notification message to the originator of the - message. - - - -Klensin Standards Track [Page 51] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - A single notification listing all of the failed recipients or - separate notification messages MUST be sent for each failed - recipient. For economy of processing by the sender, the former is - preferred when possible. All undeliverable mail notification - messages are sent using the MAIL command (even if they result from - processing the obsolete SEND, SOML, or SAML commands) and use a null - return path as discussed in section 3.7. - - The time stamp line and the return path line are formally defined as - follows: - -Return-path-line = "Return-Path:" FWS Reverse-path - -Time-stamp-line = "Received:" FWS Stamp - -Stamp = From-domain By-domain Opt-info ";" FWS date-time - - ; where "date-time" is as defined in [32] - ; but the "obs-" forms, especially two-digit - ; years, are prohibited in SMTP and MUST NOT be used. - -From-domain = "FROM" FWS Extended-Domain CFWS - -By-domain = "BY" FWS Extended-Domain CFWS - -Extended-Domain = Domain / - ( Domain FWS "(" TCP-info ")" ) / - ( Address-literal FWS "(" TCP-info ")" ) - -TCP-info = Address-literal / ( Domain FWS Address-literal ) - ; Information derived by server from TCP connection - ; not client EHLO. - -Opt-info = [Via] [With] [ID] [For] - -Via = "VIA" FWS Link CFWS - -With = "WITH" FWS Protocol CFWS - -ID = "ID" FWS String / msg-id CFWS - -For = "FOR" FWS 1*( Path / Mailbox ) CFWS - -Link = "TCP" / Addtl-Link -Addtl-Link = Atom - ; Additional standard names for links are registered with the - ; Internet Assigned Numbers Authority (IANA). "Via" is - ; primarily of value with non-Internet transports. SMTP - - - -Klensin Standards Track [Page 52] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - ; servers SHOULD NOT use unregistered names. -Protocol = "ESMTP" / "SMTP" / Attdl-Protocol -Attdl-Protocol = Atom - ; Additional standard names for protocols are registered with the - ; Internet Assigned Numbers Authority (IANA). SMTP servers - ; SHOULD NOT use unregistered names. - -4.5 Additional Implementation Issues - -4.5.1 Minimum Implementation - - In order to make SMTP workable, the following minimum implementation - is required for all receivers. The following commands MUST be - supported to conform to this specification: - - EHLO - HELO - MAIL - RCPT - DATA - RSET - NOOP - QUIT - VRFY - - Any system that includes an SMTP server supporting mail relaying or - delivery MUST support the reserved mailbox "postmaster" as a case- - insensitive local name. This postmaster address is not strictly - necessary if the server always returns 554 on connection opening (as - described in section 3.1). The requirement to accept mail for - postmaster implies that RCPT commands which specify a mailbox for - postmaster at any of the domains for which the SMTP server provides - mail service, as well as the special case of "RCPT TO:" - (with no domain specification), MUST be supported. - - SMTP systems are expected to make every reasonable effort to accept - mail directed to Postmaster from any other system on the Internet. - In extreme cases --such as to contain a denial of service attack or - other breach of security-- an SMTP server may block mail directed to - Postmaster. However, such arrangements SHOULD be narrowly tailored - so as to avoid blocking messages which are not part of such attacks. - -4.5.2 Transparency - - Without some provision for data transparency, the character sequence - "." ends the mail text and cannot be sent by the user. - In general, users are not aware of such "forbidden" sequences. To - - - - -Klensin Standards Track [Page 53] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - allow all user composed text to be transmitted transparently, the - following procedures are used: - - - Before sending a line of mail text, the SMTP client checks the - first character of the line. If it is a period, one additional - period is inserted at the beginning of the line. - - - When a line of mail text is received by the SMTP server, it checks - the line. If the line is composed of a single period, it is - treated as the end of mail indicator. If the first character is a - period and there are other characters on the line, the first - character is deleted. - - The mail data may contain any of the 128 ASCII characters. All - characters are to be delivered to the recipient's mailbox, including - spaces, vertical and horizontal tabs, and other control characters. - If the transmission channel provides an 8-bit byte (octet) data - stream, the 7-bit ASCII codes are transmitted right justified in the - octets, with the high order bits cleared to zero. See 3.7 for - special treatment of these conditions in SMTP systems serving a relay - function. - - In some systems it may be necessary to transform the data as it is - received and stored. This may be necessary for hosts that use a - different character set than ASCII as their local character set, that - store data in records rather than strings, or which use special - character sequences as delimiters inside mailboxes. If such - transformations are necessary, they MUST be reversible, especially if - they are applied to mail being relayed. - -4.5.3 Sizes and Timeouts - -4.5.3.1 Size limits and minimums - - There are several objects that have required minimum/maximum sizes. - Every implementation MUST be able to receive objects of at least - these sizes. Objects larger than these sizes SHOULD be avoided when - possible. However, some Internet mail constructs such as encoded - X.400 addresses [16] will often require larger objects: clients MAY - attempt to transmit these, but MUST be prepared for a server to - reject them if they cannot be handled by it. To the maximum extent - possible, implementation techniques which impose no limits on the - length of these objects should be used. - - local-part - The maximum total length of a user name or other local-part is 64 - characters. - - - - -Klensin Standards Track [Page 54] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - domain - The maximum total length of a domain name or number is 255 - characters. - - path - The maximum total length of a reverse-path or forward-path is 256 - characters (including the punctuation and element separators). - - command line - The maximum total length of a command line including the command - word and the is 512 characters. SMTP extensions may be - used to increase this limit. - - reply line - The maximum total length of a reply line including the reply code - and the is 512 characters. More information may be - conveyed through multiple-line replies. - - text line - The maximum total length of a text line including the is - 1000 characters (not counting the leading dot duplicated for - transparency). This number may be increased by the use of SMTP - Service Extensions. - - message content - The maximum total length of a message content (including any - message headers as well as the message body) MUST BE at least 64K - octets. Since the introduction of Internet standards for - multimedia mail [12], message lengths on the Internet have grown - dramatically, and message size restrictions should be avoided if - at all possible. SMTP server systems that must impose - restrictions SHOULD implement the "SIZE" service extension [18], - and SMTP client systems that will send large messages SHOULD - utilize it when possible. - - recipients buffer - The minimum total number of recipients that must be buffered is - 100 recipients. Rejection of messages (for excessive recipients) - with fewer than 100 RCPT commands is a violation of this - specification. The general principle that relaying SMTP servers - MUST NOT, and delivery SMTP servers SHOULD NOT, perform validation - tests on message headers suggests that rejecting a message based - on the total number of recipients shown in header fields is to be - discouraged. A server which imposes a limit on the number of - recipients MUST behave in an orderly fashion, such as to reject - additional addresses over its limit rather than silently - discarding addresses previously accepted. A client that needs to - - - - -Klensin Standards Track [Page 55] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - deliver a message containing over 100 RCPT commands SHOULD be - prepared to transmit in 100-recipient "chunks" if the server - declines to accept more than 100 recipients in a single message. - - Errors due to exceeding these limits may be reported by using the - reply codes. Some examples of reply codes are: - - 500 Line too long. - or - 501 Path too long - or - 452 Too many recipients (see below) - or - 552 Too much mail data. - - RFC 821 [30] incorrectly listed the error where an SMTP server - exhausts its implementation limit on the number of RCPT commands - ("too many recipients") as having reply code 552. The correct reply - code for this condition is 452. Clients SHOULD treat a 552 code in - this case as a temporary, rather than permanent, failure so the logic - below works. - - When a conforming SMTP server encounters this condition, it has at - least 100 successful RCPT commands in its recipients buffer. If the - server is able to accept the message, then at least these 100 - addresses will be removed from the SMTP client's queue. When the - client attempts retransmission of those addresses which received 452 - responses, at least 100 of these will be able to fit in the SMTP - server's recipients buffer. Each retransmission attempt which is - able to deliver anything will be able to dispose of at least 100 of - these recipients. - - If an SMTP server has an implementation limit on the number of RCPT - commands and this limit is exhausted, it MUST use a response code of - 452 (but the client SHOULD also be prepared for a 552, as noted - above). If the server has a configured site-policy limitation on the - number of RCPT commands, it MAY instead use a 5XX response code. - This would be most appropriate if the policy limitation was intended - to apply if the total recipient count for a particular message body - were enforced even if that message body was sent in multiple mail - transactions. - -4.5.3.2 Timeouts - - An SMTP client MUST provide a timeout mechanism. It MUST use per- - command timeouts rather than somehow trying to time the entire mail - transaction. Timeouts SHOULD be easily reconfigurable, preferably - without recompiling the SMTP code. To implement this, a timer is set - - - -Klensin Standards Track [Page 56] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - for each SMTP command and for each buffer of the data transfer. The - latter means that the overall timeout is inherently proportional to - the size of the message. - - Based on extensive experience with busy mail-relay hosts, the minimum - per-command timeout values SHOULD be as follows: - - Initial 220 Message: 5 minutes - An SMTP client process needs to distinguish between a failed TCP - connection and a delay in receiving the initial 220 greeting - message. Many SMTP servers accept a TCP connection but delay - delivery of the 220 message until their system load permits more - mail to be processed. - - MAIL Command: 5 minutes - - RCPT Command: 5 minutes - A longer timeout is required if processing of mailing lists and - aliases is not deferred until after the message was accepted. - - DATA Initiation: 2 minutes - This is while awaiting the "354 Start Input" reply to a DATA - command. - - Data Block: 3 minutes - This is while awaiting the completion of each TCP SEND call - transmitting a chunk of data. - - DATA Termination: 10 minutes. - This is while awaiting the "250 OK" reply. When the receiver gets - the final period terminating the message data, it typically - performs processing to deliver the message to a user mailbox. A - spurious timeout at this point would be very wasteful and would - typically result in delivery of multiple copies of the message, - since it has been successfully sent and the server has accepted - responsibility for delivery. See section 6.1 for additional - discussion. - - An SMTP server SHOULD have a timeout of at least 5 minutes while it - is awaiting the next command from the sender. - -4.5.4 Retry Strategies - - The common structure of a host SMTP implementation includes user - mailboxes, one or more areas for queuing messages in transit, and one - or more daemon processes for sending and receiving mail. The exact - structure will vary depending on the needs of the users on the host - - - - -Klensin Standards Track [Page 57] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - and the number and size of mailing lists supported by the host. We - describe several optimizations that have proved helpful, particularly - for mailers supporting high traffic levels. - - Any queuing strategy MUST include timeouts on all activities on a - per-command basis. A queuing strategy MUST NOT send error messages - in response to error messages under any circumstances. - -4.5.4.1 Sending Strategy - - The general model for an SMTP client is one or more processes that - periodically attempt to transmit outgoing mail. In a typical system, - the program that composes a message has some method for requesting - immediate attention for a new piece of outgoing mail, while mail that - cannot be transmitted immediately MUST be queued and periodically - retried by the sender. A mail queue entry will include not only the - message itself but also the envelope information. - - The sender MUST delay retrying a particular destination after one - attempt has failed. In general, the retry interval SHOULD be at - least 30 minutes; however, more sophisticated and variable strategies - will be beneficial when the SMTP client can determine the reason for - non-delivery. - - Retries continue until the message is transmitted or the sender gives - up; the give-up time generally needs to be at least 4-5 days. The - parameters to the retry algorithm MUST be configurable. - - A client SHOULD keep a list of hosts it cannot reach and - corresponding connection timeouts, rather than just retrying queued - mail items. - - Experience suggests that failures are typically transient (the target - system or its connection has crashed), favoring a policy of two - connection attempts in the first hour the message is in the queue, - and then backing off to one every two or three hours. - - The SMTP client can shorten the queuing delay in cooperation with the - SMTP server. For example, if mail is received from a particular - address, it is likely that mail queued for that host can now be sent. - Application of this principle may, in many cases, eliminate the - requirement for an explicit "send queues now" function such as ETRN - [9]. - - The strategy may be further modified as a result of multiple - addresses per host (see below) to optimize delivery time vs. resource - usage. - - - - -Klensin Standards Track [Page 58] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - An SMTP client may have a large queue of messages for each - unavailable destination host. If all of these messages were retried - in every retry cycle, there would be excessive Internet overhead and - the sending system would be blocked for a long period. Note that an - SMTP client can generally determine that a delivery attempt has - failed only after a timeout of several minutes and even a one-minute - timeout per connection will result in a very large delay if retries - are repeated for dozens, or even hundreds, of queued messages to the - same host. - - At the same time, SMTP clients SHOULD use great care in caching - negative responses from servers. In an extreme case, if EHLO is - issued multiple times during the same SMTP connection, different - answers may be returned by the server. More significantly, 5yz - responses to the MAIL command MUST NOT be cached. - - When a mail message is to be delivered to multiple recipients, and - the SMTP server to which a copy of the message is to be sent is the - same for multiple recipients, then only one copy of the message - SHOULD be transmitted. That is, the SMTP client SHOULD use the - command sequence: MAIL, RCPT, RCPT,... RCPT, DATA instead of the - sequence: MAIL, RCPT, DATA, ..., MAIL, RCPT, DATA. However, if there - are very many addresses, a limit on the number of RCPT commands per - MAIL command MAY be imposed. Implementation of this efficiency - feature is strongly encouraged. - - Similarly, to achieve timely delivery, the SMTP client MAY support - multiple concurrent outgoing mail transactions. However, some limit - may be appropriate to protect the host from devoting all its - resources to mail. - -4.5.4.2 Receiving Strategy - - The SMTP server SHOULD attempt to keep a pending listen on the SMTP - port at all times. This requires the support of multiple incoming - TCP connections for SMTP. Some limit MAY be imposed but servers that - cannot handle more than one SMTP transaction at a time are not in - conformance with the intent of this specification. - - As discussed above, when the SMTP server receives mail from a - particular host address, it could activate its own SMTP queuing - mechanisms to retry any mail pending for that host address. - -4.5.5 Messages with a null reverse-path - - There are several types of notification messages which are required - by existing and proposed standards to be sent with a null reverse - path, namely non-delivery notifications as discussed in section 3.7, - - - -Klensin Standards Track [Page 59] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - other kinds of Delivery Status Notifications (DSNs) [24], and also - Message Disposition Notifications (MDNs) [10]. All of these kinds of - messages are notifications about a previous message, and they are - sent to the reverse-path of the previous mail message. (If the - delivery of such a notification message fails, that usually indicates - a problem with the mail system of the host to which the notification - message is addressed. For this reason, at some hosts the MTA is set - up to forward such failed notification messages to someone who is - able to fix problems with the mail system, e.g., via the postmaster - alias.) - - All other types of messages (i.e., any message which is not required - by a standards-track RFC to have a null reverse-path) SHOULD be sent - with with a valid, non-null reverse-path. - - Implementors of automated email processors should be careful to make - sure that the various kinds of messages with null reverse-path are - handled correctly, in particular such systems SHOULD NOT reply to - messages with null reverse-path. - -5. Address Resolution and Mail Handling - - Once an SMTP client lexically identifies a domain to which mail will - be delivered for processing (as described in sections 3.6 and 3.7), a - DNS lookup MUST be performed to resolve the domain name [22]. The - names are expected to be fully-qualified domain names (FQDNs): - mechanisms for inferring FQDNs from partial names or local aliases - are outside of this specification and, due to a history of problems, - are generally discouraged. The lookup first attempts to locate an MX - record associated with the name. If a CNAME record is found instead, - the resulting name is processed as if it were the initial name. If - no MX records are found, but an A RR is found, the A RR is treated as - if it was associated with an implicit MX RR, with a preference of 0, - pointing to that host. If one or more MX RRs are found for a given - name, SMTP systems MUST NOT utilize any A RRs associated with that - name unless they are located using the MX RRs; the "implicit MX" rule - above applies only if there are no MX records present. If MX records - are present, but none of them are usable, this situation MUST be - reported as an error. - - When the lookup succeeds, the mapping can result in a list of - alternative delivery addresses rather than a single address, because - of multiple MX records, multihoming, or both. To provide reliable - mail transmission, the SMTP client MUST be able to try (and retry) - each of the relevant addresses in this list in order, until a - delivery attempt succeeds. However, there MAY also be a configurable - limit on the number of alternate addresses that can be tried. In any - case, the SMTP client SHOULD try at least two addresses. - - - -Klensin Standards Track [Page 60] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - Two types of information is used to rank the host addresses: multiple - MX records, and multihomed hosts. - - Multiple MX records contain a preference indication that MUST be used - in sorting (see below). Lower numbers are more preferred than higher - ones. If there are multiple destinations with the same preference - and there is no clear reason to favor one (e.g., by recognition of an - easily-reached address), then the sender-SMTP MUST randomize them to - spread the load across multiple mail exchangers for a specific - organization. - - The destination host (perhaps taken from the preferred MX record) may - be multihomed, in which case the domain name resolver will return a - list of alternative IP addresses. It is the responsibility of the - domain name resolver interface to have ordered this list by - decreasing preference if necessary, and SMTP MUST try them in the - order presented. - - Although the capability to try multiple alternative addresses is - required, specific installations may want to limit or disable the use - of alternative addresses. The question of whether a sender should - attempt retries using the different addresses of a multihomed host - has been controversial. The main argument for using the multiple - addresses is that it maximizes the probability of timely delivery, - and indeed sometimes the probability of any delivery; the counter- - argument is that it may result in unnecessary resource use. Note - that resource use is also strongly determined by the sending strategy - discussed in section 4.5.4.1. - - If an SMTP server receives a message with a destination for which it - is a designated Mail eXchanger, it MAY relay the message (potentially - after having rewritten the MAIL FROM and/or RCPT TO addresses), make - final delivery of the message, or hand it off using some mechanism - outside the SMTP-provided transport environment. Of course, neither - of the latter require that the list of MX records be examined - further. - - If it determines that it should relay the message without rewriting - the address, it MUST sort the MX records to determine candidates for - delivery. The records are first ordered by preference, with the - lowest-numbered records being most preferred. The relay host MUST - then inspect the list for any of the names or addresses by which it - might be known in mail transactions. If a matching record is found, - all records at that preference level and higher-numbered ones MUST be - discarded from consideration. If there are no records left at that - point, it is an error condition, and the message MUST be returned as - undeliverable. If records do remain, they SHOULD be tried, best - preference first, as described above. - - - -Klensin Standards Track [Page 61] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -6. Problem Detection and Handling - -6.1 Reliable Delivery and Replies by Email - - When the receiver-SMTP accepts a piece of mail (by sending a "250 OK" - message in response to DATA), it is accepting responsibility for - delivering or relaying the message. It must take this responsibility - seriously. It MUST NOT lose the message for frivolous reasons, such - as because the host later crashes or because of a predictable - resource shortage. - - If there is a delivery failure after acceptance of a message, the - receiver-SMTP MUST formulate and mail a notification message. This - notification MUST be sent using a null ("<>") reverse path in the - envelope. The recipient of this notification MUST be the address - from the envelope return path (or the Return-Path: line). However, - if this address is null ("<>"), the receiver-SMTP MUST NOT send a - notification. Obviously, nothing in this section can or should - prohibit local decisions (i.e., as part of the same system - environment as the receiver-SMTP) to log or otherwise transmit - information about null address events locally if that is desired. If - the address is an explicit source route, it MUST be stripped down to - its final hop. - - For example, suppose that an error notification must be sent for a - message that arrived with: - - MAIL FROM:<@a,@b:user@d> - - The notification message MUST be sent using: - - RCPT TO: - - Some delivery failures after the message is accepted by SMTP will be - unavoidable. For example, it may be impossible for the receiving - SMTP server to validate all the delivery addresses in RCPT command(s) - due to a "soft" domain system error, because the target is a mailing - list (see earlier discussion of RCPT), or because the server is - acting as a relay and has no immediate access to the delivering - system. - - To avoid receiving duplicate messages as the result of timeouts, a - receiver-SMTP MUST seek to minimize the time required to respond to - the final . end of data indicator. See RFC 1047 [28] for - a discussion of this problem. - - - - - - -Klensin Standards Track [Page 62] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -6.2 Loop Detection - - Simple counting of the number of "Received:" headers in a message has - proven to be an effective, although rarely optimal, method of - detecting loops in mail systems. SMTP servers using this technique - SHOULD use a large rejection threshold, normally at least 100 - Received entries. Whatever mechanisms are used, servers MUST contain - provisions for detecting and stopping trivial loops. - -6.3 Compensating for Irregularities - - Unfortunately, variations, creative interpretations, and outright - violations of Internet mail protocols do occur; some would suggest - that they occur quite frequently. The debate as to whether a well- - behaved SMTP receiver or relay should reject a malformed message, - attempt to pass it on unchanged, or attempt to repair it to increase - the odds of successful delivery (or subsequent reply) began almost - with the dawn of structured network mail and shows no signs of - abating. Advocates of rejection claim that attempted repairs are - rarely completely adequate and that rejection of bad messages is the - only way to get the offending software repaired. Advocates of - "repair" or "deliver no matter what" argue that users prefer that - mail go through it if at all possible and that there are significant - market pressures in that direction. In practice, these market - pressures may be more important to particular vendors than strict - conformance to the standards, regardless of the preference of the - actual developers. - - The problems associated with ill-formed messages were exacerbated by - the introduction of the split-UA mail reading protocols [3, 26, 5, - 21]. These protocols have encouraged the use of SMTP as a posting - protocol, and SMTP servers as relay systems for these client hosts - (which are often only intermittently connected to the Internet). - Historically, many of those client machines lacked some of the - mechanisms and information assumed by SMTP (and indeed, by the mail - format protocol [7]). Some could not keep adequate track of time; - others had no concept of time zones; still others could not identify - their own names or addresses; and, of course, none could satisfy the - assumptions that underlay RFC 822's conception of authenticated - addresses. - - In response to these weak SMTP clients, many SMTP systems now - complete messages that are delivered to them in incomplete or - incorrect form. This strategy is generally considered appropriate - when the server can identify or authenticate the client, and there - are prior agreements between them. By contrast, there is at best - great concern about fixes applied by a relay or delivery SMTP server - that has little or no knowledge of the user or client machine. - - - -Klensin Standards Track [Page 63] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - The following changes to a message being processed MAY be applied - when necessary by an originating SMTP server, or one used as the - target of SMTP as an initial posting protocol: - - - Addition of a message-id field when none appears - - - Addition of a date, time or time zone when none appears - - - Correction of addresses to proper FQDN format - - The less information the server has about the client, the less likely - these changes are to be correct and the more caution and conservatism - should be applied when considering whether or not to perform fixes - and how. These changes MUST NOT be applied by an SMTP server that - provides an intermediate relay function. - - In all cases, properly-operating clients supplying correct - information are preferred to corrections by the SMTP server. In all - cases, documentation of actions performed by the servers (in trace - fields and/or header comments) is strongly encouraged. - -7. Security Considerations - -7.1 Mail Security and Spoofing - - SMTP mail is inherently insecure in that it is feasible for even - fairly casual users to negotiate directly with receiving and relaying - SMTP servers and create messages that will trick a naive recipient - into believing that they came from somewhere else. Constructing such - a message so that the "spoofed" behavior cannot be detected by an - expert is somewhat more difficult, but not sufficiently so as to be a - deterrent to someone who is determined and knowledgeable. - Consequently, as knowledge of Internet mail increases, so does the - knowledge that SMTP mail inherently cannot be authenticated, or - integrity checks provided, at the transport level. Real mail - security lies only in end-to-end methods involving the message - bodies, such as those which use digital signatures (see [14] and, - e.g., PGP [4] or S/MIME [31]). - - Various protocol extensions and configuration options that provide - authentication at the transport level (e.g., from an SMTP client to - an SMTP server) improve somewhat on the traditional situation - described above. However, unless they are accompanied by careful - handoffs of responsibility in a carefully-designed trust environment, - they remain inherently weaker than end-to-end mechanisms which use - digitally signed messages rather than depending on the integrity of - the transport system. - - - - -Klensin Standards Track [Page 64] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - Efforts to make it more difficult for users to set envelope return - path and header "From" fields to point to valid addresses other than - their own are largely misguided: they frustrate legitimate - applications in which mail is sent by one user on behalf of another - or in which error (or normal) replies should be directed to a special - address. (Systems that provide convenient ways for users to alter - these fields on a per-message basis should attempt to establish a - primary and permanent mailbox address for the user so that Sender - fields within the message data can be generated sensibly.) - - This specification does not further address the authentication issues - associated with SMTP other than to advocate that useful functionality - not be disabled in the hope of providing some small margin of - protection against an ignorant user who is trying to fake mail. - -7.2 "Blind" Copies - - Addresses that do not appear in the message headers may appear in the - RCPT commands to an SMTP server for a number of reasons. The two - most common involve the use of a mailing address as a "list exploder" - (a single address that resolves into multiple addresses) and the - appearance of "blind copies". Especially when more than one RCPT - command is present, and in order to avoid defeating some of the - purpose of these mechanisms, SMTP clients and servers SHOULD NOT copy - the full set of RCPT command arguments into the headers, either as - part of trace headers or as informational or private-extension - headers. Since this rule is often violated in practice, and cannot - be enforced, sending SMTP systems that are aware of "bcc" use MAY - find it helpful to send each blind copy as a separate message - transaction containing only a single RCPT command. - - There is no inherent relationship between either "reverse" (from - MAIL, SAML, etc., commands) or "forward" (RCPT) addresses in the SMTP - transaction ("envelope") and the addresses in the headers. Receiving - systems SHOULD NOT attempt to deduce such relationships and use them - to alter the headers of the message for delivery. The popular - "Apparently-to" header is a violation of this principle as well as a - common source of unintended information disclosure and SHOULD NOT be - used. - -7.3 VRFY, EXPN, and Security - - As discussed in section 3.5, individual sites may want to disable - either or both of VRFY or EXPN for security reasons. As a corollary - to the above, implementations that permit this MUST NOT appear to - have verified addresses that are not, in fact, verified. If a site - - - - - -Klensin Standards Track [Page 65] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - disables these commands for security reasons, the SMTP server MUST - return a 252 response, rather than a code that could be confused with - successful or unsuccessful verification. - - Returning a 250 reply code with the address listed in the VRFY - command after having checked it only for syntax violates this rule. - Of course, an implementation that "supports" VRFY by always returning - 550 whether or not the address is valid is equally not in - conformance. - - Within the last few years, the contents of mailing lists have become - popular as an address information source for so-called "spammers." - The use of EXPN to "harvest" addresses has increased as list - administrators have installed protections against inappropriate uses - of the lists themselves. Implementations SHOULD still provide - support for EXPN, but sites SHOULD carefully evaluate the tradeoffs. - As authentication mechanisms are introduced into SMTP, some sites may - choose to make EXPN available only to authenticated requestors. - -7.4 Information Disclosure in Announcements - - There has been an ongoing debate about the tradeoffs between the - debugging advantages of announcing server type and version (and, - sometimes, even server domain name) in the greeting response or in - response to the HELP command and the disadvantages of exposing - information that might be useful in a potential hostile attack. The - utility of the debugging information is beyond doubt. Those who - argue for making it available point out that it is far better to - actually secure an SMTP server rather than hope that trying to - conceal known vulnerabilities by hiding the server's precise identity - will provide more protection. Sites are encouraged to evaluate the - tradeoff with that issue in mind; implementations are strongly - encouraged to minimally provide for making type and version - information available in some way to other network hosts. - -7.5 Information Disclosure in Trace Fields - - In some circumstances, such as when mail originates from within a LAN - whose hosts are not directly on the public Internet, trace - ("Received") fields produced in conformance with this specification - may disclose host names and similar information that would not - normally be available. This ordinarily does not pose a problem, but - sites with special concerns about name disclosure should be aware of - it. Also, the optional FOR clause should be supplied with caution or - not at all when multiple recipients are involved lest it - inadvertently disclose the identities of "blind copy" recipients to - others. - - - - -Klensin Standards Track [Page 66] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -7.6 Information Disclosure in Message Forwarding - - As discussed in section 3.4, use of the 251 or 551 reply codes to - identify the replacement address associated with a mailbox may - inadvertently disclose sensitive information. Sites that are - concerned about those issues should ensure that they select and - configure servers appropriately. - -7.7 Scope of Operation of SMTP Servers - - It is a well-established principle that an SMTP server may refuse to - accept mail for any operational or technical reason that makes sense - to the site providing the server. However, cooperation among sites - and installations makes the Internet possible. If sites take - excessive advantage of the right to reject traffic, the ubiquity of - email availability (one of the strengths of the Internet) will be - threatened; considerable care should be taken and balance maintained - if a site decides to be selective about the traffic it will accept - and process. - - In recent years, use of the relay function through arbitrary sites - has been used as part of hostile efforts to hide the actual origins - of mail. Some sites have decided to limit the use of the relay - function to known or identifiable sources, and implementations SHOULD - provide the capability to perform this type of filtering. When mail - is rejected for these or other policy reasons, a 550 code SHOULD be - used in response to EHLO, MAIL, or RCPT as appropriate. - -8. IANA Considerations - - IANA will maintain three registries in support of this specification. - The first consists of SMTP service extensions with the associated - keywords, and, as needed, parameters and verbs. As specified in - section 2.2.2, no entry may be made in this registry that starts in - an "X". Entries may be made only for service extensions (and - associated keywords, parameters, or verbs) that are defined in - standards-track or experimental RFCs specifically approved by the - IESG for this purpose. - - The second registry consists of "tags" that identify forms of domain - literals other than those for IPv4 addresses (specified in RFC 821 - and in this document) and IPv6 addresses (specified in this - document). Additional literal types require standardization before - being used; none are anticipated at this time. - - The third, established by RFC 821 and renewed by this specification, - is a registry of link and protocol identifiers to be used with the - "via" and "with" subclauses of the time stamp ("Received: header") - - - -Klensin Standards Track [Page 67] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - described in section 4.4. Link and protocol identifiers in addition - to those specified in this document may be registered only by - standardization or by way of an RFC-documented, IESG-approved, - Experimental protocol extension. - -9. References - - [1] American National Standards Institute (formerly United States of - America Standards Institute), X3.4, 1968, "USA Code for - Information Interchange". ANSI X3.4-1968 has been replaced by - newer versions with slight modifications, but the 1968 version - remains definitive for the Internet. - - [2] Braden, R., "Requirements for Internet hosts - application and - support", STD 3, RFC 1123, October 1989. - - [3] Butler, M., Chase, D., Goldberger, J., Postel, J. and J. - Reynolds, "Post Office Protocol - version 2", RFC 937, February - 1985. - - [4] Callas, J., Donnerhacke, L., Finney, H. and R. Thayer, "OpenPGP - Message Format", RFC 2440, November 1998. - - [5] Crispin, M., "Interactive Mail Access Protocol - Version 2", RFC - 1176, August 1990. - - [6] Crispin, M., "Internet Message Access Protocol - Version 4", RFC - 2060, December 1996. - - [7] Crocker, D., "Standard for the Format of ARPA Internet Text - Messages", RFC 822, August 1982. - - [8] Crocker, D. and P. Overell, Eds., "Augmented BNF for Syntax - Specifications: ABNF", RFC 2234, November 1997. - - [9] De Winter, J., "SMTP Service Extension for Remote Message Queue - Starting", RFC 1985, August 1996. - - [10] Fajman, R., "An Extensible Message Format for Message - Disposition Notifications", RFC 2298, March 1998. - - [11] Freed, N, "Behavior of and Requirements for Internet Firewalls", - RFC 2979, October 2000. - - [12] Freed, N. and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part One: Format of Internet Message Bodies", - RFC 2045, December 1996. - - - - -Klensin Standards Track [Page 68] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - [13] Freed, N., "SMTP Service Extension for Command Pipelining", RFC - 2920, September 2000. - - [14] Galvin, J., Murphy, S., Crocker, S. and N. Freed, "Security - Multiparts for MIME: Multipart/Signed and Multipart/Encrypted", - RFC 1847, October 1995. - - [15] Gellens, R. and J. Klensin, "Message Submission", RFC 2476, - December 1998. - - [16] Kille, S., "Mapping between X.400 and RFC822/MIME", RFC 2156, - January 1998. - - [17] Hinden, R and S. Deering, Eds. "IP Version 6 Addressing - Architecture", RFC 2373, July 1998. - - [18] Klensin, J., Freed, N. and K. Moore, "SMTP Service Extension for - Message Size Declaration", STD 10, RFC 1870, November 1995. - - [19] Klensin, J., Freed, N., Rose, M., Stefferud, E. and D. Crocker, - "SMTP Service Extensions", STD 10, RFC 1869, November 1995. - - [20] Klensin, J., Freed, N., Rose, M., Stefferud, E. and D. Crocker, - "SMTP Service Extension for 8bit-MIMEtransport", RFC 1652, July - 1994. - - [21] Lambert, M., "PCMAIL: A distributed mail system for personal - computers", RFC 1056, July 1988. - - [22] Mockapetris, P., "Domain names - implementation and - specification", STD 13, RFC 1035, November 1987. - - Mockapetris, P., "Domain names - concepts and facilities", STD - 13, RFC 1034, November 1987. - - [23] Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part - Three: Message Header Extensions for Non-ASCII Text", RFC 2047, - December 1996. - - [24] Moore, K., "SMTP Service Extension for Delivery Status - Notifications", RFC 1891, January 1996. - - [25] Moore, K., and G. Vaudreuil, "An Extensible Message Format for - Delivery Status Notifications", RFC 1894, January 1996. - - [26] Myers, J. and M. Rose, "Post Office Protocol - Version 3", STD - 53, RFC 1939, May 1996. - - - - -Klensin Standards Track [Page 69] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - [27] Partridge, C., "Mail routing and the domain system", RFC 974, - January 1986. - - [28] Partridge, C., "Duplicate messages and SMTP", RFC 1047, February - 1988. - - [29] Postel, J., ed., "Transmission Control Protocol - DARPA Internet - Program Protocol Specification", STD 7, RFC 793, September 1981. - - [30] Postel, J., "Simple Mail Transfer Protocol", RFC 821, August - 1982. - - [31] Ramsdell, B., Ed., "S/MIME Version 3 Message Specification", RFC - 2633, June 1999. - - [32] Resnick, P., Ed., "Internet Message Format", RFC 2822, April - 2001. - - [33] Vaudreuil, G., "SMTP Service Extensions for Transmission of - Large and Binary MIME Messages", RFC 1830, August 1995. - - [34] Vaudreuil, G., "Enhanced Mail System Status Codes", RFC 1893, - January 1996. - -10. Editor's Address - - John C. Klensin - AT&T Laboratories - 99 Bedford St - Boston, MA 02111 USA - - Phone: 617-574-3076 - EMail: klensin@research.att.com - -11. Acknowledgments - - Many people worked long and hard on the many iterations of this - document. There was wide-ranging debate in the IETF DRUMS Working - Group, both on its mailing list and in face to face discussions, - about many technical issues and the role of a revised standard for - Internet mail transport, and many contributors helped form the - wording in this specification. The hundreds of participants in the - many discussions since RFC 821 was produced are too numerous to - mention, but they all helped this document become what it is. - - - - - - - -Klensin Standards Track [Page 70] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -APPENDICES - -A. TCP Transport Service - - The TCP connection supports the transmission of 8-bit bytes. The - SMTP data is 7-bit ASCII characters. Each character is transmitted - as an 8-bit byte with the high-order bit cleared to zero. Service - extensions may modify this rule to permit transmission of full 8-bit - data bytes as part of the message body, but not in SMTP commands or - responses. - -B. Generating SMTP Commands from RFC 822 Headers - - Some systems use RFC 822 headers (only) in a mail submission - protocol, or otherwise generate SMTP commands from RFC 822 headers - when such a message is handed to an MTA from a UA. While the MTA-UA - protocol is a private matter, not covered by any Internet Standard, - there are problems with this approach. For example, there have been - repeated problems with proper handling of "bcc" copies and - redistribution lists when information that conceptually belongs to a - mail envelopes is not separated early in processing from header - information (and kept separate). - - It is recommended that the UA provide its initial ("submission - client") MTA with an envelope separate from the message itself. - However, if the envelope is not supplied, SMTP commands SHOULD be - generated as follows: - - 1. Each recipient address from a TO, CC, or BCC header field SHOULD - be copied to a RCPT command (generating multiple message copies if - that is required for queuing or delivery). This includes any - addresses listed in a RFC 822 "group". Any BCC fields SHOULD then - be removed from the headers. Once this process is completed, the - remaining headers SHOULD be checked to verify that at least one - To:, Cc:, or Bcc: header remains. If none do, then a bcc: header - with no additional information SHOULD be inserted as specified in - [32]. - - 2. The return address in the MAIL command SHOULD, if possible, be - derived from the system's identity for the submitting (local) - user, and the "From:" header field otherwise. If there is a - system identity available, it SHOULD also be copied to the Sender - header field if it is different from the address in the From - header field. (Any Sender field that was already there SHOULD be - removed.) Systems may provide a way for submitters to override - the envelope return address, but may want to restrict its use to - privileged users. This will not prevent mail forgery, but may - lessen its incidence; see section 7.1. - - - -Klensin Standards Track [Page 71] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - When an MTA is being used in this way, it bears responsibility for - ensuring that the message being transmitted is valid. The mechanisms - for checking that validity, and for handling (or returning) messages - that are not valid at the time of arrival, are part of the MUA-MTA - interface and not covered by this specification. - - A submission protocol based on Standard RFC 822 information alone - MUST NOT be used to gateway a message from a foreign (non-SMTP) mail - system into an SMTP environment. Additional information to construct - an envelope must come from some source in the other environment, - whether supplemental headers or the foreign system's envelope. - - Attempts to gateway messages using only their header "to" and "cc" - fields have repeatedly caused mail loops and other behavior adverse - to the proper functioning of the Internet mail environment. These - problems have been especially common when the message originates from - an Internet mailing list and is distributed into the foreign - environment using envelope information. When these messages are then - processed by a header-only remailer, loops back to the Internet - environment (and the mailing list) are almost inevitable. - -C. Source Routes - - Historically, the was a reverse source routing list of - hosts and a source mailbox. The first host in the - SHOULD be the host sending the MAIL command. Similarly, the - may be a source routing lists of hosts and a - destination mailbox. However, in general, the SHOULD - contain only a mailbox and domain name, relying on the domain name - system to supply routing information if required. The use of source - routes is deprecated; while servers MUST be prepared to receive and - handle them as discussed in section 3.3 and F.2, clients SHOULD NOT - transmit them and this section was included only to provide context. - - For relay purposes, the forward-path may be a source route of the - form "@ONE,@TWO:JOE@THREE", where ONE, TWO, and THREE MUST BE fully- - qualified domain names. This form is used to emphasize the - distinction between an address and a route. The mailbox is an - absolute address, and the route is information about how to get - there. The two concepts should not be confused. - - If source routes are used, RFC 821 and the text below should be - consulted for the mechanisms for constructing and updating the - forward- and reverse-paths. - - - - - - - -Klensin Standards Track [Page 72] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - The SMTP server transforms the command arguments by moving its own - identifier (its domain name or that of any domain for which it is - acting as a mail exchanger), if it appears, from the forward-path to - the beginning of the reverse-path. - - Notice that the forward-path and reverse-path appear in the SMTP - commands and replies, but not necessarily in the message. That is, - there is no need for these paths and especially this syntax to appear - in the "To:" , "From:", "CC:", etc. fields of the message header. - Conversely, SMTP servers MUST NOT derive final message delivery - information from message header fields. - - When the list of hosts is present, it is a "reverse" source route and - indicates that the mail was relayed through each host on the list - (the first host in the list was the most recent relay). This list is - used as a source route to return non-delivery notices to the sender. - As each relay host adds itself to the beginning of the list, it MUST - use its name as known in the transport environment to which it is - relaying the mail rather than that of the transport environment from - which the mail came (if they are different). - -D. Scenarios - - This section presents complete scenarios of several types of SMTP - sessions. In the examples, "C:" indicates what is said by the SMTP - client, and "S:" indicates what is said by the SMTP server. - -D.1 A Typical SMTP Transaction Scenario - - This SMTP example shows mail sent by Smith at host bar.com, to Jones, - Green, and Brown at host foo.com. Here we assume that host bar.com - contacts host foo.com directly. The mail is accepted for Jones and - Brown. Green does not have a mailbox at host foo.com. - - S: 220 foo.com Simple Mail Transfer Service Ready - C: EHLO bar.com - S: 250-foo.com greets bar.com - S: 250-8BITMIME - S: 250-SIZE - S: 250-DSN - S: 250 HELP - C: MAIL FROM: - S: 250 OK - C: RCPT TO: - S: 250 OK - C: RCPT TO: - S: 550 No such user here - C: RCPT TO: - - - -Klensin Standards Track [Page 73] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - S: 250 OK - C: DATA - S: 354 Start mail input; end with . - C: Blah blah blah... - C: ...etc. etc. etc. - C: . - S: 250 OK - C: QUIT - S: 221 foo.com Service closing transmission channel - -D.2 Aborted SMTP Transaction Scenario - - S: 220 foo.com Simple Mail Transfer Service Ready - C: EHLO bar.com - S: 250-foo.com greets bar.com - S: 250-8BITMIME - S: 250-SIZE - S: 250-DSN - S: 250 HELP - C: MAIL FROM: - S: 250 OK - C: RCPT TO: - S: 250 OK - C: RCPT TO: - S: 550 No such user here - C: RSET - S: 250 OK - C: QUIT - S: 221 foo.com Service closing transmission channel - -D.3 Relayed Mail Scenario - - Step 1 -- Source Host to Relay Host - - S: 220 foo.com Simple Mail Transfer Service Ready - C: EHLO bar.com - S: 250-foo.com greets bar.com - S: 250-8BITMIME - S: 250-SIZE - S: 250-DSN - S: 250 HELP - C: MAIL FROM: - S: 250 OK - C: RCPT TO:<@foo.com:Jones@XYZ.COM> - S: 250 OK - C: DATA - S: 354 Start mail input; end with . - C: Date: Thu, 21 May 1998 05:33:29 -0700 - - - -Klensin Standards Track [Page 74] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - C: From: John Q. Public - C: Subject: The Next Meeting of the Board - C: To: Jones@xyz.com - C: - C: Bill: - C: The next meeting of the board of directors will be - C: on Tuesday. - C: John. - C: . - S: 250 OK - C: QUIT - S: 221 foo.com Service closing transmission channel - - Step 2 -- Relay Host to Destination Host - - S: 220 xyz.com Simple Mail Transfer Service Ready - C: EHLO foo.com - S: 250 xyz.com is on the air - C: MAIL FROM:<@foo.com:JQP@bar.com> - S: 250 OK - C: RCPT TO: - S: 250 OK - C: DATA - S: 354 Start mail input; end with . - C: Received: from bar.com by foo.com ; Thu, 21 May 1998 - C: 05:33:29 -0700 - C: Date: Thu, 21 May 1998 05:33:22 -0700 - C: From: John Q. Public - C: Subject: The Next Meeting of the Board - C: To: Jones@xyz.com - C: - C: Bill: - C: The next meeting of the board of directors will be - C: on Tuesday. - C: John. - C: . - S: 250 OK - C: QUIT - S: 221 foo.com Service closing transmission channel - -D.4 Verifying and Sending Scenario - - S: 220 foo.com Simple Mail Transfer Service Ready - C: EHLO bar.com - S: 250-foo.com greets bar.com - S: 250-8BITMIME - S: 250-SIZE - S: 250-DSN - - - -Klensin Standards Track [Page 75] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - - S: 250-VRFY - S: 250 HELP - C: VRFY Crispin - S: 250 Mark Crispin - C: SEND FROM: - S: 250 OK - C: RCPT TO: - S: 250 OK - C: DATA - S: 354 Start mail input; end with . - C: Blah blah blah... - C: ...etc. etc. etc. - C: . - S: 250 OK - C: QUIT - S: 221 foo.com Service closing transmission channel - -E. Other Gateway Issues - - In general, gateways between the Internet and other mail systems - SHOULD attempt to preserve any layering semantics across the - boundaries between the two mail systems involved. Gateway- - translation approaches that attempt to take shortcuts by mapping, - (such as envelope information from one system to the message headers - or body of another) have generally proven to be inadequate in - important ways. Systems translating between environments that do not - support both envelopes and headers and Internet mail must be written - with the understanding that some information loss is almost - inevitable. - -F. Deprecated Features of RFC 821 - - A few features of RFC 821 have proven to be problematic and SHOULD - NOT be used in Internet mail. - -F.1 TURN - - This command, described in RFC 821, raises important security issues - since, in the absence of strong authentication of the host requesting - that the client and server switch roles, it can easily be used to - divert mail from its correct destination. Its use is deprecated; - SMTP systems SHOULD NOT use it unless the server can authenticate the - client. - - - - - - - - -Klensin Standards Track [Page 76] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -F.2 Source Routing - - RFC 821 utilized the concept of explicit source routing to get mail - from one host to another via a series of relays. The requirement to - utilize source routes in regular mail traffic was eliminated by the - introduction of the domain name system "MX" record and the last - significant justification for them was eliminated by the - introduction, in RFC 1123, of a clear requirement that addresses - following an "@" must all be fully-qualified domain names. - Consequently, the only remaining justifications for the use of source - routes are support for very old SMTP clients or MUAs and in mail - system debugging. They can, however, still be useful in the latter - circumstance and for routing mail around serious, but temporary, - problems such as problems with the relevant DNS records. - - SMTP servers MUST continue to accept source route syntax as specified - in the main body of this document and in RFC 1123. They MAY, if - necessary, ignore the routes and utilize only the target domain in - the address. If they do utilize the source route, the message MUST - be sent to the first domain shown in the address. In particular, a - server MUST NOT guess at shortcuts within the source route. - - Clients SHOULD NOT utilize explicit source routing except under - unusual circumstances, such as debugging or potentially relaying - around firewall or mail system configuration errors. - -F.3 HELO - - As discussed in sections 3.1 and 4.1.1, EHLO is strongly preferred to - HELO when the server will accept the former. Servers must continue - to accept and process HELO in order to support older clients. - -F.4 #-literals - - RFC 821 provided for specifying an Internet address as a decimal - integer host number prefixed by a pound sign, "#". In practice, that - form has been obsolete since the introduction of TCP/IP. It is - deprecated and MUST NOT be used. - -F.5 Dates and Years - - When dates are inserted into messages by SMTP clients or servers - (e.g., in trace fields), four-digit years MUST BE used. Two-digit - years are deprecated; three-digit years were never permitted in the - Internet mail system. - - - - - - -Klensin Standards Track [Page 77] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -F.6 Sending versus Mailing - - In addition to specifying a mechanism for delivering messages to - user's mailboxes, RFC 821 provided additional, optional, commands to - deliver messages directly to the user's terminal screen. These - commands (SEND, SAML, SOML) were rarely implemented, and changes in - workstation technology and the introduction of other protocols may - have rendered them obsolete even where they are implemented. - - Clients SHOULD NOT provide SEND, SAML, or SOML as services. Servers - MAY implement them. If they are implemented by servers, the - implementation model specified in RFC 821 MUST be used and the - command names MUST be published in the response to the EHLO command. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Klensin Standards Track [Page 78] - -RFC 2821 Simple Mail Transfer Protocol April 2001 - - -Full Copyright Statement - - Copyright (C) The Internet Society (2001). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - - - - - - - - - - - - - -Klensin Standards Track [Page 79] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2822.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2822.txt deleted file mode 100644 index 9f698f77..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2822.txt +++ /dev/null @@ -1,2859 +0,0 @@ - - - - - - -Network Working Group P. Resnick, Editor -Request for Comments: 2822 QUALCOMM Incorporated -Obsoletes: 822 April 2001 -Category: Standards Track - - - Internet Message Format - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (2001). All Rights Reserved. - -Abstract - - This standard specifies a syntax for text messages that are sent - between computer users, within the framework of "electronic mail" - messages. This standard supersedes the one specified in Request For - Comments (RFC) 822, "Standard for the Format of ARPA Internet Text - Messages", updating it to reflect current practice and incorporating - incremental changes that were specified in other RFCs. - -Table of Contents - - 1. Introduction ............................................... 3 - 1.1. Scope .................................................... 3 - 1.2. Notational conventions ................................... 4 - 1.2.1. Requirements notation .................................. 4 - 1.2.2. Syntactic notation ..................................... 4 - 1.3. Structure of this document ............................... 4 - 2. Lexical Analysis of Messages ............................... 5 - 2.1. General Description ...................................... 5 - 2.1.1. Line Length Limits ..................................... 6 - 2.2. Header Fields ............................................ 7 - 2.2.1. Unstructured Header Field Bodies ....................... 7 - 2.2.2. Structured Header Field Bodies ......................... 7 - 2.2.3. Long Header Fields ..................................... 7 - 2.3. Body ..................................................... 8 - 3. Syntax ..................................................... 9 - 3.1. Introduction ............................................. 9 - 3.2. Lexical Tokens ........................................... 9 - - - -Resnick Standards Track [Page 1] - -RFC 2822 Internet Message Format April 2001 - - - 3.2.1. Primitive Tokens ....................................... 9 - 3.2.2. Quoted characters ......................................10 - 3.2.3. Folding white space and comments .......................11 - 3.2.4. Atom ...................................................12 - 3.2.5. Quoted strings .........................................13 - 3.2.6. Miscellaneous tokens ...................................13 - 3.3. Date and Time Specification ..............................14 - 3.4. Address Specification ....................................15 - 3.4.1. Addr-spec specification ................................16 - 3.5 Overall message syntax ....................................17 - 3.6. Field definitions ........................................18 - 3.6.1. The origination date field .............................20 - 3.6.2. Originator fields ......................................21 - 3.6.3. Destination address fields .............................22 - 3.6.4. Identification fields ..................................23 - 3.6.5. Informational fields ...................................26 - 3.6.6. Resent fields ..........................................26 - 3.6.7. Trace fields ...........................................28 - 3.6.8. Optional fields ........................................29 - 4. Obsolete Syntax ............................................29 - 4.1. Miscellaneous obsolete tokens ............................30 - 4.2. Obsolete folding white space .............................31 - 4.3. Obsolete Date and Time ...................................31 - 4.4. Obsolete Addressing ......................................33 - 4.5. Obsolete header fields ...................................33 - 4.5.1. Obsolete origination date field ........................34 - 4.5.2. Obsolete originator fields .............................34 - 4.5.3. Obsolete destination address fields ....................34 - 4.5.4. Obsolete identification fields .........................35 - 4.5.5. Obsolete informational fields ..........................35 - 4.5.6. Obsolete resent fields .................................35 - 4.5.7. Obsolete trace fields ..................................36 - 4.5.8. Obsolete optional fields ...............................36 - 5. Security Considerations ....................................36 - 6. Bibliography ...............................................37 - 7. Editor's Address ...........................................38 - 8. Acknowledgements ...........................................39 - Appendix A. Example messages ..................................41 - A.1. Addressing examples ......................................41 - A.1.1. A message from one person to another with simple - addressing .............................................41 - A.1.2. Different types of mailboxes ...........................42 - A.1.3. Group addresses ........................................43 - A.2. Reply messages ...........................................43 - A.3. Resent messages ..........................................44 - A.4. Messages with trace fields ...............................46 - A.5. White space, comments, and other oddities ................47 - A.6. Obsoleted forms ..........................................47 - - - -Resnick Standards Track [Page 2] - -RFC 2822 Internet Message Format April 2001 - - - A.6.1. Obsolete addressing ....................................48 - A.6.2. Obsolete dates .........................................48 - A.6.3. Obsolete white space and comments ......................48 - Appendix B. Differences from earlier standards ................49 - Appendix C. Notices ...........................................50 - Full Copyright Statement ......................................51 - -1. Introduction - -1.1. Scope - - This standard specifies a syntax for text messages that are sent - between computer users, within the framework of "electronic mail" - messages. This standard supersedes the one specified in Request For - Comments (RFC) 822, "Standard for the Format of ARPA Internet Text - Messages" [RFC822], updating it to reflect current practice and - incorporating incremental changes that were specified in other RFCs - [STD3]. - - This standard specifies a syntax only for text messages. In - particular, it makes no provision for the transmission of images, - audio, or other sorts of structured data in electronic mail messages. - There are several extensions published, such as the MIME document - series [RFC2045, RFC2046, RFC2049], which describe mechanisms for the - transmission of such data through electronic mail, either by - extending the syntax provided here or by structuring such messages to - conform to this syntax. Those mechanisms are outside of the scope of - this standard. - - In the context of electronic mail, messages are viewed as having an - envelope and contents. The envelope contains whatever information is - needed to accomplish transmission and delivery. (See [RFC2821] for a - discussion of the envelope.) The contents comprise the object to be - delivered to the recipient. This standard applies only to the format - and some of the semantics of message contents. It contains no - specification of the information in the envelope. - - However, some message systems may use information from the contents - to create the envelope. It is intended that this standard facilitate - the acquisition of such information by programs. - - This specification is intended as a definition of what message - content format is to be passed between systems. Though some message - systems locally store messages in this format (which eliminates the - need for translation between formats) and others use formats that - differ from the one specified in this standard, local storage is - outside of the scope of this standard. - - - - -Resnick Standards Track [Page 3] - -RFC 2822 Internet Message Format April 2001 - - - Note: This standard is not intended to dictate the internal formats - used by sites, the specific message system features that they are - expected to support, or any of the characteristics of user interface - programs that create or read messages. In addition, this standard - does not specify an encoding of the characters for either transport - or storage; that is, it does not specify the number of bits used or - how those bits are specifically transferred over the wire or stored - on disk. - -1.2. Notational conventions - -1.2.1. Requirements notation - - This document occasionally uses terms that appear in capital letters. - When the terms "MUST", "SHOULD", "RECOMMENDED", "MUST NOT", "SHOULD - NOT", and "MAY" appear capitalized, they are being used to indicate - particular requirements of this specification. A discussion of the - meanings of these terms appears in [RFC2119]. - -1.2.2. Syntactic notation - - This standard uses the Augmented Backus-Naur Form (ABNF) notation - specified in [RFC2234] for the formal definitions of the syntax of - messages. Characters will be specified either by a decimal value - (e.g., the value %d65 for uppercase A and %d97 for lowercase A) or by - a case-insensitive literal value enclosed in quotation marks (e.g., - "A" for either uppercase or lowercase A). See [RFC2234] for the full - description of the notation. - -1.3. Structure of this document - - This document is divided into several sections. - - This section, section 1, is a short introduction to the document. - - Section 2 lays out the general description of a message and its - constituent parts. This is an overview to help the reader understand - some of the general principles used in the later portions of this - document. Any examples in this section MUST NOT be taken as - specification of the formal syntax of any part of a message. - - Section 3 specifies formal ABNF rules for the structure of each part - of a message (the syntax) and describes the relationship between - those parts and their meaning in the context of a message (the - semantics). That is, it describes the actual rules for the structure - of each part of a message (the syntax) as well as a description of - the parts and instructions on how they ought to be interpreted (the - semantics). This includes analysis of the syntax and semantics of - - - -Resnick Standards Track [Page 4] - -RFC 2822 Internet Message Format April 2001 - - - subparts of messages that have specific structure. The syntax - included in section 3 represents messages as they MUST be created. - There are also notes in section 3 to indicate if any of the options - specified in the syntax SHOULD be used over any of the others. - - Both sections 2 and 3 describe messages that are legal to generate - for purposes of this standard. - - Section 4 of this document specifies an "obsolete" syntax. There are - references in section 3 to these obsolete syntactic elements. The - rules of the obsolete syntax are elements that have appeared in - earlier revisions of this standard or have previously been widely - used in Internet messages. As such, these elements MUST be - interpreted by parsers of messages in order to be conformant to this - standard. However, since items in this syntax have been determined - to be non-interoperable or to cause significant problems for - recipients of messages, they MUST NOT be generated by creators of - conformant messages. - - Section 5 details security considerations to take into account when - implementing this standard. - - Section 6 is a bibliography of references in this document. - - Section 7 contains the editor's address. - - Section 8 contains acknowledgements. - - Appendix A lists examples of different sorts of messages. These - examples are not exhaustive of the types of messages that appear on - the Internet, but give a broad overview of certain syntactic forms. - - Appendix B lists the differences between this standard and earlier - standards for Internet messages. - - Appendix C has copyright and intellectual property notices. - -2. Lexical Analysis of Messages - -2.1. General Description - - At the most basic level, a message is a series of characters. A - message that is conformant with this standard is comprised of - characters with values in the range 1 through 127 and interpreted as - US-ASCII characters [ASCII]. For brevity, this document sometimes - refers to this range of characters as simply "US-ASCII characters". - - - - - -Resnick Standards Track [Page 5] - -RFC 2822 Internet Message Format April 2001 - - - Note: This standard specifies that messages are made up of characters - in the US-ASCII range of 1 through 127. There are other documents, - specifically the MIME document series [RFC2045, RFC2046, RFC2047, - RFC2048, RFC2049], that extend this standard to allow for values - outside of that range. Discussion of those mechanisms is not within - the scope of this standard. - - Messages are divided into lines of characters. A line is a series of - characters that is delimited with the two characters carriage-return - and line-feed; that is, the carriage return (CR) character (ASCII - value 13) followed immediately by the line feed (LF) character (ASCII - value 10). (The carriage-return/line-feed pair is usually written in - this document as "CRLF".) - - A message consists of header fields (collectively called "the header - of the message") followed, optionally, by a body. The header is a - sequence of lines of characters with special syntax as defined in - this standard. The body is simply a sequence of characters that - follows the header and is separated from the header by an empty line - (i.e., a line with nothing preceding the CRLF). - -2.1.1. Line Length Limits - - There are two limits that this standard places on the number of - characters in a line. Each line of characters MUST be no more than - 998 characters, and SHOULD be no more than 78 characters, excluding - the CRLF. - - The 998 character limit is due to limitations in many implementations - which send, receive, or store Internet Message Format messages that - simply cannot handle more than 998 characters on a line. Receiving - implementations would do well to handle an arbitrarily large number - of characters in a line for robustness sake. However, there are so - many implementations which (in compliance with the transport - requirements of [RFC2821]) do not accept messages containing more - than 1000 character including the CR and LF per line, it is important - for implementations not to create such messages. - - The more conservative 78 character recommendation is to accommodate - the many implementations of user interfaces that display these - messages which may truncate, or disastrously wrap, the display of - more than 78 characters per line, in spite of the fact that such - implementations are non-conformant to the intent of this - specification (and that of [RFC2821] if they actually cause - information to be lost). Again, even though this limitation is put on - messages, it is encumbant upon implementations which display messages - - - - - -Resnick Standards Track [Page 6] - -RFC 2822 Internet Message Format April 2001 - - - to handle an arbitrarily large number of characters in a line - (certainly at least up to the 998 character limit) for the sake of - robustness. - -2.2. Header Fields - - Header fields are lines composed of a field name, followed by a colon - (":"), followed by a field body, and terminated by CRLF. A field - name MUST be composed of printable US-ASCII characters (i.e., - characters that have values between 33 and 126, inclusive), except - colon. A field body may be composed of any US-ASCII characters, - except for CR and LF. However, a field body may contain CRLF when - used in header "folding" and "unfolding" as described in section - 2.2.3. All field bodies MUST conform to the syntax described in - sections 3 and 4 of this standard. - -2.2.1. Unstructured Header Field Bodies - - Some field bodies in this standard are defined simply as - "unstructured" (which is specified below as any US-ASCII characters, - except for CR and LF) with no further restrictions. These are - referred to as unstructured field bodies. Semantically, unstructured - field bodies are simply to be treated as a single line of characters - with no further processing (except for header "folding" and - "unfolding" as described in section 2.2.3). - -2.2.2. Structured Header Field Bodies - - Some field bodies in this standard have specific syntactical - structure more restrictive than the unstructured field bodies - described above. These are referred to as "structured" field bodies. - Structured field bodies are sequences of specific lexical tokens as - described in sections 3 and 4 of this standard. Many of these tokens - are allowed (according to their syntax) to be introduced or end with - comments (as described in section 3.2.3) as well as the space (SP, - ASCII value 32) and horizontal tab (HTAB, ASCII value 9) characters - (together known as the white space characters, WSP), and those WSP - characters are subject to header "folding" and "unfolding" as - described in section 2.2.3. Semantic analysis of structured field - bodies is given along with their syntax. - -2.2.3. Long Header Fields - - Each header field is logically a single line of characters comprising - the field name, the colon, and the field body. For convenience - however, and to deal with the 998/78 character limitations per line, - the field body portion of a header field can be split into a multiple - line representation; this is called "folding". The general rule is - - - -Resnick Standards Track [Page 7] - -RFC 2822 Internet Message Format April 2001 - - - that wherever this standard allows for folding white space (not - simply WSP characters), a CRLF may be inserted before any WSP. For - example, the header field: - - Subject: This is a test - - can be represented as: - - Subject: This - is a test - - Note: Though structured field bodies are defined in such a way that - folding can take place between many of the lexical tokens (and even - within some of the lexical tokens), folding SHOULD be limited to - placing the CRLF at higher-level syntactic breaks. For instance, if - a field body is defined as comma-separated values, it is recommended - that folding occur after the comma separating the structured items in - preference to other places where the field could be folded, even if - it is allowed elsewhere. - - The process of moving from this folded multiple-line representation - of a header field to its single line representation is called - "unfolding". Unfolding is accomplished by simply removing any CRLF - that is immediately followed by WSP. Each header field should be - treated in its unfolded form for further syntactic and semantic - evaluation. - -2.3. Body - - The body of a message is simply lines of US-ASCII characters. The - only two limitations on the body are as follows: - - - CR and LF MUST only occur together as CRLF; they MUST NOT appear - independently in the body. - - - Lines of characters in the body MUST be limited to 998 characters, - and SHOULD be limited to 78 characters, excluding the CRLF. - - Note: As was stated earlier, there are other standards documents, - specifically the MIME documents [RFC2045, RFC2046, RFC2048, RFC2049] - that extend this standard to allow for different sorts of message - bodies. Again, these mechanisms are beyond the scope of this - document. - - - - - - - - -Resnick Standards Track [Page 8] - -RFC 2822 Internet Message Format April 2001 - - -3. Syntax - -3.1. Introduction - - The syntax as given in this section defines the legal syntax of - Internet messages. Messages that are conformant to this standard - MUST conform to the syntax in this section. If there are options in - this section where one option SHOULD be generated, that is indicated - either in the prose or in a comment next to the syntax. - - For the defined expressions, a short description of the syntax and - use is given, followed by the syntax in ABNF, followed by a semantic - analysis. Primitive tokens that are used but otherwise unspecified - come from [RFC2234]. - - In some of the definitions, there will be nonterminals whose names - start with "obs-". These "obs-" elements refer to tokens defined in - the obsolete syntax in section 4. In all cases, these productions - are to be ignored for the purposes of generating legal Internet - messages and MUST NOT be used as part of such a message. However, - when interpreting messages, these tokens MUST be honored as part of - the legal syntax. In this sense, section 3 defines a grammar for - generation of messages, with "obs-" elements that are to be ignored, - while section 4 adds grammar for interpretation of messages. - -3.2. Lexical Tokens - - The following rules are used to define an underlying lexical - analyzer, which feeds tokens to the higher-level parsers. This - section defines the tokens used in structured header field bodies. - - Note: Readers of this standard need to pay special attention to how - these lexical tokens are used in both the lower-level and - higher-level syntax later in the document. Particularly, the white - space tokens and the comment tokens defined in section 3.2.3 get used - in the lower-level tokens defined here, and those lower-level tokens - are in turn used as parts of the higher-level tokens defined later. - Therefore, the white space and comments may be allowed in the - higher-level tokens even though they may not explicitly appear in a - particular definition. - -3.2.1. Primitive Tokens - - The following are primitive tokens referred to elsewhere in this - standard, but not otherwise defined in [RFC2234]. Some of them will - not appear anywhere else in the syntax, but they are convenient to - refer to in other parts of this document. - - - - -Resnick Standards Track [Page 9] - -RFC 2822 Internet Message Format April 2001 - - - Note: The "specials" below are just such an example. Though the - specials token does not appear anywhere else in this standard, it is - useful for implementers who use tools that lexically analyze - messages. Each of the characters in specials can be used to indicate - a tokenization point in lexical analysis. - -NO-WS-CTL = %d1-8 / ; US-ASCII control characters - %d11 / ; that do not include the - %d12 / ; carriage return, line feed, - %d14-31 / ; and white space characters - %d127 - -text = %d1-9 / ; Characters excluding CR and LF - %d11 / - %d12 / - %d14-127 / - obs-text - -specials = "(" / ")" / ; Special characters used in - "<" / ">" / ; other parts of the syntax - "[" / "]" / - ":" / ";" / - "@" / "\" / - "," / "." / - DQUOTE - - No special semantics are attached to these tokens. They are simply - single characters. - -3.2.2. Quoted characters - - Some characters are reserved for special interpretation, such as - delimiting lexical tokens. To permit use of these characters as - uninterpreted data, a quoting mechanism is provided. - -quoted-pair = ("\" text) / obs-qp - - Where any quoted-pair appears, it is to be interpreted as the text - character alone. That is to say, the "\" character that appears as - part of a quoted-pair is semantically "invisible". - - Note: The "\" character may appear in a message where it is not part - of a quoted-pair. A "\" character that does not appear in a - quoted-pair is not semantically invisible. The only places in this - standard where quoted-pair currently appears are ccontent, qcontent, - dcontent, no-fold-quote, and no-fold-literal. - - - - - -Resnick Standards Track [Page 10] - -RFC 2822 Internet Message Format April 2001 - - -3.2.3. Folding white space and comments - - White space characters, including white space used in folding - (described in section 2.2.3), may appear between many elements in - header field bodies. Also, strings of characters that are treated as - comments may be included in structured field bodies as characters - enclosed in parentheses. The following defines the folding white - space (FWS) and comment constructs. - - Strings of characters enclosed in parentheses are considered comments - so long as they do not appear within a "quoted-string", as defined in - section 3.2.5. Comments may nest. - - There are several places in this standard where comments and FWS may - be freely inserted. To accommodate that syntax, an additional token - for "CFWS" is defined for places where comments and/or FWS can occur. - However, where CFWS occurs in this standard, it MUST NOT be inserted - in such a way that any line of a folded header field is made up - entirely of WSP characters and nothing else. - -FWS = ([*WSP CRLF] 1*WSP) / ; Folding white space - obs-FWS - -ctext = NO-WS-CTL / ; Non white space controls - - %d33-39 / ; The rest of the US-ASCII - %d42-91 / ; characters not including "(", - %d93-126 ; ")", or "\" - -ccontent = ctext / quoted-pair / comment - -comment = "(" *([FWS] ccontent) [FWS] ")" - -CFWS = *([FWS] comment) (([FWS] comment) / FWS) - - Throughout this standard, where FWS (the folding white space token) - appears, it indicates a place where header folding, as discussed in - section 2.2.3, may take place. Wherever header folding appears in a - message (that is, a header field body containing a CRLF followed by - any WSP), header unfolding (removal of the CRLF) is performed before - any further lexical analysis is performed on that header field - according to this standard. That is to say, any CRLF that appears in - FWS is semantically "invisible." - - A comment is normally used in a structured field body to provide some - human readable informational text. Since a comment is allowed to - contain FWS, folding is permitted within the comment. Also note that - since quoted-pair is allowed in a comment, the parentheses and - - - -Resnick Standards Track [Page 11] - -RFC 2822 Internet Message Format April 2001 - - - backslash characters may appear in a comment so long as they appear - as a quoted-pair. Semantically, the enclosing parentheses are not - part of the comment; the comment is what is contained between the two - parentheses. As stated earlier, the "\" in any quoted-pair and the - CRLF in any FWS that appears within the comment are semantically - "invisible" and therefore not part of the comment either. - - Runs of FWS, comment or CFWS that occur between lexical tokens in a - structured field header are semantically interpreted as a single - space character. - -3.2.4. Atom - - Several productions in structured header field bodies are simply - strings of certain basic characters. Such productions are called - atoms. - - Some of the structured header field bodies also allow the period - character (".", ASCII value 46) within runs of atext. An additional - "dot-atom" token is defined for those purposes. - -atext = ALPHA / DIGIT / ; Any character except controls, - "!" / "#" / ; SP, and specials. - "$" / "%" / ; Used for atoms - "&" / "'" / - "*" / "+" / - "-" / "/" / - "=" / "?" / - "^" / "_" / - "`" / "{" / - "|" / "}" / - "~" - -atom = [CFWS] 1*atext [CFWS] - -dot-atom = [CFWS] dot-atom-text [CFWS] - -dot-atom-text = 1*atext *("." 1*atext) - - Both atom and dot-atom are interpreted as a single unit, comprised of - the string of characters that make it up. Semantically, the optional - comments and FWS surrounding the rest of the characters are not part - of the atom; the atom is only the run of atext characters in an atom, - or the atext and "." characters in a dot-atom. - - - - - - - -Resnick Standards Track [Page 12] - -RFC 2822 Internet Message Format April 2001 - - -3.2.5. Quoted strings - - Strings of characters that include characters other than those - allowed in atoms may be represented in a quoted string format, where - the characters are surrounded by quote (DQUOTE, ASCII value 34) - characters. - -qtext = NO-WS-CTL / ; Non white space controls - - %d33 / ; The rest of the US-ASCII - %d35-91 / ; characters not including "\" - %d93-126 ; or the quote character - -qcontent = qtext / quoted-pair - -quoted-string = [CFWS] - DQUOTE *([FWS] qcontent) [FWS] DQUOTE - [CFWS] - - A quoted-string is treated as a unit. That is, quoted-string is - identical to atom, semantically. Since a quoted-string is allowed to - contain FWS, folding is permitted. Also note that since quoted-pair - is allowed in a quoted-string, the quote and backslash characters may - appear in a quoted-string so long as they appear as a quoted-pair. - - Semantically, neither the optional CFWS outside of the quote - characters nor the quote characters themselves are part of the - quoted-string; the quoted-string is what is contained between the two - quote characters. As stated earlier, the "\" in any quoted-pair and - the CRLF in any FWS/CFWS that appears within the quoted-string are - semantically "invisible" and therefore not part of the quoted-string - either. - -3.2.6. Miscellaneous tokens - - Three additional tokens are defined, word and phrase for combinations - of atoms and/or quoted-strings, and unstructured for use in - unstructured header fields and in some places within structured - header fields. - -word = atom / quoted-string - -phrase = 1*word / obs-phrase - - - - - - - - -Resnick Standards Track [Page 13] - -RFC 2822 Internet Message Format April 2001 - - -utext = NO-WS-CTL / ; Non white space controls - %d33-126 / ; The rest of US-ASCII - obs-utext - -unstructured = *([FWS] utext) [FWS] - -3.3. Date and Time Specification - - Date and time occur in several header fields. This section specifies - the syntax for a full date and time specification. Though folding - white space is permitted throughout the date-time specification, it - is RECOMMENDED that a single space be used in each place that FWS - appears (whether it is required or optional); some older - implementations may not interpret other occurrences of folding white - space correctly. - -date-time = [ day-of-week "," ] date FWS time [CFWS] - -day-of-week = ([FWS] day-name) / obs-day-of-week - -day-name = "Mon" / "Tue" / "Wed" / "Thu" / - "Fri" / "Sat" / "Sun" - -date = day month year - -year = 4*DIGIT / obs-year - -month = (FWS month-name FWS) / obs-month - -month-name = "Jan" / "Feb" / "Mar" / "Apr" / - "May" / "Jun" / "Jul" / "Aug" / - "Sep" / "Oct" / "Nov" / "Dec" - -day = ([FWS] 1*2DIGIT) / obs-day - -time = time-of-day FWS zone - -time-of-day = hour ":" minute [ ":" second ] - -hour = 2DIGIT / obs-hour - -minute = 2DIGIT / obs-minute - -second = 2DIGIT / obs-second - -zone = (( "+" / "-" ) 4DIGIT) / obs-zone - - - - - -Resnick Standards Track [Page 14] - -RFC 2822 Internet Message Format April 2001 - - - The day is the numeric day of the month. The year is any numeric - year 1900 or later. - - The time-of-day specifies the number of hours, minutes, and - optionally seconds since midnight of the date indicated. - - The date and time-of-day SHOULD express local time. - - The zone specifies the offset from Coordinated Universal Time (UTC, - formerly referred to as "Greenwich Mean Time") that the date and - time-of-day represent. The "+" or "-" indicates whether the - time-of-day is ahead of (i.e., east of) or behind (i.e., west of) - Universal Time. The first two digits indicate the number of hours - difference from Universal Time, and the last two digits indicate the - number of minutes difference from Universal Time. (Hence, +hhmm - means +(hh * 60 + mm) minutes, and -hhmm means -(hh * 60 + mm) - minutes). The form "+0000" SHOULD be used to indicate a time zone at - Universal Time. Though "-0000" also indicates Universal Time, it is - used to indicate that the time was generated on a system that may be - in a local time zone other than Universal Time and therefore - indicates that the date-time contains no information about the local - time zone. - - A date-time specification MUST be semantically valid. That is, the - day-of-the-week (if included) MUST be the day implied by the date, - the numeric day-of-month MUST be between 1 and the number of days - allowed for the specified month (in the specified year), the - time-of-day MUST be in the range 00:00:00 through 23:59:60 (the - number of seconds allowing for a leap second; see [STD12]), and the - zone MUST be within the range -9959 through +9959. - -3.4. Address Specification - - Addresses occur in several message header fields to indicate senders - and recipients of messages. An address may either be an individual - mailbox, or a group of mailboxes. - -address = mailbox / group - -mailbox = name-addr / addr-spec - -name-addr = [display-name] angle-addr - -angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr - -group = display-name ":" [mailbox-list / CFWS] ";" - [CFWS] - - - - -Resnick Standards Track [Page 15] - -RFC 2822 Internet Message Format April 2001 - - -display-name = phrase - -mailbox-list = (mailbox *("," mailbox)) / obs-mbox-list - -address-list = (address *("," address)) / obs-addr-list - - A mailbox receives mail. It is a conceptual entity which does not - necessarily pertain to file storage. For example, some sites may - choose to print mail on a printer and deliver the output to the - addressee's desk. Normally, a mailbox is comprised of two parts: (1) - an optional display name that indicates the name of the recipient - (which could be a person or a system) that could be displayed to the - user of a mail application, and (2) an addr-spec address enclosed in - angle brackets ("<" and ">"). There is also an alternate simple form - of a mailbox where the addr-spec address appears alone, without the - recipient's name or the angle brackets. The Internet addr-spec - address is described in section 3.4.1. - - Note: Some legacy implementations used the simple form where the - addr-spec appears without the angle brackets, but included the name - of the recipient in parentheses as a comment following the addr-spec. - Since the meaning of the information in a comment is unspecified, - implementations SHOULD use the full name-addr form of the mailbox, - instead of the legacy form, to specify the display name associated - with a mailbox. Also, because some legacy implementations interpret - the comment, comments generally SHOULD NOT be used in address fields - to avoid confusing such implementations. - - When it is desirable to treat several mailboxes as a single unit - (i.e., in a distribution list), the group construct can be used. The - group construct allows the sender to indicate a named group of - recipients. This is done by giving a display name for the group, - followed by a colon, followed by a comma separated list of any number - of mailboxes (including zero and one), and ending with a semicolon. - Because the list of mailboxes can be empty, using the group construct - is also a simple way to communicate to recipients that the message - was sent to one or more named sets of recipients, without actually - providing the individual mailbox address for each of those - recipients. - -3.4.1. Addr-spec specification - - An addr-spec is a specific Internet identifier that contains a - locally interpreted string followed by the at-sign character ("@", - ASCII value 64) followed by an Internet domain. The locally - interpreted string is either a quoted-string or a dot-atom. If the - string can be represented as a dot-atom (that is, it contains no - characters other than atext characters or "." surrounded by atext - - - -Resnick Standards Track [Page 16] - -RFC 2822 Internet Message Format April 2001 - - - characters), then the dot-atom form SHOULD be used and the - quoted-string form SHOULD NOT be used. Comments and folding white - space SHOULD NOT be used around the "@" in the addr-spec. - -addr-spec = local-part "@" domain - -local-part = dot-atom / quoted-string / obs-local-part - -domain = dot-atom / domain-literal / obs-domain - -domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS] - -dcontent = dtext / quoted-pair - -dtext = NO-WS-CTL / ; Non white space controls - - %d33-90 / ; The rest of the US-ASCII - %d94-126 ; characters not including "[", - ; "]", or "\" - - The domain portion identifies the point to which the mail is - delivered. In the dot-atom form, this is interpreted as an Internet - domain name (either a host name or a mail exchanger name) as - described in [STD3, STD13, STD14]. In the domain-literal form, the - domain is interpreted as the literal Internet address of the - particular host. In both cases, how addressing is used and how - messages are transported to a particular host is covered in the mail - transport document [RFC2821]. These mechanisms are outside of the - scope of this document. - - The local-part portion is a domain dependent string. In addresses, - it is simply interpreted on the particular host as a name of a - particular mailbox. - -3.5 Overall message syntax - - A message consists of header fields, optionally followed by a message - body. Lines in a message MUST be a maximum of 998 characters - excluding the CRLF, but it is RECOMMENDED that lines be limited to 78 - characters excluding the CRLF. (See section 2.1.1 for explanation.) - In a message body, though all of the characters listed in the text - rule MAY be used, the use of US-ASCII control characters (values 1 - through 8, 11, 12, and 14 through 31) is discouraged since their - interpretation by receivers for display is not guaranteed. - - - - - - - -Resnick Standards Track [Page 17] - -RFC 2822 Internet Message Format April 2001 - - -message = (fields / obs-fields) - [CRLF body] - -body = *(*998text CRLF) *998text - - The header fields carry most of the semantic information and are - defined in section 3.6. The body is simply a series of lines of text - which are uninterpreted for the purposes of this standard. - -3.6. Field definitions - - The header fields of a message are defined here. All header fields - have the same general syntactic structure: A field name, followed by - a colon, followed by the field body. The specific syntax for each - header field is defined in the subsequent sections. - - Note: In the ABNF syntax for each field in subsequent sections, each - field name is followed by the required colon. However, for brevity - sometimes the colon is not referred to in the textual description of - the syntax. It is, nonetheless, required. - - It is important to note that the header fields are not guaranteed to - be in a particular order. They may appear in any order, and they - have been known to be reordered occasionally when transported over - the Internet. However, for the purposes of this standard, header - fields SHOULD NOT be reordered when a message is transported or - transformed. More importantly, the trace header fields and resent - header fields MUST NOT be reordered, and SHOULD be kept in blocks - prepended to the message. See sections 3.6.6 and 3.6.7 for more - information. - - The only required header fields are the origination date field and - the originator address field(s). All other header fields are - syntactically optional. More information is contained in the table - following this definition. - -fields = *(trace - *(resent-date / - resent-from / - resent-sender / - resent-to / - resent-cc / - resent-bcc / - resent-msg-id)) - *(orig-date / - from / - sender / - reply-to / - - - -Resnick Standards Track [Page 18] - -RFC 2822 Internet Message Format April 2001 - - - to / - cc / - bcc / - message-id / - in-reply-to / - references / - subject / - comments / - keywords / - optional-field) - - The following table indicates limits on the number of times each - field may occur in a message header as well as any special - limitations on the use of those fields. An asterisk next to a value - in the minimum or maximum column indicates that a special restriction - appears in the Notes column. - -Field Min number Max number Notes - -trace 0 unlimited Block prepended - see - 3.6.7 - -resent-date 0* unlimited* One per block, required - if other resent fields - present - see 3.6.6 - -resent-from 0 unlimited* One per block - see - 3.6.6 - -resent-sender 0* unlimited* One per block, MUST - occur with multi-address - resent-from - see 3.6.6 - -resent-to 0 unlimited* One per block - see - 3.6.6 - -resent-cc 0 unlimited* One per block - see - 3.6.6 - -resent-bcc 0 unlimited* One per block - see - 3.6.6 - -resent-msg-id 0 unlimited* One per block - see - 3.6.6 - -orig-date 1 1 - -from 1 1 See sender and 3.6.2 - - - -Resnick Standards Track [Page 19] - -RFC 2822 Internet Message Format April 2001 - - -sender 0* 1 MUST occur with multi- - address from - see 3.6.2 - -reply-to 0 1 - -to 0 1 - -cc 0 1 - -bcc 0 1 - -message-id 0* 1 SHOULD be present - see - 3.6.4 - -in-reply-to 0* 1 SHOULD occur in some - replies - see 3.6.4 - -references 0* 1 SHOULD occur in some - replies - see 3.6.4 - -subject 0 1 - -comments 0 unlimited - -keywords 0 unlimited - -optional-field 0 unlimited - - The exact interpretation of each field is described in subsequent - sections. - -3.6.1. The origination date field - - The origination date field consists of the field name "Date" followed - by a date-time specification. - -orig-date = "Date:" date-time CRLF - - The origination date specifies the date and time at which the creator - of the message indicated that the message was complete and ready to - enter the mail delivery system. For instance, this might be the time - that a user pushes the "send" or "submit" button in an application - program. In any case, it is specifically not intended to convey the - time that the message is actually transported, but rather the time at - which the human or other creator of the message has put the message - into its final form, ready for transport. (For example, a portable - computer user who is not connected to a network might queue a message - - - - -Resnick Standards Track [Page 20] - -RFC 2822 Internet Message Format April 2001 - - - for delivery. The origination date is intended to contain the date - and time that the user queued the message, not the time when the user - connected to the network to send the message.) - -3.6.2. Originator fields - - The originator fields of a message consist of the from field, the - sender field (when applicable), and optionally the reply-to field. - The from field consists of the field name "From" and a - comma-separated list of one or more mailbox specifications. If the - from field contains more than one mailbox specification in the - mailbox-list, then the sender field, containing the field name - "Sender" and a single mailbox specification, MUST appear in the - message. In either case, an optional reply-to field MAY also be - included, which contains the field name "Reply-To" and a - comma-separated list of one or more addresses. - -from = "From:" mailbox-list CRLF - -sender = "Sender:" mailbox CRLF - -reply-to = "Reply-To:" address-list CRLF - - The originator fields indicate the mailbox(es) of the source of the - message. The "From:" field specifies the author(s) of the message, - that is, the mailbox(es) of the person(s) or system(s) responsible - for the writing of the message. The "Sender:" field specifies the - mailbox of the agent responsible for the actual transmission of the - message. For example, if a secretary were to send a message for - another person, the mailbox of the secretary would appear in the - "Sender:" field and the mailbox of the actual author would appear in - the "From:" field. If the originator of the message can be indicated - by a single mailbox and the author and transmitter are identical, the - "Sender:" field SHOULD NOT be used. Otherwise, both fields SHOULD - appear. - - The originator fields also provide the information required when - replying to a message. When the "Reply-To:" field is present, it - indicates the mailbox(es) to which the author of the message suggests - that replies be sent. In the absence of the "Reply-To:" field, - replies SHOULD by default be sent to the mailbox(es) specified in the - "From:" field unless otherwise specified by the person composing the - reply. - - In all cases, the "From:" field SHOULD NOT contain any mailbox that - does not belong to the author(s) of the message. See also section - 3.6.3 for more information on forming the destination addresses for a - reply. - - - -Resnick Standards Track [Page 21] - -RFC 2822 Internet Message Format April 2001 - - -3.6.3. Destination address fields - - The destination fields of a message consist of three possible fields, - each of the same form: The field name, which is either "To", "Cc", or - "Bcc", followed by a comma-separated list of one or more addresses - (either mailbox or group syntax). - -to = "To:" address-list CRLF - -cc = "Cc:" address-list CRLF - -bcc = "Bcc:" (address-list / [CFWS]) CRLF - - The destination fields specify the recipients of the message. Each - destination field may have one or more addresses, and each of the - addresses indicate the intended recipients of the message. The only - difference between the three fields is how each is used. - - The "To:" field contains the address(es) of the primary recipient(s) - of the message. - - The "Cc:" field (where the "Cc" means "Carbon Copy" in the sense of - making a copy on a typewriter using carbon paper) contains the - addresses of others who are to receive the message, though the - content of the message may not be directed at them. - - The "Bcc:" field (where the "Bcc" means "Blind Carbon Copy") contains - addresses of recipients of the message whose addresses are not to be - revealed to other recipients of the message. There are three ways in - which the "Bcc:" field is used. In the first case, when a message - containing a "Bcc:" field is prepared to be sent, the "Bcc:" line is - removed even though all of the recipients (including those specified - in the "Bcc:" field) are sent a copy of the message. In the second - case, recipients specified in the "To:" and "Cc:" lines each are sent - a copy of the message with the "Bcc:" line removed as above, but the - recipients on the "Bcc:" line get a separate copy of the message - containing a "Bcc:" line. (When there are multiple recipient - addresses in the "Bcc:" field, some implementations actually send a - separate copy of the message to each recipient with a "Bcc:" - containing only the address of that particular recipient.) Finally, - since a "Bcc:" field may contain no addresses, a "Bcc:" field can be - sent without any addresses indicating to the recipients that blind - copies were sent to someone. Which method to use with "Bcc:" fields - is implementation dependent, but refer to the "Security - Considerations" section of this document for a discussion of each. - - - - - - -Resnick Standards Track [Page 22] - -RFC 2822 Internet Message Format April 2001 - - - When a message is a reply to another message, the mailboxes of the - authors of the original message (the mailboxes in the "From:" field) - or mailboxes specified in the "Reply-To:" field (if it exists) MAY - appear in the "To:" field of the reply since these would normally be - the primary recipients of the reply. If a reply is sent to a message - that has destination fields, it is often desirable to send a copy of - the reply to all of the recipients of the message, in addition to the - author. When such a reply is formed, addresses in the "To:" and - "Cc:" fields of the original message MAY appear in the "Cc:" field of - the reply, since these are normally secondary recipients of the - reply. If a "Bcc:" field is present in the original message, - addresses in that field MAY appear in the "Bcc:" field of the reply, - but SHOULD NOT appear in the "To:" or "Cc:" fields. - - Note: Some mail applications have automatic reply commands that - include the destination addresses of the original message in the - destination addresses of the reply. How those reply commands behave - is implementation dependent and is beyond the scope of this document. - In particular, whether or not to include the original destination - addresses when the original message had a "Reply-To:" field is not - addressed here. - -3.6.4. Identification fields - - Though optional, every message SHOULD have a "Message-ID:" field. - Furthermore, reply messages SHOULD have "In-Reply-To:" and - "References:" fields as appropriate, as described below. - - The "Message-ID:" field contains a single unique message identifier. - The "References:" and "In-Reply-To:" field each contain one or more - unique message identifiers, optionally separated by CFWS. - - The message identifier (msg-id) is similar in syntax to an angle-addr - construct without the internal CFWS. - -message-id = "Message-ID:" msg-id CRLF - -in-reply-to = "In-Reply-To:" 1*msg-id CRLF - -references = "References:" 1*msg-id CRLF - -msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS] - -id-left = dot-atom-text / no-fold-quote / obs-id-left - -id-right = dot-atom-text / no-fold-literal / obs-id-right - -no-fold-quote = DQUOTE *(qtext / quoted-pair) DQUOTE - - - -Resnick Standards Track [Page 23] - -RFC 2822 Internet Message Format April 2001 - - -no-fold-literal = "[" *(dtext / quoted-pair) "]" - - The "Message-ID:" field provides a unique message identifier that - refers to a particular version of a particular message. The - uniqueness of the message identifier is guaranteed by the host that - generates it (see below). This message identifier is intended to be - machine readable and not necessarily meaningful to humans. A message - identifier pertains to exactly one instantiation of a particular - message; subsequent revisions to the message each receive new message - identifiers. - - Note: There are many instances when messages are "changed", but those - changes do not constitute a new instantiation of that message, and - therefore the message would not get a new message identifier. For - example, when messages are introduced into the transport system, they - are often prepended with additional header fields such as trace - fields (described in section 3.6.7) and resent fields (described in - section 3.6.6). The addition of such header fields does not change - the identity of the message and therefore the original "Message-ID:" - field is retained. In all cases, it is the meaning that the sender - of the message wishes to convey (i.e., whether this is the same - message or a different message) that determines whether or not the - "Message-ID:" field changes, not any particular syntactic difference - that appears (or does not appear) in the message. - - The "In-Reply-To:" and "References:" fields are used when creating a - reply to a message. They hold the message identifier of the original - message and the message identifiers of other messages (for example, - in the case of a reply to a message which was itself a reply). The - "In-Reply-To:" field may be used to identify the message (or - messages) to which the new message is a reply, while the - "References:" field may be used to identify a "thread" of - conversation. - - When creating a reply to a message, the "In-Reply-To:" and - "References:" fields of the resultant message are constructed as - follows: - - The "In-Reply-To:" field will contain the contents of the "Message- - ID:" field of the message to which this one is a reply (the "parent - message"). If there is more than one parent message, then the "In- - Reply-To:" field will contain the contents of all of the parents' - "Message-ID:" fields. If there is no "Message-ID:" field in any of - the parent messages, then the new message will have no "In-Reply-To:" - field. - - - - - - -Resnick Standards Track [Page 24] - -RFC 2822 Internet Message Format April 2001 - - - The "References:" field will contain the contents of the parent's - "References:" field (if any) followed by the contents of the parent's - "Message-ID:" field (if any). If the parent message does not contain - a "References:" field but does have an "In-Reply-To:" field - containing a single message identifier, then the "References:" field - will contain the contents of the parent's "In-Reply-To:" field - followed by the contents of the parent's "Message-ID:" field (if - any). If the parent has none of the "References:", "In-Reply-To:", - or "Message-ID:" fields, then the new message will have no - "References:" field. - - Note: Some implementations parse the "References:" field to display - the "thread of the discussion". These implementations assume that - each new message is a reply to a single parent and hence that they - can walk backwards through the "References:" field to find the parent - of each message listed there. Therefore, trying to form a - "References:" field for a reply that has multiple parents is - discouraged and how to do so is not defined in this document. - - The message identifier (msg-id) itself MUST be a globally unique - identifier for a message. The generator of the message identifier - MUST guarantee that the msg-id is unique. There are several - algorithms that can be used to accomplish this. Since the msg-id has - a similar syntax to angle-addr (identical except that comments and - folding white space are not allowed), a good method is to put the - domain name (or a domain literal IP address) of the host on which the - message identifier was created on the right hand side of the "@", and - put a combination of the current absolute date and time along with - some other currently unique (perhaps sequential) identifier available - on the system (for example, a process id number) on the left hand - side. Using a date on the left hand side and a domain name or domain - literal on the right hand side makes it possible to guarantee - uniqueness since no two hosts use the same domain name or IP address - at the same time. Though other algorithms will work, it is - RECOMMENDED that the right hand side contain some domain identifier - (either of the host itself or otherwise) such that the generator of - the message identifier can guarantee the uniqueness of the left hand - side within the scope of that domain. - - Semantically, the angle bracket characters are not part of the - msg-id; the msg-id is what is contained between the two angle bracket - characters. - - - - - - - - - -Resnick Standards Track [Page 25] - -RFC 2822 Internet Message Format April 2001 - - -3.6.5. Informational fields - - The informational fields are all optional. The "Keywords:" field - contains a comma-separated list of one or more words or - quoted-strings. The "Subject:" and "Comments:" fields are - unstructured fields as defined in section 2.2.1, and therefore may - contain text or folding white space. - -subject = "Subject:" unstructured CRLF - -comments = "Comments:" unstructured CRLF - -keywords = "Keywords:" phrase *("," phrase) CRLF - - These three fields are intended to have only human-readable content - with information about the message. The "Subject:" field is the most - common and contains a short string identifying the topic of the - message. When used in a reply, the field body MAY start with the - string "Re: " (from the Latin "res", in the matter of) followed by - the contents of the "Subject:" field body of the original message. - If this is done, only one instance of the literal string "Re: " ought - to be used since use of other strings or more than one instance can - lead to undesirable consequences. The "Comments:" field contains any - additional comments on the text of the body of the message. The - "Keywords:" field contains a comma-separated list of important words - and phrases that might be useful for the recipient. - -3.6.6. Resent fields - - Resent fields SHOULD be added to any message that is reintroduced by - a user into the transport system. A separate set of resent fields - SHOULD be added each time this is done. All of the resent fields - corresponding to a particular resending of the message SHOULD be - together. Each new set of resent fields is prepended to the message; - that is, the most recent set of resent fields appear earlier in the - message. No other fields in the message are changed when resent - fields are added. - - Each of the resent fields corresponds to a particular field elsewhere - in the syntax. For instance, the "Resent-Date:" field corresponds to - the "Date:" field and the "Resent-To:" field corresponds to the "To:" - field. In each case, the syntax for the field body is identical to - the syntax given previously for the corresponding field. - - When resent fields are used, the "Resent-From:" and "Resent-Date:" - fields MUST be sent. The "Resent-Message-ID:" field SHOULD be sent. - "Resent-Sender:" SHOULD NOT be used if "Resent-Sender:" would be - identical to "Resent-From:". - - - -Resnick Standards Track [Page 26] - -RFC 2822 Internet Message Format April 2001 - - -resent-date = "Resent-Date:" date-time CRLF - -resent-from = "Resent-From:" mailbox-list CRLF - -resent-sender = "Resent-Sender:" mailbox CRLF - -resent-to = "Resent-To:" address-list CRLF - -resent-cc = "Resent-Cc:" address-list CRLF - -resent-bcc = "Resent-Bcc:" (address-list / [CFWS]) CRLF - -resent-msg-id = "Resent-Message-ID:" msg-id CRLF - - Resent fields are used to identify a message as having been - reintroduced into the transport system by a user. The purpose of - using resent fields is to have the message appear to the final - recipient as if it were sent directly by the original sender, with - all of the original fields remaining the same. Each set of resent - fields correspond to a particular resending event. That is, if a - message is resent multiple times, each set of resent fields gives - identifying information for each individual time. Resent fields are - strictly informational. They MUST NOT be used in the normal - processing of replies or other such automatic actions on messages. - - Note: Reintroducing a message into the transport system and using - resent fields is a different operation from "forwarding". - "Forwarding" has two meanings: One sense of forwarding is that a mail - reading program can be told by a user to forward a copy of a message - to another person, making the forwarded message the body of the new - message. A forwarded message in this sense does not appear to have - come from the original sender, but is an entirely new message from - the forwarder of the message. On the other hand, forwarding is also - used to mean when a mail transport program gets a message and - forwards it on to a different destination for final delivery. Resent - header fields are not intended for use with either type of - forwarding. - - The resent originator fields indicate the mailbox of the person(s) or - system(s) that resent the message. As with the regular originator - fields, there are two forms: a simple "Resent-From:" form which - contains the mailbox of the individual doing the resending, and the - more complex form, when one individual (identified in the - "Resent-Sender:" field) resends a message on behalf of one or more - others (identified in the "Resent-From:" field). - - Note: When replying to a resent message, replies behave just as they - would with any other message, using the original "From:", - - - -Resnick Standards Track [Page 27] - -RFC 2822 Internet Message Format April 2001 - - - "Reply-To:", "Message-ID:", and other fields. The resent fields are - only informational and MUST NOT be used in the normal processing of - replies. - - The "Resent-Date:" indicates the date and time at which the resent - message is dispatched by the resender of the message. Like the - "Date:" field, it is not the date and time that the message was - actually transported. - - The "Resent-To:", "Resent-Cc:", and "Resent-Bcc:" fields function - identically to the "To:", "Cc:", and "Bcc:" fields respectively, - except that they indicate the recipients of the resent message, not - the recipients of the original message. - - The "Resent-Message-ID:" field provides a unique identifier for the - resent message. - -3.6.7. Trace fields - - The trace fields are a group of header fields consisting of an - optional "Return-Path:" field, and one or more "Received:" fields. - The "Return-Path:" header field contains a pair of angle brackets - that enclose an optional addr-spec. The "Received:" field contains a - (possibly empty) list of name/value pairs followed by a semicolon and - a date-time specification. The first item of the name/value pair is - defined by item-name, and the second item is either an addr-spec, an - atom, a domain, or a msg-id. Further restrictions may be applied to - the syntax of the trace fields by standards that provide for their - use, such as [RFC2821]. - -trace = [return] - 1*received - -return = "Return-Path:" path CRLF - -path = ([CFWS] "<" ([CFWS] / addr-spec) ">" [CFWS]) / - obs-path - -received = "Received:" name-val-list ";" date-time CRLF - -name-val-list = [CFWS] [name-val-pair *(CFWS name-val-pair)] - -name-val-pair = item-name CFWS item-value - -item-name = ALPHA *(["-"] (ALPHA / DIGIT)) - -item-value = 1*angle-addr / addr-spec / - atom / domain / msg-id - - - -Resnick Standards Track [Page 28] - -RFC 2822 Internet Message Format April 2001 - - - A full discussion of the Internet mail use of trace fields is - contained in [RFC2821]. For the purposes of this standard, the trace - fields are strictly informational, and any formal interpretation of - them is outside of the scope of this document. - -3.6.8. Optional fields - - Fields may appear in messages that are otherwise unspecified in this - standard. They MUST conform to the syntax of an optional-field. - This is a field name, made up of the printable US-ASCII characters - except SP and colon, followed by a colon, followed by any text which - conforms to unstructured. - - The field names of any optional-field MUST NOT be identical to any - field name specified elsewhere in this standard. - -optional-field = field-name ":" unstructured CRLF - -field-name = 1*ftext - -ftext = %d33-57 / ; Any character except - %d59-126 ; controls, SP, and - ; ":". - - For the purposes of this standard, any optional field is - uninterpreted. - -4. Obsolete Syntax - - Earlier versions of this standard allowed for different (usually more - liberal) syntax than is allowed in this version. Also, there have - been syntactic elements used in messages on the Internet whose - interpretation have never been documented. Though some of these - syntactic forms MUST NOT be generated according to the grammar in - section 3, they MUST be accepted and parsed by a conformant receiver. - This section documents many of these syntactic elements. Taking the - grammar in section 3 and adding the definitions presented in this - section will result in the grammar to use for interpretation of - messages. - - Note: This section identifies syntactic forms that any implementation - MUST reasonably interpret. However, there are certainly Internet - messages which do not conform to even the additional syntax given in - this section. The fact that a particular form does not appear in any - section of this document is not justification for computer programs - to crash or for malformed data to be irretrievably lost by any - implementation. To repeat an example, though this document requires - lines in messages to be no longer than 998 characters, silently - - - -Resnick Standards Track [Page 29] - -RFC 2822 Internet Message Format April 2001 - - - discarding the 999th and subsequent characters in a line without - warning would still be bad behavior for an implementation. It is up - to the implementation to deal with messages robustly. - - One important difference between the obsolete (interpreting) and the - current (generating) syntax is that in structured header field bodies - (i.e., between the colon and the CRLF of any structured header - field), white space characters, including folding white space, and - comments can be freely inserted between any syntactic tokens. This - allows many complex forms that have proven difficult for some - implementations to parse. - - Another key difference between the obsolete and the current syntax is - that the rule in section 3.2.3 regarding lines composed entirely of - white space in comments and folding white space does not apply. See - the discussion of folding white space in section 4.2 below. - - Finally, certain characters that were formerly allowed in messages - appear in this section. The NUL character (ASCII value 0) was once - allowed, but is no longer for compatibility reasons. CR and LF were - allowed to appear in messages other than as CRLF; this use is also - shown here. - - Other differences in syntax and semantics are noted in the following - sections. - -4.1. Miscellaneous obsolete tokens - - These syntactic elements are used elsewhere in the obsolete syntax or - in the main syntax. The obs-char and obs-qp elements each add ASCII - value 0. Bare CR and bare LF are added to obs-text and obs-utext. - The period character is added to obs-phrase. The obs-phrase-list - provides for "empty" elements in a comma-separated list of phrases. - - Note: The "period" (or "full stop") character (".") in obs-phrase is - not a form that was allowed in earlier versions of this or any other - standard. Period (nor any other character from specials) was not - allowed in phrase because it introduced a parsing difficulty - distinguishing between phrases and portions of an addr-spec (see - section 4.4). It appears here because the period character is - currently used in many messages in the display-name portion of - addresses, especially for initials in names, and therefore must be - interpreted properly. In the future, period may appear in the - regular syntax of phrase. - -obs-qp = "\" (%d0-127) - -obs-text = *LF *CR *(obs-char *LF *CR) - - - -Resnick Standards Track [Page 30] - -RFC 2822 Internet Message Format April 2001 - - -obs-char = %d0-9 / %d11 / ; %d0-127 except CR and - %d12 / %d14-127 ; LF - -obs-utext = obs-text - -obs-phrase = word *(word / "." / CFWS) - -obs-phrase-list = phrase / 1*([phrase] [CFWS] "," [CFWS]) [phrase] - - Bare CR and bare LF appear in messages with two different meanings. - In many cases, bare CR or bare LF are used improperly instead of CRLF - to indicate line separators. In other cases, bare CR and bare LF are - used simply as ASCII control characters with their traditional ASCII - meanings. - -4.2. Obsolete folding white space - - In the obsolete syntax, any amount of folding white space MAY be - inserted where the obs-FWS rule is allowed. This creates the - possibility of having two consecutive "folds" in a line, and - therefore the possibility that a line which makes up a folded header - field could be composed entirely of white space. - - obs-FWS = 1*WSP *(CRLF 1*WSP) - -4.3. Obsolete Date and Time - - The syntax for the obsolete date format allows a 2 digit year in the - date field and allows for a list of alphabetic time zone - specifications that were used in earlier versions of this standard. - It also permits comments and folding white space between many of the - tokens. - -obs-day-of-week = [CFWS] day-name [CFWS] - -obs-year = [CFWS] 2*DIGIT [CFWS] - -obs-month = CFWS month-name CFWS - -obs-day = [CFWS] 1*2DIGIT [CFWS] - -obs-hour = [CFWS] 2DIGIT [CFWS] - -obs-minute = [CFWS] 2DIGIT [CFWS] - -obs-second = [CFWS] 2DIGIT [CFWS] - -obs-zone = "UT" / "GMT" / ; Universal Time - - - -Resnick Standards Track [Page 31] - -RFC 2822 Internet Message Format April 2001 - - - ; North American UT - ; offsets - "EST" / "EDT" / ; Eastern: - 5/ - 4 - "CST" / "CDT" / ; Central: - 6/ - 5 - "MST" / "MDT" / ; Mountain: - 7/ - 6 - "PST" / "PDT" / ; Pacific: - 8/ - 7 - - %d65-73 / ; Military zones - "A" - %d75-90 / ; through "I" and "K" - %d97-105 / ; through "Z", both - %d107-122 ; upper and lower case - - Where a two or three digit year occurs in a date, the year is to be - interpreted as follows: If a two digit year is encountered whose - value is between 00 and 49, the year is interpreted by adding 2000, - ending up with a value between 2000 and 2049. If a two digit year is - encountered with a value between 50 and 99, or any three digit year - is encountered, the year is interpreted by adding 1900. - - In the obsolete time zone, "UT" and "GMT" are indications of - "Universal Time" and "Greenwich Mean Time" respectively and are both - semantically identical to "+0000". - - The remaining three character zones are the US time zones. The first - letter, "E", "C", "M", or "P" stands for "Eastern", "Central", - "Mountain" and "Pacific". The second letter is either "S" for - "Standard" time, or "D" for "Daylight" (or summer) time. Their - interpretations are as follows: - - EDT is semantically equivalent to -0400 - EST is semantically equivalent to -0500 - CDT is semantically equivalent to -0500 - CST is semantically equivalent to -0600 - MDT is semantically equivalent to -0600 - MST is semantically equivalent to -0700 - PDT is semantically equivalent to -0700 - PST is semantically equivalent to -0800 - - The 1 character military time zones were defined in a non-standard - way in [RFC822] and are therefore unpredictable in their meaning. - The original definitions of the military zones "A" through "I" are - equivalent to "+0100" through "+0900" respectively; "K", "L", and "M" - are equivalent to "+1000", "+1100", and "+1200" respectively; "N" - through "Y" are equivalent to "-0100" through "-1200" respectively; - and "Z" is equivalent to "+0000". However, because of the error in - [RFC822], they SHOULD all be considered equivalent to "-0000" unless - there is out-of-band information confirming their meaning. - - - - -Resnick Standards Track [Page 32] - -RFC 2822 Internet Message Format April 2001 - - - Other multi-character (usually between 3 and 5) alphabetic time zones - have been used in Internet messages. Any such time zone whose - meaning is not known SHOULD be considered equivalent to "-0000" - unless there is out-of-band information confirming their meaning. - -4.4. Obsolete Addressing - - There are three primary differences in addressing. First, mailbox - addresses were allowed to have a route portion before the addr-spec - when enclosed in "<" and ">". The route is simply a comma-separated - list of domain names, each preceded by "@", and the list terminated - by a colon. Second, CFWS were allowed between the period-separated - elements of local-part and domain (i.e., dot-atom was not used). In - addition, local-part is allowed to contain quoted-string in addition - to just atom. Finally, mailbox-list and address-list were allowed to - have "null" members. That is, there could be two or more commas in - such a list with nothing in between them. - -obs-angle-addr = [CFWS] "<" [obs-route] addr-spec ">" [CFWS] - -obs-route = [CFWS] obs-domain-list ":" [CFWS] - -obs-domain-list = "@" domain *(*(CFWS / "," ) [CFWS] "@" domain) - -obs-local-part = word *("." word) - -obs-domain = atom *("." atom) - -obs-mbox-list = 1*([mailbox] [CFWS] "," [CFWS]) [mailbox] - -obs-addr-list = 1*([address] [CFWS] "," [CFWS]) [address] - - When interpreting addresses, the route portion SHOULD be ignored. - -4.5. Obsolete header fields - - Syntactically, the primary difference in the obsolete field syntax is - that it allows multiple occurrences of any of the fields and they may - occur in any order. Also, any amount of white space is allowed - before the ":" at the end of the field name. - -obs-fields = *(obs-return / - obs-received / - obs-orig-date / - obs-from / - obs-sender / - obs-reply-to / - obs-to / - - - -Resnick Standards Track [Page 33] - -RFC 2822 Internet Message Format April 2001 - - - obs-cc / - obs-bcc / - obs-message-id / - obs-in-reply-to / - obs-references / - obs-subject / - obs-comments / - obs-keywords / - obs-resent-date / - obs-resent-from / - obs-resent-send / - obs-resent-rply / - obs-resent-to / - obs-resent-cc / - obs-resent-bcc / - obs-resent-mid / - obs-optional) - - Except for destination address fields (described in section 4.5.3), - the interpretation of multiple occurrences of fields is unspecified. - Also, the interpretation of trace fields and resent fields which do - not occur in blocks prepended to the message is unspecified as well. - Unless otherwise noted in the following sections, interpretation of - other fields is identical to the interpretation of their non-obsolete - counterparts in section 3. - -4.5.1. Obsolete origination date field - -obs-orig-date = "Date" *WSP ":" date-time CRLF - -4.5.2. Obsolete originator fields - -obs-from = "From" *WSP ":" mailbox-list CRLF - -obs-sender = "Sender" *WSP ":" mailbox CRLF - -obs-reply-to = "Reply-To" *WSP ":" mailbox-list CRLF - -4.5.3. Obsolete destination address fields - -obs-to = "To" *WSP ":" address-list CRLF - -obs-cc = "Cc" *WSP ":" address-list CRLF - -obs-bcc = "Bcc" *WSP ":" (address-list / [CFWS]) CRLF - - - - - - -Resnick Standards Track [Page 34] - -RFC 2822 Internet Message Format April 2001 - - - When multiple occurrences of destination address fields occur in a - message, they SHOULD be treated as if the address-list in the first - occurrence of the field is combined with the address lists of the - subsequent occurrences by adding a comma and concatenating. - -4.5.4. Obsolete identification fields - - The obsolete "In-Reply-To:" and "References:" fields differ from the - current syntax in that they allow phrase (words or quoted strings) to - appear. The obsolete forms of the left and right sides of msg-id - allow interspersed CFWS, making them syntactically identical to - local-part and domain respectively. - -obs-message-id = "Message-ID" *WSP ":" msg-id CRLF - -obs-in-reply-to = "In-Reply-To" *WSP ":" *(phrase / msg-id) CRLF - -obs-references = "References" *WSP ":" *(phrase / msg-id) CRLF - -obs-id-left = local-part - -obs-id-right = domain - - For purposes of interpretation, the phrases in the "In-Reply-To:" and - "References:" fields are ignored. - - Semantically, none of the optional CFWS surrounding the local-part - and the domain are part of the obs-id-left and obs-id-right - respectively. - -4.5.5. Obsolete informational fields - -obs-subject = "Subject" *WSP ":" unstructured CRLF - -obs-comments = "Comments" *WSP ":" unstructured CRLF - -obs-keywords = "Keywords" *WSP ":" obs-phrase-list CRLF - -4.5.6. Obsolete resent fields - - The obsolete syntax adds a "Resent-Reply-To:" field, which consists - of the field name, the optional comments and folding white space, the - colon, and a comma separated list of addresses. - -obs-resent-from = "Resent-From" *WSP ":" mailbox-list CRLF - -obs-resent-send = "Resent-Sender" *WSP ":" mailbox CRLF - - - - -Resnick Standards Track [Page 35] - -RFC 2822 Internet Message Format April 2001 - - -obs-resent-date = "Resent-Date" *WSP ":" date-time CRLF - -obs-resent-to = "Resent-To" *WSP ":" address-list CRLF - -obs-resent-cc = "Resent-Cc" *WSP ":" address-list CRLF - -obs-resent-bcc = "Resent-Bcc" *WSP ":" - (address-list / [CFWS]) CRLF - -obs-resent-mid = "Resent-Message-ID" *WSP ":" msg-id CRLF - -obs-resent-rply = "Resent-Reply-To" *WSP ":" address-list CRLF - - As with other resent fields, the "Resent-Reply-To:" field is to be - treated as trace information only. - -4.5.7. Obsolete trace fields - - The obs-return and obs-received are again given here as template - definitions, just as return and received are in section 3. Their - full syntax is given in [RFC2821]. - -obs-return = "Return-Path" *WSP ":" path CRLF - -obs-received = "Received" *WSP ":" name-val-list CRLF - -obs-path = obs-angle-addr - -4.5.8. Obsolete optional fields - -obs-optional = field-name *WSP ":" unstructured CRLF - -5. Security Considerations - - Care needs to be taken when displaying messages on a terminal or - terminal emulator. Powerful terminals may act on escape sequences - and other combinations of ASCII control characters with a variety of - consequences. They can remap the keyboard or permit other - modifications to the terminal which could lead to denial of service - or even damaged data. They can trigger (sometimes programmable) - answerback messages which can allow a message to cause commands to be - issued on the recipient's behalf. They can also effect the operation - of terminal attached devices such as printers. Message viewers may - wish to strip potentially dangerous terminal escape sequences from - the message prior to display. However, other escape sequences appear - in messages for useful purposes (cf. [RFC2045, RFC2046, RFC2047, - RFC2048, RFC2049, ISO2022]) and therefore should not be stripped - indiscriminately. - - - -Resnick Standards Track [Page 36] - -RFC 2822 Internet Message Format April 2001 - - - Transmission of non-text objects in messages raises additional - security issues. These issues are discussed in [RFC2045, RFC2046, - RFC2047, RFC2048, RFC2049]. - - Many implementations use the "Bcc:" (blind carbon copy) field - described in section 3.6.3 to facilitate sending messages to - recipients without revealing the addresses of one or more of the - addressees to the other recipients. Mishandling this use of "Bcc:" - has implications for confidential information that might be revealed, - which could eventually lead to security problems through knowledge of - even the existence of a particular mail address. For example, if - using the first method described in section 3.6.3, where the "Bcc:" - line is removed from the message, blind recipients have no explicit - indication that they have been sent a blind copy, except insofar as - their address does not appear in the message header. Because of - this, one of the blind addressees could potentially send a reply to - all of the shown recipients and accidentally reveal that the message - went to the blind recipient. When the second method from section - 3.6.3 is used, the blind recipient's address appears in the "Bcc:" - field of a separate copy of the message. If the "Bcc:" field sent - contains all of the blind addressees, all of the "Bcc:" recipients - will be seen by each "Bcc:" recipient. Even if a separate message is - sent to each "Bcc:" recipient with only the individual's address, - implementations still need to be careful to process replies to the - message as per section 3.6.3 so as not to accidentally reveal the - blind recipient to other recipients. - -6. Bibliography - - [ASCII] American National Standards Institute (ANSI), Coded - Character Set - 7-Bit American National Standard Code for - Information Interchange, ANSI X3.4, 1986. - - [ISO2022] International Organization for Standardization (ISO), - Information processing - ISO 7-bit and 8-bit coded - character sets - Code extension techniques, Third edition - - 1986-05-01, ISO 2022, 1986. - - [RFC822] Crocker, D., "Standard for the Format of ARPA Internet - Text Messages", RFC 822, August 1982. - - [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part One: Format of Internet Message - Bodies", RFC 2045, November 1996. - - [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part Two: Media Types", RFC 2046, - November 1996. - - - -Resnick Standards Track [Page 37] - -RFC 2822 Internet Message Format April 2001 - - - [RFC2047] Moore, K., "Multipurpose Internet Mail Extensions (MIME) - Part Three: Message Header Extensions for Non-ASCII Text", - RFC 2047, November 1996. - - [RFC2048] Freed, N., Klensin, J. and J. Postel, "Multipurpose - Internet Mail Extensions (MIME) Part Four: Format of - Internet Message Bodies", RFC 2048, November 1996. - - [RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part Five: Conformance Criteria and - Examples", RFC 2049, November 1996. - - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, March 1997. - - [RFC2234] Crocker, D., Editor, and P. Overell, "Augmented BNF for - Syntax Specifications: ABNF", RFC 2234, November 1997. - - [RFC2821] Klensin, J., Editor, "Simple Mail Transfer Protocol", RFC - 2821, March 2001. - - [STD3] Braden, R., "Host Requirements", STD 3, RFC 1122 and RFC - 1123, October 1989. - - [STD12] Mills, D., "Network Time Protocol", STD 12, RFC 1119, - September 1989. - - [STD13] Mockapetris, P., "Domain Name System", STD 13, RFC 1034 - and RFC 1035, November 1987. - - [STD14] Partridge, C., "Mail Routing and the Domain System", STD - 14, RFC 974, January 1986. - -7. Editor's Address - - Peter W. Resnick - QUALCOMM Incorporated - 5775 Morehouse Drive - San Diego, CA 92121-1714 - USA - - Phone: +1 858 651 4478 - Fax: +1 858 651 1102 - EMail: presnick@qualcomm.com - - - - - - - -Resnick Standards Track [Page 38] - -RFC 2822 Internet Message Format April 2001 - - -8. Acknowledgements - - Many people contributed to this document. They included folks who - participated in the Detailed Revision and Update of Messaging - Standards (DRUMS) Working Group of the Internet Engineering Task - Force (IETF), the chair of DRUMS, the Area Directors of the IETF, and - people who simply sent their comments in via e-mail. The editor is - deeply indebted to them all and thanks them sincerely. The below - list includes everyone who sent e-mail concerning this document. - Hopefully, everyone who contributed is named here: - - Matti Aarnio Barry Finkel Larry Masinter - Tanaka Akira Erik Forsberg Denis McKeon - Russ Allbery Chuck Foster William P McQuillan - Eric Allman Paul Fox Alexey Melnikov - Harald Tveit Alvestrand Klaus M. Frank Perry E. Metzger - Ran Atkinson Ned Freed Steven Miller - Jos Backus Jochen Friedrich Keith Moore - Bruce Balden Randall C. Gellens John Gardiner Myers - Dave Barr Sukvinder Singh Gill Chris Newman - Alan Barrett Tim Goodwin John W. Noerenberg - John Beck Philip Guenther Eric Norman - J. Robert von Behren Tony Hansen Mike O'Dell - Jos den Bekker John Hawkinson Larry Osterman - D. J. Bernstein Philip Hazel Paul Overell - James Berriman Kai Henningsen Jacob Palme - Norbert Bollow Robert Herriot Michael A. Patton - Raj Bose Paul Hethmon Uzi Paz - Antony Bowesman Jim Hill Michael A. Quinlan - Scott Bradner Paul E. Hoffman Eric S. Raymond - Randy Bush Steve Hole Sam Roberts - Tom Byrer Kari Hurtta Hugh Sasse - Bruce Campbell Marco S. Hyman Bart Schaefer - Larry Campbell Ofer Inbar Tom Scola - W. J. Carpenter Olle Jarnefors Wolfgang Segmuller - Michael Chapman Kevin Johnson Nick Shelness - Richard Clayton Sudish Joseph John Stanley - Maurizio Codogno Maynard Kang Einar Stefferud - Jim Conklin Prabhat Keni Jeff Stephenson - R. Kelley Cook John C. Klensin Bernard Stern - Steve Coya Graham Klyne Peter Sylvester - Mark Crispin Brad Knowles Mark Symons - Dave Crocker Shuhei Kobayashi Eric Thomas - Matt Curtin Peter Koch Lee Thompson - Michael D'Errico Dan Kohn Karel De Vriendt - Cyrus Daboo Christian Kuhtz Matthew Wall - Jutta Degener Anand Kumria Rolf Weber - Mark Delany Steen Larsen Brent B. Welch - - - -Resnick Standards Track [Page 39] - -RFC 2822 Internet Message Format April 2001 - - - Steve Dorner Eliot Lear Dan Wing - Harold A. Driscoll Barry Leiba Jack De Winter - Michael Elkins Jay Levitt Gregory J. Woodhouse - Robert Elz Lars-Johan Liman Greg A. Woods - Johnny Eriksson Charles Lindsey Kazu Yamamoto - Erik E. Fair Pete Loshin Alain Zahm - Roger Fajman Simon Lyall Jamie Zawinski - Patrik Faltstrom Bill Manning Timothy S. Zurcher - Claus Andre Farber John Martin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Resnick Standards Track [Page 40] - -RFC 2822 Internet Message Format April 2001 - - -Appendix A. Example messages - - This section presents a selection of messages. These are intended to - assist in the implementation of this standard, but should not be - taken as normative; that is to say, although the examples in this - section were carefully reviewed, if there happens to be a conflict - between these examples and the syntax described in sections 3 and 4 - of this document, the syntax in those sections is to be taken as - correct. - - Messages are delimited in this section between lines of "----". The - "----" lines are not part of the message itself. - -A.1. Addressing examples - - The following are examples of messages that might be sent between two - individuals. - -A.1.1. A message from one person to another with simple addressing - - This could be called a canonical message. It has a single author, - John Doe, a single recipient, Mary Smith, a subject, the date, a - message identifier, and a textual message in the body. - ----- -From: John Doe -To: Mary Smith -Subject: Saying Hello -Date: Fri, 21 Nov 1997 09:55:06 -0600 -Message-ID: <1234@local.machine.example> - -This is a message just to say hello. -So, "Hello". ----- - - - - - - - - - - - - - - - - - -Resnick Standards Track [Page 41] - -RFC 2822 Internet Message Format April 2001 - - - If John's secretary Michael actually sent the message, though John - was the author and replies to this message should go back to him, the - sender field would be used: - ----- -From: John Doe -Sender: Michael Jones -To: Mary Smith -Subject: Saying Hello -Date: Fri, 21 Nov 1997 09:55:06 -0600 -Message-ID: <1234@local.machine.example> - -This is a message just to say hello. -So, "Hello". ----- - -A.1.2. Different types of mailboxes - - This message includes multiple addresses in the destination fields - and also uses several different forms of addresses. - ----- -From: "Joe Q. Public" -To: Mary Smith , jdoe@example.org, Who? -Cc: , "Giant; \"Big\" Box" -Date: Tue, 1 Jul 2003 10:52:37 +0200 -Message-ID: <5678.21-Nov-1997@example.com> - -Hi everyone. ----- - - Note that the display names for Joe Q. Public and Giant; "Big" Box - needed to be enclosed in double-quotes because the former contains - the period and the latter contains both semicolon and double-quote - characters (the double-quote characters appearing as quoted-pair - construct). Conversely, the display name for Who? could appear - without them because the question mark is legal in an atom. Notice - also that jdoe@example.org and boss@nil.test have no display names - associated with them at all, and jdoe@example.org uses the simpler - address form without the angle brackets. - - - - - - - - - - - -Resnick Standards Track [Page 42] - -RFC 2822 Internet Message Format April 2001 - - -A.1.3. Group addresses - ----- -From: Pete -To: A Group:Chris Jones ,joe@where.test,John ; -Cc: Undisclosed recipients:; -Date: Thu, 13 Feb 1969 23:32:54 -0330 -Message-ID: - -Testing. ----- - - In this message, the "To:" field has a single group recipient named A - Group which contains 3 addresses, and a "Cc:" field with an empty - group recipient named Undisclosed recipients. - -A.2. Reply messages - - The following is a series of three messages that make up a - conversation thread between John and Mary. John firsts sends a - message to Mary, Mary then replies to John's message, and then John - replies to Mary's reply message. - - Note especially the "Message-ID:", "References:", and "In-Reply-To:" - fields in each message. - ----- -From: John Doe -To: Mary Smith -Subject: Saying Hello -Date: Fri, 21 Nov 1997 09:55:06 -0600 -Message-ID: <1234@local.machine.example> - -This is a message just to say hello. -So, "Hello". ----- - - - - - - - - - - - - - - - -Resnick Standards Track [Page 43] - -RFC 2822 Internet Message Format April 2001 - - - When sending replies, the Subject field is often retained, though - prepended with "Re: " as described in section 3.6.5. - ----- -From: Mary Smith -To: John Doe -Reply-To: "Mary Smith: Personal Account" -Subject: Re: Saying Hello -Date: Fri, 21 Nov 1997 10:01:10 -0600 -Message-ID: <3456@example.net> -In-Reply-To: <1234@local.machine.example> -References: <1234@local.machine.example> - -This is a reply to your hello. ----- - - Note the "Reply-To:" field in the above message. When John replies - to Mary's message above, the reply should go to the address in the - "Reply-To:" field instead of the address in the "From:" field. - ----- -To: "Mary Smith: Personal Account" -From: John Doe -Subject: Re: Saying Hello -Date: Fri, 21 Nov 1997 11:00:00 -0600 -Message-ID: -In-Reply-To: <3456@example.net> -References: <1234@local.machine.example> <3456@example.net> - -This is a reply to your reply. ----- - -A.3. Resent messages - - Start with the message that has been used as an example several - times: - ----- -From: John Doe -To: Mary Smith -Subject: Saying Hello -Date: Fri, 21 Nov 1997 09:55:06 -0600 -Message-ID: <1234@local.machine.example> - -This is a message just to say hello. -So, "Hello". ----- - - - - -Resnick Standards Track [Page 44] - -RFC 2822 Internet Message Format April 2001 - - - Say that Mary, upon receiving this message, wishes to send a copy of - the message to Jane such that (a) the message would appear to have - come straight from John; (b) if Jane replies to the message, the - reply should go back to John; and (c) all of the original - information, like the date the message was originally sent to Mary, - the message identifier, and the original addressee, is preserved. In - this case, resent fields are prepended to the message: - ----- -Resent-From: Mary Smith -Resent-To: Jane Brown -Resent-Date: Mon, 24 Nov 1997 14:22:01 -0800 -Resent-Message-ID: <78910@example.net> -From: John Doe -To: Mary Smith -Subject: Saying Hello -Date: Fri, 21 Nov 1997 09:55:06 -0600 -Message-ID: <1234@local.machine.example> - -This is a message just to say hello. -So, "Hello". ----- - - If Jane, in turn, wished to resend this message to another person, - she would prepend her own set of resent header fields to the above - and send that. - - - - - - - - - - - - - - - - - - - - - - - - - -Resnick Standards Track [Page 45] - -RFC 2822 Internet Message Format April 2001 - - -A.4. Messages with trace fields - - As messages are sent through the transport system as described in - [RFC2821], trace fields are prepended to the message. The following - is an example of what those trace fields might look like. Note that - there is some folding white space in the first one since these lines - can be long. - ----- -Received: from x.y.test - by example.net - via TCP - with ESMTP - id ABC12345 - for ; 21 Nov 1997 10:05:43 -0600 -Received: from machine.example by x.y.test; 21 Nov 1997 10:01:22 -0600 -From: John Doe -To: Mary Smith -Subject: Saying Hello -Date: Fri, 21 Nov 1997 09:55:06 -0600 -Message-ID: <1234@local.machine.example> - -This is a message just to say hello. -So, "Hello". ----- - - - - - - - - - - - - - - - - - - - - - - - - - - -Resnick Standards Track [Page 46] - -RFC 2822 Internet Message Format April 2001 - - -A.5. White space, comments, and other oddities - - White space, including folding white space, and comments can be - inserted between many of the tokens of fields. Taking the example - from A.1.3, white space and comments can be inserted into all of the - fields. - ----- -From: Pete(A wonderful \) chap) -To:A Group(Some people) - :Chris Jones , - joe@example.org, - John (my dear friend); (the end of the group) -Cc:(Empty list)(start)Undisclosed recipients :(nobody(that I know)) ; -Date: Thu, - 13 - Feb - 1969 - 23:32 - -0330 (Newfoundland Time) -Message-ID: - -Testing. ----- - - The above example is aesthetically displeasing, but perfectly legal. - Note particularly (1) the comments in the "From:" field (including - one that has a ")" character appearing as part of a quoted-pair); (2) - the white space absent after the ":" in the "To:" field as well as - the comment and folding white space after the group name, the special - character (".") in the comment in Chris Jones's address, and the - folding white space before and after "joe@example.org,"; (3) the - multiple and nested comments in the "Cc:" field as well as the - comment immediately following the ":" after "Cc"; (4) the folding - white space (but no comments except at the end) and the missing - seconds in the time of the date field; and (5) the white space before - (but not within) the identifier in the "Message-ID:" field. - -A.6. Obsoleted forms - - The following are examples of obsolete (that is, the "MUST NOT - generate") syntactic elements described in section 4 of this - document. - - - - - - - - -Resnick Standards Track [Page 47] - -RFC 2822 Internet Message Format April 2001 - - -A.6.1. Obsolete addressing - - Note in the below example the lack of quotes around Joe Q. Public, - the route that appears in the address for Mary Smith, the two commas - that appear in the "To:" field, and the spaces that appear around the - "." in the jdoe address. - ----- -From: Joe Q. Public -To: Mary Smith <@machine.tld:mary@example.net>, , jdoe@test . example -Date: Tue, 1 Jul 2003 10:52:37 +0200 -Message-ID: <5678.21-Nov-1997@example.com> - -Hi everyone. ----- - -A.6.2. Obsolete dates - - The following message uses an obsolete date format, including a non- - numeric time zone and a two digit year. Note that although the - day-of-week is missing, that is not specific to the obsolete syntax; - it is optional in the current syntax as well. - ----- -From: John Doe -To: Mary Smith -Subject: Saying Hello -Date: 21 Nov 97 09:55:06 GMT -Message-ID: <1234@local.machine.example> - -This is a message just to say hello. -So, "Hello". ----- - -A.6.3. Obsolete white space and comments - - White space and comments can appear between many more elements than - in the current syntax. Also, folding lines that are made up entirely - of white space are legal. - - - - - - - - - - - - -Resnick Standards Track [Page 48] - -RFC 2822 Internet Message Format April 2001 - - ----- -From : John Doe -To : Mary Smith -__ - -Subject : Saying Hello -Date : Fri, 21 Nov 1997 09(comment): 55 : 06 -0600 -Message-ID : <1234 @ local(blah) .machine .example> - -This is a message just to say hello. -So, "Hello". ----- - - Note especially the second line of the "To:" field. It starts with - two space characters. (Note that "__" represent blank spaces.) - Therefore, it is considered part of the folding as described in - section 4.2. Also, the comments and white space throughout - addresses, dates, and message identifiers are all part of the - obsolete syntax. - -Appendix B. Differences from earlier standards - - This appendix contains a list of changes that have been made in the - Internet Message Format from earlier standards, specifically [RFC822] - and [STD3]. Items marked with an asterisk (*) below are items which - appear in section 4 of this document and therefore can no longer be - generated. - - 1. Period allowed in obsolete form of phrase. - 2. ABNF moved out of document to [RFC2234]. - 3. Four or more digits allowed for year. - 4. Header field ordering (and lack thereof) made explicit. - 5. Encrypted header field removed. - 6. Received syntax loosened to allow any token/value pair. - 7. Specifically allow and give meaning to "-0000" time zone. - 8. Folding white space is not allowed between every token. - 9. Requirement for destinations removed. - 10. Forwarding and resending redefined. - 11. Extension header fields no longer specifically called out. - 12. ASCII 0 (null) removed.* - 13. Folding continuation lines cannot contain only white space.* - 14. Free insertion of comments not allowed in date.* - 15. Non-numeric time zones not allowed.* - 16. Two digit years not allowed.* - 17. Three digit years interpreted, but not allowed for generation. - 18. Routes in addresses not allowed.* - 19. CFWS within local-parts and domains not allowed.* - 20. Empty members of address lists not allowed.* - - - -Resnick Standards Track [Page 49] - -RFC 2822 Internet Message Format April 2001 - - - 21. Folding white space between field name and colon not allowed.* - 22. Comments between field name and colon not allowed. - 23. Tightened syntax of in-reply-to and references.* - 24. CFWS within msg-id not allowed.* - 25. Tightened semantics of resent fields as informational only. - 26. Resent-Reply-To not allowed.* - 27. No multiple occurrences of fields (except resent and received).* - 28. Free CR and LF not allowed.* - 29. Routes in return path not allowed.* - 30. Line length limits specified. - 31. Bcc more clearly specified. - -Appendix C. Notices - - Intellectual Property - - The IETF takes no position regarding the validity or scope of any - intellectual property or other rights that might be claimed to - pertain to the implementation or use of the technology described in - this document or the extent to which any license under such rights - might or might not be available; neither does it represent that it - has made any effort to identify any such rights. Information on the - IETF's procedures with respect to rights in standards-track and - standards-related documentation can be found in BCP-11. Copies of - claims of rights made available for publication and any assurances of - licenses to be made available, or the result of an attempt made to - obtain a general license or permission for the use of such - proprietary rights by implementors or users of this specification can - be obtained from the IETF Secretariat. - - - - - - - - - - - - - - - - - - - - - - -Resnick Standards Track [Page 50] - -RFC 2822 Internet Message Format April 2001 - - -Full Copyright Statement - - Copyright (C) The Internet Society (2001). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - - - - - - - - - - - - - -Resnick Standards Track [Page 51] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc3156.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc3156.txt deleted file mode 100644 index c8ca1d5f..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc3156.txt +++ /dev/null @@ -1,842 +0,0 @@ - - - - - -Network Working Group M. Elkins -Request for Comments: 3156 Network Associates, Inc. -Updates: 2015 D. Del Torto -Category: Standards Track CryptoRights Foundation - R. Levien - University of California at Berkeley - T. Roessler - August 2001 - - - MIME Security with OpenPGP - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (2001). All Rights Reserved. - -Abstract - - This document describes how the OpenPGP Message Format can be used to - provide privacy and authentication using the Multipurpose Internet - Mail Extensions (MIME) security content types described in RFC 1847. - -1. Introduction - - Work on integrating PGP (Pretty Good Privacy) with MIME [3] - (including the since withdrawn "application/pgp" content type) prior - to RFC 2015 suffered from a number of problems, the most significant - of which is the inability to recover signed message bodies without - parsing data structures specific to PGP. RFC 2015 makes use of the - elegant solution proposed in RFC 1847, which defines security - multipart formats for MIME. The security multiparts clearly separate - the signed message body from the signature, and have a number of - other desirable properties. This document revises RFC 2015 to adopt - the integration of PGP and MIME to the needs which emerged during the - work on the OpenPGP specification. - - This document defines three content types for implementing security - and privacy with OpenPGP: "application/pgp-encrypted", - "application/pgp-signature" and "application/pgp-keys". - - - - -Elkins, et al. Standards Track [Page 1] - -RFC 3156 MIME Security with OpenPGP August 2001 - - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", - "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this - document are to be interpreted as described in RFC 2119. - -2. OpenPGP data formats - - OpenPGP implementations can generate either ASCII armor (described in - [1]) or 8-bit binary output when encrypting data, generating a - digital signature, or extracting public key data. The ASCII armor - output is the REQUIRED method for data transfer. This allows those - users who do not have the means to interpret the formats described in - this document to be able to extract and use the OpenPGP information - in the message. - - When the amount of data to be transmitted requires that it be sent in - many parts, the MIME message/partial mechanism SHOULD be used rather - than the multi-part ASCII armor OpenPGP format. - -3. Content-Transfer-Encoding restrictions - - Multipart/signed and multipart/encrypted are to be treated by agents - as opaque, meaning that the data is not to be altered in any way [2], - [7]. However, many existing mail gateways will detect if the next - hop does not support MIME or 8-bit data and perform conversion to - either Quoted-Printable or Base64. This presents serious problems - for multipart/signed, in particular, where the signature is - invalidated when such an operation occurs. For this reason all data - signed according to this protocol MUST be constrained to 7 bits (8- - bit data MUST be encoded using either Quoted-Printable or Base64). - Note that this also includes the case where a signed object is also - encrypted (see section 6). This restriction will increase the - likelihood that the signature will be valid upon receipt. - - Additionally, implementations MUST make sure that no trailing - whitespace is present after the MIME encoding has been applied. - - Note: In most cases, trailing whitespace can either be removed, or - protected by applying an appropriate content-transfer-encoding. - However, special care must be taken when any header lines - either - in MIME entity headers, or in embedded RFC 822 headers - are - present which only consist of whitespace: Such lines must be - removed entirely, since replacing them by empty lines would turn - them into header delimiters, and change the semantics of the - message. The restrictions on whitespace are necessary in order to - make the hash calculated invariant under the text and binary mode - signature mechanisms provided by OpenPGP [1]. Also, they help to - avoid compatibility problems with PGP implementations which - predate the OpenPGP specification. - - - -Elkins, et al. Standards Track [Page 2] - -RFC 3156 MIME Security with OpenPGP August 2001 - - - Note: If any line begins with the string "From ", it is strongly - suggested that either the Quoted-Printable or Base64 MIME encoding - be applied. If Quoted-Printable is used, at least one of the - characters in the string should be encoded using the hexadecimal - coding rule. This is because many mail transfer and delivery - agents treat "From " (the word "from" followed immediately by a - space character) as the start of a new message and thus insert a - right angle-bracket (>) in front of any line beginning with - "From " to distinguish this case, invalidating the signature. - - Data that is ONLY to be encrypted is allowed to contain 8-bit - characters and trailing whitespace and therefore need not undergo the - conversion to a 7bit format, and the stripping of whitespace. - - Implementor's note: It cannot be stressed enough that applications - using this standard follow MIME's suggestion that you "be - conservative in what you generate, and liberal in what you - accept." In this particular case it means it would be wise for an - implementation to accept messages with any content-transfer- - encoding, but restrict generation to the 7-bit format required by - this memo. This will allow future compatibility in the event the - Internet SMTP framework becomes 8-bit friendly. - -4. OpenPGP encrypted data - - Before OpenPGP encryption, the data is written in MIME canonical - format (body and headers). - - OpenPGP encrypted data is denoted by the "multipart/encrypted" - content type, described in [2], and MUST have a "protocol" parameter - value of "application/pgp-encrypted". Note that the value of the - parameter MUST be enclosed in quotes. - - The multipart/encrypted MIME body MUST consist of exactly two body - parts, the first with content type "application/pgp-encrypted". This - body contains the control information. A message complying with this - standard MUST contain a "Version: 1" field in this body. Since the - OpenPGP packet format contains all other information necessary for - decrypting, no other information is required here. - - The second MIME body part MUST contain the actual encrypted data. It - MUST be labeled with a content type of "application/octet-stream". - - Example message: - - From: Michael Elkins - To: Michael Elkins - Mime-Version: 1.0 - - - -Elkins, et al. Standards Track [Page 3] - -RFC 3156 MIME Security with OpenPGP August 2001 - - - Content-Type: multipart/encrypted; boundary=foo; - protocol="application/pgp-encrypted" - - --foo - Content-Type: application/pgp-encrypted - - Version: 1 - - --foo - Content-Type: application/octet-stream - - -----BEGIN PGP MESSAGE----- - Version: 2.6.2 - - hIwDY32hYGCE8MkBA/wOu7d45aUxF4Q0RKJprD3v5Z9K1YcRJ2fve87lMlDlx4Oj - eW4GDdBfLbJE7VUpp13N19GL8e/AqbyyjHH4aS0YoTk10QQ9nnRvjY8nZL3MPXSZ - g9VGQxFeGqzykzmykU6A26MSMexR4ApeeON6xzZWfo+0yOqAq6lb46wsvldZ96YA - AABH78hyX7YX4uT1tNCWEIIBoqqvCeIMpp7UQ2IzBrXg6GtukS8NxbukLeamqVW3 - 1yt21DYOjuLzcMNe/JNsD9vDVCvOOG3OCi8= - =zzaA - -----END PGP MESSAGE----- - - --foo-- - -5. OpenPGP signed data - - OpenPGP signed messages are denoted by the "multipart/signed" content - type, described in [2], with a "protocol" parameter which MUST have a - value of "application/pgp-signature" (MUST be quoted). - - The "micalg" parameter for the "application/pgp-signature" protocol - MUST contain exactly one hash-symbol of the format "pgp-", where identifies the Message - Integrity Check (MIC) algorithm used to generate the signature. - Hash-symbols are constructed from the text names registered in [1] or - according to the mechanism defined in that document by converting the - text name to lower case and prefixing it with the four characters - "pgp-". - - Currently defined values are "pgp-md5", "pgp-sha1", "pgp-ripemd160", - "pgp-md2", "pgp-tiger192", and "pgp-haval-5-160". - - The multipart/signed body MUST consist of exactly two parts. The - first part contains the signed data in MIME canonical format, - including a set of appropriate content headers describing the data. - - The second body MUST contain the OpenPGP digital signature. It MUST - be labeled with a content type of "application/pgp-signature". - - - -Elkins, et al. Standards Track [Page 4] - -RFC 3156 MIME Security with OpenPGP August 2001 - - - Note: Implementations can either generate "signatures of a - canonical text document" or "signatures of a binary document", as - defined in [1]. The restrictions on the signed material put forth - in section 3 and in this section will make sure that the various - MIC algorithm variants specified in [1] and [5] will all produce - the same result. - - When the OpenPGP digital signature is generated: - - (1) The data to be signed MUST first be converted to its content- - type specific canonical form. For text/plain, this means - conversion to an appropriate character set and conversion of - line endings to the canonical sequence. - - (2) An appropriate Content-Transfer-Encoding is then applied; see - section 3. In particular, line endings in the encoded data - MUST use the canonical sequence where appropriate - (note that the canonical line ending may or may not be present - on the last line of encoded data and MUST NOT be included in - the signature if absent). - - (3) MIME content headers are then added to the body, each ending - with the canonical sequence. - - (4) As described in section 3 of this document, any trailing - whitespace MUST then be removed from the signed material. - - (5) As described in [2], the digital signature MUST be calculated - over both the data to be signed and its set of content headers. - - (6) The signature MUST be generated detached from the signed data - so that the process does not alter the signed data in any way. - - Note: The accepted OpenPGP convention is for signed data to end - with a sequence. Note that the sequence - immediately preceding a MIME boundary delimiter line is considered - to be part of the delimiter in [3], 5.1. Thus, it is not part of - the signed data preceding the delimiter line. An implementation - which elects to adhere to the OpenPGP convention has to make sure - it inserts a pair on the last line of the data to be - signed and transmitted (signed message and transmitted message - MUST be identical). - - Example message: - - From: Michael Elkins - To: Michael Elkins - Mime-Version: 1.0 - - - -Elkins, et al. Standards Track [Page 5] - -RFC 3156 MIME Security with OpenPGP August 2001 - - - Content-Type: multipart/signed; boundary=bar; micalg=pgp-md5; - protocol="application/pgp-signature" - - --bar - & Content-Type: text/plain; charset=iso-8859-1 - & Content-Transfer-Encoding: quoted-printable - & - & =A1Hola! - & - & Did you know that talking to yourself is a sign of senility? - & - & It's generally a good idea to encode lines that begin with - & From=20because some mail transport agents will insert a greater- - & than (>) sign, thus invalidating the signature. - & - & Also, in some cases it might be desirable to encode any =20 - & trailing whitespace that occurs on lines in order to ensure =20 - & that the message signature is not invalidated when passing =20 - & a gateway that modifies such whitespace (like BITNET). =20 - & - & me - - --bar - - Content-Type: application/pgp-signature - - -----BEGIN PGP MESSAGE----- - Version: 2.6.2 - - iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC// - jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq - uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn - HOxEa44b+EI= - =ndaj - -----END PGP MESSAGE----- - - --bar-- - - The "&"s in the previous example indicate the portion of the data - over which the signature was calculated. - - Upon receipt of a signed message, an application MUST: - - (1) Convert line endings to the canonical sequence before - the signature can be verified. This is necessary since the - local MTA may have converted to a local end of line convention. - - - - - -Elkins, et al. Standards Track [Page 6] - -RFC 3156 MIME Security with OpenPGP August 2001 - - - (2) Pass both the signed data and its associated content headers - along with the OpenPGP signature to the signature verification - service. - -6. Encrypted and Signed Data - - Sometimes it is desirable to both digitally sign and then encrypt a - message to be sent. This protocol allows for two methods of - accomplishing this task. - -6.1. RFC 1847 Encapsulation - - In [2], it is stated that the data is first signed as a - multipart/signature body, and then encrypted to form the final - multipart/encrypted body. This is most useful for standard MIME- - compliant message forwarding. - - Example: - - Content-Type: multipart/encrypted; - protocol="application/pgp-encrypted"; boundary=foo - - --foo - Content-Type: application/pgp-encrypted - - Version: 1 - - --foo - Content-Type: application/octet-stream - - -----BEGIN PGP MESSAGE----- - & Content-Type: multipart/signed; micalg=pgp-md5 - & protocol="application/pgp-signature"; boundary=bar - & - & --bar - & Content-Type: text/plain; charset=us-ascii - & - & This message was first signed, and then encrypted. - & - & --bar - & Content-Type: application/pgp-signature - & - & -----BEGIN PGP MESSAGE----- - & Version: 2.6.2 - & - & iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC// - & jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq - & uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn - - - -Elkins, et al. Standards Track [Page 7] - -RFC 3156 MIME Security with OpenPGP August 2001 - - - & HOxEa44b+EI= - & =ndaj - & -----END PGP MESSAGE----- - & - & --bar-- - -----END PGP MESSAGE----- - - --foo-- - - (The text preceded by '&' indicates that it is really encrypted, but - presented as text for clarity.) - -6.2. Combined method - - The OpenPGP packet format [1] describes a method for signing and - encrypting data in a single OpenPGP message. This method is allowed - in order to reduce processing overhead and increase compatibility - with non-MIME implementations of OpenPGP. The resulting data is - formatted as a "multipart/encrypted" object as described in Section - 4. - - Messages which are encrypted and signed in this combined fashion are - REQUIRED to follow the same canonicalization rules as - multipart/signed objects. - - It is explicitly allowed for an agent to decrypt a combined message - and rewrite it as a multipart/signed object using the signature data - embedded in the encrypted version. - -7. Distribution of OpenPGP public keys - - Content-Type: application/pgp-keys - Required parameters: none - Optional parameters: none - - A MIME body part of the content type "application/pgp-keys" contains - ASCII-armored transferable Public Key Packets as defined in [1], - section 10.1. - -8. Security Considerations - - Signatures of a canonical text document as defined in [1] ignore - trailing white space in signed material. Implementations which - choose to use signatures of canonical text documents will not be able - to detect the addition of whitespace in transit. - - See [3], [4] for more information on the security considerations - concerning the underlying protocols. - - - -Elkins, et al. Standards Track [Page 8] - -RFC 3156 MIME Security with OpenPGP August 2001 - - -9. IANA Considerations - - This document defines three media types: "application/pgp-encrypted", - "application/pgp-signature" and "application/pgp-keys". The - following sections specify the IANA registrations for these types. - -9.1. Registration of the application/pgp-encrypted media type - - MIME media type name: application - MIME subtype name: pgp-encrypted - Required parameters: none - Optional parameters: none - - Encoding considerations: - - Currently this media type always consists of a single 7bit text - string. - - Security considerations: - - See Section 8 and RFC 2440 Section 13. - - Interoperability considerations: none - - Published specification: - - This document. - - Additional information: - - Magic number(s): none - File extension(s): none - Macintosh File Type Code(s): none - - Person & email address to contact for further information: - - Michael Elkins - Email: me@cs.hmc.edu - - Intended usage: common - - Author/Change controller: - - Michael Elkins - Email: me@cs.hmc.edu - - - - - - -Elkins, et al. Standards Track [Page 9] - -RFC 3156 MIME Security with OpenPGP August 2001 - - -9.2. Registration of the application/pgp-signature media type - - MIME media type name: application - MIME subtype name: pgp-signature - Required parameters: none - Optional parameters: none - - Encoding considerations: - - The content of this media type always consists of 7bit text. - - Security considerations: - - See Section 8 and RFC 2440 Section 13. - - Interoperability considerations: none - - Published specification: - - RFC 2440 and this document. - - Additional information: - - Magic number(s): none - File extension(s): asc, sig - Macintosh File Type Code(s): pgDS - - Person & email address to contact for further information: - - Michael Elkins - Email: me@cs.hmc.edu - - Intended usage: common - - Author/Change controller: - - Michael Elkins - Email: me@cs.hmc.edu - -9.3. Registration of the application/pgp-keys media type - - MIME media type name: application - MIME subtype name: pgp-keys - Required parameters: none - Optional parameters: none - - - - - - -Elkins, et al. Standards Track [Page 10] - -RFC 3156 MIME Security with OpenPGP August 2001 - - - Encoding considerations: - - The content of this media type always consists of 7bit text. - - Security considerations: - - See Section 8 and RFC 2440 Section 13. - - Interoperability considerations: none - - Published specification: - - RFC 2440 and this document. - - Additional information: - - Magic number(s): none - File extension(s): asc - Macintosh File Type Code(s): none - - Person & email address to contact for further information: - - Michael Elkins - Email: me@cs.hmc.edu - - Intended usage: common - - Author/Change controller: - - Michael Elkins - Email: me@cs.hmc.edu - - - - - - - - - - - - - - - - - - - - -Elkins, et al. Standards Track [Page 11] - -RFC 3156 MIME Security with OpenPGP August 2001 - - -10. Notes - - "PGP" and "Pretty Good Privacy" are registered trademarks of Network - Associates, Inc. - -11. Acknowledgements - - This document relies on the work of the IETF's OpenPGP Working - Group's definitions of the OpenPGP Message Format. The OpenPGP - message format is currently described in RFC 2440 [1]. - - Special thanks are due: to Philip Zimmermann for his original and - ongoing work on PGP; to Charles Breed, Jon Callas and Dave Del Torto - for originally proposing the formation of the OpenPGP Working Group; - and to Steve Schoenfeld for helpful feedback during the draft - process. The authors would also like to thank the engineers at - Pretty Good Privacy, Inc (now Network Associates, Inc), including - Colin Plumb, Hal Finney, Jon Callas, Mark Elrod, Mark Weaver and - Lloyd Chambers, for their technical commentary. - - Additional thanks are due to Jeff Schiller and Derek Atkins for their - continuing support of strong cryptography and PGP freeware at MIT; to - Rodney Thayer of Sable Technology; to John Noerenberg, Steve Dorner - and Laurence Lundblade of the Eudora team at QUALCOMM, Inc; to Bodo - Moeller for proposing the approach followed with respect to trailing - whitespace; to John Gilmore, Hugh Daniel and Fred Ringel (at - Rivertown) and Ian Bell (at Turnpike) for their timely critical - commentary; and to the international members of the IETF's OpenPGP - mailing list, including William Geiger, Lutz Donnerhacke and Kazu - Yamamoto. The idea to use multipart/mixed with multipart/signed has - been attributed to James Galvin. Finally, our gratitude is due to - the many members of the "Cypherpunks," "Coderpunks" and "pgp-users" - mailing lists and the many users - of PGP worldwide for helping keep the path to privacy open. - - - - - - - - - - - - - - - - - -Elkins, et al. Standards Track [Page 12] - -RFC 3156 MIME Security with OpenPGP August 2001 - - -12. Addresses of the Authors and OpenPGP Working Group Chair - - The OpenPGP working group can be contacted via the current chair: - - John W. Noerenberg II - Qualcomm, Inc. - 5775 Morehouse Dr. - San Diego, CA 92121 USA - - Phone: +1 619 658 3510 - EMail: jwn2@qualcomm.com - - The principal authors of this document are: - - Dave Del Torto - CryptoRights Foundation - 80 Alviso Street, Mailstop: CRF - San Francisco, CA 94127 USA - - Phone: +1.415.334.5533, vm: #2 - EMail: ddt@cryptorights.org, ddt@openpgp.net - - - Michael Elkins - Network Associates, Inc. - 3415 S. Sepulveda Blvd Suite 700 - Los Angeles, CA 90034 USA - - Phone: +1.310.737.1663 - Fax: +1.310.737.1755 - Email: me@cs.hmc.edu, Michael_Elkins@NAI.com - - - Raph Levien - University of California at Berkeley - 579 Soda Hall - Berkeley, CA 94720 USA - - Phone: +1.510.642.6509 - EMail: raph@acm.org - - - Thomas Roessler - Nordstrasse 99 - D-53111 Bonn, Germany - - Phone: +49-228-638007 - EMail: roessler@does-not-exist.org - - - -Elkins, et al. Standards Track [Page 13] - -RFC 3156 MIME Security with OpenPGP August 2001 - - -References - - [1] Callas, J., Donnerhacke, L., Finney, H. and R. Thayer, "OpenPGP - Message Format", RFC 2440, November 1998. - - [2] Galvin, J., Murphy, G., Crocker, S. and N. Freed, "Security - Multiparts for MIME: Multipart/Signed and Multipart/Encrypted", - RFC 1847, October 1995. - - [3] Freed, N. and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part Two: Media Types", RFC 2046, November - 1996. - - [4] Galvin, J., Murphy, G., Crocker, S. and N. Freed, "MIME Object - Security Services", RFC 1848, October 1995. - - [5] Atkins, D., Stallings, W. and P. Zimmermann, "PGP Message - Exchange Formats", RFC 1991, August 1996. - - [6] Elkins, M., "MIME Security with Pretty Good Privacy (PGP)", RFC - 2015, October 1996. - - [7] Freed, N., "Gateways and MIME Security Multiparts", RFC 2480, - January 1999. - - - - - - - - - - - - - - - - - - - - - - - - - - - -Elkins, et al. Standards Track [Page 14] - -RFC 3156 MIME Security with OpenPGP August 2001 - - -Full Copyright Statement - - Copyright (C) The Internet Society (2001). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - - - - - - - - - - - - - -Elkins, et al. Standards Track [Page 15] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc3676.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc3676.txt deleted file mode 100644 index bc08fba7..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc3676.txt +++ /dev/null @@ -1,1123 +0,0 @@ - - - - - - -Network Working Group R. Gellens -Request for Comments: 3676 Qualcomm -Obsoletes: 2646 February 2004 -Category: Standards Track - - - The Text/Plain Format and DelSp Parameters - -Status of this Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (2004). All Rights Reserved. - -Abstract - - This specification establishes two parameters (Format and DelSP) to - be used with the Text/Plain media type. In the presence of these - parameters, trailing whitespace is used to indicate flowed lines and - a canonical quote indicator is used to indicate quoted lines. This - results in an encoding which appears as normal Text/Plain in older - implementations, since it is in fact normal Text/Plain, yet provides - for superior wrapping/flowing, and quoting. - - This document supersedes the one specified in RFC 2646, "The - Text/Plain Format Parameter", and adds the DelSp parameter to - accommodate languages/coded character sets in which ASCII spaces are - not used or appear rarely. - -Table of Contents - - 1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . 2 - 2. Conventions Used in this Document . . . . . . . . . . . . . . 2 - 3. The Problem . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 3.1. Paragraph Text. . . . . . . . . . . . . . . . . . . . . 3 - 3.2. Embarrassing Line Wrap . . . . . . . . . . . . . . . . 3 - 3.3. New Media Types . . . . . . . . . . . . . . . . . . . . 4 - 4. The Format and DelSp Parameters . . . . . . . . . . . . . . . 5 - 4.1. Interpreting Format=Flowed. . . . . . . . . . . . . . . 6 - 4.2. Generating Format=Flowed . . . . . . . . . . . . . . . 7 - 4.3. Usenet Signature Convention . . . . . . . . . . . . . . 9 - 4.4. Space-Stuffing . . . . . . . . . . . . . . . . . . . . 9 - - - -Gellens Standards Track [Page 1] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - 4.5. Quoting . . . . . . . . . . . . . . . . . . . . . . . . 9 - 4.6. Digital Signatures and Encryption . . . . . . . . . . . 11 - 4.7. Examples. . . . . . . . . . . . . . . . . . . . . . . . 12 - 5. Interoperability. . . . . . . . . . . . . . . . . . . . . . . 12 - 6. ABNF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 - 7. Failure Modes . . . . . . . . . . . . . . . . . . . . . . . . 14 - 7.1. Trailing White Space Corruption . . . . . . . . . . . . 14 - 8. Security Considerations . . . . . . . . . . . . . . . . . . . 15 - 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 - 10. Internationalization Considerations . . . . . . . . . . . . . 15 - 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 15 - 12. Normative References. . . . . . . . . . . . . . . . . . . . . 16 - 13. Informative References. . . . . . . . . . . . . . . . . . . . 16 - Appendix A: Changes from RFC 2646 . . . . . . . . . . . . . . . . 18 - Author's Address. . . . . . . . . . . . . . . . . . . . . . . . . 19 - Full Copyright Statement. . . . . . . . . . . . . . . . . . . . . 20 - -1. Introduction - - Interoperability problems have been observed with erroneous labelling - of paragraph text as Text/Plain, and with various forms of - "embarrassing line wrap". (See Section 3.) - - Attempts to deploy new media types, such as Text/Enriched [Rich] and - Text/HTML [HTML] have suffered from a lack of backwards compatibility - and an often hostile user reaction at the receiving end. - - What is required is a format which is in all significant ways - Text/Plain, and therefore is quite suitable for display as - Text/Plain, and yet allows the sender to express to the receiver - which lines are quoted and which lines are considered a logical - paragraph, and thus eligible to be flowed (wrapped and joined) as - appropriate. - -2. Conventions Used in this Document - - The key words "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", - and "MAY" in this document are to be interpreted as described in "Key - words for use in RFCs to Indicate Requirement Levels" [KEYWORDS]. - - The term "paragraph" is used here to mean a series of lines which are - logically to be treated as a unit for display purposes and eligible - to be flowed (wrapped and joined) as appropriate to fit in the - display window and when creating text for replies, forwarding, etc. - - - - - - - -Gellens Standards Track [Page 2] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - -3. The Problem - - The Text/Plain media type is the lowest common denominator of - Internet email, with lines of no more than 998 characters (by - convention usually no more than 78), and where the carriage-return - and line-feed (CRLF) sequence represents a line break (see [MIME-IMT] - and [MSG-FMT]). - - Text/Plain is usually displayed as preformatted text, often in a - fixed font. That is, the characters start at the left margin of the - display window, and advance to the right until a CRLF sequence is - seen, at which point a new line is started, again at the left margin. - When a line length exceeds the display window, some clients will wrap - the line, while others invoke a horizontal scroll bar. - - Text which meets this description is defined by this memo as "fixed". - - Some interoperability problems have been observed with this format: - -3.1. Paragraph Text - - Many modern programs use a proportional-spaced font, and use CRLF to - represent paragraph breaks. Line breaks are "soft", occurring as - needed on display. That is, characters are grouped into a paragraph - until a CRLF sequence is seen, at which point a new paragraph is - started. Each paragraph is displayed, starting at the left margin - (or paragraph indent), and continuing to the right until a word is - encountered which does not fit in the remaining display width. This - word is displayed at the left margin of the next line. This - continues until the paragraph ends (a CRLF is seen). Extra vertical - space is left between paragraphs. - - Text which meets this description is defined by this memo as - "flowed". - - Numerous software products erroneously label this format as - Text/Plain, resulting in much user discomfort. - -3.2. Embarrassing Line Wrap - - As Text/Plain messages are quoted in replies or forwarded messages, - each line gradually increases in length, eventually being arbitrarily - hard wrapped, resulting in "embarrassing line wrap". This produces - text which is, at best, hard to read, and often confuses - attributions. - - - - - - -Gellens Standards Track [Page 3] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - Example: - - >>>>>>This is a comment from the first message to show a - >quoting example. - >>>>>This is a comment from the second message to show a - >quoting example. - >>>>This is a comment from the third message. - >>>This is a comment from the fourth message. - - It can be confusing to assign attribution to lines 2 and 4 above. - - In addition, as devices with display widths smaller than 79 or 80 - characters become more popular, embarrassing line wrap has become - even more prevalent, even with unquoted text. - - Example: - - This is paragraph text that is - meant to be flowed across - several lines. - However, the sending mailer is - converting it to fixed text at - a width of 72 - characters, which causes it to - look like this when shown on a - PDA with only - 30 character lines. - -3.3. New Media Types - - Attempts to deploy new media types, such as Text/Enriched [Rich] and - Text/HTML [HTML] have suffered from a lack of backwards compatibility - and an often hostile user reaction at the receiving end. - - In particular, Text/Enriched requires that open angle brackets ("<") - and hard line breaks be doubled, with resulting user unhappiness when - viewed as Text/Plain. Text/HTML requires even more alteration of - text, with a corresponding increase in user complaints. - - A proposal to define a new media type to explicitly represent the - paragraph form suffered from a lack of interoperability with - currently deployed software. Some programs treat unknown subtypes of - TEXT as an attachment. - - - - - - - - -Gellens Standards Track [Page 4] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - What is desired is a format which is in all significant ways - Text/Plain, and therefore is quite suitable for display as - Text/Plain, and yet allows the sender to express to the receiver - which lines can be considered a logical paragraph, and thus flowed - (wrapped and joined) as appropriate. - -4. The Format and DelSp Parameters - - This specification defines two MIME parameters for use with - Text/Plain: - - Name: Format - Value: Fixed, Flowed - - Name: DelSp - Value: Yes, No - - (Neither the parameter names nor values are case sensitive.) - - If Format is not specified, or if the value is not recognized, a - value of Fixed is assumed. The semantics of the Fixed value are the - usual associated with Text/Plain [MIME-IMT]. - - A Format value of Flowed indicates that the definition of flowed text - (as specified in this memo) was used on generation, and MAY be used - on reception. - - Note that because Format is a parameter of the Text/Plain content- - type, any content-transfer-encoding used is irrelevant to the - processing of flowed text. - - If DelSp is not specified, or if its value is not recognized, a value - of No is assumed. The use of DelSp without a Format value of Flowed - is undefined. When creating messages, DelSp SHOULD NOT be specified - in Text content types other than Text/Plain with Format = Flowed. - When receiving messages, DelSp SHOULD be ignored if used in a Text - content type other than Text/Plain with Format = Flowed. - - This section discusses flowed text; section 6 provides a formal - definition. - - Section 5 discusses interoperability. - - Note that this memo describes an on-the-wire format. It does not - address formats for local file storage. - - - - - - -Gellens Standards Track [Page 5] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - -4.1. Interpreting Format=Flowed - - If the first character of a line is a quote mark (">"), the line is - considered to be quoted (see Section 4.5). Logically, all quote - marks are counted and deleted, resulting in a line with a non-zero - quote depth, and content. (The agent is of course free to display - the content with quote marks or excerpt bars or anything else.) - Logically, this test for quoted lines is done before any other tests - (that is, before checking for space-stuffed and flowed). - - If the first character of a line is a space, the line has been - space-stuffed (see Section 4.4). Logically, this leading space is - deleted before examining the line further (that is, before checking - for flowed). - - If the line ends in a space, the line is flowed. Otherwise it is - fixed. The exception to this rule is a signature separator line, - described in Section 4.3. Such lines end in a space but are neither - flowed nor fixed. - - If the line is flowed and DelSp is "yes", the trailing space - immediately prior to the line's CRLF is logically deleted. If the - DelSp parameter is "no" (or not specified, or set to an unrecognized - value), the trailing space is not deleted. - - Any remaining trailing spaces are part of the line's content, but the - CRLF of a soft line break is not. - - A series of one or more flowed lines followed by one fixed line is - considered a paragraph, and MAY be flowed (wrapped and unwrapped) as - appropriate on display and in the construction of new messages (see - Section 4.5). - - An interpreting agent SHOULD allow for three exceptions to the rule - that paragraphs end with a fixed line. These exceptions are - improperly constructed messages: a flowed line SHOULD be considered - to end the paragraph if it is followed by a line of a different quote - depth (see 4.5) or by a signature separator (see 4.3); the end of the - body also ends the paragraph. - - A line consisting of one or more spaces (after deleting a space - acting as stuffing) is considered a flowed line. - - An empty line (just a CRLF) is a fixed line. - - Note that, for Unicode text, [Annex-14] provides guidance for - choosing at which characters to wrap a line. - - - - -Gellens Standards Track [Page 6] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - -4.2. Generating Format=Flowed - - When generating Format=Flowed text, lines SHOULD be 78 characters or - shorter, including any trailing white space and also including any - space added as part of stuffing (see Section 4.4). As suggested - values, any paragraph longer than 78 characters in total length could - be wrapped using lines of 72 or fewer characters. While the specific - line length used is a matter of aesthetics and preference, longer - lines are more likely to require rewrapping and to encounter - difficulties with older mailers. (It has been suggested that 66 - character lines are the most readable.) - - The restriction to 78 or fewer characters between CRLFs on the wire - is to conform to [MSG-FMT]. - - (In addition to conformance to [MSG-FMT], there is a historical need - that all lines, even when displayed by a non-flowed-aware program, - will fit in a standard 79- or 80-column screen without having to be - wrapped. The limit is 78, not 79 or 80, because while 79 or 80 fit - on a line, the last column is often reserved for a line-wrap - indicator.) - - When creating flowed text, the generating agent wraps, that is, - inserts 'soft' line breaks as needed. Soft line breaks are added at - natural wrapping points, such as between words. A soft line break is - a SP CRLF sequence. - - There are two techniques for inserting soft line breaks. The older - technique, established by RFC 2646, creates a soft line break by - inserting a CRLF after the occurrence of a space. With this - technique, soft line breaks are only possible where spaces already - occur. When this technique is used, the DelSp parameter SHOULD be - used; if used it MUST be set to "no". - - The newer technique, suitable for use even with languages/coded - character sets in which the ASCII space character is rare or not - used, creates a soft line break by inserting a SP CRLF sequence. - When this technique is used, the DelSp parameter MUST be used and - MUST be set to "yes". Note that because of space-stuffing (see - Section 4.4), when this technique is used and a soft line break is - inserted at a point where a SP already exists (such as between - words), if the SP CRLF sequence is added immediately before the SP, - the pre-existing SP becomes leading and thus requires stuffing. It - is RECOMMENDED that agents avoid this by inserting the SP CRLF - sequence following the existing SP. - - Generating agents MAY use either method within each Text/Plain body - part. - - - -Gellens Standards Track [Page 7] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - Regardless of which technique is used, a generating agent SHOULD NOT - insert a space in an unnatural location, such as into a word (a - sequence of printable characters, not containing spaces, in a - language/coded character set in which spaces are common). If faced - with such a word which exceeds 78 characters (but less than 998 - characters, the [SMTP] limit on line length), the agent SHOULD send - the word as is and exceed the 78-character limit on line length. - - A generating agent SHOULD: - - o Ensure all lines (fixed and flowed) are 78 characters or fewer in - length, counting any trailing space as well as a space added as - stuffing, but not counting the CRLF, unless a word by itself - exceeds 78 characters. - - o Trim spaces before user-inserted hard line breaks. - - A generating agent MUST: - - o Space-stuff lines which start with a space, "From ", or ">". - - In order to create messages which do not require space-stuffing, and - are thus more aesthetically pleasing when viewed as Format=Fixed, a - generating agent MAY avoid wrapping immediately before ">", "From ", - or space. - - (See Sections 4.4 and 4.5 for more information on space-stuffing and - quoting, respectively.) - - A Format=Flowed message consists of zero or more paragraphs, each - containing one or more flowed lines followed by one fixed line. The - usual case is a series of flowed text lines with blank (empty) fixed - lines between them. - - Any number of fixed lines can appear between paragraphs. - - When placing soft line breaks in a paragraph, generating agents MUST - NOT place them in a way that causes any line of the paragraph to be a - signature separator line, because paragraphs cannot contain signature - separator lines (see Sections 4.3 and 6). - - [Quoted-Printable] encoding SHOULD NOT be used with Format=Flowed - unless absolutely necessary (for example, non-US-ASCII (8-bit) - characters over a strictly 7-bit transport such as unextended - [SMTP]). In particular, a message SHOULD NOT be encoded in Quoted- - Printable for the sole purpose of protecting the trailing space on - flowed lines unless the body part is cryptographically signed or - encrypted (see Section 4.6). - - - -Gellens Standards Track [Page 8] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - The intent of Format=Flowed is to allow user agents to generate - flowed text which is non-obnoxious when viewed as pure, raw - Text/Plain (without any decoding); use of Quoted-Printable hinders - this and may cause Format=Flowed to be rejected by end users. - -4.3. Usenet Signature Convention - - There is a long-standing convention in Usenet news which also - commonly appears in Internet mail of using "-- " as the separator - line between the body and the signature of a message. When - generating a Format=Flowed message containing a Usenet-style - separator before the signature, the separator line is sent as-is. - This is a special case; an (optionally quoted or quoted and stuffed) - line consisting of DASH DASH SP is neither fixed nor flowed. - - Generating agents MUST NOT end a paragraph with such a signature - line. - - A receiving agent needs to test for a signature line both before the - test for a quoted line (see Section 4.5) and also after logically - counting and deleting quote marks and stuffing (see Section 4.4) from - a quoted line. - -4.4. Space-Stuffing - - In order to allow for unquoted lines which start with ">", and to - protect against systems which "From-munge" in-transit messages - (modifying any line which starts with "From " to ">From "), - Format=Flowed provides for space-stuffing. - - Space-stuffing adds a single space to the start of any line which - needs protection when the message is generated. On reception, if the - first character of a line is a space, it is logically deleted. This - occurs after the test for a quoted line (which logically counts and - deletes any quote marks), and before the test for a flowed line. - - On generation, any unquoted lines which start with ">", and any lines - which start with a space or "From " MUST be space-stuffed. Other - lines MAY be space-stuffed as desired. - - (Note that space-stuffing is conceptually similar to dot-stuffing as - specified in [SMTP].) - -4.5. Quoting - - In Format=Flowed, the canonical quote indicator (or quote mark) is - one or more close angle bracket (">") characters. Lines which start - with the quote indicator are considered quoted. The number of ">" - - - -Gellens Standards Track [Page 9] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - characters at the start of the line specifies the quote depth. - Flowed lines which are also quoted may require special handling on - display and when copied to new messages. - - When creating quoted flowed lines, each such line starts with the - quote indicator. - - Note that because of space-stuffing, the lines - >> Exit, Stage Left - and - >>Exit, Stage Left - are semantically identical; both have a quote-depth of two, and a - content of "Exit, Stage Left". - - However, the line - > > Exit, Stage Left - is different. It has a quote-depth of one, and a content of - "> Exit, Stage Left". - - When generating quoted flowed lines, an agent needs to pay attention - to changes in quote depth. All lines of a paragraph MUST be - unquoted, or else they MUST all be quoted and have the same quote - depth. Therefore, whenever there is a change in quote depth, or a - change from quoted to unquoted, or change from unquoted to quoted, - the line immediately preceding the change MUST NOT be a flowed line. - - If a receiving agent wishes to reformat flowed quoted lines (joining - and/or wrapping them) on display or when generating new messages, the - lines SHOULD be de-quoted, reformatted, and then re-quoted. To de- - quote, the number of close angle brackets in the quote indicator at - the start of each line is counted. To re-quote after reformatting, a - quote indicator containing the same number of close angle brackets - originally present are prefixed to each line. - - On reception, if a change in quote depth occurs on a flowed line, - this is an improperly formatted message. The receiver SHOULD handle - this error by using the 'quote-depth-wins' rule, which is to consider - the paragraph to end with the flowed line immediately preceding the - change in quote depth. - - In other words, whenever two adjacent lines have different quote - depths, senders MUST ensure that the earlier line is not flowed (does - not end in a space), and receivers finding a flowed line there SHOULD - treat it as the last line of a paragraph. - - For example, consider the following sequence of lines (using '*' to - indicate a soft line break, i.e., SP CRLF, and '#' to indicate a hard - line break, i.e., CRLF): - - - -Gellens Standards Track [Page 10] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - > Thou villainous ill-breeding spongy dizzy-eyed* - > reeky elf-skinned pigeon-egg!* <--- problem ---< - >> Thou artless swag-bellied milk-livered* - >> dismal-dreaming idle-headed scut!# - >>> Thou errant folly-fallen spleeny reeling-ripe* - >>> unmuzzled ratsbane!# - >>>> Henceforth, the coding style is to be strictly* - >>>> enforced, including the use of only upper case.# - >>>>> I've noticed a lack of adherence to the coding* - >>>>> styles, of late.# - >>>>>> Any complaints?# - - The second line ends in a soft line break, even though it is the last - line of the one-deep quote block. The question then arises as to how - this line is to be interpreted, considering that the next line is the - first line of the two-deep quote block. - - The example text above, when processed according to quote-depth wins, - results in the first two lines being considered as one quoted, flowed - section, with a quote depth of 1; the third and fourth lines become a - quoted, flowed section, with a quote depth of 2. - - A generating agent MUST NOT create this situation; a receiving agent - SHOULD handle it by giving preference to the quote depth. - -4.6. Digital Signatures and Encryption - - If a message is digitally signed or encrypted it is important that - cryptographic processing use the same text for signature verification - and/or decryption as was used for signature generation and/or - encryption. Since the use of format=flowed allows text to be altered - (by adding or removing line breaks and trailing spaces) between - composition and transmission, and between reception and display, - interoperability problems or security vulnerabilities may arise if - originator and recipient do not both use the on-the-wire format for - cryptographic processing. - - The implications of the interaction between format=flowed and any - specific cryptographic process depend on the details of the - cryptographic processing and should be understood before using - format=flowed in conjunction with signed and/or encrypted messages. - - Note that [OpenPGP] specifies (in Section 7.1) that "any trailing - whitespace (spaces, and tabs, 0x09) at the end of any line is ignored - when the cleartext signature is calculated." - - - - - - -Gellens Standards Track [Page 11] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - Thus it would be possible to add, in transit, a format=flowed header - to a regular, format=fixed vanilla PGP (not [OpenPGP-MIME]) signed - message and add arbitrary trailing space characters without this - addition being detected. This would change the rendering of the - article by a client which supported format=flowed. - - Therefore, the use of [OpenPGP] with format=flowed messages is - strongly discouraged. [OpenPGP-MIME] is recommended instead. - -4.7. Examples - - The following example contains three paragraphs: - - `Take some more tea,' the March Hare said to Alice, very - earnestly. - - `I've had nothing yet,' Alice replied in an offended tone, `so I - can't take more.' - - `You mean you can't take LESS,' said the Hatter: `it's very easy - to take MORE than nothing.' - - This could be encoded as follows (using '*' to indicate a soft line - break, that is, SP CRLF sequence, and '#' to indicate a hard line - break, that is, CRLF): - - `Take some more tea,' the March Hare said to Alice, very* - earnestly.# - # - `I've had nothing yet,' Alice replied in an offended tone, `so* - I can't take more.'# - # - `You mean you can't take LESS,' said the Hatter: `it's very* - easy to take MORE than nothing.'# - - To show an example of quoting, here we have the same exchange, - presented as a series of direct quotes: - - >>>Take some more tea.# - >>I've had nothing yet, so I can't take more.# - >You mean you can't take LESS, it's very easy to take* - >MORE than nothing.# - -5. Interoperability - - Because flowed lines are all-but-indistinguishable from fixed lines, - software which does not recognize Format=Flowed treats flowed lines - as normal Text/Plain (which is what they are). Thus, Format=Flowed - - - -Gellens Standards Track [Page 12] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - interoperates with older clients, although flowed lines will have - trailing white space inserted. - - If a space-stuffed message is received by an agent which handles - Format=Flowed, the space-stuffing is reversed and thus the message - appears unchanged. An agent which is not aware of Format=Flowed will - of course not undo any space-stuffing; thus Format=Flowed messages - may appear with a leading space on some lines (those which start with - a space, ">" which is not a quote indicator, or "From "). Since - lines which require space-stuffing rarely occur, and the aesthetic - consequences of unreversed space-stuffing are minimal, this is not - expected to be a significant problem. - - If some lines begin with one or more spaces, the generating agent MAY - space-stuff all lines, to maintain the relative indentation of the - lines when viewed by clients which are not aware of Format=Flowed. - - Messages generated with DelSp=yes and received by clients which are - aware of Format=Flowed but are not aware of the DelSp parameter will - have an extra space remaining after removal of soft line breaks. - Thus, when generating text in languages/coded character sets in which - spaces are common, the generating agent MAY always use the DelSp=no - method. - - Hand-aligned text, such as ASCII tables or art, source code, etc., - SHOULD be sent as fixed, not flowed lines. - -6. ABNF - - The constructs used in Text/Plain; Format=Flowed body parts are - described using Augmented Backus-Naur Form [ABNF], including the core - rules defined in Appendix A. - - Note that the SP (space) and ">" characters are encoded according to - the charset parameter. - -flowed-body = *( paragraph / fixed-line / sig-sep ) -paragraph = 1*flowed-line fixed-line - ; all lines in paragraph MUST be unquoted or - ; have same quote depth -flowed-line = ( flowed-line-qt / flowed-line-unqt ) flow CRLF -flowed-line-qt = quote ( ( stuffing stuffed-flowed ) / - unstuffed-flowed ) -flowed-line-unqt = ( stuffing stuffed-flowed ) / unstuffed-flowed -stuffed-flowed = *text-char -unstuffed-flowed = non-sp-quote *text-char -fixed-line = fixed-line-qt / fixed-line-unqt -fixed-line-qt = quote ( ( stuffing stuffed-fixed ) / - - - -Gellens Standards Track [Page 13] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - unstuffed-fixed ) CRLF -fixed-line-unqt = ( stuffed-fixed / unstuffed-fixed ) CRLF -stuffed-fixed = *text-char non-sp -unstuffed-fixed = non-sp-quote [ *text-char non-sp ] -sig-sep = [ quote [stuffing] ] "--" SP CRLF -quote-mark = ">" -quote = 1*quote-mark -stuffing = SP ; space-stuffed, added on generation if - ; needed, deleted on reception -flow = SP ; space before CRLF indicates flowed line, - ; if DelSp=yes, space was added on generation - ; and is deleted on reception -non-sp-quote = < any character except NUL, CR, LF, SP, quote-mark > -non-sp = non-sp-quote / quote-mark -text-char = non-sp / SP - - That is, a Format=Flowed message body consists of any number of - paragraphs and/or fixed lines and/or signature separator lines; - paragraphs need at least one flowed line and are terminated by a - fixed line; the fixed line terminating the paragraph is part of the - paragraph. (There are some exceptions to this described in the - text.) - - Without at least one flowed line, there is a series of fixed lines, - each independent. There is no paragraph. - - With at least one flowed line, there is a paragraph, and the received - lines can be reformed and flowed to fit the display window size. - This can only be done if the lines are part of a logical grouping, - the paragraph. - - Note that the definitions of flowed-line and sig-sep are potentially - ambiguous: a signature separator line matches both, but is treated as - a signature separator line and not a flowed line. - -7. Failure Modes - -7.1. Trailing White Space Corruption - - There are systems in existence which alter trailing whitespace on - messages which pass through them. Such systems may strip, or in - rarer cases, add trailing whitespace, in violation of RFC 2821 [SMTP] - Section 4.5.2. - - Stripping trailing whitespace has the effect of converting flowed - lines to fixed lines, which results in a message no worse than if - Format=Flowed had not been used. - - - - -Gellens Standards Track [Page 14] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - Adding trailing whitespace to a Format=Flowed message may result in a - malformed display or reply. - - Since most systems which add trailing white space do so to create a - line which fills an internal record format, the result is almost - always a line which contains an even number of characters (counting - the added trailing white space). - - One possible avoidance, therefore, would be to define Format=Flowed - lines to use either one or two trailing space characters to indicate - a flowed line, such that the total line length is odd. However, - considering the scarcity of such systems today, it is not worth the - added complexity. - -8. Security Considerations - - Any security considerations which apply to Text/Plain also apply to - Text/Plain with Format=Flowed. - - Section 4.6 discusses the interaction between Format=Flowed and - digital signatures or encryption. - -9. IANA Considerations - - IANA has added a reference to this specification in the Text/Plain - Media Type registration. - -10. Internationalization Considerations - - The line wrap and quoting specifications of Format=Flowed may not be - suitable for certain charsets, such as for Arabic and Hebrew - characters that read from right to left. Care needs to be taken in - applying format=flowed in these cases, as format=fixed combined with - [quoted-printable] encoding may be more suitable. - - The DelSp parameter was added specifically to permit Format=Flowed to - be used with languages/coded character sets in which the ASCII space - character is rarely used, or not used at all. - -11. Acknowledgments - - The DelSp parameter was developed during a series of discussions - among a number of people, including Harald Alvestrand, Grant Baillie, - Ian Bell, Steve Dorner, Patrik Faltstrom, Eric Fischer, Ned Freed, - Alexey Melnikov, John Myers, and Pete Resnick. - - - - - - -Gellens Standards Track [Page 15] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - Corrections and clarifications to RFC 2646 and early versions of this - document were pointed out by several people, including Adam Costello, - Jutta Degener, Tony Hansen, Simon Josefsson, Dan Kohn, Ragho - Mahalingam, Keith Moore, Greg Troxel, and Dan Wing. - - I'm told that NeXT's mail application used a very similar mechanism - (without support for non-Western languages) in 1992. - -12. Normative References - - [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF - for Syntax Specifications: ABNF", RFC 2234, - November 1997. - - [KEYWORDS] Bradner, S., "Key words for use in RFCs to - Indicate Requirement Levels", BCP 14, RFC 2119, - March 1997. - - [MIME-IMT] Freed, N. and N. Borenstein, "Multipurpose - Internet Mail Extensions (MIME) Part Two: Media - Types", RFC 2046, November 1996. - - [Quoted-Printable] Freed, N. and N. Borenstein, "Multipurpose - Internet Mail Extensions (MIME) Part One: Format - of Internet Message Bodies", RFC 2045, November - 1996. - -13. Informative References - - [Annex-14] Unicode Standard Annex #14, "Line Breaking - Properties" - - - [MSG-FMT] Resnick, P., Ed., "Internet Message Format", RFC - 2822, April 2001. - - [OpenPGP] Callas, J., Donnerhacke, L., Finney, H. and R. - Thayer, "OpenPGP Message Format", RFC 2440, - November 1998. - - [OpenPGP-MIME] Elkins, M., "MIME Security with Pretty Good - Privacy (PGP)", RFC 2015, October 1996. - - Elkins, M., Del Torto, D., Levien, R. and J. - Roessler, "MIME Security with OpenPGP", RFC 3156, - August 2001. - - - - - -Gellens Standards Track [Page 16] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - [Rich] Resnick, P. and A. Walker, "The text/enriched MIME - Content-type", RFC 1896, February 1996. - - [SMTP] Klensin, J., Ed., "Simple Mail Transfer Protocol", - RFC 2821, April 2001. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Gellens Standards Track [Page 17] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - -Appendix A: Changes from RFC 2646 - - Substantive: - - o Added DelSp parameter to handle languages and coded character sets - in which space is less common or not used. - o Updated text on generating and interpreting to accommodate the - DelSp parameter. - o Changed the limits of 79 or 80 to be 78 in conformance with RFC - 2822. - o Added text on generating to clarify that the 78-character limit - includes trailing white space and stuffing. - o Changed sig-sep in ABNF to allow stuffing. - o Changed fixed-line to allow empty lines in ABNF. - o Added explanatory text following ABNF. - o Moved text from Abstract to new Introduction; rewrote Abstract. - o Moved interoperability text to new section, and updated. - o Clarified Security Considerations. - o Text on digital signatures now discusses that OpenPGP ignores - trailing white space. - o Mention Unicode Annex 14. - o Added mention of quoting to Abstract and Introduction. - o Deleted line analysis table. - o Added recommendations for OpenPGP and OpenPGP-MIME. - o Rewrote ABNF rules to remove most ambiguity and note remaining - case. - o Added note that c-t-e is irrelevant to flowed text processing. - o Added text indicating that end of data terminates a paragraph. - o Moved sig-sep out of fixed-line ABNF. - o Changed some SHOULDs to MUSTs (space-stuffing, quoted paragraphs). - o Added note to ABNF that space and ">" are encoded according to - charset. - o Mentioned exceptions in section on interpreting. - o Clarified and made consistent treatment of signature separator - lines. - - Editorial: - - o Added mention of NeXT's mail application to Acknowledgments. - o Updated Acknowledgments. - o Updated [SMTP] reference to 2821. - o Added Notices. - o Split References into Normative and Informative. - o Improved text wording in some areas. - o Standardize on "quote depth", not "quoting depth". - o Moved section on interpreting before section on generating. - o Reworded non-normative "should"s. - o Noted meaning of "paragraph". - - - -Gellens Standards Track [Page 18] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - - The DelSp parameter was added specifically to permit Format=Flowed to - be used with languages/coded character sets in which the ASCII space - character is rarely used, or not used at all. The DelSp mechanism - was selected despite having been initially rejected as too much of a - kludge, because among the many different techniques proposed, it - allows for maximum interoperability among clients which support - neither this specification nor RFC 2646, those which do support RFC - 2646 but not this specification, and those that do support this - specification; this set is multiplied by those that handle - languages/coded character sets in which spaces are common, and in - which they are uncommon or not used. - -Author's Address - - Randall Gellens - QUALCOMM Incorporated - 5775 Morehouse Drive - San Diego, CA 92121 - USA - - Phone: +1 858 651 5115 - EMail: randy@qualcomm.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Gellens Standards Track [Page 19] - -RFC 3676 Text/Plain Format and DelSp Parameters February 2004 - - -Full Copyright Statement - - Copyright (C) The Internet Society (2004). This document is subject - to the rights, licenses and restrictions contained in BCP 78 and - except as set forth therein, the authors retain all their rights. - - This document and the information contained herein are provided on an - "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE - REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE - INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF - THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED - WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Intellectual Property - - The IETF takes no position regarding the validity or scope of any - Intellectual Property Rights or other rights that might be claimed - to pertain to the implementation or use of the technology - described in this document or the extent to which any license - under such rights might or might not be available; nor does it - represent that it has made any independent effort to identify any - such rights. Information on the procedures with respect to - rights in RFC documents can be found in BCP 78 and BCP 79. - - Copies of IPR disclosures made to the IETF Secretariat and any - assurances of licenses to be made available, or the result of an - attempt made to obtain a general license or permission for the use - of such proprietary rights by implementers or users of this - specification can be obtained from the IETF on-line IPR repository - at http://www.ietf.org/ipr. - - The IETF invites any interested party to bring to its attention - any copyrights, patents or patent applications, or other - proprietary rights that may cover technology that may be required - to implement this standard. Please address the information to the - IETF at ietf-ipr@ietf.org. - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - - - -Gellens Standards Track [Page 20] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4505.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4505.txt deleted file mode 100644 index 6b8a4a11..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4505.txt +++ /dev/null @@ -1,507 +0,0 @@ - - - - - - -Network Working Group K. Zeilenga, Ed. -Request for Comments: 4505 OpenLDAP Foundation -Obsoletes: 2245 June 2006 -Category: Standards Track - - - Anonymous Simple Authentication and Security Layer (SASL) Mechanism - -Status of This Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (2006). - -Abstract - - On the Internet, it is common practice to permit anonymous access to - various services. Traditionally, this has been done with a plain- - text password mechanism using "anonymous" as the user name and using - optional trace information, such as an email address, as the - password. As plain-text login commands are not permitted in new IETF - protocols, a new way to provide anonymous login is needed within the - context of the Simple Authentication and Security Layer (SASL) - framework. - -1. Introduction - - This document defines an anonymous mechanism for the Simple - Authentication and Security Layer ([SASL]) framework. The name - associated with this mechanism is "ANONYMOUS". - - Unlike many other SASL mechanisms, whose purpose is to authenticate - and identify the user to a server, the purpose of this SASL mechanism - is to allow the user to gain access to services or resources without - requiring the user to establish or otherwise disclose their identity - to the server. That is, this mechanism provides an anonymous login - method. - - This mechanism does not provide a security layer. - - This document replaces RFC 2245. Changes since RFC 2245 are detailed - in Appendix A. - - - -Zeilenga Standards Track [Page 1] - -RFC 4505 Anonymous SASL Mechanism June 2006 - - -2. The Anonymous Mechanism - - The mechanism consists of a single message from the client to the - server. The client may include in this message trace information in - the form of a string of [UTF-8]-encoded [Unicode] characters prepared - in accordance with [StringPrep] and the "trace" stringprep profile - defined in Section 3 of this document. The trace information, which - has no semantical value, should take one of two forms: an Internet - email address, or an opaque string that does not contain the '@' - (U+0040) character and that can be interpreted by the system - administrator of the client's domain. For privacy reasons, an - Internet email address or other information identifying the user - should only be used with permission from the user. - - A server that permits anonymous access will announce support for the - ANONYMOUS mechanism and allow anyone to log in using that mechanism, - usually with restricted access. - - A formal grammar for the client message using Augmented BNF [ABNF] is - provided below as a tool for understanding this technical - specification. - - message = [ email / token ] - ;; to be prepared in accordance with Section 3 - - UTF1 = %x00-3F / %x41-7F ;; less '@' (U+0040) - UTF2 = %xC2-DF UTF0 - UTF3 = %xE0 %xA0-BF UTF0 / %xE1-EC 2(UTF0) / - %xED %x80-9F UTF0 / %xEE-EF 2(UTF0) - UTF4 = %xF0 %x90-BF 2(UTF0) / %xF1-F3 3(UTF0) / - %xF4 %x80-8F 2(UTF0) - UTF0 = %x80-BF - - TCHAR = UTF1 / UTF2 / UTF3 / UTF4 - ;; any UTF-8 encoded Unicode character - ;; except '@' (U+0040) - - email = addr-spec - ;; as defined in [IMAIL] - - token = 1*255TCHAR - - Note to implementors: - The production is restricted to 255 UTF-8-encoded Unicode - characters. As the encoding of a characters uses a sequence of 1 - to 4 octets, a token may be as long as 1020 octets. - - - - - -Zeilenga Standards Track [Page 2] - -RFC 4505 Anonymous SASL Mechanism June 2006 - - -3. The "trace" Profile of "Stringprep" - - This section defines the "trace" profile of [StringPrep]. This - profile is designed for use with the SASL ANONYMOUS Mechanism. - Specifically, the client is to prepare the production in - accordance with this profile. - - The character repertoire of this profile is Unicode 3.2 [Unicode]. - - No mapping is required by this profile. - - No Unicode normalization is required by this profile. - - The list of unassigned code points for this profile is that provided - in Appendix A of [StringPrep]. Unassigned code points are not - prohibited. - - Characters from the following tables of [StringPrep] are prohibited: - - - C.2.1 (ASCII control characters) - - C.2.2 (Non-ASCII control characters) - - C.3 (Private use characters) - - C.4 (Non-character code points) - - C.5 (Surrogate codes) - - C.6 (Inappropriate for plain text) - - C.8 (Change display properties are deprecated) - - C.9 (Tagging characters) - - No additional characters are prohibited. - - This profile requires bidirectional character checking per Section 6 - of [StringPrep]. - -4. Example - - Here is a sample ANONYMOUS login between an IMAP client and server. - In this example, "C:" and "S:" indicate lines sent by the client and - server, respectively. If such lines are wrapped without a new "C:" - or "S:" label, then the wrapping is for editorial clarity and is not - part of the command. - - Note that this example uses the IMAP profile [IMAP4] of SASL. The - base64 encoding of challenges and responses as well as the "+ " - preceding the responses are part of the IMAP4 profile, not part of - SASL itself. Additionally, protocols with SASL profiles permitting - an initial client response will be able to avoid the extra round trip - below (the server response with an empty "+ "). - - - - -Zeilenga Standards Track [Page 3] - -RFC 4505 Anonymous SASL Mechanism June 2006 - - - In this example, the trace information is "sirhc". - - S: * OK IMAP4 server ready - C: A001 CAPABILITY - S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=DIGEST-MD5 AUTH=ANONYMOUS - S: A001 OK done - C: A002 AUTHENTICATE ANONYMOUS - S: + - C: c2lyaGM= - S: A003 OK Welcome, trace information has been logged. - -5. Security Considerations - - The ANONYMOUS mechanism grants access to services and/or resources by - anyone. For this reason, it should be disabled by default so that - the administrator can make an explicit decision to enable it. - - If the anonymous user has any write privileges, a denial-of-service - attack is possible by filling up all available space. This can be - prevented by disabling all write access by anonymous users. - - If anonymous users have read and write access to the same area, the - server can be used as a communication mechanism to exchange - information anonymously. Servers that accept anonymous submissions - should implement the common "drop box" model, which forbids anonymous - read access to the area where anonymous submissions are accepted. - - If the anonymous user can run many expensive operations (e.g., an - IMAP SEARCH BODY command), this could enable a denial-of-service - attack. Servers are encouraged to reduce the priority of anonymous - users or limit their resource usage. - - While servers may impose a limit on the number of anonymous users, - note that such limits enable denial-of-service attacks and should be - used with caution. - - The trace information is not authenticated, so it can be falsified. - This can be used as an attempt to get someone else in trouble for - access to questionable information. Administrators investigating - abuse need to realize that this trace information may be falsified. - - A client that uses the user's correct email address as trace - information without explicit permission may violate that user's - privacy. Anyone who accesses an anonymous archive on a sensitive - subject (e.g., sexual abuse) likely has strong privacy needs. - Clients should not send the email address without the explicit - permission of the user and should offer the option of supplying no - trace information, thus only exposing the source IP address and time. - - - -Zeilenga Standards Track [Page 4] - -RFC 4505 Anonymous SASL Mechanism June 2006 - - - Anonymous proxy servers could enhance this privacy but would have to - consider the resulting potential denial-of-service attacks. - - Anonymous connections are susceptible to man-in-the-middle attacks - that view or alter the data transferred. Clients and servers are - encouraged to support external data security services. - - Protocols that fail to require an explicit anonymous login are more - susceptible to break-ins given certain common implementation - techniques. Specifically, Unix servers that offer user login may - initially start up as root and switch to the appropriate user id - after an explicit login command. Normally, such servers refuse all - data access commands prior to explicit login and may enter a - restricted security environment (e.g., the Unix chroot(2) function) - for anonymous users. If anonymous access is not explicitly - requested, the entire data access machinery is exposed to external - security attacks without the chance for explicit protective measures. - Protocols that offer restricted data access should not allow - anonymous data access without an explicit login step. - - General [SASL] security considerations apply to this mechanism. - - [StringPrep] security considerations and [Unicode] security - considerations discussed in [StringPrep] apply to this mechanism. - [UTF-8] security considerations also apply. - -6. IANA Considerations - - The SASL Mechanism registry [IANA-SASL] entry for the ANONYMOUS - mechanism has been updated by the IANA to reflect that this document - now provides its technical specification. - - To: iana@iana.org - Subject: Updated Registration of SASL mechanism ANONYMOUS - - SASL mechanism name: ANONYMOUS - Security considerations: See RFC 4505. - Published specification (optional, recommended): RFC 4505 - Person & email address to contact for further information: - Kurt Zeilenga - Chris Newman - Intended usage: COMMON - Author/Change controller: IESG - Note: Updates existing entry for ANONYMOUS - - - - - - - -Zeilenga Standards Track [Page 5] - -RFC 4505 Anonymous SASL Mechanism June 2006 - - - The [StringPrep] profile "trace", first defined in this RFC, has been - registered: - - To: iana@iana.org - Subject: Initial Registration of Stringprep "trace" profile - - Stringprep profile: trace - Published specification: RFC 4505 - Person & email address to contact for further information: - Kurt Zeilenga - -7. Acknowledgement - - This document is a revision of RFC 2245 by Chris Newman. Portions of - the grammar defined in Section 1 were borrowed from RFC 3629 by - Francois Yergeau. - - This document is a product of the IETF SASL WG. - -8. Normative References - - [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax - Specifications: ABNF", RFC 4234, October 2005. - - [IMAIL] Resnick, P., "Internet Message Format", RFC 2822, April - 2001. - - [SASL] Melnikov, A., Ed. and K. Zeilenga, Ed., "Simple - Authentication and Security Layer (SASL)", RFC 4422, - June 2006. - - [StringPrep] Hoffman, P. and M. Blanchet, "Preparation of - Internationalized Strings ('stringprep')", RFC 3454, - December 2002. - - [Unicode] The Unicode Consortium, "The Unicode Standard, Version - 3.2.0" is defined by "The Unicode Standard, Version 3.0" - (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5), - as amended by the "Unicode Standard Annex #27: Unicode - 3.1" (http://www.unicode.org/reports/tr27/) and by the - "Unicode Standard Annex #28: Unicode 3.2" - (http://www.unicode.org/reports/tr28/). - - [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO - 10646", RFC 3629 (also STD 63), November 2003. - - - - - - -Zeilenga Standards Track [Page 6] - -RFC 4505 Anonymous SASL Mechanism June 2006 - - -9. Informative References - - [IMAP4] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION - 4rev1", RFC 3501, March 2003. - - [IANA-SASL] IANA, "SIMPLE AUTHENTICATION AND SECURITY LAYER (SASL) - MECHANISMS", . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Zeilenga Standards Track [Page 7] - -RFC 4505 Anonymous SASL Mechanism June 2006 - - -Appendix A. Changes since RFC 2245 - - This appendix is non-normative. - - RFC 2245 allows the client to include optional trace information in - the form of a human readable string. RFC 2245 restricted this string - to US-ASCII. As the Internet is international, this document uses a - string restricted to UTF-8 encoded Unicode characters. A - "stringprep" profile is defined to precisely define which Unicode - characters are allowed in this string. While the string remains - restricted to 255 characters, the encoded length of each character - may now range from 1 to 4 octets. - - Additionally, a number of editorial changes were made. - -Editor's Address - - Kurt D. Zeilenga - OpenLDAP Foundation - - EMail: Kurt@OpenLDAP.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Zeilenga Standards Track [Page 8] - -RFC 4505 Anonymous SASL Mechanism June 2006 - - -Full Copyright Statement - - Copyright (C) The Internet Society (2006). - - This document is subject to the rights, licenses and restrictions - contained in BCP 78, and except as set forth therein, the authors - retain all their rights. - - This document and the information contained herein are provided on an - "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS - OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET - ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE - INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED - WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Intellectual Property - - The IETF takes no position regarding the validity or scope of any - Intellectual Property Rights or other rights that might be claimed to - pertain to the implementation or use of the technology described in - this document or the extent to which any license under such rights - might or might not be available; nor does it represent that it has - made any independent effort to identify any such rights. Information - on the procedures with respect to rights in RFC documents can be - found in BCP 78 and BCP 79. - - Copies of IPR disclosures made to the IETF Secretariat and any - assurances of licenses to be made available, or the result of an - attempt made to obtain a general license or permission for the use of - such proprietary rights by implementers or users of this - specification can be obtained from the IETF on-line IPR repository at - http://www.ietf.org/ipr. - - The IETF invites any interested party to bring to its attention any - copyrights, patents or patent applications, or other proprietary - rights that may cover technology that may be required to implement - this standard. Please address the information to the IETF at - ietf-ipr@ietf.org. - -Acknowledgement - - Funding for the RFC Editor function is provided by the IETF - Administrative Support Activity (IASA). - - - - - - - -Zeilenga Standards Track [Page 9] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4616.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4616.txt deleted file mode 100644 index 991189d5..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4616.txt +++ /dev/null @@ -1,619 +0,0 @@ - - - - - - -Network Working Group K. Zeilenga, Ed. -Request for Comments: 4616 OpenLDAP Foundation -Updates: 2595 August 2006 -Category: Standards Track - - - The PLAIN Simple Authentication and Security Layer (SASL) Mechanism - -Status of This Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The Internet Society (2006). - -Abstract - - This document defines a simple clear-text user/password Simple - Authentication and Security Layer (SASL) mechanism called the PLAIN - mechanism. The PLAIN mechanism is intended to be used, in - combination with data confidentiality services provided by a lower - layer, in protocols that lack a simple password authentication - command. - - - - - - - - - - - - - - - - - - - - - - - -Zeilenga Standards Track [Page 1] - -RFC 4616 The PLAIN SASL Mechanism August 2006 - - -1. Introduction - - Clear-text, multiple-use passwords are simple, interoperate with - almost all existing operating system authentication databases, and - are useful for a smooth transition to a more secure password-based - authentication mechanism. The drawback is that they are unacceptable - for use over network connections where data confidentiality is not - ensured. - - This document defines the PLAIN Simple Authentication and Security - Layer ([SASL]) mechanism for use in protocols with no clear-text - login command (e.g., [ACAP] or [SMTP-AUTH]). This document updates - RFC 2595, replacing Section 6. Changes since RFC 2595 are detailed - in Appendix A. - - The name associated with this mechanism is "PLAIN". - - The PLAIN SASL mechanism does not provide a security layer. - - The PLAIN mechanism should not be used without adequate data security - protection as this mechanism affords no integrity or confidentiality - protections itself. The mechanism is intended to be used with data - security protections provided by application-layer protocol, - generally through its use of Transport Layer Security ([TLS]) - services. - - By default, implementations SHOULD advertise and make use of the - PLAIN mechanism only when adequate data security services are in - place. Specifications for IETF protocols that indicate that this - mechanism is an applicable authentication mechanism MUST mandate that - implementations support an strong data security service, such as TLS. - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", - "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this - document are to be interpreted as described in [Keywords]. - -2. PLAIN SASL Mechanism - - The mechanism consists of a single message, a string of [UTF-8] - encoded [Unicode] characters, from the client to the server. The - client presents the authorization identity (identity to act as), - followed by a NUL (U+0000) character, followed by the authentication - identity (identity whose password will be used), followed by a NUL - (U+0000) character, followed by the clear-text password. As with - other SASL mechanisms, the client does not provide an authorization - identity when it wishes the server to derive an identity from the - credentials and use that as the authorization identity. - - - - -Zeilenga Standards Track [Page 2] - -RFC 4616 The PLAIN SASL Mechanism August 2006 - - - The formal grammar for the client message using Augmented BNF [ABNF] - follows. - - message = [authzid] UTF8NUL authcid UTF8NUL passwd - authcid = 1*SAFE ; MUST accept up to 255 octets - authzid = 1*SAFE ; MUST accept up to 255 octets - passwd = 1*SAFE ; MUST accept up to 255 octets - UTF8NUL = %x00 ; UTF-8 encoded NUL character - - SAFE = UTF1 / UTF2 / UTF3 / UTF4 - ;; any UTF-8 encoded Unicode character except NUL - - UTF1 = %x01-7F ;; except NUL - UTF2 = %xC2-DF UTF0 - UTF3 = %xE0 %xA0-BF UTF0 / %xE1-EC 2(UTF0) / - %xED %x80-9F UTF0 / %xEE-EF 2(UTF0) - UTF4 = %xF0 %x90-BF 2(UTF0) / %xF1-F3 3(UTF0) / - %xF4 %x80-8F 2(UTF0) - UTF0 = %x80-BF - - The authorization identity (authzid), authentication identity - (authcid), password (passwd), and NUL character deliminators SHALL be - transferred as [UTF-8] encoded strings of [Unicode] characters. As - the NUL (U+0000) character is used as a deliminator, the NUL (U+0000) - character MUST NOT appear in authzid, authcid, or passwd productions. - - The form of the authzid production is specific to the application- - level protocol's SASL profile [SASL]. The authcid and passwd - productions are form-free. Use of non-visible characters or - characters that a user may be unable to enter on some keyboards is - discouraged. - - Servers MUST be capable of accepting authzid, authcid, and passwd - productions up to and including 255 octets. It is noted that the - UTF-8 encoding of a Unicode character may be as long as 4 octets. - - Upon receipt of the message, the server will verify the presented (in - the message) authentication identity (authcid) and password (passwd) - with the system authentication database, and it will verify that the - authentication credentials permit the client to act as the (presented - or derived) authorization identity (authzid). If both steps succeed, - the user is authenticated. - - The presented authentication identity and password strings, as well - as the database authentication identity and password strings, are to - be prepared before being used in the verification process. The - [SASLPrep] profile of the [StringPrep] algorithm is the RECOMMENDED - preparation algorithm. The SASLprep preparation algorithm is - - - -Zeilenga Standards Track [Page 3] - -RFC 4616 The PLAIN SASL Mechanism August 2006 - - - recommended to improve the likelihood that comparisons behave in an - expected manner. The SASLprep preparation algorithm is not mandatory - so as to allow the server to employ other preparation algorithms - (including none) when appropriate. For instance, use of a different - preparation algorithm may be necessary for the server to interoperate - with an external system. - - When preparing the presented strings using [SASLPrep], the presented - strings are to be treated as "query" strings (Section 7 of - [StringPrep]) and hence unassigned code points are allowed to appear - in their prepared output. When preparing the database strings using - [SASLPrep], the database strings are to be treated as "stored" - strings (Section 7 of [StringPrep]) and hence unassigned code points - are prohibited from appearing in their prepared output. - - Regardless of the preparation algorithm used, if the output of a - non-invertible function (e.g., hash) of the expected string is - stored, the string MUST be prepared before input to that function. - - Regardless of the preparation algorithm used, if preparation fails or - results in an empty string, verification SHALL fail. - - When no authorization identity is provided, the server derives an - authorization identity from the prepared representation of the - provided authentication identity string. This ensures that the - derivation of different representations of the authentication - identity produces the same authorization identity. - - The server MAY use the credentials to initialize any new - authentication database, such as one suitable for [CRAM-MD5] or - [DIGEST-MD5]. - -3. Pseudo-Code - - This section provides pseudo-code illustrating the verification - process (using hashed passwords and the SASLprep preparation - function) discussed above. This section is not definitive. - - boolean Verify(string authzid, string authcid, string passwd) { - string pAuthcid = SASLprep(authcid, true); # prepare authcid - string pPasswd = SASLprep(passwd, true); # prepare passwd - if (pAuthcid == NULL || pPasswd == NULL) { - return false; # preparation failed - } - if (pAuthcid == "" || pPasswd == "") { - return false; # empty prepared string - } - - - - -Zeilenga Standards Track [Page 4] - -RFC 4616 The PLAIN SASL Mechanism August 2006 - - - storedHash = FetchPasswordHash(pAuthcid); - if (storedHash == NULL || storedHash == "") { - return false; # error or unknown authcid - } - - if (!Compare(storedHash, Hash(pPasswd))) { - return false; # incorrect password - } - - if (authzid == NULL ) { - authzid = DeriveAuthzid(pAuthcid); - if (authzid == NULL || authzid == "") { - return false; # could not derive authzid - } - } - - if (!Authorize(pAuthcid, authzid)) { - return false; # not authorized - } - - return true; - } - - The second parameter of the SASLprep function, when true, indicates - that unassigned code points are allowed in the input. When the - SASLprep function is called to prepare the password prior to - computing the stored hash, the second parameter would be false. - - The second parameter provided to the Authorize function is not - prepared by this code. The application-level SASL profile should be - consulted to determine what, if any, preparation is necessary. - - Note that the DeriveAuthzid and Authorize functions (whether - implemented as one function or two, whether designed in a manner in - which these functions or whether the mechanism implementation can be - reused elsewhere) require knowledge and understanding of mechanism - and the application-level protocol specification and/or - implementation details to implement. - - Note that the Authorize function outcome is clearly dependent on - details of the local authorization model and policy. Both functions - may be dependent on other factors as well. - - - - - - - - - -Zeilenga Standards Track [Page 5] - -RFC 4616 The PLAIN SASL Mechanism August 2006 - - -4. Examples - - This section provides examples of PLAIN authentication exchanges. - The examples are intended to help the readers understand the above - text. The examples are not definitive. - - "C:" and "S:" indicate lines sent by the client and server, - respectively. "" represents a single NUL (U+0000) character. - The Application Configuration Access Protocol ([ACAP]) is used in the - examples. - - The first example shows how the PLAIN mechanism might be used for - user authentication. - - S: * ACAP (SASL "CRAM-MD5") (STARTTLS) - C: a001 STARTTLS - S: a001 OK "Begin TLS negotiation now" - - S: * ACAP (SASL "CRAM-MD5" "PLAIN") - C: a002 AUTHENTICATE "PLAIN" - S: + "" - C: {21} - C: timtanstaaftanstaaf - S: a002 OK "Authenticated" - - The second example shows how the PLAIN mechanism might be used to - attempt to assume the identity of another user. In this example, the - server rejects the request. Also, this example makes use of the - protocol optional initial response capability to eliminate a round- - trip. - - S: * ACAP (SASL "CRAM-MD5") (STARTTLS) - C: a001 STARTTLS - S: a001 OK "Begin TLS negotiation now" - - S: * ACAP (SASL "CRAM-MD5" "PLAIN") - C: a002 AUTHENTICATE "PLAIN" {20+} - C: UrselKurtxipj3plmq - S: a002 NO "Not authorized to requested authorization identity" - -5. Security Considerations - - As the PLAIN mechanism itself provided no integrity or - confidentiality protections, it should not be used without adequate - external data security protection, such as TLS services provided by - many application-layer protocols. By default, implementations SHOULD - NOT advertise and SHOULD NOT make use of the PLAIN mechanism unless - adequate data security services are in place. - - - -Zeilenga Standards Track [Page 6] - -RFC 4616 The PLAIN SASL Mechanism August 2006 - - - When the PLAIN mechanism is used, the server gains the ability to - impersonate the user to all services with the same password - regardless of any encryption provided by TLS or other confidentiality - protection mechanisms. Whereas many other authentication mechanisms - have similar weaknesses, stronger SASL mechanisms address this issue. - Clients are encouraged to have an operational mode where all - mechanisms that are likely to reveal the user's password to the - server are disabled. - - General [SASL] security considerations apply to this mechanism. - - Unicode, [UTF-8], and [StringPrep] security considerations also - apply. - -6. IANA Considerations - - The SASL Mechanism registry [IANA-SASL] entry for the PLAIN mechanism - has been updated by the IANA to reflect that this document now - provides its technical specification. - - To: iana@iana.org - Subject: Updated Registration of SASL mechanism PLAIN - - SASL mechanism name: PLAIN - Security considerations: See RFC 4616. - Published specification (optional, recommended): RFC 4616 - Person & email address to contact for further information: - Kurt Zeilenga - IETF SASL WG - Intended usage: COMMON - Author/Change controller: IESG - Note: Updates existing entry for PLAIN - -7. Acknowledgements - - This document is a revision of RFC 2595 by Chris Newman. Portions of - the grammar defined in Section 2 were borrowed from [UTF-8] by - Francois Yergeau. - - This document is a product of the IETF Simple Authentication and - Security Layer (SASL) Working Group. - - - - - - - - - - -Zeilenga Standards Track [Page 7] - -RFC 4616 The PLAIN SASL Mechanism August 2006 - - -8. Normative References - - [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for - Syntax Specifications: ABNF", RFC 4234, October 2005. - - [Keywords] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, March 1997. - - [SASL] Melnikov, A., Ed., and K. Zeilenga, Ed., "Simple - Authentication and Security Layer (SASL)", RFC 4422, - June 2006. - - [SASLPrep] Zeilenga, K., "SASLprep: Stringprep Profile for User - Names and Passwords", RFC 4013, February 2005. - - [StringPrep] Hoffman, P. and M. Blanchet, "Preparation of - Internationalized Strings ("stringprep")", RFC 3454, - December 2002. - - [Unicode] The Unicode Consortium, "The Unicode Standard, Version - 3.2.0" is defined by "The Unicode Standard, Version - 3.0" (Reading, MA, Addison-Wesley, 2000. ISBN 0-201- - 61633-5), as amended by the "Unicode Standard Annex - #27: Unicode 3.1" - (http://www.unicode.org/reports/tr27/) and by the - "Unicode Standard Annex #28: Unicode 3.2" - (http://www.unicode.org/reports/tr28/). - - [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO - 10646", STD 63, RFC 3629, November 2003. - - [TLS] Dierks, T. and E. Rescorla, "The Transport Layer - Security (TLS) Protocol Version 1.1", RFC 4346, April - 2006. - -9. Informative References - - [ACAP] Newman, C. and J. Myers, "ACAP -- Application - Configuration Access Protocol", RFC 2244, November - 1997. - - [CRAM-MD5] Nerenberg, L., Ed., "The CRAM-MD5 SASL Mechanism", Work - in Progress, June 2006. - - [DIGEST-MD5] Melnikov, A., Ed., "Using Digest Authentication as a - SASL Mechanism", Work in Progress, June 2006. - - - - - -Zeilenga Standards Track [Page 8] - -RFC 4616 The PLAIN SASL Mechanism August 2006 - - - [IANA-SASL] IANA, "SIMPLE AUTHENTICATION AND SECURITY LAYER (SASL) - MECHANISMS", - . - - [SMTP-AUTH] Myers, J., "SMTP Service Extension for Authentication", - RFC 2554, March 1999. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Zeilenga Standards Track [Page 9] - -RFC 4616 The PLAIN SASL Mechanism August 2006 - - -Appendix A. Changes since RFC 2595 - - This appendix is non-normative. - - This document replaces Section 6 of RFC 2595. - - The specification details how the server is to compare client- - provided character strings with stored character strings. - - The ABNF grammar was updated. In particular, the grammar now allows - LINE FEED (U+000A) and CARRIAGE RETURN (U+000D) characters in the - authzid, authcid, passwd productions. However, whether these control - characters may be used depends on the string preparation rules - applicable to the production. For passwd and authcid productions, - control characters are prohibited. For authzid, one must consult the - application-level SASL profile. This change allows PLAIN to carry - all possible authorization identity strings allowed in SASL. - - Pseudo-code was added. - - The example section was expanded to illustrate more features of the - PLAIN mechanism. - -Editor's Address - - Kurt D. Zeilenga - OpenLDAP Foundation - - EMail: Kurt@OpenLDAP.org - - - - - - - - - - - - - - - - - - - - - - -Zeilenga Standards Track [Page 10] - -RFC 4616 The PLAIN SASL Mechanism August 2006 - - -Full Copyright Statement - - Copyright (C) The Internet Society (2006). - - This document is subject to the rights, licenses and restrictions - contained in BCP 78, and except as set forth therein, the authors - retain all their rights. - - This document and the information contained herein are provided on an - "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS - OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET - ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE - INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED - WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Intellectual Property - - The IETF takes no position regarding the validity or scope of any - Intellectual Property Rights or other rights that might be claimed to - pertain to the implementation or use of the technology described in - this document or the extent to which any license under such rights - might or might not be available; nor does it represent that it has - made any independent effort to identify any such rights. Information - on the procedures with respect to rights in RFC documents can be - found in BCP 78 and BCP 79. - - Copies of IPR disclosures made to the IETF Secretariat and any - assurances of licenses to be made available, or the result of an - attempt made to obtain a general license or permission for the use of - such proprietary rights by implementers or users of this - specification can be obtained from the IETF on-line IPR repository at - http://www.ietf.org/ipr. - - The IETF invites any interested party to bring to its attention any - copyrights, patents or patent applications, or other proprietary - rights that may cover technology that may be required to implement - this standard. Please address the information to the IETF at - ietf-ipr@ietf.org. - -Acknowledgement - - Funding for the RFC Editor function is provided by the IETF - Administrative Support Activity (IASA). - - - - - - - -Zeilenga Standards Track [Page 11] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4870.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4870.txt deleted file mode 100644 index 55ba5e2e..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4870.txt +++ /dev/null @@ -1,2298 +0,0 @@ - - - - - -Network Working Group M. Delany -Request for Comments: 4870 Yahoo! Inc -Obsoleted By: 4871 May 2007 -Category: Historic - - - Domain-Based Email Authentication Using Public Keys - Advertised in the DNS (DomainKeys) - -Status of This Memo - - This memo defines a Historic Document for the Internet community. It - does not specify an Internet standard of any kind. Distribution of - this memo is unlimited. - -Copyright Notice - - Copyright (C) The IETF Trust (2007). - -Abstract - - "DomainKeys" creates a domain-level authentication framework for - email by using public key technology and the DNS to prove the - provenance and contents of an email. - - This document defines a framework for digitally signing email on a - per-domain basis. The ultimate goal of this framework is to - unequivocally prove and protect identity while retaining the - semantics of Internet email as it is known today. - - Proof and protection of email identity may assist in the global - control of "spam" and "phishing". - - - - - - - - - - - - - - - - - - - -Delany Historic [Page 1] - -RFC 4870 DomainKeys May 2007 - - -Table of Contents - - 1. Introduction ....................................................3 - 1.1. Lack of Authentication Is Damaging Internet Email ..........3 - 1.2. Digitally Signing Email Creates Credible Domain - Authentication .............................................4 - 1.3. Public Keys in the DNS .....................................4 - 1.4. Initial Deployment Is Likely at the Border MTA .............5 - 1.5. Conveying Verification Results to MUAs .....................5 - 1.6. Technical Minutiae Are Not Completely Covered ..............5 - 1.7. Motivation .................................................6 - 1.8. Benefits of DomainKeys .....................................6 - 1.9. Definitions ................................................7 - 1.10. Requirements Notation .....................................8 - 2. DomainKeys Overview .............................................8 - 3. DomainKeys Detailed View ........................................8 - 3.1. Determining the Sending Address of an Email ................9 - 3.2. Retrieving the Public Key Given the Sending Domain ........10 - 3.2.1. Introducing "selectors" ............................10 - 3.2.2. Public Key Signing and Verification Algorithm ......11 - 3.2.3. Public key Representation in the DNS ...............13 - 3.2.4. Key Sizes ..........................................14 - 3.3. Storing the Signature in the Email Header .................15 - 3.4. Preparation of Email for Transit and Signing ..............17 - 3.4.1. Preparation for Transit ............................18 - 3.4.2. Canonicalization for Signing .......................18 - 3.4.2.1. The "simple" Canonicalization Algorithm ...19 - 3.4.2.2. The "nofws" Canonicalization Algorithm ....19 - 3.5. The Signing Process .......................................20 - 3.5.1. Identifying the Sending Domain .....................20 - 3.5.2. Determining Whether an Email Should Be Signed ......21 - 3.5.3. Selecting a Private Key and Corresponding - Selector Information ...............................21 - 3.5.4. Calculating the Signature Value ....................21 - 3.5.5. Prepending the "DomainKey-Signature:" Header .......21 - 3.6. Policy Statement of Sending Domain ........................22 - 3.7. The Verification Process ..................................23 - 3.7.1. Presumption that Headers Are Not Reordered .........24 - 3.7.2. Verification Should Render a Binary Result .........24 - 3.7.3. Selecting the Most Appropriate - "DomainKey-Signature:" Header ......................24 - 3.7.4. Retrieve the Public Key Based on the - Signature Information ..............................26 - 3.7.5. Verify the Signature ...............................27 - 3.7.6. Retrieving Sending Domain Policy ...................27 - 3.7.7. Applying Local Policy ..............................27 - 3.8. Conveying Verification Results to MUAs ....................27 - - - - -Delany Historic [Page 2] - -RFC 4870 DomainKeys May 2007 - - - 4. Example of Use .................................................29 - 4.1. The User Composes an Email ................................29 - 4.2. The Email Is Signed .......................................29 - 4.3. The Email Signature Is Verified ...........................30 - 5. Association with a Certificate Authority .......................31 - 5.1. The "DomainKey-X509:" Header ..............................31 - 6. Topics for Discussion ..........................................32 - 6.1. The Benefits of Selectors .................................32 - 6.2. Canonicalization of Email .................................33 - 6.3. Mailing Lists .............................................33 - 6.4. Roving Users ..............................................33 - 7. Security Considerations ........................................34 - 7.1. DNS .......................................................34 - 7.1.1. The DNS Is Not Currently Secure ....................34 - 7.1.2. DomainKeys Creates Additional DNS Load .............35 - 7.2. Key Management ............................................35 - 7.3. Implementation Risks ......................................35 - 7.4. Privacy Assumptions with Forwarding Addresses .............35 - 7.5. Cryptographic Processing Is Computationally Intensive .....36 - 8. The Trial ......................................................36 - 8.1. Goals .....................................................36 - 8.2. Results of Trial ..........................................37 - 9. Note to Implementors Regarding TXT Records .....................37 - 10. References ....................................................37 - 10.1. Normative References .....................................37 - 10.2. Informative References ...................................38 - Appendix A - Syntax Rules for the Tag=Value Format .............39 - Acknowledgments ................................................40 - -1. Introduction - - This document proposes an authentication framework for email that - stores public keys in the DNS and digitally signs email on a domain - basis. Separate documents discuss how this framework can be extended - to validate the delivery path of email as well as facilitate per-user - authentication. - - The DomainKeys specification was a primary source from which the - DomainKeys Identified Mail [DKIM] specification has been derived. - The purpose in submitting this document is as an historical reference - for deployed implementations written prior to the DKIM specification. - -1.1. Lack of Authentication Is Damaging Internet Email - - Authentication of email is not currently widespread. Not only is it - difficult to prove your own identity, it is impossible to prevent - others from abusing your identity. - - - - -Delany Historic [Page 3] - -RFC 4870 DomainKeys May 2007 - - - While most email exchanges do not intrinsically need authentication - beyond context, it is the rampant abuse of identity by "spammers", - "phishers", and their criminal ilk that makes proof necessary. In - other words, authentication is as much about protection as proof. - - Importantly, the inability to authenticate email effectively - delegates much of the control of the disposition of inbound email to - the sender, since senders can trivially assume any email address. - Creating email authentication is the first step to returning - dispositional control of email to the recipient. - - For the purposes of this document, authentication is seen from a user - perspective, and is intended to answer the question "who sent this - email?" where "who" is the email address the recipient sees and "this - email" is the content that the recipient sees. - -1.2. Digitally Signing Email Creates Credible Domain Authentication - - DomainKeys combines public key cryptography and the DNS to provide - credible domain-level authentication for email. - - When an email claims to originate from a certain domain, DomainKeys - provides a mechanism by which the recipient system can credibly - determine that the email did in fact originate from a person or - system authorized to send email for that domain. - - The authentication provided by DomainKeys works in a number of - scenarios in which other authentication systems fail or create - complex operational requirements. These include the following: - - o forwarded email - - o distributed sending systems - - o authorized third-party sending - - This base definition of DomainKeys is intended to primarily enable - domain-level authenticity. Whether a given message is really sent by - the purported user within the domain is outside the scope of the base - definition. Having said that, this specification includes the - possibility that some domains may wish to delegate fine-grained - authentication to individual users. - -1.3. Public Keys in the DNS - - DomainKeys differs from traditional hierarchical public key systems - in that it leverages the DNS for public key management, placing - complete and direct control of key generation and management with the - - - -Delany Historic [Page 4] - -RFC 4870 DomainKeys May 2007 - - - owner of the domain. That is, if you have control over the DNS for a - given domain, you have control over your DomainKeys for that domain. - - The DNS is proposed as the initial mechanism for publishing public - keys. DomainKeys is specifically designed to be extensible to other - key-fetching services as they become available. - -1.4. Initial Deployment Is Likely at the Border MTA - - For practical reasons, it is expected that initial implementations of - DomainKeys will be deployed on Mail Transfer Agents (MTAs) that - accept or relay email across administrative or organizational - boundaries. There are numerous advantages to deployment at the - border MTA, including: - - o a reduction in the number of MTAs that have to be changed to - support an implementation of DomainKeys - - o a reduction in the number of MTAs involved in transmitting the - email between a signing system and a verifying system, thus - reducing the number of places that can make accidental changes - to the contents - - o removing the need to implement DomainKeys within an internal - email network. - - However, there is no necessity to deploy DomainKeys at the border as - signing and verifying can effectively occur anywhere from the border - MTA right back to the Mail User Agent (MUA). In particular, the best - place to sign an email for many domains is likely to be at the point - of SUBMISSION where the sender is often authenticated through SMTP - AUTH or other identifying mechanisms. - -1.5. Conveying Verification Results to MUAs - - It follows that testing the authenticity of an email results in some - action based on the results of the test. Oftentimes, the action is - to notify the MUA in some way -- typically via a header line. - - The "Domainkey-Status:" header is defined in this specification for - recording authentication results in the email. - -1.6. Technical Minutiae Are Not Completely Covered - - The intent of this specification is to communicate the fundamental - characteristics of DomainKeys for an implementor. However, some - aspects are derived from the functionality of the openssl command - [OPENSSL] and, rather than duplicate that documentation, implementors - - - -Delany Historic [Page 5] - -RFC 4870 DomainKeys May 2007 - - - are expected to understand the mechanics of the openssl command, - sufficient to complete the implementation. - -1.7. Motivation - - The motivation for DomainKeys is to define a simple, cheap, and - "sufficiently effective" mechanism by which domain owners can control - who has authority to send email using their domain. To this end, the - designers of DomainKeys set out to build a framework that: - - o is transparent and compatible with the existing email - infrastructure - - o requires no new infrastructure - - o can be implemented independently of clients in order to reduce - deployment time - - o does not require the use of a central certificate authority - that might impose fees for certificates or introduce delays to - deployment - - o can be deployed incrementally - - While we believe that DomainKeys meets these criteria, it is by no - means a perfect solution. The current Internet imposes considerable - compromises on any similar scheme, and readers should be careful not - to misinterpret the information provided in this document to imply - that DomainKeys makes stronger credibility statements than it is able - to do. - -1.8. Benefits of DomainKeys - - As the reader will discover, DomainKeys is solely an authentication - system. It is not a magic bullet for spam, nor is it an - authorization system, a reputation system, a certification system, or - a trust system. - - However, a strong authentication system such as DomainKeys creates an - unimpeachable framework within which comprehensive authorization - systems, reputations systems, and their ilk can be developed. - - - - - - - - - - -Delany Historic [Page 6] - -RFC 4870 DomainKeys May 2007 - - -1.9. Definitions - - With reference to the following sample email: - - Line Data - Number Bytes Content - ---- --- -------------------------------------------- - 01 46 From: "Joe SixPack" - 02 40 To: "Suzie Q" - 03 25 Subject: Is dinner ready? - 04 43 Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) - 05 40 Comment: This comment has a continuation - 06 51 because this line begins with folding white space - 07 60 Message-ID: <20030712040037.46341@football.example.com> - 08 00 - 09 03 Hi. - 10 00 - 11 37 We lost the game. Are you hungry yet? - 12 00 - 13 04 Joe. - 14 00 - 15 00 - - Line 01 is the first line of the email and the first line of the - headers. - - Lines 05 and 06 constitute the "Comment:" header. - - Line 06 is a continuation header line. - - Line 07 is the last line of the headers. - - Line 08 is the empty line that separates the header from the body. - - Line 09 is the first line of the body. - - Lines 10, 12, 14, and 15 are empty lines. - - Line 13 is the last non-empty line of the email. - - Line 15 is the last line of the body and the last line of the email. - - Lines 01 to 15 constitute the complete email. - - Line 01 is earlier than line 02, and line 02 is later than line 01. - - - - - - -Delany Historic [Page 7] - -RFC 4870 DomainKeys May 2007 - - -1.10. Requirements Notation - - This document occasionally uses terms that appear in capital letters. - When the terms "MUST", "SHOULD", "RECOMMENDED", "MUST NOT", "SHOULD - NOT", and "MAY" appear capitalized, they are being used to indicate - particular requirements of this specification. A discussion of the - meanings of these terms appears in [RFC2119]. - -2. DomainKeys Overview - - Under DomainKeys, a domain owner generates one or more private/public - key pairs that will be used to sign messages originating from that - domain. The domain owner places the public key in his domain - namespace (i.e., in a DNS record associated with that domain), and - makes the private key available to the outbound email system. When - an email is submitted by an authorized user of that domain, the email - system uses the private key to digitally sign the email associated - with the sending domain. The signature is added as a header to the - email, and the message is transferred to its recipients in the usual - way. - - When a message is received with a DomainKey signature header, the - receiving system can verify the signature as follows: - - 1. Extract the signature and claimed sending domain from the - email. - - 2. Fetch the public key from the claimed sending domain namespace. - - 3. Use public key to determine whether the signature of the email - has been generated with the corresponding private key, and thus - whether the email was sent with the authority of the claimed - sending domain. - - In the event that an email arrives without a signature or when the - signature verification fails, the receiving system retrieves the - policy of the claimed sending domain to ascertain the preferred - disposition of such email. - - Armed with this information, the recipient system can apply local - policy based on the results of the signature test. - -3. DomainKeys Detailed View - - This section discusses the specifics of DomainKeys that are needed to - create interoperable implementations. This section answers the - following questions: - - - - -Delany Historic [Page 8] - -RFC 4870 DomainKeys May 2007 - - - Given an email, how is the sending domain determined? - - How is the public key retrieved for a sending domain? - - As email transits the email system, it can potentially go through - a number of changes. Which parts of the email are included in the - signature and how are they protected from such transformations? - - How is the signature represented in the email? - - If a signature is not present, or a verification fails, how does - the recipient determine the policy intent of the sending domain? - - Finally, on verifying the authenticity of an email, how is that - result conveyed to participating MUAs? - - While there are many alternative design choices, most lead to - comparable functionality. The overriding selection criteria used to - choose among the alternatives are as follows: - - o use deployed technology whenever possible - - o prefer ease of implementation - - o avoid trading risk for excessive flexibility or - interoperability - - o include basic flexibility - - Adherence to these criteria implies that some existing email - implementations will require changes to participate in DomainKeys. - Ultimately, some hard choices need to be made regarding which - requirements are more important. - -3.1. Determining the Sending Address of an Email - - The goal of DomainKeys is to give the recipient confidence that the - email originated from the claimed sender. As with much of Internet - email, agreement over what constitutes the "sender" is no easy - matter. Forwarding systems and mailing lists add serious - complications to an overtly simple question. From the point of view - of the recipient, the authenticity claim should be directed at the - domain most visible to the recipient. - - In the first instance, the most visible address is clearly the RFC - 2822 "From:" address [RFC2822]. Therefore, a conforming email MUST - contain a single "From:" header from which an email address with a - domain name can be extracted. - - - -Delany Historic [Page 9] - -RFC 4870 DomainKeys May 2007 - - - A conforming email MAY contain a single RFC 2822 "Sender:" header - from which an email address with a domain name can be extracted. - - If the email has a valid "From:" and a valid "Sender:" header, then - the signer MUST use the sending address in the "Sender:" header. - - If the email has a valid "From:" and no "Sender:" header, then the - signer MUST use the first sending address in the "From:" header. - - In all other cases, a signer MUST NOT sign the email. Implementors - should note that an email with a "Sender:" header and no "From:" - header MUST NOT be signed. - - The domain name in the sending address constitutes the "sending - domain". - -3.2. Retrieving the Public Key Given the Sending Domain - - To avoid namespace conflicts, it is proposed that the DNS namespace - "_domainkey." be reserved within the sending domain for storing - public keys, e.g., if the sending domain is example.net, then the - public keys for that domain are stored in the _domainkey.example.net - namespace. - -3.2.1. Introducing "selectors" - - To support multiple concurrent public keys per sending domain, the - DNS namespace is further subdivided with "selectors". Selectors are - arbitrary names below the "_domainkey." namespace. A selector value - and length MUST be legal in the DNS namespace and in email headers - with the additional provision that they cannot contain a semicolon. - - Examples of namespaces using selectors are as follows: - - "coolumbeach._domainkey.example.net" - "sebastopol._domainkey.example.net" - "reykjavik._domainkey.example.net" - "default._domainkey.example.net" - - and - - "2005.pao._domainkey.example.net" - "2005.sql._domainkey.example.net" - "2005.rhv._domainkey.example.net" - - Periods are allowed in selectors and are to be treated as component - separators. In the case of DNS queries, that means the period - defines subdomain boundaries. - - - -Delany Historic [Page 10] - -RFC 4870 DomainKeys May 2007 - - - The number of public keys and corresponding selectors for each domain - is determined by the domain owner. Many domain owners will be - satisfied with just one selector, whereas administratively - distributed organizations may choose to manage disparate selectors - and key pairs in different regions, or on different email servers. - - Beyond administrative convenience, selectors make it possible to - seamlessly replace public keys on a routine basis. If a domain - wishes to change from using a public key associated with selector - "2005" to a public key associated with selector "2006", it merely - makes sure that both public keys are advertised in the DNS - concurrently for the transition period during which email may be in - transit prior to verification. At the start of the transition - period, the outbound email servers are configured to sign with the - "2006" private key. At the end of the transition period, the "2005" - public key is removed from the DNS. - - While some domains may wish to make selector values well known, - others will want to take care not to allocate selector names in a way - that allows harvesting of data by outside parties. For example, if - per-user keys are issued, the domain owner will need to make the - decision as to whether to make this selector associated directly with - the user name or make it some unassociated random value, such as the - fingerprint of the public key. - -3.2.2. Public Key Signing and Verification Algorithm - - The default signature is an RSA signed SHA1 digest of the complete - email. - - For ease of explanation, the openssl command is used throughout this - document to describe the mechanism by which keys and signatures are - managed. - - One way to generate a 768-bit private key suitable for DomainKeys is - to use openssl like this: - - $ openssl genrsa -out rsa.private 768 - - - - - - - - - - - - - -Delany Historic [Page 11] - -RFC 4870 DomainKeys May 2007 - - - which results in the file rsa.private containing the key information - similar to this: - - -----BEGIN RSA PRIVATE KEY----- - MIIByQIBAAJhAKJ2lzDLZ8XlVambQfMXn3LRGKOD5o6lMIgulclWjZwP56LRqdg5 - ZX15bhc/GsvW8xW/R5Sh1NnkJNyL/cqY1a+GzzL47t7EXzVc+nRLWT1kwTvFNGIo - AUsFUq+J6+OprwIDAQABAmBOX0UaLdWWusYzNol++nNZ0RLAtr1/LKMX3tk1MkLH - +Ug13EzB2RZjjDOWlUOY98yxW9/hX05Uc9V5MPo+q2Lzg8wBtyRLqlORd7pfxYCn - Kapi2RPMcR1CxEJdXOkLCFECMQDTO0fzuShRvL8q0m5sitIHlLA/L+0+r9KaSRM/ - 3WQrmUpV+fAC3C31XGjhHv2EuAkCMQDE5U2nP2ZWVlSbxOKBqX724amoL7rrkUew - ti9TEjfaBndGKF2yYF7/+g53ZowRkfcCME/xOJr58VN17pejSl1T8Icj88wGNHCs - FDWGAH4EKNwDSMnfLMG4WMBqd9rzYpkvGQIwLhAHDq2CX4hq2tZAt1zT2yYH7tTb - weiHAQxeHe0RK+x/UuZ2pRhuoSv63mwbMLEZAjAP2vy6Yn+f9SKw2mKuj1zLjEhG - 6ppw+nKD50ncnPoP322UMxVNG4Eah0GYJ4DLP0U= - -----END RSA PRIVATE KEY----- - - Once a private key has been generated, the openssl command can be - used to sign an appropriately prepared email, like this: - - $ openssl dgst -sign rsa.private -sha1 - To: "Suzie Q" - Subject: Is dinner ready? - Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) - Message-ID: <20030712040037.46341.5F8J@football.example.com> - - Hi. - - We lost the game. Are you hungry yet? - - Joe. - -4.2. The Email Is Signed - - This email is signed by the football.example.com outbound email - server and now looks like this: - - DomainKey-Signature: a=rsa-sha1; s=brisbane; d=football.example.com; - c=simple; q=dns; - b=dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZ - VoG4ZHRNiYzR; - Received: from dsl-10.2.3.4.football.example.com [10.2.3.4] - by submitserver.football.example.com with SUBMISSION; - Fri, 11 Jul 2003 21:01:54 -0700 (PDT) - From: "Joe SixPack" - To: "Suzie Q" - Subject: Is dinner ready? - Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) - Message-ID: <20030712040037.46341.5F8J@football.example.com> - - Hi. - - We lost the game. Are you hungry yet? - - Joe. - - The signing email server requires access to the private key - associated with the "brisbane" selector to generate this signature. - Distribution and management of private keys are outside the scope of - this document. - - - -Delany Historic [Page 29] - -RFC 4870 DomainKeys May 2007 - - -4.3. The Email Signature Is Verified - - The signature is normally verified by an inbound SMTP server or - possibly the final delivery agent. However, intervening MTAs can - also perform this verification if they choose to do so. - - The verification process uses the domain "football.example.com" - extracted from the "From:" header and the selector "brisbane" from - the "DomainKey-Signature:" header to form the DNS TXT query for: - - brisbane._domainkey.football.example.com - - Since there is no "h" tag in the "DomainKey-Signature:" header, - signature verification starts with the line following the - "DomainKey-Signature:" line. The email is canonically prepared for - verifying with the "simple" method. - - The result of the query and subsequent verification of the signature - is stored in the "DomainKey-Status:" header line. After successful - verification, the email looks like this: - - DomainKey-Status: good - from=joe@football.example.com; domainkeys=pass - Received: from mout23.brisbane.football.example.com (192.168.1.1) - by shopping.example.net with SMTP; - Fri, 11 Jul 2003 21:01:59 -0700 (PDT) - DomainKey-Signature: a=rsa-sha1; s=brisbane; d=football.example.com; - c=simple; q=dns; - b=dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZ - VoG4ZHRNiYzR; - Received: from dsl-10.2.3.4.network.example.com [10.2.3.4] - by submitserver.example.com with SUBMISSION; - Fri, 11 Jul 2003 21:01:54 -0700 (PDT) - From: "Joe SixPack" - To: "Suzie Q" - Subject: Is dinner ready? - Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) - Message-ID: <20030712040037.46341.5F8J@football.example.com> - - Hi. - - We lost the game. Are you hungry yet? - - Joe. - - - - - - - -Delany Historic [Page 30] - -RFC 4870 DomainKeys May 2007 - - -5. Association with a Certificate Authority - - A fundamental aspect of DomainKeys is that public keys are generated - and advertised by each domain at no additional cost. This - accessibility markedly differs from traditional Public Key - Infrastructures where there is typically a Certificate Authority (CA) - who validates an applicant and issues a signed certificate -- - containing their public key -- often for a recurring fee. - - While CAs do impose costs, they also have the potential to provide - additional value as part of their certification process. Consider - financial institutions, public utilities, law enforcement agencies, - and the like. In many cases, such entities justifiably need to - discriminate themselves above and beyond the authentication that - DomainKeys offers. - - Creating a link between DomainKeys and CA-issued certificates has the - potential to access additional authentication mechanisms that are - more authoritative than domain-owner-issued authentication. It is - well beyond the scope of this specification to describe such - authorities apart from defining how the linkage could be achieved - with the "DomainKey-X509:" header. - -5.1. The "DomainKey-X509:" Header - - The "DomainKey-X509:" header provides a link between the public key - used to sign the email and the certificate issued by a CA. - - The exact content, syntax, and semantics of this header are yet to be - resolved. One possibility is that this header contains an encoding - of the certificate issued by a CA. Another possibility is that this - header contains a URL that points to a certificate issued by a CA. - - In either case, this header can only be consulted if the signature - verifies and MUST be part of the content signed by the corresponding - "DomainKey-Signature:" header. Furthermore, it is likely that MUAs - rather than MTAs will confirm that the link to the CA-issued - certificate is valid. In part, this is because many MUAs already - have built-in capabilities as a consequence of Secure/Multipurpose - Internet Mail Extensions (S/MIME) [SMIME] and Secure Socket Layer - (SSL) [SSL] support. - - The proof of linkage is made by testing that the public key in the - certificate matches the public key used to sign the email. - - - - - - - -Delany Historic [Page 31] - -RFC 4870 DomainKeys May 2007 - - - An example of an email containing the "DomainKey-X509:" header is: - - DomainKey-Signature: a=rsa-sha1; s=statements; - d=largebank.example.com; c=simple; q=dns; - b=dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZ - VoG4ZHRNiYzR; - DomainKey-X509: https://ca.example.net/largebank.example.com - From: "Large Bank" - To: "Suzie Q" - Subject: Statement for Account: 1234-5678 - ... - - The format of the retrieved value from the URL is not yet defined, - nor is the determination of valid CAs. - - The whole matter of linkage to CA-issued certificates is one aspect - of DomainKeys that needs to be resolved with relevant CA's and - certificate-issuing entities. The primary point is that a link is - possible to a higher authority. - -6. Topics for Discussion - -6.1. The Benefits of Selectors - - Selectors are at the heart of the flexibility of DomainKeys. A - domain administrator is free to use a single DomainKey for all - outbound mail. Alternatively, the domain administrator may use many - DomainKeys differentiated by selector and assign each key to - different servers. - - For example, a large outbound email farm might have a unique - DomainKey for each server, and thus their DNS will advertise - potentially hundreds of keys via their unique selectors. - - Another example is a corporate email administrator who might generate - a separate DomainKey for each regional office email server. - - In essence, selectors allow a domain owner to distribute authority to - send on behalf of that domain. Combined with the ability to revoke - by removal or Time to Live (TTL) expiration, a domain owner has - coarse-grained control over the duration of the distributed - authority. - - Selectors are particularly useful for domain owners who want to - contract a third-party mailing system to send a particular set of - mail. The domain owner can generate a special key pair and selector - just for this mail-out. The domain owner has to provide the private - key and selector to the third party for the life of the mail-out. - - - -Delany Historic [Page 32] - -RFC 4870 DomainKeys May 2007 - - - However, as soon as the mail-out is completely delivered, the domain - owner can revoke the public key by the simple expedient of removing - the entry from the DNS. - -6.2. Canonicalization of Email - - It is an unfortunate fact that some email software routinely (and - often unnecessarily) transforms email as it transits through the - network. Such transformations conflict with the fundamental purpose - of cryptographic signatures - to detect modifications. - - While two canonicalization algorithms are defined in this - specification, the primary goal of "nofws" is to provide a transition - path to "simple". With a mixture of "simple" and "nofws" email, a - receiver can determine which systems are modifying email in ways that - cause the signature to fail and thus provide feedback to the - modifying system. - -6.3. Mailing Lists - - Integrating existing Mailing List Managers (MLMs) into the DomainKeys - authentication system is a complicated area, as the behavior of MLMs - is highly variable. Essentially, there are two types of MLMs under - consideration: those that modify email to such an extent that - verification of the original content is not possible, and those that - make minimal or no modifications to an email. - - MLMs that modify email in a way that causes verification to fail MUST - prepend a "Sender:" header and SHOULD prepend a "List-ID:" header - prior to signing for distribution to list recipients. - - A participating SUBMISSION server can deduce the need to re-sign such - an email by the presence of a "Sender:" or "List-ID:" header from an - authorized submission. - - MLMs that do not modify email in a way that causes verification to - fail MAY perform the same actions as a modifying MLM. - -6.4. Roving Users - - One scenario that presents a particular problem with any form of - email authentication, including DomainKeys, is the roving user: a - user who is obliged to use a third-party SUBMISSION service when - unable to connect to the user's own SUBMISSION service. The classic - example cited is a traveling salesperson being redirected to a hotel - email server to send email. - - - - - -Delany Historic [Page 33] - -RFC 4870 DomainKeys May 2007 - - - As far as DomainKeys is concerned, email of this nature clearly - originates from an email server that does not have authority to send - on behalf of the domain of the salesperson and is therefore - indistinguishable from a forgery. While DomainKeys does not - prescribe any specific action for such email, it is likely that over - time, such email will be treated as second-class email. - - The typical solution offered to roving users is to submit email via - an authorized server for their domain -- perhaps via a Virtual - Private Network (VPN) or a web interface or even SMTP AUTH back to a - SUBMISSION server. - - While these are perfectly acceptable solutions for many, they are not - necessarily solutions that are available or possible for all such - users. - - One possible way to address the needs of this contingent of - potentially disenfranchised users is for the domain to issue per-user - DomainKeys. Per-user DomainKeys are identified by a non-empty "g" - tag value in the corresponding DNS record. - -7. Security Considerations - -7.1. DNS - - DomainKeys is primarily a security mechanism. Its core purpose is to - make claims about email authentication in a credible way. However, - DomainKeys, like virtually all Internet applications, relies on the - DNS, which has well-known security flaws [RFC3833]. - -7.1.1. The DNS Is Not Currently Secure - - While the DNS is currently insecure, it is expected that the security - problems should and will be solved by DNS Security (DNSSEC) [DNSSEC], - and all users of the DNS will reap the benefit of that work. - - Secondly, the types of DNS attacks relevant to DomainKeys are very - costly and are far less rewarding than DNS attacks on other Internet - applications. - - To systematically thwart the intent of DomainKeys, an attacker must - conduct a very costly and very extensive attack on many parts of the - DNS over an extended period. No one knows for sure how attackers - will respond; however, the cost/benefit of conducting prolonged DNS - attacks of this nature is expected to be uneconomical. - - Finally, DomainKeys is only intended as a "sufficient" method of - proving authenticity. It is not intended to provide strong - - - -Delany Historic [Page 34] - -RFC 4870 DomainKeys May 2007 - - - cryptographic proof about authorship or contents. Other technologies - such as GnuPG and S/MIME address those requirements. - -7.1.2. DomainKeys Creates Additional DNS Load - - A second security issue related to the DNS revolves around the - increased DNS traffic as a consequence of fetching selector-based - data, as well as fetching sending domain policy. Widespread - deployment of DomainKeys will result in a significant increase in DNS - queries to the claimed sending domain. In the case of forgeries on a - large scale, DNS servers could see a substantial increase in queries. - -7.2. Key Management - - All public key systems require management of key pairs. Private keys - in particular need to be securely distributed to each signing mail - server and protected on those servers. For those familiar with SSL, - the key management issues are similar to those of managing SSL - certificates. Poor key management may result in unauthorized access - to private keys, which in essence gives unauthorized access to your - identity. - -7.3. Implementation Risks - - It is well recognized in cryptographic circles that many security - failures are caused by poor implementations rather than poor - algorithms. For example, early SSL implementations were vulnerable - because the implementors used predictable "random numbers". - - While some MTA software already supports various cryptographic - techniques, such as TLS, many do not. This proposal introduces - cryptographic requirements into MTA software that implies a much - higher duty of care to manage the increased risk. - - There are numerous articles, books, courses, and consultants that - help programming security applications. Potential implementors are - strongly encouraged to avail themselves of all possible resources to - ensure secure implementations. - -7.4. Privacy Assumptions with Forwarding Addresses - - Some people believe that they can achieve anonymity by using an email - forwarding service. While this has never been particularly true, as - bounces, over-quota messages, vacation messages, and web bugs all - conspire to expose IP addresses and domain names associated with the - delivery path, the DNS queries that are required to verify DomainKeys - signature can provide additional information to the sender. - - - - -Delany Historic [Page 35] - -RFC 4870 DomainKeys May 2007 - - - In particular, as mail is forwarded through the mail network, the DNS - queries for the selector will typically identify the DNS cache used - by the forwarding and delivery MTAs. - -7.5. Cryptographic Processing Is Computationally Intensive - - Verifying a signature is computationally significant. Early - indications are that a typical mail server can expect to increase CPU - demands by 8-15 percent. While this increased demand is modest - compared to other common mail processing costs -- such as Bayesian - filtering -- any increase in resource requirements can make a - denial-of-service attack more effective against a mail system. - - A constraining factor of such attacks is that the net computational - cost of verifying is bounded by the maximum key size allowed by this - specification and is essentially linear to the rate at which mail is - accepted by the verifying system. Consequently, the additional - computational cost may augment a denial-of-service attack, but it - does not add a non-linear component to such attacks. - -8. The Trial - - The DomainKeys protocol was deployed as a trial to better understand - the implications of deploying wide-scale cryptographic email - authentication. - - Open Source implementations were made available at various places, - particularly Source Forge [SOURCEFORGE], which includes links to - numerous implementations, both Open Source and commercial. - -8.1. Goals - - The primary goals of the trial were to: - - o understand the operational implications of running a DNS-based - public key system for email - - o measure the effectiveness of the canonicalization algorithms - - o experiment with possible per-user key deployment models - - o fully define the semantics of the "DomainKey-X509:" header - - - - - - - - - -Delany Historic [Page 36] - -RFC 4870 DomainKeys May 2007 - - -8.2. Results of Trial - - The DomainKeys trial ran for approximately 2 years, in which time - numerous large ISPs and many thousands of smaller domains - participated in signing or verifying with DomainKeys. The low order - numbers are that at least one billion DomainKey signed emails transit - the Internet each day between some 12,000 participating domains. - - The operational and development experience of that trial was applied - to DKIM. - -9. Note to Implementors Regarding TXT Records - - The DNS is very flexible in that it is possible to have multiple TXT - records for a single name and for those TXT records to contain - multiple strings. - - In all cases, implementors of DomainKeys should expect a single TXT - record for any particular name. If multiple TXT records are - returned, the implementation is free to pick any single TXT record as - the authoritative data. In other words, if a name server returns - different TXT records for the same name, it can expect unpredictable - results. - - Within a single TXT record, implementors should concatenate multiple - strings in the order presented and ignore string boundaries. Note - that a number of popular DNS command-line tools render multiple - strings as separately quoted strings, which can be misleading to a - novice implementor. - -10. References - -10.1. Normative References - - [BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data - Encodings", RFC 4648, October 2006. - - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, March 1997. - - [PEM] Linn, J., "Privacy Enhancement for Internet Electronic - Mail: Part I: Message Encryption and Authentication - Procedures", RFC 1421 February, 1993. - - - - - - - - -Delany Historic [Page 37] - -RFC 4870 DomainKeys May 2007 - - -10.2. Informative References - - [DKIM] Allman, E., Callas, J., Delany, M., Libbey, M., Fenton, - J., and M. Thomas, "DomainKeys Identified Mail (DKIM) - Signatures", RFC 4871, May 2007. - - [DNSSEC] http://www.ietf.org/html.charters/dnsext-charter.html - - [OPENSSL] http://www.openssl.org - - [RFC2822] Resnick, P., Editor, "Internet Message Format", RFC - 2822, April 2001. - - [RFC3833] Atkins, D. and R. Austein, "Threat Analysis of the - Domain Name System (DNS)", RFC 3833, August 2004. - - [SMIME] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail - Extensions (S/MIME) Version 3.1 Message Specification", - RFC 3851, July 2004. - - [SOURCEFORGE] http://domainkeys.sourceforge.net - - [SSL] http://wp.netscape.com/security/techbriefs/ssl.html - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Delany Historic [Page 38] - -RFC 4870 DomainKeys May 2007 - - -Appendix A - Syntax Rules for the Tag=Value Format - - A simple tag=value syntax is used to encode data in the response - values for DNS queries as well as headers embedded in emails. This - section summarized the syntactic rules for this encoding: - - o A tag=value pair consists of three tokens, a "tag", the "=" - character, and the "value" - - o A tag MUST be one character long and MUST be a lowercase - alphabetic character - - o Duplicate tags are not allowed - - o A value MUST only consist of characters that are valid in RFC - 2822 headers and DNS TXT records and are within the ASCII range - of characters from SPACE (0x20) to TILDE (0x7E) inclusive. - Values MUST NOT contain a semicolon but they may contain "=" - characters. - - o A tag=value pair MUST be terminated by a semicolon or the end - of the data - - o Values MUST be processed as case sensitive unless the specific - tag description of semantics imply case insensitivity. - - o Values MAY be zero bytes long - - o Whitespace MAY surround any of the tokens; however, whitespace - within a value MUST be retained unless explicitly excluded by - the specific tag description. Currently, the only tags that - specifically ignore embedded whitespace are the "b" and "h" - tags in the "DomainKey-Signature:" header. - - o Tag=value pairs that represent the default value MAY be - included to aid legibility. - - o Unrecognized tags MUST be ignored - - - - - - - - - - - - - -Delany Historic [Page 39] - -RFC 4870 DomainKeys May 2007 - - -Acknowledgments - - The editor wishes to thank Russ Allbery, Eric Allman, Edwin Aoki, - Claus Asmann, Steve Atkins, Jon Callas, Dave Crocker, Michael Cudahy, - Jutta Degener, Timothy Der, Jim Fenton, Duncan Findlay, Phillip - Hallam-Baker, Murray S. Kucherawy, John Levine, Miles Libbey, David - Margrave, Justin Mason, David Mayne, Russell Nelson, Juan Altmayer - Pizzorno, Blake Ramsdell, Scott Renfro, the Spamhaus.org team, Malte - S. Stretz, Robert Sanders, Bradley Taylor, and Rand Wacker for their - valuable suggestions and constructive criticism. - -Author's Address - - Mark Delany - Yahoo! Inc - 701 First Avenue - Sunnyvale, CA 95087 - USA - - EMail: markd+domainkeys@yahoo-inc.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Delany Historic [Page 40] - -RFC 4870 DomainKeys May 2007 - - -Full Copyright Statement - - Copyright (C) The IETF Trust (2007). - - This document is subject to the rights, licenses and restrictions - contained in BCP 78, and except as set forth therein, the authors - retain all their rights. - - This document and the information contained herein are provided on an - "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS - OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND - THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF - THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED - WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Intellectual Property - - The IETF takes no position regarding the validity or scope of any - Intellectual Property Rights or other rights that might be claimed to - pertain to the implementation or use of the technology described in - this document or the extent to which any license under such rights - might or might not be available; nor does it represent that it has - made any independent effort to identify any such rights. Information - on the procedures with respect to rights in RFC documents can be - found in BCP 78 and BCP 79. - - Copies of IPR disclosures made to the IETF Secretariat and any - assurances of licenses to be made available, or the result of an - attempt made to obtain a general license or permission for the use of - such proprietary rights by implementers or users of this - specification can be obtained from the IETF on-line IPR repository at - http://www.ietf.org/ipr. - - The IETF invites any interested party to bring to its attention any - copyrights, patents or patent applications, or other proprietary - rights that may cover technology that may be required to implement - this standard. Please address the information to the IETF at - ietf-ipr@ietf.org. - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - -Delany Historic [Page 41] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4871.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4871.txt deleted file mode 100644 index 80410e61..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4871.txt +++ /dev/null @@ -1,3978 +0,0 @@ - - - - - -Network Working Group E. Allman -Request for Comments: 4871 Sendmail, Inc. -Obsoletes: 4870 J. Callas -Category: Standards Track PGP Corporation - M. Delany - M. Libbey - Yahoo! Inc - J. Fenton - M. Thomas - Cisco Systems, Inc. - May 2007 - - - DomainKeys Identified Mail (DKIM) Signatures - -Status of This Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The IETF Trust (2007). - -Abstract - - DomainKeys Identified Mail (DKIM) defines a domain-level - authentication framework for email using public-key cryptography and - key server technology to permit verification of the source and - contents of messages by either Mail Transfer Agents (MTAs) or Mail - User Agents (MUAs). The ultimate goal of this framework is to permit - a signing domain to assert responsibility for a message, thus - protecting message signer identity and the integrity of the messages - they convey while retaining the functionality of Internet email as it - is known today. Protection of email identity may assist in the - global control of "spam" and "phishing". - - - - - - - - - - - - -Allman, et al. Standards Track [Page 1] - -RFC 4871 DKIM Signatures May 2007 - - -Table of Contents - - 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 1.1. Signing Identity . . . . . . . . . . . . . . . . . . . . . 5 - 1.2. Scalability . . . . . . . . . . . . . . . . . . . . . . . 5 - 1.3. Simple Key Management . . . . . . . . . . . . . . . . . . 5 - 2. Terminology and Definitions . . . . . . . . . . . . . . . . . 5 - 2.1. Signers . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 2.2. Verifiers . . . . . . . . . . . . . . . . . . . . . . . . 6 - 2.3. Whitespace . . . . . . . . . . . . . . . . . . . . . . . . 6 - 2.4. Common ABNF Tokens . . . . . . . . . . . . . . . . . . . . 6 - 2.5. Imported ABNF Tokens . . . . . . . . . . . . . . . . . . . 7 - 2.6. DKIM-Quoted-Printable . . . . . . . . . . . . . . . . . . 7 - 3. Protocol Elements . . . . . . . . . . . . . . . . . . . . . . 8 - 3.1. Selectors . . . . . . . . . . . . . . . . . . . . . . . . 8 - 3.2. Tag=Value Lists . . . . . . . . . . . . . . . . . . . . . 10 - 3.3. Signing and Verification Algorithms . . . . . . . . . . . 11 - 3.4. Canonicalization . . . . . . . . . . . . . . . . . . . . . 13 - 3.5. The DKIM-Signature Header Field . . . . . . . . . . . . . 17 - 3.6. Key Management and Representation . . . . . . . . . . . . 25 - 3.7. Computing the Message Hashes . . . . . . . . . . . . . . . 29 - 3.8. Signing by Parent Domains . . . . . . . . . . . . . . . . 31 - 4. Semantics of Multiple Signatures . . . . . . . . . . . . . . . 32 - 4.1. Example Scenarios . . . . . . . . . . . . . . . . . . . . 32 - 4.2. Interpretation . . . . . . . . . . . . . . . . . . . . . . 33 - 5. Signer Actions . . . . . . . . . . . . . . . . . . . . . . . . 34 - 5.1. Determine Whether the Email Should Be Signed and by - Whom . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 - 5.2. Select a Private Key and Corresponding Selector - Information . . . . . . . . . . . . . . . . . . . . . . . 35 - 5.3. Normalize the Message to Prevent Transport Conversions . . 35 - 5.4. Determine the Header Fields to Sign . . . . . . . . . . . 36 - 5.5. Recommended Signature Content . . . . . . . . . . . . . . 38 - 5.6. Compute the Message Hash and Signature . . . . . . . . . . 39 - 5.7. Insert the DKIM-Signature Header Field . . . . . . . . . . 40 - 6. Verifier Actions . . . . . . . . . . . . . . . . . . . . . . . 40 - 6.1. Extract Signatures from the Message . . . . . . . . . . . 41 - 6.2. Communicate Verification Results . . . . . . . . . . . . . 46 - 6.3. Interpret Results/Apply Local Policy . . . . . . . . . . . 47 - 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 48 - 7.1. DKIM-Signature Tag Specifications . . . . . . . . . . . . 48 - 7.2. DKIM-Signature Query Method Registry . . . . . . . . . . . 49 - 7.3. DKIM-Signature Canonicalization Registry . . . . . . . . . 49 - 7.4. _domainkey DNS TXT Record Tag Specifications . . . . . . . 50 - 7.5. DKIM Key Type Registry . . . . . . . . . . . . . . . . . . 50 - 7.6. DKIM Hash Algorithms Registry . . . . . . . . . . . . . . 51 - 7.7. DKIM Service Types Registry . . . . . . . . . . . . . . . 51 - 7.8. DKIM Selector Flags Registry . . . . . . . . . . . . . . . 52 - - - -Allman, et al. Standards Track [Page 2] - -RFC 4871 DKIM Signatures May 2007 - - - 7.9. DKIM-Signature Header Field . . . . . . . . . . . . . . . 52 - 8. Security Considerations . . . . . . . . . . . . . . . . . . . 52 - 8.1. Misuse of Body Length Limits ("l=" Tag) . . . . . . . . . 52 - 8.2. Misappropriated Private Key . . . . . . . . . . . . . . . 53 - 8.3. Key Server Denial-of-Service Attacks . . . . . . . . . . . 54 - 8.4. Attacks Against the DNS . . . . . . . . . . . . . . . . . 54 - 8.5. Replay Attacks . . . . . . . . . . . . . . . . . . . . . . 55 - 8.6. Limits on Revoking Keys . . . . . . . . . . . . . . . . . 55 - 8.7. Intentionally Malformed Key Records . . . . . . . . . . . 56 - 8.8. Intentionally Malformed DKIM-Signature Header Fields . . . 56 - 8.9. Information Leakage . . . . . . . . . . . . . . . . . . . 56 - 8.10. Remote Timing Attacks . . . . . . . . . . . . . . . . . . 56 - 8.11. Reordered Header Fields . . . . . . . . . . . . . . . . . 56 - 8.12. RSA Attacks . . . . . . . . . . . . . . . . . . . . . . . 56 - 8.13. Inappropriate Signing by Parent Domains . . . . . . . . . 57 - 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 57 - 9.1. Normative References . . . . . . . . . . . . . . . . . . . 57 - 9.2. Informative References . . . . . . . . . . . . . . . . . . 58 - Appendix A. Example of Use (INFORMATIVE) . . . . . . . . . . . . 60 - A.1. The user composes an email . . . . . . . . . . . . . . . . 60 - A.2. The email is signed . . . . . . . . . . . . . . . . . . . 61 - A.3. The email signature is verified . . . . . . . . . . . . . 61 - Appendix B. Usage Examples (INFORMATIVE) . . . . . . . . . . . . 62 - B.1. Alternate Submission Scenarios . . . . . . . . . . . . . . 63 - B.2. Alternate Delivery Scenarios . . . . . . . . . . . . . . . 65 - Appendix C. Creating a Public Key (INFORMATIVE) . . . . . . . . . 67 - Appendix D. MUA Considerations . . . . . . . . . . . . . . . . . 68 - Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 69 - - - - - - - - - - - - - - - - - - - - - - - -Allman, et al. Standards Track [Page 3] - -RFC 4871 DKIM Signatures May 2007 - - -1. Introduction - - DomainKeys Identified Mail (DKIM) defines a mechanism by which email - messages can be cryptographically signed, permitting a signing domain - to claim responsibility for the introduction of a message into the - mail stream. Message recipients can verify the signature by querying - the signer's domain directly to retrieve the appropriate public key, - and thereby confirm that the message was attested to by a party in - possession of the private key for the signing domain. - - The approach taken by DKIM differs from previous approaches to - message signing (e.g., Secure/Multipurpose Internet Mail Extensions - (S/MIME) [RFC1847], OpenPGP [RFC2440]) in that: - - o the message signature is written as a message header field so that - neither human recipients nor existing MUA (Mail User Agent) - software is confused by signature-related content appearing in the - message body; - - o there is no dependency on public and private key pairs being - issued by well-known, trusted certificate authorities; - - o there is no dependency on the deployment of any new Internet - protocols or services for public key distribution or revocation; - - o signature verification failure does not force rejection of the - message; - - o no attempt is made to include encryption as part of the mechanism; - - o message archiving is not a design goal. - - DKIM: - - o is compatible with the existing email infrastructure and - transparent to the fullest extent possible; - - o requires minimal new infrastructure; - - o can be implemented independently of clients in order to reduce - deployment time; - - o can be deployed incrementally; - - o allows delegation of signing to third parties. - - - - - - -Allman, et al. Standards Track [Page 4] - -RFC 4871 DKIM Signatures May 2007 - - -1.1. Signing Identity - - DKIM separates the question of the identity of the signer of the - message from the purported author of the message. In particular, a - signature includes the identity of the signer. Verifiers can use the - signing information to decide how they want to process the message. - The signing identity is included as part of the signature header - field. - - INFORMATIVE RATIONALE: The signing identity specified by a DKIM - signature is not required to match an address in any particular - header field because of the broad methods of interpretation by - recipient mail systems, including MUAs. - -1.2. Scalability - - DKIM is designed to support the extreme scalability requirements that - characterize the email identification problem. There are currently - over 70 million domains and a much larger number of individual - addresses. DKIM seeks to preserve the positive aspects of the - current email infrastructure, such as the ability for anyone to - communicate with anyone else without introduction. - -1.3. Simple Key Management - - DKIM differs from traditional hierarchical public-key systems in that - no Certificate Authority infrastructure is required; the verifier - requests the public key from a repository in the domain of the - claimed signer directly rather than from a third party. - - The DNS is proposed as the initial mechanism for the public keys. - Thus, DKIM currently depends on DNS administration and the security - of the DNS system. DKIM is designed to be extensible to other key - fetching services as they become available. - -2. Terminology and Definitions - - This section defines terms used in the rest of the document. Syntax - descriptions use the form described in Augmented BNF for Syntax - Specifications [RFC4234]. - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", - "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this - document are to be interpreted as described in [RFC2119]. - - - - - - - -Allman, et al. Standards Track [Page 5] - -RFC 4871 DKIM Signatures May 2007 - - -2.1. Signers - - Elements in the mail system that sign messages on behalf of a domain - are referred to as signers. These may be MUAs (Mail User Agents), - MSAs (Mail Submission Agents), MTAs (Mail Transfer Agents), or other - agents such as mailing list exploders. In general, any signer will - be involved in the injection of a message into the message system in - some way. The key issue is that a message must be signed before it - leaves the administrative domain of the signer. - -2.2. Verifiers - - Elements in the mail system that verify signatures are referred to as - verifiers. These may be MTAs, Mail Delivery Agents (MDAs), or MUAs. - In most cases it is expected that verifiers will be close to an end - user (reader) of the message or some consuming agent such as a - mailing list exploder. - -2.3. Whitespace - - There are three forms of whitespace: - - o WSP represents simple whitespace, i.e., a space or a tab character - (formal definition in [RFC4234]). - - o LWSP is linear whitespace, defined as WSP plus CRLF (formal - definition in [RFC4234]). - - o FWS is folding whitespace. It allows multiple lines separated by - CRLF followed by at least one whitespace, to be joined. - - The formal ABNF for these are (WSP and LWSP are given for information - only): - - WSP = SP / HTAB - LWSP = *(WSP / CRLF WSP) - FWS = [*WSP CRLF] 1*WSP - - The definition of FWS is identical to that in [RFC2822] except for - the exclusion of obs-FWS. - -2.4. Common ABNF Tokens - - The following ABNF tokens are used elsewhere in this document: - hyphenated-word = ALPHA [ *(ALPHA / DIGIT / "-") (ALPHA / DIGIT) ] - base64string = 1*(ALPHA / DIGIT / "+" / "/" / [FWS]) - [ "=" [FWS] [ "=" [FWS] ] ] - - - - -Allman, et al. Standards Track [Page 6] - -RFC 4871 DKIM Signatures May 2007 - - -2.5. Imported ABNF Tokens - - The following tokens are imported from other RFCs as noted. Those - RFCs should be considered definitive. - - The following tokens are imported from [RFC2821]: - - o "Local-part" (implementation warning: this permits quoted strings) - - o "sub-domain" - - The following tokens are imported from [RFC2822]: - - o "field-name" (name of a header field) - - o "dot-atom-text" (in the Local-part of an email address) - - The following tokens are imported from [RFC2045]: - - o "qp-section" (a single line of quoted-printable-encoded text) - - o "hex-octet" (a quoted-printable encoded octet) - - INFORMATIVE NOTE: Be aware that the ABNF in RFC 2045 does not obey - the rules of RFC 4234 and must be interpreted accordingly, - particularly as regards case folding. - - Other tokens not defined herein are imported from [RFC4234]. These - are intuitive primitives such as SP, HTAB, WSP, ALPHA, DIGIT, CRLF, - etc. - -2.6. DKIM-Quoted-Printable - - The DKIM-Quoted-Printable encoding syntax resembles that described in - Quoted-Printable [RFC2045], Section 6.7: any character MAY be encoded - as an "=" followed by two hexadecimal digits from the alphabet - "0123456789ABCDEF" (no lowercase characters permitted) representing - the hexadecimal-encoded integer value of that character. All control - characters (those with values < %x20), 8-bit characters (values > - %x7F), and the characters DEL (%x7F), SPACE (%x20), and semicolon - (";", %x3B) MUST be encoded. Note that all whitespace, including - SPACE, CR, and LF characters, MUST be encoded. After encoding, FWS - MAY be added at arbitrary locations in order to avoid excessively - long lines; such whitespace is NOT part of the value, and MUST be - removed before decoding. - - - - - - -Allman, et al. Standards Track [Page 7] - -RFC 4871 DKIM Signatures May 2007 - - - ABNF: - - dkim-quoted-printable = - *(FWS / hex-octet / dkim-safe-char) - ; hex-octet is from RFC 2045 - dkim-safe-char = %x21-3A / %x3C / %x3E-7E - ; '!' - ':', '<', '>' - '~' - ; Characters not listed as "mail-safe" in - ; RFC 2049 are also not recommended. - - INFORMATIVE NOTE: DKIM-Quoted-Printable differs from Quoted- - Printable as defined in RFC 2045 in several important ways: - - 1. Whitespace in the input text, including CR and LF, must be - encoded. RFC 2045 does not require such encoding, and does - not permit encoding of CR or LF characters that are part of a - CRLF line break. - - 2. Whitespace in the encoded text is ignored. This is to allow - tags encoded using DKIM-Quoted-Printable to be wrapped as - needed. In particular, RFC 2045 requires that line breaks in - the input be represented as physical line breaks; that is not - the case here. - - 3. The "soft line break" syntax ("=" as the last non-whitespace - character on the line) does not apply. - - 4. DKIM-Quoted-Printable does not require that encoded lines be - no more than 76 characters long (although there may be other - requirements depending on the context in which the encoded - text is being used). - -3. Protocol Elements - - Protocol Elements are conceptual parts of the protocol that are not - specific to either signers or verifiers. The protocol descriptions - for signers and verifiers are described in later sections (Signer - Actions (Section 5) and Verifier Actions (Section 6)). NOTE: This - section must be read in the context of those sections. - -3.1. Selectors - - To support multiple concurrent public keys per signing domain, the - key namespace is subdivided using "selectors". For example, - selectors might indicate the names of office locations (e.g., - "sanfrancisco", "coolumbeach", and "reykjavik"), the signing date - (e.g., "january2005", "february2005", etc.), or even the individual - user. - - - -Allman, et al. Standards Track [Page 8] - -RFC 4871 DKIM Signatures May 2007 - - - Selectors are needed to support some important use cases. For - example: - - o Domains that want to delegate signing capability for a specific - address for a given duration to a partner, such as an advertising - provider or other outsourced function. - - o Domains that want to allow frequent travelers to send messages - locally without the need to connect with a particular MSA. - - o "Affinity" domains (e.g., college alumni associations) that - provide forwarding of incoming mail, but that do not operate a - mail submission agent for outgoing mail. - - Periods are allowed in selectors and are component separators. When - keys are retrieved from the DNS, periods in selectors define DNS - label boundaries in a manner similar to the conventional use in - domain names. Selector components might be used to combine dates - with locations, for example, "march2005.reykjavik". In a DNS - implementation, this can be used to allow delegation of a portion of - the selector namespace. - - ABNF: - - selector = sub-domain *( "." sub-domain ) - - The number of public keys and corresponding selectors for each domain - is determined by the domain owner. Many domain owners will be - satisfied with just one selector, whereas administratively - distributed organizations may choose to manage disparate selectors - and key pairs in different regions or on different email servers. - - Beyond administrative convenience, selectors make it possible to - seamlessly replace public keys on a routine basis. If a domain - wishes to change from using a public key associated with selector - "january2005" to a public key associated with selector - "february2005", it merely makes sure that both public keys are - advertised in the public-key repository concurrently for the - transition period during which email may be in transit prior to - verification. At the start of the transition period, the outbound - email servers are configured to sign with the "february2005" private - key. At the end of the transition period, the "january2005" public - key is removed from the public-key repository. - - INFORMATIVE NOTE: A key may also be revoked as described below. - The distinction between revoking and removing a key selector - record is subtle. When phasing out keys as described above, a - signing domain would probably simply remove the key record after - - - -Allman, et al. Standards Track [Page 9] - -RFC 4871 DKIM Signatures May 2007 - - - the transition period. However, a signing domain could elect to - revoke the key (but maintain the key record) for a further period. - There is no defined semantic difference between a revoked key and - a removed key. - - While some domains may wish to make selector values well known, - others will want to take care not to allocate selector names in a way - that allows harvesting of data by outside parties. For example, if - per-user keys are issued, the domain owner will need to make the - decision as to whether to associate this selector directly with the - user name, or make it some unassociated random value, such as a - fingerprint of the public key. - - INFORMATIVE OPERATIONS NOTE: Reusing a selector with a new key - (for example, changing the key associated with a user's name) - makes it impossible to tell the difference between a message that - didn't verify because the key is no longer valid versus a message - that is actually forged. For this reason, signers are ill-advised - to reuse selectors for new keys. A better strategy is to assign - new keys to new selectors. - -3.2. Tag=Value Lists - - DKIM uses a simple "tag=value" syntax in several contexts, including - in messages and domain signature records. - - Values are a series of strings containing either plain text, "base64" - text (as defined in [RFC2045], Section 6.8), "qp-section" (ibid, - Section 6.7), or "dkim-quoted-printable" (as defined in Section 2.6). - The name of the tag will determine the encoding of each value. - Unencoded semicolon (";") characters MUST NOT occur in the tag value, - since that separates tag-specs. - - INFORMATIVE IMPLEMENTATION NOTE: Although the "plain text" defined - below (as "tag-value") only includes 7-bit characters, an - implementation that wished to anticipate future standards would be - advised not to preclude the use of UTF8-encoded text in tag=value - lists. - - - - - - - - - - - - - -Allman, et al. Standards Track [Page 10] - -RFC 4871 DKIM Signatures May 2007 - - - Formally, the syntax rules are as follows: - - tag-list = tag-spec 0*( ";" tag-spec ) [ ";" ] - tag-spec = [FWS] tag-name [FWS] "=" [FWS] tag-value [FWS] - tag-name = ALPHA 0*ALNUMPUNC - tag-value = [ tval 0*( 1*(WSP / FWS) tval ) ] - ; WSP and FWS prohibited at beginning and end - tval = 1*VALCHAR - VALCHAR = %x21-3A / %x3C-7E - ; EXCLAMATION to TILDE except SEMICOLON - ALNUMPUNC = ALPHA / DIGIT / "_" - - Note that WSP is allowed anywhere around tags. In particular, any - WSP after the "=" and any WSP before the terminating ";" is not part - of the value; however, WSP inside the value is significant. - - Tags MUST be interpreted in a case-sensitive manner. Values MUST be - processed as case sensitive unless the specific tag description of - semantics specifies case insensitivity. - - Tags with duplicate names MUST NOT occur within a single tag-list; if - a tag name does occur more than once, the entire tag-list is invalid. - - Whitespace within a value MUST be retained unless explicitly excluded - by the specific tag description. - - Tag=value pairs that represent the default value MAY be included to - aid legibility. - - Unrecognized tags MUST be ignored. - - Tags that have an empty value are not the same as omitted tags. An - omitted tag is treated as having the default value; a tag with an - empty value explicitly designates the empty string as the value. For - example, "g=" does not mean "g=*", even though "g=*" is the default - for that tag. - -3.3. Signing and Verification Algorithms - - DKIM supports multiple digital signature algorithms. Two algorithms - are defined by this specification at this time: rsa-sha1 and rsa- - sha256. The rsa-sha256 algorithm is the default if no algorithm is - specified. Verifiers MUST implement both rsa-sha1 and rsa-sha256. - Signers MUST implement and SHOULD sign using rsa-sha256. - - - - - - - -Allman, et al. Standards Track [Page 11] - -RFC 4871 DKIM Signatures May 2007 - - - INFORMATIVE NOTE: Although sha256 is strongly encouraged, some - senders of low-security messages (such as routine newsletters) may - prefer to use sha1 because of reduced CPU requirements to compute - a sha1 hash. In general, sha256 should always be used whenever - possible. - -3.3.1. The rsa-sha1 Signing Algorithm - - The rsa-sha1 Signing Algorithm computes a message hash as described - in Section 3.7 below using SHA-1 [FIPS.180-2.2002] as the hash-alg. - That hash is then signed by the signer using the RSA algorithm - (defined in PKCS#1 version 1.5 [RFC3447]) as the crypt-alg and the - signer's private key. The hash MUST NOT be truncated or converted - into any form other than the native binary form before being signed. - The signing algorithm SHOULD use a public exponent of 65537. - -3.3.2. The rsa-sha256 Signing Algorithm - - The rsa-sha256 Signing Algorithm computes a message hash as described - in Section 3.7 below using SHA-256 [FIPS.180-2.2002] as the hash-alg. - That hash is then signed by the signer using the RSA algorithm - (defined in PKCS#1 version 1.5 [RFC3447]) as the crypt-alg and the - signer's private key. The hash MUST NOT be truncated or converted - into any form other than the native binary form before being signed. - -3.3.3. Key Sizes - - Selecting appropriate key sizes is a trade-off between cost, - performance, and risk. Since short RSA keys more easily succumb to - off-line attacks, signers MUST use RSA keys of at least 1024 bits for - long-lived keys. Verifiers MUST be able to validate signatures with - keys ranging from 512 bits to 2048 bits, and they MAY be able to - validate signatures with larger keys. Verifier policies may use the - length of the signing key as one metric for determining whether a - signature is acceptable. - - Factors that should influence the key size choice include the - following: - - o The practical constraint that large (e.g., 4096 bit) keys may not - fit within a 512-byte DNS UDP response packet - - o The security constraint that keys smaller than 1024 bits are - subject to off-line attacks - - o Larger keys impose higher CPU costs to verify and sign email - - - - - -Allman, et al. Standards Track [Page 12] - -RFC 4871 DKIM Signatures May 2007 - - - o Keys can be replaced on a regular basis, thus their lifetime can - be relatively short - - o The security goals of this specification are modest compared to - typical goals of other systems that employ digital signatures - - See [RFC3766] for further discussion on selecting key sizes. - -3.3.4. Other Algorithms - - Other algorithms MAY be defined in the future. Verifiers MUST ignore - any signatures using algorithms that they do not implement. - -3.4. Canonicalization - - Empirical evidence demonstrates that some mail servers and relay - systems modify email in transit, potentially invalidating a - signature. There are two competing perspectives on such - modifications. For most signers, mild modification of email is - immaterial to the authentication status of the email. For such - signers, a canonicalization algorithm that survives modest in-transit - modification is preferred. - - Other signers demand that any modification of the email, however - minor, result in a signature verification failure. These signers - prefer a canonicalization algorithm that does not tolerate in-transit - modification of the signed email. - - Some signers may be willing to accept modifications to header fields - that are within the bounds of email standards such as [RFC2822], but - are unwilling to accept any modification to the body of messages. - - To satisfy all requirements, two canonicalization algorithms are - defined for each of the header and the body: a "simple" algorithm - that tolerates almost no modification and a "relaxed" algorithm that - tolerates common modifications such as whitespace replacement and - header field line rewrapping. A signer MAY specify either algorithm - for header or body when signing an email. If no canonicalization - algorithm is specified by the signer, the "simple" algorithm defaults - for both header and body. Verifiers MUST implement both - canonicalization algorithms. Note that the header and body may use - different canonicalization algorithms. Further canonicalization - algorithms MAY be defined in the future; verifiers MUST ignore any - signatures that use unrecognized canonicalization algorithms. - - Canonicalization simply prepares the email for presentation to the - signing or verification algorithm. It MUST NOT change the - - - - -Allman, et al. Standards Track [Page 13] - -RFC 4871 DKIM Signatures May 2007 - - - transmitted data in any way. Canonicalization of header fields and - body are described below. - - NOTE: This section assumes that the message is already in "network - normal" format (text is ASCII encoded, lines are separated with CRLF - characters, etc.). See also Section 5.3 for information about - normalizing the message. - -3.4.1. The "simple" Header Canonicalization Algorithm - - The "simple" header canonicalization algorithm does not change header - fields in any way. Header fields MUST be presented to the signing or - verification algorithm exactly as they are in the message being - signed or verified. In particular, header field names MUST NOT be - case folded and whitespace MUST NOT be changed. - -3.4.2. The "relaxed" Header Canonicalization Algorithm - - The "relaxed" header canonicalization algorithm MUST apply the - following steps in order: - - o Convert all header field names (not the header field values) to - lowercase. For example, convert "SUBJect: AbC" to "subject: AbC". - - o Unfold all header field continuation lines as described in - [RFC2822]; in particular, lines with terminators embedded in - continued header field values (that is, CRLF sequences followed by - WSP) MUST be interpreted without the CRLF. Implementations MUST - NOT remove the CRLF at the end of the header field value. - - o Convert all sequences of one or more WSP characters to a single SP - character. WSP characters here include those before and after a - line folding boundary. - - o Delete all WSP characters at the end of each unfolded header field - value. - - o Delete any WSP characters remaining before and after the colon - separating the header field name from the header field value. The - colon separator MUST be retained. - -3.4.3. The "simple" Body Canonicalization Algorithm - - The "simple" body canonicalization algorithm ignores all empty lines - at the end of the message body. An empty line is a line of zero - length after removal of the line terminator. If there is no body or - no trailing CRLF on the message body, a CRLF is added. It makes no - - - - -Allman, et al. Standards Track [Page 14] - -RFC 4871 DKIM Signatures May 2007 - - - other changes to the message body. In more formal terms, the - "simple" body canonicalization algorithm converts "0*CRLF" at the end - of the body to a single "CRLF". - - Note that a completely empty or missing body is canonicalized as a - single "CRLF"; that is, the canonicalized length will be 2 octets. - -3.4.4. The "relaxed" Body Canonicalization Algorithm - - The "relaxed" body canonicalization algorithm: - - o Ignores all whitespace at the end of lines. Implementations MUST - NOT remove the CRLF at the end of the line. - - o Reduces all sequences of WSP within a line to a single SP - character. - - o Ignores all empty lines at the end of the message body. "Empty - line" is defined in Section 3.4.3. - - INFORMATIVE NOTE: It should be noted that the relaxed body - canonicalization algorithm may enable certain types of extremely - crude "ASCII Art" attacks where a message may be conveyed by - adjusting the spacing between words. If this is a concern, the - "simple" body canonicalization algorithm should be used instead. - -3.4.5. Body Length Limits - - A body length count MAY be specified to limit the signature - calculation to an initial prefix of the body text, measured in - octets. If the body length count is not specified, the entire - message body is signed. - - INFORMATIVE RATIONALE: This capability is provided because it is - very common for mailing lists to add trailers to messages (e.g., - instructions how to get off the list). Until those messages are - also signed, the body length count is a useful tool for the - verifier since it may as a matter of policy accept messages having - valid signatures with extraneous data. - - INFORMATIVE IMPLEMENTATION NOTE: Using body length limits enables - an attack in which an attacker modifies a message to include - content that solely benefits the attacker. It is possible for the - appended content to completely replace the original content in the - end recipient's eyes and to defeat duplicate message detection - algorithms. To avoid this attack, signers should be wary of using - - - - - -Allman, et al. Standards Track [Page 15] - -RFC 4871 DKIM Signatures May 2007 - - - this tag, and verifiers might wish to ignore the tag or remove - text that appears after the specified content length, perhaps - based on other criteria. - - The body length count allows the signer of a message to permit data - to be appended to the end of the body of a signed message. The body - length count MUST be calculated following the canonicalization - algorithm; for example, any whitespace ignored by a canonicalization - algorithm is not included as part of the body length count. Signers - of MIME messages that include a body length count SHOULD be sure that - the length extends to the closing MIME boundary string. - - INFORMATIVE IMPLEMENTATION NOTE: A signer wishing to ensure that - the only acceptable modifications are to add to the MIME postlude - would use a body length count encompassing the entire final MIME - boundary string, including the final "--CRLF". A signer wishing - to allow additional MIME parts but not modification of existing - parts would use a body length count extending through the final - MIME boundary string, omitting the final "--CRLF". Note that this - only works for some MIME types, e.g., multipart/mixed but not - multipart/signed. - - A body length count of zero means that the body is completely - unsigned. - - Signers wishing to ensure that no modification of any sort can occur - should specify the "simple" canonicalization algorithm for both - header and body and omit the body length count. - -3.4.6. Canonicalization Examples (INFORMATIVE) - - In the following examples, actual whitespace is used only for - clarity. The actual input and output text is designated using - bracketed descriptors: "" for a space character, "" for a - tab character, and "" for a carriage-return/line-feed sequence. - For example, "X Y" and "XY" represent the same three - characters. - - Example 1: A message reading: - - A: X - B : Y - Z - - C - D E - - - - - -Allman, et al. Standards Track [Page 16] - -RFC 4871 DKIM Signatures May 2007 - - - when canonicalized using relaxed canonicalization for both header and - body results in a header reading: - - a:X - b:Y Z - - and a body reading: - - C - D E - - Example 2: The same message canonicalized using simple - canonicalization for both header and body results in a header - reading: - - A: X - B : Y - Z - - and a body reading: - - C - D E - - Example 3: When processed using relaxed header canonicalization and - simple body canonicalization, the canonicalized version has a header - of: - - a:X - b:Y Z - - and a body reading: - - C - D E - -3.5. The DKIM-Signature Header Field - - The signature of the email is stored in the DKIM-Signature header - field. This header field contains all of the signature and key- - fetching data. The DKIM-Signature value is a tag-list as described - in Section 3.2. - - The DKIM-Signature header field SHOULD be treated as though it were a - trace header field as defined in Section 3.6 of [RFC2822], and hence - SHOULD NOT be reordered and SHOULD be prepended to the message. - - - - - -Allman, et al. Standards Track [Page 17] - -RFC 4871 DKIM Signatures May 2007 - - - The DKIM-Signature header field being created or verified is always - included in the signature calculation, after the rest of the header - fields being signed; however, when calculating or verifying the - signature, the value of the "b=" tag (signature value) of that DKIM- - Signature header field MUST be treated as though it were an empty - string. Unknown tags in the DKIM-Signature header field MUST be - included in the signature calculation but MUST be otherwise ignored - by verifiers. Other DKIM-Signature header fields that are included - in the signature should be treated as normal header fields; in - particular, the "b=" tag is not treated specially. - - The encodings for each field type are listed below. Tags described - as qp-section are encoded as described in Section 6.7 of MIME Part - One [RFC2045], with the additional conversion of semicolon characters - to "=3B"; intuitively, this is one line of quoted-printable encoded - text. The dkim-quoted-printable syntax is defined in Section 2.6. - - Tags on the DKIM-Signature header field along with their type and - requirement status are shown below. Unrecognized tags MUST be - ignored. - - v= Version (MUST be included). This tag defines the version of this - specification that applies to the signature record. It MUST have - the value "1". Note that verifiers must do a string comparison - on this value; for example, "1" is not the same as "1.0". - - ABNF: - - sig-v-tag = %x76 [FWS] "=" [FWS] "1" - - INFORMATIVE NOTE: DKIM-Signature version numbers are expected - to increase arithmetically as new versions of this - specification are released. - - a= The algorithm used to generate the signature (plain-text; - REQUIRED). Verifiers MUST support "rsa-sha1" and "rsa-sha256"; - signers SHOULD sign using "rsa-sha256". See Section 3.3 for a - description of algorithms. - - ABNF: - - sig-a-tag = %x61 [FWS] "=" [FWS] sig-a-tag-alg - sig-a-tag-alg = sig-a-tag-k "-" sig-a-tag-h - sig-a-tag-k = "rsa" / x-sig-a-tag-k - sig-a-tag-h = "sha1" / "sha256" / x-sig-a-tag-h - x-sig-a-tag-k = ALPHA *(ALPHA / DIGIT) ; for later extension - x-sig-a-tag-h = ALPHA *(ALPHA / DIGIT) ; for later extension - - - - -Allman, et al. Standards Track [Page 18] - -RFC 4871 DKIM Signatures May 2007 - - - b= The signature data (base64; REQUIRED). Whitespace is ignored in - this value and MUST be ignored when reassembling the original - signature. In particular, the signing process can safely insert - FWS in this value in arbitrary places to conform to line-length - limits. See Signer Actions (Section 5) for how the signature is - computed. - - ABNF: - - sig-b-tag = %x62 [FWS] "=" [FWS] sig-b-tag-data - sig-b-tag-data = base64string - - bh= The hash of the canonicalized body part of the message as limited - by the "l=" tag (base64; REQUIRED). Whitespace is ignored in - this value and MUST be ignored when reassembling the original - signature. In particular, the signing process can safely insert - FWS in this value in arbitrary places to conform to line-length - limits. See Section 3.7 for how the body hash is computed. - - ABNF: - - sig-bh-tag = %x62 %x68 [FWS] "=" [FWS] sig-bh-tag-data - sig-bh-tag-data = base64string - - c= Message canonicalization (plain-text; OPTIONAL, default is - "simple/simple"). This tag informs the verifier of the type of - canonicalization used to prepare the message for signing. It - consists of two names separated by a "slash" (%d47) character, - corresponding to the header and body canonicalization algorithms - respectively. These algorithms are described in Section 3.4. If - only one algorithm is named, that algorithm is used for the - header and "simple" is used for the body. For example, - "c=relaxed" is treated the same as "c=relaxed/simple". - - ABNF: - - sig-c-tag = %x63 [FWS] "=" [FWS] sig-c-tag-alg - ["/" sig-c-tag-alg] - sig-c-tag-alg = "simple" / "relaxed" / x-sig-c-tag-alg - x-sig-c-tag-alg = hyphenated-word ; for later extension - - d= The domain of the signing entity (plain-text; REQUIRED). This is - the domain that will be queried for the public key. This domain - MUST be the same as or a parent domain of the "i=" tag (the - signing identity, as described below), or it MUST meet the - requirements for parent domain signing described in Section 3.8. - When presented with a signature that does not meet these - requirement, verifiers MUST consider the signature invalid. - - - -Allman, et al. Standards Track [Page 19] - -RFC 4871 DKIM Signatures May 2007 - - - Internationalized domain names MUST be encoded as described in - [RFC3490]. - - ABNF: - - sig-d-tag = %x64 [FWS] "=" [FWS] domain-name - domain-name = sub-domain 1*("." sub-domain) - ; from RFC 2821 Domain, but excluding address-literal - - h= Signed header fields (plain-text, but see description; REQUIRED). - A colon-separated list of header field names that identify the - header fields presented to the signing algorithm. The field MUST - contain the complete list of header fields in the order presented - to the signing algorithm. The field MAY contain names of header - fields that do not exist when signed; nonexistent header fields - do not contribute to the signature computation (that is, they are - treated as the null input, including the header field name, the - separating colon, the header field value, and any CRLF - terminator). The field MUST NOT include the DKIM-Signature - header field that is being created or verified, but may include - others. Folding whitespace (FWS) MAY be included on either side - of the colon separator. Header field names MUST be compared - against actual header field names in a case-insensitive manner. - This list MUST NOT be empty. See Section 5.4 for a discussion of - choosing header fields to sign. - - ABNF: - - sig-h-tag = %x68 [FWS] "=" [FWS] hdr-name - 0*( *FWS ":" *FWS hdr-name ) - hdr-name = field-name - - INFORMATIVE EXPLANATION: By "signing" header fields that do not - actually exist, a signer can prevent insertion of those - header fields before verification. However, since a signer - cannot possibly know what header fields might be created in - the future, and that some MUAs might present header fields - that are embedded inside a message (e.g., as a message/rfc822 - content type), the security of this solution is not total. - - INFORMATIVE EXPLANATION: The exclusion of the header field name - and colon as well as the header field value for non-existent - header fields prevents an attacker from inserting an actual - header field with a null value. - - - - - - - -Allman, et al. Standards Track [Page 20] - -RFC 4871 DKIM Signatures May 2007 - - - i= Identity of the user or agent (e.g., a mailing list manager) on - behalf of which this message is signed (dkim-quoted-printable; - OPTIONAL, default is an empty Local-part followed by an "@" - followed by the domain from the "d=" tag). The syntax is a - standard email address where the Local-part MAY be omitted. The - domain part of the address MUST be the same as or a subdomain of - the value of the "d=" tag. - - Internationalized domain names MUST be converted using the steps - listed in Section 4 of [RFC3490] using the "ToASCII" function. - - ABNF: - - sig-i-tag = %x69 [FWS] "=" [FWS] [ Local-part ] "@" domain-name - - INFORMATIVE NOTE: The Local-part of the "i=" tag is optional - because in some cases a signer may not be able to establish a - verified individual identity. In such cases, the signer may - wish to assert that although it is willing to go as far as - signing for the domain, it is unable or unwilling to commit - to an individual user name within their domain. It can do so - by including the domain part but not the Local-part of the - identity. - - INFORMATIVE DISCUSSION: This document does not require the value - of the "i=" tag to match the identity in any message header - fields. This is considered to be a verifier policy issue. - Constraints between the value of the "i=" tag and other - identities in other header fields seek to apply basic - authentication into the semantics of trust associated with a - role such as content author. Trust is a broad and complex - topic and trust mechanisms are subject to highly creative - attacks. The real-world efficacy of any but the most basic - bindings between the "i=" value and other identities is not - well established, nor is its vulnerability to subversion by - an attacker. Hence reliance on the use of these options - should be strictly limited. In particular, it is not at all - clear to what extent a typical end-user recipient can rely on - any assurances that might be made by successful use of the - "i=" options. - - l= Body length count (plain-text unsigned decimal integer; OPTIONAL, - default is entire body). This tag informs the verifier of the - number of octets in the body of the email after canonicalization - included in the cryptographic hash, starting from 0 immediately - following the CRLF preceding the body. This value MUST NOT be - larger than the actual number of octets in the canonicalized - message body. - - - -Allman, et al. Standards Track [Page 21] - -RFC 4871 DKIM Signatures May 2007 - - - INFORMATIVE IMPLEMENTATION WARNING: Use of the "l=" tag might - allow display of fraudulent content without appropriate - warning to end users. The "l=" tag is intended for - increasing signature robustness when sending to mailing lists - that both modify their content and do not sign their - messages. However, using the "l=" tag enables attacks in - which an intermediary with malicious intent modifies a - message to include content that solely benefits the attacker. - It is possible for the appended content to completely replace - the original content in the end recipient's eyes and to - defeat duplicate message detection algorithms. Examples are - described in Security Considerations (Section 8). To avoid - this attack, signers should be extremely wary of using this - tag, and verifiers might wish to ignore the tag or remove - text that appears after the specified content length. - - INFORMATIVE NOTE: The value of the "l=" tag is constrained to 76 - decimal digits. This constraint is not intended to predict - the size of future messages or to require implementations to - use an integer representation large enough to represent the - maximum possible value, but is intended to remind the - implementer to check the length of this and all other tags - during verification and to test for integer overflow when - decoding the value. Implementers may need to limit the - actual value expressed to a value smaller than 10^76, e.g., - to allow a message to fit within the available storage space. - - ABNF: - - sig-l-tag = %x6c [FWS] "=" [FWS] 1*76DIGIT - - q= A colon-separated list of query methods used to retrieve the - public key (plain-text; OPTIONAL, default is "dns/txt"). Each - query method is of the form "type[/options]", where the syntax - and semantics of the options depend on the type and specified - options. If there are multiple query mechanisms listed, the - choice of query mechanism MUST NOT change the interpretation of - the signature. Implementations MUST use the recognized query - mechanisms in the order presented. - - Currently, the only valid value is "dns/txt", which defines the DNS - TXT record lookup algorithm described elsewhere in this document. - The only option defined for the "dns" query type is "txt", which - MUST be included. Verifiers and signers MUST support "dns/txt". - - - - - - - -Allman, et al. Standards Track [Page 22] - -RFC 4871 DKIM Signatures May 2007 - - - ABNF: - - sig-q-tag = %x71 [FWS] "=" [FWS] sig-q-tag-method - *([FWS] ":" [FWS] sig-q-tag-method) - sig-q-tag-method = "dns/txt" / x-sig-q-tag-type - ["/" x-sig-q-tag-args] - x-sig-q-tag-type = hyphenated-word ; for future extension - x-sig-q-tag-args = qp-hdr-value - - s= The selector subdividing the namespace for the "d=" (domain) tag - (plain-text; REQUIRED). - - ABNF: - - sig-s-tag = %x73 [FWS] "=" [FWS] selector - - t= Signature Timestamp (plain-text unsigned decimal integer; - RECOMMENDED, default is an unknown creation time). The time that - this signature was created. The format is the number of seconds - since 00:00:00 on January 1, 1970 in the UTC time zone. The - value is expressed as an unsigned integer in decimal ASCII. This - value is not constrained to fit into a 31- or 32-bit integer. - Implementations SHOULD be prepared to handle values up to at - least 10^12 (until approximately AD 200,000; this fits into 40 - bits). To avoid denial-of-service attacks, implementations MAY - consider any value longer than 12 digits to be infinite. Leap - seconds are not counted. Implementations MAY ignore signatures - that have a timestamp in the future. - - ABNF: - - sig-t-tag = %x74 [FWS] "=" [FWS] 1*12DIGIT - - x= Signature Expiration (plain-text unsigned decimal integer; - RECOMMENDED, default is no expiration). The format is the same - as in the "t=" tag, represented as an absolute date, not as a - time delta from the signing timestamp. The value is expressed as - an unsigned integer in decimal ASCII, with the same constraints - on the value in the "t=" tag. Signatures MAY be considered - invalid if the verification time at the verifier is past the - expiration date. The verification time should be the time that - the message was first received at the administrative domain of - the verifier if that time is reliably available; otherwise the - current time should be used. The value of the "x=" tag MUST be - greater than the value of the "t=" tag if both are present. - - - - - - -Allman, et al. Standards Track [Page 23] - -RFC 4871 DKIM Signatures May 2007 - - - INFORMATIVE NOTE: The "x=" tag is not intended as an anti-replay - defense. - - ABNF: - - sig-x-tag = %x78 [FWS] "=" [FWS] 1*12DIGIT - - z= Copied header fields (dkim-quoted-printable, but see description; - OPTIONAL, default is null). A vertical-bar-separated list of - selected header fields present when the message was signed, - including both the field name and value. It is not required to - include all header fields present at the time of signing. This - field need not contain the same header fields listed in the "h=" - tag. The header field text itself must encode the vertical bar - ("|", %x7C) character (i.e., vertical bars in the "z=" text are - metacharacters, and any actual vertical bar characters in a - copied header field must be encoded). Note that all whitespace - must be encoded, including whitespace between the colon and the - header field value. After encoding, FWS MAY be added at - arbitrary locations in order to avoid excessively long lines; - such whitespace is NOT part of the value of the header field, and - MUST be removed before decoding. - - The header fields referenced by the "h=" tag refer to the fields in - the RFC 2822 header of the message, not to any copied fields in - the "z=" tag. Copied header field values are for diagnostic use. - - Header fields with characters requiring conversion (perhaps from - legacy MTAs that are not [RFC2822] compliant) SHOULD be converted - as described in MIME Part Three [RFC2047]. - - ABNF: - sig-z-tag = %x7A [FWS] "=" [FWS] sig-z-tag-copy - *( [FWS] "|" sig-z-tag-copy ) - sig-z-tag-copy = hdr-name ":" qp-hdr-value - qp-hdr-value = dkim-quoted-printable ; with "|" encoded - - INFORMATIVE EXAMPLE of a signature header field spread across - multiple continuation lines: - - - - - - - - - - - - -Allman, et al. Standards Track [Page 24] - -RFC 4871 DKIM Signatures May 2007 - - - DKIM-Signature: a=rsa-sha256; d=example.net; s=brisbane; - c=simple; q=dns/txt; i=@eng.example.net; - t=1117574938; x=1118006938; - h=from:to:subject:date; - z=From:foo@eng.example.net|To:joe@example.com| - Subject:demo=20run|Date:July=205,=202005=203:44:08=20PM=20-0700; - bh=MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=; - b=dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZ - VoG4ZHRNiYzR - -3.6. Key Management and Representation - - Signature applications require some level of assurance that the - verification public key is associated with the claimed signer. Many - applications achieve this by using public key certificates issued by - a trusted third party. However, DKIM can achieve a sufficient level - of security, with significantly enhanced scalability, by simply - having the verifier query the purported signer's DNS entry (or some - security-equivalent) in order to retrieve the public key. - - DKIM keys can potentially be stored in multiple types of key servers - and in multiple formats. The storage and format of keys are - irrelevant to the remainder of the DKIM algorithm. - - Parameters to the key lookup algorithm are the type of the lookup - (the "q=" tag), the domain of the signer (the "d=" tag of the DKIM- - Signature header field), and the selector (the "s=" tag). - - public_key = dkim_find_key(q_val, d_val, s_val) - - This document defines a single binding, using DNS TXT records to - distribute the keys. Other bindings may be defined in the future. - -3.6.1. Textual Representation - - It is expected that many key servers will choose to present the keys - in an otherwise unstructured text format (for example, an XML form - would not be considered to be unstructured text for this purpose). - The following definition MUST be used for any DKIM key represented in - an otherwise unstructured textual form. - - The overall syntax is a tag-list as described in Section 3.2. The - current valid tags are described below. Other tags MAY be present - and MUST be ignored by any implementation that does not understand - them. - - - - - - -Allman, et al. Standards Track [Page 25] - -RFC 4871 DKIM Signatures May 2007 - - - v= Version of the DKIM key record (plain-text; RECOMMENDED, default - is "DKIM1"). If specified, this tag MUST be set to "DKIM1" - (without the quotes). This tag MUST be the first tag in the - record. Records beginning with a "v=" tag with any other value - MUST be discarded. Note that verifiers must do a string - comparison on this value; for example, "DKIM1" is not the same as - "DKIM1.0". - - ABNF: - - key-v-tag = %x76 [FWS] "=" [FWS] "DKIM1" - - g= Granularity of the key (plain-text; OPTIONAL, default is "*"). - This value MUST match the Local-part of the "i=" tag of the DKIM- - Signature header field (or its default value of the empty string - if "i=" is not specified), with a single, optional "*" character - matching a sequence of zero or more arbitrary characters - ("wildcarding"). An email with a signing address that does not - match the value of this tag constitutes a failed verification. - The intent of this tag is to constrain which signing address can - legitimately use this selector, for example, when delegating a - key to a third party that should only be used for special - purposes. Wildcarding allows matching for addresses such as - "user+*" or "*-offer". An empty "g=" value never matches any - addresses. - - ABNF: - - key-g-tag = %x67 [FWS] "=" [FWS] key-g-tag-lpart - key-g-tag-lpart = [dot-atom-text] ["*" [dot-atom-text] ] - - h= Acceptable hash algorithms (plain-text; OPTIONAL, defaults to - allowing all algorithms). A colon-separated list of hash - algorithms that might be used. Signers and Verifiers MUST - support the "sha256" hash algorithm. Verifiers MUST also support - the "sha1" hash algorithm. - - ABNF: - - key-h-tag = %x68 [FWS] "=" [FWS] key-h-tag-alg - 0*( [FWS] ":" [FWS] key-h-tag-alg ) - key-h-tag-alg = "sha1" / "sha256" / x-key-h-tag-alg - x-key-h-tag-alg = hyphenated-word ; for future extension - - - - - - - - -Allman, et al. Standards Track [Page 26] - -RFC 4871 DKIM Signatures May 2007 - - - k= Key type (plain-text; OPTIONAL, default is "rsa"). Signers and - verifiers MUST support the "rsa" key type. The "rsa" key type - indicates that an ASN.1 DER-encoded [ITU.X660.1997] RSAPublicKey - [RFC3447] (see Sections 3.1 and A.1.1) is being used in the "p=" - tag. (Note: the "p=" tag further encodes the value using the - base64 algorithm.) - - ABNF: - - key-k-tag = %x76 [FWS] "=" [FWS] key-k-tag-type - key-k-tag-type = "rsa" / x-key-k-tag-type - x-key-k-tag-type = hyphenated-word ; for future extension - - n= Notes that might be of interest to a human (qp-section; OPTIONAL, - default is empty). No interpretation is made by any program. - This tag should be used sparingly in any key server mechanism - that has space limitations (notably DNS). This is intended for - use by administrators, not end users. - - ABNF: - - key-n-tag = %x6e [FWS] "=" [FWS] qp-section - - p= Public-key data (base64; REQUIRED). An empty value means that - this public key has been revoked. The syntax and semantics of - this tag value before being encoded in base64 are defined by the - "k=" tag. - - INFORMATIVE RATIONALE: If a private key has been compromised - or otherwise disabled (e.g., an outsourcing contract has been - terminated), a signer might want to explicitly state that it - knows about the selector, but all messages using that - selector should fail verification. Verifiers should ignore - any DKIM-Signature header fields with a selector referencing - a revoked key. - - ABNF: - - key-p-tag = %x70 [FWS] "=" [ [FWS] base64string ] - - INFORMATIVE NOTE: A base64string is permitted to include white - space (FWS) at arbitrary places; however, any CRLFs must be - followed by at least one WSP character. Implementors and - administrators are cautioned to ensure that selector TXT - records conform to this specification. - - - - - - -Allman, et al. Standards Track [Page 27] - -RFC 4871 DKIM Signatures May 2007 - - - s= Service Type (plain-text; OPTIONAL; default is "*"). A colon- - separated list of service types to which this record applies. - Verifiers for a given service type MUST ignore this record if the - appropriate type is not listed. Currently defined service types - are as follows: - - * matches all service types - - email electronic mail (not necessarily limited to SMTP) - - This tag is intended to constrain the use of keys for other - purposes, should use of DKIM be defined by other services in the - future. - - ABNF: - - key-s-tag = %x73 [FWS] "=" [FWS] key-s-tag-type - 0*( [FWS] ":" [FWS] key-s-tag-type ) - key-s-tag-type = "email" / "*" / x-key-s-tag-type - x-key-s-tag-type = hyphenated-word ; for future extension - - t= Flags, represented as a colon-separated list of names (plain- - text; OPTIONAL, default is no flags set). The defined flags are - as follows: - - y This domain is testing DKIM. Verifiers MUST NOT treat - messages from signers in testing mode differently from - unsigned email, even should the signature fail to verify. - Verifiers MAY wish to track testing mode results to assist - the signer. - - s Any DKIM-Signature header fields using the "i=" tag MUST have - the same domain value on the right-hand side of the "@" in - the "i=" tag and the value of the "d=" tag. That is, the - "i=" domain MUST NOT be a subdomain of "d=". Use of this - flag is RECOMMENDED unless subdomaining is required. - - ABNF: - - key-t-tag = %x74 [FWS] "=" [FWS] key-t-tag-flag - 0*( [FWS] ":" [FWS] key-t-tag-flag ) - key-t-tag-flag = "y" / "s" / x-key-t-tag-flag - x-key-t-tag-flag = hyphenated-word ; for future extension - - Unrecognized flags MUST be ignored. - - - - - - -Allman, et al. Standards Track [Page 28] - -RFC 4871 DKIM Signatures May 2007 - - -3.6.2. DNS Binding - - A binding using DNS TXT records as a key service is hereby defined. - All implementations MUST support this binding. - -3.6.2.1. Namespace - - All DKIM keys are stored in a subdomain named "_domainkey". Given a - DKIM-Signature field with a "d=" tag of "example.com" and an "s=" tag - of "foo.bar", the DNS query will be for - "foo.bar._domainkey.example.com". - - INFORMATIVE OPERATIONAL NOTE: Wildcard DNS records (e.g., - *.bar._domainkey.example.com) do not make sense in this context - and should not be used. Note also that wildcards within domains - (e.g., s._domainkey.*.example.com) are not supported by the DNS. - -3.6.2.2. Resource Record Types for Key Storage - - The DNS Resource Record type used is specified by an option to the - query-type ("q=") tag. The only option defined in this base - specification is "txt", indicating the use of a TXT Resource Record - (RR). A later extension of this standard may define another RR type. - - Strings in a TXT RR MUST be concatenated together before use with no - intervening whitespace. TXT RRs MUST be unique for a particular - selector name; that is, if there are multiple records in an RRset, - the results are undefined. - - TXT RRs are encoded as described in Section 3.6.1. - -3.7. Computing the Message Hashes - - Both signing and verifying message signatures start with a step of - computing two cryptographic hashes over the message. Signers will - choose the parameters of the signature as described in Signer Actions - (Section 5); verifiers will use the parameters specified in the DKIM- - Signature header field being verified. In the following discussion, - the names of the tags in the DKIM-Signature header field that either - exists (when verifying) or will be created (when signing) are used. - Note that canonicalization (Section 3.4) is only used to prepare the - email for signing or verifying; it does not affect the transmitted - email in any way. - - The signer/verifier MUST compute two hashes, one over the body of the - message and one over the selected header fields of the message. - - - - - -Allman, et al. Standards Track [Page 29] - -RFC 4871 DKIM Signatures May 2007 - - - Signers MUST compute them in the order shown. Verifiers MAY compute - them in any order convenient to the verifier, provided that the - result is semantically identical to the semantics that would be the - case had they been computed in this order. - - In hash step 1, the signer/verifier MUST hash the message body, - canonicalized using the body canonicalization algorithm specified in - the "c=" tag and then truncated to the length specified in the "l=" - tag. That hash value is then converted to base64 form and inserted - into (signers) or compared to (verifiers) the "bh=" tag of the DKIM- - Signature header field. - - In hash step 2, the signer/verifier MUST pass the following to the - hash algorithm in the indicated order. - - 1. The header fields specified by the "h=" tag, in the order - specified in that tag, and canonicalized using the header - canonicalization algorithm specified in the "c=" tag. Each - header field MUST be terminated with a single CRLF. - - 2. The DKIM-Signature header field that exists (verifying) or will - be inserted (signing) in the message, with the value of the "b=" - tag deleted (i.e., treated as the empty string), canonicalized - using the header canonicalization algorithm specified in the "c=" - tag, and without a trailing CRLF. - - All tags and their values in the DKIM-Signature header field are - included in the cryptographic hash with the sole exception of the - value portion of the "b=" (signature) tag, which MUST be treated as - the null string. All tags MUST be included even if they might not be - understood by the verifier. The header field MUST be presented to - the hash algorithm after the body of the message rather than with the - rest of the header fields and MUST be canonicalized as specified in - the "c=" (canonicalization) tag. The DKIM-Signature header field - MUST NOT be included in its own h= tag, although other DKIM-Signature - header fields MAY be signed (see Section 4). - - When calculating the hash on messages that will be transmitted using - base64 or quoted-printable encoding, signers MUST compute the hash - after the encoding. Likewise, the verifier MUST incorporate the - values into the hash before decoding the base64 or quoted-printable - text. However, the hash MUST be computed before transport level - encodings such as SMTP "dot-stuffing" (the modification of lines - beginning with a "." to avoid confusion with the SMTP end-of-message - marker, as specified in [RFC2821]). - - With the exception of the canonicalization procedure described in - Section 3.4, the DKIM signing process treats the body of messages as - - - -Allman, et al. Standards Track [Page 30] - -RFC 4871 DKIM Signatures May 2007 - - - simply a string of octets. DKIM messages MAY be either in plain-text - or in MIME format; no special treatment is afforded to MIME content. - Message attachments in MIME format MUST be included in the content - that is signed. - - More formally, the algorithm for the signature is as follows: - body-hash = hash-alg(canon_body) - header-hash = hash-alg(canon_header || DKIM-SIG) - signature = sig-alg(header-hash, key) - - where "sig-alg" is the signature algorithm specified by the "a=" tag, - "hash-alg" is the hash algorithm specified by the "a=" tag, - "canon_header" and "canon_body" are the canonicalized message header - and body (respectively) as defined in Section 3.4 (excluding the - DKIM-Signature header field), and "DKIM-SIG" is the canonicalized - DKIM-Signature header field sans the signature value itself, but with - "body-hash" included as the "bh=" tag. - - INFORMATIVE IMPLEMENTERS' NOTE: Many digital signature APIs - provide both hashing and application of the RSA private key using - a single "sign()" primitive. When using such an API, the last two - steps in the algorithm would probably be combined into a single - call that would perform both the "hash-alg" and the "sig-alg". - -3.8. Signing by Parent Domains - - In some circumstances, it is desirable for a domain to apply a - signature on behalf of any of its subdomains without the need to - maintain separate selectors (key records) in each subdomain. By - default, private keys corresponding to key records can be used to - sign messages for any subdomain of the domain in which they reside; - e.g., a key record for the domain example.com can be used to verify - messages where the signing identity ("i=" tag of the signature) is - sub.example.com, or even sub1.sub2.example.com. In order to limit - the capability of such keys when this is not intended, the "s" flag - may be set in the "t=" tag of the key record to constrain the - validity of the record to exactly the domain of the signing identity. - If the referenced key record contains the "s" flag as part of the - "t=" tag, the domain of the signing identity ("i=" flag) MUST be the - same as that of the d= domain. If this flag is absent, the domain of - the signing identity MUST be the same as, or a subdomain of, the d= - domain. Key records that are not intended for use with subdomains - SHOULD specify the "s" flag in the "t=" tag. - - - - - - - - -Allman, et al. Standards Track [Page 31] - -RFC 4871 DKIM Signatures May 2007 - - -4. Semantics of Multiple Signatures - -4.1. Example Scenarios - - There are many reasons why a message might have multiple signatures. - For example, a given signer might sign multiple times, perhaps with - different hashing or signing algorithms during a transition phase. - - INFORMATIVE EXAMPLE: Suppose SHA-256 is in the future found to be - insufficiently strong, and DKIM usage transitions to SHA-1024. A - signer might immediately sign using the newer algorithm, but - continue to sign using the older algorithm for interoperability - with verifiers that had not yet upgraded. The signer would do - this by adding two DKIM-Signature header fields, one using each - algorithm. Older verifiers that did not recognize SHA-1024 as an - acceptable algorithm would skip that signature and use the older - algorithm; newer verifiers could use either signature at their - option, and all other things being equal might not even attempt to - verify the other signature. - - Similarly, a signer might sign a message including all headers and no - "l=" tag (to satisfy strict verifiers) and a second time with a - limited set of headers and an "l=" tag (in anticipation of possible - message modifications in route to other verifiers). Verifiers could - then choose which signature they preferred. - - INFORMATIVE EXAMPLE: A verifier might receive a message with two - signatures, one covering more of the message than the other. If - the signature covering more of the message verified, then the - verifier could make one set of policy decisions; if that signature - failed but the signature covering less of the message verified, - the verifier might make a different set of policy decisions. - - Of course, a message might also have multiple signatures because it - passed through multiple signers. A common case is expected to be - that of a signed message that passes through a mailing list that also - signs all messages. Assuming both of those signatures verify, a - recipient might choose to accept the message if either of those - signatures were known to come from trusted sources. - - INFORMATIVE EXAMPLE: Recipients might choose to whitelist mailing - lists to which they have subscribed and that have acceptable anti- - abuse policies so as to accept messages sent to that list even - from unknown authors. They might also subscribe to less trusted - mailing lists (e.g., those without anti-abuse protection) and be - willing to accept all messages from specific authors, but insist - on doing additional abuse scanning for other messages. - - - - -Allman, et al. Standards Track [Page 32] - -RFC 4871 DKIM Signatures May 2007 - - - Another related example of multiple signers might be forwarding - services, such as those commonly associated with academic alumni - sites. - - INFORMATIVE EXAMPLE: A recipient might have an address at - members.example.org, a site that has anti-abuse protection that is - somewhat less effective than the recipient would prefer. Such a - recipient might have specific authors whose messages would be - trusted absolutely, but messages from unknown authors that had - passed the forwarder's scrutiny would have only medium trust. - -4.2. Interpretation - - A signer that is adding a signature to a message merely creates a new - DKIM-Signature header, using the usual semantics of the h= option. A - signer MAY sign previously existing DKIM-Signature header fields - using the method described in Section 5.4 to sign trace header - fields. - - INFORMATIVE NOTE: Signers should be cognizant that signing DKIM- - Signature header fields may result in signature failures with - intermediaries that do not recognize that DKIM-Signature header - fields are trace header fields and unwittingly reorder them, thus - breaking such signatures. For this reason, signing existing DKIM- - Signature header fields is unadvised, albeit legal. - - INFORMATIVE NOTE: If a header field with multiple instances is - signed, those header fields are always signed from the bottom up. - Thus, it is not possible to sign only specific DKIM-Signature - header fields. For example, if the message being signed already - contains three DKIM-Signature header fields A, B, and C, it is - possible to sign all of them, B and C only, or C only, but not A - only, B only, A and B only, or A and C only. - - A signer MAY add more than one DKIM-Signature header field using - different parameters. For example, during a transition period a - signer might want to produce signatures using two different hash - algorithms. - - Signers SHOULD NOT remove any DKIM-Signature header fields from - messages they are signing, even if they know that the signatures - cannot be verified. - - When evaluating a message with multiple signatures, a verifier SHOULD - evaluate signatures independently and on their own merits. For - example, a verifier that by policy chooses not to accept signatures - with deprecated cryptographic algorithms would consider such - signatures invalid. Verifiers MAY process signatures in any order of - - - -Allman, et al. Standards Track [Page 33] - -RFC 4871 DKIM Signatures May 2007 - - - their choice; for example, some verifiers might choose to process - signatures corresponding to the From field in the message header - before other signatures. See Section 6.1 for more information about - signature choices. - - INFORMATIVE IMPLEMENTATION NOTE: Verifier attempts to correlate - valid signatures with invalid signatures in an attempt to guess - why a signature failed are ill-advised. In particular, there is - no general way that a verifier can determine that an invalid - signature was ever valid. - - Verifiers SHOULD ignore failed signatures as though they were not - present in the message. Verifiers SHOULD continue to check - signatures until a signature successfully verifies to the - satisfaction of the verifier. To limit potential denial-of-service - attacks, verifiers MAY limit the total number of signatures they will - attempt to verify. - -5. Signer Actions - - The following steps are performed in order by signers. - -5.1. Determine Whether the Email Should Be Signed and by Whom - - A signer can obviously only sign email for domains for which it has a - private key and the necessary knowledge of the corresponding public - key and selector information. However, there are a number of other - reasons beyond the lack of a private key why a signer could choose - not to sign an email. - - INFORMATIVE NOTE: Signing modules may be incorporated into any - portion of the mail system as deemed appropriate, including an - MUA, a SUBMISSION server, or an MTA. Wherever implemented, - signers should beware of signing (and thereby asserting - responsibility for) messages that may be problematic. In - particular, within a trusted enclave the signing address might be - derived from the header according to local policy; SUBMISSION - servers might only sign messages from users that are properly - authenticated and authorized. - - INFORMATIVE IMPLEMENTER ADVICE: SUBMISSION servers should not sign - Received header fields if the outgoing gateway MTA obfuscates - Received header fields, for example, to hide the details of - internal topology. - - If an email cannot be signed for some reason, it is a local policy - decision as to what to do with that email. - - - - -Allman, et al. Standards Track [Page 34] - -RFC 4871 DKIM Signatures May 2007 - - -5.2. Select a Private Key and Corresponding Selector Information - - This specification does not define the basis by which a signer should - choose which private key and selector information to use. Currently, - all selectors are equal as far as this specification is concerned, so - the decision should largely be a matter of administrative - convenience. Distribution and management of private keys is also - outside the scope of this document. - - INFORMATIVE OPERATIONS ADVICE: A signer should not sign with a - private key when the selector containing the corresponding public - key is expected to be revoked or removed before the verifier has - an opportunity to validate the signature. The signer should - anticipate that verifiers may choose to defer validation, perhaps - until the message is actually read by the final recipient. In - particular, when rotating to a new key pair, signing should - immediately commence with the new private key and the old public - key should be retained for a reasonable validation interval before - being removed from the key server. - -5.3. Normalize the Message to Prevent Transport Conversions - - Some messages, particularly those using 8-bit characters, are subject - to modification during transit, notably conversion to 7-bit form. - Such conversions will break DKIM signatures. In order to minimize - the chances of such breakage, signers SHOULD convert the message to a - suitable MIME content transfer encoding such as quoted-printable or - base64 as described in MIME Part One [RFC2045] before signing. Such - conversion is outside the scope of DKIM; the actual message SHOULD be - converted to 7-bit MIME by an MUA or MSA prior to presentation to the - DKIM algorithm. - - If the message is submitted to the signer with any local encoding - that will be modified before transmission, that modification to - canonical [RFC2822] form MUST be done before signing. In particular, - bare CR or LF characters (used by some systems as a local line - separator convention) MUST be converted to the SMTP-standard CRLF - sequence before the message is signed. Any conversion of this sort - SHOULD be applied to the message actually sent to the recipient(s), - not just to the version presented to the signing algorithm. - - More generally, the signer MUST sign the message as it is expected to - be received by the verifier rather than in some local or internal - form. - - - - - - - -Allman, et al. Standards Track [Page 35] - -RFC 4871 DKIM Signatures May 2007 - - -5.4. Determine the Header Fields to Sign - - The From header field MUST be signed (that is, included in the "h=" - tag of the resulting DKIM-Signature header field). Signers SHOULD - NOT sign an existing header field likely to be legitimately modified - or removed in transit. In particular, [RFC2821] explicitly permits - modification or removal of the Return-Path header field in transit. - Signers MAY include any other header fields present at the time of - signing at the discretion of the signer. - - INFORMATIVE OPERATIONS NOTE: The choice of which header fields to - sign is non-obvious. One strategy is to sign all existing, non- - repeatable header fields. An alternative strategy is to sign only - header fields that are likely to be displayed to or otherwise be - likely to affect the processing of the message at the receiver. A - third strategy is to sign only "well known" headers. Note that - verifiers may treat unsigned header fields with extreme - skepticism, including refusing to display them to the end user or - even ignoring the signature if it does not cover certain header - fields. For this reason, signing fields present in the message - such as Date, Subject, Reply-To, Sender, and all MIME header - fields are highly advised. - - The DKIM-Signature header field is always implicitly signed and MUST - NOT be included in the "h=" tag except to indicate that other - preexisting signatures are also signed. - - Signers MAY claim to have signed header fields that do not exist - (that is, signers MAY include the header field name in the "h=" tag - even if that header field does not exist in the message). When - computing the signature, the non-existing header field MUST be - treated as the null string (including the header field name, header - field value, all punctuation, and the trailing CRLF). - - INFORMATIVE RATIONALE: This allows signers to explicitly assert - the absence of a header field; if that header field is added later - the signature will fail. - - INFORMATIVE NOTE: A header field name need only be listed once - more than the actual number of that header field in a message at - the time of signing in order to prevent any further additions. - For example, if there is a single Comments header field at the - time of signing, listing Comments twice in the "h=" tag is - sufficient to prevent any number of Comments header fields from - being appended; it is not necessary (but is legal) to list - Comments three or more times in the "h=" tag. - - - - - -Allman, et al. Standards Track [Page 36] - -RFC 4871 DKIM Signatures May 2007 - - - Signers choosing to sign an existing header field that occurs more - than once in the message (such as Received) MUST sign the physically - last instance of that header field in the header block. Signers - wishing to sign multiple instances of such a header field MUST - include the header field name multiple times in the h= tag of the - DKIM-Signature header field, and MUST sign such header fields in - order from the bottom of the header field block to the top. The - signer MAY include more instances of a header field name in h= than - there are actual corresponding header fields to indicate that - additional header fields of that name SHOULD NOT be added. - - INFORMATIVE EXAMPLE: - - If the signer wishes to sign two existing Received header fields, - and the existing header contains: - - Received: - Received: - Received: - - then the resulting DKIM-Signature header field should read: - - DKIM-Signature: ... h=Received : Received : ... - - and Received header fields and will be signed in that - order. - - Signers should be careful of signing header fields that might have - additional instances added later in the delivery process, since such - header fields might be inserted after the signed instance or - otherwise reordered. Trace header fields (such as Received) and - Resent-* blocks are the only fields prohibited by [RFC2822] from - being reordered. In particular, since DKIM-Signature header fields - may be reordered by some intermediate MTAs, signing existing DKIM- - Signature header fields is error-prone. - - INFORMATIVE ADMONITION: Despite the fact that [RFC2822] permits - header fields to be reordered (with the exception of Received - header fields), reordering of signed header fields with multiple - instances by intermediate MTAs will cause DKIM signatures to be - broken; such anti-social behavior should be avoided. - - INFORMATIVE IMPLEMENTER'S NOTE: Although not required by this - specification, all end-user visible header fields should be signed - to avoid possible "indirect spamming". For example, if the - Subject header field is not signed, a spammer can resend a - previously signed mail, replacing the legitimate subject with a - one-line spam. - - - -Allman, et al. Standards Track [Page 37] - -RFC 4871 DKIM Signatures May 2007 - - -5.5. Recommended Signature Content - - In order to maximize compatibility with a variety of verifiers, it is - recommended that signers follow the practices outlined in this - section when signing a message. However, these are generic - recommendations applying to the general case; specific senders may - wish to modify these guidelines as required by their unique - situations. Verifiers MUST be capable of verifying signatures even - if one or more of the recommended header fields is not signed (with - the exception of From, which must always be signed) or if one or more - of the disrecommended header fields is signed. Note that verifiers - do have the option of ignoring signatures that do not cover a - sufficient portion of the header or body, just as they may ignore - signatures from an identity they do not trust. - - The following header fields SHOULD be included in the signature, if - they are present in the message being signed: - - o From (REQUIRED in all signatures) - - o Sender, Reply-To - - o Subject - - o Date, Message-ID - - o To, Cc - - o MIME-Version - - o Content-Type, Content-Transfer-Encoding, Content-ID, Content- - Description - - o Resent-Date, Resent-From, Resent-Sender, Resent-To, Resent-Cc, - Resent-Message-ID - - o In-Reply-To, References - - o List-Id, List-Help, List-Unsubscribe, List-Subscribe, List-Post, - List-Owner, List-Archive - - The following header fields SHOULD NOT be included in the signature: - - o Return-Path - - o Received - - o Comments, Keywords - - - -Allman, et al. Standards Track [Page 38] - -RFC 4871 DKIM Signatures May 2007 - - - o Bcc, Resent-Bcc - - o DKIM-Signature - - Optional header fields (those not mentioned above) normally SHOULD - NOT be included in the signature, because of the potential for - additional header fields of the same name to be legitimately added or - reordered prior to verification. There are likely to be legitimate - exceptions to this rule, because of the wide variety of application- - specific header fields that may be applied to a message, some of - which are unlikely to be duplicated, modified, or reordered. - - Signers SHOULD choose canonicalization algorithms based on the types - of messages they process and their aversion to risk. For example, - e-commerce sites sending primarily purchase receipts, which are not - expected to be processed by mailing lists or other software likely to - modify messages, will generally prefer "simple" canonicalization. - Sites sending primarily person-to-person email will likely prefer to - be more resilient to modification during transport by using "relaxed" - canonicalization. - - Signers SHOULD NOT use "l=" unless they intend to accommodate - intermediate mail processors that append text to a message. For - example, many mailing list processors append "unsubscribe" - information to message bodies. If signers use "l=", they SHOULD - include the entire message body existing at the time of signing in - computing the count. In particular, signers SHOULD NOT specify a - body length of 0 since this may be interpreted as a meaningless - signature by some verifiers. - -5.6. Compute the Message Hash and Signature - - The signer MUST compute the message hash as described in Section 3.7 - and then sign it using the selected public-key algorithm. This will - result in a DKIM-Signature header field that will include the body - hash and a signature of the header hash, where that header includes - the DKIM-Signature header field itself. - - Entities such as mailing list managers that implement DKIM and that - modify the message or a header field (for example, inserting - unsubscribe information) before retransmitting the message SHOULD - check any existing signature on input and MUST make such - modifications before re-signing the message. - - The signer MAY elect to limit the number of bytes of the body that - will be included in the hash and hence signed. The length actually - hashed should be inserted in the "l=" tag of the DKIM-Signature - header field. - - - -Allman, et al. Standards Track [Page 39] - -RFC 4871 DKIM Signatures May 2007 - - -5.7. Insert the DKIM-Signature Header Field - - Finally, the signer MUST insert the DKIM-Signature header field - created in the previous step prior to transmitting the email. The - DKIM-Signature header field MUST be the same as used to compute the - hash as described above, except that the value of the "b=" tag MUST - be the appropriately signed hash computed in the previous step, - signed using the algorithm specified in the "a=" tag of the DKIM- - Signature header field and using the private key corresponding to the - selector given in the "s=" tag of the DKIM-Signature header field, as - chosen above in Section 5.2 - - The DKIM-Signature header field MUST be inserted before any other - DKIM-Signature fields in the header block. - - INFORMATIVE IMPLEMENTATION NOTE: The easiest way to achieve this - is to insert the DKIM-Signature header field at the beginning of - the header block. In particular, it may be placed before any - existing Received header fields. This is consistent with treating - DKIM-Signature as a trace header field. - -6. Verifier Actions - - Since a signer MAY remove or revoke a public key at any time, it is - recommended that verification occur in a timely manner. In many - configurations, the most timely place is during acceptance by the - border MTA or shortly thereafter. In particular, deferring - verification until the message is accessed by the end user is - discouraged. - - A border or intermediate MTA MAY verify the message signature(s). An - MTA who has performed verification MAY communicate the result of that - verification by adding a verification header field to incoming - messages. This considerably simplifies things for the user, who can - now use an existing mail user agent. Most MUAs have the ability to - filter messages based on message header fields or content; these - filters would be used to implement whatever policy the user wishes - with respect to unsigned mail. - - A verifying MTA MAY implement a policy with respect to unverifiable - mail, regardless of whether or not it applies the verification header - field to signed messages. - - Verifiers MUST produce a result that is semantically equivalent to - applying the following steps in the order listed. In practice, - several of these steps can be performed in parallel in order to - improve performance. - - - - -Allman, et al. Standards Track [Page 40] - -RFC 4871 DKIM Signatures May 2007 - - -6.1. Extract Signatures from the Message - - The order in which verifiers try DKIM-Signature header fields is not - defined; verifiers MAY try signatures in any order they like. For - example, one implementation might try the signatures in textual - order, whereas another might try signatures by identities that match - the contents of the From header field before trying other signatures. - Verifiers MUST NOT attribute ultimate meaning to the order of - multiple DKIM-Signature header fields. In particular, there is - reason to believe that some relays will reorder the header fields in - potentially arbitrary ways. - - INFORMATIVE IMPLEMENTATION NOTE: Verifiers might use the order as - a clue to signing order in the absence of any other information. - However, other clues as to the semantics of multiple signatures - (such as correlating the signing host with Received header fields) - may also be considered. - - A verifier SHOULD NOT treat a message that has one or more bad - signatures and no good signatures differently from a message with no - signature at all; such treatment is a matter of local policy and is - beyond the scope of this document. - - When a signature successfully verifies, a verifier will either stop - processing or attempt to verify any other signatures, at the - discretion of the implementation. A verifier MAY limit the number of - signatures it tries to avoid denial-of-service attacks. - - INFORMATIVE NOTE: An attacker could send messages with large - numbers of faulty signatures, each of which would require a DNS - lookup and corresponding CPU time to verify the message. This - could be an attack on the domain that receives the message, by - slowing down the verifier by requiring it to do a large number of - DNS lookups and/or signature verifications. It could also be an - attack against the domains listed in the signatures, essentially - by enlisting innocent verifiers in launching an attack against the - DNS servers of the actual victim. - - In the following description, text reading "return status - (explanation)" (where "status" is one of "PERMFAIL" or "TEMPFAIL") - means that the verifier MUST immediately cease processing that - signature. The verifier SHOULD proceed to the next signature, if any - is present, and completely ignore the bad signature. If the status - is "PERMFAIL", the signature failed and should not be reconsidered. - If the status is "TEMPFAIL", the signature could not be verified at - this time but may be tried again later. A verifier MAY either defer - the message for later processing, perhaps by queueing it locally or - issuing a 451/4.7.5 SMTP reply, or try another signature; if no good - - - -Allman, et al. Standards Track [Page 41] - -RFC 4871 DKIM Signatures May 2007 - - - signature is found and any of the signatures resulted in a TEMPFAIL - status, the verifier MAY save the message for later processing. The - "(explanation)" is not normative text; it is provided solely for - clarification. - - Verifiers SHOULD ignore any DKIM-Signature header fields where the - signature does not validate. Verifiers that are prepared to validate - multiple signature header fields SHOULD proceed to the next signature - header field, should it exist. However, verifiers MAY make note of - the fact that an invalid signature was present for consideration at a - later step. - - INFORMATIVE NOTE: The rationale of this requirement is to permit - messages that have invalid signatures but also a valid signature - to work. For example, a mailing list exploder might opt to leave - the original submitter signature in place even though the exploder - knows that it is modifying the message in some way that will break - that signature, and the exploder inserts its own signature. In - this case, the message should succeed even in the presence of the - known-broken signature. - - For each signature to be validated, the following steps should be - performed in such a manner as to produce a result that is - semantically equivalent to performing them in the indicated order. - -6.1.1. Validate the Signature Header Field - - Implementers MUST meticulously validate the format and values in the - DKIM-Signature header field; any inconsistency or unexpected values - MUST cause the header field to be completely ignored and the verifier - to return PERMFAIL (signature syntax error). Being "liberal in what - you accept" is definitely a bad strategy in this security context. - Note however that this does not include the existence of unknown tags - in a DKIM-Signature header field, which are explicitly permitted. - - Verifiers MUST ignore DKIM-Signature header fields with a "v=" tag - that is inconsistent with this specification and return PERMFAIL - (incompatible version). - - INFORMATIVE IMPLEMENTATION NOTE: An implementation may, of course, - choose to also verify signatures generated by older versions of - this specification. - - If any tag listed as "required" in Section 3.5 is omitted from the - DKIM-Signature header field, the verifier MUST ignore the DKIM- - Signature header field and return PERMFAIL (signature missing - required tag). - - - - -Allman, et al. Standards Track [Page 42] - -RFC 4871 DKIM Signatures May 2007 - - - INFORMATIONAL NOTE: The tags listed as required in Section 3.5 are - "v=", "a=", "b=", "bh=", "d=", "h=", and "s=". Should there be a - conflict between this note and Section 3.5, Section 3.5 is - normative. - - If the DKIM-Signature header field does not contain the "i=" tag, the - verifier MUST behave as though the value of that tag were "@d", where - "d" is the value from the "d=" tag. - - Verifiers MUST confirm that the domain specified in the "d=" tag is - the same as or a parent domain of the domain part of the "i=" tag. - If not, the DKIM-Signature header field MUST be ignored and the - verifier should return PERMFAIL (domain mismatch). - - If the "h=" tag does not include the From header field, the verifier - MUST ignore the DKIM-Signature header field and return PERMFAIL (From - field not signed). - - Verifiers MAY ignore the DKIM-Signature header field and return - PERMFAIL (signature expired) if it contains an "x=" tag and the - signature has expired. - - Verifiers MAY ignore the DKIM-Signature header field if the domain - used by the signer in the "d=" tag is not associated with a valid - signing entity. For example, signatures with "d=" values such as - "com" and "co.uk" may be ignored. The list of unacceptable domains - SHOULD be configurable. - - Verifiers MAY ignore the DKIM-Signature header field and return - PERMFAIL (unacceptable signature header) for any other reason, for - example, if the signature does not sign header fields that the - verifier views to be essential. As a case in point, if MIME header - fields are not signed, certain attacks may be possible that the - verifier would prefer to avoid. - -6.1.2. Get the Public Key - - The public key for a signature is needed to complete the verification - process. The process of retrieving the public key depends on the - query type as defined by the "q=" tag in the DKIM-Signature header - field. Obviously, a public key need only be retrieved if the process - of extracting the signature information is completely successful. - Details of key management and representation are described in - Section 3.6. The verifier MUST validate the key record and MUST - ignore any public key records that are malformed. - - When validating a message, a verifier MUST perform the following - steps in a manner that is semantically the same as performing them in - - - -Allman, et al. Standards Track [Page 43] - -RFC 4871 DKIM Signatures May 2007 - - - the order indicated (in some cases, the implementation may - parallelize or reorder these steps, as long as the semantics remain - unchanged): - - 1. Retrieve the public key as described in Section 3.6 using the - algorithm in the "q=" tag, the domain from the "d=" tag, and the - selector from the "s=" tag. - - 2. If the query for the public key fails to respond, the verifier - MAY defer acceptance of this email and return TEMPFAIL (key - unavailable). If verification is occurring during the incoming - SMTP session, this MAY be achieved with a 451/4.7.5 SMTP reply - code. Alternatively, the verifier MAY store the message in the - local queue for later trial or ignore the signature. Note that - storing a message in the local queue is subject to denial-of- - service attacks. - - 3. If the query for the public key fails because the corresponding - key record does not exist, the verifier MUST immediately return - PERMFAIL (no key for signature). - - 4. If the query for the public key returns multiple key records, the - verifier may choose one of the key records or may cycle through - the key records performing the remainder of these steps on each - record at the discretion of the implementer. The order of the - key records is unspecified. If the verifier chooses to cycle - through the key records, then the "return ..." wording in the - remainder of this section means "try the next key record, if any; - if none, return to try another signature in the usual way". - - 5. If the result returned from the query does not adhere to the - format defined in this specification, the verifier MUST ignore - the key record and return PERMFAIL (key syntax error). Verifiers - are urged to validate the syntax of key records carefully to - avoid attempted attacks. In particular, the verifier MUST ignore - keys with a version code ("v=" tag) that they do not implement. - - 6. If the "g=" tag in the public key does not match the Local-part - of the "i=" tag in the message signature header field, the - verifier MUST ignore the key record and return PERMFAIL - (inapplicable key). If the Local-part of the "i=" tag on the - message signature is not present, the "g=" tag must be "*" (valid - for all addresses in the domain) or the entire g= tag must be - omitted (which defaults to "g=*"), otherwise the verifier MUST - ignore the key record and return PERMFAIL (inapplicable key). - Other than this test, verifiers SHOULD NOT treat a message signed - with a key record having a "g=" tag any differently than one - without; in particular, verifiers SHOULD NOT prefer messages that - - - -Allman, et al. Standards Track [Page 44] - -RFC 4871 DKIM Signatures May 2007 - - - seem to have an individual signature by virtue of a "g=" tag - versus a domain signature. - - 7. If the "h=" tag exists in the public key record and the hash - algorithm implied by the a= tag in the DKIM-Signature header - field is not included in the contents of the "h=" tag, the - verifier MUST ignore the key record and return PERMFAIL - (inappropriate hash algorithm). - - 8. If the public key data (the "p=" tag) is empty, then this key has - been revoked and the verifier MUST treat this as a failed - signature check and return PERMFAIL (key revoked). There is no - defined semantic difference between a key that has been revoked - and a key record that has been removed. - - 9. If the public key data is not suitable for use with the algorithm - and key types defined by the "a=" and "k=" tags in the DKIM- - Signature header field, the verifier MUST immediately return - PERMFAIL (inappropriate key algorithm). - -6.1.3. Compute the Verification - - Given a signer and a public key, verifying a signature consists of - actions semantically equivalent to the following steps. - - 1. Based on the algorithm defined in the "c=" tag, the body length - specified in the "l=" tag, and the header field names in the "h=" - tag, prepare a canonicalized version of the message as is - described in Section 3.7 (note that this version does not - actually need to be instantiated). When matching header field - names in the "h=" tag against the actual message header field, - comparisons MUST be case-insensitive. - - 2. Based on the algorithm indicated in the "a=" tag, compute the - message hashes from the canonical copy as described in - Section 3.7. - - 3. Verify that the hash of the canonicalized message body computed - in the previous step matches the hash value conveyed in the "bh=" - tag. If the hash does not match, the verifier SHOULD ignore the - signature and return PERMFAIL (body hash did not verify). - - 4. Using the signature conveyed in the "b=" tag, verify the - signature against the header hash using the mechanism appropriate - for the public key algorithm described in the "a=" tag. If the - signature does not validate, the verifier SHOULD ignore the - signature and return PERMFAIL (signature did not verify). - - - - -Allman, et al. Standards Track [Page 45] - -RFC 4871 DKIM Signatures May 2007 - - - 5. Otherwise, the signature has correctly verified. - - INFORMATIVE IMPLEMENTER'S NOTE: Implementations might wish to - initiate the public-key query in parallel with calculating the - hash as the public key is not needed until the final decryption is - calculated. Implementations may also verify the signature on the - message header before validating that the message hash listed in - the "bh=" tag in the DKIM-Signature header field matches that of - the actual message body; however, if the body hash does not match, - the entire signature must be considered to have failed. - - A body length specified in the "l=" tag of the signature limits the - number of bytes of the body passed to the verification algorithm. - All data beyond that limit is not validated by DKIM. Hence, - verifiers might treat a message that contains bytes beyond the - indicated body length with suspicion, such as by truncating the - message at the indicated body length, declaring the signature invalid - (e.g., by returning PERMFAIL (unsigned content)), or conveying the - partial verification to the policy module. - - INFORMATIVE IMPLEMENTATION NOTE: Verifiers that truncate the body - at the indicated body length might pass on a malformed MIME - message if the signer used the "N-4" trick (omitting the final - "--CRLF") described in the informative note in Section 3.4.5. - Such verifiers may wish to check for this case and include a - trailing "--CRLF" to avoid breaking the MIME structure. A simple - way to achieve this might be to append "--CRLF" to any "multipart" - message with a body length; if the MIME structure is already - correctly formed, this will appear in the postlude and will not be - displayed to the end user. - -6.2. Communicate Verification Results - - Verifiers wishing to communicate the results of verification to other - parts of the mail system may do so in whatever manner they see fit. - For example, implementations might choose to add an email header - field to the message before passing it on. Any such header field - SHOULD be inserted before any existing DKIM-Signature or preexisting - authentication status header fields in the header field block. - - INFORMATIVE ADVICE to MUA filter writers: Patterns intended to - search for results header fields to visibly mark authenticated - mail for end users should verify that such header field was added - by the appropriate verifying domain and that the verified identity - matches the author identity that will be displayed by the MUA. In - particular, MUA filters should not be influenced by bogus results - - - - - -Allman, et al. Standards Track [Page 46] - -RFC 4871 DKIM Signatures May 2007 - - - header fields added by attackers. To circumvent this attack, - verifiers may wish to delete existing results header fields after - verification and before adding a new header field. - -6.3. Interpret Results/Apply Local Policy - - It is beyond the scope of this specification to describe what actions - a verifier system should make, but an authenticated email presents an - opportunity to a receiving system that unauthenticated email cannot. - Specifically, an authenticated email creates a predictable identifier - by which other decisions can reliably be managed, such as trust and - reputation. Conversely, unauthenticated email lacks a reliable - identifier that can be used to assign trust and reputation. It is - reasonable to treat unauthenticated email as lacking any trust and - having no positive reputation. - - In general, verifiers SHOULD NOT reject messages solely on the basis - of a lack of signature or an unverifiable signature; such rejection - would cause severe interoperability problems. However, if the - verifier does opt to reject such messages (for example, when - communicating with a peer who, by prior agreement, agrees to only - send signed messages), and the verifier runs synchronously with the - SMTP session and a signature is missing or does not verify, the MTA - SHOULD use a 550/5.7.x reply code. - - If it is not possible to fetch the public key, perhaps because the - key server is not available, a temporary failure message MAY be - generated using a 451/4.7.5 reply code, such as: - - 451 4.7.5 Unable to verify signature - key server unavailable - - Temporary failures such as inability to access the key server or - other external service are the only conditions that SHOULD use a 4xx - SMTP reply code. In particular, cryptographic signature verification - failures MUST NOT return 4xx SMTP replies. - - Once the signature has been verified, that information MUST be - conveyed to higher-level systems (such as explicit allow/whitelists - and reputation systems) and/or to the end user. If the message is - signed on behalf of any address other than that in the From: header - field, the mail system SHOULD take pains to ensure that the actual - signing identity is clear to the reader. - - The verifier MAY treat unsigned header fields with extreme - skepticism, including marking them as untrusted or even deleting them - before display to the end user. - - - - - -Allman, et al. Standards Track [Page 47] - -RFC 4871 DKIM Signatures May 2007 - - - While the symptoms of a failed verification are obvious -- the - signature doesn't verify -- establishing the exact cause can be more - difficult. If a selector cannot be found, is that because the - selector has been removed, or was the value changed somehow in - transit? If the signature line is missing, is that because it was - never there, or was it removed by an overzealous filter? For - diagnostic purposes, the exact reason why the verification fails - SHOULD be made available to the policy module and possibly recorded - in the system logs. If the email cannot be verified, then it SHOULD - be rendered the same as all unverified email regardless of whether or - not it looks like it was signed. - -7. IANA Considerations - - DKIM introduces some new namespaces that have been registered with - IANA. In all cases, new values are assigned only for values that - have been documented in a published RFC that has IETF Consensus - [RFC2434]. - -7.1. DKIM-Signature Tag Specifications - - A DKIM-Signature provides for a list of tag specifications. IANA has - established the DKIM-Signature Tag Specification Registry for tag - specifications that can be used in DKIM-Signature fields. - - The initial entries in the registry comprise: - - +------+-----------------+ - | TYPE | REFERENCE | - +------+-----------------+ - | v | (this document) | - | a | (this document) | - | b | (this document) | - | bh | (this document) | - | c | (this document) | - | d | (this document) | - | h | (this document) | - | i | (this document) | - | l | (this document) | - | q | (this document) | - | s | (this document) | - | t | (this document) | - | x | (this document) | - | z | (this document) | - +------+-----------------+ - - DKIM-Signature Tag Specification Registry Initial Values - - - - -Allman, et al. Standards Track [Page 48] - -RFC 4871 DKIM Signatures May 2007 - - -7.2. DKIM-Signature Query Method Registry - - The "q=" tag-spec (specified in Section 3.5) provides for a list of - query methods. - - IANA has established the DKIM-Signature Query Method Registry for - mechanisms that can be used to retrieve the key that will permit - validation processing of a message signed using DKIM. - - The initial entry in the registry comprises: - - +------+--------+-----------------+ - | TYPE | OPTION | REFERENCE | - +------+--------+-----------------+ - | dns | txt | (this document) | - +------+--------+-----------------+ - - DKIM-Signature Query Method Registry Initial Values - -7.3. DKIM-Signature Canonicalization Registry - - The "c=" tag-spec (specified in Section 3.5) provides for a specifier - for canonicalization algorithms for the header and body of the - message. - - IANA has established the DKIM-Signature Canonicalization Algorithm - Registry for algorithms for converting a message into a canonical - form before signing or verifying using DKIM. - - The initial entries in the header registry comprise: - - +---------+-----------------+ - | TYPE | REFERENCE | - +---------+-----------------+ - | simple | (this document) | - | relaxed | (this document) | - +---------+-----------------+ - - DKIM-Signature Header Canonicalization Algorithm Registry - Initial Values - - - - - - - - - - - -Allman, et al. Standards Track [Page 49] - -RFC 4871 DKIM Signatures May 2007 - - - The initial entries in the body registry comprise: - - +---------+-----------------+ - | TYPE | REFERENCE | - +---------+-----------------+ - | simple | (this document) | - | relaxed | (this document) | - +---------+-----------------+ - - DKIM-Signature Body Canonicalization Algorithm Registry - Initial Values - -7.4. _domainkey DNS TXT Record Tag Specifications - - A _domainkey DNS TXT record provides for a list of tag - specifications. IANA has established the DKIM _domainkey DNS TXT Tag - Specification Registry for tag specifications that can be used in DNS - TXT Records. - - The initial entries in the registry comprise: - - +------+-----------------+ - | TYPE | REFERENCE | - +------+-----------------+ - | v | (this document) | - | g | (this document) | - | h | (this document) | - | k | (this document) | - | n | (this document) | - | p | (this document) | - | s | (this document) | - | t | (this document) | - +------+-----------------+ - - DKIM _domainkey DNS TXT Record Tag Specification Registry - Initial Values - -7.5. DKIM Key Type Registry - - The "k=" (specified in Section 3.6.1) and the "a=" (specified in Section 3.5) tags provide for a list of - mechanisms that can be used to decode a DKIM signature. - - IANA has established the DKIM Key Type Registry for such mechanisms. - - - - - - - -Allman, et al. Standards Track [Page 50] - -RFC 4871 DKIM Signatures May 2007 - - - The initial entry in the registry comprises: - - +------+-----------+ - | TYPE | REFERENCE | - +------+-----------+ - | rsa | [RFC3447] | - +------+-----------+ - - DKIM Key Type Initial Values - -7.6. DKIM Hash Algorithms Registry - - The "h=" (specified in Section 3.6.1) and the "a=" (specified in Section 3.5) tags provide for a list of - mechanisms that can be used to produce a digest of message data. - - IANA has established the DKIM Hash Algorithms Registry for such - mechanisms. - - The initial entries in the registry comprise: - - +--------+-------------------+ - | TYPE | REFERENCE | - +--------+-------------------+ - | sha1 | [FIPS.180-2.2002] | - | sha256 | [FIPS.180-2.2002] | - +--------+-------------------+ - - DKIM Hash Algorithms Initial Values - -7.7. DKIM Service Types Registry - - The "s=" tag (specified in Section 3.6.1) provides for a - list of service types to which this selector may apply. - - IANA has established the DKIM Service Types Registry for service - types. - - The initial entries in the registry comprise: - - +-------+-----------------+ - | TYPE | REFERENCE | - +-------+-----------------+ - | email | (this document) | - | * | (this document) | - +-------+-----------------+ - - DKIM Service Types Registry Initial Values - - - -Allman, et al. Standards Track [Page 51] - -RFC 4871 DKIM Signatures May 2007 - - -7.8. DKIM Selector Flags Registry - - The "t=" tag (specified in Section 3.6.1) provides for a - list of flags to modify interpretation of the selector. - - IANA has established the DKIM Selector Flags Registry for additional - flags. - - The initial entries in the registry comprise: - - +------+-----------------+ - | TYPE | REFERENCE | - +------+-----------------+ - | y | (this document) | - | s | (this document) | - +------+-----------------+ - - DKIM Selector Flags Registry Initial Values - -7.9. DKIM-Signature Header Field - - IANA has added DKIM-Signature to the "Permanent Message Header - Fields" registry (see [RFC3864]) for the "mail" protocol, using this - document as the reference. - -8. Security Considerations - - It has been observed that any mechanism that is introduced that - attempts to stem the flow of spam is subject to intensive attack. - DKIM needs to be carefully scrutinized to identify potential attack - vectors and the vulnerability to each. See also [RFC4686]. - -8.1. Misuse of Body Length Limits ("l=" Tag) - - Body length limits (in the form of the "l=" tag) are subject to - several potential attacks. - -8.1.1. Addition of New MIME Parts to Multipart/* - - If the body length limit does not cover a closing MIME multipart - section (including the trailing "--CRLF" portion), then it is - possible for an attacker to intercept a properly signed multipart - message and add a new body part. Depending on the details of the - MIME type and the implementation of the verifying MTA and the - receiving MUA, this could allow an attacker to change the information - displayed to an end user from an apparently trusted source. - - - - - -Allman, et al. Standards Track [Page 52] - -RFC 4871 DKIM Signatures May 2007 - - - For example, if attackers can append information to a "text/html" - body part, they may be able to exploit a bug in some MUAs that - continue to read after a "" marker, and thus display HTML text - on top of already displayed text. If a message has a - "multipart/alternative" body part, they might be able to add a new - body part that is preferred by the displaying MUA. - -8.1.2. Addition of new HTML content to existing content - - Several receiving MUA implementations do not cease display after a - """" tag. In particular, this allows attacks involving - overlaying images on top of existing text. - - INFORMATIVE EXAMPLE: Appending the following text to an existing, - properly closed message will in many MUAs result in inappropriate - data being rendered on top of existing, correct data: -
- -
- -8.2. Misappropriated Private Key - - If the private key for a user is resident on their computer and is - not protected by an appropriately secure mechanism, it is possible - for malware to send mail as that user and any other user sharing the - same private key. The malware would not, however, be able to - generate signed spoofs of other signers' addresses, which would aid - in identification of the infected user and would limit the - possibilities for certain types of attacks involving socially - engineered messages. This threat applies mainly to MUA-based - implementations; protection of private keys on servers can be easily - achieved through the use of specialized cryptographic hardware. - - A larger problem occurs if malware on many users' computers obtains - the private keys for those users and transmits them via a covert - channel to a site where they can be shared. The compromised users - would likely not know of the misappropriation until they receive - "bounce" messages from messages they are purported to have sent. - Many users might not understand the significance of these bounce - messages and would not take action. - - One countermeasure is to use a user-entered passphrase to encrypt the - private key, although users tend to choose weak passphrases and often - reuse them for different purposes, possibly allowing an attack - against DKIM to be extended into other domains. Nevertheless, the - decoded private key might be briefly available to compromise by - malware when it is entered, or might be discovered via keystroke - - - -Allman, et al. Standards Track [Page 53] - -RFC 4871 DKIM Signatures May 2007 - - - logging. The added complexity of entering a passphrase each time one - sends a message would also tend to discourage the use of a secure - passphrase. - - A somewhat more effective countermeasure is to send messages through - an outgoing MTA that can authenticate the submitter using existing - techniques (e.g., SMTP Authentication), possibly validate the message - itself (e.g., verify that the header is legitimate and that the - content passes a spam content check), and sign the message using a - key appropriate for the submitter address. Such an MTA can also - apply controls on the volume of outgoing mail each user is permitted - to originate in order to further limit the ability of malware to - generate bulk email. - -8.3. Key Server Denial-of-Service Attacks - - Since the key servers are distributed (potentially separate for each - domain), the number of servers that would need to be attacked to - defeat this mechanism on an Internet-wide basis is very large. - Nevertheless, key servers for individual domains could be attacked, - impeding the verification of messages from that domain. This is not - significantly different from the ability of an attacker to deny - service to the mail exchangers for a given domain, although it - affects outgoing, not incoming, mail. - - A variation on this attack is that if a very large amount of mail - were to be sent using spoofed addresses from a given domain, the key - servers for that domain could be overwhelmed with requests. However, - given the low overhead of verification compared with handling of the - email message itself, such an attack would be difficult to mount. - -8.4. Attacks Against the DNS - - Since the DNS is a required binding for key services, specific - attacks against the DNS must be considered. - - While the DNS is currently insecure [RFC3833], these security - problems are the motivation behind DNS Security (DNSSEC) [RFC4033], - and all users of the DNS will reap the benefit of that work. - - DKIM is only intended as a "sufficient" method of proving - authenticity. It is not intended to provide strong cryptographic - proof about authorship or contents. Other technologies such as - OpenPGP [RFC2440] and S/MIME [RFC3851] address those requirements. - - A second security issue related to the DNS revolves around the - increased DNS traffic as a consequence of fetching selector-based - data as well as fetching signing domain policy. Widespread - - - -Allman, et al. Standards Track [Page 54] - -RFC 4871 DKIM Signatures May 2007 - - - deployment of DKIM will result in a significant increase in DNS - queries to the claimed signing domain. In the case of forgeries on a - large scale, DNS servers could see a substantial increase in queries. - - A specific DNS security issue that should be considered by DKIM - verifiers is the name chaining attack described in Section 2.3 of the - DNS Threat Analysis [RFC3833]. A DKIM verifier, while verifying a - DKIM-Signature header field, could be prompted to retrieve a key - record of an attacker's choosing. This threat can be minimized by - ensuring that name servers, including recursive name servers, used by - the verifier enforce strict checking of "glue" and other additional - information in DNS responses and are therefore not vulnerable to this - attack. - -8.5. Replay Attacks - - In this attack, a spammer sends a message to be spammed to an - accomplice, which results in the message being signed by the - originating MTA. The accomplice resends the message, including the - original signature, to a large number of recipients, possibly by - sending the message to many compromised machines that act as MTAs. - The messages, not having been modified by the accomplice, have valid - signatures. - - Partial solutions to this problem involve the use of reputation - services to convey the fact that the specific email address is being - used for spam and that messages from that signer are likely to be - spam. This requires a real-time detection mechanism in order to - react quickly enough. However, such measures might be prone to - abuse, if for example an attacker resent a large number of messages - received from a victim in order to make them appear to be a spammer. - - Large verifiers might be able to detect unusually large volumes of - mails with the same signature in a short time period. Smaller - verifiers can get substantially the same volume of information via - existing collaborative systems. - -8.6. Limits on Revoking Keys - - When a large domain detects undesirable behavior on the part of one - of its users, it might wish to revoke the key used to sign that - user's messages in order to disavow responsibility for messages that - have not yet been verified or that are the subject of a replay - attack. However, the ability of the domain to do so can be limited - if the same key, for scalability reasons, is used to sign messages - for many other users. Mechanisms for explicitly revoking keys on a - per-address basis have been proposed but require further study as to - their utility and the DNS load they represent. - - - -Allman, et al. Standards Track [Page 55] - -RFC 4871 DKIM Signatures May 2007 - - -8.7. Intentionally Malformed Key Records - - It is possible for an attacker to publish key records in DNS that are - intentionally malformed, with the intent of causing a denial-of- - service attack on a non-robust verifier implementation. The attacker - could then cause a verifier to read the malformed key record by - sending a message to one of its users referencing the malformed - record in a (not necessarily valid) signature. Verifiers MUST - thoroughly verify all key records retrieved from the DNS and be - robust against intentionally as well as unintentionally malformed key - records. - -8.8. Intentionally Malformed DKIM-Signature Header Fields - - Verifiers MUST be prepared to receive messages with malformed DKIM- - Signature header fields, and thoroughly verify the header field - before depending on any of its contents. - -8.9. Information Leakage - - An attacker could determine when a particular signature was verified - by using a per-message selector and then monitoring their DNS traffic - for the key lookup. This would act as the equivalent of a "web bug" - for verification time rather than when the message was read. - -8.10. Remote Timing Attacks - - In some cases, it may be possible to extract private keys using a - remote timing attack [BONEH03]. Implementations should consider - obfuscating the timing to prevent such attacks. - -8.11. Reordered Header Fields - - Existing standards allow intermediate MTAs to reorder header fields. - If a signer signs two or more header fields of the same name, this - can cause spurious verification errors on otherwise legitimate - messages. In particular, signers that sign any existing DKIM- - Signature fields run the risk of having messages incorrectly fail to - verify. - -8.12. RSA Attacks - - An attacker could create a large RSA signing key with a small - exponent, thus requiring that the verification key have a large - exponent. This will force verifiers to use considerable computing - resources to verify the signature. Verifiers might avoid this attack - by refusing to verify signatures that reference selectors with public - keys having unreasonable exponents. - - - -Allman, et al. Standards Track [Page 56] - -RFC 4871 DKIM Signatures May 2007 - - - In general, an attacker might try to overwhelm a verifier by flooding - it with messages requiring verification. This is similar to other - MTA denial-of-service attacks and should be dealt with in a similar - fashion. - -8.13. Inappropriate Signing by Parent Domains - - The trust relationship described in Section 3.8 could conceivably be - used by a parent domain to sign messages with identities in a - subdomain not administratively related to the parent. For example, - the ".com" registry could create messages with signatures using an - "i=" value in the example.com domain. There is no general solution - to this problem, since the administrative cut could occur anywhere in - the domain name. For example, in the domain "example.podunk.ca.us" - there are three administrative cuts (podunk.ca.us, ca.us, and us), - any of which could create messages with an identity in the full - domain. - - INFORMATIVE NOTE: This is considered an acceptable risk for the - same reason that it is acceptable for domain delegation. For - example, in the example above any of the domains could potentially - simply delegate "example.podunk.ca.us" to a server of their choice - and completely replace all DNS-served information. Note that a - verifier MAY ignore signatures that come from an unlikely domain - such as ".com", as discussed in Section 6.1.1. - -9. References - -9.1. Normative References - - [FIPS.180-2.2002] U.S. Department of Commerce, "Secure Hash - Standard", FIPS PUB 180-2, August 2002. - - [ITU.X660.1997] "Information Technology - ASN.1 encoding rules: - Specification of Basic Encoding Rules (BER), - Canonical Encoding Rules (CER) and Distinguished - Encoding Rules (DER)", ITU-T Recommendation X.660, - 1997. - - [RFC2045] Freed, N. and N. Borenstein, "Multipurpose - Internet Mail Extensions (MIME) Part One: Format - of Internet Message Bodies", RFC 2045, - November 1996. - - [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail - Extensions) Part Three: Message header field - Extensions for Non-ASCII Text", RFC 2047, - November 1996. - - - -Allman, et al. Standards Track [Page 57] - -RFC 4871 DKIM Signatures May 2007 - - - [RFC2119] Bradner, S., "Key words for use in RFCs to - Indicate Requirement Levels", BCP 14, RFC 2119, - March 1997. - - [RFC2821] Klensin, J., "Simple Mail Transfer Protocol", - RFC 2821, April 2001. - - [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, - April 2001. - - [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key - Cryptography Standards (PKCS) #1: RSA Cryptography - Specifications Version 2.1", RFC 3447, - February 2003. - - [RFC3490] Faltstrom, P., Hoffman, P., and A. Costello, - "Internationalizing Domain Names in Applications - (IDNA)", RFC 3490, March 2003. - - [RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF - for Syntax Specifications: ABNF", RFC 4234, - October 2005. - -9.2. Informative References - - [BONEH03] Proc. 12th USENIX Security Symposium, "Remote - Timing Attacks are Practical", 2003. - - [RFC1847] Galvin, J., Murphy, S., Crocker, S., and N. Freed, - "Security Multiparts for MIME: Multipart/Signed - and Multipart/Encrypted", RFC 1847, October 1995. - - [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for - Writing an IANA Considerations Section in RFCs", - BCP 26, RFC 2434, October 1998. - - [RFC2440] Callas, J., Donnerhacke, L., Finney, H., and R. - Thayer, "OpenPGP Message Format", RFC 2440, - November 1998. - - [RFC3766] Orman, H. and P. Hoffman, "Determining Strengths - for Public Keys Used For Exchanging Symmetric - Keys", RFC 3766, April 2004. - - [RFC3833] Atkins, D. and R. Austein, "Threat Analysis of the - Domain Name System (DNS)", RFC 3833, August 2004. - - - - - -Allman, et al. Standards Track [Page 58] - -RFC 4871 DKIM Signatures May 2007 - - - [RFC3851] Ramsdell, B., "S/MIME Version 3 Message - Specification", RFC 3851, June 1999. - - [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, - "Registration Procedures for Message Header - Fields", BCP 90, September 2004. - - [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., - and S. Rose, "DNS Security Introduction and - Requirements", RFC 4033, March 2005. - - [RFC4686] Fenton, J., "Analysis of Threats Motivating - DomainKeys Identified Mail (DKIM)", RFC 4686, - September 2006. - - [RFC4870] Delany, M., "Domain-Based Email Authentication - Using Public Keys Advertised in the DNS - (DomainKeys)", RFC 4870, May 2007. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Allman, et al. Standards Track [Page 59] - -RFC 4871 DKIM Signatures May 2007 - - -Appendix A. Example of Use (INFORMATIVE) - - This section shows the complete flow of an email from submission to - final delivery, demonstrating how the various components fit - together. The key used in this example is shown in Appendix C. - -A.1. The User Composes an Email - - - From: Joe SixPack - To: Suzie Q - Subject: Is dinner ready? - Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) - Message-ID: <20030712040037.46341.5F8J@football.example.com> - - Hi. - - We lost the game. Are you hungry yet? - - Joe. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Allman, et al. Standards Track [Page 60] - -RFC 4871 DKIM Signatures May 2007 - - -A.2. The Email Is Signed - - This email is signed by the example.com outbound email server and now - looks like this: - - DKIM-Signature: v=1; a=rsa-sha256; s=brisbane; d=example.com; - c=simple/simple; q=dns/txt; i=joe@football.example.com; - h=Received : From : To : Subject : Date : Message-ID; - bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=; - b=AuUoFEfDxTDkHlLXSZEpZj79LICEps6eda7W3deTVFOk4yAUoqOB - 4nujc7YopdG5dWLSdNg6xNAZpOPr+kHxt1IrE+NahM6L/LbvaHut - KVdkLLkpVaVVQPzeRDI009SO2Il5Lu7rDNH6mZckBdrIx0orEtZV - 4bmp/YzhwvcubU4=; - Received: from client1.football.example.com [192.0.2.1] - by submitserver.example.com with SUBMISSION; - Fri, 11 Jul 2003 21:01:54 -0700 (PDT) - From: Joe SixPack - To: Suzie Q - Subject: Is dinner ready? - Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) - Message-ID: <20030712040037.46341.5F8J@football.example.com> - - Hi. - - We lost the game. Are you hungry yet? - - Joe. - - The signing email server requires access to the private key - associated with the "brisbane" selector to generate this signature. - -A.3. The Email Signature Is Verified - - The signature is normally verified by an inbound SMTP server or - possibly the final delivery agent. However, intervening MTAs can - also perform this verification if they choose to do so. The - verification process uses the domain "example.com" extracted from the - "d=" tag and the selector "brisbane" from the "s=" tag in the DKIM- - Signature header field to form the DNS DKIM query for: - - brisbane._domainkey.example.com - - Signature verification starts with the physically last Received - header field, the From header field, and so forth, in the order - listed in the "h=" tag. Verification follows with a single CRLF - followed by the body (starting with "Hi."). The email is canonically - prepared for verifying with the "simple" method. The result of the - query and subsequent verification of the signature is stored (in this - - - -Allman, et al. Standards Track [Page 61] - -RFC 4871 DKIM Signatures May 2007 - - - example) in the X-Authentication-Results header field line. After - successful verification, the email looks like this: - - X-Authentication-Results: shopping.example.net - header.from=joe@football.example.com; dkim=pass - Received: from mout23.football.example.com (192.168.1.1) - by shopping.example.net with SMTP; - Fri, 11 Jul 2003 21:01:59 -0700 (PDT) - DKIM-Signature: v=1; a=rsa-sha256; s=brisbane; d=example.com; - c=simple/simple; q=dns/txt; i=joe@football.example.com; - h=Received : From : To : Subject : Date : Message-ID; - bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=; - b=AuUoFEfDxTDkHlLXSZEpZj79LICEps6eda7W3deTVFOk4yAUoqOB - 4nujc7YopdG5dWLSdNg6xNAZpOPr+kHxt1IrE+NahM6L/LbvaHut - KVdkLLkpVaVVQPzeRDI009SO2Il5Lu7rDNH6mZckBdrIx0orEtZV - 4bmp/YzhwvcubU4=; - Received: from client1.football.example.com [192.0.2.1] - by submitserver.example.com with SUBMISSION; - Fri, 11 Jul 2003 21:01:54 -0700 (PDT) - From: Joe SixPack - To: Suzie Q - Subject: Is dinner ready? - Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT) - Message-ID: <20030712040037.46341.5F8J@football.example.com> - - Hi. - - We lost the game. Are you hungry yet? - - Joe. - -Appendix B. Usage Examples (INFORMATIVE) - - DKIM signing and validating can be used in different ways, for - different operational scenarios. This Appendix discusses some common - examples. - - NOTE: Descriptions in this Appendix are for informational purposes - only. They describe various ways that DKIM can be used, given - particular constraints and needs. In no case are these examples - intended to be taken as providing explanation or guidance - concerning DKIM specification details, when creating an - implementation. - - - - - - - - -Allman, et al. Standards Track [Page 62] - -RFC 4871 DKIM Signatures May 2007 - - -B.1. Alternate Submission Scenarios - - In the most simple scenario, a user's MUA, MSA, and Internet - (boundary) MTA are all within the same administrative environment, - using the same domain name. Therefore, all of the components - involved in submission and initial transfer are related. However, it - is common for two or more of the components to be under independent - administrative control. This creates challenges for choosing and - administering the domain name to use for signing, and for its - relationship to common email identity header fields. - -B.1.1. Delegated Business Functions - - Some organizations assign specific business functions to discrete - groups, inside or outside the organization. The goal, then, is to - authorize that group to sign some mail, but to constrain what - signatures they can generate. DKIM selectors (the "s=" signature - tag) and granularity (the "g=" key tag) facilitate this kind of - restricted authorization. Examples of these outsourced business - functions are legitimate email marketing providers and corporate - benefits providers. - - Here, the delegated group needs to be able to send messages that are - signed, using the email domain of the client company. At the same - time, the client often is reluctant to register a key for the - provider that grants the ability to send messages for arbitrary - addresses in the domain. - - There are multiple ways to administer these usage scenarios. In one - case, the client organization provides all of the public query - service (for example, DNS) administration, and in another it uses DNS - delegation to enable all ongoing administration of the DKIM key - record by the delegated group. - - If the client organization retains responsibility for all of the DNS - administration, the outsourcing company can generate a key pair, - supplying the public key to the client company, which then registers - it in the query service, using a unique selector that authorizes a - specific From header field Local-part. For example, a client with - the domain "example.com" could have the selector record specify - "g=winter-promotions" so that this signature is only valid for mail - with a From address of "winter-promotions@example.com". This would - enable the provider to send messages using that specific address and - have them verify properly. The client company retains control over - the email address because it retains the ability to revoke the key at - any time. - - - - - -Allman, et al. Standards Track [Page 63] - -RFC 4871 DKIM Signatures May 2007 - - - If the client wants the delegated group to do the DNS administration, - it can have the domain name that is specified with the selector point - to the provider's DNS server. The provider then creates and - maintains all of the DKIM signature information for that selector. - Hence, the client cannot provide constraints on the Local-part of - addresses that get signed, but it can revoke the provider's signing - rights by removing the DNS delegation record. - -B.1.2. PDAs and Similar Devices - - PDAs demonstrate the need for using multiple keys per domain. - Suppose that John Doe wanted to be able to send messages using his - corporate email address, jdoe@example.com, and his email device did - not have the ability to make a Virtual Private Network (VPN) - connection to the corporate network, either because the device is - limited or because there are restrictions enforced by his Internet - access provider. If the device was equipped with a private key - registered for jdoe@example.com by the administrator of the - example.com domain, and appropriate software to sign messages, John - could sign the message on the device itself before transmission - through the outgoing network of the access service provider. - -B.1.3. Roaming Users - - Roaming users often find themselves in circumstances where it is - convenient or necessary to use an SMTP server other than their home - server; examples are conferences and many hotels. In such - circumstances, a signature that is added by the submission service - will use an identity that is different from the user's home system. - - Ideally, roaming users would connect back to their home server using - either a VPN or a SUBMISSION server running with SMTP AUTHentication - on port 587. If the signing can be performed on the roaming user's - laptop, then they can sign before submission, although the risk of - further modification is high. If neither of these are possible, - these roaming users will not be able to send mail signed using their - own domain key. - -B.1.4. Independent (Kiosk) Message Submission - - Stand-alone services, such as walk-up kiosks and web-based - information services, have no enduring email service relationship - with the user, but users occasionally request that mail be sent on - their behalf. For example, a website providing news often allows the - reader to forward a copy of the article to a friend. This is - typically done using the reader's own email address, to indicate who - the author is. This is sometimes referred to as the "Evite problem", - - - - -Allman, et al. Standards Track [Page 64] - -RFC 4871 DKIM Signatures May 2007 - - - named after the website of the same name that allows a user to send - invitations to friends. - - A common way this is handled is to continue to put the reader's email - address in the From header field of the message, but put an address - owned by the email posting site into the Sender header field. The - posting site can then sign the message, using the domain that is in - the Sender field. This provides useful information to the receiving - email site, which is able to correlate the signing domain with the - initial submission email role. - - Receiving sites often wish to provide their end users with - information about mail that is mediated in this fashion. Although - the real efficacy of different approaches is a subject for human - factors usability research, one technique that is used is for the - verifying system to rewrite the From header field, to indicate the - address that was verified. For example: From: John Doe via - news@news-site.com . (Note that such rewriting - will break a signature, unless it is done after the verification pass - is complete.) - -B.2. Alternate Delivery Scenarios - - Email is often received at a mailbox that has an address different - from the one used during initial submission. In these cases, an - intermediary mechanism operates at the address originally used and it - then passes the message on to the final destination. This mediation - process presents some challenges for DKIM signatures. - -B.2.1. Affinity Addresses - - "Affinity addresses" allow a user to have an email address that - remains stable, even as the user moves among different email - providers. They are typically associated with college alumni - associations, professional organizations, and recreational - organizations with which they expect to have a long-term - relationship. These domains usually provide forwarding of incoming - email, and they often have an associated Web application that - authenticates the user and allows the forwarding address to be - changed. However, these services usually depend on users sending - outgoing messages through their own service providers' MTAs. Hence, - mail that is signed with the domain of the affinity address is not - signed by an entity that is administered by the organization owning - that domain. - - With DKIM, affinity domains could use the Web application to allow - users to register per-user keys to be used to sign messages on behalf - of their affinity address. The user would take away the secret half - - - -Allman, et al. Standards Track [Page 65] - -RFC 4871 DKIM Signatures May 2007 - - - of the key pair for signing, and the affinity domain would publish - the public half in DNS for access by verifiers. - - This is another application that takes advantage of user-level - keying, and domains used for affinity addresses would typically have - a very large number of user-level keys. Alternatively, the affinity - domain could handle outgoing mail, operating a mail submission agent - that authenticates users before accepting and signing messages for - them. This is of course dependent on the user's service provider not - blocking the relevant TCP ports used for mail submission. - -B.2.2. Simple Address Aliasing (.forward) - - In some cases, a recipient is allowed to configure an email address - to cause automatic redirection of email messages from the original - address to another, such as through the use of a Unix .forward file. - In this case, messages are typically redirected by the mail handling - service of the recipient's domain, without modification, except for - the addition of a Received header field to the message and a change - in the envelope recipient address. In this case, the recipient at - the final address' mailbox is likely to be able to verify the - original signature since the signed content has not changed, and DKIM - is able to validate the message signature. - -B.2.3. Mailing Lists and Re-Posters - - There is a wide range of behaviors in services that take delivery of - a message and then resubmit it. A primary example is with mailing - lists (collectively called "forwarders" below), ranging from those - that make no modification to the message itself, other than to add a - Received header field and change the envelope information, to those - that add header fields, change the Subject header field, add content - to the body (typically at the end), or reformat the body in some - manner. The simple ones produce messages that are quite similar to - the automated alias services. More elaborate systems essentially - create a new message. - - A Forwarder that does not modify the body or signed header fields of - a message is likely to maintain the validity of the existing - signature. It also could choose to add its own signature to the - message. - - Forwarders which modify a message in a way that could make an - existing signature invalid are particularly good candidates for - adding their own signatures (e.g., mailing-list-name@example.net). - Since (re-)signing is taking responsibility for the content of the - message, these signing forwarders are likely to be selective, and - forward or re-sign a message only if it is received with a valid - - - -Allman, et al. Standards Track [Page 66] - -RFC 4871 DKIM Signatures May 2007 - - - signature or if they have some other basis for knowing that the - message is not spoofed. - - A common practice among systems that are primarily redistributors of - mail is to add a Sender header field to the message, to identify the - address being used to sign the message. This practice will remove - any preexisting Sender header field as required by [RFC2822]. The - forwarder applies a new DKIM-Signature header field with the - signature, public key, and related information of the forwarder. - -Appendix C. Creating a Public Key (INFORMATIVE) - - The default signature is an RSA signed SHA256 digest of the complete - email. For ease of explanation, the openssl command is used to - describe the mechanism by which keys and signatures are managed. One - way to generate a 1024-bit, unencrypted private key suitable for DKIM - is to use openssl like this: - - $ openssl genrsa -out rsa.private 1024 - - For increased security, the "-passin" parameter can also be added to - encrypt the private key. Use of this parameter will require entering - a password for several of the following steps. Servers may prefer to - use hardware cryptographic support. - - The "genrsa" step results in the file rsa.private containing the key - information similar to this: - - -----BEGIN RSA PRIVATE KEY----- - MIICXwIBAAKBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkMoGeLnQg1fWn7/zYtIxN2SnFC - jxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v/RtdC2UzJ1lWT947qR+Rcac2gb - to/NMqJ0fzfVjH4OuKhitdY9tf6mcwGjaNBcWToIMmPSPDdQPNUYckcQ2QIDAQAB - AoGBALmn+XwWk7akvkUlqb+dOxyLB9i5VBVfje89Teolwc9YJT36BGN/l4e0l6QX - /1//6DWUTB3KI6wFcm7TWJcxbS0tcKZX7FsJvUz1SbQnkS54DJck1EZO/BLa5ckJ - gAYIaqlA9C0ZwM6i58lLlPadX/rtHb7pWzeNcZHjKrjM461ZAkEA+itss2nRlmyO - n1/5yDyCluST4dQfO8kAB3toSEVc7DeFeDhnC1mZdjASZNvdHS4gbLIA1hUGEF9m - 3hKsGUMMPwJBAPW5v/U+AWTADFCS22t72NUurgzeAbzb1HWMqO4y4+9Hpjk5wvL/ - eVYizyuce3/fGke7aRYw/ADKygMJdW8H/OcCQQDz5OQb4j2QDpPZc0Nc4QlbvMsj - 7p7otWRO5xRa6SzXqqV3+F0VpqvDmshEBkoCydaYwc2o6WQ5EBmExeV8124XAkEA - qZzGsIxVP+sEVRWZmW6KNFSdVUpk3qzK0Tz/WjQMe5z0UunY9Ax9/4PVhp/j61bf - eAYXunajbBSOLlx4D+TunwJBANkPI5S9iylsbLs6NkaMHV6k5ioHBBmgCak95JGX - GMot/L2x0IYyMLAz6oLWh2hm7zwtb0CgOrPo1ke44hFYnfc= - -----END RSA PRIVATE KEY----- - - To extract the public-key component from the private key, use openssl - like this: - - $ openssl rsa -in rsa.private -out rsa.public -pubout -outform PEM - - - -Allman, et al. Standards Track [Page 67] - -RFC 4871 DKIM Signatures May 2007 - - - This results in the file rsa.public containing the key information - similar to this: - - -----BEGIN PUBLIC KEY----- - MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkM - oGeLnQg1fWn7/zYtIxN2SnFCjxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v/R - tdC2UzJ1lWT947qR+Rcac2gbto/NMqJ0fzfVjH4OuKhitdY9tf6mcwGjaNBcWToI - MmPSPDdQPNUYckcQ2QIDAQAB - -----END PUBLIC KEY----- - - This public-key data (without the BEGIN and END tags) is placed in - the DNS: - - brisbane IN TXT ("v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ" - "KBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkMoGeLnQg1fWn7/zYt" - "IxN2SnFCjxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v" - "/RtdC2UzJ1lWT947qR+Rcac2gbto/NMqJ0fzfVjH4OuKhi" - "tdY9tf6mcwGjaNBcWToIMmPSPDdQPNUYckcQ2QIDAQAB") - -Appendix D. MUA Considerations - - When a DKIM signature is verified, the processing system sometimes - makes the result available to the recipient user's MUA. How to - present this information to the user in a way that helps them is a - matter of continuing human factors usability research. The tendency - is to have the MUA highlight the address associated with this signing - identity in some way, in an attempt to show the user the address from - which the mail was sent. An MUA might do this with visual cues such - as graphics, or it might include the address in an alternate view, or - it might even rewrite the original From address using the verified - information. Some MUAs might indicate which header fields were - protected by the validated DKIM signature. This could be done with a - positive indication on the signed header fields, with a negative - indication on the unsigned header fields, by visually hiding the - unsigned header fields, or some combination of these. If an MUA uses - visual indications for signed header fields, the MUA probably needs - to be careful not to display unsigned header fields in a way that - might be construed by the end user as having been signed. If the - message has an l= tag whose value does not extend to the end of the - message, the MUA might also hide or mark the portion of the message - body that was not signed. - - The aforementioned information is not intended to be exhaustive. The - MUA may choose to highlight, accentuate, hide, or otherwise display - any other information that may, in the opinion of the MUA author, be - deemed important to the end user. - - - - - -Allman, et al. Standards Track [Page 68] - -RFC 4871 DKIM Signatures May 2007 - - -Appendix E. Acknowledgements - - The authors wish to thank Russ Allbery, Edwin Aoki, Claus Assmann, - Steve Atkins, Rob Austein, Fred Baker, Mark Baugher, Steve Bellovin, - Nathaniel Borenstein, Dave Crocker, Michael Cudahy, Dennis Dayman, - Jutta Degener, Frank Ellermann, Patrik Faeltstroem, Mark Fanto, - Stephen Farrell, Duncan Findlay, Elliot Gillum, Olafur - Gu[eth]mundsson, Phillip Hallam-Baker, Tony Hansen, Sam Hartman, - Arvel Hathcock, Amir Herzberg, Paul Hoffman, Russ Housley, Craig - Hughes, Cullen Jennings, Don Johnsen, Harry Katz, Murray S. - Kucherawy, Barry Leiba, John Levine, Charles Lindsey, Simon - Longsdale, David Margrave, Justin Mason, David Mayne, Thierry Moreau, - Steve Murphy, Russell Nelson, Dave Oran, Doug Otis, Shamim Pirzada, - Juan Altmayer Pizzorno, Sanjay Pol, Blake Ramsdell, Christian Renaud, - Scott Renfro, Neil Rerup, Eric Rescorla, Dave Rossetti, Hector - Santos, Jim Schaad, the Spamhaus.org team, Malte S. Stretz, Robert - Sanders, Rand Wacker, Sam Weiler, and Dan Wing for their valuable - suggestions and constructive criticism. - - The DomainKeys specification was a primary source from which this - specification has been derived. Further information about DomainKeys - is at [RFC4870]. - -Authors' Addresses - - Eric Allman - Sendmail, Inc. - 6425 Christie Ave, Suite 400 - Emeryville, CA 94608 - USA - - Phone: +1 510 594 5501 - EMail: eric+dkim@sendmail.org - URI: - - - Jon Callas - PGP Corporation - 3460 West Bayshore - Palo Alto, CA 94303 - USA - - Phone: +1 650 319 9016 - EMail: jon@pgp.com - - - - - - - -Allman, et al. Standards Track [Page 69] - -RFC 4871 DKIM Signatures May 2007 - - - Mark Delany - Yahoo! Inc - 701 First Avenue - Sunnyvale, CA 95087 - USA - - Phone: +1 408 349 6831 - EMail: markd+dkim@yahoo-inc.com - URI: - - - Miles Libbey - Yahoo! Inc - 701 First Avenue - Sunnyvale, CA 95087 - USA - - EMail: mlibbeymail-mailsig@yahoo.com - URI: - - - Jim Fenton - Cisco Systems, Inc. - MS SJ-9/2 - 170 W. Tasman Drive - San Jose, CA 95134-1706 - USA - - Phone: +1 408 526 5914 - EMail: fenton@cisco.com - URI: - - - Michael Thomas - Cisco Systems, Inc. - MS SJ-9/2 - 170 W. Tasman Drive - San Jose, CA 95134-1706 - - Phone: +1 408 525 5386 - EMail: mat@cisco.com - - - - - - - - - - -Allman, et al. Standards Track [Page 70] - -RFC 4871 DKIM Signatures May 2007 - - -Full Copyright Statement - - Copyright (C) The IETF Trust (2007). - - This document is subject to the rights, licenses and restrictions - contained in BCP 78, and except as set forth therein, the authors - retain all their rights. - - This document and the information contained herein are provided on an - "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS - OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND - THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF - THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED - WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Intellectual Property - - The IETF takes no position regarding the validity or scope of any - Intellectual Property Rights or other rights that might be claimed to - pertain to the implementation or use of the technology described in - this document or the extent to which any license under such rights - might or might not be available; nor does it represent that it has - made any independent effort to identify any such rights. Information - on the procedures with respect to rights in RFC documents can be - found in BCP 78 and BCP 79. - - Copies of IPR disclosures made to the IETF Secretariat and any - assurances of licenses to be made available, or the result of an - attempt made to obtain a general license or permission for the use of - such proprietary rights by implementers or users of this - specification can be obtained from the IETF on-line IPR repository at - http://www.ietf.org/ipr. - - The IETF invites any interested party to bring to its attention any - copyrights, patents or patent applications, or other proprietary - rights that may cover technology that may be required to implement - this standard. Please address the information to the IETF at - ietf-ipr@ietf.org. - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - -Allman, et al. Standards Track [Page 71] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4880.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4880.txt deleted file mode 100644 index 0db94537..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4880.txt +++ /dev/null @@ -1,5042 +0,0 @@ - - - - - -Network Working Group J. Callas -Request for Comments: 4880 PGP Corporation -Obsoletes: 1991, 2440 L. Donnerhacke -Category: Standards Track IKS GmbH - H. Finney - PGP Corporation - D. Shaw - R. Thayer - November 2007 - - - OpenPGP Message Format - -Status of This Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Abstract - - This document is maintained in order to publish all necessary - information needed to develop interoperable applications based on the - OpenPGP format. It is not a step-by-step cookbook for writing an - application. It describes only the format and methods needed to - read, check, generate, and write conforming packets crossing any - network. It does not deal with storage and implementation questions. - It does, however, discuss implementation issues necessary to avoid - security flaws. - - OpenPGP software uses a combination of strong public-key and - symmetric cryptography to provide security services for electronic - communications and data storage. These services include - confidentiality, key management, authentication, and digital - signatures. This document specifies the message formats used in - OpenPGP. - - - - - - - - - - - - - -Callas, et al Standards Track [Page 1] - -RFC 4880 OpenPGP Message Format November 2007 - - -Table of Contents - - 1. Introduction ....................................................5 - 1.1. Terms ......................................................5 - 2. General functions ...............................................6 - 2.1. Confidentiality via Encryption .............................6 - 2.2. Authentication via Digital Signature .......................7 - 2.3. Compression ................................................7 - 2.4. Conversion to Radix-64 .....................................8 - 2.5. Signature-Only Applications ................................8 - 3. Data Element Formats ............................................8 - 3.1. Scalar Numbers .............................................8 - 3.2. Multiprecision Integers ....................................9 - 3.3. Key IDs ....................................................9 - 3.4. Text .......................................................9 - 3.5. Time Fields ...............................................10 - 3.6. Keyrings ..................................................10 - 3.7. String-to-Key (S2K) Specifiers ............................10 - 3.7.1. String-to-Key (S2K) Specifier Types ................10 - 3.7.1.1. Simple S2K ................................10 - 3.7.1.2. Salted S2K ................................11 - 3.7.1.3. Iterated and Salted S2K ...................11 - 3.7.2. String-to-Key Usage ................................12 - 3.7.2.1. Secret-Key Encryption .....................12 - 3.7.2.2. Symmetric-Key Message Encryption ..........13 - 4. Packet Syntax ..................................................13 - 4.1. Overview ..................................................13 - 4.2. Packet Headers ............................................13 - 4.2.1. Old Format Packet Lengths ..........................14 - 4.2.2. New Format Packet Lengths ..........................15 - 4.2.2.1. One-Octet Lengths .........................15 - 4.2.2.2. Two-Octet Lengths .........................15 - 4.2.2.3. Five-Octet Lengths ........................15 - 4.2.2.4. Partial Body Lengths ......................16 - 4.2.3. Packet Length Examples .............................16 - 4.3. Packet Tags ...............................................17 - 5. Packet Types ...................................................17 - 5.1. Public-Key Encrypted Session Key Packets (Tag 1) ..........17 - 5.2. Signature Packet (Tag 2) ..................................19 - 5.2.1. Signature Types ....................................19 - 5.2.2. Version 3 Signature Packet Format ..................21 - 5.2.3. Version 4 Signature Packet Format ..................24 - 5.2.3.1. Signature Subpacket Specification .........25 - 5.2.3.2. Signature Subpacket Types .................27 - 5.2.3.3. Notes on Self-Signatures ..................27 - 5.2.3.4. Signature Creation Time ...................28 - 5.2.3.5. Issuer ....................................28 - 5.2.3.6. Key Expiration Time .......................28 - - - -Callas, et al Standards Track [Page 2] - -RFC 4880 OpenPGP Message Format November 2007 - - - 5.2.3.7. Preferred Symmetric Algorithms ............28 - 5.2.3.8. Preferred Hash Algorithms .................29 - 5.2.3.9. Preferred Compression Algorithms ..........29 - 5.2.3.10. Signature Expiration Time ................29 - 5.2.3.11. Exportable Certification .................29 - 5.2.3.12. Revocable ................................30 - 5.2.3.13. Trust Signature ..........................30 - 5.2.3.14. Regular Expression .......................31 - 5.2.3.15. Revocation Key ...........................31 - 5.2.3.16. Notation Data ............................31 - 5.2.3.17. Key Server Preferences ...................32 - 5.2.3.18. Preferred Key Server .....................33 - 5.2.3.19. Primary User ID ..........................33 - 5.2.3.20. Policy URI ...............................33 - 5.2.3.21. Key Flags ................................33 - 5.2.3.22. Signer's User ID .........................34 - 5.2.3.23. Reason for Revocation ....................35 - 5.2.3.24. Features .................................36 - 5.2.3.25. Signature Target .........................36 - 5.2.3.26. Embedded Signature .......................37 - 5.2.4. Computing Signatures ...............................37 - 5.2.4.1. Subpacket Hints ...........................38 - 5.3. Symmetric-Key Encrypted Session Key Packets (Tag 3) .......38 - 5.4. One-Pass Signature Packets (Tag 4) ........................39 - 5.5. Key Material Packet .......................................40 - 5.5.1. Key Packet Variants ................................40 - 5.5.1.1. Public-Key Packet (Tag 6) .................40 - 5.5.1.2. Public-Subkey Packet (Tag 14) .............40 - 5.5.1.3. Secret-Key Packet (Tag 5) .................41 - 5.5.1.4. Secret-Subkey Packet (Tag 7) ..............41 - 5.5.2. Public-Key Packet Formats ..........................41 - 5.5.3. Secret-Key Packet Formats ..........................43 - 5.6. Compressed Data Packet (Tag 8) ............................45 - 5.7. Symmetrically Encrypted Data Packet (Tag 9) ...............45 - 5.8. Marker Packet (Obsolete Literal Packet) (Tag 10) ..........46 - 5.9. Literal Data Packet (Tag 11) ..............................46 - 5.10. Trust Packet (Tag 12) ....................................47 - 5.11. User ID Packet (Tag 13) ..................................48 - 5.12. User Attribute Packet (Tag 17) ...........................48 - 5.12.1. The Image Attribute Subpacket .....................48 - 5.13. Sym. Encrypted Integrity Protected Data Packet (Tag 18) ..49 - 5.14. Modification Detection Code Packet (Tag 19) ..............52 - 6. Radix-64 Conversions ...........................................53 - 6.1. An Implementation of the CRC-24 in "C" ....................54 - 6.2. Forming ASCII Armor .......................................54 - 6.3. Encoding Binary in Radix-64 ...............................57 - 6.4. Decoding Radix-64 .........................................58 - 6.5. Examples of Radix-64 ......................................59 - - - -Callas, et al Standards Track [Page 3] - -RFC 4880 OpenPGP Message Format November 2007 - - - 6.6. Example of an ASCII Armored Message .......................59 - 7. Cleartext Signature Framework ..................................59 - 7.1. Dash-Escaped Text .........................................60 - 8. Regular Expressions ............................................61 - 9. Constants ......................................................61 - 9.1. Public-Key Algorithms .....................................62 - 9.2. Symmetric-Key Algorithms ..................................62 - 9.3. Compression Algorithms ....................................63 - 9.4. Hash Algorithms ...........................................63 - 10. IANA Considerations ...........................................63 - 10.1. New String-to-Key Specifier Types ........................64 - 10.2. New Packets ..............................................64 - 10.2.1. User Attribute Types ..............................64 - 10.2.1.1. Image Format Subpacket Types .............64 - 10.2.2. New Signature Subpackets ..........................64 - 10.2.2.1. Signature Notation Data Subpackets .......65 - 10.2.2.2. Key Server Preference Extensions .........65 - 10.2.2.3. Key Flags Extensions .....................65 - 10.2.2.4. Reason For Revocation Extensions .........65 - 10.2.2.5. Implementation Features ..................66 - 10.2.3. New Packet Versions ...............................66 - 10.3. New Algorithms ...........................................66 - 10.3.1. Public-Key Algorithms .............................66 - 10.3.2. Symmetric-Key Algorithms ..........................67 - 10.3.3. Hash Algorithms ...................................67 - 10.3.4. Compression Algorithms ............................67 - 11. Packet Composition ............................................67 - 11.1. Transferable Public Keys .................................67 - 11.2. Transferable Secret Keys .................................69 - 11.3. OpenPGP Messages .........................................69 - 11.4. Detached Signatures ......................................70 - 12. Enhanced Key Formats ..........................................70 - 12.1. Key Structures ...........................................70 - 12.2. Key IDs and Fingerprints .................................71 - 13. Notes on Algorithms ...........................................72 - 13.1. PKCS#1 Encoding in OpenPGP ...............................72 - 13.1.1. EME-PKCS1-v1_5-ENCODE .............................73 - 13.1.2. EME-PKCS1-v1_5-DECODE .............................73 - 13.1.3. EMSA-PKCS1-v1_5 ...................................74 - 13.2. Symmetric Algorithm Preferences ..........................75 - 13.3. Other Algorithm Preferences ..............................76 - 13.3.1. Compression Preferences ...........................76 - 13.3.2. Hash Algorithm Preferences ........................76 - 13.4. Plaintext ................................................77 - 13.5. RSA ......................................................77 - 13.6. DSA ......................................................77 - 13.7. Elgamal ..................................................78 - 13.8. Reserved Algorithm Numbers ...............................78 - - - -Callas, et al Standards Track [Page 4] - -RFC 4880 OpenPGP Message Format November 2007 - - - 13.9. OpenPGP CFB Mode .........................................78 - 13.10. Private or Experimental Parameters ......................79 - 13.11. Extension of the MDC System .............................80 - 13.12. Meta-Considerations for Expansion .......................80 - 14. Security Considerations .......................................81 - 15. Implementation Nits ...........................................84 - 16. References ....................................................86 - 16.1. Normative References .....................................86 - 16.2. Informative References ...................................88 - -1. Introduction - - This document provides information on the message-exchange packet - formats used by OpenPGP to provide encryption, decryption, signing, - and key management functions. It is a revision of RFC 2440, "OpenPGP - Message Format", which itself replaces RFC 1991, "PGP Message - Exchange Formats" [RFC1991] [RFC2440]. - -1.1. Terms - - * OpenPGP - This is a term for security software that uses PGP 5.x - as a basis, formalized in RFC 2440 and this document. - - * PGP - Pretty Good Privacy. PGP is a family of software systems - developed by Philip R. Zimmermann from which OpenPGP is based. - - * PGP 2.6.x - This version of PGP has many variants, hence the term - PGP 2.6.x. It used only RSA, MD5, and IDEA for its cryptographic - transforms. An informational RFC, RFC 1991, was written - describing this version of PGP. - - * PGP 5.x - This version of PGP is formerly known as "PGP 3" in the - community and also in the predecessor of this document, RFC 1991. - It has new formats and corrects a number of problems in the PGP - 2.6.x design. It is referred to here as PGP 5.x because that - software was the first release of the "PGP 3" code base. - - * GnuPG - GNU Privacy Guard, also called GPG. GnuPG is an OpenPGP - implementation that avoids all encumbered algorithms. - Consequently, early versions of GnuPG did not include RSA public - keys. GnuPG may or may not have (depending on version) support - for IDEA or other encumbered algorithms. - - "PGP", "Pretty Good", and "Pretty Good Privacy" are trademarks of PGP - Corporation and are used with permission. The term "OpenPGP" refers - to the protocol described in this and related documents. - - - - - -Callas, et al Standards Track [Page 5] - -RFC 4880 OpenPGP Message Format November 2007 - - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", - "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this - document are to be interpreted as described in [RFC2119]. - - The key words "PRIVATE USE", "HIERARCHICAL ALLOCATION", "FIRST COME - FIRST SERVED", "EXPERT REVIEW", "SPECIFICATION REQUIRED", "IESG - APPROVAL", "IETF CONSENSUS", and "STANDARDS ACTION" that appear in - this document when used to describe namespace allocation are to be - interpreted as described in [RFC2434]. - -2. General functions - - OpenPGP provides data integrity services for messages and data files - by using these core technologies: - - - digital signatures - - - encryption - - - compression - - - Radix-64 conversion - - In addition, OpenPGP provides key management and certificate - services, but many of these are beyond the scope of this document. - -2.1. Confidentiality via Encryption - - OpenPGP combines symmetric-key encryption and public-key encryption - to provide confidentiality. When made confidential, first the object - is encrypted using a symmetric encryption algorithm. Each symmetric - key is used only once, for a single object. A new "session key" is - generated as a random number for each object (sometimes referred to - as a session). Since it is used only once, the session key is bound - to the message and transmitted with it. To protect the key, it is - encrypted with the receiver's public key. The sequence is as - follows: - - 1. The sender creates a message. - - 2. The sending OpenPGP generates a random number to be used as a - session key for this message only. - - 3. The session key is encrypted using each recipient's public key. - These "encrypted session keys" start the message. - - - - - - -Callas, et al Standards Track [Page 6] - -RFC 4880 OpenPGP Message Format November 2007 - - - 4. The sending OpenPGP encrypts the message using the session key, - which forms the remainder of the message. Note that the message - is also usually compressed. - - 5. The receiving OpenPGP decrypts the session key using the - recipient's private key. - - 6. The receiving OpenPGP decrypts the message using the session key. - If the message was compressed, it will be decompressed. - - With symmetric-key encryption, an object may be encrypted with a - symmetric key derived from a passphrase (or other shared secret), or - a two-stage mechanism similar to the public-key method described - above in which a session key is itself encrypted with a symmetric - algorithm keyed from a shared secret. - - Both digital signature and confidentiality services may be applied to - the same message. First, a signature is generated for the message - and attached to the message. Then the message plus signature is - encrypted using a symmetric session key. Finally, the session key is - encrypted using public-key encryption and prefixed to the encrypted - block. - -2.2. Authentication via Digital Signature - - The digital signature uses a hash code or message digest algorithm, - and a public-key signature algorithm. The sequence is as follows: - - 1. The sender creates a message. - - 2. The sending software generates a hash code of the message. - - 3. The sending software generates a signature from the hash code - using the sender's private key. - - 4. The binary signature is attached to the message. - - 5. The receiving software keeps a copy of the message signature. - - 6. The receiving software generates a new hash code for the received - message and verifies it using the message's signature. If the - verification is successful, the message is accepted as authentic. - -2.3. Compression - - OpenPGP implementations SHOULD compress the message after applying - the signature but before encryption. - - - - -Callas, et al Standards Track [Page 7] - -RFC 4880 OpenPGP Message Format November 2007 - - - If an implementation does not implement compression, its authors - should be aware that most OpenPGP messages in the world are - compressed. Thus, it may even be wise for a space-constrained - implementation to implement decompression, but not compression. - - Furthermore, compression has the added side effect that some types of - attacks can be thwarted by the fact that slightly altered, compressed - data rarely uncompresses without severe errors. This is hardly - rigorous, but it is operationally useful. These attacks can be - rigorously prevented by implementing and using Modification Detection - Codes as described in sections following. - -2.4. Conversion to Radix-64 - - OpenPGP's underlying native representation for encrypted messages, - signature certificates, and keys is a stream of arbitrary octets. - Some systems only permit the use of blocks consisting of seven-bit, - printable text. For transporting OpenPGP's native raw binary octets - through channels that are not safe to raw binary data, a printable - encoding of these binary octets is needed. OpenPGP provides the - service of converting the raw 8-bit binary octet stream to a stream - of printable ASCII characters, called Radix-64 encoding or ASCII - Armor. - - Implementations SHOULD provide Radix-64 conversions. - -2.5. Signature-Only Applications - - OpenPGP is designed for applications that use both encryption and - signatures, but there are a number of problems that are solved by a - signature-only implementation. Although this specification requires - both encryption and signatures, it is reasonable for there to be - subset implementations that are non-conformant only in that they omit - encryption. - -3. Data Element Formats - - This section describes the data elements used by OpenPGP. - -3.1. Scalar Numbers - - Scalar numbers are unsigned and are always stored in big-endian - format. Using n[k] to refer to the kth octet being interpreted, the - value of a two-octet scalar is ((n[0] << 8) + n[1]). The value of a - four-octet scalar is ((n[0] << 24) + (n[1] << 16) + (n[2] << 8) + - n[3]). - - - - - -Callas, et al Standards Track [Page 8] - -RFC 4880 OpenPGP Message Format November 2007 - - -3.2. Multiprecision Integers - - Multiprecision integers (also called MPIs) are unsigned integers used - to hold large integers such as the ones used in cryptographic - calculations. - - An MPI consists of two pieces: a two-octet scalar that is the length - of the MPI in bits followed by a string of octets that contain the - actual integer. - - These octets form a big-endian number; a big-endian number can be - made into an MPI by prefixing it with the appropriate length. - - Examples: - - (all numbers are in hexadecimal) - - The string of octets [00 01 01] forms an MPI with the value 1. The - string [00 09 01 FF] forms an MPI with the value of 511. - - Additional rules: - - The size of an MPI is ((MPI.length + 7) / 8) + 2 octets. - - The length field of an MPI describes the length starting from its - most significant non-zero bit. Thus, the MPI [00 02 01] is not - formed correctly. It should be [00 01 01]. - - Unused bits of an MPI MUST be zero. - - Also note that when an MPI is encrypted, the length refers to the - plaintext MPI. It may be ill-formed in its ciphertext. - -3.3. Key IDs - - A Key ID is an eight-octet scalar that identifies a key. - Implementations SHOULD NOT assume that Key IDs are unique. The - section "Enhanced Key Formats" below describes how Key IDs are - formed. - -3.4. Text - - Unless otherwise specified, the character set for text is the UTF-8 - [RFC3629] encoding of Unicode [ISO10646]. - - - - - - - -Callas, et al Standards Track [Page 9] - -RFC 4880 OpenPGP Message Format November 2007 - - -3.5. Time Fields - - A time field is an unsigned four-octet number containing the number - of seconds elapsed since midnight, 1 January 1970 UTC. - -3.6. Keyrings - - A keyring is a collection of one or more keys in a file or database. - Traditionally, a keyring is simply a sequential list of keys, but may - be any suitable database. It is beyond the scope of this standard to - discuss the details of keyrings or other databases. - -3.7. String-to-Key (S2K) Specifiers - - String-to-key (S2K) specifiers are used to convert passphrase strings - into symmetric-key encryption/decryption keys. They are used in two - places, currently: to encrypt the secret part of private keys in the - private keyring, and to convert passphrases to encryption keys for - symmetrically encrypted messages. - -3.7.1. String-to-Key (S2K) Specifier Types - - There are three types of S2K specifiers currently supported, and - some reserved values: - - ID S2K Type - -- -------- - 0 Simple S2K - 1 Salted S2K - 2 Reserved value - 3 Iterated and Salted S2K - 100 to 110 Private/Experimental S2K - - These are described in Sections 3.7.1.1 - 3.7.1.3. - -3.7.1.1. Simple S2K - - This directly hashes the string to produce the key data. See below - for how this hashing is done. - - Octet 0: 0x00 - Octet 1: hash algorithm - - Simple S2K hashes the passphrase to produce the session key. The - manner in which this is done depends on the size of the session key - (which will depend on the cipher used) and the size of the hash - - - - - -Callas, et al Standards Track [Page 10] - -RFC 4880 OpenPGP Message Format November 2007 - - - algorithm's output. If the hash size is greater than the session key - size, the high-order (leftmost) octets of the hash are used as the - key. - - If the hash size is less than the key size, multiple instances of the - hash context are created -- enough to produce the required key data. - These instances are preloaded with 0, 1, 2, ... octets of zeros (that - is to say, the first instance has no preloading, the second gets - preloaded with 1 octet of zero, the third is preloaded with two - octets of zeros, and so forth). - - As the data is hashed, it is given independently to each hash - context. Since the contexts have been initialized differently, they - will each produce different hash output. Once the passphrase is - hashed, the output data from the multiple hashes is concatenated, - first hash leftmost, to produce the key data, with any excess octets - on the right discarded. - -3.7.1.2. Salted S2K - - This includes a "salt" value in the S2K specifier -- some arbitrary - data -- that gets hashed along with the passphrase string, to help - prevent dictionary attacks. - - Octet 0: 0x01 - Octet 1: hash algorithm - Octets 2-9: 8-octet salt value - - Salted S2K is exactly like Simple S2K, except that the input to the - hash function(s) consists of the 8 octets of salt from the S2K - specifier, followed by the passphrase. - -3.7.1.3. Iterated and Salted S2K - - This includes both a salt and an octet count. The salt is combined - with the passphrase and the resulting value is hashed repeatedly. - This further increases the amount of work an attacker must do to try - dictionary attacks. - - Octet 0: 0x03 - Octet 1: hash algorithm - Octets 2-9: 8-octet salt value - Octet 10: count, a one-octet, coded value - - - - - - - - -Callas, et al Standards Track [Page 11] - -RFC 4880 OpenPGP Message Format November 2007 - - - The count is coded into a one-octet number using the following - formula: - - #define EXPBIAS 6 - count = ((Int32)16 + (c & 15)) << ((c >> 4) + EXPBIAS); - - The above formula is in C, where "Int32" is a type for a 32-bit - integer, and the variable "c" is the coded count, Octet 10. - - Iterated-Salted S2K hashes the passphrase and salt data multiple - times. The total number of octets to be hashed is specified in the - encoded count in the S2K specifier. Note that the resulting count - value is an octet count of how many octets will be hashed, not an - iteration count. - - Initially, one or more hash contexts are set up as with the other S2K - algorithms, depending on how many octets of key data are needed. - Then the salt, followed by the passphrase data, is repeatedly hashed - until the number of octets specified by the octet count has been - hashed. The one exception is that if the octet count is less than - the size of the salt plus passphrase, the full salt plus passphrase - will be hashed even though that is greater than the octet count. - After the hashing is done, the data is unloaded from the hash - context(s) as with the other S2K algorithms. - -3.7.2. String-to-Key Usage - - Implementations SHOULD use salted or iterated-and-salted S2K - specifiers, as simple S2K specifiers are more vulnerable to - dictionary attacks. - -3.7.2.1. Secret-Key Encryption - - An S2K specifier can be stored in the secret keyring to specify how - to convert the passphrase to a key that unlocks the secret data. - Older versions of PGP just stored a cipher algorithm octet preceding - the secret data or a zero to indicate that the secret data was - unencrypted. The MD5 hash function was always used to convert the - passphrase to a key for the specified cipher algorithm. - - For compatibility, when an S2K specifier is used, the special value - 254 or 255 is stored in the position where the hash algorithm octet - would have been in the old data structure. This is then followed - immediately by a one-octet algorithm identifier, and then by the S2K - specifier as encoded above. - - - - - - -Callas, et al Standards Track [Page 12] - -RFC 4880 OpenPGP Message Format November 2007 - - - Therefore, preceding the secret data there will be one of these - possibilities: - - 0: secret data is unencrypted (no passphrase) - 255 or 254: followed by algorithm octet and S2K specifier - Cipher alg: use Simple S2K algorithm using MD5 hash - - This last possibility, the cipher algorithm number with an implicit - use of MD5 and IDEA, is provided for backward compatibility; it MAY - be understood, but SHOULD NOT be generated, and is deprecated. - - These are followed by an Initial Vector of the same length as the - block size of the cipher for the decryption of the secret values, if - they are encrypted, and then the secret-key values themselves. - -3.7.2.2. Symmetric-Key Message Encryption - - OpenPGP can create a Symmetric-key Encrypted Session Key (ESK) packet - at the front of a message. This is used to allow S2K specifiers to - be used for the passphrase conversion or to create messages with a - mix of symmetric-key ESKs and public-key ESKs. This allows a message - to be decrypted either with a passphrase or a public-key pair. - - PGP 2.X always used IDEA with Simple string-to-key conversion when - encrypting a message with a symmetric algorithm. This is deprecated, - but MAY be used for backward-compatibility. - -4. Packet Syntax - - This section describes the packets used by OpenPGP. - -4.1. Overview - - An OpenPGP message is constructed from a number of records that are - traditionally called packets. A packet is a chunk of data that has a - tag specifying its meaning. An OpenPGP message, keyring, - certificate, and so forth consists of a number of packets. Some of - those packets may contain other OpenPGP packets (for example, a - compressed data packet, when uncompressed, contains OpenPGP packets). - - Each packet consists of a packet header, followed by the packet body. - The packet header is of variable length. - -4.2. Packet Headers - - The first octet of the packet header is called the "Packet Tag". It - determines the format of the header and denotes the packet contents. - The remainder of the packet header is the length of the packet. - - - -Callas, et al Standards Track [Page 13] - -RFC 4880 OpenPGP Message Format November 2007 - - - Note that the most significant bit is the leftmost bit, called bit 7. - A mask for this bit is 0x80 in hexadecimal. - - +---------------+ - PTag |7 6 5 4 3 2 1 0| - +---------------+ - Bit 7 -- Always one - Bit 6 -- New packet format if set - - PGP 2.6.x only uses old format packets. Thus, software that - interoperates with those versions of PGP must only use old format - packets. If interoperability is not an issue, the new packet format - is RECOMMENDED. Note that old format packets have four bits of - packet tags, and new format packets have six; some features cannot be - used and still be backward-compatible. - - Also note that packets with a tag greater than or equal to 16 MUST - use new format packets. The old format packets can only express tags - less than or equal to 15. - - Old format packets contain: - - Bits 5-2 -- packet tag - Bits 1-0 -- length-type - - New format packets contain: - - Bits 5-0 -- packet tag - -4.2.1. Old Format Packet Lengths - - The meaning of the length-type in old format packets is: - - 0 - The packet has a one-octet length. The header is 2 octets long. - - 1 - The packet has a two-octet length. The header is 3 octets long. - - 2 - The packet has a four-octet length. The header is 5 octets long. - - 3 - The packet is of indeterminate length. The header is 1 octet - long, and the implementation must determine how long the packet - is. If the packet is in a file, this means that the packet - extends until the end of the file. In general, an implementation - SHOULD NOT use indeterminate-length packets except where the end - of the data will be clear from the context, and even then it is - better to use a definite length, or a new format header. The new - format headers described below have a mechanism for precisely - encoding data of indeterminate length. - - - -Callas, et al Standards Track [Page 14] - -RFC 4880 OpenPGP Message Format November 2007 - - -4.2.2. New Format Packet Lengths - - New format packets have four possible ways of encoding length: - - 1. A one-octet Body Length header encodes packet lengths of up to 191 - octets. - - 2. A two-octet Body Length header encodes packet lengths of 192 to - 8383 octets. - - 3. A five-octet Body Length header encodes packet lengths of up to - 4,294,967,295 (0xFFFFFFFF) octets in length. (This actually - encodes a four-octet scalar number.) - - 4. When the length of the packet body is not known in advance by the - issuer, Partial Body Length headers encode a packet of - indeterminate length, effectively making it a stream. - -4.2.2.1. One-Octet Lengths - - A one-octet Body Length header encodes a length of 0 to 191 octets. - This type of length header is recognized because the one octet value - is less than 192. The body length is equal to: - - bodyLen = 1st_octet; - -4.2.2.2. Two-Octet Lengths - - A two-octet Body Length header encodes a length of 192 to 8383 - octets. It is recognized because its first octet is in the range 192 - to 223. The body length is equal to: - - bodyLen = ((1st_octet - 192) << 8) + (2nd_octet) + 192 - -4.2.2.3. Five-Octet Lengths - - A five-octet Body Length header consists of a single octet holding - the value 255, followed by a four-octet scalar. The body length is - equal to: - - bodyLen = (2nd_octet << 24) | (3rd_octet << 16) | - (4th_octet << 8) | 5th_octet - - This basic set of one, two, and five-octet lengths is also used - internally to some packets. - - - - - - -Callas, et al Standards Track [Page 15] - -RFC 4880 OpenPGP Message Format November 2007 - - -4.2.2.4. Partial Body Lengths - - A Partial Body Length header is one octet long and encodes the length - of only part of the data packet. This length is a power of 2, from 1 - to 1,073,741,824 (2 to the 30th power). It is recognized by its one - octet value that is greater than or equal to 224, and less than 255. - The Partial Body Length is equal to: - - partialBodyLen = 1 << (1st_octet & 0x1F); - - Each Partial Body Length header is followed by a portion of the - packet body data. The Partial Body Length header specifies this - portion's length. Another length header (one octet, two-octet, - five-octet, or partial) follows that portion. The last length header - in the packet MUST NOT be a Partial Body Length header. Partial Body - Length headers may only be used for the non-final parts of the - packet. - - Note also that the last Body Length header can be a zero-length - header. - - An implementation MAY use Partial Body Lengths for data packets, be - they literal, compressed, or encrypted. The first partial length - MUST be at least 512 octets long. Partial Body Lengths MUST NOT be - used for any other packet types. - -4.2.3. Packet Length Examples - - These examples show ways that new format packets might encode the - packet lengths. - - A packet with length 100 may have its length encoded in one octet: - 0x64. This is followed by 100 octets of data. - - A packet with length 1723 may have its length encoded in two octets: - 0xC5, 0xFB. This header is followed by the 1723 octets of data. - - A packet with length 100000 may have its length encoded in five - octets: 0xFF, 0x00, 0x01, 0x86, 0xA0. - - It might also be encoded in the following octet stream: 0xEF, first - 32768 octets of data; 0xE1, next two octets of data; 0xE0, next one - octet of data; 0xF0, next 65536 octets of data; 0xC5, 0xDD, last 1693 - octets of data. This is just one possible encoding, and many - variations are possible on the size of the Partial Body Length - headers, as long as a regular Body Length header encodes the last - portion of the data. - - - - -Callas, et al Standards Track [Page 16] - -RFC 4880 OpenPGP Message Format November 2007 - - - Please note that in all of these explanations, the total length of - the packet is the length of the header(s) plus the length of the - body. - -4.3. Packet Tags - - The packet tag denotes what type of packet the body holds. Note that - old format headers can only have tags less than 16, whereas new - format headers can have tags as great as 63. The defined tags (in - decimal) are as follows: - - 0 -- Reserved - a packet tag MUST NOT have this value - 1 -- Public-Key Encrypted Session Key Packet - 2 -- Signature Packet - 3 -- Symmetric-Key Encrypted Session Key Packet - 4 -- One-Pass Signature Packet - 5 -- Secret-Key Packet - 6 -- Public-Key Packet - 7 -- Secret-Subkey Packet - 8 -- Compressed Data Packet - 9 -- Symmetrically Encrypted Data Packet - 10 -- Marker Packet - 11 -- Literal Data Packet - 12 -- Trust Packet - 13 -- User ID Packet - 14 -- Public-Subkey Packet - 17 -- User Attribute Packet - 18 -- Sym. Encrypted and Integrity Protected Data Packet - 19 -- Modification Detection Code Packet - 60 to 63 -- Private or Experimental Values - -5. Packet Types - -5.1. Public-Key Encrypted Session Key Packets (Tag 1) - - A Public-Key Encrypted Session Key packet holds the session key used - to encrypt a message. Zero or more Public-Key Encrypted Session Key - packets and/or Symmetric-Key Encrypted Session Key packets may - precede a Symmetrically Encrypted Data Packet, which holds an - encrypted message. The message is encrypted with the session key, - and the session key is itself encrypted and stored in the Encrypted - Session Key packet(s). The Symmetrically Encrypted Data Packet is - preceded by one Public-Key Encrypted Session Key packet for each - OpenPGP key to which the message is encrypted. The recipient of the - message finds a session key that is encrypted to their public key, - decrypts the session key, and then uses the session key to decrypt - the message. - - - - -Callas, et al Standards Track [Page 17] - -RFC 4880 OpenPGP Message Format November 2007 - - - The body of this packet consists of: - - - A one-octet number giving the version number of the packet type. - The currently defined value for packet version is 3. - - - An eight-octet number that gives the Key ID of the public key to - which the session key is encrypted. If the session key is - encrypted to a subkey, then the Key ID of this subkey is used - here instead of the Key ID of the primary key. - - - A one-octet number giving the public-key algorithm used. - - - A string of octets that is the encrypted session key. This - string takes up the remainder of the packet, and its contents are - dependent on the public-key algorithm used. - - Algorithm Specific Fields for RSA encryption - - - multiprecision integer (MPI) of RSA encrypted value m**e mod n. - - Algorithm Specific Fields for Elgamal encryption: - - - MPI of Elgamal (Diffie-Hellman) value g**k mod p. - - - MPI of Elgamal (Diffie-Hellman) value m * y**k mod p. - - The value "m" in the above formulas is derived from the session key - as follows. First, the session key is prefixed with a one-octet - algorithm identifier that specifies the symmetric encryption - algorithm used to encrypt the following Symmetrically Encrypted Data - Packet. Then a two-octet checksum is appended, which is equal to the - sum of the preceding session key octets, not including the algorithm - identifier, modulo 65536. This value is then encoded as described in - PKCS#1 block encoding EME-PKCS1-v1_5 in Section 7.2.1 of [RFC3447] to - form the "m" value used in the formulas above. See Section 13.1 of - this document for notes on OpenPGP's use of PKCS#1. - - Note that when an implementation forms several PKESKs with one - session key, forming a message that can be decrypted by several keys, - the implementation MUST make a new PKCS#1 encoding for each key. - - An implementation MAY accept or use a Key ID of zero as a "wild card" - or "speculative" Key ID. In this case, the receiving implementation - would try all available private keys, checking for a valid decrypted - session key. This format helps reduce traffic analysis of messages. - - - - - - -Callas, et al Standards Track [Page 18] - -RFC 4880 OpenPGP Message Format November 2007 - - -5.2. Signature Packet (Tag 2) - - A Signature packet describes a binding between some public key and - some data. The most common signatures are a signature of a file or a - block of text, and a signature that is a certification of a User ID. - - Two versions of Signature packets are defined. Version 3 provides - basic signature information, while version 4 provides an expandable - format with subpackets that can specify more information about the - signature. PGP 2.6.x only accepts version 3 signatures. - - Implementations SHOULD accept V3 signatures. Implementations SHOULD - generate V4 signatures. - - Note that if an implementation is creating an encrypted and signed - message that is encrypted to a V3 key, it is reasonable to create a - V3 signature. - -5.2.1. Signature Types - - There are a number of possible meanings for a signature, which are - indicated in a signature type octet in any given signature. Please - note that the vagueness of these meanings is not a flaw, but a - feature of the system. Because OpenPGP places final authority for - validity upon the receiver of a signature, it may be that one - signer's casual act might be more rigorous than some other - authority's positive act. See Section 5.2.4, "Computing Signatures", - for detailed information on how to compute and verify signatures of - each type. - - These meanings are as follows: - - 0x00: Signature of a binary document. - This means the signer owns it, created it, or certifies that it - has not been modified. - - 0x01: Signature of a canonical text document. - This means the signer owns it, created it, or certifies that it - has not been modified. The signature is calculated over the text - data with its line endings converted to . - - 0x02: Standalone signature. - This signature is a signature of only its own subpacket contents. - It is calculated identically to a signature over a zero-length - binary document. Note that it doesn't make sense to have a V3 - standalone signature. - - - - - -Callas, et al Standards Track [Page 19] - -RFC 4880 OpenPGP Message Format November 2007 - - - 0x10: Generic certification of a User ID and Public-Key packet. - The issuer of this certification does not make any particular - assertion as to how well the certifier has checked that the owner - of the key is in fact the person described by the User ID. - - 0x11: Persona certification of a User ID and Public-Key packet. - The issuer of this certification has not done any verification of - the claim that the owner of this key is the User ID specified. - - 0x12: Casual certification of a User ID and Public-Key packet. - The issuer of this certification has done some casual - verification of the claim of identity. - - 0x13: Positive certification of a User ID and Public-Key packet. - The issuer of this certification has done substantial - verification of the claim of identity. - - Most OpenPGP implementations make their "key signatures" as 0x10 - certifications. Some implementations can issue 0x11-0x13 - certifications, but few differentiate between the types. - - 0x18: Subkey Binding Signature - This signature is a statement by the top-level signing key that - indicates that it owns the subkey. This signature is calculated - directly on the primary key and subkey, and not on any User ID or - other packets. A signature that binds a signing subkey MUST have - an Embedded Signature subpacket in this binding signature that - contains a 0x19 signature made by the signing subkey on the - primary key and subkey. - - 0x19: Primary Key Binding Signature - This signature is a statement by a signing subkey, indicating - that it is owned by the primary key and subkey. This signature - is calculated the same way as a 0x18 signature: directly on the - primary key and subkey, and not on any User ID or other packets. - - 0x1F: Signature directly on a key - This signature is calculated directly on a key. It binds the - information in the Signature subpackets to the key, and is - appropriate to be used for subpackets that provide information - about the key, such as the Revocation Key subpacket. It is also - appropriate for statements that non-self certifiers want to make - about the key itself, rather than the binding between a key and a - name. - - - - - - - -Callas, et al Standards Track [Page 20] - -RFC 4880 OpenPGP Message Format November 2007 - - - 0x20: Key revocation signature - The signature is calculated directly on the key being revoked. A - revoked key is not to be used. Only revocation signatures by the - key being revoked, or by an authorized revocation key, should be - considered valid revocation signatures. - - 0x28: Subkey revocation signature - The signature is calculated directly on the subkey being revoked. - A revoked subkey is not to be used. Only revocation signatures - by the top-level signature key that is bound to this subkey, or - by an authorized revocation key, should be considered valid - revocation signatures. - - 0x30: Certification revocation signature - This signature revokes an earlier User ID certification signature - (signature class 0x10 through 0x13) or direct-key signature - (0x1F). It should be issued by the same key that issued the - revoked signature or an authorized revocation key. The signature - is computed over the same data as the certificate that it - revokes, and should have a later creation date than that - certificate. - - 0x40: Timestamp signature. - This signature is only meaningful for the timestamp contained in - it. - - 0x50: Third-Party Confirmation signature. - This signature is a signature over some other OpenPGP Signature - packet(s). It is analogous to a notary seal on the signed data. - A third-party signature SHOULD include Signature Target - subpacket(s) to give easy identification. Note that we really do - mean SHOULD. There are plausible uses for this (such as a blind - party that only sees the signature, not the key or source - document) that cannot include a target subpacket. - -5.2.2. Version 3 Signature Packet Format - - The body of a version 3 Signature Packet contains: - - - One-octet version number (3). - - - One-octet length of following hashed material. MUST be 5. - - - One-octet signature type. - - - Four-octet creation time. - - - Eight-octet Key ID of signer. - - - -Callas, et al Standards Track [Page 21] - -RFC 4880 OpenPGP Message Format November 2007 - - - - One-octet public-key algorithm. - - - One-octet hash algorithm. - - - Two-octet field holding left 16 bits of signed hash value. - - - One or more multiprecision integers comprising the signature. - This portion is algorithm specific, as described below. - - The concatenation of the data to be signed, the signature type, and - creation time from the Signature packet (5 additional octets) is - hashed. The resulting hash value is used in the signature algorithm. - The high 16 bits (first two octets) of the hash are included in the - Signature packet to provide a quick test to reject some invalid - signatures. - - Algorithm-Specific Fields for RSA signatures: - - - multiprecision integer (MPI) of RSA signature value m**d mod n. - - Algorithm-Specific Fields for DSA signatures: - - - MPI of DSA value r. - - - MPI of DSA value s. - - The signature calculation is based on a hash of the signed data, as - described above. The details of the calculation are different for - DSA signatures than for RSA signatures. - - With RSA signatures, the hash value is encoded using PKCS#1 encoding - type EMSA-PKCS1-v1_5 as described in Section 9.2 of RFC 3447. This - requires inserting the hash value as an octet string into an ASN.1 - structure. The object identifier for the type of hash being used is - included in the structure. The hexadecimal representations for the - currently defined hash algorithms are as follows: - - - MD5: 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05 - - - RIPEMD-160: 0x2B, 0x24, 0x03, 0x02, 0x01 - - - SHA-1: 0x2B, 0x0E, 0x03, 0x02, 0x1A - - - SHA224: 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04 - - - SHA256: 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01 - - - SHA384: 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02 - - - -Callas, et al Standards Track [Page 22] - -RFC 4880 OpenPGP Message Format November 2007 - - - - SHA512: 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03 - - The ASN.1 Object Identifiers (OIDs) are as follows: - - - MD5: 1.2.840.113549.2.5 - - - RIPEMD-160: 1.3.36.3.2.1 - - - SHA-1: 1.3.14.3.2.26 - - - SHA224: 2.16.840.1.101.3.4.2.4 - - - SHA256: 2.16.840.1.101.3.4.2.1 - - - SHA384: 2.16.840.1.101.3.4.2.2 - - - SHA512: 2.16.840.1.101.3.4.2.3 - - The full hash prefixes for these are as follows: - - MD5: 0x30, 0x20, 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86, - 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, 0x05, 0x00, - 0x04, 0x10 - - RIPEMD-160: 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x24, - 0x03, 0x02, 0x01, 0x05, 0x00, 0x04, 0x14 - - SHA-1: 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0E, - 0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14 - - SHA224: 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, - 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04, 0x05, - 0x00, 0x04, 0x1C - - SHA256: 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, - 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, - 0x00, 0x04, 0x20 - - SHA384: 0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, - 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, - 0x00, 0x04, 0x30 - - SHA512: 0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, - 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, - 0x00, 0x04, 0x40 - - DSA signatures MUST use hashes that are equal in size to the number - of bits of q, the group generated by the DSA key's generator value. - - - -Callas, et al Standards Track [Page 23] - -RFC 4880 OpenPGP Message Format November 2007 - - - If the output size of the chosen hash is larger than the number of - bits of q, the hash result is truncated to fit by taking the number - of leftmost bits equal to the number of bits of q. This (possibly - truncated) hash function result is treated as a number and used - directly in the DSA signature algorithm. - -5.2.3. Version 4 Signature Packet Format - - The body of a version 4 Signature packet contains: - - - One-octet version number (4). - - - One-octet signature type. - - - One-octet public-key algorithm. - - - One-octet hash algorithm. - - - Two-octet scalar octet count for following hashed subpacket data. - Note that this is the length in octets of all of the hashed - subpackets; a pointer incremented by this number will skip over - the hashed subpackets. - - - Hashed subpacket data set (zero or more subpackets). - - - Two-octet scalar octet count for the following unhashed subpacket - data. Note that this is the length in octets of all of the - unhashed subpackets; a pointer incremented by this number will - skip over the unhashed subpackets. - - - Unhashed subpacket data set (zero or more subpackets). - - - Two-octet field holding the left 16 bits of the signed hash - value. - - - One or more multiprecision integers comprising the signature. - This portion is algorithm specific, as described above. - - The concatenation of the data being signed and the signature data - from the version number through the hashed subpacket data (inclusive) - is hashed. The resulting hash value is what is signed. The left 16 - bits of the hash are included in the Signature packet to provide a - quick test to reject some invalid signatures. - - There are two fields consisting of Signature subpackets. The first - field is hashed with the rest of the signature data, while the second - is unhashed. The second set of subpackets is not cryptographically - - - - -Callas, et al Standards Track [Page 24] - -RFC 4880 OpenPGP Message Format November 2007 - - - protected by the signature and should include only advisory - information. - - The algorithms for converting the hash function result to a signature - are described in a section below. - -5.2.3.1. Signature Subpacket Specification - - A subpacket data set consists of zero or more Signature subpackets. - In Signature packets, the subpacket data set is preceded by a two- - octet scalar count of the length in octets of all the subpackets. A - pointer incremented by this number will skip over the subpacket data - set. - - Each subpacket consists of a subpacket header and a body. The header - consists of: - - - the subpacket length (1, 2, or 5 octets), - - - the subpacket type (1 octet), - - and is followed by the subpacket-specific data. - - The length includes the type octet but not this length. Its format - is similar to the "new" format packet header lengths, but cannot have - Partial Body Lengths. That is: - - if the 1st octet < 192, then - lengthOfLength = 1 - subpacketLen = 1st_octet - - if the 1st octet >= 192 and < 255, then - lengthOfLength = 2 - subpacketLen = ((1st_octet - 192) << 8) + (2nd_octet) + 192 - - if the 1st octet = 255, then - lengthOfLength = 5 - subpacket length = [four-octet scalar starting at 2nd_octet] - - The value of the subpacket type octet may be: - - 0 = Reserved - 1 = Reserved - 2 = Signature Creation Time - 3 = Signature Expiration Time - 4 = Exportable Certification - 5 = Trust Signature - 6 = Regular Expression - - - -Callas, et al Standards Track [Page 25] - -RFC 4880 OpenPGP Message Format November 2007 - - - 7 = Revocable - 8 = Reserved - 9 = Key Expiration Time - 10 = Placeholder for backward compatibility - 11 = Preferred Symmetric Algorithms - 12 = Revocation Key - 13 = Reserved - 14 = Reserved - 15 = Reserved - 16 = Issuer - 17 = Reserved - 18 = Reserved - 19 = Reserved - 20 = Notation Data - 21 = Preferred Hash Algorithms - 22 = Preferred Compression Algorithms - 23 = Key Server Preferences - 24 = Preferred Key Server - 25 = Primary User ID - 26 = Policy URI - 27 = Key Flags - 28 = Signer's User ID - 29 = Reason for Revocation - 30 = Features - 31 = Signature Target - 32 = Embedded Signature - 100 To 110 = Private or experimental - - An implementation SHOULD ignore any subpacket of a type that it does - not recognize. - - Bit 7 of the subpacket type is the "critical" bit. If set, it - denotes that the subpacket is one that is critical for the evaluator - of the signature to recognize. If a subpacket is encountered that is - marked critical but is unknown to the evaluating software, the - evaluator SHOULD consider the signature to be in error. - - An evaluator may "recognize" a subpacket, but not implement it. The - purpose of the critical bit is to allow the signer to tell an - evaluator that it would prefer a new, unknown feature to generate an - error than be ignored. - - Implementations SHOULD implement the three preferred algorithm - subpackets (11, 21, and 22), as well as the "Reason for Revocation" - subpacket. Note, however, that if an implementation chooses not to - implement some of the preferences, it is required to behave in a - polite manner to respect the wishes of those users who do implement - these preferences. - - - -Callas, et al Standards Track [Page 26] - -RFC 4880 OpenPGP Message Format November 2007 - - -5.2.3.2. Signature Subpacket Types - - A number of subpackets are currently defined. Some subpackets apply - to the signature itself and some are attributes of the key. - Subpackets that are found on a self-signature are placed on a - certification made by the key itself. Note that a key may have more - than one User ID, and thus may have more than one self-signature, and - differing subpackets. - - A subpacket may be found either in the hashed or unhashed subpacket - sections of a signature. If a subpacket is not hashed, then the - information in it cannot be considered definitive because it is not - part of the signature proper. - -5.2.3.3. Notes on Self-Signatures - - A self-signature is a binding signature made by the key to which the - signature refers. There are three types of self-signatures, the - certification signatures (types 0x10-0x13), the direct-key signature - (type 0x1F), and the subkey binding signature (type 0x18). For - certification self-signatures, each User ID may have a self- - signature, and thus different subpackets in those self-signatures. - For subkey binding signatures, each subkey in fact has a self- - signature. Subpackets that appear in a certification self-signature - apply to the user name, and subpackets that appear in the subkey - self-signature apply to the subkey. Lastly, subpackets on the - direct-key signature apply to the entire key. - - Implementing software should interpret a self-signature's preference - subpackets as narrowly as possible. For example, suppose a key has - two user names, Alice and Bob. Suppose that Alice prefers the - symmetric algorithm CAST5, and Bob prefers IDEA or TripleDES. If the - software locates this key via Alice's name, then the preferred - algorithm is CAST5; if software locates the key via Bob's name, then - the preferred algorithm is IDEA. If the key is located by Key ID, - the algorithm of the primary User ID of the key provides the - preferred symmetric algorithm. - - Revoking a self-signature or allowing it to expire has a semantic - meaning that varies with the signature type. Revoking the self- - signature on a User ID effectively retires that user name. The - self-signature is a statement, "My name X is tied to my signing key - K" and is corroborated by other users' certifications. If another - user revokes their certification, they are effectively saying that - they no longer believe that name and that key are tied together. - Similarly, if the users themselves revoke their self-signature, then - the users no longer go by that name, no longer have that email - address, etc. Revoking a binding signature effectively retires that - - - -Callas, et al Standards Track [Page 27] - -RFC 4880 OpenPGP Message Format November 2007 - - - subkey. Revoking a direct-key signature cancels that signature. - Please see the "Reason for Revocation" subpacket (Section 5.2.3.23) - for more relevant detail. - - Since a self-signature contains important information about the key's - use, an implementation SHOULD allow the user to rewrite the self- - signature, and important information in it, such as preferences and - key expiration. - - It is good practice to verify that a self-signature imported into an - implementation doesn't advertise features that the implementation - doesn't support, rewriting the signature as appropriate. - - An implementation that encounters multiple self-signatures on the - same object may resolve the ambiguity in any way it sees fit, but it - is RECOMMENDED that priority be given to the most recent self- - signature. - -5.2.3.4. Signature Creation Time - - (4-octet time field) - - The time the signature was made. - - MUST be present in the hashed area. - -5.2.3.5. Issuer - - (8-octet Key ID) - - The OpenPGP Key ID of the key issuing the signature. - -5.2.3.6. Key Expiration Time - - (4-octet time field) - - The validity period of the key. This is the number of seconds after - the key creation time that the key expires. If this is not present - or has a value of zero, the key never expires. This is found only on - a self-signature. - -5.2.3.7. Preferred Symmetric Algorithms - - (array of one-octet values) - - Symmetric algorithm numbers that indicate which algorithms the key - holder prefers to use. The subpacket body is an ordered list of - octets with the most preferred listed first. It is assumed that only - - - -Callas, et al Standards Track [Page 28] - -RFC 4880 OpenPGP Message Format November 2007 - - - algorithms listed are supported by the recipient's software. - Algorithm numbers are in Section 9. This is only found on a self- - signature. - -5.2.3.8. Preferred Hash Algorithms - - (array of one-octet values) - - Message digest algorithm numbers that indicate which algorithms the - key holder prefers to receive. Like the preferred symmetric - algorithms, the list is ordered. Algorithm numbers are in Section 9. - This is only found on a self-signature. - -5.2.3.9. Preferred Compression Algorithms - - (array of one-octet values) - - Compression algorithm numbers that indicate which algorithms the key - holder prefers to use. Like the preferred symmetric algorithms, the - list is ordered. Algorithm numbers are in Section 9. If this - subpacket is not included, ZIP is preferred. A zero denotes that - uncompressed data is preferred; the key holder's software might have - no compression software in that implementation. This is only found - on a self-signature. - -5.2.3.10. Signature Expiration Time - - (4-octet time field) - - The validity period of the signature. This is the number of seconds - after the signature creation time that the signature expires. If - this is not present or has a value of zero, it never expires. - -5.2.3.11. Exportable Certification - - (1 octet of exportability, 0 for not, 1 for exportable) - - This subpacket denotes whether a certification signature is - "exportable", to be used by other users than the signature's issuer. - The packet body contains a Boolean flag indicating whether the - signature is exportable. If this packet is not present, the - certification is exportable; it is equivalent to a flag containing a - 1. - - Non-exportable, or "local", certifications are signatures made by a - user to mark a key as valid within that user's implementation only. - - - - - -Callas, et al Standards Track [Page 29] - -RFC 4880 OpenPGP Message Format November 2007 - - - Thus, when an implementation prepares a user's copy of a key for - transport to another user (this is the process of "exporting" the - key), any local certification signatures are deleted from the key. - - The receiver of a transported key "imports" it, and likewise trims - any local certifications. In normal operation, there won't be any, - assuming the import is performed on an exported key. However, there - are instances where this can reasonably happen. For example, if an - implementation allows keys to be imported from a key database in - addition to an exported key, then this situation can arise. - - Some implementations do not represent the interest of a single user - (for example, a key server). Such implementations always trim local - certifications from any key they handle. - -5.2.3.12. Revocable - - (1 octet of revocability, 0 for not, 1 for revocable) - - Signature's revocability status. The packet body contains a Boolean - flag indicating whether the signature is revocable. Signatures that - are not revocable have any later revocation signatures ignored. They - represent a commitment by the signer that he cannot revoke his - signature for the life of his key. If this packet is not present, - the signature is revocable. - -5.2.3.13. Trust Signature - - (1 octet "level" (depth), 1 octet of trust amount) - - Signer asserts that the key is not only valid but also trustworthy at - the specified level. Level 0 has the same meaning as an ordinary - validity signature. Level 1 means that the signed key is asserted to - be a valid trusted introducer, with the 2nd octet of the body - specifying the degree of trust. Level 2 means that the signed key is - asserted to be trusted to issue level 1 trust signatures, i.e., that - it is a "meta introducer". Generally, a level n trust signature - asserts that a key is trusted to issue level n-1 trust signatures. - The trust amount is in a range from 0-255, interpreted such that - values less than 120 indicate partial trust and values of 120 or - greater indicate complete trust. Implementations SHOULD emit values - of 60 for partial trust and 120 for complete trust. - - - - - - - - - -Callas, et al Standards Track [Page 30] - -RFC 4880 OpenPGP Message Format November 2007 - - -5.2.3.14. Regular Expression - - (null-terminated regular expression) - - Used in conjunction with trust Signature packets (of level > 0) to - limit the scope of trust that is extended. Only signatures by the - target key on User IDs that match the regular expression in the body - of this packet have trust extended by the trust Signature subpacket. - The regular expression uses the same syntax as the Henry Spencer's - "almost public domain" regular expression [REGEX] package. A - description of the syntax is found in Section 8 below. - -5.2.3.15. Revocation Key - - (1 octet of class, 1 octet of public-key algorithm ID, 20 octets of - fingerprint) - - Authorizes the specified key to issue revocation signatures for this - key. Class octet must have bit 0x80 set. If the bit 0x40 is set, - then this means that the revocation information is sensitive. Other - bits are for future expansion to other kinds of authorizations. This - is found on a self-signature. - - If the "sensitive" flag is set, the keyholder feels this subpacket - contains private trust information that describes a real-world - sensitive relationship. If this flag is set, implementations SHOULD - NOT export this signature to other users except in cases where the - data needs to be available: when the signature is being sent to the - designated revoker, or when it is accompanied by a revocation - signature from that revoker. Note that it may be appropriate to - isolate this subpacket within a separate signature so that it is not - combined with other subpackets that need to be exported. - -5.2.3.16. Notation Data - - (4 octets of flags, 2 octets of name length (M), - 2 octets of value length (N), - M octets of name data, - N octets of value data) - - This subpacket describes a "notation" on the signature that the - issuer wishes to make. The notation has a name and a value, each of - which are strings of octets. There may be more than one notation in - a signature. Notations can be used for any extension the issuer of - the signature cares to make. The "flags" field holds four octets of - flags. - - - - - -Callas, et al Standards Track [Page 31] - -RFC 4880 OpenPGP Message Format November 2007 - - - All undefined flags MUST be zero. Defined flags are as follows: - - First octet: 0x80 = human-readable. This note value is text. - Other octets: none. - - Notation names are arbitrary strings encoded in UTF-8. They reside - in two namespaces: The IETF namespace and the user namespace. - - The IETF namespace is registered with IANA. These names MUST NOT - contain the "@" character (0x40). This is a tag for the user - namespace. - - Names in the user namespace consist of a UTF-8 string tag followed by - "@" followed by a DNS domain name. Note that the tag MUST NOT - contain an "@" character. For example, the "sample" tag used by - Example Corporation could be "sample@example.com". - - Names in a user space are owned and controlled by the owners of that - domain. Obviously, it's bad form to create a new name in a DNS space - that you don't own. - - Since the user namespace is in the form of an email address, - implementers MAY wish to arrange for that address to reach a person - who can be consulted about the use of the named tag. Note that due - to UTF-8 encoding, not all valid user space name tags are valid email - addresses. - - If there is a critical notation, the criticality applies to that - specific notation and not to notations in general. - -5.2.3.17. Key Server Preferences - - (N octets of flags) - - This is a list of one-bit flags that indicate preferences that the - key holder has about how the key is handled on a key server. All - undefined flags MUST be zero. - - First octet: 0x80 = No-modify - the key holder requests that this key only be modified or updated - by the key holder or an administrator of the key server. - - This is found only on a self-signature. - - - - - - - - -Callas, et al Standards Track [Page 32] - -RFC 4880 OpenPGP Message Format November 2007 - - -5.2.3.18. Preferred Key Server - - (String) - - This is a URI of a key server that the key holder prefers be used for - updates. Note that keys with multiple User IDs can have a preferred - key server for each User ID. Note also that since this is a URI, the - key server can actually be a copy of the key retrieved by ftp, http, - finger, etc. - -5.2.3.19. Primary User ID - - (1 octet, Boolean) - - This is a flag in a User ID's self-signature that states whether this - User ID is the main User ID for this key. It is reasonable for an - implementation to resolve ambiguities in preferences, etc. by - referring to the primary User ID. If this flag is absent, its value - is zero. If more than one User ID in a key is marked as primary, the - implementation may resolve the ambiguity in any way it sees fit, but - it is RECOMMENDED that priority be given to the User ID with the most - recent self-signature. - - When appearing on a self-signature on a User ID packet, this - subpacket applies only to User ID packets. When appearing on a - self-signature on a User Attribute packet, this subpacket applies - only to User Attribute packets. That is to say, there are two - different and independent "primaries" -- one for User IDs, and one - for User Attributes. - -5.2.3.20. Policy URI - - (String) - - This subpacket contains a URI of a document that describes the policy - under which the signature was issued. - -5.2.3.21. Key Flags - - (N octets of flags) - - This subpacket contains a list of binary flags that hold information - about a key. It is a string of octets, and an implementation MUST - NOT assume a fixed size. This is so it can grow over time. If a - list is shorter than an implementation expects, the unstated flags - are considered to be zero. The defined flags are as follows: - - - - - -Callas, et al Standards Track [Page 33] - -RFC 4880 OpenPGP Message Format November 2007 - - - First octet: - - 0x01 - This key may be used to certify other keys. - - 0x02 - This key may be used to sign data. - - 0x04 - This key may be used to encrypt communications. - - 0x08 - This key may be used to encrypt storage. - - 0x10 - The private component of this key may have been split - by a secret-sharing mechanism. - - 0x20 - This key may be used for authentication. - - 0x80 - The private component of this key may be in the - possession of more than one person. - - Usage notes: - - The flags in this packet may appear in self-signatures or in - certification signatures. They mean different things depending on - who is making the statement -- for example, a certification signature - that has the "sign data" flag is stating that the certification is - for that use. On the other hand, the "communications encryption" - flag in a self-signature is stating a preference that a given key be - used for communications. Note however, that it is a thorny issue to - determine what is "communications" and what is "storage". This - decision is left wholly up to the implementation; the authors of this - document do not claim any special wisdom on the issue and realize - that accepted opinion may change. - - The "split key" (0x10) and "group key" (0x80) flags are placed on a - self-signature only; they are meaningless on a certification - signature. They SHOULD be placed only on a direct-key signature - (type 0x1F) or a subkey signature (type 0x18), one that refers to the - key the flag applies to. - -5.2.3.22. Signer's User ID - - (String) - - This subpacket allows a keyholder to state which User ID is - responsible for the signing. Many keyholders use a single key for - different purposes, such as business communications as well as - personal communications. This subpacket allows such a keyholder to - state which of their roles is making a signature. - - - - -Callas, et al Standards Track [Page 34] - -RFC 4880 OpenPGP Message Format November 2007 - - - This subpacket is not appropriate to use to refer to a User Attribute - packet. - -5.2.3.23. Reason for Revocation - - (1 octet of revocation code, N octets of reason string) - - This subpacket is used only in key revocation and certification - revocation signatures. It describes the reason why the key or - certificate was revoked. - - The first octet contains a machine-readable code that denotes the - reason for the revocation: - - 0 - No reason specified (key revocations or cert revocations) - 1 - Key is superseded (key revocations) - 2 - Key material has been compromised (key revocations) - 3 - Key is retired and no longer used (key revocations) - 32 - User ID information is no longer valid (cert revocations) - 100-110 - Private Use - - Following the revocation code is a string of octets that gives - information about the Reason for Revocation in human-readable form - (UTF-8). The string may be null, that is, of zero length. The - length of the subpacket is the length of the reason string plus one. - An implementation SHOULD implement this subpacket, include it in all - revocation signatures, and interpret revocations appropriately. - There are important semantic differences between the reasons, and - there are thus important reasons for revoking signatures. - - If a key has been revoked because of a compromise, all signatures - created by that key are suspect. However, if it was merely - superseded or retired, old signatures are still valid. If the - revoked signature is the self-signature for certifying a User ID, a - revocation denotes that that user name is no longer in use. Such a - revocation SHOULD include a 0x20 code. - - Note that any signature may be revoked, including a certification on - some other person's key. There are many good reasons for revoking a - certification signature, such as the case where the keyholder leaves - the employ of a business with an email address. A revoked - certification is no longer a part of validity calculations. - - - - - - - - - -Callas, et al Standards Track [Page 35] - -RFC 4880 OpenPGP Message Format November 2007 - - -5.2.3.24. Features - - (N octets of flags) - - The Features subpacket denotes which advanced OpenPGP features a - user's implementation supports. This is so that as features are - added to OpenPGP that cannot be backwards-compatible, a user can - state that they can use that feature. The flags are single bits that - indicate that a given feature is supported. - - This subpacket is similar to a preferences subpacket, and only - appears in a self-signature. - - An implementation SHOULD NOT use a feature listed when sending to a - user who does not state that they can use it. - - Defined features are as follows: - - First octet: - - 0x01 - Modification Detection (packets 18 and 19) - - If an implementation implements any of the defined features, it - SHOULD implement the Features subpacket, too. - - An implementation may freely infer features from other suitable - implementation-dependent mechanisms. - -5.2.3.25. Signature Target - - (1 octet public-key algorithm, 1 octet hash algorithm, N octets hash) - - This subpacket identifies a specific target signature to which a - signature refers. For revocation signatures, this subpacket - provides explicit designation of which signature is being revoked. - For a third-party or timestamp signature, this designates what - signature is signed. All arguments are an identifier of that target - signature. - - The N octets of hash data MUST be the size of the hash of the - signature. For example, a target signature with a SHA-1 hash MUST - have 20 octets of hash data. - - - - - - - - - -Callas, et al Standards Track [Page 36] - -RFC 4880 OpenPGP Message Format November 2007 - - -5.2.3.26. Embedded Signature - - (1 signature packet body) - - This subpacket contains a complete Signature packet body as - specified in Section 5.2 above. It is useful when one signature - needs to refer to, or be incorporated in, another signature. - -5.2.4. Computing Signatures - - All signatures are formed by producing a hash over the signature - data, and then using the resulting hash in the signature algorithm. - - For binary document signatures (type 0x00), the document data is - hashed directly. For text document signatures (type 0x01), the - document is canonicalized by converting line endings to , - and the resulting data is hashed. - - When a signature is made over a key, the hash data starts with the - octet 0x99, followed by a two-octet length of the key, and then body - of the key packet. (Note that this is an old-style packet header for - a key packet with two-octet length.) A subkey binding signature - (type 0x18) or primary key binding signature (type 0x19) then hashes - the subkey using the same format as the main key (also using 0x99 as - the first octet). Key revocation signatures (types 0x20 and 0x28) - hash only the key being revoked. - - A certification signature (type 0x10 through 0x13) hashes the User - ID being bound to the key into the hash context after the above - data. A V3 certification hashes the contents of the User ID or - attribute packet packet, without any header. A V4 certification - hashes the constant 0xB4 for User ID certifications or the constant - 0xD1 for User Attribute certifications, followed by a four-octet - number giving the length of the User ID or User Attribute data, and - then the User ID or User Attribute data. - - When a signature is made over a Signature packet (type 0x50), the - hash data starts with the octet 0x88, followed by the four-octet - length of the signature, and then the body of the Signature packet. - (Note that this is an old-style packet header for a Signature packet - with the length-of-length set to zero.) The unhashed subpacket data - of the Signature packet being hashed is not included in the hash, and - the unhashed subpacket data length value is set to zero. - - Once the data body is hashed, then a trailer is hashed. A V3 - signature hashes five octets of the packet body, starting from the - signature type field. This data is the signature type, followed by - the four-octet signature time. A V4 signature hashes the packet body - - - -Callas, et al Standards Track [Page 37] - -RFC 4880 OpenPGP Message Format November 2007 - - - starting from its first field, the version number, through the end - of the hashed subpacket data. Thus, the fields hashed are the - signature version, the signature type, the public-key algorithm, the - hash algorithm, the hashed subpacket length, and the hashed - subpacket body. - - V4 signatures also hash in a final trailer of six octets: the - version of the Signature packet, i.e., 0x04; 0xFF; and a four-octet, - big-endian number that is the length of the hashed data from the - Signature packet (note that this number does not include these final - six octets). - - After all this has been hashed in a single hash context, the - resulting hash field is used in the signature algorithm and placed - at the end of the Signature packet. - -5.2.4.1. Subpacket Hints - - It is certainly possible for a signature to contain conflicting - information in subpackets. For example, a signature may contain - multiple copies of a preference or multiple expiration times. In - most cases, an implementation SHOULD use the last subpacket in the - signature, but MAY use any conflict resolution scheme that makes - more sense. Please note that we are intentionally leaving conflict - resolution to the implementer; most conflicts are simply syntax - errors, and the wishy-washy language here allows a receiver to be - generous in what they accept, while putting pressure on a creator to - be stingy in what they generate. - - Some apparent conflicts may actually make sense -- for example, - suppose a keyholder has a V3 key and a V4 key that share the same - RSA key material. Either of these keys can verify a signature - created by the other, and it may be reasonable for a signature to - contain an issuer subpacket for each key, as a way of explicitly - tying those keys to the signature. - -5.3. Symmetric-Key Encrypted Session Key Packets (Tag 3) - - The Symmetric-Key Encrypted Session Key packet holds the - symmetric-key encryption of a session key used to encrypt a message. - Zero or more Public-Key Encrypted Session Key packets and/or - Symmetric-Key Encrypted Session Key packets may precede a - Symmetrically Encrypted Data packet that holds an encrypted message. - The message is encrypted with a session key, and the session key is - itself encrypted and stored in the Encrypted Session Key packet or - the Symmetric-Key Encrypted Session Key packet. - - - - - -Callas, et al Standards Track [Page 38] - -RFC 4880 OpenPGP Message Format November 2007 - - - If the Symmetrically Encrypted Data packet is preceded by one or - more Symmetric-Key Encrypted Session Key packets, each specifies a - passphrase that may be used to decrypt the message. This allows a - message to be encrypted to a number of public keys, and also to one - or more passphrases. This packet type is new and is not generated - by PGP 2.x or PGP 5.0. - - The body of this packet consists of: - - - A one-octet version number. The only currently defined version - is 4. - - - A one-octet number describing the symmetric algorithm used. - - - A string-to-key (S2K) specifier, length as defined above. - - - Optionally, the encrypted session key itself, which is decrypted - with the string-to-key object. - - If the encrypted session key is not present (which can be detected - on the basis of packet length and S2K specifier size), then the S2K - algorithm applied to the passphrase produces the session key for - decrypting the file, using the symmetric cipher algorithm from the - Symmetric-Key Encrypted Session Key packet. - - If the encrypted session key is present, the result of applying the - S2K algorithm to the passphrase is used to decrypt just that - encrypted session key field, using CFB mode with an IV of all zeros. - The decryption result consists of a one-octet algorithm identifier - that specifies the symmetric-key encryption algorithm used to - encrypt the following Symmetrically Encrypted Data packet, followed - by the session key octets themselves. - - Note: because an all-zero IV is used for this decryption, the S2K - specifier MUST use a salt value, either a Salted S2K or an - Iterated-Salted S2K. The salt value will ensure that the decryption - key is not repeated even if the passphrase is reused. - -5.4. One-Pass Signature Packets (Tag 4) - - The One-Pass Signature packet precedes the signed data and contains - enough information to allow the receiver to begin calculating any - hashes needed to verify the signature. It allows the Signature - packet to be placed at the end of the message, so that the signer - can compute the entire signed message in one pass. - - A One-Pass Signature does not interoperate with PGP 2.6.x or - earlier. - - - -Callas, et al Standards Track [Page 39] - -RFC 4880 OpenPGP Message Format November 2007 - - - The body of this packet consists of: - - - A one-octet version number. The current version is 3. - - - A one-octet signature type. Signature types are described in - Section 5.2.1. - - - A one-octet number describing the hash algorithm used. - - - A one-octet number describing the public-key algorithm used. - - - An eight-octet number holding the Key ID of the signing key. - - - A one-octet number holding a flag showing whether the signature - is nested. A zero value indicates that the next packet is - another One-Pass Signature packet that describes another - signature to be applied to the same message data. - - Note that if a message contains more than one one-pass signature, - then the Signature packets bracket the message; that is, the first - Signature packet after the message corresponds to the last one-pass - packet and the final Signature packet corresponds to the first - one-pass packet. - -5.5. Key Material Packet - - A key material packet contains all the information about a public or - private key. There are four variants of this packet type, and two - major versions. Consequently, this section is complex. - -5.5.1. Key Packet Variants - -5.5.1.1. Public-Key Packet (Tag 6) - - A Public-Key packet starts a series of packets that forms an OpenPGP - key (sometimes called an OpenPGP certificate). - -5.5.1.2. Public-Subkey Packet (Tag 14) - - A Public-Subkey packet (tag 14) has exactly the same format as a - Public-Key packet, but denotes a subkey. One or more subkeys may be - associated with a top-level key. By convention, the top-level key - provides signature services, and the subkeys provide encryption - services. - - Note: in PGP 2.6.x, tag 14 was intended to indicate a comment - packet. This tag was selected for reuse because no previous version - of PGP ever emitted comment packets but they did properly ignore - - - -Callas, et al Standards Track [Page 40] - -RFC 4880 OpenPGP Message Format November 2007 - - - them. Public-Subkey packets are ignored by PGP 2.6.x and do not - cause it to fail, providing a limited degree of backward - compatibility. - -5.5.1.3. Secret-Key Packet (Tag 5) - - A Secret-Key packet contains all the information that is found in a - Public-Key packet, including the public-key material, but also - includes the secret-key material after all the public-key fields. - -5.5.1.4. Secret-Subkey Packet (Tag 7) - - A Secret-Subkey packet (tag 7) is the subkey analog of the Secret - Key packet and has exactly the same format. - -5.5.2. Public-Key Packet Formats - - There are two versions of key-material packets. Version 3 packets - were first generated by PGP 2.6. Version 4 keys first appeared in - PGP 5.0 and are the preferred key version for OpenPGP. - - OpenPGP implementations MUST create keys with version 4 format. V3 - keys are deprecated; an implementation MUST NOT generate a V3 key, - but MAY accept it. - - A version 3 public key or public-subkey packet contains: - - - A one-octet version number (3). - - - A four-octet number denoting the time that the key was created. - - - A two-octet number denoting the time in days that this key is - valid. If this number is zero, then it does not expire. - - - A one-octet number denoting the public-key algorithm of this key. - - - A series of multiprecision integers comprising the key material: - - - a multiprecision integer (MPI) of RSA public modulus n; - - - an MPI of RSA public encryption exponent e. - - V3 keys are deprecated. They contain three weaknesses. First, it is - relatively easy to construct a V3 key that has the same Key ID as any - other key because the Key ID is simply the low 64 bits of the public - modulus. Secondly, because the fingerprint of a V3 key hashes the - key material, but not its length, there is an increased opportunity - for fingerprint collisions. Third, there are weaknesses in the MD5 - - - -Callas, et al Standards Track [Page 41] - -RFC 4880 OpenPGP Message Format November 2007 - - - hash algorithm that make developers prefer other algorithms. See - below for a fuller discussion of Key IDs and fingerprints. - - V2 keys are identical to the deprecated V3 keys except for the - version number. An implementation MUST NOT generate them and MAY - accept or reject them as it sees fit. - - The version 4 format is similar to the version 3 format except for - the absence of a validity period. This has been moved to the - Signature packet. In addition, fingerprints of version 4 keys are - calculated differently from version 3 keys, as described in the - section "Enhanced Key Formats". - - A version 4 packet contains: - - - A one-octet version number (4). - - - A four-octet number denoting the time that the key was created. - - - A one-octet number denoting the public-key algorithm of this key. - - - A series of multiprecision integers comprising the key material. - This algorithm-specific portion is: - - Algorithm-Specific Fields for RSA public keys: - - - multiprecision integer (MPI) of RSA public modulus n; - - - MPI of RSA public encryption exponent e. - - Algorithm-Specific Fields for DSA public keys: - - - MPI of DSA prime p; - - - MPI of DSA group order q (q is a prime divisor of p-1); - - - MPI of DSA group generator g; - - - MPI of DSA public-key value y (= g**x mod p where x - is secret). - - Algorithm-Specific Fields for Elgamal public keys: - - - MPI of Elgamal prime p; - - - MPI of Elgamal group generator g; - - - - - -Callas, et al Standards Track [Page 42] - -RFC 4880 OpenPGP Message Format November 2007 - - - - MPI of Elgamal public key value y (= g**x mod p where x - is secret). - -5.5.3. Secret-Key Packet Formats - - The Secret-Key and Secret-Subkey packets contain all the data of the - Public-Key and Public-Subkey packets, with additional algorithm- - specific secret-key data appended, usually in encrypted form. - - The packet contains: - - - A Public-Key or Public-Subkey packet, as described above. - - - One octet indicating string-to-key usage conventions. Zero - indicates that the secret-key data is not encrypted. 255 or 254 - indicates that a string-to-key specifier is being given. Any - other value is a symmetric-key encryption algorithm identifier. - - - [Optional] If string-to-key usage octet was 255 or 254, a one- - octet symmetric encryption algorithm. - - - [Optional] If string-to-key usage octet was 255 or 254, a - string-to-key specifier. The length of the string-to-key - specifier is implied by its type, as described above. - - - [Optional] If secret data is encrypted (string-to-key usage octet - not zero), an Initial Vector (IV) of the same length as the - cipher's block size. - - - Plain or encrypted multiprecision integers comprising the secret - key data. These algorithm-specific fields are as described - below. - - - If the string-to-key usage octet is zero or 255, then a two-octet - checksum of the plaintext of the algorithm-specific portion (sum - of all octets, mod 65536). If the string-to-key usage octet was - 254, then a 20-octet SHA-1 hash of the plaintext of the - algorithm-specific portion. This checksum or hash is encrypted - together with the algorithm-specific fields (if string-to-key - usage octet is not zero). Note that for all other values, a - two-octet checksum is required. - - Algorithm-Specific Fields for RSA secret keys: - - - multiprecision integer (MPI) of RSA secret exponent d. - - - MPI of RSA secret prime value p. - - - - -Callas, et al Standards Track [Page 43] - -RFC 4880 OpenPGP Message Format November 2007 - - - - MPI of RSA secret prime value q (p < q). - - - MPI of u, the multiplicative inverse of p, mod q. - - Algorithm-Specific Fields for DSA secret keys: - - - MPI of DSA secret exponent x. - - Algorithm-Specific Fields for Elgamal secret keys: - - - MPI of Elgamal secret exponent x. - - Secret MPI values can be encrypted using a passphrase. If a string- - to-key specifier is given, that describes the algorithm for - converting the passphrase to a key, else a simple MD5 hash of the - passphrase is used. Implementations MUST use a string-to-key - specifier; the simple hash is for backward compatibility and is - deprecated, though implementations MAY continue to use existing - private keys in the old format. The cipher for encrypting the MPIs - is specified in the Secret-Key packet. - - Encryption/decryption of the secret data is done in CFB mode using - the key created from the passphrase and the Initial Vector from the - packet. A different mode is used with V3 keys (which are only RSA) - than with other key formats. With V3 keys, the MPI bit count prefix - (i.e., the first two octets) is not encrypted. Only the MPI non- - prefix data is encrypted. Furthermore, the CFB state is - resynchronized at the beginning of each new MPI value, so that the - CFB block boundary is aligned with the start of the MPI data. - - With V4 keys, a simpler method is used. All secret MPI values are - encrypted in CFB mode, including the MPI bitcount prefix. - - The two-octet checksum that follows the algorithm-specific portion is - the algebraic sum, mod 65536, of the plaintext of all the algorithm- - specific octets (including MPI prefix and data). With V3 keys, the - checksum is stored in the clear. With V4 keys, the checksum is - encrypted like the algorithm-specific data. This value is used to - check that the passphrase was correct. However, this checksum is - deprecated; an implementation SHOULD NOT use it, but should rather - use the SHA-1 hash denoted with a usage octet of 254. The reason for - this is that there are some attacks that involve undetectably - modifying the secret key. - - - - - - - - -Callas, et al Standards Track [Page 44] - -RFC 4880 OpenPGP Message Format November 2007 - - -5.6. Compressed Data Packet (Tag 8) - - The Compressed Data packet contains compressed data. Typically, this - packet is found as the contents of an encrypted packet, or following - a Signature or One-Pass Signature packet, and contains a literal data - packet. - - The body of this packet consists of: - - - One octet that gives the algorithm used to compress the packet. - - - Compressed data, which makes up the remainder of the packet. - - A Compressed Data Packet's body contains an block that compresses - some set of packets. See section "Packet Composition" for details on - how messages are formed. - - ZIP-compressed packets are compressed with raw RFC 1951 [RFC1951] - DEFLATE blocks. Note that PGP V2.6 uses 13 bits of compression. If - an implementation uses more bits of compression, PGP V2.6 cannot - decompress it. - - ZLIB-compressed packets are compressed with RFC 1950 [RFC1950] ZLIB- - style blocks. - - BZip2-compressed packets are compressed using the BZip2 [BZ2] - algorithm. - -5.7. Symmetrically Encrypted Data Packet (Tag 9) - - The Symmetrically Encrypted Data packet contains data encrypted with - a symmetric-key algorithm. When it has been decrypted, it contains - other packets (usually a literal data packet or compressed data - packet, but in theory other Symmetrically Encrypted Data packets or - sequences of packets that form whole OpenPGP messages). - - The body of this packet consists of: - - - Encrypted data, the output of the selected symmetric-key cipher - operating in OpenPGP's variant of Cipher Feedback (CFB) mode. - - The symmetric cipher used may be specified in a Public-Key or - Symmetric-Key Encrypted Session Key packet that precedes the - Symmetrically Encrypted Data packet. In that case, the cipher - algorithm octet is prefixed to the session key before it is - encrypted. If no packets of these types precede the encrypted data, - the IDEA algorithm is used with the session key calculated as the MD5 - hash of the passphrase, though this use is deprecated. - - - -Callas, et al Standards Track [Page 45] - -RFC 4880 OpenPGP Message Format November 2007 - - - The data is encrypted in CFB mode, with a CFB shift size equal to the - cipher's block size. The Initial Vector (IV) is specified as all - zeros. Instead of using an IV, OpenPGP prefixes a string of length - equal to the block size of the cipher plus two to the data before it - is encrypted. The first block-size octets (for example, 8 octets for - a 64-bit block length) are random, and the following two octets are - copies of the last two octets of the IV. For example, in an 8-octet - block, octet 9 is a repeat of octet 7, and octet 10 is a repeat of - octet 8. In a cipher of length 16, octet 17 is a repeat of octet 15 - and octet 18 is a repeat of octet 16. As a pedantic clarification, - in both these examples, we consider the first octet to be numbered 1. - - After encrypting the first block-size-plus-two octets, the CFB state - is resynchronized. The last block-size octets of ciphertext are - passed through the cipher and the block boundary is reset. - - The repetition of 16 bits in the random data prefixed to the message - allows the receiver to immediately check whether the session key is - incorrect. See the "Security Considerations" section for hints on - the proper use of this "quick check". - -5.8. Marker Packet (Obsolete Literal Packet) (Tag 10) - - An experimental version of PGP used this packet as the Literal - packet, but no released version of PGP generated Literal packets with - this tag. With PGP 5.x, this packet has been reassigned and is - reserved for use as the Marker packet. - - The body of this packet consists of: - - - The three octets 0x50, 0x47, 0x50 (which spell "PGP" in UTF-8). - - Such a packet MUST be ignored when received. It may be placed at the - beginning of a message that uses features not available in PGP 2.6.x - in order to cause that version to report that newer software is - necessary to process the message. - -5.9. Literal Data Packet (Tag 11) - - A Literal Data packet contains the body of a message; data that is - not to be further interpreted. - - The body of this packet consists of: - - - A one-octet field that describes how the data is formatted. - - - - - - -Callas, et al Standards Track [Page 46] - -RFC 4880 OpenPGP Message Format November 2007 - - - If it is a 'b' (0x62), then the Literal packet contains binary data. - If it is a 't' (0x74), then it contains text data, and thus may need - line ends converted to local form, or other text-mode changes. The - tag 'u' (0x75) means the same as 't', but also indicates that - implementation believes that the literal data contains UTF-8 text. - - Early versions of PGP also defined a value of 'l' as a 'local' mode - for machine-local conversions. RFC 1991 [RFC1991] incorrectly stated - this local mode flag as '1' (ASCII numeral one). Both of these local - modes are deprecated. - - - File name as a string (one-octet length, followed by a file - name). This may be a zero-length string. Commonly, if the - source of the encrypted data is a file, this will be the name of - the encrypted file. An implementation MAY consider the file name - in the Literal packet to be a more authoritative name than the - actual file name. - - If the special name "_CONSOLE" is used, the message is considered to - be "for your eyes only". This advises that the message data is - unusually sensitive, and the receiving program should process it more - carefully, perhaps avoiding storing the received data to disk, for - example. - - - A four-octet number that indicates a date associated with the - literal data. Commonly, the date might be the modification date - of a file, or the time the packet was created, or a zero that - indicates no specific time. - - - The remainder of the packet is literal data. - - Text data is stored with text endings (i.e., network- - normal line endings). These should be converted to native line - endings by the receiving software. - -5.10. Trust Packet (Tag 12) - - The Trust packet is used only within keyrings and is not normally - exported. Trust packets contain data that record the user's - specifications of which key holders are trustworthy introducers, - along with other information that implementing software uses for - trust information. The format of Trust packets is defined by a given - implementation. - - Trust packets SHOULD NOT be emitted to output streams that are - transferred to other users, and they SHOULD be ignored on any input - other than local keyring files. - - - - -Callas, et al Standards Track [Page 47] - -RFC 4880 OpenPGP Message Format November 2007 - - -5.11. User ID Packet (Tag 13) - - A User ID packet consists of UTF-8 text that is intended to represent - the name and email address of the key holder. By convention, it - includes an RFC 2822 [RFC2822] mail name-addr, but there are no - restrictions on its content. The packet length in the header - specifies the length of the User ID. - -5.12. User Attribute Packet (Tag 17) - - The User Attribute packet is a variation of the User ID packet. It - is capable of storing more types of data than the User ID packet, - which is limited to text. Like the User ID packet, a User Attribute - packet may be certified by the key owner ("self-signed") or any other - key owner who cares to certify it. Except as noted, a User Attribute - packet may be used anywhere that a User ID packet may be used. - - While User Attribute packets are not a required part of the OpenPGP - standard, implementations SHOULD provide at least enough - compatibility to properly handle a certification signature on the - User Attribute packet. A simple way to do this is by treating the - User Attribute packet as a User ID packet with opaque contents, but - an implementation may use any method desired. - - The User Attribute packet is made up of one or more attribute - subpackets. Each subpacket consists of a subpacket header and a - body. The header consists of: - - - the subpacket length (1, 2, or 5 octets) - - - the subpacket type (1 octet) - - and is followed by the subpacket specific data. - - The only currently defined subpacket type is 1, signifying an image. - An implementation SHOULD ignore any subpacket of a type that it does - not recognize. Subpacket types 100 through 110 are reserved for - private or experimental use. - -5.12.1. The Image Attribute Subpacket - - The Image Attribute subpacket is used to encode an image, presumably - (but not required to be) that of the key owner. - - The Image Attribute subpacket begins with an image header. The first - two octets of the image header contain the length of the image - header. Note that unlike other multi-octet numerical values in this - document, due to a historical accident this value is encoded as a - - - -Callas, et al Standards Track [Page 48] - -RFC 4880 OpenPGP Message Format November 2007 - - - little-endian number. The image header length is followed by a - single octet for the image header version. The only currently - defined version of the image header is 1, which is a 16-octet image - header. The first three octets of a version 1 image header are thus - 0x10, 0x00, 0x01. - - The fourth octet of a version 1 image header designates the encoding - format of the image. The only currently defined encoding format is - the value 1 to indicate JPEG. Image format types 100 through 110 are - reserved for private or experimental use. The rest of the version 1 - image header is made up of 12 reserved octets, all of which MUST be - set to 0. - - The rest of the image subpacket contains the image itself. As the - only currently defined image type is JPEG, the image is encoded in - the JPEG File Interchange Format (JFIF), a standard file format for - JPEG images [JFIF]. - - An implementation MAY try to determine the type of an image by - examination of the image data if it is unable to handle a particular - version of the image header or if a specified encoding format value - is not recognized. - -5.13. Sym. Encrypted Integrity Protected Data Packet (Tag 18) - - The Symmetrically Encrypted Integrity Protected Data packet is a - variant of the Symmetrically Encrypted Data packet. It is a new - feature created for OpenPGP that addresses the problem of detecting a - modification to encrypted data. It is used in combination with a - Modification Detection Code packet. - - There is a corresponding feature in the features Signature subpacket - that denotes that an implementation can properly use this packet - type. An implementation MUST support decrypting these packets and - SHOULD prefer generating them to the older Symmetrically Encrypted - Data packet when possible. Since this data packet protects against - modification attacks, this standard encourages its proliferation. - While blanket adoption of this data packet would create - interoperability problems, rapid adoption is nevertheless important. - An implementation SHOULD specifically denote support for this packet, - but it MAY infer it from other mechanisms. - - For example, an implementation might infer from the use of a cipher - such as Advanced Encryption Standard (AES) or Twofish that a user - supports this feature. It might place in the unhashed portion of - another user's key signature a Features subpacket. It might also - present a user with an opportunity to regenerate their own self- - signature with a Features subpacket. - - - -Callas, et al Standards Track [Page 49] - -RFC 4880 OpenPGP Message Format November 2007 - - - This packet contains data encrypted with a symmetric-key algorithm - and protected against modification by the SHA-1 hash algorithm. When - it has been decrypted, it will typically contain other packets (often - a Literal Data packet or Compressed Data packet). The last decrypted - packet in this packet's payload MUST be a Modification Detection Code - packet. - - The body of this packet consists of: - - - A one-octet version number. The only currently defined value is - 1. - - - Encrypted data, the output of the selected symmetric-key cipher - operating in Cipher Feedback mode with shift amount equal to the - block size of the cipher (CFB-n where n is the block size). - - The symmetric cipher used MUST be specified in a Public-Key or - Symmetric-Key Encrypted Session Key packet that precedes the - Symmetrically Encrypted Data packet. In either case, the cipher - algorithm octet is prefixed to the session key before it is - encrypted. - - The data is encrypted in CFB mode, with a CFB shift size equal to the - cipher's block size. The Initial Vector (IV) is specified as all - zeros. Instead of using an IV, OpenPGP prefixes an octet string to - the data before it is encrypted. The length of the octet string - equals the block size of the cipher in octets, plus two. The first - octets in the group, of length equal to the block size of the cipher, - are random; the last two octets are each copies of their 2nd - preceding octet. For example, with a cipher whose block size is 128 - bits or 16 octets, the prefix data will contain 16 random octets, - then two more octets, which are copies of the 15th and 16th octets, - respectively. Unlike the Symmetrically Encrypted Data Packet, no - special CFB resynchronization is done after encrypting this prefix - data. See "OpenPGP CFB Mode" below for more details. - - The repetition of 16 bits in the random data prefixed to the message - allows the receiver to immediately check whether the session key is - incorrect. - - The plaintext of the data to be encrypted is passed through the SHA-1 - hash function, and the result of the hash is appended to the - plaintext in a Modification Detection Code packet. The input to the - hash function includes the prefix data described above; it includes - all of the plaintext, and then also includes two octets of values - 0xD3, 0x14. These represent the encoding of a Modification Detection - Code packet tag and length field of 20 octets. - - - - -Callas, et al Standards Track [Page 50] - -RFC 4880 OpenPGP Message Format November 2007 - - - The resulting hash value is stored in a Modification Detection Code - (MDC) packet, which MUST use the two octet encoding just given to - represent its tag and length field. The body of the MDC packet is - the 20-octet output of the SHA-1 hash. - - The Modification Detection Code packet is appended to the plaintext - and encrypted along with the plaintext using the same CFB context. - - During decryption, the plaintext data should be hashed with SHA-1, - including the prefix data as well as the packet tag and length field - of the Modification Detection Code packet. The body of the MDC - packet, upon decryption, is compared with the result of the SHA-1 - hash. - - Any failure of the MDC indicates that the message has been modified - and MUST be treated as a security problem. Failures include a - difference in the hash values, but also the absence of an MDC packet, - or an MDC packet in any position other than the end of the plaintext. - Any failure SHOULD be reported to the user. - - Note: future designs of new versions of this packet should consider - rollback attacks since it will be possible for an attacker to change - the version back to 1. - - NON-NORMATIVE EXPLANATION - - The MDC system, as packets 18 and 19 are called, were created to - provide an integrity mechanism that is less strong than a - signature, yet stronger than bare CFB encryption. - - It is a limitation of CFB encryption that damage to the ciphertext - will corrupt the affected cipher blocks and the block following. - Additionally, if data is removed from the end of a CFB-encrypted - block, that removal is undetectable. (Note also that CBC mode has - a similar limitation, but data removed from the front of the block - is undetectable.) - - The obvious way to protect or authenticate an encrypted block is - to digitally sign it. However, many people do not wish to - habitually sign data, for a large number of reasons beyond the - scope of this document. Suffice it to say that many people - consider properties such as deniability to be as valuable as - integrity. - - OpenPGP addresses this desire to have more security than raw - encryption and yet preserve deniability with the MDC system. An - MDC is intentionally not a MAC. Its name was not selected by - accident. It is analogous to a checksum. - - - -Callas, et al Standards Track [Page 51] - -RFC 4880 OpenPGP Message Format November 2007 - - - Despite the fact that it is a relatively modest system, it has - proved itself in the real world. It is an effective defense to - several attacks that have surfaced since it has been created. It - has met its modest goals admirably. - - Consequently, because it is a modest security system, it has - modest requirements on the hash function(s) it employs. It does - not rely on a hash function being collision-free, it relies on a - hash function being one-way. If a forger, Frank, wishes to send - Alice a (digitally) unsigned message that says, "I've always - secretly loved you, signed Bob", it is far easier for him to - construct a new message than it is to modify anything intercepted - from Bob. (Note also that if Bob wishes to communicate secretly - with Alice, but without authentication or identification and with - a threat model that includes forgers, he has a problem that - transcends mere cryptography.) - - Note also that unlike nearly every other OpenPGP subsystem, there - are no parameters in the MDC system. It hard-defines SHA-1 as its - hash function. This is not an accident. It is an intentional - choice to avoid downgrade and cross-grade attacks while making a - simple, fast system. (A downgrade attack would be an attack that - replaced SHA-256 with SHA-1, for example. A cross-grade attack - would replace SHA-1 with another 160-bit hash, such as RIPE- - MD/160, for example.) - - However, given the present state of hash function cryptanalysis - and cryptography, it may be desirable to upgrade the MDC system to - a new hash function. See Section 13.11 in the "IANA - Considerations" for guidance. - -5.14. Modification Detection Code Packet (Tag 19) - - The Modification Detection Code packet contains a SHA-1 hash of - plaintext data, which is used to detect message modification. It is - only used with a Symmetrically Encrypted Integrity Protected Data - packet. The Modification Detection Code packet MUST be the last - packet in the plaintext data that is encrypted in the Symmetrically - Encrypted Integrity Protected Data packet, and MUST appear in no - other place. - - A Modification Detection Code packet MUST have a length of 20 octets. - - - - - - - - - -Callas, et al Standards Track [Page 52] - -RFC 4880 OpenPGP Message Format November 2007 - - - The body of this packet consists of: - - - A 20-octet SHA-1 hash of the preceding plaintext data of the - Symmetrically Encrypted Integrity Protected Data packet, - including prefix data, the tag octet, and length octet of the - Modification Detection Code packet. - - Note that the Modification Detection Code packet MUST always use a - new format encoding of the packet tag, and a one-octet encoding of - the packet length. The reason for this is that the hashing rules for - modification detection include a one-octet tag and one-octet length - in the data hash. While this is a bit restrictive, it reduces - complexity. - -6. Radix-64 Conversions - - As stated in the introduction, OpenPGP's underlying native - representation for objects is a stream of arbitrary octets, and some - systems desire these objects to be immune to damage caused by - character set translation, data conversions, etc. - - In principle, any printable encoding scheme that met the requirements - of the unsafe channel would suffice, since it would not change the - underlying binary bit streams of the native OpenPGP data structures. - The OpenPGP standard specifies one such printable encoding scheme to - ensure interoperability. - - OpenPGP's Radix-64 encoding is composed of two parts: a base64 - encoding of the binary data and a checksum. The base64 encoding is - identical to the MIME base64 content-transfer-encoding [RFC2045]. - - The checksum is a 24-bit Cyclic Redundancy Check (CRC) converted to - four characters of radix-64 encoding by the same MIME base64 - transformation, preceded by an equal sign (=). The CRC is computed - by using the generator 0x864CFB and an initialization of 0xB704CE. - The accumulation is done on the data before it is converted to - radix-64, rather than on the converted data. A sample implementation - of this algorithm is in the next section. - - The checksum with its leading equal sign MAY appear on the first line - after the base64 encoded data. - - Rationale for CRC-24: The size of 24 bits fits evenly into printable - base64. The nonzero initialization can detect more errors than a - zero initialization. - - - - - - -Callas, et al Standards Track [Page 53] - -RFC 4880 OpenPGP Message Format November 2007 - - -6.1. An Implementation of the CRC-24 in "C" - - #define CRC24_INIT 0xB704CEL - #define CRC24_POLY 0x1864CFBL - - typedef long crc24; - crc24 crc_octets(unsigned char *octets, size_t len) - { - crc24 crc = CRC24_INIT; - int i; - while (len--) { - crc ^= (*octets++) << 16; - for (i = 0; i < 8; i++) { - crc <<= 1; - if (crc & 0x1000000) - crc ^= CRC24_POLY; - } - } - return crc & 0xFFFFFFL; - } - -6.2. Forming ASCII Armor - - When OpenPGP encodes data into ASCII Armor, it puts specific headers - around the Radix-64 encoded data, so OpenPGP can reconstruct the data - later. An OpenPGP implementation MAY use ASCII armor to protect raw - binary data. OpenPGP informs the user what kind of data is encoded - in the ASCII armor through the use of the headers. - - Concatenating the following data creates ASCII Armor: - - - An Armor Header Line, appropriate for the type of data - - - Armor Headers - - - A blank (zero-length, or containing only whitespace) line - - - The ASCII-Armored data - - - An Armor Checksum - - - The Armor Tail, which depends on the Armor Header Line - - An Armor Header Line consists of the appropriate header line text - surrounded by five (5) dashes ('-', 0x2D) on either side of the - header line text. The header line text is chosen based upon the type - of data that is being encoded in Armor, and how it is being encoded. - Header line texts include the following strings: - - - -Callas, et al Standards Track [Page 54] - -RFC 4880 OpenPGP Message Format November 2007 - - - BEGIN PGP MESSAGE - Used for signed, encrypted, or compressed files. - - BEGIN PGP PUBLIC KEY BLOCK - Used for armoring public keys. - - BEGIN PGP PRIVATE KEY BLOCK - Used for armoring private keys. - - BEGIN PGP MESSAGE, PART X/Y - Used for multi-part messages, where the armor is split amongst Y - parts, and this is the Xth part out of Y. - - BEGIN PGP MESSAGE, PART X - Used for multi-part messages, where this is the Xth part of an - unspecified number of parts. Requires the MESSAGE-ID Armor - Header to be used. - - BEGIN PGP SIGNATURE - Used for detached signatures, OpenPGP/MIME signatures, and - cleartext signatures. Note that PGP 2.x uses BEGIN PGP MESSAGE - for detached signatures. - - Note that all these Armor Header Lines are to consist of a complete - line. That is to say, there is always a line ending preceding the - starting five dashes, and following the ending five dashes. The - header lines, therefore, MUST start at the beginning of a line, and - MUST NOT have text other than whitespace following them on the same - line. These line endings are considered a part of the Armor Header - Line for the purposes of determining the content they delimit. This - is particularly important when computing a cleartext signature (see - below). - - The Armor Headers are pairs of strings that can give the user or the - receiving OpenPGP implementation some information about how to decode - or use the message. The Armor Headers are a part of the armor, not a - part of the message, and hence are not protected by any signatures - applied to the message. - - The format of an Armor Header is that of a key-value pair. A colon - (':' 0x38) and a single space (0x20) separate the key and value. - OpenPGP should consider improperly formatted Armor Headers to be - corruption of the ASCII Armor. Unknown keys should be reported to - the user, but OpenPGP should continue to process the message. - - Note that some transport methods are sensitive to line length. While - there is a limit of 76 characters for the Radix-64 data (Section - 6.3), there is no limit to the length of Armor Headers. Care should - - - -Callas, et al Standards Track [Page 55] - -RFC 4880 OpenPGP Message Format November 2007 - - - be taken that the Armor Headers are short enough to survive - transport. One way to do this is to repeat an Armor Header key - multiple times with different values for each so that no one line is - overly long. - - Currently defined Armor Header Keys are as follows: - - - "Version", which states the OpenPGP implementation and version - used to encode the message. - - - "Comment", a user-defined comment. OpenPGP defines all text to - be in UTF-8. A comment may be any UTF-8 string. However, the - whole point of armoring is to provide seven-bit-clean data. - Consequently, if a comment has characters that are outside the - US-ASCII range of UTF, they may very well not survive transport. - - - "MessageID", a 32-character string of printable characters. The - string must be the same for all parts of a multi-part message - that uses the "PART X" Armor Header. MessageID strings should be - unique enough that the recipient of the mail can associate all - the parts of a message with each other. A good checksum or - cryptographic hash function is sufficient. - - The MessageID SHOULD NOT appear unless it is in a multi-part - message. If it appears at all, it MUST be computed from the - finished (encrypted, signed, etc.) message in a deterministic - fashion, rather than contain a purely random value. This is to - allow the legitimate recipient to determine that the MessageID - cannot serve as a covert means of leaking cryptographic key - information. - - - "Hash", a comma-separated list of hash algorithms used in this - message. This is used only in cleartext signed messages. - - - "Charset", a description of the character set that the plaintext - is in. Please note that OpenPGP defines text to be in UTF-8. An - implementation will get best results by translating into and out - of UTF-8. However, there are many instances where this is easier - said than done. Also, there are communities of users who have no - need for UTF-8 because they are all happy with a character set - like ISO Latin-5 or a Japanese character set. In such instances, - an implementation MAY override the UTF-8 default by using this - header key. An implementation MAY implement this key and any - translations it cares to; an implementation MAY ignore it and - assume all text is UTF-8. - - - - - - -Callas, et al Standards Track [Page 56] - -RFC 4880 OpenPGP Message Format November 2007 - - - The Armor Tail Line is composed in the same manner as the Armor - Header Line, except the string "BEGIN" is replaced by the string - "END". - -6.3. Encoding Binary in Radix-64 - - The encoding process represents 24-bit groups of input bits as output - strings of 4 encoded characters. Proceeding from left to right, a - 24-bit input group is formed by concatenating three 8-bit input - groups. These 24 bits are then treated as four concatenated 6-bit - groups, each of which is translated into a single digit in the - Radix-64 alphabet. When encoding a bit stream with the Radix-64 - encoding, the bit stream must be presumed to be ordered with the most - significant bit first. That is, the first bit in the stream will be - the high-order bit in the first 8-bit octet, and the eighth bit will - be the low-order bit in the first 8-bit octet, and so on. - - +--first octet--+-second octet--+--third octet--+ - |7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0| - +-----------+---+-------+-------+---+-----------+ - |5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0| - +--1.index--+--2.index--+--3.index--+--4.index--+ - - Each 6-bit group is used as an index into an array of 64 printable - characters from the table below. The character referenced by the - index is placed in the output string. - - Value Encoding Value Encoding Value Encoding Value Encoding - 0 A 17 R 34 i 51 z - 1 B 18 S 35 j 52 0 - 2 C 19 T 36 k 53 1 - 3 D 20 U 37 l 54 2 - 4 E 21 V 38 m 55 3 - 5 F 22 W 39 n 56 4 - 6 G 23 X 40 o 57 5 - 7 H 24 Y 41 p 58 6 - 8 I 25 Z 42 q 59 7 - 9 J 26 a 43 r 60 8 - 10 K 27 b 44 s 61 9 - 11 L 28 c 45 t 62 + - 12 M 29 d 46 u 63 / - 13 N 30 e 47 v - 14 O 31 f 48 w (pad) = - 15 P 32 g 49 x - 16 Q 33 h 50 y - - The encoded output stream must be represented in lines of no more - than 76 characters each. - - - -Callas, et al Standards Track [Page 57] - -RFC 4880 OpenPGP Message Format November 2007 - - - Special processing is performed if fewer than 24 bits are available - at the end of the data being encoded. There are three possibilities: - - 1. The last data group has 24 bits (3 octets). No special processing - is needed. - - 2. The last data group has 16 bits (2 octets). The first two 6-bit - groups are processed as above. The third (incomplete) data group - has two zero-value bits added to it, and is processed as above. A - pad character (=) is added to the output. - - 3. The last data group has 8 bits (1 octet). The first 6-bit group - is processed as above. The second (incomplete) data group has - four zero-value bits added to it, and is processed as above. Two - pad characters (=) are added to the output. - -6.4. Decoding Radix-64 - - In Radix-64 data, characters other than those in the table, line - breaks, and other white space probably indicate a transmission error, - about which a warning message or even a message rejection might be - appropriate under some circumstances. Decoding software must ignore - all white space. - - Because it is used only for padding at the end of the data, the - occurrence of any "=" characters may be taken as evidence that the - end of the data has been reached (without truncation in transit). No - such assurance is possible, however, when the number of octets - transmitted was a multiple of three and no "=" characters are - present. - - - - - - - - - - - - - - - - - - - - - -Callas, et al Standards Track [Page 58] - -RFC 4880 OpenPGP Message Format November 2007 - - -6.5. Examples of Radix-64 - - Input data: 0x14FB9C03D97E - Hex: 1 4 F B 9 C | 0 3 D 9 7 E - 8-bit: 00010100 11111011 10011100 | 00000011 11011001 11111110 - 6-bit: 000101 001111 101110 011100 | 000000 111101 100111 111110 - Decimal: 5 15 46 28 0 61 37 62 - Output: F P u c A 9 l + - Input data: 0x14FB9C03D9 - Hex: 1 4 F B 9 C | 0 3 D 9 - 8-bit: 00010100 11111011 10011100 | 00000011 11011001 - pad with 00 - 6-bit: 000101 001111 101110 011100 | 000000 111101 100100 - Decimal: 5 15 46 28 0 61 36 - pad with = - Output: F P u c A 9 k = - Input data: 0x14FB9C03 - Hex: 1 4 F B 9 C | 0 3 - 8-bit: 00010100 11111011 10011100 | 00000011 - pad with 0000 - 6-bit: 000101 001111 101110 011100 | 000000 110000 - Decimal: 5 15 46 28 0 48 - pad with = = - Output: F P u c A w = = - -6.6. Example of an ASCII Armored Message - - -----BEGIN PGP MESSAGE----- - Version: OpenPrivacy 0.99 - - yDgBO22WxBHv7O8X7O/jygAEzol56iUKiXmV+XmpCtmpqQUKiQrFqclFqUDBovzS - vBSFjNSiVHsuAA== - =njUN - -----END PGP MESSAGE----- - - Note that this example has extra indenting; an actual armored message - would have no leading whitespace. - -7. Cleartext Signature Framework - - It is desirable to be able to sign a textual octet stream without - ASCII armoring the stream itself, so the signed text is still - readable without special software. In order to bind a signature to - such a cleartext, this framework is used. (Note that this framework - is not intended to be reversible. RFC 3156 [RFC3156] defines another - way to sign cleartext messages for environments that support MIME.) - - - - - -Callas, et al Standards Track [Page 59] - -RFC 4880 OpenPGP Message Format November 2007 - - - The cleartext signed message consists of: - - - The cleartext header '-----BEGIN PGP SIGNED MESSAGE-----' on a - single line, - - - One or more "Hash" Armor Headers, - - - Exactly one empty line not included into the message digest, - - - The dash-escaped cleartext that is included into the message - digest, - - - The ASCII armored signature(s) including the '-----BEGIN PGP - SIGNATURE-----' Armor Header and Armor Tail Lines. - - If the "Hash" Armor Header is given, the specified message digest - algorithm(s) are used for the signature. If there are no such - headers, MD5 is used. If MD5 is the only hash used, then an - implementation MAY omit this header for improved V2.x compatibility. - If more than one message digest is used in the signature, the "Hash" - armor header contains a comma-delimited list of used message digests. - - Current message digest names are described below with the algorithm - IDs. - - An implementation SHOULD add a line break after the cleartext, but - MAY omit it if the cleartext ends with a line break. This is for - visual clarity. - -7.1. Dash-Escaped Text - - The cleartext content of the message must also be dash-escaped. - - Dash-escaped cleartext is the ordinary cleartext where every line - starting with a dash '-' (0x2D) is prefixed by the sequence dash '-' - (0x2D) and space ' ' (0x20). This prevents the parser from - recognizing armor headers of the cleartext itself. An implementation - MAY dash-escape any line, SHOULD dash-escape lines commencing "From" - followed by a space, and MUST dash-escape any line commencing in a - dash. The message digest is computed using the cleartext itself, not - the dash-escaped form. - - As with binary signatures on text documents, a cleartext signature is - calculated on the text using canonical line endings. The - line ending (i.e., the ) before the '-----BEGIN PGP - SIGNATURE-----' line that terminates the signed text is not - considered part of the signed text. - - - - -Callas, et al Standards Track [Page 60] - -RFC 4880 OpenPGP Message Format November 2007 - - - When reversing dash-escaping, an implementation MUST strip the string - "- " if it occurs at the beginning of a line, and SHOULD warn on "-" - and any character other than a space at the beginning of a line. - - Also, any trailing whitespace -- spaces (0x20) and tabs (0x09) -- at - the end of any line is removed when the cleartext signature is - generated. - -8. Regular Expressions - - A regular expression is zero or more branches, separated by '|'. It - matches anything that matches one of the branches. - - A branch is zero or more pieces, concatenated. It matches a match - for the first, followed by a match for the second, etc. - - A piece is an atom possibly followed by '*', '+', or '?'. An atom - followed by '*' matches a sequence of 0 or more matches of the atom. - An atom followed by '+' matches a sequence of 1 or more matches of - the atom. An atom followed by '?' matches a match of the atom, or - the null string. - - An atom is a regular expression in parentheses (matching a match for - the regular expression), a range (see below), '.' (matching any - single character), '^' (matching the null string at the beginning of - the input string), '$' (matching the null string at the end of the - input string), a '\' followed by a single character (matching that - character), or a single character with no other significance - (matching that character). - - A range is a sequence of characters enclosed in '[]'. It normally - matches any single character from the sequence. If the sequence - begins with '^', it matches any single character not from the rest of - the sequence. If two characters in the sequence are separated - by '-', this is shorthand for the full list of ASCII characters - between them (e.g., '[0-9]' matches any decimal digit). To include a - literal ']' in the sequence, make it the first character (following a - possible '^'). To include a literal '-', make it the first or last - character. - -9. Constants - - This section describes the constants used in OpenPGP. - - Note that these tables are not exhaustive lists; an implementation - MAY implement an algorithm not on these lists, so long as the - algorithm numbers are chosen from the private or experimental - algorithm range. - - - -Callas, et al Standards Track [Page 61] - -RFC 4880 OpenPGP Message Format November 2007 - - - See the section "Notes on Algorithms" below for more discussion of - the algorithms. - -9.1. Public-Key Algorithms - - ID Algorithm - -- --------- - 1 - RSA (Encrypt or Sign) [HAC] - 2 - RSA Encrypt-Only [HAC] - 3 - RSA Sign-Only [HAC] - 16 - Elgamal (Encrypt-Only) [ELGAMAL] [HAC] - 17 - DSA (Digital Signature Algorithm) [FIPS186] [HAC] - 18 - Reserved for Elliptic Curve - 19 - Reserved for ECDSA - 20 - Reserved (formerly Elgamal Encrypt or Sign) - 21 - Reserved for Diffie-Hellman (X9.42, - as defined for IETF-S/MIME) - 100 to 110 - Private/Experimental algorithm - - Implementations MUST implement DSA for signatures, and Elgamal for - encryption. Implementations SHOULD implement RSA keys (1). RSA - Encrypt-Only (2) and RSA Sign-Only are deprecated and SHOULD NOT be - generated, but may be interpreted. See Section 13.5. See Section - 13.8 for notes on Elliptic Curve (18), ECDSA (19), Elgamal Encrypt or - Sign (20), and X9.42 (21). Implementations MAY implement any other - algorithm. - -9.2. Symmetric-Key Algorithms - - ID Algorithm - -- --------- - 0 - Plaintext or unencrypted data - 1 - IDEA [IDEA] - 2 - TripleDES (DES-EDE, [SCHNEIER] [HAC] - - 168 bit key derived from 192) - 3 - CAST5 (128 bit key, as per [RFC2144]) - 4 - Blowfish (128 bit key, 16 rounds) [BLOWFISH] - 5 - Reserved - 6 - Reserved - 7 - AES with 128-bit key [AES] - 8 - AES with 192-bit key - 9 - AES with 256-bit key - 10 - Twofish with 256-bit key [TWOFISH] - 100 to 110 - Private/Experimental algorithm - - Implementations MUST implement TripleDES. Implementations SHOULD - implement AES-128 and CAST5. Implementations that interoperate with - - - - -Callas, et al Standards Track [Page 62] - -RFC 4880 OpenPGP Message Format November 2007 - - - PGP 2.6 or earlier need to support IDEA, as that is the only - symmetric cipher those versions use. Implementations MAY implement - any other algorithm. - -9.3. Compression Algorithms - - ID Algorithm - -- --------- - 0 - Uncompressed - 1 - ZIP [RFC1951] - 2 - ZLIB [RFC1950] - 3 - BZip2 [BZ2] - 100 to 110 - Private/Experimental algorithm - - Implementations MUST implement uncompressed data. Implementations - SHOULD implement ZIP. Implementations MAY implement any other - algorithm. - -9.4. Hash Algorithms - - ID Algorithm Text Name - -- --------- --------- - 1 - MD5 [HAC] "MD5" - 2 - SHA-1 [FIPS180] "SHA1" - 3 - RIPE-MD/160 [HAC] "RIPEMD160" - 4 - Reserved - 5 - Reserved - 6 - Reserved - 7 - Reserved - 8 - SHA256 [FIPS180] "SHA256" - 9 - SHA384 [FIPS180] "SHA384" - 10 - SHA512 [FIPS180] "SHA512" - 11 - SHA224 [FIPS180] "SHA224" - 100 to 110 - Private/Experimental algorithm - - Implementations MUST implement SHA-1. Implementations MAY implement - other algorithms. MD5 is deprecated. - -10. IANA Considerations - - OpenPGP is highly parameterized, and consequently there are a number - of considerations for allocating parameters for extensions. This - section describes how IANA should look at extensions to the protocol - as described in this document. - - - - - - - -Callas, et al Standards Track [Page 63] - -RFC 4880 OpenPGP Message Format November 2007 - - -10.1. New String-to-Key Specifier Types - - OpenPGP S2K specifiers contain a mechanism for new algorithms to turn - a string into a key. This specification creates a registry of S2K - specifier types. The registry includes the S2K type, the name of the - S2K, and a reference to the defining specification. The initial - values for this registry can be found in Section 3.7.1. Adding a new - S2K specifier MUST be done through the IETF CONSENSUS method, as - described in [RFC2434]. - -10.2. New Packets - - Major new features of OpenPGP are defined through new packet types. - This specification creates a registry of packet types. The registry - includes the packet type, the name of the packet, and a reference to - the defining specification. The initial values for this registry can - be found in Section 4.3. Adding a new packet type MUST be done - through the IETF CONSENSUS method, as described in [RFC2434]. - -10.2.1. User Attribute Types - - The User Attribute packet permits an extensible mechanism for other - types of certificate identification. This specification creates a - registry of User Attribute types. The registry includes the User - Attribute type, the name of the User Attribute, and a reference to - the defining specification. The initial values for this registry can - be found in Section 5.12. Adding a new User Attribute type MUST be - done through the IETF CONSENSUS method, as described in [RFC2434]. - -10.2.1.1. Image Format Subpacket Types - - Within User Attribute packets, there is an extensible mechanism for - other types of image-based user attributes. This specification - creates a registry of Image Attribute subpacket types. The registry - includes the Image Attribute subpacket type, the name of the Image - Attribute subpacket, and a reference to the defining specification. - The initial values for this registry can be found in Section 5.12.1. - Adding a new Image Attribute subpacket type MUST be done through the - IETF CONSENSUS method, as described in [RFC2434]. - -10.2.2. New Signature Subpackets - - OpenPGP signatures contain a mechanism for signed (or unsigned) data - to be added to them for a variety of purposes in the Signature - subpackets as discussed in Section 5.2.3.1. This specification - creates a registry of Signature subpacket types. The registry - includes the Signature subpacket type, the name of the subpacket, and - a reference to the defining specification. The initial values for - - - -Callas, et al Standards Track [Page 64] - -RFC 4880 OpenPGP Message Format November 2007 - - - this registry can be found in Section 5.2.3.1. Adding a new - Signature subpacket MUST be done through the IETF CONSENSUS method, - as described in [RFC2434]. - -10.2.2.1. Signature Notation Data Subpackets - - OpenPGP signatures further contain a mechanism for extensions in - signatures. These are the Notation Data subpackets, which contain a - key/value pair. Notations contain a user space that is completely - unmanaged and an IETF space. - - This specification creates a registry of Signature Notation Data - types. The registry includes the Signature Notation Data type, the - name of the Signature Notation Data, its allowed values, and a - reference to the defining specification. The initial values for this - registry can be found in Section 5.2.3.16. Adding a new Signature - Notation Data subpacket MUST be done through the EXPERT REVIEW - method, as described in [RFC2434]. - -10.2.2.2. Key Server Preference Extensions - - OpenPGP signatures contain a mechanism for preferences to be - specified about key servers. This specification creates a registry - of key server preferences. The registry includes the key server - preference, the name of the preference, and a reference to the - defining specification. The initial values for this registry can be - found in Section 5.2.3.17. Adding a new key server preference MUST - be done through the IETF CONSENSUS method, as described in [RFC2434]. - -10.2.2.3. Key Flags Extensions - - OpenPGP signatures contain a mechanism for flags to be specified - about key usage. This specification creates a registry of key usage - flags. The registry includes the key flags value, the name of the - flag, and a reference to the defining specification. The initial - values for this registry can be found in Section 5.2.3.21. Adding a - new key usage flag MUST be done through the IETF CONSENSUS method, as - described in [RFC2434]. - -10.2.2.4. Reason for Revocation Extensions - - OpenPGP signatures contain a mechanism for flags to be specified - about why a key was revoked. This specification creates a registry - of "Reason for Revocation" flags. The registry includes the "Reason - for Revocation" flags value, the name of the flag, and a reference to - the defining specification. The initial values for this registry can - be found in Section 5.2.3.23. Adding a new feature flag MUST be done - through the IETF CONSENSUS method, as described in [RFC2434]. - - - -Callas, et al Standards Track [Page 65] - -RFC 4880 OpenPGP Message Format November 2007 - - -10.2.2.5. Implementation Features - - OpenPGP signatures contain a mechanism for flags to be specified - stating which optional features an implementation supports. This - specification creates a registry of feature-implementation flags. - The registry includes the feature-implementation flags value, the - name of the flag, and a reference to the defining specification. The - initial values for this registry can be found in Section 5.2.3.24. - Adding a new feature-implementation flag MUST be done through the - IETF CONSENSUS method, as described in [RFC2434]. - - Also see Section 13.12 for more information about when feature flags - are needed. - -10.2.3. New Packet Versions - - The core OpenPGP packets all have version numbers, and can be revised - by introducing a new version of an existing packet. This - specification creates a registry of packet types. The registry - includes the packet type, the number of the version, and a reference - to the defining specification. The initial values for this registry - can be found in Section 5. Adding a new packet version MUST be done - through the IETF CONSENSUS method, as described in [RFC2434]. - -10.3. New Algorithms - - Section 9 lists the core algorithms that OpenPGP uses. Adding in a - new algorithm is usually simple. For example, adding in a new - symmetric cipher usually would not need anything more than allocating - a constant for that cipher. If that cipher had other than a 64-bit - or 128-bit block size, there might need to be additional - documentation describing how OpenPGP-CFB mode would be adjusted. - Similarly, when DSA was expanded from a maximum of 1024-bit public - keys to 3072-bit public keys, the revision of FIPS 186 contained - enough information itself to allow implementation. Changes to this - document were made mainly for emphasis. - -10.3.1. Public-Key Algorithms - - OpenPGP specifies a number of public-key algorithms. This - specification creates a registry of public-key algorithm identifiers. - The registry includes the algorithm name, its key sizes and - parameters, and a reference to the defining specification. The - initial values for this registry can be found in Section 9. Adding a - new public-key algorithm MUST be done through the IETF CONSENSUS - method, as described in [RFC2434]. - - - - - -Callas, et al Standards Track [Page 66] - -RFC 4880 OpenPGP Message Format November 2007 - - -10.3.2. Symmetric-Key Algorithms - - OpenPGP specifies a number of symmetric-key algorithms. This - specification creates a registry of symmetric-key algorithm - identifiers. The registry includes the algorithm name, its key sizes - and block size, and a reference to the defining specification. The - initial values for this registry can be found in Section 9. Adding a - new symmetric-key algorithm MUST be done through the IETF CONSENSUS - method, as described in [RFC2434]. - -10.3.3. Hash Algorithms - - OpenPGP specifies a number of hash algorithms. This specification - creates a registry of hash algorithm identifiers. The registry - includes the algorithm name, a text representation of that name, its - block size, an OID hash prefix, and a reference to the defining - specification. The initial values for this registry can be found in - Section 9 for the algorithm identifiers and text names, and Section - 5.2.2 for the OIDs and expanded signature prefixes. Adding a new - hash algorithm MUST be done through the IETF CONSENSUS method, as - described in [RFC2434]. - -10.3.4. Compression Algorithms - - OpenPGP specifies a number of compression algorithms. This - specification creates a registry of compression algorithm - identifiers. The registry includes the algorithm name and a - reference to the defining specification. The initial values for this - registry can be found in Section 9.3. Adding a new compression key - algorithm MUST be done through the IETF CONSENSUS method, as - described in [RFC2434]. - -11. Packet Composition - - OpenPGP packets are assembled into sequences in order to create - messages and to transfer keys. Not all possible packet sequences are - meaningful and correct. This section describes the rules for how - packets should be placed into sequences. - -11.1. Transferable Public Keys - - OpenPGP users may transfer public keys. The essential elements of a - transferable public key are as follows: - - - One Public-Key packet - - - Zero or more revocation signatures - - - - -Callas, et al Standards Track [Page 67] - -RFC 4880 OpenPGP Message Format November 2007 - - - - One or more User ID packets - - - After each User ID packet, zero or more Signature packets - (certifications) - - - Zero or more User Attribute packets - - - After each User Attribute packet, zero or more Signature packets - (certifications) - - - Zero or more Subkey packets - - - After each Subkey packet, one Signature packet, plus optionally a - revocation - - The Public-Key packet occurs first. Each of the following User ID - packets provides the identity of the owner of this public key. If - there are multiple User ID packets, this corresponds to multiple - means of identifying the same unique individual user; for example, a - user may have more than one email address, and construct a User ID - for each one. - - Immediately following each User ID packet, there are zero or more - Signature packets. Each Signature packet is calculated on the - immediately preceding User ID packet and the initial Public-Key - packet. The signature serves to certify the corresponding public key - and User ID. In effect, the signer is testifying to his or her - belief that this public key belongs to the user identified by this - User ID. - - Within the same section as the User ID packets, there are zero or - more User Attribute packets. Like the User ID packets, a User - Attribute packet is followed by zero or more Signature packets - calculated on the immediately preceding User Attribute packet and the - initial Public-Key packet. - - User Attribute packets and User ID packets may be freely intermixed - in this section, so long as the signatures that follow them are - maintained on the proper User Attribute or User ID packet. - - After the User ID packet or Attribute packet, there may be zero or - more Subkey packets. In general, subkeys are provided in cases where - the top-level public key is a signature-only key. However, any V4 - key may have subkeys, and the subkeys may be encryption-only keys, - signature-only keys, or general-purpose keys. V3 keys MUST NOT have - subkeys. - - - - - -Callas, et al Standards Track [Page 68] - -RFC 4880 OpenPGP Message Format November 2007 - - - Each Subkey packet MUST be followed by one Signature packet, which - should be a subkey binding signature issued by the top-level key. - For subkeys that can issue signatures, the subkey binding signature - MUST contain an Embedded Signature subpacket with a primary key - binding signature (0x19) issued by the subkey on the top-level key. - - Subkey and Key packets may each be followed by a revocation Signature - packet to indicate that the key is revoked. Revocation signatures - are only accepted if they are issued by the key itself, or by a key - that is authorized to issue revocations via a Revocation Key - subpacket in a self-signature by the top-level key. - - Transferable public-key packet sequences may be concatenated to allow - transferring multiple public keys in one operation. - -11.2. Transferable Secret Keys - - OpenPGP users may transfer secret keys. The format of a transferable - secret key is the same as a transferable public key except that - secret-key and secret-subkey packets are used instead of the public - key and public-subkey packets. Implementations SHOULD include self- - signatures on any user IDs and subkeys, as this allows for a complete - public key to be automatically extracted from the transferable secret - key. Implementations MAY choose to omit the self-signatures, - especially if a transferable public key accompanies the transferable - secret key. - -11.3. OpenPGP Messages - - An OpenPGP message is a packet or sequence of packets that - corresponds to the following grammatical rules (comma represents - sequential composition, and vertical bar separates alternatives): - - OpenPGP Message :- Encrypted Message | Signed Message | - Compressed Message | Literal Message. - - Compressed Message :- Compressed Data Packet. - - Literal Message :- Literal Data Packet. - - ESK :- Public-Key Encrypted Session Key Packet | - Symmetric-Key Encrypted Session Key Packet. - - ESK Sequence :- ESK | ESK Sequence, ESK. - - Encrypted Data :- Symmetrically Encrypted Data Packet | - Symmetrically Encrypted Integrity Protected Data Packet - - - - -Callas, et al Standards Track [Page 69] - -RFC 4880 OpenPGP Message Format November 2007 - - - Encrypted Message :- Encrypted Data | ESK Sequence, Encrypted Data. - - One-Pass Signed Message :- One-Pass Signature Packet, - OpenPGP Message, Corresponding Signature Packet. - - Signed Message :- Signature Packet, OpenPGP Message | - One-Pass Signed Message. - - In addition, decrypting a Symmetrically Encrypted Data packet or a - Symmetrically Encrypted Integrity Protected Data packet as well as - decompressing a Compressed Data packet must yield a valid OpenPGP - Message. - -11.4. Detached Signatures - - Some OpenPGP applications use so-called "detached signatures". For - example, a program bundle may contain a file, and with it a second - file that is a detached signature of the first file. These detached - signatures are simply a Signature packet stored separately from the - data for which they are a signature. - -12. Enhanced Key Formats - -12.1. Key Structures - - The format of an OpenPGP V3 key is as follows. Entries in square - brackets are optional and ellipses indicate repetition. - - RSA Public Key - [Revocation Self Signature] - User ID [Signature ...] - [User ID [Signature ...] ...] - - Each signature certifies the RSA public key and the preceding User - ID. The RSA public key can have many User IDs and each User ID can - have many signatures. V3 keys are deprecated. Implementations MUST - NOT generate new V3 keys, but MAY continue to use existing ones. - - The format of an OpenPGP V4 key that uses multiple public keys is - similar except that the other keys are added to the end as "subkeys" - of the primary key. - - - - - - - - - - -Callas, et al Standards Track [Page 70] - -RFC 4880 OpenPGP Message Format November 2007 - - - Primary-Key - [Revocation Self Signature] - [Direct Key Signature...] - User ID [Signature ...] - [User ID [Signature ...] ...] - [User Attribute [Signature ...] ...] - [[Subkey [Binding-Signature-Revocation] - Primary-Key-Binding-Signature] ...] - - A subkey always has a single signature after it that is issued using - the primary key to tie the two keys together. This binding signature - may be in either V3 or V4 format, but SHOULD be V4. Subkeys that can - issue signatures MUST have a V4 binding signature due to the REQUIRED - embedded primary key binding signature. - - In the above diagram, if the binding signature of a subkey has been - revoked, the revoked key may be removed, leaving only one key. - - In a V4 key, the primary key MUST be a key capable of certification. - The subkeys may be keys of any other type. There may be other - constructions of V4 keys, too. For example, there may be a single- - key RSA key in V4 format, a DSA primary key with an RSA encryption - key, or RSA primary key with an Elgamal subkey, etc. - - It is also possible to have a signature-only subkey. This permits a - primary key that collects certifications (key signatures), but is - used only for certifying subkeys that are used for encryption and - signatures. - -12.2. Key IDs and Fingerprints - - For a V3 key, the eight-octet Key ID consists of the low 64 bits of - the public modulus of the RSA key. - - The fingerprint of a V3 key is formed by hashing the body (but not - the two-octet length) of the MPIs that form the key material (public - modulus n, followed by exponent e) with MD5. Note that both V3 keys - and MD5 are deprecated. - - A V4 fingerprint is the 160-bit SHA-1 hash of the octet 0x99, - followed by the two-octet packet length, followed by the entire - Public-Key packet starting with the version field. The Key ID is the - low-order 64 bits of the fingerprint. Here are the fields of the - hash material, with the example of a DSA key: - - a.1) 0x99 (1 octet) - - a.2) high-order length octet of (b)-(e) (1 octet) - - - -Callas, et al Standards Track [Page 71] - -RFC 4880 OpenPGP Message Format November 2007 - - - a.3) low-order length octet of (b)-(e) (1 octet) - - b) version number = 4 (1 octet); - - c) timestamp of key creation (4 octets); - - d) algorithm (1 octet): 17 = DSA (example); - - e) Algorithm-specific fields. - - Algorithm-Specific Fields for DSA keys (example): - - e.1) MPI of DSA prime p; - - e.2) MPI of DSA group order q (q is a prime divisor of p-1); - - e.3) MPI of DSA group generator g; - - e.4) MPI of DSA public-key value y (= g**x mod p where x is secret). - - Note that it is possible for there to be collisions of Key IDs -- two - different keys with the same Key ID. Note that there is a much - smaller, but still non-zero, probability that two different keys have - the same fingerprint. - - Also note that if V3 and V4 format keys share the same RSA key - material, they will have different Key IDs as well as different - fingerprints. - - Finally, the Key ID and fingerprint of a subkey are calculated in the - same way as for a primary key, including the 0x99 as the first octet - (even though this is not a valid packet ID for a public subkey). - -13. Notes on Algorithms - -13.1. PKCS#1 Encoding in OpenPGP - - This standard makes use of the PKCS#1 functions EME-PKCS1-v1_5 and - EMSA-PKCS1-v1_5. However, the calling conventions of these functions - has changed in the past. To avoid potential confusion and - interoperability problems, we are including local copies in this - document, adapted from those in PKCS#1 v2.1 [RFC3447]. RFC 3447 - should be treated as the ultimate authority on PKCS#1 for OpenPGP. - Nonetheless, we believe that there is value in having a self- - contained document that avoids problems in the future with needed - changes in the conventions. - - - - - -Callas, et al Standards Track [Page 72] - -RFC 4880 OpenPGP Message Format November 2007 - - -13.1.1. EME-PKCS1-v1_5-ENCODE - - Input: - - k = the length in octets of the key modulus - - M = message to be encoded, an octet string of length mLen, where - mLen <= k - 11 - - Output: - - EM = encoded message, an octet string of length k - - Error: "message too long" - - 1. Length checking: If mLen > k - 11, output "message too long" and - stop. - - 2. Generate an octet string PS of length k - mLen - 3 consisting of - pseudo-randomly generated nonzero octets. The length of PS will - be at least eight octets. - - 3. Concatenate PS, the message M, and other padding to form an - encoded message EM of length k octets as - - EM = 0x00 || 0x02 || PS || 0x00 || M. - - 4. Output EM. - -13.1.2. EME-PKCS1-v1_5-DECODE - - Input: - - EM = encoded message, an octet string - - Output: - - M = message, an octet string - - Error: "decryption error" - - To decode an EME-PKCS1_v1_5 message, separate the encoded message EM - into an octet string PS consisting of nonzero octets and a message M - as follows - - EM = 0x00 || 0x02 || PS || 0x00 || M. - - - - - -Callas, et al Standards Track [Page 73] - -RFC 4880 OpenPGP Message Format November 2007 - - - If the first octet of EM does not have hexadecimal value 0x00, if the - second octet of EM does not have hexadecimal value 0x02, if there is - no octet with hexadecimal value 0x00 to separate PS from M, or if the - length of PS is less than 8 octets, output "decryption error" and - stop. See also the security note in Section 14 regarding differences - in reporting between a decryption error and a padding error. - -13.1.3. EMSA-PKCS1-v1_5 - - This encoding method is deterministic and only has an encoding - operation. - - Option: - - Hash - a hash function in which hLen denotes the length in octets of - the hash function output - - Input: - - M = message to be encoded - - mL = intended length in octets of the encoded message, at least tLen - + 11, where tLen is the octet length of the DER encoding T of a - certain value computed during the encoding operation - - Output: - - EM = encoded message, an octet string of length emLen - - Errors: "message too long"; "intended encoded message length too - short" - - Steps: - - 1. Apply the hash function to the message M to produce a hash value - H: - - H = Hash(M). - - If the hash function outputs "message too long," output "message - too long" and stop. - - 2. Using the list in Section 5.2.2, produce an ASN.1 DER value for - the hash function used. Let T be the full hash prefix from - Section 5.2.2, and let tLen be the length in octets of T. - - 3. If emLen < tLen + 11, output "intended encoded message length - too short" and stop. - - - -Callas, et al Standards Track [Page 74] - -RFC 4880 OpenPGP Message Format November 2007 - - - 4. Generate an octet string PS consisting of emLen - tLen - 3 - octets with hexadecimal value 0xFF. The length of PS will be at - least 8 octets. - - 5. Concatenate PS, the hash prefix T, and other padding to form the - encoded message EM as - - EM = 0x00 || 0x01 || PS || 0x00 || T. - - 6. Output EM. - -13.2. Symmetric Algorithm Preferences - - The symmetric algorithm preference is an ordered list of algorithms - that the keyholder accepts. Since it is found on a self-signature, - it is possible that a keyholder may have multiple, different - preferences. For example, Alice may have TripleDES only specified - for "alice@work.com" but CAST5, Blowfish, and TripleDES specified for - "alice@home.org". Note that it is also possible for preferences to - be in a subkey's binding signature. - - Since TripleDES is the MUST-implement algorithm, if it is not - explicitly in the list, it is tacitly at the end. However, it is - good form to place it there explicitly. Note also that if an - implementation does not implement the preference, then it is - implicitly a TripleDES-only implementation. - - An implementation MUST NOT use a symmetric algorithm that is not in - the recipient's preference list. When encrypting to more than one - recipient, the implementation finds a suitable algorithm by taking - the intersection of the preferences of the recipients. Note that the - MUST-implement algorithm, TripleDES, ensures that the intersection is - not null. The implementation may use any mechanism to pick an - algorithm in the intersection. - - If an implementation can decrypt a message that a keyholder doesn't - have in their preferences, the implementation SHOULD decrypt the - message anyway, but MUST warn the keyholder that the protocol has - been violated. For example, suppose that Alice, above, has software - that implements all algorithms in this specification. Nonetheless, - she prefers subsets for work or home. If she is sent a message - encrypted with IDEA, which is not in her preferences, the software - warns her that someone sent her an IDEA-encrypted message, but it - would ideally decrypt it anyway. - - - - - - - -Callas, et al Standards Track [Page 75] - -RFC 4880 OpenPGP Message Format November 2007 - - -13.3. Other Algorithm Preferences - - Other algorithm preferences work similarly to the symmetric algorithm - preference, in that they specify which algorithms the keyholder - accepts. There are two interesting cases that other comments need to - be made about, though, the compression preferences and the hash - preferences. - -13.3.1. Compression Preferences - - Compression has been an integral part of PGP since its first days. - OpenPGP and all previous versions of PGP have offered compression. - In this specification, the default is for messages to be compressed, - although an implementation is not required to do so. Consequently, - the compression preference gives a way for a keyholder to request - that messages not be compressed, presumably because they are using a - minimal implementation that does not include compression. - Additionally, this gives a keyholder a way to state that it can - support alternate algorithms. - - Like the algorithm preferences, an implementation MUST NOT use an - algorithm that is not in the preference vector. If the preferences - are not present, then they are assumed to be [ZIP(1), - Uncompressed(0)]. - - Additionally, an implementation MUST implement this preference to the - degree of recognizing when to send an uncompressed message. A robust - implementation would satisfy this requirement by looking at the - recipient's preference and acting accordingly. A minimal - implementation can satisfy this requirement by never generating a - compressed message, since all implementations can handle messages - that have not been compressed. - -13.3.2. Hash Algorithm Preferences - - Typically, the choice of a hash algorithm is something the signer - does, rather than the verifier, because a signer rarely knows who is - going to be verifying the signature. This preference, though, allows - a protocol based upon digital signatures ease in negotiation. - - Thus, if Alice is authenticating herself to Bob with a signature, it - makes sense for her to use a hash algorithm that Bob's software uses. - This preference allows Bob to state in his key which algorithms Alice - may use. - - Since SHA1 is the MUST-implement hash algorithm, if it is not - explicitly in the list, it is tacitly at the end. However, it is - good form to place it there explicitly. - - - -Callas, et al Standards Track [Page 76] - -RFC 4880 OpenPGP Message Format November 2007 - - -13.4. Plaintext - - Algorithm 0, "plaintext", may only be used to denote secret keys that - are stored in the clear. Implementations MUST NOT use plaintext in - Symmetrically Encrypted Data packets; they must use Literal Data - packets to encode unencrypted or literal data. - -13.5. RSA - - There are algorithm types for RSA Sign-Only, and RSA Encrypt-Only - keys. These types are deprecated. The "key flags" subpacket in a - signature is a much better way to express the same idea, and - generalizes it to all algorithms. An implementation SHOULD NOT - create such a key, but MAY interpret it. - - An implementation SHOULD NOT implement RSA keys of size less than - 1024 bits. - -13.6. DSA - - An implementation SHOULD NOT implement DSA keys of size less than - 1024 bits. It MUST NOT implement a DSA key with a q size of less - than 160 bits. DSA keys MUST also be a multiple of 64 bits, and the - q size MUST be a multiple of 8 bits. The Digital Signature Standard - (DSS) [FIPS186] specifies that DSA be used in one of the following - ways: - - * 1024-bit key, 160-bit q, SHA-1, SHA-224, SHA-256, SHA-384, or - SHA-512 hash - - * 2048-bit key, 224-bit q, SHA-224, SHA-256, SHA-384, or SHA-512 - hash - - * 2048-bit key, 256-bit q, SHA-256, SHA-384, or SHA-512 hash - - * 3072-bit key, 256-bit q, SHA-256, SHA-384, or SHA-512 hash - - The above key and q size pairs were chosen to best balance the - strength of the key with the strength of the hash. Implementations - SHOULD use one of the above key and q size pairs when generating DSA - keys. If DSS compliance is desired, one of the specified SHA hashes - must be used as well. [FIPS186] is the ultimate authority on DSS, - and should be consulted for all questions of DSS compliance. - - Note that earlier versions of this standard only allowed a 160-bit q - with no truncation allowed, so earlier implementations may not be - able to handle signatures with a different q size or a truncated - hash. - - - -Callas, et al Standards Track [Page 77] - -RFC 4880 OpenPGP Message Format November 2007 - - -13.7. Elgamal - - An implementation SHOULD NOT implement Elgamal keys of size less than - 1024 bits. - -13.8. Reserved Algorithm Numbers - - A number of algorithm IDs have been reserved for algorithms that - would be useful to use in an OpenPGP implementation, yet there are - issues that prevent an implementer from actually implementing the - algorithm. These are marked in Section 9.1, "Public-Key Algorithms", - as "reserved for". - - The reserved public-key algorithms, Elliptic Curve (18), ECDSA (19), - and X9.42 (21), do not have the necessary parameters, parameter - order, or semantics defined. - - Previous versions of OpenPGP permitted Elgamal [ELGAMAL] signatures - with a public-key identifier of 20. These are no longer permitted. - An implementation MUST NOT generate such keys. An implementation - MUST NOT generate Elgamal signatures. See [BLEICHENBACHER]. - -13.9. OpenPGP CFB Mode - - OpenPGP does symmetric encryption using a variant of Cipher Feedback - mode (CFB mode). This section describes the procedure it uses in - detail. This mode is what is used for Symmetrically Encrypted Data - Packets; the mechanism used for encrypting secret-key material is - similar, and is described in the sections above. - - In the description below, the value BS is the block size in octets of - the cipher. Most ciphers have a block size of 8 octets. The AES and - Twofish have a block size of 16 octets. Also note that the - description below assumes that the IV and CFB arrays start with an - index of 1 (unlike the C language, which assumes arrays start with a - zero index). - - OpenPGP CFB mode uses an initialization vector (IV) of all zeros, and - prefixes the plaintext with BS+2 octets of random data, such that - octets BS+1 and BS+2 match octets BS-1 and BS. It does a CFB - resynchronization after encrypting those BS+2 octets. - - Thus, for an algorithm that has a block size of 8 octets (64 bits), - the IV is 10 octets long and octets 7 and 8 of the IV are the same as - octets 9 and 10. For an algorithm with a block size of 16 octets - (128 bits), the IV is 18 octets long, and octets 17 and 18 replicate - octets 15 and 16. Those extra two octets are an easy check for a - correct key. - - - -Callas, et al Standards Track [Page 78] - -RFC 4880 OpenPGP Message Format November 2007 - - - Step by step, here is the procedure: - - 1. The feedback register (FR) is set to the IV, which is all zeros. - - 2. FR is encrypted to produce FRE (FR Encrypted). This is the - encryption of an all-zero value. - - 3. FRE is xored with the first BS octets of random data prefixed to - the plaintext to produce C[1] through C[BS], the first BS octets - of ciphertext. - - 4. FR is loaded with C[1] through C[BS]. - - 5. FR is encrypted to produce FRE, the encryption of the first BS - octets of ciphertext. - - 6. The left two octets of FRE get xored with the next two octets of - data that were prefixed to the plaintext. This produces C[BS+1] - and C[BS+2], the next two octets of ciphertext. - - 7. (The resynchronization step) FR is loaded with C[3] through - C[BS+2]. - - 8. FR is encrypted to produce FRE. - - 9. FRE is xored with the first BS octets of the given plaintext, now - that we have finished encrypting the BS+2 octets of prefixed - data. This produces C[BS+3] through C[BS+(BS+2)], the next BS - octets of ciphertext. - - 10. FR is loaded with C[BS+3] to C[BS + (BS+2)] (which is C11-C18 for - an 8-octet block). - - 11. FR is encrypted to produce FRE. - - 12. FRE is xored with the next BS octets of plaintext, to produce - the next BS octets of ciphertext. These are loaded into FR, and - the process is repeated until the plaintext is used up. - -13.10. Private or Experimental Parameters - - S2K specifiers, Signature subpacket types, user attribute types, - image format types, and algorithms described in Section 9 all reserve - the range 100 to 110 for private and experimental use. Packet types - reserve the range 60 to 63 for private and experimental use. These - are intentionally managed with the PRIVATE USE method, as described - in [RFC2434]. - - - - -Callas, et al Standards Track [Page 79] - -RFC 4880 OpenPGP Message Format November 2007 - - - However, implementations need to be careful with these and promote - them to full IANA-managed parameters when they grow beyond the - original, limited system. - -13.11. Extension of the MDC System - - As described in the non-normative explanation in Section 5.13, the - MDC system is uniquely unparameterized in OpenPGP. This was an - intentional decision to avoid cross-grade attacks. If the MDC system - is extended to a stronger hash function, care must be taken to avoid - downgrade and cross-grade attacks. - - One simple way to do this is to create new packets for a new MDC. - For example, instead of the MDC system using packets 18 and 19, a new - MDC could use 20 and 21. This has obvious drawbacks (it uses two - packet numbers for each new hash function in a space that is limited - to a maximum of 60). - - Another simple way to extend the MDC system is to create new versions - of packet 18, and reflect this in packet 19. For example, suppose - that V2 of packet 18 implicitly used SHA-256. This would require - packet 19 to have a length of 32 octets. The change in the version - in packet 18 and the size of packet 19 prevent a downgrade attack. - - There are two drawbacks to this latter approach. The first is that - using the version number of a packet to carry algorithm information - is not tidy from a protocol-design standpoint. It is possible that - there might be several versions of the MDC system in common use, but - this untidiness would reflect untidiness in cryptographic consensus - about hash function security. The second is that different versions - of packet 19 would have to have unique sizes. If there were two - versions each with 256-bit hashes, they could not both have 32-octet - packet 19s without admitting the chance of a cross-grade attack. - - Yet another, complex approach to extend the MDC system would be a - hybrid of the two above -- create a new pair of MDC packets that are - fully parameterized, and yet protected from downgrade and cross- - grade. - - Any change to the MDC system MUST be done through the IETF CONSENSUS - method, as described in [RFC2434]. - -13.12. Meta-Considerations for Expansion - - If OpenPGP is extended in a way that is not backwards-compatible, - meaning that old implementations will not gracefully handle their - - - - - -Callas, et al Standards Track [Page 80] - -RFC 4880 OpenPGP Message Format November 2007 - - - absence of a new feature, the extension proposal can be declared in - the key holder's self-signature as part of the Features signature - subpacket. - - We cannot state definitively what extensions will not be upwards- - compatible, but typically new algorithms are upwards-compatible, - whereas new packets are not. - - If an extension proposal does not update the Features system, it - SHOULD include an explanation of why this is unnecessary. If the - proposal contains neither an extension to the Features system nor an - explanation of why such an extension is unnecessary, the proposal - SHOULD be rejected. - -14. Security Considerations - - * As with any technology involving cryptography, you should check the - current literature to determine if any algorithms used here have - been found to be vulnerable to attack. - - * This specification uses Public-Key Cryptography technologies. It - is assumed that the private key portion of a public-private key - pair is controlled and secured by the proper party or parties. - - * Certain operations in this specification involve the use of random - numbers. An appropriate entropy source should be used to generate - these numbers (see [RFC4086]). - - * The MD5 hash algorithm has been found to have weaknesses, with - collisions found in a number of cases. MD5 is deprecated for use - in OpenPGP. Implementations MUST NOT generate new signatures using - MD5 as a hash function. They MAY continue to consider old - signatures that used MD5 as valid. - - * SHA-224 and SHA-384 require the same work as SHA-256 and SHA-512, - respectively. In general, there are few reasons to use them - outside of DSS compatibility. You need a situation where one needs - more security than smaller hashes, but does not want to have the - full 256-bit or 512-bit data length. - - * Many security protocol designers think that it is a bad idea to use - a single key for both privacy (encryption) and integrity - (signatures). In fact, this was one of the motivating forces - behind the V4 key format with separate signature and encryption - keys. If you as an implementer promote dual-use keys, you should - at least be aware of this controversy. - - - - - -Callas, et al Standards Track [Page 81] - -RFC 4880 OpenPGP Message Format November 2007 - - - * The DSA algorithm will work with any hash, but is sensitive to the - quality of the hash algorithm. Verifiers should be aware that even - if the signer used a strong hash, an attacker could have modified - the signature to use a weak one. Only signatures using acceptably - strong hash algorithms should be accepted as valid. - - * As OpenPGP combines many different asymmetric, symmetric, and hash - algorithms, each with different measures of strength, care should - be taken that the weakest element of an OpenPGP message is still - sufficiently strong for the purpose at hand. While consensus about - the strength of a given algorithm may evolve, NIST Special - Publication 800-57 [SP800-57] recommends the following list of - equivalent strengths: - - Asymmetric | Hash | Symmetric - key size | size | key size - ------------+--------+----------- - 1024 160 80 - 2048 224 112 - 3072 256 128 - 7680 384 192 - 15360 512 256 - - * There is a somewhat-related potential security problem in - signatures. If an attacker can find a message that hashes to the - same hash with a different algorithm, a bogus signature structure - can be constructed that evaluates correctly. - - For example, suppose Alice DSA signs message M using hash algorithm - H. Suppose that Mallet finds a message M' that has the same hash - value as M with H'. Mallet can then construct a signature block - that verifies as Alice's signature of M' with H'. However, this - would also constitute a weakness in either H or H' or both. Should - this ever occur, a revision will have to be made to this document - to revise the allowed hash algorithms. - - * If you are building an authentication system, the recipient may - specify a preferred signing algorithm. However, the signer would - be foolish to use a weak algorithm simply because the recipient - requests it. - - * Some of the encryption algorithms mentioned in this document have - been analyzed less than others. For example, although CAST5 is - presently considered strong, it has been analyzed less than - TripleDES. Other algorithms may have other controversies - surrounding them. - - - - - -Callas, et al Standards Track [Page 82] - -RFC 4880 OpenPGP Message Format November 2007 - - - * In late summer 2002, Jallad, Katz, and Schneier published an - interesting attack on the OpenPGP protocol and some of its - implementations [JKS02]. In this attack, the attacker modifies a - message and sends it to a user who then returns the erroneously - decrypted message to the attacker. The attacker is thus using the - user as a random oracle, and can often decrypt the message. - - Compressing data can ameliorate this attack. The incorrectly - decrypted data nearly always decompresses in ways that defeat the - attack. However, this is not a rigorous fix, and leaves open some - small vulnerabilities. For example, if an implementation does not - compress a message before encryption (perhaps because it knows it - was already compressed), then that message is vulnerable. Because - of this happenstance -- that modification attacks can be thwarted - by decompression errors -- an implementation SHOULD treat a - decompression error as a security problem, not merely a data - problem. - - This attack can be defeated by the use of Modification Detection, - provided that the implementation does not let the user naively - return the data to the attacker. An implementation MUST treat an - MDC failure as a security problem, not merely a data problem. - - In either case, the implementation MAY allow the user access to the - erroneous data, but MUST warn the user as to potential security - problems should that data be returned to the sender. - - While this attack is somewhat obscure, requiring a special set of - circumstances to create it, it is nonetheless quite serious as it - permits someone to trick a user to decrypt a message. - Consequently, it is important that: - - 1. Implementers treat MDC errors and decompression failures as - security problems. - - 2. Implementers implement Modification Detection with all due - speed and encourage its spread. - - 3. Users migrate to implementations that support Modification - Detection with all due speed. - - * PKCS#1 has been found to be vulnerable to attacks in which a system - that reports errors in padding differently from errors in - decryption becomes a random oracle that can leak the private key in - mere millions of queries. Implementations must be aware of this - attack and prevent it from happening. The simplest solution is to - report a single error code for all variants of decryption errors so - as not to leak information to an attacker. - - - -Callas, et al Standards Track [Page 83] - -RFC 4880 OpenPGP Message Format November 2007 - - - * Some technologies mentioned here may be subject to government - control in some countries. - - * In winter 2005, Serge Mister and Robert Zuccherato from Entrust - released a paper describing a way that the "quick check" in OpenPGP - CFB mode can be used with a random oracle to decrypt two octets of - every cipher block [MZ05]. They recommend as prevention not using - the quick check at all. - - Many implementers have taken this advice to heart for any data that - is symmetrically encrypted and for which the session key is - public-key encrypted. In this case, the quick check is not needed - as the public-key encryption of the session key should guarantee - that it is the right session key. In other cases, the - implementation should use the quick check with care. - - On the one hand, there is a danger to using it if there is a random - oracle that can leak information to an attacker. In plainer - language, there is a danger to using the quick check if timing - information about the check can be exposed to an attacker, - particularly via an automated service that allows rapidly repeated - queries. - - On the other hand, it is inconvenient to the user to be informed - that they typed in the wrong passphrase only after a petabyte of - data is decrypted. There are many cases in cryptographic - engineering where the implementer must use care and wisdom, and - this is one. - -15. Implementation Nits - - This section is a collection of comments to help an implementer, - particularly with an eye to backward compatibility. Previous - implementations of PGP are not OpenPGP compliant. Often the - differences are small, but small differences are frequently more - vexing than large differences. Thus, this is a non-comprehensive - list of potential problems and gotchas for a developer who is trying - to be backward-compatible. - - * The IDEA algorithm is patented, and yet it is required for PGP - 2.x interoperability. It is also the de-facto preferred - algorithm for a V3 key with a V3 self-signature (or no self- - signature). - - * When exporting a private key, PGP 2.x generates the header "BEGIN - PGP SECRET KEY BLOCK" instead of "BEGIN PGP PRIVATE KEY BLOCK". - All previous versions ignore the implied data type, and look - directly at the packet data type. - - - -Callas, et al Standards Track [Page 84] - -RFC 4880 OpenPGP Message Format November 2007 - - - * PGP 2.0 through 2.5 generated V2 Public-Key packets. These are - identical to the deprecated V3 keys except for the version - number. An implementation MUST NOT generate them and may accept - or reject them as it sees fit. Some older PGP versions generated - V2 PKESK packets (Tag 1) as well. An implementation may accept - or reject V2 PKESK packets as it sees fit, and MUST NOT generate - them. - - * PGP 2.6.x will not accept key-material packets with versions - greater than 3. - - * There are many ways possible for two keys to have the same key - material, but different fingerprints (and thus Key IDs). Perhaps - the most interesting is an RSA key that has been "upgraded" to V4 - format, but since a V4 fingerprint is constructed by hashing the - key creation time along with other things, two V4 keys created at - different times, yet with the same key material will have - different fingerprints. - - * If an implementation is using zlib to interoperate with PGP 2.x, - then the "windowBits" parameter should be set to -13. - - * The 0x19 back signatures were not required for signing subkeys - until relatively recently. Consequently, there may be keys in - the wild that do not have these back signatures. Implementing - software may handle these keys as it sees fit. - - * OpenPGP does not put limits on the size of public keys. However, - larger keys are not necessarily better keys. Larger keys take - more computation time to use, and this can quickly become - impractical. Different OpenPGP implementations may also use - different upper bounds for public key sizes, and so care should - be taken when choosing sizes to maintain interoperability. As of - 2007 most implementations have an upper bound of 4096 bits. - - * ASCII armor is an optional feature of OpenPGP. The OpenPGP - working group strives for a minimal set of mandatory-to-implement - features, and since there could be useful implementations that - only use binary object formats, this is not a "MUST" feature for - an implementation. For example, an implementation that is using - OpenPGP as a mechanism for file signatures may find ASCII armor - unnecessary. OpenPGP permits an implementation to declare what - features it does and does not support, but ASCII armor is not one - of these. Since most implementations allow binary and armored - objects to be used indiscriminately, an implementation that does - not implement ASCII armor may find itself with compatibility - issues with general-purpose implementations. Moreover, - implementations of OpenPGP-MIME [RFC3156] already have a - - - -Callas, et al Standards Track [Page 85] - -RFC 4880 OpenPGP Message Format November 2007 - - - requirement for ASCII armor so those implementations will - necessarily have support. - -16. References - -16.1. Normative References - - [AES] NIST, FIPS PUB 197, "Advanced Encryption Standard - (AES)," November 2001. - http://csrc.nist.gov/publications/fips/fips197/fips- - 197.{ps,pdf} - - [BLOWFISH] Schneier, B. "Description of a New Variable-Length - Key, 64-Bit Block Cipher (Blowfish)" Fast Software - Encryption, Cambridge Security Workshop Proceedings - (December 1993), Springer-Verlag, 1994, pp191-204 - - - [BZ2] J. Seward, jseward@acm.org, "The Bzip2 and libbzip2 - home page" - - [ELGAMAL] T. Elgamal, "A Public-Key Cryptosystem and a - Signature Scheme Based on Discrete Logarithms," IEEE - Transactions on Information Theory, v. IT-31, n. 4, - 1985, pp. 469-472. - - [FIPS180] Secure Hash Signature Standard (SHS) (FIPS PUB 180- - 2). - - - [FIPS186] Digital Signature Standard (DSS) (FIPS PUB 186-2). - FIPS 186-3 describes keys - greater than 1024 bits. The latest draft is at: - - - [HAC] Alfred Menezes, Paul van Oorschot, and Scott - Vanstone, "Handbook of Applied Cryptography," CRC - Press, 1996. - - - [IDEA] Lai, X, "On the design and security of block - ciphers", ETH Series in Information Processing, J.L. - Massey (editor), Vol. 1, Hartung-Gorre Verlag - Knostanz, Technische Hochschule (Zurich), 1992 - - - - -Callas, et al Standards Track [Page 86] - -RFC 4880 OpenPGP Message Format November 2007 - - - [ISO10646] ISO/IEC 10646-1:1993. International Standard -- - Information technology -- Universal Multiple-Octet - Coded Character Set (UCS) -- Part 1: Architecture - and Basic Multilingual Plane. - - [JFIF] JPEG File Interchange Format (Version 1.02). Eric - Hamilton, C-Cube Microsystems, Milpitas, CA, - September 1, 1992. - - [RFC1950] Deutsch, P. and J-L. Gailly, "ZLIB Compressed Data - Format Specification version 3.3", RFC 1950, May - 1996. - - [RFC1951] Deutsch, P., "DEFLATE Compressed Data Format - Specification version 1.3", RFC 1951, May 1996. - - [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet - Mail Extensions (MIME) Part One: Format of Internet - Message Bodies", RFC 2045, November 1996 - - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, March 1997. - - [RFC2144] Adams, C., "The CAST-128 Encryption Algorithm", RFC - 2144, May 1997. - - [RFC2434] Narten, T. and H. Alvestrand, "Guidelines for - Writing an IANA Considerations Section in RFCs", BCP - 26, RFC 2434, October 1998. - - [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, - April 2001. - - [RFC3156] Elkins, M., Del Torto, D., Levien, R., and T. - Roessler, "MIME Security with OpenPGP", RFC 3156, - August 2001. - - [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography - Standards (PKCS) #1: RSA Cryptography Specifications - Version 2.1", RFC 3447, February 2003. - - [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO - 10646", STD 63, RFC 3629, November 2003. - - [RFC4086] Eastlake, D., 3rd, Schiller, J., and S. Crocker, - "Randomness Requirements for Security", BCP 106, RFC - 4086, June 2005. - - - - -Callas, et al Standards Track [Page 87] - -RFC 4880 OpenPGP Message Format November 2007 - - - [SCHNEIER] Schneier, B., "Applied Cryptography Second Edition: - protocols, algorithms, and source code in C", 1996. - - [TWOFISH] B. Schneier, J. Kelsey, D. Whiting, D. Wagner, C. - Hall, and N. Ferguson, "The Twofish Encryption - Algorithm", John Wiley & Sons, 1999. - -16.2. Informative References - - [BLEICHENBACHER] Bleichenbacher, Daniel, "Generating Elgamal - signatures without knowing the secret key," - Eurocrypt 96. Note that the version in the - proceedings has an error. A revised version is - available at the time of writing from - - - [JKS02] Kahil Jallad, Jonathan Katz, Bruce Schneier - "Implementation of Chosen-Ciphertext Attacks against - PGP and GnuPG" http://www.counterpane.com/pgp- - attack.html - - [MAURER] Ueli Maurer, "Modelling a Public-Key - Infrastructure", Proc. 1996 European Symposium on - Research in Computer Security (ESORICS' 96), Lecture - Notes in Computer Science, Springer-Verlag, vol. - 1146, pp. 325-350, Sep 1996. - - [MZ05] Serge Mister, Robert Zuccherato, "An Attack on CFB - Mode Encryption As Used By OpenPGP," IACR ePrint - Archive: Report 2005/033, 8 Feb 2005 - http://eprint.iacr.org/2005/033 - - [REGEX] Jeffrey Friedl, "Mastering Regular Expressions," - O'Reilly, ISBN 0-596-00289-0. - - [RFC1423] Balenson, D., "Privacy Enhancement for Internet - Electronic Mail: Part III: Algorithms, Modes, and - Identifiers", RFC 1423, February 1993. - - [RFC1991] Atkins, D., Stallings, W., and P. Zimmermann, "PGP - Message Exchange Formats", RFC 1991, August 1996. - - [RFC2440] Callas, J., Donnerhacke, L., Finney, H., and R. - Thayer, "OpenPGP Message Format", RFC 2440, November - 1998. - - - - - -Callas, et al Standards Track [Page 88] - -RFC 4880 OpenPGP Message Format November 2007 - - - [SP800-57] NIST Special Publication 800-57, Recommendation on - Key Management - - - -Acknowledgements - - This memo also draws on much previous work from a number of other - authors, including: Derek Atkins, Charles Breed, Dave Del Torto, Marc - Dyksterhouse, Gail Haspert, Gene Hoffman, Paul Hoffman, Ben Laurie, - Raph Levien, Colin Plumb, Will Price, David Shaw, William Stallings, - Mark Weaver, and Philip R. Zimmermann. - -Authors' Addresses - - The working group can be contacted via the current chair: - - Derek Atkins - IHTFP Consulting, Inc. - 4 Farragut Ave - Somerville, MA 02144 USA - - EMail: derek@ihtfp.com - Tel: +1 617 623 3745 - - The principal authors of this document are as follows: - - Jon Callas - EMail: jon@callas.org - - Lutz Donnerhacke - IKS GmbH - Wildenbruchstr. 15 - 07745 Jena, Germany - EMail: lutz@iks-jena.de - - Hal Finney - EMail: hal@finney.org - - David Shaw - EMail: dshaw@jabberwocky.com - - Rodney Thayer - EMail: rodney@canola-jones.com - - - - - -Callas, et al Standards Track [Page 89] - -RFC 4880 OpenPGP Message Format November 2007 - - -Full Copyright Statement - - Copyright (C) The IETF Trust (2007). - - This document is subject to the rights, licenses and restrictions - contained in BCP 78, and except as set forth therein, the authors - retain all their rights. - - This document and the information contained herein are provided on an - "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS - OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND - THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF - THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED - WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Intellectual Property - - The IETF takes no position regarding the validity or scope of any - Intellectual Property Rights or other rights that might be claimed to - pertain to the implementation or use of the technology described in - this document or the extent to which any license under such rights - might or might not be available; nor does it represent that it has - made any independent effort to identify any such rights. Information - on the procedures with respect to rights in RFC documents can be - found in BCP 78 and BCP 79. - - Copies of IPR disclosures made to the IETF Secretariat and any - assurances of licenses to be made available, or the result of an - attempt made to obtain a general license or permission for the use of - such proprietary rights by implementers or users of this - specification can be obtained from the IETF on-line IPR repository at - http://www.ietf.org/ipr. - - The IETF invites any interested party to bring to its attention any - copyrights, patents or patent applications, or other proprietary - rights that may cover technology that may be required to implement - this standard. Please address the information to the IETF at - ietf-ipr@ietf.org. - - - - - - - - - - - - -Callas, et al Standards Track [Page 90] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4954.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4954.txt deleted file mode 100644 index 668d7383..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4954.txt +++ /dev/null @@ -1,1123 +0,0 @@ - - - - - - -Network Working Group R. Siemborski, Ed. -Request for Comments: 4954 Google, Inc. -Obsoletes: 2554 A. Melnikov, Ed. -Updates: 3463 Isode Limited -Category: Standards Track July 2007 - - - SMTP Service Extension for Authentication - -Status of This Memo - - This document specifies an Internet standards track protocol for the - Internet community, and requests discussion and suggestions for - improvements. Please refer to the current edition of the "Internet - Official Protocol Standards" (STD 1) for the standardization state - and status of this protocol. Distribution of this memo is unlimited. - -Copyright Notice - - Copyright (C) The IETF Trust (2007). - -Abstract - - This document defines a Simple Mail Transport Protocol (SMTP) - extension whereby an SMTP client may indicate an authentication - mechanism to the server, perform an authentication protocol exchange, - and optionally negotiate a security layer for subsequent protocol - interactions during this session. This extension includes a profile - of the Simple Authentication and Security Layer (SASL) for SMTP. - - This document obsoletes RFC 2554. - - - - - - - - - - - - - - - - - - - - -Siemborski & Melnikov Standards Track [Page 1] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - -Table of Contents - - 1. Introduction ....................................................2 - 2. How to Read This Document .......................................2 - 3. The Authentication Service Extension ............................3 - 4. The AUTH Command ................................................3 - 4.1. Examples ...................................................7 - 5. The AUTH Parameter to the MAIL FROM command .....................9 - 5.1. Examples ..................................................10 - 6. Status Codes ...................................................11 - 7. Additional requirements on servers .............................12 - 8. Formal Syntax ..................................................13 - 9. Security Considerations ........................................14 - 10. IANA Considerations ...........................................15 - 11. Normative References ..........................................15 - 12. Informative References ........................................16 - 13. Acknowledgments ...............................................17 - 14. Additional Requirements When Using SASL PLAIN over TLS ........17 - 15. Changes since RFC 2554 ........................................18 - -1. Introduction - - This document defines a Simple Mail Transport Protocol (SMTP) - extension whereby an SMTP client may indicate an authentication - mechanism to the server, perform an authentication protocol exchange, - optionally negotiate a security layer for subsequent protocol - interactions during this session and, during a mail transaction, - optionally specify a mailbox associated with the identity that - submitted the message to the mail delivery system. - - This extension includes a profile of the Simple Authentication and - Security Layer (SASL) for SMTP. - - When compared to RFC 2554, this document deprecates use of the 538 - response code, adds a new Enhanced Status Code, adds a requirement to - support SASLprep profile for preparing authorization identities, - recommends use of RFC 3848 transmission types in the Received trace - header field, and clarifies interaction with SMTP PIPELINING - [PIPELINING] extension. - -2. How to Read This Document - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", - "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this - document are to be interpreted as described in [KEYWORDS]. - - In examples, "C:" and "S:" indicate lines sent by the client and - server, respectively. - - - -Siemborski & Melnikov Standards Track [Page 2] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - -3. The Authentication Service Extension - - 1. The name of this [SMTP] service extension is "Authentication". - - 2. The EHLO keyword value associated with this extension is "AUTH". - - 3. The AUTH EHLO keyword contains as a parameter a space-separated - list of the names of available [SASL] mechanisms. The list of - available mechanisms MAY change after a successful STARTTLS - command [SMTP-TLS]. - - 4. A new [SMTP] verb "AUTH" is defined. - - 5. An optional parameter using the keyword "AUTH" is added to the - MAIL FROM command, and extends the maximum line length of the - MAIL FROM command by 500 characters. - - 6. This extension is appropriate for the submission protocol - [SUBMIT]. - -4. The AUTH Command - - AUTH mechanism [initial-response] - - Arguments: - mechanism: A string identifying a [SASL] authentication - mechanism. - - initial-response: An optional initial client response. If - present, this response MUST be encoded as described in Section - 4 of [BASE64] or contain a single character "=". - - Restrictions: - After an AUTH command has been successfully completed, no more - AUTH commands may be issued in the same session. After a - successful AUTH command completes, a server MUST reject any - further AUTH commands with a 503 reply. - - The AUTH command is not permitted during a mail transaction. - An AUTH command issued during a mail transaction MUST be - rejected with a 503 reply. - - Discussion: - The AUTH command initiates a [SASL] authentication exchange - between the client and the server. The client identifies the - SASL mechanism to use with the first parameter of the AUTH - command. If the server supports the requested authentication - mechanism, it performs the SASL exchange to authenticate the - - - -Siemborski & Melnikov Standards Track [Page 3] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - user. Optionally, it also negotiates a security layer for - subsequent protocol interactions during this session. If the - requested authentication mechanism is invalid (e.g., is not - supported or requires an encryption layer), the server rejects - the AUTH command with a 504 reply. If the server supports the - [ESMTP-CODES] extension, it SHOULD return a 5.5.4 enhanced - response code. - - The SASL authentication exchange consists of a series of - server challenges and client responses that are specific to - the chosen [SASL] mechanism. - - A server challenge is sent as a 334 reply with the text part - containing the [BASE64] encoded string supplied by the SASL - mechanism. This challenge MUST NOT contain any text other - than the BASE64 encoded challenge. - - A client response consists of a line containing a [BASE64] - encoded string. If the client wishes to cancel the - authentication exchange, it issues a line with a single "*". - If the server receives such a response, it MUST reject the - AUTH command by sending a 501 reply. - - The optional initial response argument to the AUTH command is - used to save a round-trip when using authentication mechanisms - that support an initial client response. If the initial - response argument is omitted and the chosen mechanism requires - an initial client response, the server MUST proceed as defined - in Section 5.1 of [SASL]. In SMTP, a server challenge that - contains no data is defined as a 334 reply with no text part. - Note that there is still a space following the reply code, so - the complete response line is "334 ". - - Note that the AUTH command is still subject to the line length - limitations defined in [SMTP]. If use of the initial response - argument would cause the AUTH command to exceed this length, - the client MUST NOT use the initial response parameter (and - instead proceed as defined in Section 5.1 of [SASL]). - - If the client is transmitting an initial response of zero - length, it MUST instead transmit the response as a single - equals sign ("="). This indicates that the response is - present, but contains no data. - - If the client uses an initial-response argument to the AUTH - command with a SASL mechanism in which the client does not - begin the authentication exchange, the server MUST reject the - - - - -Siemborski & Melnikov Standards Track [Page 4] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - AUTH command with a 501 reply. Servers using the enhanced - status codes extension [ESMTP-CODES] SHOULD return an enhanced - status code of 5.7.0 in this case. - - If the server cannot [BASE64] decode any client response, it - MUST reject the AUTH command with a 501 reply (and an enhanced - status code of 5.5.2). If the client cannot BASE64 decode any - of the server's challenges, it MUST cancel the authentication - using the "*" response. In particular, servers and clients - MUST reject (and not ignore) any character not explicitly - allowed by the BASE64 alphabet, and MUST reject any sequence - of BASE64 characters that contains the pad character ('=') - anywhere other than the end of the string (e.g., "=AAA" and - "AAA=BBB" are not allowed). - - Note that these [BASE64] strings can be much longer than - normal SMTP commands. Clients and servers MUST be able to - handle the maximum encoded size of challenges and responses - generated by their supported authentication mechanisms. This - requirement is independent of any line length limitations the - client or server may have in other parts of its protocol - implementation. (At the time of writing of this document, - 12288 octets is considered to be a sufficient line length - limit for handling of deployed authentication mechanisms.) - If, during an authentication exchange, the server receives a - line that is longer than the server's authentication buffer, - the server fails the AUTH command with the 500 reply. Servers - using the enhanced status codes extension [ESMTP-CODES] SHOULD - return an enhanced status code of 5.5.6 in this case. - - The authorization identity generated by this [SASL] exchange - is a "simple username" (in the sense defined in [SASLprep]), - and both client and server SHOULD (*) use the [SASLprep] - profile of the [StringPrep] algorithm to prepare these names - for transmission or comparison. If preparation of the - authorization identity fails or results in an empty string - (unless it was transmitted as the empty string), the server - MUST fail the authentication. - - (*) Note: Future revision of this specification may change this - requirement to MUST. Currently, the SHOULD is used in order to - avoid breaking the majority of existing implementations. - - If the server is unable to authenticate the client, it SHOULD reject - the AUTH command with a 535 reply unless a more specific error code - is appropriate. Should the client successfully complete the - exchange, the SMTP server issues a 235 reply. (Note that the SMTP - protocol doesn't support the SASL feature of returning additional - - - -Siemborski & Melnikov Standards Track [Page 5] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - data with a successful outcome.) These status codes, along with - others defined by this extension, are discussed in Section 6 of this - document. - - If a security layer is negotiated during the SASL exchange, it takes - effect for the client on the octet immediately following the CRLF - that concludes the last response generated by the client. For the - server, it takes effect immediately following the CRLF of its success - reply. - - When a security layer takes effect, the SMTP protocol is reset to the - initial state (the state in SMTP after a server issues a 220 service - ready greeting). The server MUST discard any knowledge obtained from - the client, such as the EHLO argument, which was not obtained from - the SASL negotiation itself. Likewise, the client MUST discard any - knowledge obtained from the server, such as the list of SMTP service - extensions, which was not obtained from the SASL negotiation itself. - (Note that a client MAY compare the advertised SASL mechanisms before - and after authentication in order to detect an active down- - negotiation attack). - - The client SHOULD send an EHLO command as the first command after a - successful SASL negotiation that results in the enabling of a - security layer. - - When an entity (whether it is the client or the server end) is - sending data, and both [TLS] and SASL security layers are in effect, - the TLS encoding MUST be applied after the SASL encoding, regardless - of the order in which the layers were negotiated. - - The service name specified by this protocol's profile of SASL is - "smtp". This service name is also to be used for the [SUBMIT] - protocol. - - If an AUTH command fails, the client MAY proceed without - authentication. Alternatively, the client MAY try another - authentication mechanism or present different credentials by issuing - another AUTH - - Note: A server implementation MUST implement a configuration in which - it does NOT permit any plaintext password mechanisms, unless either - the STARTTLS [SMTP-TLS] command has been negotiated or some other - mechanism that protects the session from password snooping has been - provided. Server sites SHOULD NOT use any configuration which - permits a plaintext password mechanism without such a protection - mechanism against password snooping. - - - - - -Siemborski & Melnikov Standards Track [Page 6] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - To ensure interoperability, client and server implementations of this - extension MUST implement the [PLAIN] SASL mechanism running over TLS - [TLS] [SMTP-TLS]. See also Section 15 for additional requirements on - implementations of [PLAIN] over [TLS]. - - Note that many existing client and server implementations implement - CRAM-MD5 [CRAM-MD5] SASL mechanism. In order to ensure - interoperability with deployed software, new implementations MAY - implement it; however, implementations should be aware that this SASL - mechanism doesn't provide any server authentication. Note that at - the time of writing of this document the SASL Working Group is - working on several replacement SASL mechanisms that provide server - authentication and other features. - - When the AUTH command is used together with the [PIPELINING] - extension, it MUST be the last command in a pipelined group of - commands. The only exception to this rule is when the AUTH command - contains an initial response for a SASL mechanism that allows the - client to send data first, the SASL mechanism is known to complete in - one round-trip, and a security layer is not negotiated by the client. - Two examples of such SASL mechanisms are PLAIN [PLAIN] and EXTERNAL - [SASL]. - -4.1. Examples - - Here is an example of a client attempting AUTH using the [PLAIN] SASL - mechanism under a TLS layer, and making use of the initial client - response: - - S: 220-smtp.example.com ESMTP Server - C: EHLO client.example.com - S: 250-smtp.example.com Hello client.example.com - S: 250-AUTH GSSAPI DIGEST-MD5 - S: 250-ENHANCEDSTATUSCODES - S: 250 STARTTLS - C: STARTTLS - S: 220 Ready to start TLS - ... TLS negotiation proceeds, further commands - protected by TLS layer ... - C: EHLO client.example.com - S: 250-smtp.example.com Hello client.example.com - S: 250 AUTH GSSAPI DIGEST-MD5 PLAIN - C: AUTH PLAIN dGVzdAB0ZXN0ADEyMzQ= - S: 235 2.7.0 Authentication successful - - Here is another client that is attempting AUTH PLAIN under a TLS - layer, this time without the initial response. Parts of the - negotiation before the TLS layer was established have been omitted: - - - -Siemborski & Melnikov Standards Track [Page 7] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - ... TLS negotiation proceeds, further commands - protected by TLS layer ... - C: EHLO client.example.com - S: 250-smtp.example.com Hello client.example.com - S: 250 AUTH GSSAPI DIGEST-MD5 PLAIN - C: AUTH PLAIN - (note: there is a single space following the 334 - on the following line) - S: 334 - C: dGVzdAB0ZXN0ADEyMzQ= - S: 235 2.7.0 Authentication successful - - Here is an example using CRAM-MD5 [CRAM-MD5], a mechanism in which - the client does not begin the authentication exchange, and includes a - server challenge: - - S: 220-smtp.example.com ESMTP Server - C: EHLO client.example.com - S: 250-smtp.example.com Hello client.example.com - S: 250-AUTH DIGEST-MD5 CRAM-MD5 - S: 250-ENHANCEDSTATUSCODES - S: 250 STARTTLS - C: AUTH CRAM-MD5 - S: 334 PDQxOTI5NDIzNDEuMTI4Mjg0NzJAc291cmNlZm91ci5hbmRyZXcuY211LmVk - dT4= - C: cmpzMyBlYzNhNTlmZWQzOTVhYmExZWM2MzY3YzRmNGI0MWFjMA== - S: 235 2.7.0 Authentication successful - - Here is an example of a client attempting AUTH EXTERNAL under TLS, - using the derived authorization ID (and thus a zero-length initial - client response). - - S: 220-smtp.example.com ESMTP Server - C: EHLO client.example.com - S: 250-smtp.example.com Hello client.example.com - S: 250-AUTH GSSAPI DIGEST-MD5 - S: 250-ENHANCEDSTATUSCODES - S: 250 STARTTLS - C: STARTTLS - S: 220 Ready to start TLS - ... TLS negotiation proceeds, further commands - protected by TLS layer ... - C: EHLO client.example.com - S: 250-smtp.example.com Hello client.example.com - S: 250 AUTH EXTERNAL GSSAPI DIGEST-MD5 PLAIN - C: AUTH EXTERNAL = - S: 235 2.7.0 Authentication successful - - - - -Siemborski & Melnikov Standards Track [Page 8] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - -5. The AUTH Parameter to the MAIL FROM command - - AUTH=mailbox - - Arguments: - A (see Section 4.1.2 of [SMTP]) that is associated - with the identity that submitted the message to the delivery - system, or the two character sequence "<>" indicating such an - identity is unknown or insufficiently authenticated. To comply - with restrictions imposed on ESMTP parameters, the is - encoded inside an xtext. The syntax of an xtext is described in - Section 4 of [ESMTP-DSN]. - - Note: - For the purposes of this discussion, "authenticated identity" - refers to the identity (if any) derived from the authorization - identity of previous AUTH command, while the terms "authorized - identity" and "supplied " refer to the sender identity - that is being associated with a particular message. Note that - one authenticated identity may be able to identify messages as - being sent by any number of authorized identities within a - single session. For example, this may be the case when an SMTP - server (one authenticated identity) is processing its queue - (many messages with distinct authorized identities). - - Discussion: - The optional AUTH parameter to the MAIL FROM command allows - cooperating agents in a trusted environment to communicate the - authorization identity associated with individual messages. - - If the server trusts the authenticated identity of the client to - assert that the message was originally submitted by the supplied - , then the server SHOULD supply the same in - an AUTH parameter when relaying the message to any other server - which supports the AUTH extension. - - For this reason, servers that advertise support for this - extension MUST support the AUTH parameter to the MAIL FROM - command even when the client has not authenticated itself to the - server. - - A MAIL FROM parameter of AUTH=<> indicates that the original - submitter of the message is not known. The server MUST NOT - treat the message as having been originally submitted by the - authenticated identity that resulted from the AUTH command. - - - - - - -Siemborski & Melnikov Standards Track [Page 9] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - If the AUTH parameter to the MAIL FROM command is not supplied, - the client has authenticated, and the server believes the - message is an original submission, the server MAY generate a - from the user's authenticated identity for use in an - AUTH parameter when relaying the message to any server which - supports the AUTH extension. The generated is - implementation specific, but it MUST conform to the syntax of - [SMTP]. If the implementation cannot generate a valid - , it MUST transmit AUTH=<> when relaying this message. - - If the server does not sufficiently trust the authenticated - identity of the client, or if the client is not authenticated, - then the server MUST behave as if the AUTH=<> parameter was - supplied. The server MAY, however, write the value of any - supplied AUTH parameter to a log file. - - If an AUTH=<> parameter was supplied, either explicitly or due - to the requirement in the previous paragraph, then the server - MUST supply the AUTH=<> parameter when relaying the message to - any server which it has authenticated to using the AUTH - extension. - - A server MAY treat expansion of a mailing list as a new - submission, setting the AUTH parameter to the mailing list - address or mailing list administration address when relaying the - message to list subscribers. - - Note that an implementation which is hard-coded to treat all - clients as being insufficiently trusted is compliant with this - specification. In that case, the implementation does nothing - more than parse and discard syntactically valid AUTH parameters - to the MAIL FROM command, and supply AUTH=<> parameters to any - servers that it authenticates to. - -5.1. Examples - - An example where the original identity of the sender is trusted and - known: - - C: MAIL FROM: AUTH=e+3Dmc2@example.com - S: 250 OK - - One example where the identity of the sender is not trusted or is - otherwise being suppressed by the client: - - C: MAIL FROM: AUTH=<> - S: 250 OK - - - - -Siemborski & Melnikov Standards Track [Page 10] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - -6. Status Codes - - The following error codes may be used to indicate various success or - failure conditions. Servers that return enhanced status codes - [ESMTP-CODES] SHOULD use the enhanced codes suggested here. - - 235 2.7.0 Authentication Succeeded - - This response to the AUTH command indicates that the authentication - was successful. - - 432 4.7.12 A password transition is needed - - This response to the AUTH command indicates that the user needs to - transition to the selected authentication mechanism. This is - typically done by authenticating once using the [PLAIN] - authentication mechanism. The selected mechanism SHOULD then work - for authentications in subsequent sessions. - - 454 4.7.0 Temporary authentication failure - - This response to the AUTH command indicates that the authentication - failed due to a temporary server failure. The client SHOULD NOT - prompt the user for another password in this case, and should instead - notify the user of server failure. - - 534 5.7.9 Authentication mechanism is too weak - - This response to the AUTH command indicates that the selected - authentication mechanism is weaker than server policy permits for - that user. The client SHOULD retry with a new authentication - mechanism. - - 535 5.7.8 Authentication credentials invalid - - This response to the AUTH command indicates that the authentication - failed due to invalid or insufficient authentication credentials. In - this case, the client SHOULD ask the user to supply new credentials - (such as by presenting a password dialog box). - - 500 5.5.6 Authentication Exchange line is too long - - This response to the AUTH command indicates that the authentication - failed due to the client sending a [BASE64] response that is longer - than the maximum buffer size available for the currently selected - SASL mechanism. - - - - - -Siemborski & Melnikov Standards Track [Page 11] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - 530 5.7.0 Authentication required - - This response SHOULD be returned by any command other than AUTH, - EHLO, HELO, NOOP, RSET, or QUIT when server policy requires - authentication in order to perform the requested action and - authentication is not currently in force. - - 538 5.7.11 Encryption required for requested authentication - mechanism - - This response to the AUTH command indicates that the selected - authentication mechanism may only be used when the underlying SMTP - connection is encrypted. Note that this response code is documented - here for historical purposes only. Modern implementations SHOULD NOT - advertise mechanisms that are not permitted due to lack of - encryption, unless an encryption layer of sufficient strength is - currently being employed. - - This document adds several new enhanced status codes to the list - defined in [ENHANCED]: - - The following 3 Enhanced Status Codes were defined above: - - 5.7.8 Authentication credentials invalid - 5.7.9 Authentication mechanism is too weak - 5.7.11 Encryption required for requested authentication mechanism - - X.5.6 Authentication Exchange line is too long - - This enhanced status code SHOULD be returned when the server fails - the AUTH command due to the client sending a [BASE64] response which - is longer than the maximum buffer size available for the currently - selected SASL mechanism. This is useful for both permanent and - persistent transient errors. - -7. Additional Requirements on Servers - - As described in Section 4.4 of [SMTP], an SMTP server that receives a - message for delivery or further processing MUST insert the - "Received:" header field at the beginning of the message content. - This document places additional requirements on the content of a - generated "Received:" header field. Upon successful authentication, - a server SHOULD use the "ESMTPA" or the "ESMTPSA" [SMTP-TT] (when - appropriate) keyword in the "with" clause of the Received header - field. - - - - - - -Siemborski & Melnikov Standards Track [Page 12] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - -8. Formal Syntax - - The following syntax specification uses the Augmented Backus-Naur - Form notation as specified in [ABNF]. Non-terminals referenced but - not defined below are as defined by [ABNF] or [SASL]. The non- - terminal is defined in [SMTP]. - - Except as noted otherwise, all alphabetic characters are case- - insensitive. The use of upper or lower case characters to define - token strings is for editorial clarity only. Implementations MUST - accept these strings in a case-insensitive fashion. - - hexchar = "+" HEXDIG HEXDIG - - xchar = %x21-2A / %x2C-3C / %x3E-7E - ;; US-ASCII except for "+", "=", SP, and CTL - - xtext = *(xchar / hexchar) - ;; non-US-ASCII is only allowed as hexchar - - auth-command = "AUTH" SP sasl-mech [SP initial-response] - *(CRLF [base64]) [CRLF cancel-response] - CRLF - ;; is defined in [SASL] - - auth-param = "AUTH=" xtext - ;; Parameter to the MAIL FROM command. - ;; This non-terminal complies with - ;; syntax defined by esmtp-param [SMTP]. - ;; - ;; The decoded form of the xtext MUST be - ;; either a or the two - ;; characters "<>" - - base64 = base64-terminal / - ( 1*(4base64-char) [base64-terminal] ) - - base64-char = ALPHA / DIGIT / "+" / "/" - ;; Case-sensitive - - base64-terminal = (2base64-char "==") / (3base64-char "=") - - continue-req = "334" SP [base64] CRLF - ;; Intermediate response to the AUTH - ;; command. - ;; This non-terminal complies with - ;; syntax defined by Reply-line [SMTP]. - - - - -Siemborski & Melnikov Standards Track [Page 13] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - initial-response= base64 / "=" - - cancel-response = "*" - -9. Security Considerations - - Security issues are discussed throughout this memo. - - If a client uses this extension to get an encrypted tunnel through an - insecure network to a cooperating server, it needs to be configured - to never send mail to that server when the connection is not mutually - authenticated and encrypted. Otherwise, an attacker could steal the - client's mail by hijacking the [SMTP] connection and either - pretending the server does not support the Authentication extension - or causing all AUTH commands to fail. - - Before the [SASL] negotiation has begun, any protocol interactions - are performed in the clear and may be modified by an active attacker. - For this reason, clients and servers MUST discard any knowledge - obtained prior to the start of the SASL negotiation upon the - establishment of a security layer. - - This mechanism does not protect the TCP port, so an active attacker - may redirect a relay connection attempt (i.e., a connection between - two Mail Transfer Agents (MTAs)) to the submission port [SUBMIT]. - The AUTH=<> parameter prevents such an attack from causing a relayed - message and, in the absence of other envelope authentication, from - picking up the authentication of the relay client. - - A message submission client may require the user to authenticate - whenever a suitable [SASL] mechanism is advertised. Therefore, it - may not be desirable for a submission server [SUBMIT] to advertise a - SASL mechanism when use of that mechanism grants the clients no - benefits over anonymous submission. - - Servers MAY implement a policy whereby the connection is dropped - after a number of failed authentication attempts. If they do so, - they SHOULD NOT drop the connection until at least 3 attempts to - authenticate have failed. - - If an implementation supports SASL mechanisms that are vulnerable to - passive eavesdropping attacks (such as [PLAIN]), then the - implementation MUST support at least one configuration where these - SASL mechanisms are not advertised or used without the presence of an - external security layer such as [TLS]. - - - - - - -Siemborski & Melnikov Standards Track [Page 14] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - This extension is not intended to replace or be used instead of end- - to-end message signature and encryption systems such as [S/MIME] or - [PGP]. This extension addresses a different problem than end-to-end - systems; it has the following key differences: - - 1. It is generally useful only within a trusted enclave. - - 2. It protects the entire envelope of a message, not just the - message's body. - - 3. It authenticates the message submission, not authorship of the - message content. - - 4. When mutual authentication is used along with a security layer, - it can give the sender some assurance that the message was - successfully delivered to the next hop. - - Additional security considerations are mentioned in the [SASL] - specification. Additional security considerations specific to a - particular SASL mechanism are described in the relevant - specification. Additional security considerations for [PLAIN] over - [TLS] are mentioned in Section 15 of this document. - -10. IANA Considerations - - IANA updated the entry for the "smtp" SASL protocol name to point at - this document. - - IANA updated the registration of the Authentication SMTP service - extension as defined in Section 3 of this document. This registry is - currently located at . - -11. Normative References - - [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax - Specifications: ABNF", RFC 4234, October 2005. - - [BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data - Encodings", RFC 4648, October 2006. - - [ESMTP-CODES] Freed, N., "SMTP Service Extension for Returning - Enhanced Error Codes", RFC 2034, October 1996. - - [ENHANCED] Vaudreuil, G., "Enhanced Mail System Status Codes", RFC - 3463, January 2003. - - - - - -Siemborski & Melnikov Standards Track [Page 15] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - [ESMTP-DSN] Moore, K., "Simple Mail Transfer Protocol (SMTP) - Service Extension Delivery Status Notifications - (DSNs)", RFC 3461, January 2003. - - [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, March 1997. - - [SASL] Melnikov, A. and K. Zeilenga, "Simple Authentication - and Security Layer (SASL)", RFC 4422, June 2006. - - [SASLprep] Zeilenga, K., "SASLprep: Stringprep Profile for User - Names and Passwords", RFC 4013, February 2005. - - [SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 2821, - April 2001. - - [SMTP-TLS] Hoffman, P., "SMTP Service Extension for Secure SMTP - over Transport Layer Security", RFC 3207, February - 2002. - - [StringPrep] Hoffman, P. and M. Blanchet, "Preparation of - Internationalized Strings ("stringprep")", RFC 3454, - December 2002. - - [SUBMIT] Gellens, R. and J. Klensin, "Message Submission for - Mail", RFC 4409, April 2006. - - [SMTP-TT] Newman, C., "ESMTP and LMTP Transmission Types - Registration", RFC 3848, July 2004. - - [PLAIN] Zeilenga, K., Ed., "The PLAIN Simple Authentication and - Security Layer (SASL) Mechanism", RFC 4616, August - 2006. - - [X509] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet - X.509 Public Key Infrastructure Certificate and - Certificate Revocation List (CRL) Profile", RFC 3280, - April 2002. - -12. Informative References - - [PGP] Elkins, M., "MIME Security with Pretty Good Privacy - (PGP)", RFC 2015, October 1996. - - [S/MIME] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail - Extensions (S/MIME) Version 3.1 Message Specification", - RFC 3851, July 2004. - - - - -Siemborski & Melnikov Standards Track [Page 16] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - [TLS] Dierks, T. and E. Rescorla, "The Transport Layer - Security (TLS) Protocol Version 1.1", RFC 4346, April - 2006. - - [PIPELINING] Freed, N., "SMTP Service Extension for Command - Pipelining", STD 60, RFC 2920, September 2000. - - [CRAM-MD5] Klensin, J., Catoe, R., and P. Krumviede, "IMAP/POP - AUTHorize Extension for Simple Challenge/Response", RFC - 2195, September 1997. - -13. Acknowledgments - - The editors would like to acknowledge the contributions of John Myers - and other contributors to RFC 2554, on which this document draws from - heavily. - - The editors would also like to thank Ken Murchison, Mark Crispin, - Chris Newman, David Wilson, Dave Cridland, Frank Ellermann, Ned - Freed, John Klensin, Tony Finch, Abhijit Menon-Sen, Philip Guenther, - Sam Hartman, Russ Housley, Cullen Jennings, and Lisa Dusseault for - the time they devoted to reviewing of this document and/or for the - comments received. - -14. Additional Requirements When Using SASL PLAIN over TLS - - This section is normative for SMTP implementations that support SASL - [PLAIN] over [TLS]. - - If an SMTP client is willing to use SASL PLAIN over TLS to - authenticate to the SMTP server, the client verifies the server - certificate according to the rules of [X509]. If the server has not - provided any certificate, or if the certificate verification fails, - the client MUST NOT attempt to authenticate using the SASL PLAIN - mechanism. - - After a successful [TLS] negotiation, the client MUST check its - understanding of the server hostname against the server's identity as - presented in the server Certificate message, in order to prevent - man-in-the-middle attacks. If the match fails, the client MUST NOT - attempt to authenticate using the SASL PLAIN mechanism. Matching is - performed according to the following rules: - - The client MUST use the server hostname it used to open the - connection as the value to compare against the server name as - expressed in the server certificate. The client MUST NOT use - - - - - -Siemborski & Melnikov Standards Track [Page 17] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - any form of the server hostname derived from an insecure remote - source (e.g., insecure DNS lookup). CNAME canonicalization is - not done. - - If a subjectAltName extension of type dNSName is present in the - certificate, it SHOULD be used as the source of the server's - identity. - - Matching is case-insensitive. - - A "*" wildcard character MAY be used as the leftmost name - component in the certificate. For example, *.example.com would - match a.example.com, foo.example.com, etc., but would not match - example.com. - - If the certificate contains multiple names (e.g., more than one - dNSName field), then a match with any one of the fields is - considered acceptable. - -15. Changes since RFC 2554 - - 1. Clarified that servers MUST support the use of the AUTH=mailbox - parameter to MAIL FROM, even when the client is not - authenticated. - - 2. Clarified the initial-client-send requirements, and give - additional examples. - - 3. Updated references to newer versions of various specifications. - - 4. Required SASL PLAIN (over TLS) as mandatory-to-implement. - - 5. Clarified that the mechanism list can change. - - 6. Deprecated the use of the 538 response code. - - 7. Added the use of the SASLprep profile for preparing authorization - identities. - - 8. Substantial cleanup of response codes and indicated suggested - enhanced response codes. Also indicated what response codes - should result in a client prompting the user for new credentials. - - 9. Updated ABNF section to use RFC 4234. - - 10. Clarified interaction with SMTP PIPELINING extension. - - 11. Added a reference to RFC 3848. - - - -Siemborski & Melnikov Standards Track [Page 18] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - - 12. Added a new Enhanced Status Code for "authentication line too - long" case. - - 13. Other general editorial clarifications. - -Editors' Addresses - - Robert Siemborski - Google, Inc. - 1600 Ampitheatre Parkway - Mountain View, CA 94043, USA - - Phone: +1 650 623 6925 - EMail: robsiemb@google.com - - - Alexey Melnikov - Isode Limited - 5 Castle Business Village, 36 Station Road, - Hampton, Middlesex, TW12 2BX, UK - - EMail: Alexey.Melnikov@isode.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Siemborski & Melnikov Standards Track [Page 19] - -RFC 4954 SMTP Service Extension for Authentication July 2007 - - -Full Copyright Statement - - Copyright (C) The IETF Trust (2007). - - This document is subject to the rights, licenses and restrictions - contained in BCP 78, and except as set forth therein, the authors - retain all their rights. - - This document and the information contained herein are provided on an - "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS - OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND - THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF - THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED - WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Intellectual Property - - The IETF takes no position regarding the validity or scope of any - Intellectual Property Rights or other rights that might be claimed to - pertain to the implementation or use of the technology described in - this document or the extent to which any license under such rights - might or might not be available; nor does it represent that it has - made any independent effort to identify any such rights. Information - on the procedures with respect to rights in RFC documents can be - found in BCP 78 and BCP 79. - - Copies of IPR disclosures made to the IETF Secretariat and any - assurances of licenses to be made available, or the result of an - attempt made to obtain a general license or permission for the use of - such proprietary rights by implementers or users of this - specification can be obtained from the IETF on-line IPR repository at - http://www.ietf.org/ipr. - - The IETF invites any interested party to bring to its attention any - copyrights, patents or patent applications, or other proprietary - rights that may cover technology that may be required to implement - this standard. Please address the information to the IETF at - ietf-ipr@ietf.org. - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - -Siemborski & Melnikov Standards Track [Page 20] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc5751.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc5751.txt deleted file mode 100644 index 8d1dd218..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc5751.txt +++ /dev/null @@ -1,2523 +0,0 @@ - - - - - - -Internet Engineering Task Force (IETF) B. Ramsdell -Request for Comments: 5751 Brute Squad Labs -Obsoletes: 3851 S. Turner -Category: Standards Track IECA -ISSN: 2070-1721 January 2010 - - - Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 - Message Specification - -Abstract - - This document defines Secure/Multipurpose Internet Mail Extensions - (S/MIME) version 3.2. S/MIME provides a consistent way to send and - receive secure MIME data. Digital signatures provide authentication, - message integrity, and non-repudiation with proof of origin. - Encryption provides data confidentiality. Compression can be used to - reduce data size. This document obsoletes RFC 3851. - -Status of This Memo - - This is an Internet Standards Track document. - - This document is a product of the Internet Engineering Task Force - (IETF). It represents the consensus of the IETF community. It has - received public review and has been approved for publication by - the Internet Engineering Steering Group (IESG). Further - information on Internet Standards is available in Section 2 of - RFC 5741. - - Information about the current status of this document, any - errata, and how to provide feedback on it may be obtained at - http://www.rfc-editor.org/info/rfc5751. - - - - - - - - - - - - - - - - - - -Ramsdell & Turner Standards Track [Page 1] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -Copyright Notice - - Copyright (c) 2010 IETF Trust and the persons identified as the - document authors. All rights reserved. - - This document is subject to BCP 78 and the IETF Trust's Legal - Provisions Relating to IETF Documents - (http://trustee.ietf.org/license-info) in effect on the date of - publication of this document. Please review these documents - carefully, as they describe your rights and restrictions with respect - to this document. Code Components extracted from this document must - include Simplified BSD License text as described in Section 4.e of - the Trust Legal Provisions and are provided without warranty as - described in the Simplified BSD License. - - This document may contain material from IETF Documents or IETF - Contributions published or made publicly available before November - 10, 2008. The person(s) controlling the copyright in some of this - material may not have granted the IETF Trust the right to allow - modifications of such material outside the IETF Standards Process. - Without obtaining an adequate license from the person(s) controlling - the copyright in such materials, this document may not be modified - outside the IETF Standards Process, and derivative works of it may - not be created outside the IETF Standards Process, except to format - it for publication as an RFC or to translate it into languages other - than English. - - - - - - - - - - - - - - - - - - - - - - - - - -Ramsdell & Turner Standards Track [Page 2] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -Table of Contents - - 1. Introduction ....................................................4 - 1.1. Specification Overview .....................................4 - 1.2. Definitions ................................................5 - 1.3. Conventions Used in This Document ..........................6 - 1.4. Compatibility with Prior Practice of S/MIME ................7 - 1.5. Changes from S/MIME v3 to S/MIME v3.1 ......................7 - 1.6. Changes since S/MIME v3.1 ..................................7 - 2. CMS Options .....................................................9 - 2.1. DigestAlgorithmIdentifier ..................................9 - 2.2. SignatureAlgorithmIdentifier ...............................9 - 2.3. KeyEncryptionAlgorithmIdentifier ..........................10 - 2.4. General Syntax ............................................11 - 2.5. Attributes and the SignerInfo Type ........................12 - 2.6. SignerIdentifier SignerInfo Type ..........................16 - 2.7. ContentEncryptionAlgorithmIdentifier ......................16 - 3. Creating S/MIME Messages .......................................18 - 3.1. Preparing the MIME Entity for Signing, Enveloping, - or Compressing ............................................19 - 3.2. The application/pkcs7-mime Media Type .....................23 - 3.3. Creating an Enveloped-Only Message ........................25 - 3.4. Creating a Signed-Only Message ............................26 - 3.5. Creating a Compressed-Only Message ........................30 - 3.6. Multiple Operations .......................................30 - 3.7. Creating a Certificate Management Message .................31 - 3.8. Registration Requests .....................................32 - 3.9. Identifying an S/MIME Message .............................32 - 4. Certificate Processing .........................................32 - 4.1. Key Pair Generation .......................................33 - 4.2. Signature Generation ......................................33 - 4.3. Signature Verification ....................................34 - 4.4. Encryption ................................................34 - 4.5. Decryption ................................................34 - 5. IANA Considerations ............................................34 - 5.1. Media Type for application/pkcs7-mime .....................34 - 5.2. Media Type for application/pkcs7-signature ................35 - 6. Security Considerations ........................................36 - 7. References .....................................................38 - 7.1. Reference Conventions .....................................38 - 7.2. Normative References ......................................39 - 7.3. Informative References ....................................41 - Appendix A. ASN.1 Module ..........................................43 - Appendix B. Moving S/MIME v2 Message Specification to Historic - Status ................................................45 - Appendix C. Acknowledgments .......................................45 - - - - - -Ramsdell & Turner Standards Track [Page 3] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -1. Introduction - - S/MIME (Secure/Multipurpose Internet Mail Extensions) provides a - consistent way to send and receive secure MIME data. Based on the - popular Internet MIME standard, S/MIME provides the following - cryptographic security services for electronic messaging - applications: authentication, message integrity and non-repudiation - of origin (using digital signatures), and data confidentiality (using - encryption). As a supplementary service, S/MIME provides for message - compression. - - S/MIME can be used by traditional mail user agents (MUAs) to add - cryptographic security services to mail that is sent, and to - interpret cryptographic security services in mail that is received. - However, S/MIME is not restricted to mail; it can be used with any - transport mechanism that transports MIME data, such as HTTP or SIP. - As such, S/MIME takes advantage of the object-based features of MIME - and allows secure messages to be exchanged in mixed-transport - systems. - - Further, S/MIME can be used in automated message transfer agents that - use cryptographic security services that do not require any human - intervention, such as the signing of software-generated documents and - the encryption of FAX messages sent over the Internet. - -1.1. Specification Overview - - This document describes a protocol for adding cryptographic signature - and encryption services to MIME data. The MIME standard [MIME-SPEC] - provides a general structure for the content of Internet messages and - allows extensions for new content-type-based applications. - - This specification defines how to create a MIME body part that has - been cryptographically enhanced according to the Cryptographic - Message Syntax (CMS) RFC 5652 [CMS], which is derived from PKCS #7 - [PKCS-7]. This specification also defines the application/pkcs7-mime - media type that can be used to transport those body parts. - - This document also discusses how to use the multipart/signed media - type defined in [MIME-SECURE] to transport S/MIME signed messages. - multipart/signed is used in conjunction with the application/pkcs7- - signature media type, which is used to transport a detached S/MIME - signature. - - - - - - - - -Ramsdell & Turner Standards Track [Page 4] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - In order to create S/MIME messages, an S/MIME agent MUST follow the - specifications in this document, as well as the specifications listed - in the Cryptographic Message Syntax document [CMS], [CMSALG], - [RSAPSS], [RSAOAEP], and [CMS-SHA2]. - - Throughout this specification, there are requirements and - recommendations made for how receiving agents handle incoming - messages. There are separate requirements and recommendations for - how sending agents create outgoing messages. In general, the best - strategy is to "be liberal in what you receive and conservative in - what you send". Most of the requirements are placed on the handling - of incoming messages, while the recommendations are mostly on the - creation of outgoing messages. - - The separation for requirements on receiving agents and sending - agents also derives from the likelihood that there will be S/MIME - systems that involve software other than traditional Internet mail - clients. S/MIME can be used with any system that transports MIME - data. An automated process that sends an encrypted message might not - be able to receive an encrypted message at all, for example. Thus, - the requirements and recommendations for the two types of agents are - listed separately when appropriate. - -1.2. Definitions - - For the purposes of this specification, the following definitions - apply. - - ASN.1: Abstract Syntax Notation One, as defined in ITU-T - Recommendation X.680 [X.680]. - - BER: Basic Encoding Rules for ASN.1, as defined in ITU- - T Recommendation X.690 [X.690]. - - Certificate: A type that binds an entity's name to a public key - with a digital signature. - - DER: Distinguished Encoding Rules for ASN.1, as defined - in ITU-T Recommendation X.690 [X.690]. - - 7-bit data: Text data with lines less than 998 characters - long, where none of the characters have the 8th - bit set, and there are no NULL characters. - and occur only as part of a end-of- - line delimiter. - - - - - - -Ramsdell & Turner Standards Track [Page 5] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - 8-bit data: Text data with lines less than 998 characters, and - where none of the characters are NULL characters. - and occur only as part of a - end-of-line delimiter. - - Binary data: Arbitrary data. - - Transfer encoding: A reversible transformation made on data so 8-bit - or binary data can be sent via a channel that only - transmits 7-bit data. - - Receiving agent: Software that interprets and processes S/MIME CMS - objects, MIME body parts that contain CMS content - types, or both. - - Sending agent: Software that creates S/MIME CMS content types, - MIME body parts that contain CMS content types, or - both. - - S/MIME agent: User software that is a receiving agent, a sending - agent, or both. - -1.3. Conventions Used in This Document - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", - "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this - document are to be interpreted as described in [MUSTSHOULD]. - - We define some additional terms here: - - SHOULD+ This term means the same as SHOULD. However, the authors - expect that a requirement marked as SHOULD+ will be - promoted at some future time to be a MUST. - - SHOULD- This term means the same as SHOULD. However, the authors - expect that a requirement marked as SHOULD- will be demoted - to a MAY in a future version of this document. - - MUST- This term means the same as MUST. However, the authors - expect that this requirement will no longer be a MUST in a - future document. Although its status will be determined at - a later time, it is reasonable to expect that if a future - revision of a document alters the status of a MUST- - requirement, it will remain at least a SHOULD or a SHOULD-. - - - - - - - -Ramsdell & Turner Standards Track [Page 6] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -1.4. Compatibility with Prior Practice of S/MIME - - S/MIME version 3.2 agents ought to attempt to have the greatest - interoperability possible with agents for prior versions of S/MIME. - S/MIME version 2 is described in RFC 2311 through RFC 2315 inclusive - [SMIMEv2], S/MIME version 3 is described in RFC 2630 through RFC 2634 - inclusive and RFC 5035 [SMIMEv3], and S/MIME version 3.1 is described - in RFC 3850, RFC 3851, RFC 3852, RFC 2634, and RFC 5035 [SMIMEv3.1]. - RFC 2311 also has historical information about the development of - S/MIME. - -1.5. Changes from S/MIME v3 to S/MIME v3.1 - - The RSA public key algorithm was changed to a MUST implement key - wrapping algorithm, and the Diffie-Hellman (DH) algorithm changed to - a SHOULD implement. - - The AES symmetric encryption algorithm has been included as a SHOULD - implement. - - The RSA public key algorithm was changed to a MUST implement - signature algorithm. - - Ambiguous language about the use of "empty" SignedData messages to - transmit certificates was clarified to reflect that transmission of - Certificate Revocation Lists is also allowed. - - The use of binary encoding for some MIME entities is now explicitly - discussed. - - Header protection through the use of the message/rfc822 media type - has been added. - - Use of the CompressedData CMS type is allowed, along with required - media type and file extension additions. - -1.6. Changes since S/MIME v3.1 - - Editorial changes, e.g., replaced "MIME type" with "media type", - content-type with Content-Type. - - Moved "Conventions Used in This Document" to Section 1.3. Added - definitions for SHOULD+, SHOULD-, and MUST-. - - Section 1.1 and Appendix A: Added references to RFCs for RSASSA-PSS, - RSAES-OAEP, and SHA2 CMS algorithms. Added CMS Multiple Signers - Clarification to CMS reference. - - - - -Ramsdell & Turner Standards Track [Page 7] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Section 1.2: Updated references to ASN.1 to X.680 and BER and DER to - X.690. - - Section 1.4: Added references to S/MIME MSG 3.1 RFCs. - - Section 2.1 (digest algorithm): SHA-256 added as MUST, SHA-1 and MD5 - made SHOULD-. - - Section 2.2 (signature algorithms): RSA with SHA-256 added as MUST, - and DSA with SHA-256 added as SHOULD+, RSA with SHA-1, DSA with - SHA-1, and RSA with MD5 changed to SHOULD-, and RSASSA-PSS with - SHA-256 added as SHOULD+. Also added note about what S/MIME v3.1 - clients support. - - Section 2.3 (key encryption): DH changed to SHOULD-, and RSAES-OAEP - added as SHOULD+. Elaborated requirements for key wrap algorithm. - - Section 2.5.1: Added requirement that receiving agents MUST support - both GeneralizedTime and UTCTime. - - Section 2.5.2: Replaced reference "sha1WithRSAEncryption" with - "sha256WithRSAEncryption", "DES-3EDE-CBC" with "AES-128 CBC", and - deleted the RC5 example. - - Section 2.5.2.1: Deleted entire section (discussed deprecated RC2). - - Section 2.7, 2.7.1, Appendix A: references to RC2/40 removed. - - Section 2.7 (content encryption): AES-128 CBC added as MUST, AES-192 - and AES-256 CBC SHOULD+, tripleDES now SHOULD-. - - Section 2.7.1: Updated pointers from 2.7.2.1 through 2.7.2.4 to - 2.7.1.1 to 2.7.1.2. - - Section 3.1.1: Removed text about MIME character sets. - - Section 3.2.2 and 3.6: Replaced "encrypted" with "enveloped". Update - OID example to use AES-128 CBC oid. - - Section 3.4.3.2: Replace micalg parameter for SHA-1 with sha-1. - - Section 4: Updated reference to CERT v3.2. - - Section 4.1: Updated RSA and DSA key size discussion. Moved last - four sentences to security considerations. Updated reference to - randomness requirements for security. - - - - - -Ramsdell & Turner Standards Track [Page 8] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Section 5: Added IANA registration templates to update media type - registry to point to this document as opposed to RFC 2311. - - Section 6: Updated security considerations. - - Section 7: Moved references from Appendix B to this section. Updated - references. Added informational references to SMIMEv2, SMIMEv3, and - SMIMEv3.1. - - Appendix B: Added Appendix B to move S/MIME v2 to Historic status. - -2. CMS Options - - CMS allows for a wide variety of options in content, attributes, and - algorithm support. This section puts forth a number of support - requirements and recommendations in order to achieve a base level of - interoperability among all S/MIME implementations. [CMSALG] and - [CMS-SHA2] provides additional details regarding the use of the - cryptographic algorithms. [ESS] provides additional details - regarding the use of additional attributes. - -2.1. DigestAlgorithmIdentifier - - Sending and receiving agents MUST support SHA-256 [CMS-SHA2] and - SHOULD- support SHA-1 [CMSALG]. Receiving agents SHOULD- support MD5 - [CMSALG] for the purpose of providing backward compatibility with - MD5-digested S/MIME v2 SignedData objects. - -2.2. SignatureAlgorithmIdentifier - - Receiving agents: - - - MUST support RSA with SHA-256. - - - SHOULD+ support DSA with SHA-256. - - - SHOULD+ support RSASSA-PSS with SHA-256. - - - SHOULD- support RSA with SHA-1. - - - SHOULD- support DSA with SHA-1. - - - SHOULD- support RSA with MD5. - - - - - - - - -Ramsdell & Turner Standards Track [Page 9] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Sending agents: - - - MUST support RSA with SHA-256. - - - SHOULD+ support DSA with SHA-256. - - - SHOULD+ support RSASSA-PSS with SHA-256. - - - SHOULD- support RSA with SHA-1 or DSA with SHA-1. - - - SHOULD- support RSA with MD5. - - See Section 4.1 for information on key size and algorithm references. - - Note that S/MIME v3.1 clients support verifying id-dsa-with-sha1 and - rsaEncryption and might not implement sha256withRSAEncryption. Note - that S/MIME v3 clients might only implement signing or signature - verification using id-dsa-with-sha1, and might also use id-dsa as an - AlgorithmIdentifier in this field. Receiving clients SHOULD - recognize id-dsa as equivalent to id-dsa-with-sha1, and sending - clients MUST use id-dsa-with-sha1 if using that algorithm. Also note - that S/MIME v2 clients are only required to verify digital signatures - using the rsaEncryption algorithm with SHA-1 or MD5, and might not - implement id-dsa-with-sha1 or id-dsa at all. - -2.3. KeyEncryptionAlgorithmIdentifier - - Receiving and sending agents: - - - MUST support RSA Encryption, as specified in [CMSALG]. - - - SHOULD+ support RSAES-OAEP, as specified in [RSAOAEP]. - - - SHOULD- support DH ephemeral-static mode, as specified in - [CMSALG] and [SP800-57]. - - When DH ephemeral-static is used, a key wrap algorithm is also - specified in the KeyEncryptionAlgorithmIdentifier [CMS]. The - underlying encryption functions for the key wrap and content - encryption algorithm ([CMSALG] and [CMSAES]) and the key sizes for - the two algorithms MUST be the same (e.g., AES-128 key wrap algorithm - with AES-128 content encryption algorithm). As AES-128 CBC is the - mandatory-to-implement content encryption algorithm, the AES-128 key - wrap algorithm MUST also be supported when DH ephemeral-static is - used. - - - - - - -Ramsdell & Turner Standards Track [Page 10] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Note that S/MIME v3.1 clients might only implement key encryption and - decryption using the rsaEncryption algorithm. Note that S/MIME v3 - clients might only implement key encryption and decryption using the - Diffie-Hellman algorithm. Also note that S/MIME v2 clients are only - capable of decrypting content-encryption keys using the rsaEncryption - algorithm. - -2.4. General Syntax - - There are several CMS content types. Of these, only the Data, - SignedData, EnvelopedData, and CompressedData content types are - currently used for S/MIME. - -2.4.1. Data Content Type - - Sending agents MUST use the id-data content type identifier to - identify the "inner" MIME message content. For example, when - applying a digital signature to MIME data, the CMS SignedData - encapContentInfo eContentType MUST include the id-data object - identifier and the media type MUST be stored in the SignedData - encapContentInfo eContent OCTET STRING (unless the sending agent is - using multipart/signed, in which case the eContent is absent, per - Section 3.4.3 of this document). As another example, when applying - encryption to MIME data, the CMS EnvelopedData encryptedContentInfo - contentType MUST include the id-data object identifier and the - encrypted MIME content MUST be stored in the EnvelopedData - encryptedContentInfo encryptedContent OCTET STRING. - -2.4.2. SignedData Content Type - - Sending agents MUST use the SignedData content type to apply a - digital signature to a message or, in a degenerate case where there - is no signature information, to convey certificates. Applying a - signature to a message provides authentication, message integrity, - and non-repudiation of origin. - -2.4.3. EnvelopedData Content Type - - This content type is used to apply data confidentiality to a message. - A sender needs to have access to a public key for each intended - message recipient to use this service. - -2.4.4. CompressedData Content Type - - This content type is used to apply data compression to a message. - This content type does not provide authentication, message integrity, - non-repudiation, or data confidentiality, and is only used to reduce - the message's size. - - - -Ramsdell & Turner Standards Track [Page 11] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - See Section 3.6 for further guidance on the use of this type in - conjunction with other CMS types. - -2.5. Attributes and the SignerInfo Type - - The SignerInfo type allows the inclusion of unsigned and signed - attributes along with a signature. - - Receiving agents MUST be able to handle zero or one instance of each - of the signed attributes listed here. Sending agents SHOULD generate - one instance of each of the following signed attributes in each - S/MIME message: - - - Signing Time (section (Section 2.5.1 in this document) - - - SMIME Capabilities (section (Section 2.5.2 in this document) - - - Encryption Key Preference (section (Section 2.5.3 in this - document) - - - Message Digest (section (Section 11.2 in [CMS]) - - - Content Type (section (Section 11.1 in [CMS]) - - Further, receiving agents SHOULD be able to handle zero or one - instance of the signingCertificate and signingCertificatev2 signed - attributes, as defined in Section 5 of RFC 2634 [ESS] and Section 3 - of RFC 5035 [ESS]. - - Sending agents SHOULD generate one instance of the signingCertificate - or signingCertificatev2 signed attribute in each SignerInfo - structure. - - Additional attributes and values for these attributes might be - defined in the future. Receiving agents SHOULD handle attributes or - values that they do not recognize in a graceful manner. - - Interactive sending agents that include signed attributes that are - not listed here SHOULD display those attributes to the user, so that - the user is aware of all of the data being signed. - -2.5.1. Signing Time Attribute - - The signing-time attribute is used to convey the time that a message - was signed. The time of signing will most likely be created by a - message originator and therefore is only as trustworthy as the - originator. - - - - -Ramsdell & Turner Standards Track [Page 12] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Sending agents MUST encode signing time through the year 2049 as - UTCTime; signing times in 2050 or later MUST be encoded as - GeneralizedTime. When the UTCTime CHOICE is used, S/MIME agents MUST - interpret the year field (YY) as follows: - - If YY is greater than or equal to 50, the year is interpreted as - 19YY; if YY is less than 50, the year is interpreted as 20YY. - - Receiving agents MUST be able to process signing-time attributes that - are encoded in either UTCTime or GeneralizedTime. - -2.5.2. SMIME Capabilities Attribute - - The SMIMECapabilities attribute includes signature algorithms (such - as "sha256WithRSAEncryption"), symmetric algorithms (such as "AES-128 - CBC"), and key encipherment algorithms (such as "rsaEncryption"). - There are also several identifiers that indicate support for other - optional features such as binary encoding and compression. The - SMIMECapabilities were designed to be flexible and extensible so - that, in the future, a means of identifying other capabilities and - preferences such as certificates can be added in a way that will not - cause current clients to break. - - If present, the SMIMECapabilities attribute MUST be a - SignedAttribute; it MUST NOT be an UnsignedAttribute. CMS defines - SignedAttributes as a SET OF Attribute. The SignedAttributes in a - signerInfo MUST NOT include multiple instances of the - SMIMECapabilities attribute. CMS defines the ASN.1 syntax for - Attribute to include attrValues SET OF AttributeValue. A - SMIMECapabilities attribute MUST only include a single instance of - AttributeValue. There MUST NOT be zero or multiple instances of - AttributeValue present in the attrValues SET OF AttributeValue. - - The semantics of the SMIMECapabilities attribute specify a partial - list as to what the client announcing the SMIMECapabilities can - support. A client does not have to list every capability it - supports, and need not list all its capabilities so that the - capabilities list doesn't get too long. In an SMIMECapabilities - attribute, the object identifiers (OIDs) are listed in order of their - preference, but SHOULD be separated logically along the lines of - their categories (signature algorithms, symmetric algorithms, key - encipherment algorithms, etc.). - - The structure of the SMIMECapabilities attribute is to facilitate - simple table lookups and binary comparisons in order to determine - matches. For instance, the DER-encoding for the SMIMECapability for - AES-128 CBC MUST be identically encoded regardless of the - implementation. Because of the requirement for identical encoding, - - - -Ramsdell & Turner Standards Track [Page 13] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - individuals documenting algorithms to be used in the - SMIMECapabilities attribute SHOULD explicitly document the correct - byte sequence for the common cases. - - For any capability, the associated parameters for the OID MUST - specify all of the parameters necessary to differentiate between two - instances of the same algorithm. - - The OIDs that correspond to algorithms SHOULD use the same OID as the - actual algorithm, except in the case where the algorithm usage is - ambiguous from the OID. For instance, in an earlier specification, - rsaEncryption was ambiguous because it could refer to either a - signature algorithm or a key encipherment algorithm. In the event - that an OID is ambiguous, it needs to be arbitrated by the maintainer - of the registered SMIMECapabilities list as to which type of - algorithm will use the OID, and a new OID MUST be allocated under the - smimeCapabilities OID to satisfy the other use of the OID. - - The registered SMIMECapabilities list specifies the parameters for - OIDs that need them, most notably key lengths in the case of - variable-length symmetric ciphers. In the event that there are no - differentiating parameters for a particular OID, the parameters MUST - be omitted, and MUST NOT be encoded as NULL. Additional values for - the SMIMECapabilities attribute might be defined in the future. - Receiving agents MUST handle a SMIMECapabilities object that has - values that it does not recognize in a graceful manner. - - Section 2.7.1 explains a strategy for caching capabilities. - -2.5.3. Encryption Key Preference Attribute - - The encryption key preference attribute allows the signer to - unambiguously describe which of the signer's certificates has the - signer's preferred encryption key. This attribute is designed to - enhance behavior for interoperating with those clients that use - separate keys for encryption and signing. This attribute is used to - convey to anyone viewing the attribute which of the listed - certificates is appropriate for encrypting a session key for future - encrypted messages. - - If present, the SMIMEEncryptionKeyPreference attribute MUST be a - SignedAttribute; it MUST NOT be an UnsignedAttribute. CMS defines - SignedAttributes as a SET OF Attribute. The SignedAttributes in a - signerInfo MUST NOT include multiple instances of the - SMIMEEncryptionKeyPreference attribute. CMS defines the ASN.1 syntax - for Attribute to include attrValues SET OF AttributeValue. A - SMIMEEncryptionKeyPreference attribute MUST only include a single - - - - -Ramsdell & Turner Standards Track [Page 14] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - instance of AttributeValue. There MUST NOT be zero or multiple - instances of AttributeValue present in the attrValues SET OF - AttributeValue. - - The sending agent SHOULD include the referenced certificate in the - set of certificates included in the signed message if this attribute - is used. The certificate MAY be omitted if it has been previously - made available to the receiving agent. Sending agents SHOULD use - this attribute if the commonly used or preferred encryption - certificate is not the same as the certificate used to sign the - message. - - Receiving agents SHOULD store the preference data if the signature on - the message is valid and the signing time is greater than the - currently stored value. (As with the SMIMECapabilities, the clock - skew SHOULD be checked and the data not used if the skew is too - great.) Receiving agents SHOULD respect the sender's encryption key - preference attribute if possible. This, however, represents only a - preference and the receiving agent can use any certificate in - replying to the sender that is valid. - - Section 2.7.1 explains a strategy for caching preference data. - -2.5.3.1. Selection of Recipient Key Management Certificate - - In order to determine the key management certificate to be used when - sending a future CMS EnvelopedData message for a particular - recipient, the following steps SHOULD be followed: - - - If an SMIMEEncryptionKeyPreference attribute is found in a - SignedData object received from the desired recipient, this - identifies the X.509 certificate that SHOULD be used as the X.509 - key management certificate for the recipient. - - - If an SMIMEEncryptionKeyPreference attribute is not found in a - SignedData object received from the desired recipient, the set of - X.509 certificates SHOULD be searched for a X.509 certificate with - the same subject name as the signer of a X.509 certificate that can - be used for key management. - - - Or use some other method of determining the user's key management - key. If a X.509 key management certificate is not found, then - encryption cannot be done with the signer of the message. If - multiple X.509 key management certificates are found, the S/MIME - agent can make an arbitrary choice between them. - - - - - - -Ramsdell & Turner Standards Track [Page 15] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -2.6. SignerIdentifier SignerInfo Type - - S/MIME v3.2 implementations MUST support both issuerAndSerialNumber - and subjectKeyIdentifier. Messages that use the subjectKeyIdentifier - choice cannot be read by S/MIME v2 clients. - - It is important to understand that some certificates use a value for - subjectKeyIdentifier that is not suitable for uniquely identifying a - certificate. Implementations MUST be prepared for multiple - certificates for potentially different entities to have the same - value for subjectKeyIdentifier, and MUST be prepared to try each - matching certificate during signature verification before indicating - an error condition. - -2.7. ContentEncryptionAlgorithmIdentifier - - Sending and receiving agents: - - - MUST support encryption and decryption with AES-128 CBC - [CMSAES]. - - - SHOULD+ support encryption and decryption with AES-192 CBC and - AES-256 CBC [CMSAES]. - - - SHOULD- support encryption and decryption with DES EDE3 CBC, - hereinafter called "tripleDES" [CMSALG]. - -2.7.1. Deciding Which Encryption Method to Use - - When a sending agent creates an encrypted message, it has to decide - which type of encryption to use. The decision process involves using - information garnered from the capabilities lists included in messages - received from the recipient, as well as out-of-band information such - as private agreements, user preferences, legal restrictions, and so - on. - - Section 2.5.2 defines a method by which a sending agent can - optionally announce, among other things, its decrypting capabilities - in its order of preference. The following method for processing and - remembering the encryption capabilities attribute in incoming signed - messages SHOULD be used. - - - If the receiving agent has not yet created a list of - capabilities for the sender's public key, then, after verifying - the signature on the incoming message and checking the - timestamp, the receiving agent SHOULD create a new list - containing at least the signing time and the symmetric - capabilities. - - - -Ramsdell & Turner Standards Track [Page 16] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - - If such a list already exists, the receiving agent SHOULD verify - that the signing time in the incoming message is greater than - the signing time stored in the list and that the signature is - valid. If so, the receiving agent SHOULD update both the - signing time and capabilities in the list. Values of the - signing time that lie far in the future (that is, a greater - discrepancy than any reasonable clock skew), or a capabilities - list in messages whose signature could not be verified, MUST NOT - be accepted. - - The list of capabilities SHOULD be stored for future use in creating - messages. - - Before sending a message, the sending agent MUST decide whether it is - willing to use weak encryption for the particular data in the - message. If the sending agent decides that weak encryption is - unacceptable for this data, then the sending agent MUST NOT use a - weak algorithm. The decision to use or not use weak encryption - overrides any other decision in this section about which encryption - algorithm to use. - - Sections 2.7.1.1 through 2.7.1.2 describe the decisions a sending - agent SHOULD use in deciding which type of encryption will be applied - to a message. These rules are ordered, so the sending agent SHOULD - make its decision in the order given. - -2.7.1.1. Rule 1: Known Capabilities - - If the sending agent has received a set of capabilities from the - recipient for the message the agent is about to encrypt, then the - sending agent SHOULD use that information by selecting the first - capability in the list (that is, the capability most preferred by the - intended recipient) that the sending agent knows how to encrypt. The - sending agent SHOULD use one of the capabilities in the list if the - agent reasonably expects the recipient to be able to decrypt the - message. - -2.7.1.2. Rule 2: Unknown Capabilities, Unknown Version of S/MIME - - If the following two conditions are met: - - - the sending agent has no knowledge of the encryption - capabilities of the recipient, and - - - the sending agent has no knowledge of the version of S/MIME of - the recipient, - - - - - -Ramsdell & Turner Standards Track [Page 17] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - then the sending agent SHOULD use AES-128 because it is a stronger - algorithm and is required by S/MIME v3.2. If the sending agent - chooses not to use AES-128 in this step, it SHOULD use tripleDES. - -2.7.2. Choosing Weak Encryption - - All algorithms that use 40-bit keys are considered by many to be weak - encryption. A sending agent that is controlled by a human SHOULD - allow a human sender to determine the risks of sending data using a - weak encryption algorithm before sending the data, and possibly allow - the human to use a stronger encryption method such as tripleDES or - AES. - -2.7.3. Multiple Recipients - - If a sending agent is composing an encrypted message to a group of - recipients where the encryption capabilities of some of the - recipients do not overlap, the sending agent is forced to send more - than one message. Please note that if the sending agent chooses to - send a message encrypted with a strong algorithm, and then send the - same message encrypted with a weak algorithm, someone watching the - communications channel could learn the contents of the strongly - encrypted message simply by decrypting the weakly encrypted message. - -3. Creating S/MIME Messages - - This section describes the S/MIME message formats and how they are - created. S/MIME messages are a combination of MIME bodies and CMS - content types. Several media types as well as several CMS content - types are used. The data to be secured is always a canonical MIME - entity. The MIME entity and other data, such as certificates and - algorithm identifiers, are given to CMS processing facilities that - produce a CMS object. Finally, the CMS object is wrapped in MIME. - The Enhanced Security Services for S/MIME [ESS] document provides - descriptions of how nested, secured S/MIME messages are formatted. - ESS provides a description of how a triple-wrapped S/MIME message is - formatted using multipart/signed and application/pkcs7-mime for the - signatures. - - S/MIME provides one format for enveloped-only data, several formats - for signed-only data, and several formats for signed and enveloped - data. Several formats are required to accommodate several - environments, in particular for signed messages. The criteria for - choosing among these formats are also described. - - The reader of this section is expected to understand MIME as - described in [MIME-SPEC] and [MIME-SECURE]. - - - - -Ramsdell & Turner Standards Track [Page 18] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -3.1. Preparing the MIME Entity for Signing, Enveloping, or Compressing - - S/MIME is used to secure MIME entities. A MIME entity can be a sub- - part, sub-parts of a message, or the whole message with all its sub- - parts. A MIME entity that is the whole message includes only the - MIME message headers and MIME body, and does not include the RFC-822 - header. Note that S/MIME can also be used to secure MIME entities - used in applications other than Internet mail. If protection of the - RFC-822 header is required, the use of the message/rfc822 media type - is explained later in this section. - - The MIME entity that is secured and described in this section can be - thought of as the "inside" MIME entity. That is, it is the - "innermost" object in what is possibly a larger MIME message. - Processing "outside" MIME entities into CMS content types is - described in Sections 3.2, 3.4, and elsewhere. - - The procedure for preparing a MIME entity is given in [MIME-SPEC]. - The same procedure is used here with some additional restrictions - when signing. The description of the procedures from [MIME-SPEC] is - repeated here, but it is suggested that the reader refer to that - document for the exact procedure. This section also describes - additional requirements. - - A single procedure is used for creating MIME entities that are to - have any combination of signing, enveloping, and compressing applied. - Some additional steps are recommended to defend against known - corruptions that can occur during mail transport that are of - particular importance for clear-signing using the multipart/signed - format. It is recommended that these additional steps be performed - on enveloped messages, or signed and enveloped messages, so that the - message can be forwarded to any environment without modification. - - These steps are descriptive rather than prescriptive. The - implementer is free to use any procedure as long as the result is the - same. - - Step 1. The MIME entity is prepared according to the local - conventions. - - Step 2. The leaf parts of the MIME entity are converted to canonical - form. - - Step 3. Appropriate transfer encoding is applied to the leaves of - the MIME entity. - - - - - - -Ramsdell & Turner Standards Track [Page 19] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - When an S/MIME message is received, the security services on the - message are processed, and the result is the MIME entity. That MIME - entity is typically passed to a MIME-capable user agent where it is - further decoded and presented to the user or receiving application. - - In order to protect outer, non-content-related message header fields - (for instance, the "Subject", "To", "From", and "Cc" fields), the - sending client MAY wrap a full MIME message in a message/rfc822 - wrapper in order to apply S/MIME security services to these header - fields. It is up to the receiving client to decide how to present - this "inner" header along with the unprotected "outer" header. - - When an S/MIME message is received, if the top-level protected MIME - entity has a Content-Type of message/rfc822, it can be assumed that - the intent was to provide header protection. This entity SHOULD be - presented as the top-level message, taking into account header - merging issues as previously discussed. - -3.1.1. Canonicalization - - Each MIME entity MUST be converted to a canonical form that is - uniquely and unambiguously representable in the environment where the - signature is created and the environment where the signature will be - verified. MIME entities MUST be canonicalized for enveloping and - compressing as well as signing. - - The exact details of canonicalization depend on the actual media type - and subtype of an entity, and are not described here. Instead, the - standard for the particular media type SHOULD be consulted. For - example, canonicalization of type text/plain is different from - canonicalization of audio/basic. Other than text types, most types - have only one representation regardless of computing platform or - environment that can be considered their canonical representation. - In general, canonicalization will be performed by the non-security - part of the sending agent rather than the S/MIME implementation. - - The most common and important canonicalization is for text, which is - often represented differently in different environments. MIME - entities of major type "text" MUST have both their line endings and - character set canonicalized. The line ending MUST be the pair of - characters , and the charset SHOULD be a registered charset - [CHARSETS]. The details of the canonicalization are specified in - [MIME-SPEC]. - - Note that some charsets such as ISO-2022 have multiple - representations for the same characters. When preparing such text - for signing, the canonical representation specified for the charset - MUST be used. - - - -Ramsdell & Turner Standards Track [Page 20] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -3.1.2. Transfer Encoding - - When generating any of the secured MIME entities below, except the - signing using the multipart/signed format, no transfer encoding is - required at all. S/MIME implementations MUST be able to deal with - binary MIME objects. If no Content-Transfer-Encoding header field is - present, the transfer encoding is presumed to be 7BIT. - - S/MIME implementations SHOULD however use transfer encoding described - in Section 3.1.3 for all MIME entities they secure. The reason for - securing only 7-bit MIME entities, even for enveloped data that are - not exposed to the transport, is that it allows the MIME entity to be - handled in any environment without changing it. For example, a - trusted gateway might remove the envelope, but not the signature, of - a message, and then forward the signed message on to the end - recipient so that they can verify the signatures directly. If the - transport internal to the site is not 8-bit clean, such as on a wide- - area network with a single mail gateway, verifying the signature will - not be possible unless the original MIME entity was only 7-bit data. - - S/MIME implementations that "know" that all intended recipients are - capable of handling inner (all but the outermost) binary MIME objects - SHOULD use binary encoding as opposed to a 7-bit-safe transfer - encoding for the inner entities. The use of a 7-bit-safe encoding - (such as base64) would unnecessarily expand the message size. - Implementations MAY "know" that recipient implementations are capable - of handling inner binary MIME entities either by interpreting the id- - cap-preferBinaryInside SMIMECapabilities attribute, by prior - agreement, or by other means. - - If one or more intended recipients are unable to handle inner binary - MIME objects, or if this capability is unknown for any of the - intended recipients, S/MIME implementations SHOULD use transfer - encoding described in Section 3.1.3 for all MIME entities they - secure. - -3.1.3. Transfer Encoding for Signing Using multipart/signed - - If a multipart/signed entity is ever to be transmitted over the - standard Internet SMTP infrastructure or other transport that is - constrained to 7-bit text, it MUST have transfer encoding applied so - that it is represented as 7-bit text. MIME entities that are 7-bit - data already need no transfer encoding. Entities such as 8-bit text - and binary data can be encoded with quoted-printable or base-64 - transfer encoding. - - - - - - -Ramsdell & Turner Standards Track [Page 21] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - The primary reason for the 7-bit requirement is that the Internet - mail transport infrastructure cannot guarantee transport of 8-bit or - binary data. Even though many segments of the transport - infrastructure now handle 8-bit and even binary data, it is sometimes - not possible to know whether the transport path is 8-bit clean. If a - mail message with 8-bit data were to encounter a message transfer - agent that cannot transmit 8-bit or binary data, the agent has three - options, none of which are acceptable for a clear-signed message: - - - The agent could change the transfer encoding; this would - invalidate the signature. - - - The agent could transmit the data anyway, which would most likely - result in the 8th bit being corrupted; this too would invalidate - the signature. - - - The agent could return the message to the sender. - - [MIME-SECURE] prohibits an agent from changing the transfer encoding - of the first part of a multipart/signed message. If a compliant - agent that cannot transmit 8-bit or binary data encounters a - multipart/signed message with 8-bit or binary data in the first part, - it would have to return the message to the sender as undeliverable. - -3.1.4. Sample Canonical MIME Entity - - This example shows a multipart/mixed message with full transfer - encoding. This message contains a text part and an attachment. The - sample message text includes characters that are not US-ASCII and - thus need to be transfer encoded. Though not shown here, the end of - each line is . The line ending of the MIME headers, the - text, and the transfer encoded parts, all MUST be . - - Note that this example is not of an S/MIME message. - - Content-Type: multipart/mixed; boundary=bar - - --bar - Content-Type: text/plain; charset=iso-8859-1 - Content-Transfer-Encoding: quoted-printable - - =A1Hola Michael! - - How do you like the new S/MIME specification? - - It's generally a good idea to encode lines that begin with - From=20because some mail transport agents will insert a greater- - than (>) sign, thus invalidating the signature. - - - -Ramsdell & Turner Standards Track [Page 22] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Also, in some cases it might be desirable to encode any =20 - trailing whitespace that occurs on lines in order to ensure =20 - that the message signature is not invalidated when passing =20 - a gateway that modifies such whitespace (like BITNET). =20 - - --bar - Content-Type: image/jpeg - Content-Transfer-Encoding: base64 - - iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC// - jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq - uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn - HOxEa44b+EI= - - --bar-- - -3.2. The application/pkcs7-mime Media Type - - The application/pkcs7-mime media type is used to carry CMS content - types including EnvelopedData, SignedData, and CompressedData. The - details of constructing these entities are described in subsequent - sections. This section describes the general characteristics of the - application/pkcs7-mime media type. - - The carried CMS object always contains a MIME entity that is prepared - as described in Section 3.1 if the eContentType is id-data. Other - contents MAY be carried when the eContentType contains different - values. See [ESS] for an example of this with signed receipts. - - Since CMS content types are binary data, in most cases base-64 - transfer encoding is appropriate, in particular, when used with SMTP - transport. The transfer encoding used depends on the transport - through which the object is to be sent, and is not a characteristic - of the media type. - - Note that this discussion refers to the transfer encoding of the CMS - object or "outside" MIME entity. It is completely distinct from, and - unrelated to, the transfer encoding of the MIME entity secured by the - CMS object, the "inside" object, which is described in Section 3.1. - - Because there are several types of application/pkcs7-mime objects, a - sending agent SHOULD do as much as possible to help a receiving agent - know about the contents of the object without forcing the receiving - agent to decode the ASN.1 for the object. The Content-Type header - field of all application/pkcs7-mime objects SHOULD include the - optional "smime-type" parameter, as described in the following - sections. - - - - -Ramsdell & Turner Standards Track [Page 23] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -3.2.1. The name and filename Parameters - - For the application/pkcs7-mime, sending agents SHOULD emit the - optional "name" parameter to the Content-Type field for compatibility - with older systems. Sending agents SHOULD also emit the optional - Content-Disposition field [CONTDISP] with the "filename" parameter. - If a sending agent emits the above parameters, the value of the - parameters SHOULD be a file name with the appropriate extension: - - Media Type File Extension - application/pkcs7-mime (SignedData, EnvelopedData) .p7m - application/pkcs7-mime (degenerate SignedData .p7c - certificate management message) - application/pkcs7-mime (CompressedData) .p7z - application/pkcs7-signature (SignedData) .p7s - - In addition, the file name SHOULD be limited to eight characters - followed by a three-letter extension. The eight-character filename - base can be any distinct name; the use of the filename base "smime" - SHOULD be used to indicate that the MIME entity is associated with - S/MIME. - - Including a file name serves two purposes. It facilitates easier use - of S/MIME objects as files on disk. It also can convey type - information across gateways. When a MIME entity of type - application/pkcs7-mime (for example) arrives at a gateway that has no - special knowledge of S/MIME, it will default the entity's media type - to application/octet-stream and treat it as a generic attachment, - thus losing the type information. However, the suggested filename - for an attachment is often carried across a gateway. This often - allows the receiving systems to determine the appropriate application - to hand the attachment off to, in this case, a stand-alone S/MIME - processing application. Note that this mechanism is provided as a - convenience for implementations in certain environments. A proper - S/MIME implementation MUST use the media types and MUST NOT rely on - the file extensions. - -3.2.2. The smime-type Parameter - - The application/pkcs7-mime content type defines the optional "smime- - type" parameter. The intent of this parameter is to convey details - about the security applied (signed or enveloped) along with - information about the contained content. This specification defines - the following smime-types. - - - - - - - -Ramsdell & Turner Standards Track [Page 24] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Name CMS Type Inner Content - enveloped-data EnvelopedData id-data - signed-data SignedData id-data - certs-only SignedData none - compressed-data CompressedData id-data - - In order for consistency to be obtained with future specifications, - the following guidelines SHOULD be followed when assigning a new - smime-type parameter. - - 1. If both signing and encryption can be applied to the content, - then two values for smime-type SHOULD be assigned "signed-*" - and "enveloped-*". If one operation can be assigned, then this - can be omitted. Thus, since "certs-only" can only be signed, - "signed-" is omitted. - - 2. A common string for a content OID SHOULD be assigned. We use - "data" for the id-data content OID when MIME is the inner - content. - - 3. If no common string is assigned, then the common string of - "OID." is recommended (for example, - "OID.2.16.840.1.101.3.4.1.2" would be AES-128 CBC). - - It is explicitly intended that this field be a suitable hint for mail - client applications to indicate whether a message is "signed" or - "enveloped" without having to tunnel into the CMS payload. - -3.3. Creating an Enveloped-Only Message - - This section describes the format for enveloping a MIME entity - without signing it. It is important to note that sending enveloped - but not signed messages does not provide for data integrity. It is - possible to replace ciphertext in such a way that the processed - message will still be valid, but the meaning can be altered. - - Step 1. The MIME entity to be enveloped is prepared according to - Section 3.1. - - Step 2. The MIME entity and other required data is processed into a - CMS object of type EnvelopedData. In addition to encrypting - a copy of the content-encryption key for each recipient, a - copy of the content-encryption key SHOULD be encrypted for - the originator and included in the EnvelopedData (see [CMS], - Section 6). - - Step 3. The EnvelopedData object is wrapped in a CMS ContentInfo - object. - - - -Ramsdell & Turner Standards Track [Page 25] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Step 4. The ContentInfo object is inserted into an - application/pkcs7-mime MIME entity. - - The smime-type parameter for enveloped-only messages is "enveloped- - data". The file extension for this type of message is ".p7m". - - A sample message would be: - - Content-Type: application/pkcs7-mime; smime-type=enveloped-data; - name=smime.p7m - Content-Transfer-Encoding: base64 - Content-Disposition: attachment; filename=smime.p7m - - rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 - 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H - f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 - 0GhIGfHfQbnj756YT64V - -3.4. Creating a Signed-Only Message - - There are two formats for signed messages defined for S/MIME: - - - application/pkcs7-mime with SignedData. - - - multipart/signed. - - In general, the multipart/signed form is preferred for sending, and - receiving agents MUST be able to handle both. - -3.4.1. Choosing a Format for Signed-Only Messages - - There are no hard-and-fast rules as to when a particular signed-only - format is chosen. It depends on the capabilities of all the - receivers and the relative importance of receivers with S/MIME - facilities being able to verify the signature versus the importance - of receivers without S/MIME software being able to view the message. - - Messages signed using the multipart/signed format can always be - viewed by the receiver whether or not they have S/MIME software. - They can also be viewed whether they are using a MIME-native user - agent or they have messages translated by a gateway. In this - context, "be viewed" means the ability to process the message - essentially as if it were not a signed message, including any other - MIME structure the message might have. - - - - - - - -Ramsdell & Turner Standards Track [Page 26] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Messages signed using the SignedData format cannot be viewed by a - recipient unless they have S/MIME facilities. However, the - SignedData format protects the message content from being changed by - benign intermediate agents. Such agents might do line wrapping or - content-transfer encoding changes that would break the signature. - -3.4.2. Signing Using application/pkcs7-mime with SignedData - - This signing format uses the application/pkcs7-mime media type. The - steps to create this format are: - - Step 1. The MIME entity is prepared according to Section 3.1. - - Step 2. The MIME entity and other required data are processed into a - CMS object of type SignedData. - - Step 3. The SignedData object is wrapped in a CMS ContentInfo - object. - - Step 4. The ContentInfo object is inserted into an - application/pkcs7-mime MIME entity. - - The smime-type parameter for messages using application/pkcs7-mime - with SignedData is "signed-data". The file extension for this type - of message is ".p7m". - - A sample message would be: - - Content-Type: application/pkcs7-mime; smime-type=signed-data; - name=smime.p7m - Content-Transfer-Encoding: base64 - Content-Disposition: attachment; filename=smime.p7m - - 567GhIGfHfYT6ghyHhHUujpfyF4f8HHGTrfvhJhjH776tbB9HG4VQbnj7 - 77n8HHGT9HG4VQpfyF467GhIGfHfYT6rfvbnj756tbBghyHhHUujhJhjH - HUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H7n8HHGghyHh - 6YT64V0GhIGfHfQbnj75 - -3.4.3. Signing Using the multipart/signed Format - - This format is a clear-signing format. Recipients without any S/MIME - or CMS processing facilities are able to view the message. It makes - use of the multipart/signed media type described in [MIME-SECURE]. - The multipart/signed media type has two parts. The first part - contains the MIME entity that is signed; the second part contains the - "detached signature" CMS SignedData object in which the - encapContentInfo eContent field is absent. - - - - -Ramsdell & Turner Standards Track [Page 27] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -3.4.3.1. The application/pkcs7-signature Media Type - - This media type always contains a CMS ContentInfo containing a single - CMS object of type SignedData. The SignedData encapContentInfo - eContent field MUST be absent. The signerInfos field contains the - signatures for the MIME entity. - - The file extension for signed-only messages using application/pkcs7- - signature is ".p7s". - -3.4.3.2. Creating a multipart/signed Message - - Step 1. The MIME entity to be signed is prepared according to - Section 3.1, taking special care for clear-signing. - - Step 2. The MIME entity is presented to CMS processing in order to - obtain an object of type SignedData in which the - encapContentInfo eContent field is absent. - - Step 3. The MIME entity is inserted into the first part of a - multipart/signed message with no processing other than that - described in Section 3.1. - - Step 4. Transfer encoding is applied to the "detached signature" CMS - SignedData object, and it is inserted into a MIME entity of - type application/pkcs7-signature. - - Step 5. The MIME entity of the application/pkcs7-signature is - inserted into the second part of the multipart/signed - entity. - - The multipart/signed Content-Type has two required parameters: the - protocol parameter and the micalg parameter. - - The protocol parameter MUST be "application/pkcs7-signature". Note - that quotation marks are required around the protocol parameter - because MIME requires that the "/" character in the parameter value - MUST be quoted. - - The micalg parameter allows for one-pass processing when the - signature is being verified. The value of the micalg parameter is - dependent on the message digest algorithm(s) used in the calculation - of the Message Integrity Check. If multiple message digest - algorithms are used, they MUST be separated by commas per [MIME- - SECURE]. The values to be placed in the micalg parameter SHOULD be - from the following: - - - - - -Ramsdell & Turner Standards Track [Page 28] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Algorithm Value Used - - MD5 md5 - SHA-1 sha-1 - SHA-224 sha-224 - SHA-256 sha-256 - SHA-384 sha-384 - SHA-512 sha-512 - Any other (defined separately in algorithm profile or "unknown" - if not defined) - - (Historical note: some early implementations of S/MIME emitted and - expected "rsa-md5", "rsa-sha1", and "sha1" for the micalg parameter.) - Receiving agents SHOULD be able to recover gracefully from a micalg - parameter value that they do not recognize. Future names for this - parameter will be consistent with the IANA "Hash Function Textual - Names" registry. - -3.4.3.3. Sample multipart/signed Message - - Content-Type: multipart/signed; - protocol="application/pkcs7-signature"; - micalg=sha1; boundary=boundary42 - - --boundary42 - Content-Type: text/plain - - This is a clear-signed message. - - --boundary42 - Content-Type: application/pkcs7-signature; name=smime.p7s - Content-Transfer-Encoding: base64 - Content-Disposition: attachment; filename=smime.p7s - - ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6 - 4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj - n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 - 7GhIGfHfYT64VQbnj756 - - --boundary42-- - - The content that is digested (the first part of the multipart/signed) - consists of the bytes: - - 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 70 6c 61 69 - 6e 0d 0a 0d 0a 54 68 69 73 20 69 73 20 61 20 63 6c 65 61 72 2d 73 69 - 67 6e 65 64 20 6d 65 73 73 61 67 65 2e 0d 0a - - - - -Ramsdell & Turner Standards Track [Page 29] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -3.5. Creating a Compressed-Only Message - - This section describes the format for compressing a MIME entity. - Please note that versions of S/MIME prior to version 3.1 did not - specify any use of CompressedData, and will not recognize it. The - use of a capability to indicate the ability to receive CompressedData - is described in [CMSCOMPR] and is the preferred method for - compatibility. - - Step 1. The MIME entity to be compressed is prepared according to - Section 3.1. - - Step 2. The MIME entity and other required data are processed into a - CMS object of type CompressedData. - - Step 3. The CompressedData object is wrapped in a CMS ContentInfo - object. - - Step 4. The ContentInfo object is inserted into an - application/pkcs7-mime MIME entity. - - The smime-type parameter for compressed-only messages is "compressed- - data". The file extension for this type of message is ".p7z". - - A sample message would be: - - Content-Type: application/pkcs7-mime; smime-type=compressed-data; - name=smime.p7z - Content-Transfer-Encoding: base64 - Content-Disposition: attachment; filename=smime.p7z - - rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 - 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H - f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 - 0GhIGfHfQbnj756YT64V - -3.6. Multiple Operations - - The signed-only, enveloped-only, and compressed-only MIME formats can - be nested. This works because these formats are all MIME entities - that encapsulate other MIME entities. - - An S/MIME implementation MUST be able to receive and process - arbitrarily nested S/MIME within reasonable resource limits of the - recipient computer. - - - - - - -Ramsdell & Turner Standards Track [Page 30] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - It is possible to apply any of the signing, encrypting, and - compressing operations in any order. It is up to the implementer and - the user to choose. When signing first, the signatories are then - securely obscured by the enveloping. When enveloping first the - signatories are exposed, but it is possible to verify signatures - without removing the enveloping. This can be useful in an - environment where automatic signature verification is desired, as no - private key material is required to verify a signature. - - There are security ramifications to choosing whether to sign first or - encrypt first. A recipient of a message that is encrypted and then - signed can validate that the encrypted block was unaltered, but - cannot determine any relationship between the signer and the - unencrypted contents of the message. A recipient of a message that - is signed then encrypted can assume that the signed message itself - has not been altered, but that a careful attacker could have changed - the unauthenticated portions of the encrypted message. - - When using compression, keep the following guidelines in mind: - - - Compression of binary encoded encrypted data is discouraged, - since it will not yield significant compression. Base64 - encrypted data could very well benefit, however. - - - If a lossy compression algorithm is used with signing, you will - need to compress first, then sign. - -3.7. Creating a Certificate Management Message - - The certificate management message or MIME entity is used to - transport certificates and/or Certificate Revocation Lists, such as - in response to a registration request. - - Step 1. The certificates and/or Certificate Revocation Lists are - made available to the CMS generating process that creates a - CMS object of type SignedData. The SignedData - encapContentInfo eContent field MUST be absent and - signerInfos field MUST be empty. - - Step 2. The SignedData object is wrapped in a CMS ContentInfo - object. - - Step 3. The ContentInfo object is enclosed in an - application/pkcs7-mime MIME entity. - - The smime-type parameter for a certificate management message is - "certs-only". The file extension for this type of message is ".p7c". - - - - -Ramsdell & Turner Standards Track [Page 31] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -3.8. Registration Requests - - A sending agent that signs messages MUST have a certificate for the - signature so that a receiving agent can verify the signature. There - are many ways of getting certificates, such as through an exchange - with a certification authority, through a hardware token or diskette, - and so on. - - S/MIME v2 [SMIMEv2] specified a method for "registering" public keys - with certificate authorities using an application/pkcs10 body part. - Since that time, the IETF PKIX Working Group has developed other - methods for requesting certificates. However, S/MIME v3.2 does not - require a particular certificate request mechanism. - -3.9. Identifying an S/MIME Message - - Because S/MIME takes into account interoperation in non-MIME - environments, several different mechanisms are employed to carry the - type information, and it becomes a bit difficult to identify S/MIME - messages. The following table lists criteria for determining whether - or not a message is an S/MIME message. A message is considered an - S/MIME message if it matches any of the criteria listed below. - - The file suffix in the table below comes from the "name" parameter in - the Content-Type header field, or the "filename" parameter on the - Content-Disposition header field. These parameters that give the - file suffix are not listed below as part of the parameter section. - - Media type: application/pkcs7-mime - parameters: any - file suffix: any - - Media type: multipart/signed - parameters: protocol="application/pkcs7-signature" - file suffix: any - - Media type: application/octet-stream - parameters: any - file suffix: p7m, p7s, p7c, p7z - -4. Certificate Processing - - A receiving agent MUST provide some certificate retrieval mechanism - in order to gain access to certificates for recipients of digital - envelopes. This specification does not cover how S/MIME agents - handle certificates, only what they do after a certificate has been - validated or rejected. S/MIME certificate issues are covered in - [CERT32]. - - - -Ramsdell & Turner Standards Track [Page 32] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - At a minimum, for initial S/MIME deployment, a user agent could - automatically generate a message to an intended recipient requesting - that recipient's certificate in a signed return message. Receiving - and sending agents SHOULD also provide a mechanism to allow a user to - "store and protect" certificates for correspondents in such a way so - as to guarantee their later retrieval. - -4.1. Key Pair Generation - - All generated key pairs MUST be generated from a good source of non- - deterministic random input [RANDOM] and the private key MUST be - protected in a secure fashion. - - An S/MIME user agent MUST NOT generate asymmetric keys less than 512 - bits for use with the RSA or DSA signature algorithms. - - For 512-bit RSA with SHA-1 see [CMSALG] and [FIPS186-2] without - Change Notice 1, for 512-bit RSA with SHA-256 see [CMS-SHA2] and - [FIPS186-2] without Change Notice 1, and for 1024-bit through - 2048-bit RSA with SHA-256 see [CMS-SHA2] and [FIPS186-2] with Change - Notice 1. The first reference provides the signature algorithm's - object identifier, and the second provides the signature algorithm's - definition. - - For 512-bit DSA with SHA-1 see [CMSALG] and [FIPS186-2] without - Change Notice 1, for 512-bit DSA with SHA-256 see [CMS-SHA2] and - [FIPS186-2] without Change Notice 1, for 1024-bit DSA with SHA-1 see - [CMSALG] and [FIPS186-2] with Change Notice 1, for 1024-bit and above - DSA with SHA-256 see [CMS-SHA2] and [FIPS186-3]. The first reference - provides the signature algorithm's object identifier and the second - provides the signature algorithm's definition. - - For RSASSA-PSS with SHA-256, see [RSAPSS]. For 1024-bit DH, see - [CMSALG]. For 1024-bit and larger DH, see [SP800-56A]; regardless, - use the KDF, which is from X9.42, specified in [CMSALG]. For RSAES- - OAEP, see [RSAOAEP]. - -4.2. Signature Generation - - The following are the requirements for an S/MIME agent generated RSA, - RSASSA-PSS, and DSA signatures: - - key size <= 1023 : SHOULD NOT (see Security Considerations) - 1024 <= key size <= 2048 : SHOULD (see Security Considerations) - 2048 < key size : MAY (see Security Considerations) - - - - - - -Ramsdell & Turner Standards Track [Page 33] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -4.3. Signature Verification - - The following are the requirements for S/MIME receiving agents during - signature verification of RSA, RSASSA-PSS, and DSA signatures: - - key size <= 1023 : MAY (see Security Considerations) - 1024 <= key size <= 2048 : MUST (see Security Considerations) - 2048 < key size : MAY (see Security Considerations) - -4.4. Encryption - - The following are the requirements for an S/MIME agent when - establishing keys for content encryption using the RSA, RSA-OAEP, and - DH algorithms: - - key size <= 1023 : SHOULD NOT (see Security Considerations) - 1024 <= key size <= 2048 : SHOULD (see Security Considerations) - 2048 < key size : MAY (see Security Considerations) - -4.5. Decryption - - The following are the requirements for an S/MIME agent when - establishing keys for content decryption using the RSA, RSAES-OAEP, - and DH algorithms: - - key size <= 1023 : MAY (see Security Considerations) - 1024 <= key size <= 2048 : MUST (see Security Considerations) - 2048 < key size : MAY (see Security Considerations) - -5. IANA Considerations - - The following information updates the media type registration for - application/pkcs7-mime and application/pkcs7-signature to refer to - this document as opposed to RFC 2311. - - Note that other documents can define additional MIME media types for - S/MIME. - -5.1. Media Type for application/pkcs7-mime - - Type name: application - - Subtype Name: pkcs7-mime - - Required Parameters: NONE - - - - - - -Ramsdell & Turner Standards Track [Page 34] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Optional Parameters: smime-type/signed-data - smime-type/enveloped-data - smime-type/compressed-data - smime-type/certs-only - name - - Encoding Considerations: See Section 3 of this document - - Security Considerations: See Section 6 of this document - - Interoperability Considerations: See Sections 1-6 of this document - - Published Specification: RFC 2311, RFC 2633, and this document - - Applications that use this media type: Security applications - - Additional information: NONE - - Person & email to contact for further information: - S/MIME working group chairs smime-chairs@tools.ietf.org - - Intended usage: COMMON - - Restrictions on usage: NONE - - Author: Sean Turner - - Change Controller: S/MIME working group delegated from the IESG - -5.2. Media Type for application/pkcs7-signature - - Type name: application - - Subtype Name: pkcs7-signature - - Required Parameters: NONE - - Optional Parameters: NONE - - Encoding Considerations: See Section 3 of this document - - Security Considerations: See Section 6 of this document - - Interoperability Considerations: See Sections 1-6 of this document - - Published Specification: RFC 2311, RFC 2633, and this document - - Applications that use this media type: Security applications - - - -Ramsdell & Turner Standards Track [Page 35] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - Additional information: NONE - - Person & email to contact for further information: - S/MIME working group chairs smime-chairs@tools.ietf.org - - Intended usage: COMMON - - Restrictions on usage: NONE - - Author: Sean Turner - - Change Controller: S/MIME working group delegated from the IESG - -6. Security Considerations - - Cryptographic algorithms will be broken or weakened over time. - Implementers and users need to check that the cryptographic - algorithms listed in this document continue to provide the expected - level of security. The IETF from time to time may issue documents - dealing with the current state of the art. For example: - - - The Million Message Attack described in RFC 3218 [MMA]. - - - The Diffie-Hellman "small-subgroup" attacks described in RFC - 2785 [DHSUB]. - - - The attacks against hash algorithms described in RFC 4270 [HASH- - ATTACK]. - - This specification uses Public-Key Cryptography technologies. It is - assumed that the private key is protected to ensure that it is not - accessed or altered by unauthorized parties. - - It is impossible for most people or software to estimate the value of - a message's content. Further, it is impossible for most people or - software to estimate the actual cost of recovering an encrypted - message content that is encrypted with a key of a particular size. - Further, it is quite difficult to determine the cost of a failed - decryption if a recipient cannot process a message's content. Thus, - choosing between different key sizes (or choosing whether to just use - plaintext) is also impossible for most people or software. However, - decisions based on these criteria are made all the time, and - therefore this specification gives a framework for using those - estimates in choosing algorithms. - - The choice of 2048 bits as the RSA asymmetric key size in this - specification is based on the desire to provide at least 100 bits of - security. The key sizes that must be supported to conform to this - - - -Ramsdell & Turner Standards Track [Page 36] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - specification seem appropriate for the Internet based on [STRENGTH]. - Of course, there are environments, such as financial and medical - systems, that may select different key sizes. For this reason, an - implementation MAY support key sizes beyond those recommended in this - specification. - - Receiving agents that validate signatures and sending agents that - encrypt messages need to be cautious of cryptographic processing - usage when validating signatures and encrypting messages using keys - larger than those mandated in this specification. An attacker could - send certificates with keys that would result in excessive - cryptographic processing, for example, keys larger than those - mandated in this specification, which could swamp the processing - element. Agents that use such keys without first validating the - certificate to a trust anchor are advised to have some sort of - cryptographic resource management system to prevent such attacks. - - Using weak cryptography in S/MIME offers little actual security over - sending plaintext. However, other features of S/MIME, such as the - specification of AES and the ability to announce stronger - cryptographic capabilities to parties with whom you communicate, - allow senders to create messages that use strong encryption. Using - weak cryptography is never recommended unless the only alternative is - no cryptography. - - RSA and DSA keys of less than 1024 bits are now considered by many - experts to be cryptographically insecure (due to advances in - computing power), and should no longer be used to protect messages. - Such keys were previously considered secure, so processing previously - received signed and encrypted mail will often result in the use of - weak keys. Implementations that wish to support previous versions of - S/MIME or process old messages need to consider the security risks - that result from smaller key sizes (e.g., spoofed messages) versus - the costs of denial of service. If an implementation supports - verification of digital signatures generated with RSA and DSA keys of - less than 1024 bits, it MUST warn the user. Implementers should - consider providing different warnings for newly received messages and - previously stored messages. Server implementations (e.g., secure - mail list servers) where user warnings are not appropriate SHOULD - reject messages with weak signatures. - - Implementers SHOULD be aware that multiple active key pairs can be - associated with a single individual. For example, one key pair can - be used to support confidentiality, while a different key pair can be - used for digital signatures. - - - - - - -Ramsdell & Turner Standards Track [Page 37] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - If a sending agent is sending the same message using different - strengths of cryptography, an attacker watching the communications - channel might be able to determine the contents of the strongly - encrypted message by decrypting the weakly encrypted version. In - other words, a sender SHOULD NOT send a copy of a message using - weaker cryptography than they would use for the original of the - message. - - Modification of the ciphertext can go undetected if authentication is - not also used, which is the case when sending EnvelopedData without - wrapping it in SignedData or enclosing SignedData within it. - - If an implementation is concerned about compliance with National - Institute of Standards and Technology (NIST) key size - recommendations, then see [SP800-57]. - - If messaging environments make use of the fact that a message is - signed to change the behavior of message processing (examples would - be running rules or UI display hints), without first verifying that - the message is actually signed and knowing the state of the - signature, this can lead to incorrect handling of the message. - Visual indicators on messages may need to have the signature - validation code checked periodically if the indicator is supposed to - give information on the current status of a message. - -7. References - -7.1. Reference Conventions - - [CMS] refers to [RFC5652]. - - [ESS] refers to [RFC2634] and [RFC5035]. - - [MIME] refers to [RFC2045], [RFC2046], [RFC2047], [RFC2049], - [RFC4288], and [RFC4289]. - - [SMIMEv2] refers to [RFC2311], [RFC2312], [RFC2313], [RFC2314], and - [RFC2315]. - - [SMIMEv3] refers to [RFC2630], [RFC2631], [RFC2632], [RFC2633], - [RFC2634], and [RFC5035]. - - [SMIMv3.1] refers to [RFC2634], [RFC3850], [RFC3851], [RFC3852], and - [RFC5035]. - - - - - - - -Ramsdell & Turner Standards Track [Page 38] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -7.2. Normative References - - [CERT32] Ramsdell, B. and S. Turner, "Secure/Multipurpose - Internet Mail Extensions (S/MIME) Version 3.2 - Certificate Handling", RFC 5750, January 2010. - - [CHARSETS] Character sets assigned by IANA. See - http://www.iana.org/assignments/character-sets. - - [CMSAES] Schaad, J., "Use of the Advanced Encryption Standard - (AES) Encryption Algorithm in Cryptographic Message - Syntax (CMS)", RFC 3565, July 2003. - - [CMSALG] Housley, R., "Cryptographic Message Syntax (CMS) - Algorithms", RFC 3370, August 2002. - - [CMSCOMPR] Gutmann, P., "Compressed Data Content Type for - Cryptographic Message Syntax (CMS)", RFC 3274, June - 2002. - - [CMS-SHA2] Turner, S., "Using SHA2 Algorithms with Cryptographic - Message Syntax", RFC 5754, January 2010. - - [CONTDISP] Troost, R., Dorner, S., and K. Moore, Ed., - "Communicating Presentation Information in Internet - Messages: The Content-Disposition Header Field", RFC - 2183, August 1997. - - [FIPS186-2] National Institute of Standards and Technology (NIST), - "Digital Signature Standard (DSS)", FIPS Publication - 186-2, January 2000. [With Change Notice 1]. - - [FIPS186-3] National Institute of Standards and Technology (NIST), - FIPS Publication 186-3: Digital Signature Standard, - June 2009. - - [MIME-SECURE] Galvin, J., Murphy, S., Crocker, S., and N. Freed, - "Security Multiparts for MIME: Multipart/Signed and - Multipart/Encrypted", RFC 1847, October 1995. - - [MUSTSHOULD] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, March 1997. - - [RANDOM] Eastlake, D., 3rd, Schiller, J., and S. Crocker, - "Randomness Requirements for Security", BCP 106, RFC - 4086, June 2005. - - - - - -Ramsdell & Turner Standards Track [Page 39] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet - Mail Extensions (MIME) Part One: Format of Internet - Message Bodies", RFC 2045, November 1996. - - [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet - Mail Extensions (MIME) Part Two: Media Types", RFC - 2046, November 1996. - - [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail - Extensions) Part Three: Message Header Extensions for - Non-ASCII Text", RFC 2047, November 1996. - - [RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet - Mail Extensions (MIME) Part Five: Conformance Criteria - and Examples", RFC 2049, November 1996. - - [RFC2634] Hoffman, P. Ed., "Enhanced Security Services for - S/MIME", RFC 2634, June 1999. - - [RFC4288] Freed, N. and J. Klensin, "Media Type Specifications - and Registration Procedures", BCP 13, RFC 4288, - December 2005. - - [RFC4289] Freed, N. and J. Klensin, "Multipurpose Internet Mail - Extensions (MIME) Part Four: Registration Procedures", - BCP 13, RFC 4289, December 2005. - - [RFC5035] Schaad, J., "Enhanced Security Services (ESS) Update: - Adding CertID Algorithm Agility", RFC 5035, August - 2007. - - [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", RFC - 5652, September 2009. - - [RSAOAEP] Housley, R. "Use of the RSAES-OAEP Key Transport - Algorithm in the Cryptographic Message Syntax (CMS)", - RFC 3560, July 2003. - - [RSAPSS] Schaad, J., "Use of the RSASSA-PSS Signature Algorithm - in Cryptographic Message Syntax (CMS)", RFC 4056, June - 2005. - - [SP800-56A] National Institute of Standards and Technology (NIST), - Special Publication 800-56A: Recommendation Pair-Wise - Key Establishment Schemes Using Discrete Logarithm - Cryptography (Revised), March 2007. - - - - - -Ramsdell & Turner Standards Track [Page 40] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - [X.680] ITU-T Recommendation X.680 (2002) | ISO/IEC - 8824-1:2002. Information Technology - Abstract Syntax - Notation One (ASN.1): Specification of basic notation. - - [X.690] ITU-T Recommendation X.690 (2002) | ISO/IEC - 8825-1:2002. Information Technology - ASN.1 encoding - rules: Specification of Basic Encoding Rules (BER), - Canonical Encoding Rules (CER) and Distinguished - Encoding Rules (DER). - -7.3. Informative References - - [DHSUB] Zuccherato, R., "Methods for Avoiding the "Small- - Subgroup" Attacks on the Diffie-Hellman Key Agreement - Method for S/MIME", RFC 2785, March 2000. - - [HASH-ATTACK] Hoffman, P. and B. Schneier, "Attacks on Cryptographic - Hashes in Internet Protocols", RFC 4270, November 2005. - - [MMA] Rescorla, E., "Preventing the Million Message Attack on - Cryptographic Message Syntax", RFC 3218, January 2002. - - [PKCS-7] Kaliski, B., "PKCS #7: Cryptographic Message Syntax - Version 1.5", RFC 2315, March 1998. - - [RFC2311] Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L., - and L. Repka, "S/MIME Version 2 Message Specification", - RFC 2311, March 1998. - - [RFC2312] Dusse, S., Hoffman, P., Ramsdell, B., and J. - Weinstein, "S/MIME Version 2 Certificate Handling", RFC - 2312, March 1998. - - [RFC2313] Kaliski, B., "PKCS #1: RSA Encryption Version 1.5", RFC - 2313, March 1998. - - [RFC2314] Kaliski, B., "PKCS #10: Certification Request Syntax - Version 1.5", RFC 2314, March 1998. - - [RFC2315] Kaliski, B., "PKCS #7: Certification Message Syntax - Version 1.5", RFC 2315, March 1998. - - [RFC2630] Housley, R., "Cryptographic Message Syntax", RFC 2630, - June 1999. - - [RFC2631] Rescorla, E., "Diffie-Hellman Key Agreement Method", - RFC 2631, June 1999. - - - - -Ramsdell & Turner Standards Track [Page 41] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - [RFC2632] Ramsdell, B., Ed., "S/MIME Version 3 Certificate - Handling", RFC 2632, June 1999. - - [RFC2633] Ramsdell, B., Ed., "S/MIME Version 3 Message - Specification", RFC 2633, June 1999. - - [RFC3850] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail - Extensions (S/MIME) Version 3.1 Certificate Handling", - RFC 3850, July 2004. - - [RFC3851] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail - Extensions (S/MIME) Version 3.1 Message Specification", - RFC 3851, July 2004. - - [RFC3852] Housley, R., "Cryptographic Message Syntax (CMS)", RFC - 3852, July 2004. - - [SP800-57] National Institute of Standards and Technology (NIST), - Special Publication 800-57: Recommendation for Key - Management, August 2005. - - [STRENGTH] Orman, H., and P. Hoffman, "Determining Strengths For - Public Keys Used For Exchanging Symmetric Keys", BCP - 86, RFC 3766, April 2004. - - - - - - - - - - - - - - - - - - - - - - - - - - - -Ramsdell & Turner Standards Track [Page 42] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -Appendix A. ASN.1 Module - - Note: The ASN.1 module contained herein is unchanged from RFC 3851 - [SMIMEv3.1] with the exception of a change to the prefersBinaryInside - ASN.1 comment. This module uses the 1988 version of ASN.1. - - SecureMimeMessageV3dot1 - - { iso(1) member-body(2) us(840) rsadsi(113549) - pkcs(1) pkcs-9(9) smime(16) modules(0) msg-v3dot1(21) } - - DEFINITIONS IMPLICIT TAGS ::= - - BEGIN - - IMPORTS - - -- Cryptographic Message Syntax [CMS] - SubjectKeyIdentifier, IssuerAndSerialNumber, - RecipientKeyIdentifier - FROM CryptographicMessageSyntax - { iso(1) member-body(2) us(840) rsadsi(113549) - pkcs(1) pkcs-9(9) smime(16) modules(0) cms-2001(14) }; - - -- id-aa is the arc with all new authenticated and unauthenticated - -- attributes produced by the S/MIME Working Group - - id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840) - rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)} - - -- S/MIME Capabilities provides a method of broadcasting the - -- symmetric capabilities understood. Algorithms SHOULD be ordered - -- by preference and grouped by type - - smimeCapabilities OBJECT IDENTIFIER ::= {iso(1) member-body(2) - us(840) rsadsi(113549) pkcs(1) pkcs-9(9) 15} - - SMIMECapability ::= SEQUENCE { - capabilityID OBJECT IDENTIFIER, - parameters ANY DEFINED BY capabilityID OPTIONAL } - - SMIMECapabilities ::= SEQUENCE OF SMIMECapability - - -- Encryption Key Preference provides a method of broadcasting the - -- preferred encryption certificate. - - id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11} - - - - -Ramsdell & Turner Standards Track [Page 43] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - - SMIMEEncryptionKeyPreference ::= CHOICE { - issuerAndSerialNumber [0] IssuerAndSerialNumber, - receipentKeyId [1] RecipientKeyIdentifier, - subjectAltKeyIdentifier [2] SubjectKeyIdentifier - } - - -- receipentKeyId is spelt incorrectly, but kept for historical - -- reasons. - - id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) - rsadsi(113549) pkcs(1) pkcs9(9) 16 } - - id-cap OBJECT IDENTIFIER ::= { id-smime 11 } - - -- The preferBinaryInside OID indicates an ability to receive - -- messages with binary encoding inside the CMS wrapper. - -- The preferBinaryInside attribute's value field is ABSENT. - - id-cap-preferBinaryInside OBJECT IDENTIFIER ::= { id-cap 1 } - - -- The following list OIDs to be used with S/MIME V3 - - -- Signature Algorithms Not Found in [CMSALG], [CMS-SHA2], [RSAPSS], - -- and [RSAOAEP] - - -- - -- md2WithRSAEncryption OBJECT IDENTIFIER ::= - -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1) - -- 2} - - -- - -- Other Signed Attributes - -- - -- signingTime OBJECT IDENTIFIER ::= - -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) - -- 5} - -- See [CMS] for a description of how to encode the attribute - -- value. - - SMIMECapabilitiesParametersForRC2CBC ::= INTEGER - -- (RC2 Key Length (number of bits)) - - END - - - - - - - - -Ramsdell & Turner Standards Track [Page 44] - -RFC 5751 S/MIME 3.2 Message Specification January 2010 - - -Appendix B. Moving S/MIME v2 Message Specification to Historic Status - - The S/MIME v3 [SMIMEv3], v3.1 [SMIMEv3.1], and v3.2 (this document) - are backwards compatible with the S/MIME v2 Message Specification - [SMIMEv2], with the exception of the algorithms (dropped RC2/40 - requirement and added DSA and RSASSA-PSS requirements). Therefore, - it is recommended that RFC 2311 [SMIMEv2] be moved to Historic - status. - -Appendix C. Acknowledgments - - Many thanks go out to the other authors of the S/MIME version 2 - Message Specification RFC: Steve Dusse, Paul Hoffman, Laurence - Lundblade, and Lisa Repka. Without v2, there wouldn't be a v3, v3.1, - or v3.2. - - A number of the members of the S/MIME Working Group have also worked - very hard and contributed to this document. Any list of people is - doomed to omission, and for that I apologize. In alphabetical order, - the following people stand out in my mind because they made direct - contributions to this document: - - Tony Capel, Piers Chivers, Dave Crocker, Bill Flanigan, Peter - Gutmann, Alfred Hoenes, Paul Hoffman, Russ Housley, William Ottaway, - John Pawling, and Jim Schaad. - -Authors' Addresses - - Blake Ramsdell - Brute Squad Labs, Inc. - - EMail: blaker@gmail.com - - - Sean Turner - IECA, Inc. - 3057 Nutley Street, Suite 106 - Fairfax, VA 22031 - USA - - EMail: turners@ieca.com - - - - - - - - - - -Ramsdell & Turner Standards Track [Page 45] - diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/whats_where.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/whats_where.txt deleted file mode 100644 index 201a5f72..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/rfc/whats_where.txt +++ /dev/null @@ -1,90 +0,0 @@ -RFC 1854: ---------- -PIPELINING extension - -RFC 2222: ---------- -SASL - -RFC 4505: ---------- -ANYNONYMOUS SASL - -RFC 4616: ---------- -PLAIN SASL - -RFC 2487: ---------- -STARTTLS extension - -RFC 2554 & 4954: ----------------- -AUTH extension - -RFC 2821: ---------- -SMTP protocol - -RFC 2822: ---------- -General message structure (focusing on important headers) - -RFC 2045: ---------- -Quoted Printable Encoding -Base 64 Encoding -Detailed message structure - -RFC 2046: ---------- -Media types (for subparts) - -RFC 2047: ---------- -Header Encoding - -RFC 2183: ---------- -The Content-Disposition header - -RFC 2231: ---------- -Encoded Text header/attribute extensions - -RFC 2234: ---------- -ABNF definitions - -RFC 3676: ---------- -Flowed formatting/delsp parameters - -RFC 2015: ---------- -Original Mime Security with OpenPGP - -RFC 2440: ---------- -Original OpenPGP message format - -RFC 3156: ---------- -Current (30/01/2009) Mime Security with OpenPGP - -RFC 4880: ---------- -Current (30/01/2009) OpenPGP Message format revision (fun, it's exactly original *2 --sorry) - -RFC 5751: --------- -Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 - -RFC 4870: ---------- -DomainKeys (historic), but still used by a few people. - -RFX 4871: ---------- -DKIM - diff --git a/vendor/swiftmailer/swiftmailer/notes/smtp.txt b/vendor/swiftmailer/swiftmailer/notes/smtp.txt deleted file mode 100644 index db73744c..00000000 --- a/vendor/swiftmailer/swiftmailer/notes/smtp.txt +++ /dev/null @@ -1,48 +0,0 @@ -General Notes --------------- - * MX is NOT required, but an A record, or CNAME to a MX MUST be present at the least. - * EHLO should be tried, then fall back to HELO - * The 250 return code from RCPT TO is not actually clear-cut. A 251 may be - returned if the message was forwarded to another address. This could be a - useful indicator to end-users that an address should be updated. - * RCPT TO can accpet just "postmaster" without a domain name - * Server MUST not close connection before: - - QUIT and returning 221 response - - Forced requirement, and only after returning a 421 response - - Clients expriencing a forced connection closure, without prior warning should - just treat it like a 451 closure regardless - * ALWAYS use blocking sockets for the initial connection (this should prevent - Exim4's whining about sync). - -Response codes --------------- - * From RFC2821, 4.2. - - In particular, the 220, 221, 251, 421, and 551 reply codes - are associated with message text that must be parsed and interpreted - by machines. - -Error Codes ------------- - * Numeric 5yz = Error - - 550/RCPT TO = Relay denied - - 500 = Unknown command - * Numeric 2yz = Normal - * Numeric 4yz = Temporary failure?? - - - - Swift - pear.swiftmailer.org - Free Feature-rich PHP Mailer. - - Swift Mailer integrates into any web app written in PHP 5, offering a flexible and elegant object-oriented approach to sending emails with a multitude of features. - - - Fabien Potencier - fabpot - fabien.potencier@symfony-project.org - yes - - - Chris Corbyn - d11wtq - - no - - {{ date }} - - - {{ version }} - {{ api_version }} - - - {{ stability }} - {{ stability }} - - MIT - - - - - - - - - - - - - - - - - - - - - - -{{ files }} - - - - - - - - - 5.2.4 - - - 1.4.0 - - - - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/CHANGES b/vendor/swiftmailer/swiftmailer/test-suite/CHANGES deleted file mode 100644 index 6229a4cf..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/CHANGES +++ /dev/null @@ -1,7 +0,0 @@ -Sweety SimpleTest Front-end, Version 0.1 - beta ------------------------------------------------ - -17th November 2007, 0.1b: - Finished initial draft, giving up on dealing with invalid XML for now since - $test->dump() should be used for output where needed. Will address this again - later. diff --git a/vendor/swiftmailer/swiftmailer/test-suite/LICENSE b/vendor/swiftmailer/swiftmailer/test-suite/LICENSE deleted file mode 100644 index fc8a5de7..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/LICENSE +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/vendor/swiftmailer/swiftmailer/test-suite/README b/vendor/swiftmailer/swiftmailer/test-suite/README deleted file mode 100644 index 6348255d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/README +++ /dev/null @@ -1,159 +0,0 @@ -Sweety SimpleTest Suite ------------------------ - -Sweety is a wrapper around SimpleTest's XML reporting capabilities which -makes unit tests easier to manage and friendlier to run. - -Tests are run in a grouped fashion, but each individual test runs in its own -environment and own memory space either via forking new PHP processes, or by -making new HTTP requests. - -Sweety works with any vanilla version of SimpleTest since the XmlReporter was -added. - -Tests can be run on command line, in an AJAX equipped web browser*, or in a -web browser with javascript turned off. - - * Sweety has been tested with success in the following browsers: - - - Mozilla Firefox 2.0 - - Safari 3-beta - - Internet Explorer 7 - - Opera 9 - - -Configuring Sweety: --------------------- - -All Sweety configuration is contained inside the config.php file, defined as -constants for the mostpart. - -Make sure you at least indicate a path to a directory containing SimpleTest, -and also change the SWEETY_INCLUDE_PATH and SWEETY_TEST_PATH to fit your needs. - -Paths are provided using the directory separator for your OS. Use the PHP -constant PATH_SEPARATOR if you need to run in different environments. - -If you have test cases in directories /webdev/tests/unit and -/webdev/tests/integration your SWEETY_TEST_PATH should look like: - -define('SWEETY_TEST_PATH', '/webdev/tests/unit' . PATH_SEPARATOR . - '/webdev/tests/integration'); - -If you want to run Sweety on the command line you'll need to specify the path -to your PHP executable (typically /usr/bin/php). Sweety needs to be able to -fork new processes using this executable. - - -What to do if your naming scheme doesn't use PEAR conventions: --------------------------------------------------------------- - -By default Sweety looks for classes using PEAR naming conventions. If you use -some other naming convention you need to tell Sweety how to find your test cases. - -This is a two step process: - -1) Write a new Sweety_TestLocator -- don't worry, it's easy! - - Refer to the interface in lib/Sweety/TestLocator.php for guidance on what - your TestLocator needs to include (just two methods for searching and including). - -2) Add it to your config.php. - - Once you've written a new TestLocator which works for your naming scheme, - change the config value SWEETY_TEST_LOCATOR to the name of your new class, then - include the class file somewhere inside the config.php. If you use multiple class - naming conventions, list your TestLocators as a comma separated string. - - -Making tests appear in Sweety's interface: -------------------------------------------- - -No really, you just edit the configuration and they'll show up if a TestLocator -can find them ;) - - -Running sweety on the command line: ------------------------------------ - -Interacting with Sweety on the command line you'll get almost as much detail -as you do in a web browser, although the formatting obviously isn't so pretty! - -All operations are handled by the file named run.php in the sweety installation -directory. - - -bash$ php run.php #runs all tests - -bash$ php run.php Name_Of_TestClass #runs a single test case - -bash$ php run.php Name_Of_TestClass xml #runs a single test case in XML - - - -Runing Sweety with AJAX: -------------------------- - -Open up an AJAX equipped web browsers (preferably supporting DOM 3 XPath, but at -least support basic DOM). Navigate to the index.php file at the installation -directory of Sweety. You'll see the screen is divided into two sections, left -and right. On the left there's a list of test cases which you can click to run. -On the right you get all the verbose output from running the tests. - -Clicking the "Run Tests" button will run all tests you can currently see in -the list. As each test runs, a request is sent to the web server to get -SimpleTest to run your test case. If the test passes the test case will turn -green, if it fails it will turn red. Tests go yellow until a final conclusion -is drawn. - -If you need to stop the tests at any time just click the button again (it -should say "Stop Tests" whilst the tests run). - -Whilst the tests run, the large bar to the right of the screen will tally -up aggregated results and will eventually go either green or red indicating -a pass or failure. Failed assertion messages will appear in the page just like -they do with the HtmlReporter of SimpleTest. - -Clicking a single test case will run just that test in isolation. If you want -(or need?) to run the test with SimpleTest's HtmlReporter just click the -HTML Icon (little world image) next to the test case. Tests can also be run in -XML if needed. - -Above the list of tests there's a filter box which can be directly typed into. -Typing in here narrows down the list of testcases to show only the ones which -match the search query. - -Refreshing the page with your browser's refresh button will reset the test suite. - -When you change your code, you DO NOT need to refesh your browser window. Just -click the "Run Tests" button, or click the individual test to refresh the results. - -If you add a new test case you will need to refresh your browser window however. - - -Running Sweety without JavaScript: ----------------------------------- - -If your web browser has JavaScript disabled you can still use the HTML version -of the test suite. Open up the index.php file in your web browser. - -You'll see the screen is divided into two sections, left -and right. On the left there's a list of test cases with checkboxes next to them -which you can check to run. On the right you get all the verbose output from -running the tests. - -Clicking the "Run Tests" button will run all the currently selected test cases. -This could take a long time depending upon how many tests you have to run, -but once complete you'll see the page again where the tests you selected will -either be red or green indicating a pass or failure. The bar at the right of -the screen will contain aggregate results for all the tests and will be either -red or green to indicate an overall pass or failure. - -Assertion messages appear in the page just like with SimpleTest's HtmlReporter. - -If you want to run just a single test case, click the "Run" icon at the right -of the test (little running man image). - -You can run tests with SimpleTest's HtmlReporter by clicking the HTML icon -(little world image) next to the test case. Tests can be run in XML if needed -too. - -Enjoy! - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/config.php b/vendor/swiftmailer/swiftmailer/test-suite/config.php deleted file mode 100644 index c363b031..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/config.php +++ /dev/null @@ -1,68 +0,0 @@ -setReporter(new Sweety_Reporter_HtmlReporter()); - -$runner->setIgnoredClassRegex(SWEETY_IGNORED_CLASSES); - -$locators = preg_split('/\s*,\s*/', SWEETY_TEST_LOCATOR); -foreach ($locators as $locator) -{ - $runner->registerTestLocator(new $locator()); -} - -if (isset($_GET['test'])) -{ - $testName = $_GET['test']; - $format = isset($_GET['format']) ? $_GET['format'] : Sweety_Runner::REPORT_HTML; - - $runner->runTestCase($testName, $format); -} -else -{ - $runner->runAllTests(); -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter.php deleted file mode 100644 index 345bdc02..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter.php +++ /dev/null @@ -1,69 +0,0 @@ -_name = $name; - $this->_aggregates = array( - 'cases' => 0, - 'run' => 0, - 'passes' => 0, - 'fails' => 0, - 'exceptions' => 0 - ); - } - - /** - * Used so test case reporters can notify this reporter when they've completed. - * @param string $testCase - */ - public function notifyEnded($testCase) - { - $this->_aggregates['run']++; - } - - /** - * Get the reporter used to report on this specific test case. - * @param string $testCase - * @return Sweety_Reporter - */ - public function getReporterFor($testCase) - { - $this->_aggregates['cases']++; - - $reporter = new Sweety_Reporter_CliTestCaseReporter($testCase, $this); - return $reporter; - } - - /** - * Returns true if start() has been invoked. - * @return boolean - */ - public function isStarted() - { - return $this->_started; - } - - /** - * Start reporting. - */ - public function start() - { - $this->_started = true; - echo $this->_name . PHP_EOL; - } - - /** - * Report a skipped test case. - * @param string $message - * @param string $path - */ - public function reportSkip($message, $path) - { - echo " \033[34m\033[1m\033[4mSkip\033[0m:"; - $messageLines = explode(PHP_EOL, wordwrap($message, 74, PHP_EOL)); - foreach ($messageLines as $line) - { - echo ' ' . $line . PHP_EOL; - } - echo ' in: ' . $path . PHP_EOL; - } - - /** - * Report a passing assertion. - * @param string $message - * @param string $path - */ - public function reportPass($message, $path) - { - $this->_aggregates['passes']++; - } - - /** - * Report a failing assertion. - * @param string $message - * @param string $path - */ - public function reportFail($message, $path) - { - $this->_aggregates['fails']++; - - echo "\033[31m" . $this->_aggregates['fails'] . ') '; - echo $message . "\033[0m" . PHP_EOL; - echo ' in: ' . $path . PHP_EOL; - } - - /** - * Report an unexpected exception. - * @param string $message - * @param string $path - */ - public function reportException($message, $path) - { - $this->_aggregates['exceptions']++; - - echo "\033[31m\033[1mException" . $this->_aggregates['exceptions'] . "\033[0m!" . PHP_EOL; - echo "\033[1m" . $message . "\033[0m" . PHP_EOL; - echo ' in ' . $path . PHP_EOL; - } - - /** - * Report output from something like a dump(). - * @param string $output - * @param string $path - */ - public function reportOutput($output, $path) - { - if (preg_match('/^\{image @ (.*?)\}$/D', $output, $matches)) - { - echo " \033[33mSmoke Test\033[0m" . PHP_EOL; - echo ' Compare email sent with image @ ' . $matches[1] . PHP_EOL; - } - else - { - echo '--------------------' . PHP_EOL; - echo $output . PHP_EOL; - echo '--------------------' . PHP_EOL; - } - } - - /** - * End reporting. - */ - public function finish() - { - $this->_started = false; - - $incomplete = $this->_aggregates['cases'] - $this->_aggregates['run']; - - if ($incomplete) - { - echo '**********************' . PHP_EOL; - echo $incomplete . ' test case(s) did not complete.' . PHP_EOL . - 'This may be because invalid XML was output during the test run' . PHP_EOL . - 'and/or because an error occured.' . PHP_EOL . - 'Try running the tests separately for more detail.' . PHP_EOL; - echo '**********************' . PHP_EOL; - } - - $success = (!$this->_aggregates['fails'] && !$this->_aggregates['exceptions'] - && $this->_aggregates['cases'] == $this->_aggregates['run']); - - if ($success) - { - echo "\033[32m\033[1mOK\033[0m" . PHP_EOL; - } - else - { - echo "\033[31m\033[1mFAILURES!!!\033[0m" . PHP_EOL; - } - - echo 'Test cases run: '; - echo $this->_aggregates['run'] . '/' . $this->_aggregates['cases'] . ', '; - echo 'Passes: ' . $this->_aggregates['passes'] . ', '; - echo 'Failures: ' . $this->_aggregates['fails'] . ', '; - echo 'Exceptions: '. $this->_aggregates['exceptions'] . PHP_EOL; - - exit((int) !$success); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter/CliTestCaseReporter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter/CliTestCaseReporter.php deleted file mode 100644 index ba238344..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter/CliTestCaseReporter.php +++ /dev/null @@ -1,160 +0,0 @@ -_parent = $parent; - $this->_testCase = $testCase; - $this->_aggregates = array( - 'passes' => 0, - 'fails' => 0, - 'exceptions' => 0 - ); - } - - /** - * Get the reporter used to report on this specific test case. - * This method is stubbed only to return itself. - * @param string $testCase - * @return Sweety_Reporter - */ - public function getReporterFor($testCase) - { - return $this; - } - - /** - * Returns true if start() has been invoked. - * @return boolean - */ - public function isStarted() - { - return $this->_started; - } - - /** - * Start reporting. - */ - public function start() - { - $this->_started = true; - } - - /** - * Report a skipped test case. - * @param string $message - * @param string $path - */ - public function reportSkip($message, $path) - { - $this->_parent->reportSkip($message, $path); - } - - /** - * Report a passing assertion. - * @param string $message - * @param string $path - */ - public function reportPass($message, $path) - { - $this->_aggregates['passes']++; - $this->_parent->reportPass($message, $path); - } - - /** - * Report a failing assertion. - * @param string $message - * @param string $path - */ - public function reportFail($message, $path) - { - $this->_aggregates['fails']++; - $this->_parent->reportFail($message, $path); - } - - /** - * Report an unexpected exception. - * @param string $message - * @param string $path - */ - public function reportException($message, $path) - { - $this->_aggregates['exceptions']++; - $this->_parent->reportException($message, $path); - } - - /** - * Report output from something like a dump(). - * @param string $output - * @param string $path - */ - public function reportOutput($output, $path) - { - $this->_parent->reportOutput($output, $path); - } - - /** - * End reporting. - */ - public function finish() - { - $this->_started = false; - - if (!$this->_aggregates['fails'] && !$this->_aggregates['exceptions']) - { - echo ' >> ' . $this->_testCase . ' '; - echo "\033[32mOK\033[0m" . PHP_EOL; - } - else - { - echo ' !! ' . $this->_testCase . ' '; - echo "\033[31mFAILED\033[0m" . PHP_EOL; - } - - $this->_parent->notifyEnded($this->_testCase); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter/HtmlReporter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter/HtmlReporter.php deleted file mode 100644 index 6a153392..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter/HtmlReporter.php +++ /dev/null @@ -1,174 +0,0 @@ -_tplVars =& $vars; - } - - /** - * Used so test case reporters can notify this reporter when they've completed. - * @param string $testCase - */ - public function notifyEnded($testCase) - { - $this->_tplVars['runTests'][] = $testCase; - $this->_tplVars['runCount']++; - } - - /** - * Get the reporter used to report on this specific test case. - * @param string $testCase - * @return Sweety_Reporter - */ - public function getReporterFor($testCase) - { - $this->_tplVars['caseCount']++; - - $reporter = new Sweety_Reporter_HtmlTestCaseReporter($testCase, $this); - $reporter->setTemplateVars($this->_tplVars); - return $reporter; - } - - /** - * Returns true if start() has been invoked. - * @return boolean - */ - public function isStarted() - { - return $this->_started; - } - - /** - * Start reporting. - */ - public function start() - { - $this->_started = true; - } - - /** - * Report a skipped test case. - * @param string $message - * @param string $path - */ - public function reportSkip($message, $path) - { - $this->_tplVars['messages'][] = array( - 'type' => 'skip', - 'path' => $path, - 'text' => $message); - } - - /** - * Report a passing assertion. - * @param string $message - * @param string $path - */ - public function reportPass($message, $path) - { - $this->_tplVars['passCount']++; - } - - /** - * Report a failing assertion. - * @param string $message - * @param string $path - */ - public function reportFail($message, $path) - { - $this->_tplVars['failCount']++; - $this->_tplVars['messages'][] = array( - 'type' => 'fail', - 'path' => $path, - 'text' => $message); - } - - /** - * Report an unexpected exception. - * @param string $message - * @param string $path - */ - public function reportException($message, $path) - { - $this->_tplVars['exceptionCount']++; - $this->_tplVars['messages'][] = array( - 'type' => 'exception', - 'path' => $path, - 'text' => $message); - } - - /** - * Report output from something like a dump(). - * @param string $output - * @param string $path - */ - public function reportOutput($output, $path) - { - $this->_tplVars['messages'][] = array( - 'type' => 'output', - 'path' => $path, - 'text' => $output); - } - - /** - * End reporting. - */ - public function finish() - { - $this->_started = false; - - if (!$this->_tplVars['failCount'] && !$this->_tplVars['exceptionCount'] - && $this->_tplVars['caseCount'] == $this->_tplVars['runCount']) - { - $this->_tplVars['result'] = 'pass'; - } - else - { - $this->_tplVars['result'] = 'fail'; - } - - $incomplete = $this->_tplVars['caseCount'] - $this->_tplVars['runCount']; - - if (0 < $incomplete) - { - $this->_tplVars['messages'][] = array( - 'type' => 'internal', - 'path' => '', - 'text' => $incomplete . ' test case(s) did not complete.' . - ' This may be because invalid XML was output during the test run' . - ' and/or because an error occured.' . - ' Incomplete test cases are shown in yellow. Click the HTML link ' . - 'next to the test for more detail.' - ); - } - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter/HtmlTestCaseReporter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter/HtmlTestCaseReporter.php deleted file mode 100644 index 8d4474da..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Reporter/HtmlTestCaseReporter.php +++ /dev/null @@ -1,174 +0,0 @@ -_parent = $parent; - $this->_testCase = $testCase; - $this->_aggregates = array( - 'passes' => 0, - 'fails' => 0, - 'exceptions' => 0 - ); - } - - /** - * Set template data. - * @param mixed[] - */ - public function setTemplateVars(&$vars) - { - $this->_tplVars =& $vars; - } - - /** - * Get the reporter used to report on this specific test case. - * This method is stubbed only to return itself. - * @param string $testCase - * @return Sweety_Reporter - */ - public function getReporterFor($testCase) - { - return $this; - } - - /** - * Returns true if start() has been invoked. - * @return boolean - */ - public function isStarted() - { - return $this->_started; - } - - /** - * Start reporting. - */ - public function start() - { - $this->_started = true; - $this->_tplVars['runTests'][$this->_testCase] = 'running'; - } - - /** - * Report a skipped test case. - * @param string $message - * @param string $path - */ - public function reportSkip($message, $path) - { - $this->_parent->reportSkip($message, $path); - } - - /** - * Report a passing assertion. - * @param string $message - * @param string $path - */ - public function reportPass($message, $path) - { - $this->_aggregates['passes']++; - $this->_parent->reportPass($message, $path); - } - - /** - * Report a failing assertion. - * @param string $message - * @param string $path - */ - public function reportFail($message, $path) - { - $this->_aggregates['fails']++; - $this->_parent->reportFail($message, $path); - } - - /** - * Report an unexpected exception. - * @param string $message - * @param string $path - */ - public function reportException($message, $path) - { - $this->_aggregates['exceptions']++; - $this->_parent->reportException($message, $path); - } - - /** - * Report output from something like a dump(). - * @param string $output - * @param string $path - */ - public function reportOutput($output, $path) - { - $this->_parent->reportOutput($output, $path); - } - - /** - * End reporting. - */ - public function finish() - { - $this->_started = false; - - if (!$this->_aggregates['fails'] && !$this->_aggregates['exceptions']) - { - $this->_tplVars['runTests'][$this->_testCase] = 'pass'; - } - else - { - $this->_tplVars['runTests'][$this->_testCase] = 'fail'; - } - - $this->_parent->notifyEnded($this->_testCase); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Runner.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Runner.php deleted file mode 100644 index b07ddb43..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Runner.php +++ /dev/null @@ -1,56 +0,0 @@ -_reporter = $reporter; - } - - /** - * Get the reporter used for showing results. - * @return Sweety_Reporter - */ - public function getReporter() - { - return $this->_reporter; - } - - /** - * Register a test locator instance. - * @param Sweety_TestLocator $locator - */ - public function registerTestLocator(Sweety_TestLocator $locator) - { - $this->_testLocators[] = $locator; - } - - /** - * Set the regular expression used to filter out certain class names. - * @param string $ignoredClassRegex - */ - public function setIgnoredClassRegex($ignoredClassRegex) - { - $this->_ignoredClassRegex = $ignoredClassRegex; - } - - /** - * Get the filtering regular expression for ignoring certain classes. - * @return string - */ - public function getIgnoredClassRegex() - { - return $this->_ignoredClassRegex; - } - - /** - * Run a single test case with the given name, using the provided output format. - * @param string $testName - * @param string $format (xml, text or html) - * @return int - */ - public function runTestCase($testName, $format = Sweety_Runner::REPORT_TEXT) - { - foreach ($this->_testLocators as $locator) - { - if ($locator->includeTest($testName)) - { - break; - } - } - - $testClass = new ReflectionClass($testName); - if ($testClass->getConstructor()) - { - //We don't want test output to be cached - if (!SimpleReporter::inCli()) - { - header("Cache-Control: no-cache, must-revalidate"); - header("Pragma: no-cache"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - } - - switch ($format) - { - case Sweety_Runner::REPORT_HTML: - $reporter = new HtmlReporter(); - break; - case Sweety_Runner::REPORT_XML: - if (!SimpleReporter::inCli()) - { - header("Content-Type: text/xml"); //Sigh! SimpleTest (skip() issues). - } - $reporter = new XmlReporter(); - break; - case Sweety_Runner::REPORT_TEXT: - default: - $reporter = new TextReporter(); - break; - } - $test = $testClass->newInstance(); - return $test->run($reporter) ? 0 : 1; - } - - return 1; - } - - /** - * Use strategies to find tests which are runnable. - * @param string[] $dirs - * @return string[] - */ - protected function findTests($dirs = array()) - { - $tests = array(); - foreach ($this->_testLocators as $locator) - { - $tests += $locator->getTests($dirs); - } - return $tests; - } - - /** - * Parse an XML response from a test case an report to the reporter. - * @param string $xml - * @param string $testCase - */ - protected function parseXml($xml, $testCase) - { - $reporter = $this->_reporter->getReporterFor($testCase); - if (!$reporter->isStarted()) - { - $reporter->start(); - } - - $xml = str_replace("\0", '?', trim($xml)); - $xml = preg_replace('/[^\x01-\x7F]/e', 'sprintf("&#%d;", ord("$0"));', $xml); //Do something better? - if (!empty($xml)) - { - $document = @simplexml_load_string($xml); - if ($document) - { - $this->_parseDocument($document, $testCase, $reporter); - $reporter->finish(); - return; - } - } - - $reporter->reportException( - 'Invalid XML response: ' . - trim(strip_tags( - preg_replace('/^\s*<\?xml.+<\/(?:name|pass|fail|exception)>/s', '', $xml) - )), - $testCase - ); - } - - /** - * Parse formatted test output. - * @param SimpleXMLElement The node containing the output - * @param string $path to this test method - * @access private - */ - private function _parseFormatted(SimpleXMLElement $formatted, $path = '', - Sweety_Reporter $reporter) - { - $reporter->reportOutput((string)$formatted, $path); - } - - /** - * Parse test output. - * @param SimpleXMLElement The node containing the output - * @param string $path to this test method - * @access private - */ - private function _parseMessage(SimpleXMLElement $message, $path = '', - Sweety_Reporter $reporter) - { - $reporter->reportOutput((string)$message, $path); - } - - /** - * Parse a test failure. - * @param SimpleXMLElement The node containing the fail - * @param string $path to this test method - * @access private - */ - private function _parseFailure(SimpleXMLElement $failure, $path = '', - Sweety_Reporter $reporter) - { - $reporter->reportFail((string)$failure, $path); - } - - /** - * Parse an exception. - * @param SimpleXMLElement The node containing the exception - * @param string $path to this test method - * @access private - */ - private function _parseException(SimpleXMLElement $exception, $path = '', - Sweety_Reporter $reporter) - { - $reporter->reportException((string)$exception, $path); - } - - /** - * Parse a pass. - * @param SimpleXMLElement The node containing this pass. - * @param string $path to this test method - * @access private - */ - private function _parsePass(SimpleXMLElement $pass, $path = '', - Sweety_Reporter $reporter) - { - $reporter->reportPass((string)$pass, $path); - } - - /** - * Parse a single test case. - * @param SimpleXMLElement The node containing the test case - * @param string $path to this test case - * @access private - */ - private function _parseTestCase(SimpleXMLElement $testCase, $path = '', - Sweety_Reporter $reporter) - { - foreach ($testCase->xpath('./test') as $testMethod) - { - $testMethodName = (string) $this->_firstNodeValue($testMethod->xpath('./name')); - - foreach ($testMethod->xpath('./formatted') as $formatted) - { - $this->_parseFormatted( - $formatted, $path . ' -> ' . $testMethodName, $reporter); - } - - foreach ($testMethod->xpath('./message') as $message) - { - $this->_parseMessage( - $message, $path . ' -> ' . $testMethodName, $reporter); - } - - foreach ($testMethod->xpath('./fail') as $failure) - { - $this->_parseFailure( - $failure, $path . ' -> ' . $testMethodName, $reporter); - } - - foreach ($testMethod->xpath('./exception') as $exception) - { - $this->_parseException( - $exception, $path . ' -> ' . $testMethodName, $reporter); - } - - foreach ($testMethod->xpath('./pass') as $pass) - { - $this->_parsePass($pass, $path . ' -> ' . $testMethodName, $reporter); - } - - $stdout = trim((string) $testMethod); - if ($stdout) - { - $reporter->reportOutput($stdout, $path . ' -> ' . $testMethodName); - } - } - } - - /** - * Parse the results of all tests. - * @param SimpleXMLElement The node containing the tests - * @param string $path to the tests - * @access private - */ - private function _parseResults(SimpleXMLElement $document, $path = '', - Sweety_Reporter $reporter) - { - $groups = $document->xpath('./group'); - if (!empty($groups)) - { - foreach ($groups as $group) - { - $groupName = (string) $this->_firstNodeValue($group->xpath('./name')); - $this->_parseResults($group, $path . ' -> ' . $groupName, $reporter); - } - } - else - { - foreach ($document->xpath('./case') as $testCase) - { - $this->_parseTestCase($testCase, $path, $reporter); - } - } - } - - /** - * Parse the entire SimpleTest XML document from a test case. - * @param SimpleXMLElement $document to parse - * @param string $path to the test - * @access private - */ - private function _parseDocument(SimpleXMLElement $document, $path = '', - Sweety_Reporter $reporter) - { - if ($everything = $this->_firstNodeValue($document->xpath('/run'))) - { - $this->_parseResults($everything, $path, $reporter); - } - elseif ($skip = $this->_firstNodeValue($document->xpath('/skip'))) - { - $reporter->reportSkip((string) $skip, $path); - } - } - - protected function _sort($a, $b) - { - $apkg = preg_replace('/_[^_]+$/D', '', $a); - $bpkg = preg_replace('/_[^_]+$/D', '', $b); - if ($apkg == $bpkg) - { - if ($a == $b) - { - return 0; - } - else - { - return ($a > $b) ? 1 : -1; - } - } - else - { - return ($apkg > $bpkg) ? 1 : -1; - } - } - - private function _firstNodeValue($nodeSet) - { - $first = array_shift($nodeSet); - return $first; - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Runner/CliRunner.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Runner/CliRunner.php deleted file mode 100644 index c3e4026c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Runner/CliRunner.php +++ /dev/null @@ -1,128 +0,0 @@ -_dirs = $dirs; - $this->_command = $command; - } - - /** - * Runs all test cases found under the given directories. - * @param string[] $directories to scan for test cases - * @param string To be prepended to class names - * @return int - */ - public function runAllTests($dirs = array()) - { - if (empty($dirs)) - { - $dirs = $this->_dirs; - } - - $reporter = $this->getReporter(); - - if (!$reporter->isStarted()) - { - $reporter->start(); - } - - $tests = $this->findTests($dirs); - usort($tests, array($this, '_sort')); - - global $argv; - - if (!empty($argv[1])) - { - if (substr($argv[1], 0, 1) == '!') - { - $argv[1] = substr($argv[1], 1); - foreach ($tests as $index => $name) - { - if (@preg_match($argv[1] . 'i', $name)) - { - unset($tests[$index]); - } - } - } - else - { - foreach ($tests as $index => $name) - { - if (!@preg_match($argv[1] . 'i', $name)) - { - unset($tests[$index]); - } - } - } - } - - $ret = $this->_runTestList($tests); - - $reporter->finish(); - - return $ret; - } - - /** - * Run all possible tests from the given list. - * @param string[] $tests - * @return int - */ - protected function _runTestList(array $tests) - { - foreach ($tests as $testCase) - { - if (preg_match($this->getIgnoredClassRegex(), $testCase)) - { - continue; - } - - $command = $this->_command; - $command .= ' ' . $testCase; - $command .= ' ' . Sweety_Runner::REPORT_XML; - - exec($command, $output, $status); - - $xml = implode(PHP_EOL, $output); - - $this->parseXml($xml, $testCase); - - unset($status); - unset($output); - } - - return 0; - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Runner/HtmlRunner.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Runner/HtmlRunner.php deleted file mode 100644 index e1156925..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/Runner/HtmlRunner.php +++ /dev/null @@ -1,160 +0,0 @@ -_dirs = $dirs; - $this->_template = $template; - $this->_name = $name; - } - - /** - * Runs all test cases found under the given directories. - * @param string[] $directories to scan for test cases - * @param string To be prepended to class names - * @return int - */ - public function runAllTests($dirs = array()) - { - //We don't want test output to be cached - header("Cache-Control: no-cache, must-revalidate"); - header("Pragma: no-cache"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - - if (empty($dirs)) - { - $dirs = $this->_dirs; - } - - $testCases = $this->findTests($dirs); - foreach ($testCases as $k => $testCase) - { - if (preg_match($this->getIgnoredClassRegex(), $testCase)) - { - unset($testCases[$k]); - } - } - - usort($testCases, array($this, '_sort')); - - $vars = array( - //String - 'testCases' => $testCases, - //String - 'suiteName' => $this->_name, - // testCase => pass | fail | running - 'runTests' => array(), - //Integer - 'caseCount' => 0, - //Integer - 'runCount' => 0, - //Integer - 'passCount' => 0, - //Integer - 'failCount' => 0, - //Integer - 'exceptionCount' => 0, - // type => pass | fail | exception | output | internal, path => testCase, text => ... - 'messages' => array(), - // pass | fail - 'result' => 'idle' - ); - - if (isset($_REQUEST['runtests'])) - { - $reporter = $this->getReporter(); - $reporter->setTemplateVars($vars); - - if (!$reporter->isStarted()) - { - $reporter->start(); - } - - $this->_runTestList((array)$_REQUEST['runtests'], $reporter); - - $reporter->finish(); - } - else - { - foreach ($testCases as $testCase) - { - $vars['runTests'][$testCase] = 'idle'; //Show all checked by default - } - } - - $this->_render($vars); - } - - /** - * Run tests in the given array using the REST API (kind of). - * @param string[] $tests - * @param Sweety_Reporter $reporter - * @return int - */ - protected function _runTestList(array $tests, Sweety_Reporter $reporter) - { - $protocol = !empty($_SERVER['HTTPS']) ? 'https://' : 'http://'; - - //Most likely a HTTP/1.0 server not supporting HOST header - $server = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '127.0.0.1'; - - $path = '/'; - if (!empty($_SERVER['REQUEST_URI'])) - { - $path = preg_replace('/\?.*$/sD', '', $_SERVER['REQUEST_URI']); - } - - $baseUrl = $protocol . $server . $path; - - foreach ($tests as $testCase) - { - $url = $baseUrl . '?test=' . $testCase . '&format=xml'; - $xml = file_get_contents($url); - $this->parseXml($xml, $testCase); - } - - return 0; - } - - /** - * Renders the view for the suite. - * @param string[] $templateVars - */ - protected function _render($vars = array()) - { - foreach ($vars as $k => $v) - { - $$k = $v; - } - - require_once $this->_template; - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/TestLocator.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/TestLocator.php deleted file mode 100644 index 96e4649f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/Sweety/TestLocator.php +++ /dev/null @@ -1,25 +0,0 @@ -_findTestCases($dirs); - } - - public function includeTest($testCase) - { - $file = str_replace('_', '/', $testCase) . '.php'; - foreach (explode(PATH_SEPARATOR, get_include_path()) as $dir) - { - if (is_file($dir . '/' . $file)) - { - require_once $dir . '/' . $file; - return true; - } - } - - return false; - } - - protected function _findTestCases($dirs = array(), $prepend = '') - { - $ret = array(); - - foreach ($dirs as $dir) - { - if (array_key_exists($dir, $this->_testCache)) - { - $ret += $this->_testCache[$dir]; - continue; - } - - $this->_testCache[$dir] = array(); - - $handle = opendir($dir); - while (false !== $file = readdir($handle)) - { - if (substr($file, 0, 1) != '.' && is_dir($dir . '/' . $file)) - { - foreach ($this->_findTestCases( - array($dir . '/' . $file), $prepend . $file . '_') as $add) - { - $this->_testCache[$dir][] = $add; - $ret[] = $add; - } - } - elseif (substr($file, -4) == '.php') - { - $className = $prepend . basename($file, '.php'); - $this->_testCache[$dir][] = $className; - $ret[] = $className; - } - } - closedir($handle); - } - - sort($ret); - - return $ret; - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE deleted file mode 100644 index d99acd87..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE +++ /dev/null @@ -1,383 +0,0 @@ -Simple Test interface changes -============================= -Because the SimpleTest tool set is still evolving it is likely that tests -written with earlier versions will fail with the newest ones. The most -dramatic changes are in the alpha releases. Here is a list of possible -problems and their fixes... - -Fatal error: Call to undefined method Classname::classname() ------------------------------------------------------------- -SimpleTest renamed all of its constructors from -Classname to __construct; derived classes invoking -their parent constructors should replace parent::Classname() -with parent::__construct(). - -Custom CSS in HtmlReporter not being applied --------------------------------------------- -Batch rename of protected and private methods -means that _getCss() was renamed to getCss(); -replace your function definition accordingly. - -setReturnReference() throws errors in E_STRICT ----------------------------------------------- -Happens when an object is passed by reference. -This also happens with setReturnReferenceAt(). -If you want to return objects then replace these -with calls to returns() and returnsAt() with the -same arguments. This change was forced in the 1.1 -version for E_STRICT compatibility. - -assertReference() throws errors in E_STRICT -------------------------------------------- -Due to language restrictions you cannot compare -both variables and objects in E_STRICT mode. Use -assertSame() in this mode with objects. This change -was forced the 1.1 version. - -Cannot create GroupTest ------------------------ -The GroupTest has been renamed TestSuite (see below). -It was removed completely in 1.1 in favour of this -name. - -No method getRelativeUrls() or getAbsoluteUrls() ------------------------------------------------- -These methods were always a bit weird anyway, and -the new parsing of the base tag makes them more so. -They have been replaced with getUrls() instead. If -you want the old functionality then simply chop -off the current domain from getUrl(). - -Method setWildcard() removed in mocks -------------------------------------- -Even setWildcard() has been removed in 1.0.1beta now. -If you want to test explicitely for a '*' string, then -simply pass in new IdenticalExpectation('*') instead. - -No method _getTest() on mocks ------------------------------ -This has finally been removed. It was a pretty esoteric -flex point anyway. It was there to allow the mocks to -work with other test tools, but no one does this. - -No method assertError(), assertNoErrors(), swallowErrors() ----------------------------------------------------------- -These have been deprecated in 1.0.1beta in favour of -expectError() and expectException(). assertNoErrors() is -redundant if you use expectError() as failures are now reported -immediately. - -No method TestCase::signal() ----------------------------- -This has been deprecated in favour of triggering an error or -throwing an exception. Deprecated as of 1.0.1beta. - -No method TestCase::sendMessage() ---------------------------------- -This has been deprecated as of 1.0.1beta. - -Failure to connect now emits failures -------------------------------------- -It used to be that you would have to use the -getTransferError() call on the web tester to see if -there was a socket level error in a fetch. This check -is now always carried out by the WebTestCase unless -the fetch is prefaced with WebTestCase::ignoreErrors(). -The ignore directive only lasts for test case fetching -action such as get() and click(). - -No method SimpleTestOptions::ignore() -------------------------------------- -This is deprecated in version 1.0.1beta and has been moved -to SimpleTest::ignore() as that is more readable. In -addition, parent classes are also ignored automatically. -If you are using PHP5 you can skip this directive simply -by marking your test case as abstract. - -No method assertCopy() ----------------------- -This is deprecated in 1.0.1 in favour of assertClone(). -The assertClone() method is slightly different in that -the objects must be identical, but without being a -reference. It is thus not a strict inversion of -assertReference(). - -Constructor wildcard override has no effect in mocks ----------------------------------------------------- -As of 1.0.1beta this is now set with setWildcard() instead -of in the constructor. - -No methods setStubBaseClass()/getStubBaseClass() ------------------------------------------------- -As mocks are now used instead of stubs, these methods -stopped working and are now removed as of the 1.0.1beta -release. The mock objects may be freely used instead. - -No method addPartialMockCode() ------------------------------- -The ability to insert arbitrary partial mock code -has been removed. This was a low value feature -causing needless complications. It was removed -in the 1.0.1beta release. - -No method setMockBaseClass() ----------------------------- -The ability to change the mock base class has been -scheduled for removal and is deprecated since the -1.0.1beta version. This was a rarely used feature -except as a workaround for PHP5 limitations. As -these limitations are being resolved it's hoped -that the bundled mocks can be used directly. - -No class Stub -------------- -Server stubs are deprecated from 1.0.1 as the mocks now -have exactly the same interface. Just use mock objects -instead. - -No class SimpleTestOptions --------------------------- -This was replced by the shorter SimpleTest in 1.0.1beta1 -and is since deprecated. - -No file simple_test.php ------------------------ -This was renamed test_case.php in 1.0.1beta to more accurately -reflect it's purpose. This file should never be directly -included in test suites though, as it's part of the -underlying mechanics and has a tendency to be refactored. - -No class WantedPatternExpectation ---------------------------------- -This was deprecated in 1.0.1alpha in favour of the simpler -name PatternExpectation. - -No class NoUnwantedPatternExpectation -------------------------------------- -This was deprecated in 1.0.1alpha in favour of the simpler -name NoPatternExpectation. - -No method assertNoUnwantedPattern() ------------------------------------ -This has been renamed to assertNoPattern() in 1.0.1alpha and -the old form is deprecated. - -No method assertWantedPattern() -------------------------------- -This has been renamed to assertPattern() in 1.0.1alpha and -the old form is deprecated. - -No method assertExpectation() ------------------------------ -This was renamed as assert() in 1.0.1alpha and the old form -has been deprecated. - -No class WildcardExpectation ----------------------------- -This was a mostly internal class for the mock objects. It was -renamed AnythingExpectation to bring it closer to JMock and -NMock in version 1.0.1alpha. - -Missing UnitTestCase::assertErrorPattern() ------------------------------------------- -This method is deprecated for version 1.0.1 onwards. -This method has been subsumed by assertError() that can now -take an expectation. Simply pass a PatternExpectation -into assertError() to simulate the old behaviour. - -No HTML when matching page elements ------------------------------------ -This behaviour has been switched to using plain text as if it -were seen by the user of the browser. This means that HTML tags -are suppressed, entities are converted and whitespace is -normalised. This should make it easier to match items in forms. -Also images are replaced with their "alt" text so that they -can be matched as well. - -No method SimpleRunner::_getTestCase() --------------------------------------- -This was made public as getTestCase() in 1.0RC2. - -No method restartSession() --------------------------- -This was renamed to restart() in the WebTestCase, SimpleBrowser -and the underlying SimpleUserAgent in 1.0RC2. Because it was -undocumented anyway, no attempt was made at backward -compatibility. - -My custom test case ignored by tally() --------------------------------------- -The _assertTrue method has had it's signature changed due to a bug -in the PHP 5.0.1 release. You must now use getTest() from within -that method to get the test case. Mock compatibility with other -unit testers is now deprecated as of 1.0.1alpha as PEAR::PHPUnit2 -should soon have mock support of it's own. - -Broken code extending SimpleRunner ----------------------------------- -This was replaced with SimpleScorer so that I could use the runner -name in another class. This happened in RC1 development and there -is no easy backward compatibility fix. The solution is simply to -extend SimpleScorer instead. - -Missing method getBaseCookieValue() ------------------------------------ -This was renamed getCurrentCookieValue() in RC1. - -Missing files from the SimpleTest suite ---------------------------------------- -Versions of SimpleTest prior to Beta6 required a SIMPLE_TEST constant -to point at the SimpleTest folder location before any of the toolset -was loaded. This is no longer documented as it is now unnecessary -for later versions. If you are using an earlier version you may -need this constant. Consult the documentation that was bundled with -the release that you are using or upgrade to Beta6 or later. - -No method SimpleBrowser::getCurrentUrl() --------------------------------------- -This is replaced with the more versatile showRequest() for -debugging. It only existed in this context for version Beta5. -Later versions will have SimpleBrowser::getHistory() for tracking -paths through pages. It is renamed as getUrl() since 1.0RC1. - -No method Stub::setStubBaseClass() ----------------------------------- -This method has finally been removed in 1.0RC1. Use -SimpleTestOptions::setStubBaseClass() instead. - -No class CommandLineReporter ----------------------------- -This was renamed to TextReporter in Beta3 and the deprecated version -was removed in 1.0RC1. - -No method requireReturn() -------------------------- -This was deprecated in Beta3 and is now removed. - -No method expectCookie() ------------------------- -This method was abruptly removed in Beta4 so as to simplify the internals -until another mechanism can replace it. As a workaround it is necessary -to assert that the cookie has changed by setting it before the page -fetch and then assert the desired value. - -No method clickSubmitByFormId() -------------------------------- -This method had an incorrect name as no button was involved. It was -renamed to submitByFormId() in Beta4 and the old version deprecated. -Now removed. - -No method paintStart() or paintEnd() ------------------------------------- -You should only get this error if you have subclassed the lower level -reporting and test runner machinery. These methods have been broken -down into events for test methods, events for test cases and events -for group tests. The new methods are... - -paintStart() --> paintMethodStart(), paintCaseStart(), paintGroupStart() -paintEnd() --> paintMethodEnd(), paintCaseEnd(), paintGroupEnd() - -This change was made in Beta3, ironically to make it easier to subclass -the inner machinery. Simply duplicating the code you had in the previous -methods should provide a temporary fix. - -No class TestDisplay --------------------- -This has been folded into SimpleReporter in Beta3 and is now deprecated. -It was removed in RC1. - -No method WebTestCase::fetch() ------------------------------- -This was renamed get() in Alpha8. It is removed in Beta3. - -No method submit() ------------------- -This has been renamed clickSubmit() in Beta1. The old method was -removed in Beta2. - -No method clearHistory() ------------------------- -This method is deprecated in Beta2 and removed in RC1. - -No method getCallCount() ------------------------- -This method has been deprecated since Beta1 and has now been -removed. There are now more ways to set expectations on counts -and so this method should be unecessery. Removed in RC1. - -Cannot find file * ------------------- -The following public name changes have occoured... - -simple_html_test.php --> reporter.php -simple_mock.php --> mock_objects.php -simple_unit.php --> unit_tester.php -simple_web.php --> web_tester.php - -The old names were deprecated in Alpha8 and removed in Beta1. - -No method attachObserver() --------------------------- -Prior to the Alpha8 release the old internal observer pattern was -gutted and replaced with a visitor. This is to trade flexibility of -test case expansion against the ease of writing user interfaces. - -Code such as... - -$test = &new MyTestCase(); -$test->attachObserver(new TestHtmlDisplay()); -$test->run(); - -...should be rewritten as... - -$test = &new MyTestCase(); -$test->run(new HtmlReporter()); - -If you previously attached multiple observers then the workaround -is to run the tests twice, once with each, until they can be combined. -For one observer the old method is simulated in Alpha 8, but is -removed in Beta1. - -No class TestHtmlDisplay ------------------------- -This class has been renamed to HtmlReporter in Alpha8. It is supported, -but deprecated in Beta1 and removed in Beta2. If you have subclassed -the display for your own design, then you will have to extend this -class (HtmlReporter) instead. - -If you have accessed the event queue by overriding the notify() method -then I am afraid you are in big trouble :(. The reporter is now -carried around the test suite by the runner classes and the methods -called directly. In the unlikely event that this is a problem and -you don't want to upgrade the test tool then simplest is to write your -own runner class and invoke the tests with... - -$test->accept(new MyRunner(new MyReporter())); - -...rather than the run method. This should be easier to extend -anyway and gives much more control. Even this method is overhauled -in Beta3 where the runner class can be set within the test case. Really -the best thing to do is to upgrade to this version as whatever you were -trying to achieve before should now be very much easier. - -Missing set options method --------------------------- -All test suite options are now in one class called SimpleTestOptions. -This means that options are set differently... - -GroupTest::ignore() --> SimpleTestOptions::ignore() -Mock::setMockBaseClass() --> SimpleTestOptions::setMockBaseClass() - -These changed in Alpha8 and the old versions are now removed in RC1. - -No method setExpected*() ------------------------- -The mock expectations changed their names in Alpha4 and the old names -ceased to be supported in Alpha8. The changes are... - -setExpectedArguments() --> expectArguments() -setExpectedArgumentsSequence() --> expectArgumentsAt() -setExpectedCallCount() --> expectCallCount() -setMaximumCallCount() --> expectMaximumCallCount() - -The parameters remained the same. diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/LICENSE b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/LICENSE deleted file mode 100644 index 09f465ab..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/LICENSE +++ /dev/null @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/README b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/README deleted file mode 100644 index f0912b26..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/README +++ /dev/null @@ -1,108 +0,0 @@ -SimpleTest -========== -You probably got this package from... -http://simpletest.sourceforge.net/projects/simpletest/ - -If there is no licence agreement with this package please download -a version from the location above. You must read and accept that -licence to use this software. The file is titled simply LICENSE. - -What is it? It's a framework for unit testing, web site testing and -mock objects for PHP 5.0.5+. - -If you have used JUnit, you will find this PHP unit testing version very -similar. Also included is a mock objects and server stubs generator. -The stubs can have return values set for different arguments, can have -sequences set also by arguments and can return items by reference. -The mocks inherit all of this functionality and can also have -expectations set, again in sequences and for different arguments. - -A web tester similar in concept to JWebUnit is also included. There is no -JavaScript or tables support, but forms, authentication, cookies and -frames are handled. - -You can see a release schedule at http://simpletest.org/en/overview.html -which is also copied to the documentation folder with this release. -A full PHPDocumenter API documentation exists at -http://simpletest.org/api/. - -The user interface is minimal -in the extreme, but a lot of information flows from the test suite. -After version 1.0 we will release a better web UI, but we are leaving XUL -and GTk versions to volunteers as everybody has their own opinion -on a good GUI, and we don't want to discourage development by shipping -one with the toolkit. You can download an Eclipse plug-in separately. - -You are looking at a second full release. The unit tests for SimpleTest -itself can be run here... - -simpletest/test/unit_tests.php - -And tests involving live network connections as well are here... - -simpletest/test/all_tests.php - -The full tests will typically overrun the 8Mb limit often allowed -to a PHP process. A workaround is to run the tests on the command -with a custom php.ini file if you do not have access to your server -version. - -You will have to edit the all_tests.php file if you are accesssing -the internet through a proxy server. See the comments in all_tests.php -for instructions. - -The full tests read some test data from the LastCraft site. If the site -is down or has been modified for a later version then you will get -spurious errors. A unit_tests.php failure on the other hand would be -very serious. As far as we know we haven't yet managed to check in any -unit test failures, so please correct us if you find one. - -Even if all of the tests run please verify that your existing test suites -also function as expected. If they don't see the file... - -HELP_MY_TESTS_DONT_WORK_ANYMORE - -This contains information on interface changes. It also points out -deprecated interfaces, so you should read this even if all of -your current tests appear to run. - -There is a documentation folder which contains the core reference information -in English and French, although this information is fairly basic. -You can find a tutorial on... - -http://simpletest.org/en/first_test_tutorial.html - -...to get you started and this material will eventually become included -with the project documentation. A French translation exists at... - -http://simpletest.org/fr/first_test_tutorial.html - -If you download and use, and possibly even extend this tool, please let us -know. Any feedback, even bad, is always welcome and we will work to get -your suggestions into the next release. Ideally please send your -comments to... - -simpletest-support@lists.sourceforge.net - -...so that others can read them too. We usually try to respond within 48 -hours. - -There is no change log except at Sourceforge. You can visit the -release notes to see the completed TODO list after each cycle and also the -status of any bugs, but if the bug is recent then it will be fixed in SVN only. -The SVN check-ins always have all the tests passing and so SVN snapshots should -be pretty usable, although the code may not look so good internally. - -Oh, yes. It is called "Simple" because it should be simple to -use. We intend to add a complete set of tools for a test first -and "test as you code" type of development. "Simple" does not -mean "Lite" in this context. - -Thanks to everyone who has sent comments and offered suggestions. They -really are invaluable, but sadly you are too many to mention in full. -Thanks to all on the advanced PHP forum on SitePoint, especially Harry -Fuecks. Early adopters are always an inspiration. - -Marcus Baker, Jason Sweat, Travis Swicegood, Perrick Penet and Edward Z. Yang. --- -marcus@lastcraft.com diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/TODO.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/TODO.xml deleted file mode 100644 index 3fa84e96..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/TODO.xml +++ /dev/null @@ -1,176 +0,0 @@ - - - TODO tasks for the current iteration - -
-

- The following is the approximate plan for the next full point release. -

-

- Before each release we hope to have the following done. - More may get done, depending on the interest of the volunteers, - but this is the current minimum. -

-

- The aim of this release cycle is to produce a functionally - identical version to the 1.0.1 release, but bug-fixed and - fully compatible with PHP 5.0.5+ under E_STRICT. - We are also hoping to flush out issues and use cases - caused by people hacking against unpublished flex points - in SimpleTest. - We want to break people's code now, not while we are developing - features down the line. -

-

- With the website move to a new server, and more developers, - we are able and need to improve the test automation and developer - cooperation. - This release is a deep drawing of breath before going forward. -

-
-
- - - Undefined property $_reporter + fatal error - - - - - - - - - The HELP_MY_TESTS_DONT_WORK_ANYMORE needs to be updated. - - README needs to be updated. - - Write XSLT code for this file so Perrick doesn't strangle me - - - - Ensure extensions are compatible with PHP5 constructor renaming in the current trunk. - - - Update PEAR package task to be compatible with latest PEAR installer. - PHP 5.3 compatible under E_STRICT - PHP 5.2.0-5 compatible under E_STRICT - PHP 5.1.0-6 compatible under E_STRICT - continuous integration - error_reporting(E_ALL|E_STRICT)gives lots of warning - Remove all deprecated methods - - Drop underscores from protected methods and - private variables. - Make all variables private and add protected - accessors where we use them internally. - - That way people will start complaining. - Upon each complaint we'll add an accessor and - capture the use case from them. - - We'll stick the use cases in the feature request tracker for now - - Move web site to new server - - - - - - - Deprecate all mentions of GroupTest without breaking - existing code. - - Need to swap the terminology for TestSuite - in method names, etc. - - - XmlReporter generating invalid XML - - - Remove reflection facade for PHP4 - - - - label not assigned to radio and checkbox - incorrect proxy requests - - - - Docblocks need to be cut back to a minimum - - - - PHP 5.0.5 compatible under E_STRICT - Move acceptance tests sample pages to new server - - - - - - - Remove reflection facade for PHP4 - - - - - - Throw away old tutorial - - - - PHP 6 compatible under E_STRICT - - Automated nightly test script that runs tests on all - targeted PHP versions. - - - -
-
- - -
Current iteration is 1.1beta. - - - Upcoming tasks for - Unit tester, - Reporter, - Mock objects, - Parser, - Browser, - Web tester, - Documentation, - Extensions and - Build. - - - - - Trackers for : - feature requests, - bugs and - patches. - - - - - software development, - computer programmer, - php programming, - programming php, - software development company, - software development uk, - php tutorial, - bespoke software development uk, - corporate web development, - architecture, - freelancer, - php resources, - wordtracker, - web marketing, - serach engines, - web positioning, - internet marketing - - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/VERSION b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/VERSION deleted file mode 100644 index ab8bad02..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.1beta \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/authentication.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/authentication.php deleted file mode 100644 index 5af66ec6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/authentication.php +++ /dev/null @@ -1,237 +0,0 @@ -type = $type; - $this->root = $url->getBasePath(); - $this->username = false; - $this->password = false; - } - - /** - * Adds another location to the realm. - * @param SimpleUrl $url Somewhere in realm. - * @access public - */ - function stretch($url) { - $this->root = $this->getCommonPath($this->root, $url->getPath()); - } - - /** - * Finds the common starting path. - * @param string $first Path to compare. - * @param string $second Path to compare. - * @return string Common directories. - * @access private - */ - protected function getCommonPath($first, $second) { - $first = explode('/', $first); - $second = explode('/', $second); - for ($i = 0; $i < min(count($first), count($second)); $i++) { - if ($first[$i] != $second[$i]) { - return implode('/', array_slice($first, 0, $i)) . '/'; - } - } - return implode('/', $first) . '/'; - } - - /** - * Sets the identity to try within this realm. - * @param string $username Username in authentication dialog. - * @param string $username Password in authentication dialog. - * @access public - */ - function setIdentity($username, $password) { - $this->username = $username; - $this->password = $password; - } - - /** - * Accessor for current identity. - * @return string Last succesful username. - * @access public - */ - function getUsername() { - return $this->username; - } - - /** - * Accessor for current identity. - * @return string Last succesful password. - * @access public - */ - function getPassword() { - return $this->password; - } - - /** - * Test to see if the URL is within the directory - * tree of the realm. - * @param SimpleUrl $url URL to test. - * @return boolean True if subpath. - * @access public - */ - function isWithin($url) { - if ($this->isIn($this->root, $url->getBasePath())) { - return true; - } - if ($this->isIn($this->root, $url->getBasePath() . $url->getPage() . '/')) { - return true; - } - return false; - } - - /** - * Tests to see if one string is a substring of - * another. - * @param string $part Small bit. - * @param string $whole Big bit. - * @return boolean True if the small bit is - * in the big bit. - * @access private - */ - protected function isIn($part, $whole) { - return strpos($whole, $part) === 0; - } -} - -/** - * Manages security realms. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleAuthenticator { - private $realms; - - /** - * Clears the realms. - * @access public - */ - function SimpleAuthenticator() { - $this->restartSession(); - } - - /** - * Starts with no realms set up. - * @access public - */ - function restartSession() { - $this->realms = array(); - } - - /** - * Adds a new realm centered the current URL. - * Browsers privatey wildly on their behaviour in this - * regard. Mozilla ignores the realm and presents - * only when challenged, wasting bandwidth. IE - * just carries on presenting until a new challenge - * occours. SimpleTest tries to follow the spirit of - * the original standards committee and treats the - * base URL as the root of a file tree shaped realm. - * @param SimpleUrl $url Base of realm. - * @param string $type Authentication type for this - * realm. Only Basic authentication - * is currently supported. - * @param string $realm Name of realm. - * @access public - */ - function addRealm($url, $type, $realm) { - $this->realms[$url->getHost()][$realm] = new SimpleRealm($type, $url); - } - - /** - * Sets the current identity to be presented - * against that realm. - * @param string $host Server hosting realm. - * @param string $realm Name of realm. - * @param string $username Username for realm. - * @param string $password Password for realm. - * @access public - */ - function setIdentityForRealm($host, $realm, $username, $password) { - if (isset($this->realms[$host][$realm])) { - $this->realms[$host][$realm]->setIdentity($username, $password); - } - } - - /** - * Finds the name of the realm by comparing URLs. - * @param SimpleUrl $url URL to test. - * @return SimpleRealm Name of realm. - * @access private - */ - protected function findRealmFromUrl($url) { - if (! isset($this->realms[$url->getHost()])) { - return false; - } - foreach ($this->realms[$url->getHost()] as $name => $realm) { - if ($realm->isWithin($url)) { - return $realm; - } - } - return false; - } - - /** - * Presents the appropriate headers for this location. - * @param SimpleHttpRequest $request Request to modify. - * @param SimpleUrl $url Base of realm. - * @access public - */ - function addHeaders(&$request, $url) { - if ($url->getUsername() && $url->getPassword()) { - $username = $url->getUsername(); - $password = $url->getPassword(); - } elseif ($realm = $this->findRealmFromUrl($url)) { - $username = $realm->getUsername(); - $password = $realm->getPassword(); - } else { - return; - } - $this->addBasicHeaders($request, $username, $password); - } - - /** - * Presents the appropriate headers for this - * location for basic authentication. - * @param SimpleHttpRequest $request Request to modify. - * @param string $username Username for realm. - * @param string $password Password for realm. - * @access public - */ - static function addBasicHeaders(&$request, $username, $password) { - if ($username && $password) { - $request->addHeaderLine( - 'Authorization: Basic ' . base64_encode("$username:$password")); - } - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/autorun.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/autorun.php deleted file mode 100644 index 03729bf7..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/autorun.php +++ /dev/null @@ -1,97 +0,0 @@ -createSuiteFromClasses( - basename(initial_file()), - $loader->selectRunnableTests($candidates)); - $result = $suite->run(new DefaultReporter()); - } catch (Exception $stack_frame_fix) { - print $stack_frame_fix->getMessage(); - $result = false; - } - if (SimpleReporter::inCli()) { - exit($result ? 0 : 1); - } -} - -/** - * Checks the current test context to see if a test has - * ever been run. - * @return boolean True if tests have run. - */ -function tests_have_run() { - if ($context = SimpleTest::getContext()) { - return (boolean)$context->getTest(); - } - return false; -} - -/** - * The first autorun file. - * @return string Filename of first autorun script. - */ -function initial_file() { - static $file = false; - if (! $file) { - if (isset($_SERVER, $_SERVER['SCRIPT_FILENAME'])) { - $file = $_SERVER['SCRIPT_FILENAME']; - } else { - $included_files = get_included_files(); - $file = reset($included_files); - } - } - return $file; -} - -/** - * Just the classes from the first autorun script. May - * get a few false positives, as it just does a regex based - * on following the word "class". - * @return array List of all possible classes in first - * autorun script. - */ -function classes_defined_in_initial_file() { - if (preg_match_all('/\bclass\s+(\w+)/i', file_get_contents(initial_file()), $matches)) { - return array_map('strtolower', $matches[1]); - } - return array(); -} - -/** - * Every class since the first autorun include. This - * is safe enough if require_once() is alwyas used. - * @return array Class names. - */ -function capture_new_classes() { - global $SIMPLETEST_AUTORUNNER_INITIAL_CLASSES; - return array_map('strtolower', array_diff(get_declared_classes(), - $SIMPLETEST_AUTORUNNER_INITIAL_CLASSES ? - $SIMPLETEST_AUTORUNNER_INITIAL_CLASSES : array())); -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/browser.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/browser.php deleted file mode 100644 index da0379d4..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/browser.php +++ /dev/null @@ -1,1094 +0,0 @@ -sequence = array(); - $this->position = -1; - } - - /** - * Test for no entries yet. - * @return boolean True if empty. - * @access private - */ - protected function isEmpty() { - return ($this->position == -1); - } - - /** - * Test for being at the beginning. - * @return boolean True if first. - * @access private - */ - protected function atBeginning() { - return ($this->position == 0) && ! $this->isEmpty(); - } - - /** - * Test for being at the last entry. - * @return boolean True if last. - * @access private - */ - protected function atEnd() { - return ($this->position + 1 >= count($this->sequence)) && ! $this->isEmpty(); - } - - /** - * Adds a successfully fetched page to the history. - * @param SimpleUrl $url URL of fetch. - * @param SimpleEncoding $parameters Any post data with the fetch. - * @access public - */ - function recordEntry($url, $parameters) { - $this->dropFuture(); - array_push( - $this->sequence, - array('url' => $url, 'parameters' => $parameters)); - $this->position++; - } - - /** - * Last fully qualified URL for current history - * position. - * @return SimpleUrl URL for this position. - * @access public - */ - function getUrl() { - if ($this->isEmpty()) { - return false; - } - return $this->sequence[$this->position]['url']; - } - - /** - * Parameters of last fetch from current history - * position. - * @return SimpleFormEncoding Post parameters. - * @access public - */ - function getParameters() { - if ($this->isEmpty()) { - return false; - } - return $this->sequence[$this->position]['parameters']; - } - - /** - * Step back one place in the history. Stops at - * the first page. - * @return boolean True if any previous entries. - * @access public - */ - function back() { - if ($this->isEmpty() || $this->atBeginning()) { - return false; - } - $this->position--; - return true; - } - - /** - * Step forward one place. If already at the - * latest entry then nothing will happen. - * @return boolean True if any future entries. - * @access public - */ - function forward() { - if ($this->isEmpty() || $this->atEnd()) { - return false; - } - $this->position++; - return true; - } - - /** - * Ditches all future entries beyond the current - * point. - * @access private - */ - protected function dropFuture() { - if ($this->isEmpty()) { - return; - } - while (! $this->atEnd()) { - array_pop($this->sequence); - } - } -} - -/** - * Simulated web browser. This is an aggregate of - * the user agent, the HTML parsing, request history - * and the last header set. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleBrowser { - private $user_agent; - private $page; - private $history; - private $ignore_frames; - private $maximum_nested_frames; - - /** - * Starts with a fresh browser with no - * cookie or any other state information. The - * exception is that a default proxy will be - * set up if specified in the options. - * @access public - */ - function __construct() { - $this->user_agent = $this->createUserAgent(); - $this->user_agent->useProxy( - SimpleTest::getDefaultProxy(), - SimpleTest::getDefaultProxyUsername(), - SimpleTest::getDefaultProxyPassword()); - $this->page = new SimplePage(); - $this->history = $this->createHistory(); - $this->ignore_frames = false; - $this->maximum_nested_frames = DEFAULT_MAX_NESTED_FRAMES; - } - - /** - * Creates the underlying user agent. - * @return SimpleFetcher Content fetcher. - * @access protected - */ - protected function createUserAgent() { - return new SimpleUserAgent(); - } - - /** - * Creates a new empty history list. - * @return SimpleBrowserHistory New list. - * @access protected - */ - protected function createHistory() { - return new SimpleBrowserHistory(); - } - - /** - * Disables frames support. Frames will not be fetched - * and the frameset page will be used instead. - * @access public - */ - function ignoreFrames() { - $this->ignore_frames = true; - } - - /** - * Enables frames support. Frames will be fetched from - * now on. - * @access public - */ - function useFrames() { - $this->ignore_frames = false; - } - - /** - * Switches off cookie sending and recieving. - * @access public - */ - function ignoreCookies() { - $this->user_agent->ignoreCookies(); - } - - /** - * Switches back on the cookie sending and recieving. - * @access public - */ - function useCookies() { - $this->user_agent->useCookies(); - } - - /** - * Parses the raw content into a page. Will load further - * frame pages unless frames are disabled. - * @param SimpleHttpResponse $response Response from fetch. - * @param integer $depth Nested frameset depth. - * @return SimplePage Parsed HTML. - * @access private - */ - protected function parse($response, $depth = 0) { - $page = $this->buildPage($response); - if ($this->ignore_frames || ! $page->hasFrames() || ($depth > $this->maximum_nested_frames)) { - return $page; - } - $frameset = new SimpleFrameset($page); - foreach ($page->getFrameset() as $key => $url) { - $frame = $this->fetch($url, new SimpleGetEncoding(), $depth + 1); - $frameset->addFrame($frame, $key); - } - return $frameset; - } - - /** - * Assembles the parsing machinery and actually parses - * a single page. Frees all of the builder memory and so - * unjams the PHP memory management. - * @param SimpleHttpResponse $response Response from fetch. - * @return SimplePage Parsed top level page. - * @access protected - */ - protected function buildPage($response) { - $builder = new SimplePageBuilder(); - $page = $builder->parse($response); - $builder->free(); - unset($builder); - return $page; - } - - /** - * Fetches a page. Jointly recursive with the parse() - * method as it descends a frameset. - * @param string/SimpleUrl $url Target to fetch. - * @param SimpleEncoding $encoding GET/POST parameters. - * @param integer $depth Nested frameset depth protection. - * @return SimplePage Parsed page. - * @access private - */ - protected function fetch($url, $encoding, $depth = 0) { - $response = $this->user_agent->fetchResponse($url, $encoding); - if ($response->isError()) { - return new SimplePage($response); - } - return $this->parse($response, $depth); - } - - /** - * Fetches a page or a single frame if that is the current - * focus. - * @param SimpleUrl $url Target to fetch. - * @param SimpleEncoding $parameters GET/POST parameters. - * @return string Raw content of page. - * @access private - */ - protected function load($url, $parameters) { - $frame = $url->getTarget(); - if (! $frame || ! $this->page->hasFrames() || (strtolower($frame) == '_top')) { - return $this->loadPage($url, $parameters); - } - return $this->loadFrame(array($frame), $url, $parameters); - } - - /** - * Fetches a page and makes it the current page/frame. - * @param string/SimpleUrl $url Target to fetch as string. - * @param SimplePostEncoding $parameters POST parameters. - * @return string Raw content of page. - * @access private - */ - protected function loadPage($url, $parameters) { - $this->page = $this->fetch($url, $parameters); - $this->history->recordEntry( - $this->page->getUrl(), - $this->page->getRequestData()); - return $this->page->getRaw(); - } - - /** - * Fetches a frame into the existing frameset replacing the - * original. - * @param array $frames List of names to drill down. - * @param string/SimpleUrl $url Target to fetch as string. - * @param SimpleFormEncoding $parameters POST parameters. - * @return string Raw content of page. - * @access private - */ - protected function loadFrame($frames, $url, $parameters) { - $page = $this->fetch($url, $parameters); - $this->page->setFrame($frames, $page); - return $page->getRaw(); - } - - /** - * Removes expired and temporary cookies as if - * the browser was closed and re-opened. - * @param string/integer $date Time when session restarted. - * If omitted then all persistent - * cookies are kept. - * @access public - */ - function restart($date = false) { - $this->user_agent->restart($date); - } - - /** - * Adds a header to every fetch. - * @param string $header Header line to add to every - * request until cleared. - * @access public - */ - function addHeader($header) { - $this->user_agent->addHeader($header); - } - - /** - * Ages the cookies by the specified time. - * @param integer $interval Amount in seconds. - * @access public - */ - function ageCookies($interval) { - $this->user_agent->ageCookies($interval); - } - - /** - * Sets an additional cookie. If a cookie has - * the same name and path it is replaced. - * @param string $name Cookie key. - * @param string $value Value of cookie. - * @param string $host Host upon which the cookie is valid. - * @param string $path Cookie path if not host wide. - * @param string $expiry Expiry date. - * @access public - */ - function setCookie($name, $value, $host = false, $path = '/', $expiry = false) { - $this->user_agent->setCookie($name, $value, $host, $path, $expiry); - } - - /** - * Reads the most specific cookie value from the - * browser cookies. - * @param string $host Host to search. - * @param string $path Applicable path. - * @param string $name Name of cookie to read. - * @return string False if not present, else the - * value as a string. - * @access public - */ - function getCookieValue($host, $path, $name) { - return $this->user_agent->getCookieValue($host, $path, $name); - } - - /** - * Reads the current cookies for the current URL. - * @param string $name Key of cookie to find. - * @return string Null if there is no current URL, false - * if the cookie is not set. - * @access public - */ - function getCurrentCookieValue($name) { - return $this->user_agent->getBaseCookieValue($name, $this->page->getUrl()); - } - - /** - * Sets the maximum number of redirects before - * a page will be loaded anyway. - * @param integer $max Most hops allowed. - * @access public - */ - function setMaximumRedirects($max) { - $this->user_agent->setMaximumRedirects($max); - } - - /** - * Sets the maximum number of nesting of framed pages - * within a framed page to prevent loops. - * @param integer $max Highest depth allowed. - * @access public - */ - function setMaximumNestedFrames($max) { - $this->maximum_nested_frames = $max; - } - - /** - * Sets the socket timeout for opening a connection. - * @param integer $timeout Maximum time in seconds. - * @access public - */ - function setConnectionTimeout($timeout) { - $this->user_agent->setConnectionTimeout($timeout); - } - - /** - * Sets proxy to use on all requests for when - * testing from behind a firewall. Set URL - * to false to disable. - * @param string $proxy Proxy URL. - * @param string $username Proxy username for authentication. - * @param string $password Proxy password for authentication. - * @access public - */ - function useProxy($proxy, $username = false, $password = false) { - $this->user_agent->useProxy($proxy, $username, $password); - } - - /** - * Fetches the page content with a HEAD request. - * Will affect cookies, but will not change the base URL. - * @param string/SimpleUrl $url Target to fetch as string. - * @param hash/SimpleHeadEncoding $parameters Additional parameters for - * HEAD request. - * @return boolean True if successful. - * @access public - */ - function head($url, $parameters = false) { - if (! is_object($url)) { - $url = new SimpleUrl($url); - } - if ($this->getUrl()) { - $url = $url->makeAbsolute($this->getUrl()); - } - $response = &$this->user_agent->fetchResponse($url, new SimpleHeadEncoding($parameters)); - return ! $response->isError(); - } - - /** - * Fetches the page content with a simple GET request. - * @param string/SimpleUrl $url Target to fetch. - * @param hash/SimpleFormEncoding $parameters Additional parameters for - * GET request. - * @return string Content of page or false. - * @access public - */ - function get($url, $parameters = false) { - if (! is_object($url)) { - $url = new SimpleUrl($url); - } - if ($this->getUrl()) { - $url = $url->makeAbsolute($this->getUrl()); - } - return $this->load($url, new SimpleGetEncoding($parameters)); - } - - /** - * Fetches the page content with a POST request. - * @param string/SimpleUrl $url Target to fetch as string. - * @param hash/SimpleFormEncoding $parameters POST parameters. - * @return string Content of page. - * @access public - */ - function post($url, $parameters = false) { - if (! is_object($url)) { - $url = new SimpleUrl($url); - } - if ($this->getUrl()) { - $url = $url->makeAbsolute($this->getUrl()); - } - return $this->load($url, new SimplePostEncoding($parameters)); - } - - /** - * Equivalent to hitting the retry button on the - * browser. Will attempt to repeat the page fetch. If - * there is no history to repeat it will give false. - * @return string/boolean Content if fetch succeeded - * else false. - * @access public - */ - function retry() { - $frames = $this->page->getFrameFocus(); - if (count($frames) > 0) { - $this->loadFrame( - $frames, - $this->page->getUrl(), - $this->page->getRequestData()); - return $this->page->getRaw(); - } - if ($url = $this->history->getUrl()) { - $this->page = $this->fetch($url, $this->history->getParameters()); - return $this->page->getRaw(); - } - return false; - } - - /** - * Equivalent to hitting the back button on the - * browser. The browser history is unchanged on - * failure. The page content is refetched as there - * is no concept of content caching in SimpleTest. - * @return boolean True if history entry and - * fetch succeeded - * @access public - */ - function back() { - if (! $this->history->back()) { - return false; - } - $content = $this->retry(); - if (! $content) { - $this->history->forward(); - } - return $content; - } - - /** - * Equivalent to hitting the forward button on the - * browser. The browser history is unchanged on - * failure. The page content is refetched as there - * is no concept of content caching in SimpleTest. - * @return boolean True if history entry and - * fetch succeeded - * @access public - */ - function forward() { - if (! $this->history->forward()) { - return false; - } - $content = $this->retry(); - if (! $content) { - $this->history->back(); - } - return $content; - } - - /** - * Retries a request after setting the authentication - * for the current realm. - * @param string $username Username for realm. - * @param string $password Password for realm. - * @return boolean True if successful fetch. Note - * that authentication may still have - * failed. - * @access public - */ - function authenticate($username, $password) { - if (! $this->page->getRealm()) { - return false; - } - $url = $this->page->getUrl(); - if (! $url) { - return false; - } - $this->user_agent->setIdentity( - $url->getHost(), - $this->page->getRealm(), - $username, - $password); - return $this->retry(); - } - - /** - * Accessor for a breakdown of the frameset. - * @return array Hash tree of frames by name - * or index if no name. - * @access public - */ - function getFrames() { - return $this->page->getFrames(); - } - - /** - * Accessor for current frame focus. Will be - * false if no frame has focus. - * @return integer/string/boolean Label if any, otherwise - * the position in the frameset - * or false if none. - * @access public - */ - function getFrameFocus() { - return $this->page->getFrameFocus(); - } - - /** - * Sets the focus by index. The integer index starts from 1. - * @param integer $choice Chosen frame. - * @return boolean True if frame exists. - * @access public - */ - function setFrameFocusByIndex($choice) { - return $this->page->setFrameFocusByIndex($choice); - } - - /** - * Sets the focus by name. - * @param string $name Chosen frame. - * @return boolean True if frame exists. - * @access public - */ - function setFrameFocus($name) { - return $this->page->setFrameFocus($name); - } - - /** - * Clears the frame focus. All frames will be searched - * for content. - * @access public - */ - function clearFrameFocus() { - return $this->page->clearFrameFocus(); - } - - /** - * Accessor for last error. - * @return string Error from last response. - * @access public - */ - function getTransportError() { - return $this->page->getTransportError(); - } - - /** - * Accessor for current MIME type. - * @return string MIME type as string; e.g. 'text/html' - * @access public - */ - function getMimeType() { - return $this->page->getMimeType(); - } - - /** - * Accessor for last response code. - * @return integer Last HTTP response code received. - * @access public - */ - function getResponseCode() { - return $this->page->getResponseCode(); - } - - /** - * Accessor for last Authentication type. Only valid - * straight after a challenge (401). - * @return string Description of challenge type. - * @access public - */ - function getAuthentication() { - return $this->page->getAuthentication(); - } - - /** - * Accessor for last Authentication realm. Only valid - * straight after a challenge (401). - * @return string Name of security realm. - * @access public - */ - function getRealm() { - return $this->page->getRealm(); - } - - /** - * Accessor for current URL of page or frame if - * focused. - * @return string Location of current page or frame as - * a string. - */ - function getUrl() { - $url = $this->page->getUrl(); - return $url ? $url->asString() : false; - } - - /** - * Accessor for base URL of page if set via BASE tag - * @return string base URL - */ - function getBaseUrl() { - $url = $this->page->getBaseUrl(); - return $url ? $url->asString() : false; - } - - /** - * Accessor for raw bytes sent down the wire. - * @return string Original text sent. - * @access public - */ - function getRequest() { - return $this->page->getRequest(); - } - - /** - * Accessor for raw header information. - * @return string Header block. - * @access public - */ - function getHeaders() { - return $this->page->getHeaders(); - } - - /** - * Accessor for raw page information. - * @return string Original text content of web page. - * @access public - */ - function getContent() { - return $this->page->getRaw(); - } - - /** - * Accessor for plain text version of the page. - * @return string Normalised text representation. - * @access public - */ - function getContentAsText() { - return $this->page->getText(); - } - - /** - * Accessor for parsed title. - * @return string Title or false if no title is present. - * @access public - */ - function getTitle() { - return $this->page->getTitle(); - } - - /** - * Accessor for a list of all links in current page. - * @return array List of urls with scheme of - * http or https and hostname. - * @access public - */ - function getUrls() { - return $this->page->getUrls(); - } - - /** - * Sets all form fields with that name. - * @param string $label Name or label of field in forms. - * @param string $value New value of field. - * @return boolean True if field exists, otherwise false. - * @access public - */ - function setField($label, $value, $position=false) { - return $this->page->setField(new SimpleByLabelOrName($label), $value, $position); - } - - /** - * Sets all form fields with that name. Will use label if - * one is available (not yet implemented). - * @param string $name Name of field in forms. - * @param string $value New value of field. - * @return boolean True if field exists, otherwise false. - * @access public - */ - function setFieldByName($name, $value, $position=false) { - return $this->page->setField(new SimpleByName($name), $value, $position); - } - - /** - * Sets all form fields with that id attribute. - * @param string/integer $id Id of field in forms. - * @param string $value New value of field. - * @return boolean True if field exists, otherwise false. - * @access public - */ - function setFieldById($id, $value) { - return $this->page->setField(new SimpleById($id), $value); - } - - /** - * Accessor for a form element value within the page. - * Finds the first match. - * @param string $label Field label. - * @return string/boolean A value if the field is - * present, false if unchecked - * and null if missing. - * @access public - */ - function getField($label) { - return $this->page->getField(new SimpleByLabelOrName($label)); - } - - /** - * Accessor for a form element value within the page. - * Finds the first match. - * @param string $name Field name. - * @return string/boolean A string if the field is - * present, false if unchecked - * and null if missing. - * @access public - */ - function getFieldByName($name) { - return $this->page->getField(new SimpleByName($name)); - } - - /** - * Accessor for a form element value within the page. - * @param string/integer $id Id of field in forms. - * @return string/boolean A string if the field is - * present, false if unchecked - * and null if missing. - * @access public - */ - function getFieldById($id) { - return $this->page->getField(new SimpleById($id)); - } - - /** - * Clicks the submit button by label. The owning - * form will be submitted by this. - * @param string $label Button label. An unlabeled - * button can be triggered by 'Submit'. - * @param hash $additional Additional form data. - * @return string/boolean Page on success. - * @access public - */ - function clickSubmit($label = 'Submit', $additional = false) { - if (! ($form = $this->page->getFormBySubmit(new SimpleByLabel($label)))) { - return false; - } - $success = $this->load( - $form->getAction(), - $form->submitButton(new SimpleByLabel($label), $additional)); - return ($success ? $this->getContent() : $success); - } - - /** - * Clicks the submit button by name attribute. The owning - * form will be submitted by this. - * @param string $name Button name. - * @param hash $additional Additional form data. - * @return string/boolean Page on success. - * @access public - */ - function clickSubmitByName($name, $additional = false) { - if (! ($form = $this->page->getFormBySubmit(new SimpleByName($name)))) { - return false; - } - $success = $this->load( - $form->getAction(), - $form->submitButton(new SimpleByName($name), $additional)); - return ($success ? $this->getContent() : $success); - } - - /** - * Clicks the submit button by ID attribute of the button - * itself. The owning form will be submitted by this. - * @param string $id Button ID. - * @param hash $additional Additional form data. - * @return string/boolean Page on success. - * @access public - */ - function clickSubmitById($id, $additional = false) { - if (! ($form = $this->page->getFormBySubmit(new SimpleById($id)))) { - return false; - } - $success = $this->load( - $form->getAction(), - $form->submitButton(new SimpleById($id), $additional)); - return ($success ? $this->getContent() : $success); - } - - /** - * Tests to see if a submit button exists with this - * label. - * @param string $label Button label. - * @return boolean True if present. - * @access public - */ - function isSubmit($label) { - return (boolean)$this->page->getFormBySubmit(new SimpleByLabel($label)); - } - - /** - * Clicks the submit image by some kind of label. Usually - * the alt tag or the nearest equivalent. The owning - * form will be submitted by this. Clicking outside of - * the boundary of the coordinates will result in - * a failure. - * @param string $label ID attribute of button. - * @param integer $x X-coordinate of imaginary click. - * @param integer $y Y-coordinate of imaginary click. - * @param hash $additional Additional form data. - * @return string/boolean Page on success. - * @access public - */ - function clickImage($label, $x = 1, $y = 1, $additional = false) { - if (! ($form = $this->page->getFormByImage(new SimpleByLabel($label)))) { - return false; - } - $success = $this->load( - $form->getAction(), - $form->submitImage(new SimpleByLabel($label), $x, $y, $additional)); - return ($success ? $this->getContent() : $success); - } - - /** - * Clicks the submit image by the name. Usually - * the alt tag or the nearest equivalent. The owning - * form will be submitted by this. Clicking outside of - * the boundary of the coordinates will result in - * a failure. - * @param string $name Name attribute of button. - * @param integer $x X-coordinate of imaginary click. - * @param integer $y Y-coordinate of imaginary click. - * @param hash $additional Additional form data. - * @return string/boolean Page on success. - * @access public - */ - function clickImageByName($name, $x = 1, $y = 1, $additional = false) { - if (! ($form = $this->page->getFormByImage(new SimpleByName($name)))) { - return false; - } - $success = $this->load( - $form->getAction(), - $form->submitImage(new SimpleByName($name), $x, $y, $additional)); - return ($success ? $this->getContent() : $success); - } - - /** - * Clicks the submit image by ID attribute. The owning - * form will be submitted by this. Clicking outside of - * the boundary of the coordinates will result in - * a failure. - * @param integer/string $id ID attribute of button. - * @param integer $x X-coordinate of imaginary click. - * @param integer $y Y-coordinate of imaginary click. - * @param hash $additional Additional form data. - * @return string/boolean Page on success. - * @access public - */ - function clickImageById($id, $x = 1, $y = 1, $additional = false) { - if (! ($form = $this->page->getFormByImage(new SimpleById($id)))) { - return false; - } - $success = $this->load( - $form->getAction(), - $form->submitImage(new SimpleById($id), $x, $y, $additional)); - return ($success ? $this->getContent() : $success); - } - - /** - * Tests to see if an image exists with this - * title or alt text. - * @param string $label Image text. - * @return boolean True if present. - * @access public - */ - function isImage($label) { - return (boolean)$this->page->getFormByImage(new SimpleByLabel($label)); - } - - /** - * Submits a form by the ID. - * @param string $id The form ID. No submit button value - * will be sent. - * @return string/boolean Page on success. - * @access public - */ - function submitFormById($id) { - if (! ($form = $this->page->getFormById($id))) { - return false; - } - $success = $this->load( - $form->getAction(), - $form->submit()); - return ($success ? $this->getContent() : $success); - } - - /** - * Finds a URL by label. Will find the first link - * found with this link text by default, or a later - * one if an index is given. The match ignores case and - * white space issues. - * @param string $label Text between the anchor tags. - * @param integer $index Link position counting from zero. - * @return string/boolean URL on success. - * @access public - */ - function getLink($label, $index = 0) { - $urls = $this->page->getUrlsByLabel($label); - if (count($urls) == 0) { - return false; - } - if (count($urls) < $index + 1) { - return false; - } - return $urls[$index]; - } - - /** - * Follows a link by label. Will click the first link - * found with this link text by default, or a later - * one if an index is given. The match ignores case and - * white space issues. - * @param string $label Text between the anchor tags. - * @param integer $index Link position counting from zero. - * @return string/boolean Page on success. - * @access public - */ - function clickLink($label, $index = 0) { - $url = $this->getLink($label, $index); - if ($url === false) { - return false; - } - $this->load($url, new SimpleGetEncoding()); - return $this->getContent(); - } - - /** - * Finds a link by id attribute. - * @param string $id ID attribute value. - * @return string/boolean URL on success. - * @access public - */ - function getLinkById($id) { - return $this->page->getUrlById($id); - } - - /** - * Follows a link by id attribute. - * @param string $id ID attribute value. - * @return string/boolean Page on success. - * @access public - */ - function clickLinkById($id) { - if (! ($url = $this->getLinkById($id))) { - return false; - } - $this->load($url, new SimpleGetEncoding()); - return $this->getContent(); - } - - /** - * Clicks a visible text item. Will first try buttons, - * then links and then images. - * @param string $label Visible text or alt text. - * @return string/boolean Raw page or false. - * @access public - */ - function click($label) { - $raw = $this->clickSubmit($label); - if (! $raw) { - $raw = $this->clickLink($label); - } - if (! $raw) { - $raw = $this->clickImage($label); - } - return $raw; - } - - /** - * Tests to see if a click target exists. - * @param string $label Visible text or alt text. - * @return boolean True if target present. - * @access public - */ - function isClickable($label) { - return $this->isSubmit($label) || ($this->getLink($label) !== false) || $this->isImage($label); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/collector.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/collector.php deleted file mode 100644 index 0f8e91f6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/collector.php +++ /dev/null @@ -1,122 +0,0 @@ - - * @package SimpleTest - * @subpackage UnitTester - * @version $Id: collector.php 1784 2008-04-26 13:07:14Z pp11 $ - */ - -/** - * The basic collector for {@link GroupTest} - * - * @see collect(), GroupTest::collect() - * @package SimpleTest - * @subpackage UnitTester - */ -class SimpleCollector { - - /** - * Strips off any kind of slash at the end so as to normalise the path. - * @param string $path Path to normalise. - * @return string Path without trailing slash. - */ - protected function removeTrailingSlash($path) { - if (substr($path, -1) == DIRECTORY_SEPARATOR) { - return substr($path, 0, -1); - } elseif (substr($path, -1) == '/') { - return substr($path, 0, -1); - } else { - return $path; - } - } - - /** - * Scans the directory and adds what it can. - * @param object $test Group test with {@link GroupTest::addTestFile()} method. - * @param string $path Directory to scan. - * @see _attemptToAdd() - */ - function collect(&$test, $path) { - $path = $this->removeTrailingSlash($path); - if ($handle = opendir($path)) { - while (($entry = readdir($handle)) !== false) { - if ($this->isHidden($entry)) { - continue; - } - $this->handle($test, $path . DIRECTORY_SEPARATOR . $entry); - } - closedir($handle); - } - } - - /** - * This method determines what should be done with a given file and adds - * it via {@link GroupTest::addTestFile()} if necessary. - * - * This method should be overriden to provide custom matching criteria, - * such as pattern matching, recursive matching, etc. For an example, see - * {@link SimplePatternCollector::_handle()}. - * - * @param object $test Group test with {@link GroupTest::addTestFile()} method. - * @param string $filename A filename as generated by {@link collect()} - * @see collect() - * @access protected - */ - protected function handle(&$test, $file) { - if (is_dir($file)) { - return; - } - $test->addFile($file); - } - - /** - * Tests for hidden files so as to skip them. Currently - * only tests for Unix hidden files. - * @param string $filename Plain filename. - * @return boolean True if hidden file. - * @access private - */ - protected function isHidden($filename) { - return strncmp($filename, '.', 1) == 0; - } -} - -/** - * An extension to {@link SimpleCollector} that only adds files matching a - * given pattern. - * - * @package SimpleTest - * @subpackage UnitTester - * @see SimpleCollector - */ -class SimplePatternCollector extends SimpleCollector { - private $pattern; - - /** - * - * @param string $pattern Perl compatible regex to test name against - * See {@link http://us4.php.net/manual/en/reference.pcre.pattern.syntax.php PHP's PCRE} - * for full documentation of valid pattern.s - */ - function __construct($pattern = '/php$/i') { - $this->pattern = $pattern; - } - - /** - * Attempts to add files that match a given pattern. - * - * @see SimpleCollector::_handle() - * @param object $test Group test with {@link GroupTest::addTestFile()} method. - * @param string $path Directory to scan. - * @access protected - */ - protected function handle(&$test, $filename) { - if (preg_match($this->pattern, $filename)) { - parent::handle($test, $filename); - } - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/compatibility.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/compatibility.php deleted file mode 100644 index 6e90fe4c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/compatibility.php +++ /dev/null @@ -1,166 +0,0 @@ -= 0) { - eval('$copy = clone $object;'); - return $copy; - } - return $object; - } - - /** - * Identity test. Drops back to equality + types for PHP5 - * objects as the === operator counts as the - * stronger reference constraint. - * @param mixed $first Test subject. - * @param mixed $second Comparison object. - * @return boolean True if identical. - * @access public - */ - static function isIdentical($first, $second) { - if (version_compare(phpversion(), '5') >= 0) { - return SimpleTestCompatibility::isIdenticalType($first, $second); - } - if ($first != $second) { - return false; - } - return ($first === $second); - } - - /** - * Recursive type test. - * @param mixed $first Test subject. - * @param mixed $second Comparison object. - * @return boolean True if same type. - * @access private - */ - protected static function isIdenticalType($first, $second) { - if (gettype($first) != gettype($second)) { - return false; - } - if (is_object($first) && is_object($second)) { - if (get_class($first) != get_class($second)) { - return false; - } - return SimpleTestCompatibility::isArrayOfIdenticalTypes( - get_object_vars($first), - get_object_vars($second)); - } - if (is_array($first) && is_array($second)) { - return SimpleTestCompatibility::isArrayOfIdenticalTypes($first, $second); - } - if ($first !== $second) { - return false; - } - return true; - } - - /** - * Recursive type test for each element of an array. - * @param mixed $first Test subject. - * @param mixed $second Comparison object. - * @return boolean True if identical. - * @access private - */ - protected static function isArrayOfIdenticalTypes($first, $second) { - if (array_keys($first) != array_keys($second)) { - return false; - } - foreach (array_keys($first) as $key) { - $is_identical = SimpleTestCompatibility::isIdenticalType( - $first[$key], - $second[$key]); - if (! $is_identical) { - return false; - } - } - return true; - } - - /** - * Test for two variables being aliases. - * @param mixed $first Test subject. - * @param mixed $second Comparison object. - * @return boolean True if same. - * @access public - */ - static function isReference(&$first, &$second) { - if (version_compare(phpversion(), '5', '>=') && is_object($first)) { - return ($first === $second); - } - if (is_object($first) && is_object($second)) { - $id = uniqid("test"); - $first->$id = true; - $is_ref = isset($second->$id); - unset($first->$id); - return $is_ref; - } - $temp = $first; - $first = uniqid("test"); - $is_ref = ($first === $second); - $first = $temp; - return $is_ref; - } - - /** - * Test to see if an object is a member of a - * class hiearchy. - * @param object $object Object to test. - * @param string $class Root name of hiearchy. - * @return boolean True if class in hiearchy. - * @access public - */ - static function isA($object, $class) { - if (version_compare(phpversion(), '5') >= 0) { - if (! class_exists($class, false)) { - if (function_exists('interface_exists')) { - if (! interface_exists($class, false)) { - return false; - } - } - } - eval("\$is_a = \$object instanceof $class;"); - return $is_a; - } - if (function_exists('is_a')) { - return is_a($object, $class); - } - return ((strtolower($class) == get_class($object)) - or (is_subclass_of($object, $class))); - } - - /** - * Sets a socket timeout for each chunk. - * @param resource $handle Socket handle. - * @param integer $timeout Limit in seconds. - * @access public - */ - static function setTimeout($handle, $timeout) { - if (function_exists('stream_set_timeout')) { - stream_set_timeout($handle, $timeout, 0); - } elseif (function_exists('socket_set_timeout')) { - socket_set_timeout($handle, $timeout, 0); - } elseif (function_exists('set_socket_timeout')) { - set_socket_timeout($handle, $timeout, 0); - } - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/cookies.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/cookies.php deleted file mode 100644 index 675bd206..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/cookies.php +++ /dev/null @@ -1,380 +0,0 @@ -host = false; - $this->name = $name; - $this->value = $value; - $this->path = ($path ? $this->fixPath($path) : "/"); - $this->expiry = false; - if (is_string($expiry)) { - $this->expiry = strtotime($expiry); - } elseif (is_integer($expiry)) { - $this->expiry = $expiry; - } - $this->is_secure = $is_secure; - } - - /** - * Sets the host. The cookie rules determine - * that the first two parts are taken for - * certain TLDs and three for others. If the - * new host does not match these rules then the - * call will fail. - * @param string $host New hostname. - * @return boolean True if hostname is valid. - * @access public - */ - function setHost($host) { - if ($host = $this->truncateHost($host)) { - $this->host = $host; - return true; - } - return false; - } - - /** - * Accessor for the truncated host to which this - * cookie applies. - * @return string Truncated hostname. - * @access public - */ - function getHost() { - return $this->host; - } - - /** - * Test for a cookie being valid for a host name. - * @param string $host Host to test against. - * @return boolean True if the cookie would be valid - * here. - */ - function isValidHost($host) { - return ($this->truncateHost($host) === $this->getHost()); - } - - /** - * Extracts just the domain part that determines a - * cookie's host validity. - * @param string $host Host name to truncate. - * @return string Domain or false on a bad host. - * @access private - */ - protected function truncateHost($host) { - $tlds = SimpleUrl::getAllTopLevelDomains(); - if (preg_match('/[a-z\-]+\.(' . $tlds . ')$/i', $host, $matches)) { - return $matches[0]; - } elseif (preg_match('/[a-z\-]+\.[a-z\-]+\.[a-z\-]+$/i', $host, $matches)) { - return $matches[0]; - } - return false; - } - - /** - * Accessor for name. - * @return string Cookie key. - * @access public - */ - function getName() { - return $this->name; - } - - /** - * Accessor for value. A deleted cookie will - * have an empty string for this. - * @return string Cookie value. - * @access public - */ - function getValue() { - return $this->value; - } - - /** - * Accessor for path. - * @return string Valid cookie path. - * @access public - */ - function getPath() { - return $this->path; - } - - /** - * Tests a path to see if the cookie applies - * there. The test path must be longer or - * equal to the cookie path. - * @param string $path Path to test against. - * @return boolean True if cookie valid here. - * @access public - */ - function isValidPath($path) { - return (strncmp( - $this->fixPath($path), - $this->getPath(), - strlen($this->getPath())) == 0); - } - - /** - * Accessor for expiry. - * @return string Expiry string. - * @access public - */ - function getExpiry() { - if (! $this->expiry) { - return false; - } - return gmdate("D, d M Y H:i:s", $this->expiry) . " GMT"; - } - - /** - * Test to see if cookie is expired against - * the cookie format time or timestamp. - * Will give true for a session cookie. - * @param integer/string $now Time to test against. Result - * will be false if this time - * is later than the cookie expiry. - * Can be either a timestamp integer - * or a cookie format date. - * @access public - */ - function isExpired($now) { - if (! $this->expiry) { - return true; - } - if (is_string($now)) { - $now = strtotime($now); - } - return ($this->expiry < $now); - } - - /** - * Ages the cookie by the specified number of - * seconds. - * @param integer $interval In seconds. - * @public - */ - function agePrematurely($interval) { - if ($this->expiry) { - $this->expiry -= $interval; - } - } - - /** - * Accessor for the secure flag. - * @return boolean True if cookie needs SSL. - * @access public - */ - function isSecure() { - return $this->is_secure; - } - - /** - * Adds a trailing and leading slash to the path - * if missing. - * @param string $path Path to fix. - * @access private - */ - protected function fixPath($path) { - if (substr($path, 0, 1) != '/') { - $path = '/' . $path; - } - if (substr($path, -1, 1) != '/') { - $path .= '/'; - } - return $path; - } -} - -/** - * Repository for cookies. This stuff is a - * tiny bit browser dependent. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleCookieJar { - private $cookies; - - /** - * Constructor. Jar starts empty. - * @access public - */ - function __construct() { - $this->cookies = array(); - } - - /** - * Removes expired and temporary cookies as if - * the browser was closed and re-opened. - * @param string/integer $now Time to test expiry against. - * @access public - */ - function restartSession($date = false) { - $surviving_cookies = array(); - for ($i = 0; $i < count($this->cookies); $i++) { - if (! $this->cookies[$i]->getValue()) { - continue; - } - if (! $this->cookies[$i]->getExpiry()) { - continue; - } - if ($date && $this->cookies[$i]->isExpired($date)) { - continue; - } - $surviving_cookies[] = $this->cookies[$i]; - } - $this->cookies = $surviving_cookies; - } - - /** - * Ages all cookies in the cookie jar. - * @param integer $interval The old session is moved - * into the past by this number - * of seconds. Cookies now over - * age will be removed. - * @access public - */ - function agePrematurely($interval) { - for ($i = 0; $i < count($this->cookies); $i++) { - $this->cookies[$i]->agePrematurely($interval); - } - } - - /** - * Sets an additional cookie. If a cookie has - * the same name and path it is replaced. - * @param string $name Cookie key. - * @param string $value Value of cookie. - * @param string $host Host upon which the cookie is valid. - * @param string $path Cookie path if not host wide. - * @param string $expiry Expiry date. - * @access public - */ - function setCookie($name, $value, $host = false, $path = '/', $expiry = false) { - $cookie = new SimpleCookie($name, $value, $path, $expiry); - if ($host) { - $cookie->setHost($host); - } - $this->cookies[$this->findFirstMatch($cookie)] = $cookie; - } - - /** - * Finds a matching cookie to write over or the - * first empty slot if none. - * @param SimpleCookie $cookie Cookie to write into jar. - * @return integer Available slot. - * @access private - */ - protected function findFirstMatch($cookie) { - for ($i = 0; $i < count($this->cookies); $i++) { - $is_match = $this->isMatch( - $cookie, - $this->cookies[$i]->getHost(), - $this->cookies[$i]->getPath(), - $this->cookies[$i]->getName()); - if ($is_match) { - return $i; - } - } - return count($this->cookies); - } - - /** - * Reads the most specific cookie value from the - * browser cookies. Looks for the longest path that - * matches. - * @param string $host Host to search. - * @param string $path Applicable path. - * @param string $name Name of cookie to read. - * @return string False if not present, else the - * value as a string. - * @access public - */ - function getCookieValue($host, $path, $name) { - $longest_path = ''; - foreach ($this->cookies as $cookie) { - if ($this->isMatch($cookie, $host, $path, $name)) { - if (strlen($cookie->getPath()) > strlen($longest_path)) { - $value = $cookie->getValue(); - $longest_path = $cookie->getPath(); - } - } - } - return (isset($value) ? $value : false); - } - - /** - * Tests cookie for matching against search - * criteria. - * @param SimpleTest $cookie Cookie to test. - * @param string $host Host must match. - * @param string $path Cookie path must be shorter than - * this path. - * @param string $name Name must match. - * @return boolean True if matched. - * @access private - */ - protected function isMatch($cookie, $host, $path, $name) { - if ($cookie->getName() != $name) { - return false; - } - if ($host && $cookie->getHost() && ! $cookie->isValidHost($host)) { - return false; - } - if (! $cookie->isValidPath($path)) { - return false; - } - return true; - } - - /** - * Uses a URL to sift relevant cookies by host and - * path. Results are list of strings of form "name=value". - * @param SimpleUrl $url Url to select by. - * @return array Valid name and value pairs. - * @access public - */ - function selectAsPairs($url) { - $pairs = array(); - foreach ($this->cookies as $cookie) { - if ($this->isMatch($cookie, $url->getHost(), $url->getPath(), $cookie->getName())) { - $pairs[] = $cookie->getName() . '=' . $cookie->getValue(); - } - } - return $pairs; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/default_reporter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/default_reporter.php deleted file mode 100644 index 9ec708d6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/default_reporter.php +++ /dev/null @@ -1,163 +0,0 @@ - 'case', 'c' => 'case', - 'test' => 'test', 't' => 'test', - ); - private $case = ''; - private $test = ''; - private $xml = false; - private $help = false; - private $no_skips = false; - - /** - * Parses raw command line arguments into object properties. - * @param string $arguments Raw commend line arguments. - */ - function __construct($arguments) { - if (! is_array($arguments)) { - return; - } - foreach ($arguments as $i => $argument) { - if (preg_match('/^--?(test|case|t|c)=(.+)$/', $argument, $matches)) { - $property = $this->to_property[$matches[1]]; - $this->$property = $matches[2]; - } elseif (preg_match('/^--?(test|case|t|c)$/', $argument, $matches)) { - $property = $this->to_property[$matches[1]]; - if (isset($arguments[$i + 1])) { - $this->$property = $arguments[$i + 1]; - } - } elseif (preg_match('/^--?(xml|x)$/', $argument)) { - $this->xml = true; - } elseif (preg_match('/^--?(no-skip|no-skips|s)$/', $argument)) { - $this->no_skips = true; - } elseif (preg_match('/^--?(help|h)$/', $argument)) { - $this->help = true; - } - } - } - - /** - * Run only this test. - * @return string Test name to run. - */ - function getTest() { - return $this->test; - } - - /** - * Run only this test suite. - * @return string Test class name to run. - */ - function getTestCase() { - return $this->case; - } - - /** - * Output should be XML or not. - * @return boolean True if XML desired. - */ - function isXml() { - return $this->xml; - } - - /** - * Output should suppress skip messages. - * @return boolean True for no skips. - */ - function noSkips() { - return $this->no_skips; - } - - /** - * Output should be a help message. Disabled during XML mode. - * @return boolean True if help message desired. - */ - function help() { - return $this->help && !$this->xml; - } - - /** - * Returns plain-text help message for command line runner. - * @return string String help message - */ - function getHelpText() { - return << [args...] - - -c Run only the test-case - -t Run only the test method - -s Suppress skip messages - -x Return test results in XML - -h Display this help message - -HELP; - } - -} - -/** - * The default reporter used by SimpleTest's autorun - * feature. The actual reporters used are dependency - * injected and can be overridden. - * @package SimpleTest - * @subpackage UnitTester - */ -class DefaultReporter extends SimpleReporterDecorator { - - /** - * Assembles the appopriate reporter for the environment. - */ - function __construct() { - if (SimpleReporter::inCli()) { - $parser = new SimpleCommandLineParser($_SERVER['argv']); - $interfaces = $parser->isXml() ? array('XmlReporter') : array('TextReporter'); - if ($parser->help()) { - // I'm not sure if we should do the echo'ing here -- ezyang - echo $parser->getHelpText(); - exit(1); - } - $reporter = new SelectiveReporter( - SimpleTest::preferred($interfaces), - $parser->getTestCase(), - $parser->getTest()); - if ($parser->noSkips()) { - $reporter = new NoSkipsReporter($reporter); - } - } else { - $reporter = new SelectiveReporter( - SimpleTest::preferred('HtmlReporter'), - @$_GET['c'], - @$_GET['t']); - if (@$_GET['skips'] == 'no' || @$_GET['show-skips'] == 'no') { - $reporter = new NoSkipsReporter($reporter); - } - } - parent::__construct($reporter); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/detached.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/detached.php deleted file mode 100644 index a325e140..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/detached.php +++ /dev/null @@ -1,96 +0,0 @@ -command = $command; - $this->dry_command = $dry_command ? $dry_command : $command; - $this->size = false; - } - - /** - * Accessor for the test name for subclasses. - * @return string Name of the test. - * @access public - */ - function getLabel() { - return $this->command; - } - - /** - * Runs the top level test for this class. Currently - * reads the data as a single chunk. I'll fix this - * once I have added iteration to the browser. - * @param SimpleReporter $reporter Target of test results. - * @returns boolean True if no failures. - * @access public - */ - function run(&$reporter) { - $shell = &new SimpleShell(); - $shell->execute($this->command); - $parser = &$this->createParser($reporter); - if (! $parser->parse($shell->getOutput())) { - trigger_error('Cannot parse incoming XML from [' . $this->command . ']'); - return false; - } - return true; - } - - /** - * Accessor for the number of subtests. - * @return integer Number of test cases. - * @access public - */ - function getSize() { - if ($this->size === false) { - $shell = &new SimpleShell(); - $shell->execute($this->dry_command); - $reporter = &new SimpleReporter(); - $parser = &$this->createParser($reporter); - if (! $parser->parse($shell->getOutput())) { - trigger_error('Cannot parse incoming XML from [' . $this->dry_command . ']'); - return false; - } - $this->size = $reporter->getTestCaseCount(); - } - return $this->size; - } - - /** - * Creates the XML parser. - * @param SimpleReporter $reporter Target of test results. - * @return SimpleTestXmlListener XML reader. - * @access protected - */ - protected function &createParser(&$reporter) { - return new SimpleTestXmlParser($reporter); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/en/docs.css b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/en/docs.css deleted file mode 100644 index 18368a04..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/en/docs.css +++ /dev/null @@ -1,121 +0,0 @@ -body { - padding-left: 3%; - padding-right: 3%; -} -h1, h2, h3 { - font-family: sans-serif; -} -h1 { - text-align: center; -} -pre { - font-family: "courier new", courier, typewriter, monospace; - font-size: 90%; - border: 1px solid; - border-color: #999966; - background-color: #ffffcc; - padding: 5px; - margin-left: 20px; - margin-right: 40px; -} -.code, .new_code, pre.new_code { - font-family: "courier new", courier, typewriter, monospace; - font-weight: bold; -} -div.copyright { - font-size: 80%; - color: gray; -} -div.copyright a { - margin-top: 1em; - color: gray; -} -ul.api { - border: 2px outset; - border-color: gray; - background-color: white; - margin: 5px; - margin-left: 5%; - margin-right: 5%; -} -ul.api li { - margin-top: 0.2em; - margin-bottom: 0.2em; - list-style: none; - text-indent: -3em; - padding-left: 1em; -} -div.demo { - border: 4px ridge; - border-color: gray; - padding: 10px; - margin: 5px; - margin-left: 20px; - margin-right: 40px; - background-color: white; -} -div.demo span.fail { - color: red; -} -div.demo span.pass { - color: green; -} -div.demo h1 { - font-size: 12pt; - text-align: left; - font-weight: bold; -} -div.menu { - text-align: center; -} -table { - border: 2px outset; - border-color: gray; - background-color: white; - margin: 5px; - margin-left: 5%; - margin-right: 5%; -} -td { - font-size: 90%; -} -.shell { - color: white; -} -pre.shell { - border: 4px ridge; - border-color: gray; - padding: 10px; - margin: 5px; - margin-left: 20px; - margin-right: 40px; - background-color: #000100; - color: #99ff99; - font-size: 90%; -} -pre.file { - color: black; - border: 1px solid; - border-color: black; - padding: 10px; - margin: 5px; - margin-left: 20px; - margin-right: 40px; - background-color: white; - font-size: 90%; -} -form.demo { - background-color: lightgray; - border: 4px outset; - border-color: lightgray; - padding: 10px; - margin-right: 40%; -} -dl, dd { - margin: 10px; - margin-left: 30px; -} -em { - font-weight: bold; - font-family: "courier new", courier, typewriter, monospace; -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/fr/docs.css b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/fr/docs.css deleted file mode 100644 index 49170486..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/fr/docs.css +++ /dev/null @@ -1,84 +0,0 @@ -body { - padding-left: 3%; - padding-right: 3%; -} -pre { - font-family: "courier new", courier; - font-size: 80%; - border: 1px solid; - background-color: #cccccc; - padding: 5px; - margin-left: 5%; - margin-right: 8%; -} -.code, .new_code, pre.new_code { - font-weight: bold; -} -div.copyright { - font-size: 80%; - color: gray; -} -div.copyright a { - color: gray; -} -ul.api { - padding-left: 0em; - padding-right: 25%; -} -ul.api li { - margin-top: 0.2em; - margin-bottom: 0.2em; - list-style: none; - text-indent: -3em; - padding-left: 3em; -} -div.demo { - border: 4px ridge; - border-color: gray; - padding: 10px; - margin: 5px; - margin-left: 20px; - margin-right: 40px; - background-color: white; -} -div.demo span.fail { - color: red; -} -div.demo span.pass { - color: green; -} -div.demo h1 { - font-size: 12pt; - text-align: left; - font-weight: bold; -} -table { - border: 2px outset; - border-color: gray; - background-color: white; - margin: 5px; - margin-left: 5%; - margin-right: 5%; -} -td { - font-size: 80%; -} -.shell { - color: white; -} -pre.shell { - border: 4px ridge; - border-color: gray; - padding: 10px; - margin: 5px; - margin-left: 20px; - margin-right: 40px; - background-color: black; -} -form.demo { - background-color: lightgray; - border: 4px outset; - border-color: lightgray; - padding: 10px; - margin-right: 40%; -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/lastcraft/README b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/lastcraft/README deleted file mode 100644 index 488198a5..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/lastcraft/README +++ /dev/null @@ -1 +0,0 @@ -Output folder for Lastcraft site versions of documentation. \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/onpk/README b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/onpk/README deleted file mode 100644 index fc1dd627..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/onpk/README +++ /dev/null @@ -1 +0,0 @@ -Rpertoire utilis pour l'extraction de la documentation au format du site onpk.net \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/pkg/README b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/pkg/README deleted file mode 100644 index 821b4f63..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/pkg/README +++ /dev/null @@ -1 +0,0 @@ -Files here are generated from make_phpdoc_docs.sh \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/README b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/README deleted file mode 100644 index 41269559..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/README +++ /dev/null @@ -1 +0,0 @@ -Output folder for SimpleTest.org site versions of content, documentation & tutorial. \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/favicon.ico b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/favicon.ico deleted file mode 100644 index d4c1cc12..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/favicon.ico and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/book-domain-driven-design.jpg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/book-domain-driven-design.jpg deleted file mode 100644 index 3bebb8ec..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/book-domain-driven-design.jpg and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/book-guide-to-php-design-patterns.jpg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/book-guide-to-php-design-patterns.jpg deleted file mode 100644 index ffb536d0..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/book-guide-to-php-design-patterns.jpg and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/book-the-php-anthology-object-oriented-php-solutions.jpg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/book-the-php-anthology-object-oriented-php-solutions.jpg deleted file mode 100644 index d0e502bb..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/book-the-php-anthology-object-oriented-php-solutions.jpg and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/quote.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/quote.png deleted file mode 100644 index a83cf71f..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/quote.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-contribute.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-contribute.png deleted file mode 100644 index 734463e0..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-contribute.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-download.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-download.png deleted file mode 100644 index 22990ce4..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-download.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-external-bottom.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-external-bottom.png deleted file mode 100644 index d976212c..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-external-bottom.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-external-middle.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-external-middle.png deleted file mode 100644 index fb37e195..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-external-middle.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-external-top.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-external-top.png deleted file mode 100644 index 3f1ff2d0..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-external-top.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-internal-bottom.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-internal-bottom.png deleted file mode 100644 index eec1b2ac..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-internal-bottom.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-internal-middle.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-internal-middle.png deleted file mode 100644 index 04447413..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-internal-middle.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-internal-top.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-internal-top.png deleted file mode 100644 index 8e27bc9b..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-internal-top.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-logo.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-logo.png deleted file mode 100644 index 76c497c2..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-logo.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-start-testing.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-start-testing.png deleted file mode 100644 index f36a58ed..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-start-testing.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-support.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-support.png deleted file mode 100644 index aedd5a0e..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/simpletest-support.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/test-in-cli.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/test-in-cli.png deleted file mode 100644 index abb6159d..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/test-in-cli.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/test-with-1-fail.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/test-with-1-fail.png deleted file mode 100644 index 74834dea..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/test-with-1-fail.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/test-with-1-pass.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/test-with-1-pass.png deleted file mode 100644 index dbbce1a2..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/images/test-with-1-pass.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/index.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/index.html deleted file mode 100644 index 4a7d4b5e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/index.html +++ /dev/null @@ -1,192 +0,0 @@ - - - -SimpleTest - Unit Testing for PHP - - - - -
-
- -
-
- -

- SimpleTest 1.0.1 has been - - released. - This is the last PHP 4 compatible release. - From now on, compatibility extends from PHP 5.0.5+. -

-
-
- -

- Familiar with unit testing ? Just dive directly into SimpleTest with - the one-page starter and - the complete API. -
- Otherwise see the ongoing - documentation. -
- And for example test cases check out the - tutorial. -

-
-
- -

- Need help on your testing strategy ? - Feel free to join the - SimpleTest support mailing-list. -

-

- If you need some new functionnality in SimpleTest, you may want to look at - the features tracker. - Also the bug and - patches trackers can be useful. -

-
-
- -

- And if you feel like giving a hand, feel free to look around the - current TODO list... -

-
-
- - SourceForge.net Logo - -
-
-
-
-

- [2008/04/08] - - SimpleTest 1.0.1 is released. - The last release that supports PHP4.2 up to PHP5.3 inclusive. - Compared to the last stable release, the main significant change - is the switch to autorun. -

-

- The SimpleTest PHP unit tester - is available for download from your nearest - SourceForge. - It is a PHP unit test and web test framework. - Users of JUnit will be - familiar with most of the interface. - The JWebUnit - style functionality is more complete now. - It has support for SSL, forms, frames, proxies and basic authentication. - The idea is that common but fiddly PHP tasks, such as logging into a site, - can be tested easily. -

-

Screenshots

-

- Here's what the result of your first test would look like : -

-

- test with 1 pass -

-

- Well not quite. In true TDD fashion, you should see a failing test case : -

-

- test with 1 fail -

-

- You may also prefer doing your testing with the command-line : -

-

- test in cli -

-

Documentation

-

- While (still) very scattered around different sites, - the SimpleTest documentation is quite dense and thorough. -

- -

- Other type of interesting stuff while starting out - with Test Driven Development and SimpleTest include : -

- -

- A couple of books do use SimpleTest quite extensively : -

- -

Contributing

-

- For translators the documentation is available in XML format : - we're always please to add new languages to our code base. -

-

- And while we do try our best keeping this tool bug-free, detecting defects and - submitting failing test cases and/or patches can come very handy ! Interested ? - Drop by the mailing-list, - most things tend to happen there... -

-
-
- - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery-1.2.1.pack.js b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery-1.2.1.pack.js deleted file mode 100644 index d6468594..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery-1.2.1.pack.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - * jQuery 1.2.1 - New Wave Javascript - * - * Copyright (c) 2007 John Resig (jquery.com) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ - * $Rev: 3353 $ - */ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(G(){9(1m E!="W")H w=E;H E=18.15=G(a,b){I 6 7u E?6.5N(a,b):1u E(a,b)};9(1m $!="W")H D=$;18.$=E;H u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;E.1b=E.3A={5N:G(c,a){c=c||U;9(1m c=="1M"){H m=u.2S(c);9(m&&(m[1]||!a)){9(m[1])c=E.4D([m[1]],a);J{H b=U.3S(m[3]);9(b)9(b.22!=m[3])I E().1Y(c);J{6[0]=b;6.K=1;I 6}J c=[]}}J I 1u E(a).1Y(c)}J 9(E.1n(c))I 1u E(U)[E.1b.2d?"2d":"39"](c);I 6.6v(c.1c==1B&&c||(c.4c||c.K&&c!=18&&!c.1y&&c[0]!=W&&c[0].1y)&&E.2h(c)||[c])},4c:"1.2.1",7Y:G(){I 6.K},K:0,21:G(a){I a==W?E.2h(6):6[a]},2o:G(a){H b=E(a);b.4Y=6;I b},6v:G(a){6.K=0;1B.3A.1a.16(6,a);I 6},N:G(a,b){I E.N(6,a,b)},4I:G(a){H b=-1;6.N(G(i){9(6==a)b=i});I b},1x:G(f,d,e){H c=f;9(f.1c==3X)9(d==W)I 6.K&&E[e||"1x"](6[0],f)||W;J{c={};c[f]=d}I 6.N(G(a){L(H b 1i c)E.1x(e?6.R:6,b,E.1e(6,c[b],e,a,b))})},17:G(b,a){I 6.1x(b,a,"3C")},2g:G(e){9(1m e!="5i"&&e!=S)I 6.4n().3g(U.6F(e));H t="";E.N(e||6,G(){E.N(6.3j,G(){9(6.1y!=8)t+=6.1y!=1?6.6x:E.1b.2g([6])})});I t},5m:G(b){9(6[0])E(b,6[0].3H).6u().3d(6[0]).1X(G(){H a=6;1W(a.1w)a=a.1w;I a}).3g(6);I 6},8m:G(a){I 6.N(G(){E(6).6q().5m(a)})},8d:G(a){I 6.N(G(){E(6).5m(a)})},3g:G(){I 6.3z(1q,Q,1,G(a){6.58(a)})},6j:G(){I 6.3z(1q,Q,-1,G(a){6.3d(a,6.1w)})},6g:G(){I 6.3z(1q,P,1,G(a){6.12.3d(a,6)})},50:G(){I 6.3z(1q,P,-1,G(a){6.12.3d(a,6.2q)})},2D:G(){I 6.4Y||E([])},1Y:G(t){H b=E.1X(6,G(a){I E.1Y(t,a)});I 6.2o(/[^+>] [^+>]/.14(t)||t.1g("..")>-1?E.4V(b):b)},6u:G(e){H f=6.1X(G(){I 6.67?E(6.67)[0]:6.4R(Q)});H d=f.1Y("*").4O().N(G(){9(6[F]!=W)6[F]=S});9(e===Q)6.1Y("*").4O().N(G(i){H c=E.M(6,"2P");L(H a 1i c)L(H b 1i c[a])E.1j.1f(d[i],a,c[a][b],c[a][b].M)});I f},1E:G(t){I 6.2o(E.1n(t)&&E.2W(6,G(b,a){I t.16(b,[a])})||E.3m(t,6))},5V:G(t){I 6.2o(t.1c==3X&&E.3m(t,6,Q)||E.2W(6,G(a){I(t.1c==1B||t.4c)?E.2A(a,t)<0:a!=t}))},1f:G(t){I 6.2o(E.1R(6.21(),t.1c==3X?E(t).21():t.K!=W&&(!t.11||E.11(t,"2Y"))?t:[t]))},3t:G(a){I a?E.3m(a,6).K>0:P},7c:G(a){I 6.3t("."+a)},3i:G(b){9(b==W){9(6.K){H c=6[0];9(E.11(c,"24")){H e=c.4Z,a=[],Y=c.Y,2G=c.O=="24-2G";9(e<0)I S;L(H i=2G?e:0,33=2G?e+1:Y.K;i<33;i++){H d=Y[i];9(d.26){H b=E.V.1h&&!d.9V["1Q"].9L?d.2g:d.1Q;9(2G)I b;a.1a(b)}}I a}J I 6[0].1Q.1p(/\\r/g,"")}}J I 6.N(G(){9(b.1c==1B&&/4k|5j/.14(6.O))6.2Q=(E.2A(6.1Q,b)>=0||E.2A(6.2H,b)>=0);J 9(E.11(6,"24")){H a=b.1c==1B?b:[b];E("9h",6).N(G(){6.26=(E.2A(6.1Q,a)>=0||E.2A(6.2g,a)>=0)});9(!a.K)6.4Z=-1}J 6.1Q=b})},4o:G(a){I a==W?(6.K?6[0].3O:S):6.4n().3g(a)},6H:G(a){I 6.50(a).28()},6E:G(i){I 6.2J(i,i+1)},2J:G(){I 6.2o(1B.3A.2J.16(6,1q))},1X:G(b){I 6.2o(E.1X(6,G(a,i){I b.2O(a,i,a)}))},4O:G(){I 6.1f(6.4Y)},3z:G(f,d,g,e){H c=6.K>1,a;I 6.N(G(){9(!a){a=E.4D(f,6.3H);9(g<0)a.8U()}H b=6;9(d&&E.11(6,"1I")&&E.11(a[0],"4m"))b=6.4l("1K")[0]||6.58(U.5B("1K"));E.N(a,G(){H a=c?6.4R(Q):6;9(!5A(0,a))e.2O(b,a)})})}};G 5A(i,b){H a=E.11(b,"1J");9(a){9(b.3k)E.3G({1d:b.3k,3e:P,1V:"1J"});J E.5f(b.2g||b.6s||b.3O||"");9(b.12)b.12.3b(b)}J 9(b.1y==1)E("1J",b).N(5A);I a}E.1k=E.1b.1k=G(){H c=1q[0]||{},a=1,2c=1q.K,5e=P;9(c.1c==8o){5e=c;c=1q[1]||{}}9(2c==1){c=6;a=0}H b;L(;a<2c;a++)9((b=1q[a])!=S)L(H i 1i b){9(c==b[i])6r;9(5e&&1m b[i]==\'5i\'&&c[i])E.1k(c[i],b[i]);J 9(b[i]!=W)c[i]=b[i]}I c};H F="15"+(1u 3D()).3B(),6p=0,5c={};E.1k({8a:G(a){18.$=D;9(a)18.15=w;I E},1n:G(a){I!!a&&1m a!="1M"&&!a.11&&a.1c!=1B&&/G/i.14(a+"")},4a:G(a){I a.2V&&!a.1G||a.37&&a.3H&&!a.3H.1G},5f:G(a){a=E.36(a);9(a){9(18.6l)18.6l(a);J 9(E.V.1N)18.56(a,0);J 3w.2O(18,a)}},11:G(b,a){I b.11&&b.11.27()==a.27()},1L:{},M:G(c,d,b){c=c==18?5c:c;H a=c[F];9(!a)a=c[F]=++6p;9(d&&!E.1L[a])E.1L[a]={};9(b!=W)E.1L[a][d]=b;I d?E.1L[a][d]:a},30:G(c,b){c=c==18?5c:c;H a=c[F];9(b){9(E.1L[a]){2E E.1L[a][b];b="";L(b 1i E.1L[a])1T;9(!b)E.30(c)}}J{2a{2E c[F]}29(e){9(c.53)c.53(F)}2E E.1L[a]}},N:G(a,b,c){9(c){9(a.K==W)L(H i 1i a)b.16(a[i],c);J L(H i=0,48=a.K;i<48;i++)9(b.16(a[i],c)===P)1T}J{9(a.K==W)L(H i 1i a)b.2O(a[i],i,a[i]);J L(H i=0,48=a.K,3i=a[0];i<48&&b.2O(3i,i,3i)!==P;3i=a[++i]){}}I a},1e:G(c,b,d,e,a){9(E.1n(b))b=b.2O(c,[e]);H f=/z-?4I|7T-?7Q|1r|69|7P-?1H/i;I b&&b.1c==4W&&d=="3C"&&!f.14(a)?b+"2T":b},1o:{1f:G(b,c){E.N((c||"").2l(/\\s+/),G(i,a){9(!E.1o.3K(b.1o,a))b.1o+=(b.1o?" ":"")+a})},28:G(b,c){b.1o=c!=W?E.2W(b.1o.2l(/\\s+/),G(a){I!E.1o.3K(c,a)}).66(" "):""},3K:G(t,c){I E.2A(c,(t.1o||t).3s().2l(/\\s+/))>-1}},2k:G(e,o,f){L(H i 1i o){e.R["3r"+i]=e.R[i];e.R[i]=o[i]}f.16(e,[]);L(H i 1i o)e.R[i]=e.R["3r"+i]},17:G(e,p){9(p=="1H"||p=="2N"){H b={},42,41,d=["7J","7I","7G","7F"];E.N(d,G(){b["7C"+6]=0;b["7B"+6+"5Z"]=0});E.2k(e,b,G(){9(E(e).3t(\':3R\')){42=e.7A;41=e.7w}J{e=E(e.4R(Q)).1Y(":4k").5W("2Q").2D().17({4C:"1P",2X:"4F",19:"2Z",7o:"0",1S:"0"}).5R(e.12)[0];H a=E.17(e.12,"2X")||"3V";9(a=="3V")e.12.R.2X="7g";42=e.7e;41=e.7b;9(a=="3V")e.12.R.2X="3V";e.12.3b(e)}});I p=="1H"?42:41}I E.3C(e,p)},3C:G(h,j,i){H g,2w=[],2k=[];G 3n(a){9(!E.V.1N)I P;H b=U.3o.3Z(a,S);I!b||b.4y("3n")==""}9(j=="1r"&&E.V.1h){g=E.1x(h.R,"1r");I g==""?"1":g}9(j.1t(/4u/i))j=y;9(!i&&h.R[j])g=h.R[j];J 9(U.3o&&U.3o.3Z){9(j.1t(/4u/i))j="4u";j=j.1p(/([A-Z])/g,"-$1").2p();H d=U.3o.3Z(h,S);9(d&&!3n(h))g=d.4y(j);J{L(H a=h;a&&3n(a);a=a.12)2w.4w(a);L(a=0;a<2w.K;a++)9(3n(2w[a])){2k[a]=2w[a].R.19;2w[a].R.19="2Z"}g=j=="19"&&2k[2w.K-1]!=S?"2s":U.3o.3Z(h,S).4y(j)||"";L(a=0;a<2k.K;a++)9(2k[a]!=S)2w[a].R.19=2k[a]}9(j=="1r"&&g=="")g="1"}J 9(h.3Q){H f=j.1p(/\\-(\\w)/g,G(m,c){I c.27()});g=h.3Q[j]||h.3Q[f];9(!/^\\d+(2T)?$/i.14(g)&&/^\\d/.14(g)){H k=h.R.1S;H e=h.4v.1S;h.4v.1S=h.3Q.1S;h.R.1S=g||0;g=h.R.71+"2T";h.R.1S=k;h.4v.1S=e}}I g},4D:G(a,e){H r=[];e=e||U;E.N(a,G(i,d){9(!d)I;9(d.1c==4W)d=d.3s();9(1m d=="1M"){d=d.1p(/(<(\\w+)[^>]*?)\\/>/g,G(m,a,b){I b.1t(/^(70|6Z|6Y|9Q|4t|9N|9K|3a|9G|9E)$/i)?m:a+">"});H s=E.36(d).2p(),1s=e.5B("1s"),2x=[];H c=!s.1g("<9y")&&[1,"<24>",""]||!s.1g("<9w")&&[1,"<6T>",""]||s.1t(/^<(9u|1K|9t|9r|9p)/)&&[1,"<1I>",""]||!s.1g("<4m")&&[2,"<1I><1K>",""]||(!s.1g("<9m")||!s.1g("<9k"))&&[3,"<1I><1K><4m>",""]||!s.1g("<6Y")&&[2,"<1I><1K><6L>",""]||E.V.1h&&[1,"1s<1s>",""]||[0,"",""];1s.3O=c[1]+d+c[2];1W(c[0]--)1s=1s.5p;9(E.V.1h){9(!s.1g("<1I")&&s.1g("<1K")<0)2x=1s.1w&&1s.1w.3j;J 9(c[1]=="<1I>"&&s.1g("<1K")<0)2x=1s.3j;L(H n=2x.K-1;n>=0;--n)9(E.11(2x[n],"1K")&&!2x[n].3j.K)2x[n].12.3b(2x[n]);9(/^\\s/.14(d))1s.3d(e.6F(d.1t(/^\\s*/)[0]),1s.1w)}d=E.2h(1s.3j)}9(0===d.K&&(!E.11(d,"2Y")&&!E.11(d,"24")))I;9(d[0]==W||E.11(d,"2Y")||d.Y)r.1a(d);J r=E.1R(r,d)});I r},1x:G(c,d,a){H e=E.4a(c)?{}:E.5o;9(d=="26"&&E.V.1N)c.12.4Z;9(e[d]){9(a!=W)c[e[d]]=a;I c[e[d]]}J 9(E.V.1h&&d=="R")I E.1x(c.R,"9e",a);J 9(a==W&&E.V.1h&&E.11(c,"2Y")&&(d=="9d"||d=="9a"))I c.97(d).6x;J 9(c.37){9(a!=W){9(d=="O"&&E.11(c,"4t")&&c.12)6G"O 94 93\'t 92 91";c.90(d,a)}9(E.V.1h&&/6C|3k/.14(d)&&!E.4a(c))I c.4p(d,2);I c.4p(d)}J{9(d=="1r"&&E.V.1h){9(a!=W){c.69=1;c.1E=(c.1E||"").1p(/6O\\([^)]*\\)/,"")+(3I(a).3s()=="8S"?"":"6O(1r="+a*6A+")")}I c.1E?(3I(c.1E.1t(/1r=([^)]*)/)[1])/6A).3s():""}d=d.1p(/-([a-z])/8Q,G(z,b){I b.27()});9(a!=W)c[d]=a;I c[d]}},36:G(t){I(t||"").1p(/^\\s+|\\s+$/g,"")},2h:G(a){H r=[];9(1m a!="8P")L(H i=0,2c=a.K;i<2c;i++)r.1a(a[i]);J r=a.2J(0);I r},2A:G(b,a){L(H i=0,2c=a.K;i<2c;i++)9(a[i]==b)I i;I-1},1R:G(a,b){9(E.V.1h){L(H i=0;b[i];i++)9(b[i].1y!=8)a.1a(b[i])}J L(H i=0;b[i];i++)a.1a(b[i]);I a},4V:G(b){H r=[],2f={};2a{L(H i=0,6y=b.K;i<6y;i++){H a=E.M(b[i]);9(!2f[a]){2f[a]=Q;r.1a(b[i])}}}29(e){r=b}I r},2W:G(b,a,c){9(1m a=="1M")a=3w("P||G(a,i){I "+a+"}");H d=[];L(H i=0,4g=b.K;i<4g;i++)9(!c&&a(b[i],i)||c&&!a(b[i],i))d.1a(b[i]);I d},1X:G(c,b){9(1m b=="1M")b=3w("P||G(a){I "+b+"}");H d=[];L(H i=0,4g=c.K;i<4g;i++){H a=b(c[i],i);9(a!==S&&a!=W){9(a.1c!=1B)a=[a];d=d.8M(a)}}I d}});H v=8K.8I.2p();E.V={4s:(v.1t(/.+(?:8F|8E|8C|8B)[\\/: ]([\\d.]+)/)||[])[1],1N:/6w/.14(v),34:/34/.14(v),1h:/1h/.14(v)&&!/34/.14(v),35:/35/.14(v)&&!/(8z|6w)/.14(v)};H y=E.V.1h?"4h":"5h";E.1k({5g:!E.V.1h||U.8y=="8x",4h:E.V.1h?"4h":"5h",5o:{"L":"8w","8v":"1o","4u":y,5h:y,4h:y,3O:"3O",1o:"1o",1Q:"1Q",3c:"3c",2Q:"2Q",8u:"8t",26:"26",8s:"8r"}});E.N({1D:"a.12",8q:"15.4e(a,\'12\')",8p:"15.2I(a,2,\'2q\')",8n:"15.2I(a,2,\'4d\')",8l:"15.4e(a,\'2q\')",8k:"15.4e(a,\'4d\')",8j:"15.5d(a.12.1w,a)",8i:"15.5d(a.1w)",6q:"15.11(a,\'8h\')?a.8f||a.8e.U:15.2h(a.3j)"},G(i,n){E.1b[i]=G(a){H b=E.1X(6,n);9(a&&1m a=="1M")b=E.3m(a,b);I 6.2o(E.4V(b))}});E.N({5R:"3g",8c:"6j",3d:"6g",8b:"50",89:"6H"},G(i,n){E.1b[i]=G(){H a=1q;I 6.N(G(){L(H j=0,2c=a.K;j<2c;j++)E(a[j])[n](6)})}});E.N({5W:G(a){E.1x(6,a,"");6.53(a)},88:G(c){E.1o.1f(6,c)},87:G(c){E.1o.28(6,c)},86:G(c){E.1o[E.1o.3K(6,c)?"28":"1f"](6,c)},28:G(a){9(!a||E.1E(a,[6]).r.K){E.30(6);6.12.3b(6)}},4n:G(){E("*",6).N(G(){E.30(6)});1W(6.1w)6.3b(6.1w)}},G(i,n){E.1b[i]=G(){I 6.N(n,1q)}});E.N(["85","5Z"],G(i,a){H n=a.2p();E.1b[n]=G(h){I 6[0]==18?E.V.1N&&3y["84"+a]||E.5g&&38.33(U.2V["5a"+a],U.1G["5a"+a])||U.1G["5a"+a]:6[0]==U?38.33(U.1G["6n"+a],U.1G["6m"+a]):h==W?(6.K?E.17(6[0],n):S):6.17(n,h.1c==3X?h:h+"2T")}});H C=E.V.1N&&3x(E.V.4s)<83?"(?:[\\\\w*57-]|\\\\\\\\.)":"(?:[\\\\w\\82-\\81*57-]|\\\\\\\\.)",6k=1u 47("^>\\\\s*("+C+"+)"),6i=1u 47("^("+C+"+)(#)("+C+"+)"),6h=1u 47("^([#.]?)("+C+"*)");E.1k({55:{"":"m[2]==\'*\'||15.11(a,m[2])","#":"a.4p(\'22\')==m[2]",":":{80:"im[3]-0",2I:"m[3]-0==i",6E:"m[3]-0==i",3v:"i==0",3u:"i==r.K-1",6f:"i%2==0",6e:"i%2","3v-46":"a.12.4l(\'*\')[0]==a","3u-46":"15.2I(a.12.5p,1,\'4d\')==a","7X-46":"!15.2I(a.12.5p,2,\'4d\')",1D:"a.1w",4n:"!a.1w",7W:"(a.6s||a.7V||15(a).2g()||\'\').1g(m[3])>=0",3R:\'"1P"!=a.O&&15.17(a,"19")!="2s"&&15.17(a,"4C")!="1P"\',1P:\'"1P"==a.O||15.17(a,"19")=="2s"||15.17(a,"4C")=="1P"\',7U:"!a.3c",3c:"a.3c",2Q:"a.2Q",26:"a.26||15.1x(a,\'26\')",2g:"\'2g\'==a.O",4k:"\'4k\'==a.O",5j:"\'5j\'==a.O",54:"\'54\'==a.O",52:"\'52\'==a.O",51:"\'51\'==a.O",6d:"\'6d\'==a.O",6c:"\'6c\'==a.O",2r:\'"2r"==a.O||15.11(a,"2r")\',4t:"/4t|24|6b|2r/i.14(a.11)",3K:"15.1Y(m[3],a).K",7S:"/h\\\\d/i.14(a.11)",7R:"15.2W(15.32,G(1b){I a==1b.T;}).K"}},6a:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1u 47("^([:.#]*)("+C+"+)")],3m:G(a,c,b){H d,2b=[];1W(a&&a!=d){d=a;H f=E.1E(a,c,b);a=f.t.1p(/^\\s*,\\s*/,"");2b=b?c=f.r:E.1R(2b,f.r)}I 2b},1Y:G(t,o){9(1m t!="1M")I[t];9(o&&!o.1y)o=S;o=o||U;H d=[o],2f=[],3u;1W(t&&3u!=t){H r=[];3u=t;t=E.36(t);H l=P;H g=6k;H m=g.2S(t);9(m){H p=m[1].27();L(H i=0;d[i];i++)L(H c=d[i].1w;c;c=c.2q)9(c.1y==1&&(p=="*"||c.11.27()==p.27()))r.1a(c);d=r;t=t.1p(g,"");9(t.1g(" ")==0)6r;l=Q}J{g=/^([>+~])\\s*(\\w*)/i;9((m=g.2S(t))!=S){r=[];H p=m[2],1R={};m=m[1];L(H j=0,31=d.K;j<31;j++){H n=m=="~"||m=="+"?d[j].2q:d[j].1w;L(;n;n=n.2q)9(n.1y==1){H h=E.M(n);9(m=="~"&&1R[h])1T;9(!p||n.11.27()==p.27()){9(m=="~")1R[h]=Q;r.1a(n)}9(m=="+")1T}}d=r;t=E.36(t.1p(g,""));l=Q}}9(t&&!l){9(!t.1g(",")){9(o==d[0])d.44();2f=E.1R(2f,d);r=d=[o];t=" "+t.68(1,t.K)}J{H k=6i;H m=k.2S(t);9(m){m=[0,m[2],m[3],m[1]]}J{k=6h;m=k.2S(t)}m[2]=m[2].1p(/\\\\/g,"");H f=d[d.K-1];9(m[1]=="#"&&f&&f.3S&&!E.4a(f)){H q=f.3S(m[2]);9((E.V.1h||E.V.34)&&q&&1m q.22=="1M"&&q.22!=m[2])q=E(\'[@22="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.11(q,m[3]))?[q]:[]}J{L(H i=0;d[i];i++){H a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];9(a=="*"&&d[i].11.2p()=="5i")a="3a";r=E.1R(r,d[i].4l(a))}9(m[1]==".")r=E.4X(r,m[2]);9(m[1]=="#"){H e=[];L(H i=0;r[i];i++)9(r[i].4p("22")==m[2]){e=[r[i]];1T}r=e}d=r}t=t.1p(k,"")}}9(t){H b=E.1E(t,r);d=r=b.r;t=E.36(b.t)}}9(t)d=[];9(d&&o==d[0])d.44();2f=E.1R(2f,d);I 2f},4X:G(r,m,a){m=" "+m+" ";H c=[];L(H i=0;r[i];i++){H b=(" "+r[i].1o+" ").1g(m)>=0;9(!a&&b||a&&!b)c.1a(r[i])}I c},1E:G(t,r,h){H d;1W(t&&t!=d){d=t;H p=E.6a,m;L(H i=0;p[i];i++){m=p[i].2S(t);9(m){t=t.7O(m[0].K);m[2]=m[2].1p(/\\\\/g,"");1T}}9(!m)1T;9(m[1]==":"&&m[2]=="5V")r=E.1E(m[3],r,Q).r;J 9(m[1]==".")r=E.4X(r,m[2],h);J 9(m[1]=="["){H g=[],O=m[3];L(H i=0,31=r.K;i<31;i++){H a=r[i],z=a[E.5o[m[2]]||m[2]];9(z==S||/6C|3k|26/.14(m[2]))z=E.1x(a,m[2])||\'\';9((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1g(m[5])||O=="$="&&z.68(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1g(m[5])>=0)^h)g.1a(a)}r=g}J 9(m[1]==":"&&m[2]=="2I-46"){H e={},g=[],14=/(\\d*)n\\+?(\\d*)/.2S(m[3]=="6f"&&"2n"||m[3]=="6e"&&"2n+1"||!/\\D/.14(m[3])&&"n+"+m[3]||m[3]),3v=(14[1]||1)-0,d=14[2]-0;L(H i=0,31=r.K;i<31;i++){H j=r[i],12=j.12,22=E.M(12);9(!e[22]){H c=1;L(H n=12.1w;n;n=n.2q)9(n.1y==1)n.4U=c++;e[22]=Q}H b=P;9(3v==1){9(d==0||j.4U==d)b=Q}J 9((j.4U+d)%3v==0)b=Q;9(b^h)g.1a(j)}r=g}J{H f=E.55[m[1]];9(1m f!="1M")f=E.55[m[1]][m[2]];f=3w("P||G(a,i){I "+f+"}");r=E.2W(r,f,h)}}I{r:r,t:t}},4e:G(b,c){H d=[];H a=b[c];1W(a&&a!=U){9(a.1y==1)d.1a(a);a=a[c]}I d},2I:G(a,e,c,b){e=e||1;H d=0;L(;a;a=a[c])9(a.1y==1&&++d==e)1T;I a},5d:G(n,a){H r=[];L(;n;n=n.2q){9(n.1y==1&&(!a||n!=a))r.1a(n)}I r}});E.1j={1f:G(g,e,c,h){9(E.V.1h&&g.4j!=W)g=18;9(!c.2u)c.2u=6.2u++;9(h!=W){H d=c;c=G(){I d.16(6,1q)};c.M=h;c.2u=d.2u}H i=e.2l(".");e=i[0];c.O=i[1];H b=E.M(g,"2P")||E.M(g,"2P",{});H f=E.M(g,"2t",G(){H a;9(1m E=="W"||E.1j.4T)I a;a=E.1j.2t.16(g,1q);I a});H j=b[e];9(!j){j=b[e]={};9(g.4S)g.4S(e,f,P);J g.7N("43"+e,f)}j[c.2u]=c;6.1Z[e]=Q},2u:1,1Z:{},28:G(d,c,b){H e=E.M(d,"2P"),2L,4I;9(1m c=="1M"){H a=c.2l(".");c=a[0]}9(e){9(c&&c.O){b=c.4Q;c=c.O}9(!c){L(c 1i e)6.28(d,c)}J 9(e[c]){9(b)2E e[c][b.2u];J L(b 1i e[c])9(!a[1]||e[c][b].O==a[1])2E e[c][b];L(2L 1i e[c])1T;9(!2L){9(d.4P)d.4P(c,E.M(d,"2t"),P);J d.7M("43"+c,E.M(d,"2t"));2L=S;2E e[c]}}L(2L 1i e)1T;9(!2L){E.30(d,"2P");E.30(d,"2t")}}},1F:G(d,b,e,c,f){b=E.2h(b||[]);9(!e){9(6.1Z[d])E("*").1f([18,U]).1F(d,b)}J{H a,2L,1b=E.1n(e[d]||S),4N=!b[0]||!b[0].2M;9(4N)b.4w(6.4M({O:d,2m:e}));b[0].O=d;9(E.1n(E.M(e,"2t")))a=E.M(e,"2t").16(e,b);9(!1b&&e["43"+d]&&e["43"+d].16(e,b)===P)a=P;9(4N)b.44();9(f&&f.16(e,b)===P)a=P;9(1b&&c!==P&&a!==P&&!(E.11(e,\'a\')&&d=="4L")){6.4T=Q;e[d]()}6.4T=P}I a},2t:G(d){H a;d=E.1j.4M(d||18.1j||{});H b=d.O.2l(".");d.O=b[0];H c=E.M(6,"2P")&&E.M(6,"2P")[d.O],3q=1B.3A.2J.2O(1q,1);3q.4w(d);L(H j 1i c){3q[0].4Q=c[j];3q[0].M=c[j].M;9(!b[1]||c[j].O==b[1]){H e=c[j].16(6,3q);9(a!==P)a=e;9(e===P){d.2M();d.3p()}}}9(E.V.1h)d.2m=d.2M=d.3p=d.4Q=d.M=S;I a},4M:G(c){H a=c;c=E.1k({},a);c.2M=G(){9(a.2M)a.2M();a.7L=P};c.3p=G(){9(a.3p)a.3p();a.7K=Q};9(!c.2m&&c.65)c.2m=c.65;9(E.V.1N&&c.2m.1y==3)c.2m=a.2m.12;9(!c.4K&&c.4J)c.4K=c.4J==c.2m?c.7H:c.4J;9(c.64==S&&c.63!=S){H e=U.2V,b=U.1G;c.64=c.63+(e&&e.2R||b.2R||0);c.7E=c.7D+(e&&e.2B||b.2B||0)}9(!c.3Y&&(c.61||c.60))c.3Y=c.61||c.60;9(!c.5F&&c.5D)c.5F=c.5D;9(!c.3Y&&c.2r)c.3Y=(c.2r&1?1:(c.2r&2?3:(c.2r&4?2:0)));I c}};E.1b.1k({3W:G(c,a,b){I c=="5Y"?6.2G(c,a,b):6.N(G(){E.1j.1f(6,c,b||a,b&&a)})},2G:G(d,b,c){I 6.N(G(){E.1j.1f(6,d,G(a){E(6).5X(a);I(c||b).16(6,1q)},c&&b)})},5X:G(a,b){I 6.N(G(){E.1j.28(6,a,b)})},1F:G(c,a,b){I 6.N(G(){E.1j.1F(c,a,6,Q,b)})},7x:G(c,a,b){9(6[0])I E.1j.1F(c,a,6[0],P,b)},25:G(){H a=1q;I 6.4L(G(e){6.4H=0==6.4H?1:0;e.2M();I a[6.4H].16(6,[e])||P})},7v:G(f,g){G 4G(e){H p=e.4K;1W(p&&p!=6)2a{p=p.12}29(e){p=6};9(p==6)I P;I(e.O=="4x"?f:g).16(6,[e])}I 6.4x(4G).5U(4G)},2d:G(f){5T();9(E.3T)f.16(U,[E]);J E.3l.1a(G(){I f.16(6,[E])});I 6}});E.1k({3T:P,3l:[],2d:G(){9(!E.3T){E.3T=Q;9(E.3l){E.N(E.3l,G(){6.16(U)});E.3l=S}9(E.V.35||E.V.34)U.4P("5S",E.2d,P);9(!18.7t.K)E(18).39(G(){E("#4E").28()})}}});E.N(("7s,7r,39,7q,6n,5Y,4L,7p,"+"7n,7m,7l,4x,5U,7k,24,"+"51,7j,7i,7h,3U").2l(","),G(i,o){E.1b[o]=G(f){I f?6.3W(o,f):6.1F(o)}});H x=P;G 5T(){9(x)I;x=Q;9(E.V.35||E.V.34)U.4S("5S",E.2d,P);J 9(E.V.1h){U.7f("<7d"+"7y 22=4E 7z=Q "+"3k=//:><\\/1J>");H a=U.3S("4E");9(a)a.62=G(){9(6.2C!="1l")I;E.2d()};a=S}J 9(E.V.1N)E.4B=4j(G(){9(U.2C=="5Q"||U.2C=="1l"){4A(E.4B);E.4B=S;E.2d()}},10);E.1j.1f(18,"39",E.2d)}E.1b.1k({39:G(g,d,c){9(E.1n(g))I 6.3W("39",g);H e=g.1g(" ");9(e>=0){H i=g.2J(e,g.K);g=g.2J(0,e)}c=c||G(){};H f="4z";9(d)9(E.1n(d)){c=d;d=S}J{d=E.3a(d);f="5P"}H h=6;E.3G({1d:g,O:f,M:d,1l:G(a,b){9(b=="1C"||b=="5O")h.4o(i?E("<1s/>").3g(a.40.1p(/<1J(.|\\s)*?\\/1J>/g,"")).1Y(i):a.40);56(G(){h.N(c,[a.40,b,a])},13)}});I 6},7a:G(){I E.3a(6.5M())},5M:G(){I 6.1X(G(){I E.11(6,"2Y")?E.2h(6.79):6}).1E(G(){I 6.2H&&!6.3c&&(6.2Q||/24|6b/i.14(6.11)||/2g|1P|52/i.14(6.O))}).1X(G(i,c){H b=E(6).3i();I b==S?S:b.1c==1B?E.1X(b,G(a,i){I{2H:c.2H,1Q:a}}):{2H:c.2H,1Q:b}}).21()}});E.N("5L,5K,6t,5J,5I,5H".2l(","),G(i,o){E.1b[o]=G(f){I 6.3W(o,f)}});H B=(1u 3D).3B();E.1k({21:G(d,b,a,c){9(E.1n(b)){a=b;b=S}I E.3G({O:"4z",1d:d,M:b,1C:a,1V:c})},78:G(b,a){I E.21(b,S,a,"1J")},77:G(c,b,a){I E.21(c,b,a,"45")},76:G(d,b,a,c){9(E.1n(b)){a=b;b={}}I E.3G({O:"5P",1d:d,M:b,1C:a,1V:c})},75:G(a){E.1k(E.59,a)},59:{1Z:Q,O:"4z",2z:0,5G:"74/x-73-2Y-72",6o:Q,3e:Q,M:S},49:{},3G:G(s){H f,2y=/=(\\?|%3F)/g,1v,M;s=E.1k(Q,s,E.1k(Q,{},E.59,s));9(s.M&&s.6o&&1m s.M!="1M")s.M=E.3a(s.M);9(s.1V=="4b"){9(s.O.2p()=="21"){9(!s.1d.1t(2y))s.1d+=(s.1d.1t(/\\?/)?"&":"?")+(s.4b||"5E")+"=?"}J 9(!s.M||!s.M.1t(2y))s.M=(s.M?s.M+"&":"")+(s.4b||"5E")+"=?";s.1V="45"}9(s.1V=="45"&&(s.M&&s.M.1t(2y)||s.1d.1t(2y))){f="4b"+B++;9(s.M)s.M=s.M.1p(2y,"="+f);s.1d=s.1d.1p(2y,"="+f);s.1V="1J";18[f]=G(a){M=a;1C();1l();18[f]=W;2a{2E 18[f]}29(e){}}}9(s.1V=="1J"&&s.1L==S)s.1L=P;9(s.1L===P&&s.O.2p()=="21")s.1d+=(s.1d.1t(/\\?/)?"&":"?")+"57="+(1u 3D()).3B();9(s.M&&s.O.2p()=="21"){s.1d+=(s.1d.1t(/\\?/)?"&":"?")+s.M;s.M=S}9(s.1Z&&!E.5b++)E.1j.1F("5L");9(!s.1d.1g("8g")&&s.1V=="1J"){H h=U.4l("9U")[0];H g=U.5B("1J");g.3k=s.1d;9(!f&&(s.1C||s.1l)){H j=P;g.9R=g.62=G(){9(!j&&(!6.2C||6.2C=="5Q"||6.2C=="1l")){j=Q;1C();1l();h.3b(g)}}}h.58(g);I}H k=P;H i=18.6X?1u 6X("9P.9O"):1u 6W();i.9M(s.O,s.1d,s.3e);9(s.M)i.5C("9J-9I",s.5G);9(s.5y)i.5C("9H-5x-9F",E.49[s.1d]||"9D, 9C 9B 9A 5v:5v:5v 9z");i.5C("X-9x-9v","6W");9(s.6U)s.6U(i);9(s.1Z)E.1j.1F("5H",[i,s]);H c=G(a){9(!k&&i&&(i.2C==4||a=="2z")){k=Q;9(d){4A(d);d=S}1v=a=="2z"&&"2z"||!E.6S(i)&&"3U"||s.5y&&E.6R(i,s.1d)&&"5O"||"1C";9(1v=="1C"){2a{M=E.6Q(i,s.1V)}29(e){1v="5k"}}9(1v=="1C"){H b;2a{b=i.5s("6P-5x")}29(e){}9(s.5y&&b)E.49[s.1d]=b;9(!f)1C()}J E.5r(s,i,1v);1l();9(s.3e)i=S}};9(s.3e){H d=4j(c,13);9(s.2z>0)56(G(){9(i){i.9q();9(!k)c("2z")}},s.2z)}2a{i.9o(s.M)}29(e){E.5r(s,i,S,e)}9(!s.3e)c();I i;G 1C(){9(s.1C)s.1C(M,1v);9(s.1Z)E.1j.1F("5I",[i,s])}G 1l(){9(s.1l)s.1l(i,1v);9(s.1Z)E.1j.1F("6t",[i,s]);9(s.1Z&&!--E.5b)E.1j.1F("5K")}},5r:G(s,a,b,e){9(s.3U)s.3U(a,b,e);9(s.1Z)E.1j.1F("5J",[a,s,e])},5b:0,6S:G(r){2a{I!r.1v&&9n.9l=="54:"||(r.1v>=6N&&r.1v<9j)||r.1v==6M||E.V.1N&&r.1v==W}29(e){}I P},6R:G(a,c){2a{H b=a.5s("6P-5x");I a.1v==6M||b==E.49[c]||E.V.1N&&a.1v==W}29(e){}I P},6Q:G(r,b){H c=r.5s("9i-O");H d=b=="6K"||!b&&c&&c.1g("6K")>=0;H a=d?r.9g:r.40;9(d&&a.2V.37=="5k")6G"5k";9(b=="1J")E.5f(a);9(b=="45")a=3w("("+a+")");I a},3a:G(a){H s=[];9(a.1c==1B||a.4c)E.N(a,G(){s.1a(3f(6.2H)+"="+3f(6.1Q))});J L(H j 1i a)9(a[j]&&a[j].1c==1B)E.N(a[j],G(){s.1a(3f(j)+"="+3f(6))});J s.1a(3f(j)+"="+3f(a[j]));I s.66("&").1p(/%20/g,"+")}});E.1b.1k({1A:G(b,a){I b?6.1U({1H:"1A",2N:"1A",1r:"1A"},b,a):6.1E(":1P").N(G(){6.R.19=6.3h?6.3h:"";9(E.17(6,"19")=="2s")6.R.19="2Z"}).2D()},1z:G(b,a){I b?6.1U({1H:"1z",2N:"1z",1r:"1z"},b,a):6.1E(":3R").N(G(){6.3h=6.3h||E.17(6,"19");9(6.3h=="2s")6.3h="2Z";6.R.19="2s"}).2D()},6J:E.1b.25,25:G(a,b){I E.1n(a)&&E.1n(b)?6.6J(a,b):a?6.1U({1H:"25",2N:"25",1r:"25"},a,b):6.N(G(){E(6)[E(6).3t(":1P")?"1A":"1z"]()})},9c:G(b,a){I 6.1U({1H:"1A"},b,a)},9b:G(b,a){I 6.1U({1H:"1z"},b,a)},99:G(b,a){I 6.1U({1H:"25"},b,a)},98:G(b,a){I 6.1U({1r:"1A"},b,a)},96:G(b,a){I 6.1U({1r:"1z"},b,a)},95:G(c,a,b){I 6.1U({1r:a},c,b)},1U:G(k,i,h,g){H j=E.6D(i,h,g);I 6[j.3L===P?"N":"3L"](G(){j=E.1k({},j);H f=E(6).3t(":1P"),3y=6;L(H p 1i k){9(k[p]=="1z"&&f||k[p]=="1A"&&!f)I E.1n(j.1l)&&j.1l.16(6);9(p=="1H"||p=="2N"){j.19=E.17(6,"19");j.2U=6.R.2U}}9(j.2U!=S)6.R.2U="1P";j.3M=E.1k({},k);E.N(k,G(c,a){H e=1u E.2j(3y,j,c);9(/25|1A|1z/.14(a))e[a=="25"?f?"1A":"1z":a](k);J{H b=a.3s().1t(/^([+-]=)?([\\d+-.]+)(.*)$/),1O=e.2b(Q)||0;9(b){H d=3I(b[2]),2i=b[3]||"2T";9(2i!="2T"){3y.R[c]=(d||1)+2i;1O=((d||1)/e.2b(Q))*1O;3y.R[c]=1O+2i}9(b[1])d=((b[1]=="-="?-1:1)*d)+1O;e.3N(1O,d,2i)}J e.3N(1O,a,"")}});I Q})},3L:G(a,b){9(E.1n(a)){b=a;a="2j"}9(!a||(1m a=="1M"&&!b))I A(6[0],a);I 6.N(G(){9(b.1c==1B)A(6,a,b);J{A(6,a).1a(b);9(A(6,a).K==1)b.16(6)}})},9f:G(){H a=E.32;I 6.N(G(){L(H i=0;i-8O?r:3I(E.17(6.T,6.1e))||0},3N:G(c,b,e){6.5u=(1u 3D()).3B();6.1O=c;6.2D=b;6.2i=e||6.2i||"2T";6.2v=6.1O;6.4q=6.4i=0;6.4r();H f=6;G t(){I f.2F()}t.T=6.T;E.32.1a(t);9(E.32.K==1){H d=4j(G(){H a=E.32;L(H i=0;i6.Y.2e+6.5u){6.2v=6.2D;6.4q=6.4i=1;6.4r();6.Y.3M[6.1e]=Q;H a=Q;L(H i 1i 6.Y.3M)9(6.Y.3M[i]!==Q)a=P;9(a){9(6.Y.19!=S){6.T.R.2U=6.Y.2U;6.T.R.19=6.Y.19;9(E.17(6.T,"19")=="2s")6.T.R.19="2Z"}9(6.Y.1z)6.T.R.19="2s";9(6.Y.1z||6.Y.1A)L(H p 1i 6.Y.3M)E.1x(6.T.R,p,6.Y.3P[p])}9(a&&E.1n(6.Y.1l))6.Y.1l.16(6.T);I P}J{H n=t-6.5u;6.4i=n/6.Y.2e;6.4q=E.3J[6.Y.3J||(E.3J.5q?"5q":"6B")](6.4i,n,0,1,6.Y.2e);6.2v=6.1O+((6.2D-6.1O)*6.4q);6.4r()}I Q}};E.2j.2F={2R:G(a){a.T.2R=a.2v},2B:G(a){a.T.2B=a.2v},1r:G(a){E.1x(a.T.R,"1r",a.2v)},6z:G(a){a.T.R[a.1e]=a.2v+a.2i}};E.1b.6m=G(){H c=0,3E=0,T=6[0],5t;9(T)8L(E.V){H b=E.17(T,"2X")=="4F",1D=T.12,23=T.23,2K=T.3H,4f=1N&&3x(4s)<8J;9(T.6V){5w=T.6V();1f(5w.1S+38.33(2K.2V.2R,2K.1G.2R),5w.3E+38.33(2K.2V.2B,2K.1G.2B));9(1h){H d=E("4o").17("8H");d=(d=="8G"||E.5g&&3x(4s)>=7)&&2||d;1f(-d,-d)}}J{1f(T.5l,T.5z);1W(23){1f(23.5l,23.5z);9(35&&/^t[d|h]$/i.14(1D.37)||!4f)d(23);9(4f&&!b&&E.17(23,"2X")=="4F")b=Q;23=23.23}1W(1D.37&&!/^1G|4o$/i.14(1D.37)){9(!/^8D|1I-9S.*$/i.14(E.17(1D,"19")))1f(-1D.2R,-1D.2B);9(35&&E.17(1D,"2U")!="3R")d(1D);1D=1D.12}9(4f&&b)1f(-2K.1G.5l,-2K.1G.5z)}5t={3E:3E,1S:c}}I 5t;G d(a){1f(E.17(a,"9T"),E.17(a,"8A"))}G 1f(l,t){c+=3x(l)||0;3E+=3x(t)||0}}})();',62,616,'||||||this|||if|||||||||||||||||||||||||||||||||function|var|return|else|length|for|data|each|type|false|true|style|null|elem|document|browser|undefined||options|||nodeName|parentNode||test|jQuery|apply|css|window|display|push|fn|constructor|url|prop|add|indexOf|msie|in|event|extend|complete|typeof|isFunction|className|replace|arguments|opacity|div|match|new|status|firstChild|attr|nodeType|hide|show|Array|success|parent|filter|trigger|body|height|table|script|tbody|cache|string|safari|start|hidden|value|merge|left|break|animate|dataType|while|map|find|global||get|id|offsetParent|select|toggle|selected|toUpperCase|remove|catch|try|cur|al|ready|duration|done|text|makeArray|unit|fx|swap|split|target||pushStack|toLowerCase|nextSibling|button|none|handle|guid|now|stack|tb|jsre|timeout|inArray|scrollTop|readyState|end|delete|step|one|name|nth|slice|doc|ret|preventDefault|width|call|events|checked|scrollLeft|exec|px|overflow|documentElement|grep|position|form|block|removeData|rl|timers|max|opera|mozilla|trim|tagName|Math|load|param|removeChild|disabled|insertBefore|async|encodeURIComponent|append|oldblock|val|childNodes|src|readyList|multiFilter|color|defaultView|stopPropagation|args|old|toString|is|last|first|eval|parseInt|self|domManip|prototype|getTime|curCSS|Date|top||ajax|ownerDocument|parseFloat|easing|has|queue|curAnim|custom|innerHTML|orig|currentStyle|visible|getElementById|isReady|error|static|bind|String|which|getComputedStyle|responseText|oWidth|oHeight|on|shift|json|child|RegExp|ol|lastModified|isXMLDoc|jsonp|jquery|previousSibling|dir|safari2|el|styleFloat|state|setInterval|radio|getElementsByTagName|tr|empty|html|getAttribute|pos|update|version|input|float|runtimeStyle|unshift|mouseover|getPropertyValue|GET|clearInterval|safariTimer|visibility|clean|__ie_init|absolute|handleHover|lastToggle|index|fromElement|relatedTarget|click|fix|evt|andSelf|removeEventListener|handler|cloneNode|addEventListener|triggered|nodeIndex|unique|Number|classFilter|prevObject|selectedIndex|after|submit|password|removeAttribute|file|expr|setTimeout|_|appendChild|ajaxSettings|client|active|win|sibling|deep|globalEval|boxModel|cssFloat|object|checkbox|parsererror|offsetLeft|wrapAll|dequeue|props|lastChild|swing|handleError|getResponseHeader|results|startTime|00|box|Modified|ifModified|offsetTop|evalScript|createElement|setRequestHeader|ctrlKey|callback|metaKey|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|serializeArray|init|notmodified|POST|loaded|appendTo|DOMContentLoaded|bindReady|mouseout|not|removeAttr|unbind|unload|Width|keyCode|charCode|onreadystatechange|clientX|pageX|srcElement|join|outerHTML|substr|zoom|parse|textarea|reset|image|odd|even|before|quickClass|quickID|prepend|quickChild|execScript|offset|scroll|processData|uuid|contents|continue|textContent|ajaxComplete|clone|setArray|webkit|nodeValue|fl|_default|100|linear|href|speed|eq|createTextNode|throw|replaceWith|splice|_toggle|xml|colgroup|304|200|alpha|Last|httpData|httpNotModified|httpSuccess|fieldset|beforeSend|getBoundingClientRect|XMLHttpRequest|ActiveXObject|col|br|abbr|pixelLeft|urlencoded|www|application|ajaxSetup|post|getJSON|getScript|elements|serialize|clientWidth|hasClass|scr|clientHeight|write|relative|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|right|dblclick|resize|focus|blur|frames|instanceof|hover|offsetWidth|triggerHandler|ipt|defer|offsetHeight|border|padding|clientY|pageY|Left|Right|toElement|Bottom|Top|cancelBubble|returnValue|detachEvent|attachEvent|substring|line|weight|animated|header|font|enabled|innerText|contains|only|size|gt|lt|uFFFF|u0128|417|inner|Height|toggleClass|removeClass|addClass|replaceAll|noConflict|insertAfter|prependTo|wrap|contentWindow|contentDocument|http|iframe|children|siblings|prevAll|nextAll|wrapInner|prev|Boolean|next|parents|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|compatible|borderTopWidth|ie|ra|inline|it|rv|medium|borderWidth|userAgent|522|navigator|with|concat|1px|10000|array|ig|PI|NaN|400|reverse|fast|600|slow|Function|Object|setAttribute|changed|be|can|property|fadeTo|fadeOut|getAttributeNode|fadeIn|slideToggle|method|slideUp|slideDown|action|cssText|stop|responseXML|option|content|300|th|protocol|td|location|send|cap|abort|colg|cos|tfoot|thead|With|leg|Requested|opt|GMT|1970|Jan|01|Thu|area|Since|hr|If|Type|Content|meta|specified|open|link|XMLHTTP|Microsoft|img|onload|row|borderLeftWidth|head|attributes'.split('|'),0,{})) \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery-speakers_coaches_consultants.js b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery-speakers_coaches_consultants.js deleted file mode 100644 index 6cf741a7..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery-speakers_coaches_consultants.js +++ /dev/null @@ -1,30 +0,0 @@ -jQuery(function($) { - var themap = $('
').css({ - 'width': '90%', - 'height': '500px' - }).insertBefore('ul.people'); - - var mapstraction = new Mapstraction('themap','google'); - mapstraction.addControls({ - zoom: 'large', - map_type: true - }); - - mapstraction.setCenterAndZoom( - new LatLonPoint(30, -0.126236), - 2 // Zoom level appropriate for Brighton city centre - ); - - $('.vcard').each(function() { - var hcard = $(this); - - var latitude = hcard.find('.geo .latitude').text(); - var longitude = hcard.find('.geo .longitude').text(); - - var marker = new Marker(new LatLonPoint(latitude, longitude)); - marker.setInfoBubble( - '
' + hcard.html() + '
' - ); - mapstraction.addMarker(marker); - }); -}); \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery.heartbeat.js b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery.heartbeat.js deleted file mode 100644 index 00117934..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery.heartbeat.js +++ /dev/null @@ -1,9 +0,0 @@ -$(document).ready(function() { - $('#tests-results').load('../views/heartbeat.php?tests-results'); - $('#commits').load('../views/heartbeat.php', '', function() { - $(this).find(".sparkline").each(function() { - sparklinequery($(this)); - }); - }); - $('#last-commits').load('../views/heartbeat.php?last-commits'); -}); diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery.sparkline.js b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery.sparkline.js deleted file mode 100644 index 28c55d77..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/js/jquery.sparkline.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Javascript Sparklines Library - * Based on a work by John Resig - * http://ejohn.org/projects/jspark/ - * - * This work is licensed under a Creative Commons Attribution 2.5 License - * More Info: http://creativecommons.org/licenses/by/2.5/ - * - * To use, place your data points within your HTML, like so: - * 10,8,20,5... - * - * in your CSS you might want to have the rule: - * .sparkline { display: none } - * so that non-compatible browsers don't see a huge pile of numbers. - * - */ - -function sparklinequery(o) { - var p = o.text().split(','); - o.empty(); - - var nw = "auto"; - var nh = "auto"; - - var f = 2; - var w = ( nw == "auto" || nw == 0 ? p.length * f : nw - 0 ); - var h = ( nh == "auto" || nh == 0 ? "1em" : nh ); - - var co = document.createElement("canvas"); - - if ( co.getContext ) { - o.css({ display: "inline" }); - } else { - return false; - } - - - co.style.height = h; - co.style.width = w; - co.width = w; - o.append( co ); - - var h = co.offsetHeight; - co.height = h; - - var min = 9999; - var max = -1; - - for ( var i = 0; i < p.length; i++ ) { - p[i] = p[i] - 0; - if ( p[i] < min ) min = p[i]; - if ( p[i] > max ) max = p[i]; - } - - if ( co.getContext ) { - var c = co.getContext("2d"); - c.strokeStyle = o.css("color"); - c.lineWidth = 1.0; - c.beginPath(); - - for ( var i = 0; i < p.length; i++ ) { - x = (w / p.length) * i; - if (max != min) { - y = h - (((p[i] - min) / (max - min)) * h) ; - } else { - y = 0; - } - y = 3 * i; - c.lineTo(x, y); - } - - c.stroke(); -alert(c); - o.css({ display:"inline" }); - } -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/simpletest.css b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/simpletest.css deleted file mode 100644 index 13fa3889..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/simpletest.css +++ /dev/null @@ -1,43 +0,0 @@ -/* SimpleTest - Unit Testing for PHP */ -body { font-family : georgia, serif; } -img { border : 0; } -h1 { color : #009933; } -h3 { width : 100%; border-bottom : 1px solid #cccccc; } -blockquote { background: transparent url('images/quote.png') left top no-repeat; font-style : italic; padding-left : 40px; margin-left : 10px; } -td { vertical-align : top; } - -#logo { margin-bottom : 20px; } -#credits { margin-top : 40px; } -#actions { position : absolute; top : 20px; left : 40px; width : 335px; } -#actions div { width : 305px; } -#content { position : absolute; top : 20px; left : 400px; padding-bottom : 50px; width : 491px; } -#news { border : 2px solid #009933; padding : 20px; font-weight : bold; font-size : 18pt; width : 451px; } -#news a { color : #009933; } -#internal { background: url('images/simpletest-internal-middle.png') repeat-y; margin-top : 2em; width : 306px; } -#external { background: url('images/simpletest-external-middle.png') repeat-y; width : 306px; } -#internal > div , #external > div { padding : 0 0.5em 0 0.5em; } - -div.console { background-color: black; border: 4px ridge; border-color: gray; color : white; margin: 5px 40px 20px 20px; padding: 10px; } -div.demo { background-color: white; border: 4px ridge; border-color: gray; margin: 5px; margin-left: 20px; margin-right: 40px; padding: 10px; } -div.demo span.fail { color: red; } -div.demo span.pass { color: green; } -div.demo h1 { color: black; font-size: 12pt; font-weight: bold; text-align: left; } -pre { font-family: monospaced; border-left: 1px solid #999999; background-color: white; padding: 5px; margin-left: 5px; font-size : 10pt; } - -.screenshot { border : 1px solid #cccccc;} -.experimental { background-color : yellow; border : 4px dashed black; padding : 10px; } -.experimental pre { border-left : none; background-color : yellow; } -.bubble, .bubble h3 { font-size: 9pt; } -.people { margin : 0; list-style : none; padding : 0; } -.geo { color : #777777; } -.photo { margin-bottom : 2em; } -.photo span { display : block; } -.photo span.title { font-weight : bold; margin-top : 1em; } -.photo img { border : 1px solid #777777; padding : 1em; margin : 1em; } - -dd { font-size : 10.5pt; } -.done, .done span, .done + dd { color : #AAAAAA; text-decoration : line-through; } -.postponed, .postponed span, .postponed + dd { color : #AAAAAA; } - -dt div.fail { background-color : red; color : white; padding : 0.2em; } -dt div.pass { background-color : green; color : white; padding : 0.2em; } \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/views/heartbeat.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/views/heartbeat.php deleted file mode 100644 index 9b48f1c5..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/views/heartbeat.php +++ /dev/null @@ -1,174 +0,0 @@ -view($_SERVER['QUERY_STRING']); - -class SimpleHeartBeat { - public $log_directory; - public $tests_directory; - - function __construct($log_directory) { - $this->log_directory = $log_directory; - } - - function view($querystring) { - switch ($querystring) { - case "last-commits": - return $this->displayLastCommits(); - case "tests-results": - return $this->displayTestsResults(); - case "commits": - default: - return $this->displaySparkline("commits last week"); - } - } - - function displayTestsResults() { - foreach(new DirectoryIterator($this->log_directory) as $node) { - if (preg_match("/simpletest\..*\.log/", $node->getFilename())) { - $log = new SimpleHeartBeatLog($node); - if (!isset($html)) { - $html = "
"; - } - $html .= "
".$log->details()."
"; - $html .= "
".$log->info()."
"; - } - } - if (isset($html)) { - $html .= "
"; - } else { - $html = $this->dataUnavailable(); - } - - return $html; - } - - function displayLastCommits($number=5) { - $entries = array(); - $xml = simplexml_load_file($this->log_directory."/svn.xml"); - foreach ($xml->logentry as $logentry) { - $dt = $logentry->msg; - $dd = $logentry['revision']." - ".$logentry->author. " - ".$logentry->date; - $entries[] = array('dt' => $dt, 'dd' => $dd); - } - - if (count($entries) > 0) { - $html = "
"; - krsort($entries); - $i = 0; - foreach($entries as $entry) { - if ($i < $number) { - $i++; - $html .= "
".$entry['dt']."
"; - $html .= "
".$entry['dd']."
"; - } else { - break; - } - } - - $html .= "
"; - } else { - $html = $this->dataUnavailable(); - } - - return $html; - } - - function displaySparkline($name="commits last week") { - $method = $this->findMethod($name); - $data = $this->$method(); - - if (is_array($data)) { - $html = "
"; - $html .= ""; - $html .= join(",", $data); - $html .= ""; - $html .= " ".array_pop($data)." ".$name; - $html .= "
"; - } else { - $html = $this->dataUnavailable(); - } - - return $html; - } - - function dataUnavailable() { - return "
data unavailable
"; - } - function findMethod($name) { - switch ($name) { - default: - return "commitsPerWeek"; - } - } - - function commitsPerWeek() { - $data = array(); - $xml = simplexml_load_file($this->log_directory."/svn.xml"); - foreach ($xml->logentry as $logentry) { - $timestamp = strtotime($logentry->date); - $weekly = strtotime("last monday", $timestamp); - if (!isset($data[$weekly])) { - $data[$weekly] = 0; - } - $data[$weekly]++; - } - - $data = $this->normalizeData($data, "week"); - - return $data; - } - - function normalizeData($data, $period="week") { - $min = min(array_keys($data)); - $max = max(array_keys($data)); - - $normalized = array(); - $current = $min; - while ($current <= $max) { - $normalized[$current] = 0; - $current = strtotime("+1 ".$period, $current); - } - - foreach ($data as $timestamp => $value) { - $normalized[$timestamp] = $value; - } - - return $normalized; - } -} - -class SimpleHeartBeatLog { - public $node; - public $content = ""; - - function __construct($node) { - $this->node = $node; - $this->content = file_get_contents($this->node->getPathname()); - } - - function result() { - if (preg_match("/OK/", $this->content)) { - return "pass"; - } else { - return "fail"; - } - } - - function info() { - return nl2br($this->content); - } - - function details() { - $details = substr($this->node->getFilename(), 11); - $details = $this->result(). " with ".substr($details, 0, -4); - $details .= " - ".date("c", $this->node->getCTime()); - - return "
result()."\">".$details."
"; - } -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/views/photos_stream.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/views/photos_stream.php deleted file mode 100644 index c85bcf59..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/simpletest.org/views/photos_stream.php +++ /dev/null @@ -1,37 +0,0 @@ -showLastPhotos(); - -class SimpleFlickrStreamXMLElement extends SimpleXMLElement { - function showLastPhotos() { - $html = ""; - foreach ($this->entry as $entry) { - $html .= "
"; - $html .= "".$entry->title.""; - $html .= "".$this->extractFirstImage($entry).""; - $html .= "".$this->extractAuthor($entry).""; - $html .= "
"; - } - return $html; - } - - function extractAuthor($entry) { - return "author->uri."\">".$entry->author->name.""; - } - - function extractFirstImage($entry) { - $content = $entry->content; - $content = substr($content, strpos($content, "") + 3); - - return "link[0]['href']."\">".$image.""; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/about.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/about.xml deleted file mode 100644 index 294a197c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/about.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - About Last Craft - -
-

- - At the moment this site is maintained by myself, - Marcus Baker - and I am an Object Oriented web developer - and father of two. - I am currently a freelancer working as a senior developer for - Wordtracker - and as a consultant to various smaller companies. - Wordtracker is an internet statistics company with a huge database - of search engine keyword popularity. - The company software development is eXtreme Programming based. -

-

- My wife Aviva Racher is a - microbiologist and Mother of the same two. -

-
-
-

- Read the interview - Who's really being protected? on the - O'Reilly network if you have an interest in software patents. -

-
-
-

- Besides working for Wordtracker, I also act as an independent - consultant. - Usually in relation to bringing agile development practices into an - organisation. - Clients include Waterscape and Amnesty International. -

-

- I did a quick site for a graphic designer and illustrator friend of mine, - Dylan Beck. - He has a very unique style. -

-

- The Ambassadors of Om are a Jazz-Funk - fusion (?) band with an internet presence going back over five - years. Site includes samples, videos and links. The band is - managed by guitarist and lead singer Paul Grimes who is a friend of ours. -

-

- - Mark Eichner is Aviva's uncle and run's the - - Leisure Pursuits - off-road driving school. Lots of wheels and mud! -

-
-
- - - Last Craft people - Myself and friends and relations. - - - Issues that I care about. - - - Associated companies - and people. - - - - - - Extreme Tuesday - Club is an informal meeting in London to promote - Extreme programming. - - - PHPLondon - is a user group that meets the first thursday of every month. - - - Wordtracker - crunches internet search data for web marketing. - - - - - software development, - computer programmer, - php programming, - programming php, - software development company, - software development uk, - php tutorial, - bespoke software development uk, - corporate web development, - architecture, - freelancer, - php resources, - wordtracker, - web marketing, - serach engines, - web positioning, - internet marketing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/authentication_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/authentication_documentation.xml deleted file mode 100644 index 7fc01fc6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/authentication_documentation.xml +++ /dev/null @@ -1,337 +0,0 @@ - - - - SimpleTest documentation for testing log-in and authentication - - -

- One of the trickiest, and yet most important, areas - of testing web sites is the security. - Testing these schemes is one of the core goals of - the SimpleTest web tester. -

-
-
-

- If you fetch a page protected by basic authentication then - rather than receiving content, you will instead get a 401 - header. - We can illustrate this with this test... - - function test401Header() { - $this->get('http://www.lastcraft.com/protected/'); - $this->showHeaders(); - } -} -]]> - This allows us to see the challenge header... -

-

File test

-
-
1/1 test cases complete. - 0 passes, 0 fails and 0 exceptions.
-
- We are trying to get away from visual inspection though, and so SimpleTest - allows to make automated assertions against the challenge. - Here is a thorough test of our header... -get('http://www.lastcraft.com/protected/'); - $this->assertAuthentication('Basic'); - $this->assertResponse(401); - $this->assertRealm('SimpleTest basic authentication'); - } -} -]]> - Any one of these tests would normally do on it's own depending - on the amount of detail you want to see. -

-

- One theme that runs through SimpleTest is the ability to use - SimpleExpectation objects wherever a simple - match is not enough. - If you want only an approximate match to the realm for - example, you can do this... -get('http://www.lastcraft.com/protected/'); - $this->assertRealm(new PatternExpectation('/simpletest/i')); - } -} -]]> - This type of test, testing HTTP responses, is not typical. -

-

- Most of the time we are not interested in testing the - authentication itself, but want to get past it to test - the pages underneath. - As soon as the challenge has been issued we can reply with - an authentication response... -get('http://www.lastcraft.com/protected/'); - $this->authenticate('Me', 'Secret'); - $this->assertTitle(...); - } -} -]]> - The username and password will now be sent with every - subsequent request to that directory and subdirectories. - You will have to authenticate again if you step outside - the authenticated directory, but SimpleTest is smart enough - to merge subdirectories into a common realm. -

-

- If you want, you can shortcut this step further by encoding - the log in details straight into the URL... -get('http://Me:Secret@www.lastcraft.com/protected/'); - $this->assertTitle(...); - } -} -]]> - If your username or password has special characters, then you - will have to URL encode them or the request will not be parsed - correctly. - I'm afraid we leave this up to you. -

-

- A problem with encoding the login details directly in the URL is - the authentication header will not be sent on subsequent requests. - If you navigate with relative URLs though, the authentication - information will be preserved along with the domain name. -

-

- Normally though, you use the authenticate() call. - SimpleTest will then remember your login information on each request. -

-

- Only testing with basic authentication is currently supported, and - this is only really secure in tandem with HTTPS connections. - This is usually good enough to protect test server from prying eyes, - however. - Digest authentication and NTLM authentication may be added - in the future if enough people request this feature. -

-
-
-

- Basic authentication doesn't give enough control over the - user interface for web developers. - More likely this functionality will be coded directly into - the web architecture using cookies with complicated timeouts. - We need to be able to test this too. -

-

- Starting with a simple log-in form... -


-    Username:
-    
- Password: -
- - -]]>
- Which looks like... -

-

-

- Username: -
- Password: -
- -
-

-

- Let's suppose that in fetching this page a cookie has been - set with a session ID. - We are not going to fill the form in yet, just test that - we are tracking the user. - Here is the test... -get('http://www.my-site.com/login.php'); - $this->assertCookie('SID'); - } -} -]]> - All we are doing is confirming that the cookie is set. - As the value is likely to be rather cryptic it's not - really worth testing this with... -get('http://www.my-site.com/login.php'); - $this->assertCookie('SID', new PatternExpectation('/[a-f0-9]{32}/i')); - } -} -]]> - If you are using PHP to handle sessions for you then - this test is even more useless, as we are just testing PHP itself. -

-

- The simplest test of logging in is to visually inspect the - next page to see if you are really logged in. - Just test the next page with WebTestCase::assertText(). -

-

- The test is similar to any other form test, - but we might want to confirm that we still have the same - cookie after log-in as before we entered. - We wouldn't want to lose track of this after all. - Here is a possible test for this... -get('http://www.my-site.com/login.php'); - $session = $this->getCookie('SID'); - $this->setField('u', 'Me'); - $this->setField('p', 'Secret'); - $this->click('Log in'); - $this->assertText('Welcome Me'); - $this->assertCookie('SID', $session); - } -} -]]> - This confirms that the session identifier is maintained - afer log-in and we haven't accidently reset it. -

-

- We could even attempt to hack our own system by setting - arbitrary cookies to gain access... -get('http://www.my-site.com/login.php'); - $this->setCookie('SID', 'Some other session'); - $this->get('http://www.my-site.com/restricted.php'); - $this->assertText('Access denied'); - } -} -]]> - Is your site protected from this attack? -

-
-
-

- If you are testing an authentication system a critical piece - of behaviour is what happens when a user logs back in. - We would like to simulate closing and reopening a browser... -get('http://www.my-site.com/login.php'); - $this->setField('u', 'Me'); - $this->setField('p', 'Secret'); - $this->click('Log in'); - $this->assertText('Welcome Me'); - - $this->restart(); - $this->get('http://www.my-site.com/restricted.php'); - $this->assertText('Access denied'); - } -} -]]> - The WebTestCase::restart() method will - preserve cookies that have unexpired timeouts, but throw away - those that are temporary or expired. - You can optionally specify the time and date that the restart - happened. -

-

- Expiring cookies can be a problem. - After all, if you have a cookie that expires after an hour, - you don't want to stall the test for an hour while waiting - for the cookie to pass it's timeout. -

-

- To push the cookies over the hour limit you can age them - before you restart the session... -get('http://www.my-site.com/login.php'); - $this->setField('u', 'Me'); - $this->setField('p', 'Secret'); - $this->click('Log in'); - $this->assertText('Welcome Me'); - - $this->ageCookies(3600); - $this->restart(); - $this->get('http://www.my-site.com/restricted.php'); - $this->assertText('Access denied'); - } -} -]]> - After the restart it will appear that cookies are an - hour older, and any that pass their expiry will have - disappeared. -

-
-
- - - Getting through Basic HTTP authentication - - - Testing cookie based authentication - - - Managing browser sessions and timeouts - - - - - SimpleTest project page on SourceForge. - - - SimpleTest download page on LastCraft. - - - The developer's API for SimpleTest - gives full detail on the classes and assertions available. - - - - - software development, - php programming for clients, - customer focused php, - software development tools, - acceptance testing framework, - free php scripts, - log in boxes, - unit testing authentication systems, - php resources, - HTMLUnit, - JWebUnit, - php testing, - unit test resource, - web testing, - HTTP authentication, - testing log in, - authentication testing, - security tests - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/books_website.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/books_website.xml deleted file mode 100644 index 0877efff..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/books_website.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - Books in and around SimpleTest - -
-

- From time to time a book is recommanded on the mailing-list, you can find it here - with the original comments ! -

-

- Domain-Driven Design: Tackling Complexity in the Heart of Software -

-
- TDD is a lot about the mechanics of coding, but it says you are done - when there is no duplication. DDD considers the code in constant churn, - always renaming as the domain becomes clear and also feeding terms back - into the domain as the code evolves.
-
- Anyways, it's a great book :) [source] -
-
-
-

- Two of SimpleTest contributors have written books about PHP. Both have a lot - of examples with the SimpleTest Unit testing framework. -

-

- PHP|Architect's Guide to PHP Design Patterns -
- PHP|Architect's Guide to PHP Design Patterns
- by Jason E. Sweat
- (get it from : PHP|Architect | - Amazon ) -

-

- The PHP Anthology: Object Oriented PHP Solutions -
- The PHP Anthology: Object Oriented PHP Solutions
- by Harry Fuecks
- (get it from : SitePoint | - Amazon | - review on Slashdot ) -

-
-
-

- One way to help the team of contributors is to buy books from this page through - Amazon (with the simpletest-21 tag). We all love reading stuff that's - both interesting and challenging. -

-
-
- - - Latest recommandation - - - Books by contributors - - - Buying books - - - - - - - - - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/boundary_classes_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/boundary_classes_tutorial.xml deleted file mode 100644 index eb2acbf6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/boundary_classes_tutorial.xml +++ /dev/null @@ -1,405 +0,0 @@ - - - - - PHP unit testing tutorial - Organising unit tests and "setup tests" - - - -

- You are probably thinking that we have well and truly exhausted - the Log class by now and that there is - really nothing more to add. - Things are never that simple with object oriented programming, though. - You think you understand a problem and then something comes a long - that challenges your perspective and leads to an even deeper appreciation. - I thought I understood the logging class and that only the first page - of the tutorial would use it. - After that I would move on to something more complicated. - No one is more surprised than me that I still haven't got to - the bottom of it. - In fact I think I have only just figured out what a logger does. -

-
-
-

- Supposing that we do not want to log to a file at all. - Perhaps we want to print to the screen, write the messages to a - socket or send them to the Unix(tm) syslog daemon for - dispatching across the network. - How do we incorporate this variation? -

-

- Simplest is to subclass the Log - overriding the message() method - with new versions. - This will work in the short term, but there is actually something - subtle, but deeply wrong with this. - Suppose we do subclass and have loggers that write to files, - the screen and the network. - Three classes , but that is OK. - Now suppose that we want a new logging class that adds message - filtering by priority, letting only certain types of messages - through according to some configuration file. -

-

- We are stuck. If we subclass again, we have to do it for all - three classes, giving us six classes. - The amount of duplication is horrible. -

-

- So are you now wishing that PHP had multiple inheritence? - Well, here that would reduce the short term workload, but - complicate what should be a very simple class. - Multiple inheritance, even when supported, should be used - extremely carefully as all sorts of complicated entanglements - can result. - Treat it as a loaded gun. - In fact, our sudden need for it is telling us something else - perhaps - that we have gone wrong on the conceptual level. -

-

- What does a logger do? - Does it send messages to a file? - Does it send messages to a network? - Does it send messages to a screen? - Nope. - It just sends messages (full stop). - The target of those messages can be chosen when setting - up the log, but after that the - logger should be left to combine and format the message - elements as that is its real job. - We restricted ourselves by assuming that target was a filename. -

-
-
-

- The solution to this plight is a real classic. - First we encapsulate the variation in a class as this will - add a level of indirection. - Instead of passing in the file name as a string we - will pass the "thing that we will write to" - which we will call a Writer. - Back to the tests... - -require_once('../classes/writer.php'); -Mock::generate('Clock'); - -class TestOfLogging extends UnitTestCase { - function setUp() { - @unlink('../temp/test.log'); - } - function tearDown() { - @unlink('../temp/test.log'); - } - - function testCreatingNewFile() { - $log = new Log(new FileWriter('../temp/test.log')); - $this->assertFalse(file_exists('../temp/test.log'), 'Created before message'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log'), 'File created'); - } - - function testAppendingToFile() { - $log = new Log(new FileWriter('../temp/test.log')); - $log->message('Test line 1'); - $this->assertWantedPattern( - '/Test line 1/', - $this->getFileLine('../temp/test.log', 0)); - $log->message('Test line 2'); - $this->assertWantedPattern( - '/Test line 2/', - $this->getFileLine('../temp/test.log', 1)); - } - - function testTimestamps() { - $clock = new MockClock($this); - $clock->setReturnValue('now', 'Timestamp'); - $log = new Log(new FileWriter('../temp/test.log')); - $log->message('Test line', $clock); - $this->assertWantedPattern( - '/Timestamp/', - $this->getFileLine('../temp/test.log', 0), - 'Found timestamp'); - } - - function getFileLine($filename, $index) { - $messages = file($filename); - return $messages[$index]; - } -} -?> -]]> - I am going to do this one step at a time so as not to get - confused. - I have replaced the file names with an imaginary - FileWriter class from - an imaginary file classes/writer.php. - This will cause the tests to crash as we have not written - the writer yet. - Should we do that now? -

-

- We could, but we don't have to. - We do need to create the interface, though, or we won't be - able to mock it. - This makes classes/writer.php looks like... - -]]> - We need to modify the Log class - as well... - -require_once('../classes/writer.php'); - -class Log { - private $writer; - - function Log($writer) { - $this->writer = $writer; - } - - function message($message, $clock = false) { - if (! is_object($clock)) { - $clock = new Clock(); - } - $this->writer->write("[" . $clock->now() . "] $message"); - } -} -?> -]]> - There is not much that hasn't changed in our now even smaller - class. - The tests run, but fail at this point unless we add code to - the writer. - What do we do now? -

-

- We could start writing tests and code the - FileWriter class alongside, but - while we were doing this our Log - tests would be failing and disturbing our focus. - In fact we do not have to. -

-

- Part of our plan is to free the logging class from the file - system and there is a way to do this. - First we add a tests/writer_test.php so that - we have somewhere to place our test code from log_test.php - that we are going to shuffle around. - I won't yet add it to the all_tests.php file, - as it is the logging aspect we are tackling right now. -

-

- Now I have done that (honest!) we remove any - tests from log_test.php that are not strictly logging - related and move them to writer_test.php for later. - We will also mock the writer so that it does not write - out to real files... - -Mock::generate('FileWriter'); - -class TestOfLogging extends UnitTestCase { - - function testWriting() { - $clock = new MockClock(); - $clock->setReturnValue('now', 'Timestamp'); - $writer = new MockFileWriter($this); - $writer->expectOnce('write', array('[Timestamp] Test line')); - $log = new Log(\$writer); - $log->message('Test line', $clock); - } -} -?> -]]> - Yes that really is the whole test case and it really is that short. - A lot has happened here... -

    -
  1. - The requirement to create the file only when needed has - moved to the FileWriter. -
  2. -
  3. - As we are dealing with mocks, no files are actually - created and so I moved the - setUp() and - tearDown() off into the - FileWriter tests. -
  4. -
  5. - The test now consists of sending a sample message and - testing the format. -
  6. -
- Hang on a minute, where are the assertions? -

-

- The mock objects do much more than simply behave like other - objects, they also run tests. - The expectOnce() - call told the mock to expect a single parameter of - the string "[Timestamp] Test line" when - the mock write() method is - called. - When that method is called the expected parameters are - compared with this and either a pass or a fail is sent - to the unit test as a result. -

-

- The other expectation is that write() - will be called and called only once. - If the method is not called before the end of the test, - a failure is generated. - We can see all this in action by running the tests... -

-

All tests

- Pass: log_test.php->Log class test->testwriting->Arguments for [write] were [String: [Timestamp] Test line]
- Pass: log_test.php->Log class test->testwriting->Expected call count for [write] was [1], but got [1]
- - Pass: clock_test.php->Clock class test->testclockadvance->Advancement
- Pass: clock_test.php->Clock class test->testclocktellstime->Now is the right time
-
3/3 test cases complete. - 4 passes and 0 fails.
-
-

-
-
-

- Something very nice has happened to the logger besides merely - getting smaller. -

-

- The only things it depends on now are classes that we have written - ourselves, and - in the tests these are mocked and so there are no dependencies - on anything other than our own PHP code. - No writing to files or waiting for clocks to tick over. - This means that the log_test.php test case will - run as fast as the processor will carry it. - By contrast the FileWriter - and Clock classes are very - close to the system. - This makes them harder to test as real data must be moved - around and painstakingly confirmed, often by ad hoc tricks. -

-

- Our last refactoring has helped a bit. - The hard to test classes on the boundary of the application - and the system are now smaller, as the I/O code has - been further separated from the domain logic. - They are direct mappings to PHP operations: - FileWriter::write() maps - to PHP fwrite() with the - file opened for appending and - Clock::now() maps to - PHP time(). - This makes debugging easier. - It also means that these classes will change less often. -

-

- If they don't change a lot then there is no reason to - keep running the tests for them. - This means that tests for the boundary classes can be moved - off into there own test suite leaving the other unit tests - to run at full speed. - In fact this is what I tend to do and the test cases - in SimpleTest itself are - divided this way. -

-

- That may not sound like much with one unit test and two - boundary tests, but typical applications can have - twenty boundary classes and two hundred application - classes. - To keep the unit tests running at full speed you will want - to keep them separate. -

-

- Another benefit of this separation is that you are left - with the smaller test suite for all your dependencies. - Suppose you want to set up a server for your application - and you want to make sure that all underlying components, - directories and configuration are correct. - You no longer need to run the entire test suite to find out, - just run the tests for your boundary classes. - For this reason, this test suite is often called the - "setup tests". - Hand them to your system administrator, and they can set up - your server for you. -

-

- Besides, separating off decisions of which system components - to use is good development. - Being able to change the underlying dependencies easily is a - good thing. - Perhaps all this mocking is - improving our design? -

-
-
- - - Handling variation in our logger. - - - Abstracting further with a mock Writer class. - - - Separating outsetup tests cleans things up. - - - - - This tutorial follows the Mock objects introduction. - - - Next is test driven design. - - - You will need the SimpleTest testing framework - to try these examples. - - - - - software development, - php programming, - programming php, - software development tools, - php tutorial, - free php scripts, - organizing unit tests, - testing tips, - development tricks, - software architecture for testing, - php example code, - mock objects, - junit port, - test case examples, - php testing, - unit test tool, - php test suite - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/browser_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/browser_documentation.xml deleted file mode 100644 index fb1ba684..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/browser_documentation.xml +++ /dev/null @@ -1,281 +0,0 @@ - - - - SimpleTest documentation for the scriptable web browser component - - -

- SimpleTest's web browser component can be used not just - outside of the WebTestCase class, but also - independently of the SimpleTest framework itself. -

-
-
-

- You can use the web browser in PHP scripts to confirm - services are up and running, or to extract information - from them at a regular basis. - For example, here is a small script to extract the current number of - open PHP 5 bugs from the PHP web site... -get('http://php.net/'); -$browser->click('reporting bugs'); -$browser->click('statistics'); -$page = $browser->click('PHP 5 bugs only'); -preg_match('/status=Open.*?by=Any.*?(\d+)<\/a>/', $page, $matches); -print $matches[1]; -?> -]]> - There are simpler methods to do this particular example in PHP - of course. - For example you can just use the PHP file() - command against what here is a pretty fixed page. - However, using the web browser for scripts allows authentication, - correct handling of cookies, automatic loading of frames, redirects, - form submission and the ability to examine the page headers. -

-

- Methods such as periodic scraping are fragile against a site that is constantly - evolving and you would want a more direct way of accessing - data in a permanent set up, but for simple tasks this can provide - a very rapid solution. -

-

- All of the navigation methods used in the - WebTestCase - are present in the SimpleBrowser class, but - the assertions are replaced with simpler accessors. - Here is a full list of the page navigation methods... - - - - - - - - - - - - - - - - - - - - - - -
addHeader($header)Adds a header to every fetch
useProxy($proxy, $username, $password)Use this proxy from now on
head($url, $parameters)Perform a HEAD request
get($url, $parameters)Fetch a page with GET
post($url, $parameters)Fetch a page with POST
click($label)Clicks visible link or button text
clickLink($label)Follows a link by label
clickLinkById($id)Follows a link by attribute
getUrl()Current URL of page or frame
getTitle()Page title
getContent()Raw page or frame
getContentAsText()HTML removed except for alt text
retry()Repeat the last request
back()Use the browser back button
forward()Use the browser forward button
authenticate($username, $password)Retry page or frame after a 401 response
restart($date)Restarts the browser for a new session
ageCookies($interval)Ages the cookies by the specified time
setCookie($name, $value)Sets an additional cookie
getCookieValue($host, $path, $name)Reads the most specific cookie
getCurrentCookieValue($name)Reads cookie for the current context
- The methods SimpleBrowser::useProxy() and - SimpleBrowser::addHeader() are special. - Once called they continue to apply to all subsequent fetches. -

-

- Navigating forms is similar to the - WebTestCase form navigation... - - - - - - - - - - - - - - -
setField($label, $value)Sets all form fields with that label or name
setFieldByName($name, $value)Sets all form fields with that name
setFieldById($id, $value)Sets all form fields with that id
getField($label)Accessor for a form element value by label tag and then name
getFieldByName($name)Accessor for a form element value using name attribute
getFieldById($id)Accessor for a form element value
clickSubmit($label)Submits form by button label
clickSubmitByName($name)Submits form by button attribute
clickSubmitById($id)Submits form by button attribute
clickImage($label, $x, $y)Clicks an input tag of type image by title or alt text
clickImageByName($name, $x, $y)Clicks an input tag of type image by name
clickImageById($id, $x, $y)Clicks an input tag of type image by ID attribute
submitFormById($id)Submits by the form tag attribute
- At the moment there aren't many methods to list available links and fields. - - - - - - - -
isClickable($label)Test to see if a click target exists by label or name
isSubmit($label)Test for the existence of a button with that label or name
isImage($label)Test for the existence of an image button with that label or name
getLink($label)Finds a URL from it's label
getLinkById($label)Finds a URL from it's ID attribute
getUrls()Lists available links in the current page
- This will be expanded in later versions of SimpleTest. -

-

- Frames are a rather esoteric feature these days, but SimpleTest has - retained support for them. -

-

- Within a page, individual frames can be selected. - If no selection is made then all the frames are merged together - in one large conceptual page. - The content of the current page will be a concatenation of all of the - frames in the order that they were specified in the "frameset" - tags. - - - - - - -
getFrames()A dump of the current frame structure
getFrameFocus()Current frame label or index
setFrameFocusByIndex($choice)Select a frame numbered from 1
setFrameFocus($name)Select frame by label
clearFrameFocus()Treat all the frames as a single page
- When focused on a single frame, the content will come from - that frame only. - This includes links to click and forms to submit. -

-
-
-

- All of this functionality is great when we actually manage to fetch pages, - but that doesn't always happen. - To help figure out what went wrong, the browser has some methods to - aid in debugging... - - - - - - - - - - - - - - - - - -
setConnectionTimeout($timeout)Close the socket on overrun
getUrl()Url of most recent page fetched
getRequest()Raw request header of page or frame
getHeaders()Raw response header of page or frame
getTransportError()Any socket level errors in the last fetch
getResponseCode()HTTP response of page or frame
getMimeType()Mime type of page or frame
getAuthentication()Authentication type in 401 challenge header
getRealm()Authentication realm in 401 challenge header
getBaseUrl()Base url only of most recent page fetched
setMaximumRedirects($max)Number of redirects before page is loaded anyway
setMaximumNestedFrames($max)Protection against recursive framesets
ignoreFrames()Disables frames support
useFrames()Enables frames support
ignoreCookies()Disables sending and receiving of cookies
useCookies()Enables cookie support
- The methods SimpleBrowser::setConnectionTimeout() - SimpleBrowser::setMaximumRedirects(), - SimpleBrowser::setMaximumNestedFrames(), - SimpleBrowser::ignoreFrames(), - SimpleBrowser::useFrames(), - SimpleBrowser::ignoreCookies() and - SimpleBrowser::useCokies() continue to apply - to every subsequent request. - The other methods are frames aware. - This means that if you have an individual frame that is not - loading, navigate to it using SimpleBrowser::setFrameFocus() - and you can then use SimpleBrowser::getRequest(), etc to - see what happened. -

-
-
-

- Anything that could be done in a - WebTestCase can - now be done in a UnitTestCase. - This means that we could freely mix domain object testing with the - web interface... -class TestOfRegistration extends UnitTestCase { - function testNewUserAddedToAuthenticator() { - $browser = new SimpleBrowser(); - $browser->get('http://my-site.com/register.php'); - $browser->setField('email', 'me@here'); - $browser->setField('password', 'Secret'); - $browser->click('Register'); - - $authenticator = new Authenticator(); - $member = $authenticator->findByEmail('me@here'); - $this->assertEqual($member->getPassword(), 'Secret'); - } -} -]]> - While this may be a useful temporary expediency, I am not a fan - of this type of testing. - The testing has cut across application layers, make it twice as - likely it will need refactoring when the code changes. -

-

- A more useful case of where using the browser directly can be helpful - is where the WebTestCase cannot cope. - An example is where two browsers are needed at the same time. -

-

- For example, say we want to disallow multiple simultaneous - usage of a site with the same username. - This test case will do the job... - - $first_attempt = new SimpleBrowser(); - $first_attempt->get('http://my-site.com/login.php'); - $first_attempt->setField('name', 'Me'); - $first_attempt->setField('password', 'Secret'); - $first_attempt->click('Enter'); - $this->assertEqual($first_attempt->getTitle(), 'Welcome'); - - $second_attempt = new SimpleBrowser(); - $second_attempt->get('http://my-site.com/login.php'); - $second_attempt->setField('name', 'Me'); - $second_attempt->setField('password', 'Secret'); - $second_attempt->click('Enter'); - $this->assertEqual($second_attempt->getTitle(), 'Access Denied'); - } -} -]]> - You can also use the SimpleBrowser class - directly when you want to write test cases using a different - test tool than SimpleTest, such as PHPUnit. -

-
-
- - - Using the bundled web browser in scripts - - - Debugging failed pages - - - Complex tests with multiple web browsers - - - - - SimpleTest project page on SourceForge. - - - SimpleTest download page on LastCraft. - - - The developer's API for SimpleTest - gives full detail on the classes and assertions available. - - - - - user agent, - web browser php, - fetching pages, - spider scripts, - software development, - php programming for clients, - customer focused php, - software development tools, - acceptance testing framework, - free php scripts, - log in boxes, - unit testing authentication systems, - php resources, - HTMLUnit, - JWebUnit, - php testing, - unit test resource, - web testing, - HTTP authentication, - testing log in, - authentication testing, - security tests - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/changelog.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/changelog.xml deleted file mode 100644 index ab3a6fd2..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/changelog.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - SimpleTest's Changelog - -
- - - Whitespace clean up - - - Some in line documentation fixes - - - Adding the JUnitReporter as an extension to SimpleTest (work by Patrice Neff) - - - New support page for Screencasts - - - - - Synchronizing the french translation. - - - Unit tests working for PHP 5.3 - - - Fix segfault with Zend Optimizer v3.2.2 (probably) - - - Adding some tags to help synchronise the docs - - - Add support for E_DEPRECATED - - - SimpleFileLoader::load: fix for $test_file already included, by daniel hahler - blueyed - - - New tests for UTF8 inside the browser. - - - "Update FormTesting tutorial page for hidden fields" submitted by David Heath - dgheath - - - Moving around the extensions : /ui is now deprecated, /extensions is holding all extensions, - /test/extensions is holding all extensions' test suites - - - Fixing one of the incompatible interface errors - - - Let choose which field of the same name to set - - - Clearing fatal error when throwing in a tearDown - - - Avoid a fatal error in assertLink - (when the link with a label does not exists in a page) submitted by German Rumm - german.rumm AT gmail.com - - - CssSelector chokes on single-quotes - - - clickImageByID not working : just updating the documentation - - - html special chars in links - - - decodeHtml does not decode some entities - (based on patch provided by Quandary - ai2097) - - - Radio buttons not working when set as integer - - - Missing return value - - - Inner links inside documentation for "simpletest.org" now work with *.html - - - Hostname extracted incorrectly from URIs containing @ sign - - - assertWantedText matches javascript source code - - - SimpleUrl doesn't appear to handle path after filename - - - remove call-time reference - its declared in the constructor, so that's enough - - - Adding error throwing to mocks - - - Added PHP4 patches for new mock code - - - Added filter that rewrites paths to included files in tests... - now just need to clean up all the hardcoded path references - in the existing tests and we should be able to make a start on building an extension layout - that's compatible with PEAR installer *and* manual tar/zip extraction - - - Add in default wrap to catch all 'verify' methods and wrap them in assertTrue - - - Recursive forms fails - - - SimpleFileLoader::selectRunnableTests(..) not only marks abstract classes as ignored - but filters them as well - - - renaming SimpleReflection::_isAbstractMethodInParent() into _isAbstractMethodInParents() - and making it check upwards if method was declared somewhere abstract not just in the immediate parent, - this allows to avoid ugly 'must be compatible' error in PHP5 - - - switch to Subversion (SVN) - - - - - autorun - - - browser base tag support - - - - - expectException() - - - proper skip facility - - - greater formatting control in the reporters - - - various mock object compatibility fixes - - -
-
- - - Changelog for version 1.0.1 - - - - - SimpleTest project page on SourceForge. - - - The developer's API for SimpleTest - gives full detail on the classes and assertions available. - - - - - software development, - php programming for clients, - customer focused php, - software development tools, - acceptance testing framework, - free php scripts, - log in boxes, - unit testing authentication systems, - php resources, - HTMLUnit, - JWebUnit, - php testing, - unit test resource, - web testing, - HTTP authentication, - testing log in, - authentication testing, - security tests - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/coding_standards.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/coding_standards.xml deleted file mode 100644 index f08b774e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/coding_standards.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - Coding Standards within SimpleTest - -
-

- Here's the list we try to follow : -

    -
  1. - Short method bodies, hopefully five lines or less. -
  2. -
  3. - No final methods. - People hack their test tools in wierd and wonderful ways. -
  4. -
  5. - No type hinting. - So much of SimpeTest is unit tested, that type hints don't - currently pay their way. -
  6. -
  7. - All object variables are private. - Those currently in the code base that aren't, should be. - Exceptions are fluent interfaces. -
  8. -
  9. - ClassLikeThis, methodLikeThis(), $variables_like_this. -
  10. -
  11. - No abbreviations in names, - so $parameter rather than $param. - Acronyms are allowed if they are industry standard. - We tend to camel case them, e.g. parseXml(). -
  12. -
  13. - We prefer "get"/"set" prefix for accessors, - e.g. getMyAttribute(). - The exception is for fluent interfaces. - This preference is mainly historical though, and could be dropped. - Ruby coding standards are superceding Java ones these days, and - "get" isn't used in that environment. -
  14. -
  15. - Accessors even when a subclass calls a superclass. -
  16. -
  17. - Don't be afraid of long class and method names. - The exception is the use of $i as a loop variable. - A lot of people viewing the code are casual passers by and won't know - any secret conventions. -
  18. -
  19. - "Simple" as a class name prefix - unless it really pollutes the visible domain language. - No other namespace prefixing unless there is known library - clash in the wild. -
  20. -
  21. - Eric Evans domain driven design style - rather than pure XP/TDD. That is, slight over design - in order to make concepts clear. -
  22. -
-

-

- Obviously these reflect Marcus Bakers' average coding style - over several projects and programming languages. -

-

- Is should also be obvious that - the code is riddled with exceptions to these rules :). -

-
-
-

- Please no dangling brace style. - No blank lines in methods. - So not... - - It wastes vertical space and is a hangover from long declarations in C++. - Rather this... - - White space to me should separate something, - such as a method or class. - If you feel the need to add space within a method body, just break - the code up into separate methods. - The exception is test code, which can contain a lot of mock set up. - It's still discouraged though. -

-

- By popular demand, all functions and methods are docblocked. - Private variables are not (the extra clutter is not worth it). - The only docblock attributes we require are @return - and @param as some IDE's use them. - Please take the time to write a human friendly comment. - Imagine you are chatting to a fellow SimpleTest user and they - ask the most obvious question about that variable. -

-
-
- - - Coding standards - - - And other Code formatting stuff. - - - - - - - - - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/display_subclass_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/display_subclass_tutorial.xml deleted file mode 100644 index 0e5243b3..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/display_subclass_tutorial.xml +++ /dev/null @@ -1,267 +0,0 @@ - - - - PHP unit testing tutorial - Subclassing the test display - - -

- SimpleTest ships with the simplest possible interface by default. - Mostly you just want to know if your test passed, or your test failed. - If it failed, you want the reason. - Nothing more. -

-

- Sometimes you want a more sophisticated output for stakeholders - and for acceptance testing. - If a minimal display is not enough, here - is how to roll your own. -

-
-
-

- Do you really need to see the passes? - Oh all right then, here's how. -

-

- We have to subclass the attached display, which in our case - is currently HtmlReporter. - The HtmlReporter class is in - the file simpletest/reporter.php and currently has - the following interface... - - Here is what the relevant methods mean. - You can see the - whole list here - if you are interested. -

    -
  • - __construct()
    - is the constructor. - Note that the unit test sets up the link to the display - rather than the other way around. - The display is a passive receiver of test events. - This allows easy adaption of the display for other test - systems beside unit tests, such as monitoring servers. - It also means that the unit test can write to more than - one display at a time. -
  • -
  • - void paintFail(string $message)
    - paints a failure. - See below. -
  • -
  • - void paintPass(string $message)
    - by default does nothing. - This is the method we will modify. -
  • -
  • - string getCss()
    - returns the CSS styles as a string for the page header - method. - Additional styles have to be appended here. -
  • -
  • - array getTestList()
    - is a convenience method for subclasses. - Lists the current nesting of the tests as a list - of test names. - The first, most deeply nested test, is first in the - list and the current test method will be last. -
  • -
-

-

- To show the passes we just need the - paintPass() method to behave - just like paintFail(). - Of course we won't modify the original, we'll subclass. -

-
-
-

- Firstly we'll create a tests/show_passes.php file - in our logging project and then place in it this empty class... - -]]> - A quick peruse of the - SimpleTest code base - shows the paintFail() implementation - at the time of writing to look like this... -Fail: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode("->", $breadcrumb); - print "->$message
\n"; -} -]]>
- Essentially it chains to the parent's version, which we - have to do also to preserve house keeping, and then - prints a breadcrumbs trail calculated from the current test - list. - It drops the top level tests name, though. - As it is the same on every test that would be a little bit too - much information. - Transposing this to our new class... - - function paintPass($message) { - parent::paintPass($message); - print "Pass: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode("->", $breadcrumb); - print "->$message
\n"; - } -} -]]>
- So far so good. - Now to make use of our new class we have to modify our - tests/all_tests.php file. - -require_once('show_passes.php'); -require_once('simpletest/simpletest.php'); -SimpleTest::prefer('ShowPasses'); -require_once('simpletest/autorun.php'); - -class AllTests { - function __construct() { - parent::__construct('All tests'); - $this->addTestFile('log_test.php'); - $this->addTestFile('clock_test.php'); - } -} -?> -]]> - We can run this to see the results of our handywork... -

-

All tests

- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 1/] in [Test line 1]
- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 2/] in [Test line 2]
- Pass: log_test.php->Log class test->testcreatingnewfile->Created before message
- Pass: log_test.php->Log class test->testcreatingnewfile->File created
- Pass: clock_test.php->Clock class test->testclockadvance->Advancement
- Pass: clock_test.php->Clock class test->testclocktellstime->Now is the right time
-
3/3 test cases complete. - 6 passes and 0 fails.
-
- Nice, but no gold star. - We have lost a little formatting here. - The display does not have a CSS style for - span.pass, but we can add this - easily by overriding one more method... -Pass: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode("->", $breadcrumb); - print "->$message
\n"; - } - - protected function getCss() { - return parent::getCss() . ' .pass { color: green; }'; - } -} -]]>
- If you are adding the code as you go, you will see the style - appended when you do view source on the test results page in your browser. - To the eye the display itself should now look like this... -
-

All tests

- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 1/] in [Test line 1]
- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 2/] in [Test line 2]
- Pass: log_test.php->Log class test->testcreatingnewfile->Created before message
- Pass: log_test.php->Log class test->testcreatingnewfile->File created
- Pass: clock_test.php->Clock class test->testclockadvance->Advancement
- Pass: clock_test.php->Clock class test->testclocktellstime->Now is the right time
-
3/3 test cases complete. - 6 passes and 0 fails.
-
- Some people definitely prefer to see the passes being added - as they are working on code; the feeling that you are getting - work done is nice after all. - Once you have to scroll up and down the page to find failures - though, you soon come to realise its dark side. -

-

- Try it both ways and see which you prefer. - We'll leave it in for a bit anyhow when looking at the - mock objects coming up. - This is the first test tool that generates additional tests - and it will be useful to see what is happening behind the scenes. -

-
-
- - - How to Change the display to show test passes. - - - Subclassing the HtmlReporter class. - - - - - The previous tutorial section was - subclassing the test case. - - - This section is very specific to - SimpleTest. - If you use another tool you will want to skip this. - - - - - software development test first, - php general programming advice, - programming php, - software development tools, - php tutorial, - free php sample code, - architecture, - sample test cases, - php simple test framework, - php resources, - php test case examples, - phpunit, - simpletest, - unit test, - php testing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/download_website.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/download_website.xml deleted file mode 100644 index 542c057e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/download_website.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - Downloading SimpleTest - -
-

- The current release is : - - SimpleTest v1.0.1. -

-

- You can download this version from - - SourceForget.net - and your local mirror. You may also want to look at - the current changelog. -

- -
-
-

- If eclipse is your IDE / editor of choice, you might consider - the - Eclipse plugin. -

-

- For automatic "find and install", the URL is : -

http://simpletest.org/eclipse/
-

-
-
-

- SimpleTest has been packaged by the community to different flavours. -

- -

- Note : careful, some versions are not always up-to-date. -

-
-
-

- The source code is hosted on Sourceforge as well : you can browse the - SVN repository - there. -

-
-
- -
-
- - - Current release - - - Eclipse release - - - Packages - - - Source - - - Older stable releases - - - - - - - - - SimpleTest, - download, - source code, - stable release, - eclipse release, - eclipse plugin, - debian package, - drupal module, - pear channel, - pearified package - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/expectation_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/expectation_documentation.xml deleted file mode 100644 index 74a0f025..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/expectation_documentation.xml +++ /dev/null @@ -1,383 +0,0 @@ - - - - - Extending the SimpleTest unit tester with additional expectation classes - - -
-

- The default behaviour of the - mock objects - in - SimpleTest - is either an identical match on the argument or to allow any argument at all. - For almost all tests this is sufficient. - Sometimes, though, you want to weaken a test case. -

-

- One place where a test can be too tightly coupled is with - text matching. - Suppose we have a component that outputs a helpful error - message when something goes wrong. - You want to test that the correct error was sent, but the actual - text may be rather long. - If you test for the text exactly, then every time the exact wording - of the message changes, you will have to go back and edit the test suite. -

-

- For example, suppose we have a news service that has failed - to connect to its remote source. -class NewsService { - ... - function publish($writer) { - if (! $this->isConnected()) { - $writer->write('Cannot connect to news service "' . - $this->_name . '" at this time. ' . - 'Please try again later.'); - } - ... - } -} -]]> - Here it is sending its content to a - Writer class. - We could test this behaviour with a - MockWriter like so... - - $writer = new MockWriter(); - $writer->expectOnce('write', array( - 'Cannot connect to news service ' . - '"BBC News" at this time. ' . - 'Please try again later.')); - - $service = new NewsService('BBC News'); - $service->publish($writer); - } -} -]]> - This is a good example of a brittle test. - If we decide to add additional instructions, such as - suggesting an alternative news source, we will break - our tests even though no underlying functionality - has been altered. -

-

- To get around this, we would like to do a regular expression - test rather than an exact match. - We can actually do this with... - - $writer->expectOnce( - 'write', - array(new PatternExpectation('/cannot connect/i'))); - - $service = new NewsService('BBC News'); - $service->publish($writer); - } -} -]]> - Instead of passing in the expected parameter to the - MockWriter we pass an - expectation class called - PatternExpectation. - The mock object is smart enough to recognise this as special - and to treat it differently. - Rather than simply comparing the incoming argument to this - object, it uses the expectation object itself to - perform the test. -

-

- The PatternExpectation takes - the regular expression to match in its constructor. - Whenever a comparison is made by the MockWriter - against this expectation class, it will do a - preg_match() with this pattern. - With our test case above, as long as "cannot connect" - appears in the text of the string, the mock will issue a pass - to the unit tester. - The rest of the text does not matter. -

-

- The possible expectation classes are... - - - - - - - - - - - - - - - -
AnythingExpectationWill always match
EqualExpectationAn equality, rather than the stronger identity comparison
NotEqualExpectationAn inequality comparison
IndenticalExpectationThe default mock object check which must match exactly
NotIndenticalExpectationInverts the mock object logic
WithinMarginExpectationCompares a value to within a margin
OutsideMarginExpectationChecks that a value is out side the margin
PatternExpectationUses a Perl Regex to match a string
NoPatternExpectationPasses only if failing a Perl Regex
IsAExpectationChecks the type or class name only
NotAExpectationOpposite of the IsAExpectation
MethodExistsExpectationChecks a method is available on an object
TrueExpectationAccepts any PHP variable that evaluates to true
FalseExpectationAccepts any PHP variable that evaluates to false
- Most take the expected value in the constructor. - The exceptions are the pattern matchers, which take a regular expression, - and the IsAExpectation and NotAExpectation which takes a type - or class name as a string. -

-

- Some examples... -

-

-expectOnce('method', array(new IdenticalExpectation(14))); -]]> - This is the same as $mock->expectOnce('method', array(14)). -expectOnce('method', array(new EqualExpectation(14))); -]]> - This is different from the previous version in that the string - "14" as a parameter will also pass. - Sometimes the additional type checks of SimpleTest are too restrictive. -expectOnce('method', array(new AnythingExpectation(14))); -]]> - This is the same as $mock->expectOnce('method', array('*')). -expectOnce('method', array(new IdenticalExpectation('*'))); -]]> - This is handy if you want to assert a literal "*". - - This matches on anything other than integer 14. - Even the string "14" would pass. - - This will accept any value from 13.999 to 14.001 inclusive. -

-
-
-

- The expectation classes can be used not just for sending assertions - from mock objects, but also for selecting behaviour for the - mock objects. - Anywhere a list of arguments is given, a list of expectation objects - can be inserted instead. -

-

- Suppose we want a mock authorisation server to simulate a successful login, - but only if it receives a valid session object. - We can do this as follows... - -$authorisation = new MockAuthorisation(); -$authorisation->setReturnValue( - 'isAllowed', - true, - array(new IsAExpectation('Session', 'Must be a session'))); -$authorisation->setReturnValue('isAllowed', false); -]]> - We have set the default mock behaviour to return false when - isAllowed is called. - When we call the method with a single parameter that - is a Session object, it will return true. - We have also added a second parameter as a message. - This will be displayed as part of the mock object - failure message if this expectation is the cause of - a failure. -

-

- This kind of sophistication is rarely useful, but is included for - completeness. -

-
-
-

- The expectation classes have a very simple structure. - So simple that it is easy to create your own versions for - commonly used test logic. -

-

- As an example here is the creation of a class to test for - valid IP addresses. - In order to work correctly with the stubs and mocks the new - expectation class should extend - SimpleExpectation or forther extend a subclass... -class ValidIp extends SimpleExpectation { - - function test($ip) { - return (ip2long($ip) != -1); - } - - function testMessage($ip) { - return "Address [$ip] should be a valid IP address"; - } -} -]]> - There are only two methods to implement. - The test() method should - evaluate to true if the expectation is to pass, and - false otherwise. - The testMessage() method - should simply return some helpful text explaining the test - that was carried out. -

-

- This class can now be used in place of the earlier expectation - classes. -

-

- Here is a more typical example, matching part of a hash... -class JustField extends EqualExpectation { - private $key; - - function __construct($key, $expected) { - parent::__construct($expected); - $this->key = $key; - } - - function test($compare) { - if (! isset($compare[$this->key])) { - return false; - } - return parent::test($compare[$this->key]); - } - - function testMessage($compare) { - if (! isset($compare[$this->key])) { - return 'Key [' . $this->key . '] does not exist'; - } - return 'Key [' . $this->key . '] -> ' . - parent::testMessage($compare[$this->key]); - } -} -]]> - We tend to seperate message clauses with - " ]]>". - This allows derivative tools to reformat the output. -

-

- Suppose some authenticator is expecting to be given - a database row corresponding to the user, and we - only need to confirm the username is correct. - We can assert just their username with... -expectOnce('authenticate', - array(new JustKey('username', 'marcus'))); -]]> -

-
-
-

- The SimpleTest unit testing framework - also uses the expectation classes internally for the - UnitTestCase class. - We can also take advantage of these mechanisms to reuse our - homebrew expectation classes within the test suites directly. -

-

- The most crude way of doing this is to use the generic - SimpleTest::assert() method to - test against it directly... -class TestOfNetworking extends UnitTestCase { - ... - function testGetValidIp() { - $server = &new Server(); - $this->assert( - new ValidIp(), - $server->getIp(), - 'Server IP address->%s'); - } -} -]]> - assert() will test any expectation class directly. -

-

- This is a little untidy compared with our usual - assert...() syntax. -

-

- For such a simple case we would normally create a - separate assertion method on our test case rather - than bother using the expectation class. - If we pretend that our expectation is a little more - complicated for a moment, so that we want to reuse it, - we get... - - function assertValidIp($ip, $message = '%s') { - $this->assert(new ValidIp(), $ip, $message); - } - - function testGetValidIp() { - $server = &new Server(); - $this->assertValidIp( - $server->getIp(), - 'Server IP address->%s'); - } -} -]]> - It is rare to need the expectations for more than pattern - matching, but these facilities do allow testers to build - some sort of domain language for testing their application. - Also, complex expectation classes could make the tests - harder to read and debug. - In effect extending the test framework to create their own tool set. -

-
-
- - - Using expectations for - more precise testing with mock objects - - - Changing mock object behaviour with expectations - - - Extending the expectations - - - Underneath SimpleTest uses expectation classes - - - - - SimpleTest project page on SourceForge. - - - SimpleTest download page on LastCraft. - - - The expectations mimic the constraints in JMock. - - - Full API for SimpleTest - from the PHPDoc. - - - - - mock objects, - test driven development, - inheritance of expectations, - mock object constraints, - advanced PHP unit testing, - test first, - test framework architecture - expectations in simpletest - test cases - server stubs - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/experimental_dom_tester.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/experimental_dom_tester.xml deleted file mode 100644 index fda46a00..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/experimental_dom_tester.xml +++ /dev/null @@ -1,231 +0,0 @@ - - - - [experimental] Testing elements by CSS selector - - -
- Careful : this documentation refers to un-released code. It's only available in SVN. -
-

- Before SimpleTest2 gets a new browser (PHP5 only and DOM based), a new - extension made its way to the SimpleTest trunk. -

-

- Note : it's already PHP5 only. -

-
-
-

- 1998 seems a long time ago now : it's the year - the the Web Standards Project (WaSP) - started fighting for standards. -

-

- Nearly ten years later, every web developper is now familiar with CSS : - id & class are the new tools of the trade. - The tricks you've learned while styling, you can re-use them when testing your web site. -

-

- I was about to start with the Flickr home page - but then again, this is what the HTML source looks like : - -

-
- - - -
-[...] -]]> - Who said too many tables ? So I picked something else... - the SimpleTest home page ! - -
-
- -
-
- -[...] -]]> -

- -
-

- As usual we start with the necessary require_once - -]]> - The DomTestCase extends the WebTestCase, - we can just use it the same way. -

-

-assertTrue($this->get($url)); - $this->assertEqual($this->getUrl(), $url); - $this->assertElementsBySelector( - 'h2', - array('Screenshots', 'Documentation', 'Contributing') - ); - } -} -?> -]]> -

-

- I was expecting to get a nice green bar straight away : - I did wrote the HTML template after all. - Unfortunately it didn't happen, PHP gave me some nice exceptions : -

- home: /$ php dom_tester_doc_test.php
- dom_tester_doc_test.php
- Exception 1!
- Unexpected PHP error [DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: ID simpletestlogo already defined in Entity, line: 12] severity [E_WARNING] in [/Users/perrick/Sites/simpletest/extensions/dom_tester.php line 103]
- in testGet
- in TestOfLiveCssSelectors
- Exception 2!
- Unexpected PHP error [DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: ID simpletestdownload already defined in Entity, line: 16] severity [E_WARNING] in [/Users/perrick/Sites/simpletest/extensions/dom_tester.php line 103]
- in testGet
- in TestOfLiveCssSelectors
- Exception 3!
- Unexpected PHP error [DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: ID simpleteststarttesting already defined in Entity, line: 24] severity [E_WARNING] in [/Users/perrick/Sites/simpletest/extensions/dom_tester.php line 103]
- in testGet
- in TestOfLiveCssSelectors
- Exception 4!
- Unexpected PHP error [DOMDocument::loadHTML() [function.DOMDocument-loadHTML]: ID simpletestsupport already defined in Entity, line: 38] severity [E_WARNING] in [/Users/perrick/Sites/simpletest/extensions/dom_tester.php line 103]
- in testGet
- in TestOfLiveCssSelectors
- FAILURES!!!
- Test cases run: 1/1, Passes: 3, Failures: 0, Exceptions: 4
-
- That's what validation is all about I guess. -

-

- Back to the drawing board... A simple fix later, everything is fine. -

- home: /$ php dom_tester_doc_test.php
- dom_tester_doc_test.php
- OK
- Test cases run: 1/1, Passes: 3, Failures: 0, Exceptions: 0
-
-

-
-
-

- If you thought it was easy, we can make things a little bit more difficult - - or precise - with attribute selectors : -assertTrue($this->get($url)); - $this->assertEqual($this->getUrl(), $url); - $this->assertElementsBySelector( - 'h2', - array('Screenshots', 'Documentation', 'Contributing') - ); - $this->assertElementsBySelector( - 'a[href="http://simpletest.org/api/"]', - array('the complete API', 'documented API') - ); - } -} -[...] -]]> -

- home: /$ php dom_tester_doc_test.php
- dom_tester_doc_test.php
- OK
- Test cases run: 1/1, Passes: 4, Failures: 0, Exceptions: 0
-
-

-

- Oh and by the way, combinators do work as well : -assertTrue($this->get($url)); - $this->assertEqual($this->getUrl(), $url); - $this->assertElementsBySelector( - 'h2', - array('Screenshots', 'Documentation', 'Contributing') - ); - $this->assertElementsBySelector( - 'a[href="http://simpletest.org/api/"]', - array('the complete API', 'documented API') - ); - $this->assertElementsBySelector( - 'div#content > p > strong', - array('SimpleTest PHP unit tester') - ); - } -} -[...] -]]> -

- home: /$ php dom_tester_doc_test.php
- dom_tester_doc_test.php
- OK
- Test cases run: 1/1, Passes: 5, Failures: 0, Exceptions: 0
-
-

-
- - - A Recorder for non-developpers. - Exploring the Recorder results. - - - - The JUnit FAQ - has plenty of useful testing advice. - - - Next is grouping test - cases together. - - - You will need the SimpleTest testing framework - for these examples. - - - - - software development, - php programming, - programming php, - software development tools, - php tutorial, - free php scripts, - architecture, - php resources, - mock objects, - junit, - php testing, - unit test, - automated php testing, - test cases tutorial, - explain unit test case, - unit test example, - unit test - - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/experimental_intro.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/experimental_intro.xml deleted file mode 100644 index 430e250d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/experimental_intro.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - Experimental stuff, found in SVN only - -
-

- If a bug is found in SimpleTest, chances are it'll get corrected - inside the Subversion (SVN) tree with the corresponding test case : just to make - sure the bug doesn't make a come back later on. -

-

- Also the SimpleTest SVN trunk is usually full of little known - experiments with code : new ideas are usually tried out there - before a general release. Before it happens, the documentation needs - to be completed : that's where this section comes into place. You'll - find here new features the dev team is happy with : we're looking - for comments... -

-

- The mailing-list is usually the best place to give feedback. Other options - includes submitting a bug or a patch directly on the Sourceforge trackers... -

-

- Note : some of these features may never make it to a release or not for - a long time! -

-
-
- - - SimpleTest mailing-lists' page on SourceForge. - - - SimpleTest trackers' page on Sourceforge as well. - - - - - php unit testing, - test integration, - documentation, - marcus baker, - simple test, - simpletest documentation, - phpunit, - pear, - experimental, - cvs, - code experiment, - feedback - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/experimental_recorder.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/experimental_recorder.xml deleted file mode 100644 index e4991cc3..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/experimental_recorder.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - [experimental] Using the test results for other tools with the Recorder - - -
- Careful : this documentation refers to un-released code. It's only available in SVN. -
-

- What the developer wants from his tests is immediate feedback. The TextReporter - and the HtmlReporter are there to show this feedback. As quickly as possible - and as close to your working tools as possible : the console, the browser. -

-
-
-

- But often developers don't work alone : you may have a team contributing to - the same code base next door, a manager a little bit further away and even - a team of testers or power users on the other side of the planet. -

-

- For them as well tests' results are valuable pieces of information ! They just need - to be formatted and archived somewhere. The Recorder allows you to grab all - output to a simple PHP array. - -require_once('simpletest/ui/recorder.php'); - -$group = new TestSuite(); -$group->addTestFile('test_of_module_ship.php'); -$group->addTestFile('test_of_module_pay.php'); - -$recorder = new Recorder(); -$group->run($recorder); -?> -]]> -

-

- Within this $recorder object lies the test suite information. - Let's dump the $recorder->results variable and check what's - in it : - - array(4) { - ["time"]=> - int(1173951256) - ["status"]=> - string(6) "Passed" - ["test"]=> - string(129) "examples/test_of_module_ship.php->TestUsingParcelForce->testParcelForceIsFine" - ["message"]=> - string(97) " at [examples/test_of_module_ship.php line 7]" - } - [1]=> - array(4) { - ["time"]=> - int(1173951256) - ["status"]=> - string(6) "Passed" - ["test"]=> - string(154) "examples/test_of_module_ship.php->TestUsingMyOwnAirplane->testUsingMyOwnAirplaneOnlyWorksForSmallGifts" - ["message"]=> - string(134) "Expected false, got [Boolean: false] at [examples/test_of_module_ship.php line 13]" - } - [2]=> - array(4) { - ["time"]=> - int(1173951256) - ["status"]=> - string(6) "Passed" - ["test"]=> - string(135) "examples/test_of_module_pay.php->TestPayForParcelForce->testPayForParcelForceIsFine" - ["message"]=> - string(96) " at [examples/test_of_module_pay.php line 7]" - } - [3]=> - array(4) { - ["time"]=> - int(1173951256) - ["status"]=> - string(6) "Passed" - ["test"]=> - string(155) "examples/test_of_module_pay.php->TestPayForMyOwnAirplane->testPayForMyOwnAirplaneOnlyWorksForSmallGifts" - ["message"]=> - string(133) "Expected false, got [Boolean: false] at [examples/test_of_module_pay.php line 13]" - } -} -?> -]]> -

-
-
-

- Each element of the $recoder->results array contains one assertion's - information : -

    -
  • time : when the assertion was executed, in a timestamp format.
  • -
  • status : either Passed or Failed
  • -
  • test : the name of the test
  • -
  • message : the actual message, useful for understanding what went wrong
  • -
-

-

- Now iterating throught the results becomes really easy... -addTestFile('test_of_module_ship.php'); -$group->addTestFile('test_of_module_pay.php'); -$recorder = new Recorder(); -$group->run($recorder); - -foreach (recorder->results as $result) { - if ($result->status == "Failed") { - do_something_while_it_is_time(result); - } -} - -?> -]]> -

-
-
- - A Recorder for non-developers. - Exploring the Recorder results. - - - - The JUnit FAQ - has plenty of useful testing advice. - - - Next is grouping test - cases together. - - - You will need the SimpleTest testing framework - for these examples. - - - - - software development, - php programming, - programming php, - software development tools, - php tutorial, - free php scripts, - architecture, - php resources, - mock objects, - junit, - php testing, - unit test, - automated php testing, - test cases tutorial, - explain unit test case, - unit test example, - unit test - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/extension_eclipse.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/extension_eclipse.xml deleted file mode 100644 index b86278b8..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/extension_eclipse.xml +++ /dev/null @@ -1,279 +0,0 @@ - - - - Simpletest Eclipse Plugin Documentation - -
-
    -
  • - Operating System.
    - This plugin should work on any platform on which Eclipse works. Specifically - the plugin has been tested to work on Linux, OS X, and Windows. If the - plugin does not appear to work on one of these platforms a new incompatibility - may have emerged, but this is relatively unlikely. -
  • -
  • - Eclipse
    - The plugin has been designed to work with Eclipse versions 3.1.X+ and 3.2.X+. - Eclipse in general requires a JVM version of 1.4.x; there are no additional requirements for the plugin. -
  • -
  • - PHP
    - The plugin has been tested to work with PHP 4.3.x+ (including PHP 5.1.x.). -
  • -
  • - Xdebug
    - The plugin can be configured to work with Xdebug (version 2.0.0RC1 or later). - The php.ini file which is used by the plugin (see below for specifying the php.ini file) must load the Xdebug extension. - This is usually accomplished by adding a zend_extension_ts="Some Windows Path" or zend_extension="Some Linux Path" to your php.ini file. - Specific instructions can be found at: http://xdebug.org/install.php - Do not worry about specifying any other parameters, the plugin will handle setting the necessary parameters, as needed. -
  • -
  • - Simpletest
    - The plugin has been designed to work with a specific version of Simpletest - and in fact includes the associated version of Simpletest in the plugin for compatibility. - A plugin with a version number of 1.0.0_0.0.4 would indicate that the plugin was compatible - with Simpletest version 1.0.0 and was version 0.0.4 of the plugin. - Some slight modifications to the Simpletest code are required to make the plugin - work with Simpletest; these modifications may or may not be in the released version of Simpletest. -
  • -
  • - PHPUnit2
    - Starting with plugin version 0.1.6 experimental support for the CVS version of PHPUnit2 - is available. To use PHPUnit2 select a path to PHPUnit2 and select PHPUnit2 test instead of - SimpleTest. Note: this is the path to the folder that contains the PHPUnit2 - folder. PHPUnit3 is not currently supported but will be supported in the near future. -
  • -
-
-
-
    -
  1. Download and Install Eclipse (www.eclipse.org) – if you are not sure what to download, download the Eclipse 3.1.0 SDK.
  2. -
  3. Download the latest Simpletest Eclipse plug-in zip file (Simpletest Sourceforge)
  4. -
  5. Extract the zip file to a temporary location {this will be referred to later in this documentation as $unzip}
  6. -
  7. Start Eclipse
  8. -
  9. Open the Install Wizard by clicking "Help" > "Software Updates" > "Find and Install" from the menu bar.
  10. -
  11. Select the second button, "Search for new features to install" and click "Next".
  12. -
  13. Click the button on the right hand side, "New Local Site".
  14. -
  15. Select the folder $unzip {the folder extracted previously}.
  16. -
  17. Click the "OK" button.
  18. -
  19. In the "Edit Local Site" window, Click the "OK" button
  20. -
  21. Click the "Finish" button
  22. -
  23. In the "Search Results" window, drill down and select "Simpletest plug-in 0.0.x"
  24. -
  25. Click the "Next" button.
  26. -
  27. Read the license and accept the license by clicking the "I accept the terms in the license agreement" radio button and then clicking the "Next" button
  28. -
  29. In the "Installation" window you can choose to change the location -- most users should just click the "Finish" button
  30. -
  31. In the "Feature Verification" window, click the "Install" button.
  32. -
  33. When prompted, restart Eclipse
  34. -
  35. -

    After starting Eclipse for the first time after installation - you will need to perform a quick configuration of the Simpletest Plug-in. - To perform this configuration: -

    -
      -
    1. - Select "Window" > "Preferences" from the menu bar -
    2. -
    3. - Select "Simpletest" from the categories on the left hand side of the popup box. -
    4. -
    5. - Enter or Browse for the location of a PHP executable to use. -
    6. -
    7. - Leave the include file blank -
    8. -
    9. - Enter .php as the Test File Suffix. - Alternately if you name your test PHP files with a sufficiently different suffix - (e.g sometest.tst.php) you could enter in a more differentiating suffix (e.g. .tst.php). - This helps when the plug-in is looking for tests to execute. -
    10. -
    11. - Hit the "Ok" button to close the preferences window. -
    12. -
    -
  36. -
-
-
- Note: this will only work if you have previously installed the plugin using the - Eclipse installation wizard. If you previously copied directories for installation, - it is recommended that you shutdown Eclipse, delete the previous version directories, and - follow the Installation instructions above (you should not have to perform the initial configuration - portion). -
    -
  1. Select "Help" > "Software Updates" > "Manage Configuration" from the menu
  2. -
  3. Drill down to find the Simpletest plugin and select it
  4. -
  5. In the right hand pane click the link for "Scan for Updates"
  6. -
  7. IF no updates are found, navigate to Window > Preferences > Install/Update > Valid Updates in the Eclipse preferences and select 'Compatible', not 'equivalent'. Then repeat the steps above.
  8. -
  9. Select the feature versions that you wish to upgrade, and click "Next".
  10. -
  11. Review the license agreements for the upgraded features. If the terms of all these licenses are acceptable, check "I accept the terms in the license agreements." Do not proceed to download the features if the license terms are not acceptable.
  12. -
  13. Click "Install" to allow the downloading and installing to proceed.
  14. -
  15. Once all the features and plug-ins have been downloaded successfully and their files installed into the product on the local computer, a new configuration that incorporates these features and plug-ins will be formulated. Click Yes when asked to exit and restart the Workbench for the changes to take effect.
  16. -
-
-
-

- Note: this will only work if the plugin was installed via the Feature Update method. If installed via alternate methods, then the plugin can be uninstalled by deleting the directories which were previously added. -

-
    -
  1. Select "Help" > "Software Updates" > "Manage Configuration"
  2. -
  3. Drill down to find the Simpletest plugin
  4. -
  5. Right-click on the Simpletest plugin and select the option "Disable"
  6. -
  7. when prompted, restart Eclipse
  8. -
  9. After Eclipse has restarted, select "Help" > "Software Updates" > "Manage Configuration" from the menu bar
  10. -
  11. Select the option from the toolbar "Show Disabled Features"
  12. -
  13. Drill down to find the Simpletest plugin
  14. -
  15. Right-click on the Simpletest plugin and select the option "Uninstall"
  16. -
  17. When prompted, restart Eclipse
  18. -
-
-
-

- The following details some sample usages of the plugin. -

-
    -
  1. Create a new test project (a holding place for related files) -
      -
    1. Select "File" > "New" > "Project.." from the menu
    2. -
    3. Expand the folder "General" and select "Project"
    4. -
    5. Click the "Next" button
    6. -
    7. On the next tab enter a project name: "Test"
    8. -
    9. Use the default Project Contents
    10. -
    11. Click the "Finish" button
    12. -
    -
  2. -
  3. Create a Single Passing Test -
      -
    1. In the Package Explorer View right-click on the "Test" project and select "New" > "File".
    2. -
    3. For the filename enter: test1.php and click "Finish"
    4. -
    5. Double-click on the test1.php entry in the Package Explorer which should open a new view to edit the file.
    6. -
    7. Enter the following for the contents of the file: -assertEqual(3,$total, "This should pass"); - } -} -?> -]]> -
    8. -
    9. Select "File" > "Save" from the menu.
    10. -
    11. Right click on the test1.php entry and select "Run" > "Run Simpletest".
    12. -
    13. The "Result View" should populate with information about the test run and the Simpletest console should fill with some information as well.
    14. -
    -
  4. -
  5. Single Test class multiple tests -
      -
    1. In the Package Explorer View right-click on the "Test" project and select "New" > "File".
    2. -
    3. For the filename enter: test2.php and click "Finish".
    4. -
    5. Double-click on the test2.php entry in the Package Explorer which should open a new view to edit the file.
    6. -
    7. Enter the following for the contents of the file: -assertEqual(3,$total, "This should pass"); - } - function test_fail(){ - $x = 1; - $y = 2; - $total = $x + $y; - $this->assertEqual(4,$total,"This should fail"); - } -} -?> -]]> -
    8. -
    9. Select "File" > "save" from the menu bar.
    10. -
    11. Right click on the test2.php entry and select "Run" > "Run Simpletest".
    12. -
    13. The Result View should populate with information about the test run and the Simpletest console should fill with some information as well
    14. -
    -
  6. -
  7. Group Tests (test multiple files at once) -
      -
    1. In the Package Explorer View right-click on the "Test" project and select "New" > "File"
    2. -
    3. For the filename enter: grouptest.php and click "Finish".
    4. -
    5. Double-click on the grouptest.php entry in the Package Explorer which should open a new view to edit the file.
    6. -
    7. Enter the following for the contents of the file: -addTestFile(dirname(__FILE__).'/test1.php'); - $this->addTestFile(dirname(__FILE__).'/test2.php'); - } -} -?> -]]> -
    8. -
    9. Select "File" > "save" from the menu
    10. -
    11. Right click on the grouptest.php entry and select "Run" > "Run Simpletest"
    12. -
    13. The Result View should populate with information about the test run and the Simpletest console should fill with some information as well
    14. -
    -
  8. -
-
-
-
    -
  • - Make sure that if a constructor is used in the test case - that the last line of the constructor calls the parent - constructor (e.g. parent::UnitTestCase) -
  • -
  • - Do not put any assertions into the test class constructor -
  • -
  • - If you get an error indicating that a class could not load; then restart Eclipse. Once - Eclipse restarts, open the Result View manually by selecting "Window"->"Show View"->"Other..." - Then select the SimpleTest Category and select "Result View" and click "OK". -
  • -
-
-
-

These are features that should eventually make it into this plugin

-
    -
  • - Allow different "include" file on each runner (override the "master" include) -
  • -
  • - Handle fatal errors better -
  • -
-
-
- - - - software development, - eclipse plugin, - php programming, - programming php, - software development tools, - php tutorial, - free php scripts, - architecture, - php resources, - mock objects, - junit, - php testing, - unit test, - automated php testing, - test cases tutorial, - explain unit test case, - unit test example, - unit test - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/first_test_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/first_test_tutorial.xml deleted file mode 100644 index 962ec808..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/first_test_tutorial.xml +++ /dev/null @@ -1,436 +0,0 @@ - - - - PHP unit testing tutorial - Creating an example test case in PHP - - -

- If you are new to unit testing it is recommended that you - actually try the code out as we go. - There is actually not very much to type and you will get - a feel for the rhythm of test first programming. -

-

- To run the examples as is, you need an empty directory with the folders - classes, tests and temp. - Unpack the SimpleTest framework - into the tests folder and make sure your web server - can reach these locations. -

-
-
-

- The quick introductory example - featured the unit testing of a simple log class. - In this tutorial on SimpleTest I am going to try to - tell the whole story of developing this class. - This PHP class is small and simple and in the course of - this introduction will receive far more attention than - it probably would in production. - Yet even this tiny class contains some surprisingly difficult - design decisions. -

-

- Maybe they are too difficult? - Rather than trying to design the whole thing up front - I'll start with a known requirement, namely - we want to write messages to a file. - These messages must be appended to the file if it exists. - Later we will want priorities and filters and things, but - for now we will place the file writing requirement in - the forefront of our thoughts. - We will think of nothing else for fear of getting confused. - OK, let's make a test... - -]]> - Piece by piece here is what it all means. -

-

- The dirname(__FILE__) construct just ensures - that the path is taken relative current file. -

-

- What is this autorun.php file? - This file does the expected work of pulling in the definitions - of UnitTestCase. - It collects all test classes in the current file and runs - them automagically. - It does this by setting up an exit handler. - More on this later when we look at modifying the output. -

-

- The tests themselves are gathered in test case classes. - This one, the TestOfLoggingclass , is typical in extending - UnitTestCase. - When the test case is invoked by the autorunner it will - search for any method within that starts with the name "test". - Each of these methods will be executed in the order they are - defined in the class. -

-

- Our only test method at present is called - testFirstLogMessagesCreatesFileIfNonexistent(). - There is nothing in it yet. -

-

- Now the empty method definition on its own does not do anything. - We need to actually place some code inside it. - The UnitTestCase class - will typically generate test events when run and these events are - sent to an observing reporter using methods inherited from - UnitTestCase. -

-

- Now to add test code... - - -class TestOfLogging extends UnitTestCase { - function testFirstLogMessagesCreatesFileIfNonexistent() { - @unlink(dirname(__FILE__) . '/../temp/test.log'); - $log = new Log(dirname(__FILE__) . '/../temp/test.log'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists(dirname(__FILE__) . '../temp/test.log')); - } -} -?> -]]> -

-

- You are probably thinking that that is a lot of test code for - just one test and I would agree. - Don't worry. - This is a fixed cost and from now on we can add tests - pretty much as one liners. - Even less when using some of the test artifacts that we - will use later. -

-

- You might also have been thinking that - testFirstLogMessagesCreatesFileIfNonexistent - is an awfully long method name. - Normally that would be true, but here it's a good thing. - We will never type this name again, and we save ourselves having - to write comments or specifications. -

-

- Now comes the first of our decisions. - Our test file is called log_test.php (any name - is fine) and is in a folder called tests (anywhere is fine). - We have called our code file log.php and this is - the code we are going to test. - I have placed it into a folder called classes, so that means - we are building a class, yes? -

-

- For this example I am, but the unit tester is not restricted - to testing classes. - It is just that object oriented code is easier to break - down and redesign for testing. - It is no accident that the fine grain testing style of unit - tests has arisen from the object community. -

-

- The test itself is minimal. - It first deletes any previous test file that may have - been left lying around. - Design decisions now come in thick and fast. - Our class is called Log - and takes the file path in the constructor. - We create a log and immediately send a message to - it using a method named - message(). - Sadly, original naming is not a desirable characteristic - of a software developer. -

-

- The smallest unit of a...er...unit test is the assertion. - Here we want to assert that the log file we just sent - a message to was indeed created. - UnitTestCase::assertTrue() - will send a pass event if the condition evaluates to - true and a fail event otherwise. - We can have a variety of different assertions and even more - if we extend our base test cases. -

-

- Here is the base list... - - - - - - - - - - - - - - - - - - - - - -
assertTrue($x)Fail unless $x evaluates true
assertFalse($x)Fail unless $x evaluates false
assertNull($x)Fail unless $x is not set
assertNotNull($x)Fail unless $x is set to something
assertIsA($x, $t)Fail unless $x is the class or type $t
assertNotA($x, $t)Fail unless $x is not the class or type $t
assertEqual($x, $y)Fail unless $x == $y is true
assertNotEqual($x, $y)Fail unless $x == $y is false
assertWithinMargin($x, $y, $margin)Fail unless $x and $y are separated less than $margin
assertOutsideMargin($x, $y, $margin)Fail unless $x and $y are sufficiently different
assertIdentical($x, $y)Fail unless $x === $y for variables, $x == $y for objects of the same type
assertNotIdentical($x, $y)Fail unless $x === $y is false, or two objects are unequal or different types
assertReference($x, $y)Fail unless $x and $y are the same variable
assertCopy($x, $y)Fail unless $x and $y are the different in any way
assertSame($x, $y)Fail unless $x and $y are the same objects
assertClone($x, $y)Fail unless $x and $y are identical, but separate objects
assertPattern($p, $x)Fail unless the regex $p matches $x
assertNoPattern($p, $x)Fail if the regex $p matches $x
expectError($e)Triggers a fail if this error does not happen before the end of the test
expectException($e)Triggers a fail if this exception is not thrown before the end of the test
-

-

- We are now ready to execute our test script by pointing the - browser at it. - What happens? - It should crash... -

- Fatal error: Failed opening required '../classes/log.php' (include_path='') in /home/marcus/projects/lastcraft/tutorial_tests/Log/tests/log_test.php on line 7 -
- The reason is that we have not yet created log.php. -

-

- Hang on, that's silly! - You aren't going to build a test without creating any of the - code you are testing, surely...? -

-
-
-

- Co-inventor of - Extreme Programming, - Kent Beck, has come up with another manifesto. - The book is called - Test driven development - or TDD and raises unit testing to a senior position in design. - In a nutshell you write a small test first and - then only get this passing by writing code. - Any code. - Just get it working. -

-

- You write another test and get that passing. - What you will now have is some duplication and generally lousy - code. - You re-arrange, or "refactor", that code while the tests are passing. - This stops you breaking anything. - Once the code is as clean as possible you are ready to add more - functionality, which you don't do. - Instead you add another test for your feature and start the - cycle again. - Your functionality gets created by trying to pass the tests that - define it. -

-

- Think of it as an executable specification that you create just in time. -

-

- This is a radical approach and one that I feel is incomplete, - but it makes for a great way to explain a unit tester! - We happen to have a failing, not to say crashing, test right now so - let's write some code into log.php... - -]]> - This is the minimum to avoid a PHP fatal error. - We now get the response... -

-

TestOfLogging

- Fail: testFirstLogMessagesCreatesFileIfNonexistent->True assertion failed.
-
1/1 test cases complete. - 0 passes, 1 fails and 0 exceptions.
-
- And "TestOfLogging" has failed. - SimpleTest uses class names by default to describe the tests, but - we can replace the name with our own... -function __construct() { - parent::__construct('Log test'); - } - - function testFirstLogMessagesCreatesFileIfNonexistent() { - @unlink(dirname(__FILE__) . '/../temp/test.log'); - $log = new Log(dirname(__FILE__) . '/../temp/test.log'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists(dirname(__FILE__) . '/../temp/test.log')); - } -} -]]> - Giving... -
-

Log test

- Fail: testFirstLogMessagesCreatesFileIfNonexistent->File created.
-
1/1 test cases complete. - 0 passes, 1 fails and 0 exceptions.
-
- If you want to change the test name, then you'd have to do it by - changing the reporter output, which we look at later. -

-

- To get the test passing we could just create the file in the - Log constructor. - This "faking it" technique is very useful for checking - that your tests work when the going gets tough. - This is especially so if you have had a run of test failures - and just want to confirm that you haven't just missed something - stupid. - We are not going that slow, so... - - var $path; - - function __construct($path) { - $this->path = $path; - } - - function message($message) { - $file = fopen($this->path, 'a'); - fwrite($file, $message . "\n"); - fclose($file); - } -} -?> -]]> - It took me no less than four failures to get to the next step. - I had not created the temporary directory, I had not made it - publicly writeable, I had one typo and I did not check in the - new directory to CVS (I found out later). - Any one of these could have kept me busy for several hours if - they had come to light later, but then that is what testing is for. -

-

- With the necessary fixes we get... -

-

Log test

-
1/1 test cases complete. - 1 passes, 0 fails and 0 exceptions.
-
- Success! -

-

- You may not like the rather minimal style of the display. - Passes are not shown by default because generally you do - not need more information when you actually understand what is - going on. - If you do not know what is going on then you should write another test. -

-

- OK, this is a little strict. - If you want to see the passes as well then you - can subclass the - HtmlReporter class - and attach that to the test instead. - Even I like the comfort factor sometimes. -

-
-
-

- There is a subtlety here. - We don't want the file created until we actually send - a message. - Rather than think about this too deeply we will just - assert it... - - $this->assertFalse(file_exists(dirname(__FILE__) . '/../temp/test.log')); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists(dirname(__FILE__) . '/../temp/test.log')); - - } -} -]]> - ...and find it already works... -

-

TestOfLogging

-
1/1 test cases complete. - 2 passes, 0 fails and 0 exceptions.
-
- Actually I knew it would. - I am putting this test in to confirm this partly for peace of mind, but - also to document the behaviour. - That little extra test line says more in this context than - a dozen lines of use case or a whole UML activity diagram. - That the test suite acts as a source of documentation is a pleasant - side effect of all these tests. -

-

- Should we clean up the temporary file at the end of the test? - I usually do this once I am finished with a test method - and it is working. - I don't want to check in code that leaves remnants of - test files lying around after a test. - I don't do it while I am writing the code, though. - I probably should, but sometimes I need to see what is - going on and there is that comfort thing again. -

-

- In a real life project we usually have more than one test case, - so we next have to look at - grouping tests into test suites. -

-
-
- - Creating a new test case. - Test driven development in PHP. - Tests as documentation is one of many side effects. - - - - The JUnit FAQ - has plenty of useful testing advice. - - - Next is grouping test - cases together. - - - You will need the SimpleTest testing framework - for these examples. - - - - - software development, - php programming, - programming php, - software development tools, - php tutorial, - free php scripts, - architecture, - php resources, - mock objects, - junit, - php testing, - unit test, - automated php testing, - test cases tutorial, - explain unit test case, - unit test example, - unit test - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/form_testing_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/form_testing_documentation.xml deleted file mode 100644 index d7ccceb9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/form_testing_documentation.xml +++ /dev/null @@ -1,304 +0,0 @@ - - - - SimpleTest documentation for testing HTML forms - -
-

- When a page is fetched by the WebTestCase - using get() or - post() the page content is - automatically parsed. - This results in any form controls that are inside <form> tags - being available from within the test case. - For example, if we have this snippet of HTML... -


-    
-    
-
-]]>
- Which looks like this... -

-

-

- - -
-

-

- We can navigate to this code, via the - LastCraft - site, with the following test... - - function testDefaultValue() { - $this->get('http://www.lastcraft.com/form_testing_documentation.php'); - $this->assertField('a', 'A default'); - } -} -]]> - Immediately after loading the page all of the HTML controls are set at - their default values just as they would appear in the web browser. - The assertion tests that a HTML widget exists in the page with the - name "a" and that it is currently set to the value - "A default". - As usual, we could use a pattern expectation instead of a fixed - string. -get('http://www.lastcraft.com/form_testing_documentation.php'); - $this->assertField('a', new PatternExpectation('/default/')); - } -} -]]> - We could submit the form straight away, but first we'll change - the value of the text field and only then submit it... -get('http://www.my-site.com/'); - $this->assertField('a', 'A default'); - $this->setField('a', 'New value'); - $this->click('Go'); - } -} -]]> - Because we didn't specify a method attribute on the form tag, and - didn't specify an action either, the test case will follow - the usual browser behaviour of submitting the form data as a GET - request back to the same location. - In general SimpleTest tries to emulate typical browser behaviour as much as possible, - rather than attempting to catch any form of HTML omission. - This is because the target of the testing framework is the PHP application - logic, not syntax or other errors in the HTML code. - For HTML errors, other tools such as - HTMLTidy should be used, - or any of the HTML and CSS validators already out there. -

-

- If a field is not present in any form, or if an option is unavailable, - then WebTestCase::setField() will return - false. - For example, suppose we wish to verify that a "Superuser" - option is not present in this form... -

Select type of user to add:
-
-]]>
- Which looks like... -

-

-

- Select type of user to add: - -
-

-

- The following test will confirm it... - - $this->get('http://www.lastcraft.com/form_testing_documentation.php'); - $this->assertFalse($this->setField('type', 'Superuser')); - } -} -]]> - The current selection will not be changed if the new value is not an option. -

-

- Here is the full list of widgets currently supported... -

    -
  • Text fields, including hidden and password fields.
  • -
  • Submit buttons including the button tag, although not yet reset buttons
  • -
  • Text area. This includes text wrapping behaviour.
  • -
  • Checkboxes, including multiple checkboxes in the same form.
  • -
  • Drop down selections, including multiple selects.
  • -
  • Radio buttons.
  • -
  • Images.
  • -
-

-

- The browser emulation offered by SimpleTest mimics - the actions which can be perform by a user on a - standard HTML page. Javascript is not supported, and - it's unlikely that support will be added any time - soon. -

-

- Of particular note is that the Javascript idiom of - passing form results by setting a hidden field cannot - be performed using the normal SimpleTest - commands. See below for a way to test such forms. -

-
-
-

- SimpleTest can cope with two types of multivalue controls: Multiple - selection drop downs, and multiple checkboxes with the same name - within a form. - The multivalue nature of these means that setting and testing - are slightly different. - Using checkboxes as an example... -


-    Create privileges allowed:
-    
- Retrieve privileges allowed: -
- Update privileges allowed: -
- Destroy privileges allowed: -
- - -]]>
- Which renders as... -

-

-

- Create privileges allowed: -
- Retrieve privileges allowed: -
- Update privileges allowed: -
- Destroy privileges allowed: -
- -
-

-

- If we wish to disable all but the retrieval privileges and - submit this information we can do it like this... - - function testDisableNastyPrivileges() { - $this->get('http://www.lastcraft.com/form_testing_documentation.php'); - $this->assertField('crud', array('c', 'r', 'u', 'd')); - $this->setField('crud', array('r')); - $this->click('Enable Privileges'); - } -} -]]> - Instead of setting the field to a single value, we give it a list - of values. - We do the same when testing expected values. - We can then write other test code to confirm the effect of this, perhaps - by logging in as that user and attempting an update. -

-
-
-

- If you want to test a form which relies on javascript to set a hidden - field, you can't just call setField(). - The following code will not work: -// This does *not* work - $this->setField('a_hidden_field', '123'); - $this->clickSubmit('OK'); - } -} -]]> - Instead, you need to pass the additional form parameters to the - clickSubmit() method: -$this->clickSubmit('OK', array('a_hidden_field'=>'123')); - } - -} -]]> - Bear in mind that in doing this you're effectively stubbing out a - part of your software (the javascript code in the form), and - perhaps you might be better off using something like - Selenium to ensure a complete - test. -

-
-
-

- If you want to test a form handler, but have not yet written - or do not have access to the form itself, you can create a - form submission by hand. - - function testAttemptedHack() { - $this->post( - 'http://www.my-site.com/add_user.php', - array('type' => 'superuser')); - $this->assertNoText('user created'); - } -} -]]> - By adding data to the WebTestCase::post() - method, we are emulating a form submission. - You would normally only do this as a temporary expedient, or where - you are expecting a 3rd party to submit to a form. - The exception is when you want tests to protect you from - attempts to spoof your pages. -

-
-
- - - Changing form values and successfully - Submitting a simple form - - - Handling widgets with multiple values - by setting lists. - - - Bypassing javascript to set a hidden field. - - - Raw posting when you don't have a button - to click. - - - - - SimpleTest project page on SourceForge. - - - SimpleTest download page on LastCraft. - - - The developer's API for SimpleTest - gives full detail on the classes and assertions available. - - - - - software development, - php programming for clients, - customer focused php, - software development tools, - acceptance testing framework, - free php scripts, - architecture, - php resources, - HTMLUnit, - JWebUnit, - php testing, - unit test resource, - web testing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/gain_control_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/gain_control_tutorial.xml deleted file mode 100644 index f0bbc2cf..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/gain_control_tutorial.xml +++ /dev/null @@ -1,290 +0,0 @@ - - - - PHP unit testing tutorial - Isolating variables when testing - - -

- In order to test a code module you need very tight control - of its environment. - If anything can vary behind the scenes, for example a - configuration file, then this could cause the tests - to fail unexpectedly. - This would not be a fair test of the code and could - cause you to spend fruitless hours examining code that - is actually working, rather than dealing with the configuration issue - that actually failed the test. - At the very least your test cases get more complicated in - taking account the possible variations. -

-
-
-

- There are often a lot of obvious variables that could affect - a unit test case, especially in the web development - environment in which PHP usually operates. - These include database set up, file permissions, network - resources and configuration amongst others. - The failure or misinstall of one of these components will - break the test suite. -

-

- Do we add tests to confirm these components are installed? - This is a good idea, but if you place them into code module - tests you will start to clutter you test code with detail - that is irrelavent to the immediate task. - They should be placed in their own test suite. -

-

- Another problem, though, is that our development machines - must have every system component installed to be able - to run the test suite. - Your tests run slower too. -

-

- When faced with this while coding we will often create wrapper - versions of classes that deal with these resources. - Ugly details of these resources are then coded once only. - I like to call these classes "gateway classes", - as they exist at the edges of the application, - the interface of your application with the rest of the - system. - These gateway classes are best simulated during testing - by fake versions. - These run faster and are often called - "Server Stubs", or in more generic form - "Mock Objects". - It is a great time saver to wrap and stub out such resources. -

-

- One often neglected external resource is time. -

-

- For example, to test a session time-out coders will often - temporarily set the session time limit to a small value, say two seconds, - and then do a sleep(3) - and assert that the session is now invalid. - That adds three seconds to your test suite and is usually - a lot of extra code making your session classes that maleable. - Far simpler is to have a way to suddenly advance the clock. - To control time. -

-
-
-

- We will again design our clock wrapper by first writing tests. - We add a clock test case to our tests/all_tests.php - test suite... -addTest(new TestOfLogging()); - $this->addTest(new TestOfClock()); - } -} -?> -]]> - Then we create the test case in the new file - tests/clock_test.php... - -class TestOfClock extends UnitTestCase { - function testClockTellsTime() { - $clock = new Clock(); - $this->assertEqual($clock->now(), time()); - } -} -?> -]]> - Our only test at the moment is that our new - Clock class acts - as a simple PHP time() - function substitute. - We will write the time shift functionality once we are green. - At the moment we are obviously not green... -

-
- Fatal error: Failed opening required '../classes/clock.php' (include_path='') in - /home/marcus/projects/lastcraft/tutorial_tests/tests/clock_test.php on line 2 -
-
- We create a classes/clock.php file... - -]]> - This regains our flow ready for coding. -
-

AllTests

- Fail: TestOfClock -> testClockTellsTime -> [NULL: ] should be equal to [integer: 1050257362]
-
3/3 test cases complete. - 4 passes, 1 fails and 0 exceptions.
-
- This is now easy to fix... - - return time(); - } -} -]]> - And we are green... -
-

AllTests

-
3/3 test cases complete. - 5 passes, 0 fails and 0 exceptions.
-
- There is still a problem. -

-

- The clock could roll over during the assertion causing the - result to be out by one second. - The chances are small, but if there were a lot of timing tests - you would end up with a test suite that is erratic, severely - limiting its usefulness. - We will tackle this shortly and for now just jot it onto our - "to do" list. -

-

- The advancement test looks like this... -assertEqual($clock->now(), time()); - } - - function testClockAdvance() { - $clock = new Clock(); - $clock->advance(10); - $this->assertEqual($clock->now(), time() + 10); - } -} -]]> - The code to get to green is straight forward and just involves adding - a time offset. - - private $offset = 0; - - function now() { - return time() + $this->offset; - } - - function advance($offset) { - $this->offset += $offset; - } -} -]]> -

-
-
-

- Our all_tests.php file has some repetition we could - do without. - We have to manually add our test cases from each included - file. - It is possible to remove it, but use of the following requires care. - The TestSuite class has a - convenience method called addFile() - that takes a PHP file as a parameter. - This mechanism makes a note of all the classes, requires in the - file and then has a look at any newly created classes. - If they are descendents of SimpleTestCase - they are added as a new TestSuite. -

-

- Here is our refactored test suite using this method... - -require_once(dirname(__FILE__) . '/simpletest/autorun.php'); - -class AllTests extends TestSuite { - function AllTests() { - parent::__construct(); - $this->addFile('log_test.php'); - $this->addFile('clock_test.php'); - } -} -?> -]]> - The pitfalls of this are... -

    -
  1. - If the test file has already been included, - no new classes will be added to this group -
  2. -
  3. - If the test file has other classes that are - related to SimpleTestCase - then these will be added to the group test as well. -
  4. -
- In practice neither of these turn out to be problems. - Test suites are usually a tree structure. - It's rare to need a test case in two places. - As for extra classes being included, they have to be - descendents of SimpleTestCase. - These are likely to be superclasses of helper code - for several other tests. - Simply marking them as abstract is - enough to stop them being run. -

-

- We should really fix the glitch with the possible - clock rollover so we'll - do this next. -

-
-
- - Time is an often neglected variable in tests. - A clock class allows us to alter time. - Tidying the group test. - - - - The previous section is - grouping unit tests. - - - The next section is - subclassing test cases. - - - You will need - the SimpleTest unit tester - for the examples. - - - - - software development, - php programming, - programming php, - software development tools, - php tutorial, - free php scripts, - architecture, - php resources, - mock objects, - junit, - php testing, - unit test, - php testing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/group_test_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/group_test_documentation.xml deleted file mode 100644 index 96c140ad..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/group_test_documentation.xml +++ /dev/null @@ -1,332 +0,0 @@ - - - - SimpleTest for PHP test suites - -
-

- To run test cases as part of a group, the test cases should really - be placed in files without the runner code... - -]]> - As many cases as needed can appear in a single file. - They should include any code they need, such as the library - being tested, but none of the simple test libraries. -

-

- If you have extended any test cases, you can include them - as well. In PHP 4... - - class MyFileTestCase extends UnitTestCase { - ... - } - SimpleTest::ignore('MyFileTestCase'); - - class FileTester extends MyFileTestCase { ... } - - class SocketTester extends UnitTestCase { ... } -?> -]]> - The FileTester class does - not contain any actual tests, but is a base class for other - test cases. - For this reason we use the - SimpleTestOptions::ignore() directive - to tell the upcoming group test to ignore it. - This directive can appear anywhere in the file and works - when a whole file of test cases is loaded (see below). -

-

- If you are using PHP 5, you do not need this special directive at all. - Simply mark any test cases that should not be run as abstract... -abstract class MyFileTestCase extends UnitTestCase { - ... -} - -class FileTester extends MyFileTestCase { ... } - -class SocketTester extends UnitTestCase { ... } -]]> -

-

- We will call this sample file_test.php. - Next we create a group test file, called say my_group_test.php. - You will think of a better name I am sure. -

-

- We will add the test file using a safe method... - - require_once('file_test.php'); - - $test = &new TestSuite('All file tests'); - $test->addTestCase(new FileTestCase()); - $test->run(new HtmlReporter()); -?> -]]> - This instantiates the test case before the test suite is - run. - This could get a little expensive with a large number of test - cases, and can be surprising behaviour. -

-

- The main problem is that for every test case - that we add we will have - to require_once() the test code - file and manually instantiate each and every test case. -

-

- We can save a lot of typing with... - - $test->addTestFile('file_test.php'); - $test->run(new HtmlReporter()); -?> -]]> - What happens here is that the TestSuite - class has done the require_once() - for us. - It then checks to see if any new test case classes - have been created by the new file and automatically adds - them to the group test. - Now all we have to do is add each new file. -

-

- No only that, but you can guarantee that the constructor is run - just before the first test method and, in PHP 5, the destructor - is run just after the last test method. -

-

- There are two things that could go wrong and which require care... -

    -
  1. - The file could already have been parsed by PHP, and so no - new classes will have been added. You should make - sure that the test cases are only included in this file - and no others (Note : with the new autorun - functionnality, this problem has now been solved). -
  2. -
  3. - New test case extension classes that get included will be - placed in the group test and run also. - You will need to add a SimpleTestOptions::ignore() - directive for these classes, or make sure that they are included - before the TestSuite::addTestFile() - line, or make sure that they are abstract classes. -
  4. -
-

-
-
-

- The above method places all of the test cases into one large group. - For larger projects though this may not be flexible enough; you - may want to group the tests in all sorts of ways. -

-

- To get a more flexible group test we can subclass - TestSuite and then instantiate it as needed... - - class FileTestSuite extends TestSuite { - function FileTestSuite() { - $this->TestSuite('All file tests'); - $this->addTestFile('file_test.php'); - } - } -?> -]]> - This effectively names the test in the constructor and then - adds our test cases and a single group below. - Of course we can add more than one group at this point. - We can now invoke the tests from a separate runner file... - - $test = &new FileTestSuite(); - $test->run(new HtmlReporter()); -?> -]]> - ...or we can group them into even larger group tests. - We can even mix groups and test cases freely as long as - we are careful about double includes... - - $test = &new BigTestSuite('Big group'); - $test->addTestFile('file_test_suite.php'); - $test->addTestFile('some_test_case.php'); - $test->run(new HtmlReporter()); -?> -]]> - In the event of a double include, ony the first instance - of the test case will be run. -

-

- If we still wish to run the original group test, and we - don't want all of these little runner files, we can - put the test runner code around guard bars when we create - each group. -TestSuite('All file tests'); - $test->addTestFile('file_test.php'); - } - } - - if (! defined('RUNNER')) { - define('RUNNER', true); - $test = &new FileTestSuite(); - $test->run(new HtmlReporter()); - } -?> -]]> - This approach requires the guard to be set when including - the group test file, but this is still less hassle than - lots of separate runner files. - You include the same guard on the top level tests to make sure - that run() will run once only - from the top level script that has been invoked. - - define('RUNNER', true); - require_once('file_test_suite.php'); - - $test = &new BigTestSuite('Big group'); - $test->addTestCase(new FileTestSuite()); - $test->addTestCase(...); - $test->run(new HtmlReporter()); -?> -]]> - As with the normal test cases, a TestSuite can - be loaded with the TestSuite::addTestFile() method. - - $test->addTestFile('file_test_suite.php'); - $test->addTestFile(...); - $test->run(new HtmlReporter()); -?> -]]> -

-
-
-

- If you already have unit tests for your code or are extending external - classes that have tests, it is unlikely that all of the test cases - are in SimpleTest format. - Fortunately it is possible to incorporate test cases from other - unit testers directly into SimpleTest group tests. -

-

- Say we have the following - PhpUnit - test case in the file config_test.php... -class ConfigFileTest extends TestCase { - function ConfigFileTest() { - $this->TestCase('Config file test'); - } - - function testContents() { - $config = new ConfigFile('test.conf'); - $this->assertRegexp('/me/', $config->getValue('username')); - } -} -]]> - The group test can recognise this as long as we include - the appropriate adapter class before we add the test - file... - - require_once('simpletest/adapters/phpunit_test_case.php'); - - $test = &new TestSuite('All file tests'); - $test->addTestFile('config_test.php'); - $test->run(new HtmlReporter()); -?> -]]> - There are only two adapters, the other is for the - PEAR - 1.0 unit tester... - - require_once('simpletest/adapters/pear_test_case.php'); - - $test = &new TestSuite('All file tests'); - $test->addTestFile('some_pear_test_cases.php'); - $test->run(new HtmlReporter()); -?> -]]> - The PEAR test cases can be freely mixed with SimpleTest - ones even in the same test file, - but you cannot use SimpleTest assertions in the legacy - test case versions. - This is done as a check that you are not accidently making - your test cases completely dependent on SimpleTest. - You may want to do a PEAR release of your library for example, - which would mean shipping it with valid PEAR::PhpUnit test - cases. -

-
-
- - - Different ways to group tests together. - - - Combining group tests into larger groups. - - - Integrating legacy test cases from other - types of PHPUnit. - - - - - SimpleTest project page on SourceForge. - - - SimpleTest download page on LastCraft. - - - - - php unit testing, test integration, documentation, marcus baker, simple test, - simpletest documentation, phpunit, pear - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/group_test_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/group_test_tutorial.xml deleted file mode 100644 index 3dfd8efc..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/group_test_tutorial.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - PHP unit testing tutorial - Grouping together unit - tests and examples of writing test cases - - - -

- Next up we will fill in some blanks and create a test suite. -

-
-
-

- Adding another test can be as simple as adding another method - to a test case... -UnitTestCase('Log class test'); - } - function testCreatingNewFile() { - @unlink('../temp/test.log'); - $log = new Log('../temp/test.log'); - $this->assertFalse(file_exists('../temp/test.log'), 'Created before message'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log'), 'File created'); - @unlink('../temp/test.log'); - } - function testAppendingToFile() { - @unlink('../temp/test.log'); - $log = new Log('../temp/test.log'); - $log->message('Test line 1'); - $messages = file('../temp/test.log'); - $this->assertWantedPattern('/Test line 1/', $messages[0]); - $log->message('Test line 2'); - $messages = file('../temp/test.log'); - $this->assertWantedPattern('/Test line 2/', $messages[1]); - @unlink('../temp/test.log'); - } -} -]]> - The assertWantedPattern() - test case method uses Perl style regular expressions for - matching. -

-

- All we are doing in this new test method is writing a line to a file and - reading it back twice over. - We simply want to confirm that the logger appends the - text rather than writing over the old file. - A little pedantic, but hey, it's a tutorial! -

-

- In fact this unit test actually passes straight away... -

-

Log class test

-
1/1 test cases complete. - 4 passes and 0 fails.
-
- The trouble is there is already a lot of repetition here, - we have to delete the test file before and after every test. - With outrageous plagarism from JUnit, - SimpleTest has setUp() and - tearDown() methods - which are run before and after every test respectively. - File deletion is common to all the test methods so we - should move that operation there. -

-

- Our tests are green so we can refactor... -UnitTestCase('Log class test'); - } - function setUp() { - @unlink('../temp/test.log'); - } - function tearDown() { - @unlink('../temp/test.log'); - } - function testCreatingNewFile() { - $log = new Log('../temp/test.log'); - $this->assertFalse(file_exists('../temp/test.log'), 'Created before message'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log'), 'File created'); - } - function testAppendingToFile() { - $log = new Log('../temp/test.log'); - $log->message('Test line 1'); - $messages = file('../temp/test.log'); - $this->assertWantedPattern('/Test line 1/', $messages[0]); - $log->message('Test line 2'); - $messages = file('../temp/test.log'); - $this->assertWantedPattern('/Test line 2/', $messages[1]); - } -} -]]> - The test stays green. - We can add non-test methods to the test case as long as the method - name does not start with the string "test". - Only the methods that start "test" are run. - This allows further optional refactoring... -UnitTestCase('Log class test'); - } - function setUp() { - @unlink('../temp/test.log'); - } - function tearDown() { - @unlink('../temp/test.log'); - } - function getFileLine($filename, $index) { - $messages = file($filename); - return $messages[$index]; - } - function testCreatingNewFile() { - $log = new Log('../temp/test.log'); - $this->assertFalse(file_exists('../temp/test.log'), 'Created before message'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log'), 'File created'); - } - function testAppendingToFile() { - $log = new Log('../temp/test.log'); - $log->message('Test line 1'); - $this->assertWantedPattern('/Test line 1/', $this->getFileLine('../temp/test.log', 0)); - $log->message('Test line 2'); - $this->assertWantedPattern('/Test line 2/', $this->getFileLine('../temp/test.log', 1)); - } -} -]]> - It is a matter of taste whether you prefer this version - to the previous one. There is a little more code, but - the logic of the test is clearer. -

-
-
-

- A test case does not function alone for very long. - When coding for real we usually want to run as many tests as - quickly and as often as we can. - This means grouping them together into test suites that - could easily include every test in the application. -

-

- Firstly we have to clean out the test running code from - our existing test case... - -require_once('../classes/log.php'); - -class TestOfLogging extends UnitTestCase { - ... -} -?> -]]> - We no longer need the SIMPLE_TEST - constant. - Next we create a group test called all_tests.php - in the tests folder... -addTestCase(new TestOfLogging()); -$test->run(new HtmlReporter()); -?> -]]> - We hardly notice the difference when things work... -

-

All tests

-
1/1 test cases complete. - 4 passes and 0 fails.
-
- Group tests add to the test case count. - Adding new test cases is very straight forward. - Simply include the test cases file and add any contained test - cases individually. - You can also nest group tests within other group tests - (although you should avoid loops). -

-

- In the next page - we will add these more quickly. -

-
-
- - - Adding another test to the test case - and refactoring. - - - The crude way to group unit tests. - - - - - Next is controlling - how the class under test interacts with the rest - of the system. - - - Previous is the creation - of a first test. - - - You need SimpleTest to run these examples. - - - - - software development, - php programming, - programming in php, - test first, - software development tools, - php tutorial, - free php scripts, - architecture, - php resources, - mock objects, - junit, - php testing, - unit test, - phpunit, - PHP unit testing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/heartbeat.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/heartbeat.xml deleted file mode 100644 index fc702c64..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/heartbeat.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - Heartbeat : how is SimpleTest doing ? - - - - - -

- Want to know check how healthy SimpleTest's codebase is? - Well, do enjoy the tests results, commit history and last commits... -

-
-
-

-
-
-

-
-
-

-
-
- - - Current tests results - - - Commits per week - - - Last commits - - - - - software development, - computer programmer, - php programming, - programming php, - software development company, - software development uk, - php tutorial, - bespoke software development uk, - corporate web development, - architecture, - freelancer, - php resources, - wordtracker, - web marketing, - serach engines, - web positioning, - internet marketing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/ideas.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/ideas.xml deleted file mode 100644 index 2eabee28..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/ideas.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - Ideas for Google Summer of Code Projects - - -

- Most of the stuff on the SimpleTest2 road map is incremental. - Ideas for Google Summer of Code projects are of another kind. - There're here to unleash and promote new crazy ideas to the project - and to PHP's testing universe! -

-

- Of course this list is not exhaustive: - if you have another itch to scratch, feel free - to add your wishes on the mailing-list. -

-
- Careful though : currently the SimpleTest project is taking part under the - PHP umbrella. - So handle with care! -
-
-
-
-
- Enable JavaScript inside SimpleTest browser. -
-
- This would be a MASSIVE feature to have. - We're probably talking about integrating - a C-based or Java-based JavaScript engine. - The Java folks have - HttpUnit - already : some stuff could be derived from there. - Demonstrating the feasibility alone would be a real - step forward. The hard work is the DOM emulation. -
-
- Add layer testing. -
-
- When using an MVC framework is to support - bypassing the webserver, and interacting with the framework at - the level of Request and Response objects. - It would be nice to see if we could develop an interface standard for - the HTTP layer which would allow SimpleTest to work cleanly with - different frameworks. On the other hand, maybe there already is enough - of an interface in the standard PHP superglobals. - Symfony with its lime test framework works in exactly this manner. -
-
- Make parsers switchable and change the HTML Parser. -
-
- Replace the html parser with - tidylib. - It's super-fast compared to parsing in PHP. - If there are worries about adding a dependency, - then maybe make it an optional plug-in instead. -
-
- Web Form Fuzzer. -
-
- Fuzz testing is a software testing technique that provides random data - ("fuzz") to the inputs of a program. If the program fails (for - example, by crashing, or by failing built-in code assertions), the - defects can be noted. -
- A Web Form Fuzzer would be built on top of the basic WebTestCase api, - enabling developers to point a test case at a target URL and have it - introspect form inputs and post actions. The fuzzer would generate - random data strings, populate the input fields, and repeatedly post - the forms, looking for errors, validation responses, and HTTP status - codes that reflect how the site handled a combination of well-formed - and malformed input. This would have the potential to completely wreck - some websites, but would be great for testing the robustness and edge - case behavior of CMS's and other online administration tools. -
-
-
-
-
-
- Mutation test coverage. -
-
-
-
-
-
- Standalone notifying tool -
-
- Based on rules, this notifying tool detects a file change - within a particular directory (maybe with - php-inotifytools : - such a monitor could learn how your code works by observing it being tested. - For example, call graphing via static analysis might work, as would - running Xdebug code coverage while running the tests and monitoring - the code executed after each test method, as would some sort of - DBG-derived client that received notifications from Xdebug while - the code was being executed like a debugging client. - We'd have "rings" of functionality. The first - ring is the tests that exercises the particular method/function - you're working with by a direct call. - Then start working rings out based on how far away the test method - is when that code is called. - These rings would then be executed on a save, starting with the inner - most. Any failure would stop further tests cause a system alert to - something like Growl or Snarl or any Reporter that you drop in. -
-
- PDT (Eclipse) : implement PHPUnit hooks -
-
- There are somme hooks inside PDT implemented for PHPUnit. - But it seems there're unused since PHPUnit changed too much - recently. SimpleTest could use them as well : - the SimpleTest Eclipse plugin could then become - the PDT Test plugin while fixing those hooks. -
-
- PDT (Eclipse) : debug while unit testing -
-
- The GUI for Eclipse recently caught up with PDT : debugging while - running a SimpleTest test case is finally doable. -
-
- Creative IDE integration -
-
- For example, running a subset of tests after each edit. -
-
- Firefox plugin to create SimpleTest file on the fly. -
-
- The same way Selenium IDE currently works. -
-
- Komodo integration. -
-
- Integration with monitoring tools such as Nagios. -
-
-
-
- - - Browser-based - - - ... and Unit testing-related ideas for GSOC2008. - - - Also of interest, - integration with third-party tools. - - - - - Google Summer of Code 2008. - - - - - software development, - computer programmer, - php programming, - programming php, - software development company, - software development uk, - php tutorial, - bespoke software development uk, - corporate web development, - architecture, - integration, - ide integration, - google summer of code, - mutation test coverage, - javascript - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/improving_design_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/improving_design_tutorial.xml deleted file mode 100644 index fc59981f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/improving_design_tutorial.xml +++ /dev/null @@ -1,195 +0,0 @@ - - - - - PHP unit testing tutorial - Top down design - test first with mock objects - - -
-

- I lied. -

-

- I haven't created a writer test at all, only the - FileWriter interface that I showed - earlier. - In fact I'll go one step further away from a finished article and assume - only an abstract writer in classes/writer.php... -Writer { - - function Writer() { - } - - function write($message) { - } -} -?> -]]> - The corresponding test changes are... - -Mock::generate('Writer'); - -class TestOfLogging extends UnitTestCase { - function TestOfLogging() { - $this->UnitTestCase('Log class test'); - } - function testWriting() { - $clock = &new MockClock($this); - $clock->setReturnValue('now', 'Timestamp'); - $writer = &new MockWriter($this); - $writer->expectOnce('write', array('[Timestamp] Test line')); - $log = &new Log($writer); - $log->message('Test line', &$clock); - $writer->tally(); - } -} -?> -]]> - In order to use the logging class we would need to code a file - writer or other sort of writer, but at the moment we are only - testing and so we do not yet need it. - So, in other words, using mocks we can defer the creation of - lower level objects until we feel like it. - Not only can we design top down, but we can test top down too. -

-
-
-

- Imagine for the moment that we had started the logging class - from another direction. - Pretend that we had coded just enough of the Log - to realise we needed a Writer somehow. - How would we have included it? -

-

- Well, inheriting from the writer would not have allowed us to mock it - from the testing point of view. - From the design point of view we would have been restricted to - just one writer without multiple inheritence. -

-

- Creating the writer internally, rather than passing it in the constructor, - by choosing a class name is possible, but we would have less control - of the mock object set up. - From the design point of view it would have been nearly impossible - to pass parameters to the writer in all the different formats ever needed. - You would have to have the writer restricted to say a hash or complicated - string describing the target details. - Needlessly complicated at best. -

-

- Using a factory method to create the writer internally would be - possible, but would mean subclassing it for testing so that the factory - method could be replaced with one returning a mock. - More work from the test point of view, although still possible. - From the design point of view it would mean a new logger subclass - for every type of writer that we want to use. - This is called a parallel class hiearchy and obviously involves - duplication. - Yuk. -

-

- At the other extreme, passing or creating the writer on every - message would have been repetitive and reduced the - Log class code to a single - method, a sure sign that the whole class has become redundant. -

-

- This tension between ease of testing and avoiding repetition - has allowed us to find a flexible and clean design. - Remember our brief yearning for multiple inheritence? - We have replaced it with polymorphism (lots of writers) and separated the - logging hierachy from the writing hierarchy. - We connect the two through this simpler Log - by aggregation. - This trick is actually a design pattern called a "Bridge". -

-

- So we have been pushed by test code (we haven't written much else yet) - into a design pattern. - Think about this for a second. - Tests improve code quality, certainly in my case, but this is - something far more profound and far more powerful. -

-

- Testing has improved the design. -

-
-
-

- Creating a mock object is as easy as creating the interface in text - form. - If you have UML or other tools that create these interfaces for you, - then you have an even more flexible route to quickly generate - test objects. - Even if you do not, you can switch from white board drawing, to - writing a test case, to writing a mock, to generating an interface - which takes us back to the whiteboard drawing again, fairly easily. - Like refactoring, design, code and test become unified. -

-

- Because mock objects work top down they can be bought into the design - more quickly than normal refactoring, which requires at least - partially working code before it kicks in. - This means that the testing code interacts with the design faster - and this means that the design quality goes up sooner. -

-

- A unit tester is a coding tool. - A unit tester with mock objects is a design tool. -

-
-
- - - Mock now, code later. - - - We derive the bridge pattern. - - - Designing and testing hand in hand. - - - - - This tutorial follows Boundary classes. - - - You will need the SimpleTest testing framework - to try these examples. - - - For more mock object discussion see the - Extreme Tuesday Wiki - or the - C2 Wiki - - - - - software development, - php programming tutorial, - programming php test cases, - software development tools, - php tutorial, - free php code, - architecture, - php examples, - mock object examples, - junit style testing, - php testing frameworks, - unit test, - mock objects in PHP, - php testing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/index.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/index.xml deleted file mode 100644 index 730cafbc..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/index.xml +++ /dev/null @@ -1,220 +0,0 @@ - - - - - The Last Craft? Web developer tutorials on PHP, Extreme programming - and Object Oriented development - - - -

- This site focuses mostly on developing with lightweight web technologies such as - PHP, - especially when applied with agile methodologies such as - XP. - No guarantee of quality is given or even intended. - It is hoped only that what you find gives you ideas and enthusiasm - from a fellow computer programmer. -

-

- I've been a little busy of late with children (two versions). - They take quite a chunk of your professional life and 100% of - what's left! - Hopefully the projects below should start to get back on track. -

-
-
-

- My latest project is Cgreen. - It's a C unit tester. - There are a couple of C unit testing tools out there already of course. - What makes Cgreen different is that it is pure C99, includes - a tutorial right here and has facilities for creating mock functions. - Mock functions should lead to more decoupled C code if Mock objects are - anything to go by. - It's alpha status right now until I get feedback from other users. - So if you want to be influential, try it out right now. - The project has been mostly funded by Wordtracker, - for which I am very grateful. -

-

- Along with Jon Ramsey, I am a founder of - PHP London, a PHP user - group not surprisingly based in London. - It's going well. - The networking meetings take place on the first Thursday of every month - at a pub. -

-

- In addition the group organises other events that include the 2nd - London UK PHP Conference. - This is a one day event on Friday the 23rd of February 2007 and costs only - fifty quid. -

-

- The SimpleTest PHP unit tester - is available for download from your nearest - SourceForge. - It is a PHP unit test and web test framework. - Users of JUnit will be - familiar with most of the interface. - The JWebUnit - style functionality is more complete now. - It has support for SSL, forms, frames, proxies and basic authentication. - The current CVS code should become the 1.0.1 release real soon now and - includes file upload and many small improvements. - The idea is that common but fiddly PHP tasks, such as logging into a site, - can be tested easily. -

-

- My most neglected project right now is a requirents testing - and sign-off tool called - Arbiter. - It's actually best described in this - Sitepoint thread, - but basically think of it as a document driven FIT for small - web projects only. - The project is currently stalled due the birth of children and - writing projects. -

-

- Also on the subject of open source, Wordtracker - have kindly agreed to publish some of their in house tools. - A Wordtracker spin off is fakeMail. - Testing applications that send e-mails can be a right royal pain because - of all of the infrastructure involved. - You will likely need an SMPT gateway that talks to a POP client that - you can read the queue from. - That's a lot of set up. - Fakemail acts as an SMTP gateway on any port - you define. - When you send it a mail it simply copies that mail to the local file - system in whatever directory you want. - You then just have to look at the local file. - It means that you must be able to configure your application to use - a port other than 25, but that's not usualy difficult. -

-
-
-

- A craft is defined as... -

- Art or skill; dexterity in particular manual employment; - hence, the occupation or employment itself; manual art; a - trade. -
-

-

- If you lose a screw or clasp from a hand made jewellery box it is hopeless to - try to find a replacement. Nothing else is quite the same and the mechanism will - fail to work. It may even cause more damage when applied. You need to find the original maker - or someone of the same skill to make you another. - Sound like software? - Yet mechanical parts today are interchangeable. -

-

- Writing software has resisted mass production. - As soon as a part of it becomes - routine it can be automated. - Once it is you don't need a programmer any more. - Routine programming jobs no longer exist. - All that is left is the unsolved problems that require - a higher level of skill in constructing their solutions. -

-

- This dependency on the ability of the artisan, combined with nothing quite fitting - together properly, is what gives software the pre-industrial feel. -

-
-
-

- The panel at the top is supposed to resemble a standard office index card. - The way it is marked out is called a - CRC card. - It stands for Classes, Responsibilities and - Collaborations and is the cheapest software development tool you - can find. - You really do buy a pack of cards. -

-

- The role is written at the top and would often be just a class - name. - The left side is the object's responsibilities and on the - right collaborations (within the page I have treated these as - internal links and external links repectively). - A group of developers can point at, discuss and discard cards - in the heat of design session. - It makes it especially difficult for only one person to take charge - of a discussion in the way you can with a UML tool or notepad. - Try scribbling out five cards before someone gets a look in. -

-

- Now nothing beats a whiteboard for collaboration, but if the level - of detail is getting too high and you want a temporary record, - give the CRC cards a try. -

-
-
- - - Projects under development. - All free and open source software. - - - Why Last Craft? - Odd name isn't it? - - - Why this index card at the top? - - - - - SimpleTest is a PHP unit test framework. - - - My article on TDD - - - My article on the - Registry Pattern. - - - Site E-mail is - SpamCop - filtered which I cannot recommend enough. - - - - - software development, - computer programmer, - php programming, - programming php, - software development tools, - software development company, - php tutorial, - free php scripts, - bespoke software development uk, - corporate web development, - architecture, - php resources, - wordtracker, - xslt, - java, - bug tracker, - bug reporting, - unit test, - php testing, - test cases tutorial, - explain unit test case, - unit test example, - xml - - - A web site of software development tutorials and examples with an - emphasis on web programming, testing, agile methodology and PHP - development - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/intro.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/intro.xml deleted file mode 100644 index 87882c49..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/intro.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - Summary of SimpleTest including it's Java tool roots. - - - -

- The SimpleTest PHP unit tester is in - the 1.0.1 release cycle and is available for download from your nearest SourceForge. -

-

- It is a PHP unit test, mock objects and web test framework. - Users of JUnit will be - familiar with most of the interface. - For web testing a small web browser is included, similar to - JWebUnit. - It has support for SSL, frames, proxies, basic authentication, redirects, - and the standard HTML form controls. - The idea is that common but fiddly PHP tasks, such as logging into a site, - can be tested easily as calling click(). -

-

- There is currently no support for JavaScript in the web tester. - For testing these elements we recommend - Selenium. -

-
-
- - - software development, - computer programmer, - php programming, - programming php, - software development tools, - software development company, - php tutorial, - free php scripts, - bespoke software development uk, - corporate web development, - architecture, - php resources, - unit test, - php testing, - test cases tutorial, - explain unit test case, - unit test example, - xml - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/mock_objects_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/mock_objects_documentation.xml deleted file mode 100644 index 96f39a55..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/mock_objects_documentation.xml +++ /dev/null @@ -1,708 +0,0 @@ - - - - SimpleTest for PHP mock objects documentation - -
-

- Mock objects have two roles during a test case: actor and critic. -

-

- The actor behaviour is to simulate objects that are difficult to - set up or time consuming to set up for a test. - The classic example is a database connection. - Setting up a test database at the start of each test would slow - testing to a crawl and would require the installation of the - database engine and test data on the test machine. - If we can simulate the connection and return data of our - choosing we not only win on the pragmatics of testing, but can - also feed our code spurious data to see how it responds. - We can simulate databases being down or other extremes - without having to create a broken database for real. - In other words, we get greater control of the test environment. -

-

- If mock objects only behaved as actors they would simply be - known as server stubs. - This was originally a pattern named by Robert Binder (Testing - object-oriented systems: models, patterns, and tools, - Addison-Wesley) in 1999. -

-

- A server stub is a simulation of an object or component. - It should exactly replace a component in a system for test - or prototyping purposes, but remain lightweight. - This allows tests to run more quickly, or if the simulated - class has not been written, to run at all. -

-

- However, the mock objects not only play a part (by supplying chosen - return values on demand) they are also sensitive to the - messages sent to them (via expectations). - By setting expected parameters for a method call they act - as a guard that the calls upon them are made correctly. - If expectations are not met they save us the effort of - writing a failed test assertion by performing that duty on our - behalf. -

-

- In the case of an imaginary database connection they can - test that the query, say SQL, was correctly formed by - the object that is using the connection. - Set them up with fairly tight expectations and you will - hardly need manual assertions at all. -

-
-
-

- In the same way that we create server stubs, all we need is an - existing class, say a database connection that looks like this... -class DatabaseConnection { - function DatabaseConnection() { - } - - function query() { - } - - function selectQuery() { - } -} -]]> - The class does not need to have been implemented yet. - To create a mock version of the class we need to include the - mock object library and run the generator... -require_once('simpletest/unit_tester.php'); -require_once('simpletest/mock_objects.php'); -require_once('database_connection.php'); - -Mock::generate('DatabaseConnection'); -]]> - This generates a clone class called - MockDatabaseConnection. - We can now create instances of the new class within - our test case... - -class MyTestCase extends UnitTestCase { - - function testSomething() { - $connection = &new MockDatabaseConnection(); - } -} -]]> - Unlike the generated stubs the mock constructor needs a reference - to the test case so that it can dispatch passes and failures while - checking its expectations. - This means that mock objects can only be used within test cases. - Despite this their extra power means that stubs are hardly ever used - if mocks are available. -

-

-

Mocks as actors

-

-

- The mock version of a class has all the methods of the original, - so that operations like - query()]]> are still - legal. - The return value will be null, - but we can change that with... -$connection->setReturnValue('query', 37) -]]> - Now every time we call - query()]]> we get - the result of 37. - We can set the return value to anything, say a hash of - imaginary database results or a list of persistent objects. - Parameters are irrelevant here, we always get the same - values back each time once they have been set up this way. - That may not sound like a convincing replica of a - database connection, but for the half a dozen lines of - a test method it is usually all you need. -

-

- We can also add extra methods to the mock when generating it - and choose our own class name... -Mock::generate('DatabaseConnection', 'MyMockDatabaseConnection', array('setOptions')); -]]> - Here the mock will behave as if the setOptions() - existed in the original class. - This is handy if a class has used the PHP overload() - mechanism to add dynamic methods. - You can create a special mock to simulate this situation. -

-

- Things aren't always that simple though. - One common problem is iterators, where constantly returning - the same value could cause an endless loop in the object - being tested. - For these we need to set up sequences of values. - Let's say we have a simple iterator that looks like this... - - This is about the simplest iterator you could have. - Assuming that this iterator only returns text until it - reaches the end, when it returns false, we can simulate it - with... - - $iterator = &new MockIterator(); - $iterator->setReturnValue('next', false); - $iterator->setReturnValueAt(0, 'next', 'First string'); - $iterator->setReturnValueAt(1, 'next', 'Second string'); - ... - } -} -]]> - When next() is called on the - mock iterator it will first return "First string", - on the second call "Second string" will be returned - and on any other call false will - be returned. - The sequenced return values take precedence over the constant - return value. - The constant one is a kind of default if you like. -

-

- Another tricky situation is an overloaded - get() operation. - An example of this is an information holder with name/value pairs. - Say we have a configuration class like... - - This is a classic situation for using mock objects as - actual configuration will vary from machine to machine, - hardly helping the reliability of our tests if we use it - directly. - The problem though is that all the data comes through the - getValue() method and yet - we want different results for different keys. - Luckily the mocks have a filter system... -$config = &new MockConfiguration(); -$config->setReturnValue('getValue', 'primary', array('db_host')); -$config->setReturnValue('getValue', 'admin', array('db_user')); -$config->setReturnValue('getValue', 'secret', array('db_password')); -]]> - The extra parameter is a list of arguments to attempt - to match. - In this case we are trying to match only one argument which - is the look up key. - Now when the mock object has the - getValue() method invoked - like this... -getValue('db_user') -]]> - ...it will return "admin". - It finds this by attempting to match the calling arguments - to its list of returns one after another until - a complete match is found. -

-

- You can set a default argument argument like so... - -$config->setReturnValue('getValue', false, array('*')); -]]> - This is not the same as setting the return value without - any argument requirements like this... - -$config->setReturnValue('getValue', false); -]]> - In the first case it will accept any single argument, - but exactly one is required. - In the second case any number of arguments will do and - it acts as a catchall after all other matches. - Note that if we add further single parameter options after - the wildcard in the first case, they will be ignored as the wildcard - will match first. - With complex parameter lists the ordering could be important - or else desired matches could be masked by earlier wildcard - ones. - Declare the most specific matches first if you are not sure. -

-

- There are times when you want a specific object to be - dished out by the mock rather than a copy. - The PHP4 copy semantics force us to use a different method - for this. - You might be simulating a container for example... - - In this case you can set a reference into the mock's - return list... - -$vector = &new MockVector(); -$vector->setReturnReference('get', $thing, array(12)); -]]> - With this arrangement you know that every time - get(12)]]> is - called it will return the same - $thing each time. - This is compatible with PHP5 as well. -

-

- These three factors, timing, parameters and whether to copy, - can be combined orthogonally. - For example... - -$complex->setReturnReferenceAt(3, 'get', $stuff, array('*', 1)); -]]> - This will return the $stuff only on the third - call and only if two parameters were set the second of - which must be the integer 1. - That should cover most simple prototyping situations. -

-

- A final tricky case is one object creating another, known - as a factory pattern. - Suppose that on a successful query to our imaginary - database, a result set is returned as an iterator with - each call to next() giving - one row until false. - This sounds like a simulation nightmare, but in fact it can all - be mocked using the mechanics above. -

-

- Here's how... - - $result = &new MockResultIterator(); - $result->setReturnValue('next', false); - $result->setReturnValueAt(0, 'next', array(1, 'tom')); - $result->setReturnValueAt(1, 'next', array(3, 'dick')); - $result->setReturnValueAt(2, 'next', array(6, 'harry')); - - $connection = &new MockDatabaseConnection(); - $connection->setReturnValue('query', false); - $connection->setReturnReference( - 'query', - $result, - array('select id, name from users')); - - $finder = &new UserFinder($connection); - $this->assertIdentical( - $finder->findNames(), - array('tom', 'dick', 'harry')); - } -} -]]> - Now only if our - $connection is called with the correct - query() will the - $result be returned that is - itself exhausted after the third call to next(). - This should be enough - information for our UserFinder class, - the class actually - being tested here, to come up with goods. - A very precise test and not a real database in sight. -

-
-
-

- Although the server stubs approach insulates your tests from - real world disruption, it is only half the benefit. - You can have the class under test receiving the required - messages, but is your new class sending correct ones? - Testing this can get messy without a mock objects library. -

-

- By way of example, suppose we have a - SessionPool class that we - want to add logging to. - Rather than grow the original class into something more - complicated, we want to add this behaviour with a decorator (GOF). - The SessionPool code currently looks - like this... -class SessionPool { - function SessionPool() { - ... - } - - function &findSession($cookie) { - ... - } - ... -} - -class Session { - ... -} -]]> - While our logging code looks like this... - -class Log { - function Log() { - ... - } - - function message() { - ... - } -} - -class LoggingSessionPool { - function LoggingSessionPool(&$session_pool, &$log) { - ... - } - - function &findSession($cookie) { - ... - } - ... -} -]]> - Out of all of this, the only class we want to test here - is the LoggingSessionPool. - In particular we would like to check that the - findSession() method is - called with the correct session ID in the cookie and that - it sent the message "Starting session $cookie" - to the logger. -

-

- Despite the fact that we are testing only a few lines of - production code, here is what we would have to do in a - conventional test case: -

    -
  1. Create a log object.
  2. -
  3. Set a directory to place the log file.
  4. -
  5. Set the directory permissions so we can write the log.
  6. -
  7. Create a SessionPool object.
  8. -
  9. Hand start a session, which probably does lot's of things.
  10. -
  11. Invoke findSession().
  12. -
  13. Read the new Session ID (hope there is an accessor!).
  14. -
  15. Raise a test assertion to confirm that the ID matches the cookie.
  16. -
  17. Read the last line of the log file.
  18. -
  19. Pattern match out the extra logging timestamps, etc.
  20. -
  21. Assert that the session message is contained in the text.
  22. -
- It is hardly surprising that developers hate writing tests - when they are this much drudgery. - To make things worse, every time the logging format changes or - the method of creating new sessions changes, we have to rewrite - parts of this test even though this test does not officially - test those parts of the system. - We are creating headaches for the writers of these other classes. -

-

- Instead, here is the complete test method using mock object magic... - - $session = &new MockSession(); - $pool = &new MockSessionPool(); - $pool->setReturnReference('findSession', $session); - $pool->expectOnce('findSession', array('abc')); - - $log = &new MockLog(); - $log->expectOnce('message', array('Starting session abc')); - - $logging_pool = &new LoggingSessionPool($pool, $log); - $this->assertReference($logging_pool->findSession('abc'), $session); - } -} -]]> - We start by creating a dummy session. - We don't have to be too fussy about this as the check - for which session we want is done elsewhere. - We only need to check that it was the same one that came - from the session pool. -

-

- findSession() is a factory - method the simulation of which is described above. - The point of departure comes with the first - expectOnce() call. - This line states that whenever - findSession() is invoked on the - mock, it will test the incoming arguments. - If it receives the single argument of a string "abc" - then a test pass is sent to the unit tester, otherwise a fail is - generated. - This was the part where we checked that the right session was asked for. - The argument list follows the same format as the one for setting - return values. - You can have wildcards and sequences and the order of - evaluation is the same. -

-

- We use the same pattern to set up the mock logger. - We tell it that it should have - message() invoked - once only with the argument "Starting session abc". - By testing the calling arguments, rather than the logger output, - we insulate the test from any display changes in the logger. -

-

- We start to run our tests when we create the new - LoggingSessionPool and feed - it our preset mock objects. - Everything is now under our control. -

-

- This is still quite a bit of test code, but the code is very - strict. - If it still seems rather daunting there is a lot less of it - than if we tried this without mocks and this particular test, - interactions rather than output, is always more work to set - up. - More often you will be testing more complex situations without - needing this level or precision. - Also some of this can be refactored into a test case - setUp() method. -

-

- Here is the full list of expectations you can set on a mock object - in SimpleTest... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ExpectationNeeds tally()
expect($method, $args)No
expectAt($timing, $method, $args)No
expectCallCount($method, $count)Yes
expectMaximumCallCount($method, $count)No
expectMinimumCallCount($method, $count)Yes
expectNever($method)No
expectOnce($method, $args)Yes
expectAtLeastOnce($method, $args)Yes
- Where the parameters are... -

-
$method
-
The method name, as a string, to apply the condition to.
-
$args
-
- The arguments as a list. Wildcards can be included in the same - manner as for setReturn(). - This argument is optional for expectOnce() - and expectAtLeastOnce(). -
-
$timing
-
- The only point in time to test the condition. - The first call starts at zero. -
-
$count
-
The number of calls expected.
-
- The method expectMaximumCallCount() - is slightly different in that it will only ever generate a failure. - It is silent if the limit is never reached. -

-

- Also if you have juste one call in your test, make sure you're using - expectOnce.
- Using $mocked->expectAt(0, 'method', 'args); - on its own will not be catched : - checking the arguments and the overall call count - are currently independant. -

-

- Like the assertions within test cases, all of the expectations - can take a message override as an extra parameter. - Also the original failure message can be embedded in the output - as "%s". -

-
-
-

- There are three approaches to creating mocks including the one - that SimpleTest employs. - Coding them by hand using a base class, generating them to - a file and dynamically generating them on the fly. -

-

- Mock objects generated with SimpleTest - are dynamic. - They are created at run time in memory, using - eval(), rather than written - out to a file. - This makes the mocks easy to create, a one liner, - especially compared with hand - crafting them in a parallel class hierarchy. - The problem is that the behaviour is usually set up in the tests - themselves. - If the original objects change the mock versions - that the tests rely on can get out of sync. - This can happen with the parallel hierarchy approach as well, - but is far more quickly detected. -

-

- The solution, of course, is to add some real integration - tests. - You don't need very many and the convenience gained - from the mocks more than outweighs the small amount of - extra testing. - You cannot trust code that was only tested with mocks. -

-

- If you are still determined to build static libraries of mocks - because you want to simulate very specific behaviour, you can - achieve the same effect using the SimpleTest class generator. - In your library file, say mocks/connection.php for a - database connection, create a mock and inherit to override - special methods or add presets... - - Mock::generate('Connection', 'BasicMockConnection'); - class MockConnection extends BasicMockConnection { - function MockConnection() { - $this->BasicMockConnection(); - $this->setReturn('query', false); - } - } -?> -]]> - The generate call tells the class generator to create - a class called BasicMockConnection - rather than the usual MockConnection. - We then inherit from this to get our version of - MockConnection. - By intercepting in this way we can add behaviour, here setting - the default value of query() to be false. - By using the default name we make sure that the mock class - generator will not recreate a different one when invoked elsewhere in the - tests. - It never creates a class if it already exists. - As long as the above file is included first then all tests - that generated MockConnection should - now be using our one instead. - If we don't get the order right and the mock library - creates one first then the class creation will simply fail. -

-

- Use this trick if you find you have a lot of common mock behaviour - or you are getting frequent integration problems at later - stages of testing. -

-
-
- - - What are mock objects? - - - Creating mock objects. - - - Mocks as actors or stubs. - - - Mocks as critics with expectations. - - - Other approaches including mock libraries. - - - - - The original - Mock objects paper. - - - SimpleTest project page on SourceForge. - - - SimpleTest home page on LastCraft. - - - - - software development, - php programming, - programming php, - software development tools, - php tutorial, - free php scripts, - architecture, - php resources, - mock objects, - junit, - php testing, - unit test, - php testing, - jmock, - nmock - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/mock_objects_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/mock_objects_tutorial.xml deleted file mode 100644 index 875adfdd..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/mock_objects_tutorial.xml +++ /dev/null @@ -1,359 +0,0 @@ - - - - PHP unit testing tutorial - Using mock objects in PHP - -
-

- Before more functionality is added there is some refactoring - to do. - We are going to do some timing tests and so the - TimeTestCase class definitely needs - its own file. - Let's say tests/time_test_case.php... -UnitTestCase($test_name); - } - function assertSameTime($time1, $time2, $message = '') { - if (! $message) { - $message = "Time [$time1] should match time [$time2]"; - } - $this->assertTrue( - ($time1 == $time2) || ($time1 + 1 == $time2), - $message); - } -} -?> -]]> - We can then require() this file into - the all_tests.php script. -

-
-
-

- I don't know quite what the format of the log message should - be for the test, so to check for a timestamp we could do the - simplest possible thing, which is to look for a sequence of digits. - -require_once('../classes/clock.php'); - -class TestOfLogging extends TimeTestCase { - function TestOfLogging() { - $this->TimeTestCase('Log class test'); - } - function setUp() { - @unlink('../temp/test.log'); - } - function tearDown() { - @unlink('../temp/test.log'); - } - function getFileLine($filename, $index) { - $messages = file($filename); - return $messages[$index]; - } - function testCreatingNewFile() { - ... - } - function testAppendingToFile() { - ... - } - function testTimestamps() { - $log = new Log('../temp/test.log'); - $log->message('Test line'); - $this->assertTrue( - preg_match('/(\d+)/', $this->getFileLine('../temp/test.log', 0), $matches), - 'Found timestamp'); - $clock = new clock(); - $this->assertSameTime((integer)$matches[1], $clock->now(), 'Correct time'); - } -} -?> -]]> - The test case creates a new Log - object and writes a message. - We look for a digit sequence and then test it against the current - time using our Clock object. - Of course it doesn't work until we write the code. -

-

All tests

- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 1/] in [Test line 1]
- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 2/] in [Test line 2]
- Pass: log_test.php->Log class test->testcreatingnewfile->Created before message
- Pass: log_test.php->Log class test->testcreatingnewfile->File created
- Fail: log_test.php->Log class test->testtimestamps->Found timestamp
-
- Notice: Undefined offset: 1 in /home/marcus/projects/lastcraft/tutorial_tests/tests/log_test.php on line 44
- Fail: log_test.php->Log class test->testtimestamps->Correct time
- Pass: clock_test.php->Clock class test->testclockadvance->Advancement
- Pass: clock_test.php->Clock class test->testclocktellstime->Now is the right time
-
3/3 test cases complete. - 6 passes and 2 fails.
-
- The test suite is still showing the passes from our earlier - modification. -

-

- We can get the tests to pass simply by adding a timestamp - when writing out to the file. - Yes, of course all of this is trivial and - I would not normally test this fanatically, but it is going - to illustrate a more general problem. - The log.php file becomes... - -require_once('../classes/clock.php'); - -class Log { - var $_file_path; - - function Log($file_path) { - $this->_file_path = $file_path; - } - - function message($message) { - $clock = new Clock(); - $file = fopen($this->_file_path, 'a'); - fwrite($file, "[" . $clock->now() . "] $message\n"); - fclose($file); - } -} -?> -]]> - The tests should now pass. -

-

- Our new test is full of problems, though. - What if our time format changes to something else? - Things are going to be a lot more complicated to test if this - happens. - It also means that any changes to the clock class time - format will cause our logging tests to fail also. - This means that our log tests are tangled up with the clock tests - and extremely fragile. - It lacks cohesion, which is the same as saying it is not - tightly focused, testing facets of the clock as well as the log. - Our problems are caused in part because the clock output - is unpredictable when - all we really want to test is that the logging message - contains the output of - Clock::now(). - We don't - really care about the contents of that method call. -

-

- Can we make that call predictable? - We could if we could get the log to use a dummy version - of the clock for the duration of the test. - The dummy clock class would have to behave the same way - as the Clock class - except for the fixed output from the - now() method. - Hey, that would even free us from using the - TimeTestCase class! -

-

- We could write such a class pretty easily although it is - rather tedious work. - We just create another clock class with same interface - except that the now() method - returns a value that we can change with some other setter method. - That is quite a lot of work for a pretty minor test. -

-

- Except that it is really no work at all. -

-
-
-

- To reach instant testing clock nirvana we need - only three extra lines of code... - - This includes the mock generator code. - It is simplest to place this in the all_tests.php - script as it gets used rather a lot. - - This is the line that does the work. - The code generator scans the class for all of its - methods, creates code to generate an identically - interfaced class, but with the name "Mock" added, - and then eval()s the new code to - create the new class. - - This line can be added to any test method we are interested in. - It creates the dummy clock ready to receive our instructions. -

-

- Our test case is on the first steps of a radical clean up... - -Mock::generate('Clock'); - -class TestOfLogging extends UnitTestCase { - function TestOfLogging() { - $this->UnitTestCase('Log class test'); - } - function setUp() { - @unlink('../temp/test.log'); - } - function tearDown() { - @unlink('../temp/test.log'); - } - function getFileLine($filename, $index) { - $messages = file($filename); - return $messages[$index]; - } - function testCreatingNewFile() { - ... - } - function testAppendingToFile() { - ... - } - function testTimestamps() { - $clock = &new MockClock($this); - $clock->setReturnValue('now', 'Timestamp'); - $log = new Log('../temp/test.log'); - $log->message('Test line', &$clock); - $this->assertWantedPattern( - '/Timestamp/', - $this->getFileLine('../temp/test.log', 0), - 'Found timestamp'); - } -} -?> -]]> - This test method creates a MockClock - object and then sets the return value of the - now() method to be the string - "Timestamp". - Every time we call $clock->now() - it will return this string. - This should be easy to spot. -

-

- Next we create our log and send a message. - We pass into the message() - call the clock we would like to use. - This means that we will have to add an optional parameter to - the logging class to make testing possible... -_file_path = $file_path; - } - - function message($message, $clock = false) { - if (!is_object($clock)) { - $clock = new Clock(); - } - $file = fopen($this->_file_path, 'a'); - fwrite($file, "[" . $clock->now() . "] $message\n"); - fclose($file); - } -} -]]> - All of the tests now pass and they test only the logging code. - We can breathe easy again. -

-

- Does that extra parameter in the Log - class bother you? - We have changed the interface just to facilitate testing after - all. - Are not interfaces the most important thing? - Have we sullied our class with test code? -

-

- Possibly, but consider this. - Next chance you get, look at a circuit board, perhaps the motherboard - of the computer you are looking at right now. - On most boards you will find the odd empty hole, or solder - joint with nothing attached or perhaps a pin or socket - that has no obvious function. - Chances are that some of these are for expansion and - variations, but most of the remainder will be for testing. -

-

- Think about that. - The factories making the boards many times over wasting material - on parts that do not add to the final function. - If hardware engineers can make this sacrifice of elegance I am - sure we can too. - Our sacrifice wastes no materials after all. -

-

- Still bother you? - Actually it bothers me too, but not so much here. - The number one priority is code that works, not prizes - for minimalism. - If it really bothers you, then move the creation of the clock - into another protected factory method. - Then subclass the clock for testing and override the - factory method with one that returns the mock. - Your tests are clumsier, but your interface is intact. -

-

- Again I leave the decision to you. -

-
-
- - - Refactoring the tests so we can reuse - our new time test. - - Adding Log timestamps. - Mocking the clock to make the test cohesive. - - - - This follows the unit test tutorial. - - - Next is distilling boundary classes. - - - You will need the SimpleTest - tool to run the examples. - - - Mock objects papers. - - - - - software development, - php programming, - programming php, - software development tools, - php tutorial, - free php scripts, - architecture, - php resources, - mock objects, - junit, - php testing, - unit test, - php testing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/overview.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/overview.xml deleted file mode 100644 index f01b3cb5..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/overview.xml +++ /dev/null @@ -1,460 +0,0 @@ - - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -
-

- The heart of SimpleTest is a testing framework built around - test case classes. - These are written as extensions of base test case classes, - each extended with methods that actually contain test code. - Top level test scripts then invoke the run() - methods on every one of these test cases in order. - Each test method is written to invoke various assertions that - the developer expects to be true such as - assertEqual(). - If the expectation is correct, then a successful result is dispatched to the - observing test reporter, but any failure triggers an alert - and a description of the mismatch. -

-

- A test case looks like this... -MyTestCase extends UnitTestCase { - - function testCreatedLogFile() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

-

- These tools are designed for the developer. - Tests are written in the PHP language itself more or less - as the application itself is built. - The advantage of using PHP itself as the testing language is that - there are no new languages to learn, testing can start straight away, - and the developer can test any part of the code. - Basically, all parts that can be accessed by the application code can also be - accessed by the test code, if they are in the same programming language. -

-

- The simplest type of test case is the - UnitTestCase. - This class of test case includes standard tests for equality, - references and pattern matching. - All these test the typical expectations of what you would - expect the result of a function or method to be. - This is by far the most common type of test in the daily - routine of development, making up about 95% of test cases. -

-

- The top level task of a web application though is not to - produce correct output from its methods and objects, but - to generate web pages. - The WebTestCase class tests web - pages. - It simulates a web browser requesting a page, complete with - cookies, proxies, secure connections, authentication, forms, frames and most - navigation elements. - With this type of test case, the developer can assert that - information is present in the page and that forms and - sessions are handled correctly. -

-

- A WebTestCase looks like this... -MySiteTest extends WebTestCase { - - function testHomePage() { - $this->get('http://www.my-site.com/index.php'); - $this->assertTitle('My Home Page'); - $this->clickLink('Contact'); - $this->assertTitle('Contact me'); - $this->assertPattern('/Email me at/'); - } -} -?> -]]> -

-
-
-

- The following is a very rough outline of past and future features - and their expected point of release. - I am afraid it is liable to change without warning, as meeting the - milestones rather depends on time available. - Green stuff has been coded, but not necessarily released yet. - If you have a pressing need for a green but unreleased feature - then you should check-out the code from Sourceforge SVN directly. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureDescriptionRelease
Unit test caseCore test case class and assertions1.0
Html displaySimplest possible display1.0
Autoloading of test cases - Reading a file with test cases and loading them into a - group test automatically - 1.0
Mock objects - Objects capable of simulating other objects removing - test dependencies - 1.0
Web test caseAllows link following and title tag matching1.0
Partial mocks - Mocking parts of a class for testing less than a class - or for complex simulations - 1.0
Web cookie handlingCorrect handling of cookies when fetching pages1.0
Following redirectsPage fetching automatically follows 300 redirects1.0
Form parsingAbility to submit simple forms and read default form values1.0
Command line interfaceTest display without the need of a web browser1.0
Exposure of expectation classesCan create precise tests with mocks as well as test cases1.0
XML output and parsing - Allows multi host testing and the integration of acceptance - testing extensions - 1.0
Browser component - Exposure of lower level web browser interface for more - detailed test cases - 1.0
HTTP authentication - Fetching protected web pages with basic authentication - only - 1.0
SSL supportCan connect to https: pages1.0
Proxy supportCan connect via. common proxies1.0
Frames supportHandling of frames in web test cases1.0
File upload testingCan simulate the input type file tag1.0.1
Mocking interfaces - Can generate mock objects to interfaces as well as classes - and class interfaces are carried for type hints - 1.0.1
Testing exceptionsSimilar to testing PHP errors1.0.1
HTML label supportCan access all controls using the visual label1.0.1
Base tag supportRespects page base tag when clicking1.0.1
PHP 5 E_STRICT compliantPHP 5 only version that works with the E_STRICT error level1.1
BDD style fixturesCan import fixtures using a mixin like given() method1.5
Reporting machinery enhancementsImproved message passing for better cooperation with IDEs1.5
Fluent mock interfaceMore flexible and concise mock objects1.6
LocalisationMessages abstracted and code generated1.6
CSS selectorsHTML content can be examined using CSS selectors1.7
HTML table assertionsCan match HTML or table elements to expectations1.7
Unified acceptance testing modelContent searchable through selectors combined with expectations1.7
DatabaseTestCaseSQL selectors and DB drivers1.7
IFrame supportReads IFrame content that can be refreshed1.8
Alternate HTML parsersCan detect compiled parsers for performance improvements1.8
Integrated Selenium supportEasy to use built in Selenium driver and tutorial1.9
Code coverageReports using the bundled tool when using XDebug1.9
Deprecation of old methodsSimpler interface for SimpleTest22.0
Javascript suportUse of PECL module to add Javascript to the native browser3.0
- PHP5 migraton will start straight after the version 1.0.1 series, - whereupon only PHP 5.1+ will be supported. - SimpleTest is currently compatible with PHP 5, but will not - make use of all of the new features until version 1.1. -

-
-
-

- Process is at least as important as tools. - The type of process that makes the heaviest use of a developer's - testing tool is of course - Extreme Programming. - This is one of the - Agile Methodologies - which combine various practices to "flatten the cost curve" of software development. - More extreme still is Test Driven Development, - where you very strictly adhere to the rule of no coding until you have a test. - If you're more of a planner, or believe that experience trumps evolution, - you may prefer the - RUP approach. - I haven't tried it, but even I can see that you will need test tools (see figure 9). -

-

- Most unit testers clone JUnit to some degree, - as far as the interface at least. There is a wealth of information on the - JUnit site including the - FAQ - which contains plenty of general advice on testing. - Once you get bitten by the bug you will certainly appreciate the phrase - test infected - coined by Eric Gamma. - If you are still reviewing which unit tester to use you can find pretty complete - lists from - Wikipedia, - Software testing FAQ, - and Open source testing. -

-

- There is still very little material on using mock objects, which is a shame - as unit testing without them is a lot more work. - The original mock objects paper - is very Java focused, but still worth a read. - The most authoritive sources are probably - the original mock objects site and - JMock. - Java centric, but tucked away in PDFs they contain some deep knowledge on using mocks from the - extended experience of the concept inventors. - As a new technology there are plenty of discussions and debate on how to use mocks, - often on Wikis such as - Extreme Tuesday - or www.mockobjects.com - or the original C2 Wiki. - Injecting mocks into a class is the main area of debate for which this - paper on IBM - makes a good starting point. -

-

- There are plenty of web testing tools, but the scriptable ones - are mostly are written in Java and - tutorials and advice are rather thin on the ground. - The only hope is to look at the documentation for - HTTPUnit, - HTMLUnit - or JWebUnit and hope for clues. - There are some XML driven test frameworks, but again most - require Java to run. -

-

- Most significant is a new generation of tools that run directly in the web browser - are now available. - These include - Selenium and - Watir. - They are non-trivial to set up and slow to run, but can essentially test anything. - As SimpleTest does not support JavaScript you would probably - have to look at these tools anyway if you have highly dynamic - pages. -

-
-
- - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Perrick Pennet - - General manager{@link mailto:perrick@noparking.net perrick@noparking.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/partial_mocks_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/partial_mocks_documentation.xml deleted file mode 100644 index ffc013da..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/partial_mocks_documentation.xml +++ /dev/null @@ -1,402 +0,0 @@ - - - - SimpleTest for PHP partial mocks documentation - - -

- A partial mock is simply a pattern to alleviate a specific problem - in testing with mock objects, - that of getting mock objects into tight corners. - It's quite a limited tool and possibly not even a good idea. - It is included with SimpleTest because I have found it useful - on more than one occasion and has saved a lot of work at that point. -

-
-
-

- When one object uses another it is very simple to just pass a mock - version in already set up with its expectations. - Things are rather tricker if one object creates another and the - creator is the one you want to test. - This means that the created object should be mocked, but we can - hardly tell our class under test to create a mock instead. - The tested class doesn't even know it is running inside a test - after all. -

-

- For example, suppose we are building a telnet client and it - needs to create a network socket to pass its messages. - The connection method might look something like... -read( ... ); - ... - } -} -?> -]]> - We would really like to have a mock object version of the socket - here, what can we do? -

-

- The first solution is to pass the socket in as a parameter, - forcing the creation up a level. - Having the client handle this is actually a very good approach - if you can manage it and should lead to factoring the creation from - the doing. - In fact, this is one way in which testing with mock objects actually - forces you to code more tightly focused solutions. - They improve your programming. -

-

- Here this would be... -function &connect(&$socket, $username, $password) { - $socket->read( ... ); - ... - } -} -?> -]]> - This means that the test code is typical for a test involving - mock objects. - - $socket = &new MockSocket($this); - ... - $telnet = &new Telnet(); - $telnet->connect($socket, 'Me', 'Secret'); - ... - } -} -]]> - It is pretty obvious though that one level is all you can go. - You would hardly want your top level application creating - every low level file, socket and database connection ever - needed. - It wouldn't know the constructor parameters anyway. -

-

- The next simplest compromise is to have the created object passed - in as an optional parameter... - - function &connect($ip, $port, $username, $password, $socket = false) { - if (!$socket) { - $socket = &new Socket($ip, $port); - } - $socket->read( ... ); - ... - return $socket; - } -} -?> -]]> - For a quick solution this is usually good enough. - The test now looks almost the same as if the parameter - was formally passed... - - $socket = &new MockSocket($this); - ... - $telnet = &new Telnet(); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret', &$socket); - ... - } -} -]]> - The problem with this approach is its untidiness. - There is test code in the main class and parameters passed - in the test case that are never used. - This is a quick and dirty approach, but nevertheless effective - in most situations. -

-

- The next method is to pass in a factory object to do the creation... - - function Telnet(&$network) { - $this->_network = &$network; - } - ... - function &connect($ip, $port, $username, $password) { - $socket = &$this->_network->createSocket($ip, $port); - $socket->read( ... ); - ... - return $socket; - } -} -?> -]]> - This is probably the most highly factored answer as creation - is now moved into a small specialist class. - The networking factory can now be tested separately, but mocked - easily when we are testing the telnet class... - - $socket = &new MockSocket($this); - ... - $network = &new MockNetwork($this); - $network->setReturnReference('createSocket', $socket); - $telnet = &new Telnet($network); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - } -} -]]> - The downside is that we are adding a lot more classes to the - library. - Also we are passing a lot of factories around which will - make the code a little less intuitive. - The most flexible solution, but the most complex. -

-

- Is there a middle ground? -

-
-
-

- There is a way we can circumvent the problem without creating - any new application classes, but it involves creating a subclass - when we do the actual testing. - Firstly we move the socket creation into its own method... - - $socket = &$this->_createSocket($ip, $port); - $socket->read( ... ); - ... - } - - function &_createSocket($ip, $port) { - return new Socket($ip, $port); - } -} -?> -]]> - This is the only change we make to the application code. -

-

- For the test case we have to create a subclass so that - we can intercept the socket creation... -class TelnetTestVersion extends Telnet { - var $_mock; - - function TelnetTestVersion(&$mock) { - $this->_mock = &$mock; - $this->Telnet(); - } - - function &_createSocket() { - return $this->_mock; - } -} -]]> - Here I have passed the mock in the constructor, but a - setter would have done just as well. - Note that the mock was set into the object variable - before the constructor was chained. - This is necessary in case the constructor calls - connect(). - Otherwise it could get a null value from - _createSocket(). -

-

- After the completion of all of this extra work the - actual test case is fairly easy. - We just test our new class instead... - - $socket = &new MockSocket($this); - ... - $telnet = &new TelnetTestVersion($socket); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - } -} -]]> - The new class is very simple of course. - It just sets up a return value, rather like a mock. - It would be nice if it also checked the incoming parameters - as well. - Just like a mock. - It seems we are likely to do this often, can - we automate the subclass creation? -

-
-
-

- Of course the answer is "yes" or I would have stopped writing - this by now! - The previous test case was a lot of work, but we can - generate the subclass using a similar approach to the mock objects. -

-

- Here is the partial mock version of the test... -Mock::generatePartial( - 'Telnet', - 'TelnetTestVersion', - array('_createSocket')); - -class TelnetTest extends UnitTestCase { - ... - function testConnection() { - $socket = &new MockSocket($this); - ... - $telnet = &new TelnetTestVersion($this); - $telnet->setReturnReference('_createSocket', $socket); - $telnet->Telnet(); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - } -} -]]> - The partial mock is a subclass of the original with - selected methods "knocked out" with test - versions. - The generatePartial() call - takes three parameters: the class to be subclassed, - the new test class name and a list of methods to mock. -

-

- Instantiating the resulting objects is slightly tricky. - The only constructor parameter of a partial mock is - the unit tester reference. - As with the normal mock objects this is needed for sending - test results in response to checked expectations. -

-

- The original constructor is not run yet. - This is necessary in case the constructor is going to - make use of the as yet unset mocked methods. - We set any return values at this point and then run the - constructor with its normal parameters. - This three step construction of "new", followed - by setting up the methods, followed by running the constructor - proper is what distinguishes the partial mock code. -

-

- Apart from construction, all of the mocked methods have - the same features as mock objects and all of the unmocked - methods behave as before. - We can set expectations very easily... -setReturnReference('_createSocket', $socket); - $telnet->expectOnce('_createSocket', array('127.0.0.1', 21)); - $telnet->Telnet(); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - $telnet->tally(); - } -} -]]> -

-
-
-

- The mocked out methods don't have to be factory methods, - they could be any sort of method. - In this way partial mocks allow us to take control of any part of - a class except the constructor. - We could even go as far as to mock every method - except one we actually want to test. -

-

- This last situation is all rather hypothetical, as I haven't - tried it. - I am open to the possibility, but a little worried that - forcing object granularity may be better for the code quality. - I personally use partial mocks as a way of overriding creation - or for occasional testing of the TemplateMethod pattern. -

-

- It's all going to come down to the coding standards of your - project to decide which mechanism you use. -

-
-
- - - The mock injection problem. - - - Moving creation to a protected factory method. - - - Partial mocks generate subclasses. - - - Partial mocks test less than a class. - - - - - SimpleTest project page on SourceForge. - - - Full API for SimpleTest - from the PHPDoc. - - - The protected factory is described in - this paper from IBM. - This is the only formal comment I have seen on this problem. - - - - - php software development, - php test case development, - database programming php, - software development tools, - php advanced tutorial, - phpunit style scripts, - architecture, - php resources, - mock objects, - junit, - php test framework, - unit test, - php testing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/photos_stream.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/photos_stream.xml deleted file mode 100644 index ed90b7d1..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/photos_stream.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - Photos & pictures tagged SimpleTest - - -

- A set of photos and pictures tagged with SimpleTest. -

-
-
- - - -
-
- - - - Pictures tagged - SimpleTest on Flickr - - - - - - software development, - computer programmer, - php programming, - programming php, - software development company, - software development uk, - php tutorial, - bespoke software development uk, - corporate web development, - architecture, - freelancer, - php resources, - wordtracker, - web marketing, - serach engines, - web positioning, - internet marketing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/reporter_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/reporter_documentation.xml deleted file mode 100644 index efc4ce22..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/reporter_documentation.xml +++ /dev/null @@ -1,471 +0,0 @@ - - - - SimpleTest for PHP test runner and display documentation - - -

- SimpleTest pretty much follows the MVC pattern - (Model-View-Controller). - The reporter classes are the view and the model is your - test cases and their hiearchy. - The controller is mostly hidden from the user of - SimpleTest unless you want to change how the test cases - are actually run, in which case it is possible to - override the runner objects from within the test case. - As usual with MVC, the controller is mostly undefined - and there are other places to control the test run. -

-
-
-

- The default test display is minimal in the extreme. - It reports success and failure with the conventional red and - green bars and shows a breadcrumb trail of test groups - for every failed assertion. - Here's a fail... -

-

File test

- Fail: createnewfile->True assertion failed.
-
1/1 test cases complete. - 0 passes, 1 fails and 0 exceptions.
-
- And here all tests passed... -
-

File test

-
1/1 test cases complete. - 1 passes, 0 fails and 0 exceptions.
-
- The good news is that there are several points in the display - hiearchy for subclassing. -

-

- For web page based displays there is the - HtmlReporter class with the following - signature... - - Here is what some of these methods mean. First the display methods - that you will probably want to override... -

    -
  • - HtmlReporter(string $encoding)
    - is the constructor. - Note that the unit test sets up the link to the display - rather than the other way around. - The display is a mostly passive receiver of test events. - This allows easy adaption of the display for other test - systems beside unit tests, such as monitoring servers. - The encoding is the character encoding you wish to - display the test output in. - In order to correctly render debug output when - using the web tester, this should match the encoding - of the site you are trying to test. - The available character set strings are described in - the PHP html_entities() - function. -
  • -
  • - void paintHeader(string $test_name)
    - is called once at the very start of the test when the first - start event arrives. - The first start event is usually delivered by the top level group - test and so this is where $test_name - comes from. - It paints the page titles, CSS, body tag, etc. - It returns nothing (void). -
  • -
  • - void paintFooter(string $test_name)
    - Called at the very end of the test to close any tags opened - by the page header. - By default it also displays the red/green bar and the final - count of results. - Actually the end of the test happens when a test end event - comes in with the same name as the one that started it all - at the same level. - The tests nest you see. - Closing the last test finishes the display. -
  • -
  • - void paintMethodStart(string $test_name)
    - is called at the start of each test method. - The name normally comes from method name. - The other test start events behave the same way except - that the group test one tells the reporter how large - it is in number of held test cases. - This is so that the reporter can display a progress bar - as the runner churns through the test cases. -
  • -
  • - void paintMethodEnd(string $test_name)
    - backs out of the test started with the same name. -
  • -
  • - void paintFail(string $message)
    - paints a failure. - By default it just displays the word fail, a breadcrumbs trail - showing the current test nesting and the message issued by - the assertion. -
  • -
  • - void paintPass(string $message)
    - by default does nothing. -
  • -
  • - string getCss()
    - Returns the CSS styles as a string for the page header - method. - Additional styles have to be appended here if you are - not overriding the page header. - You will want to use this method in an overriden page header - if you want to include the original CSS. -
  • -
- There are also some accessors to get information on the current - state of the test suite. - Use these to enrich the display... -
    -
  • - array getTestList()
    - is the first convenience method for subclasses. - Lists the current nesting of the tests as a list - of test names. - The first, most deeply nested test, is first in the - list and the current test method will be last. -
  • -
  • - integer getPassCount()
    - returns the number of passes chalked up so far. - Needed for the display at the end. -
  • -
  • - integer getFailCount()
    - is likewise the number of fails so far. -
  • -
  • - integer getExceptionCount()
    - is likewise the number of errors so far. -
  • -
  • - integer getTestCaseCount()
    - is the total number of test cases in the test run. - This includes the grouping tests themselves. -
  • -
  • - integer getTestCaseProgress()
    - is the number of test cases completed so far. -
  • -
- One simple modification is to get the HtmlReporter to display - the passes as well as the failures and errors... -class ShowPasses extends HtmlReporter { - - function paintPass($message) { - parent::paintPass($message); - print "&Pass: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode("->", $breadcrumb); - print "->$message
\n"; - } - - protected function getCss() { - return parent::getCss() . ' .pass { color: green; }'; - } -} -]]>
-

-

- One method that was glossed over was the makeDry() - method. - If you run this method, with no parameters, on the reporter - before the test suite is run no actual test methods - will be called. - You will still get the events of entering and leaving the - test methods and test cases, but no passes or failures etc, - because the test code will not actually be executed. -

-

- The reason for this is to allow for more sophistcated - GUI displays that allow the selection of individual test - cases. - In order to build a list of possible tests they need a - report on the test structure for drawing, say a tree view - of the test suite. - With a reporter set to dry run that just sends drawing events - this is easily accomplished. -

-
-
-

- Rather than simply modifying the existing display, you might want to - produce a whole new HTML look, or even generate text or XML. - Rather than override every method in - HtmlReporter we can take one - step up the class hiearchy to SimpleReporter - in the simple_test.php source file. -

-

- A do nothing display, a blank canvas for your own creation, would - be... -require_once('simpletest/simple_test.php'); - -class MyDisplay extends SimpleReporter { - - function paintHeader($test_name) { - } - - function paintFooter($test_name) { - } - - function paintStart($test_name, $size) { - parent::paintStart($test_name, $size); - } - - function paintEnd($test_name, $size) { - parent::paintEnd($test_name, $size); - } - - function paintPass($message) { - parent::paintPass($message); - } - - function paintFail($message) { - parent::paintFail($message); - } -} -]]> - No output would come from this class until you add it. -

-
-
-

- SimpleTest also ships with a minimal command line reporter. - The interface mimics JUnit to some extent, but paints the - failure messages as they arrive. - To use the command line reporter simply substitute it - for the HTML version... -addTestFile('tests/file_test.php'); -$test->run(new TextReporter()); -?> -]]> - Then invoke the test suite from the command line... -

-php file_test.php
-
- You will need the command line version of PHP installed - of course. - A passing test suite looks like this... -
-File test
-OK
-Test cases run: 1/1, Failures: 0, Exceptions: 0
-
- A failure triggers a display like this... -
-File test
-1) True assertion failed.
-    in createnewfile
-FAILURES!!!
-Test cases run: 1/1, Failures: 1, Exceptions: 0
-
-

-

- One of the main reasons for using a command line driven - test suite is of using the tester as part of some automated - process. - To function properly in shell scripts the test script should - return a non-zero exit code on failure. - If a test suite fails the value false - is returned from the SimpleTest::run() - method. - We can use that result to exit the script with the desired return - code... -addTestFile('tests/file_test.php'); -exit ($test->run(new TextReporter()) ? 0 : 1); -?> -]]> - Of course we don't really want to create two test scripts, - a command line one and a web browser one, for each test suite. - The command line reporter includes a method to sniff out the - run time environment... -addTestFile('tests/file_test.php'); -if (TextReporter::inCli()) { - exit ($test->run(new TextReporter()) ? 0 : 1); -} -$test->run(new HtmlReporter()); -?> -]]> - This is the form used within SimpleTest itself. -

-
-
-

- SimpleTest ships with an XmlReporter class - used for internal communication. - When run the output looks like... -


-
-  
-    Remote tests
-    
-      Visual test with 48 passes, 48 fails and 4 exceptions
-      
-        testofunittestcaseoutput
-        
-          testofresults
-          This assertion passed
-          This assertion failed
-        
-        
-          ...
-        
-      
-    
-  
-
-]]>
- You can make use of this format with the parser - supplied as part of SimpleTest itself. - This is called SimpleTestXmlParser and - resides in xml.php within the SimpleTest package... -parse($test_output); -?> -]]> - The $test_output should be the XML format - from the XML reporter, and could come from say a command - line run of a test case. - The parser sends events to the reporter just like any - other test run. - There are some odd occasions where this is actually useful. -

-

- A problem with large test suites is thet they can exhaust - the default 8Mb memory limit on a PHP process. - By having the test groups output in XML and run in - separate processes, the output can be reparsed to - aggregate the results into a much smaller footprint top level - test. -

-

- Because the XML output can come from anywhere, this opens - up the possibility of aggregating test runs from remote - servers. - A test case already exists to do this within the SimpleTest - framework, but it is currently experimental... -require_once('../remote.php'); -require_once('../reporter.php'); - -$test_url = ...; -$dry_url = ...; - -$test = &new TestSuite('Remote tests'); -$test->addTestCase(new RemoteTestCase($test_url, $dry_url)); -$test->run(new HtmlReporter()); -?> -]]> - The RemoteTestCase takes the actual location - of the test runner, basically a web page in XML format. - It also takes the URL of a reporter set to do a dry run. - This is so that progress can be reported upward correctly. - The RemoteTestCase can be added to test suites - just like any other group test. -

-
-
- - - Displaying results in HTML - - - Displaying and reporting results - in other formats - - - Using SimpleTest from the command line - - - Using Using XML for remote testing - - - - - SimpleTest project page on SourceForge. - - - SimpleTest download page on LastCraft. - - - The developer's API for SimpleTest - gives full detail on the classes and assertions available. - - - - - php unit testing, - documentation, - marcus baker, - simple test, - simpletest, - remote testing, - xml tests, - automated testing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/screencasts.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/screencasts.xml deleted file mode 100644 index b003e0a1..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/screencasts.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - Screencasts : Basic and Advanced TDD using SimpleTest - -
-

- Want to see a basic TDD session in PHP ? - Here's a screencast from a session presented at - the PHP Everywhere Conference - by Andre John Cruz - (Application Developer, Barclays Singapore). -

-

- Basic TDD in PHP Demo, 1 of 3
- -
-
- Basic TDD in PHP Demo, 2 of 3
- -
-
- Basic TDD in PHP Demo, 3 of 3
- -

-

- Advanced TDD in PHP Demo, 1 of 4
- -
-
- Advanced TDD in PHP Demo, 2 of 4
- -
-
- Advanced TDD in PHP Demo, 3 of 4
- -
-
- Advanced TDD in PHP Demo, 4 of 4
- -

-
-
- - - A screencast - covering "Basic and Advanced TDD in PHP". - - - - - The PHP User Group - Philippines organized the event. - - - - - software development, - test case example, - programming php, - software development tools, - php tutorial, - creating subclass, - free php scripts, - architecture, - php resources, - junit, - phpunit style testing, - unit test, - php testing, - screencast, - basic TDD, - advanced TDD - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/simple_test.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/simple_test.xml deleted file mode 100644 index 10aa8620..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/simple_test.xml +++ /dev/null @@ -1,524 +0,0 @@ - - - - - Download the Simple Test testing framework - - Unit tests and mock objects for PHP - - - - 1.0.1 release cycle started. - Features include include file upload, better PHP5 support for - mock objects, and HTML label support. - There is also a big clean up of method names and some internals - refactoring. - - -

- The following assumes that you are familiar with the concept - of unit testing as well as the PHP web development language. - It is a guide for the impatient new user of - SimpleTest. - For fuller documentation, especially if you are new - to unit testing see the ongoing - documentation, and for - example test cases see the - unit testing tutorial. -

-
-
-

- Amongst software testing tools, a unit tester is the one - closest to the developer. - In the context of agile development the test code sits right - next to the source code as both are written simultaneously. - In this context SimpleTest aims to be a complete PHP developer - test solution and is called "Simple" because it - should be easy to use and extend. - It wasn't a good choice of name really. - It includes all of the typical functions you would expect from - JUnit and the - PHPUnit - ports, and includes - mock objects. -

-

- What makes this tool immediately useful to the PHP developer is the internal - web browser. - This allows tests that navigate web sites, fill in forms and test pages. - Being able to write these test in PHP means that it is easy to write - integrated tests. - An example might be confirming that a user was written to a database - after a signing up through the web site. -

-

- The quickest way to demonstrate SimpleTest is with an example. -

-

- Let us suppose we are testing a simple file logging class called - Log in classes/log.php. - We start by creating a test script which we will call - tests/log_test.php and populate it as follows... -require_once('simpletest/autorun.php'); -require_once('../classes/log.php'); - -class TestOfLogging extends UnitTestCase { -} -?> -]]> - Here the simpletest folder is either local or in the path. - You would have to edit these locations depending on where you - unpacked the toolset. - The "autorun.php" file does more than just include the - SimpleTest files, it also runs our test for us. -

-

- The TestOfLogging is our first test case and it's - currently empty. - Each test case is a class that extends one of the SimpleTet base classes - and we can have as many of these in the file as we want. -

-

- With three lines of scaffolding, and our Log class - include, we have a test suite. - No tests though. -

-

- For our first test, we'll assume that the Log class - takes the file name to write to in the constructor, and we have - a temporary folder in which to place this file... -testLogCreatesNewFileOnFirstMessage() { - @unlink('/temp/test.log'); - $log = new Log('/temp/test.log'); - $this->assertFalse(file_exists('/temp/test.log')); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('/temp/test.log')); - } -} -?> -]]> - When a test case runs, it will search for any method that - starts with the string "test" - and execute that method. - If the method starts "test", it's a test. - Note the very long name testLogCreatesNewFileOnFirstMessage(). - This is considered good style and makes the test output more readable. -

-

- We would normally have more than one test method in a test case, - but that's for later. -

-

- Assertions within the test methods trigger messages to the - test framework which displays the result immediately. - This immediate response is important, not just in the event - of the code causing a crash, but also so that - print statements can display - their debugging content right next to the assertion concerned. -

-

- To see these results we have to actually run the tests. - No other code is necessary - we can just open the page - with our browser. -

-

- On failure the display looks like this... -

-

TestOfLogging

- Fail: testLogCreatesNewFileOnFirstMessage->True assertion failed.
-
1/1 test cases complete. - 1 passes and 1 fails.
-
- ...and if it passes like this... -
-

TestOfLogging

-
1/1 test cases complete. - 2 passes and 0 fails.
-
- And if you get this... -
- Fatal error: Failed opening required '../classes/log.php' (include_path='') in /home/marcus/projects/lastcraft/tutorial_tests/Log/tests/log_test.php on line 7 -
- it means you're missing the classes/Log.php file that could look like... - -class Log { - function Log($file_path) { - } - - function message() { - } -} -?> -]]> - It's fun to write the code after the test. - More than fun even - - this system is called "Test Driven Development". -

-

- For more information about UnitTestCase, see - the unit test documentation. -

-
-
-

- It is unlikely in a real application that we will only ever run - one test case. - This means that we need a way of grouping cases into a test - script that can, if need be, run every test for the application. -

-

- Our first step is to create a new file called tests/all_tests.php - and insert the following code... -require_once('simpletest/autorun.php'); - -class AllTests extends TestSuite { - function AllTests() { - $this->TestSuite('All tests'); - $this->addFile('log_test.php'); - } -} -?> -]]> - The "autorun" include allows our upcoming test suite - to be run just by invoking this script. -

-

- The TestSuite subclass must chain it's constructor. - This limitation will be removed in future versions. -

-

- The method TestSuite::addFile() - will include the test case file and read any new classes - that are descended from SimpleTestCase. - UnitTestCase is just one example of a class derived from - SimpleTestCase, and you can create your own. - TestSuite::addFile() can include other test suites. -

-

- The class will not be instantiated yet. - When the test suite runs it will construct each instance once - it reaches that test, then destroy it straight after. - This means that the constructor is run just before each run - of that test case, and the destructor is run before the next test case starts. -

-

- It is common to group test case code into superclasses which are not - supposed to run, but become the base classes of other tests. - For "autorun" to work properly the test case file should not blindly run - any other test case extensions that do not actually run tests. - This could result in extra test cases being counted during the test - run. - Hardly a major problem, but to avoid this inconvenience simply mark your - base class as abstract. - SimpleTest won't run abstract classes. - If you are still using PHP4, then - a SimpleTestOptions::ignore() directive - somewhere in the test case file will have the same effect. -

-

- Also, the test case file should not have been included - elsewhere or no cases will be added to this group test. - This would be a more serious error as if the test case classes are - already loaded by PHP the TestSuite::addFile() - method will not detect them. -

-

- To display the results it is necessary only to invoke - tests/all_tests.php from the web server or the command line. -

-

- For more information about building test suites, - see the test suite documentation. -

-
-
-

- Let's move further into the future and do something really complicated. -

-

- Assume that our logging class is tested and completed. - Assume also that we are testing another class that is - required to write log messages, say a - SessionPool. - We want to test a method that will probably end up looking - like this... - -class SessionPool { - ... - function logIn($username) { - ... - $this->_log->message("User $username logged in."); - ... - } - ... -} - -]]> - In the spirit of reuse, we are using our - Log class. - A conventional test case might look like this... -require_once('../classes/session_pool.php'); - -class TestOfSessionLogging extends UnitTestCase { - - function setUp() { - @unlink('/temp/test.log'); - } - - function tearDown() { - @unlink('/temp/test.log'); - } - - function testLoggingInIsLogged() { - $log = new Log('/temp/test.log'); - $session_pool = &new SessionPool($log); - $session_pool->logIn('fred'); - $messages = file('/temp/test.log'); - $this->assertEqual($messages[0], "User fred logged in.\n"); - } -} -?> -]]> - We'll explain the setUp() and tearDown() - methods later. -

-

- This test case design is not all bad, but it could be improved. - We are spending time fiddling with log files which are - not part of our test. - We have created close ties with the Log class and - this test. - What if we don't use files any more, but use ths - syslog library instead? - It means that our TestOfSessionLogging test will - fail, even thouh it's not testing Logging. -

-

- It's fragile in smaller ways too. - Did you notice the extra carriage return in the message? - Was that added by the logger? - What if it also added a time stamp or other data? -

-

- The only part that we really want to test is that a particular - message was sent to the logger. - We can reduce coupling if we pass in a fake logging class - that simply records the message calls for testing, but - takes no action. - It would have to look exactly like our original though. -

-

- If the fake object doesn't write to a file then we save on deleting - the file before and after each test. We could save even more - test code if the fake object would kindly run the assertion for us. -

-

- Too good to be true? - We can create such an object easily... -Mock::generate('Log'); - -class TestOfSessionLogging extends UnitTestCase { - - function testLoggingInIsLogged() { - $log = &new MockLog(); - $log->expectOnce('message', array('User fred logged in.')); - $session_pool = &new SessionPool($log); - $session_pool->logIn('fred'); - } -} -?> -]]> - The Mock::generate() call code generated a new class - called MockLog. - This looks like an identical clone, except that we can wire test code - to it. - That's what expectOnce() does. - It says that if message() is ever called on me, it had - better be with the parameter "User fred logged in.". -

-

- The test will be triggered when the call to - message() is invoked on the - MockLog object by SessionPool::logIn() code. - The mock call will trigger a parameter comparison and then send the - resulting pass or fail event to the test display. - Wildcards can be included here too, so you don't have to test every parameter of - a call when you only want to test one. -

-

- If the mock reaches the end of the test case without the - method being called, the expectOnce() - expectation will trigger a test failure. - In other words the mocks can detect the absence of - behaviour as well as the presence. -

-

- The mock objects in the SimpleTest suite can have arbitrary - return values set, sequences of returns, return values - selected according to the incoming arguments, sequences of - parameter expectations and limits on the number of times - a method is to be invoked. -

-

- For more information about mocking and stubbing, see the - mock objects documentation. -

-
-
-

- One of the requirements of web sites is that they produce web - pages. - If you are building a project top-down and you want to fully - integrate testing along the way then you will want a way of - automatically navigating a site and examining output for - correctness. - This is the job of a web tester. -

-

- The web testing in SimpleTest is fairly primitive, as there is - no JavaScript. - Most other browser operations are simulated. -

-

- To give an idea here is a trivial example where a home - page is fetched, from which we navigate to an "about" - page and then test some client determined content. -require_once('simpletest/web_tester.php'); - -class TestOfAbout extends WebTestCase { - function testOurAboutPageGivesFreeReignToOurEgo() { - $this->get('http://test-server/index.php'); - $this->click('About'); - $this->assertTitle('About why we are so great'); - $this->assertText('We are really great'); - } -} -?> -]]> - With this code as an acceptance test, you can ensure that - the content always meets the specifications of both the - developers, and the other project stakeholders. -

-

- You can navigate forms too... -get('http://google.com/'); - $this->setField('q', 'simpletest'); - $this->click("I'm Feeling Lucky"); - $this->assertTitle('SimpleTest - Unit Testing for PHP'); - } -} -?> -]]> - ...although this could violate Google's(tm) terms and conditions. -

-

- For more information about web testing, see the - scriptable - browser documentation and the - WebTestCase. -

-

- SourceForge.net Logo -

-
-
- - - Using unit tester - with an example. - - - Grouping tests - for testing with one click. - - - Using mock objects - to ease testing and gain tighter control. - - - Testing web pages - at the browser level. - - - - - Download PHP Simple Test - from SourceForge. - - - The developer's API for SimpleTest - gives full detail on the classes and assertions available. - - - - - software development, - php programming, - programming php, - software development tools, - php tutorial, - free php scripts, - architecture, - php resources, - mock objects, - junit, - php testing, - php unit, - methodology, - test first, - sourceforge, - open source, - unit test, - web tester, - web testing, - html testing tools, - testing web pages, - php mock objects, - navigating websites automatically, - automated testing, - web scripting, - wget, - curl testing, - jmock for php, - jwebunit, - phpunit, - php unit testing, - php web testing, - jason sweat, - marcus baker, - topstyle plug in, - phpedit plug in - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/softwares_using_simpletest.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/softwares_using_simpletest.xml deleted file mode 100644 index 368a5017..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/softwares_using_simpletest.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - Softwares using SimpleTest - -
-

- Some projects are able to extend SimpleTest's functionnality : -

-
-
- - Limb Unit - -
-
- limb_unit is an advanced SimpleTest based tests runner - utility for PHP5. In a nutshell, limb_unit finds and executes tests within - the file system. It's similar to phpunit utility from PHPUnit, - yet more powerful. -
-
- - SimpleTestXUL - -
-
- A XUL interface to SimpleTest framework. -
-
- - Stagehand_TestRunner - -
-
- Automated test runners for PHPUnit and SimpleTest. -
-
- - Suite Tester - -
-
- Suite Tester is an AJAX-driven add-on for the - PHP SimpleTest unit-testing tool. The main benefits are conveniently testing - an entire application or a single unit in one place, and quickly viewing - a suite's results one unit at a time. -
- -
-
-
-

- Others are using SimpleTest to build stuff : -

-
-
- - CakePHP - -
-
- CakePHP is a rapid development framework for PHP - which uses commonly known design patterns like ActiveRecord, - Association Data Mapping, Front Controller and MVC. -
-
- - Web Application Component Toolkit - -
-
- The Web Application Component Toolkit is - a framework for creating web applications. - WACT facilitates a modular approach where individual, - independent or reusable components may be integrated into a larger web - application. WACT assists in implementing the Model View Controller - pattern and the related Domain Model, Template View, Front Controller - and Application Controller patterns. -
-
- - Limb3 - -
-
- Limb is an OpenSource(LGPL) PHP framework aimed for - rapid web application development. - It is a committed proponents of the beautiful and - easy-to-maintain code that simply works. - That is why the Limb code is developed and constantly refactored in a - test driven manner using the best agile development practices. -
-
- - Drupal | SimpleTest - -
-
- A framework for running automated unit tests in Drupal. - This module comes with a set of core tests. These can be helpful when - making patches for the drupal core or when building your own set of - modules. -
-
- - WideImage - -
-
- WideImage is an object-oriented PHP image library, written - in/for PHP5. Uses GD2 and is unit-tested with Simpletest. Promotes ease of - use and extensibility. -
-
- - Aperiplus - -
-
- Aperiplus is a general purpose, unit-tested, OOP library - for PHP5. It contains extensions for SimpleTest. -
-
- - Flux CMS - -
-
- Flux CMS is a XML/XSLT CMS based on PHP 5 and Popoon. - It's easy to use for the enduser and has WYSIWYG editing capabilites, - but it's also very extensible and powerful for implementors to suit - your needs. -
-
- - Moodle - -
-
- Moodle is a course management system (CMS) - - a free, Open Source software package designed using sound pedagogical - principles, to help educators create effective online learning communities. -
-
-
-
- - - Projects extending SimpleTest - - - And some using SimpleTest - - - - - - - - - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/speakers_coaches_consultancy.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/speakers_coaches_consultancy.xml deleted file mode 100644 index ed0a67e5..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/speakers_coaches_consultancy.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - Speakers, coaches and consultants - -
-

- Providing a tool -- SimpleTest -- to enable developpers - get started with Unit Testing and TDD is sometimes not enough. -

-

- You need the "whole solution" : enjoying the knowledge of an - experienced coach or consultant can boost your strategy. - The team developping SimpleTest can offer in-depth expertise - to you projects. -

-
-
- - - - - - -
-
- - - - Providing the whole solution - - - Speakers, coaches and consultants close to you - - - - - - software development, - computer programmer, - php programming, - programming php, - software development company, - software development uk, - php tutorial, - bespoke software development uk, - corporate web development, - architecture, - freelancer, - php resources, - wordtracker, - web marketing, - serach engines, - web positioning, - internet marketing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/subclass_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/subclass_tutorial.xml deleted file mode 100644 index 17c5ce95..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/subclass_tutorial.xml +++ /dev/null @@ -1,255 +0,0 @@ - - - - PHP unit testing tutorial - Subclassing a test case - -
-

- We left our clock test with a hole. - If the PHP time() - function rolled over during this comparison... -assertEqual($clock->now(), time(), 'Now is the right time'); -} -]]> - ...our test would be out by one second and would cause - a false failure. - Erratic behaviour of our test suite is not what we want when - we could be running it a hundred times a day. -

-

- We could rewrite the test as... - - $time1 = $clock->now(); - $time2 = time(); - $this->assertTrue($time1 == $time2) || ($time1 + 1 == $time2), 'Now is the right time'); -} -]]> - This is hardly a clear design though and we will have to repeat - this for every timing test that we do. - Repetition is public enemy number one and so we'll - use this as incentive to factor out the new test code. -UnitTestCase('Clock class test'); - } - function assertSameTime($time1, $time2, $message) { - $this->assertTrue( - ($time1 == $time2) || ($time1 + 1 == $time2), - $message); - } - function testClockTellsTime() { - $clock = new Clock(); - $this->assertSameTime($clock->now(), time(), 'Now is the right time'); - } - function testClockAdvance() { - $clock = new Clock(); - $clock->advance(10); - $this->assertSameTime($clock->now(), time() + 10, 'Advancement'); - } -} -]]> - Of course each time I make one of these changes I rerun the - tests to make sure we are still OK. - Refactor on green. - It's a lot safer. -

-
-
-

- It may be that we want more than one test case that is - timing sensitive. - Perhaps we are reading timestamps from database rows - or other places that could allow an extra second to - tick over. - For these new test classes to take advantage of our new assertion - we need to place it into a superclass. -

-

- Here is the complete clock_test.php file after - promoting our assertSameTime() - method to its own superclass... - -class TimeTestCase extends UnitTestCase { - function TimeTestCase($test_name) { - $this->UnitTestCase($test_name); - } - function assertSameTime($time1, $time2, $message) { - $this->assertTrue( - ($time1 == $time2) || ($time1 + 1 == $time2), - $message); - } -} - -class TestOfClock extends TimeTestCase { - function TestOfClock() { - $this->TimeTestCase('Clock class test'); - } - function testClockTellsTime() { - $clock = new Clock(); - $this->assertSameTime($clock->now(), time(), 'Now is the right time'); - } - function testClockAdvance() { - $clock = new Clock(); - $clock->advance(10); - $this->assertSameTime($clock->now(), time() + 10, 'Advancement'); - } -} -?> -]]> - Now we get the benefit of our new assertion every - time we inherit from our own - TimeTestCase class - rather than the default - UnitTestCase. - This is very much how the JUnit tool was designed - to be used and SimpleTest is a port of that interface. - It is a testing framework from which your own test - system can be grown. -

-

- If we run the tests now we get a slight niggle... -

- Warning: Missing argument 1 for timetestcase() - in /home/marcus/projects/lastcraft/tutorial_tests/tests/clock_test.php on line 5
-

All tests

-
3/3 test cases complete. - 6 passes and 0 fails.
-
- The reasons for this are quite tricky. -

-

- Our subclass requires a constructor parameter that has - not been supplied and yet it appears that we did - supply it. - When we inherited our new class we passed it in our own - constructor. - It's right here... -TimeTestCase('Clock class test'); -} -]]> - In fact we are right, that is not the problem. -

-

- Remember when we built our all_tests.php - group test by using the - addTestFile() method. - This method looks for test case classes, instantiates - them if they are new and then runs all of their tests. - What's happened is that it has found our - test case extension as well. - This is harmless as there are no test methods within it, - that is, method names that start with the string - "test". - No extra tests are run. -

-

- The trouble is that it instantiates the class and does this without - the $test_name parameter - which is what causes our warning. - This parameter is not normally required of a test - case and not normally of its assertions either. - To make our extended test case match the - UnitTestCase interface - we must make these optional... -$test_name = false) { - $this->UnitTestCase($test_name); - } - function assertSameTime($time1, $time2, $message = false) { - if (! $message) { - $message = "Time [$time1] should match time [$time2]"; - } - $this->assertTrue( - ($time1 == $time2) || ($time1 + 1 == $time2), - $message); - } -} -]]> - Of course it should still bother you that this class is - instantiated by the test suite unnecessarily. - Here is a modification to prevent it running... -SimpleTestOptions::ignore('TimeTestCase'); -class TimeTestCase extends UnitTestCase { - function TimeTestCase($test_name = false) { - $this->UnitTestCase($test_name); - } - function assertSameTime($time1, $time2, $message = '') { - if (!$message) { - $message = "Time [$time1] should match time [$time2]"; - } - $this->assertTrue( - ($time1 == $time2) || ($time1 + 1 == $time2), - $message); - } -} -]]> - This just tells SimpleTest to always ignore this class when - building test suites. - It can be included anywhere in the test case file. -

-

- Six passes looks good, but does not tell the casual - observer what has been tested. - For that you have to look at the code. - If that sounds like drudge to you and you would like this - information displayed before you then we should go on - to show the passes next. -

-
-
- - - A timing insensitive assertion - that allows a one second gain. - - - Subclassing the test case - so as to reuse the test method. - - - - - The previous section was - controlling test variables. - - - The next tutorial section was - changing the test display. - - - You will need the - SimpleTest test tool to run the - sample code. - - - - - software development, - test case example, - programming php, - software development tools, - php tutorial, - creating subclass, - free php scripts, - architecture, - php resources, - junit, - phpunit style testing, - unit test, - php testing - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/support_website.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/support_website.xml deleted file mode 100644 index 15b179d6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/support_website.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - Support mailing list - - -

- The simpletest-support mailing-list is probably - the most active area around SimpleTest : - help, advice, bugs and workarounds tend to happen most of the time. -

-
-
-

- It's really - - easy to subscribe - and it's - - fully searchable too. -

-

- At the last count, there were about 114 subscribers and 1908 message sent. - That's anything between 1 and 4 messages per day on average. -

-
-
- - - To subscribe. - - - - - Subscribing to the - - Support mailing list. - - - Reading the - - archive. - - - - - SimpleTest, - download, - source code, - stable release, - eclipse release, - eclipse plugin, - debian package, - drupal module, - pear channel, - pearified package - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/unit_test_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/unit_test_documentation.xml deleted file mode 100644 index adc92361..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/unit_test_documentation.xml +++ /dev/null @@ -1,313 +0,0 @@ - - - - SimpleTest for PHP regression test documentation - -
-

- The core system is a regression testing framework built around - test cases. - A sample test case looks like this... -class FileTestCase extends UnitTestCase { -} -]]> - Actual tests are added as methods in the test case whose names - by default start with the string "test" and - when the test case is invoked all such methods are run in - the order that PHP introspection finds them. - As many test methods can be added as needed. -

-

- For example... -UnitTestCase('File test'); - } - - function setUp() { - @unlink('../temp/test.txt'); - } - - function tearDown() { - @unlink('../temp/test.txt'); - } - - function testCreation() { - $writer = &new FileWriter('../temp/test.txt'); - $writer->write('Hello'); - $this->assertTrue(file_exists('../temp/test.txt'), 'File created'); - } -} -]]> - The constructor is optional and usually omitted. - Without a name, the class name is taken as the name of the test case. -

-

- Our only test method at the moment is testCreation() - where we check that a file has been created by our - Writer object. - We could have put the unlink() - code into this method as well, but by placing it in - setUp() and - tearDown() we can use it with - other test methods that we add. -

-

- The setUp() method is run - just before each and every test method. - tearDown() is run just after - each and every test method. -

-

- You can place some test case set up into the constructor to - be run once for all the methods in the test case, but - you risk test inteference that way. - This way is slightly slower, but it is safer. - Note that if you come from a JUnit background this will not - be the behaviour you are used to. - JUnit surprisingly reinstantiates the test case for each test - method to prevent such interference. - SimpleTest requires the end user to use setUp(), but - supplies additional hooks for library writers. -

-

- The means of reporting test results (see below) are by a - visiting display class - that is notified by various assert...() - methods. - Here is the full list for the UnitTestCase - class, the default for SimpleTest... - - - - - - - - - - - - - - - - - - - -
assertTrue($x)Fail if $x is false
assertFalse($x)Fail if $x is true
assertNull($x)Fail if $x is set
assertNotNull($x)Fail if $x not set
assertIsA($x, $t)Fail if $x is not the class or type $t
assertNotA($x, $t)Fail if $x is of the class or type $t
assertEqual($x, $y)Fail if $x == $y is false
assertNotEqual($x, $y)Fail if $x == $y is true
assertWithinMargin($x, $y, $m)Fail if abs($x - $y) < $m is false
assertOutsideMargin($x, $y, $m)Fail if abs($x - $y) < $m is true
assertIdentical($x, $y)Fail if $x == $y is false or a type mismatch
assertNotIdentical($x, $y)Fail if $x == $y is true and types match
assertReference($x, $y)Fail unless $x and $y are the same variable
assertClone($x, $y)Fail unless $x and $y are identical copies
assertPattern($p, $x)Fail unless the regex $p matches $x
assertNoPattern($p, $x)Fail if the regex $p matches $x
expectError($x)Swallows any upcoming matching error
assert($e)Fail on failed expectation object $e
- All assertion methods can take an optional description as a - last parameter. - This is to label the displayed result with. - If omitted a default message is sent instead, which is usually - sufficient. - This default message can still be embedded in your own message - if you include "%s" within the string. - All the assertions return true on a pass or false on failure. -

-

- Some examples... -$this->assertNull($variable, 'Should be cleared'); -]]> - ...will pass and normally show no message. - If you have - set up the tester to display passes - as well then the message will be displayed as is. -$this->assertIdentical(0, false, 'Zero is not false [%s]'); -]]> - This will fail as it performs a type - check, as well as a comparison, between the two values. - The "%s" part is replaced by the default - error message that would have been shown if we had not - supplied our own. -$this->assertReference($a, $b); -]]> - Will fail as the variable $a is a copy of $b. -$this->assertPattern('/hello/i', 'Hello world'); -]]> - This will pass as using a case insensitive match the string - hello is contained in Hello world. -$this->expectError(); -trigger_error('Catastrophe'); -]]> - Here the check catches the "Catastrophe" - message without checking the text and passes. - This removes the error from the queue. -$this->expectError('Catastrophe'); -trigger_error('Catastrophe'); -]]> - The next error check tests not only the existence of the error, - but also the text which, here matches so another pass. - If any unchecked errors are left at the end of a test method then - an exception will be reported in the test. -

-

- Note that SimpleTest cannot catch compile time PHP errors. -

-

- The test cases also have some convenience methods for debugging - code or extending the suite... - - - - - - - - -
setUp()Runs this before each test method
tearDown()Runs this after each test method
pass()Sends a test pass
fail()Sends a test failure
error()Sends an exception event
signal($type, $payload)Sends a user defined message to the test reporter
dump($var)Does a formatted print_r() for quick and dirty debugging
-

-
-
-

- Of course additional test methods can be added to create - specific types of test case, so as to extend framework... - -class FileTester extends UnitTestCase { - function FileTester($name = false) { - $this->UnitTestCase($name); - } - - function assertFileExists($filename, $message = '%s') { - $this->assertTrue( - file_exists($filename), - sprintf($message, 'File [$filename] existence check')); - } -} -]]> - Here the SimpleTest library is held in a folder called - simpletest that is local. - Substitute your own path for this. -

-

- To prevent this test case being run accidently, it is - advisable to mark it as abstract. -

-

- Alternatively you could add a - SimpleTestOptions::ignore('FileTester'); - directive in your code. -

-

- This new case can be now be inherited just like - a normal test case... -FileTester { - - function setUp() { - @unlink('../temp/test.txt'); - } - - function tearDown() { - @unlink('../temp/test.txt'); - } - - function testCreation() { - $writer = &new FileWriter('../temp/test.txt'); - $writer->write('Hello'); - $this->assertFileExists('../temp/test.txt'); - } -} -]]> -

-

- If you want a test case that does not have all of the - UnitTestCase assertions, - only your own and a few basics, - you need to extend the SimpleTestCase - class instead. - It is found in simple_test.php rather than - unit_tester.php. - See later if you - want to incorporate other unit tester's - test cases in your test suites. -

-
-
-

- You won't often run single test cases except when bashing - away at a module that is having difficulty, and you don't - want to upset the main test suite. - With autorun no particular scaffolding is needed, - just launch your particular test file and you're ready to go. -

-

- You can even decide which reporter (for example, - TextReporter or HtmlReporter) - you prefer for a specific file when launched on its own... - -SimpleTest :: prefer(new TextReporter()); -require_once('../classes/writer.php'); - -class FileTestCase extends UnitTestCase { - ... -} -?> -]]> - This script will run as is, but of course will output zero passes - and zero failures until test methods are added. -

-
-
- - - Unit test cases and basic assertions. - - - Extending test cases to - customise them for your own project. - - - Running a single case as - a single script. - - - - - SimpleTest project page on SourceForge. - - - SimpleTest download page on LastCraft. - - - Full API for SimpleTest - from the PHPDoc. - - - - - php unit testing, - test integration, - documentation, - marcus baker, - simple test, - simpletest documentation, - phpunit, - junit, - xunit, - agile web development, - eXtreme Programming, - Test Driven, - TDD - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/web_tester_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/web_tester_documentation.xml deleted file mode 100644 index e2c96992..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/web_tester_documentation.xml +++ /dev/null @@ -1,379 +0,0 @@ - - - - Simple Test for PHP web script testing documentation - -
-

- Testing classes is all very well, but PHP is predominately - a language for creating functionality within web pages. - How do we test the front end presentation role of our PHP - applications? - Well the web pages are just text, so we should be able to - examine them just like any other test data. -

-

- This leads to a tricky issue. - If we test at too low a level, testing for matching tags - in the page with pattern matching for example, our tests will - be brittle. - The slightest change in layout could break a large number of - tests. - If we test at too high a level, say using mock versions of a - template engine, then we lose the ability to automate some classes - of test. - For example, the interaction of forms and navigation will - have to be tested manually. - These types of test are extremely repetitive and error prone. -

-

- SimpleTest includes a special form of test case for the testing - of web page actions. - The WebTestCase includes facilities - for navigation, content and cookie checks and form handling. - Usage of these test cases is similar to the - UnitTestCase... -class TestOfLastcraft extends WebTestCase { -} -]]> - Here we are about to test the - Last Craft site itself. - If this test case is in a file called lastcraft_test.php - then it can be loaded in a runner script just like unit tests... - -require_once('simpletest/web_tester.php'); -SimpleTest::prefer(new TextReporter()); - -class WebTests extends TestSuite { - function WebTests() { - $this->TestSuite('Web site tests'); - $this->addFile('lastcraft_test.php'); - } -} -?> -]]> - I am using the text reporter here to more clearly - distinguish the web content from the test output. -

-

- Nothing is being tested yet. - We can fetch the home page by using the - get() method... - - function testHomepage() { - $this->assertTrue($this->get('http://www.lastcraft.com/')); - } -} -]]> - The get() method will - return true only if page content was successfully - loaded. - It is a simple, but crude way to check that a web page - was actually delivered by the web server. - However that content may be a 404 response and yet - our get() method will still return true. -

-

- Assuming that the web server for the Last Craft site is up - (sadly not always the case), we should see... -

-Web site tests
-OK
-Test cases run: 1/1, Failures: 0, Exceptions: 0
-
- All we have really checked is that any kind of page was - returned. - We don't yet know if it was the right one. -

-
-
-

- To confirm that the page we think we are on is actually the - page we are on, we need to verify the page content. - - $this->get('http://www.lastcraft.com/'); - $this->assertText('Why the last craft'); - } -} -]]> - The page from the last fetch is held in a buffer in - the test case, so there is no need to refer to it directly. - The pattern match is always made against the buffer. -

-

- Here is the list of possible content assertions... - - - - - - - - - - - - - - - - - - - - - -
assertTitle($title)Pass if title is an exact match
assertText($text)Pass if matches visible and "alt" text
assertNoText($text)Pass if doesn't match visible and "alt" text
assertPattern($pattern)A Perl pattern match against the page content
assertNoPattern($pattern)A Perl pattern match to not find content
assertLink($label)Pass if a link with this text is present
assertNoLink($label)Pass if no link with this text is present
assertLinkById($id)Pass if a link with this id attribute is present
assertNoLinkById($id)Pass if no link with this id attribute is present
assertField($name, $value)Pass if an input tag with this name has this value
assertFieldById($id, $value)Pass if an input tag with this id has this value
assertResponse($codes)Pass if HTTP response matches this list
assertMime($types)Pass if MIME type is in this list
assertAuthentication($protocol)Pass if the current challenge is this protocol
assertNoAuthentication()Pass if there is no current challenge
assertRealm($name)Pass if the current challenge realm matches
assertHeader($header, $content)Pass if a header was fetched matching this value
assertNoHeader($header)Pass if a header was not fetched
assertCookie($name, $value)Pass if there is currently a matching cookie
assertNoCookie($name)Pass if there is currently no cookie of this name
- As usual with the SimpleTest assertions, they all return - false on failure and true on pass. - They also allow an optional test message and you can embed - the original test message inside using "%s" inside - your custom message. -

-

- So now we could instead test against the title tag with... -$this->assertTitle('The Last Craft? Web developer tutorials on PHP, Extreme programming and Object Oriented development'); -]]> - ...or, if that is too long and fragile... -$this->assertTitle(new PatternExpectation('/The Last Craft/')); -]]> - As well as the simple HTML content checks we can check - that the MIME type is in a list of allowed types with... -$this->assertMime(array('text/plain', 'text/html')); -]]> - More interesting is checking the HTTP response code. - Like the MIME type, we can assert that the response code - is in a list of allowed values... -get('http://www.lastcraft.com/test/redirect.php'); - $this->assertResponse(200); - } -} -]]> - Here we are checking that the fetch is successful by - allowing only a 200 HTTP response. - This test will pass, but it is not actually correct to do so. - There is no page, instead the server issues a redirect. - The WebTestCase will - automatically follow up to three such redirects. - The tests are more robust this way and we are usually - interested in the interaction with the pages rather - than their delivery. - If the redirects are of interest then this ability must - be disabled... - - $this->setMaximumRedirects(0); - $this->get('http://www.lastcraft.com/test/redirect.php'); - $this->assertResponse(200); - } -} -]]> - The assertion now fails as expected... -

-Web site tests
-1) Expecting response in [200] got [302]
-    in testhomepage
-    in testoflastcraft
-    in lastcraft_test.php
-FAILURES!!!
-Test cases run: 1/1, Failures: 1, Exceptions: 0
-
- We can modify the test to correctly assert redirects with... -setMaximumRedirects(0); - $this->get('http://www.lastcraft.com/test/redirect.php'); - $this->assertResponse(array(301, 302, 303, 307)); - } -} -]]> - This now passes. -

-
-
-

- Users don't often navigate sites by typing in URLs, but by - clicking links and buttons. - Here we confirm that the contact details can be reached - from the home page... -get('http://www.lastcraft.com/'); - $this->clickLink('About'); - $this->assertTitle(new PatternExpectation('/About Last Craft/')); - } -} -]]> - The parameter is the text of the link. -

-

- If the target is a button rather than an anchor tag, then - clickSubmit() can be used - with the button title... -$this->clickSubmit('Go!'); -]]> - If you are not sure or don't care, the usual case, then just - use the click() method... -$this->click('Go!'); -]]> -

-

- The list of navigation methods is... - - - - - - - - - - - - - - - - - - - - - - - - - -
getUrl()The current location
get($url, $parameters)Send a GET request with these parameters
post($url, $parameters)Send a POST request with these parameters
head($url, $parameters)Send a HEAD request without replacing the page content
retry()Reload the last request
back()Like the browser back button
forward()Like the browser forward button
authenticate($name, $password)Retry after a challenge
restart()Restarts the browser as if a new session
getCookie($name)Gets the cookie value for the current context
ageCookies($interval)Ages current cookies prior to a restart
clearFrameFocus()Go back to treating all frames as one page
clickSubmit($label)Click the first button with this label
clickSubmitByName($name)Click the button with this name attribute
clickSubmitById($id)Click the button with this ID attribute
clickImage($label, $x, $y)Click an input tag of type image by title or alt text
clickImageByName($name, $x, $y)Click an input tag of type image by name
clickImageById($id, $x, $y)Click an input tag of type image by ID attribute
submitFormById($id)Submit a form without the submit value
clickLink($label, $index)Click an anchor by the visible label text
clickLinkById($id)Click an anchor by the ID attribute
getFrameFocus()The name of the currently selected frame
setFrameFocusByIndex($choice)Focus on a frame counting from 1
setFrameFocus($name)Focus on a frame by name
-

-

- The parameters in the get(), post() or - head() methods are optional. - The HTTP HEAD fetch does not change the browser context, only loads - cookies. - This can be useful for when an image or stylesheet sets a cookie - for crafty robot blocking. -

-

- The retry(), back() and - forward() commands work as they would on - your web browser. - They use the history to retry pages. - This can be handy for checking the effect of hitting the - back button on your forms. -

-

- The frame methods need a little explanation. - By default a framed page is treated just like any other. - Content will be searced for throughout the entire frameset, - so clicking a link will work no matter which frame - the anchor tag is in. - You can override this behaviour by focusing on a single - frame. - If you do that, all searches and actions will apply to that - frame alone, such as authentication and retries. - If a link or button is not in a focused frame then it cannot - be clicked. -

-

- Testing navigation on fixed pages only tells you when you - have broken an entire script. - For highly dynamic pages, such as for bulletin boards, this can - be crucial for verifying the correctness of the application. - For most applications though, the really tricky logic is usually in - the handling of forms and sessions. - Fortunately SimpleTest includes - tools for testing web forms - as well. -

-
-
-

- Although SimpleTest does not have the goal of testing networking - problems, it does include some methods to modify and debug - the requests it makes. - Here is another method list... - - - - - - - - - - - -
getTransportError()The last socket error
showRequest()Dump the outgoing request
showHeaders()Dump the incoming headers
showSource()Dump the raw HTML page content
ignoreFrames()Do not load framesets
setCookie($name, $value)Set a cookie from now on
addHeader($header)Always add this header to the request
setMaximumRedirects($max)Stop after this many redirects
setConnectionTimeout($timeout)Kill the connection after this time between bytes
useProxy($proxy, $name, $password)Make requests via this proxy URL
- These methods are principally for debugging. -

-
-
- - - Successfully fetching a web page - - - Testing the page content - - - Navigating a web site - while testing - - - Raw request modifications and debugging methods - - - - - SimpleTest project page on SourceForge. - - - SimpleTest download page on LastCraft. - - - The developer's API for SimpleTest - gives full detail on the classes and assertions available. - - - - - software development, - php programming for clients, - customer focused php, - software development tools, - acceptance testing framework, - free php scripts, - architecture, - php resources, - HTMLUnit, - JWebUnit, - php testing, - unit test resource, - web testing - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/writing_extensions.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/writing_extensions.xml deleted file mode 100644 index 6e34afcd..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/en/writing_extensions.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - Writing an extension for SimpleTest - - -

- SimpleTest is coded to be flexible and extensible. - It means you can add your own assertions. - You can also add your own reporter or any other tool worth your fancy. - In fact there's a special directory inside SimpleTest SVN trunk devoted - to such kind of experimentations. -

-
-
-

- There's a growing list of available extensions: -

-
-
colortext_reporter
-
- provides an ANSI-colored {@link TextReporter} for viewing test results. -
-
dom_tester
-
- create a CSS Selector expectation. -
-
pear_test_case
-
- provides an adapter for PEAR PHPUnit test case to allow - legacy PEAR test cases to be used with SimpleTest. -
-
phpunit_test_case
-
- provides an adapter for sourceforge PHPUnit test case to allow - legacy test cases to be used with SimpleTest. -
-
recorder
-
- returns an array with timestamp, status, test name - and message for each pass and failure. -
-
selenese_tester
-
- integrates selenese html test suite support - (can be generated by selenium-IDE). -
-
selenium
-
- provides a bridge to a Selenium server. -
-
testdox
-
- ... -
-
treemap_reporter
-
- constructs and renders a treemap visualization of a test run. -
-
webunit_reporter
-
- ... -
-
-
-
-

- If you want to have your own extension accepted inside the SVN trunk, - juste make sure you follow these simple rules: -

    -
  1. - Main code goes into a file located at
    - /extensions/my_new_extension.php -
  2. -
  3. - If you need extra stuff (classes, sub-routines, js or css files), - make sure everything is located your own
    - /extensions/my_new_extension/* -
  4. -
  5. - And since your package is unit-tested, - your tests go into
    - /extensions/my_new_extension/test/*
    - or
    - /extensions/my_new_extension/* -
  6. -
  7. - Bonus : you can get your own test suite caught directly - from SimpleTest. There's dedicated test scanning recursively - the extensions' directories and running the test file matching - /test.php$/. - An easy way for us to check if everyone's extension carries - on working with the current code base... -
  8. -
- Also for general coding practices, you can have a look at the - coding standards and formatting. -

-
-
- - Existing extensions - Committing a new extension - - - - - - software development, - php programming, - programming php, - software development tools, - php tutorial, - free php scripts, - architecture, - php resources, - mock objects, - plugins, - extensions, - extension, - selenium, - selenese, - testdox, - treemap, - reporter - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/authentication_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/authentication_documentation.xml deleted file mode 100644 index b3ef8d10..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/authentication_documentation.xml +++ /dev/null @@ -1,307 +0,0 @@ - - - - - Documentation Simple Test : tester l'authentification - - -

- Un des secteurs la fois dlicat et important lors d'un test - de site web reste la scurit. Tester ces schmas est au coeur - des objectifs du testeur web de SimpleTest. -

-
-
-

- Si vous allez chercher une page web protge - par une authentification basique, vous hriterez d'une entte 401. - Nous pouvons reprsenter ceci par ce test... - - function test401Header() { - $this->get('http://www.lastcraft.com/protected/'); - $this->showHeaders(); - } -} -]]> - Ce qui nous permet de voir les enttes reues... -

-

File test

-
-
1/1 test cases complete. - 0 passes, 0 fails and 0 exceptions.
-
- Sauf que nous voulons viter l'inspection visuelle, - on souhaite que SimpleTest puisse nous dire si oui ou non - la page est protge. Voici un test en profondeur sur nos enttes... -get('http://www.lastcraft.com/protected/'); - $this->assertAuthentication('Basic'); - $this->assertResponse(401); - $this->assertRealm('SimpleTest basic authentication'); - } -} -]]> - N'importe laquelle de ces assertions suffirait, - tout dpend de la masse de dtails que vous souhaitez voir. -

-

- La plupart du temps, nous ne souhaitons pas tester - l'authentification en elle-mme, mais plutt - les pages protges par cette authentification. - Ds que la tentative d'authentification est reue, - nous pouvons y rpondre l'aide d'une rponse d'authentification : -get('http://www.lastcraft.com/protected/'); - $this->authenticate('Me', 'Secret'); - $this->assertTitle(...); - } -} -]]> - Le nom d'utilisateur et le mot de passe seront dsormais - envoys chaque requte vers ce rpertoire - et ses sous-rpertoires. - En revanche vous devrez vous authentifier nouveau - si vous sortez de ce rpertoire mais SimpleTest est assez - intelligent pour fusionner les sous-rpertoires dans un mme domaine. -

-

- Vous pouvez gagner une ligne en dfinissant - l'authentification au niveau de l'URL... -get('http://Me:Secret@www.lastcraft.com/protected/'); - $this->assertTitle(...); - } -} -]]> - Si votre nom d'utilisateur ou mot de passe comporte - des caractres spciaux, alors n'oubliez pas de les encoder, - sinon la requte ne sera pas analyse correctement. - De plus cette entte ne sera pas envoye aux - sous requtes si vous la dfinissez avec une URL absolue. - Par contre si vous naviguez avec des URL relatives, - l'information d'authentification sera prserve. -

-

- Pour l'instant, seule l'authentification de base est implmente - et elle n'est rellement fiable qu'en tandem avec une connexion HTTPS. - C'est gnralement suffisant pour protger - le serveur test des regards malveillants. - Les authentifications Digest et NTLM pourraient tre ajoutes prochainement. -

-
-
-

- L'authentification de base ne donne pas assez de contrle - au dveloppeur Web sur l'interface utilisateur. - Il y a de forte chance pour que cette fonctionnalit - soit code directement dans l'architecture web - grand renfort de cookies et de timeouts compliqus. -

-

- Commenons par un simple formulaire de connexion... -


-    Username:
-    
- Password: -
- - -]]>
- Lequel doit ressembler ... -

-

-

- Username: -
- Password: -
- -
-

-

- Supposons que, durant le chargement de la page, - un cookie ait t inscrit avec un numro d'identifiant de session. - Nous n'allons pas encore remplir le formulaire, - juste tester que nous pistons bien l'utilisateur. - Voici le test... -get('http://www.my-site.com/login.php'); - $this->assertCookie('SID'); - } -} -]]> - Nous nous contentons ici de vrifier que le cookie a bien t dfini. - Etant donn que sa valeur est plutt nigmatique, - elle ne vaut pas la peine d'tre teste. -

-

- Le reste du test est le mme que dans n'importe quel autre formulaire, - mais nous pourrions souhaiter nous assurer - que le cookie n'a pas t modifi depuis la phase de connexion. - Voici comment cela pourrait tre test : -get('http://www.my-site.com/login.php'); - $session = $this->getCookie('SID'); - $this->setField('u', 'Me'); - $this->setField('p', 'Secret'); - $this->clickSubmit('Log in'); - $this->assertWantedPattern('/Welcome Me/'); - $this->assertCookie('SID', $session); - } -} -]]> - Ceci confirme que l'identifiant de session - est identique avant et aprs la connexion. -

-

- Nous pouvons mme essayer de duper notre propre systme - en crant un cookie arbitraire pour se connecter... -get('http://www.my-site.com/login.php'); - $this->setCookie('SID', 'Some other session'); - $this->get('http://www.my-site.com/restricted.php'); - $this->assertWantedPattern('/Access denied/'); - } -} -]]> - Votre site est-il protg contre ce type d'attaque ? -

-
-
-

- Si vous testez un systme d'authentification, - la reconnexion par un utilisateur est un point sensible. - Essayons de simuler ce qui se passe dans ce cas : -get('http://www.my-site.com/login.php'); - $this->setField('u', 'Me'); - $this->setField('p', 'Secret'); - $this->clickSubmit('Log in'); - $this->assertWantedPattern('/Welcome Me/'); - - $this->restart(); - $this->get('http://www.my-site.com/restricted.php'); - $this->assertWantedPattern('/Access denied/'); - } -} -]]> - La mthode WebTestCase::restart() prserve les cookies - dont le timeout a expir, mais conserve les cookies temporaires ou expirs. - Vous pouvez spcifier l'heure et la date de leur ractivation. -

-

- L'expiration des cookies peut tre un problme. - Si vous avez un cookie qui doit expirer au bout d'une heure, - nous n'allons pas mettre le test en veille en attendant - que le cookie expire... -

-

- Afin de provoquer leur expiration, - vous pouvez dater manuellement les cookies, - avant le dbut de la session. -get('http://www.my-site.com/login.php'); - $this->setField('u', 'Me'); - $this->setField('p', 'Secret'); - $this->clickSubmit('Log in'); - $this->assertWantedPattern('/Welcome Me/'); - - $this->ageCookies(3600); - $this->restart(); - $this->get('http://www.my-site.com/restricted.php'); - $this->assertWantedPattern('/Access denied/'); - } -} -]]> - Aprs le redmarrage, les cookies seront plus vieux - d'une heure et que tous ceux dont la date d'expiration - sera passe auront disparus. -

-
-
- - - Passer au travers d'une authentification HTTP basique - - - Tester l'authentification base sur des cookies - - - Grer les sessions du navigateur et les timeouts - - - - - La page du projet SimpleTest sur SourceForge. - - - La page de tlchargement de SimpleTest sur LastCraft. - - - L'API du dveloppeur pour SimpleTest donne tous les dtails sur les classes et les assertions disponibles. - - - - - dveloppement logiciel, - programmation php, - php orient client, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - architecture, - ressources php, - objets fantaise, - php testing, - php unit, - mthodologie, - dveloppement pilot par les tests, - outils tests html, - tester des web pages, - php objets fantaise, - naviguer automatiquement sur des sites web, - test automatis, - scripting web, - HTMLUnit, - JWebUnit, - phpunit, - php unit testing, - php web testing, - test unitaire de systme d'authentification, - authentification HTTP, - test de connexion, - test d'authentification, - test de scurit - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/books_website.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/books_website.xml deleted file mode 100644 index 5e198fd9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/books_website.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - Livres avec / propos / pas loin de SimpleTest - -
-

- De temps en temsp, un livre est recommand sur la mailing-list, - vous le trouverez ci-dessous avec les commentaires originaux ! -

-

- Domain-Driven Design: Tackling Complexity in the Heart of Software -

-
- Le Dveloppement Pilot par les Tests est principalement intress par - les mcanismes pour coder, mais il dit que c'est fini quand il n'y plus - de duplication. Le Dveloppement Pilot par la Conception (DDD) considre - que le code est constamment in churn, changeant de terminologie au - fur et mesure que le domaine devient plus clair, et aussi nourrisant le domaine - avec des nouveaux termes quand le code volue..
-
- Et puis, c'est un super bouquin :) - [source] -
-
-
-

- Deux contributeurs de Simpletest ont crit des livres sur PHP. - Tous les deux ont de nombreux exemples avec le framework SimpleTest. -

-

- PHP|Architect's Guide to PHP Design Patterns -
- PHP|Architect's Guide to PHP Design Patterns
- par Jason E. Sweat
- (l'obtenir depuis : PHP|Architect | - Amazon ) -

-

- The PHP Anthology: Object Oriented PHP Solutions -
- The PHP Anthology: Object Oriented PHP Solutions
- par Harry Fuecks
- (l'obtenir depuis : SitePoint | - Amazon | - critique sur Slashdot ) -

-
-
-

- Une manire d'aider l'quipe de contributeurs, c'est d'acheter des livres via - cete page avec Amazon (avec le mot-cl simpletest-21). - Nous adorons tous lire des trucs la fois intressants et stimulants. -

-
-
- - - Latest recommandation - - - Books by contributors - - - Buying books - - - - - - - - - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/boundary_classes_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/boundary_classes_tutorial.xml deleted file mode 100644 index bf26c715..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/boundary_classes_tutorial.xml +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - Tutorial de tests unitaires PHP - Organiser les tests unitaires et les scnarios de test de classe frontire - - - -

- Vous pensez probablement que nous avons dsormais puis - les modifications sur la classe Log - et qu'il n'y a plus rien ajouter. - Sauf que les choses ne sont jamais simples avec la Programmation Orient Objet. - Vous pensez comprendre un problme et un nouveau cas arrive : - il dfie votre point de vue et vous conduit - vers une analyse encore plus profonde. - Je pensais comprendre la classe de log et - que seule la premire page du tutorial l'utiliserait. - Aprs a, je serais pass quelque chose de plus compliqu. - Personne n'est plus surpris que moi de ne pas l'avoir boucle. - En fait je pense que je viens peine - de me rendre compte de ce qu'un loggueur fait. -

-
-
-

- Supposons que nous ne voulons plus seulement enregistrer - les logs vers un fichier. Nous pourrions vouloir les afficher l'cran, - les envoyer au daemon syslog d'Unix(tm) via un socket. - Comment s'accommoder de tels changements ? -

-

- Le plus simple est de crer des sous-classes de Log - qui crasent la mthode message() avec les nouvelles versions. - Ce systme fonctionne bien court terme, sauf qu'il a quelque chose - de subtilement mais foncirement erron. Supposons que nous crions - ces sous-classes et que nous ayons des loggueurs crivant vers un fichier, - sur l'cran et via le rseau. Trois classes en tout : a fonctionne. - Maintenant supposons que nous voulons ajouter une nouvelle classe de log - qui ajoute un filtrage par priorit des messages, ne laissant passer - que les messages d'un certain type, le tout suivant un fichier de configuration. -

-

- Nous sommes coincs. Si nous crons de nouvelles sous-classes, - nous devons le faire pour l'ensemble des trois classes, - ce qui nous donnerait six classes. L'envergure de la duplication est horrible. -

-

- Alors, est-ce que vous tes en train de souhaiter que PHP ait - l'hritage multiple ? Effectivement, cela rduirait l'ampleur - de la tche court terme, mais aussi compliquerait quelque - chose qui devrait tre une classe trs simple. L'hritage multiple, - mme support, devrait tre utilis avec le plus grand soin car - toutes sortes d'enchevtrements peuvent en dcouler. - En fait ce soudain besoin nous dit quelque chose d'autre - - peut-tre que notre erreur si situe au niveau de la conception. -

-

- Qu'est-ce que doit faire un loggueur ? Est-ce qu'il envoie - un message vers un fichier ? A l'cran ? Via le rseau ? Non. - Il envoie un message, point final. La cible de ses messages - peut tre slectionne l'initialisation du log, - mais aprs a pas touche : le loggueur doit pouvoir combiner - et formater les lments du message puisque tel est son vritable boulot. - Prsumer que la cible fut un nom de fichier tait une belle paire d'oeillres. -

-
-
-

- La solution de cette mauvaise passe est un classique. - Tout d'abord nous encapsulons la variation de la classe : - cela ajoute un niveau d'indirection. Au lieu d'introduire - le nom du fichier comme une chane, nous l'introduisons comme - "cette chose vers laquelle on crit" et que - nous appelons un Writer. Retour aux tests... - - require_once('../classes/writer.php'); - Mock::generate('Clock'); - - class TestOfLogging extends UnitTestCase { - function TestOfLogging() { - $this->UnitTestCase('Log class test'); - } - function setUp() { - @unlink('../temp/test.log'); - } - function tearDown() { - @unlink('../temp/test.log'); - } - function getFileLine($filename, $index) { - $messages = file($filename); - return $messages[$index]; - } - function testCreatingNewFile() { - $log = new Log(new FileWriter('../temp/test.log')); - $this->assertFalse(file_exists('../temp/test.log'), 'Created before message'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log'), 'File created'); - } - function testAppendingToFile() { - $log = new Log(new FileWriter('../temp/test.log')); - $log->message('Test line 1'); - $this->assertWantedPattern( - '/Test line 1/', - $this->getFileLine('../temp/test.log', 0)); - $log->message('Test line 2'); - $this->assertWantedPattern( - '/Test line 2/', - $this->getFileLine('../temp/test.log', 1)); - } - function testTimestamps() { - $clock = &new MockClock($this); - $clock->setReturnValue('now', 'Timestamp'); - $log = new Log(new FileWriter('../temp/test.log')); - $log->message('Test line', &$clock); - $this->assertWantedPattern( - '/Timestamp/', - $this->getFileLine('../temp/test.log', 0), - 'Found timestamp'); - } - } -?> -]]> - Je vais parcourir ces tests pas pas pour ne pas ajouter - trop de confusion. J'ai remplac les noms de fichier par - une classe imaginaire FileWriter en provenance - d'un fichier classes/writer.php. - Par consquent les tests devraient planter - puisque nous n'avons pas encore crit ce scripteur. - Doit-on le faire maintenant ? -

-

- Nous pourrions, mais ce n'est pas oblig. - Par contre nous avons besoin de crer l'interface, - ou alors il ne sera pas possible de la simuler. - Au final classes/writer.php ressemble ... - -]]> - Nous avons aussi besoin de modifier la classe Log... - - require_once('../classes/writer.php'); - - class Log { - var $_writer; - - function Log(&$writer) { - $this->_writer = &$writer; - } - - function message($message, $clock = false) { - if (! is_object($clock)) { - $clock = new Clock(); - } - $this->_writer->write("[" . $clock->now() . "] $message"); - } - } -?> -]]> - Il n'y a pas grand chose qui n'ait pas chang y compris - dans la plus petite de nos classes. Dsormais les tests - s'excutent mais ne passent pas, moins que nous ajoutions - du code dans le scripteur. Alors que faisons nous ? -

-

- Nous pourrions commencer par crire des tests et - dvelopper la classe FileWriter paralllement, - mais lors de cette tape nos tests de Log - continueraient d'chouer et de nous distraire. - En fait nous n'en avons pas besoin. -

-

- Une partie de notre objectif est de librer la classe - du loggueur de l'emprise du systme de fichiers - et il existe un moyen d'y arriver. - Tout d'abord nous crons le fichier tests/writer_test.php - de manire avoir un endroit pour placer - notre code test en provenance de log_test.php - et que nous allons brasser. Sauf que je ne vais pas l'ajouter - dans le fichier all_tests.php pour l'instant - puisque qu'il s'agit de la partie de log que nous sommes en train d'aborder. -

-

- Nous enlevons tous les test de log_test.php - qui ne sont pas strictement en lien avec le journal - et nous les gardons bien prcieusement dans - writer_test.php pour plus tard. - Nous allons aussi simuler le scripteur pour qu'il n'crive pas - rellement dans un fichier... - - Mock::generate('FileWriter'); - - class TestOfLogging extends UnitTestCase { - function TestOfLogging() { - $this->UnitTestCase('Log class test'); - } - function testWriting() { - $clock = &new MockClock($this); - $clock->setReturnValue('now', 'Timestamp'); - $writer = &new MockFileWriter($this); - $writer->expectArguments('write', array('[Timestamp] Test line')); - $writer->expectCallCount('write', 1); - $log = &new Log($writer); - $log->message('Test line', &$clock); - $writer->tally(); - } - } -?> -]]> - Eh oui c'est tout : il s'agit bien de l'ensemble du scnario de test - et c'est normal qu'il soit aussi court. Pas mal de choses se sont passes... -

    -
  1. - La ncessit de crer le fichier uniquement - si ncessaire a t dplace vers le FileWriter. -
  2. -
  3. - tant donn que nous travaillons avec des objets fantaisie, - aucun fichier n'a t cr et donc setUp() - et tearDown() passent dans les tests du scripteur. -
  4. -
  5. - Dsormais le test consiste simplement dans l'envoi - d'un message type et du test de son format. -
  6. -
- Attendez un instant, o sont les assertions ? -

-

- Les objets fantaisie font beaucoup plus que se comporter - comme des objets, ils excutent aussi des test. - L'appel expectArguments() dit l'objet fantaisie - d'attendre un seul paramtre de la chane "[Timestamp] Test" - quand la mthode fantaise write() est appele. - Lorsque cette mthode est appele les paramtres attendus - sont compars avec ceci et un succs ou un chec est renvoy - comme rsultat au test unitaire. - C'est pourquoi un nouvel objet fantaisie a une rfrence - vers $this dans son constructeur, - il a besoin de ce $this pour l'envoi de son propre rsultat. -

-

- L'autre attente, c'est que le write ne soit appel - qu'une seule et unique fois. Juste l'initialiser ne serait pas suffisant. - L'objet fantaisie attendrait une ternit - si la mthode n'tait jamais appele - et par consquent n'enverrait jamais - le message d'erreur la fin du test. - Pour y faire face, l'appel tally() lui dit de vrifier - le nombre d'appel ce moment l. - Nous pouvons voir tout a en lanant les tests... -

-

All tests

- Pass: log_test.php->Log class test->testwriting->Arguments for [write] were [String: [Timestamp] Test line]
- Pass: log_test.php->Log class test->testwriting->Expected call count for [write] was [1], but got [1]
- - Pass: clock_test.php->Clock class test->testclockadvance->Advancement
- Pass: clock_test.php->Clock class test->testclocktellstime->Now is the right time
-
3/3 test cases complete. - 4 passes and 0 fails.
-
-

-

- En fait nous pouvons encore raccourcir nos tests. - L'attente de l'objet fantaisie expectOnce() - peut combiner les deux attentes spares. -setReturnValue('now', 'Timestamp'); - $writer = &new MockFileWriter($this); - $writer->expectOnce('write', array('[Timestamp] Test line')); - $log = &new Log($writer); - $log->message('Test line', &$clock); - $writer->tally(); -} -]]> - Cela peut tre une abrviation utile. -

-
-
-

- Quelque chose de trs agrable est arrive au loggueur - en plus de devenir purement et simplement plus court. -

-

- Les seules choses dont il dpend sont maintenant - des classes que nous avons crites nous-mme - et qui dans les tests sont simules : - donc aucune dpendance hormis notre propre code PHP. - Pas de fichier crire ni de dclenchement - via une horloge attendre. Cela veut dire que le scnario - de test log_test.php va s'excuter aussi vite - que le processeur le permet. - Par contraste les classes FileWriter et Clock - sont trs proches du systme. - Plus difficile tester puisque de vraies donnes - doivent tre dplaces et valides avec soin, - souvent par des astuces ad hoc. -

-

- Notre dernire factorisation a beaucoup aid. - Les classes aux frontires de l'application et du systme, - celles qui sont difficiles tester, sont dsormais plus courtes - tant donn que le code d'I/O a t loign - encore plus de la logique applicative. - Il existe des liens directs vers des oprations PHP : - FileWriter::write() s'apparente l'quivalent - PHP fwrite() avec le fichier ouvert pour l'ajout - et Clock::now() s'apparente lui aussi - un quivalent PHP time(). - Primo le dbogage devient plus simple. - Secundo ces classes devraient bouger moins souvent. -

-

- Si elles ne changent pas beaucoup alors il n'y a aucune raison - pour continuer en excuter les tests. - Cela veut dire que les tests pour les classes frontires - peuvent tre dplaces vers leur propre suite de tests, - laissant les autres tourner plein rgime. - En fait c'est comme a que j'ai tendance travailler - et les scnarios de test de SimpleTest - lui-mme sont diviss de cette manire. -

-

- Peut-tre que a ne vous parat pas beaucoup - avec un test unitaire et deux tests aux frontires, - mais une application typique peut contenir - vingt classes de frontire et deux cent classes d'application. - Pour continuer leur excution toute vitesse, - vous voudrez les tenir spares. -

-

- De plus, un bon dveloppement passe par des dcisions - de tri entre les composants utiliser. - Peut-tre, qui sait, tous ces simulacres pourront - amliorer votre conception. -

-
-
- - - - Variations sur un log - - - Abstraire un niveau supplmentaire via une classe - fantaisie d'un scripteur - - - Sparer les tests des classes frontires - pour un petit nettoyage - - - - - Ce tutorial suit l'introduction aux - objets fantaisies. - - - Ensuite vient la - conception pilote par les tests. - - - Vous aurez besoin du - framework de test SimpleTest pour essayer ces exemples. - - - - - dveloppement logiciel, - programmation php, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - organisation de tests unitaires, - conseil de test, - astuce de dveloppement, - architecture logicielle pour des tests, - exemple de code php, - objets fantaisie, - port de junit, - exemples de scnarios de test, - test php, - outil de test unitaire, - suite de test php - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/browser_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/browser_documentation.xml deleted file mode 100644 index db373eb8..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/browser_documentation.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - - Documentation SimpleTest : le composant de navigation web scriptable - - -

- Le composant de navigation web de SimpleTest peut tre utilis - non seulement l'extrieur de la classe WebTestCase, - mais aussi indpendamment du framework SimpleTest lui-mme. -

-
-
-

- Vous pouvez utiliser le navigateur web dans des scripts PHP - pour confirmer que des services marchent bien comme il faut - ou pour extraire des informations partir de ceux-ci de faon rgulire. - Par exemple, voici un petit script pour extraire - le nombre de bogues ouverts dans PHP 5 partir - du site web PHP... -get('http://php.net/'); - $browser->clickLink('reporting bugs'); - $browser->clickLink('statistics'); - $browser->clickLink('PHP 5 bugs only'); - $page = $browser->getContent(); - preg_match('/status=Open.*?by=Any.*?(\d+)<\/a>/', $page, $matches); - print $matches[1]; -?> -]]> - Bien sr Il y a des mthodes plus simple pour raliser - cet exemple en PHP. Par exemple, vous pourriez juste - utiliser la commande PHP file() sur ce qui est - ici une page fixe. Cependant, en utilisant des scripts - avec le navigateur web vous vous autorisez l'authentification, - la gestion des cookies, le chargement automatique des fentres, - les redirections, la transmission de formulaires et la capacit - d'examiner les enttes. De telles mthodes sont fragiles dans - un site en constante volution et vous voudrez employer une mthode - plus directe pour accder aux donnes de faon permanente, - mais pour des tches simples cette technique peut s'avrer - une solution trs rapide. -

-

- Toutes les mthode de navigation utilises dans WebTestCase sont prsente dans la classe SimpleBrowser, mais les assertions sont remplaces par de simples accesseurs. Voici une liste complte des mthodes de navigation de page page... - - - - - - - - - - - - - - - - - - - - - - - -
addHeader($header)Ajouter une entte chaque tlchargement
useProxy($proxy, $username, $password)Utilise ce proxy partir de maintenant
head($url, $parameters)Effectue une requte HEAD
get($url, $parameters)Tlcharge une page avec un GET
post($url, $parameters)Tlcharge une page avec un POST
clickLink($label)Suit un lien par son tiquette
isLink($label)Vrifie l'existance d'un lien par son tiquette
clickLinkById($id)Suit un lien par son attribut d'identification
isLinkById($id)Vrifie l'existance d'un lien par son attribut d'identification
getUrl()La page ou la fentre URL en cours
getTitle()Le titre de la page
getContent()Le page ou la fentre brute
getContentAsText()Sans code HTML l'exception du text "alt"
retry()Rpte la dernire requte
back()Utilise le bouton "prcdent" du navigateur
forward()Utilise le bouton "suivant" du navigateur
authenticate($username, $password)Retente la page ou la fentre aprs une rponse 401
restart($date)Relance le navigateur pour une nouvelle session
ageCookies($interval)Change la date des cookies
setCookie($name, $value)Lance un nouveau cookie
getCookieValue($host, $path, $name)Lit le cookie le plus spcifique
getCurrentCookieValue($name)Lit le contenue du cookie en cours
- Les mthode SimpleBrowser::useProxy() et - SimpleBrowser::addHeader() sont spciales. - Une fois appeles, elles continuent s'appliquer sur les tlchargements suivants. -

-

- Naviguer dans les formulaires est similaire la navigation des formulaires via WebTestCase... - - - - - - - - - - - - -
setField($name, $value)Modifie tous les champs avec ce nom
setFieldById($id, $value)Modifie tous les champs avec cet identifiant
getField($name)Accesseur de la valeur d'un lment de formulaire
getFieldById($id)Accesseur de la valeur de l'lment de formulaire avec cet identifiant
clickSubmit($label)Transmet le formulaire avec l'tiquette de son bouton
clickSubmitByName($name)Transmet le formulaire avec l'attribut de son bouton
clickSubmitById($id)Transmet le formulaire avec l'identifiant de son bouton
clickImage($label, $x, $y)Clique sur une balise input de type image par son titre (title="*") our son texte alternatif (alt="*")
clickImageByName($name, $x, $y)Clique sur une balise input de type image par son attribut (name="*")
clickImageById($id, $x, $y)Clique sur une balise input de type image par son identifiant (id="*")
submitFormById($id)Transmet le formulaire par son identifiant propre
- Au jourd d'aujourd'hui il n'existe aucune mthode pour lister - les formulaires et les champs disponibles : ce sera probablement - ajout dans des versions successives de SimpleTest. -

-

- A l'intrieur d'une page, les fentres individuelles peuvent tre - slectionnes. Si aucune slection n'est ralise alors - toutes les fentres sont fusionnes ensemble dans - une unique et grande page. - Le contenu de la page en cours sera une concatnation des - toutes les fentres dans l'ordre spcifi par les balises "frameset". - - - - - - -
getFrames()Un dchargement de la structure de la fentre courante
getFrameFocus()L'index ou l'tiquette de la fentre en courante
setFrameFocusByIndex($choice)Slectionne la fentre numrote partir de 1
setFrameFocus($name)Slectionne une fentre par son tiquette
clearFrameFocus()Traite toutes les fentres comme une seule page
- Lorsqu'on est focalis sur une fentre unique, - le contenu viendra de celle-ci uniquement. - Cela comprend les liens cliquer et les formulaires transmettre. -

-
-
-

- Toute cette masse de fonctionnalits est gniale - lorsqu'on arrive bien tlcharger les pages, - mais ce n'est pas toujours vident. - Pour aider dcouvrir les erreurs, le navigateur a aussi - des mthodes pour aider au dbogage. - - - - - - - - - - - - - -
setConnectionTimeout($timeout)Ferme la socket avec un dlai trop long
getRequest()L'entte de la requte brute de la page ou de la fentre
getHeaders()L'entte de rponse de la page ou de la fentre
getTransportError()N'importe quel erreur au niveau de la socket dans le dernier tlchargement
getResponseCode()La rponse HTTP de la page ou de la fentre
getMimeType()Le type Mime de la page our de la fentre
getAuthentication()Le type d'authentification dans l'entte d'une provocation 401
getRealm()Le realm d'authentification dans l'entte d'une provocation 401
setMaximumRedirects($max)Nombre de redirections avant que la page ne soit charge automatiquement
setMaximumNestedFrames($max)Protection contre des framesets rcursifs
ignoreFrames()Neutralise le support des fentres
useFrames()Autorise le support des fentres
- Les mthodes SimpleBrowser::setConnectionTimeout(), - SimpleBrowser::setMaximumRedirects(), - SimpleBrowser::setMaximumNestedFrames(), - SimpleBrowser::ignoreFrames() - et SimpleBrowser::useFrames() continuent s'appliquer - sur toutes les requtes suivantes. - Les autres mthodes tiennent compte des fentres. - Cela veut dire que si une fentre individuelle ne se charge pas, - il suffit de se diriger vers elle avec - SimpleBrowser::setFrameFocus() : ensuite on utilisera - SimpleBrowser::getRequest(), etc. pour voir ce qui se passe. -

-
-
-

- Tout ce qui peut tre fait dans - WebTestCase peut maintenant - tre fait dans un UnitTestCase. - Ce qui revient dire que nous pouvons librement mlanger - des tests sur des objets de domaine avec l'interface web... - -class TestOfRegistration extends UnitTestCase { - function testNewUserAddedToAuthenticator() { - $browser = &new SimpleBrowser(); - $browser->get('http://my-site.com/register.php'); - $browser->setField('email', 'me@here'); - $browser->setField('password', 'Secret'); - $browser->clickSubmit('Register'); - - $authenticator = &new Authenticator(); - $member = &$authenticator->findByEmail('me@here'); - $this->assertEqual($member->getPassword(), 'Secret'); - } -} -]]> - Bien que a puisse tre utile par convenance temporaire, - je ne suis pas fan de ce genre de test. Ce test s'applique - plusieurs couches de l'application, a implique qu'il est - plus que probable qu'il faudra le remanier lorsque le code changera. -

-

- Un cas plus utile d'utilisation directe du navigateur est - le moment o le WebTestCase ne peut plus suivre. - Un exemple ? Quand deux navigateurs doivent tre utiliss en mme temps. -

-

- Par exemple, supposons que nous voulions interdire - des usages simultans d'un site avec le mme login d'identification. - Ce scnario de test le vrifie... -get('http://my-site.com/login.php'); - $first->setField('name', 'Me'); - $first->setField('password', 'Secret'); - $first->clickSubmit('Enter'); - $this->assertEqual($first->getTitle(), 'Welcome'); - - $second = &new SimpleBrowser(); - $second->get('http://my-site.com/login.php'); - $second->setField('name', 'Me'); - $second->setField('password', 'Secret'); - $second->clickSubmit('Enter'); - $this->assertEqual($second->getTitle(), 'Access Denied'); - } -} -]]> - Vous pouvez aussi utiliser la classe SimpleBrowser - quand vous souhaitez crire des scnarios de test en utilisant - un autre outil que SimpleTest. -

-
-
- - - Utiliser le navigateur web dans des scripts - - - Dboguer les erreurs sur les pages - - - Tests complexes avec des navigateurs web multiples - - - - - La page du projet SimpleTest sur - SourceForge. - - - La page de tlchargement de SimpleTest sur - LastCraft. - - - L'API de dveloppeur pour SimpleTest - donne tous les dtails sur les classes et les assertions disponibles. - - - - - dveloppement logiciel, - programmation php pour des clients, - php centr autour du client, - outils de dveloppement logiciel, - framework de test de recette, - scripts php gratuits, - test unitaire de systmes d'authentification, - ressources php, - HTMLUnit, - JWebUnit, - test php, - ressource de test unitaire, - test web, - authentification HTTP, - tester la connection, - tester l'authentification, - tests de scurit - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/display_subclass_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/display_subclass_tutorial.xml deleted file mode 100644 index 71576373..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/display_subclass_tutorial.xml +++ /dev/null @@ -1,282 +0,0 @@ - - - - - Tutorial de test unitaire en PHP - Sous-classer l'affichage du test - - -

- Le composant affichage de SimpleTest est en fait - la dernire partie dvelopper. - Des morceaux de la section suivante changeront prochainement - et -- avec optimisme -- des composants d'affichage - plus sophistiqus seront crits, mais pour l'instant - si un affichage minime n'est pas suffisant, - voici comment raliser le votre. -

-
-
-

- Bon d'accord, voici comment. -

-

- Nous devons crer une sous-classe de l'affichage utilise, - dans notre cas il s'agit de HtmlReporter. - La classe HtmlReporter est situ dans le fichier - simpletest/reporter.php : - pour l'instant elle a l'interface suivante... - - Voici ce que les mthodes pertinentes veulent dire. - Vous pouvez consulter la - liste complte ici - si cela vous intresse. -

    -
  • - HtmlReporter()
    - est le constructeur. Notez qu'un test unitaire initie - le lien vers l'affichage plutt que l'inverse. - L'affichage est un rceptacle passif des vnements de test. - Cela permet une adaptation facile de l'affichage - pour d'autres systmes de test en dehors - des tests unitaires comme la surveillance - de serveurs par exemple. - Autre avantage, un test unitaire peut crire - vers plus d'un affichage la fois. -
  • -
  • - void paintFail(string $message)
    - peint un chec. Voir ci-dessous. -
  • -
  • - void paintPass(string \$message)
    - ne fait rien par dfaut. C'est cette mthode - que nous allons modifier. -
  • -
  • - string getCss()
    - renvoie le style CSS - via une chane - pour - la mthode d'entte de la page. - Des styles complmentaires peuvent tre ajouts ici. -
  • -
  • - array getTestList()
    - est une mthode commode pour des sous-classes. - Elle liste l'embotement courant des tests - via une liste de noms de test. - Le premier, le test embot le plus profondment, - est le premier dans la liste et la mthode - du test courant sera la dernire. -
  • -
-

-

- Pour afficher les succs nous avons juste - besoin que la mthode paintPass() - se comporte comme paintFail(). - Bien sr nous n'allons pas modifier l'original. - Nous allons juste crer une sous-classe. -

-
-
-

- Premirement nous allons crer un fichier - tests/show_passes.php dans notre projet de log - et y placer cette classe vide... -HtmlReporter(); - } - } -?> -]]> - Une rapide mais attentive lecture du - code de SimpleTest - indique que l'implmentation de paintFail() ressemble ... -Fail: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode("->", $breadcrumb); - print "->$message
\n"; -} -]]>
- Essentiellement elle s'enchane la version du parent, - que nous devons aussi raliser pour garantir le mnage, - et ensuite imprime une trace calcule partir de la liste - des tests courants. Par contre elle perd au passage - le nom du test du premier niveau. - Etant donn qu'il est identique pour chaque test, - ce serait un peu trop d'informations. - En la transposant dans notre nouvelle classe... -HtmlReporter(); - } - - function paintPass($message) { - parent::paintPass($message); - print "Pass: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode("->", $breadcrumb); - print "->$message
\n"; - }
-} -]]>
- Pour l'instant tout roule. - Maintenant pour utiliser notre nouvelle classe, - nous allons modifier notre fichier tests/all_tests.php... - - require_once('show_passes.php'); - - $test = &new GroupTest('All tests'); - $test->addTestFile('log_test.php'); - $test->addTestFile('clock_test.php'); - $test->run(new ShowPasses()); -?> -]]> - Nous pouvons le lancer pour voir le rsultat de notre bricolage... -

-

All tests

- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 1/] in [Test line 1]
- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 2/] in [Test line 2]
- Pass: log_test.php->Log class test->testcreatingnewfile->Created before message
- Pass: log_test.php->Log class test->testcreatingnewfile->File created
- Pass: clock_test.php->Clock class test->testclockadvance->Advancement
- Pass: clock_test.php->Clock class test->testclocktellstime->Now is the right time
-
3/3 test cases complete. - 6 passes and 0 fails.
-
- Joli, mais pas encore digne d'une mdaille d'or. - Nous avons perdu un peu d'information au passage. - L'affichage du span.pass n'est pas styl en CSS, - mais nous pouvons l'ajouter en modifiant une autre mthode... -HtmlReporter(); - } - - function paintPass($message) { - parent::paintPass($message); - print "Pass: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode("->", $breadcrumb); - print "->$message
\n"; - } - - protected function getCss() { - return parent::getCss() . ' .pass { color: green; }'; - } -} -]]>
- Si vous ajoutez le code au fur et mesure, - vous verrez l'ajout du style dans le code source - du rsultat via le navigateur. A l'oeil, - l'affichage devrait ressembler ... -
-

All tests

- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 1/] in [Test line 1]
- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 2/] in [Test line 2]
- Pass: log_test.php->Log class test->testcreatingnewfile->Created before message
- Pass: log_test.php->Log class test->testcreatingnewfile->File created
- Pass: clock_test.php->Clock class test->testclockadvance->Advancement
- Pass: clock_test.php->Clock class test->testclocktellstime->Now is the right time
-
3/3 test cases complete. - 6 passes and 0 fails.
-
- Certains prfrent voir les succs quand ils travaillent sur le code; - le sentiment de travail achev est sympathique aprs tout. - Une fois que vous commencez naviguer - de haut en bas pour trouver les erreurs, assez vite - vous en comprendrez le ct obscur. -

-

- Essayez les deux mthodes pour dterminer votre prfrence. - Nous allons le laisser tel que pour l'tape qui approche : - les objets fantaisie. - Il s'agit du premier outil de test qui ajoute des tests additionnels : - il sera utile de voir ce qui se passe dans les coulisses. -

-
-
- - - Comment changer l'affichage pour afficher - les passages avec succs. - - - Sous classer - la classe HtmlReporter. - - - - - La section prcdente : - sous-classer les scnarios de test - - - Cette section est trs spcifique - SimpleTest. - Si vous utilisez un autre outil, - n'hsitez pas sauter pardessus. - - - - - dveloppement logiciel pilot par les tests, - conseil pour programmer en php, - programmation php, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - architecture, - exemple de scnario de test, - framework de tests unitaires, - ressources php, - exemple de code php, - junit, - phpunit, - simpletest, - test php, - outil de test unitaire, - suite de test php - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/download_website.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/download_website.xml deleted file mode 100644 index b64af48f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/download_website.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Télécharger SimpleTest - -
-

- La version courante est : - - SimpleTest v1.0.1. -

-

- Vous pouvez télécharger cette version depuis - - SourceForget.net - et votre miroir le plus proche. Vous pouvez aussi jeter un oeil du côté - du changelog actuel. -

-

- Au fait, ne soyez pas effrayé par le mot beta : - pas mal d'utilisateurs vont même jusqu'à utiliser la version SVN. -

-
-
-

- Si Eclipse est votre IDE / éditeur de prédilection, vous aurez - peut-être envie d'utiliser le - - plugin Eclipse. -

-

- Pour utilser les procédures automatiques, l'URL est : -

http://simpletest.org/eclipse/
-

-
-
-

- SimpleTest a été packagé par la communauté avec d'autres parfums encore. -

- -

- Attention : certains paquets ne sont pas toujours très à jour. -

-
-
-

- Le code source est hébergé par SourceForge : vous pouvez l'étudier / le butiner - via le - dépôt SVN. -

-
-
- -
-
- - - Version courante - - - Paquet Eclipse - - - Autres paquets - - - Source - - - Autres versions stables - - - - - - - - - SimpleTest, - download, - source code, - stable release, - eclipse release, - eclipse plugin, - debian package, - drupal module, - pear channel, - pearified package - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/expectation_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/expectation_documentation.xml deleted file mode 100644 index c9acdc6f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/expectation_documentation.xml +++ /dev/null @@ -1,308 +0,0 @@ - - - - - Documentation SimpleTest : tendre le testeur unitaire avec des classes d'attentes supplmentaires - -
-

- Le comportement par dfaut des - objets fantaisie dans - SimpleTest - est soit une correspondance identique sur l'argument, - soit l'acceptation de n'importe quel argument. - Pour la plupart des tests, c'est suffisant. - Cependant il est parfois ncessaire de ramollir un scnario de test. -

-

- Un des endroits o un test peut tre trop serr - est la reconnaissance textuelle. Prenons l'exemple - d'un composant qui produirait un message d'erreur - utile lorsque quelque chose plante. Il serait utile de tester - que l'erreur correcte est renvoye, - mais le texte proprement dit risque d'tre plutt long. - Si vous testez le texte dans son ensemble alors - chaque modification de ce mme message - -- mme un point ou une virgule -- vous aurez - revenir sur la suite de test pour la modifier. -

-

- Voici un cas concret, nous avons un service d'actualits - qui a chou dans sa tentative de connexion sa source distante. -class NewsService { - ... - function publish(&$writer) { - if (! $this->isConnected()) { - $writer->write('Cannot connect to news service "' . - $this->_name . '" at this time. ' . - 'Please try again later.'); - } - ... - } -} -]]> - L il envoie son contenu vers un classe Writer. - Nous pourrions tester ce comportement avec un MockWriter... - - $writer = &new MockWriter($this); - $writer->expectOnce('write', array( - 'Cannot connect to news service ' . - '"BBC News" at this time. ' . - 'Please try again later.')); - - $service = &new NewsService('BBC News'); - $service->publish($writer); - - $writer->tally(); - } -} -]]> - C'est un bon exemple d'un test fragile. - Si nous dcidons d'ajouter des instructions complmentaires, - par exemple proposer une source d'actualits alternative, - nous casserons nos tests par la mme occasion sans pourtant - avoir modifi une seule fonctionnalit. -

-

- Pour contourner ce problme, nous voudrions utiliser - un test avec une expression rationnelle plutt - qu'une correspondance exacte. Nous pouvons y parvenir avec... - - $writer->expectOnce( - 'write', - array(new WantedPatternExpectation('/cannot connect/i'))); - - $service = &new NewsService('BBC News'); - $service->publish($writer); - - $writer->tally(); - } -} -]]> - Plutt que de transmettre le paramtre attendu au MockWriter, - nous envoyons une classe d'attente appele WantedPatternExpectation. - L'objet fantaisie est suffisamment lgant pour reconnatre - qu'il s'agit d'un truc spcial et pour le traiter diffremment. - Plutt que de comparer l'argument entrant cet objet, - il utilise l'objet attente lui-mme pour excuter le test. -

-

- WantedPatternExpectation utilise - l'expression rationnelle pour la comparaison avec son constructeur. - A chaque fois qu'une comparaison est fait travers - MockWriter par rapport cette classe attente, - elle fera un preg_match() avec ce motif. - Dans notre scnario de test ci-dessus, aussi longtemps - que la chane "cannot connect" apparat dans le texte, - la fantaisie transmettra un succs au testeur unitaire. - Peu importe le reste du texte. -

-

- Les classes attente possibles sont... - - - - - - - - - - -
EqualExpectationUne galit, plutt que la plus forte comparaison l'identique
NotEqualExpectationUne comparaison sur la non-galit
IndenticalExpectationLa vrification par dfaut de l'objet fantaisie qui doit correspondre exactement
NotIndenticalExpectationInverse la logique de l'objet fantaisie
WantedPatternExpectationUtilise une expression rationnelle Perl pour comparer une chane
NoUnwantedPatternExpectationPasse seulement si l'expression rationnelle Perl choue
IsAExpectationVrifie le type ou le nom de la classe uniquement
NotAExpectationL'oppos de IsAExpectation
MethodExistsExpectationVrifie si la mthode est disponible sur un objet
- La plupart utilisent la valeur attendue dans le constructeur. - Les exceptions sont les vrifications sur motif, - qui utilisent une expression rationnelle, ainsi que - IsAExpectation et NotAExpectation, - qui prennent un type ou un nom de classe comme chane. -

-
-
-

- Les classes attente peuvent servir autre chose - que l'envoi d'assertions depuis les objets fantaisie, - afin de choisir le comportement d'un - objet fantaisie - ou celui d'un bouchon serveur. - A chaque fois qu'une liste d'arguments est donne, - une liste d'objets d'attente peut tre insre la place. -

-

- Mettons que nous voulons qu'un bouchon serveur - d'autorisation simule une connexion russie seulement - si il reoit un objet de session valide. - Nous pouvons y arriver avec ce qui suit... - -$authorisation = new StubAuthorisation(); -$authorisation->setReturnValue( - 'isAllowed', - true, - array(new IsAExpectation('Session', 'Must be a session'))); -$authorisation->setReturnValue('isAllowed', false); -]]> - Le comportement par dfaut du bouchon serveur - est dfini pour renvoyer false - quand isAllowed est appel. - Lorsque nous appelons cette mthode avec un unique paramtre - qui est un objet Session, il renverra true. - Nous avons aussi ajout un deuxime paramtre comme message. - Il sera affich dans le message d'erreur de l'objet fantaisie - si l'attente est la cause de l'chec. -

-

- Ce niveau de sophistication est rarement utile : - il n'est inclut que pour tre complet. -

-
-
-

- Les classes d'attentes ont une structure trs simple. - Tellement simple qu'il devient trs simple de crer - vos propres version de logique pour des tests utiliss couramment. -

-

- Par exemple voici la cration d'une classe pour tester - la validit d'adresses IP. Pour fonctionner correctement - avec les bouchons serveurs et les objets fantaisie, - cette nouvelle classe d'attente devrait tendre - SimpleExpectation... -class ValidIp extends SimpleExpectation { - - function test($ip) { - return (ip2long($ip) != -1); - } - - function testMessage($ip) { - return "Address [$ip] should be a valid IP address"; - } -} -]]> - Il n'y a vritablement que deux mthodes mettre en place. - La mthode test() devrait renvoyer un true - si l'attente doit passer, et une erreur false - dans le cas contraire. La mthode testMessage() - ne devrait renvoyer que du texte utile la comprhension du test en lui-mme. -

-

- Cette classe peut dsormais tre employe la place - des classes d'attente prcdentes. -

-
-
-

- Le framework - de test unitaire SimpleTest utilise aussi dans son coeur - des classes d'attente pour - la classe UnitTestCase. - Nous pouvons aussi tirer parti de ces mcanismes pour rutiliser - nos propres classes attente l'intrieur mme des suites de test. -

-

- La mthode la plus directe est d'utiliser la mthode - SimpleTest::assertExpectation() pour effectuer le test... -class TestOfNetworking extends UnitTestCase { - ... - function testGetValidIp() { - $server = &new Server(); - $this->assertExpectation( - new ValidIp(), - $server->getIp(), - 'Server IP address->%s'); - } -} -]]> - C'est plutt sale par rapport notre syntaxe habituelle - du type assert...(). -

-

- Pour un cas aussi simple, nous crons d'ordinaire une mthode - d'assertion distincte en utilisant la classe d'attente. - Supposons un instant que notre attente soit un peu plus - complique et que par consquent nous souhaitions la rutiliser, - nous obtenons... - - function assertValidIp($ip, $message = '%s') { - $this->assertExpectation(new ValidIp(), $ip, $message); - } - - function testGetValidIp() { - $server = &new Server(); - $this->assertValidIp( - $server->getIp(), - 'Server IP address->%s'); - } -} -]]> - Il est peu probable que nous ayons besoin - de ce niveau de contrle sur la machinerie de test. - Il est assez rare que le besoin d'une attente dpasse - le stade de la reconnaissance d'un motif. - De plus, les classes d'attente complexes peuvent rendre - les tests difficiles lire et dboguer. - Ces mcanismes sont vritablement l pour les auteurs - de systme qui tendront le framework de test - pour leurs propres outils de test. -

-
-
- - - Utiliser les attentes pour des tests - plus prcis avec des objets fantaisie - - - Changer le comportement d'un objet fantaisie - avec des attentes - - - Crer des attentes - - - Par dessous SimpleTest utilise des classes d'attente - - - - - La page du projet SimpleTest sur - SourceForge. - - - La page de tlchargement de SimpleTest sur - LastCraft. - - - Les attentes imitent les contraintes dans - JMock. - - - L'API complte pour SimpleTest - ralis avec PHPDoc. - - - - - objets fantaisie, - dveloppement pilot par les tests, - hritage des attentes, - contraintes d'objet fantaisie, - test unitaire avanc en PHP, - test en premier, - architecture de framework de test - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/extension_eclipse.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/extension_eclipse.xml deleted file mode 100644 index ab9a5d05..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/extension_eclipse.xml +++ /dev/null @@ -1,292 +0,0 @@ - - - - - Documentation du plugin Eclipse pour Simpletest - -
-
    -
  • - Système d'exploitation - OS
    - Ce plugin devrait fonctionner sur toutes les plateformes qui font tourner Eclipse. - Il a été testé spécifiquement sur Linux, OS X et Windows. - Si le plugin ne marche pas sur l'une des ces plateformes, c'est qu'une nouvelle - incompatiblité est apparue : chose rare à priori. -
  • -
  • - Eclipse
    - Le plugin a été pensé et développé pour fonctionner avec les versions 3.1.X+ and 3.2.X+ d'Eclipse. - Eclipse en général nécessite une version 1.4.x ou supérieur de la JVM : - il n'y a pas d'autres pré-requis pour le plugin. -
  • -
  • - PHP
    - Le plugin a été testé pour fonctionner avec PHP 4.3.x+ (y compris PHP 5.1.x.). -
  • -
  • - Xdebug
    - Le plugin peut-être configuré pour fonctionnver avec Xdebug (version 2.0.0RC1 ou suivante). - Le fichier php.ini utilisé par le plugin (voir ci-dessous pour définir ce fichier) doit charger l'extension Xdebug. - Généralement on y arrive en ajoutant zend_extension_ts="Some Windows Path" ou zend_extension="Some Linux Path" - au fichier php.ini. - Des instructions spécifiques peuvent être trouvées à l'adresse : - http://xdebug.org/install.php - Pas la peine de se tracasser à propos des autres paramètres, le plugin se chargera d'initialiser - les paramètres nécessaires au besoin. -
  • -
  • - Simpletest
    - Le plugin est prévu pour tourner avec une version spécifique de SimpleTest. - Et même plus : il inclut la version associée de SimpleTest compatible. - Un plugin avec comme numéro de version 1.0.0_0.0.4 indiquerait que les plugin est compatible - avec la version 1.0.0 de SimpleTest and qu'il s'agit de la version 0.0.4 du plugin. - De légères modifications sont nécessaires sur le code de SimpleTest même pour - que le plugin fonctionne bien; ces modifications peuvent (ou pas) être comprise dans - la version de SimpleTest sans plugin. -
  • -
  • - PHPUnit2
    - A partir du plugin version 0.1.6 un support expérimental de la version CVS de PHPUnit2 - est disponible. Pour utiliser PHPUnit2, Choisisser un chemin vers PHPUnit2 et sélectionnez - les tests PHPUnit2 en lieu et place de SimpleTest. - Note: il s'agit du chemin vers le dossier qui contient le dosser PHPUnit2. PHPUnit 3 - n'est pas supporté mais devrait l'être plus tard. -
  • -
-
-
-
    -
  1. Télécharger et installer Eclipse (www.eclipse.org) – si vous n'êtes pas sûr quoi télécharger, prenez le SDK 3.1.0 d'Eclipse.
  2. -
  3. Télécharger le dernier fichier ZIP du plugin Eclipse pour SimpleTest (Simpletest Sourceforge)
  4. -
  5. Extgraire le contenu du fichier ZIP vers un répertoire temporaire {cette documentation y fera référence par $unzip}
  6. -
  7. Lancer Eclipse
  8. -
  9. Ouvrir "Install Wizard" en cliquant sur "Help > Software Updates > Find and Install" depuis la barre du menu.
  10. -
  11. Choisisser le deuxième bouton, "Search for new features to install" et cliquer sur "Next".
  12. -
  13. Cliquer sur le bouton du côté droit, "New Local Site".
  14. -
  15. Sélectionner le répertoire $unzip {le répertoire qui a servi pour l'extraction}.
  16. -
  17. Cliquer sur le bouton "OK".
  18. -
  19. Dans la fenêtre "Edit Local Site", cliquer sulick the "OK" button
  20. -
  21. Cliquer sur le bouton "Finish"
  22. -
  23. Dans la fenêtre "Search Results", chercher puis sélectionner "Simpletest plug-in 0.0.x"
  24. -
  25. Cliquer sur le bouton "Next"
  26. -
  27. Lire la licence et l'accepter en cliquant le bouton radio "I accept the terms in the license agreement" puis cliquer sur le bouton "Next"
  28. -
  29. Dans la fenêtre "Installation", vous pouvez changer le lieu d'installation -- la plupart des utilisateurs appuyeront juste sur le bouton "Finish"
  30. -
  31. Dans la fenêtre "Feature Verification", cliquer sur le bouton "Install"
  32. -
  33. Relancer Eclipse comme demandé
  34. -
  35. -

    Après avoir lancé Eclipse pour la première fois après l'installation, - vous aurez besoin de configurer le plugin SimpleTest. Pour y arriver : -

    -
      -
    1. - Sélectionner "Window > Preferences" dans la barre de menu -
    2. -
    3. - Sélectionner "Simpletest" dans les catégories sur la gauche de la boîte de dialogue. -
    4. -
    5. - Remplir ou choisir le répertoire contenant l'éxécutable PHP à utliser. -
    6. -
    7. - Laisser vierge le champ avec le fichier à inclure. -
    8. -
    9. - Remplir .php comme "Test File Suffix". - Bien sûr si vous utilisez ue autre extension pour vos fichiers de tests en PHP - (par exemple mon-test.tst.php) n'hésitez pas à remplir le champ avec ce qui va bien (dans notre exemple .tst.php). - Le plugin s'en sert pour trouver des tests à éxécuter. -
    10. -
    11. - Appuer sur le bouton "Ok" pour fermer la fenêtre des préférences. -
    12. -
    -
  36. -
-
-
- Note: cette procédure ne fonctionnera que si vous avez installé le plugin via - le "installation wizard". Si vous n'aviez fait que copier des répertoires pour l'installation, - il est recommandé de fermer Eclipse, de supprimer les anciennes version et de suivre les instructions - d'installation ci-dessus (vous ne devriez pas avoir à refaire la configuration initiale). -
    -
  1. Sélectionner "Help > Software Updates > Manage Configuration" dans le menu
  2. -
  3. Trouver le plugin Simpletest dans la liste et le choisir
  4. -
  5. Dans la section de droite, cliquer sur le lien "Scan for Updates"
  6. -
  7. Si aucune mise à jour n'est détectée, naviguer vers "Window > Preferences > Install/Update > Valid Updates" dans les préférences d'Eclipse - et sélectionner "compatible", en lieu et place de "equivalent". Puis recommencer les étapes ci-dessus.
  8. -
  9. Sélectionner les versions à mettre à jour et cliquer sur "Next".
  10. -
  11. Relire les licences pour ces mises à jour : si elles sont acceptables, cocher "I accept the terms in the license agreements." - Si les termes de la licence ne vous paraissent pas acceptables, il est encore temps d'arrêter le téléchargement.
  12. -
  13. Cliquer sur "Install" pour permettre le téléchargement est l'installation.
  14. -
  15. Une fois que toutes les fonctionnalités et plugins ont été téléchargés avec succès - et que leurs fihciers ont été installés sur l'ordinateur local, - une nouvelle configuration qui incorpore les nouvelles fonctionnalités et nouveaux plugins sera créée. - Cliquer sur "Yes" quand on vous demander de quitter et relancher le "Workbench" pour les changements prennent effet.
  16. -
-
-
- Note: ceci ne fonctionnera que si le plugin a été installé via la méthode "Feature Update". - Si l'installation a été effectué par une autre méthode alors le plugin peut être supprimé en effaçant - les répertoires qui avaient été ajoutés. -
    -
  1. Sélectionner "Help > Software Updates > Manage Configuration"
  2. -
  3. Choisir le plugin Simpletest dans la liste
  4. -
  5. Cliquer-droit sur le plugin Simpletest et sélectionner l'option "Disable"
  6. -
  7. Accepter le redémarrage d'Eclipse
  8. -
  9. Une fois Eclipse redémarré, sélectionner "Help > Software Updates > Manage Configuration" depuis le menu
  10. -
  11. Sélectionner l'option "Show Disabled Features" dans la barre d'outils
  12. -
  13. Choisir le plugin SimpleTest dans la liste
  14. -
  15. Cliquer-droit sur le plugin SimpleTest et sélectionner l'option "Uninstall"
  16. -
  17. Accepter le redémarrage d'Eclipse
  18. -
-
-
-

- La suite présente quelques exemples d'utilsation du plugin. -

-
    -
  1. Créer une nouveau projet de test (un lieu pour grouper des fichiers similaires) -
      -
    1. Sélectionner "File > New > Project.." dans le menu
    2. -
    3. Agrandir le répertoire "General" et choisir "Project"
    4. -
    5. Cliquer sur le bouton "Next"
    6. -
    7. Sur le tab suivant, ajouter un nom de projet : "Test"
    8. -
    9. Utiliser le contenu de projet par défaut
    10. -
    11. Cliquer sur le bouton "Finish"
    12. -
    -
  2. -
  3. Créer un test unique avec un seul succès -
      -
    1. Dans l'explorateur de paquet cliquer-droit sur le projet "Test" et sélectionner "New > File".
    2. -
    3. Comme nom de fichier remplir : test1.php et cliquer sur "Finish"
    4. -
    5. Double-cliquer sur l'entrée test1.php dans l'explorateur de paquet : cela devrait ouvrir une nouvelle vue pour modifier ce fichier.
    6. -
    7. Remplir le fichier avec ces lignes : -assertEqual(3,$total, "This should pass"); - } -} -?> -]]> -
    8. -
    9. Sélectionner "File > Save" depuis le menu.
    10. -
    11. Cliquer-droit sur test1.php et sélectionner "Run > Run Simpletest".
    12. -
    13. La "Result View" devrait se remplir avec les informations sur le résultat du test - et la console SimpleTest devrait se remplir avec d'autres informations aussi.
    14. -
    -
  4. -
  5. Une seule classe de test, plusieurs tests -
      -
    1. dans l'explorateur de paquet, cliquer droit sur le projet "Test" et sélectionner "New > File".
    2. -
    3. En tant que nom de fichier, utiliser : test2.php et cliquer sur "Finish".
    4. -
    5. Double-cliquer sur l'entrée test2.php dans l'explorateur de paquet : une nouvelle vue s'ouvre, prête pour l'édition.
    6. -
    7. Remplir le contenu avec : -assertEqual(3,$total, "This should pass"); - } - function test_fail(){ - $x = 1; - $y = 2; - $total = $x + $y; - $this->assertEqual(4,$total,"This should fail"); - } -} -?> -]]> -
    8. -
    9. Sélectionner "File > save" dans la barre de menu.
    10. -
    11. Cliquer-droit sur grouptest.php et sélectionner "Run > Run Simpletest".
    12. -
    13. La "Result View" devrait se remplir avec les informations issus du test lancé, - idem pour pour la console SimpleTest.
    14. -
    -
  6. -
  7. Tests groupés (plusieurs fichiers de test en même temps) -
      -
    1. dans l'explorateur de paquet, cliquer droit sur le projet "Test" et sélectionner "New > File".
    2. -
    3. En tant que nom de fichier, utiliser : test2.php et cliquer sur "Finish".
    4. -
    5. Double-cliquer sur l'entrée test2.php dans l'explorateur de paquet : une nouvelle vue s'ouvre, prête pour l'édition.
    6. -
    7. Remplir le contenu avec : -addTestFile(dirname(__FILE__).'/test1.php'); - $this->addTestFile(dirname(__FILE__).'/test2.php'); - } -} -?> -]]> -
    8. -
    9. Sélectionner "File > Save" depuis le menu.
    10. -
    11. Cliquer-droit sur test1.php et sélectionner "Run > Run Simpletest".
    12. -
    13. La "Result View" devrait se remplir avec les informations sur le résultat du test - et la console SimpleTest devrait se remplir avec d'autres informations aussi.
    14. -
    -
  8. -
-
-
-
    -
  • - Si un constructeur est utilisé dans le scénario de test, - bien faire attention à ce que la dernière ligne de ce constructeur appelle - le constructeur parent (par exemple parent::UnitTestCase) -
  • -
  • - Ne pas mettre d'assertions dans le constructeur de la classe de test -
  • -
  • - Si vous obtenez une erreur indiquant qu'une classe ne pouvait pas être chargé, alors il faut - relancer Eclipse. Une fois qu'Eclipse a redémarré, ouvrir la "Result View" manuellement - en sélectionnant "Window > Show View > Other..." - Puis sélectionner la catégorie SimpleTest, puis la "Result View" et enfin cliquer sur "OK". -
  • -
-
-
-

Ci-dessous des fonctionnalités qui devrait arriver à un moment ou un autre dans ce plugin

-
    -
  • - Permettre différents fichiers d'inclustion pour chaque lanceur - (écraser l'include "master") -
  • -
  • - Mieux gérer les erreurs fatales -
  • -
-
-
- - - - dévloppement logiciel, - plugin eclipse, - programmation en binôme, - programmation php, - outils de développement logiciel, - tutorial php, - scripts php gratuits, - architecture, - ressources php, - objets fantaisie, - junit, - php testing, - test unitaire, - test php automatisé, - explication test unitaire, - exemple test unitaire - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/first_test_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/first_test_tutorial.xml deleted file mode 100644 index fc949057..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/first_test_tutorial.xml +++ /dev/null @@ -1,462 +0,0 @@ - - - - - Tutorial sur les tests unitaires en PHP - Crer un exemple de scnario de test en PHP - - -

- Si vous dbutez avec les tests unitaires, - il est recommand d'essayer le code au fur et mesure. - Il n'y pas grand chose taper et vous sentirez - le rythme de la programmation pilote par les tests. -

-

- Pour excuter les exemples tels quels, - vous aurez besoin de crer un nouveau rpertoire - et d'y installer trois dossiers : - classes, tests et temp. - Dzippez le framework SimpleTest - dans le dossier tests - et assurez vous que votre serveur web puisse atteindre ces endroits. -

-
-
-

- L'exemple dans l'introduction rapide - comprenait les tests unitaires d'une simple classe de log. - Dans ce tutorial propos de Simple Test, je vais essayer - de raconter toute l'histoire du dveloppement de cette classe. - Cette classe PHP est courte et simple : - au cours de cette introduction, elle recevra beaucoup - plus d'attention que dans le cadre d'un dveloppement de production. - Nous verrons que derrire son apparente simplicit - se cachent des choix de conception tonnamment difficiles. -

-

- Peut-tre que ces choix sont trop difficiles ? - Plutt que d'essayer de penser tout en amont, - je vais commencer par poser une exigence : - nous voulons crire des messages dans un fichier. - Ces messages doivent tre ajouts en fin de fichier s'il existe. - Plus tard nous aurons besoin de priorits, - de filtres et d'autres choses encore, - mais nous plaons l'criture dans un fichier - au coeur de nos proccupations. - Nous ne penserons rien d'autres par peur de confusion. - OK, commenons par crire un test... -run(new HtmlReporter()); -?> -]]> - Pas pas, voici ce qu'il veut dire. -

-

- La constante SIMPLE_TEST contient - le chemin vers les classes de Simple Test partir de ce fichier. - Les classes pourraient tre places dans le path - du fichier php.ini mais si vous tes sur un serveur mutualis, - vous n'y aurez probablement pas accs. - Pour que tout le monde soit content, - le chemin est dclar explicitement dans le script de test. - Plus tard nous verrons comment tout finira au mme endroit. -

-

- Qu'est-ce donc que ce fichier autorun.php ? - Les bibliothques de SimpleTest sont une bote outil - pour crer votre propre suite de tests standardiss. - Elles peuvent tre utilises "telles que" sans problme, - mais sont constitues par des composants qui doivent tre assembls. - autorun.php est un composant spcial : - il fournit les parties "testeur unitaire" et "affichage". - Il attrape les classes de test et les lance automagiquement. -

-

- Il est probable que vous en viendrez crire votre propre affichage - et ajouter cette version par dfaut est optionnel. - SimpleTest inclut une classe d'affichage utilisable - et basique - - appele HtmlReporter. - Sur des tests, elle peut enregistrer dbuts, fins, erreurs, succs et chec. - Elle affiche ces informations au plus vite, au cas o le code - du test fait planter le script et masque la source d'chec. -

-

- Les tests eux-mmes sont rassembls dans une classe de scnario de test. - Cette dernire est typiquement une extension de - la classe UnitTestCase. - Quand le test est excut, elle cherche les mthodes - commenant par "test" et les lancent. - Notre seule mthode de test pour l'instant est appelle - testCreatingNewFile() mais elle est encore vide. -

-

- Une mthode vide ne fait rien. Nous avons besoin d'y placer du code. - La classe UnitTestCase gnre des vnements - de test son excution : - ces vnements sont envoys vers un observateur. -

-

- Et pour ajouter du code de test... - - - class TestOfLogging extends UnitTestCase { - function testCreatingNewFile() { - @unlink('../temp/test.log'); - $log = new Log('../temp/test.log'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log')); - } - } - - $test = &new TestOfLogging(); - $test->run(new HtmlReporter()); -?> -]]> -

-

- Vous pensez probablement que a reprsente beaucoup - de code pour un unique test et je suis d'accord avec vous. - Ne vous inquitez pas. Il s'agit d'un cot fixe et partir - de maintenant nous pouvons ajouter des tests : - une ligne ou presque chaque fois. - Parfois moins en utilisant des artefacts - de test que nous dcouvrirons plus tard. -

-

- Nous devons maintenant prendre nos premires dcisions. - Notre fichier de test s'appelle log_test.php - (n'importe quel nom ferait l'affaire) : - nous le plaons dans un dossier appel tests - (partout ailleurs serait aussi bien). - Notre fichier de code s'appelle log.php : - c'est son contenu que nous allons tester. - Je l'ai plac dans notre dossier classes : - cela veut-il dire que nous construisons une classe ? -

-

- Pour cet exemple, la rponse est oui, - mais le testeur unitaire n'est pas restreint aux tests de classe. - C'est juste que le code orient objet est plus facile - dpecer et remodeler. Ce n'est pas par hasard - si la conduite de tests fins via les tests unitaires - est apparue au sein de la communaut OO. -

-

- Le test en lui-mme est minimal. Tout d'abord il limine - tout autre fichier de test qui serait encore prsent. - Les dcisions de conception arrivent ensuite en rafale. - Notre classe s'appelle Log : - elle passe le chemin du fichier au constructeur. - Nous crons le log et nous lui envoyons aussitt - un message en utilisant la mthode message(). - L'originalit dans le nommage n'est pas - une caractristique dsirable chez un dveloppeur informatique : - c'est triste mais c'est comme a. -

-

- La plus petite unit d'un test mmm... heu... unitaire est l'assertion. - Ici nous voulons nous assurer que le fichier log - auquel nous venons d'envoyer un message a bel et bien t cr. - UnitTestCase::assertTrue() enverra - un vnement russite si la condition value est vraie - ou un chec dans le cas contraire. - Nous pouvons avoir un ensemble d'assertions diffrentes - et encore plus si nous tendons - nos scnarios de test classique. Voici la liste... - - - - - - - - - - - - - - - - -
assertTrue($x)Echoue si $x est faux
assertFalse($x)Echoue si $x est vrai
assertNull($x)Echoue si $x est initialis
assertNotNull($x)Echoue si $x n'est pas initialis
assertIsA($x, $t)Echoue si $x n'est pas de la classe ou du type $t
assertEqual($x, $y)Echoue si $x == $y est faux
assertNotEqual($x, $y)Echoue si $x == $y est vrai
assertIdentical($x, $y)Echoue si $x === $y est faux
assertNotIdentical($x, $y)Echoue si $x === $y est vrai
assertReference($x, $y)Echoue sauf si $x et $y sont la mme variable
assertCopy($x, $y)Echoue si $x et $y sont la mme variable
assertWantedPattern($p, $x)Echoue sauf si l'expression rationnelle $p capture $x
assertNoUnwantedPattern($p, $x)Echoue si l'expression rationnelle $p capture $x
assertNoErrors()Echoue si une erreur PHP arrive
assertError($x)Echoue si aucune erreur ou message incorrect de PHP n'arrive
-

-

- Nous sommes dsormais prt lancer notre script de test - en le passant dans le navigateur. - Qu'est-ce qui devrait arriver ? - Il devrait planter... -

- Fatal error: Failed opening required '../classes/log.php' (include_path='') in /home/marcus/projects/lastcraft/tutorial_tests/Log/tests/log_test.php on line 7 -
- La raison ? Nous n'avons pas encore cr log.php. -

-

- Mais attendez une minute, c'est idiot ! - Ne me dites pas qu'il faut crer - un test sans crire le code tester auparavant... -

-
-
-

- Co-inventeur de - l'Extreme Programming, - Kent Beck a lanc un autre manifeste. - Le livre est appel - Test Driven Development - (Dveloppement Pilot par les Tests) - ou TDD et lve les tests unitaires une position leve de la conception. - En quelques mots, vous crivez d'abord un petit test - et seulement ensuite le code qui passe ce test. - N'importe quel bout de code. Juste pour qu'il passe. -

-

- Vous crivez un autre test et puis de nouveau du code qui passe. - Vous aurez alors un peu de duplication et gnralement - du code pas trs propre. Vous remaniez (factorisez) - ce code-l en vous assurant que les tests continuent passer : - vous ne pouvez rien casser. - Une fois que le code est le plus propre possible - vous tes prt ajouter des nouvelles fonctionnalits. - Il suffit juste de rajouter des nouveaux tests et de recommencer - le cycle une nouvelle fois. - -

-

- Il s'agit d'une approche assez radicale et - j'ai parfois l'impression qu'elle est incomplte. - Mais il s'agit d'un moyen efficace pour expliquer - un testeur unitaire ! - Il se trouve que nous avons un test qui choue, - pour ne pas dire qu'il plante : - l'heure est venue d'crire du code dans log.php... - -]]> - Il s'agit l du minimum que nous puissions - faire pour viter une erreur fatale de PHP. - Et maintenant la rponse devient... -

-

testoflogging

- Fail: testcreatingnewfile->True assertion failed.
-
1/1 test cases complete. - 0 passes and 1 fails.
-
- "testoflogging" a chou. - Parmi les dfauts de PHP on trouve cette fcheuse tendance - transformer intrieurement les noms de classes - et de mthodes en minuscules. - SimpleTest utilise ces noms par dfaut pour dcrire - les tests mais nous pouvons les remplacer par nos propres noms. -function TestOfLogging() { - $this->UnitTestCase('Log class test'); - } - function testCreatingNewFile() { - @unlink('../temp/test.log'); - $log = new Log('../temp/test.log'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log'), 'File created'); - } -} -]]> - Ce qui donne... -
-

Log class test

- Fail: testcreatingnewfile->File created.
-
1/1 test cases complete. - 0 passes and 1 fails.
-
- Par contre pour le nom des mthodes il n'y a rien faire, dsol. -

-

- Les messages d'un test comme ceux-ci ressemblent - bien des gards des commentaires de code. - Certains ne jurent que par eux, d'autres au contraire - les bannissent purement et simplement en les considrant - aussi encombrants qu'inutiles. - Pour ma part, je me situe quelque part au milieu. -

-

- Pour que le test passe, nous pourrions nous contenter - de crer le fichier dans le constructeur de Log. - Cette technique "en faisant semblant" est trs utile - pour vrifier que le test fonctionne pendant les passages difficiles. - Elle le devient encore plus si vous sortez d'un passage - avec des tests ayant chous et que vous voulez juste vrifier - de ne pas avoir oubli un truc bte. - Nous n'allons pas aussi lentement donc... - - var $_file_path; - - function Log($file_path) { - $this->_file_path = $file_path; - } - - function message($message) { - $file = fopen($this->_file_path, 'a'); - fwrite($file, $message . "\n"); - fclose($file); - } - } -?> -]]> - Au total, pas moins de 4 checs ont t ncessaire - pour passer l'tape suivante. Je n'avais pas cr - le rpertoire temporaire, je ne lui avais pas donn - les droits d'criture, j'avais une coquille et - je n'avais pas non plus ajout ce nouveau rpertoire dans CVS. - N'importe laquelle de ces erreurs aurait pu m'occuper - pendant plusieurs heures si elle tait apparue plus tard - mais c'est bien pour ces cas l qu'on teste. - Avec les corrections adquates, a donne... -

-

Log class test

-
1/1 test cases complete. - 1 passes and 0 fails.
-
- a marche! -

-

- Peut-tre n'aimez-vous pas le style plutt minimal de l'affichage. - Les succs ne sont pas montrs par dfaut puisque - gnralement vous n'avez pas besoin de plus d'information - quand vous comprenez effectivement ce qui se passe. - Dans le cas contraire, pensez crire d'autres tests. -

-

- D'accord, c'est assez strict. Si vous voulez aussi voir - les succs alors vous pouvez - crer une sous-classe - de HtmlReporter et l'utiliser pour les tests. - Mme moi j'aime bien ce confort parfois. -

-
-
-

- Il y a une nuance ici. Nous ne voulons pas crer de fichier - avant d'avoir effectivement envoy de message. - Plutt que d'y rflchir trop longtemps, - nous allons juste ajouter un test pour a. -UnitTestCase('Log class test'); - } - function testCreatingNewFile() { - @unlink('../temp/test.log'); - $log = new Log('../temp/test.log'); - $this->assertFalse(file_exists('../temp/test.log'), 'No file created before first message'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log'), 'File created'); - } -} -]]> - ...et dcouvrir que a marche dj... -

-

Log class test

-
1/1 test cases complete. - 2 passes and 0 fails.
-
- En fait je savais que a allait tre le cas. - J'ajoute ce test de confirmation tout d'abord pour - garder l'esprit tranquille, mais aussi pour documenter ce comportement. - Ce petit test supplmentaire dans son contexte - en dit plus long qu'un scnario utilisateur - d'une douzaine de lignes ou qu'un diagramme UML complet. - Que la suite de tests devienne une source de documentation - est un effet secondaire assez agrable. -

-

- Devrions-nous supprimer le fichier temporaire la fin du test ? - Par habitude, je le fais une fois que j'en ai termin - avec la mthode de test et qu'elle marche. - Je n'ai pas envie de valider du code qui laisse - des restes de fichiers de test traner aprs un test. - Mais je ne le fais pas non plus pendant que j'cris le code. - Peut-tre devrais-je, mais parfois j'ai besoin de voir ce qui se passe : - on retrouve cet aspect confort voqu plus haut. -

-

- Dans un vritable projet, - nous avons habituellement plus qu'un unique scnario de test : - c'est pourquoi nous allons regarder comment - grouper des tests dans des suites de tests. -

-
-
- - - Crer un nouveau scnario de test. - - - Le Dveloppement Pilot par les Tests en PHP. - - - Les tests comme documentation - est un des nombreux effets secondaires. - - - - - La FAQ de JUnit contient plein de conseils judicieux sur les tests. - - - Ensuite vient "comment grouper des scnarios de tests ensemble". - - - Vous aurez besoin du framework de test SimpleTest pour ces exemples. - - - - - dveloppement logiciel, - programmation php, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - architecture, - ressouces php, - objets fantaisie, - junit, - test php, - test unitaire, - test php automatis, - tutorial de scnarios de test, - explication d'un scnario de test unitaire, - exemple de test unitaire - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/form_testing_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/form_testing_documentation.xml deleted file mode 100644 index 89e4933f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/form_testing_documentation.xml +++ /dev/null @@ -1,308 +0,0 @@ - - - - - Documentation SimpleTest : tester des formulaires HTML - -
-

- Lorsqu'une page est tlcharge par WebTestCase - en utilisant get() ou post() - le contenu de la page est automatiquement analys. - De cette analyse dcoule le fait que toutes les commandes - l'intrieur de la balise <form> sont disponibles - depuis l'intrieur du scnario de test. - Prenons par exemple cet extrait de code HTML... -


-    
-    
-
-]]>
- Il ressemble ... -

-

-

- - -
-

-

- Nous pouvons naviguer vers ce code, via le site - LastCraft, - avec le test suivant... - - function testDefaultValue() { - $this->get('http://www.lastcraft.com/form_testing_documentation.php'); - $this->assertField('a', 'A default'); - } -} -]]> - Directement aprs le chargement de la page toutes les commandes HTML - sont inities avec leur valeur par dfaut, comme elles apparatraient - dans un navigateur web. L'assertion teste qu'un objet HTML - avec le nom "a" existe dans la page - et qu'il contient la valeur "A default". -

-

- Nous pourrions retourner le formulaire tout de suite, - mais d'abord nous allons changer la valeur du champ texte. - Ce n'est qu'aprs que nous le transmettrons... -get('http://www.my-site.com/'); - $this->assertField('a', 'A default'); - $this->setField('a', 'New value'); - $this->clickSubmit('Go'); - } -} -]]> - Parce que nous n'avons spcifi ni attribut "method" - sur la balise form, ni attribut "action", - le scnario de test suivra le comportement classique d'un navigateur : - transmission des donnes avec une requte GET - vers la mme page. SimpleTest essaie d'muler - le comportement typique d'un navigateur autant que possible, - plutt que d'essayer d'attraper des attributs manquants sur les balises. - La raison est simple : la cible d'un framework de test est - la logique d'une application PHP, pas les erreurs - -- de syntaxe ou autres -- du code HTML. - Pour les erreurs HTML, d'autres outils tel - HTMLTidy - devraient tre employs. -

-

- Si un champ manque dans n'importe quel formulaire ou si - une option est indisponible alors WebTestCase::setField() - renverra false. Par exemple, supposons que - nous souhaitons vrifier qu'une option "Superuser" - n'est pas prsente dans ce formulaire... -

Select type of user to add:
-
-]]>
- Qui ressemble ... -

-

-

- Select type of user to add: - -
-

-

- Le test suivant le confirmera... - - $this->get('http://www.lastcraft.com/form_testing_documentation.php'); - $this->assertFalse($this->setField('type', 'Superuser')); - } -} -]]> - La slection ne sera pas change suite un chec d'initialisation - d'une valeur sur un objet. -

-

- Voici la liste complte des objets supports aujourd'hui... -

    -
  • Champs texte, y compris les champs masqus (hidden) ou crypts (password).
  • -
  • Boutons submit, en incluant aussi la balise button, mais pas encore les boutons reset
  • -
  • Aires texte (textarea) avec leur gestion des retours la ligne (wrap).
  • -
  • Cases cocher, y compris les cases cocher multiples dans un mme formulaire.
  • -
  • Listes menu droulant, y compris celles slections multiples.
  • -
  • Boutons radio.
  • -
  • Images.
  • -
-

-

- Le navigateur propos par SimpleTest mule les actions - qui peuvent tre ralises par un utilisateur sur - une page HTML standard. Javascript n'est pas support et - il y a peu de chance pour qu'il le soit prochainement. -

-

- Une attention particulire doit tre port aux techniques Javascript - qui changent la valeur d'un champ cach : elles ne peuvent pas tre - ralises avec les commandes classiques de SimpleTest. - Une mthode alternative est propose plus loin. -

-
-
-

- SimpleTest peut grer deux types de commandes valeur multiple : - les menus droulants slection multiple et les cases cocher - avec le mme nom l'intrieur mme d'un formulaire. - La nature de ceux-ci implique que leur initialisation - et leur test sont lgrement diffrents. - Voici un exemple avec des cases cocher... -


-    Create privileges allowed:
-    
- Retrieve privileges allowed: -
- Update privileges allowed: -
- Destroy privileges allowed: -
- - -]]>
- Qui se traduit par... -

-

-

- Create privileges allowed: -
- Retrieve privileges allowed: -
- Update privileges allowed: -
- Destroy privileges allowed: -
- -
-

-

- Si nous souhaitons dsactiver tous les privilges sauf - ceux de tlchargement (Retrieve) et transmettre cette information, - nous pouvons y arriver par... - - function testDisableNastyPrivileges() { - $this->get('http://www.lastcraft.com/form_testing_documentation.php'); - $this->assertField('crud', array('c', 'r', 'u', 'd')); - $this->setField('crud', array('r')); - $this->clickSubmit('Enable Privileges'); - } -} -]]> - Plutt que d'initier le champ une valeur unique, - nous lui donnons une liste de valeurs. - Nous faisons la mme chose pour tester les valeurs attendues. - Nous pouvons crire d'autres bouts de code de test - pour confirmer cet effet, peut-tre en nous connectant - comme utilisateur et en essayant d'effectuer une mise jour. -

-
-
-

- Si vous souhaitez tester un formulaire dpendant de Javascript - pour la modification d'un champ cach, vous ne pouvez pas - simplement utiliser setField(). - Le code suivant ne fonctionnera pas : -// Ne fonctionne *pas* - $this->setField('un_champ_cach', '123'); - $this->clickSubmit('OK'); - } -} -]]> - A la place, vous aurez besoin d'ajouter le paramtre supplmentaire - du formulaire la mthode clickSubmit() : -$this->clickSubmit('OK', array('un_champ_cach'=>'123')); - } - -} -]]> -

-

- N'oubliez pas que de la sorte, vous tes effectivement en train - de court-circuitez une partie de votre application (le code Javascript - dans le formulaire) et que peut-tre serait-il plus prudent - d'utiliser un outil comme - Selenium pour mettre sur pied - un test de recette complet. -

-
-
-

- Si vous souhaitez tester un gestionnaire de formulaire - mais que vous ne l'avez pas crit ou que vous n'y avez - pas encore accs, vous pouvez crer un envoi de formulaire la main. - - function testAttemptedHack() { - $this->post( - 'http://www.my-site.com/add_user.php', - array('type' => 'superuser')); - $this->assertNoUnwantedPattern('/user created/i'); - } -} -]]> - En ajoutant des donnes la mthode WebTestCase::post(), - nous essayons de tlcharger la page via la transmission d'un formulaire. -

-
-
- - - Modifier les valeurs d'un formulaire et - russir transmettre un simple formulaire - - - Grer des objets valeurs multiples - en initialisant des listes. - - - Le cas des formulaires utilisant Javascript pour - modifier un champ cach - - - Envoi brut quand il n'existe pas de bouton cliquer. - - - - - La page du projet SimpleTest sur - SourceForge. - - - La page de tlchargement de SimpleTest sur - LastCraft. - - - L'API du dveloppeur pour SimpleTest - donne tous les dtails sur les classes et les assertions disponibles. - - - - - dveloppement logiciel, - programmation php pour des clients, - php centr sur le client, - outils de dveloppement logiciel, - frameword de test de recette, - scripts php gratuits, - architecture, - ressources php, - HTMLUnit, - JWebUnit, - test php, - ressources de test unitaire, - test web - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/gain_control_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/gain_control_tutorial.xml deleted file mode 100644 index 5f13ea0c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/gain_control_tutorial.xml +++ /dev/null @@ -1,324 +0,0 @@ - - - - - Tutorial de test unitaire en PHP - Isoler les variables pendant le test - - -

- Pour tester un module de code vous avez besoin - d'avoir un contrle trs prcis sur son environnement. - Si quelque chose change dans les coulisses, - par exemple dans un fichier de configuration, - alors les tests peuvent chouer de faon inattendue. - Il ne s'agirait plus d'un test de code sans quivoque - et pourrait vous faire perdre des heures prcieuses - la recherche d'erreurs dans un code qui fonctionne. - Alors qu'il s'agit d'un problme de configuration - qui plante le test en question. - Au mieux vos scnarios de test deviennent de plus en plus - compliqus afin de prendre en compte toutes les variations possibles. -

-
-
-

- Il y a souvent beaucoup de variables videntes qui peuvent affecter - un scnario de test unitaire, d'autant plus dans un environnement - de dveloppement web dans lequel PHP a ses aises. - Parmi celles-ci, on trouve les paramtres de connexion - la base de donnes et ceux de configuration, - les droits de fichier et les ressources rseau, etc. - L'chec ou la mauvaise installation de l'un ou l'autre - de ces composants cassera la suite de test. - Est-ce que nous devons ajouter des tests pour valider - l'installation de ces composants ? - C'est une bonne ide mais si vous les placez - dans les tests du module de code vous aller commencer - encombrer votre code de test avec des dtails - hors de propos avec la tche en cours. - Ils doivent tre placs dans leur propre groupe de tests. -

-

- Par contre un autre problme reste : - nos machines de dveloppement doivent aussi avoir - tous les composants systme d'installs avant l'excution - de la suite de test. Et vos tests s'excuteront plus lentement. -

-

- Devant un tel dilemme, nous crerons souvent - des versions enveloppantes des classes qui grent ces ressources. - Les vilains dtails de ces ressources sont ensuite cods une seule fois. - J'aime bien appeler ces classes des "classes frontire" - tant donn qu'elles existent en bordure de l'application, - l'interface entre votre application et le reste du systme. - Ces classes frontire sont - dans le meilleur des cas - simules - pendant les tests par des versions de simulacre. - Elles s'excutent plus rapidement et sont souvent appeles - "bouchon serveur [Ndt : Server Stubs]" - ou dans leur forme plus gnrique "objet fantaisie - [Ndt : Mock Objects]". - Envelopper et bouchonner chacune de ces ressources - permet d'conomiser pas mal de temps. -

-

- Un des facteurs souvent ngligs reste le temps. - Par exemple, pour tester l'expiration d'une session des codeurs - vont souvent temporairement en caler la dure - une valeur trs courte, disons 2 secondes, - et ensuite effectuer un sleep(3) : - ils estiment alors que la session a expire. - Sauf que cette opration ajoute 3 secondes la suite de test : - il s'agit souvent de beaucoup de code en plus - pour rendre la classe de session aussi mallable. - Plus simple serait d'avoir un moyen d'avancer l'horloge arbitrairement. - De contrler le temps. -

-
-
-

- Une nouvelle fois, nous allons effectuer notre conception - d'une enveloppe d'horloge via l'criture de tests. - Premirement nous ajoutons un scnario de test d'horloge - dans notre suite de test tests/all_tests.php... - -require_once('clock_test.php'); - -$test = &new TestSuite('All tests'); -$test->addTestCase(new TestOfLogging()); -$test->addTestCase(new TestOfClock()); -$test->run(new HtmlReporter()); -?> -]]> - Ensuite nous crons le scnario de test - dans un nouveau fichier tests/clock_test.php... -UnitTestCase('Clock class test'); - } - function testClockTellsTime() { - $clock = new Clock(); - $this->assertEqual($clock->now(), time(), 'Now is the right time'); - } - function testClockAdvance() { - } - } -?> -]]> - Notre unique test pour le moment, c'est que - notre nouvelle class Clock se comporte - comme un simple substitut de la fonction time() en PHP. - L'autre mthode tient lieu d'emploi. - C'est notre chose faire en quelque sorte. - Nous ne lui avons pas donne de test parce que a casserait notre rythme. - Nous crirons cette fonctionnalit de dcalage - dans le temps une fois que nous serons au vert. - Pour le moment nous ne sommes videmment pas dans le vert... -

-
- Fatal error: Failed opening required '../classes/clock.php' (include_path='') in - /home/marcus/projects/lastcraft/tutorial_tests/tests/clock_test.php on line 2 -
-
- Nous crons un fichier classes/clock.php comme ceci... - -]]> - De la sorte nous reprenons le cours du code. -
-

All tests

- Fail: Clock class test->testclocktellstime->[NULL: ] should be equal to [integer: 1050257362]
-
3/3 test cases complete. - 4 passes and 1 fails.
-
- Facile corriger... - - return time(); - } -} -]]> - Et nous revoici dans le vert... -
-

All tests

-
3/3 test cases complete. - 5 passes and 0 fails.
-
- Il y a juste un petit problme. - L'horloge pourrait basculer pendant l'assertion - et crer un cart d'une seconde. - Les probabilits sont assez faibles mais s'il devait - y avoir beaucoup de tests de chronomtrage - nous finirions avec une suite de test qui serait erratique - et forcment presque inutile. - Nous nous y attaquerons bientt - et pour l'instant nous l'ajoutons dans la liste des "choses faire". -

-

- Le test d'avancement ressemble ... -UnitTestCase('Clock class test'); - } - function testClockTellsTime() { - $clock = new Clock(); - $this->assertEqual($clock->now(), time(), 'Now is the right time'); - } - function testClockAdvance() { - $clock = new Clock(); - $clock->advance(10); - $this->assertEqual($clock->now(), time() + 10, 'Advancement'); - } -} -]]> - Le code pour arriver au vert est direct : - il suffit d'ajouter un dcalage de temps. - - var $_offset; - - function Clock() { - $this->_offset = 0; - } - - function now() { - return time() + $this->_offset; - } - - function advance($offset) { - $this->_offset += $offset; - } -} -]]> -

-
-
-

- Notre fichier all_tests.php contient des rptitions - dont nous pourrions nous dbarrasser. - Nous devons ajouter manuellement tous nos scnarios de test - depuis chaque fichier inclus. - C'est possible de les enlever mais avec les prcautions suivantes. - La classe GroupTest inclue une mthode bien pratique - appele addTestFile() qui prend un fichier PHP comme paramtre. - Ce mcanisme prend note de toutes les classes : - elle inclut le fichier et ensuite regarde toutes les classes - nouvellement cres. S'il y a des filles de TestCase - elles sont ajoutes au nouveau test de groupe. -

-

- En outre, la bibliothque autorun lancera tous les scnarios - de test collects automagiquement aprs les avoir chargs. -

-

- Voici notre suite de test remanie en appliquant cette mthode... - -require_once(SIMPLE_TEST . 'autorun.php'); - -class AllTests extends TestSuite { - function AllTests() { - $this->TestSuite('All tests'); - $this->addFile('log_test.php'); - $this->addFile('clock_test.php'); - } -} -?> -]]> - Les inconvniants sont les suivants... -

    -
  1. - Si le fichier de test a dj t inclus, - aucune nouvelle classe ne sera ajoute au groupe. -
  2. -
  3. - Si le fichier de test contient d'autres classes - relies TestCase alors celles-ci - aussi seront ajout au test de groupe. -
  4. -
- Dans nos test nous n'avons que des scnarios dans les - fichiers de test et en plus nous avons supprim - leur inclusion du script all_tests.php : - nous sommes donc en rgle. C'est la situation la plus commune. -

-

- Nous devrions corriger au plus vite le petit problme - de dcalage possible sur l'horloge : - c'est ce que nous faisons ensuite. -

-
-
- - - Le temps est souvent une variable nglige dans les tests. - - - Une classe horloge - nous permet de modifier le temps. - - - Nettoyer le test de groupe. - - - - - La section prcdente : - grouper des tests unitaires. - - - La section suivante : - sous classer les scnarios de test. - - - Vous aurez besoin du - testeur unitaire SimpleTest pour les exemples. - - - - - dveloppement logiciel, - programmation php, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - organisation de tests unitaires, - conseil de test, - astuce de dveloppement, - architecture logicielle pour des tests, - exemple de code php, - objets fantaisie, - junit, - test php, - outil de test unitaire, - suite de test php - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/group_test_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/group_test_documentation.xml deleted file mode 100644 index 80d91780..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/group_test_documentation.xml +++ /dev/null @@ -1,353 +0,0 @@ - - - - - Documentation SimpleTest : Grouper des tests - -
-

- Pour lancer les scnarios de tests en tant que groupe, - ils devraient tre placs dans des fichiers sans le code du lanceur... - -]]> - Autant de scnarios que ncessaires peuvent tre - mis dans un fichier unique. Ils doivent contenir - tout le code ncessaire, entre autres la bibliothque teste, - mais aucune des bibliothques de SimpleTest. -

-

- Si vous avez tendu l'un ou l'autre des scnarios de test, - vous pouvez aussi les inclure. - - class MyFileTestCase extends UnitTestCase { - ... - } - SimpleTestOptions::ignore('MyFileTestCase'); - - class FileTester extends MyFileTestCase { - ... - } - - class SocketTester extends UnitTestCase { - ... - } -?> -]]> - La classe FileTester ne contient aucun test vritable, - il s'agit d'une classe de base pour d'autres scnarios de test. - Pour cette raison nous utilisons la directive - SimpleTestOptions::ignore() pour indiquer - au prochain groupe de tests de l'ignorer. - Cette directive peut se placer n'importe o dans le fichier - et fonctionne quand un fichier complet des scnarios de test - est charg (cf. ci-dessous). - Nous l'appelons file_test.php. -

-

- Ensuite nous crons un fichier de groupe de tests, - disons group_test.php. - Vous penserez un nom plus convaincant, j'en suis sr. - Nous lui ajoutons le fichier de test avec une mthode sans risque... - - require_once('file_test.php'); - - $test = &new GroupTest('All file tests'); - $test->addTestCase(new FileTestCase()); - $test->run(new HtmlReporter()); -?> -]]> - Ceci instancie le scnario de test avant que - la suite de test ne soit lance. - a pourrait devenir assez onreux avec - un grand nombre de scnarios de test : - il existe donc une autre mthode qui instancie - la classe uniquement quand elle devient ncessaire... - - $test->addTestClass('FileTestCase'); - $test->run(new HtmlReporter()); -?> -]]> - Le problme de cette technique est que pour - chaque scnario de test supplmentaire nous aurons importer - (via require_once()) le fichier de code de test - et instancier manuellement chaque scnario de test. - Nous pouvons nous pargner beaucoup de dactylographie avec... - - $test->addTestFile('file_test.php'); - $test->run(new HtmlReporter()); -?> -]]> - Voici ce qui vient de se passer : - la classe GroupTest a ralis le - require_once() pour nous. - Ensuite elle vrifie si de nouvelles classes de scnario - de test ont t cres par ce nouveau fichier - et les ajoute automatiquement au groupe de tests. - Dsormais tout ce qu'il nous reste faire, - c'est d'ajouter chaque nouveau fichier. -

-

- Il y a deux choses qui peuvent planter - et qui demandent un minimum d'attention... -

    -
  1. - Le fichier peut dj avoir t analys par PHP - et dans ce cas aucune classe ne sera ajoute. - Pensez bien vrifier que les scnarios de test - ne sont inclus que dans ce fichier et dans aucun autre - (Note : avec la nouvelle fonctionnalit autorun, - ce problme a maintenant t rsolu). -
  2. -
  3. - Les nouvelles classes d'extension de scnario - de test qui sont incluses seront places - dans le groupe de tests et excutes par la mme occasion. - Vous aurez ajouter une directive - SimpleTestOptions::ignore() pour ces classes - ou alors pensez les ajouter avant la ligne - GroupTest::addTestFile(). -
  4. -
-

-
-
-

- La technique ci-dessus place tous les scnarios de test - dans un unique et grand groupe. - Sauf que pour des projets plus consquents, - ce n'est probablement pas assez souple; - vous voudriez peut-tre grouper les tests tout fait diffremment. -

-

- Pour obtenir un groupe de tests plus souple - nous pouvons sous classer GroupTest - et ensuite l'instancier au cas par cas... - - class FileGroupTest extends GroupTest { - function FileGroupTest() { - $this->GroupTest('All file tests'); - $this->addTestFile('file_test.php'); - } - } -?> -]]> - Ceci nomme le test dans le constructeur - et ensuite ajoute la fois nos scnarios - de test et un unique groupe en dessous. - Bien sr nous pouvons ajouter plus d'un groupe cet instant. - Nous pouvons maintenant invoquer les tests - partir d'un autre fichier d'excution... - - $test = &new FileGroupTest(); - $test->run(new HtmlReporter()); -?> -]]> - ...ou alors nous pouvons les grouper - dans un groupe de tests encore plus grand... - - $test = &new BigGroupTest('Big group'); - $test->addTestCase(new FileGroupTest()); - $test->addTestCase(...); - $test->run(new HtmlReporter()); -?> -]]> - Si nous souhaitons lancer le groupe de tests original - sans utiliser ses petits fichiers d'excution, - nous pouvons mettre le code du lanceur de test - derrire des barreaux quand nous crons chaque groupe. -GroupTest('All file tests'); - $test->addTestFile('file_test.php'); - } - } - - if (! defined('RUNNER')) { - define('RUNNER', true); - $test = &new FileGroupTest(); - $test->run(new HtmlReporter()); - } -?> -]]> - Cette approche exige aux barrires d'tre actives - l'inclusion du fichier de groupe de tests, - mais c'est quand mme moins de tracas que beaucoup - de fichiers de lancement parpills. - Reste inclure des barreaux identiques - au niveau suprieur afin de s'assurer que - le run() ne sera lanc qu'une seule fois - partir du script de haut niveau qui l'a invoqu. -addTestCase(new FileGroupTest()); - $test->addTestCase(...); - $test->run(new HtmlReporter()); -?> -]]> - Comme les scnarios de test normaux, - un GroupTest peut tre charg avec la mthode - GroupTest::addTestFile(). - - $test->addTestFile('file_group_test.php'); - $test->addTestFile(...); - $test->run(new HtmlReporter()); -?> -]]> -

-
-
-

- Si vous avez dj des tests unitaires pour votre code - ou alors si vous tendez des classes externes - qui ont dj leurs propres tests, il y a peu de chances - pour que ceux-ci soient dj au format SimpleTest. - Heureusement il est possible d'incorporer ces scnarios - de test en provenance d'autres testeurs unitaires - directement dans des groupes de test SimpleTest. -

-

- Par exemple, supposons que nous ayons - ce scnario de test prvu pour - PhpUnit - dans le fichier config_test.php... -class ConfigFileTest extends TestCase { - function ConfigFileTest() { - $this->TestCase('Config file test'); - } - - function testContents() { - $config = new ConfigFile('test.conf'); - $this->assertRegexp('/me/', $config->getValue('username')); - } -} -]]> - Le groupe de tests peut le reconnatre partir - du moment o nous mettons l'adaptateur appropri - avant d'ajouter le fichier de test... - - require_once('simpletest/adapters/phpunit_test_case.php'); - - $test = &new GroupTest('All file tests'); - $test->addTestFile('config_test.php'); - $test->run(new HtmlReporter()); -?> -]]> - Il n'y a que deux adaptateurs, - l'autre est pour le paquet testeur unitaire de - PEAR... - - require_once('simpletest/adapters/pear_test_case.php'); - - $test = &new GroupTest('All file tests'); - $test->addTestFile('some_pear_test_cases.php'); - $test->run(new HtmlReporter()); -?> -]]> - Les scnarios de test de PEAR peuvent tre - librement mlangs avec ceux de SimpleTest - mais vous ne pouvez pas utiliser les assertions - de SimpleTest au sein des versions hrites - des scnarios de test. La raison ? - Une simple vrification que vous ne rendez pas - par accident vos scnarios de test compltement - dpendants de SimpleTest. - Peut-tre que vous souhaitez publier - votre bibliothque sur PEAR par exemple : - a voudrait dire la livrer avec des scnarios de - test compatibles avec PEAR::PhpUnit. -

-
-
- - - Plusieurs approches pour grouper des tests ensemble. - - - Combiner des groupes des tests dans des - groupes plus grands. - - - Intgrer des scnarios de test hrits - d'un autre type de PHPUnit. - - - - - La page du projet SimpleTest sur - SourceForge. - - - La page de tlchargement de SimpleTest sur - LastCraft. - - - - - test unitaire en php, - intgration de test, - documentation, - marcus baker, - perrick penet, - test simple, - documentation simpletest, - phpunit, - pear - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/group_test_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/group_test_tutorial.xml deleted file mode 100644 index 84f7016b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/group_test_tutorial.xml +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - Tutorial de test unitaire PHP - Grouper des tests unitaires et exemples d'criture de scnarios de tests - - - -

- Pour enchaner nous allons remplir des blancs et crer une suite de tests. -

-
-
-

- Ajouter un autre test peut tre aussi simple - qu'ajouter une nouvelle mthode un scnario de test... -UnitTestCase('Log class test'); - } - function testCreatingNewFile() { - @unlink('../temp/test.log'); - $log = new Log('../temp/test.log'); - $this->assertFalse(file_exists('../temp/test.log'), 'Created before message'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log'), 'File created'); - @unlink('../temp/test.log'); - } - function testAppendingToFile() { - @unlink('../temp/test.log'); - $log = new Log('../temp/test.log'); - $log->message('Test line 1'); - $messages = file('../temp/test.log'); - $this->assertWantedPattern('/Test line 1/', $messages[0]); - $log->message('Test line 2'); - $messages = file('../temp/test.log'); - $this->assertWantedPattern('/Test line 2/', $messages[1]); - @unlink('../temp/test.log'); - } -} -]]> - La mthode du scnario de test assertWantedPattern() - utilise les expressions rationnelles Perl pour vrifier - qu'une chane respecte un certain motif. -

-

- Tout ce que nous faisons dans ce nouveau test, - c'est crire une ligne dans un fichier, puis la lire, - le tout deux fois de suite. - Nous souhaitons simplement vrifier que le loggueur - ajoute le texte la fin plutt qu'craser - les donnes dj existantes. Quelque peu pdant, - mais aprs tout il s'agit d'un tutorial ! -

-

- De toute faon ce test passe directement... -

-

Log class test

-
1/1 test cases complete. - 4 passes and 0 fails.
-
- Notre code contient actuellement beaucoup de rptitions, - nous devons effacer le fichier de test avant et aprs chaque test. - De mme que JUnit, - SimpleTest utilise les mthodes - setUp() et tearDown() - qui sont excutes respectivement avant et aprs chaque test. - La suppression du fichier est commune tous les tests : - nous devrions donc y mettre cette opration. -

-

- Nos tests sont verts donc nous pouvons faire un peu de remaniement... -UnitTestCase('Log class test'); - } - function setUp() { - @unlink('../temp/test.log'); - } - function tearDown() { - @unlink('../temp/test.log'); - } - function testCreatingNewFile() { - $log = new Log('../temp/test.log'); - $this->assertFalse(file_exists('../temp/test.log'), 'Created before message'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log'), 'File created'); - } - function testAppendingToFile() { - $log = new Log('../temp/test.log'); - $log->message('Test line 1'); - $messages = file('../temp/test.log'); - $this->assertWantedPattern('/Test line 1/', $messages[0]); - $log->message('Test line 2'); - $messages = file('../temp/test.log'); - $this->assertWantedPattern('/Test line 2/', $messages[1]); - } -} -]]> - Le test reste vert. Nous pouvons continuer - ajouter des mthodes sans test au scnario, - il suffit que leur nom ne commence pas par - la chane "test". - Seules les mthodes commenant par "test" sont excutes. - Nous pouvons donc continuer le remaniement... -UnitTestCase('Log class test'); - } - function setUp() { - @unlink('../temp/test.log'); - } - function tearDown() { - @unlink('../temp/test.log'); - } - function getFileLine($filename, $index) { - $messages = file($filename); - return $messages[$index]; - } - function testCreatingNewFile() { - $log = new Log('../temp/test.log'); - $this->assertFalse(file_exists('../temp/test.log'), 'Created before message'); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('../temp/test.log'), 'File created'); - } - function testAppendingToFile() { - $log = new Log('../temp/test.log'); - $log->message('Test line 1'); - $this->assertWantedPattern('/Test line 1/', $this->getFileLine('../temp/test.log', 0)); - $log->message('Test line 2'); - $this->assertWantedPattern('/Test line 2/', $this->getFileLine('../temp/test.log', 1)); - } -} -]]> - Que vous prfriez cette version ou la prcdente ne dpend - que de votre got personnel. - Il y a un peu plus de code dans cette dernire - mais la logique du test est plus claire. -

-
-
-

- Un scnario de test ne fonctionne pas tout seul - pendant trs longtemps. - Quand on code pour de vrai nous souhaitons excuter - un maximum de tests aussi souvent - et aussi rapidement que possible. - a veut dire les grouper dans des suites de tests - qui incluent l'ensemble des tests de l'application. -

-

- Premirement nous devons supprimer le code d'excution - des tests se trouvant dans notre scnario de test. - -require_once('../classes/log.php'); - -class TestOfLogging extends UnitTestCase { - ... -} -?> -]]> - Nous n'avons plus besoin de la constante - SIMPLE_TEST. - Ensuite nous crons un groupe de tests appel - all_tests.php dans le rpertoire tests... -addTestCase(new TestOfLogging()); - $test->run(new HtmlReporter()); -?> -]]> - Il n'y a presque de pas de diffrence tant que les choses marchent... -

-

All tests

-
1/1 test cases complete. - 4 passes and 0 fails.
-
- Les tests du groupe s'ajoutent au compteur - des scnarios de test. Ajouter des nouveaux scnarios - de test est trs simple. - Il suffit d'inclure le fichier d'un scnario - et d'ajouter individuellement tous les scnarios autonomes. - Vous pouvez aussi emboter les groupes de test - les uns dans les autres (tout en faisant bien attention d'viter les boucles). -

-

- Dans la page suivante - nous les ajouterons encore plus rapidement. -

-
-
- - - Ajouter un autres test au scnario existant et remanier. - - - La technique brute pour grouper des tests unitaires. - - - - - Ensuite - vient le contrle de comment la classe sous le test interagit - avec le reste du systme. - - - Avant - il y a la cration du premier test. - - - Vous aurez besoin de SimpleTest - pour excuter ces exemples. - - - - - dveloppement logiciel, - programmation php, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - pilotage par les tests, - architecture, - ressouces php, - objets fantaisie, - junit, - test php, - test unitaire, - phpunit, - test unitaire php - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/improving_design_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/improving_design_tutorial.xml deleted file mode 100644 index b2e3686c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/improving_design_tutorial.xml +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - tutoriel de test unitaire en PHP - Conception du haut vers le bas, tester d'abord avec des objets fantaisie - - -
-

- J'ai menti. -

-

- Je n'ai pas cr de test pour le scripteur, - uniquement l'interface FileWriter - que j'ai affich plus tt. - En fait je vais encore m'loigner d'un article fini - et prsumer l'existence un scripteur abstrait - dans classes/writer.php... -Writer { - - function Writer() { - } - - function write($message) { - } -} -?> -]]> - Les changements correspondant au niveau du test sont... - -Mock::generate('Writer'); - -class TestOfLogging extends UnitTestCase { - function TestOfLogging() { - $this->UnitTestCase('Log class test'); - } - function testWriting() { - $clock = &new MockClock($this); - $clock->setReturnValue('now', 'Timestamp'); - $writer = &new MockWriter($this); - $writer->expectOnce('write', array('[Timestamp] Test line')); - $log = &new Log($writer); - $log->message('Test line', &$clock); - $writer->tally(); - } -} -?> -]]> - Afin d'utiliser la classe de log, nous aurions besoin - de coder un scripteur de fichier - ou un autre type de scripteur - - mais pour le moment nous ne faisons que des tests - et nous n'en avons pas encore besoin. - En d'autres termes, en utilisant des objets fantaisie - nous pouvons dcaler la cration d'un objet - de niveau plus bas jusqu'au moment opportun. - Non seulement nous pouvons faire la conception du haut vers le bas, - mais en plus nous pouvons aussi tester du haut vers le bas. -

-
-
-

- Imaginez pour un moment que nous ayons commenc la classe de log - partir d'une autre direction. - Simulez avoir crit juste assez du Log - pour avoir raliser le besoin d'un Writer. - Comme l'aurions-nous inclus ? -

-

- Bon, l'hritage du scripteur ne nous aurait pas - permis de le simuler du point de vue des tests. - De celui de la conception nous aurions t restreint - un unique scripteur sans hritage multiple. -

-

- Crer un scripteur interne, plutt qu'en le passant - au constructeur, en choisissant un nom de classe, - est possible, mais nous aurions moins de contrle - sur l'initialisation de l'objet fantaisie. - Du point de vue de la conception il aurait t - presque impossible de passer des paramtres - au scripteur dans tous les formats possibles - et envisageables. Vous auriez d restreindre - le scripteur un hash ou une chane complique - dcrivant tous les dtails de la cible. - Au mieux compliqu sans raison. -

-

- Utiliser une mthode fabrique pour crer le scripteur - intrieurement serait possible, mais a voudrait - dire le sous classer pour les tests de manire - remplacer la mthode fabrique par une autre mthode - renvoyant un leurre. Plus de boulot du point de vue des tests, - quoique toujours possible. Du point de vue de la conception, - a voudrait dire crer une nouvelle sous-classe de - log pour chaque type de scripteur. - Cela s'appelle une hirarchie de classe parallle - et fait bien entendu de la duplication. - Beurk. -

-

- A l'autre extrme, passer ou crer le scripteur - chaque message aurait t rptitif - et aurait rduit le code de la classe Log - une unique mthode, un signe certain - que toute la classe est devenue redondante. -

-

- Cette tension entre la facilit du test - et le refus de la rptition nous a permis - de trouver une conception la fois flexible et propre. - Vous vous souvenez de notre bref envie de l'hritage multiple ? - Nous l'avons remplac par du polymorphisme - (plein de scripteurs) et spar la hirarchie du journal - de celle de l'criture. - Nous relions les deux par agrgation travers - le plus simple Log. - Cette astuce est en fait un design pattern - (modle de conception) appel "Pont" ou "Bridge". -

-

- Donc nous avons t pouss par le code de test - (nous n'avons presque rien crit d'autre) vers un design pattern. - Pensez-y une seconde. Les tests amliorent - la qualit du code, coup sr dans mon cas, - mais il y a quelque chose de bien plus profond et plus puissant. -

-

- Les tests ont amlior la conception. -

-
-
-

- Crer un objet fantaisie est aussi simple - que de crer l'interface l'crit. - Si vous utilisez de l'UML ou d'autres outils - pour gnrer ces interfaces alors vous avez un chemin encore - plus flexible pour gnrer rapidement vos objets de test. - Mme sans, vous pouvez passer du dessin sur tableau blanc, - l'criture de l'objet fantaisie, - puis la gnration de l'interface qui nous renvoie - de nouveau au tableau blanc, le tout trs simplement. - Comme le remaniement, la conception, le code et les tests s'unifient. -

-

- Parce que les objets fantaisie travaillent du haut vers le bas, - ils peuvent tre amens dans la conception plus rapidement - qu'un remaniement classique qui demande - quant lui du code fonctionnel avant de pourvoir s'installer. - a veut dire que le code de test interagit plus vite - avec la conception : par consquent la qualit - de la conception augmente elle aussi plus vite. -

-

- Un testeur unitaire est un outil de code. - Un testeur unitaire avec objet fantaisie est un outil de conception. -

-
-
- - - Simuler maintenant, coder plus tard. - - - Nous drivons vers le design pattern bridge. - - - Conception et test main dans la main. - - - - - Ce tutorial suit - les classes frontire. - - - Vous aurez besoin du - framework de test SimpleTest - pour essayer ces exemples. - - - Pour des discussions plus fournis sur - les objets fantaisie, voyez le - - Wiki des Extreme Tuesday - ou le Wiki C2 - (en anglais tous les deux). - - - - - dveloppement logiciel, - tutoriel de programmation php, - scnarios de test en php, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - architecture, - exemple php, - exemple d'objet fantaisie, - test style junit, - architecture logicielle pour des tests, - framework de test en php, - test unitaire, - objet fantaisie en php - test php, - suite de test php - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/index.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/index.xml deleted file mode 100644 index 501897ee..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/index.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - Les articles de :: onpk :: sur php / simpletest : traductions en franais des articles publis sur Lastcraft.com - - - -

- Cette section rassemble l'ensemble des articles et documentations pour SimpleTest traduits en franais. -

-
-
-

- J'ai commenc par dcouvrir l'Extreme Programming via le web. Ensuite j'ai gagn un livre en franais sur XP. Et dcouvrant la confiance supplmentaire gagne via les tests unitaires et de recette, je suis devenu "test-infected". -

-

- Aprs avoir got aux joies de SimpleTest, j'ai contact Marcus Baker -- responsable du projet -- pour lui proposer de traduire en franais la page d'introduction, puis les tutoriaux et finalement toute la documentation. Un travail qui n'aurait pas t possible sans l'aide de quelques relecteurs bienveillants : Jrmie C., David B., Emmanuel G., Olivier L. et Cdric G. (dans le dsordre). -

-

- Si vous lisez attentivement ces quelques pages et que vous y trouvez encore des fautes d'orthographe, pensez me les renvoyer : comme a le prochain ne pourra pas se dire la mme chose. -

-
-
-

- J'ai un blog -- :: onpk ::, une entreprise -- No Parking dont le produit phare est openTIME. Dans la communaut je me ballade du ct de l'AFUP, des apros PHP et des praticiens XP. -

-
-
-

-

-
-
- - - Comment en arrive-t-on au dveloppement pilot par les tests ? - - - Et en dehors des tests ? - - - Tous les articles - - - - - SimpleTest -- l'original en anglais. - - - - - dveloppement logiciel, - programmation php, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - conseil de test, - architecture logicielle pour des tests, - exemple de code php, - junit, - test php, - outil de test unitaire, - suite de test php - - - Des articles (documentations et tutoriels) pour dcouvrir le dveloppement agile en PHP avec le framework de tests unitaires SimpleTest. - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/intro.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/intro.xml deleted file mode 100644 index ceacc63c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/intro.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Les articles de :: onpk :: sur php / simpletest : traductions en franais des articles publis sur Lastcraft.com - - - -

- Le testeur unitaire SimpleTest PHP a enfin atteint la dlicate version 1.0 : il est disponible au tlchargement chez votre SourceForge le plus proche. -

-

- Il s'agit d'un testeur unitaire PHP et aussi d'un testeur web. Il est construit pour tre extensible de plusieurs manires. Les utilisateurs de JUnit seront familiers avec la plupart des interfaces. L'affichage des tests est largement modifiable tout comme le scnario de test de base. Par ailleurs les objets fantaisie peuvent tre utiliss avec d'autres testeurs unitaires. -

-

- Les fonctionnalits -la-JWebUnit sont plus compltes aussi. Il y a le support pour SSL, les fentres, les proxies, l'authentification simple et un large choix de contrles HTML. L'ide est que les tches fastidieuses en PHP, se connecter un site par exemple, puissent tre testes facilement. -

-
-
- - - dveloppement logiciel, - programmation php, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - conseil de test, - architecture logicielle pour des tests, - exemple de code php, - junit, - test php, - outil de test unitaire, - suite de test php - - - Des articles (documentations et tutoriels) pour dcouvrir le dveloppement agile en PHP avec le framework de tests unitaires SimpleTest. - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/logiciels_utilisant_simpletest.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/logiciels_utilisant_simpletest.xml deleted file mode 100644 index de0f9c1a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/logiciels_utilisant_simpletest.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - Logiciels utilisant SimpleTest - -
-

- Il y a un certain nombre de projets qui étendent les fonctionnalités - de SimpleTest : -

-
-
- - SimpleTestXUL - -
-
- - Limb Unit - -
-
- - Stagehand_TestRunner - -
-
- - Suite Tester - -
- -
-
-
-

- D'autres se servent de SimpleTest pour construire leurs projets : -

-
-
- - Jelix - framework PHP5 - -
-
- Jelix est un framework pour PHP5 qui permet de développer tout type - d'application. Performant, il est conçu pour les sites à forte charge; - entièrement objet, il est fortement modulaire et extensible. - En outre ils basé sur des modèles de conception connus dont MVC, DAO.. - et prend en charge de nombreux formats de sortie : - XHTML, XUL, RSS, ATOM, RDF, ZIP, XML, PDF, etc. -
-
- - Copix, Framework PHP - -
-
- Copix est un framework pour PHP qui existe depuis maintenant plus de 6 ans. - Copix est un projet libre (LGPL) mature utilisé sur de très nombreux sites. -
-
- - CakePHP - -
-
- - Web Application Component Toolkit - -
-
- - Limb3 - -
-
- - Drupal | SimpleTest - -
-
- - WideImage - -
-
- - Aperiplus - -
-
- - Flux CMS - -
-
- - Moodle - -
-
-
-
- - - Projects extending SimpleTest - - - "Projects using SimpleTest - - - - - - - - - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/mock_objects_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/mock_objects_documentation.xml deleted file mode 100644 index d4c5ee9f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/mock_objects_documentation.xml +++ /dev/null @@ -1,729 +0,0 @@ - - - - - Documentation SimpleTest : les objets fantaise - -
-

- Les objets fantaisie - ou "mock objects" en anglais - - ont deux rles pendant un scnario de test : acteur et critique. -

-

- Le comportement d'acteur est celui de simuler - des objets difficiles initialiser ou trop consommateurs - en temps pendant un test. - Le cas classique est celui de la connexion une base de donnes. - Mettre sur pied une base de donnes de test au lancement - de chaque test ralentirait considrablement les tests - et en plus exigerait l'installation d'un moteur - de base de donnes ainsi que des donnes sur la machine de test. - Si nous pouvons simuler la connexion - et renvoyer des donnes notre guise - alors non seulement nous gagnons en pragmatisme - sur les tests mais en sus nous pouvons nourrir - notre base avec des donnes falsifies - et voir comment il rpond. Nous pouvons - simuler une base de donnes en suspens ou - d'autres cas extrmes sans avoir crer - une vritable panne de base de donnes. - En d'autres termes nous pouvons gagner - en contrle sur l'environnement de test. -

-

- Si les objets fantaisie ne se comportaient que comme - des acteurs alors on les connatrait sous le nom de - bouchons serveur. -

-

- Cependant non seulement les objets fantaisie jouent - un rle (en fournissant la demande les valeurs requises) - mais en plus ils sont aussi sensibles aux messages qui - leur sont envoys (par le biais d'attentes). - En posant les paramtres attendus d'une mthode - ils agissent comme des gardiens : - un appel sur eux doit tre ralis correctement. - Si les attentes ne sont pas atteintes ils nous pargnent - l'effort de l'criture d'une assertion de test avec - chec en ralisant cette tche notre place. - Dans le cas d'une connexion une base de donnes - imaginaire ils peuvent tester si la requte, disons SQL, - a bien t form par l'objet qui utilise cette connexion. - Mettez-les sur pied avec des attentes assez prcises - et vous verrez que vous n'aurez presque plus d'assertion crire manuellement. -

-
-
-

- Comme pour la cration des bouchons serveur, tout ce dont - nous avons besoin c'est d'un classe existante. - La fameuse connexion une base de donnes qui ressemblerait ... -class DatabaseConnection { - function DatabaseConnection() { - } - - function query() { - } - - function selectQuery() { - } -} -]]> - Cette classe n'a pas encore besoin d'tre implmente. - Pour en crer sa version fantaisie nous devons juste - inclure la librairie d'objet fantaisie puis lancer le gnrateur... -require_once('simpletest/unit_tester.php'); -require_once('simpletest/mock_objects.php'); -require_once('database_connection.php'); - -Mock::generate('DatabaseConnection'); -]]> - Ceci gnre une classe clone appele MockDatabaseConnection. - Nous pouvons dsormais crer des instances de - cette nouvelle classe l'intrieur mme de notre scnario de test... - -class MyTestCase extends UnitTestCase { - - function testSomething() { - $connection = &new MockDatabaseConnection($this); - } -} -]]> - Contrairement aux bouchons, le constructeur - d'une classe fantaisie a besoin d'une rfrence au scnario - de test pour pouvoir transmettre les succs - et les checs pendant qu'il vrifie les attentes. - Concrtement a veut dire que les objets fantaisie - ne peuvent tre utiliss qu'au sein d'un scnario de test. - Malgr tout, cette puissance supplmentaire implique - que les bouchons ne sont que rarement utiliss - si des objets fantaisie sont disponibles. -

-
-
-

- La version fantaisie d'une classe contient - toutes les mthodes de l'originale. - De la sorte une opration comme - query()]]> - est encore possible. - Tout comme avec les bouchons, nous pouvons remplacer - la valeur nulle renvoye par dfaut... -$connection->setReturnValue('query', 37); -]]> - Dsormais chaque appel de - query()]]> - nous recevons comme rsultat 37. - Tout comme avec les bouchons nous pouvons utiliser - des jokers et surcharger le paramtre joker. - Nous pouvons aussi ajouter des mthodes supplmentaires - l'objet fantaisie lors de sa gnration - et lui choisir un nom de classe qui lui soit propre... -Mock::generate('DatabaseConnection', 'MyMockDatabaseConnection', array('setOptions')); -]]> - Ici l'objet fantaisie se comportera comme - si setOptions() existait dans la classe originale. - C'est pratique si une classe a utilis le mcanisme - overload() de PHP pour ajouter des mthodes dynamiques. - Vous pouvez crer des fantaisies spciales pour simuler cette situation. -

-

- Tous les modles disponibles avec les bouchons serveur - le sont galement avec les objets fantaisie... - - Une nouvelle fois, supposons que cet itrateur - ne retourne que du texte jusqu'au moment o il atteint - son terme, quand il renvoie false. - Nous pouvons le simuler avec... - - $iterator = &new MockIterator($this); - $iterator->setReturnValue('next', false); - $iterator->setReturnValueAt(0, 'next', 'First string'); - $iterator->setReturnValueAt(1, 'next', 'Second string'); - ... - } -} -]]> - Au moment du premier appel next() - sur l'itrateur fantaisie il renverra tout d'abord - "First string", puis ce sera au tour de - "Second string" au deuxime appel - et ensuite pour tout appel suivant false - sera renvoy. - Ces valeurs renvoyes successivement sont prioritaires - sur la valeur constante retourne. - Cette dernire est un genre de valeur par dfaut si vous voulez. -

-

- Reprenons aussi le conteneur d'information bouchonn - avec des pairs clef / valeur... - - Il s'agit l d'une situation classique - d'utilisation d'objets fantaisie tant donn - que la configuration peut varier grandement de machine machine : - a contraint fortement la fiabilit de nos tests - si nous l'utilisons directement. - Le problme est que toutes les donnes nous parviennent - travers la mthode getValue() - et que nous voulons des rsultats diffrents pour des clefs diffrentes. - Heureusement les objets fantaisie ont un systme de filtrage... -$config = &new MockConfiguration($this); -$config->setReturnValue('getValue', 'primary', array('db_host')); -$config->setReturnValue('getValue', 'admin', array('db_user')); -$config->setReturnValue('getValue', 'secret', array('db_password')); -]]> - Le paramtre en plus est une liste d'arguments - faire correspondre. Dans ce cas nous essayons - de faire correspondre un unique argument : - en l'occurrence la clef recherche. - Maintenant que la mthode getValue() - est invoque sur l'objet fantaisie... -getValue('db_user') -]]> - ...elle renverra "admin". - Elle le trouve en essayant de faire correspondre - les arguments entrants dans sa liste - d'arguments sortants les uns aprs les autres - jusqu'au moment o une correspondance exacte est atteinte. -

-

- Il y a des fois o vous souhaitez - qu'un objet spcifique soit servi par la fantaisie - plutt qu'une copie. - De nouveau c'est identique au mcanisme des bouchons serveur... - - Dans ce cas vous pouvez placer une rfrence - dans la liste renvoye par l'objet fantaisie... - -$vector = &new MockVector($this); -$vector->setReturnReference('get', $thing, array(12)); -]]> - Avec cet arrangement vous savez qu' chaque appel - de get(12)]]> - le mme $thing sera renvoy. -

-
-
-

- Mme si les bouchons serveur vous isolent - du dsordre du monde rel, il ne s'agit l que - de la moiti du bnfice potentiel. - Vous pouvez avoir une classe de test recevant - les messages ad hoc, mais est-ce que votre nouvelle classe - renvoie bien les bons ? - Le tester peut devenir cafouillis sans une librairie d'objets fantaisie. -

-

- Pour l'exemple, prenons une classe SessionPool - laquelle nous allons ajouter une fonction de log. - Plutt que de complexifier la classe originale, - nous souhaitons ajouter ce comportement avec un dcorateur (GOF). - Pour l'instant le code de SessionPool ressemble ... -class SessionPool { - function SessionPool() { - ... - } - - function &findSession($cookie) { - ... - } - ... -} - -class Session { - ... -} -]]> - - Alors que pour notre code de log, nous avons... - -class Log { - function Log() { - ... - } - - function message() { - ... - } -} - -class LoggingSessionPool { - function LoggingSessionPool(&$session_pool, &$log) { - ... - } - - function &findSession($cookie) { - ... - } - ... -} -]]> - Dans tout ceci, la seule classe tester est - LoggingSessionPool. En particulier, - nous voulons vrifier que la mthode findSession() - est appele avec le bon identifiant de session au sein du cookie - et qu'elle renvoie bien le message "Starting session $cookie" - au loggueur. -

-

- Bien que nous ne testions que quelques lignes - de code de production, voici la liste des choses - faire dans un scnario de test conventionnel : -

    -
  1. Crer un objet de log.
  2. -
  3. Indiquer le rpertoire d'criture du fichier de log.
  4. -
  5. Modifier les droits sur le rpertoire pour pouvoir y crire le fichier.
  6. -
  7. Crer un objet SessionPool.
  8. -
  9. Lancer une session, ce qui demande probablement pas mal de choses.
  10. -
  11. Invoquer findSession().
  12. -
  13. Lire le nouvel identifiant de session (en esprant qu'il existe un accesseur !).
  14. -
  15. Lever une assertion de test pour vrifier que cet identifiant correspond bien au cookie.
  16. -
  17. Lire la dernire ligne du fichier de log.
  18. -
  19. Supprimer avec une (ou plusieurs) expression rationnelle les timestamps de log en trop, etc.
  20. -
  21. Vrifier que le message de session est bien dans le texte.
  22. -
- Pas tonnant que les dveloppeurs dtestent - crire des tests quand ils sont aussi ingrats. - Pour rendre les choses encore pire, chaque fois que - le format de log change ou bien que la mthode de cration - des sessions change, nous devons rcrire une partie - des tests alors mme qu'ils ne testent pas ces parties - du systme. Nous sommes en train de prparer - le cauchemar pour les dveloppeurs de ces autres classes. -

-

- A la place, voici la mthode complte pour le test - avec un peu de magie via les objets fantaisie... - - $session = &new MockSession($this); - $pool = &new MockSessionPool($this); - $pool->setReturnReference('findSession', $session); - $pool->expectOnce('findSession', array('abc')); - - $log = &new MockLog($this); - $log->expectOnce('message', array('Starting session abc')); - - $logging_pool = &new LoggingSessionPool($pool, $log); - $this->assertReference($logging_pool->findSession('abc'), $session); - $pool->tally(); - $log->tally(); - } -} -]]> - Commenons par crire une session simulacre. - Pas la peine d'tre trop pointilleux avec - celle-ci puisque la vrification de la session - dsire est effectue ailleurs. Nous avons - juste besoin de vrifier qu'il s'agit de - la mme que celle qui vient du groupe commun des sessions. -

-

- findSession() est un mthode fabrique - dont la simulation est dcrite plus haut. - Le point de dpart vient avec le premier appel - expectOnce(). Cette ligne indique - qu' chaque fois que findSession() - est invoqu sur l'objet fantaisie, il vrifiera - les arguments entrant. S'il ne reoit - que la chane "abc" en tant qu'argument - alors un succs est envoy au testeur unitaire, - sinon c'est un chec qui est gnr. - Il s'agit l de la partie qui teste si nous avons bien - la bonne session. La liste des arguments suit - une format identique celui qui prcise les valeurs renvoyes. - Vous pouvez avoir des jokers et des squences - et l'ordre de l'valuation restera le mme. -

-

- Si l'appel n'est jamais effectu alors n'est gnr - ni le succs, ni l'chec. Pour contourner cette limitation, - nous devons dire l'objet fantaisie que le test est termin : - il pourra alors dcider si les attentes ont t rpondues. - L'assertion du testeur unitaire de ceci est dclenche - par l'appel tally() la fin du test. -

-

- Nous utilisons le mme modle pour mettre sur pied - le loggueur fantaisie. Nous lui indiquons que message() - devrait tre invoqu une fois et une fois seulement - avec l'argument "Starting session abc". - En testant les arguments d'appel, plutt que ceux de sortie du loggueur, - nous isolons le test de tout modification dans le loggueur. -

-

- Nous commenons le lancement nos tests la cration - du nouveau LoggingSessionPool - et nous l'alimentons avec nos objets fantaisie juste crs. - Dsormais tout est sous contrle. Au final nous confirmons - que le $session donn au dcorateur est bien - celui reu et prions les objets fantaisie de lancer leurs - tests de comptage d'appel interne avec les appels tally(). -

-

- Il y a encore pas mal de code de test, mais ce code est trs strict. - S'il vous semble encore terrifiant il l'est bien moins - que si nous avions essay sans les objets fantaisie - et ce test en particulier, interactions plutt que rsultat, - est toujours plus difficile mettre en place. - Le plus souvent vous aurez besoin de tester des situations - plus complexes sans ce niveau ni cette prcision. - En outre une partie peut tre remanie avec la mthode - de scnario de test setUp(). -

-

- Voici la liste complte des attentes que vous pouvez - placer sur un objet fantaisie avec - SimpleTest... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttenteNcessite tally()
expectArguments($method, $args)Non
expectArgumentsAt($timing, $method, $args)Non
expectCallCount($method, $count)Oui
expectMaximumCallCount($method, $count)Non
expectMinimumCallCount($method, $count)Oui
expectNever($method)Non
expectOnce($method, $args)Oui
expectAtLeastOnce($method, $args)Oui
- O les paramtres sont... -

-
$method
-
Le nom de la mthode, sous la forme d'une chane, - laquelle la condition doit tre applique.
-
$args
-
- Les arguments sous la forme d'une liste. - Les jokers peuvent tre inclus de la mme manire - qu'avec setReturn(). - Cet argument est optionnel pour expectOnce() - et expectAtLeastOnce(). -
-
$timing
-
- Le seul point dans le temps pour tester - la condition. Le premier appel commence zro. -
-
$count
-
Le nombre d'appels attendu.
-
- La mthode expectMaximumCallCount() - est lgrement diffrente dans le sens o elle ne pourra - gnrer qu'un chec. Elle reste silencieuse - si la limite n'est jamais atteinte. -

-

- Par ailleurs si vous avez just un appel dans votre test, - vrifiez bien que vous utiliser - expectOnce.
- Utiliser $mocked->expectAt(0, 'method', 'args); - tout seul ne sera pas pris en compte : - la vrification des arguments et le comptage total - sont pour l'instant encore indpendant. -

-

- Comme avec les assertions dans les scnarios de test, - toutes ces attentes peuvent accepter une surcharge de - message sous la forme d'un paramtre supplmentaire. - Par ailleurs le message d'chec original peut tre inclus - dans le rsultat avec "%s". -

-
-
-

- Il existe trois approches pour crer des objets - fantaisie en comprenant celle utilise par SimpleTest. - Les coder la main en utilisant une classe de base, - les gnrer dans un fichier ou les gnrer dynamiquement la vole. -

-

- Les objets fantaisie gnrs avec - SimpleTest sont dynamiques. - Ils sont crs l'excution dans la mmoire, - grce eval(), plutt qu'crits dans un fichier. - Cette opration les rend facile crer, - en une seule ligne, surtout par rapport leur cration - la main dans une hirarchie de classe parallle. - Le problme avec ce comportement tient gnralement - dans la mise en place des tests proprement dits. - Si les objets originaux changent les versions fantaisie - sur lesquels reposent les tests, une dsynchronisation peut subvenir. - Cela peut aussi arriver avec l'approche en hirarchie parallle, - mais c'est dtect beaucoup plus vite. -

-

- Bien sr, la solution est d'ajouter de vritables tests d'intgration. - Vous n'en avez pas besoin de beaucoup - et le ct pratique des objets fantaisie fait plus - que compenser la petite dose de test supplmentaire. - Vous ne pouvez pas avoir confiance dans du code qui - ne serait test que par des objets fantaisie. -

-

- Si vous restez dtermin de construire des librairies - statiques d'objets fantaisie parce que vous souhaitez - muler un comportement trs spcifique, - vous pouvez y parvenir grce au gnrateur de classe de SimpleTest. - Dans votre fichier librairie, par exemple - mocks/connection.php pour une connexion une base de donnes, - crer un objet fantaisie et provoquer l'hritage - pour hriter pour surcharger des mthodes spciales - ou ajouter des prrglages... - - Mock::generate('Connection', 'BasicMockConnection'); - class MockConnection extends BasicMockConnection { - function MockConnection(&$test, $wildcard = '*') { - $this->BasicMockConnection($test, $wildcard); - $this->setReturn('query', false); - } - } -?> -]]> - L'appel generate dit au gnrateur de classe - d'en crer une appele BasicMockConnection - plutt que la plus courante MockConnection. - Ensuite nous hritons partir de celle-ci pour obtenir - notre version de MockConnection. - En interceptant de cette manire nous pouvons ajouter - un comportement, ici transformer la valeur par dfaut de - query() en "false". - En utilisant le nom par dfaut nous garantissons - que le gnrateur de classe fantaisie n'en recrera - pas une autre diffrente si il est invoqu ailleurs - dans les tests. Il ne crera jamais de classe - si elle existe dj. Aussi longtemps que le fichier - ci-dessus est inclus avant alors tous les tests qui - gnraient MockConnection devraient - utiliser notre version prsent. Par contre si - nous avons une erreur dans l'ordre et que la librairie - de fantaisie en cre une d'abord alors la cration - de la classe chouera tout simplement. -

-

- Utiliser cette astuce si vous vous trouvez avec beaucoup - de comportement en commun sur les objets fantaisie - ou si vous avez de frquents problmes d'intgration - plus tard dans les tapes de test. -

-
-
-

- Mais au moment d'crire ces lignes c'est le seul - grer les objets fantaisie, donc vous tes bloqu avec lui ? -

-

- Non, pas du tout. - SimpleTest est une bote outils - et parmi ceux-ci on trouve les objets fantaisie - qui peuvent tre utiliss indpendamment. - Supposons que vous avez votre propre testeur unitaire favori - et que tous vos tests actuels l'utilisent. - Prtendez que vous avez appel votre tester unitaire PHPUnit - (c'est ce que tout le monde a fait) et que la classe principale - de test ressemble ... - - La seule chose que la mthode assertion() ralise, - c'est de prparer une sortie embellie alors le paramtre boolien - de l'assertion sert dterminer s'il s'agit d'une erreur ou d'un succs. - Supposons qu'elle est utilise de la manire suivante... -assertion('I hope this file exists', file_exists('my_file')); -]]> - Comment utiliser les objets fantaisie avec ceci ? -

-

- Il y a une mthode protge sur la classe de base - des objets fantaisie : elle s'appelle _assertTrue(). - En surchargeant cette mthode nous pouvons utiliser - notre propre format d'assertion. - Nous commenons avec une sous-classe, dans my_mock.php... -SimpleMock($test, $wildcard); - } - - function _assertTrue($assertion, $message) { - $test = &$this->getTest(); - $test->assertion($message, $assertion); - } - } -?> -]]> - Maintenant une instance de MyMock - crera un objet qui parle le mme langage que votre testeur. - Bien sr le truc c'est que nous crons jamais un tel objet : - le gnrateur s'en chargera. Nous avons juste besoin - d'une ligne de code supplmentaire pour dire au gnrateur - d'utiliser vos nouveaux objets fantaisie... -SimpleMock(&$test, $wildcard); - } - - function _assertTrue($assertion, $message , &$test) { - $test->assertion($message, $assertion); - } - } - SimpleTestOptions::setMockBaseClass('MyMock'); -?> -]]> - A partir de maintenant vous avez juste inclure - my_mock.php la place de la version par dfaut - simple_mock.php et vous pouvez introduire - des objets fantaisie dans votre suite de tests existants. -

-
-
- - - Que sont les objets fantaisie ? - - - Crer des objets fantaisie. - - - L'objet fantaisie - acteur ou bouchon. - - - L'objet fantaisie - critique avec des attentes. - - - D'autres approches - y compris des librairies d'objets fantaisie. - - - Utiliser les objets fantaisie avec - d'autres testeurs unitaires. - - - - - L'article originel sur - les objets fantaisie. - - - La page du projet SimpleTest sur - SourceForge. - - - La page d'accueil de SimpleTest sur - LastCraft. - - - - - dveloppement logiciel, - programmation en php, - outils de dveloppement logiciel, - tutoriel php, - scripts php gratuits, - architecture, - ressources php, - mock objects, - objets fantaisie, - junit, - test php, - test unitaire, - tester en php - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/mock_objects_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/mock_objects_tutorial.xml deleted file mode 100644 index b168d410..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/mock_objects_tutorial.xml +++ /dev/null @@ -1,374 +0,0 @@ - - - - - tutorial sur les tests unitaires en PHP - Utiliser les objets fantaisie en PHP - -
-

- Avant d'ajouter de nouvelles fonctionnalits - il y a du remaniement faire. - Nous allons effectuer des tests chronomtrs - et la classe TimeTestCase a dfinitivement - besoin d'un fichier propre. - Appelons le tests/time_test_case.php... -UnitTestCase($test_name); - } - function assertSameTime($time1, $time2, $message = '') { - if (! $message) { - $message = "Time [$time1] should match time [$time2]"; - } - $this->assertTrue( - ($time1 == $time2) || ($time1 + 1 == $time2), - $message); - } -} -?> -]]> - Nous pouvons lors utiliser require() - pour incorporer ce fichier dans le script all_tests.php. -

-
-
-

- Je ne sais pas trop quel devrait tre - le format du message de log pour le test alors - pour vrifier le timestamp nous pourrions juste - faire la plus simple des choses possibles, - c'est dire rechercher une suite de chiffres. - -require_once('../classes/clock.php'); - -class TestOfLogging extends TimeTestCase { - function TestOfLogging() { - $this->TimeTestCase('Log class test'); - } - function setUp() { - @unlink('../temp/test.log'); - } - function tearDown() { - @unlink('../temp/test.log'); - } - function getFileLine($filename, $index) { - $messages = file($filename); - return $messages[$index]; - } - function testCreatingNewFile() { - ... - } - function testAppendingToFile() { - ... - } - function testTimestamps() { - $log = new Log('../temp/test.log'); - $log->message('Test line'); - $this->assertTrue( - preg_match('/(\d+)/', $this->getFileLine('../temp/test.log', 0), $matches), - 'Found timestamp'); - $clock = new clock(); - $this->assertSameTime((integer)$matches[1], $clock->now(), 'Correct time'); - } -} -?> -]]> - Ce scnario de test cre un nouvel objet Log - et crit un message. Nous recherchons une suite de chiffres - et nous la comparons l'horloge prsente en utilisant - notre objet Clock. Bien sr a ne marche pas - avant d'avoir crit le code. -

-

All tests

- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 1/] in [Test line 1]
- Pass: log_test.php->Log class test->testappendingtofile->Expecting [/Test line 2/] in [Test line 2]
- Pass: log_test.php->Log class test->testcreatingnewfile->Created before message
- Pass: log_test.php->Log class test->testcreatingnewfile->File created
- Fail: log_test.php->Log class test->testtimestamps->Found timestamp
-
- Notice: Undefined offset: 1 in /home/marcus/projects/lastcraft/tutorial_tests/tests/log_test.php on line 44
- Fail: log_test.php->Log class test->testtimestamps->Correct time
- Pass: clock_test.php->Clock class test->testclockadvance->Advancement
- Pass: clock_test.php->Clock class test->testclocktellstime->Now is the right time
-
3/3 test cases complete. - 6 passes and 2 fails.
-
- Cette suite de tests montre encore les succs - de notre modification prcdente. -

-

- Nous pouvons faire passer les tests en ajoutant - simplement un timestamp l'criture dans le fichier. - Oui, bien sr, tout ceci est assez trivial et d'habitude - je ne le testerais pas aussi fanatiquement, - mais a va illustrer un problme plus gnral... - Le fichier log.php devient... - -require_once('../classes/clock.php'); - -class Log { - var $_file_path; - - function Log($file_path) { - $this->_file_path = $file_path; - } - - function message($message) { - $clock = new Clock(); - $file = fopen($this->_file_path, 'a'); - fwrite($file, "[" . $clock->now() . "] $message\n"); - fclose($file); - } -} -?> -]]> - Les tests devraient passer. -

-

- Par contre notre nouveau test est plein de problmes. - Qu'est-ce qui se passe si notre format de temps change ? - Les choses vont devenir largement plus compliques - si a venait se produire. - Cela veut aussi dire que n'importe quel changement - du format de notre classe horloge causera aussi - un chec dans les tests de log. - Bilan : nos tests de log sont tout mlangs - avec les test d'horloge et par la mme trs fragiles. - Tester la fois des facettes de l'horloge - et d'autres du log manque de cohsion, - ou de focalisation tanche si vous prfrez. - Nos problmes sont causs en partie parce que - le rsultat de l'horloge est imprvisible alors que - l'unique chose tester est la prsence - du rsultat de Clock::now(). - Peu importe le contenu de l'appel de cette mthode. -

-

- Pouvons-nous rendre cet appel prvisible ? - Oui si nous pouvons forcer le loggueur utiliser - une version factice de l'horloge lors du test. - Cette classe d'horloge factice devrait se comporter - exactement comme la classe Clock - part une sortie fixe dans la mthode now(). - Et au passage, a nous affranchirait mme - de la classe TimeTestCase ! -

-

- Nous pourrions crire une telle classe assez - facilement mme s'il s'agit d'un boulot plutt fastidieux. - Nous devons juste crer une autre classe - d'horloge avec la mme interface sauf que - la mthode now() retourne une valeur modifiable - via une autre mthode d'initialisation. - C'est plutt pas mal de travail pour un test plutt mineur. -

-

- Sauf que a se fait sans aucun effort. -

-
-
-

- Pour atteindre le nirvana de l'horloge instantan - pour test nous n'avons besoin que de trois lignes de code supplmentaires... - - Cette instruction inclut le code de gnrateur - d'objet fantaisie. Le plus simple reste de le mettre - dans le script all_tests.php tant donn - qu'il est utilis assez frquemment. - - C'est la ligne qui fait le travail. - Le gnrateur de code scanne la classe, - en extrait toutes ses mthodes, cre le code - pour gnrer une classe avec une interface identique, - mais en ajoutant le nom "Mock" - et ensuite eval() le nouveau code pour crer la nouvelle classe. - - Cette ligne peut tre ajoute dans n'importe - quelle mthode de test qui nous intresserait. - Elle cre l'horloge fantaisie prte recevoir nos instructions. -

-

- Notre scnario de test en est ses premiers pas - vers un nettoyage radical... - -Mock::generate('Clock'); - -class TestOfLogging extends UnitTestCase { - function TestOfLogging() { - $this->UnitTestCase('Log class test'); - } - function setUp() { - @unlink('../temp/test.log'); - } - function tearDown() { - @unlink('../temp/test.log'); - } - function getFileLine($filename, $index) { - $messages = file($filename); - return $messages[$index]; - } - function testCreatingNewFile() { - ... - } - function testAppendingToFile() { - ... - } - function testTimestamps() { - $clock = &new MockClock($this); - $clock->setReturnValue('now', 'Timestamp'); - $log = new Log('../temp/test.log'); - $log->message('Test line', &$clock); - $this->assertWantedPattern( - '/Timestamp/', - $this->getFileLine('../temp/test.log', 0), - 'Found timestamp'); - } -} -?> -]]> - Cette mthode de test cre un objet MockClock - puis dfinit la valeur retourn par la mthode - now() par la chane "Timestamp". - A chaque fois que nous appelons $clock->now(), - elle retournera cette mme chane. - a devrait tre quelque chose de facilement reprable. -

-

- Ensuite nous crons notre loggueur et envoyons un message. - Nous incluons dans l'appel message() - l'horloge que nous souhaitons utiliser. - a veut dire que nous aurons ajouter un paramtre - optionnel la classe de log pour rendre ce test possible... -_file_path = $file_path; - } - - function message($message, $clock = false) { - if (!is_object($clock)) { - $clock = new Clock(); - } - $file = fopen($this->_file_path, 'a'); - fwrite($file, "[" . $clock->now() . "] $message\n"); - fclose($file); - } -} -]]> - Maintenant tous les tests passent et ils ne testent - que le code du loggueur. Nous pouvons nouveau respirer. -

-

- Est-ce que ce paramtre supplmentaire dans la classe Log - vous gne ? Nous n'avons chang l'interface que - pour faciliter les tests aprs tout. - Les interfaces ne sont-elles pas la chose la plus importante ? - Avons nous souill notre classe avec du code de test ? -

-

- Peut-tre, mais rflchissez ce qui suit. - A la prochaine occasion, - regardez une carte avec des circuits imprims, - peut-tre la carte mre de l'ordinateur que - ous regardez actuellement. Sur la plupart d'entre elles - vous trouverez un trou bizarre et vide - ou alors un point de soudure sans rien de fix - ou mme une pingle ou une prise sans aucune fonction vidente. - Peut-tre certains sont l en prvision d'une expansion - ou d'une variation future, mais la plupart n'y sont que pour les tests. -

-

- Pensez-y. Les usines qui fabriquent ces cartes imprimes - par centaine de milliers gaspillent des matires premires - sur des pices qui n'ajoutent rien la fonction finale. - Si les ingnieurs matriel peuvent faire quelques sacrifices - l'lgance, je suis sr que nous pouvons aussi le faire. - Notre sacrifice ne gaspille pas de matriel aprs tout. -

-

- a vous gne encore ? En fait moi aussi, mais pas tellement ici. - La priorit numro 1 reste du code qui marche, - pas un prix pour minimalisme. - Si a vous gne vraiment alors dplacez la cration - de l'horloge dans une autre mthode mre protge. - Ensuite sous classez l'horloge pour le test - et crasez la mthode mre avec une qui renvoie le leurre. - Vos tests sont bancals mais votre interface est intacte. -

-

- Une nouvelle fois je vous laisse la dcision finale. -

-
-
- - - Remanier les tests - dans le but de rutiliser notre nouveau test de temps. - - - Ajouter des timestamps de Log. - - - Crer une horloge fantaisie - pour rendre les tests cohsifs. - - - - - La section prcdente : - tutorial de test unitaire. - - - La section suivante : - les frontires de l'application. - - - Vous aurez besoin du - framework de test SimpleTest - pour essayer ces exemples. - - - Documents sur les objets fantaisie. - - - - - dveloppement logiciel, - programmation php, - outils de dveloppement logiciel, - tutoriel php, - scripts php gratuits, - architecture, - ressources php, - objet fantaisie, - junit, - phpunit, - simpletest, - test php, - outil de test unitaire, - suite de test php - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/overview.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/overview.xml deleted file mode 100644 index 52b4b209..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/overview.xml +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - Aperu et liste des fonctionnalits des testeurs unitaires PHP et web de SimpleTest PHP - - -
-

- Le coeur de SimpleTest est un framework de test construit autour de classes de scnarios de test. Celles-ci sont crites comme des extensions des classes premires de scnarios de test, chacune largie avec des mthodes qui contiennent le code de test effectif. Les scripts de test de haut niveau invoque la mthode run() chaque scnario de test successivement. Chaque mthode de test est crite pour appeler des assertions diverses que le dveloppeur suppose tre vraies, assertEqual() par exemple. Si l'assertion est correcte, alors un succs est expdi au rapporteur observant le test, mais toute erreur dclenche une alerte et une description de la dissension. -

-

- Un scnario de test ressemble ... -MyTestCase extends UnitTestCase { - - function testLog() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -]]> -

-

- Ces outils sont conus pour le dveloppeur. Les tests sont crits en PHP directement, plus ou moins simultanment avec la construction de l'application elle-mme. L'avantage d'utiliser PHP lui-mme comme langage de test est qu'il n'y a pas de nouveau langage apprendre, les tests peuvent commencer directement et le dveloppeur peut tester n'importe quelle partie du code. Plus simplement, toutes les parties qui peuvent tre accdes par le code de l'application peuvent aussi tre accdes par le code de test si ils sont tous les deux dans le mme langage. -

-

- Le type de scnario de test le plus simple est le UnitTestCase. Cette classe de scnario de test inclut les tests standards pour l'galit, les rfrences et l'appariement de motifs (via les expressions rationnelles). Ceux-ci testent ce que vous seriez en droit d'attendre du rsultat d'une fonction ou d'une mthode. Il s'agit du type de test le plus commun pendant le quotidien du dveloppeur, peut-tre 95% des scnarios de test. -

-

- La tche ultime d'une application web n'est cependant pas de produire une sortie correcte partir de mthodes ou d'objets, mais plutt de produire des pages web. La classe WebTestCase teste des pages web. Elle simule un navigateur web demandant une page, de faon exhaustive : cookies, proxies, connexions scurises, authentification, formulaires, cadres et la plupart des lments de navigation. Avec ce type de scnario de test, le dveloppeur peut garantir que telle ou telle information est prsente dans la page et que les formulaires ainsi que les sessions sont grs comme il faut. -

-

- Un scnario de test web ressemble ... -MySiteTest extends WebTestCase { - - function testHomePage() { - $this->get('http://www.my-site.com/index.php'); - $this->assertTitle('My Home Page'); - $this->clickLink('Contact'); - $this->assertTitle('Contact me'); - $this->assertWantedPattern('/Email me at/'); - } -} -]]> -

-
-
-

- Ci-dessous vous trouverez un canevas assez brut des fonctionnalits aujourd'hui et pour demain, sans oublier leur date approximative de publication. J'ai bien peur qu'il soit modifiable sans pr-avis tant donn que les jalons dpendent beaucoup sur le temps disponible. Les trucs en vert ont t cods, mais pas forcment dj rendus public. Si vous avez une besoin pressant pour une fonctionnalit verte mais pas encore publique alors vous devriez retirer le code directement sur le CVS chez SourceFourge. Une fonctionnalite publie est indiqu par "Fini". - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FonctionnalitDescriptionPublication
Scnariot de test unitaireLes classes de test et assertions de baseFini
Affichage HTMLL'affichage le plus simple possibleFini
Autochargement des scnarios de testLire un fichier avec des scnarios de test et les charger dans un groupe de tests automatiquementFini
Gnrateur de code d'objets fantaisieDes objets capable de simuler d'autres objets, supprimant les dpendances dans les testsFini
Bouchons serveurDes objets fantaisie sans rsultat attendu utiliser l'extrieur des scnarios de test, pour le prototypage par exemple.Fini
Intgration d'autres testeurs unitaires - La capacit de lire et simuler d'autres scnarios de test en provenance de PHPUnit et de PEAR::Phpunit.Fini
Scnario de test webAppariement basique de motifs dans une page tlcharge.Fini
Analyse de page HTMLPermet de suivre les liens et de trouver la balise de titreFini
Simulacre partielSimuler des parties d'une classe pour tester moins qu'une classe ou dans des cas complexes.Fini
Gestion des cookies WebGestion correcte des cookies au tlchargement d'une page.Fini
Suivi des redirectionsLe tlchargement d'une page suit automatiquement une redirection 300.Fini
Analyse d'un formulaireLa capacit de valider un formulaire simple et d'en lire les valeurs par dfaut.Fini
Interface en ligne de commandeAffiche le rsultat des tests sans navigateur web.Fini
Mise nu des attentes d'une classePeut crer des tests prcis avec des simulacres ainsi que des scnarios de test.Fini
Sortie et analyse XMLPermet de tester sur plusieurs htes et d'intgrer des extensions d'acceptation de test.Fini
Scnario de test en ligne de commandePermet de tester des outils ou scripts en ligne de commande et de manier des fichiers.Fini
Compatibilit avec PHP DocumentorGnration automatique et complte de la documentation au niveau des classes.Fini
Interface navigateurMise nu des niveaux bas de l'interface du navigateur web pour des scnarios de test plus prcis.Fini
Authentification HTTPTlchargement des pages web protges avec une authentification basique seulement.Fini
Boutons de navigation d'un navigateurArrire, avant et recommencerFini
Support de SSLPeut se connecter des pages de type https.Fini
Support de proxyPeut se connecter via des proxys communsFini
Support des cadresGre les cadres dans les scnarios de test web.Fini
Test de l'upload de fichierPeut simuler la balise input de type file1.0.1
Amlioration sur la machinerie des rapportsRetouche sur la transmission des messages pour une meilleur coopration avec les IDEs1.1
Amlioration de l'affichage des testsUne meilleure interface graphique web, avec un arbre des scnarios de test.1.1
LocalisationAbstraction des messages et gnration du code partir de fichiers XML.1.1
Simulation d'interfacePeut gnrer des objets fantaisie tant vers des interfaces que vers des classes.2.0
Test sur es exceptionsDans le mme esprit que sur les tests des erreurs PHP.2.0
Rercherche d'lments avec XPathPeut utiliser Tidy HTML pour un appariement plus rapide et plus souple.2.0
- La migration vers PHP5 commencera juste aprs la srie des 1.0, partir de l PHP4 ne sera plus support. SimpleTest est actuellement compatible avec PHP5 mais n'utilisera aucune des nouvelles fonctionnalits avant la version 2. -

-
-
-

- Le processus est au moins aussi important que les outils. Le type de procdure que fait un usage le plus intensif des outils de test pour dveloppeur est bien sr l'Extreme Programming. Il s'agit l d'une des mthodes agiles qui combinent plusieurs pratiques pour "lisser la courbe de cot" du dveloppement logiciel. La plus extrme reste le dveloppement pilot par les tests, o vous devez adhrer la rgle du pas de code avant d'avoir un test. Si vous tes plutt du genre planninficateur ou que vous estimez que l'exprience compte plus que l'volution, vous prfrerez peut-tre l'approche RUP. Je ne l'ai pas test mais je peux voir o vous aurez besoin d'outils de test (cf. illustration 9). -

-

- La plupart des testeurs unitaires sont dans une certaine mesure un clone de JUnit, au moins dans l'interface. Il y a normment d'information sur le site de JUnit, commencer par la FAQ quie contient pas mal de conseils gnraux sur les tests. Une fois mordu par le bogue vous apprcierez srement la phrase infect par les tests trouve par Eric Gamma. Si vous tes encore en train de tergiverser sur un testeur unitaire, sachez que les choix principaux sont PHPUnit et Pear PHP::PHPUnit. De nombreuses fonctionnalits de SimpleTest leurs font dfaut, mais la version PEAR a d'ores et dj t mise jour pour PHP5. Elle est aussi recommande si vous portez des scnarios de test existant depuis JUnit. -

-

- Les dveloppeurs de bibliothque n'ont pas l'air de livrer trs souvent des tests avec leur code : c'est bien dommage. Le code d'une bibliothque qui inclut des tests peut tre remani avec plus de scurit et le code de test sert de documentation additionnelle dans un format assez standard. Ceci peut pargner la pche aux indices dans le code source lorsque qu'un problme survient, en particulier lors de la mise jour d'une telle bibliothque. Parmi les bibliothques utilisant SimpleTest comme testeur unitaire on retrouve WACT et PEAR::XML_HTMLSax. -

-

- Au jour d'aujourd'hui il manque tristement beaucoup de matire sur les objets fantaisie : dommage, surtout que tester unitairement sans eux reprsente pas mal de travail en plus. L'article original sur les objets fantaisie est trs orient Java, mais reste intressant lire. Etant donn qu'il s'agit d'une nouvelle technologie il y a beaucoup de discussions et de dbats sur comment les utiliser, souvent sur des wikis comme Extreme Tuesday ou www.mockobjects.comou the original C2 Wiki. Injecter des objets fantaisie dans une classe est un des champs principaux du dbat : cet article chez IBM en est un bon point de dpart. -

-

- Il y a normement d'outils de test web mais la plupart sont crits en Java. De plus les tutoriels et autres conseils sont plutt rares. Votre seul espoir est de regarder directement la documentation pour HTTPUnit, HTMLUnit ou JWebUnit et d'esprer y trouver pour des indices. Il y a aussi des frameworks bass sur XML, mais de nouveau la plupart ont besoin de Java pour tourner. -

-
-
- - - Rsum rapide de l'outil SimpleTest pour PHP. - - - La liste des fonctionnalites, la fois prsentes et venir. - - - Il y a beaucoup de ressources sur les tests unitaires sur le web. - - - - - Documentation pour SimpleTest. - - - Comment crire des scnarios de test en PHP est un tutoriel plutt avanc. - - - L'API de SimpleTest par phpdoc. - - - - - outils de dveloppement logiciel, - programmation php, - outils pour l'extreme programming, - liens pour des outils de test, - ressources pour test en php, - objets fantaise, - junit, - jwebunit, - htmlunit, - itc, - liens pour tests en php, - conseil et documentation pour test unitaire, - extreme programming en php - - - - - - Marcus Baker - - Dveloppeur principal{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packageur{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - Perrick Penet - - Traduction{@link mailto:perrick@onpk.net perrick@onpk.net} - - - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/partial_mocks_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/partial_mocks_documentation.xml deleted file mode 100644 index 7d15486d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/partial_mocks_documentation.xml +++ /dev/null @@ -1,419 +0,0 @@ - - - - - Documentation SimpleTest : les objets fantaisie partiels - - -

- Un objet fantaisie partiel n'est ni plus ni moins - qu'un modle de conception pour soulager un problme spcifique - du test avec des objets fantaisie, celui de placer - des objets fantaisie dans des coins serrs. - Il s'agit d'un outil assez limit et peut-tre mme - une ide pas si bonne que a. Elle est incluse dans SimpleTest - pour la simple raison que je l'ai trouve utile - plus d'une occasion et qu'elle m'a pargne - pas mal de travail dans ces moments-l. -

-
-
-

- Quand un objet en utilise un autre il est trs simple - d'y faire circuler une version fantaisie dj prte - avec ses attentes. Les choses deviennent un peu plus dlicates - si un objet en cre un autre et que le crateur est celui - que l'on souhaite tester. Cela revient dire que l'objet - cr devrait tre une fantaisie, mais nous pouvons - difficilement dire notre classe sous test de crer - un objet fantaisie plutt qu'un "vrai" objet. - La classe teste ne sait mme pas qu'elle travaille dans un environnement de test. -

-

- Par exemple, supposons que nous sommes en train - de construire un client telnet et qu'il a besoin - de crer une socket rseau pour envoyer ses messages. - La mthode de connexion pourrait ressemble quelque chose comme... -read( ... ); - ... - } -} -?> -]]> - Nous voudrions vraiment avoir une version fantaisie - de l'objet socket, que pouvons nous faire ? -

-

- La premire solution est de passer la socket en - tant que paramtre, ce qui force la cration - au niveau infrieur. Charger le client de cette tche - est effectivement une bonne approche si c'est possible - et devrait conduire un remaniement -- de la cration - partir de l'action. En fait, c'est l une des manires - avec lesquels tester en s'appuyant sur des objets fantaisie - vous force coder des solutions plus resserres sur leur objectif. - Ils amliorent votre programmation. -

-

- Voici ce que a devrait tre... -function &connect(&$socket, $username, $password) { - $socket->read( ... ); - ... - } -} -?> -]]> - Sous-entendu, votre code de test est typique d'un cas - de test avec un objet fantaisie. - - $socket = &new MockSocket($this); - ... - $telnet = &new Telnet(); - $telnet->connect($socket, 'Me', 'Secret'); - ... - } -} -]]> - C'est assez vident que vous ne pouvez descendre que d'un niveau. - Vous ne voudriez pas que votre application de haut niveau - cre tous les fichiers de bas niveau, sockets et autres connexions - la base de donnes dont elle aurait besoin. - Elle ne connatrait pas les paramtres du constructeur de toute faon. -

-

- La solution suivante est de passer l'objet cr sous la forme - d'un paramtre optionnel... - - function &connect($ip, $port, $username, $password, $socket = false) { - if (!$socket) { - $socket = &new Socket($ip, $port); - } - $socket->read( ... ); - ... - return $socket; - } -} -?> -]]> - Pour une solution rapide, c'est gnralement suffisant. - Ensuite le test est trs similaire : comme si le paramtre - tait transmis formellement... - - $socket = &new MockSocket($this); - ... - $telnet = &new Telnet(); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret', &$socket); - ... - } -} -]]> - Le problme de cette approche tient dans son manque de nettet. - Il y a du code de test dans la classe principale et aussi - des paramtres transmis dans le scnario de test - qui ne sont jamais utiliss. Il s'agit l d'une approche - rapide et sale, mais qui ne reste pas moins efficace - dans la plupart des situations. -

-

- Une autre solution encore est de laisser un objet fabrique - s'occuper de la cration... - - function Telnet(&$network) { - $this->_network = &$network; - } - ... - function &connect($ip, $port, $username, $password) { - $socket = &$this->_network->createSocket($ip, $port); - $socket->read( ... ); - ... - return $socket; - } -} -?> -]]> - Il s'agit l probablement de la rponse la plus travaille - tant donn que la cration est maintenant situe - dans une petite classe spcialise. La fabrique rseau - peut tre teste sparment et utilise en tant que fantaisie - quand nous testons la classe telnet... - - $socket = &new MockSocket($this); - ... - $network = &new MockNetwork($this); - $network->setReturnReference('createSocket', $socket); - $telnet = &new Telnet($network); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - } -} -]]> - Le problme reste que nous ajoutons beaucoup de classes - la bibliothque. Et aussi que nous utilisons beaucoup - de fabriques ce qui rend notre code un peu moins intuitif. - La solution la plus flexible, mais aussi la plus complexe. -

-

- Peut-on trouver un juste milieu ? -

-
-
-

- Il existe une technique pour palier ce problme - sans crer de nouvelle classe dans l'application; - par contre elle induit la cration d'une sous-classe au moment du test. - Premirement nous dplaons la cration de la socket dans sa propre mthode... - - $socket = &$this->_createSocket($ip, $port); - $socket->read( ... ); - ... - } - - function &_createSocket($ip, $port) { - return new Socket($ip, $port); - } -} -?> -]]> - Il s'agit l de la seule modification dans le code de l'application. -

-

- Pour le scnario de test, nous devons crer - une sous-classe de manire intercepter la cration de la socket... -class TelnetTestVersion extends Telnet { - var $_mock; - - function TelnetTestVersion(&$mock) { - $this->_mock = &$mock; - $this->Telnet(); - } - - function &_createSocket() { - return $this->_mock; - } -} -]]> - Ici j'ai dplac la fantaisie dans le constructeur, - mais un setter aurait fonctionn tout aussi bien. - Notez bien que la fantaisie est place dans une variable - d'objet avant que le constructeur ne soit attach. - C'est ncessaire dans le cas o le constructeur appelle - connect(). - Autrement il pourrait donner un valeur nulle partir de - _createSocket(). -

-

- Aprs la ralisation de tout ce travail supplmentaire - le scnario de test est assez simple. - Nous avons juste besoin de tester notre nouvelle classe la place... - - $socket = &new MockSocket($this); - ... - $telnet = &new TelnetTestVersion($socket); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - } -} -]]> - Cette nouvelle classe est trs simple bien sr. - Elle ne fait qu'initier une valeur renvoye, la manire - d'une fantaisie. Ce serait pas mal non plus si elle pouvait - vrifier les paramtres entrants. - Exactement comme un objet fantaisie. - Il se pourrait bien que nous ayons raliser cette astuce rgulirement : - serait-il possible d'automatiser la cration de cette sous-classe ? -

-
-
-

- Bien sr la rponse est "oui" - ou alors j'aurais arrt d'crire depuis quelques temps dj ! - Le test prcdent a reprsent beaucoup de travail, - mais nous pouvons gnrer la sous-classe en utilisant - une approche celle des objets fantaisie. -

-

- Voici donc une version avec objet fantaisie partiel du test... -Mock::generatePartial( - 'Telnet', - 'TelnetTestVersion', - array('_createSocket')); - -class TelnetTest extends UnitTestCase { - ... - function testConnection() { - $socket = &new MockSocket($this); - ... - $telnet = &new TelnetTestVersion($this); - $telnet->setReturnReference('_createSocket', $socket); - $telnet->Telnet(); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - } -} -]]> - La fantaisie partielle est une sous-classe de l'original - dont on aurait "remplac" les mthodes slectionnes - avec des versions de test. L'appel generatePartial() - ncessite trois paramtres : la classe sous classer, - le nom de la nouvelle classe et une liste des mthodes simuler. -

-

- Instancier les objets qui en rsultent est plutt dlicat. - L'unique paramtre du constructeur d'un objet fantaisie partiel - est la rfrence du testeur unitaire. - Comme avec les objets fantaisie classiques c'est ncessaire - pour l'envoi des rsultats de test en rponse la vrification des attentes. -

-

- Une nouvelle fois le constructeur original n'est pas lanc. - Indispensable dans le cas o le constructeur aurait besoin - des mthodes fantaisie : elles n'ont pas encore t inities ! - Nous initions les valeurs retournes cet instant et - ensuite lanons le constructeur avec ses paramtres normaux. - Cette construction en trois tapes de "new", - suivie par la mise en place des mthodes et ensuite - par la lancement du constructeur proprement dit est - ce qui distingue le code d'un objet fantaisie partiel. -

-

- A part pour leur construction, toutes ces mthodes - fantaisie ont les mmes fonctionnalits que dans - le cas des objets fantaisie et toutes les mthodes - non fantaisie se comportent comme avant. - Nous pouvons mettre en place des attentes trs facilement... -setReturnReference('_createSocket', $socket); - $telnet->expectOnce('_createSocket', array('127.0.0.1', 21)); - $telnet->Telnet(); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - $telnet->tally(); - } -} -]]> -

-
-
-

- Les mthodes issues d'un objet fantaisie n'ont pas - besoin d'tre des mthodes fabrique, Il peut s'agir - de n'importe quelle sorte de mthode. - Ainsi les objets fantaisie partiels nous permettent - de prendre le contrle de n'importe quelle partie d'une classe, - le constructeur except. Nous pourrions mme aller jusqu' - crer des fantaisies sur toutes les mthodes part celle - que nous voulons effectivement tester. -

-

- Cette situation est assez hypothtique, tant donn - que je ne l'ai jamais essaye. Je suis ouvert cette possibilit, - mais je crains qu'en forant la granularit d'un objet - on n'obtienne pas forcment un code de meilleur qualit. - Personnellement j'utilise les objets fantaisie partiels - comme moyen de passer outre la cration ou alors - de temps en temps pour tester le modle de conception TemplateMethod. -

-

- Pour choisir le mcanisme utiliser, on en revient - toujours aux standards de code de votre projet. -

-
-
- - - Le problme de l'injection d'un objet fantaisie. - - - Dplacer la cration vers une mthode fabrique protge. - - - L'objet fantaisie partiel gnre une sous-classe. - - - Les objets fantaisie partiels testent moins qu'une classe. - - - - - La page du projet SimpleTest sur - SourceForge. - - - L'API complte pour SimpleTest - partir de PHPDoc. - - - La mthode fabrique protge est dcrite dans - - cet article d'IBM. Il s'agit de l'unique papier - formel que j'ai vu sur ce problme. - - - - - dveloppement logiciel en php, - dvelopement d'un scnario de test en php, - programmation php avec base de donnes, - outils de dveloppement logiciel, - tutoriel avanc en php, - scripts la manire de phpunit, - architecture, - ressources php, - objets fantaisie, - junit, - framework de test en php, - test unitaire, - test en php - - -
- diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/reporter_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/reporter_documentation.xml deleted file mode 100644 index e91adf14..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/reporter_documentation.xml +++ /dev/null @@ -1,488 +0,0 @@ - - - - - Documentation SimpleTest : le rapporteur de test - - -

- SimpleTest suit plutt plus que moins le modle MVC (Modle-Vue-Contrleur). - Les classes "reporter" sont les vues et les modles - sont vos scnarios de test et leur hirarchie. - Le contrleur est le plus souvent masqu l'utilisateur - de SimpleTest moins de vouloir changer la faon - dont les tests sont effectivement excuts, - auquel cas il est possible de surcharger les objets - "runner" (ceux de l'excuteur) depuis l'intrieur - d'un scnario de test. Comme d'habitude avec MVC, - le contrleur est plutt indfini et il existe d'autres endroits - pour contrler l'excution des tests. -

-
-
-

- L'affichage par dfaut est minimal l'extrme. - Il renvoie le succs ou l'chec avec les barres conventionnelles - - rouge et verte - et affichent une trace d'arborescence - des groupes de test pour chaque assertion errone. Voici un tel chec... -

-

File test

- Fail: createnewfile->True assertion failed.
-
1/1 test cases complete. - 0 passes, 1 fails and 0 exceptions.
-
- Alors qu'ici tous les tests passent... -
-

File test

-
1/1 test cases complete. - 1 passes, 0 fails and 0 exceptions.
-
- La bonne nouvelle, c'est qu'il existe pas mal de points - dans la hirarchie de l'affichage pour crer des sous-classes. -

-

- Pour l'affichage bas sur des pages web, - il y a la classe HtmlReporter avec la signature suivante... - - Voici ce que certaines de ces mthodes veulent dire. - Premirement les mthodes d'affichage que vous voudrez probablement surcharger... -

    -
  • - HtmlReporter(string $encoding)
    - est le constructeur. Notez que le test unitaire initie - le lien l'affichage plutt que l'oppos. - L'affichage est principalement un receveur passif - des vnements de tests. Cela permet d'adapter - facilement l'affichage pour d'autres systmes - en dehors des tests unitaires, tel le suivi - de la charge de serveurs. - L'"encoding" est le type d'encodage - que vous souhaitez utiliser pour l'affichage du test. - Pour pouvoir effectuer un rendu correct de la sortie - de dbogage quand on utilise le testeur web, - il doit correspondre l'encodage du site test. - Les chanes de caractres disponibles - sont indiques dans la fonction PHP - html_entities(). -
  • -
  • - void paintHeader(string $test_name)
    - est appel une fois, au dbut du test quand l'vnement - de dmarrage survient. Le premier vnement de dmarrage - est souvent dlivr par le groupe de tests du niveau - le plus haut et donc c'est de l que le - $test_name arrive. - Il peint les titres de la page, CSS, la balise "body", etc. - Il ne renvoie rien du tout (void). -
  • -
  • - void paintFooter(string $test_name)
    - est appel la toute fin du test pour fermer - les balises ouvertes par l'entte de la page. - Par dfaut il affiche aussi la barre rouge ou verte - et le dcompte final des rsultats. - En fait la fin des tests arrive quand l'vnement - de fin de test arrive avec le mme nom - que celui qui l'a initi au mme niveau. - Le nid des tests en quelque sorte. - Fermer le dernier test finit l'affichage. -
  • -
  • - void paintMethodStart(string $test_name)
    - est appel au dbut de chaque mthode de test. - Normalement le nom vient de celui de la mthode. - Les autres vnements de dpart de test - se comportent de la mme manire sauf que - celui du groupe de tests indique au rapporteur - le nombre de scnarios de test qu'il contient. - De la sorte le rapporteur peut afficher une barre - de progrs au fur et mesure que l'excuteur - passe en revue les scnarios de test. -
  • -
  • - void paintMethodEnd(string $test_name)
    - clt le test lanc avec le mme nom. -
  • -
  • - void paintFail(string $message)
    - peint un chec. Par dfaut il ne fait qu'afficher - le mot "fail", une trace d'arborescence - affichant la position du test en cours - et le message transmis par l'assertion. -
  • -
  • - void paintPass(string $message)
    - ne fait rien, par dfaut. -
  • -
  • - string getCss()
    - renvoie les styles CSS sous la forme d'une chane - l'attention de la mthode d'enttes d'une page. - Des styles additionnels peuvent tre ajouts ici - si vous ne surchargez pas les enttes de la page. - Vous ne voudrez pas utiliser cette mthode dans - des enttes d'une page surcharge si vous souhaitez - inclure le feuille de style CSS d'origine. -
  • -
- Il y a aussi des accesseurs pour aller chercher l'information - sur l'tat courant de la suite de test. Vous les utiliserez - pour enrichir l'affichage... -
    -
  • - array getTestList()
    - est la premire mthode trs commode pour les sous-classes. - Elle liste l'arborescence courante des tests - sous la forme d'une liste de noms de tests. - Le premier test -- celui le plus proche du coeur -- - sera le premier dans la liste et la mthode de test - en cours sera la dernire. -
  • -
  • - integer getPassCount()
    - renvoie le nombre de succs atteint. Il est ncessaire - pour l'affichage la fin. -
  • -
  • - integer getFailCount()
    - renvoie de la mme manire le nombre d'checs. -
  • -
  • - integer getExceptionCount()
    - renvoie quant lui le nombre d'erreurs. -
  • -
  • - integer getTestCaseCount()
    - est le nombre total de scnarios lors de l'excution des tests. - Il comprend aussi les tests groups. -
  • -
  • - integer getTestCaseProgress()
    - est le nombre de scnarios raliss jusqu' prsent. -
  • -
- Une modification simple : demander l'HtmlReporter d'afficher - aussi bien les succs que les checs et les erreurs... - -class ShowPasses extends HtmlReporter { - - function paintPass($message) { - parent::paintPass($message); - print "&Pass: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode("->", $breadcrumb); - print "->$message
\n"; - } - - protected function getCss() { - return parent::getCss() . ' .pass { color: green; }'; - } -} -]]>
-

-

- Une mthode qui a beaucoup fait jaser reste la mthode makeDry(). - Si vous lancez cette mthode, sans paramtre, - sur le rapporteur avant que la suite de test - ne soit excute alors aucune mthode de test - ne sera appele. Vous continuerez avoir - les vnements entrants et sortants des mthodes - et scnarios de test, mais aucun succs ni chec ou erreur, - parce que le code de test ne sera pas excut. -

-

- La raison ? Pour permettre un affichage complexe - d'une IHM (ou GUI) qui permettrait la slection - de scnarios de test individuels. - Afin de construire une liste de tests possibles, - ils ont besoin d'un rapport sur la structure du test - pour l'affichage, par exemple, d'une vue en arbre - de la suite de test. Avec un rapporteur lanc - sur une excution sche qui ne renverrait - que les vnements d'affichage, cela devient - facilement ralisable. -

-
-
-

- Plutt que de modifier l'affichage existant, - vous voudrez peut-tre produire une prsentation HTML - compltement diffrente, ou mme gnrer une version texte ou XML. - Plutt que de surcharger chaque mthode dans - HtmlReporter nous pouvons nous rendre - une tape plus haut dans la hirarchie de classe vers - SimpleReporter dans le fichier source simple_test.php. -

-

- Un affichage sans rien, un canevas vierge - pour votre propre cration, serait... - -require_once('simpletest/simple_test.php'); - -class MyDisplay extends SimpleReporter { - - function paintHeader($test_name) { - } - - function paintFooter($test_name) { - } - - function paintStart($test_name, $size) { - parent::paintStart($test_name, $size); - } - - function paintEnd($test_name, $size) { - parent::paintEnd($test_name, $size); - } - - function paintPass($message) { - parent::paintPass($message); - } - - function paintFail($message) { - parent::paintFail($message); - } -} -]]> - Aucune sortie ne viendrait de cette classe jusqu' un ajout de votre part. -

-
-
-

- SimpleTest est aussi livr avec un rapporteur - en ligne de commande, minime lui aussi. - L'interface imite celle de JUnit, - sauf qu'elle envoie les messages d'erreur au fur - et mesure de leur arrive. - Pour utiliser le rapporteur en ligne de commande, - il suffit de l'intervertir avec celui de la version HTML... -addTestFile('tests/file_test.php'); -$test->run(new TextReporter()); -?> -]]> - Et ensuite d'invoquer la suite de test partir d'une ligne de commande... -

-php file_test.php
-
- Bien sr vous aurez besoin d'installer PHP - en ligne de commande. Une suite de test qui - passerait toutes ses assertions ressemble ... -
-File test
-OK
-Test cases run: 1/1, Failures: 0, Exceptions: 0
-
- Un chec dclenche un affichage comme... -
-File test
-1) True assertion failed.
-    in createnewfile
-FAILURES!!!
-Test cases run: 1/1, Failures: 1, Exceptions: 0
-
-

-

- Une des principales raisons pour utiliser - une suite de test en ligne de commande tient - dans l'utilisation possible du testeur avec - un processus automatis. Pour fonctionner comme - il faut dans des scripts shell le script de test - devrait renvoyer un code de sortie non-nul suite un chec. - Si une suite de test choue la valeur false - est renvoye par la mthode SimpleTest::run(). - Nous pouvons utiliser ce rsultat pour terminer le script - avec la bonne valeur renvoye... -addTestFile('tests/file_test.php'); -exit ($test->run(new TextReporter()) ? 0 : 1); -?> -]]> - Bien sr l'objectif n'est pas de crer deux scripts de test, - l'un en ligne de commande et l'autre pour un navigateur web, - pour chaque suite de test. - Le rapporteur en ligne de commande inclut - une mthode pour dterminer l'environnement d'excution... -addTestFile('tests/file_test.php'); -if (TextReporter::inCli()) { - exit ($test->run(new TextReporter()) ? 0 : 1); -} -$test->run(new HtmlReporter()); -?> -]]> - Il s'agit l de la forme utilise par SimpleTest lui-mme. -

-
-
-

- SimpleTest est livr avec une classe XmlReporter - utilise pour de la communication interne. - Lors de son excution, le rsultat ressemble ... -


-
-  
-    Remote tests
-    
-      Visual test with 48 passes, 48 fails and 4 exceptions
-      
-        testofunittestcaseoutput
-        
-          testofresults
-          This assertion passed
-          This assertion failed
-        
-        
-          ...
-        
-      
-    
-  
-
-]]>
- Vous pouvez utiliser ce format avec le parseur - fourni dans SimpleTest lui-mme. - Il s'agit de SimpleTestXmlParser - et se trouve xml.php l'intrieur du paquet SimpleTest... -parse($test_output); -?> -]]> - $test_output devrait tre au format XML, - partir du rapporteur XML, et pourrait venir - d'une excution en ligne de commande d'un scnario de test. - Le parseur envoie des vnements au rapporteur exactement - comme tout autre excution de test. - Il y a des occasions bizarres dans lesquelles c'est en fait trs utile. -

-

- Un problme des trs grandes suites de test, - c'est qu'elles peuvent venir bout de la limite de mmoire - par dfaut d'un process PHP - 8Mb. - En plaant la sortie des groupes de test dans du XML - et leur excution dans des process diffrents, - le rsultat peut tre pars nouveau pour agrger - les rsultats avec moins d'impact sur le test au premier niveau. -

-

- Parce que la sortie XML peut venir de n'importe o, - a ouvre des possibilits d'agrgation d'excutions de test - depuis des serveur distants. - Un scnario de test pour le raliser existe dj - l'intrieur du framework SimpleTest, mais il est encore exprimental... - -require_once('../remote.php'); -require_once('../reporter.php'); - -$test_url = ...; -$dry_url = ...; - -$test = &new GroupTest('Remote tests'); -$test->addTestCase(new RemoteTestCase($test_url, $dry_url)); -$test->run(new HtmlReporter()); -?> -]]> - RemoteTestCase prend la localisation relle - du lanceur de test, tout simplement un page web au format XML. - Il prend aussi l'URL d'un rapporteur initi - pour effectuer une excution sche. - Cette technique est employe pour que les progrs - soient correctement rapports vers le haut. - RemoteTestCase peut tre ajout - une suite de test comme n'importe quel autre groupe de tests. -

-
-
- - - Afficher les rsultats en HTML - - - Afficher et rapporter les rsultats - dans d'autres formats - - - Utilis SimpleTest depuis la ligne de commande - - - Utiliser XML pour des tests distants - - - - - La page du projet SimpleTest sur - SourceForge. - - - La page de tlchargement de SimpleTest sur - LastCraft. - - - L'API pour dveloppeur de SimpleTest - donne tous les dtails sur les classes et les assertions disponibles. - - - - - test unitaire en php, - documentation, - marcus baker, - perrick penet - test simple, - simpletest, - test distant, - tests xml, - test automatis - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/simple_test.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/simple_test.xml deleted file mode 100644 index 68d56295..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/simple_test.xml +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - Prise en main rapide de SimpleTest pour PHP - - Tests unitaire et objets fantaisie pour PHP - - - -

- Le prsent article prsuppose que vous soyez familier avec - le concept de tests unitaires ainsi que celui de dveloppement - web avec le langage PHP. Il s'agit d'un guide pour le nouvel - et impatient utilisateur de - SimpleTest. - Pour une documentation plus complte, particulirement si - vous dcouvrez les tests unitaires, consultez la - documentation - en cours, et pour des exemples de scnarios de test, - consultez le - tutorial - sur les tests unitaires. -

-
-
-

- Parmi les outils de test pour logiciel, le testeur unitaire - est le plus proche du dveloppeur. Dans un contexte de - dveloppement agile, le code de test se place juste ct - du code source tant donn que tous les deux sont crits - simultanment. Dans ce contexte, SimpleTest aspire tre - une solution complte de test pour un dveloppeur PHP et - s'appelle "Simple" parce qu'elle devrait tre simple - utiliser et tendre. Ce nom n'tait pas vraiment un bon - choix. Non seulement cette solution inclut toutes les - fonctions classiques qu'on est en droit d'attendre de la - part des portages de JUnit et des PHPUnit, - mais elle inclut aussi les objets fantaisie ou - "mock objects". -

-

- Ce qui rend cet outil immdiatement utile pour un dveloppeur PHP, - c'est son navigateur web interne. - Il permet des tests qui parcourent des sites web, remplissent - des formulaires et testent le contenu des pages. - Etre capable d'crire ces tests en PHP veut dire qu'il devient - facile d'crire des tests de recette (ou d'intgration). - Un exemple serait de confirmer qu'un utilisateur a bien t ajout - dans une base de donnes aprs s'tre enregistr sur une site web. -

-

- La dmonstration la plus rapide : l'exemple -

-

- Supposons que nous sommes en train de tester une simple - classe de log dans un fichier : elle s'appelle - Log dans classes/Log.php. Commenons - par crer un script de test, appel - tests/log_test.php. Son contenu est le suivant... -require_once('simpletest/autorun.php'); -require_once('../classes/log.php'); - -class TestOfLogging extends UnitTestCase { -} -?> -]]> - Ici le rpertoire simpletest est soit dans le - dossier courant, soit dans les dossiers pour fichiers - inclus. Vous auriez diter ces arborescences suivant - l'endroit o vous avez install SimpleTest. - Le fichier "autorun.php" fait plus que juste inclure - les lments de SimpleTest : il lance aussi les tests pour nous. -

-

- TestOfLogging est notre premier scnario de test - et il est pour l'instant vide. - Chaque scnario de test est une classe qui tend une des classes - de base de SimpleTest. Nous pouvons avoir autant de classes de ce type - que nous voulons. -

-

- Avec ces trois lignes d'chafaudage - l'inclusion de notre classe Log, nous avons une suite - de tests. Mais pas encore de test ! -

-

- Pour notre premier test, supposons que la classe Log - prenne le nom du fichier crire au sein du constructeur, - et que nous avons un rpertoire temporaire dans lequel placer - ce fichier. -testLogCreatesNewFileOnFirstMessage() { - @unlink('/temp/test.log'); - $log = new Log('/temp/test.log'); - $this->assertFalse(file_exists('/temp/test.log')); - $log->message('Should write this to a file'); - $this->assertTrue(file_exists('/temp/test.log')); - } -} -?> -]]> - Au lancement du scnario de test, toutes les mthodes qui - commencent avec la chane test sont - identifies puis excutes. - Si la mthode commence par test, c'est un test. - Remarquez bien le nom trs long de notre exemple : - testLogCreatesNewFileOnFirstMessage(). - C'est bel et bien dlibr : ce style est considr dsirable - et il rend la sortie du test plus lisible. -

-

- D'ordinaire nous avons bien plusieurs mthodes de tests. - Mais ce sera pour plus tard. -

-

- Les assertions dans les - mthodes de test envoient des messages vers le framework de - test qui affiche immdiatement le rsultat. Cette rponse - immdiate est importante, non seulement lors d'un crash - caus par le code, mais aussi de manire rapprocher - l'affichage de l'erreur au plus prs du scnario de test - concern via un appel printcode>. -

-

- Pour voir ces rsultats lanons effectivement les tests. - Aucun autre code n'est ncessaire, il suffit d'ouvrir - la page dans un navigateur. -

-

- En cas chec, l'affichage ressemble ... -

-

TestOfLogging

- Fail: testcreatingnewfile->True assertion failed.
-
1/1 test cases complete. - 1 passes and 1 fails.
-
- ...et si a passe, on obtient... -
-

TestOfLogging

-
1/1 test cases complete. - 2 passes and 0 fails.
-
- Et si vous obtenez a... -
- Fatal error: Failed opening required '../classes/log.php' (include_path='') in /home/marcus/projects/lastcraft/tutorial_tests/Log/tests/log_test.php on line 7 -
- c'est qu'il vous manque le fichier classes/Log.php - qui pourrait ressembler : - -class Log { - function Log($file_path) { - } - - function message() { - } -} -?> -]]> - C'est largement plus sympathique d'crire le code aprs le test. - Plus que sympatique mme - cette technique s'appelle - "Dveloppement Pilot par les Tests" ou - "Test Driven Development" en anglais. -

-

- Pour plus de renseignements sur le testeur, voyez la - documentation pour les tests de rgression. -

-
-
-

- Il est peu probable que dans une vritable application on - ait uniquement besoin de passer un seul scnario de test. - Cela veut dire que nous avons besoin de grouper les - scnarios dans un script de test qui peut, si ncessaire, - lancer tous les tests de l'application. -

-

- Notre premire tape est de crer un nouveau fichier appel - tests/all_tests.php et d'y inclure le code suivant... -require_once('simpletest/autorun.php'); - -class AllTests extends TestSuite { - function AllTests() { - $this->TestSuite('All tests'); - $this->addFile('log_test.php'); - } -} -?> -]]> - L'inclusion de "autorun" permettra notre future suite - de tests d'tre lance juste en invoquant ce script. -

-

- La sous-classe TestSuite doit chaner - son constructeur. Cette limitation sera supprime dans - les versions venir. -

-

- The method TestSuite::addFile() - will include the test case file and read any new classes - that are descended from SimpleTestCase. - - Cette mthode TestSuite::addTestFile() va - inclure le fichier de scnarios de test et lire parmi - toutes les nouvelles classes cres celles qui sont issues - de SimpleTestCase. - UnitTestCase est juste un exemple de classe drive - depuis SimpleTestCase et vous pouvez crer les vtres. - TestSuite::addFile() peut aussi inclure d'autres suites. -

-

- La classe ne sera pas encore instancie. - Quand la suite de tests est lance, elle construira chaque instance - une fois le test atteint, et le dtuira juste ensuite. - Cela veut dire que le constructeur n'est lanc qu'une fois avant - chaque initialisation de ce scnario de test et que le destructeur - est lui aussi lanc avant que le test suivant ne commence. -

-

- Il est commun de grouper des scnarios de test dans des super-classes - qui ne sont pas senses tre lances, mais qui deviennent une classe de base - pour d'autres tests. - Pour que "autorun" fonctionne proprement les fichiers - des scnarios de test ne devraient pas lancer aveuglement - d'autres extensions de scnarios de test qui ne lanceraient pas - effectivement des tests. - Cela pourrait aboutir un mauvais comptages des scnarios de test - pendant la procdure. - Pas vraiement un problme majeure, mais pour viter cet inconvnient - il suffit de marquer vos classes de base comme abstract. - SimpleTest ne lance pas les classes abstraites. Et si vous utilisez encore - PHP4 alors une directive SimpleTestOptions::ignore() - dans votre fichier de scnario de test aura le mme effet. -

-

- Par ailleurs, le fichier avec le scnario de test ne devrait pas - avoir t inclus ailleurs. Sinon aucun scnario de test - ne sera inclus ce groupe. - Ceci pourrait se transformer en un problme plus grave : - si des fichiers ont dj t inclus par PHP alors la mthode - TestSuite::addFile() ne les dtectera pas. -

-

- Pour afficher les rsultats, il est seulement ncessaire - d'invoquer tests/all_tests.php partir du serveur - web. -

-

- Pour plus de renseignements des groupes de tests, voyez le - documentation sur le groupement des tests. -

-
-
-

- Avanons un peu plus dans le futur. -

-

- Supposons que notre class logging soit teste et termine. - Supposons aussi que nous testons une autre classe qui ait - besoin d'crire des messages de log, disons - SessionPool. Nous voulons tester une mthode - qui ressemblera probablement quelque chose comme... - -class SessionPool { - ... - function logIn($username) { - ... - $this->_log->message('User $username logged in.'); - ... - } - ... -} - -]]> - Avec le concept de "rutilisation de code" comme fil - conducteur, nous utilisons notre class Log. Un - scnario de test classique ressemblera peut-tre ... -require_once('../classes/session_pool.php'); - -class TestOfSessionLogging extends UnitTestCase { - - function setUp() { - @unlink('/temp/test.log'); - } - - function tearDown() { - @unlink('/temp/test.log'); - } - - function testLoggingInIsLogged() { - $log = new Log('/temp/test.log'); - $session_pool = &new SessionPool($log); - $session_pool->logIn('fred'); - $messages = file('/temp/test.log'); - $this->assertEqual($messages[0], "User fred logged in.\n"); - } -} -?> -]]> - Nous expliquerons les mthodes setUp() - et tearDown() plus tard. -

-

- Le design de ce scnario de test n'est pas compltement - mauvais, mais on peut l'amliorer. Nous passons du temps - tripoter les fichiers de log qui ne font pas partie de - notre test. - Pire, nous avons cr des liens de proximit - entre la classe Log et ce test. Que se - passerait-il si nous n'utilisions plus de fichiers, mais la - bibliothque syslog la place ? - - Cela veut dire que notre test TestOfSessionLogging - enverra un chec alors mme qu'il ne teste pas Logging. -

-

- Il est aussi fragile sur des petites retouches. Avez-vous - remarqu le retour chariot supplmentaire la fin du - message ? A-t-il t ajout par le loggueur ? Et si il - ajoutait aussi un timestamp ou d'autres donnes ? -

-

- L'unique partie tester rellement est l'envoi d'un - message prcis au loggueur. - Nous pouvons rduire le couplage en - crant une fausse classe de logging : elle ne fait - qu'enregistrer le message pour le test, mais ne produit - aucun rsultat. Sauf qu'elle doit ressembler exactement - l'original. -

-

- Si l'objet fantaisie n'crit pas dans un fichier alors nous - nous pargnons la suppression du fichier avant et aprs le - test. Nous pourrions mme nous pargner quelques lignes de - code supplmentaires si l'objet fantaisie pouvait excuter - l'assertion. -

-

- Trop beau pour tre vrai ? Pas vraiement on peut crer un tel - objet trs facilement... -Mock::generate('Log'); - -class TestOfSessionLogging extends UnitTestCase { - - function testLoggingInIsLogged() { - $log = &new MockLog(); - $log->expectOnce('message', array('User fred logged in.')); - $session_pool = &new SessionPool($log); - $session_pool->logIn('fred'); - } -} -?> -]]> - L'appel Mock::generate() a gnr - une nouvelle classe appel MockLog. - Cela ressemble un clone identique, sauf que nous pouvons - y adjoindre du code de test. - C'est ce que fait expectOnce(). - Cela dit que si message() m'est appel, - il a intrt l'tre avec le paramtre - "User fred logged in.". -

-

- L'appel tally() est ncessaire pour annoncer - l'objet fantaisie qu'il n'y aura plus d'appels ultrieurs. - Sans a l'objet fantaisie pourrait attendre pendant une - ternit l'appel de la mthode sans jamais prvenir le - scnario de test. Les autres tests sont dclenchs - automatiquement quand l'appel message() est - invoqu sur l'objet MockLog par le code - SessionPool::logIn(). - L'appel mock va dclencher une comparaison des - paramtres et ensuite envoyer le message "pass" ou "fail" - au test pour l'affichage. Des jokers peuvent tre inclus - pour ne pas avoir tester tous les paramtres d'un appel - alors que vous ne souhaitez qu'en tester un. -

-

- Les objets fantaisie dans la suite SimpleTest peuvent avoir - un ensemble de valeurs de sortie arbitraires, des squences - de sorties, des valeurs de sortie slectionnes partir - des arguments d'entre, des squences de paramtres - attendus et des limites sur le nombre de fois qu'une - mthode peut tre invoque. -

-

- Pour que ce test fonctionne la librairie avec les objets - fantaisie doit tre incluse dans la suite de tests, par - exemple dans all_tests.php. -

-

- Pour plus de renseignements sur les objets fantaisie, voyez le - documentation sur les objets fantaisie. -

-
-
-

- Une des exigences des sites web, c'est qu'ils produisent - des pages web. Si vous construisez un projet de A Z et - que vous voulez intgrer des tests au fur et mesure alors - vous voulez un outil qui puisse effectuer une navigation - automatique et en examiner le rsultat. C'est le boulot - d'un testeur web. -

-

- Effectuer un test web via SimpleTest reste assez primitif : - il n'y a pas de javascript par exemple. - La plupart des autres oprations d'un navigateur sont simules. -

-

- Pour vous donner une ide, voici un exemple assez trivial : - aller chercher une page web, - partir de l naviguer vers la page "about" - et finalement tester un contenu dtermin par le client. -require_once('simpletest/web_tester.php'); - -class TestOfAbout extends WebTestCase { - function testOurAboutPageGivesFreeReignToOurEgo() { - $this->get('http://test-server/index.php'); - $this->click('About'); - $this->assertTitle('About why we are so great'); - $this->assertText('We are really great'); - } -} -?> -]]> - Avec ce code comme test de recette, vous pouvez vous - assurer que le contenu corresponde toujours aux - spcifications la fois des dveloppeurs et des autres - parties prenantes au projet. -

-

- Vous pouvez aussi naviguer travers des formulaires... -get('http://google.com/'); - $this->setField('q', 'simpletest'); - $this->click("I'm Feeling Lucky"); - $this->assertTitle('SimpleTest - Unit Testing for PHP'); - } -} -?> -]]> - ...mme si cela pourrait constituer une violation - des documents juridiques de Google(tm). -

-

- Pour plus de renseignements sur comment tester une page web, voyez la - documentation sur tester des scripts web. -

-

- SourceForge.net Logo -

-
-
- - - Utiliser le testeur rapidement - avec un exemple. - - - Groupes de tests - pour tester en un seul clic. - - - Utiliser les objets fantaisie - pour faciliter les tests et gagner en contrle. - - - Tester des pages web - au niveau de l'HTML. - - - - - Tlcharger PHP Simple Test - depuis SourceForge. - - - L'API de SimpleTest pour dveloppeur - donne tous les dtails sur les classes et assertions existantes. - - - - - dveloppement logiciel, - programmation php, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - architecture, - ressources php, - objets fantaise, - junit, - php testing, - php unit, - mthodologie, - dveloppement pilot par les tests, - sourceforge, - open source, - unit test, - web tester, - web testing, - outils tests html, - tester des web pages, - php objets fantaise, - naviguer automatiquement sur des sites web, - test automatis, - scripting web, - wget, - test curl, - jmock pour php, - jwebunit, - phpunit, - php unit testing, - php web testing, - jason sweat, - marcus baker, - perrick penet, - topstyle plug in, - phpedit plug in - - -
diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/subclass_tutorial.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/subclass_tutorial.xml deleted file mode 100644 index d730c8cf..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/subclass_tutorial.xml +++ /dev/null @@ -1,261 +0,0 @@ - - - - - Tutorial de test unitaire en PHP - Sous classer un scnario de test - -
-

- Nous avions laiss notre test d'horloge avec un trou. - Si la fonction time() de PHP avanait pendant cette comparaison... -assertEqual($clock->now(), time(), 'Now is the right time'); -} -]]> - ...notre test aurait un cart d'une seconde - et entranerait un faux chec. - Un comportement erratique de notre suite de test - n'est vraiment pas ce que nous souhaitons : - nous pourrions la lancer une centaine de fois par jour. -

-

- Nous pourrions r-crire notre test... - - $time1 = $clock->now(); - $time2 = time(); - $this->assertTrue(($time1 == $time2) || ($time1 + 1 == $time2), 'Now is the right time'); -} -]]> - Sauf que la conception n'est pas plus claire - et que nous devrons le rpter pour chaque test de chronomtrage. - Les rptitions sont un ennemi public n1 - et donc un trs bon stimulant pour le remaniement de notre code de test. -UnitTestCase('Clock class test'); - } - function assertSameTime($time1, $time2, $message) { - $this->assertTrue( - ($time1 == $time2) || ($time1 + 1 == $time2), - $message); - } - function testClockTellsTime() { - $clock = new Clock(); - $this->assertSameTime($clock->now(), time(), 'Now is the right time'); - } - function testClockAdvance() { - $clock = new Clock(); - $clock->advance(10); - $this->assertSameTime($clock->now(), time() + 10, 'Advancement'); - } -} -]]> - Bien entendu chaque modification je relance - les tests pour bien vrifier que nous sommes dans les clous. - Remaniement au vert. C'est beaucoup plus sr. -

-
-
-

- Peut-tre voulons nous ajouter d'autres tests - sensibles au temps. Peut-tre lisons nous des timestamps - - en provenance d'une entre dans une base de donnes ou d'ailleurs - - qui tiendraient compte d'une simple seconde pour basculer. - Pour que ces nouvelles classes de test profitent - de notre nouvelle assertion nous avons besoin - de la placer dans une "super classe". -

-

- Voici notre fichier clock_test.php - au complet aprs la promotion de notre mthode - assertSameTime() dans sa propre "super classe"... - - class TimeTestCase extends UnitTestCase { - function TimeTestCase($test_name) { - $this->UnitTestCase($test_name); - } - function assertSameTime($time1, $time2, $message) { - $this->assertTrue( - ($time1 == $time2) || ($time1 + 1 == $time2), - $message); - } - } - - class TestOfClock extends TimeTestCase { - function TestOfClock() { - $this->TimeTestCase('Clock class test'); - } - function testClockTellsTime() { - $clock = new Clock(); - $this->assertSameTime($clock->now(), time(), 'Now is the right time'); - } - function testClockAdvance() { - $clock = new Clock(); - $clock->advance(10); - $this->assertSameTime($clock->now(), time() + 10, 'Advancement'); - } - } -?> -]]> - Dsormais nous bnficions de notre nouvelle assertion - chaque fois que nous hritons de notre propre classe - TimeTestCase plutt que de la classe - par dfaut UnitTestCase. - Nous retrouvons la conception de l'outil JUnit - et SimpleTest est un portage en PHP de cette interface. - Il s'agit d'un framework de test partir duquel - votre propre systme de test peut s'agrandir. -

-

- Si nous lanons les tests maintenant - une lgre broutille survient... -

- Warning: Missing argument 1 for timetestcase() - in /home/marcus/projects/lastcraft/tutorial_tests/tests/clock_test.php on line 5
-

All tests

-
3/3 test cases complete. - 6 passes and 0 fails.
-
- La raison est assez dlicate. -

-

- Notre sous-classe exige un paramtre - dans le constructeur qui n'a pas t fourni - et pourtant il semblerait que nous l'ayons - bel et bien fourni. Quand nous avons hrit - de notre nouvelle casse nous lui avons pass - notre propre constructeur. C'est juste l... -TimeTestCase('Clock class test'); -} -]]> - En fait nous avons raison, - l n'est pas le problme. -

-

- Vous vous souvenez de quand nous avons construit - le test de groupe all_tests.php - en utilisant la mthode addTestFile(). - Cette mthode recherche les classes de scnario de test, - les instancie si elles sont nouvelles puis excute - tous nos tests. Ce qui s'est pass ? - Elle a aussi trouv notre extension de scnario de test. - C'est sans consquence puisque qu'il n'y a pas - de mthode de test l'intrieur - comprendre pas - de mthode commenant par "test". - Aucun test supplmentaire n'est excut. -

-

- Le problme vient du fait qu'il instancie la classe - et le fait sans le paramtre $test_name - qui dclenche l'avertissement. - Ce paramtre n'est gnralement ncessaire - ni pour un scnario de test, ni pour son assertion. - Pour que notre scnario de test tendu corresponde - l'interface de UnitTestCase, - nous avons besoin de le rendre optionnel... -$test_name = false) { - $this->UnitTestCase($test_name); - } - function assertSameTime($time1, $time2, $message = false) { - if (! $message) { - $message = "Time [$time1] should match time [$time2]"; - } - $this->assertTrue( - ($time1 == $time2) || ($time1 + 1 == $time2), - $message); - } -} -]]> - Bien sr, que cette classe soit instancie - sans raison par la suite de test devrait - continuer vous ennuyer. - Voici une modification pour l'empcher de s'excuter... -SimpleTestOptions::ignore('TimeTestCase'); -class TimeTestCase extends UnitTestCase { - function TimeTestCase($test_name = false) { - $this->UnitTestCase($test_name); - } - function assertSameTime($time1, $time2, $message = '') { - if (!$message) { - $message = "Time [$time1] should match time [$time2]"; - } - $this->assertTrue( - ($time1 == $time2) || ($time1 + 1 == $time2), - $message); - } -} -]]> - Cette ligne ne fait que demander SimpleTest - d'ignorer cette classe lors de la construction - des suites de test. Elle peut tre ajoute n'importe - o dans le fichier de scnario de test. -

-

- Les six succs ont l'air bien mais ne disent - pas un observateur peu attentif ce qui a t test. - Pour cela il faut regarder dans le code. - Si cela vous parat trop de boulot et que vous - prfreriez lire ces informations directement - alors vous devriez aller lire comment - afficher les succs. -

-
-
- - - Une assertion insensible au chronomtre - qui permet de gagner une seconde. - - - Sous classer un scnario de test - afin de rutiliser la mthode de test. - - - - - Section prcdente : - contrler les variables de test. - - - Section suivante : - changer l'affichage des tests. - - - Vous aurez besoin du - testeur unitaire SimpleTest - pour les exemples. - - - - - dveloppement logiciel, - programmation php, - outils de dveloppement logiciel, - tutorial php, - scripts php gratuits, - organisation de tests unitaires, - cration de sous-classe, - conseil de test, - astuce de dveloppement, - exemple de code php, - objets fantaisie, - junit, - test php, - outil de test unitaire, - suite de test php - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/support_website.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/support_website.xml deleted file mode 100644 index 0494f655..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/support_website.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - Mailing-list de support - - -

- La mailing-list simpletest-support est probablement l'endroit - le plus actif autour de SimpleTest : aide, conseil, bugs et détours, c'est là - que tout se passe la plupart du temps. Attention tout de même : les échanges - ont lieu en anglais. -

-
-
-

- C'est vraiment - - simple de s'y abonner et en plus, on peut aussi - - l'utiliser pour ses recherches. -

-

- Au dernier pointage, il y avait 114 abonnés et 1908 messages envoyés. - Cela fait de 1 à 4 messages par jour en moyenne. -

-
-
- - - Pour s'abonner. - - - - - S'inscrire à la - - mailing list "Support". - - - Lire les - - archives. - - - - - SimpleTest, - download, - source code, - stable release, - eclipse release, - eclipse plugin, - debian package, - drupal module, - pear channel, - pearified package - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/unit_test_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/unit_test_documentation.xml deleted file mode 100644 index 2ee95ef1..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/unit_test_documentation.xml +++ /dev/null @@ -1,330 +0,0 @@ - - - - - Documentation SimpleTest pour les tests de rgression en PHP - -
-

- Le coeur du systme est un framework de tests de rgression - construit autour des scnarios de test. - Un exemple de scnario de test ressemble ... -class FileTestCase extends UnitTestCase { -} -]]> - Si aucun nom de test n'est fourni au moment - de la liaison avec le constructeur alors - le nom de la classe sera utilis. - Il s'agit du nom qui sera affich dans les rsultats du test. -

-

- Les vritables tests sont ajouts en tant que mthode - dans le scnario de test dont le nom par dfaut - commence par la chane "test" - et quand le scnario de test est appel toutes les mthodes - de ce type sont excutes dans l'ordre utilis - par l'introspection de PHP pour les trouver. - Peuvent tre ajoutes autant de mthodes de test que ncessaires. - Par exemple... -UnitTestCase('File test'); - } - - function setUp() { - @unlink('../temp/test.txt'); - } - - function tearDown() { - @unlink('../temp/test.txt'); - } - - function testCreation() { - $writer = &new FileWriter('../temp/test.txt'); - $writer->write('Hello'); - $this->assertTrue(file_exists('../temp/test.txt'), 'File created'); - } -} -]]> - Le constructeur est optionnel et souvent omis. Sans nom, - le nom de la classe est utilis comme nom pour le scnario de test. -

-

- Notre unique mthode de test pour le moment est - testCreation() o nous vrifions - qu'un fichier a bien t cr par notre objet - Writer. Nous pourrions avoir mis - le code unlink() dans cette mthode, - mais en la plaant dans setUp() - et tearDown() nous pouvons l'utiliser - pour nos autres mthodes de test que nous ajouterons. -

-

- La mthode setUp() est lanc - juste avant chaque mthode de test. - tearDown() est lanc aprs chaque mthode de test. -

-

- Vous pouvez placer une initialisation de - scnario de test dans le constructeur afin qu'elle soit lance - pour toutes les mthodes dans le scnario de test - mais dans un tel cas vous vous exposeriez des interfrences. - Cette faon de faire est lgrement moins rapide, - mais elle est plus sre. - Notez que si vous arrivez avec des notions de JUnit, - il ne s'agit pas du comportement auquel vous tes habitus. - Bizarrement JUnit re-instancie le scnario de test - pour chaque mthode de test pour se prvenir - d'une telle interfrence. - SimpleTest demande l'utilisateur final d'utiliser - setUp(), mais fournit aux codeurs de bibliothque d'autres crochets. -

-

- Pour rapporter les rsultats de test, - le passage par une classe d'affichage - notifie par - les diffrentes mthodes de type assert...() - - est utilise. En voici la liste complte pour - la classe UnitTestCase, - celle par dfaut dans SimpleTest... - - - - - - - - - - - - - - - - -
assertTrue($x)Echoue si $x est faux
assertFalse($x)Echoue si $x est vrai
assertNull($x)Echoue si $x est initialis
assertNotNull($x)Echoue si $x n'est pas initialis
assertIsA($x, $t)Echoue si $x n'est pas de la classe ou du type $t
assertEqual($x, $y)Echoue si $x == $y est faux
assertNotEqual($x, $y)Echoue si $x == $y est vrai
assertIdentical($x, $y)Echoue si $x === $y est faux
assertNotIdentical($x, $y)Echoue si $x === $y est vrai
assertReference($x, $y)Echoue sauf si $x et $y sont la mme variable
assertCopy($x, $y)Echoue si $x et $y sont la mme variable
assertWantedPattern($p, $x)Echoue sauf si l'expression rationnelle $p capture $x
assertNoUnwantedPattern($p, $x)Echoue si l'expression rationnelle $p capture $x
assertNoErrors()Echoue si une erreur PHP arrive
assertError($x)Echoue si aucune erreur ou message incorrect de PHP n'arrive
- Toutes les mthodes d'assertion peuvent recevoir - une description optionnelle : - cette description sert pour tiqueter le rsultat. - Sans elle, une message par dfaut est envoye la place : - il est gnralement suffisant. - Ce message par dfaut peut encore tre encadr - dans votre propre message si vous incluez "%s" - dans la chane. - Toutes les assertions renvoient vrai / true en cas de succs - et faux / false en cas d'chec. -

-

- D'autres exemples... -$variable = null; -$this->assertNull($variable, 'Should be cleared'); -]]> - ...passera et normalement n'affichera aucun message. - Si vous avez - configur le testeur pour afficher aussi les succs - alors le message sera affich comme tel. -$this->assertIdentical(0, false, 'Zero is not false [%s]'); -]]> - Ceci chouera tant donn qu'il effectue une vrification - sur le type en plus d'une comparaison sur les deux valeurs. - La partie "%s" est remplace par le message d'erreur - par dfaut qui aurait t affich si nous n'avions pas fourni le ntre. - Cela nous permet d'emboter les messages de test. -$a = 1; -$b = $a; -$this->assertReference($a, $b); -]]> - chouera tant donn que la variable $b - est une copie de $a. -$this->assertWantedPattern('/hello/i', 'Hello world'); -]]> - L, a passe puisque la recherche est insensible - la casse et que donc hello - est bien reprable dans Hello world. -trigger_error('Disaster'); -trigger_error('Catastrophe'); -$this->assertError(); -$this->assertError('Catastrophe'); -$this->assertNoErrors(); -]]> - Ici, il y a besoin d'une petite explication : - toutes passent ! -

-

- Les erreurs PHP dans SimpleTest sont piges et - places dans une queue. Ici la premire vrification - d'erreur attrape le message "Disaster" - sans vrifier le texte et passe. Rsultat : - l'erreur est supprime de la queue. - La vrification suivante teste non seulement l'existence - de l'erreur mais aussi le texte qui correspond : - un autre succs. Dsormais la queue est vide - et le dernier test passe aussi. - Si une autre erreur non vrifie est encore - dans la queue la fin de notre mthode de test - alors une exception sera rapporte dans le test. - Notez que SimpleTest ne peut pas attraper les erreurs PHP la compilation. -

-

- Les scnarios de test peuvent utiliser des mthodes - bien pratiques pour dboguer le code ou pour tendre la suite... - - - - - - - - - - -
setUp()Est lance avant chaque mthode de test
tearDown()Est lance aprs chaque mthode de test
pass()Envoie un succs
fail()Envoie un chec
error()Envoi un vnement exception
sendMessage()Envoie un message d'tat aux systmes d'affichage qui le supporte
signal($type, $payload)Envoie un message dfini par l'utilisateur au rapporteur du test
dump($var)Effectue un print_r() format pour du dboguage rapide et grossier
swallowErrors()Vide les erreurs de la queue
-

-
-
-

- Bien sr des mthodes supplmentaires de test - peuvent tre ajoutes pour crer d'autres types - de scnario de test afin d'tendre le framework... - -class FileTester extends UnitTestCase { - function FileTester($name = false) { - $this->UnitTestCase($name); - } - - function assertFileExists($filename, $message = '%s') { - $this->assertTrue( - file_exists($filename), - sprintf($message, 'File [$filename] existence check')); - } -} -]]> - Ici la bibliothque SimpleTest est localise - dans un rpertoire local appel simpletest. - Pensez le modifier pour votre propre environnement. -

-

- Alternativement vous pourriez utiliser dans votre code - un directive SimpleTestOptions::ignore('FileTester');. -

-

- Ce nouveau scnario peut tre hrit exactement - comme un scnario de test classique... -FileTester { - - function setUp() { - @unlink('../temp/test.txt'); - } - - function tearDown() { - @unlink('../temp/test.txt'); - } - - function testCreation() { - $writer = &new FileWriter('../temp/test.txt'); - $writer->write('Hello'); - $this->assertFileExists('../temp/test.txt'); - } -} -]]> -

-

- Si vous souhaitez un scnario de test sans - toutes les assertions de UnitTestCase - mais uniquement avec les vtres propres, - vous aurez besoin d'tendre la classe - SimpleTestCase la place. - Elle se trouve dans simple_test.php - en lieu et place de unit_tester.php. - A consulter plus tard - si vous souhaitez incorporer les scnarios - d'autres testeurs unitaires dans votre suite de test. -

-
-
-

- Ce n'est pas souvent qu'il faille lancer des scnarios - avec un unique test. Sauf lorsqu'il s'agit de s'arracher - les cheveux sur un module problme sans pour - autant dsorganiser la suite de test principale. - Avec autorun aucun chafaudage particulier - n'est ncessaire, il suffit de lancer votre test et - vous y tes. -

-

- Vous pouvez mme dcider quel rapporteur - (par exemple, TextReporter ou HtmlReporter) - vous prfrez pour un fichier spcifique quand il est lanc - tout seul... - -SimpleTest :: prefer(new TextReporter()); -require_once('../classes/writer.php'); - -class FileTestCase extends UnitTestCase { - ... -} -?> -]]> - Ce script sera lanc tel que mais il n'y aura - aucun succs ou chec avant que des mthodes de test soient ajoutes. -

-
-
- - - Scnarios de test unitaire - et oprations basiques. - - - tendre des scnarios de test - pour les personnaliser votre propre projet. - - - Lancer un scnario seul - comme un script unique. - - - - - La page de SimpleTest sur - SourceForge. - - - La page de tlchargement de SimpleTest sur - LastCraft. - - - L'API complte de SimpleTest - partir de PHPDoc. - - - - - test unitaire php, - test d'intgration, - documentation, - marcus baker, - perrick penet - simple test, - documentation simpletest, - phpunit, - junit, - xunit - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/web_tester_documentation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/web_tester_documentation.xml deleted file mode 100644 index 289ce5c6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/docs/source/fr/web_tester_documentation.xml +++ /dev/null @@ -1,377 +0,0 @@ - - - - - Documentation SimpleTest : tester des scripts web - -
-

- Tester des classes c'est trs bien. - Reste que PHP est avant tout un langage - pour crer des fonctionnalits l'intrieur de pages web. - Comment pouvons tester la partie de devant - -- celle de l'interface -- dans nos applications en PHP ? - Etant donn qu'une page web n'est constitue que de texte, - nous devrions pouvoir les examiner exactement - comme n'importe quelle autre donne de test. -

-

- Cela nous amne une situation dlicate. - Si nous testons dans un niveau trop bas, - vrifier des balises avec un motif ad hoc par exemple, - nos tests seront trop fragiles. Le moindre changement - dans la prsentation pourrait casser un grand nombre de test. - Si nos tests sont situs trop haut, en utilisant - une version fantaisie du moteur de template pour - donner un cas prcis, alors nous perdons compltement - la capacit automatiser certaines classes de test. - Par exemple, l'interaction entre des formulaires - et la navigation devra tre test manuellement. - Ces types de test sont extrmement fastidieux - et plutt sensibles aux erreurs. -

-

- SimpleTest comprend une forme spciale de scnario - de test pour tester les actions d'une page web. - WebTestCase inclut des facilits pour la navigation, - des vrifications sur le contenu - et les cookies ainsi que la gestion des formulaires. - Utiliser ces scnarios de test ressemble - fortement UnitTestCase... -class TestOfLastcraft extends WebTestCase { -} -]]> - Ici nous sommes sur le point de tester - le site de Last Craft. - Si ce scnario de test est situ dans un fichier appel - lastcraft_test.php alors il peut tre charg - dans un script de lancement tout comme des tests unitaires... - -require_once('simpletest/web_tester.php'); -SimpleTest::prefer(new TextReporter()); - -class WebTests extends TestSuite { - function WebTests() { - $this->TestSuite('Web site tests'); - $this->addFile('lastcraft_test.php'); - } -} -?> -]]> - J'utilise ici le rapporteur en mode texte - pour mieux distinguer le contenu au format HTML - du rsultat du test proprement dit. -

-

- Rien n'est encore test. Nous pouvons tlcharger - la page d'accueil en utilisant la mthode get()... - - function testHomepage() { - $this->assertTrue($this->get('http://www.lastcraft.com/')); - } -} -]]> - La mthode get() renverra "true" - uniquement si le contenu de la page a bien t tlcharg. - C'est un moyen simple, mais efficace pour vrifier - qu'une page web a bien t dlivr par le serveur web. - Cependant le contenu peut rvler tre une erreur 404 - et dans ce cas notre mthode get() renverrait encore un succs. -

-

- En supposant que le serveur web pour le site Last Craft - soit oprationnel (malheureusement ce n'est pas toujours le cas), - nous devrions voir... -

-Web site tests
-OK
-Test cases run: 1/1, Failures: 0, Exceptions: 0
-
- Nous avons vrifi qu'une page, de n'importe quel type, - a bien t renvoye. Nous ne savons pas encore - s'il s'agit de celle que nous souhaitions. -

-
-
-

- Pour obtenir la confirmation que la page tlcharge - est bien celle que nous attendions, - nous devons vrifier son contenu. - - $this->get('http://www.lastcraft.com/'); - $this->assertWantedPattern('/why the last craft/i'); - } -} -]]> - La page obtenue par le dernier tlchargement est - place dans un buffer au sein mme du scnario de test. - Il n'est donc pas ncessaire de s'y rfrer directement. - La correspondance du motif est toujours effectue - par rapport ce buffer. -

-

- Voici une liste possible d'assertions sur le contenu... - - - - - - - - - - - - - - - - - - - -
assertWantedPattern($pattern)Vrifier une correspondance sur le contenu via une expression rationnelle Perl
assertNoUnwantedPattern($pattern)Une expression rationnelle Perl pour vrifier une absence
assertTitle($title)Passe si le titre de la page correspond exactement
assertLink($label)Passe si un lien avec ce texte est prsent
assertNoLink($label)Passe si aucun lien avec ce texte est prsent
assertLinkById($id)Passe si un lien avec cet attribut d'identification est prsent
assertField($name, $value)Passe si une balise input avec ce nom contient cette valeur
assertFieldById($id, $value)Passe si une balise input avec cet identifiant contient cette valeur
assertResponse($codes)Passe si la rponse HTTP trouve une correspondance dans la liste
assertMime($types)Passe si le type MIME se retrouve dans cette liste
assertAuthentication($protocol)Passe si l'authentification provoque est de ce type de protocole
assertNoAuthentication()Passe s'il n'y pas d'authentification provoque en cours
assertRealm($name)Passe si le domaine provoqu correspond
assertHeader($header, $content)Passe si une entte tlcharge correspond cette valeur
assertNoUnwantedHeader($header)Passe si une entte n'a pas t tlcharg
assertHeaderPattern($header, $pattern)Passe si une entte tlcharge correspond cette expression rationnelle Perl
assertCookie($name, $value)Passe s'il existe un cookie correspondant
assertNoCookie($name)Passe s'il n'y a pas de cookie avec un tel nom
- Comme d'habitude avec les assertions de SimpleTest, - elles renvoient toutes "false" en cas d'chec - et "true" si c'est un succs. - Elles renvoient aussi un message de test optionnel : - vous pouvez l'ajouter dans votre propre message en utilisant "%s". -

-

- A prsent nous pourrions effectu le test sur le titre uniquement... -$this->assertTitle('The Last Craft?'); -]]> - En plus d'une simple vrification sur le contenu HTML, - nous pouvons aussi vrifier que le type MIME est bien d'un type acceptable... -$this->assertMime(array('text/plain', 'text/html')); -]]> - Plus intressant encore est la vrification sur - le code de la rponse HTTP. Pareillement au type MIME, - nous pouvons nous assurer que le code renvoy se trouve - bien dans un liste de valeurs possibles... -get('http://simpletest.sourceforge.net/'); - $this->assertResponse(200); - } -} -]]> - Ici nous vrifions que le tlchargement s'est - bien termin en ne permettant qu'une rponse HTTP 200. - Ce test passera, mais ce n'est pas la meilleure faon de procder. - Il n'existe aucune page sur http://simpletest.sourceforge.net/, - la place le serveur renverra une redirection vers - http://www.lastcraft.com/simple_test.php. - WebTestCase suit automatiquement trois - de ces redirections. Les tests sont quelque peu plus - robustes de la sorte. Surtout qu'on est souvent plus intress - par l'interaction entre les pages que de leur simple livraison. - Si les redirections se rvlent tre digne d'intrt, - il reste possible de les supprimer... - - $this->setMaximumRedirects(0); - $this->get('http://simpletest.sourceforge.net/'); - $this->assertResponse(200); - } -} -]]> - Alors l'assertion choue comme prvue... -

-Web site tests
-1) Expecting response in [200] got [302]
-    in testhomepage
-    in testoflastcraft
-    in lastcraft_test.php
-FAILURES!!!
-Test cases run: 1/1, Failures: 1, Exceptions: 0
-
- Nous pouvons modifier le test pour accepter les redirections... -setMaximumRedirects(0); - $this->get('http://simpletest.sourceforge.net/'); - $this->assertResponse(array(301, 302, 303, 307)); - } -} -]]> - Maitenant a passe. -

-
-
-

- Les utilisateurs ne naviguent pas souvent en tapant les URLs, - mais surtout en cliquant sur des liens et des boutons. - Ici nous confirmons que les informations sur le contact - peuvent tre atteintes depuis la page d'accueil... -get('http://www.lastcraft.com/'); - $this->clickLink('About'); - $this->assertTitle('About Last Craft'); - } -} -]]> - Le paramtre est le texte du lien. -

-

- Il l'objectif est un bouton plutt qu'une balise ancre, - alors clickSubmit() doit tre utilis avec - le titre du bouton... -$this->clickSubmit('Go!'); -]]> -

-

- La liste des mthodes de navigation est... - - - - - - - - - - - - - - - - - - - - - -
get($url, $parameters)Envoie une requte GET avec ces paramtres
post($url, $parameters)Envoie une requte POST avec ces paramtres
head($url, $parameters)Envoie une requte HEAD sans remplacer le contenu de la page
retry()Relance la dernire requte
back()Identique au bouton "Prcdent" du navigateur
forward()Identique au bouton "Suivant" du navigateur
authenticate($name, $password)Re-essaye avec une tentative d'authentification
getFrameFocus()Le nom de la fentre en cours d'utilisation
setFrameFocusByIndex($choice)Change le focus d'une fentre en commenant par 1
setFrameFocus($name)Change le focus d'une fentre en utilisant son nom
clearFrameFocus()Revient un traitement de toutes les fentres comme une seule
clickSubmit($label)Clique sur le premier bouton avec cette tiquette
clickSubmitByName($name)Clique sur le bouton avec cet attribut de nom
clickSubmitById($id)Clique sur le bouton avec cet attribut d'identification
clickImage($label, $x, $y)Clique sur une balise input de type image par son titre (title="*") our son texte alternatif (alt="*")
clickImageByName($name, $x, $y)Clique sur une balise input de type image par son attribut (name="*")
clickImageById($id, $x, $y)Clique sur une balise input de type image par son identifiant (id="*")
submitFormById($id)Soumet un formulaire sans valeur de soumission
clickLink($label, $index)Clique sur une ancre avec ce texte d'tiquette visible
clickLinkById($id)Clique sur une ancre avec cet attribut d'identification
-

-

- Les paramtres dans les mthodes get(), - post() et head() sont optionnels. - Le tlchargement via HTTP HEAD ne modifie pas - le contexte du navigateur, il se limite au chargement des cookies. - Cela peut tre utilise lorsqu'une image ou une feuille de style - initie un cookie pour bloquer un robot trop entreprenant. -

-

- Les commandes retry(), back() - et forward() fonctionnent exactement comme - dans un navigateur. Elles utilisent l'historique pour - relancer les pages. Une technique bien pratique pour - vrifier les effets d'un bouton retour sur vos formulaires. -

-

- Les mthodes sur les fentres mritent une petite explication. - Par dfaut, une page avec des fentres est traite comme toutes - les autres. Le contenu sera vrifi travers l'ensemble de - la "frameset", par consquent un lien fonctionnera, - peu importe la fentre qui contient la balise ancre. - Vous pouvez outrepass ce comportement en exigeant - le focus sur une unique fentre. Si vous ralisez cela, - toutes les recherches et toutes les actions se limiteront - cette unique fentre, y compris les demandes d'authentification. - Si un lien ou un bouton n'est pas dans la fentre en focus alors - il ne peut pas tre cliqu. -

-

- Tester la navigation sur des pages fixes ne vous alerte que - quand vous avez cass un script entier. - Pour des pages fortement dynamiques, - un forum de discussion par exemple, - a peut tre crucial pour vrifier l'tat de l'application. - Pour la plupart des applications cependant, - la logique vraiment dlicate se situe dans la gestion - des formulaires et des sessions. - Heureusement SimpleTest aussi inclut - - des outils pour tester des formulaires web. -

-
-
-

- Bien que SimpleTest n'ait pas comme objectif - de contrler des erreurs rseau, il contient quand mme - des mthodes pour modifier et dboguer les requtes qu'il lance. - Voici une autre liste de mthode... - - - - - - - - - - - - -
getTransportError()La dernire erreur de socket
getUrl()La localisation courante
showRequest()Dverse la requte sortante
showHeaders()Dverse les enttes d'entre
showSource()Dverse le contenu brut de la page HTML
ignoreFrames()Ne recharge pas les framesets
setCookie($name, $value)Initie un cookie partir de maintenant
addHeader($header)Ajoute toujours cette entte la requte
setMaximumRedirects($max)S'arrte aprs autant de redirections
setConnectionTimeout($timeout)Termine la connexion aprs autant de temps entre les bytes
useProxy($proxy, $name, $password)Effectue les requtes travers ce proxy d'URL
-

-
-
- - - Russir tlcharger une page web - - - Tester le contenu de la page - - - Naviguer sur un site web pendant le test - - - Mthodes pour modifier une requte et pour dboguer - - - - - La page du projet SimpleTest sur - SourceForge. - - - La page de tlchargement de SimpleTest sur - LastCraft. - - - L'API du dveloppeur pour SimpleTest - donne tous les dtails sur les classes et les assertions disponibles. - - - - - dveloppement logiciel, - programmation php pour des clients, - php orient client, - outils de dveloppement logiciel, - framework de test de recette, - scripts php gratuits, - architecture, - ressources php, - HTMLUnit, - JWebUnit, - test php, - ressource de test unitaire, - test web - - -
\ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/dumper.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/dumper.php deleted file mode 100644 index ef2662d9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/dumper.php +++ /dev/null @@ -1,359 +0,0 @@ -getType($value); - switch($type) { - case "Null": - return "NULL"; - case "Boolean": - return "Boolean: " . ($value ? "true" : "false"); - case "Array": - return "Array: " . count($value) . " items"; - case "Object": - return "Object: of " . get_class($value); - case "String": - return "String: " . $this->clipString($value, 200); - default: - return "$type: $value"; - } - return "Unknown"; - } - - /** - * Gets the string representation of a type. - * @param mixed $value Variable to check against. - * @return string Type. - * @access public - */ - function getType($value) { - if (! isset($value)) { - return "Null"; - } elseif (is_bool($value)) { - return "Boolean"; - } elseif (is_string($value)) { - return "String"; - } elseif (is_integer($value)) { - return "Integer"; - } elseif (is_float($value)) { - return "Float"; - } elseif (is_array($value)) { - return "Array"; - } elseif (is_resource($value)) { - return "Resource"; - } elseif (is_object($value)) { - return "Object"; - } - return "Unknown"; - } - - /** - * Creates a human readable description of the - * difference between two variables. Uses a - * dynamic call. - * @param mixed $first First variable. - * @param mixed $second Value to compare with. - * @param boolean $identical If true then type anomolies count. - * @return string Description of difference. - * @access public - */ - function describeDifference($first, $second, $identical = false) { - if ($identical) { - if (! $this->isTypeMatch($first, $second)) { - return "with type mismatch as [" . $this->describeValue($first) . - "] does not match [" . $this->describeValue($second) . "]"; - } - } - $type = $this->getType($first); - if ($type == "Unknown") { - return "with unknown type"; - } - $method = 'describe' . $type . 'Difference'; - return $this->$method($first, $second, $identical); - } - - /** - * Tests to see if types match. - * @param mixed $first First variable. - * @param mixed $second Value to compare with. - * @return boolean True if matches. - * @access private - */ - protected function isTypeMatch($first, $second) { - return ($this->getType($first) == $this->getType($second)); - } - - /** - * Clips a string to a maximum length. - * @param string $value String to truncate. - * @param integer $size Minimum string size to show. - * @param integer $position Centre of string section. - * @return string Shortened version. - * @access public - */ - function clipString($value, $size, $position = 0) { - $length = strlen($value); - if ($length <= $size) { - return $value; - } - $position = min($position, $length); - $start = ($size/2 > $position ? 0 : $position - $size/2); - if ($start + $size > $length) { - $start = $length - $size; - } - $value = substr($value, $start, $size); - return ($start > 0 ? "..." : "") . $value . ($start + $size < $length ? "..." : ""); - } - - /** - * Creates a human readable description of the - * difference between two variables. The minimal - * version. - * @param null $first First value. - * @param mixed $second Value to compare with. - * @return string Human readable description. - * @access private - */ - protected function describeGenericDifference($first, $second) { - return "as [" . $this->describeValue($first) . - "] does not match [" . - $this->describeValue($second) . "]"; - } - - /** - * Creates a human readable description of the - * difference between a null and another variable. - * @param null $first First null. - * @param mixed $second Null to compare with. - * @param boolean $identical If true then type anomolies count. - * @return string Human readable description. - * @access private - */ - protected function describeNullDifference($first, $second, $identical) { - return $this->describeGenericDifference($first, $second); - } - - /** - * Creates a human readable description of the - * difference between a boolean and another variable. - * @param boolean $first First boolean. - * @param mixed $second Boolean to compare with. - * @param boolean $identical If true then type anomolies count. - * @return string Human readable description. - * @access private - */ - protected function describeBooleanDifference($first, $second, $identical) { - return $this->describeGenericDifference($first, $second); - } - - /** - * Creates a human readable description of the - * difference between a string and another variable. - * @param string $first First string. - * @param mixed $second String to compare with. - * @param boolean $identical If true then type anomolies count. - * @return string Human readable description. - * @access private - */ - protected function describeStringDifference($first, $second, $identical) { - if (is_object($second) || is_array($second)) { - return $this->describeGenericDifference($first, $second); - } - $position = $this->stringDiffersAt($first, $second); - $message = "at character $position"; - $message .= " with [" . - $this->clipString($first, 200, $position) . "] and [" . - $this->clipString($second, 200, $position) . "]"; - return $message; - } - - /** - * Creates a human readable description of the - * difference between an integer and another variable. - * @param integer $first First number. - * @param mixed $second Number to compare with. - * @param boolean $identical If true then type anomolies count. - * @return string Human readable description. - * @access private - */ - protected function describeIntegerDifference($first, $second, $identical) { - if (is_object($second) || is_array($second)) { - return $this->describeGenericDifference($first, $second); - } - return "because [" . $this->describeValue($first) . - "] differs from [" . - $this->describeValue($second) . "] by " . - abs($first - $second); - } - - /** - * Creates a human readable description of the - * difference between two floating point numbers. - * @param float $first First float. - * @param mixed $second Float to compare with. - * @param boolean $identical If true then type anomolies count. - * @return string Human readable description. - * @access private - */ - protected function describeFloatDifference($first, $second, $identical) { - if (is_object($second) || is_array($second)) { - return $this->describeGenericDifference($first, $second); - } - return "because [" . $this->describeValue($first) . - "] differs from [" . - $this->describeValue($second) . "] by " . - abs($first - $second); - } - - /** - * Creates a human readable description of the - * difference between two arrays. - * @param array $first First array. - * @param mixed $second Array to compare with. - * @param boolean $identical If true then type anomolies count. - * @return string Human readable description. - * @access private - */ - protected function describeArrayDifference($first, $second, $identical) { - if (! is_array($second)) { - return $this->describeGenericDifference($first, $second); - } - if (! $this->isMatchingKeys($first, $second, $identical)) { - return "as key list [" . - implode(", ", array_keys($first)) . "] does not match key list [" . - implode(", ", array_keys($second)) . "]"; - } - foreach (array_keys($first) as $key) { - if ($identical && ($first[$key] === $second[$key])) { - continue; - } - if (! $identical && ($first[$key] == $second[$key])) { - continue; - } - return "with member [$key] " . $this->describeDifference( - $first[$key], - $second[$key], - $identical); - } - return ""; - } - - /** - * Compares two arrays to see if their key lists match. - * For an identical match, the ordering and types of the keys - * is significant. - * @param array $first First array. - * @param array $second Array to compare with. - * @param boolean $identical If true then type anomolies count. - * @return boolean True if matching. - * @access private - */ - protected function isMatchingKeys($first, $second, $identical) { - $first_keys = array_keys($first); - $second_keys = array_keys($second); - if ($identical) { - return ($first_keys === $second_keys); - } - sort($first_keys); - sort($second_keys); - return ($first_keys == $second_keys); - } - - /** - * Creates a human readable description of the - * difference between a resource and another variable. - * @param resource $first First resource. - * @param mixed $second Resource to compare with. - * @param boolean $identical If true then type anomolies count. - * @return string Human readable description. - * @access private - */ - protected function describeResourceDifference($first, $second, $identical) { - return $this->describeGenericDifference($first, $second); - } - - /** - * Creates a human readable description of the - * difference between two objects. - * @param object $first First object. - * @param mixed $second Object to compare with. - * @param boolean $identical If true then type anomolies count. - * @return string Human readable description. - * @access private - */ - protected function describeObjectDifference($first, $second, $identical) { - if (! is_object($second)) { - return $this->describeGenericDifference($first, $second); - } - return $this->describeArrayDifference( - get_object_vars($first), - get_object_vars($second), - $identical); - } - - /** - * Find the first character position that differs - * in two strings by binary chop. - * @param string $first First string. - * @param string $second String to compare with. - * @return integer Position of first differing - * character. - * @access private - */ - protected function stringDiffersAt($first, $second) { - if (! $first || ! $second) { - return 0; - } - if (strlen($first) < strlen($second)) { - list($first, $second) = array($second, $first); - } - $position = 0; - $step = strlen($first); - while ($step > 1) { - $step = (integer)(($step + 1) / 2); - if (strncmp($first, $second, $position + $step) == 0) { - $position += $step; - } - } - return $position; - } - - /** - * Sends a formatted dump of a variable to a string. - * @param mixed $variable Variable to display. - * @return string Output from print_r(). - * @access public - */ - function dump($variable) { - ob_start(); - print_r($variable); - $formatted = ob_get_contents(); - ob_end_clean(); - return $formatted; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/eclipse.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/eclipse.php deleted file mode 100644 index bd0349ac..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/eclipse.php +++ /dev/null @@ -1,307 +0,0 @@ -listener = &$listener; - $this->SimpleScorer(); - $this->case = ""; - $this->group = ""; - $this->method = ""; - $this->cc = $cc; - $this->error = false; - $this->fail = false; - } - - /** - * Means to display human readable object comparisons. - * @return SimpleDumper Visual comparer. - */ - function getDumper() { - return new SimpleDumper(); - } - - /** - * Localhost connection from Eclipse. - * @param integer $port Port to connect to Eclipse. - * @param string $host Normally localhost. - * @return SimpleSocket Connection to Eclipse. - */ - function &createListener($port, $host="127.0.0.1"){ - $tmplistener = &new SimpleSocket($host, $port, 5); - return $tmplistener; - } - - /** - * Wraps the test in an output buffer. - * @param SimpleInvoker $invoker Current test runner. - * @return EclipseInvoker Decorator with output buffering. - * @access public - */ - function &createInvoker(&$invoker){ - $eclinvoker = &new EclipseInvoker($invoker, $this->listener); - return $eclinvoker; - } - - /** - * C style escaping. - * @param string $raw String with backslashes, quotes and whitespace. - * @return string Replaced with C backslashed tokens. - */ - function escapeVal($raw){ - $needle = array("\\","\"","/","\b","\f","\n","\r","\t"); - $replace = array('\\\\','\"','\/','\b','\f','\n','\r','\t'); - return str_replace($needle, $replace, $raw); - } - - /** - * Stash the first passing item. Clicking the test - * item goes to first pass. - * @param string $message Test message, but we only wnat the first. - * @access public - */ - function paintPass($message){ - if (! $this->pass){ - $this->message = $this->escapeVal($message); - } - $this->pass = true; - } - - /** - * Stash the first failing item. Clicking the test - * item goes to first fail. - * @param string $message Test message, but we only wnat the first. - * @access public - */ - function paintFail($message){ - //only get the first failure or error - if (! $this->fail && ! $this->error){ - $this->fail = true; - $this->message = $this->escapeVal($message); - $this->listener->write('{status:"fail",message:"'.$this->message.'",group:"'.$this->group.'",case:"'.$this->case.'",method:"'.$this->method.'"}'); - } - } - - /** - * Stash the first error. Clicking the test - * item goes to first error. - * @param string $message Test message, but we only wnat the first. - * @access public - */ - function paintError($message){ - if (! $this->fail && ! $this->error){ - $this->error = true; - $this->message = $this->escapeVal($message); - $this->listener->write('{status:"error",message:"'.$this->message.'",group:"'.$this->group.'",case:"'.$this->case.'",method:"'.$this->method.'"}'); - } - } - - - /** - * Stash the first exception. Clicking the test - * item goes to first message. - * @param string $message Test message, but we only wnat the first. - * @access public - */ - function paintException($exception){ - if (! $this->fail && ! $this->error){ - $this->error = true; - $message = 'Unexpected exception of type[' . get_class($exception) . - '] with message [' . $exception->getMessage() . '] in [' . - $exception->getFile() .' line '. $exception->getLine() . ']'; - $this->message = $this->escapeVal($message); - $this->listener->write( - '{status:"error",message:"' . $this->message . '",group:"' . - $this->group . '",case:"' . $this->case . '",method:"' . $this->method - . '"}'); - } - } - - - /** - * We don't display any special header. - * @param string $test_name First test top level - * to start. - * @access public - */ - function paintHeader($test_name) { - } - - /** - * We don't display any special footer. - * @param string $test_name The top level test. - * @access public - */ - function paintFooter($test_name) { - } - - /** - * Paints nothing at the start of a test method, but stash - * the method name for later. - * @param string $test_name Name of test that is starting. - * @access public - */ - function paintMethodStart($method) { - $this->pass = false; - $this->fail = false; - $this->error = false; - $this->method = $this->escapeVal($method); - } - - /** - * Only send one message if the test passes, after that - * suppress the message. - * @param string $test_name Name of test that is ending. - * @access public - */ - function paintMethodEnd($method){ - if ($this->fail || $this->error || ! $this->pass){ - } else { - $this->listener->write( - '{status:"pass",message:"' . $this->message . '",group:"' . - $this->group . '",case:"' . $this->case . '",method:"' . - $this->method . '"}'); - } - } - - /** - * Stashes the test case name for the later failure message. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintCaseStart($case){ - $this->case = $this->escapeVal($case); - } - - /** - * Drops the name. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintCaseEnd($case){ - $this->case = ""; - } - - /** - * Stashes the name of the test suite. Starts test coverage - * if enabled. - * @param string $group Name of test or other label. - * @param integer $size Number of test cases starting. - * @access public - */ - function paintGroupStart($group, $size){ - $this->group = $this->escapeVal($group); - if ($this->cc){ - if (extension_loaded('xdebug')){ - xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); - } - } - } - - /** - * Paints coverage report if enabled. - * @param string $group Name of test or other label. - * @access public - */ - function paintGroupEnd($group){ - $this->group = ""; - $cc = ""; - if ($this->cc){ - if (extension_loaded('xdebug')){ - $arrfiles = xdebug_get_code_coverage(); - xdebug_stop_code_coverage(); - $thisdir = dirname(__FILE__); - $thisdirlen = strlen($thisdir); - foreach ($arrfiles as $index=>$file){ - if (substr($index, 0, $thisdirlen)===$thisdir){ - continue; - } - $lcnt = 0; - $ccnt = 0; - foreach ($file as $line){ - if ($line == -2){ - continue; - } - $lcnt++; - if ($line==1){ - $ccnt++; - } - } - if ($lcnt > 0){ - $cc .= round(($ccnt/$lcnt) * 100, 2) . '%'; - }else{ - $cc .= "0.00%"; - } - $cc.= "\t". $index . "\n"; - } - } - } - $this->listener->write('{status:"coverage",message:"' . - EclipseReporter::escapeVal($cc) . '"}'); - } -} - -/** - * Invoker decorator for Eclipse. Captures output until - * the end of the test. - * @package SimpleTest - * @subpackage Eclipse - */ -class EclipseInvoker extends SimpleInvokerDecorator{ - function __construct(&$invoker, &$listener) { - $this->listener = &$listener; - $this->SimpleInvokerDecorator($invoker); - } - - /** - * Starts output buffering. - * @param string $method Test method to call. - * @access public - */ - function before($method){ - ob_start(); - $this->invoker->before($method); - } - - /** - * Stops output buffering and send the captured output - * to the listener. - * @param string $method Test method to call. - * @access public - */ - function after($method) { - $this->invoker->after($method); - $output = ob_get_contents(); - ob_end_clean(); - if ($output !== ""){ - $result = $this->listener->write('{status:"info",message:"' . - EclipseReporter::escapeVal($output) . '"}'); - } - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/encoding.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/encoding.php deleted file mode 100644 index e44964d7..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/encoding.php +++ /dev/null @@ -1,552 +0,0 @@ -key = $key; - $this->value = $value; - } - - /** - * The pair as a single string. - * @return string Encoded pair. - * @access public - */ - function asRequest() { - return urlencode($this->key) . '=' . urlencode($this->value); - } - - /** - * The MIME part as a string. - * @return string MIME part encoding. - * @access public - */ - function asMime() { - $part = 'Content-Disposition: form-data; '; - $part .= "name=\"" . $this->key . "\"\r\n"; - $part .= "\r\n" . $this->value; - return $part; - } - - /** - * Is this the value we are looking for? - * @param string $key Identifier. - * @return boolean True if matched. - * @access public - */ - function isKey($key) { - return $key == $this->key; - } - - /** - * Is this the value we are looking for? - * @return string Identifier. - * @access public - */ - function getKey() { - return $this->key; - } - - /** - * Is this the value we are looking for? - * @return string Content. - * @access public - */ - function getValue() { - return $this->value; - } -} - -/** - * Single post parameter. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleAttachment { - private $key; - private $content; - private $filename; - - /** - * Stashes the data for rendering later. - * @param string $key Key to add value to. - * @param string $content Raw data. - * @param hash $filename Original filename. - */ - function __construct($key, $content, $filename) { - $this->key = $key; - $this->content = $content; - $this->filename = $filename; - } - - /** - * The pair as a single string. - * @return string Encoded pair. - * @access public - */ - function asRequest() { - return ''; - } - - /** - * The MIME part as a string. - * @return string MIME part encoding. - * @access public - */ - function asMime() { - $part = 'Content-Disposition: form-data; '; - $part .= 'name="' . $this->key . '"; '; - $part .= 'filename="' . $this->filename . '"'; - $part .= "\r\nContent-Type: " . $this->deduceMimeType(); - $part .= "\r\n\r\n" . $this->content; - return $part; - } - - /** - * Attempts to figure out the MIME type from the - * file extension and the content. - * @return string MIME type. - * @access private - */ - protected function deduceMimeType() { - if ($this->isOnlyAscii($this->content)) { - return 'text/plain'; - } - return 'application/octet-stream'; - } - - /** - * Tests each character is in the range 0-127. - * @param string $ascii String to test. - * @access private - */ - protected function isOnlyAscii($ascii) { - for ($i = 0, $length = strlen($ascii); $i < $length; $i++) { - if (ord($ascii[$i]) > 127) { - return false; - } - } - return true; - } - - /** - * Is this the value we are looking for? - * @param string $key Identifier. - * @return boolean True if matched. - * @access public - */ - function isKey($key) { - return $key == $this->key; - } - - /** - * Is this the value we are looking for? - * @return string Identifier. - * @access public - */ - function getKey() { - return $this->key; - } - - /** - * Is this the value we are looking for? - * @return string Content. - * @access public - */ - function getValue() { - return $this->filename; - } -} - -/** - * Bundle of GET/POST parameters. Can include - * repeated parameters. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleEncoding { - private $request; - - /** - * Starts empty. - * @param array $query Hash of parameters. - * Multiple values are - * as lists on a single key. - * @access public - */ - function __construct($query = false) { - if (! $query) { - $query = array(); - } - $this->clear(); - $this->merge($query); - } - - /** - * Empties the request of parameters. - * @access public - */ - function clear() { - $this->request = array(); - } - - /** - * Adds a parameter to the query. - * @param string $key Key to add value to. - * @param string/array $value New data. - * @access public - */ - function add($key, $value) { - if ($value === false) { - return; - } - if (is_array($value)) { - foreach ($value as $item) { - $this->addPair($key, $item); - } - } else { - $this->addPair($key, $value); - } - } - - /** - * Adds a new value into the request. - * @param string $key Key to add value to. - * @param string/array $value New data. - * @access private - */ - protected function addPair($key, $value) { - $this->request[] = new SimpleEncodedPair($key, $value); - } - - /** - * Adds a MIME part to the query. Does nothing for a - * form encoded packet. - * @param string $key Key to add value to. - * @param string $content Raw data. - * @param hash $filename Original filename. - * @access public - */ - function attach($key, $content, $filename) { - $this->request[] = new SimpleAttachment($key, $content, $filename); - } - - /** - * Adds a set of parameters to this query. - * @param array/SimpleQueryString $query Multiple values are - * as lists on a single key. - * @access public - */ - function merge($query) { - if (is_object($query)) { - $this->request = array_merge($this->request, $query->getAll()); - } elseif (is_array($query)) { - foreach ($query as $key => $value) { - $this->add($key, $value); - } - } - } - - /** - * Accessor for single value. - * @return string/array False if missing, string - * if present and array if - * multiple entries. - * @access public - */ - function getValue($key) { - $values = array(); - foreach ($this->request as $pair) { - if ($pair->isKey($key)) { - $values[] = $pair->getValue(); - } - } - if (count($values) == 0) { - return false; - } elseif (count($values) == 1) { - return $values[0]; - } else { - return $values; - } - } - - /** - * Accessor for listing of pairs. - * @return array All pair objects. - * @access public - */ - function getAll() { - return $this->request; - } - - /** - * Renders the query string as a URL encoded - * request part. - * @return string Part of URL. - * @access protected - */ - protected function encode() { - $statements = array(); - foreach ($this->request as $pair) { - if ($statement = $pair->asRequest()) { - $statements[] = $statement; - } - } - return implode('&', $statements); - } -} - -/** - * Bundle of GET parameters. Can include - * repeated parameters. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleGetEncoding extends SimpleEncoding { - - /** - * Starts empty. - * @param array $query Hash of parameters. - * Multiple values are - * as lists on a single key. - * @access public - */ - function __construct($query = false) { - parent::__construct($query); - } - - /** - * HTTP request method. - * @return string Always GET. - * @access public - */ - function getMethod() { - return 'GET'; - } - - /** - * Writes no extra headers. - * @param SimpleSocket $socket Socket to write to. - * @access public - */ - function writeHeadersTo(&$socket) { - } - - /** - * No data is sent to the socket as the data is encoded into - * the URL. - * @param SimpleSocket $socket Socket to write to. - * @access public - */ - function writeTo(&$socket) { - } - - /** - * Renders the query string as a URL encoded - * request part for attaching to a URL. - * @return string Part of URL. - * @access public - */ - function asUrlRequest() { - return $this->encode(); - } -} - -/** - * Bundle of URL parameters for a HEAD request. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleHeadEncoding extends SimpleGetEncoding { - - /** - * Starts empty. - * @param array $query Hash of parameters. - * Multiple values are - * as lists on a single key. - * @access public - */ - function SimpleHeadEncoding($query = false) { - $this->SimpleGetEncoding($query); - } - - /** - * HTTP request method. - * @return string Always HEAD. - * @access public - */ - function getMethod() { - return 'HEAD'; - } -} - -/** - * Bundle of POST parameters. Can include - * repeated parameters. - * @package SimpleTest - * @subpackage WebTester - */ -class SimplePostEncoding extends SimpleEncoding { - - /** - * Starts empty. - * @param array $query Hash of parameters. - * Multiple values are - * as lists on a single key. - * @access public - */ - function __construct($query = false) { - if (is_array($query) and $this->hasMoreThanOneLevel($query)) { - $query = $this->rewriteArrayWithMultipleLevels($query); - } - parent::__construct($query); - } - - function hasMoreThanOneLevel($query) { - foreach ($query as $key => $value) { - if (is_array($value)) { - return true; - } - } - return false; - } - - function rewriteArrayWithMultipleLevels($query) { - $query_ = array(); - foreach ($query as $key => $value) { - if (is_array($value)) { - foreach ($value as $sub_key => $sub_value) { - $query_[$key."[".$sub_key."]"] = $sub_value; - } - } else { - $query_[$key] = $value; - } - } - if ($this->hasMoreThanOneLevel($query_)) { - $query_ = $this->rewriteArrayWithMultipleLevels($query_); - } - - return $query_; - } - - - /** - * HTTP request method. - * @return string Always POST. - * @access public - */ - function getMethod() { - return 'POST'; - } - - /** - * Dispatches the form headers down the socket. - * @param SimpleSocket $socket Socket to write to. - * @access public - */ - function writeHeadersTo(&$socket) { - $socket->write("Content-Length: " . (integer)strlen($this->encode()) . "\r\n"); - $socket->write("Content-Type: application/x-www-form-urlencoded\r\n"); - } - - /** - * Dispatches the form data down the socket. - * @param SimpleSocket $socket Socket to write to. - * @access public - */ - function writeTo(&$socket) { - $socket->write($this->encode()); - } - - /** - * Renders the query string as a URL encoded - * request part for attaching to a URL. - * @return string Part of URL. - * @access public - */ - function asUrlRequest() { - return ''; - } -} - -/** - * Bundle of POST parameters in the multipart - * format. Can include file uploads. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleMultipartEncoding extends SimplePostEncoding { - private $boundary; - - /** - * Starts empty. - * @param array $query Hash of parameters. - * Multiple values are - * as lists on a single key. - * @access public - */ - function __construct($query = false, $boundary = false) { - parent::__construct($query); - $this->boundary = ($boundary === false ? uniqid('st') : $boundary); - } - - /** - * Dispatches the form headers down the socket. - * @param SimpleSocket $socket Socket to write to. - * @access public - */ - function writeHeadersTo(&$socket) { - $socket->write("Content-Length: " . (integer)strlen($this->encode()) . "\r\n"); - $socket->write("Content-Type: multipart/form-data, boundary=" . $this->boundary . "\r\n"); - } - - /** - * Dispatches the form data down the socket. - * @param SimpleSocket $socket Socket to write to. - * @access public - */ - function writeTo(&$socket) { - $socket->write($this->encode()); - } - - /** - * Renders the query string as a URL encoded - * request part. - * @return string Part of URL. - * @access public - */ - function encode() { - $stream = ''; - foreach ($this->getAll() as $pair) { - $stream .= "--" . $this->boundary . "\r\n"; - $stream .= $pair->asMime() . "\r\n"; - } - $stream .= "--" . $this->boundary . "--\r\n"; - return $stream; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/errors.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/errors.php deleted file mode 100644 index 52385ee8..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/errors.php +++ /dev/null @@ -1,257 +0,0 @@ -createErrorQueue(); - set_error_handler('SimpleTestErrorHandler'); - parent::invoke($method); - restore_error_handler(); - $queue->tally(); - } - - /** - * Wires up the error queue for a single test. - * @return SimpleErrorQueue Queue connected to the test. - * @access private - */ - protected function createErrorQueue() { - $context = SimpleTest::getContext(); - $test = $this->getTestCase(); - $queue = $context->get('SimpleErrorQueue'); - $queue->setTestCase($test); - return $queue; - } -} - -/** - * Error queue used to record trapped - * errors. - * @package SimpleTest - * @subpackage UnitTester - */ -class SimpleErrorQueue { - private $queue; - private $expectation_queue; - private $test; - private $using_expect_style = false; - - /** - * Starts with an empty queue. - */ - function __construct() { - $this->clear(); - } - - /** - * Discards the contents of the error queue. - * @access public - */ - function clear() { - $this->queue = array(); - $this->expectation_queue = array(); - } - - /** - * Sets the currently running test case. - * @param SimpleTestCase $test Test case to send messages to. - * @access public - */ - function setTestCase($test) { - $this->test = $test; - } - - /** - * Sets up an expectation of an error. If this is - * not fulfilled at the end of the test, a failure - * will occour. If the error does happen, then this - * will cancel it out and send a pass message. - * @param SimpleExpectation $expected Expected error match. - * @param string $message Message to display. - * @access public - */ - function expectError($expected, $message) { - array_push($this->expectation_queue, array($expected, $message)); - } - - /** - * Adds an error to the front of the queue. - * @param integer $severity PHP error code. - * @param string $content Text of error. - * @param string $filename File error occoured in. - * @param integer $line Line number of error. - * @access public - */ - function add($severity, $content, $filename, $line) { - $content = str_replace('%', '%%', $content); - $this->testLatestError($severity, $content, $filename, $line); - } - - /** - * Any errors still in the queue are sent to the test - * case. Any unfulfilled expectations trigger failures. - * @access public - */ - function tally() { - while (list($severity, $message, $file, $line) = $this->extract()) { - $severity = $this->getSeverityAsString($severity); - $this->test->error($severity, $message, $file, $line); - } - while (list($expected, $message) = $this->extractExpectation()) { - $this->test->assert($expected, false, "%s -> Expected error not caught"); - } - } - - /** - * Tests the error against the most recent expected - * error. - * @param integer $severity PHP error code. - * @param string $content Text of error. - * @param string $filename File error occoured in. - * @param integer $line Line number of error. - * @access private - */ - protected function testLatestError($severity, $content, $filename, $line) { - if ($expectation = $this->extractExpectation()) { - list($expected, $message) = $expectation; - $this->test->assert($expected, $content, sprintf( - $message, - "%s -> PHP error [$content] severity [" . - $this->getSeverityAsString($severity) . - "] in [$filename] line [$line]")); - } else { - $this->test->error($severity, $content, $filename, $line); - } - } - - /** - * Pulls the earliest error from the queue. - * @return mixed False if none, or a list of error - * information. Elements are: severity - * as the PHP error code, the error message, - * the file with the error, the line number - * and a list of PHP super global arrays. - * @access public - */ - function extract() { - if (count($this->queue)) { - return array_shift($this->queue); - } - return false; - } - - /** - * Pulls the earliest expectation from the queue. - * @return SimpleExpectation False if none. - * @access private - */ - protected function extractExpectation() { - if (count($this->expectation_queue)) { - return array_shift($this->expectation_queue); - } - return false; - } - - /** - * Converts an error code into it's string - * representation. - * @param $severity PHP integer error code. - * @return String version of error code. - * @access public - */ - static function getSeverityAsString($severity) { - static $map = array( - E_STRICT => 'E_STRICT', - E_ERROR => 'E_ERROR', - E_WARNING => 'E_WARNING', - E_PARSE => 'E_PARSE', - E_NOTICE => 'E_NOTICE', - E_CORE_ERROR => 'E_CORE_ERROR', - E_CORE_WARNING => 'E_CORE_WARNING', - E_COMPILE_ERROR => 'E_COMPILE_ERROR', - E_COMPILE_WARNING => 'E_COMPILE_WARNING', - E_USER_ERROR => 'E_USER_ERROR', - E_USER_WARNING => 'E_USER_WARNING', - E_USER_NOTICE => 'E_USER_NOTICE'); - if (defined('E_RECOVERABLE_ERROR')) { - $map[E_RECOVERABLE_ERROR] = 'E_RECOVERABLE_ERROR'; - } - if (defined('E_DEPRECATED')) { - $map[E_DEPRECATED] = 'E_DEPRECATED'; - } - return $map[$severity]; - } -} - -/** - * Error handler that simply stashes any errors into the global - * error queue. Simulates the existing behaviour with respect to - * logging errors, but this feature may be removed in future. - * @param $severity PHP error code. - * @param $message Text of error. - * @param $filename File error occoured in. - * @param $line Line number of error. - * @param $super_globals Hash of PHP super global arrays. - * @access public - */ -function SimpleTestErrorHandler($severity, $message, $filename = null, $line = null, $super_globals = null, $mask = null) { - $severity = $severity & error_reporting(); - if ($severity) { - restore_error_handler(); - if (IsNotCausedBySimpleTest($message)) { - if (ini_get('log_errors')) { - $label = SimpleErrorQueue::getSeverityAsString($severity); - error_log("$label: $message in $filename on line $line"); - } - $queue = SimpleTest::getContext()->get('SimpleErrorQueue'); - $queue->add($severity, $message, $filename, $line); - } - set_error_handler('SimpleTestErrorHandler'); - } - return true; -} - -/** - * Certain messages can be caused by the unit tester itself. - * These have to be filtered. - * @param string $message Message to filter. - * @return boolean True if genuine failure. - */ -function IsNotCausedBySimpleTest($message) { - return ! preg_match('/returned by reference/', $message); -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/exceptions.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/exceptions.php deleted file mode 100644 index 984015d8..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/exceptions.php +++ /dev/null @@ -1,198 +0,0 @@ -get('SimpleExceptionTrap'); - $trap->clear(); - try { - $has_thrown = false; - parent::invoke($method); - } catch (Exception $exception) { - $has_thrown = true; - if (! $trap->isExpected($this->getTestCase(), $exception)) { - $this->getTestCase()->exception($exception); - } - $trap->clear(); - } - if ($message = $trap->getOutstanding()) { - $this->getTestCase()->fail($message); - } - if ($has_thrown) { - try { - parent::getTestCase()->tearDown(); - } catch (Exception $e) { } - } - } -} - -/** - * Tests exceptions either by type or the exact - * exception. This could be improved to accept - * a pattern expectation to test the error - * message, but that will have to come later. - * @package SimpleTest - * @subpackage UnitTester - */ -class ExceptionExpectation extends SimpleExpectation { - private $expected; - - /** - * Sets up the conditions to test against. - * If the expected value is a string, then - * it will act as a test of the class name. - * An exception as the comparison will - * trigger an identical match. Writing this - * down now makes it look doubly dumb. I hope - * come up with a better scheme later. - * @param mixed $expected A class name or an actual - * exception to compare with. - * @param string $message Message to display. - */ - function __construct($expected, $message = '%s') { - $this->expected = $expected; - parent::__construct($message); - } - - /** - * Carry out the test. - * @param Exception $compare Value to check. - * @return boolean True if matched. - */ - function test($compare) { - if (is_string($this->expected)) { - return ($compare instanceof $this->expected); - } - if (get_class($compare) != get_class($this->expected)) { - return false; - } - return $compare->getMessage() == $this->expected->getMessage(); - } - - /** - * Create the message to display describing the test. - * @param Exception $compare Exception to match. - * @return string Final message. - */ - function testMessage($compare) { - if (is_string($this->expected)) { - return "Exception [" . $this->describeException($compare) . - "] should be type [" . $this->expected . "]"; - } - return "Exception [" . $this->describeException($compare) . - "] should match [" . - $this->describeException($this->expected) . "]"; - } - - /** - * Summary of an Exception object. - * @param Exception $compare Exception to describe. - * @return string Text description. - */ - protected function describeException($exception) { - return get_class($exception) . ": " . $exception->getMessage(); - } -} - -/** - * Stores expected exceptions for when they - * get thrown. Saves the irritating try...catch - * block. - * @package SimpleTest - * @subpackage UnitTester - */ -class SimpleExceptionTrap { - private $expected; - private $message; - - /** - * Clears down the queue ready for action. - */ - function __construct() { - $this->clear(); - } - - /** - * Sets up an expectation of an exception. - * This has the effect of intercepting an - * exception that matches. - * @param SimpleExpectation $expected Expected exception to match. - * @param string $message Message to display. - * @access public - */ - function expectException($expected = false, $message = '%s') { - if ($expected === false) { - $expected = new AnythingExpectation(); - } - if (! SimpleExpectation::isExpectation($expected)) { - $expected = new ExceptionExpectation($expected); - } - $this->expected = $expected; - $this->message = $message; - } - - /** - * Compares the expected exception with any - * in the queue. Issues a pass or fail and - * returns the state of the test. - * @param SimpleTestCase $test Test case to send messages to. - * @param Exception $exception Exception to compare. - * @return boolean False on no match. - */ - function isExpected($test, $exception) { - if ($this->expected) { - return $test->assert($this->expected, $exception, $this->message); - } - return false; - } - - /** - * Tests for any left over exception. - * @return string/false The failure message or false if none. - */ - function getOutstanding() { - return sprintf($this->message, 'Failed to trap exception'); - } - - /** - * Discards the contents of the error queue. - */ - function clear() { - $this->expected = false; - $this->message = false; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/expectation.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/expectation.php deleted file mode 100644 index 97daa973..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/expectation.php +++ /dev/null @@ -1,901 +0,0 @@ -message = $message; - } - - /** - * Tests the expectation. True if correct. - * @param mixed $compare Comparison value. - * @return boolean True if correct. - * @access public - * @abstract - */ - function test($compare) { - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - * @abstract - */ - function testMessage($compare) { - } - - /** - * Overlays the generated message onto the stored user - * message. An additional message can be interjected. - * @param mixed $compare Comparison value. - * @param SimpleDumper $dumper For formatting the results. - * @return string Description of success - * or failure. - * @access public - */ - function overlayMessage($compare, $dumper) { - $this->dumper = $dumper; - return sprintf($this->message, $this->testMessage($compare)); - } - - /** - * Accessor for the dumper. - * @return SimpleDumper Current value dumper. - * @access protected - */ - protected function getDumper() { - if (! $this->dumper) { - $dumper = new SimpleDumper(); - return $dumper; - } - return $this->dumper; - } - - /** - * Test to see if a value is an expectation object. - * A useful utility method. - * @param mixed $expectation Hopefully an Expectation - * class. - * @return boolean True if descended from - * this class. - * @access public - */ - static function isExpectation($expectation) { - return is_object($expectation) && - SimpleTestCompatibility::isA($expectation, 'SimpleExpectation'); - } -} - -/** - * A wildcard expectation always matches. - * @package SimpleTest - * @subpackage MockObjects - */ -class AnythingExpectation extends SimpleExpectation { - - /** - * Tests the expectation. Always true. - * @param mixed $compare Ignored. - * @return boolean True. - * @access public - */ - function test($compare) { - return true; - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - return 'Anything always matches [' . $dumper->describeValue($compare) . ']'; - } -} - -/** - * An expectation that never matches. - * @package SimpleTest - * @subpackage MockObjects - */ -class FailedExpectation extends SimpleExpectation { - - /** - * Tests the expectation. Always false. - * @param mixed $compare Ignored. - * @return boolean True. - * @access public - */ - function test($compare) { - return false; - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - return 'Failed expectation never matches [' . $dumper->describeValue($compare) . ']'; - } -} - -/** - * An expectation that passes on boolean true. - * @package SimpleTest - * @subpackage MockObjects - */ -class TrueExpectation extends SimpleExpectation { - - /** - * Tests the expectation. - * @param mixed $compare Should be true. - * @return boolean True on match. - * @access public - */ - function test($compare) { - return (boolean)$compare; - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - return 'Expected true, got [' . $dumper->describeValue($compare) . ']'; - } -} - -/** - * An expectation that passes on boolean false. - * @package SimpleTest - * @subpackage MockObjects - */ -class FalseExpectation extends SimpleExpectation { - - /** - * Tests the expectation. - * @param mixed $compare Should be false. - * @return boolean True on match. - * @access public - */ - function test($compare) { - return ! (boolean)$compare; - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - return 'Expected false, got [' . $dumper->describeValue($compare) . ']'; - } -} - -/** - * Test for equality. - * @package SimpleTest - * @subpackage UnitTester - */ -class EqualExpectation extends SimpleExpectation { - private $value; - - /** - * Sets the value to compare against. - * @param mixed $value Test value to match. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($value, $message = '%s') { - parent::__construct($message); - $this->value = $value; - } - - /** - * Tests the expectation. True if it matches the - * held value. - * @param mixed $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return (($this->value == $compare) && ($compare == $this->value)); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - if ($this->test($compare)) { - return "Equal expectation [" . $this->dumper->describeValue($this->value) . "]"; - } else { - return "Equal expectation fails " . - $this->dumper->describeDifference($this->value, $compare); - } - } - - /** - * Accessor for comparison value. - * @return mixed Held value to compare with. - * @access protected - */ - protected function getValue() { - return $this->value; - } -} - -/** - * Test for inequality. - * @package SimpleTest - * @subpackage UnitTester - */ -class NotEqualExpectation extends EqualExpectation { - - /** - * Sets the value to compare against. - * @param mixed $value Test value to match. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($value, $message = '%s') { - parent::__construct($value, $message); - } - - /** - * Tests the expectation. True if it differs from the - * held value. - * @param mixed $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return ! parent::test($compare); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - if ($this->test($compare)) { - return "Not equal expectation passes " . - $dumper->describeDifference($this->getValue(), $compare); - } else { - return "Not equal expectation fails [" . - $dumper->describeValue($this->getValue()) . - "] matches"; - } - } -} - -/** - * Test for being within a range. - * @package SimpleTest - * @subpackage UnitTester - */ -class WithinMarginExpectation extends SimpleExpectation { - private $upper; - private $lower; - - /** - * Sets the value to compare against and the fuzziness of - * the match. Used for comparing floating point values. - * @param mixed $value Test value to match. - * @param mixed $margin Fuzziness of match. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($value, $margin, $message = '%s') { - parent::__construct($message); - $this->upper = $value + $margin; - $this->lower = $value - $margin; - } - - /** - * Tests the expectation. True if it matches the - * held value. - * @param mixed $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return (($compare <= $this->upper) && ($compare >= $this->lower)); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - if ($this->test($compare)) { - return $this->withinMessage($compare); - } else { - return $this->outsideMessage($compare); - } - } - - /** - * Creates a the message for being within the range. - * @param mixed $compare Value being tested. - * @access private - */ - protected function withinMessage($compare) { - return "Within expectation [" . $this->dumper->describeValue($this->lower) . "] and [" . - $this->dumper->describeValue($this->upper) . "]"; - } - - /** - * Creates a the message for being within the range. - * @param mixed $compare Value being tested. - * @access private - */ - protected function outsideMessage($compare) { - if ($compare > $this->upper) { - return "Outside expectation " . - $this->dumper->describeDifference($compare, $this->upper); - } else { - return "Outside expectation " . - $this->dumper->describeDifference($compare, $this->lower); - } - } -} - -/** - * Test for being outside of a range. - * @package SimpleTest - * @subpackage UnitTester - */ -class OutsideMarginExpectation extends WithinMarginExpectation { - - /** - * Sets the value to compare against and the fuzziness of - * the match. Used for comparing floating point values. - * @param mixed $value Test value to not match. - * @param mixed $margin Fuzziness of match. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($value, $margin, $message = '%s') { - parent::__construct($value, $margin, $message); - } - - /** - * Tests the expectation. True if it matches the - * held value. - * @param mixed $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return ! parent::test($compare); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - if (! $this->test($compare)) { - return $this->withinMessage($compare); - } else { - return $this->outsideMessage($compare); - } - } -} - -/** - * Test for reference. - * @package SimpleTest - * @subpackage UnitTester - */ -class ReferenceExpectation { - private $value; - - /** - * Sets the reference value to compare against. - * @param mixed $value Test reference to match. - * @param string $message Customised message on failure. - * @access public - */ - function __construct(&$value, $message = '%s') { - $this->message = $message; - $this->value = &$value; - } - - /** - * Tests the expectation. True if it exactly - * references the held value. - * @param mixed $compare Comparison reference. - * @return boolean True if correct. - * @access public - */ - function test(&$compare) { - return SimpleTestCompatibility::isReference($this->value, $compare); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - if ($this->test($compare)) { - return "Reference expectation [" . $this->dumper->describeValue($this->value) . "]"; - } else { - return "Reference expectation fails " . - $this->dumper->describeDifference($this->value, $compare); - } - } - - /** - * Overlays the generated message onto the stored user - * message. An additional message can be interjected. - * @param mixed $compare Comparison value. - * @param SimpleDumper $dumper For formatting the results. - * @return string Description of success - * or failure. - * @access public - */ - function overlayMessage($compare, $dumper) { - $this->dumper = $dumper; - return sprintf($this->message, $this->testMessage($compare)); - } - - /** - * Accessor for the dumper. - * @return SimpleDumper Current value dumper. - * @access protected - */ - protected function getDumper() { - if (! $this->dumper) { - $dumper = new SimpleDumper(); - return $dumper; - } - return $this->dumper; - } -} - -/** - * Test for identity. - * @package SimpleTest - * @subpackage UnitTester - */ -class IdenticalExpectation extends EqualExpectation { - - /** - * Sets the value to compare against. - * @param mixed $value Test value to match. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($value, $message = '%s') { - parent::__construct($value, $message); - } - - /** - * Tests the expectation. True if it exactly - * matches the held value. - * @param mixed $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return SimpleTestCompatibility::isIdentical($this->getValue(), $compare); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - if ($this->test($compare)) { - return "Identical expectation [" . $dumper->describeValue($this->getValue()) . "]"; - } else { - return "Identical expectation [" . $dumper->describeValue($this->getValue()) . - "] fails with [" . - $dumper->describeValue($compare) . "] " . - $dumper->describeDifference($this->getValue(), $compare, TYPE_MATTERS); - } - } -} - -/** - * Test for non-identity. - * @package SimpleTest - * @subpackage UnitTester - */ -class NotIdenticalExpectation extends IdenticalExpectation { - - /** - * Sets the value to compare against. - * @param mixed $value Test value to match. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($value, $message = '%s') { - parent::__construct($value, $message); - } - - /** - * Tests the expectation. True if it differs from the - * held value. - * @param mixed $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return ! parent::test($compare); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - if ($this->test($compare)) { - return "Not identical expectation passes " . - $dumper->describeDifference($this->getValue(), $compare, TYPE_MATTERS); - } else { - return "Not identical expectation [" . $dumper->describeValue($this->getValue()) . "] matches"; - } - } -} - -/** - * Test for a pattern using Perl regex rules. - * @package SimpleTest - * @subpackage UnitTester - */ -class PatternExpectation extends SimpleExpectation { - private $pattern; - - /** - * Sets the value to compare against. - * @param string $pattern Pattern to search for. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($pattern, $message = '%s') { - parent::__construct($message); - $this->pattern = $pattern; - } - - /** - * Accessor for the pattern. - * @return string Perl regex as string. - * @access protected - */ - protected function getPattern() { - return $this->pattern; - } - - /** - * Tests the expectation. True if the Perl regex - * matches the comparison value. - * @param string $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return (boolean)preg_match($this->getPattern(), $compare); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - if ($this->test($compare)) { - return $this->describePatternMatch($this->getPattern(), $compare); - } else { - $dumper = $this->getDumper(); - return "Pattern [" . $this->getPattern() . - "] not detected in [" . - $dumper->describeValue($compare) . "]"; - } - } - - /** - * Describes a pattern match including the string - * found and it's position. - * @param string $pattern Regex to match against. - * @param string $subject Subject to search. - * @access protected - */ - protected function describePatternMatch($pattern, $subject) { - preg_match($pattern, $subject, $matches); - $position = strpos($subject, $matches[0]); - $dumper = $this->getDumper(); - return "Pattern [$pattern] detected at character [$position] in [" . - $dumper->describeValue($subject) . "] as [" . - $matches[0] . "] in region [" . - $dumper->clipString($subject, 100, $position) . "]"; - } -} - -/** - * Fail if a pattern is detected within the - * comparison. - * @package SimpleTest - * @subpackage UnitTester - */ -class NoPatternExpectation extends PatternExpectation { - - /** - * Sets the reject pattern - * @param string $pattern Pattern to search for. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($pattern, $message = '%s') { - parent::__construct($pattern, $message); - } - - /** - * Tests the expectation. False if the Perl regex - * matches the comparison value. - * @param string $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return ! parent::test($compare); - } - - /** - * Returns a human readable test message. - * @param string $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - if ($this->test($compare)) { - $dumper = $this->getDumper(); - return "Pattern [" . $this->getPattern() . - "] not detected in [" . - $dumper->describeValue($compare) . "]"; - } else { - return $this->describePatternMatch($this->getPattern(), $compare); - } - } -} - -/** - * Tests either type or class name if it's an object. - * @package SimpleTest - * @subpackage UnitTester - */ -class IsAExpectation extends SimpleExpectation { - private $type; - - /** - * Sets the type to compare with. - * @param string $type Type or class name. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($type, $message = '%s') { - parent::__construct($message); - $this->type = $type; - } - - /** - * Accessor for type to check against. - * @return string Type or class name. - * @access protected - */ - protected function getType() { - return $this->type; - } - - /** - * Tests the expectation. True if the type or - * class matches the string value. - * @param string $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - if (is_object($compare)) { - return SimpleTestCompatibility::isA($compare, $this->type); - } else { - return (strtolower(gettype($compare)) == $this->canonicalType($this->type)); - } - } - - /** - * Coerces type name into a gettype() match. - * @param string $type User type. - * @return string Simpler type. - * @access private - */ - protected function canonicalType($type) { - $type = strtolower($type); - $map = array( - 'bool' => 'boolean', - 'float' => 'double', - 'real' => 'double', - 'int' => 'integer'); - if (isset($map[$type])) { - $type = $map[$type]; - } - return $type; - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - return "Value [" . $dumper->describeValue($compare) . - "] should be type [" . $this->type . "]"; - } -} - -/** - * Tests either type or class name if it's an object. - * Will succeed if the type does not match. - * @package SimpleTest - * @subpackage UnitTester - */ -class NotAExpectation extends IsAExpectation { - private $type; - - /** - * Sets the type to compare with. - * @param string $type Type or class name. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($type, $message = '%s') { - parent::__construct($type, $message); - } - - /** - * Tests the expectation. False if the type or - * class matches the string value. - * @param string $compare Comparison value. - * @return boolean True if different. - * @access public - */ - function test($compare) { - return ! parent::test($compare); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - return "Value [" . $dumper->describeValue($compare) . - "] should not be type [" . $this->getType() . "]"; - } -} - -/** - * Tests for existance of a method in an object - * @package SimpleTest - * @subpackage UnitTester - */ -class MethodExistsExpectation extends SimpleExpectation { - private $method; - - /** - * Sets the value to compare against. - * @param string $method Method to check. - * @param string $message Customised message on failure. - * @access public - * @return void - */ - function __construct($method, $message = '%s') { - parent::__construct($message); - $this->method = &$method; - } - - /** - * Tests the expectation. True if the method exists in the test object. - * @param string $compare Comparison method name. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return (boolean)(is_object($compare) && method_exists($compare, $this->method)); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - if (! is_object($compare)) { - return 'No method on non-object [' . $dumper->describeValue($compare) . ']'; - } - $method = $this->method; - return "Object [" . $dumper->describeValue($compare) . - "] should contain method [$method]"; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/colortext_reporter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/colortext_reporter.php deleted file mode 100644 index a265226d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/colortext_reporter.php +++ /dev/null @@ -1,86 +0,0 @@ - - * @package SimpleTest - * @subpackage Extensions - */ -class ColorTextReporter extends TextReporter { - var $_failColor = 41; - var $_passColor = 42; - - /** - * Handle initialization - * - * @param {@link TextReporter} - */ - function __construct() { - parent::__construct(); - } - - /** - * Capture the attempt to display the final test results and insert the - * ANSI-color codes in place. - * - * @param string - * @see TextReporter - * @access public - */ - function paintFooter($test_name) { - ob_start(); - parent::paintFooter($test_name); - $output = trim(ob_get_clean()); - if ($output) { - if (($this->getFailCount() + $this->getExceptionCount()) == 0) { - $color = $this->_passColor; - } else { - $color = $this->_failColor; - } - - $this->_setColor($color); - echo $output; - $this->_resetColor(); - } - } - - - /** - * Sets the terminal to an ANSI-standard $color - * - * @param int - * @access protected - */ - function _setColor($color) { - printf("%s[%sm\n", chr(27), $color); - } - - - /** - * Resets the color back to normal. - * - * @access protected - */ - function _resetColor() { - $this->_setColor(0); - } -} - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/css/webunit.css b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/css/webunit.css deleted file mode 100644 index 49da468f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/css/webunit.css +++ /dev/null @@ -1,78 +0,0 @@ -html { - font-face: Verdana, Arial, Helvetica, sans-serif; - font-weight: bold; - color: black; - } - -.pass { color: green; } -.fail { color: red; } -.activetab { - position: relative; - background: white; - border-color: black; - border-style: solid; - border-weight: 1; - border-top-color: white; - border-style: solid; - border-weight: 1; -} -.inactivetab{ - position: relative; - background: silver; - border-color: black; - border-style: solid; - border-weight: 1; -} -span.inactivetab a:link , -span.activetab a:link { - text-decoration: none; - color: black; -} -pre { background-color: lightgray; } -#wait { - background: #B7B8DD; - position: absolute; - visibility: hidden; - text-align: center; - border-color: blue; - border-style: solid; - border-weight: 2; - } -#webunit { - position: absolute; - visibility: hidden; - background: silver; - border-color: black; - border-style: solid; - border-weight: 2; - } -#visible_tab { - position: relative; - visibility: hidden; - overflow: auto; - background: white; - width: 100%; - height: 100%; - border-color: black; - border-style: solid; - border-weight: 1; - } -#visible_tab a:link { - text-decoration: none; - color: inherit; -} -#msg { - position: absolute; - visibility: hidden; - overflow: auto; - background: white; - border-color: black; - border-style: solid; - border-weight: 1; - } -#fail, -#tree { - position: absolute; - visibility: hidden; -} - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester.php deleted file mode 100644 index 72b6a510..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester.php +++ /dev/null @@ -1,117 +0,0 @@ - - * @version $Id: dom_tester.php 1804 2008-09-08 13:16:44Z pp11 $ - */ - -/**#@+ - * include SimpleTest files - */ -require_once dirname(__FILE__).'/../web_tester.php'; -require_once dirname(__FILE__).'/dom_tester/css_selector.php'; -/**#@-*/ - -/** - * CssSelectorExpectation - * - * Create a CSS Selector expectactation - * - * @param DomDocument $_dom - * @param string $_selector - * @param array $_value - * - */ -class CssSelectorExpectation extends SimpleExpectation { - var $_dom; - var $_selector; - var $_value; - - /** - * Sets the dom tree and the css selector to compare against - * @param mixed $dom Dom tree to search into. - * @param mixed $selector Css selector to match element. - * @param string $message Customised message on failure. - * @access public - */ - function CssSelectorExpectation($dom, $selector, $message = '%s') { - $this->SimpleExpectation($message); - $this->_dom = $dom; - $this->_selector = $selector; - - $css_selector = new CssSelector($this->_dom); - $this->_value = $css_selector->getTexts($this->_selector); - } - - /** - * Tests the expectation. True if it matches the - * held value. - * @param mixed $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return (($this->_value == $compare) && ($compare == $this->_value)); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = &$this->_getDumper(); - if (is_array($compare)) { - sort($compare); - } - if ($this->test($compare)) { - return "CSS selector expectation [" . $dumper->describeValue($this->_value) . "]". - " using [" . $dumper->describeValue($this->_selector) . "]"; - } else { - return "CSS selector expectation [" . $dumper->describeValue($this->_value) . "]". - " using [" . $dumper->describeValue($this->_selector) . "]". - " fails with [" . - $dumper->describeValue($compare) . "] " . - $dumper->describeDifference($this->_value, $compare); - } - } -} - -/** - * DomTestCase - * - * Extend Web test case with DOM related assertions, - * CSS selectors in particular - * - * @param DomDocument $dom - * - */ -class DomTestCase extends WebTestCase { - var $dom; - - function assertElementsBySelector($selector, $elements, $message = '%s') { - $this->dom = new DomDocument('1.0', 'utf-8'); - $this->dom->validateOnParse = true; - $this->dom->loadHTML($this->_browser->getContent()); - - return $this->assert( - new CssSelectorExpectation($this->dom, $selector), - $elements, - $message); - } - - function getElementsBySelector($selector) { - $this->dom = new DomDocument('1.0', 'utf-8'); - $this->dom->validateOnParse = true; - $this->dom->loadHTML($this->_browser->getContent()); - - $css_selector = new CssSelectorExpectation($this->dom, $selector); - return $css_selector->_value; - } -} - -?> diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/css_selector.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/css_selector.php deleted file mode 100644 index 1e9e2445..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/css_selector.php +++ /dev/null @@ -1,539 +0,0 @@ - - * @version $Id: css_selector.php 1802 2008-09-08 10:43:58Z maetl_ $ - */ - -/** - * CssSelector - * - * Allow to navigate a DOM with CSS selector. - * - * based on getElementsBySelector version 0.4 - Simon Willison, 2003-03-25 - * http://simon.incutio.com/archive/2003/03/25/getElementsBySelector - * - * derived from sfDomCssSelector Id 3053 - Fabien Potencier, 2006-12-16 - * http://www.symfony-project.com/api/symfony/util/sfDomCssSelector.html - * - * @package SimpleTest - * @subpackage Extensions - * @param DomDocument $dom - */ -class CssSelector -{ - public $nodes = array(); - - public function __construct($nodes) - { - if (!is_array($nodes)) - { - $nodes = array($nodes); - } - - $this->nodes = $nodes; - } - - public function getNodes() - { - return $this->nodes; - } - - public function getNode() - { - return $this->nodes ? $this->nodes[0] : null; - } - - public function getValue() - { - return $this->nodes[0]->nodeValue; - } - - public function getValues() - { - $values = array(); - foreach ($this->nodes as $node) - { - $values[] = $node->nodeValue; - } - - return $values; - } - - public function matchSingle($selector) - { - $nodes = $this->getElements($selector); - - return $nodes ? new CssSelector($nodes[0]) : new CssSelector(array()); - } - - public function matchAll($selector) - { - $nodes = $this->getElements($selector); - - return $nodes ? new CssSelector($nodes) : new CssSelector(array()); - } - - /* DEPRECATED */ - public function getTexts($selector) - { - $texts = array(); - foreach ($this->getElements($selector) as $element) - { - $texts[] = $element->nodeValue; - } - - return $texts; - } - - /* DEPRECATED */ - public function getElements($selector) - { - $nodes = array(); - foreach ($this->nodes as $node) - { - $result_nodes = $this->getElementsForNode($selector, $node); - if ($result_nodes) - { - $nodes = array_merge($nodes, $result_nodes); - } - } - - foreach ($nodes as $node) - { - $node->removeAttribute('sf_matched'); - } - - return $nodes; - } - - protected function getElementsForNode($selector, $root_node) - { - $all_nodes = array(); - foreach ($this->tokenize_selectors($selector) as $selector) - { - $nodes = array($root_node); - foreach ($this->tokenize($selector) as $token) - { - $combinator = $token['combinator']; - $selector = $token['selector']; - - $token = trim($token['name']); - - $pos = strpos($token, '#'); - if (false !== $pos && preg_match('/^[A-Za-z0-9]*$/', substr($token, 0, $pos))) - { - // Token is an ID selector - $tagName = substr($token, 0, $pos); - $id = substr($token, $pos + 1); - $xpath = new DomXPath($root_node); - $element = $xpath->query(sprintf("//*[@id = '%s']", $id))->item(0); - if (!$element || ($tagName && strtolower($element->nodeName) != $tagName)) - { - // tag with that ID not found - return array(); - } - - // Set nodes to contain just this element - $nodes = array($element); - $nodes = $this->matchCustomSelector($nodes, $selector); - - continue; // Skip to next token - } - - $pos = strpos($token, '.'); - if (false !== $pos && preg_match('/^[A-Za-z0-9\*]*$/', substr($token, 0, $pos))) - { - // Token contains a class selector - $tagName = substr($token, 0, $pos); - if (!$tagName) - { - $tagName = '*'; - } - $className = substr($token, $pos + 1); - - // Get elements matching tag, filter them for class selector - $founds = $this->getElementsByTagName($nodes, $tagName, $combinator); - $nodes = array(); - foreach ($founds as $found) - { - if (preg_match('/\b'.$className.'\b/', $found->getAttribute('class'))) - { - $nodes[] = $found; - } - } - - $nodes = $this->matchCustomSelector($nodes, $selector); - - continue; // Skip to next token - } - - // Code to deal with attribute selectors - if (preg_match('/^(\w+|\*)(\[.+\])$/', $token, $matches)) - { - $tagName = $matches[1] ? $matches[1] : '*'; - preg_match_all('/ - \[ - (\w+) # attribute - ([=~\|\^\$\*]?) # modifier (optional) - =? # equal (optional) - ( - "([^"]*)" # quoted value (optional) - | - ([^\]]*) # non quoted value (optional) - ) - \] - /x', $matches[2], $matches, PREG_SET_ORDER); - - // Grab all of the tagName elements within current node - $founds = $this->getElementsByTagName($nodes, $tagName, $combinator); - $nodes = array(); - foreach ($founds as $found) - { - $ok = false; - foreach ($matches as $match) - { - $attrName = $match[1]; - $attrOperator = $match[2]; - $attrValue = $match[4]; - - switch ($attrOperator) - { - case '=': // Equality - $ok = $found->getAttribute($attrName) == $attrValue; - break; - case '~': // Match one of space seperated words - $ok = preg_match('/\b'.preg_quote($attrValue, '/').'\b/', $found->getAttribute($attrName)); - break; - case '|': // Match start with value followed by optional hyphen - $ok = preg_match('/^'.preg_quote($attrValue, '/').'-?/', $found->getAttribute($attrName)); - break; - case '^': // Match starts with value - $ok = 0 === strpos($found->getAttribute($attrName), $attrValue); - break; - case '$': // Match ends with value - $ok = $attrValue == substr($found->getAttribute($attrName), -strlen($attrValue)); - break; - case '*': // Match ends with value - $ok = false !== strpos($found->getAttribute($attrName), $attrValue); - break; - default : - // Just test for existence of attribute - $ok = $found->hasAttribute($attrName); - } - - if (false == $ok) - { - break; - } - } - - if ($ok) - { - $nodes[] = $found; - } - } - - continue; // Skip to next token - } - - // If we get here, token is JUST an element (not a class or ID selector) - $nodes = $this->getElementsByTagName($nodes, $token, $combinator); - - $nodes = $this->matchCustomSelector($nodes, $selector); - } - - foreach ($nodes as $node) - { - if (!$node->getAttribute('sf_matched')) - { - $node->setAttribute('sf_matched', true); - $all_nodes[] = $node; - } - } - } - - return $all_nodes; - } - - protected function getElementsByTagName($nodes, $tagName, $combinator = ' ') - { - $founds = array(); - foreach ($nodes as $node) - { - switch ($combinator) - { - case ' ': - // Descendant selector - foreach ($node->getElementsByTagName($tagName) as $element) - { - $founds[] = $element; - } - break; - case '>': - // Child selector - foreach ($node->childNodes as $element) - { - if ($tagName == $element->nodeName) - { - $founds[] = $element; - } - } - break; - case '+': - // Adjacent selector - $element = $node->nextSibling; - if ($element && '#text' == $element->nodeName) - { - $element = $element->nextSibling; - } - - if ($element && $tagName == $element->nodeName) - { - $founds[] = $element; - } - break; - default: - throw new Exception(sprintf('Unrecognized combinator "%s".', $combinator)); - } - } - - return $founds; - } - - protected function tokenize_selectors($selector) - { - // split tokens by , except in an attribute selector - $tokens = array(); - $quoted = false; - $token = ''; - for ($i = 0, $max = strlen($selector); $i < $max; $i++) - { - if (',' == $selector[$i] && !$quoted) - { - $tokens[] = trim($token); - $token = ''; - } - else if ('"' == $selector[$i]) - { - $token .= $selector[$i]; - $quoted = $quoted ? false : true; - } - else - { - $token .= $selector[$i]; - } - } - if ($token) - { - $tokens[] = trim($token); - } - - return $tokens; - } - - protected function tokenize($selector) - { - // split tokens by space except if space is in an attribute selector - $tokens = array(); - $combinators = array(' ', '>', '+'); - $quoted = false; - $token = array('combinator' => ' ', 'name' => ''); - for ($i = 0, $max = strlen($selector); $i < $max; $i++) - { - if (in_array($selector[$i], $combinators) && !$quoted) - { - // remove all whitespaces around the combinator - $combinator = $selector[$i]; - while (in_array($selector[$i + 1], $combinators)) - { - if (' ' != $selector[++$i]) - { - $combinator = $selector[$i]; - } - } - - $tokens[] = $token; - $token = array('combinator' => $combinator, 'name' => ''); - } - else if ('"' == $selector[$i]) - { - $token['name'] .= $selector[$i]; - $quoted = $quoted ? false : true; - } - else - { - $token['name'] .= $selector[$i]; - } - } - if ($token['name']) - { - $tokens[] = $token; - } - - foreach ($tokens as &$token) - { - list($token['name'], $token['selector']) = $this->tokenize_selector_name($token['name']); - } - - return $tokens; - } - - protected function tokenize_selector_name($token_name) - { - // split custom selector - $quoted = false; - $name = ''; - $selector = ''; - $in_selector = false; - for ($i = 0, $max = strlen($token_name); $i < $max; $i++) - { - if ('"' == $token_name[$i]) - { - $quoted = $quoted ? false : true; - } - - if (!$quoted && ':' == $token_name[$i]) - { - $in_selector = true; - } - - if ($in_selector) - { - $selector .= $token_name[$i]; - } - else - { - $name .= $token_name[$i]; - } - } - - return array($name, $selector); - } - - protected function matchCustomSelector($nodes, $selector) - { - if (!$selector) - { - return $nodes; - } - - $selector = $this->tokenize_custom_selector($selector); - $matchingNodes = array(); - for ($i = 0, $max = count($nodes); $i < $max; $i++) - { - switch ($selector['selector']) - { - case 'contains': - if (false !== strpos($nodes[$i]->textContent, $selector['parameter'])) - { - $matchingNodes[] = $nodes[$i]; - } - break; - case 'nth-child': - if ($nodes[$i] === $this->nth($nodes[$i]->parentNode->firstChild, (integer) $selector['parameter'])) - { - $matchingNodes[] = $nodes[$i]; - } - break; - case 'first-child': - if ($nodes[$i] === $this->nth($nodes[$i]->parentNode->firstChild)) - { - $matchingNodes[] = $nodes[$i]; - } - break; - case 'last-child': - if ($nodes[$i] === $this->nth($nodes[$i]->parentNode->lastChild, 1, 'previousSibling')) - { - $matchingNodes[] = $nodes[$i]; - } - break; - case 'lt': - if ($i < (integer) $selector['parameter']) - { - $matchingNodes[] = $nodes[$i]; - } - break; - case 'gt': - if ($i > (integer) $selector['parameter']) - { - $matchingNodes[] = $nodes[$i]; - } - break; - case 'odd': - if ($i % 2) - { - $matchingNodes[] = $nodes[$i]; - } - break; - case 'even': - if (0 == $i % 2) - { - $matchingNodes[] = $nodes[$i]; - } - break; - case 'nth': - case 'eq': - if ($i == (integer) $selector['parameter']) - { - $matchingNodes[] = $nodes[$i]; - } - break; - case 'first': - if ($i == 0) - { - $matchingNodes[] = $nodes[$i]; - } - break; - case 'last': - if ($i == $max - 1) - { - $matchingNodes[] = $nodes[$i]; - } - break; - default: - throw new Exception(sprintf('Unrecognized selector "%s".', $selector['selector'])); - } - } - - return $matchingNodes; - } - - protected function tokenize_custom_selector($selector) - { - if (!preg_match('/ - ([a-zA-Z0-9\-]+) - (?: - \( - (?: - ("|\')(.*)?\2 - | - (.*?) - ) - \) - )? - /x', substr($selector, 1), $matches)) - { - throw new Exception(sprintf('Unable to parse custom selector "%s".', $selector)); - } - return array('selector' => $matches[1], 'parameter' => isset($matches[3]) ? ($matches[3] ? $matches[3] : $matches[4]) : ''); - } - - protected function nth($cur, $result = 1, $dir = 'nextSibling') - { - $num = 0; - for (; $cur; $cur = $cur->$dir) - { - if (1 == $cur->nodeType) - { - ++$num; - } - - if ($num == $result) - { - return $cur; - } - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/dom_tester_doc_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/dom_tester_doc_test.php deleted file mode 100644 index da624bba..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/dom_tester_doc_test.php +++ /dev/null @@ -1,24 +0,0 @@ -addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testGet() { - $url = 'http://simpletest.org/'; - $this->assertTrue($this->get($url)); - $this->assertEqual($this->getUrl(), $url); - $this->assertElementsBySelector('h2', array('Screenshots', 'Documentation', 'Contributing')); - $this->assertElementsBySelector('a[href="http://simpletest.org/api/"]', array('the complete API', 'documented API')); - $this->assertElementsBySelector('div#content > p > strong', array('SimpleTest PHP unit tester')); - } -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/dom_tester_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/dom_tester_test.php deleted file mode 100644 index 38f5efd9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/dom_tester_test.php +++ /dev/null @@ -1,223 +0,0 @@ -addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testGet() { - $url = 'file://'.dirname(__FILE__).'/support/dom_tester.html'; - $this->assertTrue($this->get($url)); - $this->assertElementsBySelector('h1', array('Test page')); - $this->assertElementsBySelector('ul#list li a[href]', array('link')); - $this->assertElementsBySelector('body h1', array('Test page')); - $this->assertElementsBySelector('#mybar', array('myfoo bis')); - } -} - -class TestOfCssSelectors extends UnitTestCase { - - function TestOfCssSelectors() { - $html = file_get_contents(dirname(__FILE__) . '/support/dom_tester.html'); - $this->dom = new DomDocument('1.0', 'utf-8'); - $this->dom->validateOnParse = true; - $this->dom->loadHTML($html); - } - - function testBasicSelector() { - $expectation = new CssSelectorExpectation($this->dom, 'h1'); - $this->assertTrue($expectation->test(array('Test page'))); - - $expectation = new CssSelectorExpectation($this->dom, 'h2'); - $this->assertTrue($expectation->test(array('Title 1', 'Title 2'))); - - $expectation = new CssSelectorExpectation($this->dom, '#footer'); - $this->assertTrue($expectation->test(array('footer'))); - - $expectation = new CssSelectorExpectation($this->dom, 'div#footer'); - $this->assertTrue($expectation->test(array('footer'))); - - $expectation = new CssSelectorExpectation($this->dom, '.header'); - $this->assertTrue($expectation->test(array('header'))); - - $expectation = new CssSelectorExpectation($this->dom, 'p.header'); - $this->assertTrue($expectation->test(array('header'))); - - $expectation = new CssSelectorExpectation($this->dom, 'div.header'); - $this->assertTrue($expectation->test(array())); - - $expectation = new CssSelectorExpectation($this->dom, 'ul#mylist ul li'); - $this->assertTrue($expectation->test(array('element 3', 'element 4'))); - - $expectation = new CssSelectorExpectation($this->dom, '#nonexistant'); - $this->assertTrue($expectation->test(array())); - } - - function testAttributeSelectors() { - $expectation = new CssSelectorExpectation($this->dom, 'ul#list li a[href]'); - $this->assertTrue($expectation->test(array('link'))); - - $expectation = new CssSelectorExpectation($this->dom, 'ul#list li a[class~="foo1"]'); - $this->assertTrue($expectation->test(array('link'))); - - $expectation = new CssSelectorExpectation($this->dom, 'ul#list li a[class~="bar1"]'); - $this->assertTrue($expectation->test(array('link'))); - - $expectation = new CssSelectorExpectation($this->dom, 'ul#list li a[class~="foobar1"]'); - $this->assertTrue($expectation->test(array('link'))); - - $expectation = new CssSelectorExpectation($this->dom, 'ul#list li a[class^="foo1"]'); - $this->assertTrue($expectation->test(array('link'))); - - $expectation = new CssSelectorExpectation($this->dom, 'ul#list li a[class$="foobar1"]'); - $this->assertTrue($expectation->test(array('link'))); - - $expectation = new CssSelectorExpectation($this->dom, 'ul#list li a[class*="oba"]'); - $this->assertTrue($expectation->test(array('link'))); - - $expectation = new CssSelectorExpectation($this->dom, 'ul#list li a[href="http://www.google.com/"]'); - $this->assertTrue($expectation->test(array('link'))); - - $expectation = new CssSelectorExpectation($this->dom, 'ul#anotherlist li a[class|="bar1"]'); - $this->assertTrue($expectation->test(array('another link'))); - - $expectation = new CssSelectorExpectation($this->dom, 'ul#list li a[class*="oba"][class*="ba"]'); - $this->assertTrue($expectation->test(array('link'))); - - $expectation = new CssSelectorExpectation($this->dom, 'p[class="myfoo"][id="mybar"]'); - $this->assertTrue($expectation->test(array('myfoo bis'))); - - $expectation = new CssSelectorExpectation($this->dom, 'p[onclick*="a . and a #"]'); - $this->assertTrue($expectation->test(array('works great'))); - } - - function testCombinators() { - $expectation = new CssSelectorExpectation($this->dom, 'body h1'); - $this->assertTrue($expectation->test(array('Test page'))); - - $expectation = new CssSelectorExpectation($this->dom, 'div#combinators > ul > li'); - $this->assertTrue($expectation->test(array('test 1', 'test 2'))); - - $expectation = new CssSelectorExpectation($this->dom, 'div#combinators>ul>li'); - $this->assertTrue($expectation->test(array('test 1', 'test 2'))); - - $expectation = new CssSelectorExpectation($this->dom, 'div#combinators li + li'); - $this->assertTrue($expectation->test(array('test 2', 'test 4'))); - - $expectation = new CssSelectorExpectation($this->dom, 'div#combinators li+li'); - $this->assertTrue($expectation->test(array('test 2', 'test 4'))); - - $expectation = new CssSelectorExpectation($this->dom, 'h1, h2'); - $this->assertTrue($expectation->test(array('Test page', 'Title 1', 'Title 2'))); - - $expectation = new CssSelectorExpectation($this->dom, 'h1,h2'); - $this->assertTrue($expectation->test(array('Test page', 'Title 1', 'Title 2'))); - - $expectation = new CssSelectorExpectation($this->dom, 'h1 , h2'); - $this->assertTrue($expectation->test(array('Test page', 'Title 1', 'Title 2'))); - - $expectation = new CssSelectorExpectation($this->dom, 'h1, h1,h1'); - $this->assertTrue($expectation->test(array('Test page'))); - - $expectation = new CssSelectorExpectation($this->dom, 'h1,h2,h1'); - $this->assertTrue($expectation->test(array('Test page', 'Title 1', 'Title 2'))); - - $expectation = new CssSelectorExpectation($this->dom, 'p[onclick*="a . and a #"], div#combinators > ul li + li'); - $this->assertTrue($expectation->test(array('works great', 'test 2', 'test 4'))); - } - - function testChildSelectors() { - $expectation = new CssSelectorExpectation($this->dom, '.myfoo:contains("bis")'); - $this->assertTrue($expectation->test(array('myfoo bis'))); - - $expectation = new CssSelectorExpectation($this->dom, '.myfoo:eq(1)'); - $this->assertTrue($expectation->test(array('myfoo bis'))); - - $expectation = new CssSelectorExpectation($this->dom, '.myfoo:last'); - $this->assertTrue($expectation->test(array('myfoo bis'))); - - $expectation = new CssSelectorExpectation($this->dom, '.myfoo:first'); - $this->assertTrue($expectation->test(array('myfoo'))); - - $expectation = new CssSelectorExpectation($this->dom, 'h2:first'); - $this->assertTrue($expectation->test(array('Title 1'))); - - $expectation = new CssSelectorExpectation($this->dom, 'h2:first'); - $this->assertTrue($expectation->test(array('Title 1'))); - - $expectation = new CssSelectorExpectation($this->dom, 'p.myfoo:first'); - $this->assertTrue($expectation->test(array('myfoo'))); - - $expectation = new CssSelectorExpectation($this->dom, 'p:lt(2)'); - $this->assertTrue($expectation->test(array('header', 'multi-classes'))); - - $expectation = new CssSelectorExpectation($this->dom, 'p:gt(2)'); - $this->assertTrue($expectation->test(array('myfoo bis', 'works great', 'First paragraph', 'Second paragraph', 'Third paragraph'))); - - $expectation = new CssSelectorExpectation($this->dom, 'p:odd'); - $this->assertTrue($expectation->test(array('multi-classes', 'myfoo bis', 'First paragraph', 'Third paragraph'))); - - $expectation = new CssSelectorExpectation($this->dom, 'p:even'); - $this->assertTrue($expectation->test(array('header', 'myfoo', 'works great', 'Second paragraph'))); - - $expectation = new CssSelectorExpectation($this->dom, '#simplelist li:first-child'); - $this->assertTrue($expectation->test(array('First', 'First'))); - - $expectation = new CssSelectorExpectation($this->dom, '#simplelist li:nth-child(1)'); - $this->assertTrue($expectation->test(array('First', 'First'))); - - $expectation = new CssSelectorExpectation($this->dom, '#simplelist li:nth-child(2)'); - $this->assertTrue($expectation->test(array('Second with a link', 'Second'))); - - $expectation = new CssSelectorExpectation($this->dom, '#simplelist li:nth-child(3)'); - $this->assertTrue($expectation->test(array('Third with another link'))); - - $expectation = new CssSelectorExpectation($this->dom, '#simplelist li:last-child'); - $this->assertTrue($expectation->test(array('Second with a link', 'Third with another link'))); - } -} - -class TestsOfChildAndAdjacentSelectors extends DomTestCase { - function TestsOfChildAndAdjacentSelectors() { - $html = file_get_contents(dirname(__FILE__) . '/support/child_adjacent.html'); - $this->dom = new DomDocument('1.0', 'utf-8'); - $this->dom->validateOnParse = true; - $this->dom->loadHTML($html); - } - - function testFirstChild() { - $expectation = new CssSelectorExpectation($this->dom, 'p:first-child'); - $this->assertTrue($expectation->test(array('First paragraph'))); - - $expectation = new CssSelectorExpectation($this->dom, 'body > p:first-child'); - $this->assertTrue($expectation->test(array('First paragraph'))); - - $expectation = new CssSelectorExpectation($this->dom, 'body > p > a:first-child'); - $this->assertTrue($expectation->test(array('paragraph'))); - } - - function testChildren() { - $expectation = new CssSelectorExpectation($this->dom, 'body > p'); - $this->assertTrue($expectation->test(array('First paragraph', 'Second paragraph', 'Third paragraph'))); - - $expectation = new CssSelectorExpectation($this->dom, 'body > p > a'); - $this->assertTrue($expectation->test(array('paragraph'))); - } - - function testAdjacents() { - $expectation = new CssSelectorExpectation($this->dom, 'p + p'); - $this->assertTrue($expectation->test(array('Second paragraph', 'Third paragraph'))); - - $expectation = new CssSelectorExpectation($this->dom, 'body > p + p'); - $this->assertTrue($expectation->test(array('Second paragraph', 'Third paragraph'))); - - $expectation = new CssSelectorExpectation($this->dom, 'body > p + p > a'); - $this->assertTrue($expectation->test(array('paragraph'))); - } -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/support/child_adjacent.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/support/child_adjacent.html deleted file mode 100644 index 51bf72f3..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/support/child_adjacent.html +++ /dev/null @@ -1,24 +0,0 @@ - - - Foo! - - - -

First paragraph

-

Second paragraph

-

Third paragraph

- - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/support/dom_tester.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/support/dom_tester.html deleted file mode 100644 index 666126e5..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/dom_tester/test/support/dom_tester.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -

Test page

- -

Title 1

-

header

-

multi-classes

-

myfoo

-

myfoo bis

- -

works great

- -
-
    -
  • First
  • -
  • Second with a link
  • -
- - -
- -

Title 2

-
    -
  • element 1
  • -
  • element 2
  • -
  • -
      -
    • element 3
    • -
    • element 4
    • -
    -
  • -
- -
-
    -
  • test 1
  • -
  • test 2
  • -
      -
    • test 3
    • -
    • test 4
    • -
    -
-
- -
-

First paragraph

-

Second paragraph

-

Third paragraph

-
- - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/img/wait.gif b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/img/wait.gif deleted file mode 100644 index 3ec7cec3..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/img/wait.gif and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/js/tests/TestOfWebunit.js.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/js/tests/TestOfWebunit.js.html deleted file mode 100644 index 08f62491..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/js/tests/TestOfWebunit.js.html +++ /dev/null @@ -1,34 +0,0 @@ - - - -JsUnit Tests of webunit.js - - - - - - - - -

JsUnit Tests of webunit.js

- -

This page contains tests for the webunit.js file functions.

-
-
- - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/js/webunit.js b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/js/webunit.js deleted file mode 100644 index 1c6acbbf..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/js/webunit.js +++ /dev/null @@ -1,194 +0,0 @@ -// jsreporter.js -// Script to support JsReporter class -// Relies heavily on the X library in x.js -// X v3.14.1, Cross-Browser DHTML Library from Cross-Browser.com -// Copyright (c) 2004 Jason E. Sweat (jsweat_php@yahoo.com) -// -// SimpleTest - http://simpletest.sf.net/ -// Copyright (c) 2003,2004 Marcus Baker (marcus@lastcraft.com) -// $Id: webunit.js 506 2004-02-14 18:24:13Z jsweat $ - - -// Variables: -min_x=500; -min_y=400; -groups = new Array(); -cases = new Array(); -methods = new Array(); -current_group=0; -current_case=0; -current_method=0; - -Hash = { - Set : function(foo,bar) {this[foo] = bar;}, - Get : function(foo) {return this[foo];} -} - -// Functions: -function wait_start() { - var wait_x; - var wait_y; - - wait_x = xWidth('wait'); - wait_y = xHeight('wait'); - xMoveTo('wait', (xClientWidth()-wait_x)/2, (xClientHeight()-wait_y)/2); - xShow('wait'); -} - -function layout() { - xResizeTo('webunit', max(xClientWidth()-30,min_x), max(xClientHeight()-20,min_y)); - xMoveTo('webunit', 5, 5); - xResizeTo('tabs', xWidth('webunit')-10, xHeight('webunit')/3); - xLeft('tabs', 5); - xShow('webunit'); - xShow('tabs'); - activate_tab('fail'); - xShow('visible_tab'); - xZIndex('visible_tab', 2) - xResizeTo('msg', xWidth('webunit')-17, xHeight('webunit')/3-20); - xLeft('msg', 2); - xTop('msg',2*xHeight('webunit')/3); - xShow('msg'); -} - -function set_div_content(div, content) { - xGetElementById(div).innerHTML = content; -} - -function copy_div_content(divsrc, divtrgt) { - xGetElementById(divtrgt).innerHTML = xGetElementById(divsrc).innerHTML; -} - -function activate_tab(tab) { - if (tab == 'fail') { - copy_div_content('fail', 'visible_tab'); - xGetElementById('failtab').className = 'activetab'; - xZIndex('failtab', 3) - xGetElementById('treetab').className = 'inactivetab'; - xZIndex('treetab', 1) - } - if (tab == 'tree') { - copy_div_content('tree', 'visible_tab'); - xGetElementById('failtab').className = 'inactivetab'; - xZIndex('failtab', 1) - xGetElementById('treetab').className = 'activetab'; - xZIndex('treetab', 3) - } -} - -function add_group(group_name) { - var add; - - add = { - Set : function(foo,bar) {this[foo] = bar;}, - Get : function(foo) {return this[foo];} - } - add.Set('desc', group_name); - add.Set('pass', true); - groups[groups.length] = add; - current_group = groups.length - 1; - cases[current_group] = new Array(); - methods[current_group] = new Array(); -} - -function add_case(case_name) { - var curgroup; - var add; - - add = { - Set : function(foo,bar) {this[foo] = bar;}, - Get : function(foo) {return this[foo];} - } - add.Set('desc', case_name); - add.Set('pass', true); - curgroup = cases[current_group]; - cases[current_group][curgroup.length] = add; - current_case = curgroup.length - 1; - methods[current_group][current_case] = new Array(); -} - -function add_method(method_name) { - var curcase; - var add; - - add = { - Set : function(foo,bar) {this[foo] = bar;}, - Get : function(foo) {return this[foo];} - } - add.Set('desc', method_name); - add.Set('pass', true); - add.Set('msg',''); - curcase = methods[current_group][current_case]; - methods[current_group][current_case][curcase.length] = add; - current_method = curcase.length - 1; -} - -function add_fail(msg) { - var oldmsg; - add_log(msg); - groups[current_group].Set('pass', false); - cases[current_group][current_case].Set('pass', false); - methods[current_group][current_case][current_method].Set('pass', false); - oldmsg = methods[current_group][current_case][current_method].Get('msg'); - methods[current_group][current_case][current_method].Set('msg', oldmsg+msg); -} - -function add_log(msg) { - var faildiv; - faildiv = xGetElementById('fail'); - faildiv.innerHTML = faildiv.innerHTML + msg; -} - -function set_msg(gid, cid, mid) { - var passfail; - var msg=methods[gid][cid][mid].Get('msg'); - if ('' == msg) { - passfail = (methods[gid][cid][mid].Get('pass')) ? 'pass' : 'fail'; - msg = 'No output for ' - + groups[gid].Get('desc') + '->' - + cases[gid][cid].Get('desc') + '->' - + methods[gid][cid][mid].Get('desc') + '
'; - } - xGetElementById('msg').innerHTML = msg; -} - -function make_tree() { - var content; - var passfail; - content = '
    '; - for (x in groups) { - passfail = (groups[x].Get('pass')) ? 'pass' : 'fail'; - content += '
  • '+groups[x].Get('desc')+'
      '; - for (y in cases[x]) { - passfail = (cases[x][y].Get('pass')) ? 'pass' : 'fail'; - content += '
    • '+cases[x][y].Get('desc')+'
        '; - for (z in methods[x][y]) { - passfail = (methods[x][y][z].Get('pass')) ? 'pass' : 'fail'; - content += '
      • '+methods[x][y][z].Get('desc')+'
      • '; - } - content += '
    • '; - } - content += '
  • '; - } - content += '
'; - xGetElementById('tree').innerHTML = content; - if (xGetElementById('treetab').className == 'activetab') { - activate_tab('tree'); - } else { - activate_tab('fail'); - } -} - -function make_output(data) { -} - -function make_fail_msg(id, msg) { -} - -function max(n1, n2) { - if (n1 > n2) { - return n1; - } else { - return n2; - } -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/js/x.js b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/js/x.js deleted file mode 100644 index 78edb025..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/js/x.js +++ /dev/null @@ -1,423 +0,0 @@ -// x.js -// X v3.14.1, Cross-Browser DHTML Library from Cross-Browser.com -// Copyright (c) 2002,2003 Michael Foster (mike@cross-browser.com) -// This library is distributed under the terms of the LGPL (gnu.org) - -// Variables: -var xVersion='3.14.1',xOp7=false,xOp5or6=false,xIE4Up=false,xNN4=false,xUA=navigator.userAgent.toLowerCase(); -if(window.opera){ - xOp7=(xUA.indexOf('opera 7')!=-1 || xUA.indexOf('opera/7')!=-1); - if (!xOp7) xOp5or6=(xUA.indexOf('opera 5')!=-1 || xUA.indexOf('opera/5')!=-1 || xUA.indexOf('opera 6')!=-1 || xUA.indexOf('opera/6')!=-1); -} -else if(document.layers) {xNN4=true;} -else {xIE4Up=document.all && xUA.indexOf('msie')!=-1 && parseInt(navigator.appVersion)>=4;} -// Object: -function xGetElementById(e) { - if(typeof(e)!='string') return e; - if(document.getElementById) e=document.getElementById(e); - else if(document.all) e=document.all[e]; - else if(document.layers) e=xLayer(e); - else e=null; - return e; -} -function xParent(e,bNode){ - if (!(e=xGetElementById(e))) return null; - var p=null; - if (!bNode && xDef(e.offsetParent)) p=e.offsetParent; - else if (xDef(e.parentNode)) p=e.parentNode; - else if (xDef(e.parentElement)) p=e.parentElement; - else if (xDef(e.parentLayer)){if (e.parentLayer!=window) p=e.parentLayer;} - return p; -} -function xDef() { - for(var i=0; iwindow.innerHeight) w-=16; - } - return w; -} -function xClientHeight() { - var h=0; - if(xOp5or6) h=window.innerHeight; - else if(!window.opera && document.documentElement && document.documentElement.clientHeight) // v3.12 - h=document.documentElement.clientHeight; - else if(document.body && document.body.clientHeight) - h=document.body.clientHeight; - else if(xDef(window.innerWidth,window.innerHeight,document.width)) { - h=window.innerHeight; - if(document.width>window.innerWidth) h-=16; - } - return h; -} -// Animation: -function xSlideTo(e,x,y,uTime) { - if (!(e=xGetElementById(e))) return; - if (!e.timeout) e.timeout = 25; - e.xTarget = x; e.yTarget = y; e.slideTime = uTime; e.stop = false; - e.yA = e.yTarget - xTop(e); e.xA = e.xTarget - xLeft(e); // A = distance - e.B = Math.PI / (2 * e.slideTime); // B = period - e.yD = xTop(e); e.xD = xLeft(e); // D = initial position - var d = new Date(); e.C = d.getTime(); - if (!e.moving) xSlide(e); -} -function xSlide(e) { - if (!(e=xGetElementById(e))) return; - var now, s, t, newY, newX; - now = new Date(); - t = now.getTime() - e.C; - if (e.stop) { e.moving = false; } - else if (t < e.slideTime) { - setTimeout("xSlide('"+e.id+"')", e.timeout); - s = Math.sin(e.B * t); - newX = Math.round(e.xA * s + e.xD); - newY = Math.round(e.yA * s + e.yD); - xMoveTo(e, newX, newY); - e.moving = true; - } - else { - xMoveTo(e, e.xTarget, e.yTarget); - e.moving = false; - } -} -// Event: -function xAddEventListener(e,eventType,eventListener,useCapture) { - if(!(e=xGetElementById(e))) return; - eventType=eventType.toLowerCase(); - if((!xIE4Up && !xOp7) && e==window) { - if(eventType=='resize') { window.xPCW=xClientWidth(); window.xPCH=xClientHeight(); window.xREL=eventListener; xResizeEvent(); return; } - if(eventType=='scroll') { window.xPSL=xScrollLeft(); window.xPST=xScrollTop(); window.xSEL=eventListener; xScrollEvent(); return; } - } - var eh='e.on'+eventType+'=eventListener'; - if(e.addEventListener) e.addEventListener(eventType,eventListener,useCapture); - else if(e.attachEvent) e.attachEvent('on'+eventType,eventListener); - else if(e.captureEvents) { - if(useCapture||(eventType.indexOf('mousemove')!=-1)) { e.captureEvents(eval('Event.'+eventType.toUpperCase())); } - eval(eh); - } - else eval(eh); -} -function xRemoveEventListener(e,eventType,eventListener,useCapture) { - if(!(e=xGetElementById(e))) return; - eventType=eventType.toLowerCase(); - if((!xIE4Up && !xOp7) && e==window) { - if(eventType=='resize') { window.xREL=null; return; } - if(eventType=='scroll') { window.xSEL=null; return; } - } - var eh='e.on'+eventType+'=null'; - if(e.removeEventListener) e.removeEventListener(eventType,eventListener,useCapture); - else if(e.detachEvent) e.detachEvent('on'+eventType,eventListener); - else if(e.releaseEvents) { - if(useCapture||(eventType.indexOf('mousemove')!=-1)) { e.releaseEvents(eval('Event.'+eventType.toUpperCase())); } - eval(eh); - } - else eval(eh); -} -function xEvent(evt) { // cross-browser event object prototype - this.type = ''; - this.target = null; - this.pageX = 0; - this.pageY = 0; - this.offsetX = 0; - this.offsetY = 0; - this.keyCode = 0; - var e = evt ? evt : window.event; - if(!e) return; - if(e.type) this.type = e.type; - if(e.target) this.target = e.target; - else if(e.srcElement) this.target = e.srcElement; - else if(xNN4) this.target = xLayerFromPoint(e.pageX, e.pageY); - if(xOp5or6) { this.pageX = e.clientX; this.pageY = e.clientY; } - else if(xDef(e.pageX,e.pageY)) { this.pageX = e.pageX; this.pageY = e.pageY; } // v3.14 - else if(xDef(e.clientX,e.clientY)) { this.pageX = e.clientX + xScrollLeft(); this.pageY = e.clientY + xScrollTop(); } - if(xDef(e.offsetX,e.offsetY)) { this.offsetX = e.offsetX; this.offsetY = e.offsetY; } - else if(xDef(e.layerX,e.layerY)) { this.offsetX = e.layerX; this.offsetY = e.layerY; } - else { this.offsetX = this.pageX - xPageX(this.target); this.offsetY = this.pageY - xPageY(this.target); } - if (e.keyCode) { this.keyCode = e.keyCode; } // for moz/fb, if keyCode==0 use which - else if (xDef(e.which)) { this.keyCode = e.which; } -} -function xResizeEvent() { // window resize event simulation - if (window.xREL) setTimeout('xResizeEvent()', 250); - var cw = xClientWidth(), ch = xClientHeight(); - if (window.xPCW != cw || window.xPCH != ch) { window.xPCW = cw; window.xPCH = ch; if (window.xREL) window.xREL(); } -} -function xScrollEvent() { // window scroll event simulation - if (window.xSEL) setTimeout('xScrollEvent()', 250); - var sl = xScrollLeft(), st = xScrollTop(); - if (window.xPSL != sl || window.xPST != st) { window.xPSL = sl; window.xPST = st; if (window.xSEL) window.xSEL(); } -} -// end x.js diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/junit_xml_reporter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/junit_xml_reporter.php deleted file mode 100644 index 3bb38928..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/junit_xml_reporter.php +++ /dev/null @@ -1,118 +0,0 @@ -SimpleReporter(); - - $this->doc = new DOMDocument(); - $this->doc->loadXML(''); - $this->root = $this->doc->documentElement; - } - - function paintHeader($test_name) { - $this->testsStart = microtime(true); - - $this->root->setAttribute('name', $test_name); - $this->root->setAttribute('timestamp', date('c')); - $this->root->setAttribute('hostname', 'localhost'); - - echo "\n"; - echo "\n"; - - $duration = microtime(true) - $this->testsStart; - - $this->root->setAttribute('tests', $this->getPassCount() + $this->getFailCount() + $this->getExceptionCount()); - $this->root->setAttribute('failures', $this->getFailCount()); - $this->root->setAttribute('errors', $this->getExceptionCount()); - $this->root->setAttribute('time', $duration); - - $this->doc->formatOutput = true; - $xml = $this->doc->saveXML(); - // Cut out XML declaration - echo preg_replace('/<\?[^>]*\?>/', "", $xml); - echo "\n"; - } - - function paintCaseStart($case) { - echo "- case start $case\n"; - $this->currentCaseName = $case; - } - - function paintCaseEnd($case) { - // No output here - } - - function paintMethodStart($test) { - echo " - test start: $test\n"; - - $this->methodStart = microtime(true); - $this->currCase = $this->doc->createElement('testcase'); - } - - function paintMethodEnd($test) { - $duration = microtime(true) - $this->methodStart; - - $this->currCase->setAttribute('name', $test); - $this->currCase->setAttribute('classname', $this->currentCaseName); - $this->currCase->setAttribute('time', $duration); - $this->root->appendChild($this->currCase); - } - - function paintFail($message) { - parent::paintFail($message); - - error_log("Failure: " . $message); - $this->terminateAbnormally($message); - } - - function paintException($exception) { - parent::paintException($exception); - - error_log("Exception: " . $exception); - $this->terminateAbnormally($exception); - } - - function terminateAbnormally($message) { - if (!$this->currCase) { - error_log("!! currCase was not set."); - return; - } - - $ch = $this->doc->createElement('failure'); - $breadcrumb = $this->getTestList(); - $ch->setAttribute('message', $breadcrumb[count($breadcrumb)-1]); - $ch->setAttribute('type', $breadcrumb[count($breadcrumb)-1]); - - $message = implode(' -> ', $breadcrumb) . "\n\n\n" . $message; - $content = $this->doc->createTextNode($message); - $ch->appendChild($content); - - $this->currCase->appendChild($ch); - } -} -?> - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/pear_test_case.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/pear_test_case.php deleted file mode 100644 index 4fc34f56..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/pear_test_case.php +++ /dev/null @@ -1,196 +0,0 @@ -_loosely_typed = false; - } - - /** - * Will test straight equality if set to loose - * typing, or identity if not. - * @param $first First value. - * @param $second Comparison value. - * @param $message Message to display. - * @public - */ - function assertEquals($first, $second, $message = "%s", $delta = 0) { - if ($this->_loosely_typed) { - $expectation = new EqualExpectation($first); - } else { - $expectation = new IdenticalExpectation($first); - } - $this->assert($expectation, $second, $message); - } - - /** - * Passes if the value tested is not null. - * @param $value Value to test against. - * @param $message Message to display. - * @public - */ - function assertNotNull($value, $message = "%s") { - parent::assert(new TrueExpectation(), isset($value), $message); - } - - /** - * Passes if the value tested is null. - * @param $value Value to test against. - * @param $message Message to display. - * @public - */ - function assertNull($value, $message = "%s") { - parent::assert(new TrueExpectation(), !isset($value), $message); - } - - /** - * Identity test tests for the same object. - * @param $first First object handle. - * @param $second Hopefully the same handle. - * @param $message Message to display. - * @public - */ - function assertSame($first, $second, $message = "%s") { - $dumper = new SimpleDumper(); - $message = sprintf( - $message, - "[" . $dumper->describeValue($first) . - "] and [" . $dumper->describeValue($second) . - "] should reference the same object"); - return $this->assert( - new TrueExpectation(), - SimpleTestCompatibility::isReference($first, $second), - $message); - } - - /** - * Inverted identity test. - * @param $first First object handle. - * @param $second Hopefully a different handle. - * @param $message Message to display. - * @public - */ - function assertNotSame($first, $second, $message = "%s") { - $dumper = new SimpleDumper(); - $message = sprintf( - $message, - "[" . $dumper->describeValue($first) . - "] and [" . $dumper->describeValue($second) . - "] should not be the same object"); - return $this->assert( - new falseExpectation(), - SimpleTestCompatibility::isReference($first, $second), - $message); - } - - /** - * Sends pass if the test condition resolves true, - * a fail otherwise. - * @param $condition Condition to test true. - * @param $message Message to display. - * @public - */ - function assertTrue($condition, $message = "%s") { - parent::assert(new TrueExpectation(), $condition, $message); - } - - /** - * Sends pass if the test condition resolves false, - * a fail otherwise. - * @param $condition Condition to test false. - * @param $message Message to display. - * @public - */ - function assertFalse($condition, $message = "%s") { - parent::assert(new FalseExpectation(), $condition, $message); - } - - /** - * Tests a regex match. Needs refactoring. - * @param $pattern Regex to match. - * @param $subject String to search in. - * @param $message Message to display. - * @public - */ - function assertRegExp($pattern, $subject, $message = "%s") { - $this->assert(new PatternExpectation($pattern), $subject, $message); - } - - /** - * Tests the type of a value. - * @param $value Value to take type of. - * @param $type Hoped for type. - * @param $message Message to display. - * @public - */ - function assertType($value, $type, $message = "%s") { - parent::assert(new TrueExpectation(), gettype($value) == strtolower($type), $message); - } - - /** - * Sets equality operation to act as a simple equal - * comparison only, allowing a broader range of - * matches. - * @param $loosely_typed True for broader comparison. - * @public - */ - function setLooselyTyped($loosely_typed) { - $this->_loosely_typed = $loosely_typed; - } - - /** - * For progress indication during - * a test amongst other things. - * @return Usually one. - * @public - */ - function countTestCases() { - return $this->getSize(); - } - - /** - * Accessor for name, normally just the class - * name. - * @public - */ - function getName() { - return $this->getLabel(); - } - - /** - * Does nothing. For compatibility only. - * @param $name Dummy - * @public - */ - function setName($name) { - } - } -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/recorder.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/recorder.php deleted file mode 100644 index 80ea861d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/recorder.php +++ /dev/null @@ -1,62 +0,0 @@ -SimpleReporter(); - $this->results = array(); - } - - function paintPass($message) { - parent::paintPass($message); - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - $test = implode("->", $breadcrumb); - - $result["time"] = time(); - $result["status"] = "Passed"; - $result["test"] = $test; - $result["message"] = $message; - $this->results[] = $result; - } - - function paintFail($message) { - parent::paintFail($message); - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - $test = implode("->", $breadcrumb); - - $result["time"] = time(); - $result["status"] = "Failed"; - $result["test"] = $test; - $result["message"] = $message; - $this->results[] = $result; - } -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/recorder/test/sample.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/recorder/test/sample.php deleted file mode 100644 index 4848c485..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/recorder/test/sample.php +++ /dev/null @@ -1,14 +0,0 @@ -assertTrue(true); - } - - function testFalseIsTrue() { - $this->assertFalse(true); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/recorder/test/test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/recorder/test/test.php deleted file mode 100644 index ec72cdbc..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/recorder/test/test.php +++ /dev/null @@ -1,28 +0,0 @@ -addTestFile(dirname(__FILE__) . '/sample.php'); - $recorder = new Recorder(); - $test->run($recorder); - $this->assertEqual(count($recorder->results), 2); - - $this->assertEqual(count($recorder->results[0]), 4); - $this->assertPattern("/".substr(time(), 9)."/", $recorder->results[0]['time']); - $this->assertEqual($recorder->results[0]['status'], "Passed"); - $this->assertPattern("/sample\.php->SampleTestForRecorder->testTrueIsTrue/i", $recorder->results[0]['test']); - $this->assertPattern("/ at \[.*recorder\/test\/sample\.php line 7\]/", $recorder->results[0]['message']); - - $this->assertEqual(count($recorder->results[1]), 4); - $this->assertPattern("/".substr(time(), 9)."/", $recorder->results[1]['time']); - $this->assertEqual($recorder->results[1]['status'], "Failed"); - $this->assertPattern("/sample\.php->SampleTestForRecorder->testFalseIsTrue/i", $recorder->results[1]['test']); - $this->assertPattern("/Expected false, got \[Boolean: true\] at \[.*recorder\/test\/sample\.php line 11\]/", $recorder->results[1]['message']); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenese_tester.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenese_tester.php deleted file mode 100644 index 9ae2d9c5..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenese_tester.php +++ /dev/null @@ -1,393 +0,0 @@ - - * @param simpleSelenium $selenium - * @param string $html - * @param string $testFile - * @param array $parsed_table - * @param string $logMessages - * @param array $_commandMap - * - */ -class SeleneseTestCase extends UnitTestCase { - var $selenium; - var $html; - var $testFile; - var $parsed_table; - var $logMessages; - var $_commandMap = array("verify", - "verifyErrorOnNext", - "verifyNotErrorOnNext", - "verifyFailureOnNext", - "verifyNotFailureOnNext", - "verifySelected", - "verifyNotSelected", - "verifyAlert", - "verifyNotAlert", - "verifyAllButtons", - "verifyNotAllButtons", - "verifyAllFields", - "verifyNotAllFields", - "verifyAllLinks", - "verifyNotAllLinks", - "verifyAllWindowIds", - "verifyNotAllWindowIds", - "verifyAllWindowNames", - "verifyNotAllWindowNames", - "verifyAllWindowTitles", - "verifyNotAllWindowTitles", - "verifyAttribute", - "verifyNotAttribute", - "verifyAttributeFromAllWindows", - "verifyNotAttributeFromAllWindows", - "verifyBodyText", - "verifyNotBodyText", - "verifyConfirmation", - "verifyNotConfirmation", - "verifyCookie", - "verifyNotCookie", - "verifyCursorPosition", - "verifyNotCursorPosition", - "verifyElementHeight", - "verifyNotElementHeight", - "verifyElementIndex", - "verifyNotElementIndex", - "verifyElementPositionLeft", - "verifyNotElementPositionLeft", - "verifyElementPositionTop", - "verifyNotElementPositionTop", - "verifyElementWidth", - "verifyNotElementWidth", - "verifyEval", - "verifyNotEval", - "verifyExpression", - "verifyNotExpression", - "verifyHtmlSource", - "verifyNotHtmlSource", - "verifyLocation", - "verifyNotLocation", - "verifyLogMessages", - "verifyNotLogMessages", - "verifyMouseSpeed", - "verifyNotMouseSpeed", - "verifyPrompt", - "verifyNotPrompt", - "verifySelectedId", - "verifyNotSelectedId", - "verifySelectedIds", - "verifyNotSelectedIds", - "verifySelectedIndex", - "verifyNotSelectedIndex", - "verifySelectedIndexes", - "verifyNotSelectedIndexes", - "verifySelectedLabel", - "verifyNotSelectedLabel", - "verifySelectedLabels", - "verifyNotSelectedLabels", - "verifySelectedValue", - "verifyNotSelectedValue", - "verifySelectedValues", - "verifyNotSelectedValues", - "verifySelectOptions", - "verifyNotSelectOptions", - "verifyTable", - "verifyNotTable", - "verifyText", - "verifyNotText", - "verifyTitle", - "verifyNotTitle", - "verifyValue", - "verifyNotValue", - "verifyWhetherThisFrameMatchFrameExpression", - "verifyNotWhetherThisFrameMatchFrameExpression", - "verifyWhetherThisWindowMatchWindowExpression", - "verifyNotWhetherThisWindowMatchWindowExpression", - "verifyAlertPresent", - "verifyAlertNotPresent", - "verifyChecked", - "verifyNotChecked", - "verifyConfirmationPresent", - "verifyConfirmationNotPresent", - "verifyEditable", - "verifyNotEditable", - "verifyElementPresent", - "verifyElementNotPresent", - "verifyOrdered", - "verifyNotOrdered", - "verifyPromptPresent", - "verifyPromptNotPresent", - "verifySomethingSelected", - "verifyNotSomethingSelected", - "verifyTextPresent", - "verifyTextNotPresent", - "verifyVisible", - "verifyNotVisible", - "assert", - "assertErrorOnNext", - "assertNotErrorOnNext", - "assertFailureOnNext", - "assertNotFailureOnNext", - "assertSelected", - "assertNotSelected", - "assertAlert", - "assertNotAlert", - "assertAllButtons", - "assertNotAllButtons", - "assertAllFields", - "assertNotAllFields", - "assertAllLinks", - "assertNotAllLinks", - "assertAllWindowIds", - "assertNotAllWindowIds", - "assertAllWindowNames", - "assertNotAllWindowNames", - "assertAllWindowTitles", - "assertNotAllWindowTitles", - "assertAttribute", - "assertNotAttribute", - "assertAttributeFromAllWindows", - "assertNotAttributeFromAllWindows", - "assertBodyText", - "assertNotBodyText", - "assertConfirmation", - "assertNotConfirmation", - "assertCookie", - "assertNotCookie", - "assertCursorPosition", - "assertNotCursorPosition", - "assertElementHeight", - "assertNotElementHeight", - "assertElementIndex", - "assertNotElementIndex", - "assertElementPositionLeft", - "assertNotElementPositionLeft", - "assertElementPositionTop", - "assertNotElementPositionTop", - "assertElementWidth", - "assertNotElementWidth", - "assertEval", - "assertNotEval", - "assertExpression", - "assertNotExpression", - "assertHtmlSource", - "assertNotHtmlSource", - "assertLocation", - "assertNotLocation", - "assertLogMessages", - "assertNotLogMessages", - "assertMouseSpeed", - "assertNotMouseSpeed", - "assertPrompt", - "assertNotPrompt", - "assertSelectedId", - "assertNotSelectedId", - "assertSelectedIds", - "assertNotSelectedIds", - "assertSelectedIndex", - "assertNotSelectedIndex", - "assertSelectedIndexes", - "assertNotSelectedIndexes", - "assertSelectedLabel", - "assertNotSelectedLabel", - "assertSelectedLabels", - "assertNotSelectedLabels", - "assertSelectedValue", - "assertNotSelectedValue", - "assertSelectedValues", - "assertNotSelectedValues", - "assertSelectOptions", - "assertNotSelectOptions", - "assertTable", - "assertNotTable", - "assertText", - "assertNotText", - "assertTitle", - "assertNotTitle", - "assertValue", - "assertNotValue", - "assertWhetherThisFrameMatchFrameExpression", - "assertNotWhetherThisFrameMatchFrameExpression", - "assertWhetherThisWindowMatchWindowExpression", - "assertNotWhetherThisWindowMatchWindowExpression", - "assertAlertPresent", - "assertAlertNotPresent", - "assertChecked", - "assertNotChecked", - "assertConfirmationPresent", - "assertConfirmationNotPresent", - "assertEditable", - "assertNotEditable", - "assertElementPresent", - "assertElementNotPresent", - "assertOrdered", - "assertNotOrdered", - "assertPromptPresent", - "assertPromptNotPresent", - "assertSomethingSelected", - "assertNotSomethingSelected", - "assertTextPresent", - "assertTextNotPresent", - "assertVisible", - "assertNotVisible"); - - /** - * constructor - * - * Construct the object with the specified browser and url - * - * @param string $browser - * @param string $url - */ - function __construct($browser, $url) { - $this->selenium = new SimpleSeleniumRemoteControl($browser, $url); - $this->parsed_table = array(); - } - - /** - * tidy - * - * Reformat the selenium-IDE html test suites - */ - function tidy() { - $tmp = $this->html; - preg_match('//', $tmp, $matche); - $matche[0] = str_replace("/>", ">", $matche[0]); - $matche[0] = str_replace(">", "/>", $matche[0]); - $tmp = preg_replace('//', $matche[0], $tmp); - $this->html = $tmp; - } - - /** - * parse - * - * Extract the called selenium fonction from the html suite - */ - function parse() { - $parsedTab = array(); - $key1 = 0; - - $contenthtml = new DOMDocument; - @$contenthtml->loadHtml($this->html); - $content = simplexml_import_dom($contenthtml); - foreach ($content->body->table->tbody->tr as $tr){ - $key2 = 0; - foreach ($tr->td as $td){ - $parsedTab[$key1][$key2] = $td; - $key2++; - } - $key1++; - } - - $this->parsed_table = $parsedTab; - } - - /** - * assertFunction - * - * Integrate selenium fonctions in simpletest - * - * @param string $function - * @param string $param1 - * @param string $param2 - * - */ - function assertFunction($function, $param1, $param2) { - $_verifyMap = array('verify', 'verifyTextPresent', 'verifyTextNotPresent', 'verifyValue'); - - $reponse = $this->selenium->__call($function, array($param1, $param2)); - - $message = $reponse; - $message .= " using command '".$function ."' with target '".$param1."'"; - if (!empty($param2)) { - $message .= " and value '".$param2."'"; - } - $message .= " in file '".$this->testFile."'"; - - if (!in_array($function, $_verifyMap)) { - $reponse = substr($reponse, 0, 2) == 'OK' ? true : false; - } - - $this->assertTrue($reponse, $message); - } - - /** - * launch - * - * Launch the html test suite from a PHP variable on the url declared wihle - * constructing the object. The filename is used to localize the error. - * - * @param string $testFile - * @param string $filename - * - */ - function launch($html="") { - $this->html = $html; - $this->tidy(); - $this->parse(); - - $this->selenium->start(); - foreach ($this->parsed_table as $test) { - if (in_array($test[0], $this->_commandMap)) { - $this->assertFunction($test[0], $test[1], $test[2]); - } else { - $this->selenium->__call($test[0], array($test[1], $test[2])); - } - } - $this->selenium->stop(); - } - - /** - * launchPhpFile - * - * Parse the PHP file then launch the computed test suite - * - * @param string $file - * - */ - function launchPhpFile($file) { - ob_start(); - require($file); - $data = ob_get_contents(); - ob_end_clean(); - - $this->testFile = $file; - $this->html = $data; - $this->launch($this->html); - } - - /** - * launchFile - * - * Launch the html test suite file on the url declared wihle constructing the object - * - * @param string $testFile - * - */ - function launchFile($testFile) { - $this->testFile = $testFile; - $this->html = file_get_contents($testFile); - $this->launch($this->html); - } -} - -?> diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenium.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenium.php deleted file mode 100644 index 2efaeb43..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenium.php +++ /dev/null @@ -1,136 +0,0 @@ -browser)) { - trigger_error('browser property must be set in ' . get_class($this)); - exit; - } - - if (empty($this->browserUrl)) { - trigger_error('browserUrl property must be set in ' . get_class($this)); - exit; - } - } - - public function setUp() { - parent::setUp(); - - if (is_null($this->selenium)) { - $this->selenium = new SimpleSeleniumRemoteControl( - $this->browser, - $this->browserUrl, - $this->host, - $this->port, - $this->timeout - ); - $this->selenium->start(); - } - } - - public function tearDown() { - parent::tearDown(); - - if ($this->newInstanceEachTest) { - $this->selenium->stop(); - $this->selenium = null; - } - } - - public function __call($method, $arguments) { - if (substr($method, 0, 6) == 'verify') { - return $this->assertTrue( - call_user_func_array( - array($this->selenium, $method), - $arguments - ), - sprintf('%s failed', $method) - ); - } - - return call_user_func_array( - array($this->selenium, $method), - $arguments - ); - } - - public function verifyText($text) { - return $this->assertTrue( - $this->selenium->verifyText($text), - sprintf( - 'verifyText failed when on [%s]', - $text - ) - ); - } - - public function verifyTextPresent($text) { - return $this->assertTrue( - $this->selenium->verifyTextPresent($text), - sprintf( - 'verifyTextPresent failed when on [%s]', - $text - ) - ); - } - - public function verifyTextNotPresent($text) { - return $this->assertTrue( - $this->selenium->verifyTextNotPresent($text), - sprintf( - 'verifyTextNotPresent failed on [%s]', - $text - ) - ); - } - - public function verifyValue($selector, $value) { - return $this->assertTrue( - $this->selenium->verifyValue($selector, $value), - sprintf( - 'verifyValue failed on [%s] == [%s]', - $selector, - $value - ) - ); - } - - public function verifyTitle($pattern) { - return $this->assertTrue( - $this->selenium->verifyTitle($pattern), - sprintf( - 'verifyTitle failed on [%s]', - $pattern - ) - ); - } -} - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenium/remote-control.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenium/remote-control.php deleted file mode 100644 index 32277150..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenium/remote-control.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - */ -class SimpleSeleniumRemoteControl -{ - private $_browser = ''; - private $_browserUrl = ''; - private $_host = 'localhost'; - private $_port = 4444; - private $_timeout = 30000; - private $_sessionId = null; - - private $_commandMap = array( - 'bool' => array( - 'verify', - 'verifyTextPresent', - 'verifyTextNotPresent', - 'verifyValue' - ), - 'string' => array( - 'getNewBrowserSession', - ), - ); - - public function __construct($browser, $browserUrl, $host = 'localhost', $port = 4444, $timeout = 30000) { - $this->_browser = $browser; - $this->_browserUrl = $browserUrl; - $this->_host = $host; - $this->_port = $port; - $this->_timeout = $timeout; - } - - public function sessionIdParser($response) { - return substr($response, 3); - } - - public function start() { - $response = $this->cmd('getNewBrowserSession', array($this->_browser, $this->_browserUrl)); - $this->_sessionId = $this->sessionIdParser($response); - } - - public function stop() { - $this->cmd('testComplete'); - $this->_sessionId = null; - } - - public function __call($method, $arguments) { - $response = $this->cmd($method, $arguments); - - foreach ($this->_commandMap as $type => $commands) { - if (!in_array($method, $commands)) { - continue; - $type = null; - } - break; - } - - switch ($type) { - case 'bool' : - return substr($response, 0, 2) == 'OK' ? true : false; - break; - - case 'string' : - default: - return $response; - } - } - - private function _server() { - return "http://{$this->_host}:{$this->_port}/selenium-server/driver/"; - } - - public function buildUrlCmd($method, $arguments = array()) { - $params = array( - 'cmd=' . urlencode($method), - ); - $i = 1; - foreach ($arguments as $param) { - $params[] = $i++ . '=' . urlencode(trim($param)); - } - if (isset($this->_sessionId)) { - $params[] = 'sessionId=' . $this->_sessionId; - } - - return $this->_server()."?".implode('&', $params); - } - - public function cmd($method, $arguments = array()) { - $url = $this->buildUrlCmd($method, $arguments); - $response = $this->_sendRequest($url); - return $response; - } - - public function isUp() { - return (bool)@fsockopen($this->_host, $this->_port, $errno, $errstr, 30); - } - - private function _initCurl($url) { - if (!function_exists('curl_init')) { - throw new Exception('this code currently requires the curl extension'); - } - if (!$ch = curl_init($url)) { - throw new Exception('Unable to setup curl'); - } - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_TIMEOUT, floor($this->_timeout)); - return $ch; - } - - private function _sendRequest($url) { - $ch = $this->_initCurl($url); - $result = curl_exec($ch); - if (($errno = curl_errno($ch)) != 0) { - throw new Exception('Curl returned non-null errno ' . $errno . ':' . curl_error($ch)); - } - curl_close($ch); - return $result; - } -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenium/test/remote-control_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenium/test/remote-control_test.php deleted file mode 100644 index b705b6a9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/selenium/test/remote-control_test.php +++ /dev/null @@ -1,36 +0,0 @@ -assertEqual($remote_control->sessionIdParser('OK,123456789123456789'), '123456789123456789'); - } - - function testIsUpReturnsFalseWhenDirectedToLocalhostDown() { - $remote_control = new SimpleSeleniumRemoteControl("tester", "http://simpletest.org/", "localhost-down");; - $this->assertFalse($remote_control->isUp()); - } - - function testIsUpReturnsTrueWhenDirectedToLocalhostOnPort80() { - $remote_control = new SimpleSeleniumRemoteControl("tester", "http://simpletest.org/", "localhost", "80"); - $this->assertTrue($remote_control->isUp()); - } -} - -class TestOfSimpleSeleniumRemoteControlWhenItIsUp extends UnitTestCase { - function skip() { - $remote_control = new SimpleSeleniumRemoteControl("*custom opera -nosession", "http://simpletest.org/"); - $this->skipUnless($remote_control->isUp(), 'Remote control tests desperatly need a working Selenium Server.'); - } - - function testOfCommandCreation() { - $remote_control = new SimpleSeleniumRemoteControl("tester", "http://simpletest.org/"); - $this->assertEqual($remote_control->buildUrlCmd("test"), 'http://localhost:4444/selenium-server/driver/?cmd=test'); - $this->assertEqual($remote_control->buildUrlCmd("test", array("next")), 'http://localhost:4444/selenium-server/driver/?cmd=test&1=next'); - $this->assertEqual($remote_control->buildUrlCmd("test", array("t")), 'http://localhost:4444/selenium-server/driver/?cmd=test&1=%C3%A9t%C3%A9'); - $this->assertEqual($remote_control->buildUrlCmd("test", array("next", "then")), 'http://localhost:4444/selenium-server/driver/?cmd=test&1=next&2=then'); - } -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/testdox.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/testdox.php deleted file mode 100644 index dd9c61da..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/testdox.php +++ /dev/null @@ -1,55 +0,0 @@ -_test_case_pattern = empty($test_case_pattern) ? '/^(.*)$/' : $test_case_pattern; - } - - function paintCaseStart($test_name) { - preg_match($this->_test_case_pattern, $test_name, $matches); - if (!empty($matches[1])) { - echo $matches[1] . "\n"; - } else { - echo $test_name . "\n"; - } - } - - function paintCaseEnd($test_name) { - echo "\n"; - } - - function paintMethodStart($test_name) { - if (!preg_match('/^test(.*)$/i', $test_name, $matches)) { - return; - } - $test_name = $matches[1]; - - $test_name = preg_replace('/([A-Z])([A-Z])/', '$1 $2', $test_name); - echo '- ' . strtolower(preg_replace('/([a-zA-Z])([A-Z0-9])/', '$1 $2', $test_name)); - } - - function paintMethodEnd($test_name) { - echo "\n"; - } - - function paintFail($message) { - echo " [FAILED]"; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/testdox/test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/testdox/test.php deleted file mode 100644 index b03abe51..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/testdox/test.php +++ /dev/null @@ -1,107 +0,0 @@ -assertIsA($dox, 'SimpleScorer'); - $this->assertIsA($dox, 'SimpleReporter'); - } - - function testOutputsNameOfTestCase() { - $dox = new TestDoxReporter(); - ob_start(); - $dox->paintCaseStart('TestOfTestDoxReporter'); - $buffer = ob_get_clean(); - $this->assertPattern('/^TestDoxReporter/', $buffer); - } - - function testOutputOfTestCaseNameFilteredByConstructParameter() { - $dox = new TestDoxReporter('/^(.*)Test$/'); - ob_start(); - $dox->paintCaseStart('SomeGreatWidgetTest'); - $buffer = ob_get_clean(); - $this->assertPattern('/^SomeGreatWidget/', $buffer); - } - - function testIfTest_case_patternIsEmptyAssumeEverythingMatches() { - $dox = new TestDoxReporter(''); - ob_start(); - $dox->paintCaseStart('TestOfTestDoxReporter'); - $buffer = ob_get_clean(); - $this->assertPattern('/^TestOfTestDoxReporter/', $buffer); - } - - function testEmptyLineInsertedWhenCaseEnds() { - $dox = new TestDoxReporter(); - ob_start(); - $dox->paintCaseEnd('TestOfTestDoxReporter'); - $buffer = ob_get_clean(); - $this->assertEqual("\n", $buffer); - } - - function testPaintsTestMethodInTestDoxFormat() { - $dox = new TestDoxReporter(); - ob_start(); - $dox->paintMethodStart('testSomeGreatTestCase'); - $buffer = ob_get_clean(); - $this->assertEqual("- some great test case", $buffer); - unset($buffer); - - $random = rand(100, 200); - ob_start(); - $dox->paintMethodStart("testRandomNumberIs{$random}"); - $buffer = ob_get_clean(); - $this->assertEqual("- random number is {$random}", $buffer); - } - - function testDoesNotOutputAnythingOnNoneTestMethods() { - $dox = new TestDoxReporter(); - ob_start(); - $dox->paintMethodStart('nonMatchingMethod'); - $buffer = ob_get_clean(); - $this->assertEqual('', $buffer); - } - - function testPaintMethodAddLineBreak() { - $dox = new TestDoxReporter(); - ob_start(); - $dox->paintMethodEnd('someMethod'); - $buffer = ob_get_clean(); - $this->assertEqual("\n", $buffer); - } - - function testProperlySpacesSingleLettersInMethodName() { - $dox = new TestDoxReporter(); - ob_start(); - $dox->paintMethodStart('testAVerySimpleAgainAVerySimpleMethod'); - $buffer = ob_get_clean(); - $this->assertEqual('- a very simple again a very simple method', $buffer); - } - - function testOnFailureThisPrintsFailureNotice() { - $dox = new TestDoxReporter(); - ob_start(); - $dox->paintFail(''); - $buffer = ob_get_clean(); - $this->assertEqual(' [FAILED]', $buffer); - } - - function testWhenMatchingMethodNamesTestPrefixIsCaseInsensitive() { - $dox = new TestDoxReporter(); - ob_start(); - $dox->paintMethodStart('TESTSupportsAllUppercaseTestPrefixEvenThoughIDoNotKnowWhyYouWouldDoThat'); - $buffer = ob_get_clean(); - $this->assertEqual( - '- supports all uppercase test prefix even though i do not know why you would do that', - $buffer - ); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter.php deleted file mode 100644 index 0dfacb4e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter.php +++ /dev/null @@ -1,126 +0,0 @@ -SimpleReporterDecorator(new TreemapRecorder()); - } - - /** - * basic CSS for floating nested divs - * @todo checkout some weird border bugs - */ - function _getCss() { - $css = ".pass{background-color:green;}.fail{background-color:red;}"; - $css .= "body {background-color:white;margin:0;padding:1em;}"; - $css .= "div{float:right;margin:0;color:black;}"; - $css .= "div{border-left:1px solid white;border-bottom:1px solid white;}"; - $css .= "h1 {font:normal 1.8em Arial;color:black;margin:0 0 0.3em 0.1em;}"; - $css .= ".clear { clear:both; }"; - return $css; - } - - /** - * paints the HTML header and sets up results - */ - function paintResultsHeader() { - $title = $this->_reporter->getTitle(); - echo ""; - echo "{$title}"; - echo ""; - echo ""; - echo "

{$title}

"; - } - - /** - * places a clearing break below the end of the test nodes - */ - function paintResultsFooter() { - echo "
"; - echo ""; - } - - /** - * paints start tag for div representing a test node - */ - function paintRectangleStart($node, $horiz, $vert) { - $name = $node->getName(); - $description = $node->getDescription(); - $status = $node->getStatus(); - echo "
"; - } - - /** - * paints end tag for test node div - */ - function paintRectangleEnd() { - echo "
"; - } - - /** - * paints wrapping treemap divs - * @todo how to configure aspect and other parameters? - */ - function paintFooter($group) { - $aspect = 1; - $this->paintResultsHeader(); - $this->paintRectangleStart($this->_reporter->getGraph(), 100, 100); - $this->divideMapNodes($this->_reporter->getGraph(), $aspect); - $this->paintRectangleEnd(); - $this->paintResultsFooter(); - } - - /** - * divides the test results based on a slice and dice algorithm - * - * @param TreemapNode $map sorted - * @param boolean $aspect flips the aspect between horizontal and vertical - * @private - */ - function divideMapNodes($map, $aspect) { - $aspect = !$aspect; - $divisions = $map->getSize(); - $total = $map->getTotalSize(); - foreach($map->getChildren() as $node) { - if (!$node->isLeaf()) { - $dist = $node->getTotalSize() / $total * 100; - } else { - $dist = 1 / $total * 100; - } - if ($aspect) { - $horiz = $dist; - $vert = 100; - } else { - $horiz = 100; - $vert = $dist; - } - $this->paintRectangleStart($node, $horiz, $vert); - $this->divideMapNodes($node, $aspect); - $this->paintRectangleEnd(); - } - } - - function paintGroupEnd($group) { - $this->_reporter->paintGroupEnd($group); - if ($this->_reporter->isComplete()) { - $this->paintFooter($group); - } - } - -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter/jquery.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter/jquery.php deleted file mode 100644 index 7de0e1e8..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter/jquery.php +++ /dev/null @@ -1,75 +0,0 @@ - representing treemap of test report, - * and attaches jQuery Treemap to render results. - * - * @package SimpleTest - * @subpackage Extensions - */ -class JqueryTreemapReporter extends TreemapReporter { - - function _getCss() { - $css = ".treemapView { color:white; } - .treemapCell {background-color:green;font-size:10px;font-family:Arial;} - .treemapHead {cursor:pointer;background-color:#B34700} - .treemapCell.selected, .treemapCell.selected .treemapCell.selected {background-color:#FFCC80} - .treemapCell.selected .treemapCell {background-color:#FF9900} - .treemapCell.selected .treemapHead {background-color:#B36B00} - .transfer {border:1px solid black}"; - return $css; - } - - function paintResultsHeader() { - $title = $this->_reporter->getTitle(); - echo ""; - echo "{$title}"; - echo ""; - echo ""; - echo ""; - echo ""; - echo "
    "; - } - - function paintRectangleStart($node) { - echo "
  • ". basename($node->getDescription()) . ""; - echo "" . $node->getTotalSize() . ""; - } - - function paintRectangleEnd() {} - - function paintResultsFooter() { - echo "
"; - echo ""; - } - - function divideMapNodes($map) { - foreach($map->getChildren() as $node) { - if (!$node->isLeaf()) { - $this->paintRectangleStart($node); - $this->divideMapNodes($node); - } - } - } - -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter/test/treemap_node_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter/test/treemap_node_test.php deleted file mode 100644 index f3c6a23c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter/test/treemap_node_test.php +++ /dev/null @@ -1,69 +0,0 @@ -assertEqual($node->getSize(), 0); - $this->assertEqual($node->getTotalSize(), 0); - } - - function testChildNodeDepth() { - $root = new TreemapNode("root", "test"); - $root->putChild(new TreemapNode("child", "test")); - $childOne = new TreemapNode("child1", "test"); - $childTwo = new TreemapNode("child2", "test"); - $childTwo->putChild(new TreemapNode("child3", "test")); - $childOne->putChild($childTwo); - $root->putChild($childOne); - $this->assertEqual($root->getSize(), 2); - $this->assertEqual($root->getTotalSize(), 4); - } - - function testGraphDepthSpread() { - $root = new TreemapNode("root", "test"); - $root->putChild(new TreemapNode("child", "test")); - $childOne = new TreemapNode("child1", "test"); - $childTwo = new TreemapNode("child2", "test"); - $childThree = new TreemapNode("child3", "test"); - $childFour = new TreemapNode("child4", "test"); - $childFive = new TreemapNode("child5", "test"); - $childSix = new TreemapNode("child6", "test"); - $childFour->putChild($childFive); - $childFour->putChild($childSix); - $this->assertEqual($childFour->getSize(), 2); - $this->assertEqual($childFour->getTotalSize(), 2); - $childThree->putChild($childFour); - $this->assertEqual($childThree->getSize(), 1); - $this->assertEqual($childThree->getTotalSize(), 3); - $childTwo->putChild($childThree); - $this->assertEqual($childTwo->getSize(), 1); - $this->assertEqual($childTwo->getTotalSize(), 4); - $childOne->putChild($childTwo); - $root->putChild($childOne); - $this->assertEqual($root->getSize(), 2); - $this->assertEqual($root->getTotalSize(), 7); - } - - function testMutableStack() { - $stack = new TreemapStack(); - $this->assertEqual($stack->size(), 0); - $stack->push(new TreemapNode("a", "one")); - $this->assertEqual($stack->size(), 1); - $stack->push(new TreemapNode("b", "one")); - $this->assertIdentical($stack->peek(), new TreemapNode("b", "one")); - $stack->push(new TreemapNode("c", "three")); - $stack->push(new TreemapNode("d", "four")); - $this->assertEqual($stack->size(), 4); - $this->assertIdentical($stack->pop(), new TreemapNode("d", "four")); - $this->assertEqual($stack->size(), 3); - $this->assertIdentical($stack->pop(), new TreemapNode("c", "three")); - $this->assertEqual($stack->size(), 2); - } - -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter/treemap_recorder.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter/treemap_recorder.php deleted file mode 100644 index 0136e494..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/treemap_reporter/treemap_recorder.php +++ /dev/null @@ -1,310 +0,0 @@ -SimpleReporter(); - $this->_stack = new TreemapStack(); - $this->_graph = null; - } - - /** - * returns a reference to the root node of the - * collected treemap graph - */ - function getGraph() { - return $this->_graph; - } - - /** - * is this test run finished? - */ - function isComplete() { - return ($this->_graph != null); - } - - /** - * returns the title of the test - */ - function getTitle() { - return $this->_title; - } - - /** - * stashes the title of the test - */ - function paintHeader($title) { - $this->_title = $title; - } - - function paintFormattedMessage() { - } - - /** - * acceptor for start of test group node - */ - function paintGroupStart($message, $size) { - parent::paintGroupStart($message, $size); - $node = new TreemapNode("Group", $message); - $this->_stack->push($node); - } - - /** - * acceptor for start of test case node - */ - function paintCaseStart($message) { - parent::paintCaseStart($message); - $node = new TreemapNode("TestCase", $message); - $this->_stack->push($node); - } - - /** - * acceptor for start of test method node - */ - function paintMethodStart($message) { - parent::paintMethodStart($message); - $node = new TreemapNode("Method", $message); - $this->_stack->push($node); - } - - /** - * acceptor for passing assertion node - */ - function paintPass($message) { - parent::paintPass($message); - $node = new TreemapNode("Assertion", $message, true); - $current = $this->_stack->peek(); - if ($current) { - $current->putChild($node); - } else { - echo "no current node"; - } - } - - - /** - * acceptor for failing assertion node - */ - - function paintFail($message) { - parent::paintFail($message); - $node = new TreemapNode("Assertion", $message, false); - $current = $this->_stack->peek(); - $current->putChild($node); - $current->fail(); - } - - /** - * acceptor for end of method node - */ - function paintMethodEnd($message) { - parent::paintCaseEnd($message); - $node = $this->_stack->pop(); - $current = $this->_stack->peek(); - if ($node->isFailed()) $current->fail(); - $current->putChild($node); - } - - /** - * acceptor for end of test case - */ - function paintCaseEnd($message) { - parent::paintCaseEnd($message); - $node = $this->_stack->pop(); - $current = $this->_stack->peek(); - if ($node->isFailed()) $current->fail(); - $current->putChild($node); - } - - /** - * acceptor for end of test group. final group - * pops the collected treemap nodes and assigns - * it to the internal graph property. - */ - function paintGroupEnd($message) { - $node = $this->_stack->pop(); - $current = $this->_stack->peek(); - if ($current) { - if ($node->isFailed()) $current->fail(); - $current->putChild($node); - } else { - $this->_graph = $node; - } - parent::paintGroupEnd($message); - } - -} - -/** - * Creates a treemap graph, representing - * each node in a test visualization. - * - * @package SimpleTest - * @subpackage Extensions - */ -class TreemapNode { - var $_name; - var $_description; - var $_status; - var $_parent; - var $_size; - - function TreemapNode($name, $description, $status=true) { - $this->_name = $name; - $this->_description = $description; - $this->_status = $status; - $this->_children = array(); - } - - /** - * @return string label of this node - */ - function getName() { - return $this->_name; - } - - /** - * @return string description of this node - */ - function getDescription() { - return $this->_description; - } - - /** - * @return string status class string - */ - function getStatus() { - return ($this->_status) ? "pass" : "fail"; - } - - /** - * Return list of child nodes from direct edges. - */ - function getChildren() { - uksort($this->_children, array($this, 'compareChildren')); - return $this->_children; - } - - /** - * Comparator method to rank child nodes by total weight. - */ - function compareChildren($a, $b) { - if ($this->_children[$a]->getTotalSize() > $this->_children[$b]->getTotalSize()) { - $node_a = $this->_children[$a]; - $node_b = $this->_children[$b]; - $this->_children[$a] = $node_b; - $this->_children[$b] = $node_a; - } - } - - /** - * Gets the number of immediate child edges from this node. - */ - function getSize() { - return count($this->_children); - } - - /** - * depth first search to get the total number of nodes - * that are descendants of this node. - */ - function getTotalSize() { - if (!isset($this->_size)) { - $size = $this->getSize(); - if (!$this->isLeaf()) { - foreach($this->getChildren() as $child) { - $size += $child->getTotalSize(); - } - } - $this->_size = $size; - } - return $this->_size; - } - - /** - * Fail this node. - * @return void - */ - function fail() { - $this->_status = false; - } - - /** Is this node failed? */ - function isFailed() { - return ($this->_status == false); - } - - /** Add an edge to a child node */ - function putChild($node) { - $this->_children[] = $node; - } - - /** Is this node a leaf node? */ - function isLeaf() { - return (count($this->_children) == 0); - } - -} - -/** - * provides LIFO stack semantics - * - * @package SimpleTest - * @subpackage Extensions - */ -class TreemapStack { - var $_list; - - function TreemapStack() { - $this->_list = array(); - } - - /** - * Push an element onto the stack. - */ - function push($node) { - $this->_list[] = $node; - } - - /** - * Number of elements in the stack. - */ - function size() { - return count($this->_list); - } - - /** - * Take a peek at the top element on the - * stack. - */ - function peek() { - return end($this->_list); - } - - /** - * Pops an element off the stack. - */ - function pop() { - return array_pop($this->_list); - } - -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/webunit_reporter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/webunit_reporter.php deleted file mode 100644 index 52d25eb2..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/extensions/webunit_reporter.php +++ /dev/null @@ -1,285 +0,0 @@ - - -%s - - - - - - -
-

 Running %s 

- Please wait...
-
  -
- -
-

-
-
visible tab content
-     Fail   -   Tree   -
-
Click on a failed test case method in the tree tab to view output here.
-
-
-
- -'.$this->outputScript("xHide('wait');"); - $colour = ($this->getFailCount() + $this->getExceptionCount() > 0 ? "red" : "green"); - $content = "

$test_name

\n"; - $content .= "
"; - $content .= $this->getTestCaseProgress() . "/" . $this->getTestCaseCount(); - $content .= " test cases complete:\n"; - $content .= "" . $this->getPassCount() . " passes, "; - $content .= "" . $this->getFailCount() . " fails and "; - $content .= "" . $this->getExceptionCount() . " exceptions."; - $content .= "
\n"; - - echo $this->outputScript('foo = "'.$this->toJsString($content).'";'."\nset_div_content('run', foo);"); - echo "\n\n\n"; - } - - - /** - * Paints formatted text such as dumped variables. - * @param string $message Text to show. - * @access public - */ - function paintFormattedMessage($message) { - echo "add_log(\"".$this->toJsString("
$message
", true)."\");\n"; - } - - /** - * Paints the start of a group test. Will also paint - * the page header and footer if this is the - * first test. Will stash the size if the first - * start. - * @param string $test_name Name of test that is starting. - * @param integer $size Number of test cases starting. - * @access public - */ - function paintGroupStart($test_name, $size) { - Parent::paintGroupStart($test_name, $size); - echo "add_group('$test_name');\n"; - } - - /** - * Paints the start of a test case. Will also paint - * the page header and footer if this is the - * first test. Will stash the size if the first - * start. - * @param string $test_name Name of test that is starting. - * @access public - */ - function paintCaseStart($test_name) { - Parent::paintCaseStart($test_name); - echo "add_case('$test_name');\n"; - } - - - /** - * Paints the start of a test method. - * @param string $test_name Name of test that is starting. - * @access public - */ - function paintMethodStart($test_name) { - Parent::paintMethodStart($test_name); - echo "add_method('$test_name');\n"; - } - - /** - * Paints the end of a test method. - * @param string $test_name Name of test that is ending. - * @access public - */ - function paintMethodEnd($test_name) { - Parent::paintMethodEnd($test_name); - } - - /** - * Paints the test failure with a breadcrumbs - * trail of the nesting test suites below the - * top level test. - * @param string $message Failure message displayed in - * the context of the other tests. - * @access public - */ - function paintFail($message) { - parent::paintFail($message); - $msg = "Fail: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - $msg .= implode("->", $breadcrumb); - $msg .= "->" . htmlentities($message) . "
"; - echo "add_fail('$msg');\n"; - } - - /** - * Paints a PHP error or exception. - * @param string $message Message is ignored. - * @access public - * @abstract - */ - function paintException($message) { - parent::paintException($message); - $msg = "Exception: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - $msg .= implode("->", $breadcrumb); - $msg .= "->" . htmlentities($message) . "
"; - echo "add_fail('$msg');\n"; - } - - /** - * Returns the script passed in wrapped in script tags. - * - * @param string $script the script to output - * @return string the script wrapped with script tags - */ - function outputScript($script) - { - return "\n"; - } - - - /** - * Transform a string into a format acceptable to JavaScript - * @param string $str the string to transform - * @return string - */ - function toJsString($str, $preserveCr=false) { - $cr = ($preserveCr) ? '\\n' : ''; - return str_replace( - array('"' - ,"\n") - ,array('\"' - ,"$cr\"\n\t+\"") - ,$str - ); - } - } - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/form.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/form.php deleted file mode 100644 index d14f0f7b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/form.php +++ /dev/null @@ -1,355 +0,0 @@ -method = $tag->getAttribute('method'); - $this->action = $this->createAction($tag->getAttribute('action'), $page); - $this->encoding = $this->setEncodingClass($tag); - $this->default_target = false; - $this->id = $tag->getAttribute('id'); - $this->buttons = array(); - $this->images = array(); - $this->widgets = array(); - $this->radios = array(); - $this->checkboxes = array(); - } - - /** - * Creates the request packet to be sent by the form. - * @param SimpleTag $tag Form tag to read. - * @return string Packet class. - * @access private - */ - protected function setEncodingClass($tag) { - if (strtolower($tag->getAttribute('method')) == 'post') { - if (strtolower($tag->getAttribute('enctype')) == 'multipart/form-data') { - return 'SimpleMultipartEncoding'; - } - return 'SimplePostEncoding'; - } - return 'SimpleGetEncoding'; - } - - /** - * Sets the frame target within a frameset. - * @param string $frame Name of frame. - * @access public - */ - function setDefaultTarget($frame) { - $this->default_target = $frame; - } - - /** - * Accessor for method of form submission. - * @return string Either get or post. - * @access public - */ - function getMethod() { - return ($this->method ? strtolower($this->method) : 'get'); - } - - /** - * Combined action attribute with current location - * to get an absolute form target. - * @param string $action Action attribute from form tag. - * @param SimpleUrl $base Page location. - * @return SimpleUrl Absolute form target. - */ - protected function createAction($action, $page) { - if (($action === '') || ($action === false)) { - return $page->expandUrl($page->getUrl()); - } - return $page->expandUrl(new SimpleUrl($action));; - } - - /** - * Absolute URL of the target. - * @return SimpleUrl URL target. - * @access public - */ - function getAction() { - $url = $this->action; - if ($this->default_target && ! $url->getTarget()) { - $url->setTarget($this->default_target); - } - return $url; - } - - /** - * Creates the encoding for the current values in the - * form. - * @return SimpleFormEncoding Request to submit. - * @access private - */ - protected function encode() { - $class = $this->encoding; - $encoding = new $class(); - for ($i = 0, $count = count($this->widgets); $i < $count; $i++) { - $this->widgets[$i]->write($encoding); - } - return $encoding; - } - - /** - * ID field of form for unique identification. - * @return string Unique tag ID. - * @access public - */ - function getId() { - return $this->id; - } - - /** - * Adds a tag contents to the form. - * @param SimpleWidget $tag Input tag to add. - * @access public - */ - function addWidget($tag) { - if (strtolower($tag->getAttribute('type')) == 'submit') { - $this->buttons[] = $tag; - } elseif (strtolower($tag->getAttribute('type')) == 'image') { - $this->images[] = $tag; - } elseif ($tag->getName()) { - $this->setWidget($tag); - } - } - - /** - * Sets the widget into the form, grouping radio - * buttons if any. - * @param SimpleWidget $tag Incoming form control. - * @access private - */ - protected function setWidget($tag) { - if (strtolower($tag->getAttribute('type')) == 'radio') { - $this->addRadioButton($tag); - } elseif (strtolower($tag->getAttribute('type')) == 'checkbox') { - $this->addCheckbox($tag); - } else { - $this->widgets[] = &$tag; - } - } - - /** - * Adds a radio button, building a group if necessary. - * @param SimpleRadioButtonTag $tag Incoming form control. - * @access private - */ - protected function addRadioButton($tag) { - if (! isset($this->radios[$tag->getName()])) { - $this->widgets[] = new SimpleRadioGroup(); - $this->radios[$tag->getName()] = count($this->widgets) - 1; - } - $this->widgets[$this->radios[$tag->getName()]]->addWidget($tag); - } - - /** - * Adds a checkbox, making it a group on a repeated name. - * @param SimpleCheckboxTag $tag Incoming form control. - * @access private - */ - protected function addCheckbox($tag) { - if (! isset($this->checkboxes[$tag->getName()])) { - $this->widgets[] = $tag; - $this->checkboxes[$tag->getName()] = count($this->widgets) - 1; - } else { - $index = $this->checkboxes[$tag->getName()]; - if (! SimpleTestCompatibility::isA($this->widgets[$index], 'SimpleCheckboxGroup')) { - $previous = $this->widgets[$index]; - $this->widgets[$index] = new SimpleCheckboxGroup(); - $this->widgets[$index]->addWidget($previous); - } - $this->widgets[$index]->addWidget($tag); - } - } - - /** - * Extracts current value from form. - * @param SimpleSelector $selector Criteria to apply. - * @return string/array Value(s) as string or null - * if not set. - * @access public - */ - function getValue($selector) { - for ($i = 0, $count = count($this->widgets); $i < $count; $i++) { - if ($selector->isMatch($this->widgets[$i])) { - return $this->widgets[$i]->getValue(); - } - } - foreach ($this->buttons as $button) { - if ($selector->isMatch($button)) { - return $button->getValue(); - } - } - return null; - } - - /** - * Sets a widget value within the form. - * @param SimpleSelector $selector Criteria to apply. - * @param string $value Value to input into the widget. - * @return boolean True if value is legal, false - * otherwise. If the field is not - * present, nothing will be set. - * @access public - */ - function setField($selector, $value, $position=false) { - $success = false; - $_position = 0; - for ($i = 0, $count = count($this->widgets); $i < $count; $i++) { - if ($selector->isMatch($this->widgets[$i])) { - $_position++; - if ($position === false or $_position === (int)$position) { - if ($this->widgets[$i]->setValue($value)) { - $success = true; - } - } - } - } - return $success; - } - - /** - * Used by the page object to set widgets labels to - * external label tags. - * @param SimpleSelector $selector Criteria to apply. - * @access public - */ - function attachLabelBySelector($selector, $label) { - for ($i = 0, $count = count($this->widgets); $i < $count; $i++) { - if ($selector->isMatch($this->widgets[$i])) { - if (method_exists($this->widgets[$i], 'setLabel')) { - $this->widgets[$i]->setLabel($label); - return; - } - } - } - } - - /** - * Test to see if a form has a submit button. - * @param SimpleSelector $selector Criteria to apply. - * @return boolean True if present. - * @access public - */ - function hasSubmit($selector) { - foreach ($this->buttons as $button) { - if ($selector->isMatch($button)) { - return true; - } - } - return false; - } - - /** - * Test to see if a form has an image control. - * @param SimpleSelector $selector Criteria to apply. - * @return boolean True if present. - * @access public - */ - function hasImage($selector) { - foreach ($this->images as $image) { - if ($selector->isMatch($image)) { - return true; - } - } - return false; - } - - /** - * Gets the submit values for a selected button. - * @param SimpleSelector $selector Criteria to apply. - * @param hash $additional Additional data for the form. - * @return SimpleEncoding Submitted values or false - * if there is no such button - * in the form. - * @access public - */ - function submitButton($selector, $additional = false) { - $additional = $additional ? $additional : array(); - foreach ($this->buttons as $button) { - if ($selector->isMatch($button)) { - $encoding = $this->encode(); - $button->write($encoding); - if ($additional) { - $encoding->merge($additional); - } - return $encoding; - } - } - return false; - } - - /** - * Gets the submit values for an image. - * @param SimpleSelector $selector Criteria to apply. - * @param integer $x X-coordinate of click. - * @param integer $y Y-coordinate of click. - * @param hash $additional Additional data for the form. - * @return SimpleEncoding Submitted values or false - * if there is no such button in the - * form. - * @access public - */ - function submitImage($selector, $x, $y, $additional = false) { - $additional = $additional ? $additional : array(); - foreach ($this->images as $image) { - if ($selector->isMatch($image)) { - $encoding = $this->encode(); - $image->write($encoding, $x, $y); - if ($additional) { - $encoding->merge($additional); - } - return $encoding; - } - } - return false; - } - - /** - * Simply submits the form without the submit button - * value. Used when there is only one button or it - * is unimportant. - * @return hash Submitted values. - * @access public - */ - function submit() { - return $this->encode(); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/frames.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/frames.php deleted file mode 100644 index d6d8e96f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/frames.php +++ /dev/null @@ -1,592 +0,0 @@ -frameset = $page; - $this->frames = array(); - $this->focus = false; - $this->names = array(); - } - - /** - * Adds a parsed page to the frameset. - * @param SimplePage $page Frame page. - * @param string $name Name of frame in frameset. - * @access public - */ - function addFrame($page, $name = false) { - $this->frames[] = $page; - if ($name) { - $this->names[$name] = count($this->frames) - 1; - } - } - - /** - * Replaces existing frame with another. If the - * frame is nested, then the call is passed down - * one level. - * @param array $path Path of frame in frameset. - * @param SimplePage $page Frame source. - * @access public - */ - function setFrame($path, $page) { - $name = array_shift($path); - if (isset($this->names[$name])) { - $index = $this->names[$name]; - } else { - $index = $name - 1; - } - if (count($path) == 0) { - $this->frames[$index] = &$page; - return; - } - $this->frames[$index]->setFrame($path, $page); - } - - /** - * Accessor for current frame focus. Will be - * false if no frame has focus. Will have the nested - * frame focus if any. - * @return array Labels or indexes of nested frames. - * @access public - */ - function getFrameFocus() { - if ($this->focus === false) { - return array(); - } - return array_merge( - array($this->getPublicNameFromIndex($this->focus)), - $this->frames[$this->focus]->getFrameFocus()); - } - - /** - * Turns an internal array index into the frames list - * into a public name, or if none, then a one offset - * index. - * @param integer $subject Internal index. - * @return integer/string Public name. - * @access private - */ - protected function getPublicNameFromIndex($subject) { - foreach ($this->names as $name => $index) { - if ($subject == $index) { - return $name; - } - } - return $subject + 1; - } - - /** - * Sets the focus by index. The integer index starts from 1. - * If already focused and the target frame also has frames, - * then the nested frame will be focused. - * @param integer $choice Chosen frame. - * @return boolean True if frame exists. - * @access public - */ - function setFrameFocusByIndex($choice) { - if (is_integer($this->focus)) { - if ($this->frames[$this->focus]->hasFrames()) { - return $this->frames[$this->focus]->setFrameFocusByIndex($choice); - } - } - if (($choice < 1) || ($choice > count($this->frames))) { - return false; - } - $this->focus = $choice - 1; - return true; - } - - /** - * Sets the focus by name. If already focused and the - * target frame also has frames, then the nested frame - * will be focused. - * @param string $name Chosen frame. - * @return boolean True if frame exists. - * @access public - */ - function setFrameFocus($name) { - if (is_integer($this->focus)) { - if ($this->frames[$this->focus]->hasFrames()) { - return $this->frames[$this->focus]->setFrameFocus($name); - } - } - if (in_array($name, array_keys($this->names))) { - $this->focus = $this->names[$name]; - return true; - } - return false; - } - - /** - * Clears the frame focus. - * @access public - */ - function clearFrameFocus() { - $this->focus = false; - $this->clearNestedFramesFocus(); - } - - /** - * Clears the frame focus for any nested frames. - * @access private - */ - protected function clearNestedFramesFocus() { - for ($i = 0; $i < count($this->frames); $i++) { - $this->frames[$i]->clearFrameFocus(); - } - } - - /** - * Test for the presence of a frameset. - * @return boolean Always true. - * @access public - */ - function hasFrames() { - return true; - } - - /** - * Accessor for frames information. - * @return array/string Recursive hash of frame URL strings. - * The key is either a numerical - * index or the name attribute. - * @access public - */ - function getFrames() { - $report = array(); - for ($i = 0; $i < count($this->frames); $i++) { - $report[$this->getPublicNameFromIndex($i)] = - $this->frames[$i]->getFrames(); - } - return $report; - } - - /** - * Accessor for raw text of either all the pages or - * the frame in focus. - * @return string Raw unparsed content. - * @access public - */ - function getRaw() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getRaw(); - } - $raw = ''; - for ($i = 0; $i < count($this->frames); $i++) { - $raw .= $this->frames[$i]->getRaw(); - } - return $raw; - } - - /** - * Accessor for plain text of either all the pages or - * the frame in focus. - * @return string Plain text content. - * @access public - */ - function getText() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getText(); - } - $raw = ''; - for ($i = 0; $i < count($this->frames); $i++) { - $raw .= ' ' . $this->frames[$i]->getText(); - } - return trim($raw); - } - - /** - * Accessor for last error. - * @return string Error from last response. - * @access public - */ - function getTransportError() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getTransportError(); - } - return $this->frameset->getTransportError(); - } - - /** - * Request method used to fetch this frame. - * @return string GET, POST or HEAD. - * @access public - */ - function getMethod() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getMethod(); - } - return $this->frameset->getMethod(); - } - - /** - * Original resource name. - * @return SimpleUrl Current url. - * @access public - */ - function getUrl() { - if (is_integer($this->focus)) { - $url = $this->frames[$this->focus]->getUrl(); - $url->setTarget($this->getPublicNameFromIndex($this->focus)); - } else { - $url = $this->frameset->getUrl(); - } - return $url; - } - - /** - * Page base URL. - * @return SimpleUrl Current url. - * @access public - */ - function getBaseUrl() { - if (is_integer($this->focus)) { - $url = $this->frames[$this->focus]->getBaseUrl(); - } else { - $url = $this->frameset->getBaseUrl(); - } - return $url; - } - - /** - * Expands expandomatic URLs into fully qualified - * URLs for the frameset page. - * @param SimpleUrl $url Relative URL. - * @return SimpleUrl Absolute URL. - * @access public - */ - function expandUrl($url) { - return $this->frameset->expandUrl($url); - } - - /** - * Original request data. - * @return mixed Sent content. - * @access public - */ - function getRequestData() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getRequestData(); - } - return $this->frameset->getRequestData(); - } - - /** - * Accessor for current MIME type. - * @return string MIME type as string; e.g. 'text/html' - * @access public - */ - function getMimeType() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getMimeType(); - } - return $this->frameset->getMimeType(); - } - - /** - * Accessor for last response code. - * @return integer Last HTTP response code received. - * @access public - */ - function getResponseCode() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getResponseCode(); - } - return $this->frameset->getResponseCode(); - } - - /** - * Accessor for last Authentication type. Only valid - * straight after a challenge (401). - * @return string Description of challenge type. - * @access public - */ - function getAuthentication() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getAuthentication(); - } - return $this->frameset->getAuthentication(); - } - - /** - * Accessor for last Authentication realm. Only valid - * straight after a challenge (401). - * @return string Name of security realm. - * @access public - */ - function getRealm() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getRealm(); - } - return $this->frameset->getRealm(); - } - - /** - * Accessor for outgoing header information. - * @return string Header block. - * @access public - */ - function getRequest() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getRequest(); - } - return $this->frameset->getRequest(); - } - - /** - * Accessor for raw header information. - * @return string Header block. - * @access public - */ - function getHeaders() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getHeaders(); - } - return $this->frameset->getHeaders(); - } - - /** - * Accessor for parsed title. - * @return string Title or false if no title is present. - * @access public - */ - function getTitle() { - return $this->frameset->getTitle(); - } - - /** - * Accessor for a list of all fixed links. - * @return array List of urls as strings. - * @access public - */ - function getUrls() { - if (is_integer($this->focus)) { - return $this->frames[$this->focus]->getUrls(); - } - $urls = array(); - foreach ($this->frames as $frame) { - $urls = array_merge($urls, $frame->getUrls()); - } - return array_values(array_unique($urls)); - } - - /** - * Accessor for URLs by the link label. Label will match - * regardess of whitespace issues and case. - * @param string $label Text of link. - * @return array List of links with that label. - * @access public - */ - function getUrlsByLabel($label) { - if (is_integer($this->focus)) { - return $this->tagUrlsWithFrame( - $this->frames[$this->focus]->getUrlsByLabel($label), - $this->focus); - } - $urls = array(); - foreach ($this->frames as $index => $frame) { - $urls = array_merge( - $urls, - $this->tagUrlsWithFrame( - $frame->getUrlsByLabel($label), - $index)); - } - return $urls; - } - - /** - * Accessor for a URL by the id attribute. If in a frameset - * then the first link found with that ID attribute is - * returned only. Focus on a frame if you want one from - * a specific part of the frameset. - * @param string $id Id attribute of link. - * @return string URL with that id. - * @access public - */ - function getUrlById($id) { - foreach ($this->frames as $index => $frame) { - if ($url = $frame->getUrlById($id)) { - if (! $url->gettarget()) { - $url->setTarget($this->getPublicNameFromIndex($index)); - } - return $url; - } - } - return false; - } - - /** - * Attaches the intended frame index to a list of URLs. - * @param array $urls List of SimpleUrls. - * @param string $frame Name of frame or index. - * @return array List of tagged URLs. - * @access private - */ - protected function tagUrlsWithFrame($urls, $frame) { - $tagged = array(); - foreach ($urls as $url) { - if (! $url->getTarget()) { - $url->setTarget($this->getPublicNameFromIndex($frame)); - } - $tagged[] = $url; - } - return $tagged; - } - - /** - * Finds a held form by button label. Will only - * search correctly built forms. - * @param SimpleSelector $selector Button finder. - * @return SimpleForm Form object containing - * the button. - * @access public - */ - function getFormBySubmit($selector) { - return $this->findForm('getFormBySubmit', $selector); - } - - /** - * Finds a held form by image using a selector. - * Will only search correctly built forms. The first - * form found either within the focused frame, or - * across frames, will be the one returned. - * @param SimpleSelector $selector Image finder. - * @return SimpleForm Form object containing - * the image. - * @access public - */ - function getFormByImage($selector) { - return $this->findForm('getFormByImage', $selector); - } - - /** - * Finds a held form by the form ID. A way of - * identifying a specific form when we have control - * of the HTML code. The first form found - * either within the focused frame, or across frames, - * will be the one returned. - * @param string $id Form label. - * @return SimpleForm Form object containing the matching ID. - * @access public - */ - function getFormById($id) { - return $this->findForm('getFormById', $id); - } - - /** - * General form finder. Will search all the frames or - * just the one in focus. - * @param string $method Method to use to find in a page. - * @param string $attribute Label, name or ID. - * @return SimpleForm Form object containing the matching ID. - * @access private - */ - protected function findForm($method, $attribute) { - if (is_integer($this->focus)) { - return $this->findFormInFrame( - $this->frames[$this->focus], - $this->focus, - $method, - $attribute); - } - for ($i = 0; $i < count($this->frames); $i++) { - $form = $this->findFormInFrame( - $this->frames[$i], - $i, - $method, - $attribute); - if ($form) { - return $form; - } - } - $null = null; - return $null; - } - - /** - * Finds a form in a page using a form finding method. Will - * also tag the form with the frame name it belongs in. - * @param SimplePage $page Page content of frame. - * @param integer $index Internal frame representation. - * @param string $method Method to use to find in a page. - * @param string $attribute Label, name or ID. - * @return SimpleForm Form object containing the matching ID. - * @access private - */ - protected function findFormInFrame($page, $index, $method, $attribute) { - $form = $this->frames[$index]->$method($attribute); - if (isset($form)) { - $form->setDefaultTarget($this->getPublicNameFromIndex($index)); - } - return $form; - } - - /** - * Sets a field on each form in which the field is - * available. - * @param SimpleSelector $selector Field finder. - * @param string $value Value to set field to. - * @return boolean True if value is valid. - * @access public - */ - function setField($selector, $value) { - if (is_integer($this->focus)) { - $this->frames[$this->focus]->setField($selector, $value); - } else { - for ($i = 0; $i < count($this->frames); $i++) { - $this->frames[$i]->setField($selector, $value); - } - } - } - - /** - * Accessor for a form element value within a page. - * @param SimpleSelector $selector Field finder. - * @return string/boolean A string if the field is - * present, false if unchecked - * and null if missing. - * @access public - */ - function getField($selector) { - for ($i = 0; $i < count($this->frames); $i++) { - $value = $this->frames[$i]->getField($selector); - if (isset($value)) { - return $value; - } - } - return null; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/http.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/http.php deleted file mode 100644 index 15b555c7..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/http.php +++ /dev/null @@ -1,628 +0,0 @@ -url = $url; - } - - /** - * Resource name. - * @return SimpleUrl Current url. - * @access protected - */ - function getUrl() { - return $this->url; - } - - /** - * Creates the first line which is the actual request. - * @param string $method HTTP request method, usually GET. - * @return string Request line content. - * @access protected - */ - protected function getRequestLine($method) { - return $method . ' ' . $this->url->getPath() . - $this->url->getEncodedRequest() . ' HTTP/1.0'; - } - - /** - * Creates the host part of the request. - * @return string Host line content. - * @access protected - */ - protected function getHostLine() { - $line = 'Host: ' . $this->url->getHost(); - if ($this->url->getPort()) { - $line .= ':' . $this->url->getPort(); - } - return $line; - } - - /** - * Opens a socket to the route. - * @param string $method HTTP request method, usually GET. - * @param integer $timeout Connection timeout. - * @return SimpleSocket New socket. - * @access public - */ - function createConnection($method, $timeout) { - $default_port = ('https' == $this->url->getScheme()) ? 443 : 80; - $socket = $this->createSocket( - $this->url->getScheme() ? $this->url->getScheme() : 'http', - $this->url->getHost(), - $this->url->getPort() ? $this->url->getPort() : $default_port, - $timeout); - if (! $socket->isError()) { - $socket->write($this->getRequestLine($method) . "\r\n"); - $socket->write($this->getHostLine() . "\r\n"); - $socket->write("Connection: close\r\n"); - } - return $socket; - } - - /** - * Factory for socket. - * @param string $scheme Protocol to use. - * @param string $host Hostname to connect to. - * @param integer $port Remote port. - * @param integer $timeout Connection timeout. - * @return SimpleSocket/SimpleSecureSocket New socket. - * @access protected - */ - protected function createSocket($scheme, $host, $port, $timeout) { - if (in_array($scheme, array('file'))) { - return new SimpleFileSocket($this->url); - } elseif (in_array($scheme, array('https'))) { - return new SimpleSecureSocket($host, $port, $timeout); - } else { - return new SimpleSocket($host, $port, $timeout); - } - } -} - -/** - * Creates HTTP headers for the end point of - * a HTTP request via a proxy server. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleProxyRoute extends SimpleRoute { - private $proxy; - private $username; - private $password; - - /** - * Stashes the proxy address. - * @param SimpleUrl $url URL as object. - * @param string $proxy Proxy URL. - * @param string $username Username for autentication. - * @param string $password Password for autentication. - * @access public - */ - function __construct($url, $proxy, $username = false, $password = false) { - parent::__construct($url); - $this->proxy = $proxy; - $this->username = $username; - $this->password = $password; - } - - /** - * Creates the first line which is the actual request. - * @param string $method HTTP request method, usually GET. - * @param SimpleUrl $url URL as object. - * @return string Request line content. - * @access protected - */ - function getRequestLine($method) { - $url = $this->getUrl(); - $scheme = $url->getScheme() ? $url->getScheme() : 'http'; - $port = $url->getPort() ? ':' . $url->getPort() : ''; - return $method . ' ' . $scheme . '://' . $url->getHost() . $port . - $url->getPath() . $url->getEncodedRequest() . ' HTTP/1.0'; - } - - /** - * Creates the host part of the request. - * @param SimpleUrl $url URL as object. - * @return string Host line content. - * @access protected - */ - function getHostLine() { - $host = 'Host: ' . $this->proxy->getHost(); - $port = $this->proxy->getPort() ? $this->proxy->getPort() : 8080; - return "$host:$port"; - } - - /** - * Opens a socket to the route. - * @param string $method HTTP request method, usually GET. - * @param integer $timeout Connection timeout. - * @return SimpleSocket New socket. - * @access public - */ - function createConnection($method, $timeout) { - $socket = $this->createSocket( - $this->proxy->getScheme() ? $this->proxy->getScheme() : 'http', - $this->proxy->getHost(), - $this->proxy->getPort() ? $this->proxy->getPort() : 8080, - $timeout); - if ($socket->isError()) { - return $socket; - } - $socket->write($this->getRequestLine($method) . "\r\n"); - $socket->write($this->getHostLine() . "\r\n"); - if ($this->username && $this->password) { - $socket->write('Proxy-Authorization: Basic ' . - base64_encode($this->username . ':' . $this->password) . - "\r\n"); - } - $socket->write("Connection: close\r\n"); - return $socket; - } -} - -/** - * HTTP request for a web page. Factory for - * HttpResponse object. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleHttpRequest { - private $route; - private $encoding; - private $headers; - private $cookies; - - /** - * Builds the socket request from the different pieces. - * These include proxy information, URL, cookies, headers, - * request method and choice of encoding. - * @param SimpleRoute $route Request route. - * @param SimpleFormEncoding $encoding Content to send with - * request. - * @access public - */ - function __construct($route, $encoding) { - $this->route = $route; - $this->encoding = $encoding; - $this->headers = array(); - $this->cookies = array(); - } - - /** - * Dispatches the content to the route's socket. - * @param integer $timeout Connection timeout. - * @return SimpleHttpResponse A response which may only have - * an error, but hopefully has a - * complete web page. - * @access public - */ - function fetch($timeout) { - $socket = $this->route->createConnection($this->encoding->getMethod(), $timeout); - if (! $socket->isError()) { - $this->dispatchRequest($socket, $this->encoding); - } - return $this->createResponse($socket); - } - - /** - * Sends the headers. - * @param SimpleSocket $socket Open socket. - * @param string $method HTTP request method, - * usually GET. - * @param SimpleFormEncoding $encoding Content to send with request. - * @access private - */ - protected function dispatchRequest($socket, $encoding) { - foreach ($this->headers as $header_line) { - $socket->write($header_line . "\r\n"); - } - if (count($this->cookies) > 0) { - $socket->write("Cookie: " . implode(";", $this->cookies) . "\r\n"); - } - $encoding->writeHeadersTo($socket); - $socket->write("\r\n"); - $encoding->writeTo($socket); - } - - /** - * Adds a header line to the request. - * @param string $header_line Text of full header line. - * @access public - */ - function addHeaderLine($header_line) { - $this->headers[] = $header_line; - } - - /** - * Reads all the relevant cookies from the - * cookie jar. - * @param SimpleCookieJar $jar Jar to read - * @param SimpleUrl $url Url to use for scope. - * @access public - */ - function readCookiesFromJar($jar, $url) { - $this->cookies = $jar->selectAsPairs($url); - } - - /** - * Wraps the socket in a response parser. - * @param SimpleSocket $socket Responding socket. - * @return SimpleHttpResponse Parsed response object. - * @access protected - */ - protected function createResponse($socket) { - $response = new SimpleHttpResponse( - $socket, - $this->route->getUrl(), - $this->encoding); - $socket->close(); - return $response; - } -} - -/** - * Collection of header lines in the response. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleHttpHeaders { - private $raw_headers; - private $response_code; - private $http_version; - private $mime_type; - private $location; - private $cookies; - private $authentication; - private $realm; - - /** - * Parses the incoming header block. - * @param string $headers Header block. - * @access public - */ - function __construct($headers) { - $this->raw_headers = $headers; - $this->response_code = false; - $this->http_version = false; - $this->mime_type = ''; - $this->location = false; - $this->cookies = array(); - $this->authentication = false; - $this->realm = false; - foreach (split("\r\n", $headers) as $header_line) { - $this->parseHeaderLine($header_line); - } - } - - /** - * Accessor for parsed HTTP protocol version. - * @return integer HTTP error code. - * @access public - */ - function getHttpVersion() { - return $this->http_version; - } - - /** - * Accessor for raw header block. - * @return string All headers as raw string. - * @access public - */ - function getRaw() { - return $this->raw_headers; - } - - /** - * Accessor for parsed HTTP error code. - * @return integer HTTP error code. - * @access public - */ - function getResponseCode() { - return (integer)$this->response_code; - } - - /** - * Returns the redirected URL or false if - * no redirection. - * @return string URL or false for none. - * @access public - */ - function getLocation() { - return $this->location; - } - - /** - * Test to see if the response is a valid redirect. - * @return boolean True if valid redirect. - * @access public - */ - function isRedirect() { - return in_array($this->response_code, array(301, 302, 303, 307)) && - (boolean)$this->getLocation(); - } - - /** - * Test to see if the response is an authentication - * challenge. - * @return boolean True if challenge. - * @access public - */ - function isChallenge() { - return ($this->response_code == 401) && - (boolean)$this->authentication && - (boolean)$this->realm; - } - - /** - * Accessor for MIME type header information. - * @return string MIME type. - * @access public - */ - function getMimeType() { - return $this->mime_type; - } - - /** - * Accessor for authentication type. - * @return string Type. - * @access public - */ - function getAuthentication() { - return $this->authentication; - } - - /** - * Accessor for security realm. - * @return string Realm. - * @access public - */ - function getRealm() { - return $this->realm; - } - - /** - * Writes new cookies to the cookie jar. - * @param SimpleCookieJar $jar Jar to write to. - * @param SimpleUrl $url Host and path to write under. - * @access public - */ - function writeCookiesToJar($jar, $url) { - foreach ($this->cookies as $cookie) { - $jar->setCookie( - $cookie->getName(), - $cookie->getValue(), - $url->getHost(), - $cookie->getPath(), - $cookie->getExpiry()); - } - } - - /** - * Called on each header line to accumulate the held - * data within the class. - * @param string $header_line One line of header. - * @access protected - */ - protected function parseHeaderLine($header_line) { - if (preg_match('/HTTP\/(\d+\.\d+)\s+(\d+)/i', $header_line, $matches)) { - $this->http_version = $matches[1]; - $this->response_code = $matches[2]; - } - if (preg_match('/Content-type:\s*(.*)/i', $header_line, $matches)) { - $this->mime_type = trim($matches[1]); - } - if (preg_match('/Location:\s*(.*)/i', $header_line, $matches)) { - $this->location = trim($matches[1]); - } - if (preg_match('/Set-cookie:(.*)/i', $header_line, $matches)) { - $this->cookies[] = $this->parseCookie($matches[1]); - } - if (preg_match('/WWW-Authenticate:\s+(\S+)\s+realm=\"(.*?)\"/i', $header_line, $matches)) { - $this->authentication = $matches[1]; - $this->realm = trim($matches[2]); - } - } - - /** - * Parse the Set-cookie content. - * @param string $cookie_line Text after "Set-cookie:" - * @return SimpleCookie New cookie object. - * @access private - */ - protected function parseCookie($cookie_line) { - $parts = split(";", $cookie_line); - $cookie = array(); - preg_match('/\s*(.*?)\s*=(.*)/', array_shift($parts), $cookie); - foreach ($parts as $part) { - if (preg_match('/\s*(.*?)\s*=(.*)/', $part, $matches)) { - $cookie[$matches[1]] = trim($matches[2]); - } - } - return new SimpleCookie( - $cookie[1], - trim($cookie[2]), - isset($cookie["path"]) ? $cookie["path"] : "", - isset($cookie["expires"]) ? $cookie["expires"] : false); - } -} - -/** - * Basic HTTP response. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleHttpResponse extends SimpleStickyError { - private $url; - private $encoding; - private $sent; - private $content; - private $headers; - - /** - * Constructor. Reads and parses the incoming - * content and headers. - * @param SimpleSocket $socket Network connection to fetch - * response text from. - * @param SimpleUrl $url Resource name. - * @param mixed $encoding Record of content sent. - * @access public - */ - function __construct($socket, $url, $encoding) { - parent::__construct(); - $this->url = $url; - $this->encoding = $encoding; - $this->sent = $socket->getSent(); - $this->content = false; - $raw = $this->readAll($socket); - if ($socket->isError()) { - $this->setError('Error reading socket [' . $socket->getError() . ']'); - return; - } - $this->parse($raw); - } - - /** - * Splits up the headers and the rest of the content. - * @param string $raw Content to parse. - * @access private - */ - protected function parse($raw) { - if (! $raw) { - $this->setError('Nothing fetched'); - $this->headers = new SimpleHttpHeaders(''); - } elseif ('file' == $this->url->getScheme()) { - $this->headers = new SimpleHttpHeaders(''); - $this->content = $raw; - } elseif (! strstr($raw, "\r\n\r\n")) { - $this->setError('Could not split headers from content'); - $this->headers = new SimpleHttpHeaders($raw); - } else { - list($headers, $this->content) = split("\r\n\r\n", $raw, 2); - $this->headers = new SimpleHttpHeaders($headers); - } - } - - /** - * Original request method. - * @return string GET, POST or HEAD. - * @access public - */ - function getMethod() { - return $this->encoding->getMethod(); - } - - /** - * Resource name. - * @return SimpleUrl Current url. - * @access public - */ - function getUrl() { - return $this->url; - } - - /** - * Original request data. - * @return mixed Sent content. - * @access public - */ - function getRequestData() { - return $this->encoding; - } - - /** - * Raw request that was sent down the wire. - * @return string Bytes actually sent. - * @access public - */ - function getSent() { - return $this->sent; - } - - /** - * Accessor for the content after the last - * header line. - * @return string All content. - * @access public - */ - function getContent() { - return $this->content; - } - - /** - * Accessor for header block. The response is the - * combination of this and the content. - * @return SimpleHeaders Wrapped header block. - * @access public - */ - function getHeaders() { - return $this->headers; - } - - /** - * Accessor for any new cookies. - * @return array List of new cookies. - * @access public - */ - function getNewCookies() { - return $this->headers->getNewCookies(); - } - - /** - * Reads the whole of the socket output into a - * single string. - * @param SimpleSocket $socket Unread socket. - * @return string Raw output if successful - * else false. - * @access private - */ - protected function readAll($socket) { - $all = ''; - while (! $this->isLastPacket($next = $socket->read())) { - $all .= $next; - } - return $all; - } - - /** - * Test to see if the packet from the socket is the - * last one. - * @param string $packet Chunk to interpret. - * @return boolean True if empty or EOF. - * @access private - */ - protected function isLastPacket($packet) { - if (is_string($packet)) { - return $packet === ''; - } - return ! $packet; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/invoker.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/invoker.php deleted file mode 100644 index ee310343..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/invoker.php +++ /dev/null @@ -1,139 +0,0 @@ -test_case = $test_case; - } - - /** - * Accessor for test case being run. - * @return SimpleTestCase Test case. - * @access public - */ - function getTestCase() { - return $this->test_case; - } - - /** - * Runs test level set up. Used for changing - * the mechanics of base test cases. - * @param string $method Test method to call. - * @access public - */ - function before($method) { - $this->test_case->before($method); - } - - /** - * Invokes a test method and buffered with setUp() - * and tearDown() calls. - * @param string $method Test method to call. - * @access public - */ - function invoke($method) { - $this->test_case->setUp(); - $this->test_case->$method(); - $this->test_case->tearDown(); - } - - /** - * Runs test level clean up. Used for changing - * the mechanics of base test cases. - * @param string $method Test method to call. - * @access public - */ - function after($method) { - $this->test_case->after($method); - } -} - -/** - * Do nothing decorator. Just passes the invocation - * straight through. - * @package SimpleTest - * @subpackage UnitTester - */ -class SimpleInvokerDecorator { - private $invoker; - - /** - * Stores the invoker to wrap. - * @param SimpleInvoker $invoker Test method runner. - */ - function __construct($invoker) { - $this->invoker = $invoker; - } - - /** - * Accessor for test case being run. - * @return SimpleTestCase Test case. - * @access public - */ - function getTestCase() { - return $this->invoker->getTestCase(); - } - - /** - * Runs test level set up. Used for changing - * the mechanics of base test cases. - * @param string $method Test method to call. - * @access public - */ - function before($method) { - $this->invoker->before($method); - } - - /** - * Invokes a test method and buffered with setUp() - * and tearDown() calls. - * @param string $method Test method to call. - * @access public - */ - function invoke($method) { - $this->invoker->invoke($method); - } - - /** - * Runs test level clean up. Used for changing - * the mechanics of base test cases. - * @param string $method Test method to call. - * @access public - */ - function after($method) { - $this->invoker->after($method); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/mock_objects.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/mock_objects.php deleted file mode 100644 index c3ed38b9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/mock_objects.php +++ /dev/null @@ -1,1630 +0,0 @@ -expected = $expected; - } - - /** - * Tests the assertion. True if correct. - * @param array $parameters Comparison values. - * @return boolean True if correct. - * @access public - */ - function test($parameters) { - if (! is_array($this->expected)) { - return true; - } - if (count($this->expected) != count($parameters)) { - return false; - } - for ($i = 0; $i < count($this->expected); $i++) { - if (! $this->testParameter($parameters[$i], $this->expected[$i])) { - return false; - } - } - return true; - } - - /** - * Tests an individual parameter. - * @param mixed $parameter Value to test. - * @param mixed $expected Comparison value. - * @return boolean True if expectation - * fulfilled. - * @access private - */ - protected function testParameter($parameter, $expected) { - $comparison = $this->coerceToExpectation($expected); - return $comparison->test($parameter); - } - - /** - * Returns a human readable test message. - * @param array $comparison Incoming parameter list. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($parameters) { - if ($this->test($parameters)) { - return "Expectation of " . count($this->expected) . - " arguments of [" . $this->renderArguments($this->expected) . - "] is correct"; - } else { - return $this->describeDifference($this->expected, $parameters); - } - } - - /** - * Message to display if expectation differs from - * the parameters actually received. - * @param array $expected Expected parameters as list. - * @param array $parameters Actual parameters received. - * @return string Description of difference. - * @access private - */ - protected function describeDifference($expected, $parameters) { - if (count($expected) != count($parameters)) { - return "Expected " . count($expected) . - " arguments of [" . $this->renderArguments($expected) . - "] but got " . count($parameters) . - " arguments of [" . $this->renderArguments($parameters) . "]"; - } - $messages = array(); - for ($i = 0; $i < count($expected); $i++) { - $comparison = $this->coerceToExpectation($expected[$i]); - if (! $comparison->test($parameters[$i])) { - $messages[] = "parameter " . ($i + 1) . " with [" . - $comparison->overlayMessage($parameters[$i], $this->getDumper()) . "]"; - } - } - return "Parameter expectation differs at " . implode(" and ", $messages); - } - - /** - * Creates an identical expectation if the - * object/value is not already some type - * of expectation. - * @param mixed $expected Expected value. - * @return SimpleExpectation Expectation object. - * @access private - */ - protected function coerceToExpectation($expected) { - if (SimpleExpectation::isExpectation($expected)) { - return $expected; - } - return new IdenticalExpectation($expected); - } - - /** - * Renders the argument list as a string for - * messages. - * @param array $args Incoming arguments. - * @return string Simple description of type and value. - * @access private - */ - protected function renderArguments($args) { - $descriptions = array(); - if (is_array($args)) { - foreach ($args as $arg) { - $dumper = new SimpleDumper(); - $descriptions[] = $dumper->describeValue($arg); - } - } - return implode(', ', $descriptions); - } -} - -/** - * Confirms that the number of calls on a method is as expected. - * @package SimpleTest - * @subpackage MockObjects - */ -class CallCountExpectation extends SimpleExpectation { - private $method; - private $count; - - /** - * Stashes the method and expected count for later - * reporting. - * @param string $method Name of method to confirm against. - * @param integer $count Expected number of calls. - * @param string $message Custom error message. - */ - function __construct($method, $count, $message = '%s') { - $this->method = $method; - $this->count = $count; - parent::__construct($message); - } - - /** - * Tests the assertion. True if correct. - * @param integer $compare Measured call count. - * @return boolean True if expected. - * @access public - */ - function test($compare) { - return ($this->count == $compare); - } - - /** - * Reports the comparison. - * @param integer $compare Measured call count. - * @return string Message to show. - * @access public - */ - function testMessage($compare) { - return 'Expected call count for [' . $this->method . - '] was [' . $this->count . - '] got [' . $compare . ']'; - } -} - -/** - * Confirms that the number of calls on a method is as expected. - * @package SimpleTest - * @subpackage MockObjects - */ -class MinimumCallCountExpectation extends SimpleExpectation { - private $method; - private $count; - - /** - * Stashes the method and expected count for later - * reporting. - * @param string $method Name of method to confirm against. - * @param integer $count Minimum number of calls. - * @param string $message Custom error message. - */ - function __construct($method, $count, $message = '%s') { - $this->method = $method; - $this->count = $count; - parent::__construct($message); - } - - /** - * Tests the assertion. True if correct. - * @param integer $compare Measured call count. - * @return boolean True if enough. - * @access public - */ - function test($compare) { - return ($this->count <= $compare); - } - - /** - * Reports the comparison. - * @param integer $compare Measured call count. - * @return string Message to show. - * @access public - */ - function testMessage($compare) { - return 'Minimum call count for [' . $this->method . - '] was [' . $this->count . - '] got [' . $compare . ']'; - } -} - -/** - * Confirms that the number of calls on a method is as expected. - * @package SimpleTest - * @subpackage MockObjects - */ -class MaximumCallCountExpectation extends SimpleExpectation { - private $method; - private $count; - - /** - * Stashes the method and expected count for later - * reporting. - * @param string $method Name of method to confirm against. - * @param integer $count Minimum number of calls. - * @param string $message Custom error message. - */ - function __construct($method, $count, $message = '%s') { - $this->method = $method; - $this->count = $count; - parent::__construct($message); - } - - /** - * Tests the assertion. True if correct. - * @param integer $compare Measured call count. - * @return boolean True if not over. - * @access public - */ - function test($compare) { - return ($this->count >= $compare); - } - - /** - * Reports the comparison. - * @param integer $compare Measured call count. - * @return string Message to show. - * @access public - */ - function testMessage($compare) { - return 'Maximum call count for [' . $this->method . - '] was [' . $this->count . - '] got [' . $compare . ']'; - } -} - -/** - * Retrieves method actions by searching the - * parameter lists until an expected match is found. - * @package SimpleTest - * @subpackage MockObjects - */ -class SimpleSignatureMap { - private $map; - - /** - * Creates an empty call map. - * @access public - */ - function __construct() { - $this->map = array(); - } - - /** - * Stashes a reference against a method call. - * @param array $parameters Array of arguments (including wildcards). - * @param mixed $action Reference placed in the map. - * @access public - */ - function add($parameters, $action) { - $place = count($this->map); - $this->map[$place] = array(); - $this->map[$place]['params'] = new ParametersExpectation($parameters); - $this->map[$place]['content'] = $action; - } - - /** - * Searches the call list for a matching parameter - * set. Returned by reference. - * @param array $parameters Parameters to search by - * without wildcards. - * @return object Object held in the first matching - * slot, otherwise null. - * @access public - */ - function &findFirstAction($parameters) { - $slot = $this->findFirstSlot($parameters); - if (isset($slot) && isset($slot['content'])) { - return $slot['content']; - } - $null = null; - return $null; - } - - /** - * Searches the call list for a matching parameter - * set. True if successful. - * @param array $parameters Parameters to search by - * without wildcards. - * @return boolean True if a match is present. - * @access public - */ - function isMatch($parameters) { - return ($this->findFirstSlot($parameters) != null); - } - - /** - * Compares the incoming parameters with the - * internal expectation. Uses the incoming $test - * to dispatch the test message. - * @param SimpleTestCase $test Test to dispatch to. - * @param array $parameters The actual calling arguments. - * @param string $message The message to overlay. - * @access public - */ - function test($test, $parameters, $message) { - } - - /** - * Searches the map for a matching item. - * @param array $parameters Parameters to search by - * without wildcards. - * @return array Reference to slot or null. - * @access private - */ - function &findFirstSlot($parameters) { - $count = count($this->map); - for ($i = 0; $i < $count; $i++) { - if ($this->map[$i]["params"]->test($parameters)) { - return $this->map[$i]; - } - } - $null = null; - return $null; - } -} - -/** - * Allows setting of actions against call signatures either - * at a specific time, or always. Specific time settings - * trump lasting ones, otherwise the most recently added - * will mask an earlier match. - * @package SimpleTest - * @subpackage MockObjects - */ -class SimpleCallSchedule { - private $wildcard = MOCK_ANYTHING; - private $always; - private $at; - - /** - * Sets up an empty response schedule. - * Creates an empty call map. - */ - function __construct() { - $this->always = array(); - $this->at = array(); - } - - /** - * Stores an action against a signature that - * will always fire unless masked by a time - * specific one. - * @param string $method Method name. - * @param array $args Calling parameters. - * @param SimpleAction $action Actually simpleByValue, etc. - * @access public - */ - function register($method, $args, $action) { - $args = $this->replaceWildcards($args); - $method = strtolower($method); - if (! isset($this->always[$method])) { - $this->always[$method] = new SimpleSignatureMap(); - } - $this->always[$method]->add($args, $action); - } - - /** - * Stores an action against a signature that - * will fire at a specific time in the future. - * @param integer $step delay of calls to this method, - * 0 is next. - * @param string $method Method name. - * @param array $args Calling parameters. - * @param SimpleAction $action Actually SimpleByValue, etc. - * @access public - */ - function registerAt($step, $method, $args, $action) { - $args = $this->replaceWildcards($args); - $method = strtolower($method); - if (! isset($this->at[$method])) { - $this->at[$method] = array(); - } - if (! isset($this->at[$method][$step])) { - $this->at[$method][$step] = new SimpleSignatureMap(); - } - $this->at[$method][$step]->add($args, $action); - } - - /** - * Sets up an expectation on the argument list. - * @param string $method Method to test. - * @param array $args Bare arguments or list of - * expectation objects. - * @param string $message Failure message. - */ - function expectArguments($method, $args, $message) { - $args = $this->replaceWildcards($args); - $message .= Mock::getExpectationLine(); - $this->expected_args[strtolower($method)] = - new ParametersExpectation($args, $message); - - } - - /** - * Actually carry out the action stored previously, - * if the parameters match. - * @param integer $step Time of call. - * @param string $method Method name. - * @param array $args The parameters making up the - * rest of the call. - * @return mixed The result of the action. - * @access public. - */ - function &respond($step, $method, $args) { - $method = strtolower($method); - if (isset($this->at[$method][$step])) { - if ($this->at[$method][$step]->isMatch($args)) { - $action = $this->at[$method][$step]->findFirstAction($args); - if (isset($action)) { - return $action->act(); - } - } - } - if (isset($this->always[$method])) { - $action = $this->always[$method]->findFirstAction($args); - if (isset($action)) { - return $action->act(); - } - } - $null = null; - return $null; - } - - /** - * Replaces wildcard matches with wildcard - * expectations in the argument list. - * @param array $args Raw argument list. - * @return array Argument list with - * expectations. - * @access private - */ - protected function replaceWildcards($args) { - if ($args === false) { - return false; - } - for ($i = 0; $i < count($args); $i++) { - if ($args[$i] === $this->wildcard) { - $args[$i] = new AnythingExpectation(); - } - } - return $args; - } -} - -/** - * A type of SimpleMethodAction. - * Stashes a value for returning later. Follows usual - * PHP5 semantics of objects being returned by reference. - * @package SimpleTest - * @subpackage MockObjects - */ -class SimpleReturn { - private $value; - - /** - * Stashes it for later. - * @param mixed $value You need to clone objects - * if you want copy semantics - * for these. - * @access public - */ - function __construct($value) { - $this->value = $value; - } - - /** - * Returns the value stored earlier. - * @return mixed Whatever was stashed. - * @access public - */ - function act() { - return $this->value; - } -} - -/** - * A type of SimpleMethodAction. - * Stashes a reference for returning later. - * @package SimpleTest - * @subpackage MockObjects - */ -class SimpleByReference { - private $reference; - - /** - * Stashes it for later. - * @param mixed $reference Actual PHP4 style reference. - * @access public - */ - function __construct(&$reference) { - $this->reference = &$reference; - } - - /** - * Returns the reference stored earlier. - * @return mixed Whatever was stashed. - * @access public - */ - function &act() { - return $this->reference; - } -} - -/** - * A type of SimpleMethodAction. - * Stashes a value for returning later. - * @package SimpleTest - * @subpackage MockObjects - */ -class SimpleByValue { - private $value; - - /** - * Stashes it for later. - * @param mixed $value You need to clone objects - * if you want copy semantics - * for these. - * @access public - */ - function __construct($value) { - $this->value = $value; - } - - /** - * Returns the value stored earlier. - * @return mixed Whatever was stashed. - * @access public - */ - function &act() { - $dummy = $this->value; - return $dummy; - } -} - -/** - * A type of SimpleMethodAction. - * Stashes an exception for throwing later. - * @package SimpleTest - * @subpackage MockObjects - */ -class SimpleThrower { - private $exception; - - /** - * Stashes it for later. - * @param Exception $exception The exception object to throw. - * @access public - */ - function __construct($exception) { - $this->exception = $exception; - } - - /** - * Throws the exceptins stashed earlier. - * @access public - */ - function act() { - throw $this->exception; - } -} - -/** - * A type of SimpleMethodAction. - * Stashes an error for emitting later. - * @package SimpleTest - * @subpackage MockObjects - */ -class SimpleErrorThrower { - private $error; - private $severity; - - /** - * Stashes an error to throw later. - * @param string $error Error message. - * @param integer $severity PHP error constant, e.g E_USER_ERROR. - * @access public - */ - function __construct($error, $severity) { - $this->error = $error; - $this->severity = $severity; - } - - /** - * Triggers the stashed error. - * @access public - */ - function &act() { - trigger_error($this->error, $this->severity); - $null = null; - return $null; - } -} - -/** - * A base class or delegate that extends an - * empty collection of methods that can have their - * return values set and expectations made of the - * calls upon them. The mock will assert the - * expectations against it's attached test case in - * addition to the server stub behaviour or returning - * preprogrammed responses. - * @package SimpleTest - * @subpackage MockObjects - */ -class SimpleMock { - private $actions; - private $expectations; - private $wildcard = MOCK_ANYTHING; - private $is_strict = true; - private $call_counts; - private $expected_counts; - private $max_counts; - private $expected_args; - private $expected_args_at; - - /** - * Creates an empty action list and expectation list. - * All call counts are set to zero. - * @access public - */ - function SimpleMock() { - $this->actions = new SimpleCallSchedule(); - $this->expectations = new SimpleCallSchedule(); - $this->call_counts = array(); - $this->expected_counts = array(); - $this->max_counts = array(); - $this->expected_args = array(); - $this->expected_args_at = array(); - $this->getCurrentTestCase()->tell($this); - } - - /** - * Disables a name check when setting expectations. - * This hack is needed for the partial mocks. - * @access public - */ - function disableExpectationNameChecks() { - $this->is_strict = false; - } - - /** - * Finds currently running test. - * @return SimpeTestCase Current test case. - * @access protected - */ - protected function getCurrentTestCase() { - return SimpleTest::getContext()->getTest(); - } - - /** - * Die if bad arguments array is passed. - * @param mixed $args The arguments value to be checked. - * @param string $task Description of task attempt. - * @return boolean Valid arguments - * @access private - */ - protected function checkArgumentsIsArray($args, $task) { - if (! is_array($args)) { - trigger_error( - "Cannot $task as \$args parameter is not an array", - E_USER_ERROR); - } - } - - /** - * Triggers a PHP error if the method is not part - * of this object. - * @param string $method Name of method. - * @param string $task Description of task attempt. - * @access protected - */ - protected function dieOnNoMethod($method, $task) { - if ($this->is_strict && ! method_exists($this, $method)) { - trigger_error( - "Cannot $task as no ${method}() in class " . get_class($this), - E_USER_ERROR); - } - } - - /** - * Replaces wildcard matches with wildcard - * expectations in the argument list. - * @param array $args Raw argument list. - * @return array Argument list with - * expectations. - * @access private - */ - function replaceWildcards($args) { - if ($args === false) { - return false; - } - for ($i = 0; $i < count($args); $i++) { - if ($args[$i] === $this->wildcard) { - $args[$i] = new AnythingExpectation(); - } - } - return $args; - } - - /** - * Adds one to the call count of a method. - * @param string $method Method called. - * @param array $args Arguments as an array. - * @access protected - */ - protected function addCall($method, $args) { - if (! isset($this->call_counts[$method])) { - $this->call_counts[$method] = 0; - } - $this->call_counts[$method]++; - } - - /** - * Fetches the call count of a method so far. - * @param string $method Method name called. - * @return integer Number of calls so far. - * @access public - */ - function getCallCount($method) { - $this->dieOnNoMethod($method, "get call count"); - $method = strtolower($method); - if (! isset($this->call_counts[$method])) { - return 0; - } - return $this->call_counts[$method]; - } - - /** - * Sets a return for a parameter list that will - * be passed on by all calls to this method that match. - * @param string $method Method name. - * @param mixed $value Result of call by value/handle. - * @param array $args List of parameters to match - * including wildcards. - * @access public - */ - function returns($method, $value, $args = false) { - $this->dieOnNoMethod($method, "set return"); - $this->actions->register($method, $args, new SimpleReturn($value)); - } - - /** - * Sets a return for a parameter list that will - * be passed only when the required call count - * is reached. - * @param integer $timing Number of calls in the future - * to which the result applies. If - * not set then all calls will return - * the value. - * @param string $method Method name. - * @param mixed $value Result of call passed. - * @param array $args List of parameters to match - * including wildcards. - * @access public - */ - function returnsAt($timing, $method, $value, $args = false) { - $this->dieOnNoMethod($method, "set return value sequence"); - $this->actions->registerAt($timing, $method, $args, new SimpleReturn($value)); - } - - /** - * Sets a return for a parameter list that will - * be passed by value for all calls to this method. - * @param string $method Method name. - * @param mixed $value Result of call passed by value. - * @param array $args List of parameters to match - * including wildcards. - * @access public - */ - function setReturnValue($method, $value, $args = false) { - $this->dieOnNoMethod($method, "set return value"); - $this->actions->register($method, $args, new SimpleByValue($value)); - } - - /** - * Sets a return for a parameter list that will - * be passed by value only when the required call count - * is reached. - * @param integer $timing Number of calls in the future - * to which the result applies. If - * not set then all calls will return - * the value. - * @param string $method Method name. - * @param mixed $value Result of call passed by value. - * @param array $args List of parameters to match - * including wildcards. - * @access public - */ - function setReturnValueAt($timing, $method, $value, $args = false) { - $this->dieOnNoMethod($method, "set return value sequence"); - $this->actions->registerAt($timing, $method, $args, new SimpleByValue($value)); - } - - /** - * Sets a return for a parameter list that will - * be passed by reference for all calls. - * @param string $method Method name. - * @param mixed $reference Result of the call will be this object. - * @param array $args List of parameters to match - * including wildcards. - * @access public - */ - function setReturnReference($method, &$reference, $args = false) { - $this->dieOnNoMethod($method, "set return reference"); - $this->actions->register($method, $args, new SimpleByReference($reference)); - } - - /** - * Sets a return for a parameter list that will - * be passed by value only when the required call count - * is reached. - * @param integer $timing Number of calls in the future - * to which the result applies. If - * not set then all calls will return - * the value. - * @param string $method Method name. - * @param mixed $reference Result of the call will be this object. - * @param array $args List of parameters to match - * including wildcards. - * @access public - */ - function setReturnReferenceAt($timing, $method, &$reference, $args = false) { - $this->dieOnNoMethod($method, "set return reference sequence"); - $this->actions->registerAt($timing, $method, $args, new SimpleByReference($reference)); - } - - /** - * Sets up an expected call with a set of - * expected parameters in that call. All - * calls will be compared to these expectations - * regardless of when the call is made. - * @param string $method Method call to test. - * @param array $args Expected parameters for the call - * including wildcards. - * @param string $message Overridden message. - * @access public - */ - function expect($method, $args, $message = '%s') { - $this->dieOnNoMethod($method, 'set expected arguments'); - $this->checkArgumentsIsArray($args, 'set expected arguments'); - $this->expectations->expectArguments($method, $args, $message); - $args = $this->replaceWildcards($args); - $message .= Mock::getExpectationLine(); - $this->expected_args[strtolower($method)] = - new ParametersExpectation($args, $message); - } - - /** - * Sets up an expected call with a set of - * expected parameters in that call. The - * expected call count will be adjusted if it - * is set too low to reach this call. - * @param integer $timing Number of calls in the future at - * which to test. Next call is 0. - * @param string $method Method call to test. - * @param array $args Expected parameters for the call - * including wildcards. - * @param string $message Overridden message. - * @access public - */ - function expectAt($timing, $method, $args, $message = '%s') { - $this->dieOnNoMethod($method, 'set expected arguments at time'); - $this->checkArgumentsIsArray($args, 'set expected arguments at time'); - $args = $this->replaceWildcards($args); - if (! isset($this->expected_args_at[$timing])) { - $this->expected_args_at[$timing] = array(); - } - $method = strtolower($method); - $message .= Mock::getExpectationLine(); - $this->expected_args_at[$timing][$method] = - new ParametersExpectation($args, $message); - } - - /** - * Sets an expectation for the number of times - * a method will be called. The tally method - * is used to check this. - * @param string $method Method call to test. - * @param integer $count Number of times it should - * have been called at tally. - * @param string $message Overridden message. - * @access public - */ - function expectCallCount($method, $count, $message = '%s') { - $this->dieOnNoMethod($method, 'set expected call count'); - $message .= Mock::getExpectationLine(); - $this->expected_counts[strtolower($method)] = - new CallCountExpectation($method, $count, $message); - } - - /** - * Sets the number of times a method may be called - * before a test failure is triggered. - * @param string $method Method call to test. - * @param integer $count Most number of times it should - * have been called. - * @param string $message Overridden message. - * @access public - */ - function expectMaximumCallCount($method, $count, $message = '%s') { - $this->dieOnNoMethod($method, 'set maximum call count'); - $message .= Mock::getExpectationLine(); - $this->max_counts[strtolower($method)] = - new MaximumCallCountExpectation($method, $count, $message); - } - - /** - * Sets the number of times to call a method to prevent - * a failure on the tally. - * @param string $method Method call to test. - * @param integer $count Least number of times it should - * have been called. - * @param string $message Overridden message. - * @access public - */ - function expectMinimumCallCount($method, $count, $message = '%s') { - $this->dieOnNoMethod($method, 'set minimum call count'); - $message .= Mock::getExpectationLine(); - $this->expected_counts[strtolower($method)] = - new MinimumCallCountExpectation($method, $count, $message); - } - - /** - * Convenience method for barring a method - * call. - * @param string $method Method call to ban. - * @param string $message Overridden message. - * @access public - */ - function expectNever($method, $message = '%s') { - $this->expectMaximumCallCount($method, 0, $message); - } - - /** - * Convenience method for a single method - * call. - * @param string $method Method call to track. - * @param array $args Expected argument list or - * false for any arguments. - * @param string $message Overridden message. - * @access public - */ - function expectOnce($method, $args = false, $message = '%s') { - $this->expectCallCount($method, 1, $message); - if ($args !== false) { - $this->expect($method, $args, $message); - } - } - - /** - * Convenience method for requiring a method - * call. - * @param string $method Method call to track. - * @param array $args Expected argument list or - * false for any arguments. - * @param string $message Overridden message. - * @access public - */ - function expectAtLeastOnce($method, $args = false, $message = '%s') { - $this->expectMinimumCallCount($method, 1, $message); - if ($args !== false) { - $this->expect($method, $args, $message); - } - } - - /** - * Sets up a trigger to throw an exception upon the - * method call. - * @param string $method Method name to throw on. - */ - function throwOn($method, $exception = false, $args = false) { - $this->dieOnNoMethod($method, "throw on"); - $this->actions->register($method, $args, - new SimpleThrower($exception ? $exception : new Exception())); - } - - /** - * Sets up a trigger to throw an exception upon the - * method call. - */ - function throwAt($timing, $method, $exception = false, $args = false) { - $this->dieOnNoMethod($method, "throw at"); - $this->actions->registerAt($timing, $method, $args, - new SimpleThrower($exception ? $exception : new Exception())); - } - - /** - * Sets up a trigger to throw an error upon the - * method call. - */ - function errorOn($method, $error = 'A mock error', $args = false, $severity = E_USER_ERROR) { - $this->dieOnNoMethod($method, "error on"); - $this->actions->register($method, $args, new SimpleErrorThrower($error, $severity)); - } - - /** - * Sets up a trigger to throw an error upon the - * method call. - */ - function errorAt($timing, $method, $error = 'A mock error', $args = false, $severity = E_USER_ERROR) { - $this->dieOnNoMethod($method, "error at"); - $this->actions->registerAt($timing, $method, $args, new SimpleErrorThrower($error, $severity)); - } - - /** - * Receives event from unit test that the current - * test method has finished. Totals up the call - * counts and triggers a test assertion if a test - * is present for expected call counts. - * @param string $test_method Current method name. - * @param SimpleTestCase $test Test to send message to. - * @access public - */ - function atTestEnd($test_method, &$test) { - foreach ($this->expected_counts as $method => $expectation) { - $test->assert($expectation, $this->getCallCount($method)); - } - foreach ($this->max_counts as $method => $expectation) { - if ($expectation->test($this->getCallCount($method))) { - $test->assert($expectation, $this->getCallCount($method)); - } - } - } - - /** - * Returns the expected value for the method name - * and checks expectations. Will generate any - * test assertions as a result of expectations - * if there is a test present. - * @param string $method Name of method to simulate. - * @param array $args Arguments as an array. - * @return mixed Stored return. - * @access private - */ - function &invoke($method, $args) { - $method = strtolower($method); - $step = $this->getCallCount($method); - $this->addCall($method, $args); - $this->checkExpectations($method, $args, $step); - $was = $this->disableEStrict(); - try { - $result = &$this->emulateCall($method, $args, $step); - } catch (Exception $e) { - $this->restoreEStrict($was); - throw $e; - } - $this->restoreEStrict($was); - return $result; - } - - /** - * Finds the return value matching the incoming - * arguments. If there is no matching value found - * then an error is triggered. - * @param string $method Method name. - * @param array $args Calling arguments. - * @param integer $step Current position in the - * call history. - * @return mixed Stored return or other action. - * @access protected - */ - protected function &emulateCall($method, $args, $step) { - return $this->actions->respond($step, $method, $args); - } - - /** - * Tests the arguments against expectations. - * @param string $method Method to check. - * @param array $args Argument list to match. - * @param integer $timing The position of this call - * in the call history. - * @access private - */ - protected function checkExpectations($method, $args, $timing) { - $test = $this->getCurrentTestCase(); - if (isset($this->max_counts[$method])) { - if (! $this->max_counts[$method]->test($timing + 1)) { - $test->assert($this->max_counts[$method], $timing + 1); - } - } - if (isset($this->expected_args_at[$timing][$method])) { - $test->assert( - $this->expected_args_at[$timing][$method], - $args, - "Mock method [$method] at [$timing] -> %s"); - } elseif (isset($this->expected_args[$method])) { - $test->assert( - $this->expected_args[$method], - $args, - "Mock method [$method] -> %s"); - } - } - - private function disableEStrict() { - $was = error_reporting(); - error_reporting($was & ~E_STRICT); - return $was; - } - - private function restoreEStrict($was) { - error_reporting($was); - } -} - -/** - * Static methods only service class for code generation of - * mock objects. - * @package SimpleTest - * @subpackage MockObjects - */ -class Mock { - - /** - * Factory for mock object classes. - * @access public - */ - function __construct() { - trigger_error('Mock factory methods are static.'); - } - - /** - * Clones a class' interface and creates a mock version - * that can have return values and expectations set. - * @param string $class Class to clone. - * @param string $mock_class New class name. Default is - * the old name with "Mock" - * prepended. - * @param array $methods Additional methods to add beyond - * those in the cloned class. Use this - * to emulate the dynamic addition of - * methods in the cloned class or when - * the class hasn't been written yet.sta - * @access public - */ - static function generate($class, $mock_class = false, $methods = false) { - $generator = new MockGenerator($class, $mock_class); - return @$generator->generateSubclass($methods); - } - - /** - * Generates a version of a class with selected - * methods mocked only. Inherits the old class - * and chains the mock methods of an aggregated - * mock object. - * @param string $class Class to clone. - * @param string $mock_class New class name. - * @param array $methods Methods to be overridden - * with mock versions. - * @access public - */ - static function generatePartial($class, $mock_class, $methods) { - $generator = new MockGenerator($class, $mock_class); - return @$generator->generatePartial($methods); - } - - /** - * Uses a stack trace to find the line of an assertion. - * @access public - */ - static function getExpectationLine() { - $trace = new SimpleStackTrace(array('expect')); - return $trace->traceMethod(); - } -} - -/** - * Service class for code generation of mock objects. - * @package SimpleTest - * @subpackage MockObjects - */ -class MockGenerator { - private $class; - private $mock_class; - private $mock_base; - private $reflection; - - /** - * Builds initial reflection object. - * @param string $class Class to be mocked. - * @param string $mock_class New class with identical interface, - * but no behaviour. - */ - function __construct($class, $mock_class) { - $this->class = $class; - $this->mock_class = $mock_class; - if (! $this->mock_class) { - $this->mock_class = 'Mock' . $this->class; - } - $this->mock_base = SimpleTest::getMockBaseClass(); - $this->reflection = new SimpleReflection($this->class); - } - - /** - * Clones a class' interface and creates a mock version - * that can have return values and expectations set. - * @param array $methods Additional methods to add beyond - * those in th cloned class. Use this - * to emulate the dynamic addition of - * methods in the cloned class or when - * the class hasn't been written yet. - * @access public - */ - function generate($methods) { - if (! $this->reflection->classOrInterfaceExists()) { - return false; - } - $mock_reflection = new SimpleReflection($this->mock_class); - if ($mock_reflection->classExistsSansAutoload()) { - return false; - } - $code = $this->createClassCode($methods ? $methods : array()); - return eval("$code return \$code;"); - } - - /** - * Subclasses a class and overrides every method with a mock one - * that can have return values and expectations set. Chains - * to an aggregated SimpleMock. - * @param array $methods Additional methods to add beyond - * those in the cloned class. Use this - * to emulate the dynamic addition of - * methods in the cloned class or when - * the class hasn't been written yet. - * @access public - */ - function generateSubclass($methods) { - if (! $this->reflection->classOrInterfaceExists()) { - return false; - } - $mock_reflection = new SimpleReflection($this->mock_class); - if ($mock_reflection->classExistsSansAutoload()) { - return false; - } - if ($this->reflection->isInterface() || $this->reflection->hasFinal()) { - $code = $this->createClassCode($methods ? $methods : array()); - return eval("$code return \$code;"); - } else { - $code = $this->createSubclassCode($methods ? $methods : array()); - return eval("$code return \$code;"); - } - } - - /** - * Generates a version of a class with selected - * methods mocked only. Inherits the old class - * and chains the mock methods of an aggregated - * mock object. - * @param array $methods Methods to be overridden - * with mock versions. - * @access public - */ - function generatePartial($methods) { - if (! $this->reflection->classExists($this->class)) { - return false; - } - $mock_reflection = new SimpleReflection($this->mock_class); - if ($mock_reflection->classExistsSansAutoload()) { - trigger_error('Partial mock class [' . $this->mock_class . '] already exists'); - return false; - } - $code = $this->extendClassCode($methods); - return eval("$code return \$code;"); - } - - /** - * The new mock class code as a string. - * @param array $methods Additional methods. - * @return string Code for new mock class. - * @access private - */ - protected function createClassCode($methods) { - $implements = ''; - $interfaces = $this->reflection->getInterfaces(); - if (function_exists('spl_classes')) { - $interfaces = array_diff($interfaces, array('Traversable')); - } - if (count($interfaces) > 0) { - $implements = 'implements ' . implode(', ', $interfaces); - } - $code = "class " . $this->mock_class . " extends " . $this->mock_base . " $implements {\n"; - $code .= " function " . $this->mock_class . "() {\n"; - $code .= " \$this->" . $this->mock_base . "();\n"; - $code .= " }\n"; - if (in_array('__construct', $this->reflection->getMethods())) { - $code .= " function __construct() {\n"; - $code .= " \$this->" . $this->mock_base . "();\n"; - $code .= " }\n"; - } - $code .= $this->createHandlerCode($methods); - $code .= "}\n"; - return $code; - } - - /** - * The new mock class code as a string. The mock will - * be a subclass of the original mocked class. - * @param array $methods Additional methods. - * @return string Code for new mock class. - * @access private - */ - protected function createSubclassCode($methods) { - $code = "class " . $this->mock_class . " extends " . $this->class . " {\n"; - $code .= " public \$mock;\n"; - $code .= $this->addMethodList(array_merge($methods, $this->reflection->getMethods())); - $code .= "\n"; - $code .= " function " . $this->mock_class . "() {\n"; - $code .= " \$this->mock = new " . $this->mock_base . "();\n"; - $code .= " \$this->mock->disableExpectationNameChecks();\n"; - $code .= " }\n"; - $code .= $this->chainMockReturns(); - $code .= $this->chainMockExpectations(); - $code .= $this->chainThrowMethods(); - $code .= $this->overrideMethods($this->reflection->getMethods()); - $code .= $this->createNewMethodCode($methods); - $code .= "}\n"; - return $code; - } - - /** - * The extension class code as a string. The class - * composites a mock object and chains mocked methods - * to it. - * @param array $methods Mocked methods. - * @return string Code for a new class. - * @access private - */ - protected function extendClassCode($methods) { - $code = "class " . $this->mock_class . " extends " . $this->class . " {\n"; - $code .= " protected \$mock;\n"; - $code .= $this->addMethodList($methods); - $code .= "\n"; - $code .= " function " . $this->mock_class . "() {\n"; - $code .= " \$this->mock = new " . $this->mock_base . "();\n"; - $code .= " \$this->mock->disableExpectationNameChecks();\n"; - $code .= " }\n"; - $code .= $this->chainMockReturns(); - $code .= $this->chainMockExpectations(); - $code .= $this->chainThrowMethods(); - $code .= $this->overrideMethods($methods); - $code .= "}\n"; - return $code; - } - - /** - * Creates code within a class to generate replaced - * methods. All methods call the invoke() handler - * with the method name and the arguments in an - * array. - * @param array $methods Additional methods. - * @access private - */ - protected function createHandlerCode($methods) { - $code = ''; - $methods = array_merge($methods, $this->reflection->getMethods()); - foreach ($methods as $method) { - if ($this->isConstructor($method)) { - continue; - } - $mock_reflection = new SimpleReflection($this->mock_base); - if (in_array($method, $mock_reflection->getMethods())) { - continue; - } - $code .= " " . $this->reflection->getSignature($method) . " {\n"; - $code .= " \$args = func_get_args();\n"; - $code .= " \$result = &\$this->invoke(\"$method\", \$args);\n"; - $code .= " return \$result;\n"; - $code .= " }\n"; - } - return $code; - } - - /** - * Creates code within a class to generate a new - * methods. All methods call the invoke() handler - * on the internal mock with the method name and - * the arguments in an array. - * @param array $methods Additional methods. - * @access private - */ - protected function createNewMethodCode($methods) { - $code = ''; - foreach ($methods as $method) { - if ($this->isConstructor($method)) { - continue; - } - $mock_reflection = new SimpleReflection($this->mock_base); - if (in_array($method, $mock_reflection->getMethods())) { - continue; - } - $code .= " " . $this->reflection->getSignature($method) . " {\n"; - $code .= " \$args = func_get_args();\n"; - $code .= " \$result = &\$this->mock->invoke(\"$method\", \$args);\n"; - $code .= " return \$result;\n"; - $code .= " }\n"; - } - return $code; - } - - /** - * Tests to see if a special PHP method is about to - * be stubbed by mistake. - * @param string $method Method name. - * @return boolean True if special. - * @access private - */ - protected function isConstructor($method) { - return in_array( - strtolower($method), - array('__construct', '__destruct')); - } - - /** - * Creates a list of mocked methods for error checking. - * @param array $methods Mocked methods. - * @return string Code for a method list. - * @access private - */ - protected function addMethodList($methods) { - return " protected \$mocked_methods = array('" . - implode("', '", array_map('strtolower', $methods)) . - "');\n"; - } - - /** - * Creates code to abandon the expectation if not mocked. - * @param string $alias Parameter name of method name. - * @return string Code for bail out. - * @access private - */ - protected function bailOutIfNotMocked($alias) { - $code = " if (! in_array(strtolower($alias), \$this->mocked_methods)) {\n"; - $code .= " trigger_error(\"Method [$alias] is not mocked\");\n"; - $code .= " \$null = null;\n"; - $code .= " return \$null;\n"; - $code .= " }\n"; - return $code; - } - - /** - * Creates source code for chaining to the composited - * mock object. - * @return string Code for mock set up. - * @access private - */ - protected function chainMockReturns() { - $code = " function returns(\$method, \$value, \$args = false) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->returns(\$method, \$value, \$args);\n"; - $code .= " }\n"; - $code .= " function returnsAt(\$timing, \$method, \$value, \$args = false) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->returnsAt(\$timing, \$method, \$value, \$args);\n"; - $code .= " }\n"; - $code .= " function setReturnValue(\$method, \$value, \$args = false) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->setReturnValue(\$method, \$value, \$args);\n"; - $code .= " }\n"; - $code .= " function setReturnValueAt(\$timing, \$method, \$value, \$args = false) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->setReturnValueAt(\$timing, \$method, \$value, \$args);\n"; - $code .= " }\n"; - $code .= " function setReturnReference(\$method, &\$ref, \$args = false) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->setReturnReference(\$method, \$ref, \$args);\n"; - $code .= " }\n"; - $code .= " function setReturnReferenceAt(\$timing, \$method, &\$ref, \$args = false) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->setReturnReferenceAt(\$timing, \$method, \$ref, \$args);\n"; - $code .= " }\n"; - return $code; - } - - /** - * Creates source code for chaining to an aggregated - * mock object. - * @return string Code for expectations. - * @access private - */ - protected function chainMockExpectations() { - $code = " function expect(\$method, \$args = false, \$msg = '%s') {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->expect(\$method, \$args, \$msg);\n"; - $code .= " }\n"; - $code .= " function expectAt(\$timing, \$method, \$args = false, \$msg = '%s') {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->expectAt(\$timing, \$method, \$args, \$msg);\n"; - $code .= " }\n"; - $code .= " function expectCallCount(\$method, \$count) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->expectCallCount(\$method, \$count, \$msg = '%s');\n"; - $code .= " }\n"; - $code .= " function expectMaximumCallCount(\$method, \$count, \$msg = '%s') {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->expectMaximumCallCount(\$method, \$count, \$msg = '%s');\n"; - $code .= " }\n"; - $code .= " function expectMinimumCallCount(\$method, \$count, \$msg = '%s') {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->expectMinimumCallCount(\$method, \$count, \$msg = '%s');\n"; - $code .= " }\n"; - $code .= " function expectNever(\$method) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->expectNever(\$method);\n"; - $code .= " }\n"; - $code .= " function expectOnce(\$method, \$args = false, \$msg = '%s') {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->expectOnce(\$method, \$args, \$msg);\n"; - $code .= " }\n"; - $code .= " function expectAtLeastOnce(\$method, \$args = false, \$msg = '%s') {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->expectAtLeastOnce(\$method, \$args, \$msg);\n"; - $code .= " }\n"; - return $code; - } - - /** - * Adds code for chaining the throw methods. - * @return string Code for chains. - * @access private - */ - protected function chainThrowMethods() { - $code = " function throwOn(\$method, \$exception = false, \$args = false) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->throwOn(\$method, \$exception, \$args);\n"; - $code .= " }\n"; - $code .= " function throwAt(\$timing, \$method, \$exception = false, \$args = false) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->throwAt(\$timing, \$method, \$exception, \$args);\n"; - $code .= " }\n"; - $code .= " function errorOn(\$method, \$error = 'A mock error', \$args = false, \$severity = E_USER_ERROR) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->errorOn(\$method, \$error, \$args, \$severity);\n"; - $code .= " }\n"; - $code .= " function errorAt(\$timing, \$method, \$error = 'A mock error', \$args = false, \$severity = E_USER_ERROR) {\n"; - $code .= $this->bailOutIfNotMocked("\$method"); - $code .= " \$this->mock->errorAt(\$timing, \$method, \$error, \$args, \$severity);\n"; - $code .= " }\n"; - return $code; - } - - /** - * Creates source code to override a list of methods - * with mock versions. - * @param array $methods Methods to be overridden - * with mock versions. - * @return string Code for overridden chains. - * @access private - */ - protected function overrideMethods($methods) { - $code = ""; - foreach ($methods as $method) { - if ($this->isConstructor($method)) { - continue; - } - $code .= " " . $this->reflection->getSignature($method) . " {\n"; - $code .= " \$args = func_get_args();\n"; - $code .= " \$result = &\$this->mock->invoke(\"$method\", \$args);\n"; - $code .= " return \$result;\n"; - $code .= " }\n"; - } - return $code; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/README b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/README deleted file mode 100644 index 3cf668ee..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/README +++ /dev/null @@ -1,26 +0,0 @@ -HOW TO MAKE A PACKAGE - -1. First make sure PEAR_PackageFileManager is installed; -(version 1.2.0 was used) - -$ pear install PEAR_PackageFileManager - -2. Edit the simpletest/packages/pear_package_create.php file (see comments for what -needs changing). - -3. Run the simpletest/packages/pear_package_create.php script, piping the output -to the file you want to create e.g.; - -$ ./pear_package_create.php > package.xml - -4. Copy the package.xml to the root of Simpletest. - -5. From the root of Simpletest type; - -$ pear package package.xml - -This creates the package zip - -6. Install with; - -$ pear install SimpleTest-x.x.x.tgz \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/build_tarball.sh b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/build_tarball.sh deleted file mode 100644 index 943a347f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/build_tarball.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/sh - -# Builds project release. -# -cd ../.. - -NAME=simpletest_`cat simpletest/VERSION`.tar.gz -FILES=(simpletest/README \ - simpletest/VERSION \ - simpletest/LICENSE \ - simpletest/HELP_MY_TESTS_DONT_WORK_ANYMORE \ - simpletest/authentication.php \ - simpletest/autorun.php \ - simpletest/browser.php \ - simpletest/collector.php \ - simpletest/compatibility.php \ - simpletest/cookies.php \ - simpletest/default_reporter.php \ - simpletest/detached.php \ - simpletest/dumper.php \ - simpletest/eclipse.php \ - simpletest/encoding.php \ - simpletest/errors.php \ - simpletest/exceptions.php \ - simpletest/expectation.php \ - simpletest/form.php \ - simpletest/frames.php \ - simpletest/http.php \ - simpletest/invoker.php \ - simpletest/mock_objects.php \ - simpletest/page.php \ - simpletest/parser.php \ - simpletest/reflection_php4.php \ - simpletest/reflection_php5.php \ - simpletest/remote.php \ - simpletest/reporter.php \ - simpletest/scorer.php \ - simpletest/selector.php \ - simpletest/shell_tester.php \ - simpletest/simpletest.php \ - simpletest/socket.php \ - simpletest/tag.php \ - simpletest/test_case.php \ - simpletest/unit_tester.php \ - simpletest/url.php \ - simpletest/user_agent.php \ - simpletest/web_tester.php \ - simpletest/xml.php \ - simpletest/extensions/pear_test_case.php \ - simpletest/extensions/phpunit_test_case.php \ - simpletest/extensions/testdox.php \ - simpletest/extensions/testdox/test.php \ - simpletest/test/acceptance_test.php \ - simpletest/test/adapter_test.php \ - simpletest/test/all_tests.php \ - simpletest/test/authentication_test.php \ - simpletest/test/bad_test_suite.php \ - simpletest/test/browser_test.php \ - simpletest/test/collector_test.php \ - simpletest/test/command_line_test.php \ - simpletest/test/compatibility_test.php \ - simpletest/test/cookies_test.php \ - simpletest/test/detached_test.php \ - simpletest/test/dumper_test.php \ - simpletest/test/eclipse_test.php \ - simpletest/test/encoding_test.php \ - simpletest/test/errors_test.php \ - simpletest/test/exceptions_test.php \ - simpletest/test/expectation_test.php \ - simpletest/test/form_test.php \ - simpletest/test/frames_test.php \ - simpletest/test/http_test.php \ - simpletest/test/interfaces_test.php \ - simpletest/test/live_test.php \ - simpletest/test/mock_objects_test.php \ - simpletest/test/page_test.php \ - simpletest/test/parse_error_test.php \ - simpletest/test/parser_test.php \ - simpletest/test/reflection_php4_test.php \ - simpletest/test/reflection_php5_test.php \ - simpletest/test/remote_test.php \ - simpletest/test/shell_test.php \ - simpletest/test/shell_tester_test.php \ - simpletest/test/simpletest_test.php \ - simpletest/test/socket_test.php \ - simpletest/test/tag_test.php \ - simpletest/test/test_with_parse_error.php \ - simpletest/test/unit_tests.php \ - simpletest/test/unit_tester_test.php \ - simpletest/test/autorun_test.php \ - simpletest/test/url_test.php \ - simpletest/test/user_agent_test.php \ - simpletest/test/visual_test.php \ - simpletest/test/web_tester_test.php \ - simpletest/test/xml_test.php \ - simpletest/test/support/collector/collectable.1 \ - simpletest/test/support/collector/collectable.2 \ - simpletest/test/support/upload_sample.txt \ - simpletest/test/support/supplementary_upload_sample.txt \ - simpletest/test/support/latin1_sample \ - simpletest/test/support/spl_examples.php \ - simpletest/test/support/empty_test_file.php \ - simpletest/test/support/test1.php \ - simpletest/docs/en/docs.css \ - simpletest/docs/en/index.html \ - simpletest/docs/en/overview.html \ - simpletest/docs/en/unit_test_documentation.html \ - simpletest/docs/en/group_test_documentation.html \ - simpletest/docs/en/mock_objects_documentation.html \ - simpletest/docs/en/partial_mocks_documentation.html \ - simpletest/docs/en/reporter_documentation.html \ - simpletest/docs/en/expectation_documentation.html \ - simpletest/docs/en/web_tester_documentation.html \ - simpletest/docs/en/form_testing_documentation.html \ - simpletest/docs/en/authentication_documentation.html \ - simpletest/docs/en/browser_documentation.html \ - simpletest/docs/fr/docs.css \ - simpletest/docs/fr/index.html \ - simpletest/docs/fr/overview.html \ - simpletest/docs/fr/unit_test_documentation.html \ - simpletest/docs/fr/group_test_documentation.html \ - simpletest/docs/fr/server_stubs_documentation.html \ - simpletest/docs/fr/mock_objects_documentation.html \ - simpletest/docs/fr/partial_mocks_documentation.html \ - simpletest/docs/fr/reporter_documentation.html \ - simpletest/docs/fr/expectation_documentation.html \ - simpletest/docs/fr/web_tester_documentation.html \ - simpletest/docs/fr/form_testing_documentation.html \ - simpletest/docs/fr/authentication_documentation.html \ - simpletest/docs/fr/browser_documentation.html) - -tar -zcf $NAME ${FILES[*]} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/bundled_docs.xslt b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/bundled_docs.xslt deleted file mode 100644 index c1946111..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/bundled_docs.xslt +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - - - - - - - - - - <xsl:value-of select="//long_title"/> - - - - - - - - - -
- -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
( pages) -
-
-
- - -

-
- - - This page... -
    - -
-
- - - References and related information... -
    - -
-
- - - - - - -
-            
-                
-            
-        
-
- - - - - - - - -
-            
-                
-            
-        
-
- - -
-            
-                
-            
-        
-
- - -
-            
-        
-
- - -

- - - - -

- -
- - - - - - - - - - - - - - - - .html - - - - - - - - - - - - - - - - -
  • -
    - - - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/bundled_map.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/bundled_map.xml deleted file mode 100644 index b5b950fa..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/bundled_map.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/extension.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/extension.xml deleted file mode 100644 index a897ab11..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/extension.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - Name of the extension to build - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/generate_package.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/generate_package.php deleted file mode 100644 index dd433db0..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/generate_package.php +++ /dev/null @@ -1,54 +0,0 @@ - 'svn', - 'simpleoutput' => true, - 'baseinstalldir' => 'simpletest', - 'packagedirectory' => dirname(__FILE__) . '/../', - 'clearcontents' => true, - 'ignore' => array('TODO.xml', 'VERSION', 'docs/', 'tutorials/', 'packages/', '.svn'), - 'dir_roles' => array( - 'test' => 'test' - ) -); - -$packagexml = PEAR_PackageFileManager2::importOptions($packagefile, $options); -$packagexml->setPackageType('php'); -$packagexml->setPackage('simpletest'); -$packagexml->setSummary('PHP Unit Tester'); -$packagexml->setDescription("Unit testing, mock objects and web testing framework for PHP"); - -// update this! do we have a default channel server? -$packagexml->setChannel('pear.php.net'); -$packagexml->setUri('http://os.coretxt.net.nz/simpletest-1.1'); - -$notes = file_get_contents(dirname(__FILE__).'/../README'); -$packagexml->setNotes($notes); - -$packagexml->setPhpDep('5.0.5'); -$packagexml->setPearinstallerDep('1.4.0'); -$packagexml->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.0'); -$packagexml->addMaintainer('lead', 'lastcraft', 'Marcus Baker', 'marcus@lastcraft.com'); -$packagexml->setLicense('LGPL', 'http://www.gnu.org/licenses/lgpl-2.1.html'); - -preg_match("/([0-9\.]+)([a-z]+)/", file_get_contents(dirname(__FILE__).'/../VERSION'), $version); -$packagexml->setAPIVersion($version[1]); -$packagexml->setReleaseVersion($version[1]); -$packagexml->setReleaseStability($version[2]); -$packagexml->setAPIStability($version[2]); - -$packagexml->addRelease(); -$packagexml->generateContents(); - - -if (isset($_GET['make']) || (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make')) { - $packagexml->writePackageFile(); -} else { - $packagexml->debugPackageFile(); -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/lastcraft.xslt b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/lastcraft.xslt deleted file mode 100644 index e655b7dc..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/lastcraft.xslt +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - - - - - - - - - - - - <xsl:value-of select="//long_title"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - -
    - - -
    - - LastCraft Home Page - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
    • - - - - -
    • -
      -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - -
    ( pages) -
    -
    -
    - - -
    -
    -

    -
    - -
    -
    - -
    -
    -
    -
    - - - This page... -
      - -
    -
    - - - Related... -
      - -
    -
    - - - - - - -
    -            
    -                
    -            
    -        
    -
    - - - - - - - - -
    -            
    -                
    -            
    -        
    -
    - - -
    -            
    -        
    -
    - - -

    - - -

    - -

    - -
    - - - - - - -

    - News: - -

    -
    - - - - - - - - - .php - - - - - - - - - - - - - - - - -
  • -
    - - - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_bundled_docs.sh b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_bundled_docs.sh deleted file mode 100644 index 6245ff4c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_bundled_docs.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -xsltproc bundled_docs.xslt ../docs/source/en/simple_test.xml > ../docs/en/index.html -xsltproc bundled_docs.xslt ../docs/source/en/overview.xml > ../docs/en/overview.html -xsltproc bundled_docs.xslt ../docs/source/en/unit_test_documentation.xml > ../docs/en/unit_test_documentation.html -xsltproc bundled_docs.xslt ../docs/source/en/group_test_documentation.xml > ../docs/en/group_test_documentation.html -xsltproc bundled_docs.xslt ../docs/source/en/mock_objects_documentation.xml > ../docs/en/mock_objects_documentation.html -xsltproc bundled_docs.xslt ../docs/source/en/partial_mocks_documentation.xml > ../docs/en/partial_mocks_documentation.html -xsltproc bundled_docs.xslt ../docs/source/en/reporter_documentation.xml > ../docs/en/reporter_documentation.html -xsltproc bundled_docs.xslt ../docs/source/en/expectation_documentation.xml > ../docs/en/expectation_documentation.html -xsltproc bundled_docs.xslt ../docs/source/en/web_tester_documentation.xml > ../docs/en/web_tester_documentation.html -xsltproc bundled_docs.xslt ../docs/source/en/form_testing_documentation.xml > ../docs/en/form_testing_documentation.html -xsltproc bundled_docs.xslt ../docs/source/en/authentication_documentation.xml > ../docs/en/authentication_documentation.html -xsltproc bundled_docs.xslt ../docs/source/en/browser_documentation.xml > ../docs/en/browser_documentation.html -xsltproc bundled_docs.xslt ../docs/source/fr/simple_test.xml > ../docs/fr/index.html -xsltproc bundled_docs.xslt ../docs/source/fr/overview.xml > ../docs/fr/overview.html -xsltproc bundled_docs.xslt ../docs/source/fr/unit_test_documentation.xml > ../docs/fr/unit_test_documentation.html -xsltproc bundled_docs.xslt ../docs/source/fr/group_test_documentation.xml > ../docs/fr/group_test_documentation.html -xsltproc bundled_docs.xslt ../docs/source/fr/mock_objects_documentation.xml > ../docs/fr/mock_objects_documentation.html -xsltproc bundled_docs.xslt ../docs/source/fr/partial_mocks_documentation.xml > ../docs/fr/partial_mocks_documentation.html -xsltproc bundled_docs.xslt ../docs/source/fr/reporter_documentation.xml > ../docs/fr/reporter_documentation.html -xsltproc bundled_docs.xslt ../docs/source/fr/expectation_documentation.xml > ../docs/fr/expectation_documentation.html -xsltproc bundled_docs.xslt ../docs/source/fr/web_tester_documentation.xml > ../docs/fr/web_tester_documentation.html -xsltproc bundled_docs.xslt ../docs/source/fr/form_testing_documentation.xml > ../docs/fr/form_testing_documentation.html -xsltproc bundled_docs.xslt ../docs/source/fr/authentication_documentation.xml > ../docs/fr/authentication_documentation.html -xsltproc bundled_docs.xslt ../docs/source/fr/browser_documentation.xml > ../docs/fr/browser_documentation.html diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_bundled_docs_with_xalan.sh b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_bundled_docs_with_xalan.sh deleted file mode 100644 index cfc6de35..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_bundled_docs_with_xalan.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -Xalan -o ../docs/en/index.html ../docs/source/en/simple_test.xml bundled_docs.xslt -Xalan -o ../docs/en/overview.html ../docs/source/en/overview.xml bundled_docs.xslt -Xalan -o ../docs/en/unit_test_documentation.html ../docs/source/en/unit_test_documentation.xml bundled_docs.xslt -Xalan -o ../docs/en/group_test_documentation.html ../docs/source/en/group_test_documentation.xml bundled_docs.xslt -Xalan -o ../docs/en/mock_objects_documentation.html ../docs/source/en/mock_objects_documentation.xml bundled_docs.xslt -Xalan -o ../docs/en/partial_mocks_documentation.html ../docs/source/en/partial_mocks_documentation.xml bundled_docs.xslt -Xalan -o ../docs/en/reporter_documentation.html ../docs/source/en/reporter_documentation.xml bundled_docs.xslt -Xalan -o ../docs/en/expectation_documentation.html ../docs/source/en/expectation_documentation.xml bundled_docs.xslt -Xalan -o ../docs/en/web_tester_documentation.html ../docs/source/en/web_tester_documentation.xml bundled_docs.xslt -Xalan -o ../docs/en/form_testing_documentation.html ../docs/source/en/form_testing_documentation.xml bundled_docs.xslt -Xalan -o ../docs/en/authentication_documentation.html ../docs/source/en/authentication_documentation.xml bundled_docs.xslt -Xalan -o ../docs/en/browser_documentation.html ../docs/source/en/browser_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/index.html ../docs/source/fr/simple_test.xml bundled_docs.xslt -Xalan -o ../docs/fr/overview.html ../docs/source/fr/overview.xml bundled_docs.xslt -Xalan -o ../docs/fr/unit_test_documentation.html ../docs/source/fr/unit_test_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/group_test_documentation.html ../docs/source/fr/group_test_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/server_stubs_documentation.html ../docs/source/fr/server_stubs_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/mock_objects_documentation.html ../docs/source/fr/mock_objects_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/partial_mocks_documentation.html ../docs/source/fr/partial_mocks_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/reporter_documentation.html ../docs/source/fr/reporter_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/expectation_documentation.html ../docs/source/fr/expectation_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/web_tester_documentation.html ../docs/source/fr/web_tester_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/form_testing_documentation.html ../docs/source/fr/form_testing_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/authentication_documentation.html ../docs/source/fr/authentication_documentation.xml bundled_docs.xslt -Xalan -o ../docs/fr/browser_documentation.html ../docs/source/fr/browser_documentation.xml bundled_docs.xslt diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_lastcraft_docs.sh b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_lastcraft_docs.sh deleted file mode 100644 index 0eaf7421..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_lastcraft_docs.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -php transform_all_lastcraft.php lastcraft.xslt ../docs/source/en/ ../docs/lastcraft/ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_phpdoc_docs.sh b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_phpdoc_docs.sh deleted file mode 100644 index fd56f334..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/make_phpdoc_docs.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -#DEST_DIR=../docs/pkg -if [ ! -d ../tutorials ] -then - mkdir ../tutorials -fi -if [ ! -d ../tutorials/SimpleTest ] -then - mkdir ../tutorials/SimpleTest -fi -DEST_DIR=../tutorials/SimpleTest - -rm ${DEST_DIR}/*.pkg -cp ../docs/pkg/SimpleTest.pkg.ini ${DEST_DIR} - -#Xalan -o ${DEST_DIR}/QuickStart.pkg ../docs/source/en/simple_test.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/SimpleTest.pkg ../docs/source/en/overview.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/UnitTestCase.pkg ../docs/source/en/unit_test_documentation.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/GroupTests.pkg ../docs/source/en/group_test_documentation.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/MockObjects.pkg ../docs/source/en/mock_objects_documentation.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/PartialMock.pkg ../docs/source/en/partial_mocks_documentation.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/Reporting.pkg ../docs/source/en/reporter_documentation.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/Expectations.pkg ../docs/source/en/expectation_documentation.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/WebTester.pkg ../docs/source/en/web_tester_documentation.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/FormTesting.pkg ../docs/source/en/form_testing_documentation.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/Authentication.pkg ../docs/source/en/authentication_documentation.xml phpdoc_docs.xslt -Xalan -o ${DEST_DIR}/Browser.pkg ../docs/source/en/browser_documentation.xml phpdoc_docs.xslt - -# some cleanup work -cd $DEST_DIR - -# remove XML declaration -for f in $(ls *.pkg --color=none) -do - grep -v -e '^ tmp.pkg - mv tmp.pkg $f -done - -# fix overview title -cat SimpleTest.pkg | sed -e 's/Overview/Simple Test PHP Unit Test Framework/g;s/<\([A-Za-z0-9]*\)\/>/<\1><\/\1>/g' > tmp.pkg -mv tmp.pkg SimpleTest.pkg diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/onpk/map_onpk.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/onpk/map_onpk.xml deleted file mode 100644 index b4f6b41c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/onpk/map_onpk.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/onpk/onpk.xslt b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/onpk/onpk.xslt deleted file mode 100644 index 20530669..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/onpk/onpk.xslt +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - - - - - - - - - - <xsl:value-of select="//long_title"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
      - -
    • - - - -
    • -
      -
    -
    -
    - - - - - - - - - - - - -
    - -

    -
    - -
    -
    -
    - - - Cette page... -
      - -
    -
    - - - Pour aller plus loin... -
      - -
    -
    - - -
    - -
    -
    - - - - - - - - - - - - - - -
    -			
    -				
    -			
    -		
    -
    - - - - - - - - -

    - - -

    - -

    - -
    - - - - - - - - - - - - - .php - - - - - - - - - - - - - - - - -
  • -
    - - - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/onpk/transform_all_onpk.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/onpk/transform_all_onpk.php deleted file mode 100644 index c80350a6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/onpk/transform_all_onpk.php +++ /dev/null @@ -1,32 +0,0 @@ -"; - } else { - echo "erreur pour ".$destination." : ".xslt_error($xh)."
    "; - } - - xslt_free($xsltProcessor); -} -closedir($dir); -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/package.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/package.xml deleted file mode 100644 index f82c599e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/package.xml +++ /dev/null @@ -1,710 +0,0 @@ - - - - SimpleTest - Unit testing, mock objects and web testing framework for PHP. - The heart of SimpleTest is a testing framework built around test case classes. -These are written as extensions of base test case classes, each extended with -methods that actually contain test code. Top level test scripts then invoke -the run() methods on every one of these test cases in order. Each test -method is written to invoke various assertions that the developer expects to -be true such as assertEqual(). If the expectation is correct, then a -successful result is dispatched to the observing test reporter, but any -failure triggers an alert and a description of the mismatch. - -These tools are designed for the developer. Tests are written in the PHP -language itself more or less as the application itself is built. The advantage -of using PHP itself as the testing language is that there are no new languages -to learn, testing can start straight away, and the developer can test any part -of the code. Basically, all parts that can be accessed by the application code -can also be accessed by the test code if they are in the same language. - - - lastcraft - Marcus Baker - marcus@lastcraft.com - lead - - - jsweat - Jason Sweat - jsweat_php@yahoo.com - helper - - - hfuecks - Harry Fuecks - hfuecks@phppatterns.com - helper - - - - 0.9.4 - 2004-02-20 - The Open Group Test Suite License - beta - This is the final version of the PHP unit and web testing tool before the -stable release 1.0 version. It features many improvements to the HTML form -parsing and exposure of the underlying web browser. There are also numerous -minor improvements and bug fixes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.9.4 - 2004-02-20 - The Open Group Test Suite License - beta - This is the final version of the PHP unit and web testing tool before the -stable release 1.0 version. It features many improvements to the HTML form -parsing and exposure of the underlying web browser. There are also numerous -minor improvements and bug fixes. - - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/pear_package_create.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/pear_package_create.php deleted file mode 100644 index 2b5b7ffb..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/pear_package_create.php +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env php -q -'lastcraft','role'=>'lead','name'=>'Marcus Baker', 'email'=>'marcus@lastcraft.com'), - array ('handle'=>'jsweat','role'=>'helper','name'=>'Jason Sweat', 'email'=>'jsweat_php@yahoo.com'), - array ('handle'=>'hfuecks','role'=>'helper','name'=>'Harry Fuecks', 'email'=>'hfuecks@phppatterns.com'), -); -/*---------------------------------------------------------------------------*/ - -/** -* Code starts here -*/ -require_once('PEAR/PackageFileManager.php'); -$PPFM = new PEAR_PackageFileManager; - -if (version_compare(phpversion(), '4.3.0', '<') || - php_sapi_name() == 'cgi') { - define('STDOUT', fopen('php://stdout', 'w')); - define('STDERR', fopen('php://stderr', 'w')); - register_shutdown_function( - create_function('', 'fclose(STDOUT); fclose(STDERR); return true;')); -} - -/** -* A giant array to configure the PackageFileManager. For the "roles" see -* http://pear.php.net/manual/en/developers.packagedef.php -*/ -$options = array( - 'baseinstalldir' => 'simpletest', - 'version' => $version, - 'packagedirectory' => $packagedir, - 'outputdirectory' => $packagedir, - 'pathtopackagefile' => $packagedir, - 'state' => $state, - 'summary' => $shortDesc, - 'description' => $longDesc, - 'filelistgenerator' => 'file', - 'notes' => $releaseNotes, - 'package' => 'SimpleTest', - 'license' => 'The Open Group Test Suite License', - - 'dir_roles' => array( - 'docs' => 'doc', - 'test' => 'test', - 'extensions' => 'php', - //'tutorials' => 'doc', - //'tutorials/SimpleTest' => 'doc', - //'ui' => 'php', - //'ui/css' => 'data', - //'ui/img' => 'data', - //'ui/js' => 'data', - //'ui/js/tests' => 'test', - ), - 'exceptions' => - array( - 'HELP_MY_TESTS_DONT_WORK_ANYMORE' => 'doc', - 'LICENSE' => 'doc', - 'README' => 'doc', - 'TODO' => 'doc', - 'VERSION' => 'doc', - ), - 'ignore' => - array( - "$packagedir/packages", - "$packagedir/ui", - ), - ); - -$status = $PPFM->setOptions($options); - -if (PEAR::isError($status)) { - fwrite (STDERR,$status->getMessage()); - exit; -} - -foreach ( $maintainers as $maintainer ) { - $PPFM->addMaintainer( - $maintainer['handle'], - $maintainer['role'], - $maintainer['name'], - $maintainer['email'] ); -} - -// Adds a dependency of PHP 4.2.3+ -$status = $PPFM->addDependency('php', '4.2.3', 'ge', 'php'); -if (PEAR::isError($status)) { - fwrite (STDERR,$status->getMessage()); - exit; -} - -// hack (apparently) -$PPFM->addRole('tpl', 'php'); -$PPFM->addRole('png', 'php'); -$PPFM->addRole('gif', 'php'); -$PPFM->addRole('jpg', 'php'); -$PPFM->addRole('css', 'php'); -$PPFM->addRole('js', 'php'); -$PPFM->addRole('ini', 'php'); -$PPFM->addRole('inc', 'php'); -$PPFM->addRole('afm', 'php'); -$PPFM->addRole('pkg', 'doc'); -$PPFM->addRole('cls', 'doc'); -$PPFM->addRole('proc', 'doc'); -$PPFM->addRole('sh', 'script'); - -ob_start(); -$status = $PPFM->writePackageFile(false); -$output = ob_get_contents(); -ob_end_clean(); - -// Hacks to handle PPFM output -$start = strpos ($output,"getMessage()); -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/phpdoc_docs.xslt b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/phpdoc_docs.xslt deleted file mode 100644 index 6d091504..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/phpdoc_docs.xslt +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - - - - - - - - - - - - <![CDATA[ - - - - ]]> - - - - - - - - - - - {@id } - <xsl:value-of select="@title"/> - - - - - - - - - - - - <xsl:value-of select="h2"/> - - - - - - - - - .html - - - - } - - - - - - - - - - - - - - - - - - - - - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.ini b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.ini deleted file mode 100644 index 87676800..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.ini +++ /dev/null @@ -1,92 +0,0 @@ -;; phpDocumentor parse configuration file -;; -;; This file is designed to cut down on repetitive typing on the command-line or web interface -;; You can copy this file to create a number of configuration files that can be used with the -;; command-line switch -c, as in phpdoc -c default.ini or phpdoc -c myini.ini. The web -;; interface will automatically generate a list of .ini files that can be used. -;; -;; default.ini is used to generate the online manual at http://www.phpdoc.org/docs -;; -;; ALL .ini files must be in the user subdirectory of phpDocumentor with an extension of .ini -;; -;; Copyright 2002, Greg Beaver -;; -;; WARNING: do not change the name of any command-line parameters, phpDocumentor will ignore them - -[Parse Data] -;; title of all the documentation -;; legal values: any string -title = SimpleTest API Documentation - -;; parse files that start with a . like .bash_profile -;; legal values: true, false -hidden = false - -;; show elements marked @access private in documentation by setting this to on -;; legal values: on, off -parseprivate = off - -;; parse with javadoc-like description (first sentence is always the short description) -;; legal values: on, off -javadocdesc = off - -;; add any custom @tags separated by commas here -;; legal values: any legal tagname separated by commas. -;customtags = mytag1,mytag2 - -;; This is only used by the XML:DocBook/peardoc2 converter -defaultcategoryname = Documentation - -;; what is the main package? -;; legal values: alphanumeric string plus - and _ -defaultpackagename = SimpleTest - -;; output any parsing information? set to on for cron jobs -;; legal values: on -;quiet = on - -;; parse a PEAR-style repository. Do not turn this on if your project does -;; not have a parent directory named "pear" -;; legal values: on/off -;pear = on - -;; where should the documentation be written? -;; legal values: a legal path -target = /home/groups/s/si/simpletest/htdocs/api - -;; limit output to the specified packages, even if others are parsed -;; legal values: package names separated by commas -;packageoutput = package1,package2 - -;; comma-separated list of files to parse -;; legal values: paths separated by commas -;filename = /path/to/file1,/path/to/file2,fileincurrentdirectory - -;; comma-separated list of directories to parse -;; legal values: directory paths separated by commas -;directory = /path1,/path2,.,..,subdirectory -;directory = /home/jeichorn/cvs/pear -directory = /home/groups/s/si/simpletest/simpletest_doc_target - -;; template base directory (the equivalent directory of /phpDocumentor) -;templatebase = /path/to/my/templates - -;; comma-separated list of files, directories or wildcards ? and * (any wildcard) to ignore -;; legal values: any wildcard strings separated by commas -;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/ -;ignore = templates_c/,*HTML/default/*,spec/ -ignore = docs/,packages/,test/ - -;; comma-separated list of Converters to use in outputformat:Convertername:templatedirectory format -;; legal values: HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib, -;; HTML:frames:earthli, -;; HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de, -;; HTML:frames:DOM/phphtmllib,HTML:frames:DOM/earthli -;; HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS -;; PDF:default:default,CHM:default:default,XML:DocBook/peardoc2:default -;output=HTML:frames:earthli,HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib,HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de,HTML:frames:DOM/earthli,HTML:frames:DOM/phphtmllib,HTML:frames:phpedit,HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS,CHM:default:default,PDF:default:default -output=HTML:frames:DOM/earthlisf - -;; turn this option on if you want highlighted source code for every file -;; legal values: on/off -sourcecode = off diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/index.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/index.php deleted file mode 100644 index 9c8a6e64..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/index.php +++ /dev/null @@ -1,54 +0,0 @@ -destination(dirname(__FILE__).'/map.xml'); - - if (!empty($destination)) { - $page = file_get_contents(dirname(__FILE__).'/template.html'); - - $page = str_replace('KEYWORDS', $source->keywords(), $page); - $page = str_replace('TITLE', $source->title(), $page); - $page = str_replace('CONTENT', $source->content(), $page); - $page = str_replace('INTERNAL', $source->internal(), $page); - $page = str_replace('EXTERNAL', $source->external(), $page); - - $links = $source->links(dirname(__FILE__).'/map.xml'); - foreach ($links as $category => $link) { - $page = str_replace("LINKS_".strtoupper($category), $link, $page); - } - - $destination_dir = dirname($destination_path.$destination); - if (!is_dir($destination_dir)) { - mkdir($destination_dir); - } - - $ok = file_put_contents($destination_path.$destination, $page); - touch($destination_path.$destination, filemtime($source_path.$language.$file)); - - if ($ok) { - $result = "OK"; - } else { - $result = "KO"; - } - - $synchronisation = new PackagingSynchronisation($source_path.$language.$file); - $result .= " ".$synchronisation->result(); - - echo $destination_path.$destination." : ".$result."\n"; - } - } - } - closedir($dir); -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/integration.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/integration.php deleted file mode 100644 index e4c5881a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/integration.php +++ /dev/null @@ -1,41 +0,0 @@ -updateTestLogs($cli_directory, $test); - -$working_copy = dirname(__FILE__)."/working-copies/simpletest"; -$binary = "svn"; -$integration->updateSvnLog($working_copy, $binary); - -class SimpleIntegration { - public $target_directory; - - function __construct($target_directory="") { - $this->target_directory = $target_directory; - } - - function updateTestLogs($cli_directory, $test_file) { - foreach(new DirectoryIterator($cli_directory) as $node) { - if ($node->isDir() and !$node->isDot()) { - $bin = $node->getPathname()."/bin/php"; - $result = shell_exec($bin." ".$test_file); - - $result_file = $this->target_directory."/simpletest.".$node->getFilename().".log"; - file_put_contents($result_file, $result); - } - } - } - - function updateSvnLog($working_copy, $binary="svn") { - $start = date("Y-m-d", strtotime('-1year')); - $command = $binary." log --xml --revision {".$start."}:HEAD ".$working_copy." > ".$this->target_directory."/svn.xml"; - return exec($command); - } -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/map.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/map.xml deleted file mode 100644 index 78cb933c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/map.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/package.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/package.php deleted file mode 100644 index f2666254..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/package.php +++ /dev/null @@ -1,440 +0,0 @@ -xpath('//page'); - return $titles[0]->attributes()->title; - } - - function transform_code($code) { - $code = str_replace('', '', $code); - $code = str_replace('<strong>', '', $code); - $code = str_replace('</strong>', '', $code); - $code = str_replace('&', '&', $code); - - return $code; - } - - function content() { - $content = $this->introduction(); - $sections = $this->xpath('//section'); - if (count($sections) > 0) { - $content .= $this->content_with_sections(); - } else { - $content .= $this->content_without_sections(); - } - $content = preg_replace("/href=\"([a-z_]*)\.php\"/", "href=\"\\1.html\"", $content); - - return $content; - } - - function introduction() { - $content = ""; - - $introductions = $this->xpath('//introduction'); - foreach ($introductions as $introduction) { - foreach ($introduction as $element) { - $content .= $this->deal_with_php_code($element->asXML()); - } - } - - return $content; - } - - function content_without_sections() { - $content_without_sections = ""; - $contents = $this->xpath('//content'); - foreach ($contents as $content) { - $content_without_sections .= $this->deal_with_php_code($content->asXML()); - } - - return $content_without_sections; - } - - function deal_with_php_code($content) { - $elements_divided = preg_split('/|<\/php>/', $content); - $content_element = ''; - - if (count($elements_divided) > 1) { - foreach ($elements_divided as $element_divided) { - if (strpos($element_divided, '
    '.$this->transform_code($element_divided).'

    '; - } - $content_element .= $element_divided; - } - } else { - $content_element .= $content; - } - - return $content_element; - } - - function as_title($name) { - return ucfirst(str_replace("-", " ", $name)); - } - - function as_tracker_link($number) { - return "".$number.""; - } - - function content_with_sections() { - $content = ""; - $sections = $this->xpath('//section'); - $anchors = array(); - foreach ($sections as $section) { - if (!isset($anchors[(string)$section->attributes()->name])) { - $content .= "attributes()->name."\">"; - $anchors[(string)$section->attributes()->name] = true; - } - $content .= "

    ".(string)$section->attributes()->title."

    "; - foreach ($section->p as $paragraph) { - $content .= $this->deal_with_php_code($paragraph->asXML()); - } - $content .= $this->deal_with_milestones($section); - $content .= $this->deal_with_changelogs($section); - } - - return $content; - } - - function deal_with_changelogs($section) { - $content = ""; - - foreach ($section->changelog as $changelog) { - $content .= "

    Version ".(string)$changelog->attributes()->version."

    "; - $content .= "
      "; - foreach ($changelog->change as $change) { - $content .= "
    • "; - $content .= trim((string)$change); - $content .= "
    • "; - } - foreach ($changelog->bug as $bug) { - $content .= "
    • "; - $number = ""; - if (isset($bug->attributes()->tracker)) { - $number = " ".$this->as_tracker_link($bug->attributes()->tracker); - } - $content .= "[bug".$number."] ".trim((string)$bug); - $content .= "
    • "; - } - foreach ($changelog->patch as $patch) { - $content .= "
    • "; - $number = ""; - if (isset($patch->attributes()->tracker)) { - $number = " ".$this->as_tracker_link($patch->attributes()->tracker); - } - $content .= "[patch".$number."] ".trim((string)$patch); - $content .= "
    • "; - } - $content .= "
    "; - } - return $content; - } - - function deal_with_milestones($section) { - $content = ""; - - foreach ($section->milestone as $milestone) { - $content .= "

    ".(string)$milestone->attributes()->version."

    "; - foreach ($milestone->concern as $concern) { - if (!isset($anchors[(string)$concern->attributes()->name])) { - $content .= "attributes()->name."\">"; - $anchors[(string)$concern->attributes()->name] = true; - } - $content .= "

    ".$this->as_title($concern->attributes()->name)."

    "; - if (sizeof($concern) > 0) { - $content .= "
    "; - foreach ($concern as $type => $element) { - $status = ""; - if (isset($element->attributes()->status)) { - $status = " class=\"".$element->attributes()->status."\""; - } - $content .= "[".$type."] ".trim($element).""; - foreach ($element->attributes() as $name => $value) { - if ($name == "tracker" and $type == "bug") { - $value = $this->as_tracker_link($value); - } - $content .= "
    ".$name." : ".$value."
    "; - } - foreach ($element->note as $note) { - $content .= "
    ".trim((string)$note)."
    "; - } - } - $content .= "
    "; - } - } - } - - return $content; - } - - function internal() { - $internal = ""; - - if (isset($this->internal->link)) { - foreach ($this->internal->link as $link) { - $internal .= "
    ".$link->asXML()."
    "; - } - } - - return $internal; - } - - function external() { - $external = ""; - - if (isset($this->external->link)) { - foreach ($this->external->link as $link) { - $external .= "
    ".$link->asXML()."
    "; - } - } - - return $external; - } - - function keywords() { - return trim(preg_replace('/(\s+)/', ' ', $this->meta->keywords)); - } - - function here() { - $here = $this->xpath('@here'); - return (string)$here[0]; - } - - function parent($map) { - $here = $this->here(); - $pages = $map->xpath('//page[normalize-space(@here)="'.$here.'"]/parent::*'); - return $pages[0]->attributes()->here; - } - - function destination($path_to_map) { - $destination = ''; - $here = $this->here(); - - $map = simplexml_load_file($path_to_map); - $pages = $map->xpath('//page'); - $i = 0; - foreach ($pages as $page) { - $i++; - if ((string)$page->attributes()->here == $here) { - $destination = (string)$page->attributes()->file; - break; - } - } - return $destination; - } - - function url($file) { - $segments = explode("/", $file); - - return array_pop($segments); - } - - function links_from_xpath($xpath, $map) { - $link = ""; - - $here = $this->here(); - $pages = $map->xpath($xpath); - foreach ($pages as $page) { - $link .= '
  • '; - $link .= $page->attributes()->title.'
  • '; - } - - return $link; - } - - function links_parent_siblings_after($map) { - $here = $this->parent($map); - $query = '//page[normalize-space(@here)="'.$here.'"]/following-sibling::*'; - - return $this->links_from_xpath($query, $map); - } - - function links_parent($map) { - $here = $this->parent($map); - $query = '//page[normalize-space(@here)="'.$here.'"]'; - - return $this->links_from_xpath($query, $map); - } - - function links_parent_siblings_before($map) { - $here = $this->parent($map); - $query = '//page[normalize-space(@here)="'.$here.'"]/preceding-sibling::*'; - - return $this->links_from_xpath($query, $map); - } - - function links_parent_ancestors($map) { - $here = $this->parent($map); - return $this->links_ancestors_from($here, $map); - } - - function links_self_ancestors($map) { - $here = $this->here(); - return $this->links_ancestors_from($here, $map); - } - - function links_ancestors_from($here, $map) { - $link = ""; - - $pages = $map->xpath('//page[normalize-space(@here)="'.$here.'"]/ancestor::*'); - foreach ($pages as $page) { - $here = (string)$page->attributes()->here; - if ($this->level_from_root($here, $map) >= 2) { - $link .= '
  • '; - $link .= $page->attributes()->title.'
  • '; - } - } - - return $link; - } - function links_siblings_before($map) { - $here = $this->here(); - $query = '//page[normalize-space(@here)="'.$here.'"]/preceding-sibling::*'; - - return $this->links_from_xpath($query, $map); - } - - function links_self($map) { - $here = $this->here(); - $query = '//page[normalize-space(@here)="'.$here.'"]'; - - return $this->links_from_xpath($query, $map); - } - - function links_siblings_after($map) { - $here = $this->here(); - $query = '//page[normalize-space(@here)="'.$here.'"]/following-sibling::*'; - - return $this->links_from_xpath($query, $map); - } - - function links_children($map) { - $here = $this->here(); - $query = '//page[normalize-space(@here)="'.$here.'"]/child::*'; - - return $this->links_from_xpath($query, $map); - } - - function links($path_to_map) { - $links['download'] = ""; - $links['start_testing'] = ""; - $links['support'] = ""; - $links['contribute'] = ""; - - $map = simplexml_load_file($path_to_map); - - $link = '
      '; - $here = $this->here(); - $level = $this->level_from_root($here, $map); - if ($level == 2) { - $link .= $this->links_self($map); - $link .= $this->links_children($map); - } - if ($level == 3) { - $link .= $this->links_self_ancestors($map); - $link .= $this->links_siblings_before($map); - $link .= $this->links_self($map); - $chilren = $this->links_children($map); - if ($chilren) { - $link = preg_replace('/(<\/li>)$/', '', $link).'
        '.$chilren.'
      '; - } - $link .= $this->links_siblings_after($map); - } - if ($level == 4) { - $link .= $this->links_parent_ancestors($map); - $link .= $this->links_parent_siblings_before($map); - $link .= $this->links_parent($map); - $link = preg_replace('/(<\/li>)$/', '', $link).'
        '; - $link .= $this->links_siblings_before($map); - $link .= $this->links_self($map); - $chilren = $this->links_children($map); - if ($chilren) { - $link = preg_replace('/(<\/li>)$/', '', $link).'
          '.$chilren.'
        '; - } - $link .= $this->links_siblings_after($map); - $link .= '
      '; - $link .= $this->links_parent_siblings_after($map); - } - $link .= '
    '; - - if (strpos($link, 'download.html') !== false) { - $links['download'] = $link; - } elseif (strpos($link, 'start-testing.html') !== false) { - $links['start_testing'] = $link; - } elseif (strpos($link, 'support.html') !== false) { - $links['support'] = $link; - } elseif (strpos($link, 'todo.html') !== false) { - $links['contribute'] = $link; - } - - return $links; - } - - function level_from_root($here, $map) { - $ancestors = $map->xpath('//page[normalize-space(@here)="'.$here.'"]/ancestor::*'); - - return count($ancestors); - } -} - -class PackagingSynchronisation { - public $file; - public $lang; - public $content; - - function __construct($file, $lang="fr") { - $this->file = $file; - $this->lang = $lang; - $this->content = ""; - if (file_exists($this->file)) { - $this->content = file_get_contents($this->file); - } - } - - function isSynchronisable() { - return (bool)strpos($this->content, "isSynchronisable()) { - return "source"; - } elseif (!$this->sourceRevision()) { - return "missing id"; - } elseif ($this->sourceRevision() > $this->lastSynchroRevision()) { - return "late"; - } else { - return "synchro"; - } - } - - function revision() { - $matches = array(); - preg_match("/Id: [a-z_-]*\.[a-z]* ([0-9]*)/", $this->content, $matches); - return $matches[1]; - } - - function sourceLang() { - $matches = array(); - preg_match("/synchronisation.*lang=\"([a-z]*)\"/", $this->content, $matches); - return $matches[1]; - } - - function sourceRevision() { - $source_lang = $this->sourceLang(); - $source_file = str_replace("/".$this->lang."/", "/".$source_lang."/", $this->file); - if (file_exists($source_file)) { - $source = new PackagingSynchronisation($source_file, $source_lang); - return $source->revision(); - } - return false; - } - - function lastSynchroRevision() { - $matches = array(); - preg_match("/synchronisation.*version=\"([0-9]*)\"/", $this->content, $matches); - return $matches[1]; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/template.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/template.html deleted file mode 100644 index e7853982..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/template.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - -TITLE - - - - -
    -
    - -
    -
    - - LINKS_DOWNLOAD -
    -
    - - LINKS_START_TESTING -
    -
    - - LINKS_SUPPORT -
    -
    - - LINKS_CONTRIBUTE -
    -
    - - SourceForge.net Logo - -
    -
    -
    -
    -

    TITLE

    - - CONTENT - -
    - -
    INTERNAL
    - -
    -
    - -
    EXTERNAL
    - -
    -
    -
    - - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/content_without_section.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/content_without_section.xml deleted file mode 100644 index d3b13087..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/content_without_section.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/en/synchronisation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/en/synchronisation.xml deleted file mode 100644 index f95a8ad2..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/en/synchronisation.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/fr/no-synchronisation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/fr/no-synchronisation.xml deleted file mode 100644 index d3b13087..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/fr/no-synchronisation.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/fr/synchronisation.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/fr/synchronisation.xml deleted file mode 100644 index 7fd400cf..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/fr/synchronisation.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - Le texte en français - - -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_download.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_download.xml deleted file mode 100644 index 41797258..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_download.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_overview.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_overview.xml deleted file mode 100644 index d3b13087..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_overview.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_simpletest.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_simpletest.xml deleted file mode 100644 index 428b3c7a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_simpletest.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_start_testing.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_start_testing.xml deleted file mode 100644 index d3b13087..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_start_testing.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_support.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_support.xml deleted file mode 100644 index 4d43dc4e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_support.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_unit-tester.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_unit-tester.xml deleted file mode 100644 index 7e32910f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/here_unit-tester.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/map.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/map.xml deleted file mode 100644 index ec25596c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/map.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_changelogged.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_changelogged.xml deleted file mode 100644 index 22b1d90a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_changelogged.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - SimpleTest's Changelog - -
    - - - Patches and whitespace clean up - - - Some in line documentation fixes - - - SimpleFileLoader::load: fix for $test_file already included, by daniel hahler - blueyed - - - New tests for UTF8 inside the browser. - - - Fixing one of the incompatible interface errors - - - expectException() - - -
    -
    - - - Changelog for version 1.0.1 - - - - - SimpleTest project page on SourceForge. - - - The developer's API for SimpleTest - gives full detail on the classes and assertions available. - - - - - software development, - php programming for clients, - customer focused php, - software development tools, - acceptance testing framework, - free php scripts, - log in boxes, - unit testing authentication systems, - php resources, - HTMLUnit, - JWebUnit, - php testing, - unit test resource, - web testing, - HTTP authentication, - testing log in, - authentication testing, - security tests - - -
    \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_milestoned.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_milestoned.xml deleted file mode 100644 index f4957721..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_milestoned.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -
    - - - Undefined property $_reporter + fatal error - - - - The HELP_MY_TESTS_DONT_WORK_ANYMORE needs to be updated. - - - - - PHP 5.3 compatible under E_STRICT - PHP 5.2.0-5 compatible under E_STRICT - PHP 5.1.0-6 compatible under E_STRICT - continuous integration - - error_reporting(E_ALL|E_STRICT)gives lots of warning - - We've know this for years, this is the time. - - - - Drop underscores from protected methods and - private variables. - Make all variables private and add protected - accessors where we use them internally. - - That way people will start complaining. - Upon each complaint we'll add an accessor and - capture the use case from them. - - - We'll stick the use cases in the feature request - tracker for now - - - Move web site to new server - - -
    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_with_autorum_php.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_with_autorum_php.xml deleted file mode 100644 index 8e6ee88c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_with_autorum_php.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -
    -

    - Use the &quote;autorun.php&quote; with no link. -

    -

    - Use the "autodive.php" with no link. -

    -

    - Use the autowalk. -

    -
    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_with_php_code.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_with_php_code.xml deleted file mode 100644 index 552647d9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package/one_section_with_php_code.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - Overview and feature list for the SimpleTest PHP unit tester and web tester - - -
    -

    - A test case looks like this... -MyTestCase extends UnitTestCase { - - function testLogWroteMessage() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> -]]> -

    -
    -
    - - - Quick summary - of the SimpleTest tool for PHP. - - - List of features, - both current ones and those planned. - - - There are plenty of unit testing resources - on the web. - - - - - Documentation for SimpleTest. - - - How to write PHP test cases - is a fairly advanced tutorial. - - - SimpleTest API from phpdoc. - - - - - software development tools, - php programming, - programming php, - software development tools, - Tools for extreme programming, - free php scripts, - links of testing tools, - php testing resources, - mock objects, - junit, - jwebunit, - htmlunit, - itc, - php testing links, - unit test advice and documentation, - extreme programming in php - - - - - - Marcus Baker - - Primary Developer{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package_test.php deleted file mode 100644 index cb2b955b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/simpletest.org/test/package_test.php +++ /dev/null @@ -1,150 +0,0 @@ -assertEqual($synchro->result(), "source"); - - $source = dirname(__FILE__)."/package/en/synchronisation.xml"; - $synchro = new PackagingSynchronisation($source); - $this->assertEqual($synchro->result(), "source"); - } - - function testOfSynchronisationNecessary() { - $source = dirname(__FILE__)."/package/fr/synchronisation.xml"; - $synchro = new PackagingSynchronisation($source); - $this->assertEqual($synchro->revision(), "1672"); - $this->assertEqual($synchro->sourceRevision(), "1671"); - $this->assertEqual($synchro->sourceLang(), "en"); - $this->assertEqual($synchro->lastSynchroRevision(), "1475"); - $this->assertEqual($synchro->result(), "late"); - } -} - -class TestOfContentTransformationFromXMLToHTML extends UnitTestCase { - function testOfNonLinksFileWithPHPExtension() { - $file = dirname(__FILE__).'/package/one_section_with_autorum_php.xml'; - $source = simplexml_load_file($file, "SimpleTestXMLElement"); - $content = $source->content(); - $this->assertPattern('/autorun\.php/', $content); - $this->assertNoPattern('/autorun\.html/', $content); - $this->assertPattern('/autodive\.php/', $content); - $this->assertNoPattern('/autodive\.html/', $content); - $this->assertNoPattern('/autowalk\.php/', $content); - $this->assertPattern('/autowalk\.html/', $content); - } - - function testOfPHPTags() { - $file = dirname(__FILE__).'/package/one_section_with_php_code.xml'; - $source = simplexml_load_file($file, "SimpleTestXMLElement"); - $content = $source->content(); - $this->assertPattern('/
    /', $content);
    -		$this->assertNoPattern('/<\!\[CDATA\[/', $content);
    -		$this->assertPattern('/

    /', $content); - $this->assertPattern('/\$log = &new Log\(\'my.log\'\);/', $content); - $this->assertPattern('/log->message/', $content); - } - - function testOfContentWithoutSections() { - $file = dirname(__FILE__).'/package/content_without_section.xml'; - $source = simplexml_load_file($file, "SimpleTestXMLElement"); - $content = $source->content(); - $this->assertPattern('/

    /', $content); - } - - function testOfContentFromChangeLogSection() { - $file = dirname(__FILE__).'/package/one_section_changelogged.xml'; - $source = simplexml_load_file($file, "SimpleTestXMLElement"); - $content = $source->content(); - $this->assertPattern('/

    Version 1.0.1<\/h3>/', $content); - $this->assertPattern('/
  • \[bug\] Patches and whitespace clean up<\/li>/', $content); - $this->assertPattern('/
  • Some in line documentation fixes<\/li>/', $content); - $this->assertPattern('/
  • \[bug 1853765<\/a>\] Fixing one of the incompatible interface errors<\/li>/', $content); - } - - function testOfContentFromMilestoneSection() { - $file = dirname(__FILE__).'/package/one_section_milestoned.xml'; - $source = simplexml_load_file($file, "SimpleTestXMLElement"); - $content = $source->content(); - $this->assertPattern('/

    1\.1beta<\/h3>/', $content); - $this->assertPattern('/<\/a>/', $content); - $this->assertPattern('/

    Unit tester<\/h4>/', $content); - $this->assertPattern('/

    Documentation<\/h4>/', $content); - $this->assertPattern('/

    Extensions<\/h4>/', $content); - $this->assertPattern('/

    Build<\/h4>/', $content); - $this->assertPattern('/
    \[bug\] Undefined property \$_reporter \+ fatal error<\/dt>/', $content); - $this->assertPattern('/
    tracker : 1896582<\/a><\/dd>/', $content); - $this->assertPattern('/
    \[task\] The HELP_MY_TESTS_DONT_WORK_ANYMORE needs to be updated\.<\/dt>/', $content); - $this->assertPattern('/
    \[task\] PHP 5.3 compatible under E_STRICT<\/dt>/', $content); - $this->assertPattern('/
    \[bug\] continuous integration<\/dt>/', $content); - $this->assertPattern('/
    \[bug\] error_reporting\(E_ALL|E_STRICT\)gives lots of warning<\/dt>/', $content); - $this->assertPattern('/
    We\'ve know this for years, this is the time\.<\/dd>/', $content); - } - - function testOfSingleLink() { - $file = dirname(__FILE__).'/package/here_download.xml'; - $source = simplexml_load_file($file, "SimpleTestXMLElement"); - $map = dirname(__FILE__).'/package/map.xml'; - $links = $source->links($map); - $this->assertEqual(count($links), 4); - $links_download = ''; - $this->assertEqual($links['download'], $links_download); - } - - function testOfMultipleLinks() { - $file = dirname(__FILE__).'/package/here_support.xml'; - $source = simplexml_load_file($file, "SimpleTestXMLElement"); - $map = dirname(__FILE__).'/package/map.xml'; - $links = $source->links($map); - $this->assertEqual(count($links), 4); - $links_support = ''; - $this->assertEqual($links['support'], $links_support); - } - - function testOfHierarchicalLinks() { - $file = dirname(__FILE__).'/package/here_overview.xml'; - $source = simplexml_load_file($file, "SimpleTestXMLElement"); - $map = dirname(__FILE__).'/package/map.xml'; - $links = $source->links($map); - $this->assertEqual(count($links), 4); - $links_start_testing = ''; - $this->assertEqual($links['start_testing'], $links_start_testing); - } - - function testOfRootLinksWithHierarchy() { - $file = dirname(__FILE__).'/package/here_simpletest.xml'; - $source = simplexml_load_file($file, "SimpleTestXMLElement"); - $map = dirname(__FILE__).'/package/map.xml'; - $links = $source->links($map); - $this->assertEqual(count($links), 4); - $links_start_testing = ''; - $this->assertEqual($links['start_testing'], $links_start_testing); - } - - function testOfLinksWithNonRootParent() { - $file = dirname(__FILE__).'/package/here_unit-tester.xml'; - $source = simplexml_load_file($file, "SimpleTestXMLElement"); - $map = dirname(__FILE__).'/package/map.xml'; - $links = $source->links($map); - $this->assertEqual(count($links), 4); - $links_start_testing = ''; - $this->assertEqual($links['start_testing'], $links_start_testing); - } -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/site_map.xml b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/site_map.xml deleted file mode 100644 index 10e56637..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/site_map.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/transform_all_lastcraft.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/transform_all_lastcraft.php deleted file mode 100644 index 9b317df9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/packages/transform_all_lastcraft.php +++ /dev/null @@ -1,17 +0,0 @@ - $destination\n"; - `$command`; - } - closedir($dir); -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/page.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/page.php deleted file mode 100644 index cfaa2550..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/page.php +++ /dev/null @@ -1,979 +0,0 @@ - 'SimpleAnchorTag', - 'title' => 'SimpleTitleTag', - 'base' => 'SimpleBaseTag', - 'button' => 'SimpleButtonTag', - 'textarea' => 'SimpleTextAreaTag', - 'option' => 'SimpleOptionTag', - 'label' => 'SimpleLabelTag', - 'form' => 'SimpleFormTag', - 'frame' => 'SimpleFrameTag'); - $attributes = $this->keysToLowerCase($attributes); - if (array_key_exists($name, $map)) { - $tag_class = $map[$name]; - return new $tag_class($attributes); - } elseif ($name == 'select') { - return $this->createSelectionTag($attributes); - } elseif ($name == 'input') { - return $this->createInputTag($attributes); - } - return new SimpleTag($name, $attributes); - } - - /** - * Factory for selection fields. - * @param hash $attributes Element attributes. - * @return SimpleTag Tag object. - * @access protected - */ - protected function createSelectionTag($attributes) { - if (isset($attributes['multiple'])) { - return new MultipleSelectionTag($attributes); - } - return new SimpleSelectionTag($attributes); - } - - /** - * Factory for input tags. - * @param hash $attributes Element attributes. - * @return SimpleTag Tag object. - * @access protected - */ - protected function createInputTag($attributes) { - if (! isset($attributes['type'])) { - return new SimpleTextTag($attributes); - } - $type = strtolower(trim($attributes['type'])); - $map = array( - 'submit' => 'SimpleSubmitTag', - 'image' => 'SimpleImageSubmitTag', - 'checkbox' => 'SimpleCheckboxTag', - 'radio' => 'SimpleRadioButtonTag', - 'text' => 'SimpleTextTag', - 'hidden' => 'SimpleTextTag', - 'password' => 'SimpleTextTag', - 'file' => 'SimpleUploadTag'); - if (array_key_exists($type, $map)) { - $tag_class = $map[$type]; - return new $tag_class($attributes); - } - return false; - } - - /** - * Make the keys lower case for case insensitive look-ups. - * @param hash $map Hash to convert. - * @return hash Unchanged values, but keys lower case. - * @access private - */ - protected function keysToLowerCase($map) { - $lower = array(); - foreach ($map as $key => $value) { - $lower[strtolower($key)] = $value; - } - return $lower; - } -} - -/** - * SAX event handler. Maintains a list of - * open tags and dispatches them as they close. - * @package SimpleTest - * @subpackage WebTester - */ -class SimplePageBuilder extends SimpleSaxListener { - private $tags; - private $page; - private $private_content_tag; - - /** - * Sets the builder up empty. - * @access public - */ - function __construct() { - parent::__construct(); - } - - /** - * Frees up any references so as to allow the PHP garbage - * collection from unset() to work. - * @access public - */ - function free() { - unset($this->tags); - unset($this->page); - unset($this->private_content_tags); - } - - /** - * Reads the raw content and send events - * into the page to be built. - * @param $response SimpleHttpResponse Fetched response. - * @return SimplePage Newly parsed page. - * @access public - */ - function parse($response) { - $this->tags = array(); - $this->page = $this->createPage($response); - $parser = $this->createParser($this); - $parser->parse($response->getContent()); - $this->page->acceptPageEnd(); - return $this->page; - } - - /** - * Creates an empty page. - * @return SimplePage New unparsed page. - * @access protected - */ - protected function createPage($response) { - return new SimplePage($response); - } - - /** - * Creates the parser used with the builder. - * @param $listener SimpleSaxListener Target of parser. - * @return SimpleSaxParser Parser to generate - * events for the builder. - * @access protected - */ - protected function createParser(&$listener) { - return new SimpleHtmlSaxParser($listener); - } - - /** - * Start of element event. Opens a new tag. - * @param string $name Element name. - * @param hash $attributes Attributes without content - * are marked as true. - * @return boolean False on parse error. - * @access public - */ - function startElement($name, $attributes) { - $factory = new SimpleTagBuilder(); - $tag = $factory->createTag($name, $attributes); - if (! $tag) { - return true; - } - if ($tag->getTagName() == 'label') { - $this->page->acceptLabelStart($tag); - $this->openTag($tag); - return true; - } - if ($tag->getTagName() == 'form') { - $this->page->acceptFormStart($tag); - return true; - } - if ($tag->getTagName() == 'frameset') { - $this->page->acceptFramesetStart($tag); - return true; - } - if ($tag->getTagName() == 'frame') { - $this->page->acceptFrame($tag); - return true; - } - if ($tag->isPrivateContent() && ! isset($this->private_content_tag)) { - $this->private_content_tag = &$tag; - } - if ($tag->expectEndTag()) { - $this->openTag($tag); - return true; - } - $this->page->acceptTag($tag); - return true; - } - - /** - * End of element event. - * @param string $name Element name. - * @return boolean False on parse error. - * @access public - */ - function endElement($name) { - if ($name == 'label') { - $this->page->acceptLabelEnd(); - return true; - } - if ($name == 'form') { - $this->page->acceptFormEnd(); - return true; - } - if ($name == 'frameset') { - $this->page->acceptFramesetEnd(); - return true; - } - if ($this->hasNamedTagOnOpenTagStack($name)) { - $tag = array_pop($this->tags[$name]); - if ($tag->isPrivateContent() && $this->private_content_tag->getTagName() == $name) { - unset($this->private_content_tag); - } - $this->addContentTagToOpenTags($tag); - $this->page->acceptTag($tag); - return true; - } - return true; - } - - /** - * Test to see if there are any open tags awaiting - * closure that match the tag name. - * @param string $name Element name. - * @return boolean True if any are still open. - * @access private - */ - protected function hasNamedTagOnOpenTagStack($name) { - return isset($this->tags[$name]) && (count($this->tags[$name]) > 0); - } - - /** - * Unparsed, but relevant data. The data is added - * to every open tag. - * @param string $text May include unparsed tags. - * @return boolean False on parse error. - * @access public - */ - function addContent($text) { - if (isset($this->private_content_tag)) { - $this->private_content_tag->addContent($text); - } else { - $this->addContentToAllOpenTags($text); - } - return true; - } - - /** - * Any content fills all currently open tags unless it - * is part of an option tag. - * @param string $text May include unparsed tags. - * @access private - */ - protected function addContentToAllOpenTags($text) { - foreach (array_keys($this->tags) as $name) { - for ($i = 0, $count = count($this->tags[$name]); $i < $count; $i++) { - $this->tags[$name][$i]->addContent($text); - } - } - } - - /** - * Parsed data in tag form. The parsed tag is added - * to every open tag. Used for adding options to select - * fields only. - * @param SimpleTag $tag Option tags only. - * @access private - */ - protected function addContentTagToOpenTags(&$tag) { - if ($tag->getTagName() != 'option') { - return; - } - foreach (array_keys($this->tags) as $name) { - for ($i = 0, $count = count($this->tags[$name]); $i < $count; $i++) { - $this->tags[$name][$i]->addTag($tag); - } - } - } - - /** - * Opens a tag for receiving content. Multiple tags - * will be receiving input at the same time. - * @param SimpleTag $tag New content tag. - * @access private - */ - protected function openTag($tag) { - $name = $tag->getTagName(); - if (! in_array($name, array_keys($this->tags))) { - $this->tags[$name] = array(); - } - $this->tags[$name][] = $tag; - } -} - -/** - * A wrapper for a web page. - * @package SimpleTest - * @subpackage WebTester - */ -class SimplePage { - private $links; - private $title; - private $last_widget; - private $label; - private $left_over_labels; - private $open_forms; - private $complete_forms; - private $frameset; - private $frames; - private $frameset_nesting_level; - private $transport_error; - private $raw; - private $text; - private $sent; - private $headers; - private $method; - private $url; - private $base = false; - private $request_data; - - /** - * Parses a page ready to access it's contents. - * @param SimpleHttpResponse $response Result of HTTP fetch. - * @access public - */ - function __construct($response = false) { - $this->links = array(); - $this->title = false; - $this->left_over_labels = array(); - $this->open_forms = array(); - $this->complete_forms = array(); - $this->frameset = false; - $this->frames = array(); - $this->frameset_nesting_level = 0; - $this->text = false; - if ($response) { - $this->extractResponse($response); - } else { - $this->noResponse(); - } - } - - /** - * Extracts all of the response information. - * @param SimpleHttpResponse $response Response being parsed. - * @access private - */ - protected function extractResponse($response) { - $this->transport_error = $response->getError(); - $this->raw = $response->getContent(); - $this->sent = $response->getSent(); - $this->headers = $response->getHeaders(); - $this->method = $response->getMethod(); - $this->url = $response->getUrl(); - $this->request_data = $response->getRequestData(); - } - - /** - * Sets up a missing response. - * @access private - */ - protected function noResponse() { - $this->transport_error = 'No page fetched yet'; - $this->raw = false; - $this->sent = false; - $this->headers = false; - $this->method = 'GET'; - $this->url = false; - $this->request_data = false; - } - - /** - * Original request as bytes sent down the wire. - * @return mixed Sent content. - * @access public - */ - function getRequest() { - return $this->sent; - } - - /** - * Accessor for raw text of page. - * @return string Raw unparsed content. - * @access public - */ - function getRaw() { - return $this->raw; - } - - /** - * Accessor for plain text of page as a text browser - * would see it. - * @return string Plain text of page. - * @access public - */ - function getText() { - if (! $this->text) { - $this->text = SimpleHtmlSaxParser::normalise($this->raw); - } - return $this->text; - } - - /** - * Accessor for raw headers of page. - * @return string Header block as text. - * @access public - */ - function getHeaders() { - if ($this->headers) { - return $this->headers->getRaw(); - } - return false; - } - - /** - * Original request method. - * @return string GET, POST or HEAD. - * @access public - */ - function getMethod() { - return $this->method; - } - - /** - * Original resource name. - * @return SimpleUrl Current url. - * @access public - */ - function getUrl() { - return $this->url; - } - - /** - * Base URL if set via BASE tag page url otherwise - * @return SimpleUrl Base url. - * @access public - */ - function getBaseUrl() { - return $this->base; - } - - /** - * Original request data. - * @return mixed Sent content. - * @access public - */ - function getRequestData() { - return $this->request_data; - } - - /** - * Accessor for last error. - * @return string Error from last response. - * @access public - */ - function getTransportError() { - return $this->transport_error; - } - - /** - * Accessor for current MIME type. - * @return string MIME type as string; e.g. 'text/html' - * @access public - */ - function getMimeType() { - if ($this->headers) { - return $this->headers->getMimeType(); - } - return false; - } - - /** - * Accessor for HTTP response code. - * @return integer HTTP response code received. - * @access public - */ - function getResponseCode() { - if ($this->headers) { - return $this->headers->getResponseCode(); - } - return false; - } - - /** - * Accessor for last Authentication type. Only valid - * straight after a challenge (401). - * @return string Description of challenge type. - * @access public - */ - function getAuthentication() { - if ($this->headers) { - return $this->headers->getAuthentication(); - } - return false; - } - - /** - * Accessor for last Authentication realm. Only valid - * straight after a challenge (401). - * @return string Name of security realm. - * @access public - */ - function getRealm() { - if ($this->headers) { - return $this->headers->getRealm(); - } - return false; - } - - /** - * Accessor for current frame focus. Will be - * false as no frames. - * @return array Always empty. - * @access public - */ - function getFrameFocus() { - return array(); - } - - /** - * Sets the focus by index. The integer index starts from 1. - * @param integer $choice Chosen frame. - * @return boolean Always false. - * @access public - */ - function setFrameFocusByIndex($choice) { - return false; - } - - /** - * Sets the focus by name. Always fails for a leaf page. - * @param string $name Chosen frame. - * @return boolean False as no frames. - * @access public - */ - function setFrameFocus($name) { - return false; - } - - /** - * Clears the frame focus. Does nothing for a leaf page. - * @access public - */ - function clearFrameFocus() { - } - - /** - * Adds a tag to the page. - * @param SimpleTag $tag Tag to accept. - * @access public - */ - function acceptTag($tag) { - if ($tag->getTagName() == "a") { - $this->addLink($tag); - } elseif ($tag->getTagName() == "base") { - $this->setBase($tag); - } elseif ($tag->getTagName() == "title") { - $this->setTitle($tag); - } elseif ($this->isFormElement($tag->getTagName())) { - for ($i = 0; $i < count($this->open_forms); $i++) { - $this->open_forms[$i]->addWidget($tag); - } - $this->last_widget = &$tag; - } - } - - /** - * Opens a label for a described widget. - * @param SimpleFormTag $tag Tag to accept. - * @access public - */ - function acceptLabelStart($tag) { - $this->label = $tag; - unset($this->last_widget); - } - - /** - * Closes the most recently opened label. - * @access public - */ - function acceptLabelEnd() { - if (isset($this->label)) { - if (isset($this->last_widget)) { - $this->last_widget->setLabel($this->label->getText()); - unset($this->last_widget); - } else { - $this->left_over_labels[] = SimpleTestCompatibility::copy($this->label); - } - unset($this->label); - } - } - - /** - * Tests to see if a tag is a possible form - * element. - * @param string $name HTML element name. - * @return boolean True if form element. - * @access private - */ - protected function isFormElement($name) { - return in_array($name, array('input', 'button', 'textarea', 'select')); - } - - /** - * Opens a form. New widgets go here. - * @param SimpleFormTag $tag Tag to accept. - * @access public - */ - function acceptFormStart($tag) { - $this->open_forms[] = new SimpleForm($tag, $this); - } - - /** - * Closes the most recently opened form. - * @access public - */ - function acceptFormEnd() { - if (count($this->open_forms)) { - $this->complete_forms[] = array_pop($this->open_forms); - } - } - - /** - * Opens a frameset. A frameset may contain nested - * frameset tags. - * @param SimpleFramesetTag $tag Tag to accept. - * @access public - */ - function acceptFramesetStart($tag) { - if (! $this->isLoadingFrames()) { - $this->frameset = $tag; - } - $this->frameset_nesting_level++; - } - - /** - * Closes the most recently opened frameset. - * @access public - */ - function acceptFramesetEnd() { - if ($this->isLoadingFrames()) { - $this->frameset_nesting_level--; - } - } - - /** - * Takes a single frame tag and stashes it in - * the current frame set. - * @param SimpleFrameTag $tag Tag to accept. - * @access public - */ - function acceptFrame($tag) { - if ($this->isLoadingFrames()) { - if ($tag->getAttribute('src')) { - $this->frames[] = $tag; - } - } - } - - /** - * Test to see if in the middle of reading - * a frameset. - * @return boolean True if inframeset. - * @access private - */ - protected function isLoadingFrames() { - if (! $this->frameset) { - return false; - } - return ($this->frameset_nesting_level > 0); - } - - /** - * Test to see if link is an absolute one. - * @param string $url Url to test. - * @return boolean True if absolute. - * @access protected - */ - protected function linkIsAbsolute($url) { - $parsed = new SimpleUrl($url); - return (boolean)($parsed->getScheme() && $parsed->getHost()); - } - - /** - * Adds a link to the page. - * @param SimpleAnchorTag $tag Link to accept. - * @access protected - */ - protected function addLink($tag) { - $this->links[] = $tag; - } - - /** - * Marker for end of complete page. Any work in - * progress can now be closed. - * @access public - */ - function acceptPageEnd() { - while (count($this->open_forms)) { - $this->complete_forms[] = array_pop($this->open_forms); - } - foreach ($this->left_over_labels as $label) { - for ($i = 0, $count = count($this->complete_forms); $i < $count; $i++) { - $this->complete_forms[$i]->attachLabelBySelector( - new SimpleById($label->getFor()), - $label->getText()); - } - } - } - - /** - * Test for the presence of a frameset. - * @return boolean True if frameset. - * @access public - */ - function hasFrames() { - return (boolean)$this->frameset; - } - - /** - * Accessor for frame name and source URL for every frame that - * will need to be loaded. Immediate children only. - * @return boolean/array False if no frameset or - * otherwise a hash of frame URLs. - * The key is either a numerical - * base one index or the name attribute. - * @access public - */ - function getFrameset() { - if (! $this->frameset) { - return false; - } - $urls = array(); - for ($i = 0; $i < count($this->frames); $i++) { - $name = $this->frames[$i]->getAttribute('name'); - $url = new SimpleUrl($this->frames[$i]->getAttribute('src')); - $urls[$name ? $name : $i + 1] = $this->expandUrl($url); - } - return $urls; - } - - /** - * Fetches a list of loaded frames. - * @return array/string Just the URL for a single page. - * @access public - */ - function getFrames() { - $url = $this->expandUrl($this->getUrl()); - return $url->asString(); - } - - /** - * Accessor for a list of all links. - * @return array List of urls with scheme of - * http or https and hostname. - * @access public - */ - function getUrls() { - $all = array(); - foreach ($this->links as $link) { - $url = $this->getUrlFromLink($link); - $all[] = $url->asString(); - } - return $all; - } - - /** - * Accessor for URLs by the link label. Label will match - * regardess of whitespace issues and case. - * @param string $label Text of link. - * @return array List of links with that label. - * @access public - */ - function getUrlsByLabel($label) { - $matches = array(); - foreach ($this->links as $link) { - if ($link->getText() == $label) { - $matches[] = $this->getUrlFromLink($link); - } - } - return $matches; - } - - /** - * Accessor for a URL by the id attribute. - * @param string $id Id attribute of link. - * @return SimpleUrl URL with that id of false if none. - * @access public - */ - function getUrlById($id) { - foreach ($this->links as $link) { - if ($link->getAttribute('id') === (string)$id) { - return $this->getUrlFromLink($link); - } - } - return false; - } - - /** - * Converts a link tag into a target URL. - * @param SimpleAnchor $link Parsed link. - * @return SimpleUrl URL with frame target if any. - * @access private - */ - protected function getUrlFromLink($link) { - $url = $this->expandUrl($link->getHref()); - if ($link->getAttribute('target')) { - $url->setTarget($link->getAttribute('target')); - } - return $url; - } - - /** - * Expands expandomatic URLs into fully qualified - * URLs. - * @param SimpleUrl $url Relative URL. - * @return SimpleUrl Absolute URL. - * @access public - */ - function expandUrl($url) { - if (! is_object($url)) { - $url = new SimpleUrl($url); - } - $location = $this->getBaseUrl() ? $this->getBaseUrl() : new SimpleUrl(); - return $url->makeAbsolute($location->makeAbsolute($this->getUrl())); - } - - /** - * Sets the base url for the page. - * @param SimpleTag $tag Base URL for page. - * @access protected - */ - protected function setBase($tag) { - $url = $tag->getAttribute('href'); - $this->base = new SimpleUrl($url); - } - - /** - * Sets the title tag contents. - * @param SimpleTitleTag $tag Title of page. - * @access protected - */ - protected function setTitle($tag) { - $this->title = $tag; - } - - /** - * Accessor for parsed title. - * @return string Title or false if no title is present. - * @access public - */ - function getTitle() { - if ($this->title) { - return $this->title->getText(); - } - return false; - } - - /** - * Finds a held form by button label. Will only - * search correctly built forms. - * @param SimpleSelector $selector Button finder. - * @return SimpleForm Form object containing - * the button. - * @access public - */ - function &getFormBySubmit($selector) { - for ($i = 0; $i < count($this->complete_forms); $i++) { - if ($this->complete_forms[$i]->hasSubmit($selector)) { - return $this->complete_forms[$i]; - } - } - $null = null; - return $null; - } - - /** - * Finds a held form by image using a selector. - * Will only search correctly built forms. - * @param SimpleSelector $selector Image finder. - * @return SimpleForm Form object containing - * the image. - * @access public - */ - function getFormByImage($selector) { - for ($i = 0; $i < count($this->complete_forms); $i++) { - if ($this->complete_forms[$i]->hasImage($selector)) { - return $this->complete_forms[$i]; - } - } - return null; - } - - /** - * Finds a held form by the form ID. A way of - * identifying a specific form when we have control - * of the HTML code. - * @param string $id Form label. - * @return SimpleForm Form object containing the matching ID. - * @access public - */ - function getFormById($id) { - for ($i = 0; $i < count($this->complete_forms); $i++) { - if ($this->complete_forms[$i]->getId() == $id) { - return $this->complete_forms[$i]; - } - } - return null; - } - - /** - * Sets a field on each form in which the field is - * available. - * @param SimpleSelector $selector Field finder. - * @param string $value Value to set field to. - * @return boolean True if value is valid. - * @access public - */ - function setField($selector, $value, $position=false) { - $is_set = false; - for ($i = 0; $i < count($this->complete_forms); $i++) { - if ($this->complete_forms[$i]->setField($selector, $value, $position)) { - $is_set = true; - } - } - return $is_set; - } - - /** - * Accessor for a form element value within a page. - * @param SimpleSelector $selector Field finder. - * @return string/boolean A string if the field is - * present, false if unchecked - * and null if missing. - * @access public - */ - function getField($selector) { - for ($i = 0; $i < count($this->complete_forms); $i++) { - $value = $this->complete_forms[$i]->getValue($selector); - if (isset($value)) { - return $value; - } - } - return null; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/parser.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/parser.php deleted file mode 100644 index e95df81e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/parser.php +++ /dev/null @@ -1,760 +0,0 @@ - $constant) { - if (! defined($constant)) { - define($constant, $i + 1); - } -} -/**#@-*/ - -/** - * Compounded regular expression. Any of - * the contained patterns could match and - * when one does, it's label is returned. - * @package SimpleTest - * @subpackage WebTester - */ -class ParallelRegex { - private $patterns; - private $labels; - private $regex; - private $case; - - /** - * Constructor. Starts with no patterns. - * @param boolean $case True for case sensitive, false - * for insensitive. - * @access public - */ - function __construct($case) { - $this->case = $case; - $this->patterns = array(); - $this->labels = array(); - $this->regex = null; - } - - /** - * Adds a pattern with an optional label. - * @param string $pattern Perl style regex, but ( and ) - * lose the usual meaning. - * @param string $label Label of regex to be returned - * on a match. - * @access public - */ - function addPattern($pattern, $label = true) { - $count = count($this->patterns); - $this->patterns[$count] = $pattern; - $this->labels[$count] = $label; - $this->regex = null; - } - - /** - * Attempts to match all patterns at once against - * a string. - * @param string $subject String to match against. - * @param string $match First matched portion of - * subject. - * @return boolean True on success. - * @access public - */ - function match($subject, &$match) { - if (count($this->patterns) == 0) { - return false; - } - if (! preg_match($this->getCompoundedRegex(), $subject, $matches)) { - $match = ''; - return false; - } - $match = $matches[0]; - for ($i = 1; $i < count($matches); $i++) { - if ($matches[$i]) { - return $this->labels[$i - 1]; - } - } - return true; - } - - /** - * Compounds the patterns into a single - * regular expression separated with the - * "or" operator. Caches the regex. - * Will automatically escape (, ) and / tokens. - * @param array $patterns List of patterns in order. - * @access private - */ - protected function getCompoundedRegex() { - if ($this->regex == null) { - for ($i = 0, $count = count($this->patterns); $i < $count; $i++) { - $this->patterns[$i] = '(' . str_replace( - array('/', '(', ')'), - array('\/', '\(', '\)'), - $this->patterns[$i]) . ')'; - } - $this->regex = "/" . implode("|", $this->patterns) . "/" . $this->getPerlMatchingFlags(); - } - return $this->regex; - } - - /** - * Accessor for perl regex mode flags to use. - * @return string Perl regex flags. - * @access private - */ - protected function getPerlMatchingFlags() { - return ($this->case ? "msS" : "msSi"); - } -} - -/** - * States for a stack machine. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleStateStack { - private $stack; - - /** - * Constructor. Starts in named state. - * @param string $start Starting state name. - * @access public - */ - function __construct($start) { - $this->stack = array($start); - } - - /** - * Accessor for current state. - * @return string State. - * @access public - */ - function getCurrent() { - return $this->stack[count($this->stack) - 1]; - } - - /** - * Adds a state to the stack and sets it - * to be the current state. - * @param string $state New state. - * @access public - */ - function enter($state) { - array_push($this->stack, $state); - } - - /** - * Leaves the current state and reverts - * to the previous one. - * @return boolean False if we drop off - * the bottom of the list. - * @access public - */ - function leave() { - if (count($this->stack) == 1) { - return false; - } - array_pop($this->stack); - return true; - } -} - -/** - * Accepts text and breaks it into tokens. - * Some optimisation to make the sure the - * content is only scanned by the PHP regex - * parser once. Lexer modes must not start - * with leading underscores. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleLexer { - private $regexes; - private $parser; - private $mode; - private $mode_handlers; - private $case; - - /** - * Sets up the lexer in case insensitive matching - * by default. - * @param SimpleSaxParser $parser Handling strategy by - * reference. - * @param string $start Starting handler. - * @param boolean $case True for case sensitive. - * @access public - */ - function __construct($parser, $start = "accept", $case = false) { - $this->case = $case; - $this->regexes = array(); - $this->parser = $parser; - $this->mode = new SimpleStateStack($start); - $this->mode_handlers = array($start => $start); - } - - /** - * Adds a token search pattern for a particular - * parsing mode. The pattern does not change the - * current mode. - * @param string $pattern Perl style regex, but ( and ) - * lose the usual meaning. - * @param string $mode Should only apply this - * pattern when dealing with - * this type of input. - * @access public - */ - function addPattern($pattern, $mode = "accept") { - if (! isset($this->regexes[$mode])) { - $this->regexes[$mode] = new ParallelRegex($this->case); - } - $this->regexes[$mode]->addPattern($pattern); - if (! isset($this->mode_handlers[$mode])) { - $this->mode_handlers[$mode] = $mode; - } - } - - /** - * Adds a pattern that will enter a new parsing - * mode. Useful for entering parenthesis, strings, - * tags, etc. - * @param string $pattern Perl style regex, but ( and ) - * lose the usual meaning. - * @param string $mode Should only apply this - * pattern when dealing with - * this type of input. - * @param string $new_mode Change parsing to this new - * nested mode. - * @access public - */ - function addEntryPattern($pattern, $mode, $new_mode) { - if (! isset($this->regexes[$mode])) { - $this->regexes[$mode] = new ParallelRegex($this->case); - } - $this->regexes[$mode]->addPattern($pattern, $new_mode); - if (! isset($this->mode_handlers[$new_mode])) { - $this->mode_handlers[$new_mode] = $new_mode; - } - } - - /** - * Adds a pattern that will exit the current mode - * and re-enter the previous one. - * @param string $pattern Perl style regex, but ( and ) - * lose the usual meaning. - * @param string $mode Mode to leave. - * @access public - */ - function addExitPattern($pattern, $mode) { - if (! isset($this->regexes[$mode])) { - $this->regexes[$mode] = new ParallelRegex($this->case); - } - $this->regexes[$mode]->addPattern($pattern, "__exit"); - if (! isset($this->mode_handlers[$mode])) { - $this->mode_handlers[$mode] = $mode; - } - } - - /** - * Adds a pattern that has a special mode. Acts as an entry - * and exit pattern in one go, effectively calling a special - * parser handler for this token only. - * @param string $pattern Perl style regex, but ( and ) - * lose the usual meaning. - * @param string $mode Should only apply this - * pattern when dealing with - * this type of input. - * @param string $special Use this mode for this one token. - * @access public - */ - function addSpecialPattern($pattern, $mode, $special) { - if (! isset($this->regexes[$mode])) { - $this->regexes[$mode] = new ParallelRegex($this->case); - } - $this->regexes[$mode]->addPattern($pattern, "_$special"); - if (! isset($this->mode_handlers[$special])) { - $this->mode_handlers[$special] = $special; - } - } - - /** - * Adds a mapping from a mode to another handler. - * @param string $mode Mode to be remapped. - * @param string $handler New target handler. - * @access public - */ - function mapHandler($mode, $handler) { - $this->mode_handlers[$mode] = $handler; - } - - /** - * Splits the page text into tokens. Will fail - * if the handlers report an error or if no - * content is consumed. If successful then each - * unparsed and parsed token invokes a call to the - * held listener. - * @param string $raw Raw HTML text. - * @return boolean True on success, else false. - * @access public - */ - function parse($raw) { - if (! isset($this->parser)) { - return false; - } - $length = strlen($raw); - while (is_array($parsed = $this->reduce($raw))) { - list($raw, $unmatched, $matched, $mode) = $parsed; - if (! $this->dispatchTokens($unmatched, $matched, $mode)) { - return false; - } - if ($raw === '') { - return true; - } - if (strlen($raw) == $length) { - return false; - } - $length = strlen($raw); - } - if (! $parsed) { - return false; - } - return $this->invokeParser($raw, LEXER_UNMATCHED); - } - - /** - * Sends the matched token and any leading unmatched - * text to the parser changing the lexer to a new - * mode if one is listed. - * @param string $unmatched Unmatched leading portion. - * @param string $matched Actual token match. - * @param string $mode Mode after match. A boolean - * false mode causes no change. - * @return boolean False if there was any error - * from the parser. - * @access private - */ - protected function dispatchTokens($unmatched, $matched, $mode = false) { - if (! $this->invokeParser($unmatched, LEXER_UNMATCHED)) { - return false; - } - if (is_bool($mode)) { - return $this->invokeParser($matched, LEXER_MATCHED); - } - if ($this->isModeEnd($mode)) { - if (! $this->invokeParser($matched, LEXER_EXIT)) { - return false; - } - return $this->mode->leave(); - } - if ($this->isSpecialMode($mode)) { - $this->mode->enter($this->decodeSpecial($mode)); - if (! $this->invokeParser($matched, LEXER_SPECIAL)) { - return false; - } - return $this->mode->leave(); - } - $this->mode->enter($mode); - return $this->invokeParser($matched, LEXER_ENTER); - } - - /** - * Tests to see if the new mode is actually to leave - * the current mode and pop an item from the matching - * mode stack. - * @param string $mode Mode to test. - * @return boolean True if this is the exit mode. - * @access private - */ - protected function isModeEnd($mode) { - return ($mode === "__exit"); - } - - /** - * Test to see if the mode is one where this mode - * is entered for this token only and automatically - * leaves immediately afterwoods. - * @param string $mode Mode to test. - * @return boolean True if this is the exit mode. - * @access private - */ - protected function isSpecialMode($mode) { - return (strncmp($mode, "_", 1) == 0); - } - - /** - * Strips the magic underscore marking single token - * modes. - * @param string $mode Mode to decode. - * @return string Underlying mode name. - * @access private - */ - protected function decodeSpecial($mode) { - return substr($mode, 1); - } - - /** - * Calls the parser method named after the current - * mode. Empty content will be ignored. The lexer - * has a parser handler for each mode in the lexer. - * @param string $content Text parsed. - * @param boolean $is_match Token is recognised rather - * than unparsed data. - * @access private - */ - protected function invokeParser($content, $is_match) { - if (($content === '') || ($content === false)) { - return true; - } - $handler = $this->mode_handlers[$this->mode->getCurrent()]; - return $this->parser->$handler($content, $is_match); - } - - /** - * Tries to match a chunk of text and if successful - * removes the recognised chunk and any leading - * unparsed data. Empty strings will not be matched. - * @param string $raw The subject to parse. This is the - * content that will be eaten. - * @return array/boolean Three item list of unparsed - * content followed by the - * recognised token and finally the - * action the parser is to take. - * True if no match, false if there - * is a parsing error. - * @access private - */ - protected function reduce($raw) { - if ($action = $this->regexes[$this->mode->getCurrent()]->match($raw, $match)) { - $unparsed_character_count = strpos($raw, $match); - $unparsed = substr($raw, 0, $unparsed_character_count); - $raw = substr($raw, $unparsed_character_count + strlen($match)); - return array($raw, $unparsed, $match, $action); - } - return true; - } -} - -/** - * Breaks HTML into SAX events. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleHtmlLexer extends SimpleLexer { - - /** - * Sets up the lexer with case insensitive matching - * and adds the HTML handlers. - * @param SimpleSaxParser $parser Handling strategy by - * reference. - * @access public - */ - function __construct($parser) { - parent::__construct($parser, 'text'); - $this->mapHandler('text', 'acceptTextToken'); - $this->addSkipping(); - foreach ($this->getParsedTags() as $tag) { - $this->addTag($tag); - } - $this->addInTagTokens(); - } - - /** - * List of parsed tags. Others are ignored. - * @return array List of searched for tags. - * @access private - */ - protected function getParsedTags() { - return array('a', 'base', 'title', 'form', 'input', 'button', 'textarea', 'select', - 'option', 'frameset', 'frame', 'label'); - } - - /** - * The lexer has to skip certain sections such - * as server code, client code and styles. - * @access private - */ - protected function addSkipping() { - $this->mapHandler('css', 'ignore'); - $this->addEntryPattern('addExitPattern('', 'css'); - $this->mapHandler('js', 'ignore'); - $this->addEntryPattern('addExitPattern('', 'js'); - $this->mapHandler('comment', 'ignore'); - $this->addEntryPattern('', 'comment'); - } - - /** - * Pattern matches to start and end a tag. - * @param string $tag Name of tag to scan for. - * @access private - */ - protected function addTag($tag) { - $this->addSpecialPattern("", 'text', 'acceptEndToken'); - $this->addEntryPattern("<$tag", 'text', 'tag'); - } - - /** - * Pattern matches to parse the inside of a tag - * including the attributes and their quoting. - * @access private - */ - protected function addInTagTokens() { - $this->mapHandler('tag', 'acceptStartToken'); - $this->addSpecialPattern('\s+', 'tag', 'ignore'); - $this->addAttributeTokens(); - $this->addExitPattern('/>', 'tag'); - $this->addExitPattern('>', 'tag'); - } - - /** - * Matches attributes that are either single quoted, - * double quoted or unquoted. - * @access private - */ - protected function addAttributeTokens() { - $this->mapHandler('dq_attribute', 'acceptAttributeToken'); - $this->addEntryPattern('=\s*"', 'tag', 'dq_attribute'); - $this->addPattern("\\\\\"", 'dq_attribute'); - $this->addExitPattern('"', 'dq_attribute'); - $this->mapHandler('sq_attribute', 'acceptAttributeToken'); - $this->addEntryPattern("=\s*'", 'tag', 'sq_attribute'); - $this->addPattern("\\\\'", 'sq_attribute'); - $this->addExitPattern("'", 'sq_attribute'); - $this->mapHandler('uq_attribute', 'acceptAttributeToken'); - $this->addSpecialPattern('=\s*[^>\s]*', 'tag', 'uq_attribute'); - } -} - -/** - * Converts HTML tokens into selected SAX events. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleHtmlSaxParser { - private $lexer; - private $listener; - private $tag; - private $attributes; - private $current_attribute; - - /** - * Sets the listener. - * @param SimpleSaxListener $listener SAX event handler. - * @access public - */ - function __construct($listener) { - $this->listener = $listener; - $this->lexer = $this->createLexer($this); - $this->tag = ''; - $this->attributes = array(); - $this->current_attribute = ''; - } - - /** - * Runs the content through the lexer which - * should call back to the acceptors. - * @param string $raw Page text to parse. - * @return boolean False if parse error. - * @access public - */ - function parse($raw) { - return $this->lexer->parse($raw); - } - - /** - * Sets up the matching lexer. Starts in 'text' mode. - * @param SimpleSaxParser $parser Event generator, usually $self. - * @return SimpleLexer Lexer suitable for this parser. - * @access public - */ - static function createLexer(&$parser) { - return new SimpleHtmlLexer($parser); - } - - /** - * Accepts a token from the tag mode. If the - * starting element completes then the element - * is dispatched and the current attributes - * set back to empty. The element or attribute - * name is converted to lower case. - * @param string $token Incoming characters. - * @param integer $event Lexer event type. - * @return boolean False if parse error. - * @access public - */ - function acceptStartToken($token, $event) { - if ($event == LEXER_ENTER) { - $this->tag = strtolower(substr($token, 1)); - return true; - } - if ($event == LEXER_EXIT) { - $success = $this->listener->startElement( - $this->tag, - $this->attributes); - $this->tag = ''; - $this->attributes = array(); - return $success; - } - if ($token != '=') { - $this->current_attribute = strtolower(SimpleHtmlSaxParser::decodeHtml($token)); - $this->attributes[$this->current_attribute] = ''; - } - return true; - } - - /** - * Accepts a token from the end tag mode. - * The element name is converted to lower case. - * @param string $token Incoming characters. - * @param integer $event Lexer event type. - * @return boolean False if parse error. - * @access public - */ - function acceptEndToken($token, $event) { - if (! preg_match('/<\/(.*)>/', $token, $matches)) { - return false; - } - return $this->listener->endElement(strtolower($matches[1])); - } - - /** - * Part of the tag data. - * @param string $token Incoming characters. - * @param integer $event Lexer event type. - * @return boolean False if parse error. - * @access public - */ - function acceptAttributeToken($token, $event) { - if ($this->current_attribute) { - if ($event == LEXER_UNMATCHED) { - $this->attributes[$this->current_attribute] .= - SimpleHtmlSaxParser::decodeHtml($token); - } - if ($event == LEXER_SPECIAL) { - $this->attributes[$this->current_attribute] .= - preg_replace('/^=\s*/' , '', SimpleHtmlSaxParser::decodeHtml($token)); - } - } - return true; - } - - /** - * A character entity. - * @param string $token Incoming characters. - * @param integer $event Lexer event type. - * @return boolean False if parse error. - * @access public - */ - function acceptEntityToken($token, $event) { - } - - /** - * Character data between tags regarded as - * important. - * @param string $token Incoming characters. - * @param integer $event Lexer event type. - * @return boolean False if parse error. - * @access public - */ - function acceptTextToken($token, $event) { - return $this->listener->addContent($token); - } - - /** - * Incoming data to be ignored. - * @param string $token Incoming characters. - * @param integer $event Lexer event type. - * @return boolean False if parse error. - * @access public - */ - function ignore($token, $event) { - return true; - } - - /** - * Decodes any HTML entities. - * @param string $html Incoming HTML. - * @return string Outgoing plain text. - * @access public - */ - static function decodeHtml($html) { - return html_entity_decode($html, ENT_QUOTES); - } - - /** - * Turns HTML into text browser visible text. Images - * are converted to their alt text and tags are supressed. - * Entities are converted to their visible representation. - * @param string $html HTML to convert. - * @return string Plain text. - * @access public - */ - static function normalise($html) { - $text = preg_replace('||', '', $html); - $text = preg_replace('|]*>.*?|', '', $text); - $text = preg_replace('|]*alt\s*=\s*"([^"]*)"[^>]*>|', ' \1 ', $text); - $text = preg_replace('|]*alt\s*=\s*\'([^\']*)\'[^>]*>|', ' \1 ', $text); - $text = preg_replace('|]*alt\s*=\s*([a-zA-Z_]+)[^>]*>|', ' \1 ', $text); - $text = preg_replace('|<[^>]*>|', '', $text); - $text = SimpleHtmlSaxParser::decodeHtml($text); - $text = preg_replace('|\s+|', ' ', $text); - return trim(trim($text), "\xA0"); // TODO: The \xAO is a  . Add a test for this. - } -} - -/** - * SAX event handler. - * @package SimpleTest - * @subpackage WebTester - * @abstract - */ -class SimpleSaxListener { - - /** - * Sets the document to write to. - * @access public - */ - function __construct() { - } - - /** - * Start of element event. - * @param string $name Element name. - * @param hash $attributes Name value pairs. - * Attributes without content - * are marked as true. - * @return boolean False on parse error. - * @access public - */ - function startElement($name, $attributes) { - } - - /** - * End of element event. - * @param string $name Element name. - * @return boolean False on parse error. - * @access public - */ - function endElement($name) { - } - - /** - * Unparsed, but relevant data. - * @param string $text May include unparsed tags. - * @return boolean False on parse error. - * @access public - */ - function addContent($text) { - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/reflection_php4.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/reflection_php4.php deleted file mode 100644 index 6c93915a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/reflection_php4.php +++ /dev/null @@ -1,136 +0,0 @@ -_interface = $interface; - } - - /** - * Checks that a class has been declared. - * @return boolean True if defined. - * @access public - */ - function classExists() { - return class_exists($this->_interface); - } - - /** - * Needed to kill the autoload feature in PHP5 - * for classes created dynamically. - * @return boolean True if defined. - * @access public - */ - function classExistsSansAutoload() { - return class_exists($this->_interface); - } - - /** - * Checks that a class or interface has been - * declared. - * @return boolean True if defined. - * @access public - */ - function classOrInterfaceExists() { - return class_exists($this->_interface); - } - - /** - * Needed to kill the autoload feature in PHP5 - * for classes created dynamically. - * @return boolean True if defined. - * @access public - */ - function classOrInterfaceExistsSansAutoload() { - return class_exists($this->_interface); - } - - /** - * Gets the list of methods on a class or - * interface. - * @returns array List of method names. - * @access public - */ - function getMethods() { - return get_class_methods($this->_interface); - } - - /** - * Gets the list of interfaces from a class. If the - * class name is actually an interface then just that - * interface is returned. - * @returns array List of interfaces. - * @access public - */ - function getInterfaces() { - return array(); - } - - /** - * Finds the parent class name. - * @returns string Parent class name. - * @access public - */ - function getParent() { - return strtolower(get_parent_class($this->_interface)); - } - - /** - * Determines if the class is abstract, which for PHP 4 - * will never be the case. - * @returns boolean True if abstract. - * @access public - */ - function isAbstract() { - return false; - } - - /** - * Determines if the the entity is an interface, which for PHP 4 - * will never be the case. - * @returns boolean True if interface. - * @access public - */ - function isInterface() { - return false; - } - - /** - * Scans for final methods, but as it's PHP 4 there - * aren't any. - * @returns boolean True if the class has a final method. - * @access public - */ - function hasFinal() { - return false; - } - - /** - * Gets the source code matching the declaration - * of a method. - * @param string $method Method name. - * @access public - */ - function getSignature($method) { - return "function &$method()"; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/reflection_php5.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/reflection_php5.php deleted file mode 100644 index 02cceb59..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/reflection_php5.php +++ /dev/null @@ -1,386 +0,0 @@ -interface = $interface; - } - - /** - * Checks that a class has been declared. Versions - * before PHP5.0.2 need a check that it's not really - * an interface. - * @return boolean True if defined. - * @access public - */ - function classExists() { - if (! class_exists($this->interface)) { - return false; - } - $reflection = new ReflectionClass($this->interface); - return ! $reflection->isInterface(); - } - - /** - * Needed to kill the autoload feature in PHP5 - * for classes created dynamically. - * @return boolean True if defined. - * @access public - */ - function classExistsSansAutoload() { - return class_exists($this->interface, false); - } - - /** - * Checks that a class or interface has been - * declared. - * @return boolean True if defined. - * @access public - */ - function classOrInterfaceExists() { - return $this->classOrInterfaceExistsWithAutoload($this->interface, true); - } - - /** - * Needed to kill the autoload feature in PHP5 - * for classes created dynamically. - * @return boolean True if defined. - * @access public - */ - function classOrInterfaceExistsSansAutoload() { - return $this->classOrInterfaceExistsWithAutoload($this->interface, false); - } - - /** - * Needed to select the autoload feature in PHP5 - * for classes created dynamically. - * @param string $interface Class or interface name. - * @param boolean $autoload True totriggerautoload. - * @return boolean True if interface defined. - * @access private - */ - protected function classOrInterfaceExistsWithAutoload($interface, $autoload) { - if (function_exists('interface_exists')) { - if (interface_exists($this->interface, $autoload)) { - return true; - } - } - return class_exists($this->interface, $autoload); - } - - /** - * Gets the list of methods on a class or - * interface. - * @returns array List of method names. - * @access public - */ - function getMethods() { - return array_unique(get_class_methods($this->interface)); - } - - /** - * Gets the list of interfaces from a class. If the - * class name is actually an interface then just that - * interface is returned. - * @returns array List of interfaces. - * @access public - */ - function getInterfaces() { - $reflection = new ReflectionClass($this->interface); - if ($reflection->isInterface()) { - return array($this->interface); - } - return $this->onlyParents($reflection->getInterfaces()); - } - - /** - * Gets the list of methods for the implemented - * interfaces only. - * @returns array List of enforced method signatures. - * @access public - */ - function getInterfaceMethods() { - $methods = array(); - foreach ($this->getInterfaces() as $interface) { - $methods = array_merge($methods, get_class_methods($interface)); - } - return array_unique($methods); - } - - /** - * Checks to see if the method signature has to be tightly - * specified. - * @param string $method Method name. - * @returns boolean True if enforced. - * @access private - */ - protected function isInterfaceMethod($method) { - return in_array($method, $this->getInterfaceMethods()); - } - - /** - * Finds the parent class name. - * @returns string Parent class name. - * @access public - */ - function getParent() { - $reflection = new ReflectionClass($this->interface); - $parent = $reflection->getParentClass(); - if ($parent) { - return $parent->getName(); - } - return false; - } - - /** - * Trivially determines if the class is abstract. - * @returns boolean True if abstract. - * @access public - */ - function isAbstract() { - $reflection = new ReflectionClass($this->interface); - return $reflection->isAbstract(); - } - - /** - * Trivially determines if the class is an interface. - * @returns boolean True if interface. - * @access public - */ - function isInterface() { - $reflection = new ReflectionClass($this->interface); - return $reflection->isInterface(); - } - - /** - * Scans for final methods, as they screw up inherited - * mocks by not allowing you to override them. - * @returns boolean True if the class has a final method. - * @access public - */ - function hasFinal() { - $reflection = new ReflectionClass($this->interface); - foreach ($reflection->getMethods() as $method) { - if ($method->isFinal()) { - return true; - } - } - return false; - } - - /** - * Whittles a list of interfaces down to only the - * necessary top level parents. - * @param array $interfaces Reflection API interfaces - * to reduce. - * @returns array List of parent interface names. - * @access private - */ - protected function onlyParents($interfaces) { - $parents = array(); - $blacklist = array(); - foreach ($interfaces as $interface) { - foreach($interfaces as $possible_parent) { - if ($interface->getName() == $possible_parent->getName()) { - continue; - } - if ($interface->isSubClassOf($possible_parent)) { - $blacklist[$possible_parent->getName()] = true; - } - } - if (!isset($blacklist[$interface->getName()])) { - $parents[] = $interface->getName(); - } - } - return $parents; - } - - /** - * Checks whether a method is abstract or not. - * @param string $name Method name. - * @return bool true if method is abstract, else false - * @access private - */ - protected function isAbstractMethod($name) { - $interface = new ReflectionClass($this->interface); - if (! $interface->hasMethod($name)) { - return false; - } - return $interface->getMethod($name)->isAbstract(); - } - - /** - * Checks whether a method is the constructor. - * @param string $name Method name. - * @return bool true if method is the constructor - * @access private - */ - protected function isConstructor($name) { - return ($name == '__construct') || ($name == $this->interface); - } - - /** - * Checks whether a method is abstract in all parents or not. - * @param string $name Method name. - * @return bool true if method is abstract in parent, else false - * @access private - */ - protected function isAbstractMethodInParents($name) { - $interface = new ReflectionClass($this->interface); - $parent = $interface->getParentClass(); - while($parent) { - if (! $parent->hasMethod($name)) { - return false; - } - if ($parent->getMethod($name)->isAbstract()) { - return true; - } - $parent = $parent->getParentClass(); - } - return false; - } - - /** - * Checks whether a method is static or not. - * @param string $name Method name - * @return bool true if method is static, else false - * @access private - */ - protected function isStaticMethod($name) { - $interface = new ReflectionClass($this->interface); - if (! $interface->hasMethod($name)) { - return false; - } - return $interface->getMethod($name)->isStatic(); - } - - /** - * Writes the source code matching the declaration - * of a method. - * @param string $name Method name. - * @return string Method signature up to last - * bracket. - * @access public - */ - function getSignature($name) { - if ($name == '__set') { - return 'function __set($key, $value)'; - } - if ($name == '__call') { - return 'function __call($method, $arguments)'; - } - if (version_compare(phpversion(), '5.1.0', '>=')) { - if (in_array($name, array('__get', '__isset', $name == '__unset'))) { - return "function {$name}(\$key)"; - } - } - if ($name == '__toString') { - return "function $name()"; - } - - // This wonky try-catch is a work around for a faulty method_exists() - // in early versions of PHP 5 which would return false for static - // methods. The Reflection classes work fine, but hasMethod() - // doesn't exist prior to PHP 5.1.0, so we need to use a more crude - // detection method. - try { - $interface = new ReflectionClass($this->interface); - $interface->getMethod($name); - } catch (ReflectionException $e) { - return "function $name()"; - } - return $this->getFullSignature($name); - } - - /** - * For a signature specified in an interface, full - * details must be replicated to be a valid implementation. - * @param string $name Method name. - * @return string Method signature up to last - * bracket. - * @access private - */ - protected function getFullSignature($name) { - $interface = new ReflectionClass($this->interface); - $method = $interface->getMethod($name); - $reference = $method->returnsReference() ? '&' : ''; - $static = $method->isStatic() ? 'static ' : ''; - return "{$static}function $reference$name(" . - implode(', ', $this->getParameterSignatures($method)) . - ")"; - } - - /** - * Gets the source code for each parameter. - * @param ReflectionMethod $method Method object from - * reflection API - * @return array List of strings, each - * a snippet of code. - * @access private - */ - protected function getParameterSignatures($method) { - $signatures = array(); - foreach ($method->getParameters() as $parameter) { - $signature = ''; - $type = $parameter->getClass(); - if (is_null($type) && version_compare(phpversion(), '5.1.0', '>=') && $parameter->isArray()) { - $signature .= 'array '; - } elseif (!is_null($type)) { - $signature .= $type->getName() . ' '; - } - if ($parameter->isPassedByReference()) { - $signature .= '&'; - } - $signature .= '$' . $this->suppressSpurious($parameter->getName()); - if ($this->isOptional($parameter)) { - $signature .= ' = null'; - } - $signatures[] = $signature; - } - return $signatures; - } - - /** - * The SPL library has problems with the - * Reflection library. In particular, you can - * get extra characters in parameter names :(. - * @param string $name Parameter name. - * @return string Cleaner name. - * @access private - */ - protected function suppressSpurious($name) { - return str_replace(array('[', ']', ' '), '', $name); - } - - /** - * Test of a reflection parameter being optional - * that works with early versions of PHP5. - * @param reflectionParameter $parameter Is this optional. - * @return boolean True if optional. - * @access private - */ - protected function isOptional($parameter) { - if (method_exists($parameter, 'isOptional')) { - return $parameter->isOptional(); - } - return false; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/remote.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/remote.php deleted file mode 100644 index 43cc40f3..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/remote.php +++ /dev/null @@ -1,115 +0,0 @@ -url = $url; - $this->dry_url = $dry_url ? $dry_url : $url; - $this->size = false; - } - - /** - * Accessor for the test name for subclasses. - * @return string Name of the test. - * @access public - */ - function getLabel() { - return $this->url; - } - - /** - * Runs the top level test for this class. Currently - * reads the data as a single chunk. I'll fix this - * once I have added iteration to the browser. - * @param SimpleReporter $reporter Target of test results. - * @returns boolean True if no failures. - * @access public - */ - function run($reporter) { - $browser = $this->createBrowser(); - $xml = $browser->get($this->url); - if (! $xml) { - trigger_error('Cannot read remote test URL [' . $this->url . ']'); - return false; - } - $parser = $this->createParser($reporter); - if (! $parser->parse($xml)) { - trigger_error('Cannot parse incoming XML from [' . $this->url . ']'); - return false; - } - return true; - } - - /** - * Creates a new web browser object for fetching - * the XML report. - * @return SimpleBrowser New browser. - * @access protected - */ - protected function createBrowser() { - return new SimpleBrowser(); - } - - /** - * Creates the XML parser. - * @param SimpleReporter $reporter Target of test results. - * @return SimpleTestXmlListener XML reader. - * @access protected - */ - protected function createParser($reporter) { - return new SimpleTestXmlParser($reporter); - } - - /** - * Accessor for the number of subtests. - * @return integer Number of test cases. - * @access public - */ - function getSize() { - if ($this->size === false) { - $browser = $this->createBrowser(); - $xml = $browser->get($this->dry_url); - if (! $xml) { - trigger_error('Cannot read remote test URL [' . $this->dry_url . ']'); - return false; - } - $reporter = new SimpleReporter(); - $parser = $this->createParser($reporter); - if (! $parser->parse($xml)) { - trigger_error('Cannot parse incoming XML from [' . $this->dry_url . ']'); - return false; - } - $this->size = $reporter->getTestCaseCount(); - } - return $this->size; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/reporter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/reporter.php deleted file mode 100644 index aaed016c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/reporter.php +++ /dev/null @@ -1,446 +0,0 @@ -character_set = $character_set; - } - - /** - * Paints the top of the web page setting the - * title to the name of the starting test. - * @param string $test_name Name class of test. - * @access public - */ - function paintHeader($test_name) { - $this->sendNoCacheHeaders(); - print ""; - print "\n\n$test_name\n"; - print "\n"; - print "\n"; - print "\n\n"; - print "

    $test_name

    \n"; - flush(); - } - - /** - * Send the headers necessary to ensure the page is - * reloaded on every request. Otherwise you could be - * scratching your head over out of date test data. - * @access public - */ - static function sendNoCacheHeaders() { - if (! headers_sent()) { - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: no-store, no-cache, must-revalidate"); - header("Cache-Control: post-check=0, pre-check=0", false); - header("Pragma: no-cache"); - } - } - - /** - * Paints the CSS. Add additional styles here. - * @return string CSS code as text. - * @access protected - */ - protected function getCss() { - return ".fail { background-color: inherit; color: red; }" . - ".pass { background-color: inherit; color: green; }" . - " pre { background-color: lightgray; color: inherit; }"; - } - - /** - * Paints the end of the test with a summary of - * the passes and failures. - * @param string $test_name Name class of test. - * @access public - */ - function paintFooter($test_name) { - $colour = ($this->getFailCount() + $this->getExceptionCount() > 0 ? "red" : "green"); - print "
    "; - print $this->getTestCaseProgress() . "/" . $this->getTestCaseCount(); - print " test cases complete:\n"; - print "" . $this->getPassCount() . " passes, "; - print "" . $this->getFailCount() . " fails and "; - print "" . $this->getExceptionCount() . " exceptions."; - print "
    \n"; - print "\n\n"; - } - - /** - * Paints the test failure with a breadcrumbs - * trail of the nesting test suites below the - * top level test. - * @param string $message Failure message displayed in - * the context of the other tests. - * @access public - */ - function paintFail($message) { - parent::paintFail($message); - print "Fail: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode(" -> ", $breadcrumb); - print " -> " . $this->htmlEntities($message) . "
    \n"; - } - - /** - * Paints a PHP error. - * @param string $message Message is ignored. - * @access public - */ - function paintError($message) { - parent::paintError($message); - print "Exception: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode(" -> ", $breadcrumb); - print " -> " . $this->htmlEntities($message) . "
    \n"; - } - - /** - * Paints a PHP exception. - * @param Exception $exception Exception to display. - * @access public - */ - function paintException($exception) { - parent::paintException($exception); - print "Exception: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode(" -> ", $breadcrumb); - $message = 'Unexpected exception of type [' . get_class($exception) . - '] with message ['. $exception->getMessage() . - '] in ['. $exception->getFile() . - ' line ' . $exception->getLine() . ']'; - print " -> " . $this->htmlEntities($message) . "
    \n"; - } - - /** - * Prints the message for skipping tests. - * @param string $message Text of skip condition. - * @access public - */ - function paintSkip($message) { - parent::paintSkip($message); - print "Skipped: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode(" -> ", $breadcrumb); - print " -> " . $this->htmlEntities($message) . "
    \n"; - } - - /** - * Paints formatted text such as dumped privateiables. - * @param string $message Text to show. - * @access public - */ - function paintFormattedMessage($message) { - print '
    ' . $this->htmlEntities($message) . '
    '; - } - - /** - * Character set adjusted entity conversion. - * @param string $message Plain text or Unicode message. - * @return string Browser readable message. - * @access protected - */ - protected function htmlEntities($message) { - return htmlentities($message, ENT_COMPAT, $this->character_set); - } -} - -/** - * Sample minimal test displayer. Generates only - * failure messages and a pass count. For command - * line use. I've tried to make it look like JUnit, - * but I wanted to output the errors as they arrived - * which meant dropping the dots. - * @package SimpleTest - * @subpackage UnitTester - */ -class TextReporter extends SimpleReporter { - - /** - * Does nothing yet. The first output will - * be sent on the first test start. - * @access public - */ - function __construct() { - parent::__construct(); - } - - /** - * Paints the title only. - * @param string $test_name Name class of test. - * @access public - */ - function paintHeader($test_name) { - if (! SimpleReporter::inCli()) { - header('Content-type: text/plain'); - } - print "$test_name\n"; - flush(); - } - - /** - * Paints the end of the test with a summary of - * the passes and failures. - * @param string $test_name Name class of test. - * @access public - */ - function paintFooter($test_name) { - if ($this->getFailCount() + $this->getExceptionCount() == 0) { - print "OK\n"; - } else { - print "FAILURES!!!\n"; - } - print "Test cases run: " . $this->getTestCaseProgress() . - "/" . $this->getTestCaseCount() . - ", Passes: " . $this->getPassCount() . - ", Failures: " . $this->getFailCount() . - ", Exceptions: " . $this->getExceptionCount() . "\n"; - } - - /** - * Paints the test failure as a stack trace. - * @param string $message Failure message displayed in - * the context of the other tests. - * @access public - */ - function paintFail($message) { - parent::paintFail($message); - print $this->getFailCount() . ") $message\n"; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print "\tin " . implode("\n\tin ", array_reverse($breadcrumb)); - print "\n"; - } - - /** - * Paints a PHP error or exception. - * @param string $message Message to be shown. - * @access public - * @abstract - */ - function paintError($message) { - parent::paintError($message); - print "Exception " . $this->getExceptionCount() . "!\n$message\n"; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print "\tin " . implode("\n\tin ", array_reverse($breadcrumb)); - print "\n"; - } - - /** - * Paints a PHP error or exception. - * @param Exception $exception Exception to describe. - * @access public - * @abstract - */ - function paintException($exception) { - parent::paintException($exception); - $message = 'Unexpected exception of type [' . get_class($exception) . - '] with message ['. $exception->getMessage() . - '] in ['. $exception->getFile() . - ' line ' . $exception->getLine() . ']'; - print "Exception " . $this->getExceptionCount() . "!\n$message\n"; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print "\tin " . implode("\n\tin ", array_reverse($breadcrumb)); - print "\n"; - } - - /** - * Prints the message for skipping tests. - * @param string $message Text of skip condition. - * @access public - */ - function paintSkip($message) { - parent::paintSkip($message); - print "Skip: $message\n"; - } - - /** - * Paints formatted text such as dumped privateiables. - * @param string $message Text to show. - * @access public - */ - function paintFormattedMessage($message) { - print "$message\n"; - flush(); - } -} - -/** - * Runs just a single test group, a single case or - * even a single test within that case. - * @package SimpleTest - * @subpackage UnitTester - */ -class SelectiveReporter extends SimpleReporterDecorator { - private $just_this_case = false; - private $just_this_test = false; - private $on; - - /** - * Selects the test case or group to be run, - * and optionally a specific test. - * @param SimpleScorer $reporter Reporter to receive events. - * @param string $just_this_case Only this case or group will run. - * @param string $just_this_test Only this test method will run. - */ - function __construct($reporter, $just_this_case = false, $just_this_test = false) { - if (isset($just_this_case) && $just_this_case) { - $this->just_this_case = strtolower($just_this_case); - $this->off(); - } else { - $this->on(); - } - if (isset($just_this_test) && $just_this_test) { - $this->just_this_test = strtolower($just_this_test); - } - parent::__construct($reporter); - } - - /** - * Compares criteria to actual the case/group name. - * @param string $test_case The incoming test. - * @return boolean True if matched. - * @access protected - */ - protected function matchesTestCase($test_case) { - return $this->just_this_case == strtolower($test_case); - } - - /** - * Compares criteria to actual the test name. If no - * name was specified at the beginning, then all tests - * can run. - * @param string $method The incoming test method. - * @return boolean True if matched. - * @access protected - */ - protected function shouldRunTest($test_case, $method) { - if ($this->isOn() || $this->matchesTestCase($test_case)) { - if ($this->just_this_test) { - return $this->just_this_test == strtolower($method); - } else { - return true; - } - } - return false; - } - - /** - * Switch on testing for the group or subgroup. - * @access private - */ - protected function on() { - $this->on = true; - } - - /** - * Switch off testing for the group or subgroup. - * @access private - */ - protected function off() { - $this->on = false; - } - - /** - * Is this group actually being tested? - * @return boolean True if the current test group is active. - * @access private - */ - protected function isOn() { - return $this->on; - } - - /** - * Veto everything that doesn't match the method wanted. - * @param string $test_case Name of test case. - * @param string $method Name of test method. - * @return boolean True if test should be run. - * @access public - */ - function shouldInvoke($test_case, $method) { - if ($this->shouldRunTest($test_case, $method)) { - return $this->reporter->shouldInvoke($test_case, $method); - } - return false; - } - - /** - * Paints the start of a group test. - * @param string $test_case Name of test or other label. - * @param integer $size Number of test cases starting. - * @access public - */ - function paintGroupStart($test_case, $size) { - if ($this->just_this_case && $this->matchesTestCase($test_case)) { - $this->on(); - } - $this->reporter->paintGroupStart($test_case, $size); - } - - /** - * Paints the end of a group test. - * @param string $test_case Name of test or other label. - * @access public - */ - function paintGroupEnd($test_case) { - $this->reporter->paintGroupEnd($test_case); - if ($this->just_this_case && $this->matchesTestCase($test_case)) { - $this->off(); - } - } -} - -/** - * Suppresses skip messages. - * @package SimpleTest - * @subpackage UnitTester - */ -class NoSkipsReporter extends SimpleReporterDecorator { - - /** - * Does nothing. - * @param string $message Text of skip condition. - * @access public - */ - function paintSkip($message) { } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/scorer.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/scorer.php deleted file mode 100644 index fa7c543b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/scorer.php +++ /dev/null @@ -1,862 +0,0 @@ -passes = 0; - $this->fails = 0; - $this->exceptions = 0; - $this->is_dry_run = false; - } - - /** - * Signals that the next evaluation will be a dry - * run. That is, the structure events will be - * recorded, but no tests will be run. - * @param boolean $is_dry Dry run if true. - * @access public - */ - function makeDry($is_dry = true) { - $this->is_dry_run = $is_dry; - } - - /** - * The reporter has a veto on what should be run. - * @param string $test_case_name name of test case. - * @param string $method Name of test method. - * @access public - */ - function shouldInvoke($test_case_name, $method) { - return ! $this->is_dry_run; - } - - /** - * Can wrap the invoker in preperation for running - * a test. - * @param SimpleInvoker $invoker Individual test runner. - * @return SimpleInvoker Wrapped test runner. - * @access public - */ - function createInvoker($invoker) { - return $invoker; - } - - /** - * Accessor for current status. Will be false - * if there have been any failures or exceptions. - * Used for command line tools. - * @return boolean True if no failures. - * @access public - */ - function getStatus() { - if ($this->exceptions + $this->fails > 0) { - return false; - } - return true; - } - - /** - * Paints the start of a group test. - * @param string $test_name Name of test or other label. - * @param integer $size Number of test cases starting. - * @access public - */ - function paintGroupStart($test_name, $size) { - } - - /** - * Paints the end of a group test. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintGroupEnd($test_name) { - } - - /** - * Paints the start of a test case. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintCaseStart($test_name) { - } - - /** - * Paints the end of a test case. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintCaseEnd($test_name) { - } - - /** - * Paints the start of a test method. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintMethodStart($test_name) { - } - - /** - * Paints the end of a test method. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintMethodEnd($test_name) { - } - - /** - * Increments the pass count. - * @param string $message Message is ignored. - * @access public - */ - function paintPass($message) { - $this->passes++; - } - - /** - * Increments the fail count. - * @param string $message Message is ignored. - * @access public - */ - function paintFail($message) { - $this->fails++; - } - - /** - * Deals with PHP 4 throwing an error. - * @param string $message Text of error formatted by - * the test case. - * @access public - */ - function paintError($message) { - $this->exceptions++; - } - - /** - * Deals with PHP 5 throwing an exception. - * @param Exception $exception The actual exception thrown. - * @access public - */ - function paintException($exception) { - $this->exceptions++; - } - - /** - * Prints the message for skipping tests. - * @param string $message Text of skip condition. - * @access public - */ - function paintSkip($message) { - } - - /** - * Accessor for the number of passes so far. - * @return integer Number of passes. - * @access public - */ - function getPassCount() { - return $this->passes; - } - - /** - * Accessor for the number of fails so far. - * @return integer Number of fails. - * @access public - */ - function getFailCount() { - return $this->fails; - } - - /** - * Accessor for the number of untrapped errors - * so far. - * @return integer Number of exceptions. - * @access public - */ - function getExceptionCount() { - return $this->exceptions; - } - - /** - * Paints a simple supplementary message. - * @param string $message Text to display. - * @access public - */ - function paintMessage($message) { - } - - /** - * Paints a formatted ASCII message such as a - * privateiable dump. - * @param string $message Text to display. - * @access public - */ - function paintFormattedMessage($message) { - } - - /** - * By default just ignores user generated events. - * @param string $type Event type as text. - * @param mixed $payload Message or object. - * @access public - */ - function paintSignal($type, $payload) { - } -} - -/** - * Recipient of generated test messages that can display - * page footers and headers. Also keeps track of the - * test nesting. This is the main base class on which - * to build the finished test (page based) displays. - * @package SimpleTest - * @subpackage UnitTester - */ -class SimpleReporter extends SimpleScorer { - private $test_stack; - private $size; - private $progress; - - /** - * Starts the display with no results in. - * @access public - */ - function __construct() { - parent::__construct(); - $this->test_stack = array(); - $this->size = null; - $this->progress = 0; - } - - /** - * Gets the formatter for privateiables and other small - * generic data items. - * @return SimpleDumper Formatter. - * @access public - */ - function getDumper() { - return new SimpleDumper(); - } - - /** - * Paints the start of a group test. Will also paint - * the page header and footer if this is the - * first test. Will stash the size if the first - * start. - * @param string $test_name Name of test that is starting. - * @param integer $size Number of test cases starting. - * @access public - */ - function paintGroupStart($test_name, $size) { - if (! isset($this->size)) { - $this->size = $size; - } - if (count($this->test_stack) == 0) { - $this->paintHeader($test_name); - } - $this->test_stack[] = $test_name; - } - - /** - * Paints the end of a group test. Will paint the page - * footer if the stack of tests has unwound. - * @param string $test_name Name of test that is ending. - * @param integer $progress Number of test cases ending. - * @access public - */ - function paintGroupEnd($test_name) { - array_pop($this->test_stack); - if (count($this->test_stack) == 0) { - $this->paintFooter($test_name); - } - } - - /** - * Paints the start of a test case. Will also paint - * the page header and footer if this is the - * first test. Will stash the size if the first - * start. - * @param string $test_name Name of test that is starting. - * @access public - */ - function paintCaseStart($test_name) { - if (! isset($this->size)) { - $this->size = 1; - } - if (count($this->test_stack) == 0) { - $this->paintHeader($test_name); - } - $this->test_stack[] = $test_name; - } - - /** - * Paints the end of a test case. Will paint the page - * footer if the stack of tests has unwound. - * @param string $test_name Name of test that is ending. - * @access public - */ - function paintCaseEnd($test_name) { - $this->progress++; - array_pop($this->test_stack); - if (count($this->test_stack) == 0) { - $this->paintFooter($test_name); - } - } - - /** - * Paints the start of a test method. - * @param string $test_name Name of test that is starting. - * @access public - */ - function paintMethodStart($test_name) { - $this->test_stack[] = $test_name; - } - - /** - * Paints the end of a test method. Will paint the page - * footer if the stack of tests has unwound. - * @param string $test_name Name of test that is ending. - * @access public - */ - function paintMethodEnd($test_name) { - array_pop($this->test_stack); - } - - /** - * Paints the test document header. - * @param string $test_name First test top level - * to start. - * @access public - * @abstract - */ - function paintHeader($test_name) { - } - - /** - * Paints the test document footer. - * @param string $test_name The top level test. - * @access public - * @abstract - */ - function paintFooter($test_name) { - } - - /** - * Accessor for internal test stack. For - * subclasses that need to see the whole test - * history for display purposes. - * @return array List of methods in nesting order. - * @access public - */ - function getTestList() { - return $this->test_stack; - } - - /** - * Accessor for total test size in number - * of test cases. Null until the first - * test is started. - * @return integer Total number of cases at start. - * @access public - */ - function getTestCaseCount() { - return $this->size; - } - - /** - * Accessor for the number of test cases - * completed so far. - * @return integer Number of ended cases. - * @access public - */ - function getTestCaseProgress() { - return $this->progress; - } - - /** - * Static check for running in the comand line. - * @return boolean True if CLI. - * @access public - */ - static function inCli() { - return php_sapi_name() == 'cli'; - } -} - -/** - * For modifying the behaviour of the visual reporters. - * @package SimpleTest - * @subpackage UnitTester - */ -class SimpleReporterDecorator { - protected $reporter; - - /** - * Mediates between the reporter and the test case. - * @param SimpleScorer $reporter Reporter to receive events. - */ - function __construct($reporter) { - $this->reporter = $reporter; - } - - /** - * Signals that the next evaluation will be a dry - * run. That is, the structure events will be - * recorded, but no tests will be run. - * @param boolean $is_dry Dry run if true. - * @access public - */ - function makeDry($is_dry = true) { - $this->reporter->makeDry($is_dry); - } - - /** - * Accessor for current status. Will be false - * if there have been any failures or exceptions. - * Used for command line tools. - * @return boolean True if no failures. - * @access public - */ - function getStatus() { - return $this->reporter->getStatus(); - } - - /** - * The reporter has a veto on what should be run. - * @param string $test_case_name name of test case. - * @param string $method Name of test method. - * @return boolean True if test should be run. - * @access public - */ - function shouldInvoke($test_case_name, $method) { - return $this->reporter->shouldInvoke($test_case_name, $method); - } - - /** - * Can wrap the invoker in preperation for running - * a test. - * @param SimpleInvoker $invoker Individual test runner. - * @return SimpleInvoker Wrapped test runner. - * @access public - */ - function createInvoker($invoker) { - return $this->reporter->createInvoker($invoker); - } - - /** - * Gets the formatter for privateiables and other small - * generic data items. - * @return SimpleDumper Formatter. - * @access public - */ - function getDumper() { - return $this->reporter->getDumper(); - } - - /** - * Paints the start of a group test. - * @param string $test_name Name of test or other label. - * @param integer $size Number of test cases starting. - * @access public - */ - function paintGroupStart($test_name, $size) { - $this->reporter->paintGroupStart($test_name, $size); - } - - /** - * Paints the end of a group test. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintGroupEnd($test_name) { - $this->reporter->paintGroupEnd($test_name); - } - - /** - * Paints the start of a test case. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintCaseStart($test_name) { - $this->reporter->paintCaseStart($test_name); - } - - /** - * Paints the end of a test case. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintCaseEnd($test_name) { - $this->reporter->paintCaseEnd($test_name); - } - - /** - * Paints the start of a test method. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintMethodStart($test_name) { - $this->reporter->paintMethodStart($test_name); - } - - /** - * Paints the end of a test method. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintMethodEnd($test_name) { - $this->reporter->paintMethodEnd($test_name); - } - - /** - * Chains to the wrapped reporter. - * @param string $message Message is ignored. - * @access public - */ - function paintPass($message) { - $this->reporter->paintPass($message); - } - - /** - * Chains to the wrapped reporter. - * @param string $message Message is ignored. - * @access public - */ - function paintFail($message) { - $this->reporter->paintFail($message); - } - - /** - * Chains to the wrapped reporter. - * @param string $message Text of error formatted by - * the test case. - * @access public - */ - function paintError($message) { - $this->reporter->paintError($message); - } - - /** - * Chains to the wrapped reporter. - * @param Exception $exception Exception to show. - * @access public - */ - function paintException($exception) { - $this->reporter->paintException($exception); - } - - /** - * Prints the message for skipping tests. - * @param string $message Text of skip condition. - * @access public - */ - function paintSkip($message) { - $this->reporter->paintSkip($message); - } - - /** - * Chains to the wrapped reporter. - * @param string $message Text to display. - * @access public - */ - function paintMessage($message) { - $this->reporter->paintMessage($message); - } - - /** - * Chains to the wrapped reporter. - * @param string $message Text to display. - * @access public - */ - function paintFormattedMessage($message) { - $this->reporter->paintFormattedMessage($message); - } - - /** - * Chains to the wrapped reporter. - * @param string $type Event type as text. - * @param mixed $payload Message or object. - * @return boolean Should return false if this - * type of signal should fail the - * test suite. - * @access public - */ - function paintSignal($type, $payload) { - $this->reporter->paintSignal($type, $payload); - } -} - -/** - * For sending messages to multiple reporters at - * the same time. - * @package SimpleTest - * @subpackage UnitTester - */ -class MultipleReporter { - private $reporters = array(); - - /** - * Adds a reporter to the subscriber list. - * @param SimpleScorer $reporter Reporter to receive events. - * @access public - */ - function attachReporter($reporter) { - $this->reporters[] = $reporter; - } - - /** - * Signals that the next evaluation will be a dry - * run. That is, the structure events will be - * recorded, but no tests will be run. - * @param boolean $is_dry Dry run if true. - * @access public - */ - function makeDry($is_dry = true) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->makeDry($is_dry); - } - } - - /** - * Accessor for current status. Will be false - * if there have been any failures or exceptions. - * If any reporter reports a failure, the whole - * suite fails. - * @return boolean True if no failures. - * @access public - */ - function getStatus() { - for ($i = 0; $i < count($this->reporters); $i++) { - if (! $this->reporters[$i]->getStatus()) { - return false; - } - } - return true; - } - - /** - * The reporter has a veto on what should be run. - * It requires all reporters to want to run the method. - * @param string $test_case_name name of test case. - * @param string $method Name of test method. - * @access public - */ - function shouldInvoke($test_case_name, $method) { - for ($i = 0; $i < count($this->reporters); $i++) { - if (! $this->reporters[$i]->shouldInvoke($test_case_name, $method)) { - return false; - } - } - return true; - } - - /** - * Every reporter gets a chance to wrap the invoker. - * @param SimpleInvoker $invoker Individual test runner. - * @return SimpleInvoker Wrapped test runner. - * @access public - */ - function createInvoker($invoker) { - for ($i = 0; $i < count($this->reporters); $i++) { - $invoker = $this->reporters[$i]->createInvoker($invoker); - } - return $invoker; - } - - /** - * Gets the formatter for privateiables and other small - * generic data items. - * @return SimpleDumper Formatter. - * @access public - */ - function getDumper() { - return new SimpleDumper(); - } - - /** - * Paints the start of a group test. - * @param string $test_name Name of test or other label. - * @param integer $size Number of test cases starting. - * @access public - */ - function paintGroupStart($test_name, $size) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintGroupStart($test_name, $size); - } - } - - /** - * Paints the end of a group test. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintGroupEnd($test_name) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintGroupEnd($test_name); - } - } - - /** - * Paints the start of a test case. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintCaseStart($test_name) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintCaseStart($test_name); - } - } - - /** - * Paints the end of a test case. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintCaseEnd($test_name) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintCaseEnd($test_name); - } - } - - /** - * Paints the start of a test method. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintMethodStart($test_name) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintMethodStart($test_name); - } - } - - /** - * Paints the end of a test method. - * @param string $test_name Name of test or other label. - * @access public - */ - function paintMethodEnd($test_name) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintMethodEnd($test_name); - } - } - - /** - * Chains to the wrapped reporter. - * @param string $message Message is ignored. - * @access public - */ - function paintPass($message) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintPass($message); - } - } - - /** - * Chains to the wrapped reporter. - * @param string $message Message is ignored. - * @access public - */ - function paintFail($message) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintFail($message); - } - } - - /** - * Chains to the wrapped reporter. - * @param string $message Text of error formatted by - * the test case. - * @access public - */ - function paintError($message) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintError($message); - } - } - - /** - * Chains to the wrapped reporter. - * @param Exception $exception Exception to display. - * @access public - */ - function paintException($exception) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintException($exception); - } - } - - /** - * Prints the message for skipping tests. - * @param string $message Text of skip condition. - * @access public - */ - function paintSkip($message) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintSkip($message); - } - } - - /** - * Chains to the wrapped reporter. - * @param string $message Text to display. - * @access public - */ - function paintMessage($message) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintMessage($message); - } - } - - /** - * Chains to the wrapped reporter. - * @param string $message Text to display. - * @access public - */ - function paintFormattedMessage($message) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintFormattedMessage($message); - } - } - - /** - * Chains to the wrapped reporter. - * @param string $type Event type as text. - * @param mixed $payload Message or object. - * @return boolean Should return false if this - * type of signal should fail the - * test suite. - * @access public - */ - function paintSignal($type, $payload) { - for ($i = 0; $i < count($this->reporters); $i++) { - $this->reporters[$i]->paintSignal($type, $payload); - } - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/selector.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/selector.php deleted file mode 100644 index ba2fed31..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/selector.php +++ /dev/null @@ -1,141 +0,0 @@ -name = $name; - } - - /** - * Accessor for name. - * @returns string $name Name to match. - */ - function getName() { - return $this->name; - } - - /** - * Compares with name attribute of widget. - * @param SimpleWidget $widget Control to compare. - * @access public - */ - function isMatch($widget) { - return ($widget->getName() == $this->name); - } -} - -/** - * Used to extract form elements for testing against. - * Searches by visible label or alt text. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleByLabel { - private $label; - - /** - * Stashes the name for later comparison. - * @param string $label Visible text to match. - */ - function __construct($label) { - $this->label = $label; - } - - /** - * Comparison. Compares visible text of widget or - * related label. - * @param SimpleWidget $widget Control to compare. - * @access public - */ - function isMatch($widget) { - if (! method_exists($widget, 'isLabel')) { - return false; - } - return $widget->isLabel($this->label); - } -} - -/** - * Used to extract form elements for testing against. - * Searches dy id attribute. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleById { - private $id; - - /** - * Stashes the name for later comparison. - * @param string $id ID atribute to match. - */ - function __construct($id) { - $this->id = $id; - } - - /** - * Comparison. Compares id attribute of widget. - * @param SimpleWidget $widget Control to compare. - * @access public - */ - function isMatch($widget) { - return $widget->isId($this->id); - } -} - -/** - * Used to extract form elements for testing against. - * Searches by visible label, name or alt text. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleByLabelOrName { - private $label; - - /** - * Stashes the name/label for later comparison. - * @param string $label Visible text to match. - */ - function __construct($label) { - $this->label = $label; - } - - /** - * Comparison. Compares visible text of widget or - * related label or name. - * @param SimpleWidget $widget Control to compare. - * @access public - */ - function isMatch($widget) { - if (method_exists($widget, 'isLabel')) { - if ($widget->isLabel($this->label)) { - return true; - } - } - return ($widget->getName() == $this->label); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/shell_tester.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/shell_tester.php deleted file mode 100644 index b9d37623..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/shell_tester.php +++ /dev/null @@ -1,330 +0,0 @@ -output = false; - } - - /** - * Actually runs the command. Does not trap the - * error stream output as this need PHP 4.3+. - * @param string $command The actual command line - * to run. - * @return integer Exit code. - * @access public - */ - function execute($command) { - $this->output = false; - exec($command, $this->output, $ret); - return $ret; - } - - /** - * Accessor for the last output. - * @return string Output as text. - * @access public - */ - function getOutput() { - return implode("\n", $this->output); - } - - /** - * Accessor for the last output. - * @return array Output as array of lines. - * @access public - */ - function getOutputAsList() { - return $this->output; - } -} - -/** - * Test case for testing of command line scripts and - * utilities. Usually scripts that are external to the - * PHP code, but support it in some way. - * @package SimpleTest - * @subpackage UnitTester - */ -class ShellTestCase extends SimpleTestCase { - private $current_shell; - private $last_status; - private $last_command; - - /** - * Creates an empty test case. Should be subclassed - * with test methods for a functional test case. - * @param string $label Name of test case. Will use - * the class name if none specified. - * @access public - */ - function __construct($label = false) { - parent::__construct($label); - $this->current_shell = $this->createShell(); - $this->last_status = false; - $this->last_command = ''; - } - - /** - * Executes a command and buffers the results. - * @param string $command Command to run. - * @return boolean True if zero exit code. - * @access public - */ - function execute($command) { - $shell = $this->getShell(); - $this->last_status = $shell->execute($command); - $this->last_command = $command; - return ($this->last_status === 0); - } - - /** - * Dumps the output of the last command. - * @access public - */ - function dumpOutput() { - $this->dump($this->getOutput()); - } - - /** - * Accessor for the last output. - * @return string Output as text. - * @access public - */ - function getOutput() { - $shell = $this->getShell(); - return $shell->getOutput(); - } - - /** - * Accessor for the last output. - * @return array Output as array of lines. - * @access public - */ - function getOutputAsList() { - $shell = $this->getShell(); - return $shell->getOutputAsList(); - } - - /** - * Called from within the test methods to register - * passes and failures. - * @param boolean $result Pass on true. - * @param string $message Message to display describing - * the test state. - * @return boolean True on pass - * @access public - */ - function assertTrue($result, $message = false) { - return $this->assert(new TrueExpectation(), $result, $message); - } - - /** - * Will be true on false and vice versa. False - * is the PHP definition of false, so that null, - * empty strings, zero and an empty array all count - * as false. - * @param boolean $result Pass on false. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertFalse($result, $message = '%s') { - return $this->assert(new FalseExpectation(), $result, $message); - } - - /** - * Will trigger a pass if the two parameters have - * the same value only. Otherwise a fail. This - * is for testing hand extracted text, etc. - * @param mixed $first Value to compare. - * @param mixed $second Value to compare. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertEqual($first, $second, $message = "%s") { - return $this->assert( - new EqualExpectation($first), - $second, - $message); - } - - /** - * Will trigger a pass if the two parameters have - * a different value. Otherwise a fail. This - * is for testing hand extracted text, etc. - * @param mixed $first Value to compare. - * @param mixed $second Value to compare. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertNotEqual($first, $second, $message = "%s") { - return $this->assert( - new NotEqualExpectation($first), - $second, - $message); - } - - /** - * Tests the last status code from the shell. - * @param integer $status Expected status of last - * command. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertExitCode($status, $message = "%s") { - $message = sprintf($message, "Expected status code of [$status] from [" . - $this->last_command . "], but got [" . - $this->last_status . "]"); - return $this->assertTrue($status === $this->last_status, $message); - } - - /** - * Attempt to exactly match the combined STDERR and - * STDOUT output. - * @param string $expected Expected output. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertOutput($expected, $message = "%s") { - $shell = $this->getShell(); - return $this->assert( - new EqualExpectation($expected), - $shell->getOutput(), - $message); - } - - /** - * Scans the output for a Perl regex. If found - * anywhere it passes, else it fails. - * @param string $pattern Regex to search for. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertOutputPattern($pattern, $message = "%s") { - $shell = $this->getShell(); - return $this->assert( - new PatternExpectation($pattern), - $shell->getOutput(), - $message); - } - - /** - * If a Perl regex is found anywhere in the current - * output then a failure is generated, else a pass. - * @param string $pattern Regex to search for. - * @param $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertNoOutputPattern($pattern, $message = "%s") { - $shell = $this->getShell(); - return $this->assert( - new NoPatternExpectation($pattern), - $shell->getOutput(), - $message); - } - - /** - * File existence check. - * @param string $path Full filename and path. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertFileExists($path, $message = "%s") { - $message = sprintf($message, "File [$path] should exist"); - return $this->assertTrue(file_exists($path), $message); - } - - /** - * File non-existence check. - * @param string $path Full filename and path. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertFileNotExists($path, $message = "%s") { - $message = sprintf($message, "File [$path] should not exist"); - return $this->assertFalse(file_exists($path), $message); - } - - /** - * Scans a file for a Perl regex. If found - * anywhere it passes, else it fails. - * @param string $pattern Regex to search for. - * @param string $path Full filename and path. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertFilePattern($pattern, $path, $message = "%s") { - return $this->assert( - new PatternExpectation($pattern), - implode('', file($path)), - $message); - } - - /** - * If a Perl regex is found anywhere in the named - * file then a failure is generated, else a pass. - * @param string $pattern Regex to search for. - * @param string $path Full filename and path. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertNoFilePattern($pattern, $path, $message = "%s") { - return $this->assert( - new NoPatternExpectation($pattern), - implode('', file($path)), - $message); - } - - /** - * Accessor for current shell. Used for testing the - * the tester itself. - * @return Shell Current shell. - * @access protected - */ - protected function getShell() { - return $this->current_shell; - } - - /** - * Factory for the shell to run the command on. - * @return Shell New shell object. - * @access protected - */ - protected function createShell() { - return new SimpleShell(); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/simpletest.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/simpletest.php deleted file mode 100644 index cfdadf27..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/simpletest.php +++ /dev/null @@ -1,396 +0,0 @@ -= 0) { - require_once(dirname(__FILE__) . '/reflection_php5.php'); -} else { - require_once(dirname(__FILE__) . '/reflection_php4.php'); -} -require_once(dirname(__FILE__) . '/default_reporter.php'); -require_once(dirname(__FILE__) . '/compatibility.php'); -/**#@-*/ - -/** - * Registry and test context. Includes a few - * global options that I'm slowly getting rid of. - * @package SimpleTest - * @subpackage UnitTester - */ -class SimpleTest { - - /** - * Reads the SimpleTest version from the release file. - * @return string Version string. - * @access public - */ - static function getVersion() { - $content = file(dirname(__FILE__) . '/VERSION'); - return trim($content[0]); - } - - /** - * Sets the name of a test case to ignore, usually - * because the class is an abstract case that should - * not be run. Once PHP4 is dropped this will disappear - * as a public method and "abstract" will rule. - * @param string $class Add a class to ignore. - * @access public - */ - static function ignore($class) { - $registry = &SimpleTest::getRegistry(); - $registry['IgnoreList'][strtolower($class)] = true; - } - - /** - * Scans the now complete ignore list, and adds - * all parent classes to the list. If a class - * is not a runnable test case, then it's parents - * wouldn't be either. This is syntactic sugar - * to cut down on ommissions of ignore()'s or - * missing abstract declarations. This cannot - * be done whilst loading classes wiithout forcing - * a particular order on the class declarations and - * the ignore() calls. It's just nice to have the ignore() - * calls at the top of the file before the actual declarations. - * @param array $classes Class names of interest. - * @access public - */ - static function ignoreParentsIfIgnored($classes) { - $registry = &SimpleTest::getRegistry(); - foreach ($classes as $class) { - if (SimpleTest::isIgnored($class)) { - $reflection = new SimpleReflection($class); - if ($parent = $reflection->getParent()) { - SimpleTest::ignore($parent); - } - } - } - } - - /** - * Puts the object to the global pool of 'preferred' objects - * which can be retrieved with SimpleTest :: preferred() method. - * Instances of the same class are overwritten. - * @param object $object Preferred object - * @access public - * @see preferred() - */ - static function prefer($object) { - $registry = &SimpleTest::getRegistry(); - $registry['Preferred'][] = $object; - } - - /** - * Retrieves 'preferred' objects from global pool. Class filter - * can be applied in order to retrieve the object of the specific - * class - * @param array|string $classes Allowed classes or interfaces. - * @access public - * @return array|object|null - * @see prefer() - */ - static function preferred($classes) { - if (! is_array($classes)) { - $classes = array($classes); - } - $registry = &SimpleTest::getRegistry(); - for ($i = count($registry['Preferred']) - 1; $i >= 0; $i--) { - foreach ($classes as $class) { - if (SimpleTestCompatibility::isA($registry['Preferred'][$i], $class)) { - return $registry['Preferred'][$i]; - } - } - } - return null; - } - - /** - * Test to see if a test case is in the ignore - * list. Quite obviously the ignore list should - * be a separate object and will be one day. - * This method is internal to SimpleTest. Don't - * use it. - * @param string $class Class name to test. - * @return boolean True if should not be run. - * @access public - */ - static function isIgnored($class) { - $registry = &SimpleTest::getRegistry(); - return isset($registry['IgnoreList'][strtolower($class)]); - } - - /** - * Sets proxy to use on all requests for when - * testing from behind a firewall. Set host - * to false to disable. This will take effect - * if there are no other proxy settings. - * @param string $proxy Proxy host as URL. - * @param string $username Proxy username for authentication. - * @param string $password Proxy password for authentication. - * @access public - */ - static function useProxy($proxy, $username = false, $password = false) { - $registry = &SimpleTest::getRegistry(); - $registry['DefaultProxy'] = $proxy; - $registry['DefaultProxyUsername'] = $username; - $registry['DefaultProxyPassword'] = $password; - } - - /** - * Accessor for default proxy host. - * @return string Proxy URL. - * @access public - */ - static function getDefaultProxy() { - $registry = &SimpleTest::getRegistry(); - return $registry['DefaultProxy']; - } - - /** - * Accessor for default proxy username. - * @return string Proxy username for authentication. - * @access public - */ - static function getDefaultProxyUsername() { - $registry = &SimpleTest::getRegistry(); - return $registry['DefaultProxyUsername']; - } - - /** - * Accessor for default proxy password. - * @return string Proxy password for authentication. - * @access public - */ - static function getDefaultProxyPassword() { - $registry = &SimpleTest::getRegistry(); - return $registry['DefaultProxyPassword']; - } - - /** - * Accessor for global registry of options. - * @return hash All stored values. - * @access private - */ - protected static function &getRegistry() { - static $registry = false; - if (! $registry) { - $registry = SimpleTest::getDefaults(); - } - return $registry; - } - - /** - * Accessor for the context of the current - * test run. - * @return SimpleTestContext Current test run. - * @access public - */ - static function getContext() { - static $context = false; - if (! $context) { - $context = new SimpleTestContext(); - } - return $context; - } - - /** - * Constant default values. - * @return hash All registry defaults. - * @access private - */ - protected static function getDefaults() { - return array( - 'MockBaseClass' => 'SimpleMock', - 'IgnoreList' => array(), - 'DefaultProxy' => false, - 'DefaultProxyUsername' => false, - 'DefaultProxyPassword' => false, - 'Preferred' => array(new HtmlReporter(), new TextReporter(), new XmlReporter())); - } - - /** - * @deprecated - */ - static function setMockBaseClass($mock_base) { - $registry = &SimpleTest::getRegistry(); - $registry['MockBaseClass'] = $mock_base; - } - - /** - * @deprecated - */ - static function getMockBaseClass() { - $registry = &SimpleTest::getRegistry(); - return $registry['MockBaseClass']; - } -} - -/** - * Container for all components for a specific - * test run. Makes things like error queues - * available to PHP event handlers, and also - * gets around some nasty reference issues in - * the mocks. - * @package SimpleTest - */ -class SimpleTestContext { - private $test; - private $reporter; - private $resources; - - /** - * Clears down the current context. - * @access public - */ - function clear() { - $this->resources = array(); - } - - /** - * Sets the current test case instance. This - * global instance can be used by the mock objects - * to send message to the test cases. - * @param SimpleTestCase $test Test case to register. - * @access public - */ - function setTest($test) { - $this->clear(); - $this->test = $test; - } - - /** - * Accessor for currently running test case. - * @return SimpleTestCase Current test. - * @access public - */ - function getTest() { - return $this->test; - } - - /** - * Sets the current reporter. This - * global instance can be used by the mock objects - * to send messages. - * @param SimpleReporter $reporter Reporter to register. - * @access public - */ - function setReporter($reporter) { - $this->clear(); - $this->reporter = $reporter; - } - - /** - * Accessor for current reporter. - * @return SimpleReporter Current reporter. - * @access public - */ - function getReporter() { - return $this->reporter; - } - - /** - * Accessor for the Singleton resource. - * @return object Global resource. - * @access public - */ - function get($resource) { - if (! isset($this->resources[$resource])) { - $this->resources[$resource] = new $resource(); - } - return $this->resources[$resource]; - } -} - -/** - * Interrogates the stack trace to recover the - * failure point. - * @package SimpleTest - * @subpackage UnitTester - */ -class SimpleStackTrace { - private $prefixes; - - /** - * Stashes the list of target prefixes. - * @param array $prefixes List of method prefixes - * to search for. - */ - function __construct($prefixes) { - $this->prefixes = $prefixes; - } - - /** - * Extracts the last method name that was not within - * Simpletest itself. Captures a stack trace if none given. - * @param array $stack List of stack frames. - * @return string Snippet of test report with line - * number and file. - * @access public - */ - function traceMethod($stack = false) { - $stack = $stack ? $stack : $this->captureTrace(); - foreach ($stack as $frame) { - if ($this->frameLiesWithinSimpleTestFolder($frame)) { - continue; - } - if ($this->frameMatchesPrefix($frame)) { - return ' at [' . $frame['file'] . ' line ' . $frame['line'] . ']'; - } - } - return ''; - } - - /** - * Test to see if error is generated by SimpleTest itself. - * @param array $frame PHP stack frame. - * @return boolean True if a SimpleTest file. - * @access private - */ - protected function frameLiesWithinSimpleTestFolder($frame) { - if (isset($frame['file'])) { - $path = substr(SIMPLE_TEST, 0, -1); - if (strpos($frame['file'], $path) === 0) { - if (dirname($frame['file']) == $path) { - return true; - } - } - } - return false; - } - - /** - * Tries to determine if the method call is an assert, etc. - * @param array $frame PHP stack frame. - * @return boolean True if matches a target. - * @access private - */ - protected function frameMatchesPrefix($frame) { - foreach ($this->prefixes as $prefix) { - if (strncmp($frame['function'], $prefix, strlen($prefix)) == 0) { - return true; - } - } - return false; - } - - /** - * Grabs a current stack trace. - * @return array Fulle trace. - * @access private - */ - protected function captureTrace() { - if (function_exists('debug_backtrace')) { - return array_reverse(debug_backtrace()); - } - return array(); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/socket.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/socket.php deleted file mode 100644 index c30c8777..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/socket.php +++ /dev/null @@ -1,308 +0,0 @@ -clearError(); - } - - /** - * Test for an outstanding error. - * @return boolean True if there is an error. - * @access public - */ - function isError() { - return ($this->error != ''); - } - - /** - * Accessor for an outstanding error. - * @return string Empty string if no error otherwise - * the error message. - * @access public - */ - function getError() { - return $this->error; - } - - /** - * Sets the internal error. - * @param string Error message to stash. - * @access protected - */ - function setError($error) { - $this->error = $error; - } - - /** - * Resets the error state to no error. - * @access protected - */ - function clearError() { - $this->setError(''); - } -} - -class SimpleFileSocket extends SimpleStickyError { - private $handle; - private $is_open = false; - private $sent = ''; - private $block_size; - - /** - * Opens a socket for reading and writing. - * @param SimpleUrl $file Target URI to fetch. - * @param integer $block_size Size of chunk to read. - * @access public - */ - function __construct($file, $block_size = 1024) { - parent::__construct(); - if (! ($this->handle = $this->openFile($file, $error))) { - $file_string = $file->asString(); - $this->setError("Cannot open [$file_string] with [$error]"); - return; - } - $this->is_open = true; - $this->block_size = $block_size; - } - - /** - * Writes some data to the socket and saves alocal copy. - * @param string $message String to send to socket. - * @return boolean True if successful. - * @access public - */ - function write($message) { - return true; - } - - /** - * Reads data from the socket. The error suppresion - * is a workaround for PHP4 always throwing a warning - * with a secure socket. - * @return integer/boolean Incoming bytes. False - * on error. - * @access public - */ - function read() { - $raw = @fread($this->handle, $this->block_size); - if ($raw === false) { - $this->setError('Cannot read from socket'); - $this->close(); - } - return $raw; - } - - /** - * Accessor for socket open state. - * @return boolean True if open. - * @access public - */ - function isOpen() { - return $this->is_open; - } - - /** - * Closes the socket preventing further reads. - * Cannot be reopened once closed. - * @return boolean True if successful. - * @access public - */ - function close() { - if (!$this->is_open) return false; - $this->is_open = false; - return fclose($this->handle); - } - - /** - * Accessor for content so far. - * @return string Bytes sent only. - * @access public - */ - function getSent() { - return $this->sent; - } - - /** - * Actually opens the low level socket. - * @param SimpleUrl $file SimpleUrl file target. - * @param string $error Recipient of error message. - * @param integer $timeout Maximum time to wait for connection. - * @access protected - */ - protected function openFile($file, &$error) { - return @fopen($file->asString(), 'r'); - } -} - -/** - * Wrapper for TCP/IP socket. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleSocket extends SimpleStickyError { - private $handle; - private $is_open = false; - private $sent = ''; - private $lock_size; - - /** - * Opens a socket for reading and writing. - * @param string $host Hostname to send request to. - * @param integer $port Port on remote machine to open. - * @param integer $timeout Connection timeout in seconds. - * @param integer $block_size Size of chunk to read. - * @access public - */ - function __construct($host, $port, $timeout, $block_size = 255) { - parent::__construct(); - if (! ($this->handle = $this->openSocket($host, $port, $error_number, $error, $timeout))) { - $this->setError("Cannot open [$host:$port] with [$error] within [$timeout] seconds"); - return; - } - $this->is_open = true; - $this->block_size = $block_size; - SimpleTestCompatibility::setTimeout($this->handle, $timeout); - } - - /** - * Writes some data to the socket and saves alocal copy. - * @param string $message String to send to socket. - * @return boolean True if successful. - * @access public - */ - function write($message) { - if ($this->isError() || ! $this->isOpen()) { - return false; - } - $count = fwrite($this->handle, $message); - if (! $count) { - if ($count === false) { - $this->setError('Cannot write to socket'); - $this->close(); - } - return false; - } - fflush($this->handle); - $this->sent .= $message; - return true; - } - - /** - * Reads data from the socket. The error suppresion - * is a workaround for PHP4 always throwing a warning - * with a secure socket. - * @return integer/boolean Incoming bytes. False - * on error. - * @access public - */ - function read() { - if ($this->isError() || ! $this->isOpen()) { - return false; - } - $raw = @fread($this->handle, $this->block_size); - if ($raw === false) { - $this->setError('Cannot read from socket'); - $this->close(); - } - return $raw; - } - - /** - * Accessor for socket open state. - * @return boolean True if open. - * @access public - */ - function isOpen() { - return $this->is_open; - } - - /** - * Closes the socket preventing further reads. - * Cannot be reopened once closed. - * @return boolean True if successful. - * @access public - */ - function close() { - $this->is_open = false; - return fclose($this->handle); - } - - /** - * Accessor for content so far. - * @return string Bytes sent only. - * @access public - */ - function getSent() { - return $this->sent; - } - - /** - * Actually opens the low level socket. - * @param string $host Host to connect to. - * @param integer $port Port on host. - * @param integer $error_number Recipient of error code. - * @param string $error Recipoent of error message. - * @param integer $timeout Maximum time to wait for connection. - * @access protected - */ - protected function openSocket($host, $port, &$error_number, &$error, $timeout) { - return @fsockopen($host, $port, $error_number, $error, $timeout); - } -} - -/** - * Wrapper for TCP/IP socket over TLS. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleSecureSocket extends SimpleSocket { - - /** - * Opens a secure socket for reading and writing. - * @param string $host Hostname to send request to. - * @param integer $port Port on remote machine to open. - * @param integer $timeout Connection timeout in seconds. - * @access public - */ - function __construct($host, $port, $timeout) { - parent::__construct($host, $port, $timeout); - } - - /** - * Actually opens the low level socket. - * @param string $host Host to connect to. - * @param integer $port Port on host. - * @param integer $error_number Recipient of error code. - * @param string $error Recipient of error message. - * @param integer $timeout Maximum time to wait for connection. - * @access protected - */ - function openSocket($host, $port, &$error_number, &$error, $timeout) { - return parent::openSocket("tls://$host", $port, $error_number, $error, $timeout); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tag.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tag.php deleted file mode 100644 index c30417dd..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tag.php +++ /dev/null @@ -1,1418 +0,0 @@ -name = strtolower(trim($name)); - $this->attributes = $attributes; - $this->content = ''; - } - - /** - * Check to see if the tag can have both start and - * end tags with content in between. - * @return boolean True if content allowed. - * @access public - */ - function expectEndTag() { - return true; - } - - /** - * The current tag should not swallow all content for - * itself as it's searchable page content. Private - * content tags are usually widgets that contain default - * values. - * @return boolean False as content is available - * to other tags by default. - * @access public - */ - function isPrivateContent() { - return false; - } - - /** - * Appends string content to the current content. - * @param string $content Additional text. - * @access public - */ - function addContent($content) { - $this->content .= (string)$content; - } - - /** - * Adds an enclosed tag to the content. - * @param SimpleTag $tag New tag. - * @access public - */ - function addTag($tag) { - } - - /** - * Accessor for tag name. - * @return string Name of tag. - * @access public - */ - function getTagName() { - return $this->name; - } - - /** - * List of legal child elements. - * @return array List of element names. - * @access public - */ - function getChildElements() { - return array(); - } - - /** - * Accessor for an attribute. - * @param string $label Attribute name. - * @return string Attribute value. - * @access public - */ - function getAttribute($label) { - $label = strtolower($label); - if (! isset($this->attributes[$label])) { - return false; - } - return (string)$this->attributes[$label]; - } - - /** - * Sets an attribute. - * @param string $label Attribute name. - * @return string $value New attribute value. - * @access protected - */ - protected function setAttribute($label, $value) { - $this->attributes[strtolower($label)] = $value; - } - - /** - * Accessor for the whole content so far. - * @return string Content as big raw string. - * @access public - */ - function getContent() { - return $this->content; - } - - /** - * Accessor for content reduced to visible text. Acts - * like a text mode browser, normalising space and - * reducing images to their alt text. - * @return string Content as plain text. - * @access public - */ - function getText() { - return SimpleHtmlSaxParser::normalise($this->content); - } - - /** - * Test to see if id attribute matches. - * @param string $id ID to test against. - * @return boolean True on match. - * @access public - */ - function isId($id) { - return ($this->getAttribute('id') == $id); - } -} - -/** - * Base url. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleBaseTag extends SimpleTag { - - /** - * Starts with a named tag with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('base', $attributes); - } - - /** - * Base tag is not a block tag. - * @return boolean false - * @access public - */ - function expectEndTag() { - return false; - } -} - -/** - * Page title. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleTitleTag extends SimpleTag { - - /** - * Starts with a named tag with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('title', $attributes); - } -} - -/** - * Link. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleAnchorTag extends SimpleTag { - - /** - * Starts with a named tag with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('a', $attributes); - } - - /** - * Accessor for URL as string. - * @return string Coerced as string. - * @access public - */ - function getHref() { - $url = $this->getAttribute('href'); - if (is_bool($url)) { - $url = ''; - } - return $url; - } -} - -/** - * Form element. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleWidget extends SimpleTag { - private $value; - private $label; - private $is_set; - - /** - * Starts with a named tag with attributes only. - * @param string $name Tag name. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($name, $attributes) { - parent::__construct($name, $attributes); - $this->value = false; - $this->label = false; - $this->is_set = false; - } - - /** - * Accessor for name submitted as the key in - * GET/POST privateiables hash. - * @return string Parsed value. - * @access public - */ - function getName() { - return $this->getAttribute('name'); - } - - /** - * Accessor for default value parsed with the tag. - * @return string Parsed value. - * @access public - */ - function getDefault() { - return $this->getAttribute('value'); - } - - /** - * Accessor for currently set value or default if - * none. - * @return string Value set by form or default - * if none. - * @access public - */ - function getValue() { - if (! $this->is_set) { - return $this->getDefault(); - } - return $this->value; - } - - /** - * Sets the current form element value. - * @param string $value New value. - * @return boolean True if allowed. - * @access public - */ - function setValue($value) { - $this->value = $value; - $this->is_set = true; - return true; - } - - /** - * Resets the form element value back to the - * default. - * @access public - */ - function resetValue() { - $this->is_set = false; - } - - /** - * Allows setting of a label externally, say by a - * label tag. - * @param string $label Label to attach. - * @access public - */ - function setLabel($label) { - $this->label = trim($label); - } - - /** - * Reads external or internal label. - * @param string $label Label to test. - * @return boolean True is match. - * @access public - */ - function isLabel($label) { - return $this->label == trim($label); - } - - /** - * Dispatches the value into the form encoded packet. - * @param SimpleEncoding $encoding Form packet. - * @access public - */ - function write($encoding) { - if ($this->getName()) { - $encoding->add($this->getName(), $this->getValue()); - } - } -} - -/** - * Text, password and hidden field. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleTextTag extends SimpleWidget { - - /** - * Starts with a named tag with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('input', $attributes); - if ($this->getAttribute('value') === false) { - $this->setAttribute('value', ''); - } - } - - /** - * Tag contains no content. - * @return boolean False. - * @access public - */ - function expectEndTag() { - return false; - } - - /** - * Sets the current form element value. Cannot - * change the value of a hidden field. - * @param string $value New value. - * @return boolean True if allowed. - * @access public - */ - function setValue($value) { - if ($this->getAttribute('type') == 'hidden') { - return false; - } - return parent::setValue($value); - } -} - -/** - * Submit button as input tag. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleSubmitTag extends SimpleWidget { - - /** - * Starts with a named tag with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('input', $attributes); - if ($this->getAttribute('value') === false) { - $this->setAttribute('value', 'Submit'); - } - } - - /** - * Tag contains no end element. - * @return boolean False. - * @access public - */ - function expectEndTag() { - return false; - } - - /** - * Disables the setting of the button value. - * @param string $value Ignored. - * @return boolean True if allowed. - * @access public - */ - function setValue($value) { - return false; - } - - /** - * Value of browser visible text. - * @return string Visible label. - * @access public - */ - function getLabel() { - return $this->getValue(); - } - - /** - * Test for a label match when searching. - * @param string $label Label to test. - * @return boolean True on match. - * @access public - */ - function isLabel($label) { - return trim($label) == trim($this->getLabel()); - } -} - -/** - * Image button as input tag. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleImageSubmitTag extends SimpleWidget { - - /** - * Starts with a named tag with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('input', $attributes); - } - - /** - * Tag contains no end element. - * @return boolean False. - * @access public - */ - function expectEndTag() { - return false; - } - - /** - * Disables the setting of the button value. - * @param string $value Ignored. - * @return boolean True if allowed. - * @access public - */ - function setValue($value) { - return false; - } - - /** - * Value of browser visible text. - * @return string Visible label. - * @access public - */ - function getLabel() { - if ($this->getAttribute('title')) { - return $this->getAttribute('title'); - } - return $this->getAttribute('alt'); - } - - /** - * Test for a label match when searching. - * @param string $label Label to test. - * @return boolean True on match. - * @access public - */ - function isLabel($label) { - return trim($label) == trim($this->getLabel()); - } - - /** - * Dispatches the value into the form encoded packet. - * @param SimpleEncoding $encoding Form packet. - * @param integer $x X coordinate of click. - * @param integer $y Y coordinate of click. - * @access public - */ - function write($encoding, $x = 1, $y = 1) { - if ($this->getName()) { - $encoding->add($this->getName() . '.x', $x); - $encoding->add($this->getName() . '.y', $y); - } else { - $encoding->add('x', $x); - $encoding->add('y', $y); - } - } -} - -/** - * Submit button as button tag. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleButtonTag extends SimpleWidget { - - /** - * Starts with a named tag with attributes only. - * Defaults are very browser dependent. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('button', $attributes); - } - - /** - * Check to see if the tag can have both start and - * end tags with content in between. - * @return boolean True if content allowed. - * @access public - */ - function expectEndTag() { - return true; - } - - /** - * Disables the setting of the button value. - * @param string $value Ignored. - * @return boolean True if allowed. - * @access public - */ - function setValue($value) { - return false; - } - - /** - * Value of browser visible text. - * @return string Visible label. - * @access public - */ - function getLabel() { - return $this->getContent(); - } - - /** - * Test for a label match when searching. - * @param string $label Label to test. - * @return boolean True on match. - * @access public - */ - function isLabel($label) { - return trim($label) == trim($this->getLabel()); - } -} - -/** - * Content tag for text area. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleTextAreaTag extends SimpleWidget { - - /** - * Starts with a named tag with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('textarea', $attributes); - } - - /** - * Accessor for starting value. - * @return string Parsed value. - * @access public - */ - function getDefault() { - return $this->wrap(SimpleHtmlSaxParser::decodeHtml($this->getContent())); - } - - /** - * Applies word wrapping if needed. - * @param string $value New value. - * @return boolean True if allowed. - * @access public - */ - function setValue($value) { - return parent::setValue($this->wrap($value)); - } - - /** - * Test to see if text should be wrapped. - * @return boolean True if wrapping on. - * @access private - */ - function wrapIsEnabled() { - if ($this->getAttribute('cols')) { - $wrap = $this->getAttribute('wrap'); - if (($wrap == 'physical') || ($wrap == 'hard')) { - return true; - } - } - return false; - } - - /** - * Performs the formatting that is peculiar to - * this tag. There is strange behaviour in this - * one, including stripping a leading new line. - * Go figure. I am using Firefox as a guide. - * @param string $text Text to wrap. - * @return string Text wrapped with carriage - * returns and line feeds - * @access private - */ - protected function wrap($text) { - $text = str_replace("\r\r\n", "\r\n", str_replace("\n", "\r\n", $text)); - $text = str_replace("\r\n\n", "\r\n", str_replace("\r", "\r\n", $text)); - if (strncmp($text, "\r\n", strlen("\r\n")) == 0) { - $text = substr($text, strlen("\r\n")); - } - if ($this->wrapIsEnabled()) { - return wordwrap( - $text, - (integer)$this->getAttribute('cols'), - "\r\n"); - } - return $text; - } - - /** - * The content of textarea is not part of the page. - * @return boolean True. - * @access public - */ - function isPrivateContent() { - return true; - } -} - -/** - * File upload widget. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleUploadTag extends SimpleWidget { - - /** - * Starts with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('input', $attributes); - } - - /** - * Tag contains no content. - * @return boolean False. - * @access public - */ - function expectEndTag() { - return false; - } - - /** - * Dispatches the value into the form encoded packet. - * @param SimpleEncoding $encoding Form packet. - * @access public - */ - function write($encoding) { - if (! file_exists($this->getValue())) { - return; - } - $encoding->attach( - $this->getName(), - implode('', file($this->getValue())), - basename($this->getValue())); - } -} - -/** - * Drop down widget. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleSelectionTag extends SimpleWidget { - private $options; - private $choice; - - /** - * Starts with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('select', $attributes); - $this->options = array(); - $this->choice = false; - } - - /** - * Adds an option tag to a selection field. - * @param SimpleOptionTag $tag New option. - * @access public - */ - function addTag($tag) { - if ($tag->getTagName() == 'option') { - $this->options[] = $tag; - } - } - - /** - * Text within the selection element is ignored. - * @param string $content Ignored. - * @access public - */ - function addContent($content) { - } - - /** - * Scans options for defaults. If none, then - * the first option is selected. - * @return string Selected field. - * @access public - */ - function getDefault() { - for ($i = 0, $count = count($this->options); $i < $count; $i++) { - if ($this->options[$i]->getAttribute('selected') !== false) { - return $this->options[$i]->getDefault(); - } - } - if ($count > 0) { - return $this->options[0]->getDefault(); - } - return ''; - } - - /** - * Can only set allowed values. - * @param string $value New choice. - * @return boolean True if allowed. - * @access public - */ - function setValue($value) { - for ($i = 0, $count = count($this->options); $i < $count; $i++) { - if ($this->options[$i]->isValue($value)) { - $this->choice = $i; - return true; - } - } - return false; - } - - /** - * Accessor for current selection value. - * @return string Value attribute or - * content of opton. - * @access public - */ - function getValue() { - if ($this->choice === false) { - return $this->getDefault(); - } - return $this->options[$this->choice]->getValue(); - } -} - -/** - * Drop down widget. - * @package SimpleTest - * @subpackage WebTester - */ -class MultipleSelectionTag extends SimpleWidget { - private $options; - private $values; - - /** - * Starts with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('select', $attributes); - $this->options = array(); - $this->values = false; - } - - /** - * Adds an option tag to a selection field. - * @param SimpleOptionTag $tag New option. - * @access public - */ - function addTag($tag) { - if ($tag->getTagName() == 'option') { - $this->options[] = &$tag; - } - } - - /** - * Text within the selection element is ignored. - * @param string $content Ignored. - * @access public - */ - function addContent($content) { - } - - /** - * Scans options for defaults to populate the - * value array(). - * @return array Selected fields. - * @access public - */ - function getDefault() { - $default = array(); - for ($i = 0, $count = count($this->options); $i < $count; $i++) { - if ($this->options[$i]->getAttribute('selected') !== false) { - $default[] = $this->options[$i]->getDefault(); - } - } - return $default; - } - - /** - * Can only set allowed values. Any illegal value - * will result in a failure, but all correct values - * will be set. - * @param array $desired New choices. - * @return boolean True if all allowed. - * @access public - */ - function setValue($desired) { - $achieved = array(); - foreach ($desired as $value) { - $success = false; - for ($i = 0, $count = count($this->options); $i < $count; $i++) { - if ($this->options[$i]->isValue($value)) { - $achieved[] = $this->options[$i]->getValue(); - $success = true; - break; - } - } - if (! $success) { - return false; - } - } - $this->values = $achieved; - return true; - } - - /** - * Accessor for current selection value. - * @return array List of currently set options. - * @access public - */ - function getValue() { - if ($this->values === false) { - return $this->getDefault(); - } - return $this->values; - } -} - -/** - * Option for selection field. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleOptionTag extends SimpleWidget { - - /** - * Stashes the attributes. - */ - function __construct($attributes) { - parent::__construct('option', $attributes); - } - - /** - * Does nothing. - * @param string $value Ignored. - * @return boolean Not allowed. - * @access public - */ - function setValue($value) { - return false; - } - - /** - * Test to see if a value matches the option. - * @param string $compare Value to compare with. - * @return boolean True if possible match. - * @access public - */ - function isValue($compare) { - $compare = trim($compare); - if (trim($this->getValue()) == $compare) { - return true; - } - return trim($this->getContent()) == $compare; - } - - /** - * Accessor for starting value. Will be set to - * the option label if no value exists. - * @return string Parsed value. - * @access public - */ - function getDefault() { - if ($this->getAttribute('value') === false) { - return $this->getContent(); - } - return $this->getAttribute('value'); - } - - /** - * The content of options is not part of the page. - * @return boolean True. - * @access public - */ - function isPrivateContent() { - return true; - } -} - -/** - * Radio button. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleRadioButtonTag extends SimpleWidget { - - /** - * Stashes the attributes. - * @param array $attributes Hash of attributes. - */ - function __construct($attributes) { - parent::__construct('input', $attributes); - if ($this->getAttribute('value') === false) { - $this->setAttribute('value', 'on'); - } - } - - /** - * Tag contains no content. - * @return boolean False. - * @access public - */ - function expectEndTag() { - return false; - } - - /** - * The only allowed value sn the one in the - * "value" attribute. - * @param string $value New value. - * @return boolean True if allowed. - * @access public - */ - function setValue($value) { - if ($value === false) { - return parent::setValue($value); - } - if ($value != $this->getAttribute('value')) { - return false; - } - return parent::setValue($value); - } - - /** - * Accessor for starting value. - * @return string Parsed value. - * @access public - */ - function getDefault() { - if ($this->getAttribute('checked') !== false) { - return $this->getAttribute('value'); - } - return false; - } -} - -/** - * Checkbox widget. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleCheckboxTag extends SimpleWidget { - - /** - * Starts with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('input', $attributes); - if ($this->getAttribute('value') === false) { - $this->setAttribute('value', 'on'); - } - } - - /** - * Tag contains no content. - * @return boolean False. - * @access public - */ - function expectEndTag() { - return false; - } - - /** - * The only allowed value in the one in the - * "value" attribute. The default for this - * attribute is "on". If this widget is set to - * true, then the usual value will be taken. - * @param string $value New value. - * @return boolean True if allowed. - * @access public - */ - function setValue($value) { - if ($value === false) { - return parent::setValue($value); - } - if ($value === true) { - return parent::setValue($this->getAttribute('value')); - } - if ($value != $this->getAttribute('value')) { - return false; - } - return parent::setValue($value); - } - - /** - * Accessor for starting value. The default - * value is "on". - * @return string Parsed value. - * @access public - */ - function getDefault() { - if ($this->getAttribute('checked') !== false) { - return $this->getAttribute('value'); - } - return false; - } -} - -/** - * A group of multiple widgets with some shared behaviour. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleTagGroup { - private $widgets = array(); - - /** - * Adds a tag to the group. - * @param SimpleWidget $widget - * @access public - */ - function addWidget($widget) { - $this->widgets[] = $widget; - } - - /** - * Accessor to widget set. - * @return array All widgets. - * @access protected - */ - protected function &getWidgets() { - return $this->widgets; - } - - /** - * Accessor for an attribute. - * @param string $label Attribute name. - * @return boolean Always false. - * @access public - */ - function getAttribute($label) { - return false; - } - - /** - * Fetches the name for the widget from the first - * member. - * @return string Name of widget. - * @access public - */ - function getName() { - if (count($this->widgets) > 0) { - return $this->widgets[0]->getName(); - } - } - - /** - * Scans the widgets for one with the appropriate - * ID field. - * @param string $id ID value to try. - * @return boolean True if matched. - * @access public - */ - function isId($id) { - for ($i = 0, $count = count($this->widgets); $i < $count; $i++) { - if ($this->widgets[$i]->isId($id)) { - return true; - } - } - return false; - } - - /** - * Scans the widgets for one with the appropriate - * attached label. - * @param string $label Attached label to try. - * @return boolean True if matched. - * @access public - */ - function isLabel($label) { - for ($i = 0, $count = count($this->widgets); $i < $count; $i++) { - if ($this->widgets[$i]->isLabel($label)) { - return true; - } - } - return false; - } - - /** - * Dispatches the value into the form encoded packet. - * @param SimpleEncoding $encoding Form packet. - * @access public - */ - function write($encoding) { - $encoding->add($this->getName(), $this->getValue()); - } -} - -/** - * A group of tags with the same name within a form. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleCheckboxGroup extends SimpleTagGroup { - - /** - * Accessor for current selected widget or false - * if none. - * @return string/array Widget values or false if none. - * @access public - */ - function getValue() { - $values = array(); - $widgets = $this->getWidgets(); - for ($i = 0, $count = count($widgets); $i < $count; $i++) { - if ($widgets[$i]->getValue() !== false) { - $values[] = $widgets[$i]->getValue(); - } - } - return $this->coerceValues($values); - } - - /** - * Accessor for starting value that is active. - * @return string/array Widget values or false if none. - * @access public - */ - function getDefault() { - $values = array(); - $widgets = $this->getWidgets(); - for ($i = 0, $count = count($widgets); $i < $count; $i++) { - if ($widgets[$i]->getDefault() !== false) { - $values[] = $widgets[$i]->getDefault(); - } - } - return $this->coerceValues($values); - } - - /** - * Accessor for current set values. - * @param string/array/boolean $values Either a single string, a - * hash or false for nothing set. - * @return boolean True if all values can be set. - * @access public - */ - function setValue($values) { - $values = $this->makeArray($values); - if (! $this->valuesArePossible($values)) { - return false; - } - $widgets = $this->getWidgets(); - for ($i = 0, $count = count($widgets); $i < $count; $i++) { - $possible = $widgets[$i]->getAttribute('value'); - if (in_array($widgets[$i]->getAttribute('value'), $values)) { - $widgets[$i]->setValue($possible); - } else { - $widgets[$i]->setValue(false); - } - } - return true; - } - - /** - * Tests to see if a possible value set is legal. - * @param string/array/boolean $values Either a single string, a - * hash or false for nothing set. - * @return boolean False if trying to set a - * missing value. - * @access private - */ - protected function valuesArePossible($values) { - $matches = array(); - $widgets = &$this->getWidgets(); - for ($i = 0, $count = count($widgets); $i < $count; $i++) { - $possible = $widgets[$i]->getAttribute('value'); - if (in_array($possible, $values)) { - $matches[] = $possible; - } - } - return ($values == $matches); - } - - /** - * Converts the output to an appropriate format. This means - * that no values is false, a single value is just that - * value and only two or more are contained in an array. - * @param array $values List of values of widgets. - * @return string/array/boolean Expected format for a tag. - * @access private - */ - protected function coerceValues($values) { - if (count($values) == 0) { - return false; - } elseif (count($values) == 1) { - return $values[0]; - } else { - return $values; - } - } - - /** - * Converts false or string into array. The opposite of - * the coercian method. - * @param string/array/boolean $value A single item is converted - * to a one item list. False - * gives an empty list. - * @return array List of values, possibly empty. - * @access private - */ - protected function makeArray($value) { - if ($value === false) { - return array(); - } - if (is_string($value)) { - return array($value); - } - return $value; - } -} - -/** - * A group of tags with the same name within a form. - * Used for radio buttons. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleRadioGroup extends SimpleTagGroup { - - /** - * Each tag is tried in turn until one is - * successfully set. The others will be - * unchecked if successful. - * @param string $value New value. - * @return boolean True if any allowed. - * @access public - */ - function setValue($value) { - if (! $this->valueIsPossible($value)) { - return false; - } - $index = false; - $widgets = $this->getWidgets(); - for ($i = 0, $count = count($widgets); $i < $count; $i++) { - if (! $widgets[$i]->setValue($value)) { - $widgets[$i]->setValue(false); - } - } - return true; - } - - /** - * Tests to see if a value is allowed. - * @param string Attempted value. - * @return boolean True if a valid value. - * @access private - */ - protected function valueIsPossible($value) { - $widgets = $this->getWidgets(); - for ($i = 0, $count = count($widgets); $i < $count; $i++) { - if ($widgets[$i]->getAttribute('value') == $value) { - return true; - } - } - return false; - } - - /** - * Accessor for current selected widget or false - * if none. - * @return string/boolean Value attribute or - * content of opton. - * @access public - */ - function getValue() { - $widgets = $this->getWidgets(); - for ($i = 0, $count = count($widgets); $i < $count; $i++) { - if ($widgets[$i]->getValue() !== false) { - return $widgets[$i]->getValue(); - } - } - return false; - } - - /** - * Accessor for starting value that is active. - * @return string/boolean Value of first checked - * widget or false if none. - * @access public - */ - function getDefault() { - $widgets = $this->getWidgets(); - for ($i = 0, $count = count($widgets); $i < $count; $i++) { - if ($widgets[$i]->getDefault() !== false) { - return $widgets[$i]->getDefault(); - } - } - return false; - } -} - -/** - * Tag to keep track of labels. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleLabelTag extends SimpleTag { - - /** - * Starts with a named tag with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('label', $attributes); - } - - /** - * Access for the ID to attach the label to. - * @return string For attribute. - * @access public - */ - function getFor() { - return $this->getAttribute('for'); - } -} - -/** - * Tag to aid parsing the form. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleFormTag extends SimpleTag { - - /** - * Starts with a named tag with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('form', $attributes); - } -} - -/** - * Tag to aid parsing the frames in a page. - * @package SimpleTest - * @subpackage WebTester - */ -class SimpleFrameTag extends SimpleTag { - - /** - * Starts with a named tag with attributes only. - * @param hash $attributes Attribute names and - * string values. - */ - function __construct($attributes) { - parent::__construct('frame', $attributes); - } - - /** - * Tag contains no content. - * @return boolean False. - * @access public - */ - function expectEndTag() { - return false; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/acceptance_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/acceptance_test.php deleted file mode 100644 index aada4338..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/acceptance_test.php +++ /dev/null @@ -1,1653 +0,0 @@ -addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $this->assertTrue($browser->get($this->samples() . 'network_confirm.php')); - $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); - $this->assertPattern('/Request method.*?
    GET<\/dd>/', $browser->getContent()); - $this->assertEqual($browser->getTitle(), 'Simple test target file'); - $this->assertEqual($browser->getResponseCode(), 200); - $this->assertEqual($browser->getMimeType(), 'text/html'); - } - - function testPost() { - $browser = new SimpleBrowser(); - $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $this->assertTrue($browser->post($this->samples() . 'network_confirm.php')); - $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); - $this->assertPattern('/Request method.*?
    POST<\/dd>/', $browser->getContent()); - } - - function testAbsoluteLinkFollowing() { - $browser = new SimpleBrowser(); - $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $browser->get($this->samples() . 'link_confirm.php'); - $this->assertTrue($browser->clickLink('Absolute')); - $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); - } - - function testRelativeEncodedeLinkFollowing() { - $browser = new SimpleBrowser(); - $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $browser->get($this->samples() . 'link_confirm.php'); - $this->assertTrue($browser->clickLink("m�rc�l kiek'eboe")); - $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); - } - - function testRelativeLinkFollowing() { - $browser = new SimpleBrowser(); - $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $browser->get($this->samples() . 'link_confirm.php'); - $this->assertTrue($browser->clickLink('Relative')); - $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); - } - - function testUnifiedClickLinkClicking() { - $browser = new SimpleBrowser(); - $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $browser->get($this->samples() . 'link_confirm.php'); - $this->assertTrue($browser->click('Relative')); - $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); - } - - function testIdLinkFollowing() { - $browser = new SimpleBrowser(); - $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $browser->get($this->samples() . 'link_confirm.php'); - $this->assertTrue($browser->clickLinkById(1)); - $this->assertPattern('/target for the SimpleTest/', $browser->getContent()); - } - - function testCookieReading() { - $browser = new SimpleBrowser(); - $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $browser->get($this->samples() . 'set_cookies.php'); - $this->assertEqual($browser->getCurrentCookieValue('session_cookie'), 'A'); - $this->assertEqual($browser->getCurrentCookieValue('short_cookie'), 'B'); - $this->assertEqual($browser->getCurrentCookieValue('day_cookie'), 'C'); - } - - function testSimpleSubmit() { - $browser = new SimpleBrowser(); - $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $browser->get($this->samples() . 'form.html'); - $this->assertTrue($browser->clickSubmit('Go!')); - $this->assertPattern('/Request method.*?
    POST<\/dd>/', $browser->getContent()); - $this->assertPattern('/go=\[Go!\]/', $browser->getContent()); - } - - function testUnifiedClickCanSubmit() { - $browser = new SimpleBrowser(); - $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $browser->get($this->samples() . 'form.html'); - $this->assertTrue($browser->click('Go!')); - $this->assertPattern('/go=\[Go!\]/', $browser->getContent()); - } -} - -class TestOfLocalFileBrowser extends UnitTestCase { - function samples() { - return 'file://'.dirname(__FILE__).'/site/'; - } - - function testGet() { - $browser = new SimpleBrowser(); - $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - $this->assertTrue($browser->get($this->samples() . 'file.html')); - $this->assertPattern('/Link to SimpleTest/', $browser->getContent()); - $this->assertEqual($browser->getTitle(), 'Link to SimpleTest'); - $this->assertFalse($browser->getResponseCode()); - $this->assertEqual($browser->getMimeType(), ''); - } -} - -class TestRadioFields extends SimpleTestAcceptanceTest { - function testSetFieldAsInteger() { - $this->get($this->samples() . 'form_with_radio_buttons.html'); - $this->assertTrue($this->setField('tested_field', 2)); - $this->clickSubmitByName('send'); - $this->assertEqual($this->getUrl(), $this->samples() . 'form_with_radio_buttons.html?tested_field=2&send=click+me'); - } - - function testSetFieldAsString() { - $this->get($this->samples() . 'form_with_radio_buttons.html'); - $this->assertTrue($this->setField('tested_field', '2')); - $this->clickSubmitByName('send'); - $this->assertEqual($this->getUrl(), $this->samples() . 'form_with_radio_buttons.html?tested_field=2&send=click+me'); - } -} - -class TestOfLiveFetching extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testFormWithArrayBasedInputs() { - $this->get($this->samples() . 'form_with_array_based_inputs.php'); - $this->setField('value[]', '3', '1'); - $this->setField('value[]', '4', '2'); - $this->clickSubmit('Go'); - $this->assertPattern('/QUERY_STRING : value%5B%5D=3&value%5B%5D=4&submit=Go/'); - } - - function testFormWithQuotedValues() { - $this->get($this->samples() . 'form_with_quoted_values.php'); - $this->assertField('a', 'default'); - $this->assertFieldById('text_field', 'default'); - $this->clickSubmit('Go'); - $this->assertPattern('/a=default&submit=Go/'); - } - - function testGet() { - $this->assertTrue($this->get($this->samples() . 'network_confirm.php')); - $this->assertEqual($this->getUrl(), $this->samples() . 'network_confirm.php'); - $this->assertText('target for the SimpleTest'); - $this->assertPattern('/Request method.*?
    GET<\/dd>/'); - $this->assertTitle('Simple test target file'); - $this->assertTitle(new PatternExpectation('/target file/')); - $this->assertResponse(200); - $this->assertMime('text/html'); - $this->assertHeader('connection', 'close'); - $this->assertHeader('connection', new PatternExpectation('/los/')); - } - - function testSlowGet() { - $this->assertTrue($this->get($this->samples() . 'slow_page.php')); - } - - function testTimedOutGet() { - $this->setConnectionTimeout(1); - $this->ignoreErrors(); - $this->assertFalse($this->get($this->samples() . 'slow_page.php')); - } - - function testPost() { - $this->assertTrue($this->post($this->samples() . 'network_confirm.php')); - $this->assertText('target for the SimpleTest'); - $this->assertPattern('/Request method.*?
    POST<\/dd>/'); - } - - function testGetWithData() { - $this->get($this->samples() . 'network_confirm.php', array("a" => "aaa")); - $this->assertPattern('/Request method.*?
    GET<\/dd>/'); - $this->assertText('a=[aaa]'); - } - - function testPostWithData() { - $this->post($this->samples() . 'network_confirm.php', array("a" => "aaa")); - $this->assertPattern('/Request method.*?
    POST<\/dd>/'); - $this->assertText('a=[aaa]'); - } - - function testPostWithRecursiveData() { - $this->post($this->samples() . 'network_confirm.php', array("a" => "aaa")); - $this->assertPattern('/Request method.*?
    POST<\/dd>/'); - $this->assertText('a=[aaa]'); - - $this->post($this->samples() . 'network_confirm.php', array("a[aa]" => "aaa")); - $this->assertPattern('/Request method.*?
    POST<\/dd>/'); - $this->assertText('a=[aa=[aaa]]'); - - $this->post($this->samples() . 'network_confirm.php', array("a[aa][aaa]" => "aaaa")); - $this->assertPattern('/Request method.*?
    POST<\/dd>/'); - $this->assertText('a=[aa=[aaa=[aaaa]]]'); - - $this->post($this->samples() . 'network_confirm.php', array("a" => array("aa" => "aaa"))); - $this->assertPattern('/Request method.*?
    POST<\/dd>/'); - $this->assertText('a=[aa=[aaa]]'); - - $this->post($this->samples() . 'network_confirm.php', array("a" => array("aa" => array("aaa" => "aaaa")))); - $this->assertPattern('/Request method.*?
    POST<\/dd>/'); - $this->assertText('a=[aa=[aaa=[aaaa]]]'); - } - - function testRelativeGet() { - $this->get($this->samples() . 'link_confirm.php'); - $this->assertTrue($this->get('network_confirm.php')); - $this->assertText('target for the SimpleTest'); - } - - function testRelativePost() { - $this->post($this->samples() . 'link_confirm.php'); - $this->assertTrue($this->post('network_confirm.php')); - $this->assertText('target for the SimpleTest'); - } -} - -class TestOfLinkFollowing extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testLinkAssertions() { - $this->get($this->samples() . 'link_confirm.php'); - $this->assertLink('Absolute', $this->samples() . 'network_confirm.php'); - $this->assertLink('Absolute', new PatternExpectation('/confirm/')); - $this->assertClickable('Absolute'); - } - - function testAbsoluteLinkFollowing() { - $this->get($this->samples() . 'link_confirm.php'); - $this->assertTrue($this->clickLink('Absolute')); - $this->assertText('target for the SimpleTest'); - } - - function testRelativeLinkFollowing() { - $this->get($this->samples() . 'link_confirm.php'); - $this->assertTrue($this->clickLink('Relative')); - $this->assertText('target for the SimpleTest'); - } - - function testLinkIdFollowing() { - $this->get($this->samples() . 'link_confirm.php'); - $this->assertLinkById(1); - $this->assertTrue($this->clickLinkById(1)); - $this->assertText('target for the SimpleTest'); - } - - function testAbsoluteUrlBehavesAbsolutely() { - $this->get($this->samples() . 'link_confirm.php'); - $this->get('http://www.lastcraft.com'); - $this->assertText('No guarantee of quality is given or even intended'); - } - - function testRelativeUrlRespectsBaseTag() { - $this->get($this->samples() . 'base_tag/base_link.html'); - $this->click('Back to test pages'); - $this->assertTitle('Simple test target file'); - } -} - -class TestOfLivePageLinkingWithMinimalLinks extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testClickToExplicitelyNamedSelfReturns() { - $this->get($this->samples() . 'front_controller_style/a_page.php'); - $this->assertEqual($this->getUrl(), $this->samples() . 'front_controller_style/a_page.php'); - $this->assertTitle('Simple test page with links'); - $this->assertLink('Self'); - $this->clickLink('Self'); - $this->assertTitle('Simple test page with links'); - } - - function testClickToMissingPageReturnsToSamePage() { - $this->get($this->samples() . 'front_controller_style/a_page.php'); - $this->clickLink('No page'); - $this->assertTitle('Simple test page with links'); - $this->assertText('[action=no_page]'); - } - - function testClickToBareActionReturnsToSamePage() { - $this->get($this->samples() . 'front_controller_style/a_page.php'); - $this->clickLink('Bare action'); - $this->assertTitle('Simple test page with links'); - $this->assertText('[action=]'); - } - - function testClickToSingleQuestionMarkReturnsToSamePage() { - $this->get($this->samples() . 'front_controller_style/a_page.php'); - $this->clickLink('Empty query'); - $this->assertTitle('Simple test page with links'); - } - - function testClickToEmptyStringReturnsToSamePage() { - $this->get($this->samples() . 'front_controller_style/a_page.php'); - $this->clickLink('Empty link'); - $this->assertTitle('Simple test page with links'); - } - - function testClickToSingleDotGoesToCurrentDirectory() { - $this->get($this->samples() . 'front_controller_style/a_page.php'); - $this->clickLink('Current directory'); - $this->assertTitle( - 'Simple test front controller', - '%s -> index.php needs to be set as a default web server home page'); - } - - function testClickBackADirectoryLevel() { - $this->get($this->samples() . 'front_controller_style/'); - $this->clickLink('Down one'); - $this->assertPattern('|Index of .*?/test|i'); - } -} - -class TestOfLiveFrontControllerEmulation extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testJumpToNamedPage() { - $this->get($this->samples() . 'front_controller_style/'); - $this->assertText('Simple test front controller'); - $this->clickLink('Index'); - $this->assertResponse(200); - $this->assertText('[action=index]'); - } - - function testJumpToUnnamedPage() { - $this->get($this->samples() . 'front_controller_style/'); - $this->clickLink('No page'); - $this->assertResponse(200); - $this->assertText('Simple test front controller'); - $this->assertText('[action=no_page]'); - } - - function testJumpToUnnamedPageWithBareParameter() { - $this->get($this->samples() . 'front_controller_style/'); - $this->clickLink('Bare action'); - $this->assertResponse(200); - $this->assertText('Simple test front controller'); - $this->assertText('[action=]'); - } - - function testJumpToUnnamedPageWithEmptyQuery() { - $this->get($this->samples() . 'front_controller_style/'); - $this->clickLink('Empty query'); - $this->assertResponse(200); - $this->assertPattern('/Simple test front controller/'); - $this->assertPattern('/raw get data.*?\[\].*?get data/si'); - } - - function testJumpToUnnamedPageWithEmptyLink() { - $this->get($this->samples() . 'front_controller_style/'); - $this->clickLink('Empty link'); - $this->assertResponse(200); - $this->assertPattern('/Simple test front controller/'); - $this->assertPattern('/raw get data.*?\[\].*?get data/si'); - } - - function testJumpBackADirectoryLevel() { - $this->get($this->samples() . 'front_controller_style/'); - $this->clickLink('Down one'); - $this->assertPattern('|Index of .*?/test|'); - } - - function testSubmitToNamedPage() { - $this->get($this->samples() . 'front_controller_style/'); - $this->assertText('Simple test front controller'); - $this->clickSubmit('Index'); - $this->assertResponse(200); - $this->assertText('[action=Index]'); - } - - function testSubmitToSameDirectory() { - $this->get($this->samples() . 'front_controller_style/index.php'); - $this->clickSubmit('Same directory'); - $this->assertResponse(200); - $this->assertText('[action=Same+directory]'); - } - - function testSubmitToEmptyAction() { - $this->get($this->samples() . 'front_controller_style/index.php'); - $this->clickSubmit('Empty action'); - $this->assertResponse(200); - $this->assertText('[action=Empty+action]'); - } - - function testSubmitToNoAction() { - $this->get($this->samples() . 'front_controller_style/index.php'); - $this->clickSubmit('No action'); - $this->assertResponse(200); - $this->assertText('[action=No+action]'); - } - - function testSubmitBackADirectoryLevel() { - $this->get($this->samples() . 'front_controller_style/'); - $this->clickSubmit('Down one'); - $this->assertPattern('|Index of .*?/test|'); - } - - function testSubmitToNamedPageWithMixedPostAndGet() { - $this->get($this->samples() . 'front_controller_style/?a=A'); - $this->assertText('Simple test front controller'); - $this->clickSubmit('Index post'); - $this->assertText('action=[Index post]'); - $this->assertNoText('[a=A]'); - } - - function testSubmitToSameDirectoryMixedPostAndGet() { - $this->get($this->samples() . 'front_controller_style/index.php?a=A'); - $this->clickSubmit('Same directory post'); - $this->assertText('action=[Same directory post]'); - $this->assertNoText('[a=A]'); - } - - function testSubmitToEmptyActionMixedPostAndGet() { - $this->get($this->samples() . 'front_controller_style/index.php?a=A'); - $this->clickSubmit('Empty action post'); - $this->assertText('action=[Empty action post]'); - $this->assertText('[a=A]'); - } - - function testSubmitToNoActionMixedPostAndGet() { - $this->get($this->samples() . 'front_controller_style/index.php?a=A'); - $this->clickSubmit('No action post'); - $this->assertText('action=[No action post]'); - $this->assertText('[a=A]'); - } -} - -class TestOfLiveHeaders extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testConfirmingHeaderExistence() { - $this->get('http://www.lastcraft.com/'); - $this->assertHeader('content-type'); - $this->assertHeader('content-type', 'text/html'); - $this->assertHeader('content-type', new PatternExpectation('/HTML/i')); - $this->assertNoHeader('WWW-Authenticate'); - } -} - -class TestOfLiveRedirects extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testNoRedirects() { - $this->setMaximumRedirects(0); - $this->get($this->samples() . 'redirect.php'); - $this->assertTitle('Redirection test'); - } - - function testRedirects() { - $this->setMaximumRedirects(1); - $this->get($this->samples() . 'redirect.php'); - $this->assertTitle('Simple test target file'); - } - - function testRedirectLosesGetData() { - $this->get($this->samples() . 'redirect.php', array('a' => 'aaa')); - $this->assertNoText('a=[aaa]'); - } - - function testRedirectKeepsExtraRequestDataOfItsOwn() { - $this->get($this->samples() . 'redirect.php'); - $this->assertText('r=[rrr]'); - } - - function testRedirectLosesPostData() { - $this->post($this->samples() . 'redirect.php', array('a' => 'aaa')); - $this->assertTitle('Simple test target file'); - $this->assertNoText('a=[aaa]'); - } - - function testRedirectWithBaseUrlChange() { - $this->get($this->samples() . 'base_change_redirect.php'); - $this->assertTitle('Simple test target file in folder'); - $this->get($this->samples() . 'path/base_change_redirect.php'); - $this->assertTitle('Simple test target file'); - } - - function testRedirectWithDoubleBaseUrlChange() { - $this->get($this->samples() . 'double_base_change_redirect.php'); - $this->assertTitle('Simple test target file'); - } -} - -class TestOfLiveCookies extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function here() { - return new SimpleUrl($this->samples()); - } - - function thisHost() { - $here = $this->here(); - return $here->getHost(); - } - - function thisPath() { - $here = $this->here(); - return $here->getPath(); - } - - function testCookieSettingAndAssertions() { - $this->setCookie('a', 'Test cookie a'); - $this->setCookie('b', 'Test cookie b', $this->thisHost()); - $this->setCookie('c', 'Test cookie c', $this->thisHost(), $this->thisPath()); - $this->get($this->samples() . 'network_confirm.php'); - $this->assertText('Test cookie a'); - $this->assertText('Test cookie b'); - $this->assertText('Test cookie c'); - $this->assertCookie('a'); - $this->assertCookie('b', 'Test cookie b'); - $this->assertTrue($this->getCookie('c') == 'Test cookie c'); - } - - function testNoCookieSetWhenCookiesDisabled() { - $this->setCookie('a', 'Test cookie a'); - $this->ignoreCookies(); - $this->get($this->samples() . 'network_confirm.php'); - $this->assertNoText('Test cookie a'); - } - - function testCookieReading() { - $this->get($this->samples() . 'set_cookies.php'); - $this->assertCookie('session_cookie', 'A'); - $this->assertCookie('short_cookie', 'B'); - $this->assertCookie('day_cookie', 'C'); - } - - function testNoCookie() { - $this->assertNoCookie('aRandomCookie'); - } - - function testNoCookieReadingWhenCookiesDisabled() { - $this->ignoreCookies(); - $this->get($this->samples() . 'set_cookies.php'); - $this->assertNoCookie('session_cookie'); - $this->assertNoCookie('short_cookie'); - $this->assertNoCookie('day_cookie'); - } - - function testCookiePatternAssertions() { - $this->get($this->samples() . 'set_cookies.php'); - $this->assertCookie('session_cookie', new PatternExpectation('/a/i')); - } - - function testTemporaryCookieExpiry() { - $this->get($this->samples() . 'set_cookies.php'); - $this->restart(); - $this->assertNoCookie('session_cookie'); - $this->assertCookie('day_cookie', 'C'); - } - - function testTimedCookieExpiryWith100SecondMargin() { - $this->get($this->samples() . 'set_cookies.php'); - $this->ageCookies(3600); - $this->restart(time() + 100); - $this->assertNoCookie('session_cookie'); - $this->assertNoCookie('hour_cookie'); - $this->assertCookie('day_cookie', 'C'); - } - - function testNoClockOverDriftBy100Seconds() { - $this->get($this->samples() . 'set_cookies.php'); - $this->restart(time() + 200); - $this->assertNoCookie( - 'short_cookie', - '%s -> Please check your computer clock setting if you are not using NTP'); - } - - function testNoClockUnderDriftBy100Seconds() { - $this->get($this->samples() . 'set_cookies.php'); - $this->restart(time() + 0); - $this->assertCookie( - 'short_cookie', - 'B', - '%s -> Please check your computer clock setting if you are not using NTP'); - } - - function testCookiePath() { - $this->get($this->samples() . 'set_cookies.php'); - $this->assertNoCookie('path_cookie', 'D'); - $this->get('./path/show_cookies.php'); - $this->assertPattern('/path_cookie/'); - $this->assertCookie('path_cookie', 'D'); - } -} - -class LiveTestOfForms extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testSimpleSubmit() { - $this->get($this->samples() . 'form.html'); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertPattern('/Request method.*?
    POST<\/dd>/'); - $this->assertText('go=[Go!]'); - } - - function testDefaultFormValues() { - $this->get($this->samples() . 'form.html'); - $this->assertFieldByName('a', ''); - $this->assertFieldByName('b', 'Default text'); - $this->assertFieldByName('c', ''); - $this->assertFieldByName('d', 'd1'); - $this->assertFieldByName('e', false); - $this->assertFieldByName('f', 'on'); - $this->assertFieldByName('g', 'g3'); - $this->assertFieldByName('h', 2); - $this->assertFieldByName('go', 'Go!'); - $this->assertClickable('Go!'); - $this->assertSubmit('Go!'); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('go=[Go!]'); - $this->assertText('a=[]'); - $this->assertText('b=[Default text]'); - $this->assertText('c=[]'); - $this->assertText('d=[d1]'); - $this->assertNoText('e=['); - $this->assertText('f=[on]'); - $this->assertText('g=[g3]'); - } - - function testFormSubmissionByButtonLabel() { - $this->get($this->samples() . 'form.html'); - $this->setFieldByName('a', 'aaa'); - $this->setFieldByName('b', 'bbb'); - $this->setFieldByName('c', 'ccc'); - $this->setFieldByName('d', 'D2'); - $this->setFieldByName('e', 'on'); - $this->setFieldByName('f', false); - $this->setFieldByName('g', 'g2'); - $this->setFieldByName('h', 1); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('a=[aaa]'); - $this->assertText('b=[bbb]'); - $this->assertText('c=[ccc]'); - $this->assertText('d=[d2]'); - $this->assertText('e=[on]'); - $this->assertNoText('f=['); - $this->assertText('g=[g2]'); - } - - function testAdditionalFormValues() { - $this->get($this->samples() . 'form.html'); - $this->assertTrue($this->clickSubmit('Go!', array('add' => 'A'))); - $this->assertText('go=[Go!]'); - $this->assertText('add=[A]'); - } - - function testFormSubmissionByName() { - $this->get($this->samples() . 'form.html'); - $this->setFieldByName('a', 'A'); - $this->assertTrue($this->clickSubmitByName('go')); - $this->assertText('a=[A]'); - } - - function testFormSubmissionByNameAndAdditionalParameters() { - $this->get($this->samples() . 'form.html'); - $this->assertTrue($this->clickSubmitByName('go', array('add' => 'A'))); - $this->assertText('go=[Go!]'); - $this->assertText('add=[A]'); - } - - function testFormSubmissionBySubmitButtonLabeledSubmit() { - $this->get($this->samples() . 'form.html'); - $this->assertTrue($this->clickSubmitByName('test')); - $this->assertText('test=[Submit]'); - } - - function testFormSubmissionWithIds() { - $this->get($this->samples() . 'form.html'); - $this->assertFieldById(1, ''); - $this->assertFieldById(2, 'Default text'); - $this->assertFieldById(3, ''); - $this->assertFieldById(4, 'd1'); - $this->assertFieldById(5, false); - $this->assertFieldById(6, 'on'); - $this->assertFieldById(8, 'g3'); - $this->assertFieldById(11, 2); - $this->setFieldById(1, 'aaa'); - $this->setFieldById(2, 'bbb'); - $this->setFieldById(3, 'ccc'); - $this->setFieldById(4, 'D2'); - $this->setFieldById(5, 'on'); - $this->setFieldById(6, false); - $this->setFieldById(8, 'g2'); - $this->setFieldById(11, 'H1'); - $this->assertTrue($this->clickSubmitById(99)); - $this->assertText('a=[aaa]'); - $this->assertText('b=[bbb]'); - $this->assertText('c=[ccc]'); - $this->assertText('d=[d2]'); - $this->assertText('e=[on]'); - $this->assertNoText('f=['); - $this->assertText('g=[g2]'); - $this->assertText('h=[1]'); - $this->assertText('go=[Go!]'); - } - - function testFormSubmissionWithLabels() { - $this->get($this->samples() . 'form.html'); - $this->assertField('Text A', ''); - $this->assertField('Text B', 'Default text'); - $this->assertField('Text area C', ''); - $this->assertField('Selection D', 'd1'); - $this->assertField('Checkbox E', false); - $this->assertField('Checkbox F', 'on'); - $this->assertField('3', 'g3'); - $this->assertField('Selection H', 2); - $this->setField('Text A', 'aaa'); - $this->setField('Text B', 'bbb'); - $this->setField('Text area C', 'ccc'); - $this->setField('Selection D', 'D2'); - $this->setField('Checkbox E', 'on'); - $this->setField('Checkbox F', false); - $this->setField('2', 'g2'); - $this->setField('Selection H', 'H1'); - $this->clickSubmit('Go!'); - $this->assertText('a=[aaa]'); - $this->assertText('b=[bbb]'); - $this->assertText('c=[ccc]'); - $this->assertText('d=[d2]'); - $this->assertText('e=[on]'); - $this->assertNoText('f=['); - $this->assertText('g=[g2]'); - $this->assertText('h=[1]'); - $this->assertText('go=[Go!]'); - } - - function testSettingCheckboxWithBooleanTrueSetsUnderlyingValue() { - $this->get($this->samples() . 'form.html'); - $this->setField('Checkbox E', true); - $this->assertField('Checkbox E', 'on'); - $this->clickSubmit('Go!'); - $this->assertText('e=[on]'); - } - - function testFormSubmissionWithMixedPostAndGet() { - $this->get($this->samples() . 'form_with_mixed_post_and_get.html'); - $this->setField('Text A', 'Hello'); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('a=[Hello]'); - $this->assertText('x=[X]'); - $this->assertText('y=[Y]'); - } - - function testFormSubmissionWithMixedPostAndEncodedGet() { - $this->get($this->samples() . 'form_with_mixed_post_and_get.html'); - $this->setField('Text B', 'Hello'); - $this->assertTrue($this->clickSubmit('Go encoded!')); - $this->assertText('b=[Hello]'); - $this->assertText('x=[X]'); - $this->assertText('y=[Y]'); - } - - function testFormSubmissionWithoutAction() { - $this->get($this->samples() . 'form_without_action.php?test=test'); - $this->assertText('_GET : [test]'); - $this->assertTrue($this->clickSubmit('Submit Post With Empty Action')); - $this->assertText('_GET : [test]'); - $this->assertText('_POST : [test]'); - } - - function testImageSubmissionByLabel() { - $this->get($this->samples() . 'form.html'); - $this->assertImage('Image go!'); - $this->assertTrue($this->clickImage('Image go!', 10, 12)); - $this->assertText('go_x=[10]'); - $this->assertText('go_y=[12]'); - } - - function testImageSubmissionByLabelWithAdditionalParameters() { - $this->get($this->samples() . 'form.html'); - $this->assertTrue($this->clickImage('Image go!', 10, 12, array('add' => 'A'))); - $this->assertText('add=[A]'); - } - - function testImageSubmissionByName() { - $this->get($this->samples() . 'form.html'); - $this->assertTrue($this->clickImageByName('go', 10, 12)); - $this->assertText('go_x=[10]'); - $this->assertText('go_y=[12]'); - } - - function testImageSubmissionById() { - $this->get($this->samples() . 'form.html'); - $this->assertTrue($this->clickImageById(97, 10, 12)); - $this->assertText('go_x=[10]'); - $this->assertText('go_y=[12]'); - } - - function testButtonSubmissionByLabel() { - $this->get($this->samples() . 'form.html'); - $this->assertTrue($this->clickSubmit('Button go!', 10, 12)); - $this->assertPattern('/go=\[ButtonGo\]/s'); - } - - function testNamelessSubmitSendsNoValue() { - $this->get($this->samples() . 'form_with_unnamed_submit.html'); - $this->click('Go!'); - $this->assertNoText('Go!'); - $this->assertNoText('submit'); - } - - function testNamelessImageSendsXAndYValues() { - $this->get($this->samples() . 'form_with_unnamed_submit.html'); - $this->clickImage('Image go!', 4, 5); - $this->assertNoText('ImageGo'); - $this->assertText('x=[4]'); - $this->assertText('y=[5]'); - } - - function testNamelessButtonSendsNoValue() { - $this->get($this->samples() . 'form_with_unnamed_submit.html'); - $this->click('Button Go!'); - $this->assertNoText('ButtonGo'); - } - - function testSelfSubmit() { - $this->get($this->samples() . 'self_form.php'); - $this->assertNoText('[Submitted]'); - $this->assertNoText('[Wrong form]'); - $this->assertTrue($this->clickSubmit()); - $this->assertText('[Submitted]'); - $this->assertNoText('[Wrong form]'); - $this->assertTitle('Test of form self submission'); - } - - function testSelfSubmitWithParameters() { - $this->get($this->samples() . 'self_form.php'); - $this->setFieldByName('visible', 'Resent'); - $this->assertTrue($this->clickSubmit()); - $this->assertText('[Resent]'); - } - - function testSettingOfBlankOption() { - $this->get($this->samples() . 'form.html'); - $this->assertTrue($this->setFieldByName('d', '')); - $this->clickSubmit('Go!'); - $this->assertText('d=[]'); - } - - function testAssertingFieldValueWithPattern() { - $this->get($this->samples() . 'form.html'); - $this->setField('c', 'A very long string'); - $this->assertField('c', new PatternExpectation('/very long/')); - } - - function testSendingMultipartFormDataEncodedForm() { - $this->get($this->samples() . 'form_data_encoded_form.html'); - $this->assertField('Text A', ''); - $this->assertField('Text B', 'Default text'); - $this->assertField('Text area C', ''); - $this->assertField('Selection D', 'd1'); - $this->assertField('Checkbox E', false); - $this->assertField('Checkbox F', 'on'); - $this->assertField('3', 'g3'); - $this->assertField('Selection H', 2); - $this->setField('Text A', 'aaa'); - $this->setField('Text B', 'bbb'); - $this->setField('Text area C', 'ccc'); - $this->setField('Selection D', 'D2'); - $this->setField('Checkbox E', 'on'); - $this->setField('Checkbox F', false); - $this->setField('2', 'g2'); - $this->setField('Selection H', 'H1'); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('a=[aaa]'); - $this->assertText('b=[bbb]'); - $this->assertText('c=[ccc]'); - $this->assertText('d=[d2]'); - $this->assertText('e=[on]'); - $this->assertNoText('f=['); - $this->assertText('g=[g2]'); - $this->assertText('h=[1]'); - $this->assertText('go=[Go!]'); - } - - function testSettingVariousBlanksInFields() { - $this->get($this->samples() . 'form_with_false_defaults.html'); - $this->assertField('Text A', ''); - $this->setField('Text A', '0'); - $this->assertField('Text A', '0'); - $this->assertField('Text area B', ''); - $this->setField('Text area B', '0'); - $this->assertField('Text area B', '0'); - $this->assertField('Text area C', " "); - $this->assertField('Selection D', ''); - $this->setField('Selection D', 'D2'); - $this->assertField('Selection D', 'D2'); - $this->setField('Selection D', 'D3'); - $this->assertField('Selection D', '0'); - $this->setField('Selection D', 'D4'); - $this->assertField('Selection D', '?'); - $this->assertField('Checkbox E', ''); - $this->assertField('Checkbox F', 'on'); - $this->assertField('Checkbox G', '0'); - $this->assertField('Checkbox H', '?'); - $this->assertFieldByName('i', 'on'); - $this->setFieldByName('i', ''); - $this->assertFieldByName('i', ''); - $this->setFieldByName('i', '0'); - $this->assertFieldByName('i', '0'); - $this->setFieldByName('i', '?'); - $this->assertFieldByName('i', '?'); - } - - function testSubmissionOfBlankFields() { - $this->get($this->samples() . 'form_with_false_defaults.html'); - $this->setField('Text A', ''); - $this->setField('Text area B', ''); - $this->setFieldByName('i', ''); - $this->click('Go!'); - $this->assertText('a=[]'); - $this->assertText('b=[]'); - $this->assertPattern('/c=\[ \]/'); - $this->assertText('d=[]'); - $this->assertText('e=[]'); - $this->assertText('i=[]'); - } - - function testSubmissionOfEmptyValues() { - $this->get($this->samples() . 'form_with_false_defaults.html'); - $this->setField('Selection D', 'D2'); - $this->click('Go!'); - $this->assertText('a=[]'); - $this->assertText('b=[]'); - $this->assertText('d=[D2]'); - $this->assertText('f=[on]'); - $this->assertText('i=[on]'); - } - - function testSubmissionOfZeroes() { - $this->get($this->samples() . 'form_with_false_defaults.html'); - $this->setField('Text A', '0'); - $this->setField('Text area B', '0'); - $this->setField('Selection D', 'D3'); - $this->setFieldByName('i', '0'); - $this->click('Go!'); - $this->assertText('a=[0]'); - $this->assertText('b=[0]'); - $this->assertText('d=[0]'); - $this->assertText('g=[0]'); - $this->assertText('i=[0]'); - } - - function testSubmissionOfQuestionMarks() { - $this->get($this->samples() . 'form_with_false_defaults.html'); - $this->setField('Text A', '?'); - $this->setField('Text area B', '?'); - $this->setField('Selection D', 'D4'); - $this->setFieldByName('i', '?'); - $this->click('Go!'); - $this->assertText('a=[?]'); - $this->assertText('b=[?]'); - $this->assertText('d=[?]'); - $this->assertText('h=[?]'); - $this->assertText('i=[?]'); - } - - function testSubmissionOfHtmlEncodedValues() { - $this->get($this->samples() . 'form_with_tricky_defaults.html'); - $this->assertField('Text A', '&\'"<>'); - $this->assertField('Text B', '"'); - $this->assertField('Text area C', '&\'"<>'); - $this->assertField('Selection D', "'"); - $this->assertField('Checkbox E', '&\'"<>'); - $this->assertField('Checkbox F', false); - $this->assertFieldByname('i', "'"); - $this->click('Go!'); - $this->assertText('a=[&\'"<>, "]'); - $this->assertText('c=[&\'"<>]'); - $this->assertText("d=[']"); - $this->assertText('e=[&\'"<>]'); - $this->assertText("i=[']"); - } - - function testFormActionRespectsBaseTag() { - $this->get($this->samples() . 'base_tag/form.html'); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('go=[Go!]'); - $this->assertText('a=[]'); - } -} - -class TestOfLiveMultiValueWidgets extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testDefaultFormValueSubmission() { - $this->get($this->samples() . 'multiple_widget_form.html'); - $this->assertFieldByName('a', array('a2', 'a3')); - $this->assertFieldByName('b', array('b2', 'b3')); - $this->assertFieldByName('c[]', array('c2', 'c3')); - $this->assertFieldByName('d', array('2', '3')); - $this->assertFieldByName('e', array('2', '3')); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('a=[a2, a3]'); - $this->assertText('b=[b2, b3]'); - $this->assertText('c=[c2, c3]'); - $this->assertText('d=[2, 3]'); - $this->assertText('e=[2, 3]'); - } - - function testSubmittingMultipleValues() { - $this->get($this->samples() . 'multiple_widget_form.html'); - $this->setFieldByName('a', array('a1', 'a4')); - $this->assertFieldByName('a', array('a1', 'a4')); - $this->assertFieldByName('a', array('a4', 'a1')); - $this->setFieldByName('b', array('b1', 'b4')); - $this->assertFieldByName('b', array('b1', 'b4')); - $this->setFieldByName('c[]', array('c1', 'c4')); - $this->assertField('c[]', array('c1', 'c4')); - $this->setFieldByName('d', array('1', '4')); - $this->assertField('d', array('1', '4')); - $this->setFieldByName('e', array('e1', 'e4')); - $this->assertField('e', array('1', '4')); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('a=[a1, a4]'); - $this->assertText('b=[b1, b4]'); - $this->assertText('c=[c1, c4]'); - $this->assertText('d=[1, 4]'); - $this->assertText('e=[1, 4]'); - } - - function testSettingByOptionValue() { - $this->get($this->samples() . 'multiple_widget_form.html'); - $this->setFieldByName('d', array('1', '4')); - $this->assertField('d', array('1', '4')); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('d=[1, 4]'); - } - - function testSubmittingMultipleValuesByLabel() { - $this->get($this->samples() . 'multiple_widget_form.html'); - $this->setField('Multiple selection A', array('a1', 'a4')); - $this->assertField('Multiple selection A', array('a1', 'a4')); - $this->assertField('Multiple selection A', array('a4', 'a1')); - $this->setField('multiple selection C', array('c1', 'c4')); - $this->assertField('multiple selection C', array('c1', 'c4')); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('a=[a1, a4]'); - $this->assertText('c=[c1, c4]'); - } - - function testSavantStyleHiddenFieldDefaults() { - $this->get($this->samples() . 'savant_style_form.html'); - $this->assertFieldByName('a', array('a0')); - $this->assertFieldByName('b', array('b0')); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('a=[a0]'); - $this->assertText('b=[b0]'); - } - - function testSavantStyleHiddenDefaultsAreOverridden() { - $this->get($this->samples() . 'savant_style_form.html'); - $this->assertTrue($this->setFieldByName('a', array('a1'))); - $this->assertTrue($this->setFieldByName('b', 'b1')); - $this->assertTrue($this->clickSubmit('Go!')); - $this->assertText('a=[a1]'); - $this->assertText('b=[b1]'); - } - - function testSavantStyleFormSettingById() { - $this->get($this->samples() . 'savant_style_form.html'); - $this->assertFieldById(1, array('a0')); - $this->assertFieldById(4, array('b0')); - $this->assertTrue($this->setFieldById(2, 'a1')); - $this->assertTrue($this->setFieldById(5, 'b1')); - $this->assertTrue($this->clickSubmitById(99)); - $this->assertText('a=[a1]'); - $this->assertText('b=[b1]'); - } -} - -class TestOfFileUploads extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testSingleFileUpload() { - $this->get($this->samples() . 'upload_form.html'); - $this->assertTrue($this->setField('Content:', - dirname(__FILE__) . '/support/upload_sample.txt')); - $this->assertField('Content:', dirname(__FILE__) . '/support/upload_sample.txt'); - $this->click('Go!'); - $this->assertText('Sample for testing file upload'); - } - - function testMultipleFileUpload() { - $this->get($this->samples() . 'upload_form.html'); - $this->assertTrue($this->setField('Content:', - dirname(__FILE__) . '/support/upload_sample.txt')); - $this->assertTrue($this->setField('Supplemental:', - dirname(__FILE__) . '/support/supplementary_upload_sample.txt')); - $this->assertField('Supplemental:', - dirname(__FILE__) . '/support/supplementary_upload_sample.txt'); - $this->click('Go!'); - $this->assertText('Sample for testing file upload'); - $this->assertText('Some more text content'); - } - - function testBinaryFileUpload() { - $this->get($this->samples() . 'upload_form.html'); - $this->assertTrue($this->setField('Content:', - dirname(__FILE__) . '/support/latin1_sample')); - $this->click('Go!'); - $this->assertText( - implode('', file(dirname(__FILE__) . '/support/latin1_sample'))); - } -} - -class TestOfLiveHistoryNavigation extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testRetry() { - $this->get($this->samples() . 'cookie_based_counter.php'); - $this->assertPattern('/count: 1/i'); - $this->retry(); - $this->assertPattern('/count: 2/i'); - $this->retry(); - $this->assertPattern('/count: 3/i'); - } - - function testOfBackButton() { - $this->get($this->samples() . '1.html'); - $this->clickLink('2'); - $this->assertTitle('2'); - $this->assertTrue($this->back()); - $this->assertTitle('1'); - $this->assertTrue($this->forward()); - $this->assertTitle('2'); - $this->assertFalse($this->forward()); - } - - function testGetRetryResubmitsData() { - $this->assertTrue($this->get( - $this->samples() . 'network_confirm.php?a=aaa')); - $this->assertPattern('/Request method.*?
    GET<\/dd>/'); - $this->assertText('a=[aaa]'); - $this->retry(); - $this->assertPattern('/Request method.*?
    GET<\/dd>/'); - $this->assertText('a=[aaa]'); - } - - function testGetRetryResubmitsExtraData() { - $this->assertTrue($this->get( - $this->samples() . 'network_confirm.php', - array('a' => 'aaa'))); - $this->assertPattern('/Request method.*?
    GET<\/dd>/'); - $this->assertText('a=[aaa]'); - $this->retry(); - $this->assertPattern('/Request method.*?
    GET<\/dd>/'); - $this->assertText('a=[aaa]'); - } - - function testPostRetryResubmitsData() { - $this->assertTrue($this->post( - $this->samples() . 'network_confirm.php', - array('a' => 'aaa'))); - $this->assertPattern('/Request method.*?
    POST<\/dd>/'); - $this->assertText('a=[aaa]'); - $this->retry(); - $this->assertPattern('/Request method.*?
    POST<\/dd>/'); - $this->assertText('a=[aaa]'); - } - - function testGetRetryResubmitsRepeatedData() { - $this->assertTrue($this->get( - $this->samples() . 'network_confirm.php?a=1&a=2')); - $this->assertPattern('/Request method.*?
    GET<\/dd>/'); - $this->assertText('a=[1, 2]'); - $this->retry(); - $this->assertPattern('/Request method.*?
    GET<\/dd>/'); - $this->assertText('a=[1, 2]'); - } -} - -class TestOfLiveAuthentication extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testChallengeFromProtectedPage() { - $this->get($this->samples() . 'protected/'); - $this->assertResponse(401); - $this->assertAuthentication('Basic'); - $this->assertRealm('SimpleTest basic authentication'); - $this->assertRealm(new PatternExpectation('/simpletest/i')); - $this->authenticate('test', 'secret'); - $this->assertResponse(200); - $this->retry(); - $this->assertResponse(200); - } - - function testTrailingSlashImpliedWithinRealm() { - $this->get($this->samples() . 'protected/'); - $this->authenticate('test', 'secret'); - $this->assertResponse(200); - $this->get($this->samples() . 'protected'); - $this->assertResponse(200); - } - - function testTrailingSlashImpliedSettingRealm() { - $this->get($this->samples() . 'protected'); - $this->authenticate('test', 'secret'); - $this->assertResponse(200); - $this->get($this->samples() . 'protected/'); - $this->assertResponse(200); - } - - function testEncodedAuthenticationFetchesPage() { - $this->get('http://test:secret@www.lastcraft.com/test/protected/'); - $this->assertResponse(200); - } - - function testEncodedAuthenticationFetchesPageAfterTrailingSlashRedirect() { - $this->get('http://test:secret@www.lastcraft.com/test/protected'); - $this->assertResponse(200); - } - - function testRealmExtendsToWholeDirectory() { - $this->get($this->samples() . 'protected/1.html'); - $this->authenticate('test', 'secret'); - $this->clickLink('2'); - $this->assertResponse(200); - $this->clickLink('3'); - $this->assertResponse(200); - } - - function testRedirectKeepsAuthentication() { - $this->get($this->samples() . 'protected/local_redirect.php'); - $this->authenticate('test', 'secret'); - $this->assertTitle('Simple test target file'); - } - - function testRedirectKeepsEncodedAuthentication() { - $this->get('http://test:secret@www.lastcraft.com/test/protected/local_redirect.php'); - $this->assertResponse(200); - $this->assertTitle('Simple test target file'); - } - - function testSessionRestartLosesAuthentication() { - $this->get($this->samples() . 'protected/'); - $this->authenticate('test', 'secret'); - $this->assertResponse(200); - $this->restart(); - $this->get($this->samples() . 'protected/'); - $this->assertResponse(401); - } -} - -class TestOfLoadingFrames extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testNoFramesContentWhenFramesDisabled() { - $this->ignoreFrames(); - $this->get($this->samples() . 'one_page_frameset.html'); - $this->assertTitle('Frameset for testing of SimpleTest'); - $this->assertText('This content is for no frames only'); - } - - function testPatternMatchCanReadTheOnlyFrame() { - $this->get($this->samples() . 'one_page_frameset.html'); - $this->assertText('A target for the SimpleTest test suite'); - $this->assertNoText('This content is for no frames only'); - } - - function testMessyFramesetResponsesByName() { - $this->assertTrue($this->get( - $this->samples() . 'messy_frameset.html')); - $this->assertTitle('Frameset for testing of SimpleTest'); - - $this->assertTrue($this->setFrameFocus('Front controller')); - $this->assertResponse(200); - $this->assertText('Simple test front controller'); - - $this->assertTrue($this->setFrameFocus('One')); - $this->assertResponse(200); - $this->assertLink('2'); - - $this->assertTrue($this->setFrameFocus('Frame links')); - $this->assertResponse(200); - $this->assertLink('Set one to 2'); - - $this->assertTrue($this->setFrameFocus('Counter')); - $this->assertResponse(200); - $this->assertText('Count: 1'); - - $this->assertTrue($this->setFrameFocus('Redirected')); - $this->assertResponse(200); - $this->assertText('r=rrr'); - - $this->assertTrue($this->setFrameFocus('Protected')); - $this->assertResponse(401); - - $this->assertTrue($this->setFrameFocus('Protected redirect')); - $this->assertResponse(401); - - $this->assertTrue($this->setFrameFocusByIndex(1)); - $this->assertResponse(200); - $this->assertText('Simple test front controller'); - - $this->assertTrue($this->setFrameFocusByIndex(2)); - $this->assertResponse(200); - $this->assertLink('2'); - - $this->assertTrue($this->setFrameFocusByIndex(3)); - $this->assertResponse(200); - $this->assertLink('Set one to 2'); - - $this->assertTrue($this->setFrameFocusByIndex(4)); - $this->assertResponse(200); - $this->assertText('Count: 1'); - - $this->assertTrue($this->setFrameFocusByIndex(5)); - $this->assertResponse(200); - $this->assertText('r=rrr'); - - $this->assertTrue($this->setFrameFocusByIndex(6)); - $this->assertResponse(401); - - $this->assertTrue($this->setFrameFocusByIndex(7)); - } - - function testReloadingFramesetPage() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->assertText('Count: 1'); - $this->retry(); - $this->assertText('Count: 2'); - $this->retry(); - $this->assertText('Count: 3'); - } - - function testReloadingSingleFrameWithCookieCounter() { - $this->get($this->samples() . 'counting_frameset.html'); - $this->setFrameFocus('a'); - $this->assertText('Count: 1'); - $this->setFrameFocus('b'); - $this->assertText('Count: 2'); - - $this->setFrameFocus('a'); - $this->retry(); - $this->assertText('Count: 3'); - $this->retry(); - $this->assertText('Count: 4'); - $this->setFrameFocus('b'); - $this->assertText('Count: 2'); - } - - function testReloadingFrameWhenUnfocusedReloadsWholeFrameset() { - $this->get($this->samples() . 'counting_frameset.html'); - $this->setFrameFocus('a'); - $this->assertText('Count: 1'); - $this->setFrameFocus('b'); - $this->assertText('Count: 2'); - - $this->clearFrameFocus('a'); - $this->retry(); - - $this->assertTitle('Frameset for testing of SimpleTest'); - $this->setFrameFocus('a'); - $this->assertText('Count: 3'); - $this->setFrameFocus('b'); - $this->assertText('Count: 4'); - } - - function testClickingNormalLinkReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickLink('2'); - $this->assertLink('3'); - $this->assertText('Simple test front controller'); - } - - function testJumpToNamedPageReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->assertPattern('/Simple test front controller/'); - $this->clickLink('Index'); - $this->assertResponse(200); - $this->assertText('[action=index]'); - $this->assertText('Count: 1'); - } - - function testJumpToUnnamedPageReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickLink('No page'); - $this->assertResponse(200); - $this->assertText('Simple test front controller'); - $this->assertText('[action=no_page]'); - $this->assertText('Count: 1'); - } - - function testJumpToUnnamedPageWithBareParameterReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickLink('Bare action'); - $this->assertResponse(200); - $this->assertText('Simple test front controller'); - $this->assertText('[action=]'); - $this->assertText('Count: 1'); - } - - function testJumpToUnnamedPageWithEmptyQueryReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickLink('Empty query'); - $this->assertResponse(200); - $this->assertPattern('/Simple test front controller/'); - $this->assertPattern('/raw get data.*?\[\].*?get data/si'); - $this->assertPattern('/Count: 1/'); - } - - function testJumpToUnnamedPageWithEmptyLinkReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickLink('Empty link'); - $this->assertResponse(200); - $this->assertPattern('/Simple test front controller/'); - $this->assertPattern('/raw get data.*?\[\].*?get data/si'); - $this->assertPattern('/Count: 1/'); - } - - function testJumpBackADirectoryLevelReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickLink('Down one'); - $this->assertPattern('/index of .*\/test/i'); - $this->assertPattern('/Count: 1/'); - } - - function testSubmitToNamedPageReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->assertPattern('/Simple test front controller/'); - $this->clickSubmit('Index'); - $this->assertResponse(200); - $this->assertText('[action=Index]'); - $this->assertText('Count: 1'); - } - - function testSubmitToSameDirectoryReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickSubmit('Same directory'); - $this->assertResponse(200); - $this->assertText('[action=Same+directory]'); - $this->assertText('Count: 1'); - } - - function testSubmitToEmptyActionReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickSubmit('Empty action'); - $this->assertResponse(200); - $this->assertText('[action=Empty+action]'); - $this->assertText('Count: 1'); - } - - function testSubmitToNoActionReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickSubmit('No action'); - $this->assertResponse(200); - $this->assertText('[action=No+action]'); - $this->assertText('Count: 1'); - } - - function testSubmitBackADirectoryLevelReplacesJustThatFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickSubmit('Down one'); - $this->assertPattern('/index of .*\/test/i'); - $this->assertPattern('/Count: 1/'); - } - - function testTopLinkExitsFrameset() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->clickLink('Exit the frameset'); - $this->assertTitle('Simple test target file'); - } - - function testLinkInOnePageCanLoadAnother() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->assertNoLink('3'); - $this->clickLink('Set one to 2'); - $this->assertLink('3'); - $this->assertNoLink('2'); - $this->assertTitle('Frameset for testing of SimpleTest'); - } - - function testFrameWithRelativeLinksRespectsBaseTagForThatPage() { - $this->get($this->samples() . 'base_tag/frameset.html'); - $this->click('Back to test pages'); - $this->assertTitle('Frameset for testing of SimpleTest'); - $this->assertText('A target for the SimpleTest test suite'); - } - - function testRelativeLinkInFrameIsNotAffectedByFramesetBaseTag() { - $this->get($this->samples() . 'base_tag/frameset_with_base_tag.html'); - $this->assertText('This is page 1'); - $this->click('To page 2'); - $this->assertTitle('Frameset for testing of SimpleTest'); - $this->assertText('This is page 2'); - } -} - -class TestOfFrameAuthentication extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testUnauthenticatedFrameSendsChallenge() { - $this->get($this->samples() . 'protected/'); - $this->setFrameFocus('Protected'); - $this->assertAuthentication('Basic'); - $this->assertRealm('SimpleTest basic authentication'); - $this->assertResponse(401); - } - - function testCanReadFrameFromAlreadyAuthenticatedRealm() { - $this->get($this->samples() . 'protected/'); - $this->authenticate('test', 'secret'); - $this->get($this->samples() . 'messy_frameset.html'); - $this->setFrameFocus('Protected'); - $this->assertResponse(200); - $this->assertText('A target for the SimpleTest test suite'); - } - - function testCanAuthenticateFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->setFrameFocus('Protected'); - $this->authenticate('test', 'secret'); - $this->assertResponse(200); - $this->assertText('A target for the SimpleTest test suite'); - $this->clearFrameFocus(); - $this->assertText('Count: 1'); - } - - function testCanAuthenticateRedirectedFrame() { - $this->get($this->samples() . 'messy_frameset.html'); - $this->setFrameFocus('Protected redirect'); - $this->assertResponse(401); - $this->authenticate('test', 'secret'); - $this->assertResponse(200); - $this->assertText('A target for the SimpleTest test suite'); - $this->clearFrameFocus(); - $this->assertText('Count: 1'); - } -} - -class TestOfNestedFrames extends SimpleTestAcceptanceTest { - function setUp() { - $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion()); - } - - function testCanNavigateToSpecificContent() { - $this->get($this->samples() . 'nested_frameset.html'); - $this->assertTitle('Nested frameset for testing of SimpleTest'); - - $this->assertPattern('/This is frame A/'); - $this->assertPattern('/This is frame B/'); - $this->assertPattern('/Simple test front controller/'); - $this->assertLink('2'); - $this->assertLink('Set one to 2'); - $this->assertPattern('/Count: 1/'); - $this->assertPattern('/r=rrr/'); - - $this->setFrameFocus('pair'); - $this->assertPattern('/This is frame A/'); - $this->assertPattern('/This is frame B/'); - $this->assertNoPattern('/Simple test front controller/'); - $this->assertNoLink('2'); - - $this->setFrameFocus('aaa'); - $this->assertPattern('/This is frame A/'); - $this->assertNoPattern('/This is frame B/'); - - $this->clearFrameFocus(); - $this->assertResponse(200); - $this->setFrameFocus('messy'); - $this->assertResponse(200); - $this->setFrameFocus('Front controller'); - $this->assertResponse(200); - $this->assertPattern('/Simple test front controller/'); - $this->assertNoLink('2'); - } - - function testReloadingFramesetPage() { - $this->get($this->samples() . 'nested_frameset.html'); - $this->assertPattern('/Count: 1/'); - $this->retry(); - $this->assertPattern('/Count: 2/'); - $this->retry(); - $this->assertPattern('/Count: 3/'); - } - - function testRetryingNestedPageOnlyRetriesThatSet() { - $this->get($this->samples() . 'nested_frameset.html'); - $this->assertPattern('/Count: 1/'); - $this->setFrameFocus('messy'); - $this->retry(); - $this->assertPattern('/Count: 2/'); - $this->setFrameFocus('Counter'); - $this->retry(); - $this->assertPattern('/Count: 3/'); - - $this->clearFrameFocus(); - $this->setFrameFocus('messy'); - $this->setFrameFocus('Front controller'); - $this->retry(); - - $this->clearFrameFocus(); - $this->assertPattern('/Count: 3/'); - } - - function testAuthenticatingNestedPage() { - $this->get($this->samples() . 'nested_frameset.html'); - $this->setFrameFocus('messy'); - $this->setFrameFocus('Protected'); - $this->assertAuthentication('Basic'); - $this->assertRealm('SimpleTest basic authentication'); - $this->assertResponse(401); - - $this->authenticate('test', 'secret'); - $this->assertResponse(200); - $this->assertPattern('/A target for the SimpleTest test suite/'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/adapter_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/adapter_test.php deleted file mode 100644 index c1a06a2f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/adapter_test.php +++ /dev/null @@ -1,50 +0,0 @@ -assertTrue(true, "PEAR true"); - $this->assertFalse(false, "PEAR false"); - } - - function testName() { - $this->assertTrue($this->getName() == get_class($this)); - } - - function testPass() { - $this->pass("PEAR pass"); - } - - function testNulls() { - $value = null; - $this->assertNull($value, "PEAR null"); - $value = 0; - $this->assertNotNull($value, "PEAR not null"); - } - - function testType() { - $this->assertType("Hello", "string", "PEAR type"); - } - - function testEquals() { - $this->assertEquals(12, 12, "PEAR identity"); - $this->setLooselyTyped(true); - $this->assertEquals("12", 12, "PEAR equality"); - } - - function testSame() { - $same = new SameTestClass(); - $this->assertSame($same, $same, "PEAR same"); - } - - function testRegExp() { - $this->assertRegExp('/hello/', "A big hello from me", "PEAR regex"); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/all_tests.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/all_tests.php deleted file mode 100644 index 99ce9451..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/all_tests.php +++ /dev/null @@ -1,13 +0,0 @@ -TestSuite('All tests for SimpleTest ' . SimpleTest::getVersion()); - $this->addFile(dirname(__FILE__) . '/unit_tests.php'); - $this->addFile(dirname(__FILE__) . '/shell_test.php'); - $this->addFile(dirname(__FILE__) . '/live_test.php'); - $this->addFile(dirname(__FILE__) . '/acceptance_test.php'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/authentication_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/authentication_test.php deleted file mode 100644 index 081cccdd..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/authentication_test.php +++ /dev/null @@ -1,145 +0,0 @@ -assertTrue($realm->isWithin( - new SimpleUrl('http://www.here.com/path/hello.html'))); - } - - function testInsideWithLongerUrl() { - $realm = new SimpleRealm( - 'Basic', - new SimpleUrl('http://www.here.com/path/')); - $this->assertTrue($realm->isWithin( - new SimpleUrl('http://www.here.com/path/hello.html'))); - } - - function testBelowRootIsOutside() { - $realm = new SimpleRealm( - 'Basic', - new SimpleUrl('http://www.here.com/path/')); - $this->assertTrue($realm->isWithin( - new SimpleUrl('http://www.here.com/path/more/hello.html'))); - } - - function testOldNetscapeDefinitionIsOutside() { - $realm = new SimpleRealm( - 'Basic', - new SimpleUrl('http://www.here.com/path/')); - $this->assertFalse($realm->isWithin( - new SimpleUrl('http://www.here.com/pathmore/hello.html'))); - } - - function testInsideWithMissingTrailingSlash() { - $realm = new SimpleRealm( - 'Basic', - new SimpleUrl('http://www.here.com/path/')); - $this->assertTrue($realm->isWithin( - new SimpleUrl('http://www.here.com/path'))); - } - - function testDifferentPageNameStillInside() { - $realm = new SimpleRealm( - 'Basic', - new SimpleUrl('http://www.here.com/path/hello.html')); - $this->assertTrue($realm->isWithin( - new SimpleUrl('http://www.here.com/path/goodbye.html'))); - } - - function testNewUrlInSameDirectoryDoesNotChangeRealm() { - $realm = new SimpleRealm( - 'Basic', - new SimpleUrl('http://www.here.com/path/hello.html')); - $realm->stretch(new SimpleUrl('http://www.here.com/path/goodbye.html')); - $this->assertTrue($realm->isWithin( - new SimpleUrl('http://www.here.com/path/index.html'))); - $this->assertFalse($realm->isWithin( - new SimpleUrl('http://www.here.com/index.html'))); - } - - function testNewUrlMakesRealmTheCommonPath() { - $realm = new SimpleRealm( - 'Basic', - new SimpleUrl('http://www.here.com/path/here/hello.html')); - $realm->stretch(new SimpleUrl('http://www.here.com/path/there/goodbye.html')); - $this->assertTrue($realm->isWithin( - new SimpleUrl('http://www.here.com/path/here/index.html'))); - $this->assertTrue($realm->isWithin( - new SimpleUrl('http://www.here.com/path/there/index.html'))); - $this->assertTrue($realm->isWithin( - new SimpleUrl('http://www.here.com/path/index.html'))); - $this->assertFalse($realm->isWithin( - new SimpleUrl('http://www.here.com/index.html'))); - $this->assertFalse($realm->isWithin( - new SimpleUrl('http://www.here.com/paths/index.html'))); - $this->assertFalse($realm->isWithin( - new SimpleUrl('http://www.here.com/pathindex.html'))); - } -} - -class TestOfAuthenticator extends UnitTestCase { - - function testNoRealms() { - $request = new MockSimpleHttpRequest(); - $request->expectNever('addHeaderLine'); - $authenticator = new SimpleAuthenticator(); - $authenticator->addHeaders($request, new SimpleUrl('http://here.com/')); - } - - function &createSingleRealm() { - $authenticator = new SimpleAuthenticator(); - $authenticator->addRealm( - new SimpleUrl('http://www.here.com/path/hello.html'), - 'Basic', - 'Sanctuary'); - $authenticator->setIdentityForRealm('www.here.com', 'Sanctuary', 'test', 'secret'); - return $authenticator; - } - - function testOutsideRealm() { - $request = new MockSimpleHttpRequest(); - $request->expectNever('addHeaderLine'); - $authenticator = &$this->createSingleRealm(); - $authenticator->addHeaders( - $request, - new SimpleUrl('http://www.here.com/hello.html')); - } - - function testWithinRealm() { - $request = new MockSimpleHttpRequest(); - $request->expectOnce('addHeaderLine'); - $authenticator = &$this->createSingleRealm(); - $authenticator->addHeaders( - $request, - new SimpleUrl('http://www.here.com/path/more/hello.html')); - } - - function testRestartingClearsRealm() { - $request = new MockSimpleHttpRequest(); - $request->expectNever('addHeaderLine'); - $authenticator = &$this->createSingleRealm(); - $authenticator->restartSession(); - $authenticator->addHeaders( - $request, - new SimpleUrl('http://www.here.com/hello.html')); - } - - function testDifferentHostIsOutsideRealm() { - $request = new MockSimpleHttpRequest(); - $request->expectNever('addHeaderLine'); - $authenticator = &$this->createSingleRealm(); - $authenticator->addHeaders( - $request, - new SimpleUrl('http://here.com/path/hello.html')); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/autorun_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/autorun_test.php deleted file mode 100644 index 8f7ff818..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/autorun_test.php +++ /dev/null @@ -1,13 +0,0 @@ -addFile(dirname(__FILE__) . '/support/test1.php'); - $this->assertEqual($tests->getSize(), 1); - } -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/bad_test_suite.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/bad_test_suite.php deleted file mode 100644 index b426013b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/bad_test_suite.php +++ /dev/null @@ -1,10 +0,0 @@ -TestSuite('Two bad test cases'); - $this->addFile(dirname(__FILE__) . '/support/empty_test_file.php'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/browser_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/browser_test.php deleted file mode 100644 index eabe0916..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/browser_test.php +++ /dev/null @@ -1,774 +0,0 @@ -assertIdentical($history->getUrl(), false); - $this->assertIdentical($history->getParameters(), false); - } - - function testCannotMoveInEmptyHistory() { - $history = new SimpleBrowserHistory(); - $this->assertFalse($history->back()); - $this->assertFalse($history->forward()); - } - - function testCurrentTargetAccessors() { - $history = new SimpleBrowserHistory(); - $history->recordEntry( - new SimpleUrl('http://www.here.com/'), - new SimpleGetEncoding()); - $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.here.com/')); - $this->assertIdentical($history->getParameters(), new SimpleGetEncoding()); - } - - function testSecondEntryAccessors() { - $history = new SimpleBrowserHistory(); - $history->recordEntry( - new SimpleUrl('http://www.first.com/'), - new SimpleGetEncoding()); - $history->recordEntry( - new SimpleUrl('http://www.second.com/'), - new SimplePostEncoding(array('a' => 1))); - $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.second.com/')); - $this->assertIdentical( - $history->getParameters(), - new SimplePostEncoding(array('a' => 1))); - } - - function testGoingBackwards() { - $history = new SimpleBrowserHistory(); - $history->recordEntry( - new SimpleUrl('http://www.first.com/'), - new SimpleGetEncoding()); - $history->recordEntry( - new SimpleUrl('http://www.second.com/'), - new SimplePostEncoding(array('a' => 1))); - $this->assertTrue($history->back()); - $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.first.com/')); - $this->assertIdentical($history->getParameters(), new SimpleGetEncoding()); - } - - function testGoingBackwardsOffBeginning() { - $history = new SimpleBrowserHistory(); - $history->recordEntry( - new SimpleUrl('http://www.first.com/'), - new SimpleGetEncoding()); - $this->assertFalse($history->back()); - $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.first.com/')); - $this->assertIdentical($history->getParameters(), new SimpleGetEncoding()); - } - - function testGoingForwardsOffEnd() { - $history = new SimpleBrowserHistory(); - $history->recordEntry( - new SimpleUrl('http://www.first.com/'), - new SimpleGetEncoding()); - $this->assertFalse($history->forward()); - $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.first.com/')); - $this->assertIdentical($history->getParameters(), new SimpleGetEncoding()); - } - - function testGoingBackwardsAndForwards() { - $history = new SimpleBrowserHistory(); - $history->recordEntry( - new SimpleUrl('http://www.first.com/'), - new SimpleGetEncoding()); - $history->recordEntry( - new SimpleUrl('http://www.second.com/'), - new SimplePostEncoding(array('a' => 1))); - $this->assertTrue($history->back()); - $this->assertTrue($history->forward()); - $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.second.com/')); - $this->assertIdentical( - $history->getParameters(), - new SimplePostEncoding(array('a' => 1))); - } - - function testNewEntryReplacesNextOne() { - $history = new SimpleBrowserHistory(); - $history->recordEntry( - new SimpleUrl('http://www.first.com/'), - new SimpleGetEncoding()); - $history->recordEntry( - new SimpleUrl('http://www.second.com/'), - new SimplePostEncoding(array('a' => 1))); - $history->back(); - $history->recordEntry( - new SimpleUrl('http://www.third.com/'), - new SimpleGetEncoding()); - $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.third.com/')); - $this->assertIdentical($history->getParameters(), new SimpleGetEncoding()); - } - - function testNewEntryDropsFutureEntries() { - $history = new SimpleBrowserHistory(); - $history->recordEntry( - new SimpleUrl('http://www.first.com/'), - new SimpleGetEncoding()); - $history->recordEntry( - new SimpleUrl('http://www.second.com/'), - new SimpleGetEncoding()); - $history->recordEntry( - new SimpleUrl('http://www.third.com/'), - new SimpleGetEncoding()); - $history->back(); - $history->back(); - $history->recordEntry( - new SimpleUrl('http://www.fourth.com/'), - new SimpleGetEncoding()); - $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.fourth.com/')); - $this->assertFalse($history->forward()); - $history->back(); - $this->assertIdentical($history->getUrl(), new SimpleUrl('http://www.first.com/')); - $this->assertFalse($history->back()); - } -} - -class TestOfParsedPageAccess extends UnitTestCase { - - function loadPage(&$page) { - $response = new MockSimpleHttpResponse($this); - $agent = new MockSimpleUserAgent($this); - $agent->returns('fetchResponse', $response); - - $browser = new MockParseSimpleBrowser($this); - $browser->returns('createUserAgent', $agent); - $browser->returns('parse', $page); - $browser->__construct(); - - $browser->get('http://this.com/page.html'); - return $browser; - } - - function testAccessorsWhenNoPage() { - $agent = new MockSimpleUserAgent($this); - $browser = new MockParseSimpleBrowser($this); - $browser->returns('createUserAgent', $agent); - $browser->__construct(); - $this->assertEqual($browser->getContent(), ''); - } - - function testParse() { - $page = new MockSimplePage(); - $page->setReturnValue('getRequest', "GET here.html\r\n\r\n"); - $page->setReturnValue('getRaw', 'Raw HTML'); - $page->setReturnValue('getTitle', 'Here'); - $page->setReturnValue('getFrameFocus', 'Frame'); - $page->setReturnValue('getMimeType', 'text/html'); - $page->setReturnValue('getResponseCode', 200); - $page->setReturnValue('getAuthentication', 'Basic'); - $page->setReturnValue('getRealm', 'Somewhere'); - $page->setReturnValue('getTransportError', 'Ouch!'); - - $browser = $this->loadPage($page); - $this->assertEqual($browser->getRequest(), "GET here.html\r\n\r\n"); - $this->assertEqual($browser->getContent(), 'Raw HTML'); - $this->assertEqual($browser->getTitle(), 'Here'); - $this->assertEqual($browser->getFrameFocus(), 'Frame'); - $this->assertIdentical($browser->getResponseCode(), 200); - $this->assertEqual($browser->getMimeType(), 'text/html'); - $this->assertEqual($browser->getAuthentication(), 'Basic'); - $this->assertEqual($browser->getRealm(), 'Somewhere'); - $this->assertEqual($browser->getTransportError(), 'Ouch!'); - } - - function testLinkAffirmationWhenPresent() { - $page = new MockSimplePage(); - $page->setReturnValue('getUrlsByLabel', array('http://www.nowhere.com')); - $page->expectOnce('getUrlsByLabel', array('a link label')); - $browser = $this->loadPage($page); - $this->assertIdentical($browser->getLink('a link label'), 'http://www.nowhere.com'); - } - - function testLinkAffirmationByIdWhenPresent() { - $page = new MockSimplePage(); - $page->setReturnValue('getUrlById', 'a_page.com', array(99)); - $page->setReturnValue('getUrlById', false, array('*')); - $browser = $this->loadPage($page); - $this->assertIdentical($browser->getLinkById(99), 'a_page.com'); - $this->assertFalse($browser->getLinkById(98)); - } - - function testSettingFieldIsPassedToPage() { - $page = new MockSimplePage(); - $page->expectOnce('setField', array(new SimpleByLabelOrName('key'), 'Value', false)); - $page->setReturnValue('getField', 'Value'); - $browser = $this->loadPage($page); - $this->assertEqual($browser->getField('key'), 'Value'); - $browser->setField('key', 'Value'); - } -} - -class TestOfBrowserNavigation extends UnitTestCase { - function createBrowser($agent, $page) { - $browser = new MockParseSimpleBrowser(); - $browser->returns('createUserAgent', $agent); - $browser->returns('parse', $page); - $browser->__construct(); - return $browser; - } - - function testClickLinkRequestsPage() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - $agent->expectAt( - 0, - 'fetchResponse', - array(new SimpleUrl('http://this.com/page.html'), new SimpleGetEncoding())); - $agent->expectAt( - 1, - 'fetchResponse', - array(new SimpleUrl('http://this.com/new.html'), new SimpleGetEncoding())); - $agent->expectCallCount('fetchResponse', 2); - - $page = new MockSimplePage(); - $page->setReturnValue('getUrlsByLabel', array(new SimpleUrl('http://this.com/new.html'))); - $page->expectOnce('getUrlsByLabel', array('New')); - $page->setReturnValue('getRaw', 'A page'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickLink('New')); - } - - function testClickLinkWithUnknownFrameStillRequestsWholePage() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - $agent->expectAt( - 0, - 'fetchResponse', - array(new SimpleUrl('http://this.com/page.html'), new SimpleGetEncoding())); - $target = new SimpleUrl('http://this.com/new.html'); - $target->setTarget('missing'); - $agent->expectAt( - 1, - 'fetchResponse', - array($target, new SimpleGetEncoding())); - $agent->expectCallCount('fetchResponse', 2); - - $parsed_url = new SimpleUrl('http://this.com/new.html'); - $parsed_url->setTarget('missing'); - - $page = new MockSimplePage(); - $page->setReturnValue('getUrlsByLabel', array($parsed_url)); - $page->setReturnValue('hasFrames', false); - $page->expectOnce('getUrlsByLabel', array('New')); - $page->setReturnValue('getRaw', 'A page'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickLink('New')); - } - - function testClickingMissingLinkFails() { - $agent = new MockSimpleUserAgent($this); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - - $page = new MockSimplePage(); - $page->setReturnValue('getUrlsByLabel', array()); - $page->setReturnValue('getRaw', 'stuff'); - - $browser = $this->createBrowser($agent, $page); - $this->assertTrue($browser->get('http://this.com/page.html')); - $this->assertFalse($browser->clickLink('New')); - } - - function testClickIndexedLink() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - $agent->expectAt( - 1, - 'fetchResponse', - array(new SimpleUrl('1.html'), new SimpleGetEncoding())); - $agent->expectCallCount('fetchResponse', 2); - - $page = new MockSimplePage(); - $page->setReturnValue( - 'getUrlsByLabel', - array(new SimpleUrl('0.html'), new SimpleUrl('1.html'))); - $page->setReturnValue('getRaw', 'A page'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickLink('New', 1)); - } - - function testClinkLinkById() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - $agent->expectAt(1, 'fetchResponse', array( - new SimpleUrl('http://this.com/link.html'), - new SimpleGetEncoding())); - $agent->expectCallCount('fetchResponse', 2); - - $page = new MockSimplePage(); - $page->setReturnValue('getUrlById', new SimpleUrl('http://this.com/link.html')); - $page->expectOnce('getUrlById', array(2)); - $page->setReturnValue('getRaw', 'A page'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickLinkById(2)); - } - - function testClickingMissingLinkIdFails() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - - $page = new MockSimplePage(); - $page->setReturnValue('getUrlById', false); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertFalse($browser->clickLink(0)); - } - - function testSubmitFormByLabel() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - $agent->expectAt(1, 'fetchResponse', array( - new SimpleUrl('http://this.com/handler.html'), - new SimplePostEncoding(array('a' => 'A')))); - $agent->expectCallCount('fetchResponse', 2); - - $form = new MockSimpleForm(); - $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); - $form->setReturnValue('getMethod', 'post'); - $form->setReturnValue('submitButton', new SimplePostEncoding(array('a' => 'A'))); - $form->expectOnce('submitButton', array(new SimpleByLabel('Go'), false)); - - $page = new MockSimplePage(); - $page->returns('getFormBySubmit', $form); - $page->expectOnce('getFormBySubmit', array(new SimpleByLabel('Go'))); - $page->setReturnValue('getRaw', 'stuff'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickSubmit('Go')); - } - - function testDefaultSubmitFormByLabel() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - $agent->expectAt(1, 'fetchResponse', array( - new SimpleUrl('http://this.com/page.html'), - new SimpleGetEncoding(array('a' => 'A')))); - $agent->expectCallCount('fetchResponse', 2); - - $form = new MockSimpleForm(); - $form->setReturnValue('getAction', new SimpleUrl('http://this.com/page.html')); - $form->setReturnValue('getMethod', 'get'); - $form->setReturnValue('submitButton', new SimpleGetEncoding(array('a' => 'A'))); - - $page = new MockSimplePage(); - $page->returns('getFormBySubmit', $form); - $page->expectOnce('getFormBySubmit', array(new SimpleByLabel('Submit'))); - $page->setReturnValue('getRaw', 'stuff'); - $page->setReturnValue('getUrl', new SimpleUrl('http://this.com/page.html')); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickSubmit()); - } - - function testSubmitFormByName() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - - $form = new MockSimpleForm(); - $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); - $form->setReturnValue('getMethod', 'post'); - $form->setReturnValue('submitButton', new SimplePostEncoding(array('a' => 'A'))); - - $page = new MockSimplePage(); - $page->returns('getFormBySubmit', $form); - $page->expectOnce('getFormBySubmit', array(new SimpleByName('me'))); - $page->setReturnValue('getRaw', 'stuff'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickSubmitByName('me')); - } - - function testSubmitFormById() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - - $form = new MockSimpleForm(); - $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); - $form->setReturnValue('getMethod', 'post'); - $form->setReturnValue('submitButton', new SimplePostEncoding(array('a' => 'A'))); - $form->expectOnce('submitButton', array(new SimpleById(99), false)); - - $page = new MockSimplePage(); - $page->returns('getFormBySubmit', $form); - $page->expectOnce('getFormBySubmit', array(new SimpleById(99))); - $page->setReturnValue('getRaw', 'stuff'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickSubmitById(99)); - } - - function testSubmitFormByImageLabel() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - - $form = new MockSimpleForm(); - $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); - $form->setReturnValue('getMethod', 'post'); - $form->setReturnValue('submitImage', new SimplePostEncoding(array('a' => 'A'))); - $form->expectOnce('submitImage', array(new SimpleByLabel('Go!'), 10, 11, false)); - - $page = new MockSimplePage(); - $page->returns('getFormByImage', $form); - $page->expectOnce('getFormByImage', array(new SimpleByLabel('Go!'))); - $page->setReturnValue('getRaw', 'stuff'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickImage('Go!', 10, 11)); - } - - function testSubmitFormByImageName() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - - $form = new MockSimpleForm(); - $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); - $form->setReturnValue('getMethod', 'post'); - $form->setReturnValue('submitImage', new SimplePostEncoding(array('a' => 'A'))); - $form->expectOnce('submitImage', array(new SimpleByName('a'), 10, 11, false)); - - $page = new MockSimplePage(); - $page->returns('getFormByImage', $form); - $page->expectOnce('getFormByImage', array(new SimpleByName('a'))); - $page->setReturnValue('getRaw', 'stuff'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickImageByName('a', 10, 11)); - } - - function testSubmitFormByImageId() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - - $form = new MockSimpleForm(); - $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); - $form->setReturnValue('getMethod', 'post'); - $form->setReturnValue('submitImage', new SimplePostEncoding(array('a' => 'A'))); - $form->expectOnce('submitImage', array(new SimpleById(99), 10, 11, false)); - - $page = new MockSimplePage(); - $page->returns('getFormByImage', $form); - $page->expectOnce('getFormByImage', array(new SimpleById(99))); - $page->setReturnValue('getRaw', 'stuff'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->clickImageById(99, 10, 11)); - } - - function testSubmitFormByFormId() { - $agent = new MockSimpleUserAgent(); - $agent->returns('fetchResponse', new MockSimpleHttpResponse()); - $agent->expectAt(1, 'fetchResponse', array( - new SimpleUrl('http://this.com/handler.html'), - new SimplePostEncoding(array('a' => 'A')))); - $agent->expectCallCount('fetchResponse', 2); - - $form = new MockSimpleForm(); - $form->setReturnValue('getAction', new SimpleUrl('http://this.com/handler.html')); - $form->setReturnValue('getMethod', 'post'); - $form->setReturnValue('submit', new SimplePostEncoding(array('a' => 'A'))); - - $page = new MockSimplePage(); - $page->returns('getFormById', $form); - $page->expectOnce('getFormById', array(33)); - $page->setReturnValue('getRaw', 'stuff'); - - $browser = $this->createBrowser($agent, $page); - $browser->get('http://this.com/page.html'); - $this->assertTrue($browser->submitFormById(33)); - } -} - -class TestOfBrowserFrames extends UnitTestCase { - - function createBrowser($agent) { - $browser = new MockUserAgentSimpleBrowser(); - $browser->returns('createUserAgent', $agent); - $browser->__construct(); - return $browser; - } - - function createUserAgent($pages) { - $agent = new MockSimpleUserAgent(); - foreach ($pages as $url => $raw) { - $url = new SimpleUrl($url); - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', $url); - $response->setReturnValue('getContent', $raw); - $agent->returns('fetchResponse', $response, array($url, '*')); - } - return $agent; - } - - function testSimplePageHasNoFrames() { - $browser = $this->createBrowser($this->createUserAgent( - array('http://site.with.no.frames/' => 'A non-framed page'))); - $this->assertEqual( - $browser->get('http://site.with.no.frames/'), - 'A non-framed page'); - $this->assertIdentical($browser->getFrames(), 'http://site.with.no.frames/'); - } - - function testFramesetWithNoFrames() { - $browser = $this->createBrowser($this->createUserAgent( - array('http://site.with.no.frames/' => ''))); - $this->assertEqual($browser->get('http://site.with.no.frames/'), ''); - $this->assertIdentical($browser->getFrames(), array()); - } - - function testFramesetWithSingleFrame() { - $frameset = ''; - $browser = $this->createBrowser($this->createUserAgent(array( - 'http://site.with.one.frame/' => $frameset, - 'http://site.with.one.frame/frame.html' => 'A frame'))); - $this->assertEqual($browser->get('http://site.with.one.frame/'), 'A frame'); - $this->assertIdentical( - $browser->getFrames(), - array('a' => 'http://site.with.one.frame/frame.html')); - } - - function testTitleTakenFromFramesetPage() { - $frameset = 'Frameset title' . - ''; - $browser = $this->createBrowser($this->createUserAgent(array( - 'http://site.with.one.frame/' => $frameset, - 'http://site.with.one.frame/frame.html' => 'Page title'))); - $browser->get('http://site.with.one.frame/'); - $this->assertEqual($browser->getTitle(), 'Frameset title'); - } - - function testFramesetWithSingleUnnamedFrame() { - $frameset = ''; - $browser = $this->createBrowser($this->createUserAgent(array( - 'http://site.with.one.frame/' => $frameset, - 'http://site.with.one.frame/frame.html' => 'One frame'))); - $this->assertEqual( - $browser->get('http://site.with.one.frame/'), - 'One frame'); - $this->assertIdentical( - $browser->getFrames(), - array(1 => 'http://site.with.one.frame/frame.html')); - } - - function testFramesetWithMultipleFrames() { - $frameset = '' . - '' . - '' . - '' . - ''; - $browser = $this->createBrowser($this->createUserAgent(array( - 'http://site.with.frames/' => $frameset, - 'http://site.with.frames/frame_a.html' => 'A frame', - 'http://site.with.frames/frame_b.html' => 'B frame', - 'http://site.with.frames/frame_c.html' => 'C frame'))); - $this->assertEqual( - $browser->get('http://site.with.frames/'), - 'A frameB frameC frame'); - $this->assertIdentical($browser->getFrames(), array( - 'a' => 'http://site.with.frames/frame_a.html', - 'b' => 'http://site.with.frames/frame_b.html', - 'c' => 'http://site.with.frames/frame_c.html')); - } - - function testFrameFocusByName() { - $frameset = '' . - '' . - '' . - '' . - ''; - $browser = $this->createBrowser($this->createUserAgent(array( - 'http://site.with.frames/' => $frameset, - 'http://site.with.frames/frame_a.html' => 'A frame', - 'http://site.with.frames/frame_b.html' => 'B frame', - 'http://site.with.frames/frame_c.html' => 'C frame'))); - $browser->get('http://site.with.frames/'); - $browser->setFrameFocus('a'); - $this->assertEqual($browser->getContent(), 'A frame'); - $browser->setFrameFocus('b'); - $this->assertEqual($browser->getContent(), 'B frame'); - $browser->setFrameFocus('c'); - $this->assertEqual($browser->getContent(), 'C frame'); - } - - function testFramesetWithSomeNamedFrames() { - $frameset = '' . - '' . - '' . - '' . - '' . - ''; - $browser = $this->createBrowser($this->createUserAgent(array( - 'http://site.with.frames/' => $frameset, - 'http://site.with.frames/frame_a.html' => 'A frame', - 'http://site.with.frames/frame_b.html' => 'B frame', - 'http://site.with.frames/frame_c.html' => 'C frame', - 'http://site.with.frames/frame_d.html' => 'D frame'))); - $this->assertEqual( - $browser->get('http://site.with.frames/'), - 'A frameB frameC frameD frame'); - $this->assertIdentical($browser->getFrames(), array( - 'a' => 'http://site.with.frames/frame_a.html', - 2 => 'http://site.with.frames/frame_b.html', - 'c' => 'http://site.with.frames/frame_c.html', - 4 => 'http://site.with.frames/frame_d.html')); - } - - function testFrameFocusWithMixedNamesAndIndexes() { - $frameset = '' . - '' . - '' . - '' . - '' . - ''; - $browser = $this->createBrowser($this->createUserAgent(array( - 'http://site.with.frames/' => $frameset, - 'http://site.with.frames/frame_a.html' => 'A frame', - 'http://site.with.frames/frame_b.html' => 'B frame', - 'http://site.with.frames/frame_c.html' => 'C frame', - 'http://site.with.frames/frame_d.html' => 'D frame'))); - $browser->get('http://site.with.frames/'); - $browser->setFrameFocus('a'); - $this->assertEqual($browser->getContent(), 'A frame'); - $browser->setFrameFocus(2); - $this->assertEqual($browser->getContent(), 'B frame'); - $browser->setFrameFocus('c'); - $this->assertEqual($browser->getContent(), 'C frame'); - $browser->setFrameFocus(4); - $this->assertEqual($browser->getContent(), 'D frame'); - $browser->clearFrameFocus(); - $this->assertEqual($browser->getContent(), 'A frameB frameC frameD frame'); - } - - function testNestedFrameset() { - $inner = '' . - '' . - ''; - $outer = '' . - '' . - ''; - $browser = $this->createBrowser($this->createUserAgent(array( - 'http://site.with.nested.frame/' => $outer, - 'http://site.with.nested.frame/inner.html' => $inner, - 'http://site.with.nested.frame/page.html' => 'The page'))); - $this->assertEqual( - $browser->get('http://site.with.nested.frame/'), - 'The page'); - $this->assertIdentical($browser->getFrames(), array( - 'inner' => array( - 'page' => 'http://site.with.nested.frame/page.html'))); - } - - function testCanNavigateToNestedFrame() { - $inner = '' . - '' . - '' . - ''; - $outer = '' . - '' . - '' . - ''; - $browser = $this->createBrowser($this->createUserAgent(array( - 'http://site.with.nested.frames/' => $outer, - 'http://site.with.nested.frames/inner.html' => $inner, - 'http://site.with.nested.frames/one.html' => 'Page one', - 'http://site.with.nested.frames/two.html' => 'Page two', - 'http://site.with.nested.frames/three.html' => 'Page three'))); - - $browser->get('http://site.with.nested.frames/'); - $this->assertEqual($browser->getContent(), 'Page onePage twoPage three'); - - $this->assertTrue($browser->setFrameFocus('inner')); - $this->assertEqual($browser->getFrameFocus(), array('inner')); - $this->assertTrue($browser->setFrameFocus('one')); - $this->assertEqual($browser->getFrameFocus(), array('inner', 'one')); - $this->assertEqual($browser->getContent(), 'Page one'); - - $this->assertTrue($browser->setFrameFocus('two')); - $this->assertEqual($browser->getFrameFocus(), array('inner', 'two')); - $this->assertEqual($browser->getContent(), 'Page two'); - - $browser->clearFrameFocus(); - $this->assertTrue($browser->setFrameFocus('three')); - $this->assertEqual($browser->getFrameFocus(), array('three')); - $this->assertEqual($browser->getContent(), 'Page three'); - - $this->assertTrue($browser->setFrameFocus('inner')); - $this->assertEqual($browser->getContent(), 'Page onePage two'); - } - - function testCanNavigateToNestedFrameByIndex() { - $inner = '' . - '' . - '' . - ''; - $outer = '' . - '' . - '' . - ''; - $browser = $this->createBrowser($this->createUserAgent(array( - 'http://site.with.nested.frames/' => $outer, - 'http://site.with.nested.frames/inner.html' => $inner, - 'http://site.with.nested.frames/one.html' => 'Page one', - 'http://site.with.nested.frames/two.html' => 'Page two', - 'http://site.with.nested.frames/three.html' => 'Page three'))); - - $browser->get('http://site.with.nested.frames/'); - $this->assertEqual($browser->getContent(), 'Page onePage twoPage three'); - - $this->assertTrue($browser->setFrameFocusByIndex(1)); - $this->assertEqual($browser->getFrameFocus(), array(1)); - $this->assertTrue($browser->setFrameFocusByIndex(1)); - $this->assertEqual($browser->getFrameFocus(), array(1, 1)); - $this->assertEqual($browser->getContent(), 'Page one'); - - $this->assertTrue($browser->setFrameFocusByIndex(2)); - $this->assertEqual($browser->getFrameFocus(), array(1, 2)); - $this->assertEqual($browser->getContent(), 'Page two'); - - $browser->clearFrameFocus(); - $this->assertTrue($browser->setFrameFocusByIndex(2)); - $this->assertEqual($browser->getFrameFocus(), array(2)); - $this->assertEqual($browser->getContent(), 'Page three'); - - $this->assertTrue($browser->setFrameFocusByIndex(1)); - $this->assertEqual($browser->getContent(), 'Page onePage two'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/collector_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/collector_test.php deleted file mode 100644 index efdbf377..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/collector_test.php +++ /dev/null @@ -1,50 +0,0 @@ -expectMinimumCallCount('addFile', 2); - $suite->expect( - 'addFile', - array(new PatternExpectation('/collectable\\.(1|2)$/'))); - $collector = new SimpleCollector(); - $collector->collect($suite, dirname(__FILE__) . '/support/collector/'); - } -} - -class TestOfPatternCollector extends UnitTestCase { - - function testAddingEverythingToGroup() { - $suite = new MockTestSuite(); - $suite->expectCallCount('addFile', 2); - $suite->expect( - 'addFile', - array(new PatternExpectation('/collectable\\.(1|2)$/'))); - $collector = new SimplePatternCollector('/.*/'); - $collector->collect($suite, dirname(__FILE__) . '/support/collector/'); - } - - function testOnlyMatchedFilesAreAddedToGroup() { - $suite = new MockTestSuite(); - $suite->expectOnce('addFile', array(new PathEqualExpectation( - dirname(__FILE__) . '/support/collector/collectable.1'))); - $collector = new SimplePatternCollector('/1$/'); - $collector->collect($suite, dirname(__FILE__) . '/support/collector/'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/command_line_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/command_line_test.php deleted file mode 100644 index 5baabff3..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/command_line_test.php +++ /dev/null @@ -1,40 +0,0 @@ -assertIdentical($parser->getTest(), ''); - $this->assertIdentical($parser->getTestCase(), ''); - } - - function testNotXmlByDefault() { - $parser = new SimpleCommandLineParser(array()); - $this->assertFalse($parser->isXml()); - } - - function testCanDetectRequestForXml() { - $parser = new SimpleCommandLineParser(array('--xml')); - $this->assertTrue($parser->isXml()); - } - - function testCanReadAssignmentSyntax() { - $parser = new SimpleCommandLineParser(array('--test=myTest')); - $this->assertEqual($parser->getTest(), 'myTest'); - } - - function testCanReadFollowOnSyntax() { - $parser = new SimpleCommandLineParser(array('--test', 'myTest')); - $this->assertEqual($parser->getTest(), 'myTest'); - } - - function testCanReadShortForms() { - $parser = new SimpleCommandLineParser(array('-t', 'myTest', '-c', 'MyClass', '-x')); - $this->assertEqual($parser->getTest(), 'myTest'); - $this->assertEqual($parser->getTestCase(), 'MyClass'); - $this->assertTrue($parser->isXml()); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/compatibility_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/compatibility_test.php deleted file mode 100644 index b8635e5b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/compatibility_test.php +++ /dev/null @@ -1,87 +0,0 @@ -assertTrue(SimpleTestCompatibility::isA( - new ComparisonClass(), - 'ComparisonClass')); - $this->assertFalse(SimpleTestCompatibility::isA( - new ComparisonClass(), - 'ComparisonSubclass')); - $this->assertTrue(SimpleTestCompatibility::isA( - new ComparisonSubclass(), - 'ComparisonClass')); - } - - function testIdentityOfNumericStrings() { - $numericString1 = "123"; - $numericString2 = "00123"; - $this->assertNotIdentical($numericString1, $numericString2); - } - - function testIdentityOfObjects() { - $object1 = new ComparisonClass(); - $object2 = new ComparisonClass(); - $this->assertIdentical($object1, $object2); - } - - function testReferences () { - $thing = "Hello"; - $thing_reference = &$thing; - $thing_copy = $thing; - $this->assertTrue(SimpleTestCompatibility::isReference( - $thing, - $thing)); - $this->assertTrue(SimpleTestCompatibility::isReference( - $thing, - $thing_reference)); - $this->assertFalse(SimpleTestCompatibility::isReference( - $thing, - $thing_copy)); - } - - function testObjectReferences () { - $object = new ComparisonClass(); - $object_reference = $object; - $object_copy = new ComparisonClass(); - $object_assignment = $object; - $this->assertTrue(SimpleTestCompatibility::isReference( - $object, - $object)); - $this->assertTrue(SimpleTestCompatibility::isReference( - $object, - $object_reference)); - $this->assertFalse(SimpleTestCompatibility::isReference( - $object, - $object_copy)); - if (version_compare(phpversion(), '5', '>=')) { - $this->assertTrue(SimpleTestCompatibility::isReference( - $object, - $object_assignment)); - } else { - $this->assertFalse(SimpleTestCompatibility::isReference( - $object, - $object_assignment)); - } - } - - function testInteraceComparison() { - $object = new ComparisonClassWithInterface(); - $this->assertFalse(SimpleTestCompatibility::isA( - new ComparisonClass(), - 'ComparisonInterface')); - $this->assertTrue(SimpleTestCompatibility::isA( - new ComparisonClassWithInterface(), - 'ComparisonInterface')); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/cookies_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/cookies_test.php deleted file mode 100644 index 0b49e43b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/cookies_test.php +++ /dev/null @@ -1,227 +0,0 @@ -assertFalse($cookie->getValue()); - $this->assertEqual($cookie->getPath(), "/"); - $this->assertIdentical($cookie->getHost(), false); - $this->assertFalse($cookie->getExpiry()); - $this->assertFalse($cookie->isSecure()); - } - - function testCookieAccessors() { - $cookie = new SimpleCookie( - "name", - "value", - "/path", - "Mon, 18 Nov 2002 15:50:29 GMT", - true); - $this->assertEqual($cookie->getName(), "name"); - $this->assertEqual($cookie->getValue(), "value"); - $this->assertEqual($cookie->getPath(), "/path/"); - $this->assertEqual($cookie->getExpiry(), "Mon, 18 Nov 2002 15:50:29 GMT"); - $this->assertTrue($cookie->isSecure()); - } - - function testFullHostname() { - $cookie = new SimpleCookie("name"); - $this->assertTrue($cookie->setHost("host.name.here")); - $this->assertEqual($cookie->getHost(), "host.name.here"); - $this->assertTrue($cookie->setHost("host.com")); - $this->assertEqual($cookie->getHost(), "host.com"); - } - - function testHostTruncation() { - $cookie = new SimpleCookie("name"); - $cookie->setHost("this.host.name.here"); - $this->assertEqual($cookie->getHost(), "host.name.here"); - $cookie->setHost("this.host.com"); - $this->assertEqual($cookie->getHost(), "host.com"); - $this->assertTrue($cookie->setHost("dashes.in-host.com")); - $this->assertEqual($cookie->getHost(), "in-host.com"); - } - - function testBadHosts() { - $cookie = new SimpleCookie("name"); - $this->assertFalse($cookie->setHost("gibberish")); - $this->assertFalse($cookie->setHost("host.here")); - $this->assertFalse($cookie->setHost("host..com")); - $this->assertFalse($cookie->setHost("...")); - $this->assertFalse($cookie->setHost("host.com.")); - } - - function testHostValidity() { - $cookie = new SimpleCookie("name"); - $cookie->setHost("this.host.name.here"); - $this->assertTrue($cookie->isValidHost("host.name.here")); - $this->assertTrue($cookie->isValidHost("that.host.name.here")); - $this->assertFalse($cookie->isValidHost("bad.host")); - $this->assertFalse($cookie->isValidHost("nearly.name.here")); - } - - function testPathValidity() { - $cookie = new SimpleCookie("name", "value", "/path"); - $this->assertFalse($cookie->isValidPath("/")); - $this->assertTrue($cookie->isValidPath("/path/")); - $this->assertTrue($cookie->isValidPath("/path/more")); - } - - function testSessionExpiring() { - $cookie = new SimpleCookie("name", "value", "/path"); - $this->assertTrue($cookie->isExpired(0)); - } - - function testTimestampExpiry() { - $cookie = new SimpleCookie("name", "value", "/path", 456); - $this->assertFalse($cookie->isExpired(0)); - $this->assertTrue($cookie->isExpired(457)); - $this->assertFalse($cookie->isExpired(455)); - } - - function testDateExpiry() { - $cookie = new SimpleCookie( - "name", - "value", - "/path", - "Mon, 18 Nov 2002 15:50:29 GMT"); - $this->assertTrue($cookie->isExpired("Mon, 18 Nov 2002 15:50:30 GMT")); - $this->assertFalse($cookie->isExpired("Mon, 18 Nov 2002 15:50:28 GMT")); - } - - function testAging() { - $cookie = new SimpleCookie("name", "value", "/path", 200); - $cookie->agePrematurely(199); - $this->assertFalse($cookie->isExpired(0)); - $cookie->agePrematurely(2); - $this->assertTrue($cookie->isExpired(0)); - } -} - -class TestOfCookieJar extends UnitTestCase { - - function testAddCookie() { - $jar = new SimpleCookieJar(); - $jar->setCookie("a", "A"); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=A')); - } - - function testHostFilter() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'A', 'my-host.com'); - $jar->setCookie('b', 'B', 'another-host.com'); - $jar->setCookie('c', 'C'); - $this->assertEqual( - $jar->selectAsPairs(new SimpleUrl('my-host.com')), - array('a=A', 'c=C')); - $this->assertEqual( - $jar->selectAsPairs(new SimpleUrl('another-host.com')), - array('b=B', 'c=C')); - $this->assertEqual( - $jar->selectAsPairs(new SimpleUrl('www.another-host.com')), - array('b=B', 'c=C')); - $this->assertEqual( - $jar->selectAsPairs(new SimpleUrl('new-host.org')), - array('c=C')); - $this->assertEqual( - $jar->selectAsPairs(new SimpleUrl('/')), - array('a=A', 'b=B', 'c=C')); - } - - function testPathFilter() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'A', false, '/path/'); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array()); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/elsewhere')), array()); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/')), array('a=A')); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path')), array('a=A')); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/pa')), array()); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/here')), array('a=A')); - } - - function testPathFilterDeeply() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'A', false, '/path/more_path/'); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/')), array()); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path')), array()); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/pa')), array()); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/more_path/')), array('a=A')); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/more_path/and_more')), array('a=A')); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/path/not_here/')), array()); - } - - function testMultipleCookieWithDifferentPathsButSameName() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'abc', false, '/'); - $jar->setCookie('a', '123', false, '/path/here/'); - $this->assertEqual( - $jar->selectAsPairs(new SimpleUrl('/')), - array('a=abc')); - $this->assertEqual( - $jar->selectAsPairs(new SimpleUrl('my-host.com/')), - array('a=abc')); - $this->assertEqual( - $jar->selectAsPairs(new SimpleUrl('my-host.com/path/')), - array('a=abc')); - $this->assertEqual( - $jar->selectAsPairs(new SimpleUrl('my-host.com/path/here')), - array('a=abc', 'a=123')); - $this->assertEqual( - $jar->selectAsPairs(new SimpleUrl('my-host.com/path/here/there')), - array('a=abc', 'a=123')); - } - - function testOverwrite() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'abc', false, '/'); - $jar->setCookie('a', 'cde', false, '/'); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=cde')); - } - - function testClearSessionCookies() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'A', false, '/'); - $jar->restartSession(); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array()); - } - - function testExpiryFilterByDate() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'A', false, '/', 'Wed, 25-Dec-02 04:24:20 GMT'); - $jar->restartSession("Wed, 25-Dec-02 04:24:19 GMT"); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=A')); - $jar->restartSession("Wed, 25-Dec-02 04:24:21 GMT"); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array()); - } - - function testExpiryFilterByAgeing() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'A', false, '/', 'Wed, 25-Dec-02 04:24:20 GMT'); - $jar->restartSession("Wed, 25-Dec-02 04:24:19 GMT"); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=A')); - $jar->agePrematurely(2); - $jar->restartSession("Wed, 25-Dec-02 04:24:19 GMT"); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array()); - } - - function testCookieClearing() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'abc', false, '/'); - $jar->setCookie('a', '', false, '/'); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=')); - } - - function testCookieClearByLoweringDate() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'abc', false, '/', 'Wed, 25-Dec-02 04:24:21 GMT'); - $jar->setCookie('a', 'def', false, '/', 'Wed, 25-Dec-02 04:24:19 GMT'); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array('a=def')); - $jar->restartSession('Wed, 25-Dec-02 04:24:20 GMT'); - $this->assertEqual($jar->selectAsPairs(new SimpleUrl('/')), array()); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/detached_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/detached_test.php deleted file mode 100644 index 06db8280..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/detached_test.php +++ /dev/null @@ -1,15 +0,0 @@ -addTestCase(new DetachedTestCase($command)); -if (SimpleReporter::inCli()) { - exit ($test->run(new TextReporter()) ? 0 : 1); -} -$test->run(new HtmlReporter()); -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/dumper_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/dumper_test.php deleted file mode 100644 index 789047de..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/dumper_test.php +++ /dev/null @@ -1,88 +0,0 @@ -assertEqual( - $dumper->clipString("Hello", 6), - "Hello", - "Hello, 6->%s"); - $this->assertEqual( - $dumper->clipString("Hello", 5), - "Hello", - "Hello, 5->%s"); - $this->assertEqual( - $dumper->clipString("Hello world", 3), - "Hel...", - "Hello world, 3->%s"); - $this->assertEqual( - $dumper->clipString("Hello world", 6, 3), - "Hello ...", - "Hello world, 6, 3->%s"); - $this->assertEqual( - $dumper->clipString("Hello world", 3, 6), - "...o w...", - "Hello world, 3, 6->%s"); - $this->assertEqual( - $dumper->clipString("Hello world", 4, 11), - "...orld", - "Hello world, 4, 11->%s"); - $this->assertEqual( - $dumper->clipString("Hello world", 4, 12), - "...orld", - "Hello world, 4, 12->%s"); - } - - function testDescribeNull() { - $dumper = new SimpleDumper(); - $this->assertPattern('/null/i', $dumper->describeValue(null)); - } - - function testDescribeBoolean() { - $dumper = new SimpleDumper(); - $this->assertPattern('/boolean/i', $dumper->describeValue(true)); - $this->assertPattern('/true/i', $dumper->describeValue(true)); - $this->assertPattern('/false/i', $dumper->describeValue(false)); - } - - function testDescribeString() { - $dumper = new SimpleDumper(); - $this->assertPattern('/string/i', $dumper->describeValue('Hello')); - $this->assertPattern('/Hello/', $dumper->describeValue('Hello')); - } - - function testDescribeInteger() { - $dumper = new SimpleDumper(); - $this->assertPattern('/integer/i', $dumper->describeValue(35)); - $this->assertPattern('/35/', $dumper->describeValue(35)); - } - - function testDescribeFloat() { - $dumper = new SimpleDumper(); - $this->assertPattern('/float/i', $dumper->describeValue(0.99)); - $this->assertPattern('/0\.99/', $dumper->describeValue(0.99)); - } - - function testDescribeArray() { - $dumper = new SimpleDumper(); - $this->assertPattern('/array/i', $dumper->describeValue(array(1, 4))); - $this->assertPattern('/2/i', $dumper->describeValue(array(1, 4))); - } - - function testDescribeObject() { - $dumper = new SimpleDumper(); - $this->assertPattern( - '/object/i', - $dumper->describeValue(new DumperDummy())); - $this->assertPattern( - '/DumperDummy/i', - $dumper->describeValue(new DumperDummy())); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/eclipse_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/eclipse_test.php deleted file mode 100644 index c90cbc91..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/eclipse_test.php +++ /dev/null @@ -1,32 +0,0 @@ -expectOnce('write',array($expected)); - $listener->setReturnValue('write',-1); - - $pathparts = pathinfo($fullpath); - $filename = $pathparts['basename']; - $test= &new TestSuite($filename); - $test->addTestFile($fullpath); - $test->run(new EclipseReporter($listener)); - $this->assertEqual($expected,$listener->output); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/encoding_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/encoding_test.php deleted file mode 100644 index 91d80db7..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/encoding_test.php +++ /dev/null @@ -1,213 +0,0 @@ -assertEqual($pair->asRequest(), 'a=A'); - } - - function testMimeEncodedAsHeadersAndContent() { - $pair = new SimpleEncodedPair('a', 'A'); - $this->assertEqual( - $pair->asMime(), - "Content-Disposition: form-data; name=\"a\"\r\n\r\nA"); - } - - function testAttachmentEncodedAsHeadersWithDispositionAndContent() { - $part = new SimpleAttachment('a', 'A', 'aaa.txt'); - $this->assertEqual( - $part->asMime(), - "Content-Disposition: form-data; name=\"a\"; filename=\"aaa.txt\"\r\n" . - "Content-Type: text/plain\r\n\r\nA"); - } -} - -class TestOfEncoding extends UnitTestCase { - private $content_so_far; - - function write($content) { - $this->content_so_far .= $content; - } - - function clear() { - $this->content_so_far = ''; - } - - function assertWritten($encoding, $content, $message = '%s') { - $this->clear(); - $encoding->writeTo($this); - $this->assertIdentical($this->content_so_far, $content, $message); - } - - function testGetEmpty() { - $encoding = new SimpleGetEncoding(); - $this->assertIdentical($encoding->getValue('a'), false); - $this->assertIdentical($encoding->asUrlRequest(), ''); - } - - function testPostEmpty() { - $encoding = new SimplePostEncoding(); - $this->assertIdentical($encoding->getValue('a'), false); - $this->assertWritten($encoding, ''); - } - - function testPrefilled() { - $encoding = new SimplePostEncoding(array('a' => 'aaa')); - $this->assertIdentical($encoding->getValue('a'), 'aaa'); - $this->assertWritten($encoding, 'a=aaa'); - } - - function testPrefilledWithTwoLevels() { - $query = array('a' => array('aa' => 'aaa')); - $encoding = new SimplePostEncoding($query); - $this->assertTrue($encoding->hasMoreThanOneLevel($query)); - $this->assertEqual($encoding->rewriteArrayWithMultipleLevels($query), array('a[aa]' => 'aaa')); - $this->assertIdentical($encoding->getValue('a[aa]'), 'aaa'); - $this->assertWritten($encoding, 'a%5Baa%5D=aaa'); - } - - function testPrefilledWithThreeLevels() { - $query = array('a' => array('aa' => array('aaa' => 'aaaa'))); - $encoding = new SimplePostEncoding($query); - $this->assertTrue($encoding->hasMoreThanOneLevel($query)); - $this->assertEqual($encoding->rewriteArrayWithMultipleLevels($query), array('a[aa][aaa]' => 'aaaa')); - $this->assertIdentical($encoding->getValue('a[aa][aaa]'), 'aaaa'); - $this->assertWritten($encoding, 'a%5Baa%5D%5Baaa%5D=aaaa'); - } - - function testPrefilledWithObject() { - $encoding = new SimplePostEncoding(new SimpleEncoding(array('a' => 'aaa'))); - $this->assertIdentical($encoding->getValue('a'), 'aaa'); - $this->assertWritten($encoding, 'a=aaa'); - } - - function testMultiplePrefilled() { - $query = array('a' => array('a1', 'a2')); - $encoding = new SimplePostEncoding($query); - $this->assertTrue($encoding->hasMoreThanOneLevel($query)); - $this->assertEqual($encoding->rewriteArrayWithMultipleLevels($query), array('a[0]' => 'a1', 'a[1]' => 'a2')); - $this->assertIdentical($encoding->getValue('a[0]'), 'a1'); - $this->assertIdentical($encoding->getValue('a[1]'), 'a2'); - $this->assertWritten($encoding, 'a%5B0%5D=a1&a%5B1%5D=a2'); - } - - function testSingleParameter() { - $encoding = new SimplePostEncoding(); - $encoding->add('a', 'Hello'); - $this->assertEqual($encoding->getValue('a'), 'Hello'); - $this->assertWritten($encoding, 'a=Hello'); - } - - function testFalseParameter() { - $encoding = new SimplePostEncoding(); - $encoding->add('a', false); - $this->assertEqual($encoding->getValue('a'), false); - $this->assertWritten($encoding, ''); - } - - function testUrlEncoding() { - $encoding = new SimplePostEncoding(); - $encoding->add('a', 'Hello there!'); - $this->assertWritten($encoding, 'a=Hello+there%21'); - } - - function testUrlEncodingOfKey() { - $encoding = new SimplePostEncoding(); - $encoding->add('a!', 'Hello'); - $this->assertWritten($encoding, 'a%21=Hello'); - } - - function testMultipleParameter() { - $encoding = new SimplePostEncoding(); - $encoding->add('a', 'Hello'); - $encoding->add('b', 'Goodbye'); - $this->assertWritten($encoding, 'a=Hello&b=Goodbye'); - } - - function testEmptyParameters() { - $encoding = new SimplePostEncoding(); - $encoding->add('a', ''); - $encoding->add('b', ''); - $this->assertWritten($encoding, 'a=&b='); - } - - function testRepeatedParameter() { - $encoding = new SimplePostEncoding(); - $encoding->add('a', 'Hello'); - $encoding->add('a', 'Goodbye'); - $this->assertIdentical($encoding->getValue('a'), array('Hello', 'Goodbye')); - $this->assertWritten($encoding, 'a=Hello&a=Goodbye'); - } - - function testAddingLists() { - $encoding = new SimplePostEncoding(); - $encoding->add('a', array('Hello', 'Goodbye')); - $this->assertIdentical($encoding->getValue('a'), array('Hello', 'Goodbye')); - $this->assertWritten($encoding, 'a=Hello&a=Goodbye'); - } - - function testMergeInHash() { - $encoding = new SimpleGetEncoding(array('a' => 'A1', 'b' => 'B')); - $encoding->merge(array('a' => 'A2')); - $this->assertIdentical($encoding->getValue('a'), array('A1', 'A2')); - $this->assertIdentical($encoding->getValue('b'), 'B'); - } - - function testMergeInObject() { - $encoding = new SimpleGetEncoding(array('a' => 'A1', 'b' => 'B')); - $encoding->merge(new SimpleEncoding(array('a' => 'A2'))); - $this->assertIdentical($encoding->getValue('a'), array('A1', 'A2')); - $this->assertIdentical($encoding->getValue('b'), 'B'); - } - - function testPrefilledMultipart() { - $encoding = new SimpleMultipartEncoding(array('a' => 'aaa'), 'boundary'); - $this->assertIdentical($encoding->getValue('a'), 'aaa'); - $this->assertwritten($encoding, - "--boundary\r\n" . - "Content-Disposition: form-data; name=\"a\"\r\n" . - "\r\n" . - "aaa\r\n" . - "--boundary--\r\n"); - } - - function testAttachment() { - $encoding = new SimpleMultipartEncoding(array(), 'boundary'); - $encoding->attach('a', 'aaa', 'aaa.txt'); - $this->assertIdentical($encoding->getValue('a'), 'aaa.txt'); - $this->assertwritten($encoding, - "--boundary\r\n" . - "Content-Disposition: form-data; name=\"a\"; filename=\"aaa.txt\"\r\n" . - "Content-Type: text/plain\r\n" . - "\r\n" . - "aaa\r\n" . - "--boundary--\r\n"); - } -} - -class TestOfFormHeaders extends UnitTestCase { - - function testEmptyEncodingWritesZeroContentLength() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("Content-Length: 0\r\n")); - $socket->expectAt(1, 'write', array("Content-Type: application/x-www-form-urlencoded\r\n")); - $encoding = new SimplePostEncoding(); - $encoding->writeHeadersTo($socket); - } - - function testEmptyMultipartEncodingWritesEndBoundaryContentLength() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("Content-Length: 14\r\n")); - $socket->expectAt(1, 'write', array("Content-Type: multipart/form-data, boundary=boundary\r\n")); - $encoding = new SimpleMultipartEncoding(array(), 'boundary'); - $encoding->writeHeadersTo($socket); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/errors_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/errors_test.php deleted file mode 100644 index ebb9e058..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/errors_test.php +++ /dev/null @@ -1,229 +0,0 @@ -get('SimpleErrorQueue'); - $queue->clear(); - } - - function tearDown() { - $context = SimpleTest::getContext(); - $queue = $context->get('SimpleErrorQueue'); - $queue->clear(); - } - - function testExpectationMatchCancelsIncomingError() { - $test = new MockSimpleTestCase(); - $test->expectOnce('assert', array( - new IdenticalExpectation(new AnythingExpectation()), - 'B', - 'a message')); - $test->setReturnValue('assert', true); - $test->expectNever('error'); - $queue = new SimpleErrorQueue(); - $queue->setTestCase($test); - $queue->expectError(new AnythingExpectation(), 'a message'); - $queue->add(1024, 'B', 'b.php', 100); - } -} - -class TestOfErrorTrap extends UnitTestCase { - private $old; - - function setUp() { - $this->old = error_reporting(E_ALL); - set_error_handler('SimpleTestErrorHandler'); - } - - function tearDown() { - restore_error_handler(); - error_reporting($this->old); - } - - function testQueueStartsEmpty() { - $context = SimpleTest::getContext(); - $queue = $context->get('SimpleErrorQueue'); - $this->assertFalse($queue->extract()); - } - - function testErrorsAreSwallowedByMatchingExpectation() { - $this->expectError('Ouch!'); - trigger_error('Ouch!'); - } - - function testErrorsAreSwallowedInOrder() { - $this->expectError('a'); - $this->expectError('b'); - trigger_error('a'); - trigger_error('b'); - } - - function testAnyErrorCanBeSwallowed() { - $this->expectError(); - trigger_error('Ouch!'); - } - - function testErrorCanBeSwallowedByPatternMatching() { - $this->expectError(new PatternExpectation('/ouch/i')); - trigger_error('Ouch!'); - } - - function testErrorWithPercentsPassesWithNoSprintfError() { - $this->expectError("%"); - trigger_error('%'); - } -} - -class TestOfErrors extends UnitTestCase { - private $old; - - function setUp() { - $this->old = error_reporting(E_ALL); - } - - function tearDown() { - error_reporting($this->old); - } - - function testDefaultWhenAllReported() { - error_reporting(E_ALL); - $this->expectError('Ouch!'); - trigger_error('Ouch!'); - } - - function testNoticeWhenReported() { - error_reporting(E_ALL); - $this->expectError('Ouch!'); - trigger_error('Ouch!', E_USER_NOTICE); - } - - function testWarningWhenReported() { - error_reporting(E_ALL); - $this->expectError('Ouch!'); - trigger_error('Ouch!', E_USER_WARNING); - } - - function testErrorWhenReported() { - error_reporting(E_ALL); - $this->expectError('Ouch!'); - trigger_error('Ouch!', E_USER_ERROR); - } - - function testNoNoticeWhenNotReported() { - error_reporting(0); - trigger_error('Ouch!', E_USER_NOTICE); - } - - function testNoWarningWhenNotReported() { - error_reporting(0); - trigger_error('Ouch!', E_USER_WARNING); - } - - function testNoticeSuppressedWhenReported() { - error_reporting(E_ALL); - @trigger_error('Ouch!', E_USER_NOTICE); - } - - function testWarningSuppressedWhenReported() { - error_reporting(E_ALL); - @trigger_error('Ouch!', E_USER_WARNING); - } - - function testErrorWithPercentsReportedWithNoSprintfError() { - $this->expectError('%'); - trigger_error('%'); - } -} - -class TestOfPHP52RecoverableErrors extends UnitTestCase { - function skip() { - $this->skipIf( - version_compare(phpversion(), '5.2', '<'), - 'E_RECOVERABLE_ERROR not tested for PHP below 5.2'); - } - - function testError() { - eval(' - class RecoverableErrorTestingStub { - function ouch(RecoverableErrorTestingStub $obj) { - } - } - '); - - $stub = new RecoverableErrorTestingStub(); - $this->expectError(new PatternExpectation('/must be an instance of RecoverableErrorTestingStub/i')); - $stub->ouch(new stdClass()); - } -} - -class TestOfErrorsExcludingPHP52AndAbove extends UnitTestCase { - function skip() { - $this->skipIf( - version_compare(phpversion(), '5.2', '>='), - 'E_USER_ERROR not tested for PHP 5.2 and above'); - } - - function testNoErrorWhenNotReported() { - error_reporting(0); - trigger_error('Ouch!', E_USER_ERROR); - } - - function testErrorSuppressedWhenReported() { - error_reporting(E_ALL); - @trigger_error('Ouch!', E_USER_ERROR); - } -} - -SimpleTest::ignore('TestOfNotEnoughErrors'); -/** - * This test is ignored as it is used by {@link TestRunnerForLeftOverAndNotEnoughErrors} - * to verify that it fails as expected. - * - * @ignore - */ -class TestOfNotEnoughErrors extends UnitTestCase { - function testExpectTwoErrorsThrowOne() { - $this->expectError('Error 1'); - trigger_error('Error 1'); - $this->expectError('Error 2'); - } -} - -SimpleTest::ignore('TestOfLeftOverErrors'); -/** - * This test is ignored as it is used by {@link TestRunnerForLeftOverAndNotEnoughErrors} - * to verify that it fails as expected. - * - * @ignore - */ -class TestOfLeftOverErrors extends UnitTestCase { - function testExpectOneErrorGetTwo() { - $this->expectError('Error 1'); - trigger_error('Error 1'); - trigger_error('Error 2'); - } -} - -class TestRunnerForLeftOverAndNotEnoughErrors extends UnitTestCase { - function testRunLeftOverErrorsTestCase() { - $test = new TestOfLeftOverErrors(); - $this->assertFalse($test->run(new SimpleReporter())); - } - - function testRunNotEnoughErrors() { - $test = new TestOfNotEnoughErrors(); - $this->assertFalse($test->run(new SimpleReporter())); - } -} - -// TODO: Add stacked error handler test -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/exceptions_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/exceptions_test.php deleted file mode 100644 index 9cc35c59..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/exceptions_test.php +++ /dev/null @@ -1,153 +0,0 @@ -assertTrue($expectation->test(new MyTestException())); - $this->assertTrue($expectation->test(new HigherTestException())); - $this->assertFalse($expectation->test(new OtherTestException())); - } - - function testMatchesClassAndMessageWhenExceptionExpected() { - $expectation = new ExceptionExpectation(new MyTestException('Hello')); - $this->assertTrue($expectation->test(new MyTestException('Hello'))); - $this->assertFalse($expectation->test(new HigherTestException('Hello'))); - $this->assertFalse($expectation->test(new OtherTestException('Hello'))); - $this->assertFalse($expectation->test(new MyTestException('Goodbye'))); - $this->assertFalse($expectation->test(new MyTestException())); - } - - function testMessagelessExceptionMatchesOnlyOnClass() { - $expectation = new ExceptionExpectation(new MyTestException()); - $this->assertTrue($expectation->test(new MyTestException())); - $this->assertFalse($expectation->test(new HigherTestException())); - } -} - -class TestOfExceptionTrap extends UnitTestCase { - - function testNoExceptionsInQueueMeansNoTestMessages() { - $test = new MockSimpleTestCase(); - $test->expectNever('assert'); - $queue = new SimpleExceptionTrap(); - $this->assertFalse($queue->isExpected($test, new Exception())); - } - - function testMatchingExceptionGivesTrue() { - $expectation = new MockSimpleExpectation(); - $expectation->setReturnValue('test', true); - $test = new MockSimpleTestCase(); - $test->setReturnValue('assert', true); - $queue = new SimpleExceptionTrap(); - $queue->expectException($expectation, 'message'); - $this->assertTrue($queue->isExpected($test, new Exception())); - } - - function testMatchingExceptionTriggersAssertion() { - $test = new MockSimpleTestCase(); - $test->expectOnce('assert', array( - '*', - new ExceptionExpectation(new Exception()), - 'message')); - $queue = new SimpleExceptionTrap(); - $queue->expectException(new ExceptionExpectation(new Exception()), 'message'); - $queue->isExpected($test, new Exception()); - } -} - -class TestOfCatchingExceptions extends UnitTestCase { - - function testCanCatchAnyExpectedException() { - $this->expectException(); - throw new Exception(); - } - - function testCanMatchExceptionByClass() { - $this->expectException('MyTestException'); - throw new HigherTestException(); - } - - function testCanMatchExceptionExactly() { - $this->expectException(new Exception('Ouch')); - throw new Exception('Ouch'); - } - - function testLastListedExceptionIsTheOneThatCounts() { - $this->expectException('OtherTestException'); - $this->expectException('MyTestException'); - throw new HigherTestException(); - } -} - -class TestOfCallingTearDownAfterExceptions extends UnitTestCase { - private $debri = 0; - - function tearDown() { - $this->debri--; - } - - function testLeaveSomeDebri() { - $this->debri++; - $this->expectException(); - throw new Exception(__FUNCTION__); - } - - function testDebriWasRemovedOnce() { - $this->assertEqual($this->debri, 0); - } -} - -class TestOfExceptionThrownInSetUpDoesNotRunTestBody extends UnitTestCase { - - function setUp() { - $this->expectException(); - throw new Exception(); - } - - function testShouldNotBeRun() { - $this->fail('This test body should not be run'); - } - - function testShouldNotBeRunEither() { - $this->fail('This test body should not be run either'); - } -} - -class TestOfExpectExceptionWithSetUp extends UnitTestCase { - - function setUp() { - $this->expectException(); - } - - function testThisExceptionShouldBeCaught() { - throw new Exception(); - } - - function testJustThrowingMyTestException() { - throw new MyTestException(); - } -} - -class TestOfThrowingExceptionsInTearDown extends UnitTestCase { - - function tearDown() { - throw new Exception(); - } - - function testDoesntFatal() { - $this->expectException(); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/expectation_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/expectation_test.php deleted file mode 100644 index 2283c19a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/expectation_test.php +++ /dev/null @@ -1,223 +0,0 @@ -assertTrue($is_true->test(true)); - $this->assertFalse($is_true->test(false)); - } - - function testStringMatch() { - $hello = new EqualExpectation("Hello"); - $this->assertTrue($hello->test("Hello")); - $this->assertFalse($hello->test("Goodbye")); - } - - function testInteger() { - $fifteen = new EqualExpectation(15); - $this->assertTrue($fifteen->test(15)); - $this->assertFalse($fifteen->test(14)); - } - - function testFloat() { - $pi = new EqualExpectation(3.14); - $this->assertTrue($pi->test(3.14)); - $this->assertFalse($pi->test(3.15)); - } - - function testArray() { - $colours = new EqualExpectation(array("r", "g", "b")); - $this->assertTrue($colours->test(array("r", "g", "b"))); - $this->assertFalse($colours->test(array("g", "b", "r"))); - } - - function testHash() { - $is_blue = new EqualExpectation(array("r" => 0, "g" => 0, "b" => 255)); - $this->assertTrue($is_blue->test(array("r" => 0, "g" => 0, "b" => 255))); - $this->assertFalse($is_blue->test(array("r" => 0, "g" => 255, "b" => 0))); - } - - function testHashWithOutOfOrderKeysShouldStillMatch() { - $any_order = new EqualExpectation(array('a' => 1, 'b' => 2)); - $this->assertTrue($any_order->test(array('b' => 2, 'a' => 1))); - } -} - -class TestOfWithin extends UnitTestCase { - - function testWithinFloatingPointMargin() { - $within = new WithinMarginExpectation(1.0, 0.2); - $this->assertFalse($within->test(0.7)); - $this->assertTrue($within->test(0.8)); - $this->assertTrue($within->test(0.9)); - $this->assertTrue($within->test(1.1)); - $this->assertTrue($within->test(1.2)); - $this->assertFalse($within->test(1.3)); - } - - function testOutsideFloatingPointMargin() { - $within = new OutsideMarginExpectation(1.0, 0.2); - $this->assertTrue($within->test(0.7)); - $this->assertFalse($within->test(0.8)); - $this->assertFalse($within->test(1.2)); - $this->assertTrue($within->test(1.3)); - } -} - -class TestOfInequality extends UnitTestCase { - - function testStringMismatch() { - $not_hello = new NotEqualExpectation("Hello"); - $this->assertTrue($not_hello->test("Goodbye")); - $this->assertFalse($not_hello->test("Hello")); - } -} - -class RecursiveNasty { - private $me; - - function RecursiveNasty() { - $this->me = $this; - } -} - -class TestOfIdentity extends UnitTestCase { - - function testType() { - $string = new IdenticalExpectation("37"); - $this->assertTrue($string->test("37")); - $this->assertFalse($string->test(37)); - $this->assertFalse($string->test("38")); - } - - function _testNastyPhp5Bug() { - $this->assertFalse(new RecursiveNasty() != new RecursiveNasty()); - } - - function _testReallyHorribleRecursiveStructure() { - $hopeful = new IdenticalExpectation(new RecursiveNasty()); - $this->assertTrue($hopeful->test(new RecursiveNasty())); - } -} - -class DummyReferencedObject{} - -class TestOfReference extends UnitTestCase { - - function testReference() { - $foo = "foo"; - $ref = &$foo; - $not_ref = $foo; - $bar = "bar"; - - $expect = new ReferenceExpectation($foo); - $this->assertTrue($expect->test($ref)); - $this->assertFalse($expect->test($not_ref)); - $this->assertFalse($expect->test($bar)); - } -} - -class TestOfNonIdentity extends UnitTestCase { - - function testType() { - $string = new NotIdenticalExpectation("37"); - $this->assertTrue($string->test("38")); - $this->assertTrue($string->test(37)); - $this->assertFalse($string->test("37")); - } -} - -class TestOfPatterns extends UnitTestCase { - - function testWanted() { - $pattern = new PatternExpectation('/hello/i'); - $this->assertTrue($pattern->test("Hello world")); - $this->assertFalse($pattern->test("Goodbye world")); - } - - function testUnwanted() { - $pattern = new NoPatternExpectation('/hello/i'); - $this->assertFalse($pattern->test("Hello world")); - $this->assertTrue($pattern->test("Goodbye world")); - } -} - -class ExpectedMethodTarget { - function hasThisMethod() {} -} - -class TestOfMethodExistence extends UnitTestCase { - - function testHasMethod() { - $instance = new ExpectedMethodTarget(); - $expectation = new MethodExistsExpectation('hasThisMethod'); - $this->assertTrue($expectation->test($instance)); - $expectation = new MethodExistsExpectation('doesNotHaveThisMethod'); - $this->assertFalse($expectation->test($instance)); - } -} - -class TestOfIsA extends UnitTestCase { - - function testString() { - $expectation = new IsAExpectation('string'); - $this->assertTrue($expectation->test('Hello')); - $this->assertFalse($expectation->test(5)); - } - - function testBoolean() { - $expectation = new IsAExpectation('boolean'); - $this->assertTrue($expectation->test(true)); - $this->assertFalse($expectation->test(1)); - } - - function testBool() { - $expectation = new IsAExpectation('bool'); - $this->assertTrue($expectation->test(true)); - $this->assertFalse($expectation->test(1)); - } - - function testDouble() { - $expectation = new IsAExpectation('double'); - $this->assertTrue($expectation->test(5.0)); - $this->assertFalse($expectation->test(5)); - } - - function testFloat() { - $expectation = new IsAExpectation('float'); - $this->assertTrue($expectation->test(5.0)); - $this->assertFalse($expectation->test(5)); - } - - function testReal() { - $expectation = new IsAExpectation('real'); - $this->assertTrue($expectation->test(5.0)); - $this->assertFalse($expectation->test(5)); - } - - function testInteger() { - $expectation = new IsAExpectation('integer'); - $this->assertTrue($expectation->test(5)); - $this->assertFalse($expectation->test(5.0)); - } - - function testInt() { - $expectation = new IsAExpectation('int'); - $this->assertTrue($expectation->test(5)); - $this->assertFalse($expectation->test(5.0)); - } -} - -class TestOfNotA extends UnitTestCase { - - function testString() { - $expectation = new NotAExpectation('string'); - $this->assertFalse($expectation->test('Hello')); - $this->assertTrue($expectation->test(5)); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/extensions_tests.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/extensions_tests.php deleted file mode 100644 index b32fa8e5..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/extensions_tests.php +++ /dev/null @@ -1,23 +0,0 @@ -skipIf(version_compare(phpversion(), '5', '<'), - 'Many extensions only work with PHP5 and above'); - } - - function ExtensionsTests() { - $this->TestSuite('Extension tests for SimpleTest ' . SimpleTest::getVersion()); - - $nodes = new RecursiveDirectoryIterator(dirname(__FILE__).'/../extensions/'); - foreach(new RecursiveIteratorIterator($nodes) as $node) { - if (preg_match('/test\.php$/', $node->getFilename())) { - $this->addFile($node->getPathname()); - } - } - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/form_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/form_test.php deleted file mode 100644 index de04537a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/form_test.php +++ /dev/null @@ -1,324 +0,0 @@ -returns('getUrl', new SimpleUrl($url)); - $page->returns('expandUrl', new SimpleUrl($url)); - return $page; - } - - function testFormAttributes() { - $tag = new SimpleFormTag(array('method' => 'GET', 'action' => 'here.php', 'id' => '33')); - $form = new SimpleForm($tag, $this->page('http://host/a/index.html')); - $this->assertEqual($form->getMethod(), 'get'); - $this->assertIdentical($form->getId(), '33'); - $this->assertNull($form->getValue(new SimpleByName('a'))); - } - - function testAction() { - $page = new MockSimplePage(); - $page->expectOnce('expandUrl', array(new SimpleUrl('here.php'))); - $page->setReturnValue('expandUrl', new SimpleUrl('http://host/here.php')); - $tag = new SimpleFormTag(array('method' => 'GET', 'action' => 'here.php')); - $form = new SimpleForm($tag, $page); - $this->assertEqual($form->getAction(), new SimpleUrl('http://host/here.php')); - } - - function testEmptyAction() { - $tag = new SimpleFormTag(array('method' => 'GET', 'action' => '', 'id' => '33')); - $form = new SimpleForm($tag, $this->page('http://host/a/index.html')); - $this->assertEqual( - $form->getAction(), - new SimpleUrl('http://host/a/index.html')); - } - - function testMissingAction() { - $tag = new SimpleFormTag(array('method' => 'GET')); - $form = new SimpleForm($tag, $this->page('http://host/a/index.html')); - $this->assertEqual( - $form->getAction(), - new SimpleUrl('http://host/a/index.html')); - } - - function testRootAction() { - $page = new MockSimplePage(); - $page->expectOnce('expandUrl', array(new SimpleUrl('/'))); - $page->setReturnValue('expandUrl', new SimpleUrl('http://host/')); - $tag = new SimpleFormTag(array('method' => 'GET', 'action' => '/')); - $form = new SimpleForm($tag, $page); - $this->assertEqual( - $form->getAction(), - new SimpleUrl('http://host/')); - } - - function testDefaultFrameTargetOnForm() { - $page = new MockSimplePage(); - $page->expectOnce('expandUrl', array(new SimpleUrl('here.php'))); - $page->setReturnValue('expandUrl', new SimpleUrl('http://host/here.php')); - $tag = new SimpleFormTag(array('method' => 'GET', 'action' => 'here.php')); - $form = new SimpleForm($tag, $page); - $form->setDefaultTarget('frame'); - $expected = new SimpleUrl('http://host/here.php'); - $expected->setTarget('frame'); - $this->assertEqual($form->getAction(), $expected); - } - - function testTextWidget() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleTextTag( - array('name' => 'me', 'type' => 'text', 'value' => 'Myself'))); - $this->assertIdentical($form->getValue(new SimpleByName('me')), 'Myself'); - $this->assertTrue($form->setField(new SimpleByName('me'), 'Not me')); - $this->assertFalse($form->setField(new SimpleByName('not_present'), 'Not me')); - $this->assertIdentical($form->getValue(new SimpleByName('me')), 'Not me'); - $this->assertNull($form->getValue(new SimpleByName('not_present'))); - } - - function testTextWidgetById() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleTextTag( - array('name' => 'me', 'type' => 'text', 'value' => 'Myself', 'id' => 50))); - $this->assertIdentical($form->getValue(new SimpleById(50)), 'Myself'); - $this->assertTrue($form->setField(new SimpleById(50), 'Not me')); - $this->assertIdentical($form->getValue(new SimpleById(50)), 'Not me'); - } - - function testTextWidgetByLabel() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $widget = new SimpleTextTag(array('name' => 'me', 'type' => 'text', 'value' => 'a')); - $form->addWidget($widget); - $widget->setLabel('thing'); - $this->assertIdentical($form->getValue(new SimpleByLabel('thing')), 'a'); - $this->assertTrue($form->setField(new SimpleByLabel('thing'), 'b')); - $this->assertIdentical($form->getValue(new SimpleByLabel('thing')), 'b'); - } - - function testSubmitEmpty() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $this->assertIdentical($form->submit(), new SimpleGetEncoding()); - } - - function testSubmitButton() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('http://host')); - $form->addWidget(new SimpleSubmitTag( - array('type' => 'submit', 'name' => 'go', 'value' => 'Go!', 'id' => '9'))); - $this->assertTrue($form->hasSubmit(new SimpleByName('go'))); - $this->assertEqual($form->getValue(new SimpleByName('go')), 'Go!'); - $this->assertEqual($form->getValue(new SimpleById(9)), 'Go!'); - $this->assertEqual( - $form->submitButton(new SimpleByName('go')), - new SimpleGetEncoding(array('go' => 'Go!'))); - $this->assertEqual( - $form->submitButton(new SimpleByLabel('Go!')), - new SimpleGetEncoding(array('go' => 'Go!'))); - $this->assertEqual( - $form->submitButton(new SimpleById(9)), - new SimpleGetEncoding(array('go' => 'Go!'))); - } - - function testSubmitWithAdditionalParameters() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('http://host')); - $form->addWidget(new SimpleSubmitTag( - array('type' => 'submit', 'name' => 'go', 'value' => 'Go!'))); - $this->assertEqual( - $form->submitButton(new SimpleByLabel('Go!'), array('a' => 'A')), - new SimpleGetEncoding(array('go' => 'Go!', 'a' => 'A'))); - } - - function testSubmitButtonWithLabelOfSubmit() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('http://host')); - $form->addWidget(new SimpleSubmitTag( - array('type' => 'submit', 'name' => 'test', 'value' => 'Submit'))); - $this->assertEqual( - $form->submitButton(new SimpleByName('test')), - new SimpleGetEncoding(array('test' => 'Submit'))); - $this->assertEqual( - $form->submitButton(new SimpleByLabel('Submit')), - new SimpleGetEncoding(array('test' => 'Submit'))); - } - - function testSubmitButtonWithWhitespacePaddedLabelOfSubmit() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('http://host')); - $form->addWidget(new SimpleSubmitTag( - array('type' => 'submit', 'name' => 'test', 'value' => ' Submit '))); - $this->assertEqual( - $form->submitButton(new SimpleByLabel('Submit')), - new SimpleGetEncoding(array('test' => ' Submit '))); - } - - function testImageSubmitButton() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleImageSubmitTag(array( - 'type' => 'image', - 'src' => 'source.jpg', - 'name' => 'go', - 'alt' => 'Go!', - 'id' => '9'))); - $this->assertTrue($form->hasImage(new SimpleByLabel('Go!'))); - $this->assertEqual( - $form->submitImage(new SimpleByLabel('Go!'), 100, 101), - new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101))); - $this->assertTrue($form->hasImage(new SimpleByName('go'))); - $this->assertEqual( - $form->submitImage(new SimpleByName('go'), 100, 101), - new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101))); - $this->assertTrue($form->hasImage(new SimpleById(9))); - $this->assertEqual( - $form->submitImage(new SimpleById(9), 100, 101), - new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101))); - } - - function testImageSubmitButtonWithAdditionalData() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleImageSubmitTag(array( - 'type' => 'image', - 'src' => 'source.jpg', - 'name' => 'go', - 'alt' => 'Go!'))); - $this->assertEqual( - $form->submitImage(new SimpleByLabel('Go!'), 100, 101, array('a' => 'A')), - new SimpleGetEncoding(array('go.x' => 100, 'go.y' => 101, 'a' => 'A'))); - } - - function testButtonTag() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('http://host')); - $widget = new SimpleButtonTag( - array('type' => 'submit', 'name' => 'go', 'value' => 'Go', 'id' => '9')); - $widget->addContent('Go!'); - $form->addWidget($widget); - $this->assertTrue($form->hasSubmit(new SimpleByName('go'))); - $this->assertTrue($form->hasSubmit(new SimpleByLabel('Go!'))); - $this->assertEqual( - $form->submitButton(new SimpleByName('go')), - new SimpleGetEncoding(array('go' => 'Go'))); - $this->assertEqual( - $form->submitButton(new SimpleByLabel('Go!')), - new SimpleGetEncoding(array('go' => 'Go'))); - $this->assertEqual( - $form->submitButton(new SimpleById(9)), - new SimpleGetEncoding(array('go' => 'Go'))); - } - - function testMultipleFieldsWithSameNameSubmitted() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $input = new SimpleTextTag(array('name' => 'elements[]', 'value' => '1')); - $form->addWidget($input); - $input = new SimpleTextTag(array('name' => 'elements[]', 'value' => '2')); - $form->addWidget($input); - $form->setField(new SimpleByLabelOrName('elements[]'), '3', 1); - $form->setField(new SimpleByLabelOrName('elements[]'), '4', 2); - $submit = $form->submit(); - $requests = $submit->getAll(); - $this->assertEqual(count($requests), 2); - $this->assertIdentical($requests[0], new SimpleEncodedPair('elements[]', '3')); - $this->assertIdentical($requests[1], new SimpleEncodedPair('elements[]', '4')); - } - - function testSingleSelectFieldSubmitted() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $select = new SimpleSelectionTag(array('name' => 'a')); - $select->addTag(new SimpleOptionTag( - array('value' => 'aaa', 'selected' => ''))); - $form->addWidget($select); - $this->assertIdentical( - $form->submit(), - new SimpleGetEncoding(array('a' => 'aaa'))); - } - - function testSingleSelectFieldSubmittedWithPost() { - $form = new SimpleForm(new SimpleFormTag(array('method' => 'post')), $this->page('htp://host')); - $select = new SimpleSelectionTag(array('name' => 'a')); - $select->addTag(new SimpleOptionTag( - array('value' => 'aaa', 'selected' => ''))); - $form->addWidget($select); - $this->assertIdentical( - $form->submit(), - new SimplePostEncoding(array('a' => 'aaa'))); - } - - function testUnchecked() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleCheckboxTag( - array('name' => 'me', 'type' => 'checkbox'))); - $this->assertIdentical($form->getValue(new SimpleByName('me')), false); - $this->assertTrue($form->setField(new SimpleByName('me'), 'on')); - $this->assertEqual($form->getValue(new SimpleByName('me')), 'on'); - $this->assertFalse($form->setField(new SimpleByName('me'), 'other')); - $this->assertEqual($form->getValue(new SimpleByName('me')), 'on'); - } - - function testChecked() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleCheckboxTag( - array('name' => 'me', 'value' => 'a', 'type' => 'checkbox', 'checked' => ''))); - $this->assertIdentical($form->getValue(new SimpleByName('me')), 'a'); - $this->assertTrue($form->setField(new SimpleByName('me'), 'a')); - $this->assertEqual($form->getValue(new SimpleByName('me')), 'a'); - $this->assertTrue($form->setField(new SimpleByName('me'), false)); - $this->assertEqual($form->getValue(new SimpleByName('me')), false); - } - - function testSingleUncheckedRadioButton() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleRadioButtonTag( - array('name' => 'me', 'value' => 'a', 'type' => 'radio'))); - $this->assertIdentical($form->getValue(new SimpleByName('me')), false); - $this->assertTrue($form->setField(new SimpleByName('me'), 'a')); - $this->assertEqual($form->getValue(new SimpleByName('me')), 'a'); - } - - function testSingleCheckedRadioButton() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleRadioButtonTag( - array('name' => 'me', 'value' => 'a', 'type' => 'radio', 'checked' => ''))); - $this->assertIdentical($form->getValue(new SimpleByName('me')), 'a'); - $this->assertFalse($form->setField(new SimpleByName('me'), 'other')); - } - - function testUncheckedRadioButtons() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleRadioButtonTag( - array('name' => 'me', 'value' => 'a', 'type' => 'radio'))); - $form->addWidget(new SimpleRadioButtonTag( - array('name' => 'me', 'value' => 'b', 'type' => 'radio'))); - $this->assertIdentical($form->getValue(new SimpleByName('me')), false); - $this->assertTrue($form->setField(new SimpleByName('me'), 'a')); - $this->assertIdentical($form->getValue(new SimpleByName('me')), 'a'); - $this->assertTrue($form->setField(new SimpleByName('me'), 'b')); - $this->assertIdentical($form->getValue(new SimpleByName('me')), 'b'); - $this->assertFalse($form->setField(new SimpleByName('me'), 'c')); - $this->assertIdentical($form->getValue(new SimpleByName('me')), 'b'); - } - - function testCheckedRadioButtons() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleRadioButtonTag( - array('name' => 'me', 'value' => 'a', 'type' => 'radio'))); - $form->addWidget(new SimpleRadioButtonTag( - array('name' => 'me', 'value' => 'b', 'type' => 'radio', 'checked' => ''))); - $this->assertIdentical($form->getValue(new SimpleByName('me')), 'b'); - $this->assertTrue($form->setField(new SimpleByName('me'), 'a')); - $this->assertIdentical($form->getValue(new SimpleByName('me')), 'a'); - } - - function testMultipleFieldsWithSameKey() { - $form = new SimpleForm(new SimpleFormTag(array()), $this->page('htp://host')); - $form->addWidget(new SimpleCheckboxTag( - array('name' => 'a', 'type' => 'checkbox', 'value' => 'me'))); - $form->addWidget(new SimpleCheckboxTag( - array('name' => 'a', 'type' => 'checkbox', 'value' => 'you'))); - $this->assertIdentical($form->getValue(new SimpleByName('a')), false); - $this->assertTrue($form->setField(new SimpleByName('a'), 'me')); - $this->assertIdentical($form->getValue(new SimpleByName('a')), 'me'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/frames_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/frames_test.php deleted file mode 100644 index e3ab719b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/frames_test.php +++ /dev/null @@ -1,549 +0,0 @@ -setReturnValue('getTitle', 'This page'); - $frameset = new SimpleFrameset($page); - $this->assertEqual($frameset->getTitle(), 'This page'); - } - - function TestHeadersReadFromFramesetByDefault() { - $page = new MockSimplePage(); - $page->setReturnValue('getHeaders', 'Header: content'); - $page->setReturnValue('getMimeType', 'text/xml'); - $page->setReturnValue('getResponseCode', 401); - $page->setReturnValue('getTransportError', 'Could not parse headers'); - $page->setReturnValue('getAuthentication', 'Basic'); - $page->setReturnValue('getRealm', 'Safe place'); - - $frameset = new SimpleFrameset($page); - - $this->assertIdentical($frameset->getHeaders(), 'Header: content'); - $this->assertIdentical($frameset->getMimeType(), 'text/xml'); - $this->assertIdentical($frameset->getResponseCode(), 401); - $this->assertIdentical($frameset->getTransportError(), 'Could not parse headers'); - $this->assertIdentical($frameset->getAuthentication(), 'Basic'); - $this->assertIdentical($frameset->getRealm(), 'Safe place'); - } - - function testEmptyFramesetHasNoContent() { - $page = new MockSimplePage(); - $page->setReturnValue('getRaw', 'This content'); - $frameset = new SimpleFrameset($page); - $this->assertEqual($frameset->getRaw(), ''); - } - - function testRawContentIsFromOnlyFrame() { - $page = new MockSimplePage(); - $page->expectNever('getRaw'); - - $frame = new MockSimplePage(); - $frame->setReturnValue('getRaw', 'Stuff'); - - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame); - $this->assertEqual($frameset->getRaw(), 'Stuff'); - } - - function testRawContentIsFromAllFrames() { - $page = new MockSimplePage(); - $page->expectNever('getRaw'); - - $frame1 = new MockSimplePage(); - $frame1->setReturnValue('getRaw', 'Stuff1'); - - $frame2 = new MockSimplePage(); - $frame2->setReturnValue('getRaw', 'Stuff2'); - - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame1); - $frameset->addFrame($frame2); - $this->assertEqual($frameset->getRaw(), 'Stuff1Stuff2'); - } - - function testTextContentIsFromOnlyFrame() { - $page = new MockSimplePage(); - $page->expectNever('getText'); - - $frame = new MockSimplePage(); - $frame->setReturnValue('getText', 'Stuff'); - - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame); - $this->assertEqual($frameset->getText(), 'Stuff'); - } - - function testTextContentIsFromAllFrames() { - $page = new MockSimplePage(); - $page->expectNever('getText'); - - $frame1 = new MockSimplePage(); - $frame1->setReturnValue('getText', 'Stuff1'); - - $frame2 = new MockSimplePage(); - $frame2->setReturnValue('getText', 'Stuff2'); - - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame1); - $frameset->addFrame($frame2); - $this->assertEqual($frameset->getText(), 'Stuff1 Stuff2'); - } - - function testFieldFoundIsFirstInFramelist() { - $frame1 = new MockSimplePage(); - $frame1->setReturnValue('getField', null); - $frame1->expectOnce('getField', array(new SimpleByName('a'))); - - $frame2 = new MockSimplePage(); - $frame2->setReturnValue('getField', 'A'); - $frame2->expectOnce('getField', array(new SimpleByName('a'))); - - $frame3 = new MockSimplePage(); - $frame3->expectNever('getField'); - - $page = new MockSimplePage(); - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame1); - $frameset->addFrame($frame2); - $frameset->addFrame($frame3); - $this->assertIdentical($frameset->getField(new SimpleByName('a')), 'A'); - } - - function testFrameReplacementByIndex() { - $page = new MockSimplePage(); - $page->expectNever('getRaw'); - - $frame1 = new MockSimplePage(); - $frame1->setReturnValue('getRaw', 'Stuff1'); - - $frame2 = new MockSimplePage(); - $frame2->setReturnValue('getRaw', 'Stuff2'); - - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame1); - $frameset->setFrame(array(1), $frame2); - $this->assertEqual($frameset->getRaw(), 'Stuff2'); - } - - function testFrameReplacementByName() { - $page = new MockSimplePage(); - $page->expectNever('getRaw'); - - $frame1 = new MockSimplePage(); - $frame1->setReturnValue('getRaw', 'Stuff1'); - - $frame2 = new MockSimplePage(); - $frame2->setReturnValue('getRaw', 'Stuff2'); - - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame1, 'a'); - $frameset->setFrame(array('a'), $frame2); - $this->assertEqual($frameset->getRaw(), 'Stuff2'); - } -} - -class TestOfFrameNavigation extends UnitTestCase { - - function testStartsWithoutFrameFocus() { - $page = new MockSimplePage(); - $frameset = new SimpleFrameset($page); - $frameset->addFrame(new MockSimplePage()); - $this->assertFalse($frameset->getFrameFocus()); - } - - function testCanFocusOnSingleFrame() { - $page = new MockSimplePage(); - $page->expectNever('getRaw'); - - $frame = new MockSimplePage(); - $frame->setReturnValue('getFrameFocus', array()); - $frame->setReturnValue('getRaw', 'Stuff'); - - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame); - - $this->assertFalse($frameset->setFrameFocusByIndex(0)); - $this->assertTrue($frameset->setFrameFocusByIndex(1)); - $this->assertEqual($frameset->getRaw(), 'Stuff'); - $this->assertFalse($frameset->setFrameFocusByIndex(2)); - $this->assertIdentical($frameset->getFrameFocus(), array(1)); - } - - function testContentComesFromFrameInFocus() { - $page = new MockSimplePage(); - - $frame1 = new MockSimplePage(); - $frame1->setReturnValue('getRaw', 'Stuff1'); - $frame1->setReturnValue('getFrameFocus', array()); - - $frame2 = new MockSimplePage(); - $frame2->setReturnValue('getRaw', 'Stuff2'); - $frame2->setReturnValue('getFrameFocus', array()); - - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame1); - $frameset->addFrame($frame2); - - $this->assertTrue($frameset->setFrameFocusByIndex(1)); - $this->assertEqual($frameset->getFrameFocus(), array(1)); - $this->assertEqual($frameset->getRaw(), 'Stuff1'); - - $this->assertTrue($frameset->setFrameFocusByIndex(2)); - $this->assertEqual($frameset->getFrameFocus(), array(2)); - $this->assertEqual($frameset->getRaw(), 'Stuff2'); - - $this->assertFalse($frameset->setFrameFocusByIndex(3)); - $this->assertEqual($frameset->getFrameFocus(), array(2)); - - $frameset->clearFrameFocus(); - $this->assertEqual($frameset->getRaw(), 'Stuff1Stuff2'); - } - - function testCanFocusByName() { - $page = new MockSimplePage(); - - $frame1 = new MockSimplePage(); - $frame1->setReturnValue('getRaw', 'Stuff1'); - $frame1->setReturnValue('getFrameFocus', array()); - - $frame2 = new MockSimplePage(); - $frame2->setReturnValue('getRaw', 'Stuff2'); - $frame2->setReturnValue('getFrameFocus', array()); - - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame1, 'A'); - $frameset->addFrame($frame2, 'B'); - - $this->assertTrue($frameset->setFrameFocus('A')); - $this->assertEqual($frameset->getFrameFocus(), array('A')); - $this->assertEqual($frameset->getRaw(), 'Stuff1'); - - $this->assertTrue($frameset->setFrameFocusByIndex(2)); - $this->assertEqual($frameset->getFrameFocus(), array('B')); - $this->assertEqual($frameset->getRaw(), 'Stuff2'); - - $this->assertFalse($frameset->setFrameFocus('z')); - - $frameset->clearFrameFocus(); - $this->assertEqual($frameset->getRaw(), 'Stuff1Stuff2'); - } -} - -class TestOfFramesetPageInterface extends UnitTestCase { - private $page_interface; - private $frameset_interface; - - function __construct() { - parent::__construct(); - $this->page_interface = $this->getPageMethods(); - $this->frameset_interface = $this->getFramesetMethods(); - } - - function assertListInAnyOrder($list, $expected) { - sort($list); - sort($expected); - $this->assertEqual($list, $expected); - } - - private function getPageMethods() { - $methods = array(); - foreach (get_class_methods('SimplePage') as $method) { - if (strtolower($method) == strtolower('SimplePage')) { - continue; - } - if (strtolower($method) == strtolower('getFrameset')) { - continue; - } - if (strncmp($method, '_', 1) == 0) { - continue; - } - if (strncmp($method, 'accept', 6) == 0) { - continue; - } - $methods[] = $method; - } - return $methods; - } - - private function getFramesetMethods() { - $methods = array(); - foreach (get_class_methods('SimpleFrameset') as $method) { - if (strtolower($method) == strtolower('SimpleFrameset')) { - continue; - } - if (strncmp($method, '_', 1) == 0) { - continue; - } - if (strncmp($method, 'add', 3) == 0) { - continue; - } - $methods[] = $method; - } - return $methods; - } - - function testFramsetHasPageInterface() { - $difference = array(); - foreach ($this->page_interface as $method) { - if (! in_array($method, $this->frameset_interface)) { - $this->fail("No [$method] in Frameset class"); - return; - } - } - $this->pass('Frameset covers Page interface'); - } - - function testHeadersReadFromFrameIfInFocus() { - $frame = new MockSimplePage(); - $frame->setReturnValue('getUrl', new SimpleUrl('http://localhost/stuff')); - - $frame->setReturnValue('getRequest', 'POST stuff'); - $frame->setReturnValue('getMethod', 'POST'); - $frame->setReturnValue('getRequestData', array('a' => 'A')); - $frame->setReturnValue('getHeaders', 'Header: content'); - $frame->setReturnValue('getMimeType', 'text/xml'); - $frame->setReturnValue('getResponseCode', 401); - $frame->setReturnValue('getTransportError', 'Could not parse headers'); - $frame->setReturnValue('getAuthentication', 'Basic'); - $frame->setReturnValue('getRealm', 'Safe place'); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame($frame); - $frameset->setFrameFocusByIndex(1); - - $url = new SimpleUrl('http://localhost/stuff'); - $url->setTarget(1); - $this->assertIdentical($frameset->getUrl(), $url); - - $this->assertIdentical($frameset->getRequest(), 'POST stuff'); - $this->assertIdentical($frameset->getMethod(), 'POST'); - $this->assertIdentical($frameset->getRequestData(), array('a' => 'A')); - $this->assertIdentical($frameset->getHeaders(), 'Header: content'); - $this->assertIdentical($frameset->getMimeType(), 'text/xml'); - $this->assertIdentical($frameset->getResponseCode(), 401); - $this->assertIdentical($frameset->getTransportError(), 'Could not parse headers'); - $this->assertIdentical($frameset->getAuthentication(), 'Basic'); - $this->assertIdentical($frameset->getRealm(), 'Safe place'); - } - - function testUrlsComeFromBothFrames() { - $page = new MockSimplePage(); - $page->expectNever('getUrls'); - - $frame1 = new MockSimplePage(); - $frame1->setReturnValue( - 'getUrls', - array('http://www.lastcraft.com/', 'http://myserver/')); - - $frame2 = new MockSimplePage(); - $frame2->setReturnValue( - 'getUrls', - array('http://www.lastcraft.com/', 'http://test/')); - - $frameset = new SimpleFrameset($page); - $frameset->addFrame($frame1); - $frameset->addFrame($frame2); - $this->assertListInAnyOrder( - $frameset->getUrls(), - array('http://www.lastcraft.com/', 'http://myserver/', 'http://test/')); - } - - function testLabelledUrlsComeFromBothFrames() { - $frame1 = new MockSimplePage(); - $frame1->setReturnValue( - 'getUrlsByLabel', - array(new SimpleUrl('goodbye.php')), - array('a')); - - $frame2 = new MockSimplePage(); - $frame2->setReturnValue( - 'getUrlsByLabel', - array(new SimpleUrl('hello.php')), - array('a')); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame($frame1); - $frameset->addFrame($frame2, 'Two'); - - $expected1 = new SimpleUrl('goodbye.php'); - $expected1->setTarget(1); - $expected2 = new SimpleUrl('hello.php'); - $expected2->setTarget('Two'); - $this->assertEqual( - $frameset->getUrlsByLabel('a'), - array($expected1, $expected2)); - } - - function testUrlByIdComesFromFirstFrameToRespond() { - $frame1 = new MockSimplePage(); - $frame1->setReturnValue('getUrlById', new SimpleUrl('four.php'), array(4)); - $frame1->setReturnValue('getUrlById', false, array(5)); - - $frame2 = new MockSimplePage(); - $frame2->setReturnValue('getUrlById', false, array(4)); - $frame2->setReturnValue('getUrlById', new SimpleUrl('five.php'), array(5)); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame($frame1); - $frameset->addFrame($frame2); - - $four = new SimpleUrl('four.php'); - $four->setTarget(1); - $this->assertEqual($frameset->getUrlById(4), $four); - $five = new SimpleUrl('five.php'); - $five->setTarget(2); - $this->assertEqual($frameset->getUrlById(5), $five); - } - - function testReadUrlsFromFrameInFocus() { - $frame1 = new MockSimplePage(); - $frame1->setReturnValue('getUrls', array('a')); - $frame1->setReturnValue('getUrlsByLabel', array(new SimpleUrl('l'))); - $frame1->setReturnValue('getUrlById', new SimpleUrl('i')); - - $frame2 = new MockSimplePage(); - $frame2->expectNever('getUrls'); - $frame2->expectNever('getUrlsByLabel'); - $frame2->expectNever('getUrlById'); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame($frame1, 'A'); - $frameset->addFrame($frame2, 'B'); - $frameset->setFrameFocus('A'); - - $this->assertIdentical($frameset->getUrls(), array('a')); - $expected = new SimpleUrl('l'); - $expected->setTarget('A'); - $this->assertIdentical($frameset->getUrlsByLabel('label'), array($expected)); - $expected = new SimpleUrl('i'); - $expected->setTarget('A'); - $this->assertIdentical($frameset->getUrlById(99), $expected); - } - - function testReadFrameTaggedUrlsFromFrameInFocus() { - $frame = new MockSimplePage(); - - $by_label = new SimpleUrl('l'); - $by_label->setTarget('L'); - $frame->setReturnValue('getUrlsByLabel', array($by_label)); - - $by_id = new SimpleUrl('i'); - $by_id->setTarget('I'); - $frame->setReturnValue('getUrlById', $by_id); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame($frame, 'A'); - $frameset->setFrameFocus('A'); - - $this->assertIdentical($frameset->getUrlsByLabel('label'), array($by_label)); - $this->assertIdentical($frameset->getUrlById(99), $by_id); - } - - function testFindingFormsById() { - $frame = new MockSimplePage(); - $form = new MockSimpleForm(); - $frame->returns('getFormById', $form, array('a')); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame(new MockSimplePage(), 'A'); - $frameset->addFrame($frame, 'B'); - $this->assertSame($frameset->getFormById('a'), $form); - - $frameset->setFrameFocus('A'); - $this->assertNull($frameset->getFormById('a')); - - $frameset->setFrameFocus('B'); - $this->assertSame($frameset->getFormById('a'), $form); - } - - function testFindingFormsBySubmit() { - $frame = new MockSimplePage(); - $form = new MockSimpleForm(); - $frame->returns( - 'getFormBySubmit', - $form, - array(new SimpleByLabel('a'))); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame(new MockSimplePage(), 'A'); - $frameset->addFrame($frame, 'B'); - $this->assertSame($frameset->getFormBySubmit(new SimpleByLabel('a')), $form); - - $frameset->setFrameFocus('A'); - $this->assertNull($frameset->getFormBySubmit(new SimpleByLabel('a'))); - - $frameset->setFrameFocus('B'); - $this->assertSame($frameset->getFormBySubmit(new SimpleByLabel('a')), $form); - } - - function testFindingFormsByImage() { - $frame = new MockSimplePage(); - $form = new MockSimpleForm(); - $frame->returns( - 'getFormByImage', - $form, - array(new SimpleByLabel('a'))); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame(new MockSimplePage(), 'A'); - $frameset->addFrame($frame, 'B'); - $this->assertSame($frameset->getFormByImage(new SimpleByLabel('a')), $form); - - $frameset->setFrameFocus('A'); - $this->assertNull($frameset->getFormByImage(new SimpleByLabel('a'))); - - $frameset->setFrameFocus('B'); - $this->assertSame($frameset->getFormByImage(new SimpleByLabel('a')), $form); - } - - function testSettingAllFrameFieldsWhenNoFrameFocus() { - $frame1 = new MockSimplePage(); - $frame1->expectOnce('setField', array(new SimpleById(22), 'A')); - - $frame2 = new MockSimplePage(); - $frame2->expectOnce('setField', array(new SimpleById(22), 'A')); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame($frame1, 'A'); - $frameset->addFrame($frame2, 'B'); - $frameset->setField(new SimpleById(22), 'A'); - } - - function testOnlySettingFieldFromFocusedFrame() { - $frame1 = new MockSimplePage(); - $frame1->expectOnce('setField', array(new SimpleByLabelOrName('a'), 'A')); - - $frame2 = new MockSimplePage(); - $frame2->expectNever('setField'); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame($frame1, 'A'); - $frameset->addFrame($frame2, 'B'); - $frameset->setFrameFocus('A'); - $frameset->setField(new SimpleByLabelOrName('a'), 'A'); - } - - function testOnlyGettingFieldFromFocusedFrame() { - $frame1 = new MockSimplePage(); - $frame1->setReturnValue('getField', 'f', array(new SimpleByName('a'))); - - $frame2 = new MockSimplePage(); - $frame2->expectNever('getField'); - - $frameset = new SimpleFrameset(new MockSimplePage()); - $frameset->addFrame($frame1, 'A'); - $frameset->addFrame($frame2, 'B'); - $frameset->setFrameFocus('A'); - $this->assertIdentical($frameset->getField(new SimpleByName('a')), 'f'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/http_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/http_test.php deleted file mode 100644 index 3cf3d162..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/http_test.php +++ /dev/null @@ -1,424 +0,0 @@ -expectAt(0, 'write', array("GET /here.html HTTP/1.0\r\n")); - $socket->expectAt(1, 'write', array("Host: a.valid.host\r\n")); - $socket->expectAt(2, 'write', array("Connection: close\r\n")); - $socket->expectCallCount('write', 3); - $route = new PartialSimpleRoute(); - $route->setReturnReference('createSocket', $socket); - $route->__construct(new SimpleUrl('http://a.valid.host/here.html')); - $this->assertSame($route->createConnection('GET', 15), $socket); - } - - function testDefaultPostRequest() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("POST /here.html HTTP/1.0\r\n")); - $socket->expectAt(1, 'write', array("Host: a.valid.host\r\n")); - $socket->expectAt(2, 'write', array("Connection: close\r\n")); - $socket->expectCallCount('write', 3); - - $route = new PartialSimpleRoute(); - $route->setReturnReference('createSocket', $socket); - $route->__construct(new SimpleUrl('http://a.valid.host/here.html')); - - $route->createConnection('POST', 15); - } - - function testGetWithPort() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("GET /here.html HTTP/1.0\r\n")); - $socket->expectAt(1, 'write', array("Host: a.valid.host:81\r\n")); - $socket->expectAt(2, 'write', array("Connection: close\r\n")); - $socket->expectCallCount('write', 3); - - $route = new PartialSimpleRoute(); - $route->setReturnReference('createSocket', $socket); - $route->__construct(new SimpleUrl('http://a.valid.host:81/here.html')); - - $route->createConnection('GET', 15); - } - - function testGetWithParameters() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("GET /here.html?a=1&b=2 HTTP/1.0\r\n")); - $socket->expectAt(1, 'write', array("Host: a.valid.host\r\n")); - $socket->expectAt(2, 'write', array("Connection: close\r\n")); - $socket->expectCallCount('write', 3); - - $route = new PartialSimpleRoute(); - $route->setReturnReference('createSocket', $socket); - $route->__construct(new SimpleUrl('http://a.valid.host/here.html?a=1&b=2')); - - $route->createConnection('GET', 15); - } -} - -class TestOfProxyRoute extends UnitTestCase { - - function testDefaultGet() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("GET http://a.valid.host/here.html HTTP/1.0\r\n")); - $socket->expectAt(1, 'write', array("Host: my-proxy:8080\r\n")); - $socket->expectAt(2, 'write', array("Connection: close\r\n")); - $socket->expectCallCount('write', 3); - - $route = new PartialSimpleProxyRoute(); - $route->setReturnReference('createSocket', $socket); - $route->__construct( - new SimpleUrl('http://a.valid.host/here.html'), - new SimpleUrl('http://my-proxy')); - $route->createConnection('GET', 15); - } - - function testDefaultPost() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("POST http://a.valid.host/here.html HTTP/1.0\r\n")); - $socket->expectAt(1, 'write', array("Host: my-proxy:8080\r\n")); - $socket->expectAt(2, 'write', array("Connection: close\r\n")); - $socket->expectCallCount('write', 3); - - $route = new PartialSimpleProxyRoute(); - $route->setReturnReference('createSocket', $socket); - $route->__construct( - new SimpleUrl('http://a.valid.host/here.html'), - new SimpleUrl('http://my-proxy')); - $route->createConnection('POST', 15); - } - - function testGetWithPort() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("GET http://a.valid.host:81/here.html HTTP/1.0\r\n")); - $socket->expectAt(1, 'write', array("Host: my-proxy:8081\r\n")); - $socket->expectAt(2, 'write', array("Connection: close\r\n")); - $socket->expectCallCount('write', 3); - - $route = new PartialSimpleProxyRoute(); - $route->setReturnReference('createSocket', $socket); - $route->__construct( - new SimpleUrl('http://a.valid.host:81/here.html'), - new SimpleUrl('http://my-proxy:8081')); - $route->createConnection('GET', 15); - } - - function testGetWithParameters() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("GET http://a.valid.host/here.html?a=1&b=2 HTTP/1.0\r\n")); - $socket->expectAt(1, 'write', array("Host: my-proxy:8080\r\n")); - $socket->expectAt(2, 'write', array("Connection: close\r\n")); - $socket->expectCallCount('write', 3); - - $route = new PartialSimpleProxyRoute(); - $route->setReturnReference('createSocket', $socket); - $route->__construct( - new SimpleUrl('http://a.valid.host/here.html?a=1&b=2'), - new SimpleUrl('http://my-proxy')); - $route->createConnection('GET', 15); - } - - function testGetWithAuthentication() { - $encoded = base64_encode('Me:Secret'); - - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("GET http://a.valid.host/here.html HTTP/1.0\r\n")); - $socket->expectAt(1, 'write', array("Host: my-proxy:8080\r\n")); - $socket->expectAt(2, 'write', array("Proxy-Authorization: Basic $encoded\r\n")); - $socket->expectAt(3, 'write', array("Connection: close\r\n")); - $socket->expectCallCount('write', 4); - - $route = new PartialSimpleProxyRoute(); - $route->setReturnReference('createSocket', $socket); - $route->__construct( - new SimpleUrl('http://a.valid.host/here.html'), - new SimpleUrl('http://my-proxy'), - 'Me', - 'Secret'); - $route->createConnection('GET', 15); - } -} - -class TestOfHttpRequest extends UnitTestCase { - - function testReadingBadConnection() { - $socket = new MockSimpleSocket(); - $route = new MockSimpleRoute(); - $route->setReturnReference('createConnection', $socket); - $request = new SimpleHttpRequest($route, new SimpleGetEncoding()); - $reponse = $request->fetch(15); - $this->assertTrue($reponse->isError()); - } - - function testReadingGoodConnection() { - $socket = new MockSimpleSocket(); - $socket->expectOnce('write', array("\r\n")); - - $route = new MockSimpleRoute(); - $route->setReturnReference('createConnection', $socket); - $route->expect('createConnection', array('GET', 15)); - - $request = new SimpleHttpRequest($route, new SimpleGetEncoding()); - $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); - } - - function testWritingAdditionalHeaders() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("My: stuff\r\n")); - $socket->expectAt(1, 'write', array("\r\n")); - $socket->expectCallCount('write', 2); - - $route = new MockSimpleRoute(); - $route->setReturnReference('createConnection', $socket); - - $request = new SimpleHttpRequest($route, new SimpleGetEncoding()); - $request->addHeaderLine('My: stuff'); - $request->fetch(15); - } - - function testCookieWriting() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("Cookie: a=A\r\n")); - $socket->expectAt(1, 'write', array("\r\n")); - $socket->expectCallCount('write', 2); - - $route = new MockSimpleRoute(); - $route->setReturnReference('createConnection', $socket); - - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'A'); - - $request = new SimpleHttpRequest($route, new SimpleGetEncoding()); - $request->readCookiesFromJar($jar, new SimpleUrl('/')); - $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); - } - - function testMultipleCookieWriting() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("Cookie: a=A;b=B\r\n")); - - $route = new MockSimpleRoute(); - $route->setReturnReference('createConnection', $socket); - - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'A'); - $jar->setCookie('b', 'B'); - - $request = new SimpleHttpRequest($route, new SimpleGetEncoding()); - $request->readCookiesFromJar($jar, new SimpleUrl('/')); - $request->fetch(15); - } -} - -class TestOfHttpPostRequest extends UnitTestCase { - - function testReadingBadConnectionCausesErrorBecauseOfDeadSocket() { - $socket = new MockSimpleSocket(); - $route = new MockSimpleRoute(); - $route->setReturnReference('createConnection', $socket); - $request = new SimpleHttpRequest($route, new SimplePostEncoding()); - $reponse = $request->fetch(15); - $this->assertTrue($reponse->isError()); - } - - function testReadingGoodConnection() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("Content-Length: 0\r\n")); - $socket->expectAt(1, 'write', array("Content-Type: application/x-www-form-urlencoded\r\n")); - $socket->expectAt(2, 'write', array("\r\n")); - $socket->expectAt(3, 'write', array("")); - - $route = new MockSimpleRoute(); - $route->setReturnReference('createConnection', $socket); - $route->expect('createConnection', array('POST', 15)); - - $request = new SimpleHttpRequest($route, new SimplePostEncoding()); - $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); - } - - function testContentHeadersCalculated() { - $socket = new MockSimpleSocket(); - $socket->expectAt(0, 'write', array("Content-Length: 3\r\n")); - $socket->expectAt(1, 'write', array("Content-Type: application/x-www-form-urlencoded\r\n")); - $socket->expectAt(2, 'write', array("\r\n")); - $socket->expectAt(3, 'write', array("a=A")); - - $route = new MockSimpleRoute(); - $route->setReturnReference('createConnection', $socket); - $route->expect('createConnection', array('POST', 15)); - - $request = new SimpleHttpRequest( - $route, - new SimplePostEncoding(array('a' => 'A'))); - $this->assertIsA($request->fetch(15), 'SimpleHttpResponse'); - } -} - -class TestOfHttpHeaders extends UnitTestCase { - - function testParseBasicHeaders() { - $headers = new SimpleHttpHeaders( - "HTTP/1.1 200 OK\r\n" . - "Date: Mon, 18 Nov 2002 15:50:29 GMT\r\n" . - "Content-Type: text/plain\r\n" . - "Server: Apache/1.3.24 (Win32) PHP/4.2.3\r\n" . - "Connection: close"); - $this->assertIdentical($headers->getHttpVersion(), "1.1"); - $this->assertIdentical($headers->getResponseCode(), 200); - $this->assertEqual($headers->getMimeType(), "text/plain"); - } - - function testNonStandardResponseHeader() { - $headers = new SimpleHttpHeaders( - "HTTP/1.1 302 (HTTP-Version SP Status-Code CRLF)\r\n" . - "Connection: close"); - $this->assertIdentical($headers->getResponseCode(), 302); - } - - function testCanParseMultipleCookies() { - $jar = new MockSimpleCookieJar(); - $jar->expectAt(0, 'setCookie', array('a', 'aaa', 'host', '/here/', 'Wed, 25 Dec 2002 04:24:20 GMT')); - $jar->expectAt(1, 'setCookie', array('b', 'bbb', 'host', '/', false)); - - $headers = new SimpleHttpHeaders( - "HTTP/1.1 200 OK\r\n" . - "Date: Mon, 18 Nov 2002 15:50:29 GMT\r\n" . - "Content-Type: text/plain\r\n" . - "Server: Apache/1.3.24 (Win32) PHP/4.2.3\r\n" . - "Set-Cookie: a=aaa; expires=Wed, 25-Dec-02 04:24:20 GMT; path=/here/\r\n" . - "Set-Cookie: b=bbb\r\n" . - "Connection: close"); - $headers->writeCookiesToJar($jar, new SimpleUrl('http://host')); - } - - function testCanRecogniseRedirect() { - $headers = new SimpleHttpHeaders("HTTP/1.1 301 OK\r\n" . - "Content-Type: text/plain\r\n" . - "Content-Length: 0\r\n" . - "Location: http://www.somewhere-else.com/\r\n" . - "Connection: close"); - $this->assertIdentical($headers->getResponseCode(), 301); - $this->assertEqual($headers->getLocation(), "http://www.somewhere-else.com/"); - $this->assertTrue($headers->isRedirect()); - } - - function testCanParseChallenge() { - $headers = new SimpleHttpHeaders("HTTP/1.1 401 Authorization required\r\n" . - "Content-Type: text/plain\r\n" . - "Connection: close\r\n" . - "WWW-Authenticate: Basic realm=\"Somewhere\""); - $this->assertEqual($headers->getAuthentication(), 'Basic'); - $this->assertEqual($headers->getRealm(), 'Somewhere'); - $this->assertTrue($headers->isChallenge()); - } -} - -class TestOfHttpResponse extends UnitTestCase { - - function testBadRequest() { - $socket = new MockSimpleSocket(); - $socket->setReturnValue('getSent', ''); - - $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); - $this->assertTrue($response->isError()); - $this->assertPattern('/Nothing fetched/', $response->getError()); - $this->assertIdentical($response->getContent(), false); - $this->assertIdentical($response->getSent(), ''); - } - - function testBadSocketDuringResponse() { - $socket = new MockSimpleSocket(); - $socket->setReturnValueAt(0, "read", "HTTP/1.1 200 OK\r\n"); - $socket->setReturnValueAt(1, "read", "Date: Mon, 18 Nov 2002 15:50:29 GMT\r\n"); - $socket->setReturnValue("read", ""); - $socket->setReturnValue('getSent', 'HTTP/1.1 ...'); - - $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); - $this->assertTrue($response->isError()); - $this->assertEqual($response->getContent(), ''); - $this->assertEqual($response->getSent(), 'HTTP/1.1 ...'); - } - - function testIncompleteHeader() { - $socket = new MockSimpleSocket(); - $socket->setReturnValueAt(0, "read", "HTTP/1.1 200 OK\r\n"); - $socket->setReturnValueAt(1, "read", "Date: Mon, 18 Nov 2002 15:50:29 GMT\r\n"); - $socket->setReturnValueAt(2, "read", "Content-Type: text/plain\r\n"); - $socket->setReturnValue("read", ""); - - $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); - $this->assertTrue($response->isError()); - $this->assertEqual($response->getContent(), ""); - } - - function testParseOfResponseHeadersWhenChunked() { - $socket = new MockSimpleSocket(); - $socket->setReturnValueAt(0, "read", "HTTP/1.1 200 OK\r\nDate: Mon, 18 Nov 2002 15:50:29 GMT\r\n"); - $socket->setReturnValueAt(1, "read", "Content-Type: text/plain\r\n"); - $socket->setReturnValueAt(2, "read", "Server: Apache/1.3.24 (Win32) PHP/4.2.3\r\nConne"); - $socket->setReturnValueAt(3, "read", "ction: close\r\n\r\nthis is a test file\n"); - $socket->setReturnValueAt(4, "read", "with two lines in it\n"); - $socket->setReturnValue("read", ""); - - $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); - $this->assertFalse($response->isError()); - $this->assertEqual( - $response->getContent(), - "this is a test file\nwith two lines in it\n"); - $headers = $response->getHeaders(); - $this->assertIdentical($headers->getHttpVersion(), "1.1"); - $this->assertIdentical($headers->getResponseCode(), 200); - $this->assertEqual($headers->getMimeType(), "text/plain"); - $this->assertFalse($headers->isRedirect()); - $this->assertFalse($headers->getLocation()); - } - - function testRedirect() { - $socket = new MockSimpleSocket(); - $socket->setReturnValueAt(0, "read", "HTTP/1.1 301 OK\r\n"); - $socket->setReturnValueAt(1, "read", "Content-Type: text/plain\r\n"); - $socket->setReturnValueAt(2, "read", "Location: http://www.somewhere-else.com/\r\n"); - $socket->setReturnValueAt(3, "read", "Connection: close\r\n"); - $socket->setReturnValueAt(4, "read", "\r\n"); - $socket->setReturnValue("read", ""); - - $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); - $headers = $response->getHeaders(); - $this->assertTrue($headers->isRedirect()); - $this->assertEqual($headers->getLocation(), "http://www.somewhere-else.com/"); - } - - function testRedirectWithPort() { - $socket = new MockSimpleSocket(); - $socket->setReturnValueAt(0, "read", "HTTP/1.1 301 OK\r\n"); - $socket->setReturnValueAt(1, "read", "Content-Type: text/plain\r\n"); - $socket->setReturnValueAt(2, "read", "Location: http://www.somewhere-else.com:80/\r\n"); - $socket->setReturnValueAt(3, "read", "Connection: close\r\n"); - $socket->setReturnValueAt(4, "read", "\r\n"); - $socket->setReturnValue("read", ""); - - $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding()); - $headers = $response->getHeaders(); - $this->assertTrue($headers->isRedirect()); - $this->assertEqual($headers->getLocation(), "http://www.somewhere-else.com:80/"); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/interfaces_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/interfaces_test.php deleted file mode 100644 index 83c24d4c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/interfaces_test.php +++ /dev/null @@ -1,137 +0,0 @@ -=')) { - include(dirname(__FILE__) . '/interfaces_test_php5_1.php'); -} - -interface DummyInterface { - function aMethod(); - function anotherMethod($a); - function &referenceMethod(&$a); -} - -Mock::generate('DummyInterface'); -Mock::generatePartial('DummyInterface', 'PartialDummyInterface', array()); - -class TestOfMockInterfaces extends UnitTestCase { - - function testCanMockAnInterface() { - $mock = new MockDummyInterface(); - $this->assertIsA($mock, 'SimpleMock'); - $this->assertIsA($mock, 'MockDummyInterface'); - $this->assertTrue(method_exists($mock, 'aMethod')); - $this->assertTrue(method_exists($mock, 'anotherMethod')); - $this->assertNull($mock->aMethod()); - } - - function testMockedInterfaceExpectsParameters() { - $mock = new MockDummyInterface(); - $this->expectError(); - $mock->anotherMethod(); - } - - function testCannotPartiallyMockAnInterface() { - $this->assertFalse(class_exists('PartialDummyInterface')); - } -} - -class TestOfSpl extends UnitTestCase { - - function skip() { - $this->skipUnless(function_exists('spl_classes'), 'No SPL module loaded'); - } - - function testCanMockAllSplClasses() { - if (! function_exists('spl_classes')) { - return; - } - foreach(spl_classes() as $class) { - if ($class == 'SplHeap') { - continue; - } - if (version_compare(PHP_VERSION, '5.1', '<') && - $class == 'CachingIterator' || - $class == 'CachingRecursiveIterator' || - $class == 'FilterIterator' || - $class == 'LimitIterator' || - $class == 'ParentIterator') { - // These iterators require an iterator be passed to them during - // construction in PHP 5.0; there is no way for SimpleTest - // to supply such an iterator, however, so support for it is - // disabled. - continue; - } - $mock_class = "Mock$class"; - Mock::generate($class); - $this->assertIsA(new $mock_class(), $mock_class); - } - } - - function testExtensionOfCommonSplClasses() { - Mock::generate('IteratorImplementation'); - $this->assertIsA( - new IteratorImplementation(), - 'IteratorImplementation'); - Mock::generate('IteratorAggregateImplementation'); - $this->assertIsA( - new IteratorAggregateImplementation(), - 'IteratorAggregateImplementation'); - } -} - -class WithHint { - function hinted(DummyInterface $object) { } -} - -class ImplementsDummy implements DummyInterface { - function aMethod() { } - function anotherMethod($a) { } - function &referenceMethod(&$a) { } - function extraMethod($a = false) { } -} -Mock::generate('ImplementsDummy'); - -class TestOfImplementations extends UnitTestCase { - - function testMockedInterfaceCanPassThroughTypeHint() { - $mock = new MockDummyInterface(); - $hinter = new WithHint(); - $hinter->hinted($mock); - } - - function testImplementedInterfacesAreCarried() { - $mock = new MockImplementsDummy(); - $hinter = new WithHint(); - $hinter->hinted($mock); - } - - function testNoSpuriousWarningsWhenSkippingDefaultedParameter() { - $mock = new MockImplementsDummy(); - $mock->extraMethod(); - } -} - -interface SampleInterfaceWithConstruct { - function __construct($something); -} - -class TestOfInterfaceMocksWithConstruct extends UnitTestCase { - function TODO_testBasicConstructOfAnInterface() { // Fails in PHP 5.3dev - Mock::generate('SampleInterfaceWithConstruct'); - } -} - -interface SampleInterfaceWithClone { - function __clone(); -} - -class TestOfSampleInterfaceWithClone extends UnitTestCase { - function testCanMockWithoutErrors() { - Mock::generate('SampleInterfaceWithClone'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/interfaces_test_php5_1.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/interfaces_test_php5_1.php deleted file mode 100644 index 3d154f99..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/interfaces_test_php5_1.php +++ /dev/null @@ -1,14 +0,0 @@ -assertIsA($mock, 'SampleInterfaceWithHintInSignature'); - } -} - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/live_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/live_test.php deleted file mode 100644 index 3fbb5449..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/live_test.php +++ /dev/null @@ -1,47 +0,0 @@ -assertTrue($socket->isError()); - $this->assertPattern( - '/Cannot open \\[bad_url:111\\] with \\[/', - $socket->getError()); - $this->assertFalse($socket->isOpen()); - $this->assertFalse($socket->write('A message')); - } - - function testSocketClosure() { - $socket = new SimpleSocket('www.lastcraft.com', 80, 15, 8); - $this->assertTrue($socket->isOpen()); - $this->assertTrue($socket->write("GET /test/network_confirm.php HTTP/1.0\r\n")); - $socket->write("Host: www.lastcraft.com\r\n"); - $socket->write("Connection: close\r\n\r\n"); - $this->assertEqual($socket->read(), "HTTP/1.1"); - $socket->close(); - $this->assertIdentical($socket->read(), false); - } - - function testRecordOfSentCharacters() { - $socket = new SimpleSocket('www.lastcraft.com', 80, 15); - $this->assertTrue($socket->write("GET /test/network_confirm.php HTTP/1.0\r\n")); - $socket->write("Host: www.lastcraft.com\r\n"); - $socket->write("Connection: close\r\n\r\n"); - $socket->close(); - $this->assertEqual($socket->getSent(), - "GET /test/network_confirm.php HTTP/1.0\r\n" . - "Host: www.lastcraft.com\r\n" . - "Connection: close\r\n\r\n"); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/mock_objects_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/mock_objects_test.php deleted file mode 100644 index aac2396b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/mock_objects_test.php +++ /dev/null @@ -1,1012 +0,0 @@ -assertTrue($expectation->test(33)); - $this->assertTrue($expectation->test(false)); - $this->assertTrue($expectation->test(null)); - } -} - -class TestOfParametersExpectation extends UnitTestCase { - - function testEmptyMatch() { - $expectation = new ParametersExpectation(array()); - $this->assertTrue($expectation->test(array())); - $this->assertFalse($expectation->test(array(33))); - } - - function testSingleMatch() { - $expectation = new ParametersExpectation(array(0)); - $this->assertFalse($expectation->test(array(1))); - $this->assertTrue($expectation->test(array(0))); - } - - function testAnyMatch() { - $expectation = new ParametersExpectation(false); - $this->assertTrue($expectation->test(array())); - $this->assertTrue($expectation->test(array(1, 2))); - } - - function testMissingParameter() { - $expectation = new ParametersExpectation(array(0)); - $this->assertFalse($expectation->test(array())); - } - - function testNullParameter() { - $expectation = new ParametersExpectation(array(null)); - $this->assertTrue($expectation->test(array(null))); - $this->assertFalse($expectation->test(array())); - } - - function testAnythingExpectations() { - $expectation = new ParametersExpectation(array(new AnythingExpectation())); - $this->assertFalse($expectation->test(array())); - $this->assertIdentical($expectation->test(array(null)), true); - $this->assertIdentical($expectation->test(array(13)), true); - } - - function testOtherExpectations() { - $expectation = new ParametersExpectation( - array(new PatternExpectation('/hello/i'))); - $this->assertFalse($expectation->test(array('Goodbye'))); - $this->assertTrue($expectation->test(array('hello'))); - $this->assertTrue($expectation->test(array('Hello'))); - } - - function testIdentityOnly() { - $expectation = new ParametersExpectation(array("0")); - $this->assertFalse($expectation->test(array(0))); - $this->assertTrue($expectation->test(array("0"))); - } - - function testLongList() { - $expectation = new ParametersExpectation( - array("0", 0, new AnythingExpectation(), false)); - $this->assertTrue($expectation->test(array("0", 0, 37, false))); - $this->assertFalse($expectation->test(array("0", 0, 37, true))); - $this->assertFalse($expectation->test(array("0", 0, 37))); - } -} - -class TestOfSimpleSignatureMap extends UnitTestCase { - - function testEmpty() { - $map = new SimpleSignatureMap(); - $this->assertFalse($map->isMatch("any", array())); - $this->assertNull($map->findFirstAction("any", array())); - } - - function testDifferentCallSignaturesCanHaveDifferentReferences() { - $map = new SimpleSignatureMap(); - $fred = 'Fred'; - $jim = 'jim'; - $map->add(array(0), $fred); - $map->add(array('0'), $jim); - $this->assertSame($fred, $map->findFirstAction(array(0))); - $this->assertSame($jim, $map->findFirstAction(array('0'))); - } - - function testWildcard() { - $fred = 'Fred'; - $map = new SimpleSignatureMap(); - $map->add(array(new AnythingExpectation(), 1, 3), $fred); - $this->assertTrue($map->isMatch(array(2, 1, 3))); - $this->assertSame($map->findFirstAction(array(2, 1, 3)), $fred); - } - - function testAllWildcard() { - $fred = 'Fred'; - $map = new SimpleSignatureMap(); - $this->assertFalse($map->isMatch(array(2, 1, 3))); - $map->add('', $fred); - $this->assertTrue($map->isMatch(array(2, 1, 3))); - $this->assertSame($map->findFirstAction(array(2, 1, 3)), $fred); - } - - function testOrdering() { - $map = new SimpleSignatureMap(); - $map->add(array(1, 2), new SimpleByValue("1, 2")); - $map->add(array(1, 3), new SimpleByValue("1, 3")); - $map->add(array(1), new SimpleByValue("1")); - $map->add(array(1, 4), new SimpleByValue("1, 4")); - $map->add(array(new AnythingExpectation()), new SimpleByValue("Any")); - $map->add(array(2), new SimpleByValue("2")); - $map->add("", new SimpleByValue("Default")); - $map->add(array(), new SimpleByValue("None")); - $this->assertEqual($map->findFirstAction(array(1, 2)), new SimpleByValue("1, 2")); - $this->assertEqual($map->findFirstAction(array(1, 3)), new SimpleByValue("1, 3")); - $this->assertEqual($map->findFirstAction(array(1, 4)), new SimpleByValue("1, 4")); - $this->assertEqual($map->findFirstAction(array(1)), new SimpleByValue("1")); - $this->assertEqual($map->findFirstAction(array(2)), new SimpleByValue("Any")); - $this->assertEqual($map->findFirstAction(array(3)), new SimpleByValue("Any")); - $this->assertEqual($map->findFirstAction(array()), new SimpleByValue("Default")); - } -} - -class TestOfCallSchedule extends UnitTestCase { - function testCanBeSetToAlwaysReturnTheSameReference() { - $a = 5; - $schedule = new SimpleCallSchedule(); - $schedule->register('aMethod', false, new SimpleByReference($a)); - $this->assertReference($schedule->respond(0, 'aMethod', array()), $a); - $this->assertReference($schedule->respond(1, 'aMethod', array()), $a); - } - - function testSpecificSignaturesOverrideTheAlwaysCase() { - $any = 'any'; - $one = 'two'; - $schedule = new SimpleCallSchedule(); - $schedule->register('aMethod', array(1), new SimpleByReference($one)); - $schedule->register('aMethod', false, new SimpleByReference($any)); - $this->assertReference($schedule->respond(0, 'aMethod', array(2)), $any); - $this->assertReference($schedule->respond(0, 'aMethod', array(1)), $one); - } - - function testReturnsCanBeSetOverTime() { - $one = 'one'; - $two = 'two'; - $schedule = new SimpleCallSchedule(); - $schedule->registerAt(0, 'aMethod', false, new SimpleByReference($one)); - $schedule->registerAt(1, 'aMethod', false, new SimpleByReference($two)); - $this->assertReference($schedule->respond(0, 'aMethod', array()), $one); - $this->assertReference($schedule->respond(1, 'aMethod', array()), $two); - } - - function testReturnsOverTimecanBeAlteredByTheArguments() { - $one = '1'; - $two = '2'; - $two_a = '2a'; - $schedule = new SimpleCallSchedule(); - $schedule->registerAt(0, 'aMethod', false, new SimpleByReference($one)); - $schedule->registerAt(1, 'aMethod', array('a'), new SimpleByReference($two_a)); - $schedule->registerAt(1, 'aMethod', false, new SimpleByReference($two)); - $this->assertReference($schedule->respond(0, 'aMethod', array()), $one); - $this->assertReference($schedule->respond(1, 'aMethod', array()), $two); - $this->assertReference($schedule->respond(1, 'aMethod', array('a')), $two_a); - } - - function testCanReturnByValue() { - $a = 5; - $schedule = new SimpleCallSchedule(); - $schedule->register('aMethod', false, new SimpleByValue($a)); - $this->assertCopy($schedule->respond(0, 'aMethod', array()), $a); - } - - function testCanThrowException() { - if (version_compare(phpversion(), '5', '>=')) { - $schedule = new SimpleCallSchedule(); - $schedule->register('aMethod', false, new SimpleThrower(new Exception('Ouch'))); - $this->expectException(new Exception('Ouch')); - $schedule->respond(0, 'aMethod', array()); - } - } - - function testCanEmitError() { - $schedule = new SimpleCallSchedule(); - $schedule->register('aMethod', false, new SimpleErrorThrower('Ouch', E_USER_WARNING)); - $this->expectError('Ouch'); - $schedule->respond(0, 'aMethod', array()); - } -} - -class Dummy { - function Dummy() { - } - - function aMethod() { - return true; - } - - function &aReferenceMethod() { - return true; - } - - function anotherMethod() { - return true; - } -} -Mock::generate('Dummy'); -Mock::generate('Dummy', 'AnotherMockDummy'); -Mock::generate('Dummy', 'MockDummyWithExtraMethods', array('extraMethod')); - -class TestOfMockGeneration extends UnitTestCase { - - function testCloning() { - $mock = new MockDummy(); - $this->assertTrue(method_exists($mock, "aMethod")); - $this->assertNull($mock->aMethod()); - } - - function testCloningWithExtraMethod() { - $mock = new MockDummyWithExtraMethods(); - $this->assertTrue(method_exists($mock, "extraMethod")); - } - - function testCloningWithChosenClassName() { - $mock = new AnotherMockDummy(); - $this->assertTrue(method_exists($mock, "aMethod")); - } -} - -class TestOfMockReturns extends UnitTestCase { - - function testDefaultReturn() { - $mock = new MockDummy(); - $mock->setReturnValue("aMethod", "aaa"); - $this->assertIdentical($mock->aMethod(), "aaa"); - $this->assertIdentical($mock->aMethod(), "aaa"); - } - - function testParameteredReturn() { - $mock = new MockDummy(); - $mock->setReturnValue('aMethod', 'aaa', array(1, 2, 3)); - $this->assertNull($mock->aMethod()); - $this->assertIdentical($mock->aMethod(1, 2, 3), 'aaa'); - } - - function testSetReturnGivesObjectReference() { - $mock = new MockDummy(); - $object = new Dummy(); - $mock->returns('aMethod', $object, array(1, 2, 3)); - $this->assertSame($mock->aMethod(1, 2, 3), $object); - } - - function testSetReturnReferenceGivesOriginalReference() { - $mock = new MockDummy(); - $object = 1; - $mock->setReturnReference('aReferenceMethod', $object, array(1, 2, 3)); - $this->assertReference($mock->aReferenceMethod(1, 2, 3), $object); - } - - function testPatternMatchReturn() { - $mock = new MockDummy(); - $mock->setReturnValue( - "aMethod", - "aaa", - array(new PatternExpectation('/hello/i'))); - $this->assertIdentical($mock->aMethod('Hello'), "aaa"); - $this->assertNull($mock->aMethod('Goodbye')); - } - - function testMultipleMethods() { - $mock = new MockDummy(); - $mock->setReturnValue("aMethod", 100, array(1)); - $mock->setReturnValue("aMethod", 200, array(2)); - $mock->setReturnValue("anotherMethod", 10, array(1)); - $mock->setReturnValue("anotherMethod", 20, array(2)); - $this->assertIdentical($mock->aMethod(1), 100); - $this->assertIdentical($mock->anotherMethod(1), 10); - $this->assertIdentical($mock->aMethod(2), 200); - $this->assertIdentical($mock->anotherMethod(2), 20); - } - - function testReturnSequence() { - $mock = new MockDummy(); - $mock->setReturnValueAt(0, "aMethod", "aaa"); - $mock->setReturnValueAt(1, "aMethod", "bbb"); - $mock->setReturnValueAt(3, "aMethod", "ddd"); - $this->assertIdentical($mock->aMethod(), "aaa"); - $this->assertIdentical($mock->aMethod(), "bbb"); - $this->assertNull($mock->aMethod()); - $this->assertIdentical($mock->aMethod(), "ddd"); - } - - function testSetReturnReferenceAtGivesOriginal() { - $mock = new MockDummy(); - $object = 100; - $mock->setReturnReferenceAt(1, "aReferenceMethod", $object); - $this->assertNull($mock->aReferenceMethod()); - $this->assertReference($mock->aReferenceMethod(), $object); - $this->assertNull($mock->aReferenceMethod()); - } - - function testReturnsAtGivesOriginalObjectHandle() { - $mock = new MockDummy(); - $object = new Dummy(); - $mock->returnsAt(1, "aMethod", $object); - $this->assertNull($mock->aMethod()); - $this->assertSame($mock->aMethod(), $object); - $this->assertNull($mock->aMethod()); - } - - function testComplicatedReturnSequence() { - $mock = new MockDummy(); - $object = new Dummy(); - $mock->returnsAt(1, "aMethod", "aaa", array("a")); - $mock->returnsAt(1, "aMethod", "bbb"); - $mock->returnsAt(2, "aMethod", $object, array('*', 2)); - $mock->returnsAt(2, "aMethod", "value", array('*', 3)); - $mock->returns("aMethod", 3, array(3)); - $this->assertNull($mock->aMethod()); - $this->assertEqual($mock->aMethod("a"), "aaa"); - $this->assertSame($mock->aMethod(1, 2), $object); - $this->assertEqual($mock->aMethod(3), 3); - $this->assertNull($mock->aMethod()); - } - - function testMultipleMethodSequences() { - $mock = new MockDummy(); - $mock->setReturnValueAt(0, "aMethod", "aaa"); - $mock->setReturnValueAt(1, "aMethod", "bbb"); - $mock->setReturnValueAt(0, "anotherMethod", "ccc"); - $mock->setReturnValueAt(1, "anotherMethod", "ddd"); - $this->assertIdentical($mock->aMethod(), "aaa"); - $this->assertIdentical($mock->anotherMethod(), "ccc"); - $this->assertIdentical($mock->aMethod(), "bbb"); - $this->assertIdentical($mock->anotherMethod(), "ddd"); - } - - function testSequenceFallback() { - $mock = new MockDummy(); - $mock->setReturnValueAt(0, "aMethod", "aaa", array('a')); - $mock->setReturnValueAt(1, "aMethod", "bbb", array('a')); - $mock->setReturnValue("aMethod", "AAA"); - $this->assertIdentical($mock->aMethod('a'), "aaa"); - $this->assertIdentical($mock->aMethod('b'), "AAA"); - } - - function testMethodInterference() { - $mock = new MockDummy(); - $mock->setReturnValueAt(0, "anotherMethod", "aaa"); - $mock->setReturnValue("aMethod", "AAA"); - $this->assertIdentical($mock->aMethod(), "AAA"); - $this->assertIdentical($mock->anotherMethod(), "aaa"); - } -} - -class TestOfMockExpectationsThatPass extends UnitTestCase { - - function testAnyArgument() { - $mock = new MockDummy(); - $mock->expect('aMethod', array('*')); - $mock->aMethod(1); - $mock->aMethod('hello'); - } - - function testAnyTwoArguments() { - $mock = new MockDummy(); - $mock->expect('aMethod', array('*', '*')); - $mock->aMethod(1, 2); - } - - function testSpecificArgument() { - $mock = new MockDummy(); - $mock->expect('aMethod', array(1)); - $mock->aMethod(1); - } - - function testExpectation() { - $mock = new MockDummy(); - $mock->expect('aMethod', array(new IsAExpectation('Dummy'))); - $mock->aMethod(new Dummy()); - } - - function testArgumentsInSequence() { - $mock = new MockDummy(); - $mock->expectAt(0, 'aMethod', array(1, 2)); - $mock->expectAt(1, 'aMethod', array(3, 4)); - $mock->aMethod(1, 2); - $mock->aMethod(3, 4); - } - - function testAtLeastOnceSatisfiedByOneCall() { - $mock = new MockDummy(); - $mock->expectAtLeastOnce('aMethod'); - $mock->aMethod(); - } - - function testAtLeastOnceSatisfiedByTwoCalls() { - $mock = new MockDummy(); - $mock->expectAtLeastOnce('aMethod'); - $mock->aMethod(); - $mock->aMethod(); - } - - function testOnceSatisfiedByOneCall() { - $mock = new MockDummy(); - $mock->expectOnce('aMethod'); - $mock->aMethod(); - } - - function testMinimumCallsSatisfiedByEnoughCalls() { - $mock = new MockDummy(); - $mock->expectMinimumCallCount('aMethod', 1); - $mock->aMethod(); - } - - function testMinimumCallsSatisfiedByTooManyCalls() { - $mock = new MockDummy(); - $mock->expectMinimumCallCount('aMethod', 3); - $mock->aMethod(); - $mock->aMethod(); - $mock->aMethod(); - $mock->aMethod(); - } - - function testMaximumCallsSatisfiedByEnoughCalls() { - $mock = new MockDummy(); - $mock->expectMaximumCallCount('aMethod', 1); - $mock->aMethod(); - } - - function testMaximumCallsSatisfiedByNoCalls() { - $mock = new MockDummy(); - $mock->expectMaximumCallCount('aMethod', 1); - } -} - -class MockWithInjectedTestCase extends SimpleMock { - protected function getCurrentTestCase() { - return SimpleTest::getContext()->getTest()->getMockedTest(); - } -} -SimpleTest::setMockBaseClass('MockWithInjectedTestCase'); -Mock::generate('Dummy', 'MockDummyWithInjectedTestCase'); -SimpleTest::setMockBaseClass('SimpleMock'); -Mock::generate('SimpleTestCase'); - -class LikeExpectation extends IdenticalExpectation { - function __construct($expectation) { - $expectation->message = ''; - parent::__construct($expectation); - } - - function test($compare) { - $compare->message = ''; - return parent::test($compare); - } - - function testMessage($compare) { - $compare->message = ''; - return parent::testMessage($compare); - } -} - -class TestOfMockExpectations extends UnitTestCase { - private $test; - - function setUp() { - $this->test = new MockSimpleTestCase(); - } - - function getMockedTest() { - return $this->test; - } - - function testSettingExpectationOnNonMethodThrowsError() { - $mock = new MockDummyWithInjectedTestCase(); - $this->expectError(); - $mock->expectMaximumCallCount('aMissingMethod', 2); - } - - function testMaxCallsDetectsOverrun() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new MaximumCallCountExpectation('aMethod', 2)), - 3)); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expectMaximumCallCount('aMethod', 2); - $mock->aMethod(); - $mock->aMethod(); - $mock->aMethod(); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testTallyOnMaxCallsSendsPassOnUnderrun() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new MaximumCallCountExpectation('aMethod', 2)), - 2)); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expectMaximumCallCount("aMethod", 2); - $mock->aMethod(); - $mock->aMethod(); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testExpectNeverDetectsOverrun() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new MaximumCallCountExpectation('aMethod', 0)), - 1)); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expectNever('aMethod'); - $mock->aMethod(); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testTallyOnExpectNeverStillSendsPassOnUnderrun() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new MaximumCallCountExpectation('aMethod', 0)), - 0)); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expectNever('aMethod'); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testMinCalls() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new MinimumCallCountExpectation('aMethod', 2)), - 2)); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expectMinimumCallCount('aMethod', 2); - $mock->aMethod(); - $mock->aMethod(); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testFailedNever() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new MaximumCallCountExpectation('aMethod', 0)), - 1)); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expectNever('aMethod'); - $mock->aMethod(); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testUnderOnce() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new CallCountExpectation('aMethod', 1)), - 0)); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expectOnce('aMethod'); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testOverOnce() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new CallCountExpectation('aMethod', 1)), - 2)); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expectOnce('aMethod'); - $mock->aMethod(); - $mock->aMethod(); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testUnderAtLeastOnce() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new MinimumCallCountExpectation('aMethod', 1)), - 0)); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expectAtLeastOnce("aMethod"); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testZeroArguments() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new ParametersExpectation(array())), - array(), - '*')); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expect("aMethod", array()); - $mock->aMethod(); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testExpectedArguments() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new ParametersExpectation(array(1, 2, 3))), - array(1, 2, 3), - '*')); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expect('aMethod', array(1, 2, 3)); - $mock->aMethod(1, 2, 3); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testFailedArguments() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new ParametersExpectation(array('this'))), - array('that'), - '*')); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expect('aMethod', array('this')); - $mock->aMethod('that'); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testWildcardsAreTranslatedToAnythingExpectations() { - $this->test->expectOnce('assert', array( - new LikeExpectation(new ParametersExpectation(array( - new AnythingExpectation(), 123, new AnythingExpectation()))), - array(100, 123, 101), - '*')); - $mock = new MockDummyWithInjectedTestCase($this); - $mock->expect("aMethod", array('*', 123, '*')); - $mock->aMethod(100, 123, 101); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testSpecificPassingSequence() { - $this->test->expectAt(0, 'assert', array( - new LikeExpectation(new ParametersExpectation(array(1, 2, 3))), - array(1, 2, 3), - '*')); - $this->test->expectAt(1, 'assert', array( - new LikeExpectation(new ParametersExpectation(array('Hello'))), - array('Hello'), - '*')); - $mock = new MockDummyWithInjectedTestCase(); - $mock->expectAt(1, 'aMethod', array(1, 2, 3)); - $mock->expectAt(2, 'aMethod', array('Hello')); - $mock->aMethod(); - $mock->aMethod(1, 2, 3); - $mock->aMethod('Hello'); - $mock->aMethod(); - $mock->mock->atTestEnd('testSomething', $this->test); - } - - function testNonArrayForExpectedParametersGivesError() { - $mock = new MockDummyWithInjectedTestCase(); - $this->expectError(new PatternExpectation('/\$args.*not an array/i')); - $mock->expect("aMethod", "foo"); - $mock->aMethod(); - $mock->mock->atTestEnd('testSomething', $this->test); - } -} - -class TestOfMockComparisons extends UnitTestCase { - - function testEqualComparisonOfMocksDoesNotCrash() { - $expectation = new EqualExpectation(new MockDummy()); - $this->assertTrue($expectation->test(new MockDummy(), true)); - } - - function testIdenticalComparisonOfMocksDoesNotCrash() { - $expectation = new IdenticalExpectation(new MockDummy()); - $this->assertTrue($expectation->test(new MockDummy())); - } -} - -class ClassWithSpecialMethods { - function __get($name) { } - function __set($name, $value) { } - function __isset($name) { } - function __unset($name) { } - function __call($method, $arguments) { } - function __toString() { } -} -Mock::generate('ClassWithSpecialMethods'); - -class TestOfSpecialMethodsAfterPHP51 extends UnitTestCase { - - function skip() { - $this->skipIf(version_compare(phpversion(), '5.1', '<'), '__isset and __unset overloading not tested unless PHP 5.1+'); - } - - function testCanEmulateIsset() { - $mock = new MockClassWithSpecialMethods(); - $mock->setReturnValue('__isset', true); - $this->assertIdentical(isset($mock->a), true); - } - - function testCanExpectUnset() { - $mock = new MockClassWithSpecialMethods(); - $mock->expectOnce('__unset', array('a')); - unset($mock->a); - } - -} - -class TestOfSpecialMethods extends UnitTestCase { - function skip() { - $this->skipIf(version_compare(phpversion(), '5', '<'), 'Overloading not tested unless PHP 5+'); - } - - function testCanMockTheThingAtAll() { - $mock = new MockClassWithSpecialMethods(); - } - - function testReturnFromSpecialAccessor() { - $mock = new MockClassWithSpecialMethods(); - $mock->setReturnValue('__get', '1st Return', array('first')); - $mock->setReturnValue('__get', '2nd Return', array('second')); - $this->assertEqual($mock->first, '1st Return'); - $this->assertEqual($mock->second, '2nd Return'); - } - - function testcanExpectTheSettingOfValue() { - $mock = new MockClassWithSpecialMethods(); - $mock->expectOnce('__set', array('a', 'A')); - $mock->a = 'A'; - } - - function testCanSimulateAnOverloadmethod() { - $mock = new MockClassWithSpecialMethods(); - $mock->expectOnce('__call', array('amOverloaded', array('A'))); - $mock->setReturnValue('__call', 'aaa'); - $this->assertIdentical($mock->amOverloaded('A'), 'aaa'); - } - - function testToStringMagic() { - $mock = new MockClassWithSpecialMethods(); - $mock->expectOnce('__toString'); - $mock->setReturnValue('__toString', 'AAA'); - ob_start(); - print $mock; - $output = ob_get_contents(); - ob_end_clean(); - $this->assertEqual($output, 'AAA'); - } -} - -class WithStaticMethod { - static function aStaticMethod() { } -} -Mock::generate('WithStaticMethod'); - -class TestOfMockingClassesWithStaticMethods extends UnitTestCase { - - function testStaticMethodIsMockedAsStatic() { - $mock = new WithStaticMethod(); - $reflection = new ReflectionClass($mock); - $method = $reflection->getMethod('aStaticMethod'); - $this->assertTrue($method->isStatic()); - } -} - -class MockTestException extends Exception { } - -class TestOfThrowingExceptionsFromMocks extends UnitTestCase { - - function testCanThrowOnMethodCall() { - $mock = new MockDummy(); - $mock->throwOn('aMethod'); - $this->expectException(); - $mock->aMethod(); - } - - function testCanThrowSpecificExceptionOnMethodCall() { - $mock = new MockDummy(); - $mock->throwOn('aMethod', new MockTestException()); - $this->expectException(); - $mock->aMethod(); - } - - function testThrowsOnlyWhenCallSignatureMatches() { - $mock = new MockDummy(); - $mock->throwOn('aMethod', new MockTestException(), array(3)); - $mock->aMethod(1); - $mock->aMethod(2); - $this->expectException(); - $mock->aMethod(3); - } - - function testCanThrowOnParticularInvocation() { - $mock = new MockDummy(); - $mock->throwAt(2, 'aMethod', new MockTestException()); - $mock->aMethod(); - $mock->aMethod(); - $this->expectException(); - $mock->aMethod(); - } -} - -class TestOfThrowingErrorsFromMocks extends UnitTestCase { - - function testCanGenerateErrorFromMethodCall() { - $mock = new MockDummy(); - $mock->errorOn('aMethod', 'Ouch!'); - $this->expectError('Ouch!'); - $mock->aMethod(); - } - - function testGeneratesErrorOnlyWhenCallSignatureMatches() { - $mock = new MockDummy(); - $mock->errorOn('aMethod', 'Ouch!', array(3)); - $mock->aMethod(1); - $mock->aMethod(2); - $this->expectError(); - $mock->aMethod(3); - } - - function testCanGenerateErrorOnParticularInvocation() { - $mock = new MockDummy(); - $mock->errorAt(2, 'aMethod', 'Ouch!'); - $mock->aMethod(); - $mock->aMethod(); - $this->expectError(); - $mock->aMethod(); - } -} - -Mock::generatePartial('Dummy', 'TestDummy', array('anotherMethod', 'aReferenceMethod')); - -class TestOfPartialMocks extends UnitTestCase { - - function testMethodReplacementWithNoBehaviourReturnsNull() { - $mock = new TestDummy(); - $this->assertEqual($mock->aMethod(99), 99); - $this->assertNull($mock->anotherMethod()); - } - - function testSettingReturns() { - $mock = new TestDummy(); - $mock->setReturnValue('anotherMethod', 33, array(3)); - $mock->setReturnValue('anotherMethod', 22); - $mock->setReturnValueAt(2, 'anotherMethod', 44, array(3)); - $this->assertEqual($mock->anotherMethod(), 22); - $this->assertEqual($mock->anotherMethod(3), 33); - $this->assertEqual($mock->anotherMethod(3), 44); - } - - function testSetReturnReferenceGivesOriginal() { - $mock = new TestDummy(); - $object = 99; - $mock->setReturnReferenceAt(0, 'aReferenceMethod', $object, array(3)); - $this->assertReference($mock->aReferenceMethod(3), $object); - } - - function testReturnsAtGivesOriginalObjectHandle() { - $mock = new TestDummy(); - $object = new Dummy(); - $mock->returnsAt(0, 'anotherMethod', $object, array(3)); - $this->assertSame($mock->anotherMethod(3), $object); - } - - function testExpectations() { - $mock = new TestDummy(); - $mock->expectCallCount('anotherMethod', 2); - $mock->expect('anotherMethod', array(77)); - $mock->expectAt(1, 'anotherMethod', array(66)); - $mock->anotherMethod(77); - $mock->anotherMethod(66); - } - - function testSettingExpectationOnMissingMethodThrowsError() { - $mock = new TestDummy(); - $this->expectError(); - $mock->expectCallCount('aMissingMethod', 2); - } -} - -class ConstructorSuperClass { - function ConstructorSuperClass() { } -} - -class ConstructorSubClass extends ConstructorSuperClass { } - -class TestOfPHP4StyleSuperClassConstruct extends UnitTestCase { - function testBasicConstruct() { - Mock::generate('ConstructorSubClass'); - $mock = new MockConstructorSubClass(); - $this->assertIsA($mock, 'ConstructorSubClass'); - $this->assertTrue(method_exists($mock, 'ConstructorSuperClass')); - } -} - -class TestOfPHP5StaticMethodMocking extends UnitTestCase { - function testCanCreateAMockObjectWithStaticMethodsWithoutError() { - eval(' - class SimpleObjectContainingStaticMethod { - static function someStatic() { } - } - '); - Mock::generate('SimpleObjectContainingStaticMethod'); - } -} - -class TestOfPHP5AbstractMethodMocking extends UnitTestCase { - function testCanCreateAMockObjectFromAnAbstractWithProperFunctionDeclarations() { - eval(' - abstract class SimpleAbstractClassContainingAbstractMethods { - abstract function anAbstract(); - abstract function anAbstractWithParameter($foo); - abstract function anAbstractWithMultipleParameters($foo, $bar); - } - '); - Mock::generate('SimpleAbstractClassContainingAbstractMethods'); - $this->assertTrue( - method_exists( - // Testing with class name alone does not work in PHP 5.0 - new MockSimpleAbstractClassContainingAbstractMethods, - 'anAbstract' - ) - ); - $this->assertTrue( - method_exists( - new MockSimpleAbstractClassContainingAbstractMethods, - 'anAbstractWithParameter' - ) - ); - $this->assertTrue( - method_exists( - new MockSimpleAbstractClassContainingAbstractMethods, - 'anAbstractWithMultipleParameters' - ) - ); - } - - function testMethodsDefinedAsAbstractInParentShouldHaveFullSignature() { - eval(' - abstract class SimpleParentAbstractClassContainingAbstractMethods { - abstract function anAbstract(); - abstract function anAbstractWithParameter($foo); - abstract function anAbstractWithMultipleParameters($foo, $bar); - } - - class SimpleChildAbstractClassContainingAbstractMethods extends SimpleParentAbstractClassContainingAbstractMethods { - function anAbstract(){} - function anAbstractWithParameter($foo){} - function anAbstractWithMultipleParameters($foo, $bar){} - } - - class EvenDeeperEmptyChildClass extends SimpleChildAbstractClassContainingAbstractMethods {} - '); - Mock::generate('SimpleChildAbstractClassContainingAbstractMethods'); - $this->assertTrue( - method_exists( - new MockSimpleChildAbstractClassContainingAbstractMethods, - 'anAbstract' - ) - ); - $this->assertTrue( - method_exists( - new MockSimpleChildAbstractClassContainingAbstractMethods, - 'anAbstractWithParameter' - ) - ); - $this->assertTrue( - method_exists( - new MockSimpleChildAbstractClassContainingAbstractMethods, - 'anAbstractWithMultipleParameters' - ) - ); - Mock::generate('EvenDeeperEmptyChildClass'); - $this->assertTrue( - method_exists( - new MockEvenDeeperEmptyChildClass, - 'anAbstract' - ) - ); - $this->assertTrue( - method_exists( - new MockEvenDeeperEmptyChildClass, - 'anAbstractWithParameter' - ) - ); - $this->assertTrue( - method_exists( - new MockEvenDeeperEmptyChildClass, - 'anAbstractWithMultipleParameters' - ) - ); - } -} - -class DummyWithProtected -{ - public function aMethodCallsProtected() { return $this->aProtectedMethod(); } - protected function aProtectedMethod() { return true; } -} - -Mock::generatePartial('DummyWithProtected', 'TestDummyWithProtected', array('aProtectedMethod')); -class TestOfProtectedMethodPartialMocks extends UnitTestCase -{ - function testProtectedMethodExists() { - $this->assertTrue( - method_exists( - new TestDummyWithProtected, - 'aProtectedMethod' - ) - ); - } - - function testProtectedMethodIsCalled() { - $object = new DummyWithProtected(); - $this->assertTrue($object->aMethodCallsProtected(), 'ensure original was called'); - } - - function testMockedMethodIsCalled() { - $object = new TestDummyWithProtected(); - $object->setReturnValue('aProtectedMethod', false); - $this->assertFalse($object->aMethodCallsProtected()); - } -} - -?> diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/page_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/page_test.php deleted file mode 100644 index eb61c4fa..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/page_test.php +++ /dev/null @@ -1,898 +0,0 @@ - 'http://somewhere')); - $tag->addContent('Label'); - - $page = new MockSimplePage(); - $page->expect('acceptTag', array($tag)); - $page->expectCallCount('acceptTag', 1); - - $builder = new PartialSimplePageBuilder(); - $builder->returns('createPage', $page); - $builder->returns('createParser', new MockSimpleHtmlSaxParser()); - $builder->__construct(); - - $builder->parse(new MockSimpleHttpResponse()); - $this->assertTrue($builder->startElement( - 'a', - array('href' => 'http://somewhere'))); - $this->assertTrue($builder->addContent('Label')); - $this->assertTrue($builder->endElement('a')); - } - - function testLinkWithId() { - $tag = new SimpleAnchorTag(array("href" => "http://somewhere", "id" => "44")); - $tag->addContent("Label"); - - $page = new MockSimplePage(); - $page->expect("acceptTag", array($tag)); - $page->expectCallCount("acceptTag", 1); - - $builder = new PartialSimplePageBuilder(); - $builder->returns('createPage', $page); - $builder->returns('createParser', new MockSimpleHtmlSaxParser()); - $builder->__construct(); - - $builder->parse(new MockSimpleHttpResponse()); - $this->assertTrue($builder->startElement( - "a", - array("href" => "http://somewhere", "id" => "44"))); - $this->assertTrue($builder->addContent("Label")); - $this->assertTrue($builder->endElement("a")); - } - - function testLinkExtraction() { - $tag = new SimpleAnchorTag(array("href" => "http://somewhere")); - $tag->addContent("Label"); - - $page = new MockSimplePage(); - $page->expect("acceptTag", array($tag)); - $page->expectCallCount("acceptTag", 1); - - $builder = new PartialSimplePageBuilder(); - $builder->returns('createPage', $page); - $builder->returns('createParser', new MockSimpleHtmlSaxParser()); - $builder->__construct(); - - $builder->parse(new MockSimpleHttpResponse()); - $this->assertTrue($builder->addContent("Starting stuff")); - $this->assertTrue($builder->startElement( - "a", - array("href" => "http://somewhere"))); - $this->assertTrue($builder->addContent("Label")); - $this->assertTrue($builder->endElement("a")); - $this->assertTrue($builder->addContent("Trailing stuff")); - } - - function testMultipleLinks() { - $a1 = new SimpleAnchorTag(array("href" => "http://somewhere")); - $a1->addContent("1"); - - $a2 = new SimpleAnchorTag(array("href" => "http://elsewhere")); - $a2->addContent("2"); - - $page = new MockSimplePage(); - $page->expectAt(0, "acceptTag", array($a1)); - $page->expectAt(1, "acceptTag", array($a2)); - $page->expectCallCount("acceptTag", 2); - - $builder = new PartialSimplePageBuilder(); - $builder->returns('createPage', $page); - $builder->returns('createParser', new MockSimpleHtmlSaxParser()); - $builder->__construct(); - - $builder->parse(new MockSimpleHttpResponse()); - $builder->startElement("a", array("href" => "http://somewhere")); - $builder->addContent("1"); - $builder->endElement("a"); - $builder->addContent("Padding"); - $builder->startElement("a", array("href" => "http://elsewhere")); - $builder->addContent("2"); - $builder->endElement("a"); - } - - function testTitle() { - $tag = new SimpleTitleTag(array()); - $tag->addContent("HereThere"); - - $page = new MockSimplePage(); - $page->expect("acceptTag", array($tag)); - $page->expectCallCount("acceptTag", 1); - - $builder = new PartialSimplePageBuilder(); - $builder->returns('createPage', $page); - $builder->returns('createParser', new MockSimpleHtmlSaxParser()); - $builder->__construct(); - - $builder->parse(new MockSimpleHttpResponse()); - $builder->startElement("title", array()); - $builder->addContent("Here"); - $builder->addContent("There"); - $builder->endElement("title"); - } - - function testForm() { - $page = new MockSimplePage(); - $page->expectOnce("acceptFormStart", array(new SimpleFormTag(array()))); - $page->expectOnce("acceptFormEnd", array()); - - $builder = new PartialSimplePageBuilder(); - $builder->returns('createPage', $page); - $builder->returns('createParser', new MockSimpleHtmlSaxParser()); - $builder->__construct(); - - $builder->parse(new MockSimpleHttpResponse()); - $builder->startElement("form", array()); - $builder->addContent("Stuff"); - $builder->endElement("form"); - } -} - -class TestOfPageParsing extends UnitTestCase { - - function testParseMechanics() { - $parser = new MockSimpleHtmlSaxParser(); - $parser->expectOnce('parse', array('stuff')); - - $page = new MockSimplePage(); - $page->expectOnce('acceptPageEnd'); - - $builder = new PartialSimplePageBuilder(); - $builder->returns('createPage', $page); - $builder->returns('createParser', $parser); - $builder->__construct(); - - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', 'stuff'); - $builder->parse($response); - } -} - -class TestOfPageInterface extends UnitTestCase { - - function testInterfaceOnEmptyPage() { - $page = new SimplePage(); - $this->assertEqual($page->getTransportError(), 'No page fetched yet'); - $this->assertIdentical($page->getRaw(), false); - $this->assertIdentical($page->getHeaders(), false); - $this->assertIdentical($page->getMimeType(), false); - $this->assertIdentical($page->getResponseCode(), false); - $this->assertIdentical($page->getAuthentication(), false); - $this->assertIdentical($page->getRealm(), false); - $this->assertFalse($page->hasFrames()); - $this->assertIdentical($page->getUrls(), array()); - $this->assertIdentical($page->getTitle(), false); - } -} - -class TestOfPageHeaders extends UnitTestCase { - - function testUrlAccessor() { - $headers = new MockSimpleHttpHeaders(); - - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getHeaders', $headers); - $response->setReturnValue('getMethod', 'POST'); - $response->setReturnValue('getUrl', new SimpleUrl('here')); - $response->setReturnValue('getRequestData', array('a' => 'A')); - - $page = new SimplePage($response); - $this->assertEqual($page->getMethod(), 'POST'); - $this->assertEqual($page->getUrl(), new SimpleUrl('here')); - $this->assertEqual($page->getRequestData(), array('a' => 'A')); - } - - function testTransportError() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getError', 'Ouch'); - - $page = new SimplePage($response); - $this->assertEqual($page->getTransportError(), 'Ouch'); - } - - function testHeadersAccessor() { - $headers = new MockSimpleHttpHeaders(); - $headers->setReturnValue('getRaw', 'My: Headers'); - - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getHeaders', $headers); - - $page = new SimplePage($response); - $this->assertEqual($page->getHeaders(), 'My: Headers'); - } - - function testMimeAccessor() { - $headers = new MockSimpleHttpHeaders(); - $headers->setReturnValue('getMimeType', 'text/html'); - - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getHeaders', $headers); - - $page = new SimplePage($response); - $this->assertEqual($page->getMimeType(), 'text/html'); - } - - function testResponseAccessor() { - $headers = new MockSimpleHttpHeaders(); - $headers->setReturnValue('getResponseCode', 301); - - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getHeaders', $headers); - - $page = new SimplePage($response); - $this->assertIdentical($page->getResponseCode(), 301); - } - - function testAuthenticationAccessors() { - $headers = new MockSimpleHttpHeaders(); - $headers->setReturnValue('getAuthentication', 'Basic'); - $headers->setReturnValue('getRealm', 'Secret stuff'); - - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getHeaders', $headers); - - $page = new SimplePage($response); - $this->assertEqual($page->getAuthentication(), 'Basic'); - $this->assertEqual($page->getRealm(), 'Secret stuff'); - } -} - -class TestOfHtmlPage extends UnitTestCase { - - function testRawAccessor() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', 'Raw HTML'); - - $page = new SimplePage($response); - $this->assertEqual($page->getRaw(), 'Raw HTML'); - } - - function testTextAccessor() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', 'Some "messy" HTML'); - - $page = new SimplePage($response); - $this->assertEqual($page->getText(), 'Some "messy" HTML'); - } - - function testNoLinks() { - $page = new SimplePage(new MockSimpleHttpResponse()); - $this->assertIdentical($page->getUrls(), array()); - $this->assertIdentical($page->getUrlsByLabel('Label'), array()); - } - - function testAddAbsoluteLink() { - $link = new SimpleAnchorTag(array('href' => 'http://somewhere.com')); - $link->addContent('Label'); - $page = new SimplePage(new MockSimpleHttpResponse()); - $page->AcceptTag($link); - $this->assertEqual( - $page->getUrlsByLabel('Label'), - array(new SimpleUrl('http://somewhere.com'))); - } - - function testAddStrictRelativeLink() { - $link = new SimpleAnchorTag(array('href' => './somewhere.php')); - $link->addContent('Label'); - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - $page = new SimplePage($response); - $page->AcceptTag($link); - $this->assertEqual( - $page->getUrlsByLabel('Label'), - array(new SimpleUrl('http://host/somewhere.php'))); - } - - function testAddBareRelativeLink() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - $page = new SimplePage($response); - $page->AcceptTag(new SimpleAnchorTag(array('href' => 'somewhere.php'))); - $this->assertIdentical($page->getUrls(), array('http://host/somewhere.php')); - } - - function testAddRelativeLinkWithBaseTag() { - $link = new SimpleAnchorTag(array('href' => 'somewhere.php')); - $link->addContent('Label'); - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - $page = new SimplePage($response); - $page->AcceptTag($link); - $base = new SimpleBaseTag(array('href' => 'www.lastcraft.com/stuff/')); - $page->AcceptTag($base); - $this->assertEqual( - $page->getUrlsByLabel('Label'), - array(new SimpleUrl('www.lastcraft.com/stuff/somewhere.php'))); - } - - function testAddAbsoluteLinkWithBaseTag() { - $link = new SimpleAnchorTag(array('href' => 'http://here.com/somewhere.php')); - $link->addContent('Label'); - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - $page = new SimplePage($response); - $page->AcceptTag($link); - $base = new SimpleBaseTag(array('href' => 'www.lastcraft.com/stuff/')); - $page->AcceptTag($base); - $this->assertEqual( - $page->getUrlsByLabel('Label'), - array(new SimpleUrl('http://here.com/somewhere.php'))); - } - - function testLinkIds() { - $link = new SimpleAnchorTag(array('href' => './somewhere.php', 'id' => 33)); - $link->addContent('Label'); - - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - - $page = new SimplePage($response); - $page->AcceptTag($link); - - $this->assertEqual( - $page->getUrlsByLabel('Label'), - array(new SimpleUrl('http://host/somewhere.php'))); - $this->assertFalse($page->getUrlById(0)); - $this->assertEqual( - $page->getUrlById(33), - new SimpleUrl('http://host/somewhere.php')); - } - - function testFindLinkWithNormalisation() { - $link = new SimpleAnchorTag(array('href' => './somewhere.php', 'id' => 33)); - $link->addContent(' Long & thin '); - - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - - $page = new SimplePage($response); - $page->AcceptTag($link); - - $this->assertEqual( - $page->getUrlsByLabel('Long & thin'), - array(new SimpleUrl('http://host/somewhere.php'))); - } - - function testFindLinkWithImage() { - $link = new SimpleAnchorTag(array('href' => './somewhere.php', 'id' => 33)); - $link->addContent('<A picture>'); - - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - - $page = new SimplePage($response); - $page->AcceptTag($link); - - $this->assertEqual( - $page->getUrlsByLabel(''), - array(new SimpleUrl('http://host/somewhere.php'))); - } - - function testTitleSetting() { - $title = new SimpleTitleTag(array()); - $title->addContent('Title'); - $page = new SimplePage(new MockSimpleHttpResponse()); - $page->AcceptTag($title); - $this->assertEqual($page->getTitle(), 'Title'); - } - - function testFramesetAbsence() { - $url = new SimpleUrl('here'); - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', $url); - $page = new SimplePage($response); - $this->assertFalse($page->hasFrames()); - $this->assertIdentical($page->getFrameset(), false); - } - - function testHasEmptyFrameset() { - $page = new SimplePage(new MockSimpleHttpResponse()); - $page->acceptFramesetStart(new SimpleTag('frameset', array())); - $page->acceptFramesetEnd(); - $this->assertTrue($page->hasFrames()); - $this->assertIdentical($page->getFrameset(), array()); - } - - function testFramesInPage() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', new SimpleUrl('http://here')); - - $page = new SimplePage($response); - $page->acceptFrame(new SimpleFrameTag(array('src' => '1.html'))); - $page->acceptFramesetStart(new SimpleTag('frameset', array())); - $page->acceptFrame(new SimpleFrameTag(array('src' => '2.html'))); - $page->acceptFrame(new SimpleFrameTag(array('src' => '3.html'))); - $page->acceptFramesetEnd(); - $page->acceptFrame(new SimpleFrameTag(array('src' => '4.html'))); - - $this->assertTrue($page->hasFrames()); - $this->assertIdentical($page->getFrameset(), array( - 1 => new SimpleUrl('http://here/2.html'), - 2 => new SimpleUrl('http://here/3.html'))); - } - - function testNamedFramesInPage() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', new SimpleUrl('http://here')); - - $page = new SimplePage($response); - $page->acceptFramesetStart(new SimpleTag('frameset', array())); - $page->acceptFrame(new SimpleFrameTag(array('src' => '1.html'))); - $page->acceptFrame(new SimpleFrameTag(array('src' => '2.html', 'name' => 'A'))); - $page->acceptFrame(new SimpleFrameTag(array('src' => '3.html', 'name' => 'B'))); - $page->acceptFrame(new SimpleFrameTag(array('src' => '4.html'))); - $page->acceptFramesetEnd(); - - $this->assertTrue($page->hasFrames()); - $this->assertIdentical($page->getFrameset(), array( - 1 => new SimpleUrl('http://here/1.html'), - 'A' => new SimpleUrl('http://here/2.html'), - 'B' => new SimpleUrl('http://here/3.html'), - 4 => new SimpleUrl('http://here/4.html'))); - } - - function testRelativeFramesRespectBaseTag() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getUrl', new SimpleUrl('http://here.com/')); - $page = new SimplePage($response); - - $base = new SimpleBaseTag(array('href' => 'https://there.com/stuff/')); - $page->AcceptTag($base); - - $page->acceptFramesetStart(new SimpleTag('frameset', array())); - $page->acceptFrame(new SimpleFrameTag(array('src' => '1.html'))); - $page->acceptFramesetEnd(); - $this->assertIdentical( - $page->getFrameset(), - array(1 => new SimpleUrl('https://there.com/stuff/1.html'))); - } -} - -class TestOfFormsCreatedFromEventStream extends UnitTestCase { - - function testFormCanBeSubmitted() { - $page = new SimplePage(new MockSimpleHttpResponse()); - $page->acceptFormStart( - new SimpleFormTag(array('method' => 'GET', 'action' => 'here.php'))); - $page->AcceptTag( - new SimpleSubmitTag(array('type' => 'submit', 'name' => 's'))); - $page->acceptFormEnd(); - $form = &$page->getFormBySubmit(new SimpleByLabel('Submit')); - $this->assertEqual( - $form->submitButton(new SimpleByLabel('Submit')), - new SimpleGetEncoding(array('s' => 'Submit'))); - } - - function testInputFieldCanBeReadBack() { - $page = new SimplePage(new MockSimpleHttpResponse()); - $page->acceptFormStart( - new SimpleFormTag(array("method" => "GET", "action" => "here.php"))); - $page->AcceptTag( - new SimpleTextTag(array("type" => "text", "name" => "a", "value" => "A"))); - $page->AcceptTag( - new SimpleSubmitTag(array("type" => "submit", "name" => "s"))); - $page->acceptFormEnd(); - $this->assertEqual($page->getField(new SimpleByName('a')), 'A'); - } - - function testInputFieldCanBeReadBackByLabel() { - $label = new SimpleLabelTag(array()); - $page = new SimplePage(new MockSimpleHttpResponse()); - $page->acceptFormStart( - new SimpleFormTag(array("method" => "GET", "action" => "here.php"))); - $page->acceptLabelStart($label); - $label->addContent('l'); - $page->AcceptTag( - new SimpleTextTag(array("type" => "text", "name" => "a", "value" => "A"))); - $page->acceptLabelEnd(); - $page->AcceptTag( - new SimpleSubmitTag(array("type" => "submit", "name" => "s"))); - $page->acceptFormEnd(); - $this->assertEqual($page->getField(new SimpleByLabel('l')), 'A'); - } -} - -class TestOfPageScraping extends UnitTestCase { - - function parse($response) { - $builder = new SimplePageBuilder(); - $page = $builder->parse($response); - return $page; - } - - function testEmptyPage() { - $page = new SimplePage(new MockSimpleHttpResponse()); - $this->assertIdentical($page->getUrls(), array()); - $this->assertIdentical($page->getTitle(), false); - } - - function testUninterestingPage() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', '

    Stuff

    '); - $page = $this->parse($response); - $this->assertIdentical($page->getUrls(), array()); - } - - function testLinksPage() { - $raw = ''; - $raw .= '
    There'; - $raw .= 'That page'; - $raw .= ''; - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', $raw); - $response->setReturnValue('getUrl', new SimpleUrl('http://www.here.com/a/index.html')); - $page = $this->parse($response); - $this->assertIdentical( - $page->getUrls(), - array('http://www.here.com/a/there.html', 'http://there.com/that.html')); - $this->assertIdentical( - $page->getUrlsByLabel('There'), - array(new SimpleUrl('http://www.here.com/a/there.html'))); - $this->assertEqual( - $page->getUrlById('0'), - new SimpleUrl('http://there.com/that.html')); - } - - function testTitle() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', 'Me'); - $page = $this->parse($response); - $this->assertEqual($page->getTitle(), 'Me'); - } - - function testNastyTitle() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue( - 'getContent', - ' <b>Me&Me '); - $page = $this->parse($response); - $this->assertEqual($page->getTitle(), "Me&Me"); - } - - function testCompleteForm() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertEqual($page->getField(new SimpleByName('here')), "Hello"); - } - - function testUnclosedForm() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - ''); - $page = $this->parse($response); - $this->assertEqual($page->getField(new SimpleByName('here')), "Hello"); - } - - function testEmptyFrameset() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue( - 'getContent', - ''); - $page = $this->parse($response); - $this->assertTrue($page->hasFrames()); - $this->assertIdentical($page->getFrameset(), array()); - } - - function testSingleFrame() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue( - 'getContent', - ''); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - $page = $this->parse($response); - $this->assertTrue($page->hasFrames()); - $this->assertIdentical( - $page->getFrameset(), - array(1 => new SimpleUrl('http://host/a.html'))); - } - - function testSingleFrameInNestedFrameset() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '' . - '' . - ''); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - $page = $this->parse($response); - $this->assertTrue($page->hasFrames()); - $this->assertIdentical( - $page->getFrameset(), - array(1 => new SimpleUrl('http://host/a.html'))); - } - - function testFrameWithNoSource() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue( - 'getContent', - ''); - $page = $this->parse($response); - $this->assertTrue($page->hasFrames()); - $this->assertIdentical($page->getFrameset(), array()); - } - - function testFramesCollectedWithNestedFramesetTags() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '' . - '' . - '' . - '' . - ''); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - $page = $this->parse($response); - $this->assertTrue($page->hasFrames()); - $this->assertIdentical($page->getFrameset(), array( - 1 => new SimpleUrl('http://host/a.html'), - 2 => new SimpleUrl('http://host/b.html'), - 3 => new SimpleUrl('http://host/c.html'))); - } - - function testNamedFrames() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '' . - '' . - '' . - '' . - '' . - ''); - $response->setReturnValue('getUrl', new SimpleUrl('http://host/')); - $page = $this->parse($response); - $this->assertTrue($page->hasFrames()); - $this->assertIdentical($page->getFrameset(), array( - 1 => new SimpleUrl('http://host/a.html'), - '_one' => new SimpleUrl('http://host/b.html'), - 3 => new SimpleUrl('http://host/c.html'), - '_two' => new SimpleUrl('http://host/d.html'))); - } - - function testFindFormByLabel() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue( - 'getContent', - '
    '); - $page = $this->parse($response); - $this->assertNull($page->getFormBySubmit(new SimpleByLabel('submit'))); - $this->assertNull($page->getFormBySubmit(new SimpleByName('submit'))); - $this->assertIsA( - $page->getFormBySubmit(new SimpleByLabel('Submit')), - 'SimpleForm'); - } - - function testConfirmSubmitAttributesAreCaseSensitive() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue( - 'getContent', - '
    '); - $page = $this->parse($response); - $this->assertIsA( - $page->getFormBySubmit(new SimpleByName('S')), - 'SimpleForm'); - $this->assertIsA( - $page->getFormBySubmit(new SimpleByLabel('S')), - 'SimpleForm'); - } - - function testFindFormByImage() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertIsA( - $page->getFormByImage(new SimpleByLabel('Label')), - 'SimpleForm'); - $this->assertIsA( - $page->getFormByImage(new SimpleByName('me')), - 'SimpleForm'); - $this->assertIsA( - $page->getFormByImage(new SimpleById(100)), - 'SimpleForm'); - } - - function testFindFormByButtonTag() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertNull($page->getFormBySubmit(new SimpleByLabel('b'))); - $this->assertNull($page->getFormBySubmit(new SimpleByLabel('B'))); - $this->assertIsA( - $page->getFormBySubmit(new SimpleByName('b')), - 'SimpleForm'); - $this->assertIsA( - $page->getFormBySubmit(new SimpleByLabel('BBB')), - 'SimpleForm'); - } - - function testFindFormById() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue( - 'getContent', - '
    '); - $page = $this->parse($response); - $this->assertNull($page->getFormById(54)); - $this->assertIsA($page->getFormById(55), 'SimpleForm'); - } - - function testReadingTextField() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertNull($page->getField(new SimpleByName('missing'))); - $this->assertIdentical($page->getField(new SimpleByName('a')), ''); - $this->assertIdentical($page->getField(new SimpleByName('b')), 'bbb'); - } - - function testReadingTextFieldIsCaseInsensitive() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertNull($page->getField(new SimpleByName('missing'))); - $this->assertIdentical($page->getField(new SimpleByName('a')), ''); - $this->assertIdentical($page->getField(new SimpleByName('b')), 'bbb'); - } - - function testSettingTextField() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertTrue($page->setField(new SimpleByName('a'), 'aaa')); - $this->assertEqual($page->getField(new SimpleByName('a')), 'aaa'); - $this->assertTrue($page->setField(new SimpleById(3), 'bbb')); - $this->assertEqual($page->getField(new SimpleBYId(3)), 'bbb'); - $this->assertFalse($page->setField(new SimpleByName('z'), 'zzz')); - $this->assertNull($page->getField(new SimpleByName('z'))); - } - - function testSettingTextFieldByEnclosingLabel() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertEqual($page->getField(new SimpleByName('a')), 'A'); - $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'A'); - $this->assertTrue($page->setField(new SimpleByLabel('Stuff'), 'aaa')); - $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'aaa'); - } - - function testGettingTextFieldByEnclosingLabelWithConflictingOtherFields() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertEqual($page->getField(new SimpleByName('a')), 'A'); - $this->assertEqual($page->getField(new SimpleByName('b')), 'B'); - $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'A'); - } - - function testSettingTextFieldByExternalLabel() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'A'); - $this->assertTrue($page->setField(new SimpleByLabel('Stuff'), 'aaa')); - $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'aaa'); - } - - function testReadingTextArea() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertEqual($page->getField(new SimpleByName('a')), 'aaa'); - } - - function testSettingTextArea() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertTrue($page->setField(new SimpleByName('a'), 'AAA')); - $this->assertEqual($page->getField(new SimpleByName('a')), 'AAA'); - } - - function testSettingSelectionField() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertEqual($page->getField(new SimpleByName('a')), 'bbb'); - $this->assertFalse($page->setField(new SimpleByName('a'), 'ccc')); - $this->assertTrue($page->setField(new SimpleByName('a'), 'aaa')); - $this->assertEqual($page->getField(new SimpleByName('a')), 'aaa'); - } - - function testSettingSelectionFieldByEnclosingLabel() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'A'); - $this->assertTrue($page->setField(new SimpleByLabel('Stuff'), 'B')); - $this->assertEqual($page->getField(new SimpleByLabel('Stuff')), 'B'); - } - - function testSettingRadioButtonByEnclosingLabel() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', - '
    ' . - '' . - '' . - '
    '); - $page = $this->parse($response); - $this->assertEqual($page->getField(new SimpleByLabel('A')), 'a'); - $this->assertTrue($page->setField(new SimpleBylabel('B'), 'b')); - $this->assertEqual($page->getField(new SimpleByLabel('B')), 'b'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/parse_error_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/parse_error_test.php deleted file mode 100644 index c3ffb3d4..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/parse_error_test.php +++ /dev/null @@ -1,9 +0,0 @@ -addFile('test_with_parse_error.php'); -$test->run(new HtmlReporter()); -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/parser_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/parser_test.php deleted file mode 100644 index fd01d57e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/parser_test.php +++ /dev/null @@ -1,551 +0,0 @@ -assertFalse($regex->match("Hello", $match)); - $this->assertEqual($match, ""); - } - - function testNoSubject() { - $regex = new ParallelRegex(false); - $regex->addPattern(".*"); - $this->assertTrue($regex->match("", $match)); - $this->assertEqual($match, ""); - } - - function testMatchAll() { - $regex = new ParallelRegex(false); - $regex->addPattern(".*"); - $this->assertTrue($regex->match("Hello", $match)); - $this->assertEqual($match, "Hello"); - } - - function testCaseSensitive() { - $regex = new ParallelRegex(true); - $regex->addPattern("abc"); - $this->assertTrue($regex->match("abcdef", $match)); - $this->assertEqual($match, "abc"); - $this->assertTrue($regex->match("AAABCabcdef", $match)); - $this->assertEqual($match, "abc"); - } - - function testCaseInsensitive() { - $regex = new ParallelRegex(false); - $regex->addPattern("abc"); - $this->assertTrue($regex->match("abcdef", $match)); - $this->assertEqual($match, "abc"); - $this->assertTrue($regex->match("AAABCabcdef", $match)); - $this->assertEqual($match, "ABC"); - } - - function testMatchMultiple() { - $regex = new ParallelRegex(true); - $regex->addPattern("abc"); - $regex->addPattern("ABC"); - $this->assertTrue($regex->match("abcdef", $match)); - $this->assertEqual($match, "abc"); - $this->assertTrue($regex->match("AAABCabcdef", $match)); - $this->assertEqual($match, "ABC"); - $this->assertFalse($regex->match("Hello", $match)); - } - - function testPatternLabels() { - $regex = new ParallelRegex(false); - $regex->addPattern("abc", "letter"); - $regex->addPattern("123", "number"); - $this->assertIdentical($regex->match("abcdef", $match), "letter"); - $this->assertEqual($match, "abc"); - $this->assertIdentical($regex->match("0123456789", $match), "number"); - $this->assertEqual($match, "123"); - } -} - -class TestOfStateStack extends UnitTestCase { - - function testStartState() { - $stack = new SimpleStateStack("one"); - $this->assertEqual($stack->getCurrent(), "one"); - } - - function testExhaustion() { - $stack = new SimpleStateStack("one"); - $this->assertFalse($stack->leave()); - } - - function testStateMoves() { - $stack = new SimpleStateStack("one"); - $stack->enter("two"); - $this->assertEqual($stack->getCurrent(), "two"); - $stack->enter("three"); - $this->assertEqual($stack->getCurrent(), "three"); - $this->assertTrue($stack->leave()); - $this->assertEqual($stack->getCurrent(), "two"); - $stack->enter("third"); - $this->assertEqual($stack->getCurrent(), "third"); - $this->assertTrue($stack->leave()); - $this->assertTrue($stack->leave()); - $this->assertEqual($stack->getCurrent(), "one"); - } -} - -class TestParser { - - function accept() { - } - - function a() { - } - - function b() { - } -} -Mock::generate('TestParser'); - -class TestOfLexer extends UnitTestCase { - - function testEmptyPage() { - $handler = new MockTestParser(); - $handler->expectNever("accept"); - $handler->setReturnValue("accept", true); - $handler->expectNever("accept"); - $handler->setReturnValue("accept", true); - $lexer = new SimpleLexer($handler); - $lexer->addPattern("a+"); - $this->assertTrue($lexer->parse("")); - } - - function testSinglePattern() { - $handler = new MockTestParser(); - $handler->expectAt(0, "accept", array("aaa", LEXER_MATCHED)); - $handler->expectAt(1, "accept", array("x", LEXER_UNMATCHED)); - $handler->expectAt(2, "accept", array("a", LEXER_MATCHED)); - $handler->expectAt(3, "accept", array("yyy", LEXER_UNMATCHED)); - $handler->expectAt(4, "accept", array("a", LEXER_MATCHED)); - $handler->expectAt(5, "accept", array("x", LEXER_UNMATCHED)); - $handler->expectAt(6, "accept", array("aaa", LEXER_MATCHED)); - $handler->expectAt(7, "accept", array("z", LEXER_UNMATCHED)); - $handler->expectCallCount("accept", 8); - $handler->setReturnValue("accept", true); - $lexer = new SimpleLexer($handler); - $lexer->addPattern("a+"); - $this->assertTrue($lexer->parse("aaaxayyyaxaaaz")); - } - - function testMultiplePattern() { - $handler = new MockTestParser(); - $target = array("a", "b", "a", "bb", "x", "b", "a", "xxxxxx", "a", "x"); - for ($i = 0; $i < count($target); $i++) { - $handler->expectAt($i, "accept", array($target[$i], '*')); - } - $handler->expectCallCount("accept", count($target)); - $handler->setReturnValue("accept", true); - $lexer = new SimpleLexer($handler); - $lexer->addPattern("a+"); - $lexer->addPattern("b+"); - $this->assertTrue($lexer->parse("ababbxbaxxxxxxax")); - } -} - -class TestOfLexerModes extends UnitTestCase { - - function testIsolatedPattern() { - $handler = new MockTestParser(); - $handler->expectAt(0, "a", array("a", LEXER_MATCHED)); - $handler->expectAt(1, "a", array("b", LEXER_UNMATCHED)); - $handler->expectAt(2, "a", array("aa", LEXER_MATCHED)); - $handler->expectAt(3, "a", array("bxb", LEXER_UNMATCHED)); - $handler->expectAt(4, "a", array("aaa", LEXER_MATCHED)); - $handler->expectAt(5, "a", array("x", LEXER_UNMATCHED)); - $handler->expectAt(6, "a", array("aaaa", LEXER_MATCHED)); - $handler->expectAt(7, "a", array("x", LEXER_UNMATCHED)); - $handler->expectCallCount("a", 8); - $handler->setReturnValue("a", true); - $lexer = new SimpleLexer($handler, "a"); - $lexer->addPattern("a+", "a"); - $lexer->addPattern("b+", "b"); - $this->assertTrue($lexer->parse("abaabxbaaaxaaaax")); - } - - function testModeChange() { - $handler = new MockTestParser(); - $handler->expectAt(0, "a", array("a", LEXER_MATCHED)); - $handler->expectAt(1, "a", array("b", LEXER_UNMATCHED)); - $handler->expectAt(2, "a", array("aa", LEXER_MATCHED)); - $handler->expectAt(3, "a", array("b", LEXER_UNMATCHED)); - $handler->expectAt(4, "a", array("aaa", LEXER_MATCHED)); - $handler->expectAt(0, "b", array(":", LEXER_ENTER)); - $handler->expectAt(1, "b", array("a", LEXER_UNMATCHED)); - $handler->expectAt(2, "b", array("b", LEXER_MATCHED)); - $handler->expectAt(3, "b", array("a", LEXER_UNMATCHED)); - $handler->expectAt(4, "b", array("bb", LEXER_MATCHED)); - $handler->expectAt(5, "b", array("a", LEXER_UNMATCHED)); - $handler->expectAt(6, "b", array("bbb", LEXER_MATCHED)); - $handler->expectAt(7, "b", array("a", LEXER_UNMATCHED)); - $handler->expectCallCount("a", 5); - $handler->expectCallCount("b", 8); - $handler->setReturnValue("a", true); - $handler->setReturnValue("b", true); - $lexer = new SimpleLexer($handler, "a"); - $lexer->addPattern("a+", "a"); - $lexer->addEntryPattern(":", "a", "b"); - $lexer->addPattern("b+", "b"); - $this->assertTrue($lexer->parse("abaabaaa:ababbabbba")); - } - - function testNesting() { - $handler = new MockTestParser(); - $handler->setReturnValue("a", true); - $handler->setReturnValue("b", true); - $handler->expectAt(0, "a", array("aa", LEXER_MATCHED)); - $handler->expectAt(1, "a", array("b", LEXER_UNMATCHED)); - $handler->expectAt(2, "a", array("aa", LEXER_MATCHED)); - $handler->expectAt(3, "a", array("b", LEXER_UNMATCHED)); - $handler->expectAt(0, "b", array("(", LEXER_ENTER)); - $handler->expectAt(1, "b", array("bb", LEXER_MATCHED)); - $handler->expectAt(2, "b", array("a", LEXER_UNMATCHED)); - $handler->expectAt(3, "b", array("bb", LEXER_MATCHED)); - $handler->expectAt(4, "b", array(")", LEXER_EXIT)); - $handler->expectAt(4, "a", array("aa", LEXER_MATCHED)); - $handler->expectAt(5, "a", array("b", LEXER_UNMATCHED)); - $handler->expectCallCount("a", 6); - $handler->expectCallCount("b", 5); - $lexer = new SimpleLexer($handler, "a"); - $lexer->addPattern("a+", "a"); - $lexer->addEntryPattern("(", "a", "b"); - $lexer->addPattern("b+", "b"); - $lexer->addExitPattern(")", "b"); - $this->assertTrue($lexer->parse("aabaab(bbabb)aab")); - } - - function testSingular() { - $handler = new MockTestParser(); - $handler->setReturnValue("a", true); - $handler->setReturnValue("b", true); - $handler->expectAt(0, "a", array("aa", LEXER_MATCHED)); - $handler->expectAt(1, "a", array("aa", LEXER_MATCHED)); - $handler->expectAt(2, "a", array("xx", LEXER_UNMATCHED)); - $handler->expectAt(3, "a", array("xx", LEXER_UNMATCHED)); - $handler->expectAt(0, "b", array("b", LEXER_SPECIAL)); - $handler->expectAt(1, "b", array("bbb", LEXER_SPECIAL)); - $handler->expectCallCount("a", 4); - $handler->expectCallCount("b", 2); - $lexer = new SimpleLexer($handler, "a"); - $lexer->addPattern("a+", "a"); - $lexer->addSpecialPattern("b+", "a", "b"); - $this->assertTrue($lexer->parse("aabaaxxbbbxx")); - } - - function testUnwindTooFar() { - $handler = new MockTestParser(); - $handler->setReturnValue("a", true); - $handler->expectAt(0, "a", array("aa", LEXER_MATCHED)); - $handler->expectAt(1, "a", array(")", LEXER_EXIT)); - $handler->expectCallCount("a", 2); - $lexer = new SimpleLexer($handler, "a"); - $lexer->addPattern("a+", "a"); - $lexer->addExitPattern(")", "a"); - $this->assertFalse($lexer->parse("aa)aa")); - } -} - -class TestOfLexerHandlers extends UnitTestCase { - - function testModeMapping() { - $handler = new MockTestParser(); - $handler->setReturnValue("a", true); - $handler->expectAt(0, "a", array("aa", LEXER_MATCHED)); - $handler->expectAt(1, "a", array("(", LEXER_ENTER)); - $handler->expectAt(2, "a", array("bb", LEXER_MATCHED)); - $handler->expectAt(3, "a", array("a", LEXER_UNMATCHED)); - $handler->expectAt(4, "a", array("bb", LEXER_MATCHED)); - $handler->expectAt(5, "a", array(")", LEXER_EXIT)); - $handler->expectAt(6, "a", array("b", LEXER_UNMATCHED)); - $handler->expectCallCount("a", 7); - $lexer = new SimpleLexer($handler, "mode_a"); - $lexer->addPattern("a+", "mode_a"); - $lexer->addEntryPattern("(", "mode_a", "mode_b"); - $lexer->addPattern("b+", "mode_b"); - $lexer->addExitPattern(")", "mode_b"); - $lexer->mapHandler("mode_a", "a"); - $lexer->mapHandler("mode_b", "a"); - $this->assertTrue($lexer->parse("aa(bbabb)b")); - } -} - -class TestOfSimpleHtmlLexer extends UnitTestCase { - - function &createParser() { - $parser = new MockSimpleHtmlSaxParser(); - $parser->setReturnValue('acceptStartToken', true); - $parser->setReturnValue('acceptEndToken', true); - $parser->setReturnValue('acceptAttributeToken', true); - $parser->setReturnValue('acceptEntityToken', true); - $parser->setReturnValue('acceptTextToken', true); - $parser->setReturnValue('ignore', true); - return $parser; - } - - function testNoContent() { - $parser = &$this->createParser(); - $parser->expectNever('acceptStartToken'); - $parser->expectNever('acceptEndToken'); - $parser->expectNever('acceptAttributeToken'); - $parser->expectNever('acceptEntityToken'); - $parser->expectNever('acceptTextToken'); - $lexer = new SimpleHtmlLexer($parser); - $this->assertTrue($lexer->parse('')); - } - - function testUninteresting() { - $parser = &$this->createParser(); - $parser->expectOnce('acceptTextToken', array('', '*')); - $lexer = new SimpleHtmlLexer($parser); - $this->assertTrue($lexer->parse('')); - } - - function testSkipCss() { - $parser = &$this->createParser(); - $parser->expectNever('acceptTextToken'); - $parser->expectAtLeastOnce('ignore'); - $lexer = new SimpleHtmlLexer($parser); - $this->assertTrue($lexer->parse("")); - } - - function testSkipJavaScript() { - $parser = &$this->createParser(); - $parser->expectNever('acceptTextToken'); - $parser->expectAtLeastOnce('ignore'); - $lexer = new SimpleHtmlLexer($parser); - $this->assertTrue($lexer->parse("")); - } - - function testSkipHtmlComments() { - $parser = &$this->createParser(); - $parser->expectNever('acceptTextToken'); - $parser->expectAtLeastOnce('ignore'); - $lexer = new SimpleHtmlLexer($parser); - $this->assertTrue($lexer->parse("")); - } - - function testTagWithNoAttributes() { - $parser = &$this->createParser(); - $parser->expectAt(0, 'acceptStartToken', array('expectAt(1, 'acceptStartToken', array('>', '*')); - $parser->expectCallCount('acceptStartToken', 2); - $parser->expectOnce('acceptTextToken', array('Hello', '*')); - $parser->expectOnce('acceptEndToken', array('', '*')); - $lexer = new SimpleHtmlLexer($parser); - $this->assertTrue($lexer->parse('Hello')); - } - - function testTagWithAttributes() { - $parser = &$this->createParser(); - $parser->expectOnce('acceptTextToken', array('label', '*')); - $parser->expectAt(0, 'acceptStartToken', array('expectAt(1, 'acceptStartToken', array('href', '*')); - $parser->expectAt(2, 'acceptStartToken', array('>', '*')); - $parser->expectCallCount('acceptStartToken', 3); - $parser->expectAt(0, 'acceptAttributeToken', array('= "', '*')); - $parser->expectAt(1, 'acceptAttributeToken', array('here.html', '*')); - $parser->expectAt(2, 'acceptAttributeToken', array('"', '*')); - $parser->expectCallCount('acceptAttributeToken', 3); - $parser->expectOnce('acceptEndToken', array('', '*')); - $lexer = new SimpleHtmlLexer($parser); - $this->assertTrue($lexer->parse('label')); - } -} - -class TestOfHtmlSaxParser extends UnitTestCase { - - function &createListener() { - $listener = new MockSimpleSaxListener(); - $listener->setReturnValue('startElement', true); - $listener->setReturnValue('addContent', true); - $listener->setReturnValue('endElement', true); - return $listener; - } - - function testFramesetTag() { - $listener = &$this->createListener(); - $listener->expectOnce('startElement', array('frameset', array())); - $listener->expectOnce('addContent', array('Frames')); - $listener->expectOnce('endElement', array('frameset')); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse('Frames')); - } - - function testTagWithUnquotedAttributes() { - $listener = &$this->createListener(); - $listener->expectOnce( - 'startElement', - array('input', array('name' => 'a.b.c', 'value' => 'd'))); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse('')); - } - - function testTagInsideContent() { - $listener = &$this->createListener(); - $listener->expectOnce('startElement', array('a', array())); - $listener->expectAt(0, 'addContent', array('')); - $listener->expectAt(1, 'addContent', array('')); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse('')); - } - - function testTagWithInternalContent() { - $listener = &$this->createListener(); - $listener->expectOnce('startElement', array('a', array())); - $listener->expectOnce('addContent', array('label')); - $listener->expectOnce('endElement', array('a')); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse('label')); - } - - function testLinkAddress() { - $listener = &$this->createListener(); - $listener->expectOnce('startElement', array('a', array('href' => 'here.html'))); - $listener->expectOnce('addContent', array('label')); - $listener->expectOnce('endElement', array('a')); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse("label")); - } - - function testEncodedAttribute() { - $listener = &$this->createListener(); - $listener->expectOnce('startElement', array('a', array('href' => 'here&there.html'))); - $listener->expectOnce('addContent', array('label')); - $listener->expectOnce('endElement', array('a')); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse("label")); - } - - function testTagWithId() { - $listener = &$this->createListener(); - $listener->expectOnce('startElement', array('a', array('id' => '0'))); - $listener->expectOnce('addContent', array('label')); - $listener->expectOnce('endElement', array('a')); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse('label')); - } - - function testTagWithEmptyAttributes() { - $listener = &$this->createListener(); - $listener->expectOnce( - 'startElement', - array('option', array('value' => '', 'selected' => ''))); - $listener->expectOnce('addContent', array('label')); - $listener->expectOnce('endElement', array('option')); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse('')); - } - - function testComplexTagWithLotsOfCaseVariations() { - $listener = &$this->createListener(); - $listener->expectOnce( - 'startElement', - array('a', array('href' => 'here.html', 'style' => "'cool'"))); - $listener->expectOnce('addContent', array('label')); - $listener->expectOnce('endElement', array('a')); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse('label')); - } - - function testXhtmlSelfClosingTag() { - $listener = &$this->createListener(); - $listener->expectOnce( - 'startElement', - array('input', array('type' => 'submit', 'name' => 'N', 'value' => 'V'))); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse('')); - } - - function testNestedFrameInFrameset() { - $listener = &$this->createListener(); - $listener->expectAt(0, 'startElement', array('frameset', array())); - $listener->expectAt(1, 'startElement', array('frame', array('src' => 'frame.html'))); - $listener->expectCallCount('startElement', 2); - $listener->expectOnce('addContent', array('Hello')); - $listener->expectOnce('endElement', array('frameset')); - $parser = new SimpleHtmlSaxParser($listener); - $this->assertTrue($parser->parse( - 'Hello')); - } -} - -class TestOfTextExtraction extends UnitTestCase { - - function testImageSuppressionWhileKeepingParagraphsAndAltText() { - $this->assertEqual( - SimpleHtmlSaxParser::normalise('

    some text

    bar'), - 'some text bar'); - - } - - function testSpaceNormalisation() { - $this->assertEqual( - SimpleHtmlSaxParser::normalise("\nOne\tTwo \nThree\t"), - 'One Two Three'); - } - - function testMultilinesCommentSuppression() { - $this->assertEqual( - SimpleHtmlSaxParser::normalise(''), - ''); - } - - function testCommentSuppression() { - $this->assertEqual( - SimpleHtmlSaxParser::normalise(''), - ''); - } - - function testJavascriptSuppression() { - $this->assertEqual( - SimpleHtmlSaxParser::normalise(''), - ''); - $this->assertEqual( - SimpleHtmlSaxParser::normalise(''), - ''); - $this->assertEqual( - SimpleHtmlSaxParser::normalise(''), - ''); - } - - function testTagSuppression() { - $this->assertEqual( - SimpleHtmlSaxParser::normalise('Hello'), - 'Hello'); - } - - function testAdjoiningTagSuppression() { - $this->assertEqual( - SimpleHtmlSaxParser::normalise('HelloGoodbye'), - 'HelloGoodbye'); - } - - function testExtractImageAltTextWithDifferentQuotes() { - $this->assertEqual( - SimpleHtmlSaxParser::normalise('One\'Two\'Three'), - 'One Two Three'); - } - - function testExtractImageAltTextMultipleTimes() { - $this->assertEqual( - SimpleHtmlSaxParser::normalise('OneTwoThree'), - 'One Two Three'); - } - - function testHtmlEntityTranslation() { - $this->assertEqual( - SimpleHtmlSaxParser::normalise('<>"&''), - '<>"&\''); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/reflection_php4_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/reflection_php4_test.php deleted file mode 100644 index 8ee211b9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/reflection_php4_test.php +++ /dev/null @@ -1,61 +0,0 @@ -assertTrue($reflection->classOrInterfaceExists()); - $this->assertTrue($reflection->classOrInterfaceExistsSansAutoload()); - } - - function testClassNonExistence() { - $reflection = new SimpleReflection('UnknownThing'); - $this->assertFalse($reflection->classOrInterfaceExists()); - $this->assertFalse($reflection->classOrInterfaceExistsSansAutoload()); - } - - function testDetectionOfInterfacesAlwaysFalse() { - $reflection = new SimpleReflection('AnyOldThing'); - $this->assertFalse($reflection->isAbstract()); - $this->assertFalse($reflection->isInterface()); - } - - function testFindingParentClass() { - $reflection = new SimpleReflection('AnyOldChildThing'); - $this->assertEqual(strtolower($reflection->getParent()), 'anyoldthing'); - } - - function testMethodsListFromClass() { - $reflection = new SimpleReflection('AnyOldThing'); - $methods = $reflection->getMethods(); - $this->assertEqualIgnoringCase($methods[0], 'aMethod'); - } - - function testNoInterfacesForPHP4() { - $reflection = new SimpleReflection('AnyOldThing'); - $this->assertEqual( - $reflection->getInterfaces(), - array()); - } - - function testMostGeneralPossibleSignature() { - $reflection = new SimpleReflection('AnyOldThing'); - $this->assertEqualIgnoringCase( - $reflection->getSignature('aMethod'), - 'function &aMethod()'); - } - - function assertEqualIgnoringCase($a, $b) { - return $this->assertEqual(strtolower($a), strtolower($b)); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/reflection_php5_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/reflection_php5_test.php deleted file mode 100644 index d9f46e6d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/reflection_php5_test.php +++ /dev/null @@ -1,263 +0,0 @@ -assertTrue($reflection->classOrInterfaceExists()); - $this->assertTrue($reflection->classOrInterfaceExistsSansAutoload()); - $this->assertFalse($reflection->isAbstract()); - $this->assertFalse($reflection->isInterface()); - } - - function testClassNonExistence() { - $reflection = new SimpleReflection('UnknownThing'); - $this->assertFalse($reflection->classOrInterfaceExists()); - $this->assertFalse($reflection->classOrInterfaceExistsSansAutoload()); - } - - function testDetectionOfAbstractClass() { - $reflection = new SimpleReflection('AnyOldClass'); - $this->assertTrue($reflection->isAbstract()); - } - - function testDetectionOfFinalMethods() { - $reflection = new SimpleReflection('AnyOldClass'); - $this->assertFalse($reflection->hasFinal()); - $reflection = new SimpleReflection('AnyOldLeafClassWithAFinal'); - $this->assertTrue($reflection->hasFinal()); - } - - function testFindingParentClass() { - $reflection = new SimpleReflection('AnyOldSubclass'); - $this->assertEqual($reflection->getParent(), 'AnyOldImplementation'); - } - - function testInterfaceExistence() { - $reflection = new SimpleReflection('AnyOldInterface'); - $this->assertTrue($reflection->classOrInterfaceExists()); - $this->assertTrue($reflection->classOrInterfaceExistsSansAutoload()); - $this->assertTrue($reflection->isInterface()); - } - - function testMethodsListFromClass() { - $reflection = new SimpleReflection('AnyOldClass'); - $this->assertIdentical($reflection->getMethods(), array('aMethod')); - } - - function testMethodsListFromInterface() { - $reflection = new SimpleReflection('AnyOldInterface'); - $this->assertIdentical($reflection->getMethods(), array('aMethod')); - $this->assertIdentical($reflection->getInterfaceMethods(), array('aMethod')); - } - - function testMethodsComeFromDescendentInterfacesASWell() { - $reflection = new SimpleReflection('AnyDescendentInterface'); - $this->assertIdentical($reflection->getMethods(), array('aMethod')); - } - - function testCanSeparateInterfaceMethodsFromOthers() { - $reflection = new SimpleReflection('AnyOldImplementation'); - $this->assertIdentical($reflection->getMethods(), array('aMethod', 'extraMethod')); - $this->assertIdentical($reflection->getInterfaceMethods(), array('aMethod')); - } - - function testMethodsComeFromDescendentInterfacesInAbstractClass() { - $reflection = new SimpleReflection('AnyAbstractImplementation'); - $this->assertIdentical($reflection->getMethods(), array('aMethod')); - } - - function testInterfaceHasOnlyItselfToImplement() { - $reflection = new SimpleReflection('AnyOldInterface'); - $this->assertEqual( - $reflection->getInterfaces(), - array('AnyOldInterface')); - } - - function testInterfacesListedForClass() { - $reflection = new SimpleReflection('AnyOldImplementation'); - $this->assertEqual( - $reflection->getInterfaces(), - array('AnyOldInterface')); - } - - function testInterfacesListedForSubclass() { - $reflection = new SimpleReflection('AnyOldSubclass'); - $this->assertEqual( - $reflection->getInterfaces(), - array('AnyOldInterface')); - } - - function testNoParameterCreationWhenNoInterface() { - $reflection = new SimpleReflection('AnyOldArgumentClass'); - $function = $reflection->getSignature('aMethod'); - if (version_compare(phpversion(), '5.0.2', '<=')) { - $this->assertEqual('function amethod($argument)', strtolower($function)); - } else { - $this->assertEqual('function aMethod($argument)', $function); - } - } - - function testParameterCreationWithoutTypeHinting() { - $reflection = new SimpleReflection('AnyOldArgumentImplementation'); - $function = $reflection->getSignature('aMethod'); - if (version_compare(phpversion(), '5.0.2', '<=')) { - $this->assertEqual('function amethod(AnyOldInterface $argument)', $function); - } else { - $this->assertEqual('function aMethod(AnyOldInterface $argument)', $function); - } - } - - function testParameterCreationForTypeHinting() { - $reflection = new SimpleReflection('AnyOldTypeHintedClass'); - $function = $reflection->getSignature('aMethod'); - if (version_compare(phpversion(), '5.0.2', '<=')) { - $this->assertEqual('function amethod(AnyOldInterface $argument)', $function); - } else { - $this->assertEqual('function aMethod(AnyOldInterface $argument)', $function); - } - } - - function testIssetFunctionSignature() { - $reflection = new SimpleReflection('AnyOldOverloadedClass'); - $function = $reflection->getSignature('__isset'); - $this->assertEqual('function __isset($key)', $function); - } - - function testUnsetFunctionSignature() { - $reflection = new SimpleReflection('AnyOldOverloadedClass'); - $function = $reflection->getSignature('__unset'); - $this->assertEqual('function __unset($key)', $function); - } - - function testProperlyReflectsTheFinalInterfaceWhenObjectImplementsAnExtendedInterface() { - $reflection = new SimpleReflection('AnyDescendentImplementation'); - $interfaces = $reflection->getInterfaces(); - $this->assertEqual(1, count($interfaces)); - $this->assertEqual('AnyDescendentInterface', array_shift($interfaces)); - } - - function testCreatingSignatureForAbstractMethod() { - $reflection = new SimpleReflection('AnotherOldAbstractClass'); - $this->assertEqual($reflection->getSignature('aMethod'), 'function aMethod(AnyOldInterface $argument)'); - } - - function testCanProperlyGenerateStaticMethodSignatures() { - $reflection = new SimpleReflection('AnyOldClassWithStaticMethods'); - $this->assertEqual('static function aStatic()', $reflection->getSignature('aStatic')); - $this->assertEqual( - 'static function aStaticWithParameters($arg1, $arg2)', - $reflection->getSignature('aStaticWithParameters') - ); - } -} - -class TestOfReflectionWithTypeHints extends UnitTestCase { - function skip() { - $this->skipIf(version_compare(phpversion(), '5.1.0', '<'), 'Reflection with type hints only tested for PHP 5.1.0 and above'); - } - - function testParameterCreationForTypeHintingWithArray() { - eval('interface AnyOldArrayTypeHintedInterface { - function amethod(array $argument); - } - class AnyOldArrayTypeHintedClass implements AnyOldArrayTypeHintedInterface { - function amethod(array $argument) {} - }'); - $reflection = new SimpleReflection('AnyOldArrayTypeHintedClass'); - $function = $reflection->getSignature('amethod'); - $this->assertEqual('function amethod(array $argument)', $function); - } -} - -class TestOfAbstractsWithAbstractMethods extends UnitTestCase { - function testCanProperlyGenerateAbstractMethods() { - $reflection = new SimpleReflection('AnyOldAbstractClassWithAbstractMethods'); - $this->assertEqual( - 'function anAbstract()', - $reflection->getSignature('anAbstract') - ); - $this->assertEqual( - 'function anAbstractWithParameter($foo)', - $reflection->getSignature('anAbstractWithParameter') - ); - $this->assertEqual( - 'function anAbstractWithMultipleParameters($foo, $bar)', - $reflection->getSignature('anAbstractWithMultipleParameters') - ); - } -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/remote_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/remote_test.php deleted file mode 100644 index 5f3f96a4..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/remote_test.php +++ /dev/null @@ -1,19 +0,0 @@ -add(new RemoteTestCase($test_url . '?xml=yes', $test_url . '?xml=yes&dry=yes')); -if (SimpleReporter::inCli()) { - exit ($test->run(new TextReporter()) ? 0 : 1); -} -$test->run(new HtmlReporter()); diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/shell_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/shell_test.php deleted file mode 100644 index d1d769a6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/shell_test.php +++ /dev/null @@ -1,38 +0,0 @@ -assertIdentical($shell->execute('echo Hello'), 0); - $this->assertPattern('/Hello/', $shell->getOutput()); - } - - function testBadCommand() { - $shell = new SimpleShell(); - $this->assertNotEqual($ret = $shell->execute('blurgh! 2>&1'), 0); - } -} - -class TestOfShellTesterAndShell extends ShellTestCase { - - function testEcho() { - $this->assertTrue($this->execute('echo Hello')); - $this->assertExitCode(0); - $this->assertoutput('Hello'); - } - - function testFileExistence() { - $this->assertFileExists(dirname(__FILE__) . '/all_tests.php'); - $this->assertFileNotExists('wibble'); - } - - function testFilePatterns() { - $this->assertFilePattern('/all[_ ]tests/i', dirname(__FILE__) . '/all_tests.php'); - $this->assertNoFilePattern('/sputnik/i', dirname(__FILE__) . '/all_tests.php'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/shell_tester_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/shell_tester_test.php deleted file mode 100644 index b12c602a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/shell_tester_test.php +++ /dev/null @@ -1,42 +0,0 @@ -mock_shell; - } - - function testGenericEquality() { - $this->assertEqual('a', 'a'); - $this->assertNotEqual('a', 'A'); - } - - function testExitCode() { - $this->mock_shell = new MockSimpleShell(); - $this->mock_shell->setReturnValue('execute', 0); - $this->mock_shell->expectOnce('execute', array('ls')); - $this->assertTrue($this->execute('ls')); - $this->assertExitCode(0); - } - - function testOutput() { - $this->mock_shell = new MockSimpleShell(); - $this->mock_shell->setReturnValue('execute', 0); - $this->mock_shell->setReturnValue('getOutput', "Line 1\nLine 2\n"); - $this->assertOutput("Line 1\nLine 2\n"); - } - - function testOutputPatterns() { - $this->mock_shell = new MockSimpleShell(); - $this->mock_shell->setReturnValue('execute', 0); - $this->mock_shell->setReturnValue('getOutput', "Line 1\nLine 2\n"); - $this->assertOutputPattern('/line/i'); - $this->assertNoOutputPattern('/line 2/'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/simpletest_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/simpletest_test.php deleted file mode 100644 index daa65c6f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/simpletest_test.php +++ /dev/null @@ -1,58 +0,0 @@ -fail('Should be ignored'); - } -} - -class ShouldNeverBeRunEither extends ShouldNeverBeRun { } - -class TestOfStackTrace extends UnitTestCase { - - function testCanFindAssertInTrace() { - $trace = new SimpleStackTrace(array('assert')); - $this->assertEqual( - $trace->traceMethod(array(array( - 'file' => '/my_test.php', - 'line' => 24, - 'function' => 'assertSomething'))), - ' at [/my_test.php line 24]'); - } -} - -class DummyResource { } - -class TestOfContext extends UnitTestCase { - - function testCurrentContextIsUnique() { - $this->assertSame( - SimpleTest::getContext(), - SimpleTest::getContext()); - } - - function testContextHoldsCurrentTestCase() { - $context = SimpleTest::getContext(); - $this->assertSame($this, $context->getTest()); - } - - function testResourceIsSingleInstanceWithContext() { - $context = new SimpleTestContext(); - $this->assertSame( - $context->get('DummyResource'), - $context->get('DummyResource')); - } - - function testClearingContextResetsResources() { - $context = new SimpleTestContext(); - $resource = $context->get('DummyResource'); - $context->clear(); - $this->assertClone($resource, $context->get('DummyResource')); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/.htaccess b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/.htaccess deleted file mode 100644 index fb3bc551..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -DirectoryIndex index.php -Options Indexes diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/1.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/1.html deleted file mode 100644 index cdc3e0b7..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - 1 - - 2 - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/2.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/2.html deleted file mode 100644 index fea1449e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - 2 - - 3 - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/3.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/3.html deleted file mode 100644 index fdd13802..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/3.html +++ /dev/null @@ -1,6 +0,0 @@ - - 3 - - 1 - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_change_redirect.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_change_redirect.php deleted file mode 100644 index 096c45db..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_change_redirect.php +++ /dev/null @@ -1,6 +0,0 @@ - - Redirection test - This is a test page for the SimpleTest PHP unit tester - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/base_link.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/base_link.html deleted file mode 100644 index fc4266b7..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/base_link.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Links and base tag - - - - Back to test pages - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/form.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/form.html deleted file mode 100644 index dacb1bbe..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/form.html +++ /dev/null @@ -1,50 +0,0 @@ - - - Test of form submission - - - -
    - -
    - -
    - -
    - -
    - -
    - -
    - Radio G - - - - -
    - -
    - -
    - -
    - -
    - -
    - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/frameset.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/frameset.html deleted file mode 100644 index 8ff7b751..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/frameset.html +++ /dev/null @@ -1,9 +0,0 @@ - - Frameset for testing of SimpleTest - - - - This content is for no frames only. - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/frameset_with_base_tag.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/frameset_with_base_tag.html deleted file mode 100644 index fb284e10..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/frameset_with_base_tag.html +++ /dev/null @@ -1,12 +0,0 @@ - - - Frameset for testing of SimpleTest - - - - - - This content is for no frames only. - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/page_1.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/page_1.html deleted file mode 100644 index bb53264a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/page_1.html +++ /dev/null @@ -1,7 +0,0 @@ - - Page 1 - - This is page 1. - To page 2 - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/page_2.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/page_2.html deleted file mode 100644 index 715aaf4d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/page_2.html +++ /dev/null @@ -1,7 +0,0 @@ - - Page 2 - - This is page 2. - To page 1 - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/relative_link.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/relative_link.html deleted file mode 100644 index ac1edbe1..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/base_tag/relative_link.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Links without base tag - - - Back to test pages - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/cookie_based_counter.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/cookie_based_counter.php deleted file mode 100644 index 239b9c86..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/cookie_based_counter.php +++ /dev/null @@ -1,10 +0,0 @@ - - Cookie Counter - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/counting_frameset.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/counting_frameset.html deleted file mode 100644 index eec24c4d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/counting_frameset.html +++ /dev/null @@ -1,10 +0,0 @@ - - Frameset for testing of SimpleTest - - - - - <body>This content is for no frames only.</body> - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/double_base_change_redirect.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/double_base_change_redirect.php deleted file mode 100644 index a76172f6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/double_base_change_redirect.php +++ /dev/null @@ -1,6 +0,0 @@ - - Redirection test - This is a test page for the SimpleTest PHP unit tester - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/file.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/file.html deleted file mode 100644 index cc41aee1..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/file.html +++ /dev/null @@ -1,6 +0,0 @@ - - Link to SimpleTest - - Link to SimpleTest - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form.html deleted file mode 100644 index cc1138e4..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form.html +++ /dev/null @@ -1,47 +0,0 @@ - - Test of form submission - -
    - -
    - -
    - -
    - -
    - -
    - -
    - Radio G - - - - -
    - -
    - -
    - -
    - -
    - -
    - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_data_encoded_form.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_data_encoded_form.html deleted file mode 100644 index a0f6b011..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_data_encoded_form.html +++ /dev/null @@ -1,47 +0,0 @@ - - Test of form submission - -
    - -
    - -
    - -
    - -
    - -
    - -
    - Radio G - - - - -
    - -
    - -
    - -
    - -
    - -
    - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_array_based_inputs.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_array_based_inputs.php deleted file mode 100644 index e4d6f82c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_array_based_inputs.php +++ /dev/null @@ -1,15 +0,0 @@ - - - Form with quoted values - - -

    - QUERY_STRING : -

    -
    - - - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_false_defaults.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_false_defaults.html deleted file mode 100644 index 9f3fb381..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_false_defaults.html +++ /dev/null @@ -1,40 +0,0 @@ - - Test of form submission - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - Radio I - - - - -
    - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_mixed_post_and_get.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_mixed_post_and_get.html deleted file mode 100644 index cf8e551d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_mixed_post_and_get.html +++ /dev/null @@ -1,15 +0,0 @@ - - Test of form submission - -
    - -
    - -
    -
    - -
    - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_quoted_values.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_quoted_values.php deleted file mode 100644 index 2d552d76..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_quoted_values.php +++ /dev/null @@ -1,14 +0,0 @@ - - - Form with quoted values - - -

    - QUERY_STRING : -

    -
    - - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_radio_buttons.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_radio_buttons.html deleted file mode 100644 index ba999699..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_radio_buttons.html +++ /dev/null @@ -1,10 +0,0 @@ - - -
    - 1 - 2 - 3 - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_tricky_defaults.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_tricky_defaults.html deleted file mode 100644 index e028ceb6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_tricky_defaults.html +++ /dev/null @@ -1,35 +0,0 @@ - - Test of form submission - -
    - -
    - -
    - -
    - -
    - -
    - -
    - Radio I - - - - - -
    - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_unnamed_submit.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_unnamed_submit.html deleted file mode 100644 index 08801f1a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_with_unnamed_submit.html +++ /dev/null @@ -1,12 +0,0 @@ - - Test of form submission - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_without_action.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_without_action.php deleted file mode 100644 index e17bcf56..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/form_without_action.php +++ /dev/null @@ -1,11 +0,0 @@ - - Test of form submission - -

    _GET : []

    -

    _POST : []

    -
    - - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frame_a.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frame_a.html deleted file mode 100644 index 6eeb8022..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frame_a.html +++ /dev/null @@ -1,6 +0,0 @@ - - A - - This is frame A
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frame_b.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frame_b.html deleted file mode 100644 index 19576142..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frame_b.html +++ /dev/null @@ -1,6 +0,0 @@ - - B - - This is frame B
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frame_links.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frame_links.html deleted file mode 100644 index 864960ac..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frame_links.html +++ /dev/null @@ -1,7 +0,0 @@ - - 1 - - Set one to 2 - Exit the frameset - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frameset.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frameset.html deleted file mode 100644 index fb9217a7..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/frameset.html +++ /dev/null @@ -1,10 +0,0 @@ - - Frameset for testing of SimpleTest - - - - - <body>This content is for no frames only.</body> - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/front_controller_style/a_page.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/front_controller_style/a_page.php deleted file mode 100644 index 5f28c24a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/front_controller_style/a_page.php +++ /dev/null @@ -1,37 +0,0 @@ - 0) { - $_COOKIE = $HTTP_COOKIE_VARS; - } - if (count($HTTP_GET_VARS) > 0) { - $_GET = $HTTP_GET_VARS; - } - if (count($HTTP_POST_VARS) > 0) { - $_POST = $HTTP_POST_VARS; - } - if (! isset($_SERVER)) { - $_SERVER = $HTTP_SERVER_VARS; - } - global $HTTP_RAW_POST_DATA; - - require_once('../page_request.php'); -?> - Simple test page with links - - Simple test page with links -

    Links

    - Self - No page - Bare action - Empty query - Empty link - Current directory - Down one -

    Forms

    -
    -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/front_controller_style/index.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/front_controller_style/index.php deleted file mode 100644 index 3f2dd082..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/front_controller_style/index.php +++ /dev/null @@ -1,44 +0,0 @@ - 0) { - $_COOKIE = $HTTP_COOKIE_VARS; - } - if (count($HTTP_GET_VARS) > 0) { - $_GET = $HTTP_GET_VARS; - } - if (count($HTTP_POST_VARS) > 0) { - $_POST = $HTTP_POST_VARS; - } - if (! isset($_SERVER)) { - $_SERVER = $HTTP_SERVER_VARS; - } - global $HTTP_RAW_POST_DATA; - - require_once('../page_request.php'); -?> - Simple test front controller - - Simple test front controller -

    Links

    - Index - No page - Bare action - Empty query - Empty link - Down one - -

    Forms

    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/front_controller_style/show_request.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/front_controller_style/show_request.php deleted file mode 100644 index f38473ae..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/front_controller_style/show_request.php +++ /dev/null @@ -1,49 +0,0 @@ -

    Request

    -
    -
    Protocol version
    -
    Request method
    -
    Accept header
    -
    -

    Cookies

    - 0) { - foreach ($_COOKIE as $key => $value) { - print "$key=[$value]
    \n"; - } - } - ?> -

    Raw GET data

    - -

    GET data

    - 0) { - foreach ($get as $key => $value) { - if (is_array($value)) { - $value = implode(', ', $value); - } - print "$key=[$value]
    \n"; - } - } - ?> -

    Raw POST data

    - -
    -

    POST data

    - 0) { - foreach ($_POST as $key => $value) { - print $key . "=["; - if (is_array($value)) { - print implode(', ', $value); - } else { - print $value; - } - print "]
    \n"; - } - } - ?> diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/link_confirm.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/link_confirm.php deleted file mode 100644 index 373ba359..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/link_confirm.php +++ /dev/null @@ -1,18 +0,0 @@ - - SimpleTest testing links - -

    - A target for the - SimpleTest - test suite. -

    - - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/local_redirect.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/local_redirect.php deleted file mode 100644 index 85357111..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/local_redirect.php +++ /dev/null @@ -1,6 +0,0 @@ - - Redirection test - This is a test page for the SimpleTest PHP unit tester - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/messy_frameset.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/messy_frameset.html deleted file mode 100644 index 83649777..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/messy_frameset.html +++ /dev/null @@ -1,16 +0,0 @@ - - Frameset for testing of SimpleTest - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/multiple_widget_form.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/multiple_widget_form.html deleted file mode 100644 index ec26b11d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/multiple_widget_form.html +++ /dev/null @@ -1,59 +0,0 @@ - - Test of form submission - -
    - - -
    - Multiple checkboxes B - - - - -
    - PHP compatible - -
    - - -
    - - -
    - -
    - - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/nested_frameset.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/nested_frameset.html deleted file mode 100644 index 0227e5ce..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/nested_frameset.html +++ /dev/null @@ -1,10 +0,0 @@ - - Nested frameset for testing of SimpleTest - - - - - <body>This content is for no frames only.</body> - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/network_confirm.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/network_confirm.php deleted file mode 100644 index 034ac3fd..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/network_confirm.php +++ /dev/null @@ -1,84 +0,0 @@ - 0) { - $_COOKIE = $HTTP_COOKIE_VARS; - } - if (count($HTTP_GET_VARS) > 0) { - $_GET = $HTTP_GET_VARS; - } - if (count($HTTP_POST_VARS) > 0) { - $_POST = $HTTP_POST_VARS; - } - if (! isset($_SERVER)) { - $_SERVER = $HTTP_SERVER_VARS; - } - global $HTTP_RAW_POST_DATA; - - require_once('page_request.php'); -?> - Simple test target file - - A target for the SimpleTest test suite. -

    Request

    -
    -
    Protocol version
    -
    Request method
    -
    Accept header
    -
    -

    Cookies

    - 0) { - foreach ($_COOKIE as $key => $value) { - print htmlentities($key) . "=[" . htmlentities($value) . "]
    \n"; - } - } - ?> -

    Raw GET data

    - -

    GET data

    - 0) { - foreach ($get as $key => $value) { - if (is_array($value)) { - $value = implode(', ', $value); - } - print htmlentities($key) . "=[" . htmlentities($value) . "]
    \n"; - } - } - ?> -

    Dump of $_GET data

    - '; - print_r($_GET); - print '

  • '; - ?> -

    Raw POST data

    - -
    -

    POST data

    - $value) { - $html .= htmlentities($key) . "=["; - if (is_array($value)) { - $html .= show_array_value($value); - } else { - $html .= htmlentities($value); - } - $html .= "]"; - } - - return $html; - } - - if (count($_POST) > 0) { - echo show_array_value($_POST)."
    \n"; - } - ?> - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/one_page_frameset.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/one_page_frameset.html deleted file mode 100644 index c3e0ac75..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/one_page_frameset.html +++ /dev/null @@ -1,9 +0,0 @@ - - Frameset for testing of SimpleTest - - - - <body>This content is for no frames only.</body> - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/page_request.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/page_request.php deleted file mode 100644 index 19ae9789..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/page_request.php +++ /dev/null @@ -1,60 +0,0 @@ -parsed = array(); - foreach ($statements as $statement) { - if (strpos($statement, '=') === false) { - continue; - } - $this->parseStatement($statement); - } - } - - private function parseStatement($statement) { - list($key, $value) = explode('=', $statement); - $key = urldecode($key); - if (preg_match('/(.*)\[\]$/', $key, $matches)) { - $key = $matches[1]; - if (! isset($this->parsed[$key])) { - $this->parsed[$key] = array(); - } - $this->addValue($key, $value); - } elseif (isset($this->parsed[$key])) { - $this->addValue($key, $value); - } else { - $this->setValue($key, $value); - } - } - - private function addValue($key, $value) { - if (! is_array($this->parsed[$key])) { - $this->parsed[$key] = array($this->parsed[$key]); - } - $this->parsed[$key][] = urldecode($value); - } - - private function setValue($key, $value) { - $this->parsed[$key] = urldecode($value); - } - - function getAll() { - return $this->parsed; - } - - function get() { - $request = &new PageRequest($_SERVER['QUERY_STRING']); - return $request->getAll(); - } - - function post() { - global $HTTP_RAW_POST_DATA; - $request = &new PageRequest($HTTP_RAW_POST_DATA); - return $request->getAll(); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/path/base_change_redirect.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/path/base_change_redirect.php deleted file mode 100644 index 08636a9c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/path/base_change_redirect.php +++ /dev/null @@ -1,6 +0,0 @@ - - Redirection test - This is a test page for the SimpleTest PHP unit tester - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/path/network_confirm.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/path/network_confirm.php deleted file mode 100644 index a9fb3182..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/path/network_confirm.php +++ /dev/null @@ -1,71 +0,0 @@ - 0) { - $_COOKIE = $HTTP_COOKIE_VARS; - } - if (count($HTTP_GET_VARS) > 0) { - $_GET = $HTTP_GET_VARS; - } - if (count($HTTP_POST_VARS) > 0) { - $_POST = $HTTP_POST_VARS; - } - if (!isset($_SERVER)) { - $_SERVER = $HTTP_SERVER_VARS; - } - global $HTTP_RAW_POST_DATA; - - require_once('../page_request.php'); -?> - Simple test target file in folder - - A target for the SimpleTest test suite. -

    Request

    -
    -
    Protocol version
    -
    Request method
    -
    Accept header
    -
    -

    Cookies

    - 0) { - foreach ($_COOKIE as $key => $value) { - print $key . "=[" . $value . "]
    \n"; - } - } - ?> -

    Raw GET data

    - -

    GET data

    - 0) { - foreach ($get as $key => $value) { - if (is_array($value)) { - $value = implode(', ', $value); - } - print $key . "=[" . $value . "]
    \n"; - } - } - ?> -

    Raw POST data

    - -
    -

    POST data

    - 0) { - foreach ($_POST as $key => $value) { - print $key . "=["; - if (is_array($value)) { - print implode(', ', $value); - } else { - print $value; - } - print "]
    \n"; - } - } - ?> - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/path/show_cookies.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/path/show_cookies.php deleted file mode 100644 index 1135b048..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/path/show_cookies.php +++ /dev/null @@ -1,18 +0,0 @@ - 0) { - $_COOKIE = $HTTP_COOKIE_VARS; - } -?> - Simple test target file - - A target for the SimpleTest test suite that displays cookies. -

    Cookies

    - 0) { - foreach ($_COOKIE as $key => $value) { - print $key . "=" . $value . ";"; - } - } - ?> - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/.htaccess b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/.htaccess deleted file mode 100644 index 7e89c370..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/.htaccess +++ /dev/null @@ -1,5 +0,0 @@ -AuthName "Test of basic authentication" -AuthType Basic -AuthUserFile /home/marcus/projects/lastcraft/www/test/protected/.htpasswd -require valid-user - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/.htpasswd b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/.htpasswd deleted file mode 100644 index f40e1f23..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/.htpasswd +++ /dev/null @@ -1 +0,0 @@ -test:wOGY3sAo.zsek diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/1.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/1.html deleted file mode 100644 index cdc3e0b7..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - 1 - - 2 - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/2.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/2.html deleted file mode 100644 index fea1449e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - 2 - - 3 - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/3.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/3.html deleted file mode 100644 index fdd13802..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/3.html +++ /dev/null @@ -1,6 +0,0 @@ - - 3 - - 1 - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/htaccess b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/htaccess deleted file mode 100644 index 866def10..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/htaccess +++ /dev/null @@ -1,4 +0,0 @@ -AuthName "SimpleTest basic authentication" -AuthType Basic -AuthUserFile /web/guide/lastcraft/public_html/test/protected/.htpasswd -require valid-user diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/local_redirect.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/local_redirect.php deleted file mode 100644 index 85357111..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/local_redirect.php +++ /dev/null @@ -1,6 +0,0 @@ - - Redirection test - This is a test page for the SimpleTest PHP unit tester - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/network_confirm.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/network_confirm.php deleted file mode 100644 index e0f8a6e4..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/protected/network_confirm.php +++ /dev/null @@ -1,71 +0,0 @@ - 0) { - $_COOKIE = $HTTP_COOKIE_VARS; - } - if (count($HTTP_GET_VARS) > 0) { - $_GET = $HTTP_GET_VARS; - } - if (count($HTTP_POST_VARS) > 0) { - $_POST = $HTTP_POST_VARS; - } - if (!isset($_SERVER)) { - $_SERVER = $HTTP_SERVER_VARS; - } - global $HTTP_RAW_POST_DATA; - - require_once('../page_request.php'); -?> - Simple test target file - - A target for the SimpleTest test suite. -

    Request

    -
    -
    Protocol version
    -
    Request method
    -
    Accept header
    -
    -

    Cookies

    - 0) { - foreach ($_COOKIE as $key => $value) { - print $key . "=[" . $value . "]
    \n"; - } - } - ?> -

    Raw GET data

    - -

    GET data

    - 0) { - foreach ($get as $key => $value) { - if (is_array($value)) { - $value = implode(', ', $value); - } - print $key . "=[" . $value . "]
    \n"; - } - } - ?> -

    Raw POST data

    - -
    -

    POST data

    - 0) { - foreach ($_POST as $key => $value) { - print $key . "=["; - if (is_array($value)) { - print implode(', ', $value); - } else { - print $value; - } - print "]
    \n"; - } - } - ?> - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/redirect.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/redirect.php deleted file mode 100644 index 14c23fa8..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/redirect.php +++ /dev/null @@ -1,6 +0,0 @@ - - Redirection test - This is a test page for the SimpleTest PHP unit tester - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/savant_style_form.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/savant_style_form.html deleted file mode 100644 index f510555c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/savant_style_form.html +++ /dev/null @@ -1,20 +0,0 @@ - - Test of form submission with Savant style controls - -
    - Checkbox A - - - -
    - Radio B - - - - - -
    - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/search.png b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/search.png deleted file mode 100644 index 342d1d3b..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/search.png and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/self.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/self.php deleted file mode 100644 index 2759f64f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/self.php +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/self_form.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/self_form.php deleted file mode 100644 index 7428d2b5..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/self_form.php +++ /dev/null @@ -1,21 +0,0 @@ - 0) { - $_GET = $HTTP_GET_VARS; - } -?> - Test of form self submission - -
    - -
    -

    []

    -

    []

    -

    []

    -
    - - - -
    - - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/set_cookies.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/set_cookies.php deleted file mode 100644 index a4a8a269..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/set_cookies.php +++ /dev/null @@ -1,20 +0,0 @@ - - SimpleTest testing links - -

    - A target for the - SimpleTest - test suite. - All it does is set some cookies which you can see - here. -

    - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/slow_page.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/slow_page.php deleted file mode 100644 index c1aef316..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/slow_page.php +++ /dev/null @@ -1,6 +0,0 @@ - - Slow page - This page takes at least two seconds - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/temp/.stop_cvs_removing_temp b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/temp/.stop_cvs_removing_temp deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/timestamp.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/timestamp.php deleted file mode 100644 index 3117c486..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/timestamp.php +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/upload_form.html b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/upload_form.html deleted file mode 100644 index 23d3a874..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/upload_form.html +++ /dev/null @@ -1,11 +0,0 @@ - - Test of file upload - -
    - -
    -
    - -
    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/upload_handler.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/upload_handler.php deleted file mode 100644 index 7680b88b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/site/upload_handler.php +++ /dev/null @@ -1,18 +0,0 @@ - - Test of file upload - -

    -

    - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/socket_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/socket_test.php deleted file mode 100644 index 729adda4..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/socket_test.php +++ /dev/null @@ -1,25 +0,0 @@ -assertFalse($error->isError()); - $error->setError('Ouch'); - $this->assertTrue($error->isError()); - $this->assertEqual($error->getError(), 'Ouch'); - } - - function testClearingError() { - $error = new SimpleStickyError(); - $error->setError('Ouch'); - $this->assertTrue($error->isError()); - $error->clearError(); - $this->assertFalse($error->isError()); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/collector/collectable.1 b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/collector/collectable.1 deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/collector/collectable.2 b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/collector/collectable.2 deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/empty_test_file.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/empty_test_file.php deleted file mode 100644 index 31e3f7be..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/empty_test_file.php +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/latin1_sample b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/latin1_sample deleted file mode 100644 index 19035257..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/latin1_sample +++ /dev/null @@ -1 +0,0 @@ -@櫻 \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/spl_examples.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/spl_examples.php deleted file mode 100644 index 45add356..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/spl_examples.php +++ /dev/null @@ -1,15 +0,0 @@ - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/supplementary_upload_sample.txt b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/supplementary_upload_sample.txt deleted file mode 100644 index d8aa9e81..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/supplementary_upload_sample.txt +++ /dev/null @@ -1 +0,0 @@ -Some more text content \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/test1.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/test1.php deleted file mode 100644 index b414586d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/test1.php +++ /dev/null @@ -1,7 +0,0 @@ -assertEqual(3,1+2, "pass1"); - } -} -?> diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/upload_sample.txt b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/upload_sample.txt deleted file mode 100644 index ec98d7c5..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/support/upload_sample.txt +++ /dev/null @@ -1 +0,0 @@ -Sample for testing file upload \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/tag_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/tag_test.php deleted file mode 100644 index 5e8a377f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/tag_test.php +++ /dev/null @@ -1,554 +0,0 @@ - '1', 'b' => '')); - $this->assertEqual($tag->getTagName(), 'title'); - $this->assertIdentical($tag->getAttribute('a'), '1'); - $this->assertIdentical($tag->getAttribute('b'), ''); - $this->assertIdentical($tag->getAttribute('c'), false); - $this->assertIdentical($tag->getContent(), ''); - } - - function testTitleContent() { - $tag = new SimpleTitleTag(array()); - $this->assertTrue($tag->expectEndTag()); - $tag->addContent('Hello'); - $tag->addContent('World'); - $this->assertEqual($tag->getText(), 'HelloWorld'); - } - - function testMessyTitleContent() { - $tag = new SimpleTitleTag(array()); - $this->assertTrue($tag->expectEndTag()); - $tag->addContent('Hello'); - $tag->addContent('World'); - $this->assertEqual($tag->getText(), 'HelloWorld'); - } - - function testTagWithNoEnd() { - $tag = new SimpleTextTag(array()); - $this->assertFalse($tag->expectEndTag()); - } - - function testAnchorHref() { - $tag = new SimpleAnchorTag(array('href' => 'http://here/')); - $this->assertEqual($tag->getHref(), 'http://here/'); - - $tag = new SimpleAnchorTag(array('href' => '')); - $this->assertIdentical($tag->getAttribute('href'), ''); - $this->assertIdentical($tag->getHref(), ''); - - $tag = new SimpleAnchorTag(array()); - $this->assertIdentical($tag->getAttribute('href'), false); - $this->assertIdentical($tag->getHref(), ''); - } - - function testIsIdMatchesIdAttribute() { - $tag = new SimpleAnchorTag(array('href' => 'http://here/', 'id' => 7)); - $this->assertIdentical($tag->getAttribute('id'), '7'); - $this->assertTrue($tag->isId(7)); - } -} - -class TestOfWidget extends UnitTestCase { - - function testTextEmptyDefault() { - $tag = new SimpleTextTag(array('type' => 'text')); - $this->assertIdentical($tag->getDefault(), ''); - $this->assertIdentical($tag->getValue(), ''); - } - - function testSettingOfExternalLabel() { - $tag = new SimpleTextTag(array('type' => 'text')); - $tag->setLabel('it'); - $this->assertTrue($tag->isLabel('it')); - } - - function testTextDefault() { - $tag = new SimpleTextTag(array('value' => 'aaa')); - $this->assertEqual($tag->getDefault(), 'aaa'); - $this->assertEqual($tag->getValue(), 'aaa'); - } - - function testSettingTextValue() { - $tag = new SimpleTextTag(array('value' => 'aaa')); - $tag->setValue('bbb'); - $this->assertEqual($tag->getValue(), 'bbb'); - $tag->resetValue(); - $this->assertEqual($tag->getValue(), 'aaa'); - } - - function testFailToSetHiddenValue() { - $tag = new SimpleTextTag(array('value' => 'aaa', 'type' => 'hidden')); - $this->assertFalse($tag->setValue('bbb')); - $this->assertEqual($tag->getValue(), 'aaa'); - } - - function testSubmitDefaults() { - $tag = new SimpleSubmitTag(array('type' => 'submit')); - $this->assertIdentical($tag->getName(), false); - $this->assertEqual($tag->getValue(), 'Submit'); - $this->assertFalse($tag->setValue('Cannot set this')); - $this->assertEqual($tag->getValue(), 'Submit'); - $this->assertEqual($tag->getLabel(), 'Submit'); - - $encoding = new MockSimpleMultipartEncoding(); - $encoding->expectNever('add'); - $tag->write($encoding); - } - - function testPopulatedSubmit() { - $tag = new SimpleSubmitTag( - array('type' => 'submit', 'name' => 's', 'value' => 'Ok!')); - $this->assertEqual($tag->getName(), 's'); - $this->assertEqual($tag->getValue(), 'Ok!'); - $this->assertEqual($tag->getLabel(), 'Ok!'); - - $encoding = new MockSimpleMultipartEncoding(); - $encoding->expectOnce('add', array('s', 'Ok!')); - $tag->write($encoding); - } - - function testImageSubmit() { - $tag = new SimpleImageSubmitTag( - array('type' => 'image', 'name' => 's', 'alt' => 'Label')); - $this->assertEqual($tag->getName(), 's'); - $this->assertEqual($tag->getLabel(), 'Label'); - - $encoding = new MockSimpleMultipartEncoding(); - $encoding->expectAt(0, 'add', array('s.x', 20)); - $encoding->expectAt(1, 'add', array('s.y', 30)); - $tag->write($encoding, 20, 30); - } - - function testImageSubmitTitlePreferredOverAltForLabel() { - $tag = new SimpleImageSubmitTag( - array('type' => 'image', 'name' => 's', 'alt' => 'Label', 'title' => 'Title')); - $this->assertEqual($tag->getLabel(), 'Title'); - } - - function testButton() { - $tag = new SimpleButtonTag( - array('type' => 'submit', 'name' => 's', 'value' => 'do')); - $tag->addContent('I am a button'); - $this->assertEqual($tag->getName(), 's'); - $this->assertEqual($tag->getValue(), 'do'); - $this->assertEqual($tag->getLabel(), 'I am a button'); - - $encoding = new MockSimpleMultipartEncoding(); - $encoding->expectOnce('add', array('s', 'do')); - $tag->write($encoding); - } -} - -class TestOfTextArea extends UnitTestCase { - - function testDefault() { - $tag = new SimpleTextAreaTag(array('name' => 'a')); - $tag->addContent('Some text'); - $this->assertEqual($tag->getName(), 'a'); - $this->assertEqual($tag->getDefault(), 'Some text'); - } - - function testWrapping() { - $tag = new SimpleTextAreaTag(array('cols' => '10', 'wrap' => 'physical')); - $tag->addContent("Lot's of text that should be wrapped"); - $this->assertEqual( - $tag->getDefault(), - "Lot's of\r\ntext that\r\nshould be\r\nwrapped"); - $tag->setValue("New long text\r\nwith two lines"); - $this->assertEqual( - $tag->getValue(), - "New long\r\ntext\r\nwith two\r\nlines"); - } - - function testWrappingRemovesLeadingcariageReturn() { - $tag = new SimpleTextAreaTag(array('cols' => '20', 'wrap' => 'physical')); - $tag->addContent("\rStuff"); - $this->assertEqual($tag->getDefault(), 'Stuff'); - $tag->setValue("\nNew stuff\n"); - $this->assertEqual($tag->getValue(), "New stuff\r\n"); - } - - function testBreaksAreNewlineAndCarriageReturn() { - $tag = new SimpleTextAreaTag(array('cols' => '10')); - $tag->addContent("Some\nText\rwith\r\nbreaks"); - $this->assertEqual($tag->getValue(), "Some\r\nText\r\nwith\r\nbreaks"); - } -} - -class TestOfCheckbox extends UnitTestCase { - - function testCanSetCheckboxToNamedValueWithBooleanTrue() { - $tag = new SimpleCheckboxTag(array('name' => 'a', 'value' => 'A')); - $this->assertEqual($tag->getValue(), false); - $tag->setValue(true); - $this->assertIdentical($tag->getValue(), 'A'); - } -} - -class TestOfSelection extends UnitTestCase { - - function testEmpty() { - $tag = new SimpleSelectionTag(array('name' => 'a')); - $this->assertIdentical($tag->getValue(), ''); - } - - function testSingle() { - $tag = new SimpleSelectionTag(array('name' => 'a')); - $option = new SimpleOptionTag(array()); - $option->addContent('AAA'); - $tag->addTag($option); - $this->assertEqual($tag->getValue(), 'AAA'); - } - - function testSingleDefault() { - $tag = new SimpleSelectionTag(array('name' => 'a')); - $option = new SimpleOptionTag(array('selected' => '')); - $option->addContent('AAA'); - $tag->addTag($option); - $this->assertEqual($tag->getValue(), 'AAA'); - } - - function testSingleMappedDefault() { - $tag = new SimpleSelectionTag(array('name' => 'a')); - $option = new SimpleOptionTag(array('selected' => '', 'value' => 'aaa')); - $option->addContent('AAA'); - $tag->addTag($option); - $this->assertEqual($tag->getValue(), 'aaa'); - } - - function testStartsWithDefault() { - $tag = new SimpleSelectionTag(array('name' => 'a')); - $a = new SimpleOptionTag(array()); - $a->addContent('AAA'); - $tag->addTag($a); - $b = new SimpleOptionTag(array('selected' => '')); - $b->addContent('BBB'); - $tag->addTag($b); - $c = new SimpleOptionTag(array()); - $c->addContent('CCC'); - $tag->addTag($c); - $this->assertEqual($tag->getValue(), 'BBB'); - } - - function testSettingOption() { - $tag = new SimpleSelectionTag(array('name' => 'a')); - $a = new SimpleOptionTag(array()); - $a->addContent('AAA'); - $tag->addTag($a); - $b = new SimpleOptionTag(array('selected' => '')); - $b->addContent('BBB'); - $tag->addTag($b); - $c = new SimpleOptionTag(array()); - $c->addContent('CCC'); - $tag->setValue('AAA'); - $this->assertEqual($tag->getValue(), 'AAA'); - } - - function testSettingMappedOption() { - $tag = new SimpleSelectionTag(array('name' => 'a')); - $a = new SimpleOptionTag(array('value' => 'aaa')); - $a->addContent('AAA'); - $tag->addTag($a); - $b = new SimpleOptionTag(array('value' => 'bbb', 'selected' => '')); - $b->addContent('BBB'); - $tag->addTag($b); - $c = new SimpleOptionTag(array('value' => 'ccc')); - $c->addContent('CCC'); - $tag->addTag($c); - $tag->setValue('AAA'); - $this->assertEqual($tag->getValue(), 'aaa'); - $tag->setValue('ccc'); - $this->assertEqual($tag->getValue(), 'ccc'); - } - - function testSelectionDespiteSpuriousWhitespace() { - $tag = new SimpleSelectionTag(array('name' => 'a')); - $a = new SimpleOptionTag(array()); - $a->addContent(' AAA '); - $tag->addTag($a); - $b = new SimpleOptionTag(array('selected' => '')); - $b->addContent(' BBB '); - $tag->addTag($b); - $c = new SimpleOptionTag(array()); - $c->addContent(' CCC '); - $tag->addTag($c); - $this->assertEqual($tag->getValue(), ' BBB '); - $tag->setValue('AAA'); - $this->assertEqual($tag->getValue(), ' AAA '); - } - - function testFailToSetIllegalOption() { - $tag = new SimpleSelectionTag(array('name' => 'a')); - $a = new SimpleOptionTag(array()); - $a->addContent('AAA'); - $tag->addTag($a); - $b = new SimpleOptionTag(array('selected' => '')); - $b->addContent('BBB'); - $tag->addTag($b); - $c = new SimpleOptionTag(array()); - $c->addContent('CCC'); - $tag->addTag($c); - $this->assertFalse($tag->setValue('Not present')); - $this->assertEqual($tag->getValue(), 'BBB'); - } - - function testNastyOptionValuesThatLookLikeFalse() { - $tag = new SimpleSelectionTag(array('name' => 'a')); - $a = new SimpleOptionTag(array('value' => '1')); - $a->addContent('One'); - $tag->addTag($a); - $b = new SimpleOptionTag(array('value' => '0')); - $b->addContent('Zero'); - $tag->addTag($b); - $this->assertIdentical($tag->getValue(), '1'); - $tag->setValue('Zero'); - $this->assertIdentical($tag->getValue(), '0'); - } - - function testBlankOption() { - $tag = new SimpleSelectionTag(array('name' => 'A')); - $a = new SimpleOptionTag(array()); - $tag->addTag($a); - $b = new SimpleOptionTag(array()); - $b->addContent('b'); - $tag->addTag($b); - $this->assertIdentical($tag->getValue(), ''); - $tag->setValue('b'); - $this->assertIdentical($tag->getValue(), 'b'); - $tag->setValue(''); - $this->assertIdentical($tag->getValue(), ''); - } - - function testMultipleDefaultWithNoSelections() { - $tag = new MultipleSelectionTag(array('name' => 'a', 'multiple' => '')); - $a = new SimpleOptionTag(array()); - $a->addContent('AAA'); - $tag->addTag($a); - $b = new SimpleOptionTag(array()); - $b->addContent('BBB'); - $tag->addTag($b); - $this->assertIdentical($tag->getDefault(), array()); - $this->assertIdentical($tag->getValue(), array()); - } - - function testMultipleDefaultWithSelections() { - $tag = new MultipleSelectionTag(array('name' => 'a', 'multiple' => '')); - $a = new SimpleOptionTag(array('selected' => '')); - $a->addContent('AAA'); - $tag->addTag($a); - $b = new SimpleOptionTag(array('selected' => '')); - $b->addContent('BBB'); - $tag->addTag($b); - $this->assertIdentical($tag->getDefault(), array('AAA', 'BBB')); - $this->assertIdentical($tag->getValue(), array('AAA', 'BBB')); - } - - function testSettingMultiple() { - $tag = new MultipleSelectionTag(array('name' => 'a', 'multiple' => '')); - $a = new SimpleOptionTag(array('selected' => '')); - $a->addContent('AAA'); - $tag->addTag($a); - $b = new SimpleOptionTag(array()); - $b->addContent('BBB'); - $tag->addTag($b); - $c = new SimpleOptionTag(array('selected' => '', 'value' => 'ccc')); - $c->addContent('CCC'); - $tag->addTag($c); - $this->assertIdentical($tag->getDefault(), array('AAA', 'ccc')); - $this->assertTrue($tag->setValue(array('BBB', 'ccc'))); - $this->assertIdentical($tag->getValue(), array('BBB', 'ccc')); - $this->assertTrue($tag->setValue(array())); - $this->assertIdentical($tag->getValue(), array()); - } - - function testFailToSetIllegalOptionsInMultiple() { - $tag = new MultipleSelectionTag(array('name' => 'a', 'multiple' => '')); - $a = new SimpleOptionTag(array('selected' => '')); - $a->addContent('AAA'); - $tag->addTag($a); - $b = new SimpleOptionTag(array()); - $b->addContent('BBB'); - $tag->addTag($b); - $this->assertFalse($tag->setValue(array('CCC'))); - $this->assertTrue($tag->setValue(array('AAA', 'BBB'))); - $this->assertFalse($tag->setValue(array('AAA', 'CCC'))); - } -} - -class TestOfRadioGroup extends UnitTestCase { - - function testEmptyGroup() { - $group = new SimpleRadioGroup(); - $this->assertIdentical($group->getDefault(), false); - $this->assertIdentical($group->getValue(), false); - $this->assertFalse($group->setValue('a')); - } - - function testReadingSingleButtonGroup() { - $group = new SimpleRadioGroup(); - $group->addWidget(new SimpleRadioButtonTag( - array('value' => 'A', 'checked' => ''))); - $this->assertIdentical($group->getDefault(), 'A'); - $this->assertIdentical($group->getValue(), 'A'); - } - - function testReadingMultipleButtonGroup() { - $group = new SimpleRadioGroup(); - $group->addWidget(new SimpleRadioButtonTag( - array('value' => 'A'))); - $group->addWidget(new SimpleRadioButtonTag( - array('value' => 'B', 'checked' => ''))); - $this->assertIdentical($group->getDefault(), 'B'); - $this->assertIdentical($group->getValue(), 'B'); - } - - function testFailToSetUnlistedValue() { - $group = new SimpleRadioGroup(); - $group->addWidget(new SimpleRadioButtonTag(array('value' => 'z'))); - $this->assertFalse($group->setValue('a')); - $this->assertIdentical($group->getValue(), false); - } - - function testSettingNewValueClearsTheOldOne() { - $group = new SimpleRadioGroup(); - $group->addWidget(new SimpleRadioButtonTag( - array('value' => 'A'))); - $group->addWidget(new SimpleRadioButtonTag( - array('value' => 'B', 'checked' => ''))); - $this->assertTrue($group->setValue('A')); - $this->assertIdentical($group->getValue(), 'A'); - } - - function testIsIdMatchesAnyWidgetInSet() { - $group = new SimpleRadioGroup(); - $group->addWidget(new SimpleRadioButtonTag( - array('value' => 'A', 'id' => 'i1'))); - $group->addWidget(new SimpleRadioButtonTag( - array('value' => 'B', 'id' => 'i2'))); - $this->assertFalse($group->isId('i0')); - $this->assertTrue($group->isId('i1')); - $this->assertTrue($group->isId('i2')); - } - - function testIsLabelMatchesAnyWidgetInSet() { - $group = new SimpleRadioGroup(); - $button1 = new SimpleRadioButtonTag(array('value' => 'A')); - $button1->setLabel('one'); - $group->addWidget($button1); - $button2 = new SimpleRadioButtonTag(array('value' => 'B')); - $button2->setLabel('two'); - $group->addWidget($button2); - $this->assertFalse($group->isLabel('three')); - $this->assertTrue($group->isLabel('one')); - $this->assertTrue($group->isLabel('two')); - } -} - -class TestOfTagGroup extends UnitTestCase { - - function testReadingMultipleCheckboxGroup() { - $group = new SimpleCheckboxGroup(); - $group->addWidget(new SimpleCheckboxTag(array('value' => 'A'))); - $group->addWidget(new SimpleCheckboxTag( - array('value' => 'B', 'checked' => ''))); - $this->assertIdentical($group->getDefault(), 'B'); - $this->assertIdentical($group->getValue(), 'B'); - } - - function testReadingMultipleUncheckedItems() { - $group = new SimpleCheckboxGroup(); - $group->addWidget(new SimpleCheckboxTag(array('value' => 'A'))); - $group->addWidget(new SimpleCheckboxTag(array('value' => 'B'))); - $this->assertIdentical($group->getDefault(), false); - $this->assertIdentical($group->getValue(), false); - } - - function testReadingMultipleCheckedItems() { - $group = new SimpleCheckboxGroup(); - $group->addWidget(new SimpleCheckboxTag( - array('value' => 'A', 'checked' => ''))); - $group->addWidget(new SimpleCheckboxTag( - array('value' => 'B', 'checked' => ''))); - $this->assertIdentical($group->getDefault(), array('A', 'B')); - $this->assertIdentical($group->getValue(), array('A', 'B')); - } - - function testSettingSingleValue() { - $group = new SimpleCheckboxGroup(); - $group->addWidget(new SimpleCheckboxTag(array('value' => 'A'))); - $group->addWidget(new SimpleCheckboxTag(array('value' => 'B'))); - $this->assertTrue($group->setValue('A')); - $this->assertIdentical($group->getValue(), 'A'); - $this->assertTrue($group->setValue('B')); - $this->assertIdentical($group->getValue(), 'B'); - } - - function testSettingMultipleValues() { - $group = new SimpleCheckboxGroup(); - $group->addWidget(new SimpleCheckboxTag(array('value' => 'A'))); - $group->addWidget(new SimpleCheckboxTag(array('value' => 'B'))); - $this->assertTrue($group->setValue(array('A', 'B'))); - $this->assertIdentical($group->getValue(), array('A', 'B')); - } - - function testSettingNoValue() { - $group = new SimpleCheckboxGroup(); - $group->addWidget(new SimpleCheckboxTag(array('value' => 'A'))); - $group->addWidget(new SimpleCheckboxTag(array('value' => 'B'))); - $this->assertTrue($group->setValue(false)); - $this->assertIdentical($group->getValue(), false); - } - - function testIsIdMatchesAnyIdInSet() { - $group = new SimpleCheckboxGroup(); - $group->addWidget(new SimpleCheckboxTag(array('id' => 1, 'value' => 'A'))); - $group->addWidget(new SimpleCheckboxTag(array('id' => 2, 'value' => 'B'))); - $this->assertFalse($group->isId(0)); - $this->assertTrue($group->isId(1)); - $this->assertTrue($group->isId(2)); - } -} - -class TestOfUploadWidget extends UnitTestCase { - - function testValueIsFilePath() { - $upload = new SimpleUploadTag(array('name' => 'a')); - $upload->setValue(dirname(__FILE__) . '/support/upload_sample.txt'); - $this->assertEqual($upload->getValue(), dirname(__FILE__) . '/support/upload_sample.txt'); - } - - function testSubmitsFileContents() { - $encoding = new MockSimpleMultipartEncoding(); - $encoding->expectOnce('attach', array( - 'a', - 'Sample for testing file upload', - 'upload_sample.txt')); - $upload = new SimpleUploadTag(array('name' => 'a')); - $upload->setValue(dirname(__FILE__) . '/support/upload_sample.txt'); - $upload->write($encoding); - } -} - -class TestOfLabelTag extends UnitTestCase { - - function testLabelShouldHaveAnEndTag() { - $label = new SimpleLabelTag(array()); - $this->assertTrue($label->expectEndTag()); - } - - function testContentIsTextOnly() { - $label = new SimpleLabelTag(array()); - $label->addContent('Here are words'); - $this->assertEqual($label->getText(), 'Here are words'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/unit_tester_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/unit_tester_test.php deleted file mode 100644 index ce9850f0..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/unit_tester_test.php +++ /dev/null @@ -1,61 +0,0 @@ -assertTrue($this->assertTrue(true)); - } - - function testAssertFalseReturnsAssertionAsBoolean() { - $this->assertTrue($this->assertFalse(false)); - } - - function testAssertEqualReturnsAssertionAsBoolean() { - $this->assertTrue($this->assertEqual(5, 5)); - } - - function testAssertIdenticalReturnsAssertionAsBoolean() { - $this->assertTrue($this->assertIdentical(5, 5)); - } - - function testCoreAssertionsDoNotThrowErrors() { - $this->assertIsA($this, 'UnitTestCase'); - $this->assertNotA($this, 'WebTestCase'); - } - - function testReferenceAssertionOnObjects() { - $a = new ReferenceForTesting(); - $b = $a; - $this->assertSame($a, $b); - } - - function testReferenceAssertionOnScalars() { - $a = 25; - $b = &$a; - $this->assertReference($a, $b); - } - - function testCloneOnObjects() { - $a = new ReferenceForTesting(); - $b = new ReferenceForTesting(); - $this->assertClone($a, $b); - } - - function TODO_testCloneOnScalars() { - $a = 25; - $b = 25; - $this->assertClone($a, $b); - } - - function testCopyOnScalars() { - $a = 25; - $b = 25; - $this->assertCopy($a, $b); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/unit_tests.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/unit_tests.php deleted file mode 100644 index 43c36a3b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/unit_tests.php +++ /dev/null @@ -1,46 +0,0 @@ -TestSuite('Unit tests'); - $path = dirname(__FILE__); - $this->addFile($path . '/errors_test.php'); - $this->addFile($path . '/exceptions_test.php'); - $this->addFile($path . '/autorun_test.php'); - $this->addFile($path . '/compatibility_test.php'); - $this->addFile($path . '/simpletest_test.php'); - $this->addFile($path . '/dumper_test.php'); - $this->addFile($path . '/expectation_test.php'); - $this->addFile($path . '/unit_tester_test.php'); - $this->addFile($path . '/reflection_php5_test.php'); - $this->addFile($path . '/mock_objects_test.php'); - $this->addFile($path . '/interfaces_test.php'); - $this->addFile($path . '/collector_test.php'); - $this->addFile($path . '/adapter_test.php'); - $this->addFile($path . '/socket_test.php'); - $this->addFile($path . '/encoding_test.php'); - $this->addFile($path . '/url_test.php'); - $this->addFile($path . '/cookies_test.php'); - $this->addFile($path . '/http_test.php'); - $this->addFile($path . '/authentication_test.php'); - $this->addFile($path . '/user_agent_test.php'); - $this->addFile($path . '/parser_test.php'); - $this->addFile($path . '/tag_test.php'); - $this->addFile($path . '/form_test.php'); - $this->addFile($path . '/page_test.php'); - $this->addFile($path . '/frames_test.php'); - $this->addFile($path . '/browser_test.php'); - $this->addFile($path . '/web_tester_test.php'); - $this->addFile($path . '/shell_tester_test.php'); - $this->addFile($path . '/xml_test.php'); - $this->addFile($path . '/../extensions/testdox/test.php'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/url_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/url_test.php deleted file mode 100644 index 666ab1ef..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/url_test.php +++ /dev/null @@ -1,496 +0,0 @@ -assertEqual($url->getScheme(), ''); - $this->assertEqual($url->getHost(), ''); - $this->assertEqual($url->getScheme('http'), 'http'); - $this->assertEqual($url->getHost('localhost'), 'localhost'); - $this->assertEqual($url->getPath(), ''); - } - - function testBasicParsing() { - $url = new SimpleUrl('https://www.lastcraft.com/test/'); - $this->assertEqual($url->getScheme(), 'https'); - $this->assertEqual($url->getHost(), 'www.lastcraft.com'); - $this->assertEqual($url->getPath(), '/test/'); - } - - function testRelativeUrls() { - $url = new SimpleUrl('../somewhere.php'); - $this->assertEqual($url->getScheme(), false); - $this->assertEqual($url->getHost(), false); - $this->assertEqual($url->getPath(), '../somewhere.php'); - } - - function testParseBareParameter() { - $url = new SimpleUrl('?a'); - $this->assertEqual($url->getPath(), ''); - $this->assertEqual($url->getEncodedRequest(), '?a'); - $url->addRequestParameter('x', 'X'); - $this->assertEqual($url->getEncodedRequest(), '?a=&x=X'); - } - - function testParseEmptyParameter() { - $url = new SimpleUrl('?a='); - $this->assertEqual($url->getPath(), ''); - $this->assertEqual($url->getEncodedRequest(), '?a='); - $url->addRequestParameter('x', 'X'); - $this->assertEqual($url->getEncodedRequest(), '?a=&x=X'); - } - - function testParseParameterPair() { - $url = new SimpleUrl('?a=A'); - $this->assertEqual($url->getPath(), ''); - $this->assertEqual($url->getEncodedRequest(), '?a=A'); - $url->addRequestParameter('x', 'X'); - $this->assertEqual($url->getEncodedRequest(), '?a=A&x=X'); - } - - function testParseMultipleParameters() { - $url = new SimpleUrl('?a=A&b=B'); - $this->assertEqual($url->getEncodedRequest(), '?a=A&b=B'); - $url->addRequestParameter('x', 'X'); - $this->assertEqual($url->getEncodedRequest(), '?a=A&b=B&x=X'); - } - - function testParsingParameterMixture() { - $url = new SimpleUrl('?a=A&b=&c'); - $this->assertEqual($url->getEncodedRequest(), '?a=A&b=&c'); - $url->addRequestParameter('x', 'X'); - $this->assertEqual($url->getEncodedRequest(), '?a=A&b=&c=&x=X'); - } - - function testAddParametersFromScratch() { - $url = new SimpleUrl(''); - $url->addRequestParameter('a', 'A'); - $this->assertEqual($url->getEncodedRequest(), '?a=A'); - $url->addRequestParameter('b', 'B'); - $this->assertEqual($url->getEncodedRequest(), '?a=A&b=B'); - $url->addRequestParameter('a', 'aaa'); - $this->assertEqual($url->getEncodedRequest(), '?a=A&b=B&a=aaa'); - } - - function testClearingParameters() { - $url = new SimpleUrl(''); - $url->addRequestParameter('a', 'A'); - $url->clearRequest(); - $this->assertIdentical($url->getEncodedRequest(), ''); - } - - function testEncodingParameters() { - $url = new SimpleUrl(''); - $url->addRequestParameter('a', '?!"\'#~@[]{}:;<>,./|$%^&*()_+-='); - $this->assertIdentical( - $request = $url->getEncodedRequest(), - '?a=%3F%21%22%27%23%7E%40%5B%5D%7B%7D%3A%3B%3C%3E%2C.%2F%7C%A3%24%25%5E%26%2A%28%29_%2B-%3D'); - } - - function testDecodingParameters() { - $url = new SimpleUrl('?a=%3F%21%22%27%23%7E%40%5B%5D%7B%7D%3A%3B%3C%3E%2C.%2F%7C%A3%24%25%5E%26%2A%28%29_%2B-%3D'); - $this->assertEqual( - $url->getEncodedRequest(), - '?a=' . urlencode('?!"\'#~@[]{}:;<>,./|$%^&*()_+-=')); - } - - function testUrlInQueryDoesNotConfuseParsing() { - $url = new SimpleUrl('wibble/login.php?url=http://www.google.com/moo/'); - $this->assertFalse($url->getScheme()); - $this->assertFalse($url->getHost()); - $this->assertEqual($url->getPath(), 'wibble/login.php'); - $this->assertEqual($url->getEncodedRequest(), '?url=http://www.google.com/moo/'); - } - - function testSettingCordinates() { - $url = new SimpleUrl(''); - $url->setCoordinates('32', '45'); - $this->assertIdentical($url->getX(), 32); - $this->assertIdentical($url->getY(), 45); - $this->assertEqual($url->getEncodedRequest(), ''); - } - - function testParseCordinates() { - $url = new SimpleUrl('?32,45'); - $this->assertIdentical($url->getX(), 32); - $this->assertIdentical($url->getY(), 45); - } - - function testClearingCordinates() { - $url = new SimpleUrl('?32,45'); - $url->setCoordinates(); - $this->assertIdentical($url->getX(), false); - $this->assertIdentical($url->getY(), false); - } - - function testParsingParameterCordinateMixture() { - $url = new SimpleUrl('?a=A&b=&c?32,45'); - $this->assertIdentical($url->getX(), 32); - $this->assertIdentical($url->getY(), 45); - $this->assertEqual($url->getEncodedRequest(), '?a=A&b=&c'); - } - - function testParsingParameterWithBadCordinates() { - $url = new SimpleUrl('?a=A&b=&c?32'); - $this->assertIdentical($url->getX(), false); - $this->assertIdentical($url->getY(), false); - $this->assertEqual($url->getEncodedRequest(), '?a=A&b=&c?32'); - } - - function testPageSplitting() { - $url = new SimpleUrl('./here/../there/somewhere.php'); - $this->assertEqual($url->getPath(), './here/../there/somewhere.php'); - $this->assertEqual($url->getPage(), 'somewhere.php'); - $this->assertEqual($url->getBasePath(), './here/../there/'); - } - - function testAbsolutePathPageSplitting() { - $url = new SimpleUrl("http://host.com/here/there/somewhere.php"); - $this->assertEqual($url->getPath(), "/here/there/somewhere.php"); - $this->assertEqual($url->getPage(), "somewhere.php"); - $this->assertEqual($url->getBasePath(), "/here/there/"); - } - - function testSplittingUrlWithNoPageGivesEmptyPage() { - $url = new SimpleUrl('/here/there/'); - $this->assertEqual($url->getPath(), '/here/there/'); - $this->assertEqual($url->getPage(), ''); - $this->assertEqual($url->getBasePath(), '/here/there/'); - } - - function testPathNormalisation() { - $url = new SimpleUrl(); - $this->assertEqual( - $url->normalisePath('https://host.com/I/am/here/../there/somewhere.php'), - 'https://host.com/I/am/there/somewhere.php'); - } - - // regression test for #1535407 - function testPathNormalisationWithSinglePeriod() { - $url = new SimpleUrl(); - $this->assertEqual( - $url->normalisePath('https://host.com/I/am/here/./../there/somewhere.php'), - 'https://host.com/I/am/there/somewhere.php'); - } - - // regression test for #1852413 - function testHostnameExtractedFromUContainingAtSign() { - $url = new SimpleUrl("http://localhost/name@example.com"); - $this->assertEqual($url->getScheme(), "http"); - $this->assertEqual($url->getUsername(), ""); - $this->assertEqual($url->getPassword(), ""); - $this->assertEqual($url->getHost(), "localhost"); - $this->assertEqual($url->getPath(), "/name@example.com"); - } - - function testHostnameInLocalhost() { - $url = new SimpleUrl("http://localhost/name/example.com"); - $this->assertEqual($url->getScheme(), "http"); - $this->assertEqual($url->getUsername(), ""); - $this->assertEqual($url->getPassword(), ""); - $this->assertEqual($url->getHost(), "localhost"); - $this->assertEqual($url->getPath(), "/name/example.com"); - } - - function testUsernameAndPasswordAreUrlDecoded() { - $url = new SimpleUrl('http://' . urlencode('test@test') . - ':' . urlencode('$!@*&%') . '@www.lastcraft.com'); - $this->assertEqual($url->getUsername(), 'test@test'); - $this->assertEqual($url->getPassword(), '$!@*&%'); - } - - function testBlitz() { - $this->assertUrl( - "https://username:password@www.somewhere.com:243/this/that/here.php?a=1&b=2#anchor", - array("https", "username", "password", "www.somewhere.com", 243, "/this/that/here.php", "com", "?a=1&b=2", "anchor"), - array("a" => "1", "b" => "2")); - $this->assertUrl( - "username:password@www.somewhere.com/this/that/here.php?a=1", - array(false, "username", "password", "www.somewhere.com", false, "/this/that/here.php", "com", "?a=1", false), - array("a" => "1")); - $this->assertUrl( - "username:password@somewhere.com:243?1,2", - array(false, "username", "password", "somewhere.com", 243, "/", "com", "", false), - array(), - array(1, 2)); - $this->assertUrl( - "https://www.somewhere.com", - array("https", false, false, "www.somewhere.com", false, "/", "com", "", false)); - $this->assertUrl( - "username@www.somewhere.com:243#anchor", - array(false, "username", false, "www.somewhere.com", 243, "/", "com", "", "anchor")); - $this->assertUrl( - "/this/that/here.php?a=1&b=2?3,4", - array(false, false, false, false, false, "/this/that/here.php", false, "?a=1&b=2", false), - array("a" => "1", "b" => "2"), - array(3, 4)); - $this->assertUrl( - "username@/here.php?a=1&b=2", - array(false, "username", false, false, false, "/here.php", false, "?a=1&b=2", false), - array("a" => "1", "b" => "2")); - } - - function testAmbiguousHosts() { - $this->assertUrl( - "tigger", - array(false, false, false, false, false, "tigger", false, "", false)); - $this->assertUrl( - "/tigger", - array(false, false, false, false, false, "/tigger", false, "", false)); - $this->assertUrl( - "//tigger", - array(false, false, false, "tigger", false, "/", false, "", false)); - $this->assertUrl( - "//tigger/", - array(false, false, false, "tigger", false, "/", false, "", false)); - $this->assertUrl( - "tigger.com", - array(false, false, false, "tigger.com", false, "/", "com", "", false)); - $this->assertUrl( - "me.net/tigger", - array(false, false, false, "me.net", false, "/tigger", "net", "", false)); - } - - function testAsString() { - $this->assertPreserved('https://www.here.com'); - $this->assertPreserved('http://me:secret@www.here.com'); - $this->assertPreserved('http://here/there'); - $this->assertPreserved('http://here/there?a=A&b=B'); - $this->assertPreserved('http://here/there?a=1&a=2'); - $this->assertPreserved('http://here/there?a=1&a=2?9,8'); - $this->assertPreserved('http://host?a=1&a=2'); - $this->assertPreserved('http://host#stuff'); - $this->assertPreserved('http://me:secret@www.here.com/a/b/c/here.html?a=A?7,6'); - $this->assertPreserved('http://www.here.com/?a=A__b=B'); - $this->assertPreserved('http://www.example.com:8080/'); - } - - function assertUrl($raw, $parts, $params = false, $coords = false) { - if (! is_array($params)) { - $params = array(); - } - $url = new SimpleUrl($raw); - $this->assertIdentical($url->getScheme(), $parts[0], "[$raw] scheme -> %s"); - $this->assertIdentical($url->getUsername(), $parts[1], "[$raw] username -> %s"); - $this->assertIdentical($url->getPassword(), $parts[2], "[$raw] password -> %s"); - $this->assertIdentical($url->getHost(), $parts[3], "[$raw] host -> %s"); - $this->assertIdentical($url->getPort(), $parts[4], "[$raw] port -> %s"); - $this->assertIdentical($url->getPath(), $parts[5], "[$raw] path -> %s"); - $this->assertIdentical($url->getTld(), $parts[6], "[$raw] tld -> %s"); - $this->assertIdentical($url->getEncodedRequest(), $parts[7], "[$raw] encoded -> %s"); - $this->assertIdentical($url->getFragment(), $parts[8], "[$raw] fragment -> %s"); - if ($coords) { - $this->assertIdentical($url->getX(), $coords[0], "[$raw] x -> %s"); - $this->assertIdentical($url->getY(), $coords[1], "[$raw] y -> %s"); - } - } - - function testUrlWithTwoSlashesInPath() { - $url = new SimpleUrl('/article/categoryedit/insert//'); - $this->assertEqual($url->getPath(), '/article/categoryedit/insert//'); - } - - function assertPreserved($string) { - $url = new SimpleUrl($string); - $this->assertEqual($url->asString(), $string); - } -} - -class TestOfAbsoluteUrls extends UnitTestCase { - - function testDirectoriesAfterFilename() { - $string = '../../index.php/foo/bar'; - $url = new SimpleUrl($string); - $this->assertEqual($url->asString(), $string); - - $absolute = $url->makeAbsolute('http://www.domain.com/some/path/'); - $this->assertEqual($absolute->asString(), 'http://www.domain.com/index.php/foo/bar'); - } - - function testMakingAbsolute() { - $url = new SimpleUrl('../there/somewhere.php'); - $this->assertEqual($url->getPath(), '../there/somewhere.php'); - $absolute = $url->makeAbsolute('https://host.com:1234/I/am/here/'); - $this->assertEqual($absolute->getScheme(), 'https'); - $this->assertEqual($absolute->getHost(), 'host.com'); - $this->assertEqual($absolute->getPort(), 1234); - $this->assertEqual($absolute->getPath(), '/I/am/there/somewhere.php'); - } - - function testMakingAnEmptyUrlAbsolute() { - $url = new SimpleUrl(''); - $this->assertEqual($url->getPath(), ''); - $absolute = $url->makeAbsolute('http://host.com/I/am/here/page.html'); - $this->assertEqual($absolute->getScheme(), 'http'); - $this->assertEqual($absolute->getHost(), 'host.com'); - $this->assertEqual($absolute->getPath(), '/I/am/here/page.html'); - } - - function testMakingAnEmptyUrlAbsoluteWithMissingPageName() { - $url = new SimpleUrl(''); - $this->assertEqual($url->getPath(), ''); - $absolute = $url->makeAbsolute('http://host.com/I/am/here/'); - $this->assertEqual($absolute->getScheme(), 'http'); - $this->assertEqual($absolute->getHost(), 'host.com'); - $this->assertEqual($absolute->getPath(), '/I/am/here/'); - } - - function testMakingAShortQueryUrlAbsolute() { - $url = new SimpleUrl('?a#b'); - $this->assertEqual($url->getPath(), ''); - $absolute = $url->makeAbsolute('http://host.com/I/am/here/'); - $this->assertEqual($absolute->getScheme(), 'http'); - $this->assertEqual($absolute->getHost(), 'host.com'); - $this->assertEqual($absolute->getPath(), '/I/am/here/'); - $this->assertEqual($absolute->getEncodedRequest(), '?a'); - $this->assertEqual($absolute->getFragment(), 'b'); - } - - function testMakingADirectoryUrlAbsolute() { - $url = new SimpleUrl('hello/'); - $this->assertEqual($url->getPath(), 'hello/'); - $this->assertEqual($url->getBasePath(), 'hello/'); - $this->assertEqual($url->getPage(), ''); - $absolute = $url->makeAbsolute('http://host.com/I/am/here/page.html'); - $this->assertEqual($absolute->getPath(), '/I/am/here/hello/'); - } - - function testMakingARootUrlAbsolute() { - $url = new SimpleUrl('/'); - $this->assertEqual($url->getPath(), '/'); - $absolute = $url->makeAbsolute('http://host.com/I/am/here/page.html'); - $this->assertEqual($absolute->getPath(), '/'); - } - - function testMakingARootPageUrlAbsolute() { - $url = new SimpleUrl('/here.html'); - $absolute = $url->makeAbsolute('http://host.com/I/am/here/page.html'); - $this->assertEqual($absolute->getPath(), '/here.html'); - } - - function testCarryAuthenticationFromRootPage() { - $url = new SimpleUrl('here.html'); - $absolute = $url->makeAbsolute('http://test:secret@host.com/'); - $this->assertEqual($absolute->getPath(), '/here.html'); - $this->assertEqual($absolute->getUsername(), 'test'); - $this->assertEqual($absolute->getPassword(), 'secret'); - } - - function testMakingCoordinateUrlAbsolute() { - $url = new SimpleUrl('?1,2'); - $this->assertEqual($url->getPath(), ''); - $absolute = $url->makeAbsolute('http://host.com/I/am/here/'); - $this->assertEqual($absolute->getScheme(), 'http'); - $this->assertEqual($absolute->getHost(), 'host.com'); - $this->assertEqual($absolute->getPath(), '/I/am/here/'); - $this->assertEqual($absolute->getX(), 1); - $this->assertEqual($absolute->getY(), 2); - } - - function testMakingAbsoluteAppendedPath() { - $url = new SimpleUrl('./there/somewhere.php'); - $absolute = $url->makeAbsolute('https://host.com/here/'); - $this->assertEqual($absolute->getPath(), '/here/there/somewhere.php'); - } - - function testMakingAbsoluteBadlyFormedAppendedPath() { - $url = new SimpleUrl('there/somewhere.php'); - $absolute = $url->makeAbsolute('https://host.com/here/'); - $this->assertEqual($absolute->getPath(), '/here/there/somewhere.php'); - } - - function testMakingAbsoluteHasNoEffectWhenAlreadyAbsolute() { - $url = new SimpleUrl('https://test:secret@www.lastcraft.com:321/stuff/?a=1#f'); - $absolute = $url->makeAbsolute('http://host.com/here/'); - $this->assertEqual($absolute->getScheme(), 'https'); - $this->assertEqual($absolute->getUsername(), 'test'); - $this->assertEqual($absolute->getPassword(), 'secret'); - $this->assertEqual($absolute->getHost(), 'www.lastcraft.com'); - $this->assertEqual($absolute->getPort(), 321); - $this->assertEqual($absolute->getPath(), '/stuff/'); - $this->assertEqual($absolute->getEncodedRequest(), '?a=1'); - $this->assertEqual($absolute->getFragment(), 'f'); - } - - function testMakingAbsoluteCarriesAuthenticationWhenAlreadyAbsolute() { - $url = new SimpleUrl('https://www.lastcraft.com'); - $absolute = $url->makeAbsolute('http://test:secret@host.com/here/'); - $this->assertEqual($absolute->getHost(), 'www.lastcraft.com'); - $this->assertEqual($absolute->getUsername(), 'test'); - $this->assertEqual($absolute->getPassword(), 'secret'); - } - - function testMakingHostOnlyAbsoluteDoesNotCarryAnyOtherInformation() { - $url = new SimpleUrl('http://www.lastcraft.com'); - $absolute = $url->makeAbsolute('https://host.com:81/here/'); - $this->assertEqual($absolute->getScheme(), 'http'); - $this->assertEqual($absolute->getHost(), 'www.lastcraft.com'); - $this->assertIdentical($absolute->getPort(), false); - $this->assertEqual($absolute->getPath(), '/'); - } -} - -class TestOfFrameUrl extends UnitTestCase { - - function testTargetAttachment() { - $url = new SimpleUrl('http://www.site.com/home.html'); - $this->assertIdentical($url->getTarget(), false); - $url->setTarget('A frame'); - $this->assertIdentical($url->getTarget(), 'A frame'); - } -} - -/** - * @note Based off of http://www.mozilla.org/quality/networking/testing/filetests.html - */ -class TestOfFileUrl extends UnitTestCase { - - function testMinimalUrl() { - $url = new SimpleUrl('file:///'); - $this->assertEqual($url->getScheme(), 'file'); - $this->assertIdentical($url->getHost(), false); - $this->assertEqual($url->getPath(), '/'); - } - - function testUnixUrl() { - $url = new SimpleUrl('file:///fileInRoot'); - $this->assertEqual($url->getScheme(), 'file'); - $this->assertIdentical($url->getHost(), false); - $this->assertEqual($url->getPath(), '/fileInRoot'); - } - - function testDOSVolumeUrl() { - $url = new SimpleUrl('file:///C:/config.sys'); - $this->assertEqual($url->getScheme(), 'file'); - $this->assertIdentical($url->getHost(), false); - $this->assertEqual($url->getPath(), '/C:/config.sys'); - } - - function testDOSVolumePromotion() { - $url = new SimpleUrl('file://C:/config.sys'); - $this->assertEqual($url->getScheme(), 'file'); - $this->assertIdentical($url->getHost(), false); - $this->assertEqual($url->getPath(), '/C:/config.sys'); - } - - function testDOSBackslashes() { - $url = new SimpleUrl('file:///C:\config.sys'); - $this->assertEqual($url->getScheme(), 'file'); - $this->assertIdentical($url->getHost(), false); - $this->assertEqual($url->getPath(), '/C:/config.sys'); - } - - function testDOSDirnameAfterFile() { - $url = new SimpleUrl('file://C:\config.sys'); - $this->assertEqual($url->getScheme(), 'file'); - $this->assertIdentical($url->getHost(), false); - $this->assertEqual($url->getPath(), '/C:/config.sys'); - } - -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/user_agent_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/user_agent_test.php deleted file mode 100644 index 030abeb2..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/user_agent_test.php +++ /dev/null @@ -1,348 +0,0 @@ -headers = new MockSimpleHttpHeaders(); - $this->response = new MockSimpleHttpResponse(); - $this->response->setReturnValue('isError', false); - $this->response->returns('getHeaders', new MockSimpleHttpHeaders()); - $this->request = new MockSimpleHttpRequest(); - $this->request->returns('fetch', $this->response); - } - - function testGetRequestWithoutIncidentGivesNoErrors() { - $url = new SimpleUrl('http://test:secret@this.com/page.html'); - $url->addRequestParameters(array('a' => 'A', 'b' => 'B')); - - $agent = new MockRequestUserAgent(); - $agent->returns('createHttpRequest', $this->request); - $agent->__construct(); - - $response = $agent->fetchResponse( - new SimpleUrl('http://test:secret@this.com/page.html'), - new SimpleGetEncoding(array('a' => 'A', 'b' => 'B'))); - $this->assertFalse($response->isError()); - } -} - -class TestOfAdditionalHeaders extends UnitTestCase { - - function testAdditionalHeaderAddedToRequest() { - $response = new MockSimpleHttpResponse(); - $response->setReturnReference('getHeaders', new MockSimpleHttpHeaders()); - - $request = new MockSimpleHttpRequest(); - $request->setReturnReference('fetch', $response); - $request->expectOnce( - 'addHeaderLine', - array('User-Agent: SimpleTest')); - - $agent = new MockRequestUserAgent(); - $agent->setReturnReference('createHttpRequest', $request); - $agent->__construct(); - $agent->addHeader('User-Agent: SimpleTest'); - $response = $agent->fetchResponse(new SimpleUrl('http://this.host/'), new SimpleGetEncoding()); - } -} - -class TestOfBrowserCookies extends UnitTestCase { - - private function createStandardResponse() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue("isError", false); - $response->setReturnValue("getContent", "stuff"); - $response->setReturnReference("getHeaders", new MockSimpleHttpHeaders()); - return $response; - } - - private function createCookieSite($header_lines) { - $headers = new SimpleHttpHeaders($header_lines); - $response = new MockSimpleHttpResponse(); - $response->setReturnValue("isError", false); - $response->setReturnReference("getHeaders", $headers); - $response->setReturnValue("getContent", "stuff"); - $request = new MockSimpleHttpRequest(); - $request->setReturnReference("fetch", $response); - return $request; - } - - private function createMockedRequestUserAgent(&$request) { - $agent = new MockRequestUserAgent(); - $agent->setReturnReference('createHttpRequest', $request); - $agent->__construct(); - return $agent; - } - - function testCookieJarIsSentToRequest() { - $jar = new SimpleCookieJar(); - $jar->setCookie('a', 'A'); - - $request = new MockSimpleHttpRequest(); - $request->returns('fetch', $this->createStandardResponse()); - $request->expectOnce('readCookiesFromJar', array($jar, '*')); - - $agent = $this->createMockedRequestUserAgent($request); - $agent->setCookie('a', 'A'); - $agent->fetchResponse( - new SimpleUrl('http://this.com/this/path/page.html'), - new SimpleGetEncoding()); - } - - function testNoCookieJarIsSentToRequestWhenCookiesAreDisabled() { - $request = new MockSimpleHttpRequest(); - $request->returns('fetch', $this->createStandardResponse()); - $request->expectNever('readCookiesFromJar'); - - $agent = $this->createMockedRequestUserAgent($request); - $agent->setCookie('a', 'A'); - $agent->ignoreCookies(); - $agent->fetchResponse( - new SimpleUrl('http://this.com/this/path/page.html'), - new SimpleGetEncoding()); - } - - function testReadingNewCookie() { - $request = $this->createCookieSite('Set-cookie: a=AAAA'); - $agent = $this->createMockedRequestUserAgent($request); - $agent->fetchResponse( - new SimpleUrl('http://this.com/this/path/page.html'), - new SimpleGetEncoding()); - $this->assertEqual($agent->getCookieValue("this.com", "this/path/", "a"), "AAAA"); - } - - function testIgnoringNewCookieWhenCookiesDisabled() { - $request = $this->createCookieSite('Set-cookie: a=AAAA'); - $agent = $this->createMockedRequestUserAgent($request); - $agent->ignoreCookies(); - $agent->fetchResponse( - new SimpleUrl('http://this.com/this/path/page.html'), - new SimpleGetEncoding()); - $this->assertIdentical($agent->getCookieValue("this.com", "this/path/", "a"), false); - } - - function testOverwriteCookieThatAlreadyExists() { - $request = $this->createCookieSite('Set-cookie: a=AAAA'); - $agent = $this->createMockedRequestUserAgent($request); - $agent->setCookie('a', 'A'); - $agent->fetchResponse( - new SimpleUrl('http://this.com/this/path/page.html'), - new SimpleGetEncoding()); - $this->assertEqual($agent->getCookieValue("this.com", "this/path/", "a"), "AAAA"); - } - - function testClearCookieBySettingExpiry() { - $request = $this->createCookieSite('Set-cookie: a=b'); - $agent = $this->createMockedRequestUserAgent($request); - - $agent->setCookie("a", "A", "this/path/", "Wed, 25-Dec-02 04:24:21 GMT"); - $agent->fetchResponse( - new SimpleUrl('http://this.com/this/path/page.html'), - new SimpleGetEncoding()); - $this->assertIdentical( - $agent->getCookieValue("this.com", "this/path/", "a"), - "b"); - $agent->restart("Wed, 25-Dec-02 04:24:20 GMT"); - $this->assertIdentical( - $agent->getCookieValue("this.com", "this/path/", "a"), - false); - } - - function testAgeingAndClearing() { - $request = $this->createCookieSite('Set-cookie: a=A; expires=Wed, 25-Dec-02 04:24:21 GMT; path=/this/path'); - $agent = $this->createMockedRequestUserAgent($request); - - $agent->fetchResponse( - new SimpleUrl('http://this.com/this/path/page.html'), - new SimpleGetEncoding()); - $agent->restart("Wed, 25-Dec-02 04:24:20 GMT"); - $this->assertIdentical( - $agent->getCookieValue("this.com", "this/path/", "a"), - "A"); - $agent->ageCookies(2); - $agent->restart("Wed, 25-Dec-02 04:24:20 GMT"); - $this->assertIdentical( - $agent->getCookieValue("this.com", "this/path/", "a"), - false); - } - - function testReadingIncomingAndSettingNewCookies() { - $request = $this->createCookieSite('Set-cookie: a=AAA'); - $agent = $this->createMockedRequestUserAgent($request); - - $this->assertNull($agent->getBaseCookieValue("a", false)); - $agent->fetchResponse( - new SimpleUrl('http://this.com/this/path/page.html'), - new SimpleGetEncoding()); - $agent->setCookie("b", "BBB", "this.com", "this/path/"); - $this->assertEqual( - $agent->getBaseCookieValue("a", new SimpleUrl('http://this.com/this/path/page.html')), - "AAA"); - $this->assertEqual( - $agent->getBaseCookieValue("b", new SimpleUrl('http://this.com/this/path/page.html')), - "BBB"); - } -} - -class TestOfHttpRedirects extends UnitTestCase { - - function createRedirect($content, $redirect) { - $headers = new MockSimpleHttpHeaders(); - $headers->setReturnValue('isRedirect', (boolean)$redirect); - $headers->setReturnValue('getLocation', $redirect); - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('getContent', $content); - $response->setReturnReference('getHeaders', $headers); - $request = new MockSimpleHttpRequest(); - $request->setReturnReference('fetch', $response); - return $request; - } - - function testDisabledRedirects() { - $agent = new MockRequestUserAgent(); - $agent->returns( - 'createHttpRequest', - $this->createRedirect('stuff', 'there.html')); - $agent->expectOnce('createHttpRequest'); - $agent->__construct(); - $agent->setMaximumRedirects(0); - $response = $agent->fetchResponse(new SimpleUrl('here.html'), new SimpleGetEncoding()); - $this->assertEqual($response->getContent(), 'stuff'); - } - - function testSingleRedirect() { - $agent = new MockRequestUserAgent(); - $agent->returnsAt( - 0, - 'createHttpRequest', - $this->createRedirect('first', 'two.html')); - $agent->returnsAt( - 1, - 'createHttpRequest', - $this->createRedirect('second', 'three.html')); - $agent->expectCallCount('createHttpRequest', 2); - $agent->__construct(); - - $agent->setMaximumRedirects(1); - $response = $agent->fetchResponse(new SimpleUrl('one.html'), new SimpleGetEncoding()); - $this->assertEqual($response->getContent(), 'second'); - } - - function testDoubleRedirect() { - $agent = new MockRequestUserAgent(); - $agent->returnsAt( - 0, - 'createHttpRequest', - $this->createRedirect('first', 'two.html')); - $agent->returnsAt( - 1, - 'createHttpRequest', - $this->createRedirect('second', 'three.html')); - $agent->returnsAt( - 2, - 'createHttpRequest', - $this->createRedirect('third', 'four.html')); - $agent->expectCallCount('createHttpRequest', 3); - $agent->__construct(); - - $agent->setMaximumRedirects(2); - $response = $agent->fetchResponse(new SimpleUrl('one.html'), new SimpleGetEncoding()); - $this->assertEqual($response->getContent(), 'third'); - } - - function testSuccessAfterRedirect() { - $agent = new MockRequestUserAgent(); - $agent->returnsAt( - 0, - 'createHttpRequest', - $this->createRedirect('first', 'two.html')); - $agent->returnsAt( - 1, - 'createHttpRequest', - $this->createRedirect('second', false)); - $agent->returnsAt( - 2, - 'createHttpRequest', - $this->createRedirect('third', 'four.html')); - $agent->expectCallCount('createHttpRequest', 2); - $agent->__construct(); - - $agent->setMaximumRedirects(2); - $response = $agent->fetchResponse(new SimpleUrl('one.html'), new SimpleGetEncoding()); - $this->assertEqual($response->getContent(), 'second'); - } - - function testRedirectChangesPostToGet() { - $agent = new MockRequestUserAgent(); - $agent->returnsAt( - 0, - 'createHttpRequest', - $this->createRedirect('first', 'two.html')); - $agent->expectAt(0, 'createHttpRequest', array('*', new IsAExpectation('SimplePostEncoding'))); - $agent->returnsAt( - 1, - 'createHttpRequest', - $this->createRedirect('second', 'three.html')); - $agent->expectAt(1, 'createHttpRequest', array('*', new IsAExpectation('SimpleGetEncoding'))); - $agent->expectCallCount('createHttpRequest', 2); - $agent->__construct(); - $agent->setMaximumRedirects(1); - $response = $agent->fetchResponse(new SimpleUrl('one.html'), new SimplePostEncoding()); - } -} - -class TestOfBadHosts extends UnitTestCase { - - private function createSimulatedBadHost() { - $response = new MockSimpleHttpResponse(); - $response->setReturnValue('isError', true); - $response->setReturnValue('getError', 'Bad socket'); - $response->setReturnValue('getContent', false); - $request = new MockSimpleHttpRequest(); - $request->setReturnReference('fetch', $response); - return $request; - } - - function testUntestedHost() { - $request = $this->createSimulatedBadHost(); - $agent = new MockRequestUserAgent(); - $agent->setReturnReference('createHttpRequest', $request); - $agent->__construct(); - $response = $agent->fetchResponse( - new SimpleUrl('http://this.host/this/path/page.html'), - new SimpleGetEncoding()); - $this->assertTrue($response->isError()); - } -} - -class TestOfAuthorisation extends UnitTestCase { - - function testAuthenticateHeaderAdded() { - $response = new MockSimpleHttpResponse(); - $response->setReturnReference('getHeaders', new MockSimpleHttpHeaders()); - - $request = new MockSimpleHttpRequest(); - $request->returns('fetch', $response); - $request->expectOnce( - 'addHeaderLine', - array('Authorization: Basic ' . base64_encode('test:secret'))); - - $agent = new MockRequestUserAgent(); - $agent->returns('createHttpRequest', $request); - $agent->__construct(); - $response = $agent->fetchResponse( - new SimpleUrl('http://test:secret@this.host'), - new SimpleGetEncoding()); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/utf8_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/utf8_test.php deleted file mode 100644 index 8dc8f817..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/utf8_test.php +++ /dev/null @@ -1,78 +0,0 @@ -addPattern("eé"); - $this->assertTrue($regex->match("eéêè", $match)); - $this->assertEqual($match, "eé"); - } - - function testWithTextInLatin1() { - $regex = &new ParallelRegex(false); - $regex->addPattern(utf8_decode("eé")); - $this->assertTrue($regex->match(utf8_decode("eéêè"), $match)); - $this->assertEqual($match, utf8_decode("eé")); - } - - function &createParser() { - $parser = &new MockSimpleHtmlSaxParser(); - $parser->setReturnValue('acceptStartToken', true); - $parser->setReturnValue('acceptEndToken', true); - $parser->setReturnValue('acceptAttributeToken', true); - $parser->setReturnValue('acceptEntityToken', true); - $parser->setReturnValue('acceptTextToken', true); - $parser->setReturnValue('ignore', true); - return $parser; - } - - function testTagWithAttributesInUTF8() { - $parser = &$this->createParser(); - $parser->expectOnce('acceptTextToken', array('label', '*')); - $parser->expectAt(0, 'acceptStartToken', array('expectAt(1, 'acceptStartToken', array('href', '*')); - $parser->expectAt(2, 'acceptStartToken', array('>', '*')); - $parser->expectCallCount('acceptStartToken', 3); - $parser->expectAt(0, 'acceptAttributeToken', array('= "', '*')); - $parser->expectAt(1, 'acceptAttributeToken', array('hère.html', '*')); - $parser->expectAt(2, 'acceptAttributeToken', array('"', '*')); - $parser->expectCallCount('acceptAttributeToken', 3); - $parser->expectOnce('acceptEndToken', array('', '*')); - $lexer = &new SimpleHtmlLexer($parser); - $this->assertTrue($lexer->parse('label')); - } - - function testTagWithAttributesInLatin1() { - $parser = &$this->createParser(); - $parser->expectOnce('acceptTextToken', array('label', '*')); - $parser->expectAt(0, 'acceptStartToken', array('expectAt(1, 'acceptStartToken', array('href', '*')); - $parser->expectAt(2, 'acceptStartToken', array('>', '*')); - $parser->expectCallCount('acceptStartToken', 3); - $parser->expectAt(0, 'acceptAttributeToken', array('= "', '*')); - $parser->expectAt(1, 'acceptAttributeToken', array(utf8_decode('hère.html'), '*')); - $parser->expectAt(2, 'acceptAttributeToken', array('"', '*')); - $parser->expectCallCount('acceptAttributeToken', 3); - $parser->expectOnce('acceptEndToken', array('', '*')); - $lexer = &new SimpleHtmlLexer($parser); - $this->assertTrue($lexer->parse(utf8_decode('label'))); - } -} - -class TestOfUrlithDifferentCharset extends UnitTestCase { - function testUsernameAndPasswordInUTF8() { - $url = new SimpleUrl('http://pÈrick:penËt@www.lastcraft.com'); - $this->assertEqual($url->getUsername(), 'pÈrick'); - $this->assertEqual($url->getPassword(), 'penËt'); - } -} - -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/visual/visual_errors.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/visual/visual_errors.php deleted file mode 100644 index 15c0ebfc..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/visual/visual_errors.php +++ /dev/null @@ -1,65 +0,0 @@ -dump('Four exceptions...'); - trigger_error('Default'); - trigger_error('Error', E_USER_ERROR); - trigger_error('Warning', E_USER_WARNING); - trigger_error('Notice', E_USER_NOTICE); - } - - function testErrorTrap() { - $this->dump('Pass...'); - $this->expectError(); - trigger_error('Error'); - } - - function testUnusedErrorExpectationsCauseFailures() { - $this->dump('Two failures...'); - $this->expectError('Some error'); - $this->expectError(); - } - - function testErrorTextIsSentImmediately() { - $this->dump('One failure...'); - $this->expectError('Error'); - trigger_error('Error almost'); - $this->dump('This should lie between the two errors'); - trigger_error('Error after'); - } -} - -class VisualTestOfExceptions extends UnitTestCase { - function skip() { - $this->skipUnless(version_compare(phpversion(), '5') >= 0); - } - - function testExceptionTrap() { - $this->dump('One exception...'); - $this->ouch(); - $this->fail('Should not be here'); - } - - function testExceptionExpectationShowsErrorWhenNoException() { - $this->dump('One failure...'); - $this->expectException('SomeException'); - $this->expectException('LaterException'); - } - - function testExceptionExpectationShowsPassWhenException() { - $this->dump('Pass...'); - $this->expectException(); - $this->ouch(); - } - - function ouch() { - eval('throw new Exception("Ouch!");'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/visual_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/visual_test.php deleted file mode 100644 index 5bde610f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/visual_test.php +++ /dev/null @@ -1,495 +0,0 @@ -a = $a; - } - } - - class PassingUnitTestCaseOutput extends UnitTestCase { - - function testOfResults() { - $this->pass('Pass'); - } - - function testTrue() { - $this->assertTrue(true); - } - - function testFalse() { - $this->assertFalse(false); - } - - function testExpectation() { - $expectation = &new EqualExpectation(25, 'My expectation message: %s'); - $this->assert($expectation, 25, 'My assert message : %s'); - } - - function testNull() { - $this->assertNull(null, "%s -> Pass"); - $this->assertNotNull(false, "%s -> Pass"); - } - - function testType() { - $this->assertIsA("hello", "string", "%s -> Pass"); - $this->assertIsA($this, "PassingUnitTestCaseOutput", "%s -> Pass"); - $this->assertIsA($this, "UnitTestCase", "%s -> Pass"); - } - - function testTypeEquality() { - $this->assertEqual("0", 0, "%s -> Pass"); - } - - function testNullEquality() { - $this->assertNotEqual(null, 1, "%s -> Pass"); - $this->assertNotEqual(1, null, "%s -> Pass"); - } - - function testIntegerEquality() { - $this->assertNotEqual(1, 2, "%s -> Pass"); - } - - function testStringEquality() { - $this->assertEqual("a", "a", "%s -> Pass"); - $this->assertNotEqual("aa", "ab", "%s -> Pass"); - } - - function testHashEquality() { - $this->assertEqual(array("a" => "A", "b" => "B"), array("b" => "B", "a" => "A"), "%s -> Pass"); - } - - function testWithin() { - $this->assertWithinMargin(5, 5.4, 0.5, "%s -> Pass"); - } - - function testOutside() { - $this->assertOutsideMargin(5, 5.6, 0.5, "%s -> Pass"); - } - - function testStringIdentity() { - $a = "fred"; - $b = $a; - $this->assertIdentical($a, $b, "%s -> Pass"); - } - - function testTypeIdentity() { - $a = "0"; - $b = 0; - $this->assertNotIdentical($a, $b, "%s -> Pass"); - } - - function testNullIdentity() { - $this->assertNotIdentical(null, 1, "%s -> Pass"); - $this->assertNotIdentical(1, null, "%s -> Pass"); - } - - function testHashIdentity() { - } - - function testObjectEquality() { - $this->assertEqual(new TestDisplayClass(4), new TestDisplayClass(4), "%s -> Pass"); - $this->assertNotEqual(new TestDisplayClass(4), new TestDisplayClass(5), "%s -> Pass"); - } - - function testObjectIndentity() { - $this->assertIdentical(new TestDisplayClass(false), new TestDisplayClass(false), "%s -> Pass"); - $this->assertNotIdentical(new TestDisplayClass(false), new TestDisplayClass(0), "%s -> Pass"); - } - - function testReference() { - $a = "fred"; - $b = &$a; - $this->assertReference($a, $b, "%s -> Pass"); - } - - function testCloneOnDifferentObjects() { - $a = "fred"; - $b = $a; - $c = "Hello"; - $this->assertClone($a, $b, "%s -> Pass"); - } - - function testPatterns() { - $this->assertPattern('/hello/i', "Hello there", "%s -> Pass"); - $this->assertNoPattern('/hello/', "Hello there", "%s -> Pass"); - } - - function testLongStrings() { - $text = ""; - for ($i = 0; $i < 10; $i++) { - $text .= "0123456789"; - } - $this->assertEqual($text, $text); - } - } - - class FailingUnitTestCaseOutput extends UnitTestCase { - - function testOfResults() { - $this->fail('Fail'); // Fail. - } - - function testTrue() { - $this->assertTrue(false); // Fail. - } - - function testFalse() { - $this->assertFalse(true); // Fail. - } - - function testExpectation() { - $expectation = &new EqualExpectation(25, 'My expectation message: %s'); - $this->assert($expectation, 24, 'My assert message : %s'); // Fail. - } - - function testNull() { - $this->assertNull(false, "%s -> Fail"); // Fail. - $this->assertNotNull(null, "%s -> Fail"); // Fail. - } - - function testType() { - $this->assertIsA(14, "string", "%s -> Fail"); // Fail. - $this->assertIsA(14, "TestOfUnitTestCaseOutput", "%s -> Fail"); // Fail. - $this->assertIsA($this, "TestReporter", "%s -> Fail"); // Fail. - } - - function testTypeEquality() { - $this->assertNotEqual("0", 0, "%s -> Fail"); // Fail. - } - - function testNullEquality() { - $this->assertEqual(null, 1, "%s -> Fail"); // Fail. - $this->assertEqual(1, null, "%s -> Fail"); // Fail. - } - - function testIntegerEquality() { - $this->assertEqual(1, 2, "%s -> Fail"); // Fail. - } - - function testStringEquality() { - $this->assertNotEqual("a", "a", "%s -> Fail"); // Fail. - $this->assertEqual("aa", "ab", "%s -> Fail"); // Fail. - } - - function testHashEquality() { - $this->assertEqual(array("a" => "A", "b" => "B"), array("b" => "B", "a" => "Z"), "%s -> Fail"); - } - - function testWithin() { - $this->assertWithinMargin(5, 5.6, 0.5, "%s -> Fail"); // Fail. - } - - function testOutside() { - $this->assertOutsideMargin(5, 5.4, 0.5, "%s -> Fail"); // Fail. - } - - function testStringIdentity() { - $a = "fred"; - $b = $a; - $this->assertNotIdentical($a, $b, "%s -> Fail"); // Fail. - } - - function testTypeIdentity() { - $a = "0"; - $b = 0; - $this->assertIdentical($a, $b, "%s -> Fail"); // Fail. - } - - function testNullIdentity() { - $this->assertIdentical(null, 1, "%s -> Fail"); // Fail. - $this->assertIdentical(1, null, "%s -> Fail"); // Fail. - } - - function testHashIdentity() { - $this->assertIdentical(array("a" => "A", "b" => "B"), array("b" => "B", "a" => "A"), "%s -> fail"); // Fail. - } - - function testObjectEquality() { - $this->assertNotEqual(new TestDisplayClass(4), new TestDisplayClass(4), "%s -> Fail"); // Fail. - $this->assertEqual(new TestDisplayClass(4), new TestDisplayClass(5), "%s -> Fail"); // Fail. - } - - function testObjectIndentity() { - $this->assertNotIdentical(new TestDisplayClass(false), new TestDisplayClass(false), "%s -> Fail"); // Fail. - $this->assertIdentical(new TestDisplayClass(false), new TestDisplayClass(0), "%s -> Fail"); // Fail. - } - - function testReference() { - $a = "fred"; - $b = &$a; - $this->assertClone($a, $b, "%s -> Fail"); // Fail. - } - - function testCloneOnDifferentObjects() { - $a = "fred"; - $b = $a; - $c = "Hello"; - $this->assertClone($a, $c, "%s -> Fail"); // Fail. - } - - function testPatterns() { - $this->assertPattern('/hello/', "Hello there", "%s -> Fail"); // Fail. - $this->assertNoPattern('/hello/i', "Hello there", "%s -> Fail"); // Fail. - } - - function testLongStrings() { - $text = ""; - for ($i = 0; $i < 10; $i++) { - $text .= "0123456789"; - } - $this->assertEqual($text . $text, $text . "a" . $text); // Fail. - } -} - - class Dummy { - function Dummy() { - } - - function a() { - } - } - Mock::generate('Dummy'); - - class TestOfMockObjectsOutput extends UnitTestCase { - - function testCallCounts() { - $dummy = &new MockDummy(); - $dummy->expectCallCount('a', 1, 'My message: %s'); - $dummy->a(); - $dummy->a(); - } - - function testMinimumCallCounts() { - $dummy = &new MockDummy(); - $dummy->expectMinimumCallCount('a', 2, 'My message: %s'); - $dummy->a(); - $dummy->a(); - } - - function testEmptyMatching() { - $dummy = &new MockDummy(); - $dummy->expect('a', array()); - $dummy->a(); - $dummy->a(null); // Fail. - } - - function testEmptyMatchingWithCustomMessage() { - $dummy = &new MockDummy(); - $dummy->expect('a', array(), 'My expectation message: %s'); - $dummy->a(); - $dummy->a(null); // Fail. - } - - function testNullMatching() { - $dummy = &new MockDummy(); - $dummy->expect('a', array(null)); - $dummy->a(null); - $dummy->a(); // Fail. - } - - function testBooleanMatching() { - $dummy = &new MockDummy(); - $dummy->expect('a', array(true, false)); - $dummy->a(true, false); - $dummy->a(true, true); // Fail. - } - - function testIntegerMatching() { - $dummy = &new MockDummy(); - $dummy->expect('a', array(32, 33)); - $dummy->a(32, 33); - $dummy->a(32, 34); // Fail. - } - - function testFloatMatching() { - $dummy = &new MockDummy(); - $dummy->expect('a', array(3.2, 3.3)); - $dummy->a(3.2, 3.3); - $dummy->a(3.2, 3.4); // Fail. - } - - function testStringMatching() { - $dummy = &new MockDummy(); - $dummy->expect('a', array('32', '33')); - $dummy->a('32', '33'); - $dummy->a('32', '34'); // Fail. - } - - function testEmptyMatchingWithCustomExpectationMessage() { - $dummy = &new MockDummy(); - $dummy->expect( - 'a', - array(new EqualExpectation('A', 'My part expectation message: %s')), - 'My expectation message: %s'); - $dummy->a('A'); - $dummy->a('B'); // Fail. - } - - function testArrayMatching() { - $dummy = &new MockDummy(); - $dummy->expect('a', array(array(32), array(33))); - $dummy->a(array(32), array(33)); - $dummy->a(array(32), array('33')); // Fail. - } - - function testObjectMatching() { - $a = new Dummy(); - $a->a = 'a'; - $b = new Dummy(); - $b->b = 'b'; - $dummy = &new MockDummy(); - $dummy->expect('a', array($a, $b)); - $dummy->a($a, $b); - $dummy->a($a, $a); // Fail. - } - - function testBigList() { - $dummy = &new MockDummy(); - $dummy->expect('a', array(false, 0, 1, 1.0)); - $dummy->a(false, 0, 1, 1.0); - $dummy->a(true, false, 2, 2.0); // Fail. - } - } - - class TestOfPastBugs extends UnitTestCase { - - function testMixedTypes() { - $this->assertEqual(array(), null, "%s -> Pass"); - $this->assertIdentical(array(), null, "%s -> Fail"); // Fail. - } - - function testMockWildcards() { - $dummy = &new MockDummy(); - $dummy->expect('a', array('*', array(33))); - $dummy->a(array(32), array(33)); - $dummy->a(array(32), array('33')); // Fail. - } - } - - class TestOfVisualShell extends ShellTestCase { - - function testDump() { - $this->execute('ls'); - $this->dumpOutput(); - $this->execute('dir'); - $this->dumpOutput(); - } - - function testDumpOfList() { - $this->execute('ls'); - $this->dump($this->getOutputAsList()); - } - } - - class PassesAsWellReporter extends HtmlReporter { - - protected function getCss() { - return parent::getCss() . ' .pass { color: darkgreen; }'; - } - - function paintPass($message) { - parent::paintPass($message); - print "Pass: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode(" -> ", $breadcrumb); - print " -> " . htmlentities($message) . "
    \n"; - } - - function paintSignal($type, &$payload) { - print "$type: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode(" -> ", $breadcrumb); - print " -> " . htmlentities(serialize($payload)) . "
    \n"; - } - } - - class TestOfSkippingNoMatterWhat extends UnitTestCase { - function skip() { - $this->skipIf(true, 'Always skipped -> %s'); - } - - function testFail() { - $this->fail('This really shouldn\'t have happened'); - } - } - - class TestOfSkippingOrElse extends UnitTestCase { - function skip() { - $this->skipUnless(false, 'Always skipped -> %s'); - } - - function testFail() { - $this->fail('This really shouldn\'t have happened'); - } - } - - class TestOfSkippingTwiceOver extends UnitTestCase { - function skip() { - $this->skipIf(true, 'First reason -> %s'); - $this->skipIf(true, 'Second reason -> %s'); - } - - function testFail() { - $this->fail('This really shouldn\'t have happened'); - } - } - - class TestThatShouldNotBeSkipped extends UnitTestCase { - function skip() { - $this->skipIf(false); - $this->skipUnless(true); - } - - function testFail() { - $this->fail('We should see this message'); - } - - function testPass() { - $this->pass('We should see this message'); - } - } - - $test = &new TestSuite('Visual test with 46 passes, 47 fails and 0 exceptions'); - $test->add(new PassingUnitTestCaseOutput()); - $test->add(new FailingUnitTestCaseOutput()); - $test->add(new TestOfMockObjectsOutput()); - $test->add(new TestOfPastBugs()); - $test->add(new TestOfVisualShell()); - $test->add(new TestOfSkippingNoMatterWhat()); - $test->add(new TestOfSkippingOrElse()); - $test->add(new TestOfSkippingTwiceOver()); - $test->add(new TestThatShouldNotBeSkipped()); - - if (isset($_GET['xml']) || in_array('xml', (isset($argv) ? $argv : array()))) { - $reporter = new XmlReporter(); - } elseif (TextReporter::inCli()) { - $reporter = new TextReporter(); - } else { - $reporter = new PassesAsWellReporter(); - } - if (isset($_GET['dry']) || in_array('dry', (isset($argv) ? $argv : array()))) { - $reporter->makeDry(); - } - exit ($test->run($reporter) ? 0 : 1); -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/web_tester_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/web_tester_test.php deleted file mode 100644 index 8c3bf1ad..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/web_tester_test.php +++ /dev/null @@ -1,155 +0,0 @@ -assertTrue($expectation->test('a')); - $this->assertTrue($expectation->test(array('a'))); - $this->assertFalse($expectation->test('A')); - } - - function testMatchesInteger() { - $expectation = new FieldExpectation('1'); - $this->assertTrue($expectation->test('1')); - $this->assertTrue($expectation->test(1)); - $this->assertTrue($expectation->test(array('1'))); - $this->assertTrue($expectation->test(array(1))); - } - - function testNonStringFailsExpectation() { - $expectation = new FieldExpectation('a'); - $this->assertFalse($expectation->test(null)); - } - - function testUnsetFieldCanBeTestedFor() { - $expectation = new FieldExpectation(false); - $this->assertTrue($expectation->test(false)); - } - - function testMultipleValuesCanBeInAnyOrder() { - $expectation = new FieldExpectation(array('a', 'b')); - $this->assertTrue($expectation->test(array('a', 'b'))); - $this->assertTrue($expectation->test(array('b', 'a'))); - $this->assertFalse($expectation->test(array('a', 'a'))); - $this->assertFalse($expectation->test('a')); - } - - function testSingleItemCanBeArrayOrString() { - $expectation = new FieldExpectation(array('a')); - $this->assertTrue($expectation->test(array('a'))); - $this->assertTrue($expectation->test('a')); - } -} - -class TestOfHeaderExpectations extends UnitTestCase { - - function testExpectingOnlyTheHeaderName() { - $expectation = new HttpHeaderExpectation('a'); - $this->assertIdentical($expectation->test(false), false); - $this->assertIdentical($expectation->test('a: A'), true); - $this->assertIdentical($expectation->test('A: A'), true); - $this->assertIdentical($expectation->test('a: B'), true); - $this->assertIdentical($expectation->test(' a : A '), true); - } - - function testHeaderValueAsWell() { - $expectation = new HttpHeaderExpectation('a', 'A'); - $this->assertIdentical($expectation->test(false), false); - $this->assertIdentical($expectation->test('a: A'), true); - $this->assertIdentical($expectation->test('A: A'), true); - $this->assertIdentical($expectation->test('A: a'), false); - $this->assertIdentical($expectation->test('a: B'), false); - $this->assertIdentical($expectation->test(' a : A '), true); - $this->assertIdentical($expectation->test(' a : AB '), false); - } - - function testHeaderValueWithColons() { - $expectation = new HttpHeaderExpectation('a', 'A:B:C'); - $this->assertIdentical($expectation->test('a: A'), false); - $this->assertIdentical($expectation->test('a: A:B'), false); - $this->assertIdentical($expectation->test('a: A:B:C'), true); - $this->assertIdentical($expectation->test('a: A:B:C:D'), false); - } - - function testMultilineSearch() { - $expectation = new HttpHeaderExpectation('a', 'A'); - $this->assertIdentical($expectation->test("aa: A\r\nb: B\r\nc: C"), false); - $this->assertIdentical($expectation->test("aa: A\r\na: A\r\nb: B"), true); - } - - function testMultilineSearchWithPadding() { - $expectation = new HttpHeaderExpectation('a', ' A '); - $this->assertIdentical($expectation->test("aa:A\r\nb:B\r\nc:C"), false); - $this->assertIdentical($expectation->test("aa:A\r\na:A\r\nb:B"), true); - } - - function testPatternMatching() { - $expectation = new HttpHeaderExpectation('a', new PatternExpectation('/A/')); - $this->assertIdentical($expectation->test('a: A'), true); - $this->assertIdentical($expectation->test('A: A'), true); - $this->assertIdentical($expectation->test('A: a'), false); - $this->assertIdentical($expectation->test('a: B'), false); - $this->assertIdentical($expectation->test(' a : A '), true); - $this->assertIdentical($expectation->test(' a : AB '), true); - } - - function testCaseInsensitivePatternMatching() { - $expectation = new HttpHeaderExpectation('a', new PatternExpectation('/A/i')); - $this->assertIdentical($expectation->test('a: a'), true); - $this->assertIdentical($expectation->test('a: B'), false); - $this->assertIdentical($expectation->test(' a : A '), true); - $this->assertIdentical($expectation->test(' a : BAB '), true); - $this->assertIdentical($expectation->test(' a : bab '), true); - } - - function testUnwantedHeader() { - $expectation = new NoHttpHeaderExpectation('a'); - $this->assertIdentical($expectation->test(''), true); - $this->assertIdentical($expectation->test('stuff'), true); - $this->assertIdentical($expectation->test('b: B'), true); - $this->assertIdentical($expectation->test('a: A'), false); - $this->assertIdentical($expectation->test('A: A'), false); - } - - function testMultilineUnwantedSearch() { - $expectation = new NoHttpHeaderExpectation('a'); - $this->assertIdentical($expectation->test("aa:A\r\nb:B\r\nc:C"), true); - $this->assertIdentical($expectation->test("aa:A\r\na:A\r\nb:B"), false); - } - - function testLocationHeaderSplitsCorrectly() { - $expectation = new HttpHeaderExpectation('Location', 'http://here/'); - $this->assertIdentical($expectation->test('Location: http://here/'), true); - } -} - -class TestOfTextExpectations extends UnitTestCase { - - function testMatchingSubString() { - $expectation = new TextExpectation('wanted'); - $this->assertIdentical($expectation->test(''), false); - $this->assertIdentical($expectation->test('Wanted'), false); - $this->assertIdentical($expectation->test('wanted'), true); - $this->assertIdentical($expectation->test('the wanted text is here'), true); - } - - function testNotMatchingSubString() { - $expectation = new NoTextExpectation('wanted'); - $this->assertIdentical($expectation->test(''), true); - $this->assertIdentical($expectation->test('Wanted'), true); - $this->assertIdentical($expectation->test('wanted'), false); - $this->assertIdentical($expectation->test('the wanted text is here'), false); - } -} - -class TestOfGenericAssertionsInWebTester extends WebTestCase { - function testEquality() { - $this->assertEqual('a', 'a'); - $this->assertNotEqual('a', 'A'); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/xml_test.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/xml_test.php deleted file mode 100644 index f99e0dcd..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test/xml_test.php +++ /dev/null @@ -1,187 +0,0 @@ - 2)); - $this->assertEqual($nesting->getSize(), 2); - } -} - -class TestOfXmlStructureParsing extends UnitTestCase { - function testValidXml() { - $listener = new MockSimpleScorer(); - $listener->expectNever('paintGroupStart'); - $listener->expectNever('paintGroupEnd'); - $listener->expectNever('paintCaseStart'); - $listener->expectNever('paintCaseEnd'); - $parser = new SimpleTestXmlParser($listener); - $this->assertTrue($parser->parse("\n")); - $this->assertTrue($parser->parse("\n")); - $this->assertTrue($parser->parse("\n")); - } - - function testEmptyGroup() { - $listener = new MockSimpleScorer(); - $listener->expectOnce('paintGroupStart', array('a_group', 7)); - $listener->expectOnce('paintGroupEnd', array('a_group')); - $parser = new SimpleTestXmlParser($listener); - $parser->parse("\n"); - $parser->parse("\n"); - $this->assertTrue($parser->parse("\n")); - $this->assertTrue($parser->parse("a_group\n")); - $this->assertTrue($parser->parse("\n")); - $parser->parse("\n"); - } - - function testEmptyCase() { - $listener = new MockSimpleScorer(); - $listener->expectOnce('paintCaseStart', array('a_case')); - $listener->expectOnce('paintCaseEnd', array('a_case')); - $parser = new SimpleTestXmlParser($listener); - $parser->parse("\n"); - $parser->parse("\n"); - $this->assertTrue($parser->parse("\n")); - $this->assertTrue($parser->parse("a_case\n")); - $this->assertTrue($parser->parse("\n")); - $parser->parse("\n"); - } - - function testEmptyMethod() { - $listener = new MockSimpleScorer(); - $listener->expectOnce('paintCaseStart', array('a_case')); - $listener->expectOnce('paintCaseEnd', array('a_case')); - $listener->expectOnce('paintMethodStart', array('a_method')); - $listener->expectOnce('paintMethodEnd', array('a_method')); - $parser = new SimpleTestXmlParser($listener); - $parser->parse("\n"); - $parser->parse("\n"); - $parser->parse("\n"); - $parser->parse("a_case\n"); - $this->assertTrue($parser->parse("\n")); - $this->assertTrue($parser->parse("a_method\n")); - $this->assertTrue($parser->parse("\n")); - $parser->parse("\n"); - $parser->parse("\n"); - } - - function testNestedGroup() { - $listener = new MockSimpleScorer(); - $listener->expectAt(0, 'paintGroupStart', array('a_group', 7)); - $listener->expectAt(1, 'paintGroupStart', array('b_group', 3)); - $listener->expectCallCount('paintGroupStart', 2); - $listener->expectAt(0, 'paintGroupEnd', array('b_group')); - $listener->expectAt(1, 'paintGroupEnd', array('a_group')); - $listener->expectCallCount('paintGroupEnd', 2); - - $parser = new SimpleTestXmlParser($listener); - $parser->parse("\n"); - $parser->parse("\n"); - - $this->assertTrue($parser->parse("\n")); - $this->assertTrue($parser->parse("a_group\n")); - $this->assertTrue($parser->parse("\n")); - $this->assertTrue($parser->parse("b_group\n")); - $this->assertTrue($parser->parse("\n")); - $this->assertTrue($parser->parse("\n")); - $parser->parse("\n"); - } -} - -class AnyOldSignal { - public $stuff = true; -} - -class TestOfXmlResultsParsing extends UnitTestCase { - - function sendValidStart(&$parser) { - $parser->parse("\n"); - $parser->parse("\n"); - $parser->parse("\n"); - $parser->parse("a_case\n"); - $parser->parse("\n"); - $parser->parse("a_method\n"); - } - - function sendValidEnd(&$parser) { - $parser->parse("\n"); - $parser->parse("\n"); - $parser->parse("\n"); - } - - function testPass() { - $listener = new MockSimpleScorer(); - $listener->expectOnce('paintPass', array('a_message')); - $parser = new SimpleTestXmlParser($listener); - $this->sendValidStart($parser); - $this->assertTrue($parser->parse("a_message\n")); - $this->sendValidEnd($parser); - } - - function testFail() { - $listener = new MockSimpleScorer(); - $listener->expectOnce('paintFail', array('a_message')); - $parser = new SimpleTestXmlParser($listener); - $this->sendValidStart($parser); - $this->assertTrue($parser->parse("a_message\n")); - $this->sendValidEnd($parser); - } - - function testException() { - $listener = new MockSimpleScorer(); - $listener->expectOnce('paintError', array('a_message')); - $parser = new SimpleTestXmlParser($listener); - $this->sendValidStart($parser); - $this->assertTrue($parser->parse("a_message\n")); - $this->sendValidEnd($parser); - } - - function testSkip() { - $listener = new MockSimpleScorer(); - $listener->expectOnce('paintSkip', array('a_message')); - $parser = new SimpleTestXmlParser($listener); - $this->sendValidStart($parser); - $this->assertTrue($parser->parse("a_message\n")); - $this->sendValidEnd($parser); - } - - function testSignal() { - $signal = new AnyOldSignal(); - $signal->stuff = "Hello"; - $listener = new MockSimpleScorer(); - $listener->expectOnce('paintSignal', array('a_signal', $signal)); - $parser = new SimpleTestXmlParser($listener); - $this->sendValidStart($parser); - $this->assertTrue($parser->parse( - "\n")); - $this->sendValidEnd($parser); - } - - function testMessage() { - $listener = new MockSimpleScorer(); - $listener->expectOnce('paintMessage', array('a_message')); - $parser = new SimpleTestXmlParser($listener); - $this->sendValidStart($parser); - $this->assertTrue($parser->parse("a_message\n")); - $this->sendValidEnd($parser); - } - - function testFormattedMessage() { - $listener = new MockSimpleScorer(); - $listener->expectOnce('paintFormattedMessage', array("\na\tmessage\n")); - $parser = new SimpleTestXmlParser($listener); - $this->sendValidStart($parser); - $this->assertTrue($parser->parse("\n")); - $this->sendValidEnd($parser); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test_case.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test_case.php deleted file mode 100644 index 16665486..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/test_case.php +++ /dev/null @@ -1,655 +0,0 @@ -label = $label; - } - } - - /** - * Accessor for the test name for subclasses. - * @return string Name of the test. - * @access public - */ - function getLabel() { - return $this->label ? $this->label : get_class($this); - } - - /** - * This is a placeholder for skipping tests. In this - * method you place skipIf() and skipUnless() calls to - * set the skipping state. - * @access public - */ - function skip() { - } - - /** - * Will issue a message to the reporter and tell the test - * case to skip if the incoming flag is true. - * @param string $should_skip Condition causing the tests to be skipped. - * @param string $message Text of skip condition. - * @access public - */ - function skipIf($should_skip, $message = '%s') { - if ($should_skip && ! $this->should_skip) { - $this->should_skip = true; - $message = sprintf($message, 'Skipping [' . get_class($this) . ']'); - $this->reporter->paintSkip($message . $this->getAssertionLine()); - } - } - - /** - * Accessor for the private variable $_shoud_skip - * @access public - */ - function shouldSkip() { - return $this->should_skip; - } - - /** - * Will issue a message to the reporter and tell the test - * case to skip if the incoming flag is false. - * @param string $shouldnt_skip Condition causing the tests to be run. - * @param string $message Text of skip condition. - * @access public - */ - function skipUnless($shouldnt_skip, $message = false) { - $this->skipIf(! $shouldnt_skip, $message); - } - - /** - * Used to invoke the single tests. - * @return SimpleInvoker Individual test runner. - * @access public - */ - function createInvoker() { - return new SimpleExceptionTrappingInvoker( - new SimpleErrorTrappingInvoker(new SimpleInvoker($this))); - } - - /** - * Uses reflection to run every method within itself - * starting with the string "test" unless a method - * is specified. - * @param SimpleReporter $reporter Current test reporter. - * @return boolean True if all tests passed. - * @access public - */ - function run($reporter) { - $context = SimpleTest::getContext(); - $context->setTest($this); - $context->setReporter($reporter); - $this->reporter = $reporter; - $started = false; - foreach ($this->getTests() as $method) { - if ($reporter->shouldInvoke($this->getLabel(), $method)) { - $this->skip(); - if ($this->should_skip) { - break; - } - if (! $started) { - $reporter->paintCaseStart($this->getLabel()); - $started = true; - } - $invoker = $this->reporter->createInvoker($this->createInvoker()); - $invoker->before($method); - $invoker->invoke($method); - $invoker->after($method); - } - } - if ($started) { - $reporter->paintCaseEnd($this->getLabel()); - } - unset($this->reporter); - return $reporter->getStatus(); - } - - /** - * Gets a list of test names. Normally that will - * be all internal methods that start with the - * name "test". This method should be overridden - * if you want a different rule. - * @return array List of test names. - * @access public - */ - function getTests() { - $methods = array(); - foreach (get_class_methods(get_class($this)) as $method) { - if ($this->isTest($method)) { - $methods[] = $method; - } - } - return $methods; - } - - /** - * Tests to see if the method is a test that should - * be run. Currently any method that starts with 'test' - * is a candidate unless it is the constructor. - * @param string $method Method name to try. - * @return boolean True if test method. - * @access protected - */ - protected function isTest($method) { - if (strtolower(substr($method, 0, 4)) == 'test') { - return ! SimpleTestCompatibility::isA($this, strtolower($method)); - } - return false; - } - - /** - * Announces the start of the test. - * @param string $method Test method just started. - * @access public - */ - function before($method) { - $this->reporter->paintMethodStart($method); - $this->observers = array(); - } - - /** - * Sets up unit test wide variables at the start - * of each test method. To be overridden in - * actual user test cases. - * @access public - */ - function setUp() { - } - - /** - * Clears the data set in the setUp() method call. - * To be overridden by the user in actual user test cases. - * @access public - */ - function tearDown() { - } - - /** - * Announces the end of the test. Includes private clean up. - * @param string $method Test method just finished. - * @access public - */ - function after($method) { - for ($i = 0; $i < count($this->observers); $i++) { - $this->observers[$i]->atTestEnd($method, $this); - } - $this->reporter->paintMethodEnd($method); - } - - /** - * Sets up an observer for the test end. - * @param object $observer Must have atTestEnd() - * method. - * @access public - */ - function tell($observer) { - $this->observers[] = &$observer; - } - - /** - * @deprecated - */ - function pass($message = "Pass") { - if (! isset($this->reporter)) { - trigger_error('Can only make assertions within test methods'); - } - $this->reporter->paintPass( - $message . $this->getAssertionLine()); - return true; - } - - /** - * Sends a fail event with a message. - * @param string $message Message to send. - * @access public - */ - function fail($message = "Fail") { - if (! isset($this->reporter)) { - trigger_error('Can only make assertions within test methods'); - } - $this->reporter->paintFail( - $message . $this->getAssertionLine()); - return false; - } - - /** - * Formats a PHP error and dispatches it to the - * reporter. - * @param integer $severity PHP error code. - * @param string $message Text of error. - * @param string $file File error occoured in. - * @param integer $line Line number of error. - * @access public - */ - function error($severity, $message, $file, $line) { - if (! isset($this->reporter)) { - trigger_error('Can only make assertions within test methods'); - } - $this->reporter->paintError( - "Unexpected PHP error [$message] severity [$severity] in [$file line $line]"); - } - - /** - * Formats an exception and dispatches it to the - * reporter. - * @param Exception $exception Object thrown. - * @access public - */ - function exception($exception) { - $this->reporter->paintException($exception); - } - - /** - * For user defined expansion of the available messages. - * @param string $type Tag for sorting the signals. - * @param mixed $payload Extra user specific information. - */ - function signal($type, $payload) { - if (! isset($this->reporter)) { - trigger_error('Can only make assertions within test methods'); - } - $this->reporter->paintSignal($type, $payload); - } - - /** - * Runs an expectation directly, for extending the - * tests with new expectation classes. - * @param SimpleExpectation $expectation Expectation subclass. - * @param mixed $compare Value to compare. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assert($expectation, $compare, $message = '%s') { - if ($expectation->test($compare)) { - return $this->pass(sprintf( - $message, - $expectation->overlayMessage($compare, $this->reporter->getDumper()))); - } else { - return $this->fail(sprintf( - $message, - $expectation->overlayMessage($compare, $this->reporter->getDumper()))); - } - } - - /** - * Uses a stack trace to find the line of an assertion. - * @return string Line number of first assert* - * method embedded in format string. - * @access public - */ - function getAssertionLine() { - $trace = new SimpleStackTrace(array('assert', 'expect', 'pass', 'fail', 'skip')); - return $trace->traceMethod(); - } - - /** - * Sends a formatted dump of a variable to the - * test suite for those emergency debugging - * situations. - * @param mixed $variable Variable to display. - * @param string $message Message to display. - * @return mixed The original variable. - * @access public - */ - function dump($variable, $message = false) { - $dumper = $this->reporter->getDumper(); - $formatted = $dumper->dump($variable); - if ($message) { - $formatted = $message . "\n" . $formatted; - } - $this->reporter->paintFormattedMessage($formatted); - return $variable; - } - - /** - * Accessor for the number of subtests including myelf. - * @return integer Number of test cases. - * @access public - */ - function getSize() { - return 1; - } -} - -/** - * Helps to extract test cases automatically from a file. - */ -class SimpleFileLoader { - - /** - * Builds a test suite from a library of test cases. - * The new suite is composed into this one. - * @param string $test_file File name of library with - * test case classes. - * @return TestSuite The new test suite. - * @access public - */ - function load($test_file) { - $existing_classes = get_declared_classes(); - $existing_globals = get_defined_vars(); - include_once($test_file); - $new_globals = get_defined_vars(); - $this->makeFileVariablesGlobal($existing_globals, $new_globals); - $new_classes = array_diff(get_declared_classes(), $existing_classes); - if (empty($new_classes)) { - $new_classes = $this->scrapeClassesFromFile($test_file); - } - $classes = $this->selectRunnableTests($new_classes); - return $this->createSuiteFromClasses($test_file, $classes); - } - - /** - * Imports new variables into the global namespace. - * @param hash $existing Variables before the file was loaded. - * @param hash $new Variables after the file was loaded. - * @access private - */ - protected function makeFileVariablesGlobal($existing, $new) { - $globals = array_diff(array_keys($new), array_keys($existing)); - foreach ($globals as $global) { - $_GLOBALS[$global] = $new[$global]; - } - } - - /** - * Lookup classnames from file contents, in case the - * file may have been included before. - * Note: This is probably too clever by half. Figuring this - * out after a failed test case is going to be tricky for us, - * never mind the user. A test case should not be included - * twice anyway. - * @param string $test_file File name with classes. - * @access private - */ - protected function scrapeClassesFromFile($test_file) { - preg_match_all('~^\s*class\s+(\w+)(\s+(extends|implements)\s+\w+)*\s*\{~mi', - file_get_contents($test_file), - $matches ); - return $matches[1]; - } - - /** - * Calculates the incoming test cases. Skips abstract - * and ignored classes. - * @param array $candidates Candidate classes. - * @return array New classes which are test - * cases that shouldn't be ignored. - * @access public - */ - function selectRunnableTests($candidates) { - $classes = array(); - foreach ($candidates as $class) { - if (TestSuite::getBaseTestCase($class)) { - $reflection = new SimpleReflection($class); - if ($reflection->isAbstract()) { - SimpleTest::ignore($class); - } else { - $classes[] = $class; - } - } - } - return $classes; - } - - /** - * Builds a test suite from a class list. - * @param string $title Title of new group. - * @param array $classes Test classes. - * @return TestSuite Group loaded with the new - * test cases. - * @access public - */ - function createSuiteFromClasses($title, $classes) { - if (count($classes) == 0) { - $suite = new BadTestSuite($title, "No runnable test cases in [$title]"); - return $suite; - } - SimpleTest::ignoreParentsIfIgnored($classes); - $suite = new TestSuite($title); - foreach ($classes as $class) { - if (! SimpleTest::isIgnored($class)) { - $suite->add($class); - } - } - return $suite; - } -} - -/** - * This is a composite test class for combining - * test cases and other RunnableTest classes into - * a group test. - * @package SimpleTest - * @subpackage UnitTester - */ -class TestSuite { - private $label; - private $test_cases; - - /** - * Sets the name of the test suite. - * @param string $label Name sent at the start and end - * of the test. - * @access public - */ - function TestSuite($label = false) { - $this->label = $label; - $this->test_cases = array(); - } - - /** - * Accessor for the test name for subclasses. If the suite - * wraps a single test case the label defaults to the name of that test. - * @return string Name of the test. - * @access public - */ - function getLabel() { - if (! $this->label) { - return ($this->getSize() == 1) ? - get_class($this->test_cases[0]) : get_class($this); - } else { - return $this->label; - } - } - - /** - * Adds a test into the suite by instance or class. The class will - * be instantiated if it's a test suite. - * @param SimpleTestCase $test_case Suite or individual test - * case implementing the - * runnable test interface. - * @access public - */ - function add($test_case) { - if (! is_string($test_case)) { - $this->test_cases[] = $test_case; - } elseif (TestSuite::getBaseTestCase($test_case) == 'testsuite') { - $this->test_cases[] = new $test_case(); - } else { - $this->test_cases[] = $test_case; - } - } - - /** - * Builds a test suite from a library of test cases. - * The new suite is composed into this one. - * @param string $test_file File name of library with - * test case classes. - * @access public - */ - function addFile($test_file) { - $extractor = new SimpleFileLoader(); - $this->add($extractor->load($test_file)); - } - - /** - * Delegates to a visiting collector to add test - * files. - * @param string $path Path to scan from. - * @param SimpleCollector $collector Directory scanner. - * @access public - */ - function collect($path, $collector) { - $collector->collect($this, $path); - } - - /** - * Invokes run() on all of the held test cases, instantiating - * them if necessary. - * @param SimpleReporter $reporter Current test reporter. - * @access public - */ - function run($reporter) { - $reporter->paintGroupStart($this->getLabel(), $this->getSize()); - for ($i = 0, $count = count($this->test_cases); $i < $count; $i++) { - if (is_string($this->test_cases[$i])) { - $class = $this->test_cases[$i]; - $test = new $class(); - $test->run($reporter); - unset($test); - } else { - $this->test_cases[$i]->run($reporter); - } - } - $reporter->paintGroupEnd($this->getLabel()); - return $reporter->getStatus(); - } - - /** - * Number of contained test cases. - * @return integer Total count of cases in the group. - * @access public - */ - function getSize() { - $count = 0; - foreach ($this->test_cases as $case) { - if (is_string($case)) { - if (! SimpleTest::isIgnored($case)) { - $count++; - } - } else { - $count += $case->getSize(); - } - } - return $count; - } - - /** - * Test to see if a class is derived from the - * SimpleTestCase class. - * @param string $class Class name. - * @access public - */ - static function getBaseTestCase($class) { - while ($class = get_parent_class($class)) { - $class = strtolower($class); - if ($class == 'simpletestcase' || $class == 'testsuite') { - return $class; - } - } - return false; - } -} - -/** - * This is a failing group test for when a test suite hasn't - * loaded properly. - * @package SimpleTest - * @subpackage UnitTester - */ -class BadTestSuite { - private $label; - private $error; - - /** - * Sets the name of the test suite and error message. - * @param string $label Name sent at the start and end - * of the test. - * @access public - */ - function BadTestSuite($label, $error) { - $this->label = $label; - $this->error = $error; - } - - /** - * Accessor for the test name for subclasses. - * @return string Name of the test. - * @access public - */ - function getLabel() { - return $this->label; - } - - /** - * Sends a single error to the reporter. - * @param SimpleReporter $reporter Current test reporter. - * @access public - */ - function run($reporter) { - $reporter->paintGroupStart($this->getLabel(), $this->getSize()); - $reporter->paintFail('Bad TestSuite [' . $this->getLabel() . - '] with error [' . $this->error . ']'); - $reporter->paintGroupEnd($this->getLabel()); - return $reporter->getStatus(); - } - - /** - * Number of contained test cases. Always zero. - * @return integer Total count of cases in the group. - * @access public - */ - function getSize() { - return 0; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/Expectations.pkg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/Expectations.pkg deleted file mode 100644 index 3ea6ec4f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/Expectations.pkg +++ /dev/null @@ -1,319 +0,0 @@ - - - -Expectations - - - {@toc} - - -More control over mock objects - - The default behaviour of the - {@link mock objects.html mock objects} - in - {@link http://sourceforge.net/projects/simpletest/ SimpleTest} - is either an identical match on the argument or to allow any argument at all. - For almost all tests this is sufficient. - Sometimes, though, you want to weaken a test case. - - - One place where a test can be too tightly coupled is with - text matching. - Suppose we have a component that outputs a helpful error - message when something goes wrong. - You want to test that the correct error was sent, but the actual - text may be rather long. - If you test for the text exactly, then every time the exact wording - of the message changes, you will have to go back and edit the test suite. - - - For example, suppose we have a news service that has failed - to connect to its remote source. - -class NewsService { - ... - function publish(&$writer) { - if (! $this->isConnected()) { - $writer->write('Cannot connect to news service "' . - $this->_name . '" at this time. ' . - 'Please try again later.'); - } - ... - } -} - - Here it is sending its content to a - Writer class. - We could test this behaviour with a - MockWriter like so... - -class TestOfNewsService extends UnitTestCase { - ... - function testConnectionFailure() { - $writer = &new MockWriter($this); - $writer->expectOnce('write', array( - 'Cannot connect to news service ' . - '"BBC News" at this time. ' . - 'Please try again later.')); - - $service = &new NewsService('BBC News'); - $service->publish($writer); - - $writer->tally(); - } -} - - This is a good example of a brittle test. - If we decide to add additional instructions, such as - suggesting an alternative news source, we will break - our tests even though no underlying functionality - has been altered. - - - To get around this, we would like to do a regular expression - test rather than an exact match. - We can actually do this with... - -class TestOfNewsService extends UnitTestCase { - ... - function testConnectionFailure() { - $writer = &new MockWriter($this); - $writer->expectOnce( - 'write', - array(new WantedPatternExpectation('/cannot connect/i'))); - - $service = &new NewsService('BBC News'); - $service->publish($writer); - - $writer->tally(); - } -} - - Instead of passing in the expected parameter to the - MockWriter we pass an - expectation class called - WantedPatternExpectation. - The mock object is smart enough to recognise this as special - and to treat it differently. - Rather than simply comparing the incoming argument to this - object, it uses the expectation object itself to - perform the test. - - - The WantedPatternExpectation takes - the regular expression to match in its constructor. - Whenever a comparison is made by the MockWriter - against this expectation class, it will do a - preg_match() with this pattern. - With our test case above, as long as "cannot connect" - appears in the text of the string, the mock will issue a pass - to the unit tester. - The rest of the text does not matter. - - - The possible expectation classes are... - - - - -EqualExpectation - -An equality, rather than the stronger identity comparison - - - -NotEqualExpectation - -An inequality comparison - - - -IndenticalExpectation - -The default mock object check which must match exactly - - - -NotIndenticalExpectation - -Inverts the mock object logic - - - -WantedPatternExpectation - -Uses a Perl Regex to match a string - - - -NoUnwantedPatternExpectation - -Passes only if failing a Perl Regex - - - -IsAExpectation - -Checks the type or class name only - - - -NotAExpectation - -Opposite of the IsAExpectation - - - - -MethodExistsExpectation - -Checks a method is available on an object - - -
    - Most take the expected value in the constructor. - The exceptions are the pattern matchers, which take a regular expression, - and the IsAExpectation and NotAExpectation which takes a type - or class name as a string. -
    -
    - -Using expectations to control stubs - - The expectation classes can be used not just for sending assertions - from mock objects, but also for selecting behaviour for either - the - {@link mock objects.html mock objects} - or the - {@link server stubs.html server stubs}. - Anywhere a list of arguments is given, a list of expectation objects - can be inserted instead. - - - Suppose we want an authorisation server stub to simulate a successful login - only if it receives a valid session object. - We can do this as follows... - -Stub::generate('Authorisation'); - -$authorisation = new StubAuthorisation(); -$authorisation->setReturnValue( - 'isAllowed', - true, - array(new IsAExpectation('Session', 'Must be a session'))); -$authorisation->setReturnValue('isAllowed', false); - - We have set the default stub behaviour to return false when - isAllowed is called. - When we call the method with a single parameter that - is a Session object, it will return true. - We have also added a second parameter as a message. - This will be displayed as part of the mock object - failure message if this expectation is the cause of - a failure. - - - This kind of sophistication is rarely useful, but is included for - completeness. - - - -Creating your own expectations - - The expectation classes have a very simple structure. - So simple that it is easy to create your own versions for - commonly used test logic. - - - As an example here is the creation of a class to test for - valid IP addresses. - In order to work correctly with the stubs and mocks the new - expectation class should extend - SimpleExpectation... - -class ValidIp extends SimpleExpectation { - - function test($ip) { - return (ip2long($ip) != -1); - } - - function testMessage($ip) { - return "Address [$ip] should be a valid IP address"; - } -} - - There are only two methods to implement. - The test() method should - evaluate to true if the expectation is to pass, and - false otherwise. - The testMessage() method - should simply return some helpful text explaining the test - that was carried out. - - - This class can now be used in place of the earlier expectation - classes. - - - -Under the bonnet of the unit tester - - The {@link http://sourceforge.net/projects/simpletest/ SimpleTest unit testing framework} - also uses the expectation classes internally for the - {@link UnitTestCase class.html UnitTestCase class}. - We can also take advantage of these mechanisms to reuse our - homebrew expectation classes within the test suites directly. - - - The most crude way of doing this is to use the - SimpleTest::assertExpectation() method to - test against it directly... - -class TestOfNetworking extends UnitTestCase { - ... - function testGetValidIp() { - $server = &new Server(); - $this->assertExpectation( - new ValidIp(), - $server->getIp(), - 'Server IP address->%s'); - } -} - - This is a little untidy compared with our usual - assert...() syntax. - - - For such a simple case we would normally create a - separate assertion method on our test case rather - than bother using the expectation class. - If we pretend that our expectation is a little more - complicated for a moment, so that we want to reuse it, - we get... - -class TestOfNetworking extends UnitTestCase { - ... - function assertValidIp($ip, $message = '%s') { - $this->assertExpectation(new ValidIp(), $ip, $message); - } - - function testGetValidIp() { - $server = &new Server(); - $this->assertValidIp( - $server->getIp(), - 'Server IP address->%s'); - } -} - - It is unlikely we would ever need this degree of control - over the testing machinery. - It is rare to need the expectations for more than pattern - matching. - Also, complex expectation classes could make the tests - harder to read and debug. - These mechanisms are really of most use to authors of systems - that will extend the test framework to create their own tool set. - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/FormTesting.pkg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/FormTesting.pkg deleted file mode 100644 index e9a43309..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/FormTesting.pkg +++ /dev/null @@ -1,218 +0,0 @@ - - - -Testing forms - - - {@toc} - - -Submitting a simple form - - When a page is fetched by the WebTestCase - using get() or - post() the page content is - automatically parsed. - This results in any form controls that are inside <form> tags - being available from within the test case. - For example, if we have this snippet of HTML... -
    -<form>
    -    <input type="text" name="a" value="A default" />
    -    <input type="submit" value="Go" />
    -</form>
    -
    - Which looks like this... -
    - -
    - - -
    -
    - - We can navigate to this code, via the - {@link http://www.lastcraft.com/form_testing_documentation.php LastCraft} - site, with the following test... - -class SimpleFormTests extends WebTestCase { - - function testDefaultValue() { - $this->get('http://www.lastcraft.com/form_testing_documentation.php'); - $this->assertField('a', 'A default'); - } -} - - Immediately after loading the page all of the HTML controls are set at - their default values just as they would appear in the web browser. - The assertion tests that a HTML widget exists in the page with the - name "a" and that it is currently set to the value - "A default" - - - We could submit the form straight away, but first we'll change - the value of the text field and only then submit it... - -class SimpleFormTests extends WebTestCase { - - function testDefaultValue() { - $this->get('http://www.my-site.com/'); - $this->assertField('a', 'A default'); - $this->setField('a', 'New value'); - $this->clickSubmit('Go'); - } -} - - Because we didn't specify a method attribute on the form tag, and - didn't specify an action either, the test case will follow - the usual browser behaviour of submitting the form data as a GET - request back to the same location. - SimpleTest tries to emulate typical browser behaviour as much as possible, - rather than attempting to catch missing attributes on tags. - This is because the target of the testing framework is the PHP application - logic, not syntax or other errors in the HTML code. - For HTML errors, other tools such as - {@link http://www.w3.org/People/Raggett/tidy/ HTMLTidy} should be used. - - - If a field is not present in any form, or if an option is unavailable, - then WebTestCase::setField() will return - false. - For example, suppose we wish to verify that a "Superuser" - option is not present in this form... -
    -<strong>Select type of user to add:</strong>
    -<select name="type">
    -    <option>Subscriber</option>
    -    <option>Author</option>
    -    <option>Administrator</option>
    -</select>
    -
    - Which looks like... -
    - -
    - Select type of user to add: - -
    -
    - - The following test will confirm it... - -class SimpleFormTests extends WebTestCase { - ... - function testNoSuperuserChoiceAvailable() { - $this->get('http://www.lastcraft.com/form_testing_documentation.php'); - $this->assertFalse($this->setField('type', 'Superuser')); - } -} - - The selection will not be changed on a failure to set - a widget value. - - - Here is the full list of widgets currently supported... -
      -
    • Text fields, including hidden and password fields.
    • -
    • Submit buttons including the button tag, although not yet reset buttons
    • -
    • Text area. This includes text wrapping behaviour.
    • -
    • Checkboxes, including multiple checkboxes in the same form.
    • -
    • Drop down selections, including multiple selects.
    • -
    • Radio buttons.
    • -
    • Images.
    • -
    -
    - - Although most standard HTML widgets are catered for by SimpleTest's - built in parser, it is unlikely that JavaScript will be implemented - anytime soon. - -
    - -Fields with multiple values - - SimpleTest can cope with two types of multivalue controls: Multiple - selection drop downs, and multiple checkboxes with the same name - within a form. - The multivalue nature of these means that setting and testing - are slightly different. - Using checkboxes as an example... -
    -<form class="demo">
    -    <strong>Create privileges allowed:</strong>
    -    <input type="checkbox" name="crud" value="c" checked><br>
    -    <strong>Retrieve privileges allowed:</strong>
    -    <input type="checkbox" name="crud" value="r" checked><br>
    -    <strong>Update privileges allowed:</strong>
    -    <input type="checkbox" name="crud" value="u" checked><br>
    -    <strong>Destroy privileges allowed:</strong>
    -    <input type="checkbox" name="crud" value="d" checked><br>
    -    <input type="submit" value="Enable Privileges">
    -</form>
    -
    - Which renders as... -
    - -
    - Create privileges allowed: - -
    - Retrieve privileges allowed: - -
    - Update privileges allowed: - -
    - Destroy privileges allowed: - -
    - -
    -
    - - If we wish to disable all but the retrieval privileges and - submit this information we can do it like this... - -class SimpleFormTests extends WebTestCase { - ... - function testDisableNastyPrivileges() { - $this->get('http://www.lastcraft.com/form_testing_documentation.php'); - $this->assertField('crud', array('c', 'r', 'u', 'd')); - $this->setField('crud', array('r')); - $this->clickSubmit('Enable Privileges'); - } -} - - Instead of setting the field to a single value, we give it a list - of values. - We do the same when testing expected values. - We can then write other test code to confirm the effect of this, perhaps - by logging in as that user and attempting an update. - - - Raw posting - - - If you want to test a form handler, but have not yet written - or do not have access to the form itself, you can create a - form submission by hand. - -class SimpleFormTests extends WebTestCase { - ... - function testAttemptedHack() { - $this->post( - 'http://www.my-site.com/add_user.php', - array('type' => 'superuser')); - $this->assertNoUnwantedPattern('/user created/i'); - } -} - - By adding data to the WebTestCase::post() - method, we are attempting to fetch the page as a form submission. - -
    -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/GroupTests.pkg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/GroupTests.pkg deleted file mode 100644 index a695f5db..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/GroupTests.pkg +++ /dev/null @@ -1,297 +0,0 @@ - - - -Group tests - - - {@toc} - - -Grouping tests - - To run test cases as part of a group the test cases should really - be placed in files without the runner code... - -<?php - require_once('../classes/io.php'); - - class FileTester extends UnitTestCase { - ... - } - - class SocketTester extends UnitTestCase { - ... - } -?> - - As many cases as needed can appear in a single file. - They should include any code they need, such as the library - being tested, but none of the simple test libraries. - - - If you have extended any test cases, you can include them - as well. - -<?php - require_once('../classes/io.php'); - - class MyFileTestCase extends UnitTestCase { - ... - } - SimpleTestOptions::ignore('MyFileTestCase'); - - class FileTester extends MyFileTestCase { - ... - } - - class SocketTester extends UnitTestCase { - ... - } -?> - - The FileTester class does - not contain any actual tests, but is a base class for other - test cases. - For this reason we use the - SimpleTestOptions::ignore() directive - to tell the upcoming group test to ignore it. - This directive can appear anywhere in the file and works - when a whole file of test cases is loaded (see below). - We will call this sample file_test.php. - - - Next we create a group test file, called say group_test.php. - You will think of a better name I am sure. - We will add the test file using a safe method... - -<?php - require_once('simpletest/unit_tester.php'); - require_once('simpletest/reporter.php'); - require_once('file_test.php'); - - $test = &new GroupTest('All file tests'); - $test->addTestCase(new FileTestCase()); - $test->run(new HtmlReporter()); -?> - - This instantiates the test case before the test suite is - run. - This could get a little expensive with a large number of test - cases, so another method is provided that will only - instantiate the class when it is needed... - -<?php - require_once('simpletest/unit_tester.php'); - require_once('simpletest/reporter.php'); - require_once('file_test.php'); - - $test = &new GroupTest('All file tests'); - $test->addTestClass('FileTestCase'); - $test->run(new HtmlReporter()); -?> - - The problem with this method is that for every test case - that we add we will have - to require_once() the test code - file and manually instantiate each and every test case. - We can save a lot of typing with... - -<?php - require_once('simpletest/unit_tester.php'); - require_once('simpletest/reporter.php'); - - $test = &new GroupTest('All file tests'); - $test->addTestFile('file_test.php'); - $test->run(new HtmlReporter()); -?&gt; - - What happens here is that the GroupTest - class has done the require_once() - for us. - It then checks to see if any new test case classes - have been created by the new file and automatically adds - them to the group test. - Now all we have to do is add each new file. - - - There are two things that could go wrong and which require care... -
      -
    1. - The file could already have been parsed by PHP and so no - new classes will have been added. You should make - sure that the test cases are only included in this file - and no others. -
    2. -
    3. - New test case extension classes that get included will be - placed in the group test and run also. - You will need to add a SimpleTestOptions::ignore() - directive for these classes or make sure that they are included - before the GroupTest::addTestFile() - line. -
    4. -
    -
    -
    - -Higher groupings - - The above method places all of the test cases into one large group. - For larger projects though this may not be flexible enough; you - may want to group the tests in all sorts of ways. - - - To get a more flexible group test we can subclass - GroupTest and then instantiate it as needed... - -<?php - require_once('simpletest/unit_tester.php'); - require_once('simpletest/reporter.php'); - - class FileGroupTest extends GroupTest { - function FileGroupTest() { - $this->GroupTest('All file tests'); - $this->addTestFile('file_test.php'); - } - } -?> - - This effectively names the test in the constructor and then - adds our test cases and a single group below. - Of course we can add more than one group at this point. - We can now invoke the tests from a separate runner file... - -<?php - require_once('file_group_test.php'); - - $test = &new FileGroupTest(); - $test->run(new HtmlReporter()); -?> - - ...or we can group them into even larger group tests... - -<?php - require_once('file_group_test.php'); - - $test = &new BigGroupTest('Big group'); - $test->addTestCase(new FileGroupTest()); - $test->addTestCase(...); - $test->run(new HtmlReporter()); -?> - - If we still wish to run the original group test and we - don't want all of these little runner files, we can - put the test runner code around guard bars when we create - each group. - -<?php - class FileGroupTest extends GroupTest { - function FileGroupTest() { - $this->GroupTest('All file tests'); - $test->addTestFile('file_test.php'); - } - } - - if (! defined('RUNNER')) { - define('RUNNER', true); - $test = &new FileGroupTest(); - $test->run(new HtmlReporter()); - } -?> - - This approach requires the guard to be set when including - the group test file, but this is still less hassle than - lots of separate runner files. - You include the same guard on the top level tests to make sure - that run() will run once only - from the top level script that has been invoked. - -<?php - define('RUNNER', true); - require_once('file_group_test.php'); - - $test = &new BigGroupTest('Big group'); - $test->addTestCase(new FileGroupTest()); - $test->addTestCase(...); - $test->run(new HtmlReporter()); -?> - - As with the normal test cases, a GroupTest can - be loaded with the GroupTest::addTestFile() method. - -<?php - define('RUNNER', true); - - $test = &new BigGroupTest('Big group'); - $test->addTestFile('file_group_test.php'); - $test->addTestFile(...); - $test->run(new HtmlReporter()); -?> - - - - -Integrating legacy test cases - - If you already have unit tests for your code or are extending external - classes that have tests, it is unlikely that all of the test cases - are in SimpleTest format. - Fortunately it is possible to incorporate test cases from other - unit testers directly into SimpleTest group tests. - - - Say we have the following - {@link http://sourceforge.net/projects/phpunit PhpUnit} - test case in the file config_test.php... - -class ConfigFileTest extends TestCase { - function ConfigFileTest() { - $this->TestCase('Config file test'); - } - - function testContents() { - $config = new ConfigFile('test.conf'); - $this->assertRegexp('/me/', $config->getValue('username')); - } -} - - The group test can recognise this as long as we include - the appropriate adapter class before we add the test - file... - -<?php - require_once('simpletest/unit_tester.php'); - require_once('simpletest/reporter.php'); - require_once('simpletest/adapters/phpunit_test_case.php'); - - $test = &new GroupTest('All file tests'); - $test->addTestFile('config_test.php'); - $test->run(new HtmlReporter()); -?> - - There are only two adapters, the other is for the - {@link http://pear.php.net/manual/en/package.php.phpunit.php PEAR} - 1.0 unit tester... - -<?php - require_once('simpletest/unit_tester.php'); - require_once('simpletest/reporter.php'); - require_once('simpletest/adapters/pear_test_case.php'); - - $test = &new GroupTest('All file tests'); - $test->addTestFile('some_pear_test_cases.php'); - $test->run(new HtmlReporter()); -?> - - The PEAR test cases can be freely mixed with SimpleTest - ones even in the same test file, - but you cannot use SimpleTest assertions in the legacy - test case versions. - This is done as a check that you are not accidently making - your test cases completely dependent on SimpleTest. - You may want to do a PEAR release of your library for example - which would mean shipping it with valid PEAR::PhpUnit test - cases. - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/MockObjects.pkg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/MockObjects.pkg deleted file mode 100644 index b22413a6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/MockObjects.pkg +++ /dev/null @@ -1,663 +0,0 @@ - - - -Mock objects - - - {@toc} - - -What are mock objects? - - Mock objects have two roles during a test case: actor and critic. - - - The actor behaviour is to simulate objects that are difficult to - set up or time consuming to set up for a test. - The classic example is a database connection. - Setting up a test database at the start of each test would slow - testing to a crawl and would require the installation of the - database engine and test data on the test machine. - If we can simulate the connection and return data of our - choosing we not only win on the pragmatics of testing, but can - also feed our code spurious data to see how it responds. - We can simulate databases being down or other extremes - without having to create a broken database for real. - In other words, we get greater control of the test environment. - - - If mock objects only behaved as actors they would simply be - known as {@link server stubs.html server stubs}. - - - However, the mock objects not only play a part (by supplying chosen - return values on demand) they are also sensitive to the - messages sent to them (via expectations). - By setting expected parameters for a method call they act - as a guard that the calls upon them are made correctly. - If expectations are not met they save us the effort of - writing a failed test assertion by performing that duty on our - behalf. - In the case of an imaginary database connection they can - test that the query, say SQL, was correctly formed by - the object that is using the connection. - Set them up with fairly tight expectations and you will - hardly need manual assertions at all. - - - -Creating mock objects - - In the same way that we create server stubs, all we need is an - existing class, say a database connection that looks like this... - -class DatabaseConnection { - function DatabaseConnection() { - } - - function query() { - } - - function selectQuery() { - } -} - - The class does not need to have been implemented yet. - To create a mock version of the class we need to include the - mock object library and run the generator... - -require_once('simpletest/unit_tester.php'); -require_once('simpletest/mock_objects.php'); -require_once('database_connection.php'); - -Mock::generate('DatabaseConnection'); - - This generates a clone class called - MockDatabaseConnection. - We can now create instances of the new class within - our test case... - -require_once('simpletest/unit_tester.php'); -require_once('simpletest/mock_objects.php'); -require_once('database_connection.php'); - -Mock::generate('DatabaseConnection'); - -class MyTestCase extends UnitTestCase { - - function testSomething() { - $connection = &new MockDatabaseConnection($this); - } -} - - Unlike the generated stubs the mock constructor needs a reference - to the test case so that it can dispatch passes and failures while - checking its expectations. - This means that mock objects can only be used within test cases. - Despite this their extra power means that stubs are hardly ever used - if mocks are available. - - - Mocks as actors - - - The mock version of a class has all the methods of the original - so that operations like - $connection->query() are still - legal. - As with stubs we can replace the default null return values... - -$connection->setReturnValue('query', 37); - - Now every time we call - $connection->query() we get - the result of 37. - As with the stubs we can set wildcards and we can overload the - wildcard parameter. - We can also add extra methods to the mock when generating it - and choose our own class name... - -Mock::generate('DatabaseConnection', 'MyMockDatabaseConnection', array('setOptions')); - - Here the mock will behave as if the setOptions() - existed in the original class. - This is handy if a class has used the PHP overload() - mechanism to add dynamic methods. - You can create a special mock to simulate this situation. - - - All of the patterns available with server stubs are available - to mock objects... - -class Iterator { - function Iterator() { - } - - function next() { - } -} - - Again, assuming that this iterator only returns text until it - reaches the end, when it returns false, we can simulate it - with... - -Mock::generate('Iterator'); - -class IteratorTest extends UnitTestCase() { - - function testASequence() { - $iterator = &new MockIterator($this); - $iterator->setReturnValue('next', false); - $iterator->setReturnValueAt(0, 'next', 'First string'); - $iterator->setReturnValueAt(1, 'next', 'Second string'); - ... - } -} - - When next() is called on the - mock iterator it will first return "First string", - on the second call "Second string" will be returned - and on any other call false will - be returned. - The sequenced return values take precedence over the constant - return value. - The constant one is a kind of default if you like. - - - A repeat of the stubbed information holder with name/value pairs... - -class Configuration { - function Configuration() { - } - - function getValue($key) { - } -} - - This is a classic situation for using mock objects as - actual configuration will vary from machine to machine, - hardly helping the reliability of our tests if we use it - directly. - The problem though is that all the data comes through the - getValue() method and yet - we want different results for different keys. - Luckily the mocks have a filter system... - -$config = &new MockConfiguration($this); -$config->setReturnValue('getValue', 'primary', array('db_host')); -$config->setReturnValue('getValue', 'admin', array('db_user')); -$config->setReturnValue('getValue', 'secret', array('db_password')); - - The extra parameter is a list of arguments to attempt - to match. - In this case we are trying to match only one argument which - is the look up key. - Now when the mock object has the - getValue() method invoked - like this... - -$config->getValue('db_user') - - ...it will return "admin". - It finds this by attempting to match the calling arguments - to its list of returns one after another until - a complete match is found. - - - There are times when you want a specific object to be - dished out by the mock rather than a copy. - Again this is identical to the server stubs mechanism... - -class Thing { -} - -class Vector { - function Vector() { - } - - function get($index) { - } -} - - In this case you can set a reference into the mock's - return list... - -$thing = new Thing(); -$vector = &new MockVector($this); -$vector->setReturnReference('get', $thing, array(12)); - - With this arrangement you know that every time - $vector->get(12) is - called it will return the same - $thing each time. - - - -Mocks as critics - - Although the server stubs approach insulates your tests from - real world disruption, it is only half the benefit. - You can have the class under test receiving the required - messages, but is your new class sending correct ones? - Testing this can get messy without a mock objects library. - - - By way of example, suppose we have a - SessionPool class that we - want to add logging to. - Rather than grow the original class into something more - complicated, we want to add this behaviour with a decorator (GOF). - The SessionPool code currently looks - like this... - -class SessionPool { - function SessionPool() { - ... - } - - function &findSession($cookie) { - ... - } - ... -} - -class Session { - ... -} -</php> - While our logging code looks like this... -<php> -class Log { - function Log() { - ... - } - - function message() { - ... - } -} - -class LoggingSessionPool { - function LoggingSessionPool(&$session_pool, &$log) { - ... - } - - function &findSession(\$cookie) { - ... - } - ... -} - - Out of all of this, the only class we want to test here - is the LoggingSessionPool. - In particular we would like to check that the - findSession() method is - called with the correct session ID in the cookie and that - it sent the message "Starting session $cookie" - to the logger. - - - Despite the fact that we are testing only a few lines of - production code, here is what we would have to do in a - conventional test case: -
      -
    1. Create a log object.
    2. -
    3. Set a directory to place the log file.
    4. -
    5. Set the directory permissions so we can write the log.
    6. -
    7. Create a SessionPool object.
    8. -
    9. Hand start a session, which probably does lot's of things.
    10. -
    11. Invoke findSession().
    12. -
    13. Read the new Session ID (hope there is an accessor!).
    14. -
    15. Raise a test assertion to confirm that the ID matches the cookie.
    16. -
    17. Read the last line of the log file.
    18. -
    19. Pattern match out the extra logging timestamps, etc.
    20. -
    21. Assert that the session message is contained in the text.
    22. -
    - It is hardly surprising that developers hate writing tests - when they are this much drudgery. - To make things worse, every time the logging format changes or - the method of creating new sessions changes, we have to rewrite - parts of this test even though this test does not officially - test those parts of the system. - We are creating headaches for the writers of these other classes. -
    - - Instead, here is the complete test method using mock object magic... - -Mock::generate('Session'); -Mock::generate('SessionPool'); -Mock::generate('Log'); - -class LoggingSessionPoolTest extends UnitTestCase { - ... - function testFindSessionLogging() { - $session = &new MockSession($this); - $pool = &new MockSessionPool($this); - $pool->setReturnReference('findSession', $session); - $pool->expectOnce('findSession', array('abc')); - - $log = &new MockLog($this); - $log->expectOnce('message', array('Starting session abc')); - - $logging_pool = &new LoggingSessionPool($pool, $log); - $this->assertReference($logging_pool->findSession('abc'), $session); - $pool->tally(); - $log->tally(); - } -} - - We start by creating a dummy session. - We don't have to be too fussy about this as the check - for which session we want is done elsewhere. - We only need to check that it was the same one that came - from the session pool. - - - findSession() is a factory - method the simulation of which is described {@link #stub above}. - The point of departure comes with the first - expectOnce() call. - This line states that whenever - findSession() is invoked on the - mock, it will test the incoming arguments. - If it receives the single argument of a string "abc" - then a test pass is sent to the unit tester, otherwise a fail is - generated. - This was the part where we checked that the right session was asked for. - The argument list follows the same format as the one for setting - return values. - You can have wildcards and sequences and the order of - evaluation is the same. - - - If the call is never made then neither a pass nor a failure will - generated. - To get around this we must tell the mock when the test is over - so that the object can decide if the expectation has been met. - The unit tester assertion for this is triggered by the - tally() call at the end of - the test. - - - We use the same pattern to set up the mock logger. - We tell it that it should have - message() invoked - once only with the argument "Starting session abc". - By testing the calling arguments, rather than the logger output, - we insulate the test from any display changes in the logger. - - - We start to run our tests when we create the new - LoggingSessionPool and feed - it our preset mock objects. - Everything is now under our control. - Finally we confirm that the - $session we gave our decorator - is the one that we get back and tell the mocks to run their - internal call count tests with the - tally() calls. - - - This is still quite a bit of test code, but the code is very - strict. - If it still seems rather daunting there is a lot less of it - than if we tried this without mocks and this particular test, - interactions rather than output, is always more work to set - up. - More often you will be testing more complex situations without - needing this level or precision. - Also some of this can be refactored into a test case - setUp() method. - - - Here is the full list of expectations you can set on a mock object - in {@link http://www.lastcraft.com/simple_test.php SimpleTest}... - - - - - - - - - - -expectArguments($method, $args) - - No - - - -expectArgumentsAt($timing, $method, $args) - - No - - - -expectCallCount($method, $count) - - Yes - - - -expectMaximumCallCount($method, $count) - - No - - - -expectMinimumCallCount($method, $count) - - Yes - - - -expectNever($method) - - No - - - -expectOnce($method, $args) - - Yes - - - -expectAtLeastOnce($method, $args) - - Yes - - -
    ExpectationNeeds tally() -
    - Where the parameters are... -
    -
    $method
    -
    The method name, as a string, to apply the condition to.
    -
    $args
    -
    - The arguments as a list. Wildcards can be included in the same - manner as for setReturn(). - This argument is optional for expectOnce() - and expectAtLeastOnce(). -
    -
    $timing
    -
    - The only point in time to test the condition. - The first call starts at zero. -
    -
    $count
    -
    The number of calls expected.
    -
    - The method expectMaximumCallCount() - is slightly different in that it will only ever generate a failure. - It is silent if the limit is never reached. -
    - - Like the assertions within test cases, all of the expectations - can take a message override as an extra parameter. - Also the original failure message can be embedded in the output - as "%s". - -
    - -Other approaches - - There are three approaches to creating mocks including the one - that SimpleTest employs. - Coding them by hand using a base class, generating them to - a file and dynamically generating them on the fly. - - - Mock objects generated with {@link SimpleTest.html SimpleTest} - are dynamic. - They are created at run time in memory, using - eval(), rather than written - out to a file. - This makes the mocks easy to create, a one liner, - especially compared with hand - crafting them in a parallel class hierarchy. - The problem is that the behaviour is usually set up in the tests - themselves. - If the original objects change the mock versions - that the tests rely on can get out of sync. - This can happen with the parallel hierarchy approach as well, - but is far more quickly detected. - - - The solution, of course, is to add some real integration - tests. - You don't need very many and the convenience gained - from the mocks more than outweighs the small amount of - extra testing. - You cannot trust code that was only tested with mocks. - - - If you are still determined to build static libraries of mocks - because you want to simulate very specific behaviour, you can - achieve the same effect using the SimpleTest class generator. - In your library file, say mocks/connection.php for a - database connection, create a mock and inherit to override - special methods or add presets... - -<?php - require_once('simpletest/mock_objects.php'); - require_once('../classes/connection.php'); - - Mock::generate('Connection', 'BasicMockConnection'); - class MockConnection extends BasicMockConnection { - function MockConnection(&$test, $wildcard = '*') { - $this->BasicMockConnection($test, $wildcard); - $this->setReturn('query', false); - } - } -?> - - The generate call tells the class generator to create - a class called BasicMockConnection - rather than the usual MockConnection. - We then inherit from this to get our version of - MockConnection. - By intercepting in this way we can add behaviour, here setting - the default value of query() to be false. - By using the default name we make sure that the mock class - generator will not recreate a different one when invoked elsewhere in the - tests. - It never creates a class if it already exists. - As long as the above file is included first then all tests - that generated MockConnection should - now be using our one instead. - If we don't get the order right and the mock library - creates one first then the class creation will simply fail. - - - Use this trick if you find you have a lot of common mock behaviour - or you are getting frequent integration problems at later - stages of testing. - - - -I think SimpleTest stinks! - - But at the time of writing it is the only one with mock objects, - so are you stuck with it? - - - No, not at all. - {@link SimpleTest.html SimpleTest} is a toolkit and one of those - tools is the mock objects which can be employed independently. - Suppose you have your own favourite unit tester and all your current - test cases are written using it. - Pretend that you have called your unit tester PHPUnit (everyone else has) - and the core test class looks like this... - -class PHPUnit { - function PHPUnit() { - } - - function assertion($message, $assertion) { - } - ... -} - - All the assertion() method does - is print some fancy output and the boolean assertion parameter determines - whether to print a pass or a failure. - Let's say that it is used like this... - -$unit_test = new PHPUnit(); -$unit_test>assertion('I hope this file exists', file_exists('my_file')); - - How do you use mocks with this? - - - There is a protected method on the base mock class - SimpleMock called - _assertTrue() and - by overriding this method we can use our own assertion format. - We start with a subclass, in say my_mock.php... - -<?php - require_once('simpletest/mock_objects.php'); - - class MyMock extends SimpleMock() { - function MyMock(&$test, $wildcard) { - $this->SimpleMock($test, $wildcard); - } - - function _assertTrue($assertion, $message) { - $test = &$this->getTest(); - $test->assertion($message, $assertion); - } - } -?> - - Now instantiating MyMock will create - an object that speaks the same language as your tester. - The catch is of course that we never create such an object, the - code generator does. - We need just one more line of code to tell the generator to use - your mock instead... - -<?php - require_once('simpletst/mock_objects.php'); - - class MyMock extends SimpleMock() { - function MyMock($test, $wildcard) { - $this->SimpleMock(&$test, $wildcard); - } - - function _assertTrue($assertion, $message , &$test) { - $test->assertion($message, $assertion); - } - } - SimpleTestOptions::setMockBaseClass('MyMock'); -?> - - From now on you just include my_mock.php instead of the - default mock_objects.php version and you can introduce - mock objects into your existing test suite. - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/PartialMock.pkg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/PartialMock.pkg deleted file mode 100644 index 1ee147c1..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/PartialMock.pkg +++ /dev/null @@ -1,361 +0,0 @@ - - - -Partial mocks - - A partial mock is simply a pattern to alleviate a specific problem - in testing with mock objects, - that of getting mock objects into tight corners. - It's quite a limited tool and possibly not even a good idea. - It is included with SimpleTest because I have found it useful - on more than one occasion and has saved a lot of work at that point. - - - {@toc} - - - -The mock injection problem - - When one object uses another it is very simple to just pass a mock - version in already set up with its expectations. - Things are rather tricker if one object creates another and the - creator is the one you want to test. - This means that the created object should be mocked, but we can - hardly tell our class under test to create a mock instead. - The tested class doesn't even know it is running inside a test - after all. - - - For example, suppose we are building a telnet client and it - needs to create a network socket to pass its messages. - The connection method might look something like... - -<?php - require_once('socket.php'); - - class Telnet { - ... - function &connect($ip, $port, $username, $password) { - $socket = &new Socket($ip, $port); - $socket->read( ... ); - ... - } - } -?> - - We would really like to have a mock object version of the socket - here, what can we do? - - - The first solution is to pass the socket in as a parameter, - forcing the creation up a level. - Having the client handle this is actually a very good approach - if you can manage it and should lead to factoring the creation from - the doing. - In fact, this is one way in which testing with mock objects actually - forces you to code more tightly focused solutions. - They improve your programming. - - - Here this would be... - -<?php - require_once('socket.php'); - - class Telnet { - ... - function &connect(&$socket, $username, $password) { - $socket->read( ... ); - ... - } - } -?> - - This means that the test code is typical for a test involving - mock objects. - -class TelnetTest extends UnitTestCase { - ... - function testConnection() { - $socket = &new MockSocket($this); - ... - $telnet = &new Telnet(); - $telnet->connect($socket, 'Me', 'Secret'); - ... - } -} - - It is pretty obvious though that one level is all you can go. - You would hardly want your top level application creating - every low level file, socket and database connection ever - needed. - It wouldn't know the constructor parameters anyway. - - - The next simplest compromise is to have the created object passed - in as an optional parameter... - -<?php - require_once('socket.php'); - - class Telnet { - ... - function &connect($ip, $port, $username, $password, $socket = false) { - if (!$socket) { - $socket = &new Socket($ip, $port); - } - $socket->read( ... ); - ... - return $socket; - } - } -?> - - For a quick solution this is usually good enough. - The test now looks almost the same as if the parameter - was formally passed... - -class TelnetTest extends UnitTestCase { - ... - function testConnection() { - $socket = &new MockSocket($this); - ... - $telnet = &new Telnet(); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret', &$socket); - ... - } -} - - The problem with this approach is its untidiness. - There is test code in the main class and parameters passed - in the test case that are never used. - This is a quick and dirty approach, but nevertheless effective - in most situations. - - - The next method is to pass in a factory object to do the creation... - -<?php - require_once('socket.php'); - - class Telnet { - function Telnet(&$network) { - $this->_network = &$network; - } - ... - function &connect($ip, $port, $username, $password) { - $socket = &$this->_network->createSocket($ip, $port); - $socket->read( ... ); - ... - return $socket; - } - } -?> - - This is probably the most highly factored answer as creation - is now moved into a small specialist class. - The networking factory can now be tested separately, but mocked - easily when we are testing the telnet class... - -class TelnetTest extends UnitTestCase { - ... - function testConnection() { - $socket = &new MockSocket($this); - ... - $network = &new MockNetwork($this); - $network->setReturnReference('createSocket', $socket); - $telnet = &new Telnet($network); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - } -} - - The downside is that we are adding a lot more classes to the - library. - Also we are passing a lot of factories around which will - make the code a little less intuitive. - The most flexible solution, but the most complex. - - - Is there a middle ground? - - - -Protected factory method - - There is a way we can circumvent the problem without creating - any new application classes, but it involves creating a subclass - when we do the actual testing. - Firstly we move the socket creation into its own method... - -<?php - require_once('socket.php'); - - class Telnet { - ... - function &connect($ip, $port, $username, $password) { - $socket = &$this->_createSocket($ip, $port); - $socket->read( ... ); - ... - } - - function &_createSocket($ip, $port) { - return new Socket($ip, $port); - } - } -?> - - This is the only change we make to the application code. - - - For the test case we have to create a subclass so that - we can intercept the socket creation... - -class TelnetTestVersion extends Telnet { - var $_mock; - - function TelnetTestVersion(&$mock) { - $this->_mock = &$mock; - $this->Telnet(); - } - - function &_createSocket() { - return $this->_mock; - } -} - - Here I have passed the mock in the constructor, but a - setter would have done just as well. - Note that the mock was set into the object variable - before the constructor was chained. - This is necessary in case the constructor calls - connect(). - Otherwise it could get a null value from - _createSocket(). - - - After the completion of all of this extra work the - actual test case is fairly easy. - We just test our new class instead... - -class TelnetTest extends UnitTestCase { - ... - function testConnection() { - $socket = &new MockSocket($this); - ... - $telnet = &new TelnetTestVersion($socket); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - } -} - - The new class is very simple of course. - It just sets up a return value, rather like a mock. - It would be nice if it also checked the incoming parameters - as well. - Just like a mock. - It seems we are likely to do this often, can - we automate the subclass creation? - - - -A partial mock - - Of course the answer is "yes" or I would have stopped writing - this by now! - The previous test case was a lot of work, but we can - generate the subclass using a similar approach to the mock objects. - - - Here is the partial mock version of the test... - -Mock::generatePartial( - 'Telnet', - 'TelnetTestVersion', - array('_createSocket')); - -class TelnetTest extends UnitTestCase { - ... - function testConnection() { - $socket = &new MockSocket($this); - ... - $telnet = &new TelnetTestVersion($this); - $telnet->setReturnReference('_createSocket', $socket); - $telnet->Telnet(); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - } -} - - The partial mock is a subclass of the original with - selected methods "knocked out" with test - versions. - The generatePartial() call - takes three parameters: the class to be subclassed, - the new test class name and a list of methods to mock. - - - Instantiating the resulting objects is slightly tricky. - The only constructor parameter of a partial mock is - the unit tester reference. - As with the normal mock objects this is needed for sending - test results in response to checked expectations. - - - The original constructor is not run yet. - This is necessary in case the constructor is going to - make use of the as yet unset mocked methods. - We set any return values at this point and then run the - constructor with its normal parameters. - This three step construction of "new", followed - by setting up the methods, followed by running the constructor - proper is what distinguishes the partial mock code. - - - Apart from construction, all of the mocked methods have - the same features as mock objects and all of the unmocked - methods behave as before. - We can set expectations very easily... - -class TelnetTest extends UnitTestCase { - ... - function testConnection() { - $socket = &new MockSocket($this); - ... - $telnet = &new TelnetTestVersion($this); - $telnet->setReturnReference('_createSocket', $socket); - $telnet->expectOnce('_createSocket', array('127.0.0.1', 21)); - $telnet->Telnet(); - $telnet->connect('127.0.0.1', 21, 'Me', 'Secret'); - ... - $telnet->tally(); - } -} - - - - -Testing less than a class - - The mocked out methods don't have to be factory methods, - they could be any sort of method. - In this way partial mocks allow us to take control of any part of - a class except the constructor. - We could even go as far as to mock every method - except one we actually want to test. - - - This last situation is all rather hypothetical, as I haven't - tried it. - I am open to the possibility, but a little worried that - forcing object granularity may be better for the code quality. - I personally use partial mocks as a way of overriding creation - or for occasional testing of the TemplateMethod pattern. - - - It's all going to come down to the coding standards of your - project to decide which mechanism you use. - - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/Reporting.pkg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/Reporting.pkg deleted file mode 100644 index c60531e4..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/Reporting.pkg +++ /dev/null @@ -1,450 +0,0 @@ - - - -Reporting - - SimpleTest pretty much follows the MVC pattern - (Model-View-Controller). - The reporter classes are the view and the model is your - test cases and their hiearchy. - The controller is mostly hidden from the user of - SimpleTest unless you want to change how the test cases - are actually run, in which case it is possible to - override the runner objects from within the test case. - As usual with MVC, the controller is mostly undefined - and there are other places to control the test run. - - - {@toc} - - - -Reporting results in HTML - - The default test display is minimal in the extreme. - It reports success and failure with the conventional red and - green bars and shows a breadcrumb trail of test groups - for every failed assertion. - Here's a fail... -
    -

    File test

    - Fail: createnewfile->True assertion failed.
    -
    1/1 test cases complete. - 0 passes, 1 fails and 0 exceptions.
    -
    - And here all tests passed... -
    -

    File test

    -
    1/1 test cases complete. - 1 passes, 0 fails and 0 exceptions.
    -
    - The good news is that there are several points in the display - hiearchy for subclassing. -
    - - For web page based displays there is the - HtmlReporter class with the following - signature... - -class HtmlReporter extends SimpleReporter { - public HtmlReporter($encoding) { ... } - public makeDry(boolean $is_dry) { ... } - public void paintHeader(string $test_name) { ... } - public void sendNoCacheHeaders() { ... } - public void paintFooter(string $test_name) { ... } - public void paintGroupStart(string $test_name, integer $size) { ... } - public void paintGroupEnd(string $test_name) { ... } - public void paintCaseStart(string $test_name) { ... } - public void paintCaseEnd(string $test_name) { ... } - public void paintMethodStart(string $test_name) { ... } - public void paintMethodEnd(string $test_name) { ... } - public void paintFail(string $message) { ... } - public void paintPass(string $message) { ... } - public void paintError(string $message) { ... } - public void paintException(string $message) { ... } - public void paintMessage(string $message) { ... } - public void paintFormattedMessage(string $message) { ... } - protected string _getCss() { ... } - public array getTestList() { ... } - public integer getPassCount() { ... } - public integer getFailCount() { ... } - public integer getExceptionCount() { ... } - public integer getTestCaseCount() { ... } - public integer getTestCaseProgress() { ... } -} - - Here is what some of these methods mean. First the display methods - that you will probably want to override... -
      -
    • - HtmlReporter(string $encoding) -
      - is the constructor. - Note that the unit test sets up the link to the display - rather than the other way around. - The display is a mostly passive receiver of test events. - This allows easy adaption of the display for other test - systems beside unit tests, such as monitoring servers. - The encoding is the character encoding you wish to - display the test output in. - In order to correctly render debug output when - using the web tester, this should match the encoding - of the site you are trying to test. - The available character set strings are described in - the PHP {@link http://www.php.net/manual/en/function.htmlentities.php html_entities()} - function. -
    • -
    • - void paintHeader(string $test_name) -
      - is called once at the very start of the test when the first - start event arrives. - The first start event is usually delivered by the top level group - test and so this is where $test_name - comes from. - It paints the page titles, CSS, body tag, etc. - It returns nothing (void). -
    • -
    • - void paintFooter(string $test_name) -
      - Called at the very end of the test to close any tags opened - by the page header. - By default it also displays the red/green bar and the final - count of results. - Actually the end of the test happens when a test end event - comes in with the same name as the one that started it all - at the same level. - The tests nest you see. - Closing the last test finishes the display. -
    • -
    • - void paintMethodStart(string $test_name) -
      - is called at the start of each test method. - The name normally comes from method name. - The other test start events behave the same way except - that the group test one tells the reporter how large - it is in number of held test cases. - This is so that the reporter can display a progress bar - as the runner churns through the test cases. -
    • -
    • - void paintMethodEnd(string $test_name) -
      - backs out of the test started with the same name. -
    • -
    • - void paintFail(string $message) -
      - paints a failure. - By default it just displays the word fail, a breadcrumbs trail - showing the current test nesting and the message issued by - the assertion. -
    • -
    • - void paintPass(string $message) -
      - by default does nothing. -
    • -
    • - string _getCss() -
      - Returns the CSS styles as a string for the page header - method. - Additional styles have to be appended here if you are - not overriding the page header. - You will want to use this method in an overriden page header - if you want to include the original CSS. -
    • -
    - There are also some accessors to get information on the current - state of the test suite. - Use these to enrich the display... -
      -
    • - array getTestList() -
      - is the first convenience method for subclasses. - Lists the current nesting of the tests as a list - of test names. - The first, most deeply nested test, is first in the - list and the current test method will be last. -
    • -
    • - integer getPassCount() -
      - returns the number of passes chalked up so far. - Needed for the display at the end. -
    • -
    • - integer getFailCount() -
      - is likewise the number of fails so far. -
    • -
    • - integer getExceptionCount() -
      - is likewise the number of errors so far. -
    • -
    • - integer getTestCaseCount() -
      - is the total number of test cases in the test run. - This includes the grouping tests themselves. -
    • -
    • - integer getTestCaseProgress() -
      - is the number of test cases completed so far. -
    • -
    - One simple modification is to get the HtmlReporter to display - the passes as well as the failures and errors... - -class ShowPasses extends HtmlReporter { - - function paintPass($message) { - parent::paintPass($message); - print "&<span class=\"pass\">Pass</span>: "; - $breadcrumb = $this->getTestList(); - array_shift($breadcrumb); - print implode("-&gt;", $breadcrumb); - print "-&gt;$message<br />\n"; - } - - function _getCss() { - return parent::_getCss() . ' .pass { color: green; }'; - } -} - -
    - - One method that was glossed over was the makeDry() - method. - If you run this method, with no parameters, on the reporter - before the test suite is run no actual test methods - will be called. - You will still get the events of entering and leaving the - test methods and test cases, but no passes or failures etc, - because the test code will not actually be executed. - - - The reason for this is to allow for more sophistcated - GUI displays that allow the selection of individual test - cases. - In order to build a list of possible tests they need a - report on the test structure for drawing, say a tree view - of the test suite. - With a reporter set to dry run that just sends drawing events - this is easily accomplished. - -
    - -Extending the reporter - - Rather than simply modifying the existing display, you might want to - produce a whole new HTML look, or even generate text or XML. - Rather than override every method in - HtmlReporter we can take one - step up the class hiearchy to SimpleReporter - in the simple_test.php source file. - - - A do nothing display, a blank canvas for your own creation, would - be... - -require_once('simpletest/simple_test.php'); - -class MyDisplay extends SimpleReporter { - - function paintHeader($test_name) { - } - - function paintFooter($test_name) { - } - - function paintStart($test_name, $size) { - parent::paintStart($test_name, $size); - } - - function paintEnd($test_name, $size) { - parent::paintEnd($test_name, $size); - } - - function paintPass($message) { - parent::paintPass($message); - } - - function paintFail($message) { - parent::paintFail($message); - } -} - - No output would come from this class until you add it. - - - -The command line reporter - - SimpleTest also ships with a minimal command line reporter. - The interface mimics JUnit to some extent, but paints the - failure messages as they arrive. - To use the command line reporter simply substitute it - for the HTML version... - -<?php - require_once('simpletest/unit_tester.php'); - require_once('simpletest/reporter.php'); - - $test = &new GroupTest('File test'); - $test->addTestFile('tests/file_test.php'); - $test->run(new TextReporter()); -?> - - Then invoke the test suite from the command line... -
    -php file_test.php
    -
    - You will need the command line version of PHP installed - of course. - A passing test suite looks like this... -
    -File test
    -OK
    -Test cases run: 1/1, Failures: 0, Exceptions: 0
    -
    - A failure triggers a display like this... -
    -File test
    -1) True assertion failed.
    -	in createnewfile
    -FAILURES!!!
    -Test cases run: 1/1, Failures: 1, Exceptions: 0
    -
    -
    - - One of the main reasons for using a command line driven - test suite is of using the tester as part of some automated - process. - To function properly in shell scripts the test script should - return a non-zero exit code on failure. - If a test suite fails the value false - is returned from the SimpleTest::run() - method. - We can use that result to exit the script with the desired return - code... - -<?php - require_once('simpletest/unit_tester.php'); - require_once('simpletest/reporter.php'); - - $test = &new GroupTest('File test'); - $test->addTestFile('tests/file_test.php'); - exit ($test->run(new TextReporter()) ? 0 : 1); -?> - - Of course we don't really want to create two test scripts, - a command line one and a web browser one, for each test suite. - The command line reporter includes a method to sniff out the - run time environment... - -<?php - require_once('simpletest/unit_tester.php'); - require_once('simpletest/reporter.php'); - - $test = &new GroupTest('File test'); - $test->addTestFile('tests/file_test.php'); - if (TextReporter::inCli()) { - exit ($test->run(new TextReporter()) ? 0 : 1); - } - $test->run(new HtmlReporter()); -?> - - This is the form used within SimpleTest itself. - -
    - -Remote testing - - SimpleTest ships with an XmlReporter class - used for internal communication. - When run the output looks like... -
    -<?xml version="1.0"?>
    -<run>
    -  <group size="4">
    -    <name>Remote tests</name>
    -    <group size="4">
    -      <name>Visual test with 48 passes, 48 fails and 4 exceptions</name>
    -      <case>
    -        <name>testofunittestcaseoutput</name>
    -        <test>
    -          <name>testofresults</name>
    -          <pass>This assertion passed</pass>
    -          <fail>This assertion failed</fail>
    -        </test>
    -        <test>
    -          ...
    -        </test>
    -      </case>
    -    </group>
    -  </group>
    -</run>
    -
    - You can make use of this format with the parser - supplied as part of SimpleTest itself. - This is called SimpleTestXmlParser and - resides in xml.php within the SimpleTest package... - -<?php - require_once('simpletest/xml.php'); - - ... - $parser = &new SimpleTestXmlParser(new HtmlReporter()); - $parser->parse($test_output); -?> - - The $test_output should be the XML format - from the XML reporter, and could come from say a command - line run of a test case. - The parser sends events to the reporter just like any - other test run. - There are some odd occasions where this is actually useful. -
    - - A problem with large test suites is thet they can exhaust - the default 8Mb memory limit on a PHP process. - By having the test groups output in XML and run in - separate processes, the output can be reparsed to - aggregate the results into a much smaller footprint top level - test. - - - Because the XML output can come from anywhere, this opens - up the possibility of aggregating test runs from remote - servers. - A test case already exists to do this within the SimpleTest - framework, but it is currently experimental... - -<?php - require_once('../remote.php'); - require_once('../reporter.php'); - - $test_url = ...; - $dry_url = ...; - - $test = &new GroupTest('Remote tests'); - $test->addTestCase(new RemoteTestCase($test_url, $dry_url)); - $test->run(new HtmlReporter()); -?> - - The RemoteTestCase takes the actual location - of the test runner, basically a web page in XML format. - It also takes the URL of a reporter set to do a dry run. - This is so that progress can be reported upward correctly. - The RemoteTestCase can be added to test suites - just like any other group test. - -
    -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/ServerStubs.pkg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/ServerStubs.pkg deleted file mode 100644 index 96073b53..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/ServerStubs.pkg +++ /dev/null @@ -1,323 +0,0 @@ - - - -Server stubs - - - {@toc} - - -What are server stubs? - - This was originally a pattern named by Robert Binder (Testing - object-oriented systems: models, patterns, and tools, - Addison-Wesley) in 1999. - A server stub is a simulation of an object or component. - It should exactly replace a component in a system for test - or prototyping purposes, but remain lightweight. - This allows tests to run more quickly, or if the simulated - class has not been written, to run at all. - - - -Creating server stubs - - All we need is an existing class, say a database connection - that looks like this... - -class DatabaseConnection { - function DatabaseConnection() { - } - - function query() { - } - - function selectQuery() { - } -} - - The class does not need to have been implemented yet. - To create a stub version of the class we need to include the - server stub library and run the generator... - -require_once('simpletest/mock_objects.php'); -require_once('database_connection.php'); -Stub::generate('DatabaseConnection'); - - This generates a clone class called - StubDatabaseConnection. - We can now create instances of the new class within - our prototype script... - -require_once('simpletest/mock_objects.php'); -require_once('database_connection.php'); -Stub::generate('DatabaseConnection'); - -$connection = new StubDatabaseConnection(); - - - The stub version of a class has all the methods of the original - so that operations like - $connection->query() are still - legal. - The return value will be null, - but we can change that with... - -$connection->setReturnValue('query', 37) - - Now every time we call - $connection->query() we get - the result of 37. - We can set the return value to anything, say a hash of - imaginary database results or a list of persistent objects. - Parameters are irrelevant here, we always get the same - values back each time once they have been set up this way. - That may not sound like a convincing replica of a - database connection, but for the half a dozen lines of - a test method it is usually all you need. - - - -Simulation patterns - - Things aren't always that simple though. - One common problem is iterators, where constantly returning - the same value could cause an endless loop in the object - being tested. - For these we need to set up sequences of values. - Let's say we have a simple iterator that looks like this... - -class Iterator { - function Iterator() { - } - - function next() { - } -} - - This is about the simplest iterator you could have. - Assuming that this iterator only returns text until it - reaches the end, when it returns false, we can simulate it - with... - -Stub::generate('Iterator'); - -$iterator = new StubIterator(); -$iterator->setReturnValue('next', false); -$iterator->setReturnValueAt(0, 'next', 'First string'); -$iterator->setReturnValueAt(1, 'next', 'Second string'); - - When next() is called on the - stub iterator it will first return "First string", - on the second call "Second string" will be returned - and on any other call false will - be returned. - The sequenced return values take precedence over the constant - return value. - The constant one is a kind of default if you like. - - - Another tricky situation is an overloaded - get() operation. - An example of this is an information holder with name/value pairs. - Say we have a configuration class like... - -class Configuration { - function Configuration() { - } - - function getValue($key) { - } -} - - This is a classic situation for using stub objects as - actual configuration will vary from machine to machine, - hardly helping the reliability of our tests if we use it - directly. - The problem though is that all the data comes through the - getValue() method and yet - we want different results for different keys. - Luckily the stubs have a filter system... - -Stub::generate('Configuration'); - -$config = &new StubConfiguration(); -$config->setReturnValue('getValue', 'primary', array('db_host')); -$config->setReturnValue('getValue', 'admin', array('db_user')); -$config->setReturnValue('getValue', 'secret', array('db_password')); - - The extra parameter is a list of arguments to attempt - to match. - In this case we are trying to match only one argument which - is the look up key. - Now when the server stub has the - getValue() method invoked - like this... - -$config->getValue('db_user'); - - ...it will return "admin". - It finds this by attempting to match the calling arguments - to its list of returns one after another until - a complete match is found. - - - You can set a default argument argument like so... - -$config->setReturnValue('getValue', false, array('*')); - - This is not the same as setting the return value without - any argument requirements like this... - -$config->setReturnValue('getValue', false); - - In the first case it will accept any single argument, - but exactly one is required. - In the second case any number of arguments will do and - it acts as a catchall after all other matches. - Note that if we add further single parameter options after - the wildcard in the first case, they will be ignored as the wildcard - will match first. - With complex parameter lists the ordering could be important - or else desired matches could be masked by earlier wildcard - ones. - Declare the most specific matches first if you are not sure. - - - There are times when you want a specific object to be - dished out by the stub rather than just a copy. - The PHP copy semantics force us to use a different method - for this. - You might be simulating a container for example... - -class Thing { -} - -class Vector { - function Vector() { - } - - function get($index) { - } -} - - In this case you can set a reference into the stub's - return list... - -Stub::generate('Vector'); - -$thing = new Thing(); -$vector = &new StubVector(); -$vector->setReturnReference('get', $thing, array(12)); - - With this arrangement you know that every time - $vector->get(12) is - called it will return the same - $thing each time. - - - These three factors, timing, parameters and whether to copy, - can be combined orthogonally. - For example... - -$complex = &new StubComplexThing(); -$stuff = new Stuff(); -$complex->setReturnReferenceAt(3, 'get', $stuff, array('*', 1)); - - This will return the $stuff only on the third - call and only if two parameters were set the second of - which must be the integer 1. - That should cover most simple prototyping situations. - - - A final tricky case is one object creating another, known - as a factory pattern. - Suppose that on a successful query to our imaginary - database, a result set is returned as an iterator with - each call to next() giving - one row until false. - This sounds like a simulation nightmare, but in fact it can all - be stubbed using the mechanics above. - - - Here's how... - -Stub::generate('DatabaseConnection'); -Stub::generate('ResultIterator'); - -class DatabaseTest extends UnitTestCase { - - function testUserFinder() { - $result = &new StubResultIterator(); - $result->setReturnValue('next', false); - $result->setReturnValueAt(0, 'next', array(1, 'tom')); - $result->setReturnValueAt(1, 'next', array(3, 'dick')); - $result->setReturnValueAt(2, 'next', array(6, 'harry')); - - $connection = &new StubDatabaseConnection(); - $connection->setReturnValue('query', false); - $connection->setReturnReference( - 'query', - $result, - array('select id, name from users')); - - $finder = &new UserFinder($connection); - $this->assertIdentical( - $finder->findNames(), - array('tom', 'dick', 'harry')); - } -} - - Now only if our - $connection is called with the correct - query() will the - $result be returned that is - itself exhausted after the third call to next(). - This should be enough - information for our UserFinder class, - the class actually - being tested here, to come up with goods. - A very precise test and not a real database in sight. - - - -Stub creation options - - There are some additional options when creating stubs. - At the generation stage we can change the class name... - -Stub::generate('Iterator', 'MyStubIterator'); -$iterator = &new MyStubIterator(); - - - This is not very useful in itself as there would be no difference - in this class and the default except for the name. - However we can also add additional methods not found in the - original interface... - -class Iterator { -} -Stub::generate('Iterator', 'PrototypeIterator', array('next', 'isError')); -$iterator = &new PrototypeIterator(); -$iterator->setReturnValue('next', 0); - - - The next() and - isError() methods can now have - return values set just as if they existed in the original class. - - - One other esoteric way of customising the stubs is to change - the default wildcard used for parameter matching. - -Stub::generate('Connection'); -$iterator = &new StubConnection('wild'); -$iterator->setReturnValue('query', array('id' => 33), array('wild')); - - - The only reason to do this is if you genuinely wanted to test - against the literal string "*" and didn't want it - interpreted as "any". - - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/SimpleTest.pkg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/SimpleTest.pkg deleted file mode 100644 index 7def5793..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/SimpleTest.pkg +++ /dev/null @@ -1,387 +0,0 @@ - - - -Overview - - - - - - Marcus Baker - - Primary Developer -{@link mailto:marcus@lastcraft.com marcus@lastcraft.com} - - - - Harry Fuecks - - Packager -{@link mailto:harryf@users.sourceforge.net harryf@users.sourceforge.net} - - - - Jason Sweat - - Documentation -{@link mailto:jsweat_php@yahoo.com jsweat_php@yahoo.com} - - - - - {@toc} - - -What is SimpleTest? - - The heart of SimpleTest is a testing framework built around - test case classes. - These are written as extensions of base test case classes, - each extended with methods that actually contain test code. - Top level test scripts then invoke the run() - methods on every one of these test cases in order. - Each test method is written to invoke various assertions that - the developer expects to be true such as - assertEqual(). - If the expectation is correct, then a successful result is dispatched to the - observing test reporter, but any failure triggers an alert - and a description of the mismatch. - - - A {@link test case.html test case} looks like this... - -<?php -class MyTestCase extends UnitTestCase { - - function testLog() { - $log = &new Log('my.log'); - $log->message('Hello'); - $this->assertTrue(file_exists('my.log')); - } -} -?> - - - - These tools are designed for the developer. - Tests are written in the PHP language itself more or less - as the application itself is built. - The advantage of using PHP itself as the testing language is that - there are no new languages to learn, testing can start straight away, - and the developer can test any part of the code. - Basically, all parts that can be accessed by the application code can also be - accessed by the test code if they are in the same language. - - - The simplest type of test case is the - {@link UnitTestCase.html UnitTestCase}. - This class of test case includes standard tests for equality, - references and pattern matching. - All these test the typical expectations of what you would - expect the result of a function or method to be. - This is by far the most common type of test in the daily - routine of development, making up about 95% of test cases. - - - The top level task of a web application though is not to - produce correct output from its methods and objects, but - to generate web pages. - The {@link WebTestCase.html WebTestCase} class tests web - pages. - It simulates a web browser requesting a page, complete with - cookies, proxies, secure connections, authentication, forms, frames and most - navigation elements. - With this type of test case, the developer can assert that - information is present in the page and that forms and - sessions are handled correctly. - - - A {@link WebTestCase.html WebTestCase} looks like this... - -<?php -class MySiteTest extends WebTestCase { - - function testHomePage() { - $this->get('http://www.my-site.com/index.php'); - $this->assertTitle('My Home Page'); - $this->clickLink('Contact'); - $this->assertTitle('Contact me'); - $this->assertWantedPattern('/Email me at/'); - } -} -?> - - - - -Feature list - - The following is a very rough outline of past and future features - and their expected point of release. - I am afraid it is liable to change without warning as meeting the - milestones rather depends on time available. - Green stuff has been coded, but not necessarily released yet. - If you have a pressing need for a green but unreleased feature - then you should check-out the code from sourceforge CVS directly. - A released feature is marked as "Done". - - - - - - - - - - - Unit test case - Core test case class and assertions - Done - - - Html display - Simplest possible display - Done - - - Autoloading of test cases - - Reading a file with test cases and loading them into a - group test automatically - - Done - - - Mock objects code generator - - Objects capable of simulating other objects removing - test dependencies - - Done - - - Server stubs - - Mocks without expectations to be used outside of test cases, - e.g. for prototyping - - Done - - - Integration of other unit testers - - The ability to read and simulate test cases from PHPUnit - and PEAR::PhpUnit - - Done - - - Web test case - Basic pattern matching of fetched pages - Done - - - HTML parsing of pages - Allows link following and title tag matching - Done - - - Partial mocks - - Mocking parts of a class for testing less than a class - or for complex simulations - - Done - - - Web cookie handling - Correct handling of cookies when fetching pages - Done - - - Following redirects - Page fetching automatically follows 300 redirects - Done - - - Form parsing - Ability to submit simple forms and read default form values - Done - - - Command line interface - Test display without the need of a web browser - Done - - - Exposure of expectation classes - Can create precise tests with mocks as well as test cases - Done - - - XML output and parsing - - Allows multi host testing and the integration of acceptance - testing extensions - - Done - - - Command line test case - Allows testing of utilities and file handling - Done - - - PHP Documentor compatibility - Fully generated class level documentation - Done - - - Browser interface - - Exposure of lower level web browser interface for more - detailed test cases - - Done - - - HTTP authentication - - Fetching protected web pages with basic authentication - only - - Done - - - Browser navigation buttons - Back, forward and retry - Done - - - SSL support - Can connect to https: pages - Done - - - Proxy support - Can connect via. common proxies - Done - - - Frames support - Handling of frames in web test cases - Done - - - Improved display - Better web GUI with tree display of test cases - 1.1 - - - Localisation - Messages abstracted and code generated from XML - 1.1 - - - File upload testing - Can simulate the input type file tag - 1.1 - - - Mocking interfaces - Can generate mock objects to interfaces as well as classes - 2.0 - - - Testing exceptions - Similar to testing PHP errors - 2.0 - - - XPath searching of elements - Can make use of HTML tidy for faster and more flexible content matching - 2.0 - - -
    FeatureDescriptionRelease
    - PHP5 migraton will start straight after the version 1.1 series, - whereupon PHP4 will no longer be supported. - SimpleTest is currently compatible with PHP5, but will not - make use of all of the new features until version 2. -
    -
    - -Web resources for testing - - Process is at least as important as tools. - The type of process that makes the heaviest use of a developer's - testing tool is of course - {@link http://www.extremeprogramming.org/ Extreme Programming}. - This is one of the - {@link http://www.agilealliance.com/articles/index Agile Methodologies} - which combine various practices to "flatten the cost curve" of software development. - More extreme still is {@link http://www.testdriven.com/modules/news/ Test Driven Development}, - where you very strictly adhere to the rule of no coding until you have a test. - If you're more of a planner or believe that experience trumps evolution, - you may prefer the - {@link http://www.therationaledge.com/content/dec_01/f_spiritOfTheRUP_pk.html RUP} approach. - I haven't tried it, but even I can see that you will need test tools (see figure 9). - - - Most unit testers clone {@link http://www.junit.org/ JUnit} to some degree, - as far as the interface at least. There is a wealth of information on the - JUnit site including the - {@link http://junit.sourceforge.net/doc/faq/faq.htm FAQ} - which contains plenty of general advice on testing. - Once you get bitten by the bug you will certainly appreciate the phrase - {@link http://junit.sourceforge.net/doc/testinfected/testing.htm test infected} - coined by Eric Gamma. - If you are still reviewing which unit tester to use the main choices - are {@link http://phpunit.sourceforge.net/ PHPUnit} - and {@link http://pear.php.net/manual/en/package.php.phpunit.php Pear PHP::PHPUnit}. - They currently lack a lot of features found in - {@link http://www.lastcraft.com/simple_test.php SimpleTest}, but the PEAR - version at least has been upgraded for PHP5 and is recommended if you are porting - existing {@link http://www.junit.org/ JUnit} test cases. - - - Library writers don't seem to ship tests with their code very often - which is a shame. - Library code that includes tests can be more safely refactored and - the test code can act as additional documentation in a fairly standard - form. - This can save trawling the source code for clues when problems occour, - especially when upgrading such a library. - Libraries using SimpleTest for their unit testing include - {@link http://wact.sourceforge.net/ WACT} and - {@link http://sourceforge.net/projects/htmlsax PEAR::XML_HTMLSax}. - - - There is currently a sad lack of material on mock objects, which is a shame - as unit testing without them is a lot more work. - The {@link http://www.sidewize.com/company/mockobjects.pdf original mock objects paper} - is very Java focused, but still worth a read. - As a new technology there are plenty of discussions and debate on how to use mocks, - often on Wikis such as - {@link http://xpdeveloper.com/cgi-bin/oldwiki.cgi?MockObjects Extreme Tuesday} - or {@link http://www.mockobjects.com/wiki/MocksObjectsPaper www.mockobjects.com} - or {@link http://c2.com/cgi/wiki?MockObject the original C2 Wiki}. - Injecting mocks into a class is the main area of debate for which this - {@link http://www-106.ibm.com/developerworks/java/library/j-mocktest.html paper on IBM} - makes a good starting point. - - - There are plenty of web testing tools, but most are written in Java and - tutorials and advice are rather thin on the ground. - The only hope is to look at the documentation for - {@link http://httpunit.sourceforge.net/ HTTPUnit}, - {@link http://htmlunit.sourceforge.net/ HTMLUnit} - or {@link http://jwebunit.sourceforge.net/ JWebUnit} and hope for clues. - There are some XML driven test frameworks, but again most - require Java to run. - As SimpleTest does not support JavaScript you would probably - have to look at these tools anyway if you have highly dynamic - pages. - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/SimpleTest.pkg.ini b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/SimpleTest.pkg.ini deleted file mode 100644 index 695548d2..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/SimpleTest.pkg.ini +++ /dev/null @@ -1,10 +0,0 @@ -[Linked Tutorials] -UnitTestCase -GroupTests -ServerStubs -MockObjects -PartialMock -Reporting -Expectations -WebTester -FormTesting \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/UnitTestCase.pkg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/UnitTestCase.pkg deleted file mode 100644 index 3f48c5f1..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/UnitTestCase.pkg +++ /dev/null @@ -1,405 +0,0 @@ - - - -Unit tester - - - {@toc} - - -Unit test cases - - The core system is a regression testing framework built around - test cases. - A sample test case looks like this... - -class FileTestCase extends UnitTestCase { -} - - If no test name is supplied when chaining the constructor then - the class name will be taken instead. - This will be the name displayed in the test results. - - - Actual tests are added as methods in the test case whose names - by default start with the string "test" and - when the test case is invoked all such methods are run in - the order that PHP introspection finds them. - As many test methods can be added as needed. - For example... - -require_once('../classes/writer.php'); - -class FileTestCase extends UnitTestCase { - function FileTestCase() { - $this->UnitTestCase('File test'); - } - - function setUp() { - @unlink('../temp/test.txt'); - } - - function tearDown() { - @unlink('../temp/test.txt'); - } - - function testCreation() { - $writer = &new FileWriter('../temp/test.txt'); - $writer->write('Hello'); - $this->assertTrue(file_exists('../temp/test.txt'), 'File created'); - } -} - - The constructor is optional and usually omitted. - Without a name, the class name is taken as the name of the test case. - - - Our only test method at the moment is testCreation() - where we check that a file has been created by our - Writer object. - We could have put the unlink() - code into this method as well, but by placing it in - setUp() and - tearDown() we can use it with - other test methods that we add. - - - The setUp() method is run - just before each and every test method. - tearDown() is run just after - each and every test method. - - - You can place some test case set up into the constructor to - be run once for all the methods in the test case, but - you risk test inteference that way. - This way is slightly slower, but it is safer. - Note that if you come from a JUnit background this will not - be the behaviour you are used to. - JUnit surprisingly reinstantiates the test case for each test - method to prevent such interference. - SimpleTest requires the end user to use setUp(), but - supplies additional hooks for library writers. - - - The means of reporting test results (see below) are by a - visiting display class - that is notified by various assert...() - methods. - Here is the full list for the UnitTestCase - class, the default for SimpleTest... - - - - -assertTrue($x) - -Fail if $x is false - - - -assertFalse($x) - -Fail if $x is true - - - -assertNull($x) - -Fail if $x is set - - - -assertNotNull($x) - -Fail if $x not set - - - -assertIsA($x, $t) - -Fail if $x is not the class or type $t - - - -assertNotA($x, $t) - -Fail if $x is of the class or type $t - - - -assertEqual($x, $y) - -Fail if $x == $y is false - - - -assertNotEqual($x, $y) - -Fail if $x == $y is true - - - -assertIdentical($x, $y) - -Fail if $x == $y is false or a type mismatch - - - -assertNotIdentical($x, $y) - -Fail if $x == $y is true and types match - - - -assertReference($x, $y) - -Fail unless $x and $y are the same variable - - - -assertCopy($x, $y) - -Fail if $x and $y are the same variable - - - -assertWantedPattern($p, $x) - -Fail unless the regex $p matches $x - - - -assertNoUnwantedPattern($p, $x) - -Fail if the regex $p matches $x - - - -assertNoErrors() - -Fail if any PHP error occoured - - - -assertError($x) - -Fail if no PHP error or incorrect message - - - -assertErrorPattern($p) - -Fail unless the error matches the regex $p - - -
    - All assertion methods can take an optional description to - label the displayed result with. - If omitted a default message is sent instead which is usually - sufficient. - This default message can still be embedded in your own message - if you include "%s" within the string. - All the assertions return true on a pass or false on failure. -
    - - Some examples... - -$variable = null; -$this->assertNull($variable, 'Should be cleared'); - - ...will pass and normally show no message. - If you have - {@link http://www.lastcraft.com/display_subclass_tutorial.php set up the tester to display passes} - as well then the message will be displayed as is. - -$this->assertIdentical(0, false, 'Zero is not false [%s]'); - - This will fail as it performs a type - check as well as a comparison between the two values. - The "%s" part is replaced by the default - error message that would have been shown if we had not - supplied our own. - This also allows us to nest test messages. - -$a = 1; -$b = $a; -$this->assertReference($a, $b); - - Will fail as the variable $a is a copy of $b. - -$this->assertWantedPattern('/hello/i', 'Hello world'); - - This will pass as using a case insensitive match the string - hello is contained in Hello world. - -trigger_error('Disaster'); -trigger_error('Catastrophe'); -$this->assertError(); -$this->assertError('Catastrophe'); -$this->assertNoErrors(); - - This one takes some explanation as in fact they all pass! - - - PHP errors in SimpleTest are trapped and placed in a queue. - Here the first error check catches the "Disaster" - message without checking the text and passes. - This removes the error from the queue. - The next error check tests not only the existence of the error, - but also the text which here matches so another pass. - With the queue now empty the last test will pass as well. - If any unchecked errors are left at the end of a test method then - an exception will be reported in the test. - Note that SimpleTest cannot catch compile time PHP errors. - - - The test cases also have some convenience methods for debugging - code or extending the suite... - - - - -setUp() - -Runs this before each test method - - - -tearDown() - -Runs this after each test method - - - -pass() - -Sends a test pass - - - -fail() - -Sends a test failure - - - -error() - -Sends an exception event - - - -sendMessage() - -Sends a status message to those displays that support it - - - -signal($type, $payload) - -Sends a user defined message to the test reporter - - - -dump($var) - -Does a formatted print_r() for quick and dirty debugging - - - -swallowErrors() - -Clears the error queue - - -
    -
    -
    - -Extending test cases - - Of course additional test methods can be added to create - specific types of test case too so as to extend framework... - -require_once('simpletest/unit_tester.php'); - -class FileTester extends UnitTestCase { - function FileTester($name = false) { - $this->UnitTestCase($name); - } - - function assertFileExists($filename, $message = '%s') { - $this->assertTrue( - file_exists($filename), - sprintf($message, 'File [$filename] existence check')); - } -} - - Here the SimpleTest library is held in a folder called - simpletest that is local. - Substitute your own path for this. - - - This new case can be now be inherited just like - a normal test case... - -class FileTestCase extends FileTester { - - function setUp() { - @unlink('../temp/test.txt'); - } - - function tearDown() { - @unlink('../temp/test.txt'); - } - - function testCreation() { - $writer = &new FileWriter('../temp/test.txt'); - $writer->write('Hello'); - $this->assertFileExists('../temp/test.txt'); - } -} - - - - If you want a test case that does not have all of the - UnitTestCase assertions, - only your own and assertTrue(), - you need to extend the SimpleTestCase - class instead. - It is found in simple_test.php rather than - unit_tester.php. - See {@link later.html later} if you - want to incorporate other unit tester's - test cases in your test suites. - - - -Running a single test case - - You won't often run single test cases except when bashing - away at a module that is having difficulty and you don't - want to upset the main test suite. - Here is the scaffolding needed to run the a lone test case... - -<?php - require_once('simpletest/unit_tester.php'); - require_once('simpletest/reporter.php'); - require_once('../classes/writer.php'); - - class FileTestCase extends UnitTestCase { - function FileTestCase() { - $this->UnitTestCase('File test'); - } - } - - $test = &new FileTestCase(); - $test->run(new HtmlReporter()); -?> - - This script will run as is, but will output zero passes - and zero failures until test methods are added. - - -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/WebTester.pkg b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/WebTester.pkg deleted file mode 100644 index 1ceb5cc4..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/tutorials/SimpleTest/WebTester.pkg +++ /dev/null @@ -1,610 +0,0 @@ - - - -Web tester - - - {@toc} - - -Fetching a page - - Testing classes is all very well, but PHP is predominately - a language for creating functionality within web pages. - How do we test the front end presentation role of our PHP - applications? - Well the web pages are just text, so we should be able to - examine them just like any other test data. - - - This leads to a tricky issue. - If we test at too low a level, testing for matching tags - in the page with pattern matching for example, our tests will - be brittle. - The slightest change in layout could break a large number of - tests. - If we test at too high a level, say using mock versions of a - template engine, then we lose the ability to automate some classes - of test. - For example, the interaction of forms and navigation will - have to be tested manually. - These types of test are extremely repetitive and error prone. - - - SimpleTest includes a special form of test case for the testing - of web page actions. - The WebTestCase includes facilities - for navigation, content and cookie checks and form handling. - Usage of these test cases is similar to the - {@link UnitTestCase.html UnitTestCase}... - -class TestOfLastcraft extends WebTestCase { -} - - Here we are about to test the - {@link http://www/lastcraft.com/ Last Craft} site itself. - If this test case is in a file called lastcraft_test.php - then it can be loaded in a runner script just like unit tests... - -<?php - require_once('simpletest/web_tester.php'); - require_once('simpletest/reporter.php'); - - $test = &new GroupTest('Web site tests'); - $test->addTestFile('lastcraft_test.php'); - exit ($test->run(new TextReporter()) ? 0 : 1); -?> - - I am using the text reporter here to more clearly - distinguish the web content from the test output. - - - Nothing is being tested yet. - We can fetch the home page by using the - get() method... - -class TestOfLastcraft extends WebTestCase { - - function testHomepage() { - $this->assertTrue($this->get('http://www.lastcraft.com/')); - } -} - - The get() method will - return true only if page content was successfully - loaded. - It is a simple, but crude way to check that a web page - was actually delivered by the web server. - However that content may be a 404 response and yet - our get() method will still return true. - - - Assuming that the web server for the Last Craft site is up - (sadly not always the case), we should see... -
    -Web site tests
    -OK
    -Test cases run: 1/1, Failures: 0, Exceptions: 0
    -
    - All we have really checked is that any kind of page was - returned. - We don't yet know if it was the right one. -
    -
    - -Testing page content - - To confirm that the page we think we are on is actually the - page we are on, we need to verify the page content. - -class TestOfLastcraft extends WebTestCase { - - function testHomepage() { - $this->get('http://www.lastcraft.com/'); - $this->assertWantedPattern('/why the last craft/i'); - } -} - - The page from the last fetch is held in a buffer in - the test case, so there is no need to refer to it directly. - The pattern match is always made against the buffer. - - - Here is the list of possible content assertions... - - - - -assertTitle($title) - -Pass if title is an exact match - - - -assertWantedPattern($pattern) - -A Perl pattern match against the page content - - - -assertNoUnwantedPattern($pattern) - -A Perl pattern match to not find content - - - -assertWantedText($text) - -Pass if matches visible and "alt" text - - - -assertNoUnwantedText($text) - -Pass if doesn't match visible and "alt" text - - - -assertLink($label) - -Pass if a link with this text is present - - - -assertNoLink($label) - -Pass if no link with this text is present - - - -assertLinkById($id) - -Pass if a link with this id attribute is present - - - -assertNoLinkById($id) - -Pass if no link with this id attribute is present - - - -assertField($name, $value) - -Pass if an input tag with this name has this value - - - -assertFieldById($id, $value) - -Pass if an input tag with this id has this value - - - -assertResponse($codes) - -Pass if HTTP response matches this list - - - -assertMime($types) - -Pass if MIME type is in this list - - - -assertAuthentication($protocol) - -Pass if the current challenge is this protocol - - - -assertNoAuthentication() - -Pass if there is no current challenge - - - -assertRealm($name) - -Pass if the current challenge realm matches - - - -assertHeader($header, $content) - -Pass if a header was fetched matching this value - - - -assertNoUnwantedHeader($header) - -Pass if a header was not fetched - - - -assertHeaderPattern($header, $pattern) - -Pass if a header was fetched matching this Perl regex - - - -assertCookie($name, $value) - -Pass if there is currently a matching cookie - - - -assertNoCookie($name) - -Pass if there is currently no cookie of this name - - -
    - As usual with the SimpleTest assertions, they all return - false on failure and true on pass. - They also allow an optional test message and you can embed - the original test message inside using "%s" inside - your custom message. -
    - - So now we could instead test against the title tag with... - -$this->assertTitle('The Last Craft? Web developer tutorials on PHP, Extreme programming and Object Oriented development'); - - As well as the simple HTML content checks we can check - that the MIME type is in a list of allowed types with... - -$this->assertMime(array('text/plain', 'text/html')); - - More interesting is checking the HTTP response code. - Like the MIME type, we can assert that the response code - is in a list of allowed values... - -class TestOfLastcraft extends WebTestCase { - - function testRedirects() { - $this->get('http://www.lastcraft.com/test/redirect.php'); - $this->assertResponse(200);</strong> - } -} - - Here we are checking that the fetch is successful by - allowing only a 200 HTTP response. - This test will pass, but it is not actually correct to do so. - There is no page, instead the server issues a redirect. - The WebTestCase will - automatically follow up to three such redirects. - The tests are more robust this way and we are usually - interested in the interaction with the pages rather - than their delivery. - If the redirects are of interest then this ability must - be disabled... - -class TestOfLastcraft extends WebTestCase { - - function testHomepage() { - $this->setMaximumRedirects(0); - $this->get('http://www.lastcraft.com/test/redirect.php'); - $this->assertResponse(200); - } -} - - The assertion now fails as expected... -
    -Web site tests
    -1) Expecting response in [200] got [302]
    -	in testhomepage
    -	in testoflastcraft
    -	in lastcraft_test.php
    -FAILURES!!!
    -Test cases run: 1/1, Failures: 1, Exceptions: 0
    -
    - We can modify the test to correctly assert redirects with... - -class TestOfLastcraft extends WebTestCase { - - function testHomepage() { - $this->setMaximumRedirects(0); - $this->get('http://www.lastcraft.com/test/redirect.php'); - $this->assertResponse(array(301, 302, 303, 307)); - } -} - - This now passes. -
    -
    - -Navigating a web site - - Users don't often navigate sites by typing in URLs, but by - clicking links and buttons. - Here we confirm that the contact details can be reached - from the home page... - -class TestOfLastcraft extends WebTestCase { - ... - function testContact() { - $this->get('http://www.lastcraft.com/'); - $this->clickLink('About'); - $this->assertTitle('About Last Craft'); - } -} - - The parameter is the text of the link. - - - If the target is a button rather than an anchor tag, then - clickSubmit() should be used - with the button title... - -$this->clickSubmit('Go!'); - - - - The list of navigation methods is... - - - - -getUrl() - -The current location - - - -get($url, $parameters) - -Send a GET request with these parameters - - - -post($url, $parameters) - -Send a POST request with these parameters - - - -head($url, $parameters) - -Send a HEAD request without replacing the page content - - - -retry() - -Reload the last request - - - -back() - -Like the browser back button - - - -forward() - -Like the browser forward button - - - -authenticate($name, $password) - -Retry after a challenge - - - -restart() - -Restarts the browser as if a new session - - - -getCookie($name) - -Gets the cookie value for the current context - - - -ageCookies($interval) - -Ages current cookies prior to a restart - - - -clearFrameFocus() - -Go back to treating all frames as one page - - - -clickSubmit($label) - -Click the first button with this label - - - -clickSubmitByName($name) - -Click the button with this name attribute - - - -clickSubmitById($id) - -Click the button with this ID attribute - - - -clickImage($label, $x, $y) - -Click an input tag of type image by title or alt text - - - -clickImageByName($name, $x, $y) - -Click an input tag of type image by name - - - -clickImageById($id, $x, $y) - -Click an input tag of type image by ID attribute - - - -submitFormById($id) - -Submit a form without the submit value - - - -clickLink($label, $index) - -Click an anchor by the visible label text - - - -clickLinkById($id) - -Click an anchor by the ID attribute - - - -getFrameFocus() - -The name of the currently selected frame - - - -setFrameFocusByIndex($choice) - -Focus on a frame counting from 1 - - - -setFrameFocus($name) - -Focus on a frame by name - - -
    -
    - - The parameters in the get(), post() or - head() methods are optional. - The HTTP HEAD fetch does not change the browser context, only loads - cookies. - This can be useful for when an image or stylesheet sets a cookie - for crafty robot blocking. - - - The retry(), back() and - forward() commands work as they would on - your web browser. - They use the history to retry pages. - This can be handy for checking the effect of hitting the - back button on your forms. - - - The frame methods need a little explanation. - By default a framed page is treated just like any other. - Content will be searced for throughout the entire frameset, - so clicking a link will work no matter which frame - the anchor tag is in. - You can override this behaviour by focusing on a single - frame. - If you do that, all searches and actions will apply to that - frame alone, such as authentication and retries. - If a link or button is not in a focused frame then it cannot - be clicked. - - - Testing navigation on fixed pages only tells you when you - have broken an entire script. - For highly dynamic pages, such as for bulletin boards, this can - be crucial for verifying the correctness of the application. - For most applications though, the really tricky logic is usually in - the handling of forms and sessions. - Fortunately SimpleTest includes - {@link tools for testing web forms.html tools for testing web forms} - as well. - -
    - -Modifying the request - - Although SimpleTest does not have the goal of testing networking - problems, it does include some methods to modify and debug - the requests it makes. - Here is another method list... - - - - -getTransportError() - -The last socket error - - - -showRequest() - -Dump the outgoing request - - - -showHeaders() - -Dump the incoming headers - - - -showSource() - -Dump the raw HTML page content - - - -ignoreFrames() - -Do not load framesets - - - -setCookie($name, $value) - -Set a cookie from now on - - - -addHeader($header) - -Always add this header to the request - - - -setMaximumRedirects($max) - -Stop after this many redirects - - - -setConnectionTimeout($timeout) - -Kill the connection after this time between bytes - - - -useProxy($proxy, $name, $password) - -Make requests via this proxy URL - - -
    - These methods are principally for debugging. -
    -
    -
    diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/unit_tester.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/unit_tester.php deleted file mode 100644 index 513f09a0..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/unit_tester.php +++ /dev/null @@ -1,402 +0,0 @@ -assert(new TrueExpectation(), $result, $message); - } - - /** - * Will be true on false and vice versa. False - * is the PHP definition of false, so that null, - * empty strings, zero and an empty array all count - * as false. - * @param boolean $result Pass on false. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertFalse($result, $message = '%s') { - return $this->assert(new FalseExpectation(), $result, $message); - } - - /** - * Will be true if the value is null. - * @param null $value Supposedly null value. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertNull($value, $message = '%s') { - $dumper = new SimpleDumper(); - $message = sprintf( - $message, - '[' . $dumper->describeValue($value) . '] should be null'); - return $this->assertTrue(! isset($value), $message); - } - - /** - * Will be true if the value is set. - * @param mixed $value Supposedly set value. - * @param string $message Message to display. - * @return boolean True on pass. - * @access public - */ - function assertNotNull($value, $message = '%s') { - $dumper = new SimpleDumper(); - $message = sprintf( - $message, - '[' . $dumper->describeValue($value) . '] should not be null'); - return $this->assertTrue(isset($value), $message); - } - - /** - * Type and class test. Will pass if class - * matches the type name or is a subclass or - * if not an object, but the type is correct. - * @param mixed $object Object to test. - * @param string $type Type name as string. - * @param string $message Message to display. - * @return boolean True on pass. - * @access public - */ - function assertIsA($object, $type, $message = '%s') { - return $this->assert( - new IsAExpectation($type), - $object, - $message); - } - - /** - * Type and class mismatch test. Will pass if class - * name or underling type does not match the one - * specified. - * @param mixed $object Object to test. - * @param string $type Type name as string. - * @param string $message Message to display. - * @return boolean True on pass. - * @access public - */ - function assertNotA($object, $type, $message = '%s') { - return $this->assert( - new NotAExpectation($type), - $object, - $message); - } - - /** - * Will trigger a pass if the two parameters have - * the same value only. Otherwise a fail. - * @param mixed $first Value to compare. - * @param mixed $second Value to compare. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertEqual($first, $second, $message = '%s') { - return $this->assert( - new EqualExpectation($first), - $second, - $message); - } - - /** - * Will trigger a pass if the two parameters have - * a different value. Otherwise a fail. - * @param mixed $first Value to compare. - * @param mixed $second Value to compare. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertNotEqual($first, $second, $message = '%s') { - return $this->assert( - new NotEqualExpectation($first), - $second, - $message); - } - - /** - * Will trigger a pass if the if the first parameter - * is near enough to the second by the margin. - * @param mixed $first Value to compare. - * @param mixed $second Value to compare. - * @param mixed $margin Fuzziness of match. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertWithinMargin($first, $second, $margin, $message = '%s') { - return $this->assert( - new WithinMarginExpectation($first, $margin), - $second, - $message); - } - - /** - * Will trigger a pass if the two parameters differ - * by more than the margin. - * @param mixed $first Value to compare. - * @param mixed $second Value to compare. - * @param mixed $margin Fuzziness of match. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertOutsideMargin($first, $second, $margin, $message = '%s') { - return $this->assert( - new OutsideMarginExpectation($first, $margin), - $second, - $message); - } - - /** - * Will trigger a pass if the two parameters have - * the same value and same type. Otherwise a fail. - * @param mixed $first Value to compare. - * @param mixed $second Value to compare. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertIdentical($first, $second, $message = '%s') { - return $this->assert( - new IdenticalExpectation($first), - $second, - $message); - } - - /** - * Will trigger a pass if the two parameters have - * the different value or different type. - * @param mixed $first Value to compare. - * @param mixed $second Value to compare. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertNotIdentical($first, $second, $message = '%s') { - return $this->assert( - new NotIdenticalExpectation($first), - $second, - $message); - } - - /** - * Will trigger a pass if both parameters refer - * to the same object or value. Fail otherwise. - * This will cause problems testing objects under - * E_STRICT. - * TODO: Replace with expectation. - * @param mixed $first Reference to check. - * @param mixed $second Hopefully the same variable. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertReference(&$first, &$second, $message = '%s') { - $dumper = new SimpleDumper(); - $message = sprintf( - $message, - '[' . $dumper->describeValue($first) . - '] and [' . $dumper->describeValue($second) . - '] should reference the same object'); - return $this->assertTrue( - SimpleTestCompatibility::isReference($first, $second), - $message); - } - - /** - * Will trigger a pass if both parameters refer - * to the same object. Fail otherwise. This has - * the same semantics at the PHPUnit assertSame. - * That is, if values are passed in it has roughly - * the same affect as assertIdentical. - * TODO: Replace with expectation. - * @param mixed $first Object reference to check. - * @param mixed $second Hopefully the same object. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertSame($first, $second, $message = '%s') { - $dumper = new SimpleDumper(); - $message = sprintf( - $message, - '[' . $dumper->describeValue($first) . - '] and [' . $dumper->describeValue($second) . - '] should reference the same object'); - return $this->assertTrue($first === $second, $message); - } - - /** - * Will trigger a pass if both parameters refer - * to different objects. Fail otherwise. The objects - * have to be identical though. - * @param mixed $first Object reference to check. - * @param mixed $second Hopefully not the same object. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertClone($first, $second, $message = '%s') { - $dumper = new SimpleDumper(); - $message = sprintf( - $message, - '[' . $dumper->describeValue($first) . - '] and [' . $dumper->describeValue($second) . - '] should not be the same object'); - $identical = new IdenticalExpectation($first); - return $this->assertTrue( - $identical->test($second) && ! ($first === $second), - $message); - } - - /** - * Will trigger a pass if both parameters refer - * to different variables. Fail otherwise. The objects - * have to be identical references though. - * This will fail under E_STRICT with objects. Use - * assertClone() for this. - * @param mixed $first Object reference to check. - * @param mixed $second Hopefully not the same object. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertCopy(&$first, &$second, $message = "%s") { - $dumper = new SimpleDumper(); - $message = sprintf( - $message, - "[" . $dumper->describeValue($first) . - "] and [" . $dumper->describeValue($second) . - "] should not be the same object"); - return $this->assertFalse( - SimpleTestCompatibility::isReference($first, $second), - $message); - } - - /** - * Will trigger a pass if the Perl regex pattern - * is found in the subject. Fail otherwise. - * @param string $pattern Perl regex to look for including - * the regex delimiters. - * @param string $subject String to search in. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertPattern($pattern, $subject, $message = '%s') { - return $this->assert( - new PatternExpectation($pattern), - $subject, - $message); - } - - /** - * Will trigger a pass if the perl regex pattern - * is not present in subject. Fail if found. - * @param string $pattern Perl regex to look for including - * the regex delimiters. - * @param string $subject String to search in. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertNoPattern($pattern, $subject, $message = '%s') { - return $this->assert( - new NoPatternExpectation($pattern), - $subject, - $message); - } - - /** - * Prepares for an error. If the error mismatches it - * passes through, otherwise it is swallowed. Any - * left over errors trigger failures. - * @param SimpleExpectation/string $expected The error to match. - * @param string $message Message on failure. - * @access public - */ - function expectError($expected = false, $message = '%s') { - $queue = SimpleTest::getContext()->get('SimpleErrorQueue'); - $queue->expectError($this->coerceExpectation($expected), $message); - } - - /** - * Prepares for an exception. If the error mismatches it - * passes through, otherwise it is swallowed. Any - * left over errors trigger failures. - * @param SimpleExpectation/Exception $expected The error to match. - * @param string $message Message on failure. - * @access public - */ - function expectException($expected = false, $message = '%s') { - $queue = SimpleTest::getContext()->get('SimpleExceptionTrap'); - $line = $this->getAssertionLine(); - $queue->expectException($expected, $message . $line); - } - - /** - * Creates an equality expectation if the - * object/value is not already some type - * of expectation. - * @param mixed $expected Expected value. - * @return SimpleExpectation Expectation object. - * @access private - */ - protected function coerceExpectation($expected) { - if ($expected == false) { - return new TrueExpectation(); - } - if (SimpleTestCompatibility::isA($expected, 'SimpleExpectation')) { - return $expected; - } - return new EqualExpectation( - is_string($expected) ? str_replace('%', '%%', $expected) : $expected); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/url.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/url.php deleted file mode 100644 index 00b0bca6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/url.php +++ /dev/null @@ -1,550 +0,0 @@ -chompCoordinates($url); - $this->setCoordinates($x, $y); - $this->scheme = $this->chompScheme($url); - if ($this->scheme === 'file') { - // Unescaped backslashes not used in directory separator context - // will get caught by this, but they should have been urlencoded - // anyway so we don't care. If this ends up being a problem, the - // host regexp must be modified to match for backslashes when - // the scheme is file. - $url = str_replace('\\', '/', $url); - } - list($this->username, $this->password) = $this->chompLogin($url); - $this->host = $this->chompHost($url); - $this->port = false; - if (preg_match('/(.*?):(.*)/', $this->host, $host_parts)) { - if ($this->scheme === 'file' && strlen($this->host) === 2) { - // DOS drive was placed in authority; promote it to path. - $url = '/' . $this->host . $url; - $this->host = false; - } else { - $this->host = $host_parts[1]; - $this->port = (integer)$host_parts[2]; - } - } - $this->path = $this->chompPath($url); - $this->request = $this->parseRequest($this->chompRequest($url)); - $this->fragment = (strncmp($url, "#", 1) == 0 ? substr($url, 1) : false); - $this->target = false; - } - - /** - * Extracts the X, Y coordinate pair from an image map. - * @param string $url URL so far. The coordinates will be - * removed. - * @return array X, Y as a pair of integers. - * @access private - */ - protected function chompCoordinates(&$url) { - if (preg_match('/(.*)\?(\d+),(\d+)$/', $url, $matches)) { - $url = $matches[1]; - return array((integer)$matches[2], (integer)$matches[3]); - } - return array(false, false); - } - - /** - * Extracts the scheme part of an incoming URL. - * @param string $url URL so far. The scheme will be - * removed. - * @return string Scheme part or false. - * @access private - */ - protected function chompScheme(&$url) { - if (preg_match('#^([^/:]*):(//)(.*)#', $url, $matches)) { - $url = $matches[2] . $matches[3]; - return $matches[1]; - } - return false; - } - - /** - * Extracts the username and password from the - * incoming URL. The // prefix will be reattached - * to the URL after the doublet is extracted. - * @param string $url URL so far. The username and - * password are removed. - * @return array Two item list of username and - * password. Will urldecode() them. - * @access private - */ - protected function chompLogin(&$url) { - $prefix = ''; - if (preg_match('#^(//)(.*)#', $url, $matches)) { - $prefix = $matches[1]; - $url = $matches[2]; - } - if (preg_match('#^([^/]*)@(.*)#', $url, $matches)) { - $url = $prefix . $matches[2]; - $parts = split(":", $matches[1]); - return array( - urldecode($parts[0]), - isset($parts[1]) ? urldecode($parts[1]) : false); - } - $url = $prefix . $url; - return array(false, false); - } - - /** - * Extracts the host part of an incoming URL. - * Includes the port number part. Will extract - * the host if it starts with // or it has - * a top level domain or it has at least two - * dots. - * @param string $url URL so far. The host will be - * removed. - * @return string Host part guess or false. - * @access private - */ - protected function chompHost(&$url) { - if (preg_match('!^(//)(.*?)(/.*|\?.*|#.*|$)!', $url, $matches)) { - $url = $matches[3]; - return $matches[2]; - } - if (preg_match('!(.*?)(\.\./|\./|/|\?|#|$)(.*)!', $url, $matches)) { - $tlds = SimpleUrl::getAllTopLevelDomains(); - if (preg_match('/[a-z0-9\-]+\.(' . $tlds . ')/i', $matches[1])) { - $url = $matches[2] . $matches[3]; - return $matches[1]; - } elseif (preg_match('/[a-z0-9\-]+\.[a-z0-9\-]+\.[a-z0-9\-]+/i', $matches[1])) { - $url = $matches[2] . $matches[3]; - return $matches[1]; - } - } - return false; - } - - /** - * Extracts the path information from the incoming - * URL. Strips this path from the URL. - * @param string $url URL so far. The host will be - * removed. - * @return string Path part or '/'. - * @access private - */ - protected function chompPath(&$url) { - if (preg_match('/(.*?)(\?|#|$)(.*)/', $url, $matches)) { - $url = $matches[2] . $matches[3]; - return ($matches[1] ? $matches[1] : ''); - } - return ''; - } - - /** - * Strips off the request data. - * @param string $url URL so far. The request will be - * removed. - * @return string Raw request part. - * @access private - */ - protected function chompRequest(&$url) { - if (preg_match('/\?(.*?)(#|$)(.*)/', $url, $matches)) { - $url = $matches[2] . $matches[3]; - return $matches[1]; - } - return ''; - } - - /** - * Breaks the request down into an object. - * @param string $raw Raw request. - * @return SimpleFormEncoding Parsed data. - * @access private - */ - protected function parseRequest($raw) { - $this->raw = $raw; - $request = new SimpleGetEncoding(); - foreach (split("&", $raw) as $pair) { - if (preg_match('/(.*?)=(.*)/', $pair, $matches)) { - $request->add($matches[1], urldecode($matches[2])); - } elseif ($pair) { - $request->add($pair, ''); - } - } - return $request; - } - - /** - * Accessor for protocol part. - * @param string $default Value to use if not present. - * @return string Scheme name, e.g "http". - * @access public - */ - function getScheme($default = false) { - return $this->scheme ? $this->scheme : $default; - } - - /** - * Accessor for user name. - * @return string Username preceding host. - * @access public - */ - function getUsername() { - return $this->username; - } - - /** - * Accessor for password. - * @return string Password preceding host. - * @access public - */ - function getPassword() { - return $this->password; - } - - /** - * Accessor for hostname and port. - * @param string $default Value to use if not present. - * @return string Hostname only. - * @access public - */ - function getHost($default = false) { - return $this->host ? $this->host : $default; - } - - /** - * Accessor for top level domain. - * @return string Last part of host. - * @access public - */ - function getTld() { - $path_parts = pathinfo($this->getHost()); - return (isset($path_parts['extension']) ? $path_parts['extension'] : false); - } - - /** - * Accessor for port number. - * @return integer TCP/IP port number. - * @access public - */ - function getPort() { - return $this->port; - } - - /** - * Accessor for path. - * @return string Full path including leading slash if implied. - * @access public - */ - function getPath() { - if (! $this->path && $this->host) { - return '/'; - } - return $this->path; - } - - /** - * Accessor for page if any. This may be a - * directory name if ambiguious. - * @return Page name. - * @access public - */ - function getPage() { - if (! preg_match('/([^\/]*?)$/', $this->getPath(), $matches)) { - return false; - } - return $matches[1]; - } - - /** - * Gets the path to the page. - * @return string Path less the page. - * @access public - */ - function getBasePath() { - if (! preg_match('/(.*\/)[^\/]*?$/', $this->getPath(), $matches)) { - return false; - } - return $matches[1]; - } - - /** - * Accessor for fragment at end of URL after the "#". - * @return string Part after "#". - * @access public - */ - function getFragment() { - return $this->fragment; - } - - /** - * Sets image coordinates. Set to false to clear - * them. - * @param integer $x Horizontal position. - * @param integer $y Vertical position. - * @access public - */ - function setCoordinates($x = false, $y = false) { - if (($x === false) || ($y === false)) { - $this->x = $this->y = false; - return; - } - $this->x = (integer)$x; - $this->y = (integer)$y; - } - - /** - * Accessor for horizontal image coordinate. - * @return integer X value. - * @access public - */ - function getX() { - return $this->x; - } - - /** - * Accessor for vertical image coordinate. - * @return integer Y value. - * @access public - */ - function getY() { - return $this->y; - } - - /** - * Accessor for current request parameters - * in URL string form. Will return teh original request - * if at all possible even if it doesn't make much - * sense. - * @return string Form is string "?a=1&b=2", etc. - * @access public - */ - function getEncodedRequest() { - if ($this->raw) { - $encoded = $this->raw; - } else { - $encoded = $this->request->asUrlRequest(); - } - if ($encoded) { - return '?' . preg_replace('/^\?/', '', $encoded); - } - return ''; - } - - /** - * Adds an additional parameter to the request. - * @param string $key Name of parameter. - * @param string $value Value as string. - * @access public - */ - function addRequestParameter($key, $value) { - $this->raw = false; - $this->request->add($key, $value); - } - - /** - * Adds additional parameters to the request. - * @param hash/SimpleFormEncoding $parameters Additional - * parameters. - * @access public - */ - function addRequestParameters($parameters) { - $this->raw = false; - $this->request->merge($parameters); - } - - /** - * Clears down all parameters. - * @access public - */ - function clearRequest() { - $this->raw = false; - $this->request = new SimpleGetEncoding(); - } - - /** - * Gets the frame target if present. Although - * not strictly part of the URL specification it - * acts as similarily to the browser. - * @return boolean/string Frame name or false if none. - * @access public - */ - function getTarget() { - return $this->target; - } - - /** - * Attaches a frame target. - * @param string $frame Name of frame. - * @access public - */ - function setTarget($frame) { - $this->raw = false; - $this->target = $frame; - } - - /** - * Renders the URL back into a string. - * @return string URL in canonical form. - * @access public - */ - function asString() { - $path = $this->path; - $scheme = $identity = $host = $port = $encoded = $fragment = ''; - if ($this->username && $this->password) { - $identity = $this->username . ':' . $this->password . '@'; - } - if ($this->getHost()) { - $scheme = $this->getScheme() ? $this->getScheme() : 'http'; - $scheme .= '://'; - $host = $this->getHost(); - } elseif ($this->getScheme() === 'file') { - // Safest way; otherwise, file URLs on Windows have an extra - // leading slash. It might be possible to convert file:// - // URIs to local file paths, but that requires more research. - $scheme = 'file://'; - } - if ($this->getPort() && $this->getPort() != 80 ) { - $port = ':'.$this->getPort(); - } - - if (substr($this->path, 0, 1) == '/') { - $path = $this->normalisePath($this->path); - } - $encoded = $this->getEncodedRequest(); - $fragment = $this->getFragment() ? '#'. $this->getFragment() : ''; - $coords = $this->getX() === false ? '' : '?' . $this->getX() . ',' . $this->getY(); - return "$scheme$identity$host$port$path$encoded$fragment$coords"; - } - - /** - * Replaces unknown sections to turn a relative - * URL into an absolute one. The base URL can - * be either a string or a SimpleUrl object. - * @param string/SimpleUrl $base Base URL. - * @access public - */ - function makeAbsolute($base) { - if (! is_object($base)) { - $base = new SimpleUrl($base); - } - if ($this->getHost()) { - $scheme = $this->getScheme(); - $host = $this->getHost(); - $port = $this->getPort() ? ':' . $this->getPort() : ''; - $identity = $this->getIdentity() ? $this->getIdentity() . '@' : ''; - if (! $identity) { - $identity = $base->getIdentity() ? $base->getIdentity() . '@' : ''; - } - } else { - $scheme = $base->getScheme(); - $host = $base->getHost(); - $port = $base->getPort() ? ':' . $base->getPort() : ''; - $identity = $base->getIdentity() ? $base->getIdentity() . '@' : ''; - } - $path = $this->normalisePath($this->extractAbsolutePath($base)); - $encoded = $this->getEncodedRequest(); - $fragment = $this->getFragment() ? '#'. $this->getFragment() : ''; - $coords = $this->getX() === false ? '' : '?' . $this->getX() . ',' . $this->getY(); - return new SimpleUrl("$scheme://$identity$host$port$path$encoded$fragment$coords"); - } - - /** - * Replaces unknown sections of the path with base parts - * to return a complete absolute one. - * @param string/SimpleUrl $base Base URL. - * @param string Absolute path. - * @access private - */ - protected function extractAbsolutePath($base) { - if ($this->getHost()) { - return $this->path; - } - if (! $this->isRelativePath($this->path)) { - return $this->path; - } - if ($this->path) { - return $base->getBasePath() . $this->path; - } - return $base->getPath(); - } - - /** - * Simple test to see if a path part is relative. - * @param string $path Path to test. - * @return boolean True if starts with a "/". - * @access private - */ - protected function isRelativePath($path) { - return (substr($path, 0, 1) != '/'); - } - - /** - * Extracts the username and password for use in rendering - * a URL. - * @return string/boolean Form of username:password or false. - * @access public - */ - function getIdentity() { - if ($this->username && $this->password) { - return $this->username . ':' . $this->password; - } - return false; - } - - /** - * Replaces . and .. sections of the path. - * @param string $path Unoptimised path. - * @return string Path with dots removed if possible. - * @access public - */ - function normalisePath($path) { - $path = preg_replace('|/\./|', '/', $path); - return preg_replace('|/[^/]+/\.\./|', '/', $path); - } - - /** - * A pipe seperated list of all TLDs that result in two part - * domain names. - * @return string Pipe separated list. - * @access public - */ - static function getAllTopLevelDomains() { - return 'com|edu|net|org|gov|mil|int|biz|info|name|pro|aero|coop|museum'; - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/user_agent.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/user_agent.php deleted file mode 100644 index c7f6536d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/user_agent.php +++ /dev/null @@ -1,328 +0,0 @@ -cookie_jar = new SimpleCookieJar(); - $this->authenticator = new SimpleAuthenticator(); - } - - /** - * Removes expired and temporary cookies as if - * the browser was closed and re-opened. Authorisation - * has to be obtained again as well. - * @param string/integer $date Time when session restarted. - * If omitted then all persistent - * cookies are kept. - * @access public - */ - function restart($date = false) { - $this->cookie_jar->restartSession($date); - $this->authenticator->restartSession(); - } - - /** - * Adds a header to every fetch. - * @param string $header Header line to add to every - * request until cleared. - * @access public - */ - function addHeader($header) { - $this->additional_headers[] = $header; - } - - /** - * Ages the cookies by the specified time. - * @param integer $interval Amount in seconds. - * @access public - */ - function ageCookies($interval) { - $this->cookie_jar->agePrematurely($interval); - } - - /** - * Sets an additional cookie. If a cookie has - * the same name and path it is replaced. - * @param string $name Cookie key. - * @param string $value Value of cookie. - * @param string $host Host upon which the cookie is valid. - * @param string $path Cookie path if not host wide. - * @param string $expiry Expiry date. - * @access public - */ - function setCookie($name, $value, $host = false, $path = '/', $expiry = false) { - $this->cookie_jar->setCookie($name, $value, $host, $path, $expiry); - } - - /** - * Reads the most specific cookie value from the - * browser cookies. - * @param string $host Host to search. - * @param string $path Applicable path. - * @param string $name Name of cookie to read. - * @return string False if not present, else the - * value as a string. - * @access public - */ - function getCookieValue($host, $path, $name) { - return $this->cookie_jar->getCookieValue($host, $path, $name); - } - - /** - * Reads the current cookies within the base URL. - * @param string $name Key of cookie to find. - * @param SimpleUrl $base Base URL to search from. - * @return string/boolean Null if there is no base URL, false - * if the cookie is not set. - * @access public - */ - function getBaseCookieValue($name, $base) { - if (! $base) { - return null; - } - return $this->getCookieValue($base->getHost(), $base->getPath(), $name); - } - - /** - * Switches off cookie sending and recieving. - * @access public - */ - function ignoreCookies() { - $this->cookies_enabled = false; - } - - /** - * Switches back on the cookie sending and recieving. - * @access public - */ - function useCookies() { - $this->cookies_enabled = true; - } - - /** - * Sets the socket timeout for opening a connection. - * @param integer $timeout Maximum time in seconds. - * @access public - */ - function setConnectionTimeout($timeout) { - $this->connection_timeout = $timeout; - } - - /** - * Sets the maximum number of redirects before - * a page will be loaded anyway. - * @param integer $max Most hops allowed. - * @access public - */ - function setMaximumRedirects($max) { - $this->max_redirects = $max; - } - - /** - * Sets proxy to use on all requests for when - * testing from behind a firewall. Set URL - * to false to disable. - * @param string $proxy Proxy URL. - * @param string $username Proxy username for authentication. - * @param string $password Proxy password for authentication. - * @access public - */ - function useProxy($proxy, $username, $password) { - if (! $proxy) { - $this->proxy = false; - return; - } - if ((strncmp($proxy, 'http://', 7) != 0) && (strncmp($proxy, 'https://', 8) != 0)) { - $proxy = 'http://'. $proxy; - } - $this->proxy = new SimpleUrl($proxy); - $this->proxy_username = $username; - $this->proxy_password = $password; - } - - /** - * Test to see if the redirect limit is passed. - * @param integer $redirects Count so far. - * @return boolean True if over. - * @access private - */ - protected function isTooManyRedirects($redirects) { - return ($redirects > $this->max_redirects); - } - - /** - * Sets the identity for the current realm. - * @param string $host Host to which realm applies. - * @param string $realm Full name of realm. - * @param string $username Username for realm. - * @param string $password Password for realm. - * @access public - */ - function setIdentity($host, $realm, $username, $password) { - $this->authenticator->setIdentityForRealm($host, $realm, $username, $password); - } - - /** - * Fetches a URL as a response object. Will keep trying if redirected. - * It will also collect authentication realm information. - * @param string/SimpleUrl $url Target to fetch. - * @param SimpleEncoding $encoding Additional parameters for request. - * @return SimpleHttpResponse Hopefully the target page. - * @access public - */ - function fetchResponse($url, $encoding) { - if ($encoding->getMethod() != 'POST') { - $url->addRequestParameters($encoding); - $encoding->clear(); - } - $response = $this->fetchWhileRedirected($url, $encoding); - if ($headers = $response->getHeaders()) { - if ($headers->isChallenge()) { - $this->authenticator->addRealm( - $url, - $headers->getAuthentication(), - $headers->getRealm()); - } - } - return $response; - } - - /** - * Fetches the page until no longer redirected or - * until the redirect limit runs out. - * @param SimpleUrl $url Target to fetch. - * @param SimpelFormEncoding $encoding Additional parameters for request. - * @return SimpleHttpResponse Hopefully the target page. - * @access private - */ - protected function fetchWhileRedirected($url, $encoding) { - $redirects = 0; - do { - $response = $this->fetch($url, $encoding); - if ($response->isError()) { - return $response; - } - $headers = $response->getHeaders(); - $location = new SimpleUrl($headers->getLocation()); - $url = $location->makeAbsolute($url); - if ($this->cookies_enabled) { - $headers->writeCookiesToJar($this->cookie_jar, $url); - } - if (! $headers->isRedirect()) { - break; - } - $encoding = new SimpleGetEncoding(); - } while (! $this->isTooManyRedirects(++$redirects)); - return $response; - } - - /** - * Actually make the web request. - * @param SimpleUrl $url Target to fetch. - * @param SimpleFormEncoding $encoding Additional parameters for request. - * @return SimpleHttpResponse Headers and hopefully content. - * @access protected - */ - protected function fetch($url, $encoding) { - $request = $this->createRequest($url, $encoding); - return $request->fetch($this->connection_timeout); - } - - /** - * Creates a full page request. - * @param SimpleUrl $url Target to fetch as url object. - * @param SimpleFormEncoding $encoding POST/GET parameters. - * @return SimpleHttpRequest New request. - * @access private - */ - protected function createRequest($url, $encoding) { - $request = $this->createHttpRequest($url, $encoding); - $this->addAdditionalHeaders($request); - if ($this->cookies_enabled) { - $request->readCookiesFromJar($this->cookie_jar, $url); - } - $this->authenticator->addHeaders($request, $url); - return $request; - } - - /** - * Builds the appropriate HTTP request object. - * @param SimpleUrl $url Target to fetch as url object. - * @param SimpleFormEncoding $parameters POST/GET parameters. - * @return SimpleHttpRequest New request object. - * @access protected - */ - protected function createHttpRequest($url, $encoding) { - return new SimpleHttpRequest($this->createRoute($url), $encoding); - } - - /** - * Sets up either a direct route or via a proxy. - * @param SimpleUrl $url Target to fetch as url object. - * @return SimpleRoute Route to take to fetch URL. - * @access protected - */ - protected function createRoute($url) { - if ($this->proxy) { - return new SimpleProxyRoute( - $url, - $this->proxy, - $this->proxy_username, - $this->proxy_password); - } - return new SimpleRoute($url); - } - - /** - * Adds additional manual headers. - * @param SimpleHttpRequest $request Outgoing request. - * @access private - */ - protected function addAdditionalHeaders(&$request) { - foreach ($this->additional_headers as $header) { - $request->addHeaderLine($header); - } - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/web_tester.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/web_tester.php deleted file mode 100644 index 9c3cb065..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/web_tester.php +++ /dev/null @@ -1,1495 +0,0 @@ -value = $value; - } - - /** - * Tests the expectation. True if it matches - * a string value or an array value in any order. - * @param mixed $compare Comparison value. False for - * an unset field. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - if ($this->value === false) { - return ($compare === false); - } - if ($this->isSingle($this->value)) { - return $this->testSingle($compare); - } - if (is_array($this->value)) { - return $this->testMultiple($compare); - } - return false; - } - - /** - * Tests for valid field comparisons with a single option. - * @param mixed $value Value to type check. - * @return boolean True if integer, string or float. - * @access private - */ - protected function isSingle($value) { - return is_string($value) || is_integer($value) || is_float($value); - } - - /** - * String comparison for simple field with a single option. - * @param mixed $compare String to test against. - * @returns boolean True if matching. - * @access private - */ - protected function testSingle($compare) { - if (is_array($compare) && count($compare) == 1) { - $compare = $compare[0]; - } - if (! $this->isSingle($compare)) { - return false; - } - return ($this->value == $compare); - } - - /** - * List comparison for multivalue field. - * @param mixed $compare List in any order to test against. - * @returns boolean True if matching. - * @access private - */ - protected function testMultiple($compare) { - if (is_string($compare)) { - $compare = array($compare); - } - if (! is_array($compare)) { - return false; - } - sort($compare); - return ($this->value === $compare); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $dumper = $this->getDumper(); - if (is_array($compare)) { - sort($compare); - } - if ($this->test($compare)) { - return "Field expectation [" . $dumper->describeValue($this->value) . "]"; - } else { - return "Field expectation [" . $dumper->describeValue($this->value) . - "] fails with [" . - $dumper->describeValue($compare) . "] " . - $dumper->describeDifference($this->value, $compare); - } - } -} - -/** - * Test for a specific HTTP header within a header block. - * @package SimpleTest - * @subpackage WebTester - */ -class HttpHeaderExpectation extends SimpleExpectation { - private $expected_header; - private $expected_value; - - /** - * Sets the field and value to compare against. - * @param string $header Case insenstive trimmed header name. - * @param mixed $value Optional value to compare. If not - * given then any value will match. If - * an expectation object then that will - * be used instead. - * @param string $message Optiona message override. Can use %s as - * a placeholder for the original message. - */ - function __construct($header, $value = false, $message = '%s') { - parent::__construct($message); - $this->expected_header = $this->normaliseHeader($header); - $this->expected_value = $value; - } - - /** - * Accessor for aggregated object. - * @return mixed Expectation set in constructor. - * @access protected - */ - protected function getExpectation() { - return $this->expected_value; - } - - /** - * Removes whitespace at ends and case variations. - * @param string $header Name of header. - * @param string Trimmed and lowecased header - * name. - * @access private - */ - protected function normaliseHeader($header) { - return strtolower(trim($header)); - } - - /** - * Tests the expectation. True if it matches - * a string value or an array value in any order. - * @param mixed $compare Raw header block to search. - * @return boolean True if header present. - * @access public - */ - function test($compare) { - return is_string($this->findHeader($compare)); - } - - /** - * Searches the incoming result. Will extract the matching - * line as text. - * @param mixed $compare Raw header block to search. - * @return string Matching header line. - * @access protected - */ - protected function findHeader($compare) { - $lines = split("\r\n", $compare); - foreach ($lines as $line) { - if ($this->testHeaderLine($line)) { - return $line; - } - } - return false; - } - - /** - * Compares a single header line against the expectation. - * @param string $line A single line to compare. - * @return boolean True if matched. - * @access private - */ - protected function testHeaderLine($line) { - if (count($parsed = split(':', $line, 2)) < 2) { - return false; - } - list($header, $value) = $parsed; - if ($this->normaliseHeader($header) != $this->expected_header) { - return false; - } - return $this->testHeaderValue($value, $this->expected_value); - } - - /** - * Tests the value part of the header. - * @param string $value Value to test. - * @param mixed $expected Value to test against. - * @return boolean True if matched. - * @access protected - */ - protected function testHeaderValue($value, $expected) { - if ($expected === false) { - return true; - } - if (SimpleExpectation::isExpectation($expected)) { - return $expected->test(trim($value)); - } - return (trim($value) == trim($expected)); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Raw header block to search. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - if (SimpleExpectation::isExpectation($this->expected_value)) { - $message = $this->expected_value->overlayMessage($compare, $this->getDumper()); - } else { - $message = $this->expected_header . - ($this->expected_value ? ': ' . $this->expected_value : ''); - } - if (is_string($line = $this->findHeader($compare))) { - return "Searching for header [$message] found [$line]"; - } else { - return "Failed to find header [$message]"; - } - } -} - -/** - * Test for a specific HTTP header within a header block that - * should not be found. - * @package SimpleTest - * @subpackage WebTester - */ -class NoHttpHeaderExpectation extends HttpHeaderExpectation { - private $expected_header; - private $expected_value; - - /** - * Sets the field and value to compare against. - * @param string $unwanted Case insenstive trimmed header name. - * @param string $message Optiona message override. Can use %s as - * a placeholder for the original message. - */ - function __construct($unwanted, $message = '%s') { - parent::__construct($unwanted, false, $message); - } - - /** - * Tests that the unwanted header is not found. - * @param mixed $compare Raw header block to search. - * @return boolean True if header present. - * @access public - */ - function test($compare) { - return ($this->findHeader($compare) === false); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Raw header block to search. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - $expectation = $this->getExpectation(); - if (is_string($line = $this->findHeader($compare))) { - return "Found unwanted header [$expectation] with [$line]"; - } else { - return "Did not find unwanted header [$expectation]"; - } - } -} - -/** - * Test for a text substring. - * @package SimpleTest - * @subpackage UnitTester - */ -class TextExpectation extends SimpleExpectation { - private $substring; - - /** - * Sets the value to compare against. - * @param string $substring Text to search for. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($substring, $message = '%s') { - parent::__construct($message); - $this->substring = $substring; - } - - /** - * Accessor for the substring. - * @return string Text to match. - * @access protected - */ - protected function getSubstring() { - return $this->substring; - } - - /** - * Tests the expectation. True if the text contains the - * substring. - * @param string $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return (strpos($compare, $this->substring) !== false); - } - - /** - * Returns a human readable test message. - * @param mixed $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - if ($this->test($compare)) { - return $this->describeTextMatch($this->getSubstring(), $compare); - } else { - $dumper = $this->getDumper(); - return "Text [" . $this->getSubstring() . - "] not detected in [" . - $dumper->describeValue($compare) . "]"; - } - } - - /** - * Describes a pattern match including the string - * found and it's position. - * @param string $substring Text to search for. - * @param string $subject Subject to search. - * @access protected - */ - protected function describeTextMatch($substring, $subject) { - $position = strpos($subject, $substring); - $dumper = $this->getDumper(); - return "Text [$substring] detected at character [$position] in [" . - $dumper->describeValue($subject) . "] in region [" . - $dumper->clipString($subject, 100, $position) . "]"; - } -} - -/** - * Fail if a substring is detected within the - * comparison text. - * @package SimpleTest - * @subpackage UnitTester - */ -class NoTextExpectation extends TextExpectation { - - /** - * Sets the reject pattern - * @param string $substring Text to search for. - * @param string $message Customised message on failure. - * @access public - */ - function __construct($substring, $message = '%s') { - parent::__construct($substring, $message); - } - - /** - * Tests the expectation. False if the substring appears - * in the text. - * @param string $compare Comparison value. - * @return boolean True if correct. - * @access public - */ - function test($compare) { - return ! parent::test($compare); - } - - /** - * Returns a human readable test message. - * @param string $compare Comparison value. - * @return string Description of success - * or failure. - * @access public - */ - function testMessage($compare) { - if ($this->test($compare)) { - $dumper = $this->getDumper(); - return "Text [" . $this->getSubstring() . - "] not detected in [" . - $dumper->describeValue($compare) . "]"; - } else { - return $this->describeTextMatch($this->getSubstring(), $compare); - } - } -} - -/** - * Test case for testing of web pages. Allows - * fetching of pages, parsing of HTML and - * submitting forms. - * @package SimpleTest - * @subpackage WebTester - */ -class WebTestCase extends SimpleTestCase { - private $browser; - private $ignore_errors = false; - - /** - * Creates an empty test case. Should be subclassed - * with test methods for a functional test case. - * @param string $label Name of test case. Will use - * the class name if none specified. - * @access public - */ - function __construct($label = false) { - parent::__construct($label); - } - - /** - * Announces the start of the test. - * @param string $method Test method just started. - * @access public - */ - function before($method) { - parent::before($method); - $this->setBrowser($this->createBrowser()); - } - - /** - * Announces the end of the test. Includes private clean up. - * @param string $method Test method just finished. - * @access public - */ - function after($method) { - $this->unsetBrowser(); - parent::after($method); - } - - /** - * Gets a current browser reference for setting - * special expectations or for detailed - * examination of page fetches. - * @return SimpleBrowser Current test browser object. - * @access public - */ - function getBrowser() { - return $this->browser; - } - - /** - * Gets a current browser reference for setting - * special expectations or for detailed - * examination of page fetches. - * @param SimpleBrowser $browser New test browser object. - * @access public - */ - function setBrowser($browser) { - return $this->browser = $browser; - } - - /** - * Clears the current browser reference to help the - * PHP garbage collector. - * @access public - */ - function unsetBrowser() { - unset($this->browser); - } - - /** - * Creates a new default web browser object. - * Will be cleared at the end of the test method. - * @return TestBrowser New browser. - * @access public - */ - function createBrowser() { - return new SimpleBrowser(); - } - - /** - * Gets the last response error. - * @return string Last low level HTTP error. - * @access public - */ - function getTransportError() { - return $this->browser->getTransportError(); - } - - /** - * Accessor for the currently selected URL. - * @return string Current location or false if - * no page yet fetched. - * @access public - */ - function getUrl() { - return $this->browser->getUrl(); - } - - /** - * Dumps the current request for debugging. - * @access public - */ - function showRequest() { - $this->dump($this->browser->getRequest()); - } - - /** - * Dumps the current HTTP headers for debugging. - * @access public - */ - function showHeaders() { - $this->dump($this->browser->getHeaders()); - } - - /** - * Dumps the current HTML source for debugging. - * @access public - */ - function showSource() { - $this->dump($this->browser->getContent()); - } - - /** - * Dumps the visible text only for debugging. - * @access public - */ - function showText() { - $this->dump(wordwrap($this->browser->getContentAsText(), 80)); - } - - /** - * Simulates the closing and reopening of the browser. - * Temporary cookies will be discarded and timed - * cookies will be expired if later than the - * specified time. - * @param string/integer $date Time when session restarted. - * If ommitted then all persistent - * cookies are kept. Time is either - * Cookie format string or timestamp. - * @access public - */ - function restart($date = false) { - if ($date === false) { - $date = time(); - } - $this->browser->restart($date); - } - - /** - * Moves cookie expiry times back into the past. - * Useful for testing timeouts and expiries. - * @param integer $interval Amount to age in seconds. - * @access public - */ - function ageCookies($interval) { - $this->browser->ageCookies($interval); - } - - /** - * Disables frames support. Frames will not be fetched - * and the frameset page will be used instead. - * @access public - */ - function ignoreFrames() { - $this->browser->ignoreFrames(); - } - - /** - * Switches off cookie sending and recieving. - * @access public - */ - function ignoreCookies() { - $this->browser->ignoreCookies(); - } - - /** - * Skips errors for the next request only. You might - * want to confirm that a page is unreachable for - * example. - * @access public - */ - function ignoreErrors() { - $this->ignore_errors = true; - } - - /** - * Issues a fail if there is a transport error anywhere - * in the current frameset. Only one such error is - * reported. - * @param string/boolean $result HTML or failure. - * @return string/boolean $result Passes through result. - * @access private - */ - protected function failOnError($result) { - if (! $this->ignore_errors) { - if ($error = $this->browser->getTransportError()) { - $this->fail($error); - } - } - $this->ignore_errors = false; - return $result; - } - - /** - * Adds a header to every fetch. - * @param string $header Header line to add to every - * request until cleared. - * @access public - */ - function addHeader($header) { - $this->browser->addHeader($header); - } - - /** - * Sets the maximum number of redirects before - * the web page is loaded regardless. - * @param integer $max Maximum hops. - * @access public - */ - function setMaximumRedirects($max) { - if (! $this->browser) { - trigger_error( - 'Can only set maximum redirects in a test method, setUp() or tearDown()'); - } - $this->browser->setMaximumRedirects($max); - } - - /** - * Sets the socket timeout for opening a connection and - * receiving at least one byte of information. - * @param integer $timeout Maximum time in seconds. - * @access public - */ - function setConnectionTimeout($timeout) { - $this->browser->setConnectionTimeout($timeout); - } - - /** - * Sets proxy to use on all requests for when - * testing from behind a firewall. Set URL - * to false to disable. - * @param string $proxy Proxy URL. - * @param string $username Proxy username for authentication. - * @param string $password Proxy password for authentication. - * @access public - */ - function useProxy($proxy, $username = false, $password = false) { - $this->browser->useProxy($proxy, $username, $password); - } - - /** - * Fetches a page into the page buffer. If - * there is no base for the URL then the - * current base URL is used. After the fetch - * the base URL reflects the new location. - * @param string $url URL to fetch. - * @param hash $parameters Optional additional GET data. - * @return boolean/string Raw page on success. - * @access public - */ - function get($url, $parameters = false) { - return $this->failOnError($this->browser->get($url, $parameters)); - } - - /** - * Fetches a page by POST into the page buffer. - * If there is no base for the URL then the - * current base URL is used. After the fetch - * the base URL reflects the new location. - * @param string $url URL to fetch. - * @param hash $parameters Optional additional GET data. - * @return boolean/string Raw page on success. - * @access public - */ - function post($url, $parameters = false) { - return $this->failOnError($this->browser->post($url, $parameters)); - } - - /** - * Does a HTTP HEAD fetch, fetching only the page - * headers. The current base URL is unchanged by this. - * @param string $url URL to fetch. - * @param hash $parameters Optional additional GET data. - * @return boolean True on success. - * @access public - */ - function head($url, $parameters = false) { - return $this->failOnError($this->browser->head($url, $parameters)); - } - - /** - * Equivalent to hitting the retry button on the - * browser. Will attempt to repeat the page fetch. - * @return boolean True if fetch succeeded. - * @access public - */ - function retry() { - return $this->failOnError($this->browser->retry()); - } - - /** - * Equivalent to hitting the back button on the - * browser. - * @return boolean True if history entry and - * fetch succeeded. - * @access public - */ - function back() { - return $this->failOnError($this->browser->back()); - } - - /** - * Equivalent to hitting the forward button on the - * browser. - * @return boolean True if history entry and - * fetch succeeded. - * @access public - */ - function forward() { - return $this->failOnError($this->browser->forward()); - } - - /** - * Retries a request after setting the authentication - * for the current realm. - * @param string $username Username for realm. - * @param string $password Password for realm. - * @return boolean/string HTML on successful fetch. Note - * that authentication may still have - * failed. - * @access public - */ - function authenticate($username, $password) { - return $this->failOnError( - $this->browser->authenticate($username, $password)); - } - - /** - * Gets the cookie value for the current browser context. - * @param string $name Name of cookie. - * @return string Value of cookie or false if unset. - * @access public - */ - function getCookie($name) { - return $this->browser->getCurrentCookieValue($name); - } - - /** - * Sets a cookie in the current browser. - * @param string $name Name of cookie. - * @param string $value Cookie value. - * @param string $host Host upon which the cookie is valid. - * @param string $path Cookie path if not host wide. - * @param string $expiry Expiry date. - * @access public - */ - function setCookie($name, $value, $host = false, $path = '/', $expiry = false) { - $this->browser->setCookie($name, $value, $host, $path, $expiry); - } - - /** - * Accessor for current frame focus. Will be - * false if no frame has focus. - * @return integer/string/boolean Label if any, otherwise - * the position in the frameset - * or false if none. - * @access public - */ - function getFrameFocus() { - return $this->browser->getFrameFocus(); - } - - /** - * Sets the focus by index. The integer index starts from 1. - * @param integer $choice Chosen frame. - * @return boolean True if frame exists. - * @access public - */ - function setFrameFocusByIndex($choice) { - return $this->browser->setFrameFocusByIndex($choice); - } - - /** - * Sets the focus by name. - * @param string $name Chosen frame. - * @return boolean True if frame exists. - * @access public - */ - function setFrameFocus($name) { - return $this->browser->setFrameFocus($name); - } - - /** - * Clears the frame focus. All frames will be searched - * for content. - * @access public - */ - function clearFrameFocus() { - return $this->browser->clearFrameFocus(); - } - - /** - * Clicks a visible text item. Will first try buttons, - * then links and then images. - * @param string $label Visible text or alt text. - * @return string/boolean Raw page or false. - * @access public - */ - function click($label) { - return $this->failOnError($this->browser->click($label)); - } - - /** - * Checks for a click target. - * @param string $label Visible text or alt text. - * @return boolean True if click target. - * @access public - */ - function assertClickable($label, $message = '%s') { - return $this->assertTrue( - $this->browser->isClickable($label), - sprintf($message, "Click target [$label] should exist")); - } - - /** - * Clicks the submit button by label. The owning - * form will be submitted by this. - * @param string $label Button label. An unlabeled - * button can be triggered by 'Submit'. - * @param hash $additional Additional form values. - * @return boolean/string Page on success, else false. - * @access public - */ - function clickSubmit($label = 'Submit', $additional = false) { - return $this->failOnError( - $this->browser->clickSubmit($label, $additional)); - } - - /** - * Clicks the submit button by name attribute. The owning - * form will be submitted by this. - * @param string $name Name attribute of button. - * @param hash $additional Additional form values. - * @return boolean/string Page on success. - * @access public - */ - function clickSubmitByName($name, $additional = false) { - return $this->failOnError( - $this->browser->clickSubmitByName($name, $additional)); - } - - /** - * Clicks the submit button by ID attribute. The owning - * form will be submitted by this. - * @param string $id ID attribute of button. - * @param hash $additional Additional form values. - * @return boolean/string Page on success. - * @access public - */ - function clickSubmitById($id, $additional = false) { - return $this->failOnError( - $this->browser->clickSubmitById($id, $additional)); - } - - /** - * Checks for a valid button label. - * @param string $label Visible text. - * @return boolean True if click target. - * @access public - */ - function assertSubmit($label, $message = '%s') { - return $this->assertTrue( - $this->browser->isSubmit($label), - sprintf($message, "Submit button [$label] should exist")); - } - - /** - * Clicks the submit image by some kind of label. Usually - * the alt tag or the nearest equivalent. The owning - * form will be submitted by this. Clicking outside of - * the boundary of the coordinates will result in - * a failure. - * @param string $label Alt attribute of button. - * @param integer $x X-coordinate of imaginary click. - * @param integer $y Y-coordinate of imaginary click. - * @param hash $additional Additional form values. - * @return boolean/string Page on success. - * @access public - */ - function clickImage($label, $x = 1, $y = 1, $additional = false) { - return $this->failOnError( - $this->browser->clickImage($label, $x, $y, $additional)); - } - - /** - * Clicks the submit image by the name. Usually - * the alt tag or the nearest equivalent. The owning - * form will be submitted by this. Clicking outside of - * the boundary of the coordinates will result in - * a failure. - * @param string $name Name attribute of button. - * @param integer $x X-coordinate of imaginary click. - * @param integer $y Y-coordinate of imaginary click. - * @param hash $additional Additional form values. - * @return boolean/string Page on success. - * @access public - */ - function clickImageByName($name, $x = 1, $y = 1, $additional = false) { - return $this->failOnError( - $this->browser->clickImageByName($name, $x, $y, $additional)); - } - - /** - * Clicks the submit image by ID attribute. The owning - * form will be submitted by this. Clicking outside of - * the boundary of the coordinates will result in - * a failure. - * @param integer/string $id ID attribute of button. - * @param integer $x X-coordinate of imaginary click. - * @param integer $y Y-coordinate of imaginary click. - * @param hash $additional Additional form values. - * @return boolean/string Page on success. - * @access public - */ - function clickImageById($id, $x = 1, $y = 1, $additional = false) { - return $this->failOnError( - $this->browser->clickImageById($id, $x, $y, $additional)); - } - - /** - * Checks for a valid image with atht alt text or title. - * @param string $label Visible text. - * @return boolean True if click target. - * @access public - */ - function assertImage($label, $message = '%s') { - return $this->assertTrue( - $this->browser->isImage($label), - sprintf($message, "Image with text [$label] should exist")); - } - - /** - * Submits a form by the ID. - * @param string $id Form ID. No button information - * is submitted this way. - * @return boolean/string Page on success. - * @access public - */ - function submitFormById($id) { - return $this->failOnError($this->browser->submitFormById($id)); - } - - /** - * Follows a link by name. Will click the first link - * found with this link text by default, or a later - * one if an index is given. Match is case insensitive - * with normalised space. - * @param string $label Text between the anchor tags. - * @param integer $index Link position counting from zero. - * @return boolean/string Page on success. - * @access public - */ - function clickLink($label, $index = 0) { - return $this->failOnError($this->browser->clickLink($label, $index)); - } - - /** - * Follows a link by id attribute. - * @param string $id ID attribute value. - * @return boolean/string Page on success. - * @access public - */ - function clickLinkById($id) { - return $this->failOnError($this->browser->clickLinkById($id)); - } - - /** - * Tests for the presence of a link label. Match is - * case insensitive with normalised space. - * @param string $label Text between the anchor tags. - * @param mixed $expected Expected URL or expectation object. - * @param string $message Message to display. Default - * can be embedded with %s. - * @return boolean True if link present. - * @access public - */ - function assertLink($label, $expected = true, $message = '%s') { - $url = $this->browser->getLink($label); - if ($expected === true || ($expected !== true && $url === false)) { - return $this->assertTrue($url !== false, sprintf($message, "Link [$label] should exist")); - } - if (! SimpleExpectation::isExpectation($expected)) { - $expected = new IdenticalExpectation($expected); - } - return $this->assert($expected, $url->asString(), sprintf($message, "Link [$label] should match")); - } - - /** - * Tests for the non-presence of a link label. Match is - * case insensitive with normalised space. - * @param string/integer $label Text between the anchor tags - * or ID attribute. - * @param string $message Message to display. Default - * can be embedded with %s. - * @return boolean True if link missing. - * @access public - */ - function assertNoLink($label, $message = '%s') { - return $this->assertTrue( - $this->browser->getLink($label) === false, - sprintf($message, "Link [$label] should not exist")); - } - - /** - * Tests for the presence of a link id attribute. - * @param string $id Id attribute value. - * @param mixed $expected Expected URL or expectation object. - * @param string $message Message to display. Default - * can be embedded with %s. - * @return boolean True if link present. - * @access public - */ - function assertLinkById($id, $expected = true, $message = '%s') { - $url = $this->browser->getLinkById($id); - if ($expected === true) { - return $this->assertTrue($url !== false, sprintf($message, "Link ID [$id] should exist")); - } - if (! SimpleExpectation::isExpectation($expected)) { - $expected = new IdenticalExpectation($expected); - } - return $this->assert($expected, $url->asString(), sprintf($message, "Link ID [$id] should match")); - } - - /** - * Tests for the non-presence of a link label. Match is - * case insensitive with normalised space. - * @param string $id Id attribute value. - * @param string $message Message to display. Default - * can be embedded with %s. - * @return boolean True if link missing. - * @access public - */ - function assertNoLinkById($id, $message = '%s') { - return $this->assertTrue( - $this->browser->getLinkById($id) === false, - sprintf($message, "Link ID [$id] should not exist")); - } - - /** - * Sets all form fields with that label, or name if there - * is no label attached. - * @param string $name Name of field in forms. - * @param string $value New value of field. - * @return boolean True if field exists, otherwise false. - * @access public - */ - function setField($label, $value, $position=false) { - return $this->browser->setField($label, $value, $position); - } - - /** - * Sets all form fields with that name. - * @param string $name Name of field in forms. - * @param string $value New value of field. - * @return boolean True if field exists, otherwise false. - * @access public - */ - function setFieldByName($name, $value, $position=false) { - return $this->browser->setFieldByName($name, $value, $position); - } - - /** - * Sets all form fields with that id. - * @param string/integer $id Id of field in forms. - * @param string $value New value of field. - * @return boolean True if field exists, otherwise false. - * @access public - */ - function setFieldById($id, $value) { - return $this->browser->setFieldById($id, $value); - } - - /** - * Confirms that the form element is currently set - * to the expected value. A missing form will always - * fail. If no value is given then only the existence - * of the field is checked. - * @param string $name Name of field in forms. - * @param mixed $expected Expected string/array value or - * false for unset fields. - * @param string $message Message to display. Default - * can be embedded with %s. - * @return boolean True if pass. - * @access public - */ - function assertField($label, $expected = true, $message = '%s') { - $value = $this->browser->getField($label); - return $this->assertFieldValue($label, $value, $expected, $message); - } - - /** - * Confirms that the form element is currently set - * to the expected value. A missing form element will always - * fail. If no value is given then only the existence - * of the field is checked. - * @param string $name Name of field in forms. - * @param mixed $expected Expected string/array value or - * false for unset fields. - * @param string $message Message to display. Default - * can be embedded with %s. - * @return boolean True if pass. - * @access public - */ - function assertFieldByName($name, $expected = true, $message = '%s') { - $value = $this->browser->getFieldByName($name); - return $this->assertFieldValue($name, $value, $expected, $message); - } - - /** - * Confirms that the form element is currently set - * to the expected value. A missing form will always - * fail. If no ID is given then only the existence - * of the field is checked. - * @param string/integer $id Name of field in forms. - * @param mixed $expected Expected string/array value or - * false for unset fields. - * @param string $message Message to display. Default - * can be embedded with %s. - * @return boolean True if pass. - * @access public - */ - function assertFieldById($id, $expected = true, $message = '%s') { - $value = $this->browser->getFieldById($id); - return $this->assertFieldValue($id, $value, $expected, $message); - } - - /** - * Tests the field value against the expectation. - * @param string $identifier Name, ID or label. - * @param mixed $value Current field value. - * @param mixed $expected Expected value to match. - * @param string $message Failure message. - * @return boolean True if pass - * @access protected - */ - protected function assertFieldValue($identifier, $value, $expected, $message) { - if ($expected === true) { - return $this->assertTrue( - isset($value), - sprintf($message, "Field [$identifier] should exist")); - } - if (! SimpleExpectation::isExpectation($expected)) { - $identifier = str_replace('%', '%%', $identifier); - $expected = new FieldExpectation( - $expected, - "Field [$identifier] should match with [%s]"); - } - return $this->assert($expected, $value, $message); - } - - /** - * Checks the response code against a list - * of possible values. - * @param array $responses Possible responses for a pass. - * @param string $message Message to display. Default - * can be embedded with %s. - * @return boolean True if pass. - * @access public - */ - function assertResponse($responses, $message = '%s') { - $responses = (is_array($responses) ? $responses : array($responses)); - $code = $this->browser->getResponseCode(); - $message = sprintf($message, "Expecting response in [" . - implode(", ", $responses) . "] got [$code]"); - return $this->assertTrue(in_array($code, $responses), $message); - } - - /** - * Checks the mime type against a list - * of possible values. - * @param array $types Possible mime types for a pass. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertMime($types, $message = '%s') { - $types = (is_array($types) ? $types : array($types)); - $type = $this->browser->getMimeType(); - $message = sprintf($message, "Expecting mime type in [" . - implode(", ", $types) . "] got [$type]"); - return $this->assertTrue(in_array($type, $types), $message); - } - - /** - * Attempt to match the authentication type within - * the security realm we are currently matching. - * @param string $authentication Usually basic. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertAuthentication($authentication = false, $message = '%s') { - if (! $authentication) { - $message = sprintf($message, "Expected any authentication type, got [" . - $this->browser->getAuthentication() . "]"); - return $this->assertTrue( - $this->browser->getAuthentication(), - $message); - } else { - $message = sprintf($message, "Expected authentication [$authentication] got [" . - $this->browser->getAuthentication() . "]"); - return $this->assertTrue( - strtolower($this->browser->getAuthentication()) == strtolower($authentication), - $message); - } - } - - /** - * Checks that no authentication is necessary to view - * the desired page. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertNoAuthentication($message = '%s') { - $message = sprintf($message, "Expected no authentication type, got [" . - $this->browser->getAuthentication() . "]"); - return $this->assertFalse($this->browser->getAuthentication(), $message); - } - - /** - * Attempts to match the current security realm. - * @param string $realm Name of security realm. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertRealm($realm, $message = '%s') { - if (! SimpleExpectation::isExpectation($realm)) { - $realm = new EqualExpectation($realm); - } - return $this->assert( - $realm, - $this->browser->getRealm(), - "Expected realm -> $message"); - } - - /** - * Checks each header line for the required value. If no - * value is given then only an existence check is made. - * @param string $header Case insensitive header name. - * @param mixed $value Case sensitive trimmed string to - * match against. An expectation object - * can be used for pattern matching. - * @return boolean True if pass. - * @access public - */ - function assertHeader($header, $value = false, $message = '%s') { - return $this->assert( - new HttpHeaderExpectation($header, $value), - $this->browser->getHeaders(), - $message); - } - - /** - * Confirms that the header type has not been received. - * Only the landing page is checked. If you want to check - * redirect pages, then you should limit redirects so - * as to capture the page you want. - * @param string $header Case insensitive header name. - * @return boolean True if pass. - * @access public - */ - function assertNoHeader($header, $message = '%s') { - return $this->assert( - new NoHttpHeaderExpectation($header), - $this->browser->getHeaders(), - $message); - } - - /** - * Tests the text between the title tags. - * @param string/SimpleExpectation $title Expected title. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertTitle($title = false, $message = '%s') { - if (! SimpleExpectation::isExpectation($title)) { - $title = new EqualExpectation($title); - } - return $this->assert($title, $this->browser->getTitle(), $message); - } - - /** - * Will trigger a pass if the text is found in the plain - * text form of the page. - * @param string $text Text to look for. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertText($text, $message = '%s') { - return $this->assert( - new TextExpectation($text), - $this->browser->getContentAsText(), - $message); - } - - /** - * Will trigger a pass if the text is not found in the plain - * text form of the page. - * @param string $text Text to look for. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertNoText($text, $message = '%s') { - return $this->assert( - new NoTextExpectation($text), - $this->browser->getContentAsText(), - $message); - } - - /** - * Will trigger a pass if the Perl regex pattern - * is found in the raw content. - * @param string $pattern Perl regex to look for including - * the regex delimiters. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertPattern($pattern, $message = '%s') { - return $this->assert( - new PatternExpectation($pattern), - $this->browser->getContent(), - $message); - } - - /** - * Will trigger a pass if the perl regex pattern - * is not present in raw content. - * @param string $pattern Perl regex to look for including - * the regex delimiters. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertNoPattern($pattern, $message = '%s') { - return $this->assert( - new NoPatternExpectation($pattern), - $this->browser->getContent(), - $message); - } - - /** - * Checks that a cookie is set for the current page - * and optionally checks the value. - * @param string $name Name of cookie to test. - * @param string $expected Expected value as a string or - * false if any value will do. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertCookie($name, $expected = false, $message = '%s') { - $value = $this->getCookie($name); - if (! $expected) { - return $this->assertTrue( - $value, - sprintf($message, "Expecting cookie [$name]")); - } - if (! SimpleExpectation::isExpectation($expected)) { - $expected = new EqualExpectation($expected); - } - return $this->assert($expected, $value, "Expecting cookie [$name] -> $message"); - } - - /** - * Checks that no cookie is present or that it has - * been successfully cleared. - * @param string $name Name of cookie to test. - * @param string $message Message to display. - * @return boolean True if pass. - * @access public - */ - function assertNoCookie($name, $message = '%s') { - return $this->assertTrue( - $this->getCookie($name) === null or $this->getCookie($name) === false, - sprintf($message, "Not expecting cookie [$name]")); - } - - /** - * Called from within the test methods to register - * passes and failures. - * @param boolean $result Pass on true. - * @param string $message Message to display describing - * the test state. - * @return boolean True on pass - * @access public - */ - function assertTrue($result, $message = false) { - return $this->assert(new TrueExpectation(), $result, $message); - } - - /** - * Will be true on false and vice versa. False - * is the PHP definition of false, so that null, - * empty strings, zero and an empty array all count - * as false. - * @param boolean $result Pass on false. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertFalse($result, $message = '%s') { - return $this->assert(new FalseExpectation(), $result, $message); - } - - /** - * Will trigger a pass if the two parameters have - * the same value only. Otherwise a fail. This - * is for testing hand extracted text, etc. - * @param mixed $first Value to compare. - * @param mixed $second Value to compare. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertEqual($first, $second, $message = '%s') { - return $this->assert( - new EqualExpectation($first), - $second, - $message); - } - - /** - * Will trigger a pass if the two parameters have - * a different value. Otherwise a fail. This - * is for testing hand extracted text, etc. - * @param mixed $first Value to compare. - * @param mixed $second Value to compare. - * @param string $message Message to display. - * @return boolean True on pass - * @access public - */ - function assertNotEqual($first, $second, $message = '%s') { - return $this->assert( - new NotEqualExpectation($first), - $second, - $message); - } - - /** - * Uses a stack trace to find the line of an assertion. - * @return string Line number of first assert* - * method embedded in format string. - * @access public - */ - function getAssertionLine() { - $trace = new SimpleStackTrace(array('assert', 'click', 'pass', 'fail')); - return $trace->traceMethod(); - } -} -?> \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/xml.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/xml.php deleted file mode 100644 index 54fb6f5b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/simpletest/xml.php +++ /dev/null @@ -1,647 +0,0 @@ -namespace = ($namespace ? $namespace . ':' : ''); - $this->indent = $indent; - } - - /** - * Calculates the pretty printing indent level - * from the current level of nesting. - * @param integer $offset Extra indenting level. - * @return string Leading space. - * @access protected - */ - protected function getIndent($offset = 0) { - return str_repeat( - $this->indent, - count($this->getTestList()) + $offset); - } - - /** - * Converts character string to parsed XML - * entities string. - * @param string text Unparsed character data. - * @return string Parsed character data. - * @access public - */ - function toParsedXml($text) { - return str_replace( - array('&', '<', '>', '"', '\''), - array('&', '<', '>', '"', '''), - $text); - } - - /** - * Paints the start of a group test. - * @param string $test_name Name of test that is starting. - * @param integer $size Number of test cases starting. - * @access public - */ - function paintGroupStart($test_name, $size) { - parent::paintGroupStart($test_name, $size); - print $this->getIndent(); - print "<" . $this->namespace . "group size=\"$size\">\n"; - print $this->getIndent(1); - print "<" . $this->namespace . "name>" . - $this->toParsedXml($test_name) . - "namespace . "name>\n"; - } - - /** - * Paints the end of a group test. - * @param string $test_name Name of test that is ending. - * @access public - */ - function paintGroupEnd($test_name) { - print $this->getIndent(); - print "namespace . "group>\n"; - parent::paintGroupEnd($test_name); - } - - /** - * Paints the start of a test case. - * @param string $test_name Name of test that is starting. - * @access public - */ - function paintCaseStart($test_name) { - parent::paintCaseStart($test_name); - print $this->getIndent(); - print "<" . $this->namespace . "case>\n"; - print $this->getIndent(1); - print "<" . $this->namespace . "name>" . - $this->toParsedXml($test_name) . - "namespace . "name>\n"; - } - - /** - * Paints the end of a test case. - * @param string $test_name Name of test that is ending. - * @access public - */ - function paintCaseEnd($test_name) { - print $this->getIndent(); - print "namespace . "case>\n"; - parent::paintCaseEnd($test_name); - } - - /** - * Paints the start of a test method. - * @param string $test_name Name of test that is starting. - * @access public - */ - function paintMethodStart($test_name) { - parent::paintMethodStart($test_name); - print $this->getIndent(); - print "<" . $this->namespace . "test>\n"; - print $this->getIndent(1); - print "<" . $this->namespace . "name>" . - $this->toParsedXml($test_name) . - "namespace . "name>\n"; - } - - /** - * Paints the end of a test method. - * @param string $test_name Name of test that is ending. - * @param integer $progress Number of test cases ending. - * @access public - */ - function paintMethodEnd($test_name) { - print $this->getIndent(); - print "namespace . "test>\n"; - parent::paintMethodEnd($test_name); - } - - /** - * Paints pass as XML. - * @param string $message Message to encode. - * @access public - */ - function paintPass($message) { - parent::paintPass($message); - print $this->getIndent(1); - print "<" . $this->namespace . "pass>"; - print $this->toParsedXml($message); - print "namespace . "pass>\n"; - } - - /** - * Paints failure as XML. - * @param string $message Message to encode. - * @access public - */ - function paintFail($message) { - parent::paintFail($message); - print $this->getIndent(1); - print "<" . $this->namespace . "fail>"; - print $this->toParsedXml($message); - print "namespace . "fail>\n"; - } - - /** - * Paints error as XML. - * @param string $message Message to encode. - * @access public - */ - function paintError($message) { - parent::paintError($message); - print $this->getIndent(1); - print "<" . $this->namespace . "exception>"; - print $this->toParsedXml($message); - print "namespace . "exception>\n"; - } - - /** - * Paints exception as XML. - * @param Exception $exception Exception to encode. - * @access public - */ - function paintException($exception) { - parent::paintException($exception); - print $this->getIndent(1); - print "<" . $this->namespace . "exception>"; - $message = 'Unexpected exception of type [' . get_class($exception) . - '] with message ['. $exception->getMessage() . - '] in ['. $exception->getFile() . - ' line ' . $exception->getLine() . ']'; - print $this->toParsedXml($message); - print "namespace . "exception>\n"; - } - - /** - * Paints the skipping message and tag. - * @param string $message Text to display in skip tag. - * @access public - */ - function paintSkip($message) { - parent::paintSkip($message); - print $this->getIndent(1); - print "<" . $this->namespace . "skip>"; - print $this->toParsedXml($message); - print "namespace . "skip>\n"; - } - - /** - * Paints a simple supplementary message. - * @param string $message Text to display. - * @access public - */ - function paintMessage($message) { - parent::paintMessage($message); - print $this->getIndent(1); - print "<" . $this->namespace . "message>"; - print $this->toParsedXml($message); - print "namespace . "message>\n"; - } - - /** - * Paints a formatted ASCII message such as a - * privateiable dump. - * @param string $message Text to display. - * @access public - */ - function paintFormattedMessage($message) { - parent::paintFormattedMessage($message); - print $this->getIndent(1); - print "<" . $this->namespace . "formatted>"; - print ""; - print "namespace . "formatted>\n"; - } - - /** - * Serialises the event object. - * @param string $type Event type as text. - * @param mixed $payload Message or object. - * @access public - */ - function paintSignal($type, $payload) { - parent::paintSignal($type, $payload); - print $this->getIndent(1); - print "<" . $this->namespace . "signal type=\"$type\">"; - print ""; - print "namespace . "signal>\n"; - } - - /** - * Paints the test document header. - * @param string $test_name First test top level - * to start. - * @access public - * @abstract - */ - function paintHeader($test_name) { - if (! SimpleReporter::inCli()) { - header('Content-type: text/xml'); - } - print "namespace) { - print " xmlns:" . $this->namespace . - "=\"www.lastcraft.com/SimpleTest/Beta3/Report\""; - } - print "?>\n"; - print "<" . $this->namespace . "run>\n"; - } - - /** - * Paints the test document footer. - * @param string $test_name The top level test. - * @access public - * @abstract - */ - function paintFooter($test_name) { - print "namespace . "run>\n"; - } -} - -/** - * Accumulator for incoming tag. Holds the - * incoming test structure information for - * later dispatch to the reporter. - * @package SimpleTest - * @subpackage UnitTester - */ -class NestingXmlTag { - private $name; - private $attributes; - - /** - * Sets the basic test information except - * the name. - * @param hash $attributes Name value pairs. - * @access public - */ - function NestingXmlTag($attributes) { - $this->name = false; - $this->attributes = $attributes; - } - - /** - * Sets the test case/method name. - * @param string $name Name of test. - * @access public - */ - function setName($name) { - $this->name = $name; - } - - /** - * Accessor for name. - * @return string Name of test. - * @access public - */ - function getName() { - return $this->name; - } - - /** - * Accessor for attributes. - * @return hash All attributes. - * @access protected - */ - protected function getAttributes() { - return $this->attributes; - } -} - -/** - * Accumulator for incoming method tag. Holds the - * incoming test structure information for - * later dispatch to the reporter. - * @package SimpleTest - * @subpackage UnitTester - */ -class NestingMethodTag extends NestingXmlTag { - - /** - * Sets the basic test information except - * the name. - * @param hash $attributes Name value pairs. - * @access public - */ - function NestingMethodTag($attributes) { - $this->NestingXmlTag($attributes); - } - - /** - * Signals the appropriate start event on the - * listener. - * @param SimpleReporter $listener Target for events. - * @access public - */ - function paintStart(&$listener) { - $listener->paintMethodStart($this->getName()); - } - - /** - * Signals the appropriate end event on the - * listener. - * @param SimpleReporter $listener Target for events. - * @access public - */ - function paintEnd(&$listener) { - $listener->paintMethodEnd($this->getName()); - } -} - -/** - * Accumulator for incoming case tag. Holds the - * incoming test structure information for - * later dispatch to the reporter. - * @package SimpleTest - * @subpackage UnitTester - */ -class NestingCaseTag extends NestingXmlTag { - - /** - * Sets the basic test information except - * the name. - * @param hash $attributes Name value pairs. - * @access public - */ - function NestingCaseTag($attributes) { - $this->NestingXmlTag($attributes); - } - - /** - * Signals the appropriate start event on the - * listener. - * @param SimpleReporter $listener Target for events. - * @access public - */ - function paintStart(&$listener) { - $listener->paintCaseStart($this->getName()); - } - - /** - * Signals the appropriate end event on the - * listener. - * @param SimpleReporter $listener Target for events. - * @access public - */ - function paintEnd(&$listener) { - $listener->paintCaseEnd($this->getName()); - } -} - -/** - * Accumulator for incoming group tag. Holds the - * incoming test structure information for - * later dispatch to the reporter. - * @package SimpleTest - * @subpackage UnitTester - */ -class NestingGroupTag extends NestingXmlTag { - - /** - * Sets the basic test information except - * the name. - * @param hash $attributes Name value pairs. - * @access public - */ - function NestingGroupTag($attributes) { - $this->NestingXmlTag($attributes); - } - - /** - * Signals the appropriate start event on the - * listener. - * @param SimpleReporter $listener Target for events. - * @access public - */ - function paintStart(&$listener) { - $listener->paintGroupStart($this->getName(), $this->getSize()); - } - - /** - * Signals the appropriate end event on the - * listener. - * @param SimpleReporter $listener Target for events. - * @access public - */ - function paintEnd(&$listener) { - $listener->paintGroupEnd($this->getName()); - } - - /** - * The size in the attributes. - * @return integer Value of size attribute or zero. - * @access public - */ - function getSize() { - $attributes = $this->getAttributes(); - if (isset($attributes['SIZE'])) { - return (integer)$attributes['SIZE']; - } - return 0; - } -} - -/** - * Parser for importing the output of the XmlReporter. - * Dispatches that output to another reporter. - * @package SimpleTest - * @subpackage UnitTester - */ -class SimpleTestXmlParser { - private $listener; - private $expat; - private $tag_stack; - private $in_content_tag; - private $content; - private $attributes; - - /** - * Loads a listener with the SimpleReporter - * interface. - * @param SimpleReporter $listener Listener of tag events. - * @access public - */ - function SimpleTestXmlParser(&$listener) { - $this->listener = &$listener; - $this->expat = &$this->createParser(); - $this->tag_stack = array(); - $this->in_content_tag = false; - $this->content = ''; - $this->attributes = array(); - } - - /** - * Parses a block of XML sending the results to - * the listener. - * @param string $chunk Block of text to read. - * @return boolean True if valid XML. - * @access public - */ - function parse($chunk) { - if (! xml_parse($this->expat, $chunk)) { - trigger_error('XML parse error with ' . - xml_error_string(xml_get_error_code($this->expat))); - return false; - } - return true; - } - - /** - * Sets up expat as the XML parser. - * @return resource Expat handle. - * @access protected - */ - protected function &createParser() { - $expat = xml_parser_create(); - xml_set_object($expat, $this); - xml_set_element_handler($expat, 'startElement', 'endElement'); - xml_set_character_data_handler($expat, 'addContent'); - xml_set_default_handler($expat, 'defaultContent'); - return $expat; - } - - /** - * Opens a new test nesting level. - * @return NestedXmlTag The group, case or method tag - * to start. - * @access private - */ - protected function pushNestingTag($nested) { - array_unshift($this->tag_stack, $nested); - } - - /** - * Accessor for current test structure tag. - * @return NestedXmlTag The group, case or method tag - * being parsed. - * @access private - */ - protected function &getCurrentNestingTag() { - return $this->tag_stack[0]; - } - - /** - * Ends a nesting tag. - * @return NestedXmlTag The group, case or method tag - * just finished. - * @access private - */ - protected function popNestingTag() { - return array_shift($this->tag_stack); - } - - /** - * Test if tag is a leaf node with only text content. - * @param string $tag XML tag name. - * @return @boolean True if leaf, false if nesting. - * @private - */ - protected function isLeaf($tag) { - return in_array($tag, array( - 'NAME', 'PASS', 'FAIL', 'EXCEPTION', 'SKIP', 'MESSAGE', 'FORMATTED', 'SIGNAL')); - } - - /** - * Handler for start of event element. - * @param resource $expat Parser handle. - * @param string $tag Element name. - * @param hash $attributes Name value pairs. - * Attributes without content - * are marked as true. - * @access protected - */ - protected function startElement($expat, $tag, $attributes) { - $this->attributes = $attributes; - if ($tag == 'GROUP') { - $this->pushNestingTag(new NestingGroupTag($attributes)); - } elseif ($tag == 'CASE') { - $this->pushNestingTag(new NestingCaseTag($attributes)); - } elseif ($tag == 'TEST') { - $this->pushNestingTag(new NestingMethodTag($attributes)); - } elseif ($this->isLeaf($tag)) { - $this->in_content_tag = true; - $this->content = ''; - } - } - - /** - * End of element event. - * @param resource $expat Parser handle. - * @param string $tag Element name. - * @access protected - */ - protected function endElement($expat, $tag) { - $this->in_content_tag = false; - if (in_array($tag, array('GROUP', 'CASE', 'TEST'))) { - $nesting_tag = $this->popNestingTag(); - $nesting_tag->paintEnd($this->listener); - } elseif ($tag == 'NAME') { - $nesting_tag = &$this->getCurrentNestingTag(); - $nesting_tag->setName($this->content); - $nesting_tag->paintStart($this->listener); - } elseif ($tag == 'PASS') { - $this->listener->paintPass($this->content); - } elseif ($tag == 'FAIL') { - $this->listener->paintFail($this->content); - } elseif ($tag == 'EXCEPTION') { - $this->listener->paintError($this->content); - } elseif ($tag == 'SKIP') { - $this->listener->paintSkip($this->content); - } elseif ($tag == 'SIGNAL') { - $this->listener->paintSignal( - $this->attributes['TYPE'], - unserialize($this->content)); - } elseif ($tag == 'MESSAGE') { - $this->listener->paintMessage($this->content); - } elseif ($tag == 'FORMATTED') { - $this->listener->paintFormattedMessage($this->content); - } - } - - /** - * Content between start and end elements. - * @param resource $expat Parser handle. - * @param string $text Usually output messages. - * @access protected - */ - protected function addContent($expat, $text) { - if ($this->in_content_tag) { - $this->content .= $text; - } - return true; - } - - /** - * XML and Doctype handler. Discards all such content. - * @param resource $expat Parser handle. - * @param string $default Text of default content. - * @access protected - */ - protected function defaultContent($expat, $default) { - } -} -?> diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay.php deleted file mode 100644 index b1679155..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay.php +++ /dev/null @@ -1,261 +0,0 @@ -. - - */ - -//require 'Yay/Expectations.php'; -//require 'Yay/Matchers/OptionalMatcher.php'; -//require 'Yay/Matchers/AnyMatcher.php'; -//require 'Yay/Matchers/IdenticalMatcher.php'; -//require 'Yay/Matchers/EqualMatcher.php'; -//require 'Yay/Matchers/PatternMatcher.php'; -//require 'Yay/Matchers/ReferenceMatcher.php'; -//require 'Yay/Matchers/BoundsMatcher.php'; -//require 'Yay/Actions/ReturnValueAction.php'; -//require 'Yay/Actions/ReturnReferenceAction.php'; -//require 'Yay/Actions/ThrowAction.php'; -//require 'Yay/Actions/CallbackAction.php'; - -/** - * A convenience factory class. - * @author Chris Corbyn - * @package Yay - */ -class Yay -{ - - /** - * The classpath used for autoloading. - * @var string - * @access private - */ - private static $CLASSPATH = '.'; - - // -- Expectations - - /** - * Create a new Expectations builder instance. - * @return Yay_Expectations - */ - public static function expectations() - { - return new Yay_Expectations(); - } - - // -- Matchers - - /** - * Create a new Optional matcher, optionally wrapping $value. - * @param string $value, optional - * @return Yay_Matchers_OptionalMatcher - */ - public static function optional($value = null) - { - return new Yay_Matchers_OptionalMatcher($value); - } - - /** - * Create a new Any matcher, optionally constrained to $type. - * @param string $type, optional - * @return Yay_Matchers_AnyMatcher - */ - public static function any($type = null) - { - return new Yay_Matchers_AnyMatcher($type, true); - } - - /** - * Create a negated Any matcher, optionally constrained to $type. - * @param string $type, optional - * @return Yay_Matchers_AnyMatcher - */ - public static function none($type = null) - { - return new Yay_Matchers_AnyMatcher($type, false); - } - - /** - * Create a new Identical matcher for $value. - * @param mixed $value - * @return Yay_Matchers_IdenticalMatcher - */ - public static function identical($value) - { - return new Yay_Matchers_IdenticalMatcher($value, true); - } - - /** - * Create a negated Identical matcher for $value. - * @param mixed $value - * @return Yay_Matchers_IdenticalMatcher - */ - public static function notIdentical($value) - { - return new Yay_Matchers_IdenticalMatcher($value, false); - } - - /** - * Create a new Equal matcher for $value. - * @param mixed $value - * @return Yay_Matchers_EqualMatcher - */ - public static function equal($value) - { - return new Yay_Matchers_EqualMatcher($value, true); - } - - /** - * Create a negated Equal matcher for $value. - * @param mixed $value - * @return Yay_Matchers_EqualMatcher - */ - public static function notEqual($value) - { - return new Yay_Matchers_EqualMatcher($value, false); - } - - /** - * Create a new Pattern matcher for $pattern. - * @param string $pattern - * @return Yay_Matchers_IsAMatcher - */ - public static function pattern($pattern) - { - return new Yay_Matchers_PatternMatcher($pattern, true); - } - - /** - * Create a negated Pattern matcher for $pattern. - * @param string $pattern - * @return Yay_Matchers_IsAMatcher - */ - public static function noPattern($pattern) - { - return new Yay_Matchers_PatternMatcher($pattern, false); - } - - /** - * Create a new Reference matcher for $ref. - * @param mixed $ref - * @return Yay_Matchers_ReferenceMatcher - */ - public static function reference(&$ref) - { - return new Yay_Matchers_ReferenceMatcher($ref, true); - } - - /** - * Create a negated Reference matcher for $ref. - * @param mixed $ref - * @return Yay_Matchers_ReferenceMatcher - */ - public static function noReference(&$ref) - { - return new Yay_Matchers_ReferenceMatcher($ref, false); - } - - /** - * Create a new Bounds matcher for boundaries between $lower and $upper. - * @param mixed $lower - * @param mixed $upper - * @return Yay_Matchers_BoundsMatcher - */ - public static function bounds($lower, $upper) - { - return new Yay_Matchers_BoundsMatcher($lower, $upper, true); - } - - /** - * Create a negated Bounds matcher for boundaries outside $lower and $upper. - * @param mixed $lower - * @param mixed $upper - * @return Yay_Matchers_BoundsMatcher - */ - public static function outside($lower, $upper) - { - return new Yay_Matchers_BoundsMatcher($lower, $upper, false); - } - - // -- Actions - - /** - * Create a new ReturnValueAction with $value. - * @param mixed $value - * @return Yay_Actions_ReturnValueAction - */ - public static function returnValue($value) - { - return new Yay_Actions_ReturnValueAction($value); - } - - /** - * Create a new ReturnReferenceAction with &$ref. - * @param mixed $ref - * @return Yay_Actions_ReturnReferenceAction - */ - public static function returnReference(&$ref) - { - return new Yay_Actions_ReturnReferenceAction($ref); - } - - /** - * Create a new ThrowAction with $e. - * @param Exception $ref - * @return Yay_Actions_ThrowAction - */ - public static function throwException(Exception $e) - { - return new Yay_Actions_ThrowAction($e); - } - - /** - * Create a new CallbackAction with $callback. - * @param callback $callback - * @return Yay_Actions_CallbackAction - */ - public static function call($callback) - { - return new Yay_Actions_CallbackAction($callback); - } - - /** - * Set the classpath for autoloading. - * @param string $path - */ - public static function setClassPath($path) - { - self::$CLASSPATH = $path; - } - - /** - * Static autoloader registered in bootstrap file. - * @param string $class - */ - public static function autoload($class) - { - if (substr($class, 0, 3) != 'Yay') - { - return; - } - $file = str_replace('_', '/', $class) . '.php'; - $path = self::$CLASSPATH . '/' . $file; - if (is_file($path)) - { - require_once $path; - } - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Action.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Action.php deleted file mode 100644 index d7b3a01f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Action.php +++ /dev/null @@ -1,37 +0,0 @@ -. - - */ - -//require 'Yay/Invocation.php'; -//require 'Yay/SelfDescribing.php'; - -/** - * An Action performed when an expected Invocation occurs. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_Action extends Yay_SelfDescribing -{ - - /** - * Mimmick the method Invocation and return a value. - * @param Yay_Invocation $invocation - * @return mixed - */ - public function &invoke(Yay_Invocation $invocation); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/CallbackAction.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/CallbackAction.php deleted file mode 100644 index 86114411..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/CallbackAction.php +++ /dev/null @@ -1,66 +0,0 @@ -. - - */ - -//require 'Yay/Action.php'; -//require 'Yay/Description.php'; - -/** - * An Action which delegates to a callback. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Actions_CallbackAction implements Yay_Action -{ - - /** - * The callback to invoke. - * @var callback - * @access private - */ - private $_callback; - - /** - * Create a new CallbackAction for $callback. - * @param callback $callback - */ - public function __construct($callback) - { - $this->_callback = $callback; - } - - /** - * Mimmick the method Invocation and return a value. - * @param Yay_Invocation $invocation - * @return mixed - */ - public function &invoke(Yay_Invocation $invocation) - { - $ret = call_user_func($this->_callback, $invocation); - return $ret; - } - - /** - * Describe this Expectation to $description. - * @param Yay_Description $description - */ - public function describeTo(Yay_Description $description) - { - $description->appendText(' Runs a callback;'); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/ReturnReferenceAction.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/ReturnReferenceAction.php deleted file mode 100644 index e96394d3..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/ReturnReferenceAction.php +++ /dev/null @@ -1,64 +0,0 @@ -. - - */ - -//require 'Yay/Action.php'; - -/** - * An Action which returns a reference. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Actions_ReturnReferenceAction implements Yay_Action -{ - - /** - * The reference to return. - * @var mixed - * @access private - */ - private $_ref; - - /** - * Create a new ReturnReferenceAction for &$ref. - * @param mixed $ref - */ - public function __construct(&$ref) - { - $this->_ref =& $ref; - } - - /** - * Mimmick the method Invocation and return the reference. - * @param Yay_Invocation $invocation - * @return mixed - */ - public function &invoke(Yay_Invocation $invocation) - { - return $this->_ref; - } - - /** - * Describe this Expectation to $description. - * @param Yay_Description $description - */ - public function describeTo(Yay_Description $description) - { - $description->appendText(' Returns a reference;'); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/ReturnValueAction.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/ReturnValueAction.php deleted file mode 100644 index c749a1d8..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/ReturnValueAction.php +++ /dev/null @@ -1,100 +0,0 @@ -. - - */ - -//require 'Yay/Action.php'; - -/** - * An Action which returns a specified value. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Actions_ReturnValueAction implements Yay_Action -{ - - /** - * The value to return. - * @var mixed - * @access private - */ - private $_value; - - /** - * Create a new ReturnValueAction for $value. - * @param mixed $value - */ - public function __construct($value) - { - $this->_value = $value; - } - - /** - * Mimmick the method Invocation and return a value. - * @param Yay_Invocation $invocation - * @return mixed - */ - public function &invoke(Yay_Invocation $invocation) - { - $value = $this->_value; - return $value; - } - - /** - * Describe this Expectation to $description. - * @param Yay_Description $description - */ - public function describeTo(Yay_Description $description) - { - $description->appendText(sprintf(' Returns %s;', $this->_describeValue('%s [%s]'))); - } - - private function _describeValue($format) - { - $description = ''; - $value = $this->_value; - if (is_int($value)) - { - $description = sprintf($format, 'int', $value); - } - elseif (is_float($value)) - { - $description = sprintf($format, 'float', preg_replace('/^(.{8}).+/', '$1..', $value)); - } - elseif (is_numeric($value)) - { - $description = sprintf($format, 'number', preg_replace('/^(.{8}).+/', '$1..', $value)); - } - elseif (is_string($value)) - { - $description = sprintf($format, 'string', preg_replace('/^(.{8}).+/', '$1..', $value)); - } - elseif (is_object($value)) - { - $description = sprintf($format, 'object', get_class($value)); - } - elseif (is_array($value)) - { - $description = sprintf($format, 'array', count($value) . ' items'); - } - else - { - $description = sprintf($format, gettype($value), preg_replace('/^(.{8}).+/', '$1..', (string) $value)); - } - return $description; - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/ThrowAction.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/ThrowAction.php deleted file mode 100644 index bdec7c8f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Actions/ThrowAction.php +++ /dev/null @@ -1,66 +0,0 @@ -. - - */ - -//require 'Yay/Action.php'; - -/** - * An Action which throws an Exception. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Actions_ThrowAction implements Yay_Action -{ - - /** - * The Exception to throw. - * @var Exception - * @access private - */ - private $_e; - - /** - * Create a new ThrowAction for $e. - * @param Exception $e - */ - public function __construct(Exception $e) - { - $this->_e = $e; - } - - /** - * Mimmick the method Invocation and throw an Exception. - * @param Yay_Invocation $invocation - * @throws Exception - */ - public function &invoke(Yay_Invocation $invocation) - { - throw $this->_e; - } - - /** - * Describe this Expectation to $description. - * @param Yay_Description $description - */ - public function describeTo(Yay_Description $description) - { - $description->appendText( - sprintf(' Throws %s;', get_class($this->_e)) - ); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Description.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Description.php deleted file mode 100644 index 561e2a20..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Description.php +++ /dev/null @@ -1,45 +0,0 @@ -. - - */ - -/** - * A Description container for error messages. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_Description -{ - - /** - * Append an existing Description to this Description. - * @param Yay_Description - */ - public function appendDescription(Yay_Description $description); - - /** - * Append text content to this Description. - * @param string $text - */ - public function appendText($text); - - /** - * Get this description back as a formatted string. - * @return string - */ - public function toString(); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectation.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectation.php deleted file mode 100644 index de155f96..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectation.php +++ /dev/null @@ -1,88 +0,0 @@ -. - - */ - -//require 'Yay/MockObject.php'; -//require 'Yay/Invocation.php'; -//require 'Yay/Action.php'; -//require 'Yay/SelfDescribing.php'; -//require 'Yay/State.php'; -//require 'Yay/StatePredicate.php'; -//require 'Yay/Sequence.php'; - -/** - * An Invocation expectation. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_Expectation extends Yay_SelfDescribing -{ - - /** - * Specify the MockObject which the Invocation will occur. - * This method should return the mock object in record mode. - * @param Yay_MockObject $mock - * @return Yay_MockObject - */ - public function of(Yay_MockObject $mock); - - /** - * Notify the Expectation of an Invocation and check if it matches. - * @param Yay_Invocation $invocation - * @return boolean - */ - public function isExpected(Yay_Invocation $invocation); - - /** - * Specify the Action to run if a match occurs. - * @param Yay_Action $action - */ - public function will(Yay_Action $action); - - /** - * Only be expected when in the given State predicate. - * @param Yay_StatePredicate $predicate - */ - public function when(Yay_StatePredicate $predicate); - - /** - * Activate the given $state if a match occurs. - * @param Yay_State $state - */ - public function then(Yay_State $state); - - /** - * Constrain this expectation to be valid only if invoked in the given sequence. - * @param Yay_Sequence $sequence - */ - public function inSequence(Yay_Sequence $sequence); - - /** - * Test if all conditions of the Invocation are satisfied. - * @return boolean - */ - public function isSatisfied(); - - /** - * Get the Action for the given Invocation. - * This may have been specified by a will() clause. - * @param Yay_Invocation $invocation - * @return Yay_Action - */ - public function getAction(Yay_Invocation $invocation); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/ExpectationProvider.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/ExpectationProvider.php deleted file mode 100644 index 8b90202d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/ExpectationProvider.php +++ /dev/null @@ -1,33 +0,0 @@ -. - - */ - -/** - * An Invocation expectation provider. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_ExpectationProvider -{ - - /** - * Returns the Expectations. - * @return array of Yay_Expectation - */ - public function getExpectations(); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations.php deleted file mode 100644 index c8363cb4..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations.php +++ /dev/null @@ -1,306 +0,0 @@ -. - - */ - -//require 'Yay/Expectation.php'; -//require 'Yay/InvocationRecorder.php'; -//require 'Yay/InvocationProxy.php'; -//require 'Yay/Invocation.php'; -//require 'Yay/State.php'; -//require 'Yay/StatePredicate.php'; -//require 'Yay/Sequence.php'; -//require 'Yay/Expectations/ExactlyExpectation.php'; -//require 'Yay/Expectations/AtLeastExpectation.php'; -//require 'Yay/Expectations/AtMostExpectation.php'; -//require 'Yay/Expectations/BetweenExpectation.php'; -//require 'Yay/Action.php'; -//require 'Yay/Actions/ReturnValueAction.php'; -//require 'Yay/Actions/ReturnReferenceAction.php'; -//require 'Yay/Actions/ThrowAction.php'; -//require 'Yay/Actions/CallbackAction.php'; - -/** - * A group of expectations which can be specified in a fluid manner. - * Generally speaking this is where all expectations should be made for the sake - * of abstraction. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Expectations implements Yay_InvocationRecorder -{ - - /** - * The Expectation stack. - * @var array - * @access private - */ - private $_expectations = array(); - - /** - * The current Expectation to proxy any recording to. - * @var Yay_Expectation - * @access private - */ - private $_currentEndpoint; - - /** - * Create a new instance of Expectations. - * @return Yay_Expectations - */ - final public static function create() - { - return new self(); - } - - /** - * Expect one Invocation on the $mock object. - * Returns the mock object in record mode. - * @param Yay_MockObject $mock - * @return Yay_Expectations - */ - public function one(Yay_MockObject $mock) - { - return $this->exactly(1)->of($mock); - } - - /** - * Expect exactly $n Invocations on a mock object specified with a following - * of() clause. - * Example: Expectations::create()->exactly(2)->of($mock); - * @param integer $n - * @return Yay_Expectations - */ - public function exactly($n) - { - return $this->_setEndpoint(new Yay_Expectations_ExactlyExpectation($n)); - } - - /** - * Expect at least $n Invocations on a mock object specified with a following - * of() clause. - * Example: Expectations::create()->atLeast(2)->of($mock); - * @param integer $n - * @return Yay_Expectations - */ - public function atLeast($n) - { - return $this->_setEndpoint(new Yay_Expectations_AtLeastExpectation($n)); - } - - /** - * Expect at most $n Invocations on a mock object specified with a following - * of() clause. - * Example: Expectations::create()->atMost(2)->of($mock); - * @param integer $n - * @return Yay_Expectations - */ - public function atMost($n) - { - return $this->_setEndpoint(new Yay_Expectations_AtMostExpectation($n)); - } - - /** - * Expect at between $min and $max Invocations on a mock object specified - * with a following of() clause. - * Example: Expectations::create()->atLeast(2)->of($mock); - * @param integer $n - * @return Yay_Expectations - */ - public function between($min, $max) - { - return $this->_setEndpoint(new Yay_Expectations_BetweenExpectation($min, $max)); - } - - /** - * Ignore Invocations on the $mock object specified. - * @param Yay_MockObject $mock - * @return Yay_Expectations - */ - public function ignoring(Yay_MockObject $mock) - { - return $this->atLeast(0)->of($mock); - } - - /** - * Allow Invocations on the $mock object specified. - * This does exactly the same thing as ignoring() but it allows a semantically - * different meaning in the test case. - * @param Yay_MockObject $mock - * @return Yay_Expectations - */ - public function allowing(Yay_MockObject $mock) - { - return $this->ignoring($mock); - } - - /** - * Deny Invocations on the $mock object specified. - * @param Yay_MockObject $mock - * @return Yay_Expectations - */ - public function never(Yay_MockObject $mock) - { - return $this->exactly(0)->of($mock); - } - - /** - * Specify the MockObject which the Invocation will occur. - * This method returns the mock object in record mode. - * @param Yay_MockObject $mock - * @return Yay_InvocationProxy - */ - public function of(Yay_MockObject $mock) - { - $this->_getEndpoint()->of($mock); - return new Yay_InvocationProxy($this, $mock); - } - - /** - * Specify the Action to run if a match occurs. - * @param Yay_Action $action - */ - public function will(Yay_Action $action) - { - $this->_getEndpoint()->will($action); - return $this; - } - - /** - * Only be expected when in the given State predicate. - * @param Yay_StatePredicate $predicate - */ - public function when(Yay_StatePredicate $predicate) - { - $this->_getEndpoint()->when($predicate); - return $this; - } - - /** - * Activate the given $state if a match occurs. - * @param Yay_State $state - */ - public function then(Yay_State $state) - { - $this->_getEndpoint()->then($state); - return $this; - } - - /** - * Constrain the current expectation to occur in the given sequence. - * @param Yay_Sequence $seq - */ - public function inSequence(Yay_Sequence $seq) - { - $this->_getEndpoint()->inSequence($seq); - return $this; - } - - /** - * A wrapper for will(Yay::returnValue($value)). - * @param mixed $value - */ - public function returns($value) - { - $this->_getEndpoint()->will(new Yay_Actions_ReturnValueAction($value)); - return $this; - } - - /** - * A wrapper for will(Yay::returnReference($ref)). - * @param mixed $ref - */ - public function returnsReference(&$ref) - { - $this->_getEndpoint()->will(new Yay_Actions_ReturnReferenceAction($ref)); - return $this; - } - - /** - * A wrapper for will(Yay::throwException($e)). - * @param Exception $e - */ - public function throws(Exception $e) - { - $this->_getEndpoint()->will(new Yay_Actions_ThrowAction($e)); - return $this; - } - - /** - * A wrapper for will(Yay::call($callback)). - * @param callback $callback - */ - public function calls($callback) - { - $this->_getEndpoint()->will(new Yay_Actions_CallbackAction($callback)); - return $this; - } - - /** - * Record any Invocations on the MockObject whilst it's in record mode. - * @param Yay_Invocation $invocation - */ - public function recordInvocation(Yay_Invocation $invocation) - { - $this->_getEndpoint()->recordInvocation($invocation); - } - - /** - * Returns the Expectation stack. - * @return Yay_Expectation - */ - public function getExpectations() - { - return $this->_expectations; - } - - // -- Private methods - - /** - * Apply a new Expectation to the stack and tag it as the endpoint for recording. - * @param Yay_Expectation $expectation - * @return Yay_Expectations - * @access private - */ - private function _setEndpoint(Yay_Expectation $expectation) - { - $this->_expectations[] = $expectation; - $this->_currentEndpoint = $expectation; - return $this; - } - - /** - * Gets the current endpoint (current expectation). - * @return Yay_Expectation - * @access private - */ - private function _getEndpoint() - { - if (!isset($this->_currentEndpoint)) - { - throw new BadMethodCallException( - 'No cardinality clause has yet been made. First call one(), atLeast(), ' . - 'atMost(), exactly(), between(), ignoring(), allowing() or never() ' . - 'before performing this operation.' - ); - } - else - { - return $this->_currentEndpoint; - } - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/AbstractExpectation.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/AbstractExpectation.php deleted file mode 100644 index b32a29aa..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/AbstractExpectation.php +++ /dev/null @@ -1,345 +0,0 @@ -. - - */ - -//require 'Yay/Mockery.php'; -//require 'Yay/Expectation.php'; -//require 'Yay/ExpectationProvider.php'; -//require 'Yay/Invocation.php'; -//require 'Yay/InvocationRecorder.php'; -//require 'Yay/InvocationProxy.php'; -//require 'Yay/Action.php'; -//require 'Yay/Matcher.php'; -//require 'Yay/Matchers/IdenticalMatcher.php'; -//require 'Yay/State.php'; -//require 'Yay/StatePredicate.php'; -//require 'Yay/Sequence.php'; -//require 'Yay/Description.php'; -//require 'Yay/MockGenerator.php'; - -/** - * A base Expectation which other Expectations extend. - * @author Chris Corbyn - * @package Yay - */ -abstract class Yay_Expectations_AbstractExpectation - implements Yay_Expectation, Yay_InvocationRecorder -{ - - /** - * The object to expect Invocations from. - * @var Yay_MockObject - * @access private - */ - private $_object; - - /** - * The method name to expect Invocations on. - * @var string - * @access private - */ - private $_method; - - /** - * The argument Matchers. - * @var array - * @access private - */ - private $_matchers = array(); - - /** - * The Action to use if matched. - * @var Yay_Action - * @access private - */ - private $_action; - - /** - * A state predicate to check for. - * @var Yay_StatePredicate - * @access private - */ - private $_statePredicate; - - /** - * A state to effect if matched. - * @var Yay_State - * @access private - */ - private $_state; - - /** - * The ID wanted to be valid in the Sequence. - * @var int - * @access private - */ - private $_wantedSequenceId; - - /** - * The Sequence to check for validity (if any). - * @var Yay_Sequence - * @access private - */ - private $_sequence; - - /** - * Invoked when the expectation matches so any counters can be incremented - * for example. - * @param Yay_Invocation $invocation - */ - abstract public function notifyMatchedInvocation(Yay_Invocation $invocation); - - /** - * Describe the boundaries of how many invocations can occur. - * @param Yay_Description $description - */ - abstract public function describeBounds(Yay_Description $description); - - /** - * Describe the current status of this expectation. - * @param Yay_Description $description - */ - abstract public function describeSatisfaction(Yay_Description $description); - - /** - * Specify the MockObject which the Invocation will occur. - * This method returns the mock object in record mode. - * @param Yay_MockObject $mock - * @return Yay_InvocationProxy - */ - public function of(Yay_MockObject $mock) - { - $this->_object = $mock; - return new Yay_InvocationProxy($this, $mock); - } - - /** - * Notify the Expectation of an Invocation and check if it matches. - * @param Yay_Invocation $invocation - * @return boolean - */ - public function isExpected(Yay_Invocation $invocation) - { - $matches = true; - $object = $invocation->getObject(); - if ($object === $this->_object) - { - if (isset($this->_statePredicate)) - { - $matches = $this->_statePredicate->isActive(); - } - - if ($matches && isset($this->_method)) - { - if ($this->_method == $invocation->getMethod()) - { - $args =& $invocation->getArguments(); - foreach ($this->_matchers as $i => $m) - { - if (!array_key_exists($i, $args)) - { - if ($m->isOptional()) - { - break; - } - else - { - $matches = false; - break; - } - } - else - { - if (!$m->matches($args[$i])) - { - $matches = false; - break; - } - } - } - } - else - { - $matches = false; - } - } - - if ($matches && isset($this->_sequence)) - { - $matches = $this->_sequence->isInSequence($this->_wantedSequenceId); - } - } - else - { - $matches = false; - } - - if ($matches) - { - $this->notifyMatchedInvocation($invocation); - } - - return $matches; - } - - /** - * Specify the Action to run if a match occurs. - * @param Yay_Action $action - */ - public function will(Yay_Action $action) - { - $this->_action = $action; - return $this; - } - - /** - * Only be expected when in the given State predicate. - * @param Yay_StatePredicate $predicate - */ - public function when(Yay_StatePredicate $predicate) - { - $this->_statePredicate = $predicate; - return $this; - } - - /** - * Activate the given $state if a match occurs. - * @param Yay_State $state - */ - public function then(Yay_State $state) - { - $this->_state = $state; - return $this; - } - - /** - * Constrain this expectation to be valid only if invoked in the given sequence. - * @param Yay_Sequence $sequence - */ - public function inSequence(Yay_Sequence $sequence) - { - $this->_wantedSequenceId = $sequence->requestSequenceId(); - $this->_sequence = $sequence; - return $this; - } - - /** - * Get the Action for the given Invocation. - * This may have been specified by a will() clause. - * @param Yay_Invocation $invocation - * @return Yay_Action - */ - public function getAction(Yay_Invocation $invocation) - { - if (isset($this->_state)) - { - $this->_state->activate(); - } - return $this->_action; - } - - /** - * Record any Invocations on the MockObject whilst it's in record mode. - * @param Yay_Invocation $invocation - */ - public function recordInvocation(Yay_Invocation $invocation) - { - $this->_method = $invocation->getMethod(); - $matchers =& $invocation->getArguments(); - foreach ($matchers as $matcher) - { - if ($matcher instanceof Yay_Matcher) - { - $this->_matchers[] = $matcher; - } - else - { - $this->_matchers[] = new Yay_Matchers_IdenticalMatcher($matcher); - } - } - } - - /** - * Returns the Expectations. - * @return array of Yay_Expectation - */ - public function getExpectations() - { - return array($this); - } - - /** - * Describe this Expectation to $description. - * @param Yay_Description $description - */ - public function describeTo(Yay_Description $description) - { - $this->describeBounds($description); - - $description->appendText(sprintf(' of %s;', $this->_getInvocationSignature())); - - if (isset($this->_sequence)) - { - $description->appendText(' in'); - $this->_sequence->describeTo($description); - } - - if (isset($this->_statePredicate)) - { - $description->appendText(' when'); - $this->_statePredicate->describeTo($description); - } - - if (isset($this->_action)) - { - $this->_action->describeTo($description); - } - - $this->describeSatisfaction($description); - } - - // -- Private methods - - private function _getInvocationSignature() - { - $class = Yay_MockGenerator::getInstance() - ->reverseNamingScheme(get_class($this->_object)); - if (isset($this->_method)) - { - $method = $this->_method; - } - else - { - $method = ''; - } - if (!empty($this->_matchers)) - { - $args = array(); - foreach ($this->_matchers as $matcher) - { - $args[] = $matcher->describeMatch('%s [%s]'); - } - $params = implode(', ', $args); - } - else - { - $params = ''; - } - return sprintf('%s::%s(%s)', $class, $method, $params); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/AtLeastExpectation.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/AtLeastExpectation.php deleted file mode 100644 index a4d9aa77..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/AtLeastExpectation.php +++ /dev/null @@ -1,101 +0,0 @@ -. - - */ - -//require 'Yay/Expectations/AbstractExpectation.php'; -//require 'Yay/Invocation.php'; - -/** - * An Expectation which wants at least a set number of matching Invocations. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Expectations_AtLeastExpectation - extends Yay_Expectations_AbstractExpectation -{ - - /** - * The expected Invocation count. - * @var int - * @access private - */ - private $_count = 0; - - /** - * The number of matched Invocations. - * @var int - * @access private - */ - private $_matched = 0; - - /** - * Create a new AtLeastExpectation expecting at least $n Invocations. - * @param integer $n - */ - public function __construct($n) - { - $this->_count = $n; - } - - /** - * Test if all conditions of the Invocation are satisfied. - * @return boolean - */ - public function isSatisfied() - { - return ($this->_matched >= $this->_count); - } - - /** - * Increment the match counter by 1. - * @param Yay_Invocation $invocation - */ - public function notifyMatchedInvocation(Yay_Invocation $invocation) - { - $this->_matched++; - } - - /** - * Describe the boundaries of how many invocations can occur. - * @param Yay_Description $description - */ - public function describeBounds(Yay_Description $description) - { - if ($this->_count > 0) - { - $description->appendText(sprintf('At least %d', $this->_count)); - } - else - { - $description->appendText('Any number'); - } - } - - /** - * Describe the current status of this expectation. - * @param Yay_Description $description - */ - public function describeSatisfaction(Yay_Description $description) - { - if ($this->_matched >= $this->_count) - { - $description->appendText(' already'); - } - $description->appendText(sprintf(' occurred %d times', $this->_matched)); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/AtMostExpectation.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/AtMostExpectation.php deleted file mode 100644 index 07c0417a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/AtMostExpectation.php +++ /dev/null @@ -1,117 +0,0 @@ -. - - */ - -//require 'Yay/Expectations/AbstractExpectation.php'; -//require 'Yay/Invocation.php'; - -/** - * An Expectation which wants up to a set number of matching Invocations. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Expectations_AtMostExpectation - extends Yay_Expectations_AbstractExpectation -{ - - /** - * The expected Invocation count. - * @var int - * @access private - */ - private $_count = 0; - - /** - * The number of matched Invocations. - * @var int - * @access private - */ - private $_matched = 0; - - /** - * Create a new AtMostExpectation expecting at most $n Invocations. - * @param integer $n - */ - public function __construct($n) - { - $this->_count = $n; - } - - /** - * Test if this Invocation is one that was expected by this Expectation. - * @param Yay_Invocation $invocation - * @return boolean - */ - public function isExpected(Yay_Invocation $invocation) - { - return parent::isExpected($invocation) && ($this->_matched <= $this->_count); - } - - /** - * Test if all conditions of the Invocation are satisfied. - * @return boolean - */ - public function isSatisfied() - { - return true; - } - - /** - * Increment the match counter by 1. - * @param Yay_Invocation $invocation - */ - public function notifyMatchedInvocation(Yay_Invocation $invocation) - { - $this->_matched++; - } - - /** - * Describe the boundaries of how many invocations can occur. - * @param Yay_Description $description - */ - public function describeBounds(Yay_Description $description) - { - if ($this->_count > 0) - { - $description->appendText(sprintf('At most %d', $this->_count)); - } - else - { - $description->appendText('No invocations'); - } - } - - /** - * Describe the current status of this expectation. - * @param Yay_Description $description - */ - public function describeSatisfaction(Yay_Description $description) - { - if ($this->_matched >= $this->_count) - { - $description->appendText(' already'); - } - $description->appendText( - sprintf( - ' occurred %d times', - (($this->_matched < $this->_count) - ? $this->_matched - : $this->_count) - )); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/BetweenExpectation.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/BetweenExpectation.php deleted file mode 100644 index f8936d88..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/BetweenExpectation.php +++ /dev/null @@ -1,118 +0,0 @@ -. - - */ - -//require 'Yay/Expectations/AbstractExpectation.php'; -//require 'Yay/Invocation.php'; - -/** - * An Expectation which allows a boundary for a number of matching Invocations. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Expectations_BetweenExpectation - extends Yay_Expectations_AbstractExpectation -{ - - /** - * The minimum Invocation count. - * @var int - * @access private - */ - private $_min = 0; - - /** - * The maximum Invocation count. - * @var int - * @access private - */ - private $_max = 0; - - /** - * The number of matched Invocations. - * @var int - * @access private - */ - private $_matched = 0; - - /** - * Create a new BetweenExpectation expecting between $min and $max Invocations. - * @param integer $n - */ - public function __construct($min, $max) - { - $this->_min = $min; - $this->_max = $max; - } - - /** - * Test if this Invocation is one that was expected by this Expectation. - * @param Yay_Invocation $invocation - * @return boolean - */ - public function isExpected(Yay_Invocation $invocation) - { - return parent::isExpected($invocation) && ($this->_matched <= $this->_max); - } - - /** - * Test if all conditions of the Invocation are satisfied. - * @return boolean - */ - public function isSatisfied() - { - return ($this->_matched >= $this->_min); - } - - /** - * Increment the match counter by 1. - * @param Yay_Invocation $invocation - */ - public function notifyMatchedInvocation(Yay_Invocation $invocation) - { - $this->_matched++; - } - - /** - * Describe the boundaries of how many invocations can occur. - * @param Yay_Description $description - */ - public function describeBounds(Yay_Description $description) - { - $description->appendText(sprintf('Between %d and %d', $this->_min, $this->_max)); - } - - /** - * Describe the current status of this expectation. - * @param Yay_Description $description - */ - public function describeSatisfaction(Yay_Description $description) - { - if ($this->_matched >= $this->_min) - { - $description->appendText(' already'); - } - $description->appendText( - sprintf( - ' occurred %d times', - (($this->_matched < $this->_max) - ? $this->_matched - : $this->_max) - )); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/ExactlyExpectation.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/ExactlyExpectation.php deleted file mode 100644 index e8d2306b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Expectations/ExactlyExpectation.php +++ /dev/null @@ -1,117 +0,0 @@ -. - - */ - -//require 'Yay/Expectations/AbstractExpectation.php'; -//require 'Yay/Invocation.php'; - -/** - * An Expectation which wants an exact number of matching Invocations. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Expectations_ExactlyExpectation - extends Yay_Expectations_AbstractExpectation -{ - - /** - * The expected Invocation count. - * @var int - * @access private - */ - private $_count = 0; - - /** - * The number of matched Invocations. - * @var int - * @access private - */ - private $_matched = 0; - - /** - * Create a new ExactlyExpectation expecting $n Invocations. - * @param integer $n - */ - public function __construct($n) - { - $this->_count = $n; - } - - /** - * Test if this Invocation is one that was expected by this Expectation. - * @param Yay_Invocation $invocation - * @return boolean - */ - public function isExpected(Yay_Invocation $invocation) - { - return parent::isExpected($invocation) && ($this->_matched <= $this->_count); - } - - /** - * Test if all conditions of the Invocation are satisfied. - * @return boolean - */ - public function isSatisfied() - { - return ($this->_matched >= $this->_count); - } - - /** - * Increment the match counter by 1. - * @param Yay_Invocation $invocation - */ - public function notifyMatchedInvocation(Yay_Invocation $invocation) - { - $this->_matched++; - } - - /** - * Describe the boundaries of how many invocations can occur. - * @param Yay_Description $description - */ - public function describeBounds(Yay_Description $description) - { - if ($this->_count > 0) - { - $description->appendText(sprintf('Exactly %d', $this->_count)); - } - else - { - $description->appendText('No invocations'); - } - } - - /** - * Describe the current status of this expectation. - * @param Yay_Description $description - */ - public function describeSatisfaction(Yay_Description $description) - { - if ($this->_matched >= $this->_count) - { - $description->appendText(' already'); - } - $description->appendText( - sprintf( - ' occurred %d times', - (($this->_matched < $this->_count) - ? $this->_matched - : $this->_count) - )); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Invocation.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Invocation.php deleted file mode 100644 index d382157f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Invocation.php +++ /dev/null @@ -1,49 +0,0 @@ -. - - */ - -//require 'Yay/SelfDescribing.php'; - -/** - * A representation of a Method invocation. - * This is a container for the object the method was invoked on, the method- - * name and the arguments in the invocation. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_Invocation extends Yay_SelfDescribing -{ - - /** - * Get the object which this Invocation occured on. - * @return object - */ - public function getObject(); - - /** - * Get the method name of the invoked method. - * @return string - */ - public function getMethod(); - - /** - * Get the argument list in the Invocation. - * @return array - */ - public function &getArguments(); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/InvocationHandler.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/InvocationHandler.php deleted file mode 100644 index a669fe5f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/InvocationHandler.php +++ /dev/null @@ -1,36 +0,0 @@ -. - - */ - -//require 'Yay/Invocation.php'; - -/** - * Listens for Invocations and returns a suitable value. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_InvocationHandler -{ - - /** - * Handle the given $invocation and return a value for it. - * @param Yay_Invocation $invocation - * @return mixed - */ - public function &handleInvocation(Yay_Invocation $invocation); - -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/InvocationProxy.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/InvocationProxy.php deleted file mode 100644 index e8d0aa98..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/InvocationProxy.php +++ /dev/null @@ -1,90 +0,0 @@ -. - - */ - -//require 'Yay/ExpectationProvider.php'; -//require 'Yay/InvocationRecorder.php'; -//require 'Yay/MockObject.php'; -//require 'Yay/SimpleInvocation.php'; - -/** - * Proxies Invocations on a Mock object to the recorder. - * @author Chris Corbyn - * @package Yay - */ -class Yay_InvocationProxy implements Yay_ExpectationProvider -{ - - /** - * The InvocationRecorder which is using this InvocationProxy. - * @var Yay_InvocationRecorder - * @access private - */ - private $_recorder; - - /** - * The Mock object where Invocations are recorded from. - * @var Yay_MockObject - * @access private - */ - private $_mock; - - /** - * Create a new InvocationProxy for $recorder and $mock. - * @param Yay_InvocationRecorder $recorder - * @param Yay_MockObject $mock - */ - public function __construct(Yay_InvocationRecorder $recorder, Yay_MockObject $mock) - { - $this->_recorder = $recorder; - $this->_mock = $mock; - } - - /** - * Direct all invocations to the recorder. - * @param string $method - * @param array $args - * @return Yay_InvocationRecorder - */ - public function __call($method, $args) - { - if (is_callable(array($this->_mock, $method))) - { - $invocation = new Yay_SimpleInvocation($this->_mock, $method, $args); - $this->_recorder->recordInvocation($invocation); - return $this->_recorder; - } - elseif (is_callable(array($this->_recorder, $method))) - { - return call_user_func_array(array($this->_recorder, $method), $args); - } - else - { - throw new BadMethodCallException('Mock method ' . $method . ' does not exist'); - } - } - - /** - * Returns the Expectation list. - * @return array of Yay_Expectation - */ - public function getExpectations() - { - return $this->__call(__FUNCTION__, array()); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/InvocationRecorder.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/InvocationRecorder.php deleted file mode 100644 index f3abed3c..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/InvocationRecorder.php +++ /dev/null @@ -1,36 +0,0 @@ -. - - */ - -//require 'Yay/Invocation.php'; -//require 'Yay/ExpectationProvider.php'; - -/** - * Listens for Invocations and provides expectations based on them. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_InvocationRecorder extends Yay_ExpectationProvider -{ - - /** - * Record the given $invocation. - * @param Yay_Invocation $invocation - */ - public function recordInvocation(Yay_Invocation $invocation); - -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matcher.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matcher.php deleted file mode 100644 index 5dc3e749..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matcher.php +++ /dev/null @@ -1,48 +0,0 @@ -. - - */ - -/** - * The Matcher interface for comparing arguments. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_Matcher -{ - - /** - * Compare the $argument with whatever is expected to match it. - * @param mixed $argument - * @return boolean - */ - public function matches(&$argument); - - /** - * Returns true if the argument doesn't need to be present. - * @return boolean - */ - public function isOptional(); - - /** - * Writes the match description as a string following $format. - * $format is a sprintf() string with %s, $s as $matcherName, $value respectively. - * @param string $format - * @return string - */ - public function describeMatch($format); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/AnyMatcher.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/AnyMatcher.php deleted file mode 100644 index 8592ba31..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/AnyMatcher.php +++ /dev/null @@ -1,85 +0,0 @@ -. - - */ - -//require 'Yay/Matcher.php'; - -/** - * Allows anything to match. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Matchers_AnyMatcher implements Yay_Matcher -{ - - /** - * A type to compare with. - * @var string - * @access private - */ - private $_type; - - /** - * The desired result. - * @var boolean - * @access private - */ - private $_result; - - /** - * Create a new AnyMatcher, optionally constrained only to objects of $type. - * @param string $type, optional - * @param boolean $result - */ - public function __construct($type = null, $result = true) - { - $this->_type = $type; - $this->_result = $result; - } - - /** - * Always returns true where no type is given, and where the type matches otherwise. - * @param mixed $value - * @return boolean - */ - public function matches(&$value) - { - $return = (is_null($this->_type) || ($value instanceof $this->_type)); - return (($this->_result && $return) || (!$this->_result && !$return)); - } - - /** - * Returns true if the argument doesn't need to be present. - * @return boolean - */ - public function isOptional() - { - return false; - } - - /** - * Writes the match description as a string following $format. - * $format is a sprintf() string with %s, $s as $matcherName, $value respectively. - * @param string $format - * @return string - */ - public function describeMatch($format) - { - return 'ANYTHING'; - } - -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/BoundsMatcher.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/BoundsMatcher.php deleted file mode 100644 index 57aef644..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/BoundsMatcher.php +++ /dev/null @@ -1,94 +0,0 @@ -. - - */ - -//require 'Yay/Matcher.php'; - -/** - * Compares values to test if they are within given boundaries. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Matchers_BoundsMatcher implements Yay_Matcher -{ - - /** - * The upper bound. - * @var mixed - * @access private - */ - private $_upper; - - /** - * The lower bound. - * @var mixed - * @access private - */ - private $_lower; - - /** - * The desired result. - * @var boolean - * @access private - */ - private $_result; - - /** - * Create a new BoundsMatcher between $lower and $upper. - * @param mixed $lower - * @param mixed $upper - * @param boolean $result which is wanted - */ - public function __construct($lower, $upper, $result = true) - { - $this->_upper = $upper; - $this->_lower = $lower; - $this->_result = $result; - } - - /** - * Compare $value with the boundaries and return true if it is within them. - * @param mixed $value - * @return boolean - */ - public function matches(&$value) - { - $return = ($value <= $this->_upper && $value >= $this->_lower); - return (($this->_result && $return) || (!$this->_result && !$return)); - } - - /** - * Returns true if the argument doesn't need to be present. - * @return boolean - */ - public function isOptional() - { - return false; - } - - /** - * Writes the match description as a string following $format. - * $format is a sprintf() string with %s, $s as $matcherName, $value respectively. - * @param string $format - * @return string - */ - public function describeMatch($format) - { - return sprintf($format, 'between', $this->_min . ' and ' . $this->_max); - } - -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/EqualMatcher.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/EqualMatcher.php deleted file mode 100644 index 1d4f25d9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/EqualMatcher.php +++ /dev/null @@ -1,50 +0,0 @@ -. - - */ - -//require 'Yay/Matchers/IdenticalMatcher.php'; - -/** - * Compares values for equality. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Matchers_EqualMatcher extends Yay_Matchers_IdenticalMatcher -{ - - /** - * Create a new EqualMatcher expecting $expected. - * @param mixed $expected - * @param boolean $result to be expected - */ - public function __construct($expected, $result = true) - { - parent::__construct($expected, $result); - } - - /** - * Compare $value with the expected value and return true if it is equal. - * @param mixed $value - * @return boolean - */ - public function matches(&$value) - { - $return = (($this->_expected == $value) && ($value == $this->_expected)); - return (($this->_result && $return) || (!$this->_result && !$return)); - } - -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/IdenticalMatcher.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/IdenticalMatcher.php deleted file mode 100644 index c227b67a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/IdenticalMatcher.php +++ /dev/null @@ -1,116 +0,0 @@ -. - - */ - -//require 'Yay/Matcher.php'; - -/** - * Compares values for value and type. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Matchers_IdenticalMatcher implements Yay_Matcher -{ - - /** - * The expected value. - * @var mixed - * @access protected - */ - protected $_expected; - - /** - * The expected return value. - * @var boolean - * @access protected - */ - protected $_result; - - /** - * Create a new IdenticalMatcher expecting $expected. - * @param mixed $expected - * @param boolean $result to be expected - */ - public function __construct($expected, $result = true) - { - $this->_expected = $expected; - $this->_result = $result; - } - - /** - * Compare $value with the expected value and return true if it matches in - * type and in value. - * @param mixed $value - * @return boolean - */ - public function matches(&$value) - { - $return = (($this->_expected === $value) && ($value === $this->_expected)); - return (($this->_result && $return) || (!$this->_result && !$return)); - } - - /** - * Returns true if the argument doesn't need to be present. - * @return boolean - */ - public function isOptional() - { - return false; - } - - /** - * Writes the match description as a string following $format. - * $format is a sprintf() string with %s, $s as $matcherName, $value respectively. - * @param string $format - * @return string - */ - public function describeMatch($format) - { - $description = ''; - $value = $this->_expected; - if (is_int($value)) - { - $description = sprintf($format, 'int', $value); - } - elseif (is_float($value)) - { - $description = sprintf($format, 'float', preg_replace('/^(.{8}).+/', '$1..', $value)); - } - elseif (is_numeric($value)) - { - $description = sprintf($format, 'number', preg_replace('/^(.{8}).+/', '$1..', $value)); - } - elseif (is_string($value)) - { - $description = sprintf($format, 'string', preg_replace('/^(.{8}).+/', '$1..', $value)); - } - elseif (is_object($value)) - { - $description = sprintf($format, 'object', get_class($value)); - } - elseif (is_array($value)) - { - $description = sprintf($format, 'array', count($value) . ' items'); - } - else - { - $description = sprintf($format, gettype($value), preg_replace('/^(.{8}).+/', '$1..', (string) $value)); - } - return $description; - } - -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/OptionalMatcher.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/OptionalMatcher.php deleted file mode 100644 index a348d574..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/OptionalMatcher.php +++ /dev/null @@ -1,103 +0,0 @@ -. - - */ - -//require 'Yay/Matcher.php'; -//require 'Yay/Matchers/IdenticalMatcher.php'; - -/** - * Wraps Matchers and makes them Optional. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Matchers_OptionalMatcher implements Yay_Matcher -{ - - /** - * A matcher to delegate to. - * @var Yay_Matcher - * @access private - */ - private $_matcher; - - /** - * Create a new OptionalMatcher, optionally wrapping $value. - * @param mixed $value, optional - */ - public function __construct($value = null) - { - if (isset($value)) - { - if ($value instanceof Yay_Matcher) - { - $this->_matcher = $value; - } - else - { - $this->_matcher = new Yay_Matchers_IdenticalMatcher($value); - } - } - } - - /** - * Returns true if no matcher set, otherwise it delegates to the given Matcher. - * @param mixed $value - * @return boolean - */ - public function matches(&$value) - { - if (isset($this->_matcher)) - { - $matches = $this->_matcher->matches($value); - } - else - { - $matches = true; - } - return $matches; - } - - /** - * Returns true if the argument doesn't need to be present. - * @return boolean - */ - public function isOptional() - { - return true; - } - - /** - * Writes the match description as a string following $format. - * $format is a sprintf() string with %s, $s as $matcherName, $value respectively. - * @param string $format - * @return string - */ - public function describeMatch($format) - { - $name = 'optional'; - if (isset($this->_matcher)) - { - $value = $this->_matcher->describeMatch($format); - } - else - { - $value = '*'; - } - return sprintf($format, $name, $value); - } - -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/PatternMatcher.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/PatternMatcher.php deleted file mode 100644 index 4f4043f1..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/PatternMatcher.php +++ /dev/null @@ -1,88 +0,0 @@ -. - - */ - -//require 'Yay/Matcher.php'; - -/** - * Compares values against a PCRE pattern. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Matchers_PatternMatcher implements Yay_Matcher -{ - - /** - * The expected pattern. - * @var string - * @access private - */ - private $_pattern; - - /** - * The desired return value. - * @var boolean - * @access private - */ - private $_result; - - /** - * Create a new PatternMatcher expecting $pattern. - * @param string $pattern - * @param boolean $result to be expected - */ - public function __construct($pattern, $result = true) - { - $this->_pattern = $pattern; - $this->_result = $result; - } - - /** - * Compare $value with the expected pattern and return true if it matches. - * @param string $value - * @return boolean - */ - public function matches(&$value) - { - $return = ( - (is_string($value) || is_numeric($value)) - && preg_match($this->_pattern, $value) - ); - return (($this->_result && $return) || (!$this->_result && !$return)); - } - - /** - * Returns true if the argument doesn't need to be present. - * @return boolean - */ - public function isOptional() - { - return false; - } - - /** - * Writes the match description as a string following $format. - * $format is a sprintf() string with %s, $s as $matcherName, $value respectively. - * @param string $format - * @return string - */ - public function describeMatch($format) - { - return sprintf($format, 'pattern', $this->_pattern); - } - -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/ReferenceMatcher.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/ReferenceMatcher.php deleted file mode 100644 index cae6a08f..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Matchers/ReferenceMatcher.php +++ /dev/null @@ -1,104 +0,0 @@ -. - - */ - -//require 'Yay/Matcher.php'; - -/** - * Compares values to see if they reference one another. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Matchers_ReferenceMatcher implements Yay_Matcher -{ - - /** - * The expected reference. - * @var mixed - * @access private - */ - private $_ref; - - /** - * The desired return value. - * @var boolean - * @access private - */ - private $_result; - - /** - * Create a new IdenticalMatcher expecting $expected. - * @param mixed $expected - * @param boolean $result to be expected - */ - public function __construct(&$ref, $result = true) - { - $this->_ref =& $ref; - $this->_result = $result; - } - - /** - * Compare $ref with the expected reference and return true if it is the same reference. - * @param mixed $ref - * @return boolean - */ - public function matches(&$ref) - { - if (is_object($ref)) - { - $isRef = ($this->_ref === $ref); - } - else - { - if ($this->_ref === $ref) - { - $copy = $ref; - $randomString = uniqid('yay'); - $ref = $randomString; - $isRef = ($this->_ref === $ref); - $ref = $copy; - } - else - { - $isRef = false; - } - } - - return (($this->_result && $isRef) || (!$this->_result && !$isRef)); - } - - /** - * Returns true if the argument doesn't need to be present. - * @return boolean - */ - public function isOptional() - { - return false; - } - - /** - * Writes the match description as a string following $format. - * $format is a sprintf() string with %s, $s as $matcherName, $value respectively. - * @param string $format - * @return string - */ - public function describeMatch($format) - { - return '[reference]'; - } - -} \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/MockGenerator.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/MockGenerator.php deleted file mode 100644 index b3a9c78d..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/MockGenerator.php +++ /dev/null @@ -1,323 +0,0 @@ -. - - */ - -/** - * Generates the code for a Mock object. - * This lives as a singleton for a few reasons. - * @author Chris Corbyn - * @package Yay - */ -class Yay_MockGenerator -{ - - /** The name of the Mock object interface */ - const MOCK_INTERFACE = 'Yay_MockObject'; - - /** Prefixed to types to create a Mock name */ - const MOCK_PREFIX = 'Yay_MockObjects_'; - - /** Singleton instance */ - private static $_instance = null; - - /** - * The path a template which draws a Mock. - * @var string - * @access private - */ - private $_template; - - /** - * A map of mocked type hints to their concrete class names. - * @var array - * @access private - */ - private $_mocked = array(); - - /** - * Constructor cannot be used. - */ - private function __construct() - { - } - - /** - * Get a singleton instance of this MockGenerator. - * @return Yay_MockGenerator - */ - public static function getInstance() - { - if (is_null(self::$_instance)) - { - self::$_instance = new self(); - } - return self::$_instance; - } - - /** - * Set the path to a template which can draw a mock class. - * @param string $path - */ - public function setMockTemplate($path) - { - $this->_template = $path; - } - - /** - * Produce class code for a MockObject of $typeHint and return its concrete name. - * @param string $typeHint - * @return string - */ - public function generateMock($typeHint) - { - if (!$className = $this->_getConcreteMockName($typeHint)) - { - $className = $this->_materializeMockCode($typeHint); - } - return $className; - } - - /** - * Use a fixed naming scheme to make a mock class name from $typeHint. - * @param string $typeHint - * @return string - */ - public function applyNamingScheme($typeHint) - { - return self::MOCK_PREFIX . $typeHint; - } - - /** - * Remove any adjustments that were made to an original type hint. - * @param string $typeHint - * @return string - */ - public function reverseNamingScheme($typeHint) - { - $len = strlen(self::MOCK_PREFIX); - if (substr($typeHint, 0, $len) == self::MOCK_PREFIX) - { - $typeHint = substr($typeHint, $len); - } - return $typeHint; - } - - // -- Private methods - - /** - * Try to lookup a mocked concrete class name for $typeHint. - * @param string $typeHint - * @return string - * @access private - */ - private function _getConcreteMockName($typeHint) - { - if (array_key_exists($typeHint, $this->_mocked)) - { - return $this->_mocked[$typeHint]; - } - } - - /** - * Produce the mock object code and return its name. - * @param string $typeHint - * @return string - * @access private - */ - private function _materializeMockCode($typeHint) - { - $reflector = new ReflectionClass($typeHint); - $mockData = array( - 'className' => $this->applyNamingScheme($typeHint), - 'extends' => $this->_getSuperclass($reflector), - 'interfaces' => $this->_getInterfaces($reflector), - 'methods' => $this->_getMethods($reflector) - ); - - extract($mockData); - $code = include($this->_template); - eval($code); - - $this->_mocked[$typeHint] = $mockData['className']; - return $mockData['className']; - } - - /** - * Get all known interfaces for $reflector. - * @param ReflectionClass $reflector - * @return array - * @access private - */ - private function _getInterfaces(ReflectionClass $reflector) - { - $interfaces = array(); - if ($reflector->isInterface()) - { - if ($reflector->getName() != self::MOCK_INTERFACE) - { - $interfaces[] = $reflector->getName(); - } - } - else - { - foreach ($reflector->getInterfaces() as $interfaceReflector) - { - if ($interfaceReflector->getName() != self::MOCK_INTERFACE) - { - $interfaces[] = $interfaceReflector->getName(); - } - } - } - return $interfaces; - } - - /** - * Get the superclass this mock object needs to extend. - * @param ReflectionClass $reflector - * @return string - * @access private - */ - private function _getSuperclass(ReflectionClass $reflector) - { - if ($this->_canExtend($reflector)) - { - $superclass = $reflector->getName(); - } - else - { - $superclass = ''; - } - return $superclass; - } - - /** - * Get all methods from $reflector. - * @param ReflectionClass $reflector - * @return array - * @access private - */ - private function _getMethods(ReflectionClass $reflector) - { - $methods = array(); - foreach ($reflector->getMethods() as $reflectionMethod) - { - if ($reflectionMethod->isConstructor() - || $reflectionMethod->getName() == '__clone') - { - continue; - } - if ($reflectionMethod->isPublic() || $reflectionMethod->isProtected()) - { - $methods[] = array( - 'name' => $reflectionMethod->getName(), - 'access' => $reflectionMethod->isPublic() ? 'public' : 'protected', - 'modifiers' => $reflectionMethod->isStatic() ? 'static' : '', - 'returnReference' => $reflectionMethod->returnsReference(), - 'parameters' => $this->_getParameters($reflectionMethod) - ); - } - } - return $methods; - } - - /** - * Get all parameters for $method. - * @param ReflectionMethod $method - * @return array - * @access private - */ - private function _getParameters(ReflectionMethod $method) - { - $parameters = array(); - foreach ($method->getParameters() as $reflectionParameter) - { - $hint = ''; - if ($reflectionParameter->isArray()) - { - $hint = 'array'; - } - elseif ($c = $reflectionParameter->getClass()) - { - $hint = $c->getName(); - } - $parameters[] = array( - 'hint' => $hint, - 'byReference' => $reflectionParameter->isPassedByReference(), - 'optional' => $reflectionParameter->isOptional() - ); - } - return $parameters; - } - - /** - * Determine if the reflector for the given class is safe to extend. - * @param ReflectionClass $reflector - * @return boolean - * @access private - */ - private function _canExtend(ReflectionClass $reflector) - { - $canExtend = true; - $warning = false; - if ($reflector->isInterface()) - { - $canExtend = false; - } - else - { - if ($constructor = $reflector->getConstructor()) - { - if ($constructor->isPrivate() || $constructor->isFinal()) - { - $canExtend = false; - $warning = 'has a private or final constructor'; - } - } - elseif ($reflector->isFinal()) - { - $canExtend = false; - $warning = 'is declared final'; - } - else - { - foreach ($reflector->getMethods() as $method) - { - if (($method->isPublic() || $method->isProtected()) && $method->isFinal()) - { - $canExtend = false; - $warning = 'contains final methods'; - } - } - } - } - if ($warning) - { - trigger_error( - sprintf('The type [%s] to be mocked %s.' . - ' Mocking classes which cannot be fully overridden results' . - ' in a loss of class type. It is safe to supress this warning if you' . - ' are aware of the conflict.', - $reflector->getName(), - $warning - ), - E_USER_WARNING - ); - } - return $canExtend; - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/MockObject.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/MockObject.php deleted file mode 100644 index 3c65de06..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/MockObject.php +++ /dev/null @@ -1,25 +0,0 @@ -. - - */ - -/** - * A tag placed on any MockObjects generated in the context of YayMock. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_MockObject { -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Mockery.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Mockery.php deleted file mode 100644 index 38d2410a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Mockery.php +++ /dev/null @@ -1,183 +0,0 @@ -. - - */ - -//require 'Yay/MockGenerator.php'; -//require 'Yay/SimpleInvocation.php'; -//require 'Yay/SimpleDescription.php'; -//require 'Yay/InvocationHandler.php'; -//require 'Yay/MockObject.php'; -//require 'Yay/ExpectationProvider.php'; -//require 'Yay/NotSatisfiedException.php'; -//require 'Yay/StateMachine.php'; -//require 'Yay/SimpleSequence.php'; - -/** - * The main Yay context. - * Handles the generation of MockObjects and the Invocation of methods. - * @author Chris Corbyn - * @package Yay - */ -class Yay_Mockery implements Yay_InvocationHandler -{ - - /** - * The Expectation stack which is being checked. - * @var array - * @access private - */ - private $_expectations = array(); - - /** - * Invocations which are not expected by any Expectations get caught here. - * @var array - * @access private - */ - private $_unexpectedInvocations = array(); - - /** - * A mock class generator. - * @var Yay_MockGenerator - * @access private - */ - private $_generator; - - /** - * Create a new Mockery. - */ - public function __construct() - { - $this->_generator = Yay_MockGenerator::getInstance(); - } - - /** - * Create a MockObject matching $typeHint. - * If the $typeHint is an interface the Mock will implement the interface - * and maintain the method signatures from that interface. - * If the $typeHint is a class name the Mock will extend the class overriding - * all public methods (HOWEVER, if the class contains final methods it is not - * possible to override all methods and hence, the mock will have no specific - * type. - * @param string $typeHint - * @return Yay_MockObject - */ - public function mock($typeHint) - { - $className = $this->_generator->generateMock($typeHint); - $reflector = new ReflectionClass($className); - return $reflector->newInstance($this); - } - - /** - * Specify an Expectation (or Expectations) to check. - * @param Yay_ExpectationProvider $provider - */ - public function checking(Yay_ExpectationProvider $provider) - { - foreach ($provider->getExpectations() as $expectation) - { - $this->_expectations[] = $expectation; - } - } - - /** - * Get a state machine named $name. - * @param string $name - * @return Yay_States - */ - public function states($name) - { - return new Yay_StateMachine($name); - } - - /** - * Create a new Sequence named $name. - * @param string $name - * @return Yay_Sequence - */ - public function sequence($name) - { - return new Yay_SimpleSequence($name); - } - - /** - * Used by YayMock internally (ignore this method!). - */ - public function &handleInvocation(Yay_Invocation $invocation) - { - $ret = null; - $expected = false; - foreach ($this->_expectations as $expectation) - { - if ($expectation->isExpected($invocation)) - { - $expected = true; - if ($action = $expectation->getAction($invocation)) - { - $ret =& $action->invoke($invocation); - } - break; - } - } - if (!$expected) - { - $this->_unexpectedInvocations[] = $invocation; - } - return $ret; - } - - /** - * Assert that all Expectations are satisfied. - * Throws an Exception of type Yay_NotSatisfiedException if any Expecations - * are not satisfied. - * @throws Yay_NotSatisfiedException - */ - public function assertIsSatisfied() - { - $description = new Yay_SimpleDescription(); - $satisfied = true; - foreach ($this->_unexpectedInvocations as $invocation) - { - $description->appendText('Unexpected invocation'); - $invocation->describeTo($description); - $description->appendText(PHP_EOL); - $satisfied = false; - } - if (!$satisfied) - { - $description->appendText(PHP_EOL); - } - foreach ($this->_expectations as $expectation) - { - if (!$expectation->isSatisfied()) - { - $description->appendText('* '); - $satisfied = false; - } - $expectation->describeTo($description); - $description->appendText(PHP_EOL); - } - if (!$satisfied) - { - throw new Yay_NotSatisfiedException( - 'Not all expectations were satisfied or a method was invoked unexpectedly.' . - PHP_EOL . PHP_EOL . $description->toString() . PHP_EOL - ); - } - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/NotSatisfiedException.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/NotSatisfiedException.php deleted file mode 100644 index 8a76daa9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/NotSatisfiedException.php +++ /dev/null @@ -1,36 +0,0 @@ -. - - */ - -/** - * The Exception thrown by Context::assertIsSatisfied() if assertion fails. - * @author Chris Corbyn - * @package Yay - */ -class Yay_NotSatisfiedException extends Exception -{ - - /** - * Create a new NotSatisfiedException with $message. - * @param string $message - */ - public function __construct($message) - { - parent::__construct($message); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SelfDescribing.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SelfDescribing.php deleted file mode 100644 index 186249a1..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SelfDescribing.php +++ /dev/null @@ -1,35 +0,0 @@ -. - - */ - -//require 'Yay/Description.php'; - -/** - * Components implementing this can describe what they do to a Description instance. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_SelfDescribing -{ - - /** - * Write a description of this self describing object to Description. - * @param Yay_Description $description - */ - public function describeTo(Yay_Description $description); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Sequence.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Sequence.php deleted file mode 100644 index a2b7d389..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/Sequence.php +++ /dev/null @@ -1,43 +0,0 @@ -. - - */ - -//require 'Yay/SelfDescribing.php'; - -/** - * Provides a means for Expectations to verify they are called in the correct order. - * This allows Invocations to be forced in a particular order. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_Sequence extends Yay_SelfDescribing -{ - - /** - * Ask for a new Sequence Id and register the new sequence. - * @return integer $id - */ - public function requestSequenceId(); - - /** - * Check if the sequence has progressed far enough for this sequence ID to be used. - * @param integer $id - * @return boolean - */ - public function isInSequence($sequenceId); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleDescription.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleDescription.php deleted file mode 100644 index f86b4b78..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleDescription.php +++ /dev/null @@ -1,63 +0,0 @@ -. - - */ - -//require 'Yay/Description.php'; - -/** - * A basic Description container for error messages. - * @author Chris Corbyn - * @package Yay - */ -class Yay_SimpleDescription implements Yay_Description -{ - - /** - * An internal text buffer. - * @var string - * @access private - */ - private $_text = ''; - - /** - * Append an existing Description to this Description. - * @param Yay_Description - */ - public function appendDescription(Yay_Description $description) - { - $this->_text .= $description->toString(); - } - - /** - * Append text content to this Description. - * @param string $text - */ - public function appendText($text) - { - $this->_text .= $text; - } - - /** - * Get this description back as a formatted string. - * @return string - */ - public function toString() - { - return $this->_text; - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleInvocation.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleInvocation.php deleted file mode 100644 index 012b5681..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleInvocation.php +++ /dev/null @@ -1,163 +0,0 @@ -. - - */ - -//require 'Yay/Invocation.php'; -//require 'Yay/MockGenerator.php'; - -/** - * The standard implementation of the Invocation interface. - * @author Chris Corbyn - * @package Yay - */ -class Yay_SimpleInvocation implements Yay_Invocation -{ - - /** - * The Object on which the Inovation occurred. - * @var object - * @access private - */ - private $_object; - - /** - * The method name invoked. - * @var string - * @access private - */ - private $_method; - - /** - * The arguments in the Invocation. - * @var array - * @access private - */ - private $_arguments; - - /** - * Create a new SimpleInvocation with the given details. - * @param object $object - * @param string $method - * @param array &$arguments - */ - public function __construct($object, $method, array &$arguments) - { - $this->_object = $object; - //Massage __call() overloading so the interface is tested correctly - if ($method == '__call') - { - $method = array_shift($arguments); - $args =& array_shift($arguments); - $arguments =& $args; - } - $this->_method = $method; - $this->_arguments =& $arguments; - } - - /** - * Get the object which this Invocation occured on. - * @return object - */ - public function getObject() - { - return $this->_object; - } - - /** - * Get the method name of the invoked method. - * @return string - */ - public function getMethod() - { - return $this->_method; - } - - /** - * Get the argument list in the Invocation. - * @return array - */ - public function &getArguments() - { - return $this->_arguments; - } - - /** - * Describe this Invocation to $description. - * @param Yay_Description $description - */ - public function describeTo(Yay_Description $description) - { - $description->appendText(sprintf(' of %s;', $this->_getInvocationSignature())); - } - - // -- Private methods - - private function _getInvocationSignature() - { - $class = Yay_MockGenerator::getInstance() - ->reverseNamingScheme(get_class($this->_object)); - if (!empty($this->_arguments)) - { - $args = array(); - foreach ($this->_arguments as $arg) - { - $args[] = $this->_describeArgument($arg, '%s [%s]'); - } - $params = implode(', ', $args); - } - else - { - $params = ''; - } - return sprintf('%s::%s(%s)', $class, $this->_method, $params); - } - - private function _describeArgument($arg, $format) - { - $description = ''; - if (is_int($arg)) - { - $description = sprintf($format, 'int', $arg); - } - elseif (is_float($arg)) - { - $description = sprintf($format, 'float', preg_replace('/^(.{8}).+/', '$1..', $arg)); - } - elseif (is_numeric($arg)) - { - $description = sprintf($format, 'number', preg_replace('/^(.{8}).+/', '$1..', $arg)); - } - elseif (is_string($arg)) - { - $description = sprintf($format, 'string', preg_replace('/^(.{8}).+/', '$1..', $arg)); - } - elseif (is_object($arg)) - { - $description = sprintf($format, 'object', get_class($arg)); - } - elseif (is_array($arg)) - { - $description = sprintf($format, 'array', count($arg) . ' items'); - } - else - { - $description = sprintf($format, gettype($arg), preg_replace('/^(.{8}).+/', '$1..', (string) $arg)); - } - return $description; - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleSequence.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleSequence.php deleted file mode 100644 index 17156d8a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleSequence.php +++ /dev/null @@ -1,108 +0,0 @@ -. - - */ - -/** - * Provides a means for Expectations to verify they are called in the correct order. - * This allows Invocations to be forced in a particular order. - * @author Chris Corbyn - * @package Yay - */ -class Yay_SimpleSequence implements Yay_Sequence -{ - - /** - * The name of this sequence. - * @var string - * @access private - */ - private $_name; - - /** - * The list of sequence IDs expected. - * @var array - * @access private - */ - private $_sequenceIds = array(); - - /** - * An internal sequence counter. - * @var int - * @access private - */ - private $_counter = 0; - - /** - * The current position in the sequence. - * @var int - * @access private - */ - private $_currentId = null; - - /** - * Create a new Sequence with $name. - * @param string $name - */ - public function __construct($name) - { - $this->_name = $name; - } - - /** - * Ask for a new Sequence Id and register the new sequence. - * @return integer $id - */ - public function requestSequenceId() - { - $id = $this->_counter++; - $this->_sequenceIds[] = $id; - return $id; - } - - /** - * Check if the sequence has progressed far enough for this sequence ID to be used. - * @param integer $id - * @return boolean - */ - public function isInSequence($sequenceId) - { - if ($this->_currentId === $sequenceId) - { - $inSequence = true; - } - elseif (current($this->_sequenceIds) === $sequenceId) - { - $this->_currentId = array_shift($this->_sequenceIds); - $inSequence = true; - } - else - { - $inSequence = false; - } - return $inSequence; - } - - /** - * Write a description of this self describing object to Description. - * @param Yay_Description $description - */ - public function describeTo(Yay_Description $description) - { - $description->appendText(sprintf(' sequence %s;', $this->_name)); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleState.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleState.php deleted file mode 100644 index 18c7621b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleState.php +++ /dev/null @@ -1,49 +0,0 @@ -. - - */ - -//require 'Yay/State.php'; -//require 'Yay/States.php'; -//require 'Yay/SimpleStatePredicate.php'; - -/** - * A State from a State machine. - * @author Chris Corbyn - * @package Yay - */ -class Yay_SimpleState extends Yay_SimpleStatePredicate implements Yay_State -{ - - /** - * Create a new State for $stateMachine to be $stateName. - * @param Yay_States $stateMachine - * @param string $stateName - */ - public function __construct(Yay_States $stateMachine, $stateName) - { - parent::__construct($stateMachine, $stateName, true); - } - - /** - * Make this State active. - */ - public function activate() - { - $this->_stateMachine->become($this->_stateName); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleStatePredicate.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleStatePredicate.php deleted file mode 100644 index 6c9458c4..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/SimpleStatePredicate.php +++ /dev/null @@ -1,88 +0,0 @@ -. - - */ - -//require 'Yay/StatePredicate.php'; -//require 'Yay/States.php'; - -/** - * An expectation about what State a state machine is in. - * @author Chris Corbyn - * @package Yay - */ -class Yay_SimpleStatePredicate implements Yay_StatePredicate -{ - - /** - * The state machine which this predicate checks. - * @var Yay_States - * @access private - */ - protected $_stateMachine; - - /** - * The state name to check for in the state machine. - * @var string - * @access private - */ - protected $_stateName; - - /** - * True if the state is wanted, false otherwise. - * @var boolean - * @access private - */ - private $_is = true; - - /** - * Create a new StatePredicate. - * @param Yay_States $stateMachine - * @param string $stateName to expect - * @param boolean $is (negation point) - */ - public function __construct(Yay_States $stateMachine, $stateName, $is = true) - { - $this->_stateMachine = $stateMachine; - $this->_stateName = $stateName; - $this->_is = $is; - } - - /** - * Return true if the state machine is in this state. - * @return boolean - */ - public function isActive() - { - return (($this->_is && $this->_stateMachine->getCurrentState() == $this->_stateName) - || (!$this->_is && $this->_stateMachine->getCurrentState() != $this->_stateName)); - } - - /** - * Write a description of this self describing object to Description. - * @param Yay_Description $description - */ - public function describeTo(Yay_Description $description) - { - $this->_stateMachine->describeTo($description); - $description->appendText(sprintf( - ' %s %s;', - ($this->_is ? 'is' : 'is not'), - $this->_stateName - )); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/State.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/State.php deleted file mode 100644 index 045e8bbd..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/State.php +++ /dev/null @@ -1,34 +0,0 @@ -. - - */ - -//require 'Yay/StatePredicate.php'; - -/** - * A State from a State machine. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_State extends Yay_StatePredicate -{ - - /** - * Make this State active. - */ - public function activate(); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/StateMachine.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/StateMachine.php deleted file mode 100644 index 2a9128a9..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/StateMachine.php +++ /dev/null @@ -1,113 +0,0 @@ -. - - */ - -//require 'Yay/State.php'; -//require 'Yay/SimpleState.php'; -//require 'Yay/StatePredicate.php'; -//require 'Yay/SimpleStatePredicate.php'; - -/** - * A basic state machine. - * @author Chris Corbyn - * @package Yay - */ -class Yay_StateMachine implements Yay_States -{ - - /** - * The name of this state machine. - * @var string - * @access private - */ - private $_name; - - /** - * The current state. - * @var string - * @access private - */ - private $_state; - - /** - * Create a new State machine with $name. - * @param string $name - */ - public function __construct($name) - { - $this->_name = $name; - } - - /** - * Set the initial state of this state machine. - * @param string $stateName - * @return Yay_States - */ - public function startsAs($stateName) - { - $this->become($stateName); - return $this; - } - - /** - * Get the state which puts the state machine into the named state. - * @param string $stateName - * @return Yay_State - */ - public function is($stateName) - { - return new Yay_SimpleState($this, $stateName); - } - - /** - * Get the predicate which indicates the state machine is NOT in the named state. - * @param string $stateName - * @return Yay_StatePredicate - */ - public function isNot($stateName) - { - return new Yay_SimpleStatePredicate($this, $stateName, false); - } - - /** - * Become the named state. - * @param string $stateName - */ - public function become($stateName) - { - $this->_state = $stateName; - } - - /** - * Get the name of the current state. - * @return string - */ - public function getCurrentState() - { - return $this->_state; - } - - /** - * Write a description of this self describing object to Description. - * @param Yay_Description $description - */ - public function describeTo(Yay_Description $description) - { - $description->appendText(sprintf(' %s', $this->_name)); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/StatePredicate.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/StatePredicate.php deleted file mode 100644 index 5941d76b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/StatePredicate.php +++ /dev/null @@ -1,35 +0,0 @@ -. - - */ - -//require 'Yay/SelfDescribing.php'; - -/** - * An expectation about what State a state machine is in. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_StatePredicate extends Yay_SelfDescribing -{ - - /** - * Return true if the state machine is in this state. - * @return boolean - */ - public function isActive(); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/States.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/States.php deleted file mode 100644 index c021c4ff..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/classes/Yay/States.php +++ /dev/null @@ -1,62 +0,0 @@ -. - - */ - -//require 'Yay/SelfDescribing.php'; - -/** - * A basic state machine. - * @author Chris Corbyn - * @package Yay - */ -interface Yay_States extends Yay_SelfDescribing -{ - - /** - * Set the initial state of this state machine. - * @param string $stateName - * @return Yay_States - */ - public function startsAs($stateName); - - /** - * Get the state which puts the state machine into the named state. - * @param string $stateName - * @return Yay_State - */ - public function is($stateName); - - /** - * Get the predicate which indicates the state machine is NOT in the named state. - * @param string $stateName - * @return Yay_StatePredicate - */ - public function isNot($stateName); - - /** - * Become the named state. - * @param string $stateName - */ - public function become($stateName); - - /** - * Get the name of the current state. - * @return string - */ - public function getCurrentState(); - -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/mock.tpl.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/mock.tpl.php deleted file mode 100644 index 937699ed..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/mock.tpl.php +++ /dev/null @@ -1,69 +0,0 @@ -. - - */ - -?> - -class - - implements - - Yay_MockObject -{ - - private $_yayInvocationHandler; - - public function __construct(Yay_InvocationHandler $invocationHandler) - { - $this->_yayInvocationHandler = $invocationHandler; - } - - - function ( $param): ?> - 0) echo ','; ?> - - $arg_ - - ) - { - $value = null; - if (isset($this->_yayInvocationHandler)) - { - $args = array(); - for ($i = 0; $i < func_num_args(); ++$i) - { - $argName = 'arg_' . $i; - $args[] =& ${$argName}; - } - $invocation = new Yay_SimpleInvocation($this, __FUNCTION__, $args); - $value =& $this->_yayInvocationHandler->handleInvocation($invocation); - } - return $value; - } - - - public function __clone() - { - $this->_yayInvocationHandler = null; - } - -} - - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/yay_convenience.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/yay_convenience.php deleted file mode 100644 index c145103e..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/yay_convenience.php +++ /dev/null @@ -1,176 +0,0 @@ -. - - */ - -/** - * Provides non-namespaced classes and functions for brevity. - * Including this script is entirely optional. - * @author Chris Corbyn - * @package Yay - */ - -// Classes - -/** - * Allow occurences of Yay_Expectations::create() to be replaced with Expectations::create(). - */ -class Expectations extends Yay_Expectations { } - -/** - * Allows occurences of new Yay_Mockery() to be replaced with new Mockery(). - */ -class Mockery extends Yay_Mockery { } - -//Argument matchers - -/** - * Allows Yay::optional() to be called as optional(). - */ -function optional($value = null) -{ - return Yay::optional($value); -} - -/** - * Allows Yay::any() to be called as any(). - */ -function any($type = null) -{ - return Yay::any($type); -} - -/** - * Allows Yay::none() to be called as none(). - */ -function none($type = null) -{ - return Yay::none($type); -} - -/** - * Allows Yay::identical() to be called as identical(). - */ -function identical($value) -{ - return Yay::identical($value); -} - -/** - * Allows Yay::notIdentical() to be called as notIdentical(). - */ -function notIdentical($value) -{ - return Yay::notIdentical($value); -} - -/** - * Allows Yay::equal() to be called as equal(). - */ -function equal($value) -{ - return Yay::equal($value); -} - -/** - * Allows Yay::notEqual() to be called as notEqual(). - */ -function notEqual($value) -{ - return Yay::notEqual($value); -} - -/** - * Allows Yay::pattern() to be called as pattern(). - */ -function pattern($pattern) -{ - return Yay::pattern($pattern); -} - -/** - * Allows Yay::noPattern() to be called as noPattern(). - */ -function noPattern($pattern) -{ - return Yay::noPattern($pattern); -} - -/** - * Allows Yay::bounds() to be called as bounds(). - */ -function bounds($a, $b) -{ - return Yay::bounds($a, $b); -} - -/** - * Allows Yay::outside() to be called as outside(). - */ -function outside($a, $b) -{ - return Yay::outside($a, $b); -} - -/** - * Allows Yay::reference() to be called as reference(). - */ -function reference(&$ref) -{ - return Yay::reference($ref); -} - -/** - * Allows Yay::noReference() to be called as noReference(). - */ -function noReference(&$ref) -{ - return Yay::noReference($ref); -} - -//Actions - -/** - * Allows Yay::returnValue() to be called as returnValue(). - */ -function returnValue($value) -{ - return Yay::returnValue($value); -} - -/** - * Allows Yay::returnReference() to be called as returnReference(). - */ -function returnReference(&$ref) -{ - return Yay::returnReference($ref); -} - -/** - * Allows Yay::throwException() to be called as throwException(). - */ -function throwException(Exception $e) -{ - return Yay::throwException($e); -} - -/** - * Allows Yay::call() to be called as call(). - */ -function call($callback) -{ - return Yay::call($callback); -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/yay_mock.php b/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/yay_mock.php deleted file mode 100644 index 7c769226..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/lib/yaymock/yay_mock.php +++ /dev/null @@ -1,29 +0,0 @@ -. - - */ - -/** - * YayMock include and bootstrap file. - * @author Chris Corbyn - */ - -require_once dirname(__FILE__) . '/classes/Yay.php'; -Yay::setClassPath(dirname(__FILE__) . '/classes'); -spl_autoload_register(array('Yay', 'autoload')); -Yay_MockGenerator::getInstance()->setMockTemplate(dirname(__FILE__) . '/mock.tpl.php'); - -//EOF diff --git a/vendor/swiftmailer/swiftmailer/test-suite/run.php b/vendor/swiftmailer/swiftmailer/test-suite/run.php deleted file mode 100644 index fa67634a..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/run.php +++ /dev/null @@ -1,56 +0,0 @@ -get('//./root/cimv2:Win32_Process.Handle="' . getmypid() . '"') - ->executablePath; - } -} - -$runner = new Sweety_Runner_CliRunner( - explode(PATH_SEPARATOR, SWEETY_TEST_PATH), - $exe . ' ' . $argv[0] - ); - -$name = !empty($argv[1]) ? $argv[1] : 'All Tests'; -$runner->setReporter(new Sweety_Reporter_CliReporter(sprintf('%s - %s', SWEETY_SUITE_NAME, $name))); - -$runner->setIgnoredClassRegex(SWEETY_IGNORED_CLASSES); - -$locators = preg_split('/\s*,\s*/', SWEETY_TEST_LOCATOR); -foreach ($locators as $locator) -{ - $runner->registerTestLocator(new $locator()); -} - -if (!empty($argv[1]) && !preg_match('~!?/.*?/~', $argv[1])) -{ - $testName = $argv[1]; - $format = !empty($argv[2]) ? $argv[2] : Sweety_Runner::REPORT_TEXT; - - $runner->runTestCase($testName, $format); -} -else -{ - $runner->runAllTests(); -} - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/sweety.js b/vendor/swiftmailer/swiftmailer/test-suite/sweety.js deleted file mode 100644 index 663ff946..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/sweety.js +++ /dev/null @@ -1,471 +0,0 @@ -/* - JavaScript wrapper around REST API in Sweety. - */ - -/** - * A convenience class for using XPath. - * @author Chris Corbyn - * @constructor - */ -function SweetyXpath() { - - /** - * Get the first node matching the given expression. - * @param {String} expr - * @param {Element} node - * @returns Element - */ - this.getFirstNode = function getFirstNode(expr, node) { - var firstNode = _getRootNode(node).evaluate( - expr, node, _getNsResolver(node), XPathResult.FIRST_ORDERED_NODE_TYPE, null); - return firstNode.singleNodeValue; - }, - - /** - * Get all nodes matching the given expression. - * The returned result is a Node Snapshot. - * @param {String} expr - * @param {Element} node - * @returns Element[] - */ - this.getNodes = function getNodes(expr, node) { - var nodes = _getRootNode(node).evaluate( - expr, node, _getNsResolver(node), XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); - - var nodeSet = new Array(); - for (var i = 0, len = nodes.snapshotLength; i < len; i++) { - nodeSet.push(nodes.snapshotItem(i)); - } - return nodeSet; - }, - - /** - * Get the string value of the node matching the given expression. - * @param {String} expr - * @param {Element} node - * @returns String - */ - this.getValue = function getValue(expr, node) { - return _getRootNode(node).evaluate( - expr, node, _getNsResolver(node), XPathResult.STRING_TYPE, null).stringValue; - } - - /** - * Get the root node from which run evaluate. - * @param {Element} node - * @returns Element - */ - var _getRootNode = function _getRootNode(node) { - if (node.ownerDocument && node.ownerDocument.evaluate) { - return node.ownerDocument; - } else { - if (node.evaluate) { - return node; - } else { - return document; - } - } - } - - /** - * Get the NS Resolver used when searching. - * @param {Element} node - * @returns Element - */ - var _getNsResolver = function _getNsResolver(node) { - if (!document.createNSResolver) { - return null; - } - - if (node.ownerDocument) { - return document.createNSResolver(node.ownerDocument.documentElement); - } else { - return document.createNSResolver(node.documentElement); - } - } - -} - -/** - * The reporter interface so Sweety can tell the UI what's happening. - * @author Chris Corbyn - * @constructor - */ -function SweetyReporter() { //Interface/Base Class - - var _this = this; - - /** - * Create a sub-reporter for an individual test case. - * @param {String} testCaseName - * @returns SweetyReporter - */ - this.getReporterFor = function getReporterFor(testCaseName) { - return _this; - } - - /** - * Start reporting. - */ - this.start = function start() { - } - - /** - * Handle a skipped test case. - * @param {String} message - * @param {String} path - */ - this.reportSkip = function reportSkip(message, path) { - } - - /** - * Handle a passing assertion. - * @param {String} message - * @param {String} path - */ - this.reportPass = function reportPass(message, path) { - } - - /** - * Handle a failing assertion. - * @param {String} message - * @param {String} path - */ - this.reportFail = function reportFail(message, path) { - } - - /** - * Handle an unexpected exception. - * @param {String} message - * @param {String} path - */ - this.reportException = function reportException(message, path) { - } - - /** - * Handle miscellaneous test output. - * @param {String} output - * @param {String} path - */ - this.reportOutput = function reportOutput(output, path) { - } - - /** - * Finish reporting. - */ - this.finish = function finish() { - } - -} - - -/** - * Represents a single test case being run. - * @author Chris Corbyn - * @constructor - */ -function SweetyTestCaseRun(testClass, reporter) { - - var _this = this; - - /** The XMLHttpRequest used in testing */ - var _req; - - /** XPath handler */ - var _xpath = new SweetyXpath(); - - /** Callback function for completion event */ - this.oncompletion = function oncompletion() { - } - - /** - * Run this test. - */ - this.run = function run() { - if (!reporter.isStarted()) { - reporter.start(); - } - _req = _createHttpRequest(); - - if (!_req) { - return; - } - - _req.open("GET", "?test=" + testClass + "&format=xml", true); - _req.onreadystatechange = _handleXml; - _req.send(null); - } - - /** - * Get an XmlHttpRequest instance, cross browser compatible. - * @return Object - */ - var _createHttpRequest = function _createHttpRequest() { - var req = false; - - if (window.XMLHttpRequest && !(window.ActiveXObject)) { - try { - req = new XMLHttpRequest(); - } catch(e) { - req = false; - } - } else if (window.ActiveXObject) { - try { - req = new ActiveXObject("Msxml2.XMLHTTP"); - } catch(e) { - try { - req = new ActiveXObject("Microsoft.XMLHTTP"); - } catch(e) { - req = false; - } - } - } - - return req; - } - - /** - * Handle the XML response from the test. - */ - var _handleXml = function _handleXml() { - if (_req.readyState == 4) { - try { - - var xml = _req.responseXML; - var txt = _req.responseText.replace(/[\r\n]+/g, ""). - replace(/^(.+)<\?xml.*$/, "$1"); - - //Test case was skipped - var skipElements = xml.getElementsByTagName('skip'); - if (!skipElements || 1 != skipElements.length) - { - var runElements = xml.getElementsByTagName('run'); - //Invalid document, an error probably occured - if (!runElements || 1 != runElements.length) { - reporter.reportException( - "Invalid XML response: " + - _stripTags(txt.replace(/^\s*<\?xml.+<\/(?:name|pass|fail|exception)>/g, "")), testClass); - } else { - var everything = runElements.item(0); - _parseResults(everything, testClass); - reporter.finish(); - } - } - else - { - reporter.reportSkip(_textValueOf(skipElements.item(0)), testClass); - reporter.finish(); - } - } catch (ex) { - //Invalid document or an error occurred. - reporter.reportException( - "Invalid XML response: " + - _stripTags(txt.replace(/^\s*<\?xml.+<\/(?:name|pass|fail|exception)>/g, "")), testClass); - } - - //Invoke the callback - _this.oncompletion(); - } - } - - /** - * Cross browser method for reading the value of a node in XML. - * @param {Element} node - * @returns String - */ - var _textValueOf = function _textValueOf(node) { - if (!node.textContent && node.text) { - return node.text; - } else { - return node.textContent; - } - } - - var _stripTags = function _stripTags(txt) { - txt = txt.replace(/[\r\n]+/g, ""); - return txt.replace( - /<\/?(?:a|b|br|p|strong|u|i|em|span|div|ul|ol|li|table|thead|tbody|th|td|tr)\b.*?\/?>/g, - ""); - } - - /** - * Parse an arbitrary message output. - * @param {Element} node - * @param {String} path - */ - var _parseMessage = function _parseMessage(node, path) { - reporter.reportOutput(_textValueOf(node), path); - } - - /** - * Parse formatted text output (such as a dump()). - * @param {Element} node - * @param {String} path - */ - var _parseFormatted = function _parseFormatted(node, path) { - reporter.reportOutput(_textValueOf(node), path); - } - - /** - * Parse failing test assertion. - * @param {Element} node - * @param {String} path - */ - var _parseFail = function _parseFail(node, path) { - reporter.reportFail(_textValueOf(node), path); - } - - /** - * Parse an Exception. - * @param {Element} node - * @param {String} path - */ - var _parseException = function _parseException(node, path) { - reporter.reportException(_textValueOf(node), path); - } - - /** - * Parse passing test assertion. - * @param {Element} node - * @param {String} path - */ - var _parsePass = function _parsePass(node, path) { - reporter.reportPass(_textValueOf(node), path); - } - - /** - * Parse an entire test case - * @param {Element} node - * @param {String} path - */ - var _parseTestCase = function _parseTestCase(node, path) { - var testMethodNodes = _xpath.getNodes("./test", node); - - for (var x in testMethodNodes) { - var testMethodNode = testMethodNodes[x]; - var testMethodName = _xpath.getValue("./name", testMethodNode); - - var formattedNodes = _xpath.getNodes("./formatted", testMethodNode); - for (var i in formattedNodes) { - var formattedNode = formattedNodes[i]; - _parseFormatted(formattedNode, path + " -> " + testMethodName); - } - - var messageNodes = _xpath.getNodes("./message", testMethodNode); - for (var i in messageNodes) { - var messageNode = messageNodes[i]; - _parseMessage(messageNode, path + " -> " + testMethodName); - } - - var failNodes = _xpath.getNodes("./fail", testMethodNode); - for (var i in failNodes) { - var failNode = failNodes[i]; - _parseFail(failNode, path + " -> " + testMethodName); - } - - var exceptionNodes = _xpath.getNodes("./exception", testMethodNode); - for (var i in exceptionNodes) { - var exceptionNode = exceptionNodes[i]; - _parseException(exceptionNode, path + " -> " + testMethodName); - } - - var passNodes = _xpath.getNodes("./pass", testMethodNode); - for (var i in passNodes) { - var passNode = passNodes[i]; - _parsePass(passNode, path + " -> " + testMethodName); - } - } - } - - /** - * Parse an entire grouped or single test case. - * @param {Element} node - * @param {String} path - */ - var _parseResults = function _parseResults(node, path) { - var groupNodes = _xpath.getNodes("./group", node); - - if (0 != groupNodes.length) { - for (var i in groupNodes) { - var groupNode = groupNodes[i]; - var groupName = _xpath.getValue("./name", groupNode); - _parseResults(groupNode, path + " -> " + groupName); - } - } else { - var caseNodes = _xpath.getNodes("./case", node); - for (var i in caseNodes) { - var caseNode = caseNodes[i]; - _parseTestCase(caseNode, path); - } - } - } - -} - -/** - * Runs a list of test cases. - * @author Chris Corbyn - * @constructor - */ -function SweetyTestRunner() { - - var _this = this; - - SweetyTestRunner._currentInstance = _this; - - /** True if the test runner has been stopped */ - var _cancelled = false; - - /** - * Invoked to cause the test runner to stop execution at the next available - * opportunity. If XML is being parsed in another thread, or an AJAX request - * is in progress the test runner will wait until the next test. - * @param {Boolean} cancel - */ - this.cancelTesting = function cancelTesting(cancel) { - _cancelled = cancel; - } - - /** - * Run the given list of test cases. - * @param {String[]} tests - * @param {SweetyReporter} reporter - */ - this.runTests = function runTests(tests, reporter) { - if (!reporter.isStarted()) { - reporter.start(); - } - - if (_cancelled || !tests || !tests.length) { - _cancelled = false; - reporter.finish(); - return; - } - - var testCase = tests.shift(); - - var caseReporter = reporter.getReporterFor(testCase); - - var testRun = new SweetyTestCaseRun(testCase, caseReporter); - - //Repeat until no tests remaining in list - // Ok, I know, I know I'll try to eradicate this lazy use of recursion - testRun.oncompletion = function() { - _this.runTests(tests, reporter); - }; - - testRun.run(); - } - -} - -/** Active instance */ -SweetyTestRunner._currentInstance = null; - -/** - * Fetches the currently running instance of the TestRunner. - * @returns SweetyTestRunner - */ -SweetyTestRunner.getCurrentInstance = function getCurrentInstance() { - return this._currentInstance; -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/css/main.css b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/css/main.css deleted file mode 100644 index 3f6e6304..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/css/main.css +++ /dev/null @@ -1,203 +0,0 @@ -/** Page structure **/ -/*------------------*/ - -ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input { - margin: 0; padding: 0; -} - -body { - font-size: 0.8em; - font-family: arial,sans-serif; - background: #fff; - padding: 8px; -} - -img { - border: 0; -} - -input { - margin-bottom: 8px; - padding: 4px; - font-size: 16px; - width: 100px; -} - -input.sweety-text { - border: 2px solid #000; - width: 268px; - background-color: #fff; -} - -input.sweety-disabled { - background: #eee; - border: 2px solid #888; -} - -input.sweety-waiting { - background-image: url(../images/loading.gif); - background-position: 98% 50%; - background-repeat: no-repeat; -} - -input.sweety-check { - width: 12px !important; - height: 12px !important; - margin: 1px !important; - padding: 1px !important; -} - -h1 { - margin-bottom: 1em; -} - -div#sweety-page { - width: 100%; -} - -div#sweety-testlist { - float: left; - width: 400px; - background: #aaa; -} - -div#sweety-output { - margin-left: 400px; -} - -div#sweety-results { - padding: 8px; - font-size: 1.4em; -} - -div#sweety-messages { - margin-top: 8px; - padding-top: 8px; - border-top: 1px solid #777; -} - -div#sweety-smoke-images { - margin-top: 8px; - padding-top: 8px; -} - -div#sweety-smoke-images img { - width: 150px; - height: 120px; - margin-right: 8px; -} - -div.sweety-clear { - width: 100%; - clear: both; -} - -/** Look and feel **/ -/*-----------------*/ - -input#sweety-filter { - visibility: hidden; -} - -div#sweety-communication { - float: right; - display: none; -} - -pre.sweety-raw-output { - display: block; - background: #ddd; - padding: 4px; - margin: 4px; -} - -div.sweety-pad { - padding: 8px; -} - -div.sweety-message { - padding: 4px; - margin: 4px; -} - -div.sweety-test-path { - padding-left: 2em; - font-style: italic; - color: #777; -} - -div.sweety-test { - font-size: 12px; - margin-bottom: 2px; - margin-left: 12px; - padding: 2px; -} - -div.sweety-test img { - float: right; - margin-right: 4px; -} - -div.sweety-package-header { - font-size: 12px; - margin-bottom: 2px; - border-bottom: 2px solid #444; - padding: 2px; -} - -div.sweety-package-header span.sweety-test-package { - font-weight: normal; -} - -div.sweety-package-header img { - margin: 0 2px; -} - -span.sweety-pkg-count { - display: block; - float: right; - padding-right: 2px; -} - -img.sweety-group-icon { - float: right; - margin: 4px !important; -} - -.sweety-pkg-idle { - background: #cacaca; -} - -span.sweety-test-package { - display: block; - font-size: 10px; - padding-left: 1em; -} - -.sweety-idle { - background: #eee; -} - -.sweety-running { - background: #ffff33 !important; -} - -.sweety-pass { - background: #00aa00 !important; - color: #fff; -} - -.sweety-fail { - background: #ee0000 !important; - color: #fff; -} - -.sweety-fail-text { - color: #ee0000; -} - -.sweety-skip-text { - color: #4444dd; - font-weight: bold; - text-decoration: underline; -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/darr.gif b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/darr.gif deleted file mode 100644 index d4349a76..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/darr.gif and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/group.gif b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/group.gif deleted file mode 100644 index 2e22ad21..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/group.gif and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/htmlicon.gif b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/htmlicon.gif deleted file mode 100644 index e110dcff..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/htmlicon.gif and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/loading.gif b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/loading.gif deleted file mode 100644 index 731ccea1..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/loading.gif and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/network.gif b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/network.gif deleted file mode 100644 index 38c4d6bf..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/network.gif and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/rarr.gif b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/rarr.gif deleted file mode 100644 index b2d4d95d..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/rarr.gif and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/runicon.gif b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/runicon.gif deleted file mode 100644 index a901fcad..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/runicon.gif and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/xmlicon.gif b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/xmlicon.gif deleted file mode 100644 index 9df47b37..00000000 Binary files a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/images/xmlicon.gif and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/js/sweety-template.js b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/js/sweety-template.js deleted file mode 100644 index a47b1b5b..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/js/sweety-template.js +++ /dev/null @@ -1,1155 +0,0 @@ -/* - JavaScript for Sweety to wrap the standard template around the API. - */ - - -/** - * The UI Manager object for setting up the interface. - * @author Chris Corbyn - * @constructor - */ -function SweetyUIManager() { - - var _this = this; - - /** Packages toggled on or off */ - var _pkgs = { }; - - /** Test cases within packages */ - var _pkgTests = { }; - - /** An element cache */ - var _cached = { }; - - /** - * Initialize the user interface. - */ - this.initialize = function initialize() { - _this.showFilterBox(); - _this.loadTestList(); - _this.resetMessageDiv(); - _this.resetTotals(); - } - - /** - * Show or hide an entire package. - * @param {String} pkg - * @param {Boolean} onoff - */ - this.togglePackage = function togglePackage(pkg, onOff) { - if (typeof _pkgs[pkg] == "undefined") { - _pkgs[pkg] = true; - } - - //Toggle if not overridden - _pkgs[pkg] = (typeof onOff == "undefined") ? !_pkgs[pkg] : onOff; - - var pkgState = _pkgs[pkg] ? "1" : "0"; - - var date = new Date(); - date.setTime(date.getTime() + (30 * 24 * 60 * 60 * 1000)); - - document.cookie = escape("sweetyPkg" + pkg) + "=" + pkgState + - "; expires=" + date.toGMTString() + - "; path=/"; - - var pkgRegex = new RegExp("^" + pkg + "_[^_]+$"); - for (var testCase in sweetyTestCases) { - if (testCase.match(pkgRegex)) { - var testDiv = _getElementById(testCase); - if (_pkgs[pkg]) { - if (sweetyTestCases[testCase]) { - testDiv.style.display = "block"; - } - } else { - testDiv.style.display = "none"; - } - } - } - var headerImg; - if (headerImg = _getElementById("sweety-pkg-img-" + pkg)) - { - if (_pkgs[pkg]) { - headerImg.src = "templates/sweety/images/darr.gif"; - } else { - headerImg.src = "templates/sweety/images/rarr.gif"; - } - } - } - - /** - * Enable or disable user input. - * @param {Boolean} on - */ - this.allowInteractivity = function allowInteractivity(on) { - if (!on) { - _paintFilterDisabled(true); - _getRunButton().value = "Stop Tests"; - _getRunButton().onclick = function() { - try { - SweetyTestRunner.getCurrentInstance().cancelTesting(true); - _this.allowInteractivity(true); - } catch (e) { } - }; - for (var testCase in sweetyTestCases) { - _getElementById(testCase).onclick = function() { - return false; - }; - } - } else { - _paintFilterDisabled(false); - _getRunButton().value = "Run Tests"; - _getRunButton().onclick = function() { - _this.initialize(); - sweetyRunner.runAll(); - }; - for (var testCase in sweetyTestCases) { - _getElementById(testCase).onclick = function() { - _this.initialize(); - sweetyRunner.runTestCase(this.id); - }; - } - } - } - - /** - * Display the filter box. - */ - this.showFilterBox = function showFilterBox() { - _getFilter().style.visibility = 'visible'; - } - - /** - * Restore the UI on a new page load or reload. - */ - this.restore = function restore() { - for (var testName in sweetyTestCases) { - var pkgName = _pkgFor(testName); - if (typeof _pkgTests[pkgName] == "undefined") { - _pkgTests[pkgName] = { }; - } - _pkgTests[pkgName][testName] = true; - } - this.hideCheckboxes(); - _loadPkgsFromCookie(); - for (var pkg in _pkgs) { - this.togglePackage(pkg, _pkgs[pkg]); - } - } - - /** - * Hide all the checkboxes which are only applicable to the non-JS version. - */ - this.hideCheckboxes = function hideCheckboxes() { - var inputs = document.getElementsByTagName("input"); - for (var i = 0, len = inputs.length; i < len; i++) { - if (inputs.item(i).className == "sweety-check") { - inputs.item(i).style.display = "none"; - } - } - delete inputs; - } - - /** - * Load the available test case list in the UI. - */ - this.loadTestList = function loadTestList() { - var caseBox = _getListContainer(); - - //Show or hide any tests - for (var testCase in sweetyTestCases) { - var pkgName = _pkgFor(testCase); - _pkgTests[pkgName][testCase] = sweetyTestCases[testCase]; - - this.paintTestCaseIdle(testCase); - - var pkg = _pkgFor(testCase); - this.paintPkgIdle(pkg); - - var testDiv = _getElementById(testCase); - - //Make it look idle - testDiv.className = "sweety-test sweety-idle"; - - if (sweetyTestCases[testCase]) { - if (typeof _pkgs[pkg] == "undefined") { - testDiv.style.display = "block"; - } else if (_pkgs[pkg]) { - testDiv.style.display = "block"; - } - } else { - testDiv.style.display = "none"; - } - } - - //Show or hide any packages - for (var pkgName in _pkgTests) { - var display = false; - var len = 0; - for (var testCase in _pkgTests[pkgName]) { - if (_pkgTests[pkgName][testCase]) { - display = true; - //break; - len++; - } - } - this.showPkgCount(pkgName, len); - this.showHidePkg(pkgName, display); - } - } - - /** - * Shows or hides the headers for the given package. - * @param {String} pkg - * @param {Boolean} show - */ - this.showHidePkg = function showHidePkg(pkg, show) { - var pkgDiv = _getElementById("sweety-package-" + pkg); - if (show) { - pkgDiv.style.display = "block"; - } else { - pkgDiv.style.display = "none"; - } - } - - this.showPkgCount = function showPkgCount(pkg, n) { - var countBox = _getElementById("sweety-pkg-count-" + pkg); - _setContent(countBox, "(" + n + ")"); - } - - /** - * Reset all the aggregate results in the UI. - */ - this.resetTotals = function resetTotals() { - _this.paintNumCases(0); - _this.paintNumRun(0); - _this.paintNumPasses(0); - _this.paintNumFails(0); - _this.paintNumExceptions(0); - - _this.paintAllIdle(); - } - - /** - * Paint or unpaint the networking icon to indicate communication with the server. - * @param {Boolean} on - */ - this.paintNetworking = function paintNetworking(on) { - if (on) { - _getCommIcon().style.display = "block"; - } else { - _getCommIcon().style.display = "none"; - } - } - - /** - * Flush the contents of the assertion message area. - */ - this.resetMessageDiv = function resetMessageDiv() { - _getMessages().innerHTML = ""; - _getElementById("sweety-smoke-images").innerHTML = ""; - } - - /** - * Marks a given package as running (yellow) in the UI. - * @param {String} pkg - */ - this.paintPkgRunning = function paintPkgRunning(pkg) { - _getElementById("sweety-package-" + pkg).className = "sweety-package-header sweety-running"; - } - - /** - * Marks a given package as idle (grey) in the UI. - * @param {String} pkg - */ - this.paintPkgIdle = function paintPkgIdle(pkg) { - _getElementById("sweety-package-" + pkg).className = "sweety-package-header sweety-pkg-idle"; - } - - /** - * Marks a given package as passed (green) in the UI. - * @param {String} pkg - */ - this.paintPkgPassed = function paintPkgPassed(pkg) { - _getElementById("sweety-package-" + pkg).className = "sweety-package-header sweety-pass"; - } - - /** - * Marks a given package as failed (red) in the UI. - * @param {String} pkg - */ - this.paintPkgFailed = function paintPkgFailed(pkg) { - _getElementById("sweety-package-" + pkg).className = "sweety-package-header sweety-fail"; - } - - /** - * Marks a given test case as running (yellow) in the UI. - * @param {String} testCase - */ - this.paintTestCaseRunning = function paintTestCaseRunning(testCase) { - _getElementById(testCase).className = "sweety-test sweety-running"; - } - - /** - * Marks a given test case as idle (grey) in the UI. - * @param {String} testCase - */ - this.paintTestCaseIdle = function paintTestCaseIdle(testCase) { - _getElementById(testCase).className = "sweety-test sweety-idle"; - } - - /** - * Marks a given test case as failed (red) in the UI. - * @param {String} testCase - */ - this.paintTestCaseFailed = function paintTestCaseFailed(testCase) { - _getElementById(testCase).className = "sweety-test sweety-fail"; - } - - /** - * Marks a given test case as passed (green) in the UI. - * @param {String} testCase - */ - this.paintTestCasePassed = function paintTestCasePassed(testCase) { - _getElementById(testCase).className = "sweety-test sweety-pass"; - } - - /** - * Paints a skipped testcase message to the message area. - * @param {String} message - * @param {String} path - */ - this.paintSkip = function paintSkip(message, path) { - var skipDiv = document.createElement("div"); - skipDiv.className = "sweety-message"; - - var skipLabel = _createSkipLabel("Skip"); - skipDiv.appendChild(skipLabel); - - var messageSpan = document.createElement("strong"); - _setContent(messageSpan, ": " + message); - skipDiv.appendChild(messageSpan); - - var pathDiv = _createPathDiv(path); - skipDiv.appendChild(pathDiv); - - _getMessages().appendChild(skipDiv); - } - - /** - * Paints an unexpected exception notice to the message area. - * @param {String} message - * @param {String} path - */ - this.paintException = function paintException(message, path) { - var exceptionDiv = document.createElement("div"); - exceptionDiv.className = "sweety-message"; - - var exceptionLabel = _createFailLabel("Exception"); - exceptionDiv.appendChild(exceptionLabel); - - var messageSpan = document.createElement("strong"); - _setContent(messageSpan, ": " + message); - exceptionDiv.appendChild(messageSpan); - - var pathDiv = _createPathDiv(path); - exceptionDiv.appendChild(pathDiv); - - _getMessages().appendChild(exceptionDiv); - } - - /** - * Paints a failed assertion message to the message area. - * @param {String} message - * @param {String} path - */ - this.paintFail = function paintFail(message, path) { - var failDiv = document.createElement("div"); - failDiv.className = "sweety-message"; - - var failLabel = _createFailLabel("Fail"); - failDiv.appendChild(failLabel); - - var messageSpan = document.createElement("span"); - _setContent(messageSpan, ": " + message); - failDiv.appendChild(messageSpan); - - var pathDiv = _createPathDiv(path); - failDiv.appendChild(pathDiv); - - _getMessages().appendChild(failDiv); - } - - /** - * Paints dump() output to the message area. - * @param {String} output - * @param {String} path - */ - this.paintOutput = function paintOutput(output, path) { - var refs; - if (refs = /^\{image @ (.*?)\}$/.exec(output)) { - this.paintSmokeImage(refs[1]); - } else { - var outputPane = document.createElement("pre"); - outputPane.className = "sweety-raw-output"; - _setContent(outputPane, output); - - _getMessages().appendChild(outputPane); - } - } - - this.paintSmokeImage = function paintSmokeImage(imageSrc) { - var imagePane = _getElementById("sweety-smoke-images"); - var smokeImg = document.createElement("img"); - smokeImg.title = 'Smoke test image'; - smokeImg.src = imageSrc; - smokeImg.style.cursor = 'pointer'; - smokeImg.onclick = function() { window.open(imageSrc); }; - imagePane.appendChild(smokeImg); - } - - /** - * Paints an internal message to the message area. - * @param {String} message - * @param {String} path - */ - this.paintMessage = function paintMessage(message) { - var messageDiv = document.createElement("div"); - messageDiv.className = "sweety-message sweety-running"; - _setContent(messageDiv, message); - - _getMessages().appendChild(messageDiv); - } - - /** - * Paints the current number of test cases to the summary bar. - * @param {Number} num - */ - this.paintNumCases = function paintNumCases(num) { - _setContent(_getCases(), num); - } - - /** - * Paints the current number of finished test cases to the summary bar. - * @param {Number} num - */ - this.paintNumRun = function paintNumRun(num) { - _setContent(_getComplete(), num); - } - - /** - * Paints the current number of passing assertions to the summary bar. - * @param {Number} num - */ - this.paintNumPasses = function paintNumPasses(num) { - _setContent(_getPasses(), num); - } - - /** - * Paints the current number of failing assertions to the summary bar. - * @param {Number} num - */ - this.paintNumFails = function paintNumFails(num) { - _setContent(_getFails(), num); - } - - /** - * Paints the current number of exceptions to the summary bar. - * @param {Number} num - */ - this.paintNumExceptions = function paintNumExceptions(num) { - _setContent(_getExceptions(), num); - } - - /** - * Paints the summary bar (green) as passed. - */ - this.paintConclusionPassed = function paintConclusionPassed() { - _getResultsBar().className = "sweety-pass"; - } - - /** - * Paints the summary bar (red) as failed. - */ - this.paintConclusionFailed = function paintConclusionFailed() { - _getResultsBar().className = "sweety-fail"; - } - - /** - * Paints the summary bar (yellow) as running. - */ - this.paintAllRunning = function paintAllRunning() { - _getResultsBar().className = "sweety-running"; - } - - /** - * Paints the summary bar (grey) as idle. - */ - this.paintAllIdle = function paintAllIdle() { - _getResultsBar().className = "sweety-idle"; - } - - /** - * Puts the filter box in searching L&F. - */ - this.paintSearching = function paintSearching() { - _getFilter().className = "sweety-text sweety-waiting"; - } - - /** - * Returns the filter box the idle L&F. - */ - this.paintSearchComplete = function paintSearchComplete() { - _getFilter().className = "sweety-text"; - } - - /** - * Apply data to a page element. - * @param {Element} el - * @param {String} content - */ - var _setContent = function _setContent(el, content) { - if (typeof el.textContent != "undefined") { - el.textContent = content; - } else { - el.innerHTML = content; - } - } - - /** - * Create a label used at the start of a message to indicate a skipped test case. - * @param {String} label - * @returns HTMLSpanElement - */ - var _createSkipLabel = function _createSkipLabel(label) { - var skipLabel = document.createElement("span"); - skipLabel.className = "sweety-skip-text"; - _setContent(skipLabel, label); - return skipLabel; - } - - /** - * Create a label used at the start of a message to indicate failure. - * @param {String} label - * @returns HTMLSpanElement - */ - var _createFailLabel = function _createFailLabel(label) { - var failLabel = document.createElement("span"); - failLabel.className = "sweety-fail-text"; - _setContent(failLabel, label); - return failLabel; - } - - /** - * Creates the text which shows the complete pathway to a test method. - * The path includes all groups, the test case and the test method. - * @param {String} path - * @returns HTMLDivElement - */ - var _createPathDiv = function _createPathDiv(path) { - var pathDiv = document.createElement("div"); - pathDiv.className = "sweety-test-path"; - _setContent(pathDiv, "in " + path); - return pathDiv; - } - - var _paintFilterDisabled = function _paintFilterDisabled(disabled) { - if (disabled) { - _getFilter().disabled = true; - _getFilter().className = "sweety-text sweety-disabled"; - } else { - _getFilter().disabled = false; - _getFilter().className = "sweety-text"; - } - } - - /** - * A caching wrapper around document.getElementById(). - * @param {String} id - * @returns Element - */ - var _getElementById = function _getElementById(elId) { - if (!_cached[elId]) { - _cached[elId] = document.getElementById(elId); - } - return _cached[elId]; - } - - /** - * Get the icon which shows network activity. - * @returns Element - */ - var _getCommIcon = function _getCommIcon() { - return _getElementById("sweety-communication"); - } - - /** - * Get the container which holds the list of test cases. - * @returns Element - */ - var _getListContainer = function _getListContainer() { - return _getElementById("sweety-testlist-container"); - } - - /** - * Get the container where all assertion messages go. - * @returns Element - */ - var _getMessages = function _getMessages() { - return _getElementById("sweety-messages"); - } - - /** - * Get the element for number of test cases. - * @returns Element - */ - var _getCases = function _getCases() { - return _getElementById("sweety-num-cases"); - } - - /** - * Get the container for number of test cases finished. - * @returns Element - */ - var _getComplete = function _getComplete() { - return _getElementById("sweety-num-run"); - } - - /** - * Get the container for number of exceptions. - * @returns Element - */ - var _getExceptions = function _getExceptions() { - return _getElementById("sweety-num-exceptions"); - } - - /** - * Get the container for number of fails. - * @returns Element - */ - var _getFails = function _getFails() { - return _getElementById("sweety-num-fails"); - } - - /** - * Get the container for number of passes. - * @returns Element - */ - var _getPasses = function _getPasses() { - return _getElementById("sweety-num-passes"); - } - - - /** - * Get the bar showing aggregate results. - * @returns Element - */ - var _getResultsBar = function _getResutsBar() { - return _getElementById("sweety-results"); - } - - /** - * Get the filter input box. - * @returns Element - */ - var _getFilter = function _getFilter() { - return _getElementById("sweety-filter"); - } - - /** - * Get the button which operates the filter. - * @returns Element - */ - var _getRunButton = function _getRunButton() { - return _getElementById("sweety-run-button"); - } - - var _loadPkgsFromCookie = function _loadPkgsFromCookie() { - for (var testCase in sweetyTestCases) { - var pkg = _pkgFor(testCase); - _pkgs[pkg] = false; - } - var cookieBits = document.cookie.split(/\s*;\s*/g); - for (var i in cookieBits) { - if (cookieBits[i].substring(0, 9) != "sweetyPkg") - { - continue; - } - var nvp = cookieBits[i].substring(9).split('='); - _pkgs[unescape(nvp[0])] = (nvp[1] == "0") ? false : true; - //alert(unescape(nvp[0]) + " => " + _pkgs[unescape(nvp[0])]); - } - } - - var _pkgFor = function _pkgFor(testName) { - return testName.replace(/_?[^_]+$/, ""); - } - -} - -//Create an instance of the UI Manager for usage -var sweetyUI = new SweetyUIManager(); - - -/** - * A filter to hide/show test cases in the list. - * @author Chris Corbyn - * @consructor - */ -function SweetyFilter() { - - var _this = this; - - /** Asynchronous page timer (so nothing happens whilst typing) */ - var _timer; - - /** The sweety-filter element, lazy loaded */ - var _filter = null; - - /** - * Update the display once the search is complete. - */ - this.repaintUI = function repaintUI() { - sweetyUI.initialize(); - sweetyUI.paintSearchComplete(); - } - - /** - * Search for matching test cases. - */ - this.search = function search() { - sweetyUI.paintSearching(); - - var query = _getFilterInput().value.toLowerCase(); - var queryBits = query.split(/[^\!a-zA-Z0-9_]+/g); - - //Cancel searching if still typing - try { - window.clearTimeout(_timer); - } catch (e) { } - - for (var testCase in sweetyTestCases) { - for (var i in queryBits) { - var testFor = queryBits[i]; - var isNegated = ("!" == testFor.charAt(0)); - if (isNegated) { - testFor = testFor.substring(1); - } - - if (!isNegated && 0 > testCase.toLowerCase().indexOf(testFor)) { - sweetyTestCases[testCase] = false; - break; - } else if (isNegated && 0 < testCase.toLowerCase().indexOf(testFor)) { - sweetyTestCases[testCase] = false; - break; - } else { - sweetyTestCases[testCase] = true; - } - } - } - - //Only apply the search in 500ms, since user may be typing - _timer = window.setTimeout(_this.repaintUI, 500); - } - - /** - * Get a lazy loaded reference to the input element. - * @return HTMLInputElement - */ - var _getFilterInput = function _getFilterInput() { - if (!_filter) { - _filter = document.getElementById("sweety-filter"); - } - return _filter; - } - -} - -//Create a new instance of the filter -var sweetyFilter = new SweetyFilter(); - -/** - * The reporter which gathers aggregate results and displays a summary. - * @author Chris Corbyn - * @constructor - * @param {Boolean} reportPkgs if package status should be reported - */ -function SweetyTemplateAggregateReporter(testCaseList, reportPkgs) { - - var _this = this; - - /** True if this reporter instance is running now */ - var _started = false; - - /** Aggregate totals */ - var _aggregates = { cases : 0, run: 0, passes : 0, fails : 0, exceptions : 0 }; - - /** Aggregates per-package */ - var _pkgs = { }; - - /** Currently running package */ - var _currentPkg; - - /** - * Creates a reporter for the given testCase. - * @param {String} testCase - * @returns SweetyReporter - */ - this.getReporterFor = function getReporterFor(testCase) { - _aggregates.cases++; - - if (reportPkgs) { - var pkg = _getPkgName(testCase); - sweetyUI.paintPkgRunning(pkg); - - _pkgs[pkg].cases++; - - if (_currentPkg && _currentPkg != pkg) { - _updatePkgStatus(_currentPkg); - } - - _currentPkg = pkg; - } - - sweetyUI.paintNumCases(_aggregates.cases); - - var reporter = new SweetyTemplateCaseReporter(testCase, _this); - return reporter; - } - - /** - * Updates the UI with the new aggregate totals. - */ - this.notifyEnded = function notifyEnded(testCase) { - _aggregates.run++; - - if (reportPkgs) { - var pkg = _getPkgName(testCase); - _pkgs[pkg].run++; - } - - //Update the UI with new totals - sweetyUI.paintNumRun(_aggregates.run); - sweetyUI.paintNumPasses(_aggregates.passes); - sweetyUI.paintNumFails(_aggregates.fails); - sweetyUI.paintNumExceptions(_aggregates.exceptions); - } - - /** - * Returns true if this reporter instance is running. - * @returns Boolean - */ - this.isStarted = function isStarted() { - return _started; - } - - /** - * Start reporting. - */ - this.start = function start() { - _started = true; - - if (reportPkgs) - { - for (var i = 0, len = testCaseList.length; i < len; i++) { - var testCase = testCaseList[i]; - var pkg = _getPkgName(testCase); - if (typeof _pkgs[pkg] == "undefined") { - _pkgs[pkg] = { cases : 0, run : 0, passes : 0, fails : 0, exceptions : 0 }; - } - } - } - - sweetyUI.allowInteractivity(false); - sweetyUI.paintNetworking(true); - sweetyUI.paintAllRunning(); - } - - /** - * Report a skipped test case. - * @param {String} message - * @param {String} path - */ - this.reportSkip = function reportSkip(message, path) { - sweetyUI.paintSkip(message, path); - } - - /** - * Report a passing assertion. - * @param {String} message - * @param {String} path - */ - this.reportPass = function reportPass(message, path) { - _aggregates.passes++; - - if (reportPkgs) { - _pkgs[_currentPkg].passes++; - } - } - - /** - * Report a failing assertion. - * @param {String} message - * @param {String} path - */ - this.reportFail = function reportFail(message, path) { - _aggregates.fails++; - - if (reportPkgs) { - _pkgs[_currentPkg].fails++; - } - - sweetyUI.paintFail(message, path); - } - - /** - * Report an unexpected exception. - * @param {String} message - * @param {String} path - */ - this.reportException = function reportException(message, path) { - _aggregates.exceptions++; - - if (reportPkgs) { - _pkgs[_currentPkg].exceptions++; - } - - sweetyUI.paintException(message, path); - } - - /** - * Handle test case output from something like a dump(). - * @param {String} output - * @param {String} path - */ - this.reportOutput = function reportOutput(output, path) { - sweetyUI.paintOutput(output, path); - } - - /** - * End reporting. - * This method is used to come to a conclusion about the test results in the UI. - */ - this.finish = function finish() { - _started = false; - - if (reportPkgs) { - _updatePkgStatus(_currentPkg); - } - - sweetyUI.allowInteractivity(true); - - sweetyUI.paintNetworking(false); - - if ((!_aggregates.fails && !_aggregates.exceptions) - && (_aggregates.cases == _aggregates.run)) { - sweetyUI.paintConclusionPassed(); - } else { - sweetyUI.paintConclusionFailed(); - } - - var incompleteCount = _aggregates.cases - _aggregates.run; - - //Check if all tests actually got fully parsed (i.e. finished) - if (0 < incompleteCount) { - sweetyUI.paintMessage( - incompleteCount + " test case(s) did not complete." + - " This may be because invalid XML was output during the test run" + - " and/or because an error occured." + - " Incomplete test cases are shown in yellow. Click the HTML link " + - "next to the test for more detail."); - } - } - - var _getPkgName = function _getPkgName(testCase) { - return testCase.replace(/_?[^_]+$/, ""); - } - - var _updatePkgStatus = function _updatePkgStatus(pkg) { - if ((!_pkgs[pkg].fails && !_pkgs[pkg].exceptions) - && (_pkgs[pkg].cases == _pkgs[pkg].run)) { - sweetyUI.paintPkgPassed(pkg); - } else if (_pkgs[pkg].cases == _pkgs[pkg].run) { - sweetyUI.paintPkgFailed(pkg); - } - } - -} -SweetyTemplateAggregateReporter.prototype = new SweetyReporter(); - -/** - * The reporter class per-test case. - * @author Chris Corbyn - * @consructor - */ -function SweetyTemplateCaseReporter(testCase, reporter) { - - var _this = this; - - /** Aggregate totals */ - var _aggregates = { passes : 0, fails : 0, exceptions : 0 }; - - /** The DIV element showing this test case */ - var _testCaseDiv = document.getElementById(testCase); - - /** True only if this reporter is running */ - var _started = false; - - /** - * Stubbed only to return itself. - * @returns SweetyReporter - */ - this.getReporterFor = function getReporterFor(testCase) { - return _this; - } - - /** - * Returns true when the reporter is started. - * @returns Boolean - */ - this.isStarted = function isStarted() { - return _started; - } - - /** - * Start reporting. - */ - this.start = function start() { - _started = true; - sweetyUI.paintTestCaseRunning(testCase); - } - - /** - * Report a skipped test case. - * @param {String} message - * @param {String} path - */ - this.reportSkip = function reportSkip(message, path) { - reporter.reportSkip(message, path); - } - - /** - * Report a passing assertion. - * @param {String} message - * @param {String} path - */ - this.reportPass = function reportPass(message, path) { - _aggregates.passes++; - reporter.reportPass(message, path); - } - - /** - * Report a failing assertion. - * @param {String} message - * @param {String} path - */ - this.reportFail = function reportFail(message, path) { - _aggregates.fails++; - reporter.reportFail(message, path); - } - - /** - * Report an unexpected exception. - * @param {String} message - * @param {String} path - */ - this.reportException = function reportException(message, path) { - _aggregates.exceptions++; - reporter.reportException(message, path); - } - - /** - * Handle output from a test case in the form of something like a dump(). - * @param {String} output - * @param {string} path - */ - this.reportOutput = function reportOutput(output, path) { - reporter.reportOutput(output, path); - } - - /** - * End reporting. - */ - this.finish = function finish() { - _started = false; - - if (!_aggregates.fails && !_aggregates.exceptions) { - sweetyUI.paintTestCasePassed(testCase); - } else { - sweetyUI.paintTestCaseFailed(testCase); - } - - reporter.notifyEnded(testCase); - } - -} -SweetyTemplateCaseReporter.prototype = new SweetyReporter(); - -/** - * Wraps the invokation of SweetyTestRunner. - * @author Chris Corbyn - * @constructor - */ -function SweetyTestWrapper() { - - var _this = this; - - /** - * Run a single test case. - * @param {String} testClass - */ - this.runTestCase = function runTestCase(testClass) { - var testCaseList = new Array(); - testCaseList.push(testClass); - - var reporter = new SweetyTemplateAggregateReporter(testCaseList); - - var runner = new SweetyTestRunner(); - runner.runTests(testCaseList, reporter); - } - - /** - * Run all selected test cases. - */ - this.runAll = function runAll(pkg) { - var pkgRegex; - if (pkg) { - pkgRegex = new RegExp("^" + pkg + "_[^_]+$"); - } - - var testCaseList = new Array(); - - for (var testCase in sweetyTestCases) { - if (!sweetyTestCases[testCase] || (pkg && !testCase.match(pkgRegex))) { - continue; - } - testCaseList.push(testCase); - } - - var reporter = new SweetyTemplateAggregateReporter(testCaseList, true); - - var runner = new SweetyTestRunner(); - runner.runTests(testCaseList, reporter); - } - -} - -//Create an instance of the test runner for usage -var sweetyRunner = new SweetyTestWrapper(); - -if (typeof document.onreadystatechange != "undefined") { //IE 6/7 - document.onreadystatechange = function() { - if (document.readyState == "complete") { - sweetyUI.restore(); sweetyUI.initialize(); - } - }; -} else { //Fallback - window.onload = function() { - sweetyUI.restore(); sweetyUI.initialize(); - }; - - try { //FF - document.addEventListener("DOMContentLoaded", window.onload, false); - } catch (e) { - } -} diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/suite-ui-noajax.tpl.php b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/suite-ui-noajax.tpl.php deleted file mode 100644 index b9d3ef14..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/suite-ui-noajax.tpl.php +++ /dev/null @@ -1,155 +0,0 @@ - - - - <?php echo $suiteName; ?> - No AJAX - - - -
    - -
    - -
    - -
    - -
    - - -
    - - -
    - - - - - -
    - Not available - Tests - - - -
    - - -
    - -
    - - As XML - As HTML - Run - - - checked="checked" - /> - - - - - - - -
    - -
    - - - -
    - -
    - -
    - -
    - -
    - -
    - -

    - No AJAX

    - -
    - / - test cases complete: - passes, - fails and - exceptions. -
    - -
    - -
    - Skip: - -
    - in -
    -
    - -
    - Fail: -
    - in -
    -
    - -
    - Exception: - -
    - in -
    -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - -
    - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/suite-ui.tpl.php b/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/suite-ui.tpl.php deleted file mode 100644 index 90aa84c6..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/templates/sweety/suite-ui.tpl.php +++ /dev/null @@ -1,132 +0,0 @@ - - - - - <?php echo $suiteName; ?> - - - - - - - - -
    - -
    - -
    - -
    - -
    - - -
    - - -
    - - - - - -
    - - Toggle Display - Tests - - - -
    - - -
    - -
    - - As XML - As HTML - Run - - - checked="checked" - /> - - - - - - - -
    - -
    - - - -
    - -
    - -
    - -
    - -
    - -
    - -
    - Communicating -
    - -

    - -
    - 0/0 - test cases complete: - 0 passes, - 0 fails and - 0 exceptions. -
    - -
    -
    - -
    -
    - -
    - -
    - -
    - -
    - - diff --git a/vendor/swiftmailer/swiftmailer/test-suite/xpath-legacy.js b/vendor/swiftmailer/swiftmailer/test-suite/xpath-legacy.js deleted file mode 100644 index 38c36271..00000000 --- a/vendor/swiftmailer/swiftmailer/test-suite/xpath-legacy.js +++ /dev/null @@ -1,2764 +0,0 @@ -/* JavaScript-XPath 0.1.5 - * (c) 2007 Cybozu Labs, Inc. - * - * JavaScript-XPath is freely distributable under the terms of an MIT-style license. - * For details, see the JavaScript-XPath web site: http://coderepos.org/share/wiki/JavaScript-XPath - * -/*--------------------------------------------------------------------------*/ - -if (!document.implementation - || !document.implementation.hasFeature - || !document.implementation.hasFeature("XPath", null)) (function() { - -var undefined = void(0); - - -var defaultConfig = { - targetFrame: undefined -}; - -var config; - -if (window.jsxpath) { - config = window.jsxpath; -} -else { - var scriptElms = document.getElementsByTagName('script'); - var scriptElm = scriptElms[scriptElms.length - 1]; - var scriptSrc = scriptElm.src; - config = {}; - var scriptSrcMatchResult = scriptSrc.match(/\?(.*)$/); - if (scriptSrcMatchResult) { - var configStrings = scriptSrcMatchResult[1].split('&'); - for (var i = 0, l = configStrings.length; i < l; i ++) { - var configString = configStrings[i]; - var configStringSplited = configString.split('='); - config[configStringSplited[0]] = configStringSplited[1] || true; - } - } -} - -for (var n in defaultConfig) { - if (!(n in config)) config[n] = defaultConfig[n] -} - - -var BinaryExpr; -var FilterExpr; -var FunctionCall; -var Literal; -var NameTest; -var NodeSet; -var NodeType; -var NodeUtil; -var Number; -var PathExpr; -var Step; -var UnaryExpr; -var UnionExpr; -var VariableReference; - -/* - * object: user agent identifier - */ -var uai = new function() { - - var ua = navigator.userAgent; - - if (RegExp == undefined) { - if (ua.indexOf("Opera") >= 0) { - this.opera = true; - } else if (ua.indexOf("Netscape") >= 0) { - this.netscape = true; - } else if (ua.indexOf("Mozilla/") == 0) { - this.mozilla = true; - } else { - this.unknown = slide - } - - if (ua.indexOf("Gecko/") >= 0) { - this.gecko = true; - } - - if (ua.indexOf("Win") >= 0) { - this.windows = true; - } else if (ua.indexOf("Mac") >= 0) { - this.mac = true; - } else if (ua.indexOf("Linux") >= 0) { - this.linux = true; - } else if (ua.indexOf("BSD") >= 0) { - this.bsd = true; - } else if (ua.indexOf("SunOS") >= 0) { - this.sunos = true; - } - } - else { - - /* for Trident/Tasman */ - /*@cc_on - @if (@_jscript) - function jscriptVersion() { - switch (@_jscript_version) { - case 3.0: return "4.0"; - case 5.0: return "5.0"; - case 5.1: return "5.01"; - case 5.5: return "5.5"; - case 5.6: - if ("XMLHttpRequest" in window) return "7.0"; - return "6.0"; - case 5.7: - return "7.0"; - default: return true; - } - } - if (@_win16 || @_win32 || @_win64) { - this.windows = true; - this.trident = jscriptVersion(); - } else if (@_mac || navigator.platform.indexOf("Mac") >= 0) { - // '@_mac' may be 'NaN' even if the platform is Mac, - // so we check 'navigator.platform', too. - this.mac = true; - this.tasman = jscriptVersion(); - } - if (match = ua.match("MSIE ?(\\d+\\.\\d+)b?;")) { - this.ie = match[1]; - this['ie' + match[1].charAt(0)] = true; - } - @else @*/ - - /* for AppleWebKit */ - if (match = ua.match("AppleWebKit/(\\d+(\\.\\d+)*)")) { - this.applewebkit = match[1]; - this['applewebkit' + match[1].charAt(0)] = true; - } - - /* for Gecko */ - else if (typeof(Components) == "object") { - if (match = ua.match("Gecko/(\\d{8})")) { - this.gecko = match[1]; - } else if (navigator.product == "Gecko" - && (match = navigator.productSub.match("^(\\d{8})$"))) { - this.gecko = match[1]; - } - } - - /*@end @*/ - - if (typeof(opera) == "object" && typeof(opera.version) == "function") { - this.opera = opera.version(); - this['opera' + this.opera[0] + this.opera[2]] = true; - - } else if (typeof(opera) == "object" - && (match = ua.match("Opera[/ ](\\d+\\.\\d+)"))) { - this.opera = match[1]; - } else if (this.ie) { - } else if (match = ua.match("Safari/(\\d+(\\.\\d+)*)")) { - this.safari = match[1]; - } else if (match = ua.match("Konqueror/(\\d+(\\.\\d+)*)")) { - this.konqueror = match[1]; - } else if (ua.indexOf("(compatible;") < 0 - && (match = ua.match("^Mozilla/(\\d+\\.\\d+)"))) { - this.mozilla = match[1]; - if (match = ua.match("\\([^(]*rv:(\\d+(\\.\\d+)*).*?\\)")) - this.mozillarv = match[1]; - if (match = ua.match("Firefox/(\\d+(\\.\\d+)*)")) { - this.firefox = match[1]; - } else if (match = ua.match("Netscape\\d?/(\\d+(\\.\\d+)*)")) { - this.netscape = match[1]; - } - } else { - this.unknown = true; - } - - if (ua.indexOf("Win 9x 4.90") >= 0) { - this.windows = "ME"; - } else if (match = ua.match("Win(dows)? ?(NT ?(\\d+\\.\\d+)?|\\d+|XP|ME|Vista)")) { - this.windows = match[2]; - if (match[3]) { - this.winnt = match[3]; - } else switch (match[2]) { - case "2000": this.winnt = "5.0"; break; - case "XP": this.winnt = "5.1"; break; - case "Vista": this.winnt = "6.0"; break; - } - } else if (ua.indexOf("Mac") >= 0) { - this.mac = true; - } else if (ua.indexOf("Linux") >= 0) { - this.linux = true; - } else if (match = ua.match("\\w*BSD")) { - this.bsd = match[0]; - } else if (ua.indexOf("SunOS") >= 0) { - this.sunos = true; - } - } -}; - - -/** - * pseudo class: Lexer - */ -var Lexer = function(source) { - var proto = Lexer.prototype; - var tokens = source.match(proto.regs.token); - for (var i = 0, l = tokens.length; i < l; i ++) { - if (proto.regs.strip.test(tokens[i])) { - tokens.splice(i, 1); - } - } - for (var n in proto) tokens[n] = proto[n]; - tokens.index = 0; - return tokens; -}; - -Lexer.prototype.regs = { - token: /\$?(?:(?![0-9-])[\w-]+:)?(?![0-9-])[\w-]+|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|(?![0-9-])[\w-]+:\*|\s+|./g, - strip: /^\s/ -}; - -Lexer.prototype.peek = function(i) { - return this[this.index + (i||0)]; -}; -Lexer.prototype.next = function() { - return this[this.index++]; -}; -Lexer.prototype.back = function() { - this.index--; -}; -Lexer.prototype.empty = function() { - return this.length <= this.index; -}; - - -/** - * class: Ctx - */ -var Ctx = function(node, position, last) { - this.node = node; - this.position = position || 1; - this.last = last || 1; -}; - - -/** - * abstract class: BaseExpr - */ -var BaseExpr = function() {}; - -BaseExpr.prototype.number = function(ctx) { - var exrs = this.evaluate(ctx); - if (exrs.isNodeSet) return exrs.number(); - return + exrs; -}; - -BaseExpr.prototype.string = function(ctx) { - var exrs = this.evaluate(ctx); - if (exrs.isNodeSet) return exrs.string(); - return '' + exrs; -}; - -BaseExpr.prototype.bool = function(ctx) { - var exrs = this.evaluate(ctx); - if (exrs.isNodeSet) return exrs.bool(); - return !! exrs; -}; - - -/** - * abstract class: BaseExprHasPredicates - */ -var BaseExprHasPredicates = function() {}; - -BaseExprHasPredicates.parsePredicates = function(lexer, expr) { - while (lexer.peek() == '[') { - lexer.next(); - if (lexer.empty()) { - throw Error('missing predicate expr'); - } - var predicate = BinaryExpr.parse(lexer); - expr.predicate(predicate); - if (lexer.empty()) { - throw Error('unclosed predicate expr'); - } - if (lexer.next() != ']') { - lexer.back(); - throw Error('bad token: ' + lexer.next()); - } - } -}; - -BaseExprHasPredicates.prototyps = new BaseExpr(); - -BaseExprHasPredicates.prototype.evaluatePredicates = function(nodeset, start) { - var predicates, predicate, nodes, node, nodeset, position, reverse; - - reverse = this.reverse; - predicates = this.predicates; - - nodeset.sort(); - - for (var i = start || 0, l0 = predicates.length; i < l0; i ++) { - predicate = predicates[i]; - - var deleteIndexes = []; - var nodes = nodeset.list(); - - for (var j = 0, l1 = nodes.length; j < l1; j ++) { - - position = reverse ? (l1 - j) : (j + 1); - exrs = predicate.evaluate(new Ctx(nodes[j], position, l1)); - - switch (typeof exrs) { - case 'number': - exrs = (position == exrs); - break; - case 'string': - exrs = !!exrs; - break; - case 'object': - exrs = exrs.bool(); - break; - } - - if (!exrs) { - deleteIndexes.push(j); - } - } - - for (var j = deleteIndexes.length - 1, l1 = 0; j >= l1; j --) { - nodeset.del(deleteIndexes[j]); - } - - } - - return nodeset; -}; - - -/** - * class: BinaryExpr - */ -if (!window.BinaryExpr && window.defaultConfig) - window.BinaryExpr = null; - -BinaryExpr = function(op, left, right, datatype) { - this.op = op; - this.left = left; - this.right = right; - - this.datatype = BinaryExpr.ops[op][2]; - - this.needContextPosition = left.needContextPosition || right.needContextPosition; - this.needContextNode = left.needContextNode || right.needContextNode; - - // Optimize [@id="foo"] and [@name="bar"] - if (this.op == '=') { - if (!right.needContextNode && !right.needContextPosition && - right.datatype != 'nodeset' && right.datatype != 'void' && left.quickAttr) { - this.quickAttr = true; - this.attrName = left.attrName; - this.attrValueExpr = right; - } - else if (!left.needContextNode && !left.needContextPosition && - left.datatype != 'nodeset' && left.datatype != 'void' && right.quickAttr) { - this.quickAttr = true; - this.attrName = right.attrName; - this.attrValueExpr = left; - } - } -}; - -BinaryExpr.compare = function(op, comp, left, right, ctx) { - var type, lnodes, rnodes, nodes, nodeset, primitive; - - left = left.evaluate(ctx); - right = right.evaluate(ctx); - - if (left.isNodeSet && right.isNodeSet) { - lnodes = left.list(); - rnodes = right.list(); - for (var i = 0, l0 = lnodes.length; i < l0; i ++) - for (var j = 0, l1 = rnodes.length; j < l1; j ++) - if (comp(NodeUtil.to('string', lnodes[i]), NodeUtil.to('string', rnodes[j]))) - return true; - return false; - } - - if (left.isNodeSet || right.isNodeSet) { - if (left.isNodeSet) - nodeset = left, primitive = right; - else - nodeset = right, primitive = left; - - nodes = nodeset.list(); - type = typeof primitive; - for (var i = 0, l = nodes.length; i < l; i ++) { - if (comp(NodeUtil.to(type, nodes[i]), primitive)) - return true; - } - return false; - } - - if (op == '=' || op == '!=') { - if (typeof left == 'boolean' || typeof right == 'boolean') { - return comp(!!left, !!right); - } - if (typeof left == 'number' || typeof right == 'number') { - return comp(+left, +right); - } - return comp(left, right); - } - - return comp(+left, +right); -}; - - -BinaryExpr.ops = { - 'div': [6, function(left, right, ctx) { - return left.number(ctx) / right.number(ctx); - }, 'number'], - 'mod': [6, function(left, right, ctx) { - return left.number(ctx) % right.number(ctx); - }, 'number'], - '*': [6, function(left, right, ctx) { - return left.number(ctx) * right.number(ctx); - }, 'number'], - '+': [5, function(left, right, ctx) { - return left.number(ctx) + right.number(ctx); - }, 'number'], - '-': [5, function(left, right, ctx) { - return left.number(ctx) - right.number(ctx); - }, 'number'], - '<': [4, function(left, right, ctx) { - return BinaryExpr.compare('<', - function(a, b) { return a < b }, left, right, ctx); - }, 'boolean'], - '>': [4, function(left, right, ctx) { - return BinaryExpr.compare('>', - function(a, b) { return a > b }, left, right, ctx); - }, 'boolean'], - '<=': [4, function(left, right, ctx) { - return BinaryExpr.compare('<=', - function(a, b) { return a <= b }, left, right, ctx); - }, 'boolean'], - '>=': [4, function(left, right, ctx) { - return BinaryExpr.compare('>=', - function(a, b) { return a >= b }, left, right, ctx); - }, 'boolean'], - '=': [3, function(left, right, ctx) { - return BinaryExpr.compare('=', - function(a, b) { return a == b }, left, right, ctx); - }, 'boolean'], - '!=': [3, function(left, right, ctx) { - return BinaryExpr.compare('!=', - function(a, b) { return a != b }, left, right, ctx); - }, 'boolean'], - 'and': [2, function(left, right, ctx) { - return left.bool(ctx) && right.bool(ctx); - }, 'boolean'], - 'or': [1, function(left, right, ctx) { - return left.bool(ctx) || right.bool(ctx); - }, 'boolean'] -}; - - -BinaryExpr.parse = function(lexer) { - var op, precedence, info, expr, stack = [], index = lexer.index; - - while (true) { - - if (lexer.empty()) { - throw Error('missing right expression'); - } - expr = UnaryExpr.parse(lexer); - - op = lexer.next(); - if (!op) { - break; - } - - info = this.ops[op]; - precedence = info && info[0]; - if (!precedence) { - lexer.back(); - break; - } - - while (stack.length && precedence <= this.ops[stack[stack.length-1]][0]) { - expr = new BinaryExpr(stack.pop(), stack.pop(), expr); - } - - stack.push(expr, op); - } - - while (stack.length) { - expr = new BinaryExpr(stack.pop(), stack.pop(), expr); - } - - return expr; -}; - -BinaryExpr.prototype = new BaseExpr(); - -BinaryExpr.prototype.evaluate = function(ctx) { - return BinaryExpr.ops[this.op][1](this.left, this.right, ctx); -}; - -BinaryExpr.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'binary: ' + this.op + '\n'; - indent += ' '; - t += this.left.show(indent); - t += this.right.show(indent); - return t; -}; - - -/** - * class: UnaryExpr - */ -if (!window.UnaryExpr && window.defaultConfig) - window.UnaryExpr = null; - -UnaryExpr = function(op, expr) { - this.op = op; - this.expr = expr; - - this.needContextPosition = expr.needContextPosition; - this.needContextNode = expr.needContextNode; -}; - -UnaryExpr.ops = { '-': 1 }; - -UnaryExpr.parse = function(lexer) { - var token; - if (this.ops[lexer.peek()]) - return new UnaryExpr(lexer.next(), UnaryExpr.parse(lexer)); - else - return UnionExpr.parse(lexer); -}; - -UnaryExpr.prototype = new BaseExpr(); - -UnaryExpr.prototype.datatype = 'number'; - -UnaryExpr.prototype.evaluate = function(ctx) { - return - this.expr.number(ctx); -}; - -UnaryExpr.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'unary: ' + this.op + '\n'; - indent += ' '; - t += this.expr.show(indent); - return t; -}; - - -/** - * class: UnionExpr - */ -if (!window.UnionExpr && window.defaultConfig) - window.UnionExpr = null; - -UnionExpr = function() { - this.paths = []; -}; - -UnionExpr.ops = { '|': 1 }; - - -UnionExpr.parse = function(lexer) { - var union, expr; - - expr = PathExpr.parse(lexer); - if (!this.ops[lexer.peek()]) - return expr; - - union = new UnionExpr(); - union.path(expr); - - while (true) { - if (!this.ops[lexer.next()]) break; - if (lexer.empty()) { - throw Error('missing next union location path'); - } - union.path(PathExpr.parse(lexer)); - } - - - - lexer.back(); - return union; -}; - -UnionExpr.prototype = new BaseExpr(); - -UnionExpr.prototype.datatype = 'nodeset'; - -UnionExpr.prototype.evaluate = function(ctx) { - var paths = this.paths; - var nodeset = new NodeSet(); - for (var i = 0, l = paths.length; i < l; i ++) { - var exrs = paths[i].evaluate(ctx); - if (!exrs.isNodeSet) throw Error('PathExpr must be nodeset'); - nodeset.merge(exrs); - } - return nodeset; -}; - -UnionExpr.prototype.path = function(path) { - this.paths.push(path); - - if (path.needContextPosition) { - this.needContextPosition = true; - } - if (path.needContextNode) { - this.needContextNode = true; - } -} -UnionExpr.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'union:' + '\n'; - indent += ' '; - for (var i = 0; i < this.paths.length; i ++) { - t += this.paths[i].show(indent); - } - return t; -}; - - -/** - * class: PathExpr - */ -if (!window.PathExpr && window.defaultConfig) - window.PathExpr = null; - -PathExpr = function(filter) { - this.filter = filter; - this.steps = []; - - this.datatype = filter.datatype; - - this.needContextPosition = filter.needContextPosition; - this.needContextNode = filter.needContextNode; -}; - -PathExpr.ops = { '//': 1, '/': 1 }; - -PathExpr.parse = function(lexer) { - var op, expr, path, token; - - if (this.ops[lexer.peek()]) { - op = lexer.next(); - token = lexer.peek(); - - if (op == '/' && (lexer.empty() || - (token != '.' && token != '..' && token != '@' && token != '*' && - !token.match(/(?![0-9])[\w]/)))) { - return FilterExpr.root(); - } - - path = new PathExpr(FilterExpr.root()); // RootExpr - - if (lexer.empty()) { - throw Error('missing next location step'); - } - expr = Step.parse(lexer); - path.step(op, expr); - } - else { - expr = FilterExpr.parse(lexer); - if (!expr) { - expr = Step.parse(lexer); - path = new PathExpr(FilterExpr.context()); - path.step('/', expr); - } - else if (!this.ops[lexer.peek()]) - return expr; - else - path = new PathExpr(expr); - } - - while (true) { - if (!this.ops[lexer.peek()]) break; - op = lexer.next(); - if (lexer.empty()) { - throw Error('missing next location step'); - } - path.step(op, Step.parse(lexer)); - } - - return path; -}; - -PathExpr.prototype = new BaseExpr(); - -PathExpr.prototype.evaluate = function(ctx) { - var nodeset = this.filter.evaluate(ctx); - if (!nodeset.isNodeSet) throw Exception('Filter nodeset must be nodeset type'); - - var steps = this.steps; - - for (var i = 0, l0 = steps.length; i < l0 && nodeset.length; i ++) { - var step = steps[i][1]; - var reverse = step.reverse; - var iter = nodeset.iterator(reverse); - var prevNodeset = nodeset; - nodeset = null; - var node, next; - if (!step.needContextPosition && step.axis == 'following') { - for (node = iter(); next = iter(); node = next) { - - // Safari 2 node.contains problem - if (uai.applewebkit4) { - var contains = false; - var ancestor = next; - do { - if (ancestor == node) { - contains = true; - break; - } - } while (ancestor = ancestor.parentNode); - if (!contains) break; - } - else { - try { if (!node.contains(next)) break } - catch(e) { if (!(next.compareDocumentPosition(node) & 8)) break } - } - } - nodeset = step.evaluate(new Ctx(node)); - } - else if (!step.needContextPosition && step.axis == 'preceding') { - node = iter(); - nodeset = step.evaluate(new Ctx(node)); - } - else { - node = iter(); - var j = 0; - nodeset = step.evaluate(new Ctx(node), false, prevNodeset, j); - while (node = iter()) { - j ++; - nodeset.merge(step.evaluate(new Ctx(node), false, prevNodeset, j)); - } - } - } - - return nodeset; -}; - -PathExpr.prototype.step = function(op, step) { - step.op = op; - this.steps.push([op, step]); - - this.quickAttr = false; - - if (this.steps.length == 1) { - if (op == '/' && step.axis == 'attribute') { - var test = step.test; - if (!test.notOnlyElement && test.name != '*') { - this.quickAttr = true; - this.attrName = test.name; - } - } - } -}; - -PathExpr.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'path:' + '\n'; - indent += ' '; - t += indent + 'filter:' + '\n'; - t += this.filter.show(indent + ' '); - if (this.steps.length) { - t += indent + 'steps:' + '\n'; - indent += ' '; - for (var i = 0; i < this.steps.length; i ++) { - var step = this.steps[i]; - t += indent + 'operator: ' + step[0] + '\n'; - t += step[1].show(indent); - } - } - return t; -}; - - -/** - * class: FilterExpr - */ -if (!window.FilterExpr && window.defaultConfig) - window.FilterExpr = null; - -FilterExpr = function(primary) { - this.primary = primary; - this.predicates = []; - - this.datatype = primary.datatype; - - this.needContextPosition = primary.needContextPosition; - - this.needContextNode = primary.needContextNode; -}; - -FilterExpr.parse = function(lexer) { - var expr, filter, token, ch; - - token = lexer.peek(); - ch = token.charAt(0); - - switch (ch) { - case '$': - expr = VariableReference.parse(lexer); - break; - - case '(': - lexer.next(); - expr = BinaryExpr.parse(lexer); - if (lexer.empty()) { - throw Error('unclosed "("'); - } - if (lexer.next() != ')') { - lexer.back(); - throw Error('bad token: ' + lexer.next()); - } - break; - - case '"': - case "'": - expr = Literal.parse(lexer); - break; - - default: - if (!isNaN(+token)) { - expr = Number.parse(lexer); - } - - else if (NodeType.types[token]) { - return null; - } - - else if (ch.match(/(?![0-9])[\w]/) && lexer.peek(1) == '(') { - expr = FunctionCall.parse(lexer); - } - else { - return null; - } - break; - } - - if (lexer.peek() != '[') return expr; - - filter = new FilterExpr(expr); - - BaseExprHasPredicates.parsePredicates(lexer, filter); - - return filter; -}; - -FilterExpr.root = function() { - return new FunctionCall('root-node'); -}; -FilterExpr.context = function() { - return new FunctionCall('context-node'); -}; - -FilterExpr.prototype = new BaseExprHasPredicates(); - -FilterExpr.prototype.evaluate = function(ctx) { - var nodeset = this.primary.evaluate(ctx); - if(!nodeset.isNodeSet) { - if (this.predicates.length) - throw Error( - 'Primary result must be nodeset type ' + - 'if filter have predicate expression'); - return nodeset; - } - - return this.evaluatePredicates(nodeset); -}; - -FilterExpr.prototype.predicate = function(predicate) { - this.predicates.push(predicate); -}; - -FilterExpr.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'filter: ' + '\n'; - indent += ' '; - t += this.primary.show(indent); - if (this.predicates.length) { - t += indent + 'predicates: ' + '\n'; - indent += ' '; - for (var i = 0; i < this.predicates.length; i ++) { - t += this.predicates[i].show(indent); - } - } - return t; -}; - - -if (!window.NodeUtil && window.defaultConfig) - window.NodeUtil = null; - -NodeUtil = { - to: function(valueType, node) { - var type = node.nodeType; -/*@cc_on - if (type == 1 && node.nodeName.toLowerCase() == 'title') { - t = node.text; - } - else -@*/ - if (type == 9 || type == 1) { - if (type == 9) { - node = node.documentElement; - } - else { - node = node.firstChild; - } - for (var t = '', stack = [], i = 0; node;) { - do { - if (node.nodeType != 1) { - t += node.nodeValue; - } -/*@cc_on - else if (node.nodeName.toLowerCase() == 'title') { - t += node.text; - } -@*/ - stack[i++] = node; // push - } while (node = node.firstChild); - while (i && !(node = stack[--i].nextSibling)) {} - } - } - else { - var t = node.nodeValue; - } - switch (valueType) { - case 'number': - return + t; - case 'boolean': - return !! t; - default: - return t; - } - }, - attrPropMap: { - name: 'name', - 'class': 'className', - dir: 'dir', - id: 'id', - name: 'name', - title: 'title' - }, - attrMatch: function(node, attrName, attrValue) { -/*@cc_on @if (@_jscript) - var propName = NodeUtil.attrPropMap[attrName]; - if (!attrName || - attrValue == null && ( - propName && node[propName] || - !propName && node.getAttribute && node.getAttribute(attrName) - ) || - attrValue != null && ( - propName && node[propName] == attrValue || - !propName && node.getAttribute && node.getAttribute(attrName) == attrValue - )) { -@else @*/ - if (!attrName || - attrValue == null && node.hasAttribute && node.hasAttribute(attrName) || - attrValue != null && node.getAttribute && node.getAttribute(attrName) == attrValue) { -/*@end @*/ - return true; - } - else { - return false; - } - }, - getDescendantNodes: function(test, node, nodeset, attrName, attrValue, prevNodeset, prevIndex) { - if (prevNodeset) { - prevNodeset.delDescendant(node, prevIndex); - } -/*@cc_on - if (!test.notOnlyElement || test.type == 8 || (attrName && test.type == 0)) { - - var all = node.all; - if (!all) { - return nodeset; - } - - var name = test.name; - if (test.type == 8) name = '!'; - else if (test.type == 0) name = '*'; - - if (name != '*') { - all = all.tags(name); - if (!all) { - return nodeset; - } - } - - if (attrName) { - var result = [] - var i = 0; - if (attrValue != null && (attrName == 'id' || attrName == 'name')) { - all = all[attrValue]; - if (!all) { - return nodeset; - } - if (!all.length) { - all = [all]; - } - } - - while (node = all[i++]) { - if (NodeUtil.attrMatch(node, attrName, attrValue)) result.push(node); - } - - all = result; - } - - var i = 0; - while (node = all[i++]) { - if (name != '*' || node.tagName != '!') { - nodeset.push(node); - } - } - - return nodeset; - } - - (function (parent) { - var g = arguments.callee; - var node = parent.firstChild; - if (node) { - for (; node; node = node.nextSibling) { - if (NodeUtil.attrMatch(node, attrName, attrValue)) { - if (test.match(node)) nodeset.push(node); - } - g(node); - } - } - })(node); - - return nodeset; -@*/ - if (attrValue && attrName == 'id' && node.getElementById) { - node = node.getElementById(attrValue); - if (node && test.match(node)) { - nodeset.push(node); - } - } - else if (attrValue && attrName == 'name' && node.getElementsByName) { - var nodes = node.getElementsByName(attrValue); - for (var i = 0, l = nodes.length; i < l; i ++) { - node = nodes[i]; - if (uai.opera ? (node.name == attrValue && test.match(node)) : test.match(node)) { - nodeset.push(node); - } - } - } - else if (attrValue && attrName == 'class' && node.getElementsByClassName) { - var nodes = node.getElementsByClassName(attrValue); - for (var i = 0, l = nodes.length; i < l; i ++) { - node = nodes[i]; - if (node.className == attrValue && test.match(node)) { - nodeset.push(node); - } - } - } - else if (test.notOnlyElement) { - (function (parent) { - var f = arguments.callee; - for (var node = parent.firstChild; node; node = node.nextSibling) { - if (NodeUtil.attrMatch(node, attrName, attrValue)) { - if (test.match(node.nodeType)) nodeset.push(node); - } - f(node); - } - })(node); - } - else { - var name = test.name; - if (node.getElementsByTagName) { - var nodes = node.getElementsByTagName(name); - if (nodes) { - var i = 0; - while (node = nodes[i++]) { - if (NodeUtil.attrMatch(node, attrName, attrValue)) nodeset.push(node); - } - } - } - } - return nodeset; - }, - - getChildNodes: function(test, node, nodeset, attrName, attrValue) { - -/*@cc_on - var children; - - if ((!test.notOnlyElement || test.type == 8 || (attrName && test.type == 0)) && (children = node.children)) { - var name, elm; - - name = test.name; - if (test.type == 8) name = '!'; - else if (test.type == 0) name = '*'; - - if (name != '*') { - children = children.tags(name); - if (!children) { - return nodeset; - } - } - - if (attrName) { - var result = [] - var i = 0; - if (attrName == 'id' || attrName == 'name') { - children = children[attrValue]; - - if (!children) { - return nodeset; - } - - if (!children.length) { - children = [children]; - } - } - - while (node = children[i++]) { - if (NodeUtil.attrMatch(node, attrName, attrValue)) result.push(node); - } - children = result; - } - - var i = 0; - while (node = children[i++]) { - if (name != '*' || node.tagName != '!') { - nodeset.push(node); - } - } - - return nodeset; - } - - for (var i = 0, node = node.firstChild; node; i++, node = node.nextSibling) { - if (NodeUtil.attrMatch(node, attrName, attrValue)) { - if (test.match(node)) nodeset.push(node); - } - } - - return nodeset; -@*/ - for (var node = node.firstChild; node; node = node.nextSibling) { - if (NodeUtil.attrMatch(node, attrName, attrValue)) { - if (test.match(node)) nodeset.push(node); - } - } - return nodeset; - } -}; - -/*@cc_on -var AttributeWrapper = function(node, parent, sourceIndex) { - this.node = node; - this.nodeType = 2; - this.nodeValue = node.nodeValue; - this.nodeName = node.nodeName; - this.parentNode = parent; - this.ownerElement = parent; - this.parentSourceIndex = sourceIndex; -}; - -@*/ - - -/** - * class: Step - */ -if (!window.Step && window.defaultConfig) - window.Step = null; - -Step = function(axis, test) { - // TODO check arguments and throw axis error - this.axis = axis; - this.reverse = Step.axises[axis][0]; - this.func = Step.axises[axis][1]; - this.test = test; - this.predicates = []; - this._quickAttr = Step.axises[axis][2] -}; - -Step.axises = { - - ancestor: [true, function(test, node, nodeset, _, __, prevNodeset, prevIndex) { - while (node = node.parentNode) { - if (prevNodeset && node.nodeType == 1) { - prevNodeset.reserveDelByNode(node, prevIndex, true); - } - if (test.match(node)) nodeset.unshift(node); - } - return nodeset; - }], - - 'ancestor-or-self': [true, function(test, node, nodeset, _, __, prevNodeset, prevIndex) { - do { - if (prevNodeset && node.nodeType == 1) { - prevNodeset.reserveDelByNode(node, prevIndex, true); - } - if (test.match(node)) nodeset.unshift(node); - } while (node = node.parentNode) - return nodeset; - }], - - attribute: [false, function(test, node, nodeset) { - var attrs = node.attributes; - if (attrs) { -/*@cc_on - var sourceIndex = node.sourceIndex; -@*/ - if ((test.notOnlyElement && test.type == 0) || test.name == '*') { - for (var i = 0, l = attrs.length; i < l; i ++) { - var attr = attrs[i]; -/*@cc_on @if (@_jscript) - if (attr.nodeValue) { - nodeset.push(new AttributeWrapper(attr, node, sourceIndex)); - } -@else @*/ - nodeset.push(attr); -/*@end @*/ - } - } - else { - var attr = attrs.getNamedItem(test.name) - -/*@cc_on @if (@_jscript) - if (attr && attr.nodeValue) { - attr = new AttributeWrapper(attr, node, sourceIndex);; -@else @*/ - if (attr) { -/*@end @*/ - nodeset.push(attr); - } - } - } - return nodeset; - }], - - child: [false, NodeUtil.getChildNodes, true], - - descendant: [false, NodeUtil.getDescendantNodes, true], - - 'descendant-or-self': [false, function(test, node, nodeset, attrName, attrValue, prevNodeset, prevIndex) { - if (NodeUtil.attrMatch(node, attrName, attrValue)) { - if (test.match(node)) nodeset.push(node); - } - return NodeUtil.getDescendantNodes(test, node, nodeset, attrName, attrValue, prevNodeset, prevIndex); - }, true], - - following: [false, function(test, node, nodeset, attrName, attrValue) { - do { - var child = node; - while (child = child.nextSibling) { - if (NodeUtil.attrMatch(child, attrName, attrValue)) { - if (test.match(child)) nodeset.push(child); - } - nodeset = NodeUtil.getDescendantNodes(test, child, nodeset, attrName, attrValue); - } - } while (node = node.parentNode); - return nodeset; - }, true], - - 'following-sibling': [false, function(test, node, nodeset, _, __, prevNodeset, prevIndex) { - while (node = node.nextSibling) { - - if (prevNodeset && node.nodeType == 1) { - prevNodeset.reserveDelByNode(node, prevIndex); - } - - if (test.match(node)) { - nodeset.push(node); - } - } - return nodeset; - }], - - namespace: [false, function(test, node, nodeset) { - // not implemented - return nodeset; - }], - - parent: [false, function(test, node, nodeset) { - if (node.nodeType == 9) { - return nodeset; - } - if (node.nodeType == 2) { - nodeset.push(node.ownerElement); - return nodeset; - } - var node = node.parentNode; - if (test.match(node)) nodeset.push(node); - return nodeset; - }], - - preceding: [true, function(test, node, nodeset, attrName, attrValue) { - var parents = []; - do { - parents.unshift(node); - } while (node = node.parentNode); - - for (var i = 1, l0 = parents.length; i < l0; i ++) { - var siblings = []; - node = parents[i]; - while (node = node.previousSibling) { - siblings.unshift(node); - } - - for (var j = 0, l1 = siblings.length; j < l1; j ++) { - node = siblings[j]; - if (NodeUtil.attrMatch(node, attrName, attrValue)) { - if (test.match(node)) nodeset.push(node); - } - nodeset = NodeUtil.getDescendantNodes(test, node, nodeset, attrName, attrValue); - } - } - return nodeset; - }, true], - - 'preceding-sibling': [true, function(test, node, nodeset, _, __, prevNodeset, prevIndex) { - while (node = node.previousSibling) { - - if (prevNodeset && node.nodeType == 1) { - prevNodeset.reserveDelByNode(node, prevIndex, true); - } - - if (test.match(node)) { - nodeset.unshift(node) - } - } - return nodeset; - }], - - self: [false, function(test, node, nodeset) { - if (test.match(node)) nodeset.push(node); - return nodeset; - }] -}; - -Step.parse = function(lexer) { - var axis, test, step, token; - - if (lexer.peek() == '.') { - step = this.self(); - lexer.next(); - } - else if (lexer.peek() == '..') { - step = this.parent(); - lexer.next(); - } - else { - if (lexer.peek() == '@') { - axis = 'attribute'; - lexer.next(); - if (lexer.empty()) { - throw Error('missing attribute name'); - } - } - else { - if (lexer.peek(1) == '::') { - - if (!lexer.peek().charAt(0).match(/(?![0-9])[\w]/)) { - throw Error('bad token: ' + lexer.next()); - } - - axis = lexer.next(); - lexer.next(); - - if (!this.axises[axis]) { - throw Error('invalid axis: ' + axis); - } - if (lexer.empty()) { - throw Error('missing node name'); - } - } - else { - axis = 'child'; - } - } - - token = lexer.peek(); - if (!token.charAt(0).match(/(?![0-9])[\w]/)) { - if (token == '*') { - test = NameTest.parse(lexer) - } - else { - throw Error('bad token: ' + lexer.next()); - } - } - else { - if (lexer.peek(1) == '(') { - if (!NodeType.types[token]) { - throw Error('invalid node type: ' + token); - } - test = NodeType.parse(lexer) - } - else { - test = NameTest.parse(lexer); - } - } - step = new Step(axis, test); - } - - BaseExprHasPredicates.parsePredicates(lexer, step); - - return step; -}; - -Step.self = function() { - return new Step('self', new NodeType('node')); -}; - -Step.parent = function() { - return new Step('parent', new NodeType('node')); -}; - -Step.prototype = new BaseExprHasPredicates(); - -Step.prototype.evaluate = function(ctx, special, prevNodeset, prevIndex) { - var node = ctx.node; - var reverse = false; - - if (!special && this.op == '//') { - - if (!this.needContextPosition && this.axis == 'child') { - if (this.quickAttr) { - var attrValue = this.attrValueExpr ? this.attrValueExpr.string(ctx) : null; - var nodeset = NodeUtil.getDescendantNodes(this.test, node, new NodeSet(), this.attrName, attrValue, prevNodeset, prevIndex); - nodeset = this.evaluatePredicates(nodeset, 1); - } - else { - var nodeset = NodeUtil.getDescendantNodes(this.test, node, new NodeSet(), null, null, prevNodeset, prevIndex); - nodeset = this.evaluatePredicates(nodeset); - } - } - else { - var step = new Step('descendant-or-self', new NodeType('node')); - var nodes = step.evaluate(ctx, false, prevNodeset, prevIndex).list(); - var nodeset = null; - step.op = '/'; - for (var i = 0, l = nodes.length; i < l; i ++) { - if (!nodeset) { - nodeset = this.evaluate(new Ctx(nodes[i]), true); - } - else { - nodeset.merge(this.evaluate(new Ctx(nodes[i]), true)); - } - } - nodeset = nodeset || new NodeSet(); - } - } - else { - - if (this.needContextPosition) { - prevNodeset = null; - prevIndex = null; - } - - if (this.quickAttr) { - var attrValue = this.attrValueExpr ? this.attrValueExpr.string(ctx) : null; - var nodeset = this.func(this.test, node, new NodeSet(), this.attrName, attrValue, prevNodeset, prevIndex); - nodeset = this.evaluatePredicates(nodeset, 1); - } - else { - var nodeset = this.func(this.test, node, new NodeSet(), null, null, prevNodeset, prevIndex); - nodeset = this.evaluatePredicates(nodeset); - } - if (prevNodeset) { - prevNodeset.doDel(); - } - } - return nodeset; -}; - -Step.prototype.predicate = function(predicate) { - this.predicates.push(predicate); - - if (predicate.needContextPosition || - predicate.datatype == 'number'|| - predicate.datatype == 'void') { - this.needContextPosition = true; - } - - if (this._quickAttr && this.predicates.length == 1 && predicate.quickAttr) { - var attrName = predicate.attrName; -/*@cc_on @if (@_jscript) - this.attrName = attrName.toLowerCase(); -@else @*/ - this.attrName = attrName; -/*@end @*/ - this.attrValueExpr = predicate.attrValueExpr; - this.quickAttr = true; - } -}; - -Step.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'step: ' + '\n'; - indent += ' '; - if (this.axis) t += indent + 'axis: ' + this.axis + '\n'; - t += this.test.show(indent); - if (this.predicates.length) { - t += indent + 'predicates: ' + '\n'; - indent += ' '; - for (var i = 0; i < this.predicates.length; i ++) { - t += this.predicates[i].show(indent); - } - } - return t; -}; - - - -/** - * NodeType - */ -if (!window.NodeType && window.defaultConfig) - window.NodeType = null; - -NodeType = function(name, literal) { - this.name = name; - this.literal = literal; - - switch (name) { - case 'comment': - this.type = 8; - break; - case 'text': - this.type = 3; - break; - case 'processing-instruction': - this.type = 7; - break; - case 'node': - this.type = 0; - break; - } -}; - -NodeType.types = { - 'comment':1, 'text':1, 'processing-instruction':1, 'node':1 -}; - -NodeType.parse = function(lexer) { - var type, literal, ch; - type = lexer.next(); - lexer.next(); - if (lexer.empty()) { - throw Error('bad nodetype'); - } - ch = lexer.peek().charAt(0); - if (ch == '"' || ch == "'") { - literal = Literal.parse(lexer); - } - if (lexer.empty()) { - throw Error('bad nodetype'); - } - if (lexer.next() != ')') { - lexer.back(); - throw Error('bad token ' + lexer.next()); - } - return new NodeType(type, literal); -}; - -NodeType.prototype = new BaseExpr(); - -NodeType.prototype.notOnlyElement = true; - -NodeType.prototype.match = function(node) { - return !this.type || this.type == node.nodeType; -}; - -NodeType.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'nodetype: ' + this.type + '\n'; - if (this.literal) { - indent += ' '; - t += this.literal.show(indent); - } - return t; -}; - - -/** - * NodeType - */ -if (!window.NameTest && window.defaultConfig) - window.NameTest = null; - -NameTest = function(name) { - this.name = name.toLowerCase(); -}; - -NameTest.parse = function(lexer) { - if (lexer.peek() != '*' && lexer.peek(1) == ':' && lexer.peek(2) == '*') { - return new NameTest(lexer.next() + lexer.next() + lexer.next()); - } - return new NameTest(lexer.next()); -}; - -NameTest.prototype = new BaseExpr(); - -NameTest.prototype.match = function(node) { - var type = node.nodeType; - - if (type == 1 || type == 2) { - if (this.name == '*' || this.name == node.nodeName.toLowerCase()) { - return true; - } - } - return false; -}; - -NameTest.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'nametest: ' + this.name + '\n'; - return t; -}; - - -/** - * class: VariableRefernce - */ -if (!window.VariableReference && window.defaultConfig) - window.VariableReference = null; - -VariableReference = function(name) { - this.name = name.substring(1); -}; - - -VariableReference.parse = function(lexer) { - var token = lexer.next(); - if (token.length < 2) { - throw Error('unnamed variable reference'); - } - return new VariableReference(token) -}; - -VariableReference.prototype = new BaseExpr(); - -VariableReference.prototype.datatype = 'void'; - -VariableReference.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'variable: ' + this.name + '\n'; - return t; -}; - - -/** - * class: Literal - */ -if (!window.Literal && window.defaultConfig) - window.Literal = null; - -Literal = function(text) { - this.text = text.substring(1, text.length - 1); -}; - -Literal.parse = function(lexer) { - var token = lexer.next(); - if (token.length < 2) { - throw Error('unclosed literal string'); - } - return new Literal(token) -}; - -Literal.prototype = new BaseExpr(); - -Literal.prototype.datatype = 'string'; - -Literal.prototype.evaluate = function(ctx) { - return this.text; -}; - -Literal.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'literal: ' + this.text + '\n'; - return t; -}; - - -/** - * class: Number - */ -if (!window.Number && window.defaultConfig) - window.Number = null; - -Number = function(digit) { - this.digit = +digit; -}; - - -Number.parse = function(lexer) { - return new Number(lexer.next()); -}; - -Number.prototype = new BaseExpr(); - -Number.prototype.datatype = 'number'; - -Number.prototype.evaluate = function(ctx) { - return this.digit; -}; - -Number.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'number: ' + this.digit + '\n'; - return t; -}; - - -/** - * class: FunctionCall - */ -if (!window.FunctionCall && window.defaultConfig) - window.FunctionCall = null; - -FunctionCall = function(name) { - var info = FunctionCall.funcs[name]; - this.name = name; - this.func = info[0]; - this.args = []; - - this.datatype = info[1]; - - if (info[2]) { - this.needContextPosition = true; - } - - this.needContextNodeInfo = info[3]; - this.needContextNode = this.needContextNodeInfo[0] -}; - -FunctionCall.funcs = { - - // Original Function - 'context-node': [function() { - if (arguments.length != 0) { - throw Error('Function context-node expects ()'); - } - var ns; - ns = new NodeSet(); - ns.push(this.node); - return ns; - }, 'nodeset', false, [true]], - - // Original Function - 'root-node': [function() { - if (arguments.length != 0) { - throw Error('Function root-node expects ()'); - } - var ns, ctxn; - ns = new NodeSet(); - ctxn = this.node; - if (ctxn.nodeType == 9) - ns.push(ctxn); - else - ns.push(ctxn.ownerDocument); - return ns; - }, 'nodeset', false, []], - - last: [function() { - if (arguments.length != 0) { - throw Error('Function last expects ()'); - } - return this.last; - }, 'number', true, []], - - position: [function() { - if (arguments.length != 0) { - throw Error('Function position expects ()'); - } - return this.position; - }, 'number', true, []], - - count: [function(ns) { - if (arguments.length != 1 || !(ns = ns.evaluate(this)).isNodeSet) { - throw Error('Function count expects (nodeset)'); - } - return ns.length; - }, 'number', false, []], - - id: [function(s) { - var ids, ns, i, id, elm, ctxn, doc; - if (arguments.length != 1) { - throw Error('Function id expects (object)'); - } - ctxn = this.node; - if (ctxn.nodeType == 9) - doc = ctxn; - else - doc = ctxn.ownerDocument; -/*@cc_on - all = doc.all; -@*/ - s = s.string(this); - ids = s.split(/\s+/); - ns = new NodeSet(); - for (i = 0, l = ids.length; i < l; i ++) { - id = ids[i]; - -/*@cc_on @if (@_jscript) - elm = all[id]; - if (elm) { - if (elm.length) { - var elms = elm; - for (var j = 0, l0 = elms.length; j < l0; j ++) { - var elem = elms[j]; - if (id == elem.id) { - ns.push(elem); - break; - } - } - } - else if (id == elm.id) { - ns.push(elm) - } - } -@else @*/ - elm = doc.getElementById(id); - if (uai.opera && elm.id != id) { - var elms = doc.getElementsByName(id); - for (var j = 0, l0 = elms.length; j < l0; j ++) { - elm = elms[j]; - if (elm.id == id) { - ns.push(elm); - } - } - } - else { - if (elm) ns.push(elm) - } -/*@end @*/ - - } - ns.isSorted = false; - return ns; - }, 'nodeset', false, []], - - 'local-name': [function(ns) { - var nd; - switch (arguments.length) { - case 0: - nd = this.node; - break; - case 1: - if ((ns = ns.evaluate(this)).isNodeSet) { - nd = ns.first(); - break; - } - default: - throw Error('Function local-name expects (nodeset?)'); - break; - } - return '' + nd.nodeName.toLowerCase(); - }, 'string', false, [true, false]], - - name: [function(ns) { - // not implemented - return FunctionCall.funcs['local-name'][0].apply(this, arguments); - }, 'string', false, [true, false]], - - 'namespace-uri': [function(ns) { - // not implemented - return ''; - }, 'string', false, [true, false]], - - string: [function(s) { - switch (arguments.length) { - case 0: - s = NodeUtil.to('string', this.node); - break; - case 1: - s = s.string(this); - break; - default: - throw Error('Function string expects (object?)'); - break; - } - return s; - }, 'string', false, [true, false]], - - concat: [function(s1, s2) { - if (arguments.length < 2) { - throw Error('Function concat expects (string, string[, ...])'); - } - for (var t = '', i = 0, l = arguments.length; i < l; i ++) { - t += arguments[i].string(this); - } - return t; - }, 'string', false, []], - - 'starts-with': [function(s1, s2) { - if (arguments.length != 2) { - throw Error('Function starts-with expects (string, string)'); - } - s1 = s1.string(this); - s2 = s2.string(this); - return s1.indexOf(s2) == 0; - }, 'boolean', false, []], - - contains: [function(s1, s2) { - if (arguments.length != 2) { - throw Error('Function contains expects (string, string)'); - } - s1 = s1.string(this); - s2 = s2.string(this); - return s1.indexOf(s2) != -1; - }, 'boolean', false, []], - - substring: [function(s, n1, n2) { - var a1, a2; - s = s.string(this); - n1 = n1.number(this); - switch (arguments.length) { - case 2: - n2 = s.length - n1 + 1; - break; - case 3: - n2 = n2.number(this); - break; - default: - throw Error('Function substring expects (string, string)'); - break; - } - n1 = Math.round(n1); - n2 = Math.round(n2); - a1 = n1 - 1; - a2 = n1 + n2 - 1; - if (a2 == Infinity) { - return s.substring(a1 < 0 ? 0 : a1); - } - else { - return s.substring(a1 < 0 ? 0 : a1, a2) - } - }, 'string', false, []], - - 'substring-before': [function(s1, s2) { - var n; - if (arguments.length != 2) { - throw Error('Function substring-before expects (string, string)'); - } - s1 = s1.string(this); - s2 = s2.string(this); - n = s1.indexOf(s2); - if (n == -1) return ''; - return s1.substring(0, n); - }, 'string', false, []], - - 'substring-after': [function(s1, s2) { - if (arguments.length != 2) { - throw Error('Function substring-after expects (string, string)'); - } - s1 = s1.string(this); - s2 = s2.string(this); - var n = s1.indexOf(s2); - if (n == -1) return ''; - return s1.substring(n + s2.length); - }, 'string', false, []], - - 'string-length': [function(s) { - switch (arguments.length) { - case 0: - s = NodeUtil.to('string', this.node); - break; - case 1: - s = s.string(this); - break; - default: - throw Error('Function string-length expects (string?)'); - break; - } - return s.length; - }, 'number', false, [true, false]], - - 'normalize-space': [function(s) { - switch (arguments.length) { - case 0: - s = NodeUtil.to('string', this.node); - break; - case 1: - s = s.string(this); - break; - default: - throw Error('Function normalize-space expects (string?)'); - break; - } - return s.replace(/\s+/g, ' ').replace(/^ /, '').replace(/ $/, ''); - }, 'string', false, [true, false]], - - translate: [function(s1, s2, s3) { - if (arguments.length != 3) { - throw Error('Function translate expects (string, string, string)'); - } - s1 = s1.string(this); - s2 = s2.string(this); - s3 = s3.string(this); - - var map = []; - for (var i = 0, l = s2.length; i < l; i ++) { - var ch = s2.charAt(i); - if (!map[ch]) map[ch] = s3.charAt(i) || ''; - } - for (var t = '', i = 0, l = s1.length; i < l; i ++) { - var ch = s1.charAt(i); - var replace = map[ch] - t += (replace != undefined) ? replace : ch; - } - return t; - }, 'string', false, []], - - 'boolean': [function(b) { - if (arguments.length != 1) { - throw Error('Function boolean expects (object)'); - } - return b.bool(this) - }, 'boolean', false, []], - - not: [function(b) { - if (arguments.length != 1) { - throw Error('Function not expects (object)'); - } - return !b.bool(this) - }, 'boolean', false, []], - - 'true': [function() { - if (arguments.length != 0) { - throw Error('Function true expects ()'); - } - return true; - }, 'boolean', false, []], - - 'false': [function() { - if (arguments.length != 0) { - throw Error('Function false expects ()'); - } - return false; - }, 'boolean', false, []], - - lang: [function(s) { - // not implemented - return false; - }, 'boolean', false, []], - - number: [function(n) { - switch (arguments.length) { - case 0: - n = NodeUtil.to('number', this.node); - break; - case 1: - n = n.number(this); - break; - default: - throw Error('Function number expects (object?)'); - break; - } - return n; - }, 'number', false, [true, false]], - - sum: [function(ns) { - var nodes, n, i, l; - if (arguments.length != 1 || !(ns = ns.evaluate(this)).isNodeSet) { - throw Error('Function sum expects (nodeset)'); - } - nodes = ns.list(); - n = 0; - for (i = 0, l = nodes.length; i < l; i ++) { - n += NodeUtil.to('number', nodes[i]); - } - return n; - }, 'number', false, []], - - floor: [function(n) { - if (arguments.length != 1) { - throw Error('Function floor expects (number)'); - } - n = n.number(this); - return Math.floor(n); - }, 'number', false, []], - - ceiling: [function(n) { - if (arguments.length != 1) { - throw Error('Function ceiling expects (number)'); - } - n = n.number(this); - return Math.ceil(n); - }, 'number', false, []], - - round: [function(n) { - if (arguments.length != 1) { - throw Error('Function round expects (number)'); - } - n = n.number(this); - return Math.round(n); - }, 'number', false, []] -}; - -FunctionCall.parse = function(lexer) { - var expr, func = new FunctionCall(lexer.next()); - lexer.next(); - while (lexer.peek() != ')') { - if (lexer.empty()) { - throw Error('missing function argument list'); - } - expr = BinaryExpr.parse(lexer); - func.arg(expr); - if (lexer.peek() != ',') break; - lexer.next(); - } - if (lexer.empty()) { - throw Error('unclosed function argument list'); - } - if (lexer.next() != ')') { - lexer.back(); - throw Error('bad token: ' + lexer.next()); - } - return func -}; - -FunctionCall.prototype = new BaseExpr(); - -FunctionCall.prototype.evaluate = function (ctx) { - return this.func.apply(ctx, this.args); -}; - -FunctionCall.prototype.arg = function(arg) { - this.args.push(arg); - - if (arg.needContextPosition) { - this.needContextPosition = true; - } - - var args = this.args; - if (arg.needContextNode) { - args.needContexNode = true; - } - this.needContextNode = args.needContextNode || - this.needContextNodeInfo[args.length]; -}; - -FunctionCall.prototype.show = function(indent) { - indent = indent || ''; - var t = ''; - t += indent + 'function: ' + this.name + '\n'; - indent += ' '; - - if (this.args.length) { - t += indent + 'arguments: ' + '\n'; - indent += ' '; - for (var i = 0; i < this.args.length; i ++) { - t += this.args[i].show(indent); - } - } - - return t; -}; - - -/*@cc_on @if (@_jscript) -var NodeWrapper = function(node, sourceIndex, subIndex, attributeName) { - this.node = node; - this.nodeType = node.nodeType; - this.sourceIndex = sourceIndex; - this.subIndex = subIndex; - this.attributeName = attributeName || ''; - this.order = String.fromCharCode(sourceIndex) + String.fromCharCode(subIndex) + attributeName; -}; - -NodeWrapper.prototype.toString = function() { - return this.order; -}; -@else @*/ -var NodeID = { - uuid: 1, - get: function(node) { - return node.__jsxpath_id__ || (node.__jsxpath_id__ = this.uuid++); - } -}; -/*@end @*/ - -if (!window.NodeSet && window.defaultConfig) - window.NodeSet = null; - -NodeSet = function() { - this.length = 0; - this.nodes = []; - this.seen = {}; - this.idIndexMap = null; - this.reserveDels = []; -}; - -NodeSet.prototype.isNodeSet = true; -NodeSet.prototype.isSorted = true; - -/*@_cc_on -NodeSet.prototype.shortcut = true; -@*/ - -NodeSet.prototype.merge = function(nodeset) { - this.isSorted = false; - if (nodeset.only) { - return this.push(nodeset.only); - } - - if (this.only){ - var only = this.only; - delete this.only; - this.push(only); - this.length --; - } - - var nodes = nodeset.nodes; - for (var i = 0, l = nodes.length; i < l; i ++) { - this._add(nodes[i]); - } -}; - -NodeSet.prototype.sort = function() { - if (this.only) return; - if (this.sortOff) return; - - if (!this.isSorted) { - this.isSorted = true; - this.idIndexMap = null; - -/*@cc_on - if (this.shortcut) { - this.nodes.sort(); - } - else { - this.nodes.sort(function(a, b) { - var result; - result = a.sourceIndex - b.sourceIndex; - if (result == 0) - return a.subIndex - a.subIndex; - else - return result; - }); - } - return; -@*/ - var nodes = this.nodes; - nodes.sort(function(a, b) { - if (a == b) return 0; - - if (a.compareDocumentPosition) { - var result = a.compareDocumentPosition(b); - if (result & 2) return 1; - if (result & 4) return -1; - return 0; - } - else { - var node1 = a, node2 = b, ancestor1 = a, ancestor2 = b, deep1 = 0, deep2 = 0; - - while(ancestor1 = ancestor1.parentNode) deep1 ++; - while(ancestor2 = ancestor2.parentNode) deep2 ++; - - // same deep - if (deep1 > deep2) { - while (deep1-- != deep2) node1 = node1.parentNode; - if (node1 == node2) return 1; - } - else if (deep2 > deep1) { - while (deep2-- != deep1) node2 = node2.parentNode; - if (node1 == node2) return -1; - } - - while ((ancestor1 = node1.parentNode) != (ancestor2 = node2.parentNode)) { - node1 = ancestor1; - node2 = ancestor2; - } - - // node1 is node2's sibling - while (node1 = node1.nextSibling) if (node1 == node2) return -1; - - return 1; - } - }); - } -}; - - -/*@cc_on @if (@_jscript) -NodeSet.prototype.sourceOffset = 1; -NodeSet.prototype.subOffset = 2; -NodeSet.prototype.createWrapper = function(node) { - var parent, child, attributes, attributesLength, sourceIndex, subIndex, attributeName; - - sourceIndex = node.sourceIndex; - - if (typeof sourceIndex != 'number') { - type = node.nodeType; - switch (type) { - case 2: - parent = node.parentNode; - sourceIndex = node.parentSourceIndex; - subIndex = -1; - attributeName = node.nodeName; - break; - case 9: - subIndex = -2; - sourceIndex = -1; - break; - default: - child = node; - subIndex = 0; - do { - subIndex ++; - sourceIndex = child.sourceIndex; - if (sourceIndex) { - parent = child; - child = child.lastChild; - if (!child) { - child = parent; - break; - } - subIndex ++; - } - } while (child = child.previousSibling); - if (!sourceIndex) { - sourceIndex = node.parentNode.sourceIndex; - } - break; - } - } - else { - subIndex = -2; - } - - sourceIndex += this.sourceOffset; - subIndex += this.subOffset; - - return new NodeWrapper(node, sourceIndex, subIndex, attributeName); -}; - -NodeSet.prototype.reserveDelBySourceIndexAndSubIndex = function(sourceIndex, subIndex, offset, reverse) { - var map = this.createIdIndexMap(); - var index; - if ((map = map[sourceIndex]) && (index = map[subIndex])) { - if (reverse && (this.length - offset - 1) > index || !reverse && offset < index) { - var obj = { - value: index, - order: String.fromCharCode(index), - toString: function() { return this.order }, - valueOf: function() { return this.value } - }; - this.reserveDels.push(obj); - } - } -}; -@else @*/ -NodeSet.prototype.reserveDelByNodeID = function(id, offset, reverse) { - var map = this.createIdIndexMap(); - var index; - if (index = map[id]) { - if (reverse && (this.length - offset - 1) > index || !reverse && offset < index) { - var obj = { - value: index, - order: String.fromCharCode(index), - toString: function() { return this.order }, - valueOf: function() { return this.value } - }; - this.reserveDels.push(obj); - } - } -}; -/*@end @*/ - -NodeSet.prototype.reserveDelByNode = function(node, offset, reverse) { -/*@cc_on @if (@_jscript) - node = this.createWrapper(node); - this.reserveDelBySourceIndexAndSubIndex(node.sourceIndex, node.subIndex, offset, reverse); -@else @*/ - this.reserveDelByNodeID(NodeID.get(node), offset, reverse); -/*@end @*/ -}; - -NodeSet.prototype.doDel = function() { - if (!this.reserveDels.length) return; - - if (this.length < 0x10000) { - var dels = this.reserveDels.sort(function(a, b) { return b - a }); - } - else { - var dels = this.reserveDels.sort(function(a, b) { return b - a }); - } - for (var i = 0, l = dels.length; i < l; i ++) { - this.del(dels[i]); - } - this.reserveDels = []; - this.idIndexMap = null; -}; - -NodeSet.prototype.createIdIndexMap = function() { - if (this.idIndexMap) { - return this.idIndexMap; - } - else { - var map = this.idIndexMap = {}; - var nodes = this.nodes; - for (var i = 0, l = nodes.length; i < l; i ++) { - var node = nodes[i]; -/*@cc_on @if (@_jscript) - var sourceIndex = node.sourceIndex; - var subIndex = node.subIndex; - if (!map[sourceIndex]) map[sourceIndex] = {}; - map[sourceIndex][subIndex] = i; -@else @*/ - var id = NodeID.get(node); - map[id] = i; -/*@end @*/ - } - return map; - } -}; - -NodeSet.prototype.del = function(index) { - this.length --; - if (this.only) { - delete this.only; - } - else { - var node = this.nodes.splice(index, 1)[0]; - - if (this._first == node) { - delete this._first; - delete this._firstSourceIndex; - delete this._firstSubIndex; - } - -/*@cc_on @if (@_jscript) - delete this.seen[node.sourceIndex][node.subIndex]; -@else @*/ - delete this.seen[NodeID.get(node)]; -/*@end @*/ - } -}; - - -NodeSet.prototype.delDescendant = function(elm, offset) { - if (this.only) return; - var nodeType = elm.nodeType; - if (nodeType != 1 && nodeType != 9) return; - if (uai.applewebkit4) return; - - // element || document - if (!elm.contains) { - if (nodeType == 1) { - var _elm = elm; - elm = { - contains: function(node) { - return node.compareDocumentPosition(_elm) & 8; - } - }; - } - else { - // document - elm = { - contains: function() { - return true; - } - }; - } - } - - var nodes = this.nodes; - for (var i = offset + 1; i < nodes.length; i ++) { - -/*@cc_on @if (@_jscript) - if (nodes[i].node.nodeType == 1 && elm.contains(nodes[i].node)) { -@else @*/ - if (elm.contains(nodes[i])) { -/*@end @*/ - this.del(i); - i --; - } - } -}; - -NodeSet.prototype._add = function(node, reverse) { - -/*@cc_on @if (@_jscript) - - var first, firstSourceIndex, firstSubIndex, sourceIndex, subIndex, attributeName; - - sourceIndex = node.sourceIndex; - subIndex = node.subIndex; - attributeName = node.attributeName; - seen = this.seen; - - seen = seen[sourceIndex] || (seen[sourceIndex] = {}); - - if (node.nodeType == 2) { - seen = seen[subIndex] || (seen[subIndex] = {}); - if (seen[attributeName]) { - return true; - } - seen[attributeName] = true; - } - else { - if (seen[subIndex]) { - return true; - } - seen[subIndex] = true; - } - - if (sourceIndex >= 0x10000 || subIndex >= 0x10000) { - this.shortcut = false; - } - - // if this._first is undefined and this.nodes is not empty - // then first node shortcut is disabled. - if (this._first || this.nodes.length == 0) { - first = this._first; - firstSourceIndex = this._firstSourceIndex; - firstSubIndex = this._firstSubIndex; - if (!first || firstSourceIndex > sourceIndex || (firstSourceIndex == sourceIndex && firstSubIndex > subIndex)) { - this._first = node; - this._firstSourceIndex = sourceIndex; - this._firstSubIndex = subIndex - } - } - -@else @*/ - - var seen = this.seen; - var id = NodeID.get(node); - if (seen[id]) return true; - seen[id] = true; - -/*@end @*/ - - this.length++; - if (reverse) - this.nodes.unshift(node); - else - this.nodes.push(node); -}; - - -NodeSet.prototype.unshift = function(node) { - if (!this.length) { - this.length ++; - this.only = node; - return - } - if (this.only){ - var only = this.only; - delete this.only; - this.unshift(only); - this.length --; - } -/*@cc_on - node = this.createWrapper(node); -@*/ - return this._add(node, true); -}; - - -NodeSet.prototype.push = function(node) { - if (!this.length) { - this.length ++; - this.only = node; - return; - } - if (this.only) { - var only = this.only; - delete this.only; - this.push(only); - this.length --; - } -/*@cc_on - node = this.createWrapper(node); -@*/ - return this._add(node); -}; - -NodeSet.prototype.first = function() { - if (this.only) return this.only; -/*@cc_on - if (this._first) return this._first.node; - if (this.nodes.length > 1) this.sort(); - var node = this.nodes[0]; - return node ? node.node : undefined; -@*/ - if (this.nodes.length > 1) this.sort(); - return this.nodes[0]; -}; - -NodeSet.prototype.list = function() { - if (this.only) return [this.only]; - this.sort(); -/*@cc_on - var i, l, nodes, results; - nodes = this.nodes; - results = []; - for (i = 0, l = nodes.length; i < l; i ++) { - results.push(nodes[i].node); - } - return results; -@*/ - return this.nodes; -}; - -NodeSet.prototype.string = function() { - var node = this.only || this.first(); - return node ? NodeUtil.to('string', node) : ''; -}; - -NodeSet.prototype.bool = function() { - return !! (this.length || this.only); -}; - -NodeSet.prototype.number = function() { - return + this.string(); -}; - -NodeSet.prototype.iterator = function(reverse) { - this.sort(); - var nodeset = this; - - if (!reverse) { - var count = 0; - return function() { - if (nodeset.only && count++ == 0) return nodeset.only; -/*@cc_on @if(@_jscript) - var wrapper = nodeset.nodes[count++]; - if (wrapper) return wrapper.node; - return undefined; -@else @*/ - return nodeset.nodes[count++]; -/*@end @*/ - }; - } - else { - var count = 0; - return function() { - var index = nodeset.length - (count++) - 1; - if (nodeset.only && index == 0) return nodeset.only; -/*@cc_on @if(@_jscript) - var wrapper = nodeset.nodes[index]; - if (wrapper) return wrapper.node; - return undefined; -@else @*/ - return nodeset.nodes[index]; -/*@end @*/ - }; - } -}; - - -var install = function(win) { - - win = win || this; - - win.XPathExpression = function(expr) { - if (!expr.length) { - throw Error('no expression'); - } - var lexer = this.lexer = Lexer(expr); - if (lexer.empty()) { - throw Error('no expression'); - } - this.expr = BinaryExpr.parse(lexer); - if (!lexer.empty()) { - throw Error('bad token: ' + lexer.next()); - } - }; - - win.XPathExpression.prototype.evaluate = function(node, type) { - return new XPathResult(this.expr.evaluate(new Ctx(node)), type); - }; - - win.XPathResult = function (value, type) { - if (type == 0) { - switch (typeof value) { - case 'object': type ++; // 4 - case 'boolean': type ++; // 3 - case 'string': type ++; // 2 - case 'number': type ++; // 1 - } - } - - this.resultType = type; - - switch (type) { - case 1: - this.numberValue = value.isNodeSet ? value.number() : +value; - return; - case 2: - this.stringValue = value.isNodeSet ? value.string() : '' + value; - return; - case 3: - this.booleanValue = value.isNodeSet ? value.bool() : !! value; - return; - case 4: case 5: case 6: case 7: - this.nodes = value.list(); - this.snapshotLength = value.length; - this.index = 0; - this.invalidIteratorState = false; - break; - case 8: case 9: - this.singleNodeValue = value.first(); - return; - } - }; - - win.XPathResult.prototype.iterateNext = function() { return this.nodes[this.index++] }; - win.XPathResult.prototype.snapshotItem = function(i) { return this.nodes[i] }; - - win.XPathResult.ANY_TYPE = 0; - win.XPathResult.NUMBER_TYPE = 1; - win.XPathResult.STRING_TYPE = 2; - win.XPathResult.BOOLEAN_TYPE = 3; - win.XPathResult.UNORDERED_NODE_ITERATOR_TYPE = 4; - win.XPathResult.ORDERED_NODE_ITERATOR_TYPE = 5; - win.XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE = 6; - win.XPathResult.ORDERED_NODE_SNAPSHOT_TYPE = 7; - win.XPathResult.ANY_UNORDERED_NODE_TYPE = 8; - win.XPathResult.FIRST_ORDERED_NODE_TYPE = 9; - - - win.document.createExpression = function(expr) { - return new XPathExpression(expr, null); - }; - - win.document.evaluate = function(expr, context, _, type) { - return document.createExpression(expr, null).evaluate(context, type); - }; -}; - -var win; - -if (config.targetFrame) { - var frame = document.getElementById(config.targetFrame); - if (frame) win = frame.contentWindow; -} - -install(win || window); - -})(); - -// Thanks for reading this source code. We love JavaScript. - diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/iso-2022-jp/one.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/iso-2022-jp/one.txt deleted file mode 100644 index 99ce65b0..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/iso-2022-jp/one.txt +++ /dev/null @@ -1,11 +0,0 @@ -ISO-2022-JPは、インターネット上(特に電子メール)などで使われる日本の文字用の文字符号化方式。ISO/IEC 2022のエスケープシーケンスを利用して文字集合を切り替える7ビットのコードであることを特徴とする (アナウンス機能のエスケープシーケンスは省略される)。俗に「JISコード」と呼ばれることもある。 - -概要 -日本語表記への利用が想定されている文字コードであり、日本語の利用されるネットワークにおいて、日本の規格を応用したものである。また文字集合としては、日本語で用いられる漢字、ひらがな、カタカナはもちろん、ラテン文字、ギリシア文字、キリル文字なども含んでおり、学術や産業の分野での利用も考慮たものとなっている。規格名に、ISOの日本語の言語コードであるjaではなく、国・地域名コードのJPが示されているゆえんである。 -文字集合としてJIS X 0201のC0集合(制御文字)、JIS X 0201のラテン文字集合、ISO 646の国際基準版図形文字、JIS X 0208の1978年版(JIS C 6226-1978)と1983年および1990年版が利用できる。JIS X 0201の片仮名文字集合は利用できない。1986年以降、日本の電子メールで用いられてきたJUNETコードを、村井純・Mark Crispin・Erik van der Poelが1993年にRFC化したもの(RFC 1468)。後にJIS X 0208:1997の附属書2としてJISに規定された。MIMEにおける文字符号化方式の識別用の名前として IANA に登録されている。 -なお、符号化の仕様についてはISO/IEC 2022#ISO-2022-JPも参照。 - -ISO-2022-JPと非標準的拡張使用 -「JISコード」(または「ISO-2022-JP」)というコード名の規定下では、その仕様通りの使用が求められる。しかし、Windows OS上では、実際にはCP932コード (MicrosoftによるShift JISを拡張した亜種。ISO-2022-JP規定外文字が追加されている。)による独自拡張(の文字)を断りなく使うアプリケーションが多い。この例としてInternet ExplorerやOutlook Expressがある。また、EmEditor、秀丸エディタやThunderbirdのようなMicrosoft社以外のWindowsアプリケーションでも同様の場合がある。この場合、ISO-2022-JPの範囲外の文字を使ってしまうと、異なる製品間では未定義不明文字として認識されるか、もしくは文字化けを起こす原因となる。そのため、Windows用の電子メールクライアントであっても独自拡張の文字を使用すると警告を出したり、あえて使えないように制限しているものも存在する。さらにはISO-2022-JPの範囲内であってもCP932は非標準文字(FULLWIDTH TILDE等)を持つので文字化けの原因になり得る。 -また、符号化方式名をISO-2022-JPとしているのに、文字集合としてはJIS X 0212 (いわゆる補助漢字) やJIS X 0201の片仮名文字集合 (いわゆる半角カナ) をも符号化している例があるが、ISO-2022-JPではこれらの文字を許容していない。これらの符号化は独自拡張の実装であり、中にはISO/IEC 2022の仕様に準拠すらしていないものもある[2]。従って受信側の電子メールクライアントがこれらの独自拡張に対応していない場合、その文字あるいはその文字を含む行、時にはテキスト全体が文字化けすることがある。 - diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/iso-8859-1/one.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/iso-8859-1/one.txt deleted file mode 100644 index 3101178a..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/iso-8859-1/one.txt +++ /dev/null @@ -1,19 +0,0 @@ -Op mat eraus hinnen beschte, rou zënne schaddreg ké. Ké sin Eisen Kaffi prächteg, den haut esou Fielse wa, Well zielen d'Welt am dir. Aus grousse rëschten d'Stroos do, as dat Kléder gewëss d'Kàchen. Schied gehéiert d'Vioule net hu, rou ke zënter Säiten d'Hierz. Ze eise Fletschen mat, gei as gréng d'Lëtzebuerger. Wäit räich no mat. - -Säiten d'Liewen aus en. Un gëtt bléit lossen wee, da wéi alle weisen Kolrettchen. Et deser d'Pan d'Kirmes vun, en wuel Benn rëschten méi. En get drem ménger beschte, da wär Stad welle. Nun Dach d'Pied do, mä gét ruffen gehéiert. Ze onser ugedon fir, d'Liewen Plett'len ech no, si Räis wielen bereet wat. Iwer spilt fir jo. - -An hin däischter Margréitchen, eng ke Frot brommt, vu den Räis néierens. Da hir Hunn Frot nozegon, rout Fläiß Himmel zum si, net gutt Kaffi Gesträich fu. Vill lait Gaart sou wa, Land Mamm Schuebersonndeg rei do. Gei geet Minutt en, gei d'Leit beschte Kolrettchen et, Mamm fergiess un hun. - -Et gutt Heck kommen oft, Lann rëscht rei um, Hunn rëscht schéinste ke der. En lait zielen schnéiwäiss hir, fu rou botze éiweg Minutt, rem fest gudden schaddreg en. Noper bereet Margréitchen mat op, dem denkt d'Leit d'Vioule no, oft ké Himmel Hämmel. En denkt blénken Fréijor net, Gart Schiet d'Natur no wou. No hin Ierd Frot d'Kirmes. Hire aremt un rou, ké den éiweg wielen Milliounen. - -Mir si Hunn Blénkeg. Ké get ston derfir d'Kàchen. Haut d'Pan fu ons, dé frou löschteg d'Meereische rei. Sou op wuel Léift. Stret schlon grousse gin hu. Mä denkt d'Leit hinnen net, ké gét haut fort rëscht. - -Koum d'Pan hannendrun ass ké, ké den brét Kaffi geplot. Schéi Hären d'Pied fu gét, do d'Mier néierens bei. Rëm päift Hämmel am, wee Engel beschéngt mä. Brommt klinzecht der ke, wa rout jeitzt dén. Get Zalot d'Vioule däischter da, jo fir Bänk päift duerch, bei d'Beem schéinen Plett'len jo. Den haut Faarwen ze, eng en Biereg Kirmesdag, um sin alles Faarwen d'Vioule. - -Eng Hunn Schied et, wat wa Frot fest gebotzt. Bei jo bleiwe ruffen Klarinett. Un Feld klinzecht gét, rifft Margréitchen rem ke. Mir dé Noper duurch gewëss, ston sech kille sin en. Gei Stret d'Wise um, Haus Gart wee as. Monn ménger an blo, wat da Gart gefällt Hämmelsbrot. - -Brommt geplot och ze, dat wa Räis Well Kaffi. Do get spilt prächteg, as wär kille bleiwe gewalteg. Onser frësch Margréitchen rem ke, blo en huet ugedon. Onser Hemecht wär de, hu eraus d'Sonn dat, eise deser hannendrun da och. - -As durch Himmel hun, no fest iw'rem schéinste mir, Hunn séngt Hierz ke zum. Séngt iw'rem d'Natur zum an. Ke wär gutt Grénge. Kënnt gudden prächteg mä rei. Dé dir Blénkeg Klarinett Kolrettchen, da fort muerges d'Kanner wou, main Feld ruffen vu wéi. Da gin esou Zalot gewalteg, gét vill Hemecht blénken dé. - -Haut gréng nun et, nei vu Bass gréng d'Gaassen. Fest d'Beem uechter si gin. Oft vu sinn wellen kréien. Et ass lait Zalot schéinen. \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/one.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/one.txt deleted file mode 100644 index 26c94d5d..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/one.txt +++ /dev/null @@ -1,22 +0,0 @@ -Код одно гринспана руководишь на. Его вы знания движение. Ты две начать -одиночку, сказать основатель удовольствием но миф. Бы какие система тем. -Полностью использует три мы, человек клоунов те нас, бы давать творческую -эзотерическая шеф. - -Мог не помнить никакого сэкономленного, две либо какие пишите бы. Должен -компанию кто те, этот заключалась проектировщик не ты. Глупые периоды ты -для. Вам который хороший он. Те любых кремния концентрируются мог, -собирать принадлежите без вы. - -Джоэла меньше хорошего вы миф, за тем году разработки. Даже управляющим -руководители был не. Три коде выпускать заботиться ну. То его система -удовольствием безостановочно, или ты главной процессорах. Мы без джоэл -знания получат, статьи остальные мы ещё. - -Них русском касается поскольку по, образование должником -систематизированный ну мои. Прийти кандидата университет но нас, для бы -должны никакого, биг многие причин интервьюирования за. - -Тем до плиту почему. Вот учёт такие одного бы, об биг разным внешних -промежуток. Вас до какому возможностей безответственный, были погодите бы -его, по них глупые долгий количества. diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/three.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/three.txt deleted file mode 100644 index c81ccd59..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/three.txt +++ /dev/null @@ -1,45 +0,0 @@ -Αν ήδη διάβασε γλιτώσει μεταγλωτίσει, αυτήν θυμάμαι μου μα. Την κατάσταση χρησιμοποίησέ να! Τα διαφορά φαινόμενο διολισθήσεις πες, υψηλότερη προκαλείς περισσότερες όχι κι. Με ελέγχου γίνεται σας, μικρής δημιουργούν τη του. Τις τα γράψει εικόνες απαράδεκτη? - -Να ότι πρώτοι απαραίτητο. Άμεση πετάνε κακόκεφος τον ώς, να χώρου πιθανότητες του. Το μέχρι ορίστε λιγότερους σας. Πω ναί φυσικά εικόνες. - -Μου οι κώδικα αποκλειστικούς, λες το μάλλον συνεχώς. Νέου σημεία απίστευτα σας μα. Χρόνου μεταγλωτιστής σε νέα, τη τις πιάνει μπορούσες προγραμματιστές. Των κάνε βγαίνει εντυπωσιακό τα? Κρατάει τεσσαρών δυστυχώς της κι, ήδη υψηλότερη εξακολουθεί τα? - -Ώρα πετάνε μπορούσε λιγότερους αν, τα απαράδεκτη συγχωνευτεί ροή. Τη έγραψες συνηθίζουν σαν. Όλα με υλικό στήλες χειρότερα. Ανώδυνη δουλέψει επί ως, αν διαδίκτυο εσωτερικών παράγοντες από. Κεντρικό επιτυχία πες το. - -Πω ναι λέει τελειώσει, έξι ως έργων τελειώσει. Με αρχεία βουτήξουν ανταγωνιστής ώρα, πολύ γραφικά σελίδων τα στη. Όρο οέλεγχος δημιουργούν δε, ας θέλεις ελέγχου συντακτικό όρο! Της θυμάμαι επιδιόρθωση τα. Για μπορούσε περισσότερο αν, μέγιστη σημαίνει αποφάσισε τα του, άτομο αποτελέσει τι στα. - -Τι στην αφήσεις διοίκηση στη. Τα εσφαλμένη δημιουργια επιχείριση έξι! Βήμα μαγικά εκτελέσει ανά τη. Όλη αφήσεις συνεχώς εμπορικά αν, το λες κόλπα επιτυχία. Ότι οι ζώνη κειμένων. Όρο κι ρωτάει γραμμής πελάτες, τελειώσει διολισθήσεις καθυστερούσε αν εγώ? Τι πετούν διοίκηση προβλήματα ήδη. - -Τη γλιτώσει αποθηκευτικού μια. Πω έξι δημιουργια πιθανότητες, ως πέντε ελέγχους εκτελείται λες. Πως ερωτήσεις διοικητικό συγκεντρωμένοι οι, ας συνεχώς διοικητικό αποστηθίσει σαν. Δε πρώτες συνεχώς διολισθήσεις έχω, από τι κανένας βουτήξουν, γειτονιάς προσεκτικά ανταγωνιστής κι σαν. - -Δημιουργια συνηθίζουν κλπ τι? Όχι ποσοστό διακοπής κι. Κλπ φακέλους δεδομένη εξοργιστικά θα? Υποψήφιο καθορίζουν με όλη, στα πήρε προσοχή εταιρείες πω, ώς τον συνάδελφος διοικητικό δημιουργήσεις! Δούλευε επιτίθενται σας θα, με ένας παραγωγικής ένα, να ναι σημεία μέγιστη απαράδεκτη? - -Σας τεσσαρών συνεντεύξης τη, αρπάζεις σίγουρος μη για', επί τοπικές εντολές ακούσει θα? Ως δυστυχής μεταγλωτιστής όλη, να την είχαν σφάλμα απαραίτητο! Μην ώς άτομο διορθώσει χρησιμοποιούνταν. Δεν τα κόλπα πετάξαμε, μη που άγχος υόρκη άμεση, αφού δυστυχώς διακόψουμε όρο αν! Όλη μαγικά πετάνε επιδιορθώσεις δε, ροή φυσικά αποτελέσει πω. - -Άπειρα παραπάνω φαινόμενο πω ώρα, σαν πόρτες κρατήσουν συνηθίζουν ως. Κι ώρα τρέξει είχαμε εφαρμογή. Απλό σχεδιαστής μεταγλωτιστής ας επί, τις τα όταν έγραψες γραμμής? Όλα κάνεις συνάδελφος εργαζόμενοι θα, χαρτιού χαμηλός τα ροή. Ως ναι όροφο έρθει, μην πελάτες αποφάσισε μεταφραστής με, να βιαστικά εκδόσεις αναζήτησης λες. Των φταίει εκθέσεις προσπαθήσεις οι, σπίτι αποστηθίσει ας λες? - -Ώς που υπηρεσία απαραίτητο δημιουργείς. Μη άρα χαρά καθώς νύχτας, πω ματ μπουν είχαν. Άμεση δημιουργείς ώς ροή, γράψει γραμμής σίγουρος στα τι! Αν αφού πρώτοι εργαζόμενων ναί. - -Άμεση διορθώσεις με δύο? Έχουν παράδειγμα των θα, μου έρθει θυμάμαι περισσότερο το. Ότι θα αφού χρειάζονται περισσότερες. Σαν συνεχώς περίπου οι. - -Ώς πρώτης πετάξαμε λες, όρο κι πρώτες ζητήσεις δυστυχής. Ανά χρόνου διακοπή επιχειρηματίες ας, ώς μόλις άτομο χειρότερα όρο, κρατάει σχεδιαστής προσπαθήσεις νέο το. Πουλάς προσθέσει όλη πω, τύπου χαρακτηριστικό εγώ σε, πω πιο δούλευε αναζήτησης? Αναφορά δίνοντας σαν μη, μάθε δεδομένη εσωτερικών με ναι, αναφέρονται περιβάλλοντος ώρα αν. Και λέει απόλαυσε τα, που το όροφο προσπαθούν? - -Πάντα χρόνου χρήματα ναι το, σαν σωστά θυμάμαι σκεφτείς τα. Μα αποτελέσει ανεπιθύμητη την, πιο το τέτοιο ατόμου, τη των τρόπο εργαλείων επιδιόρθωσης. Περιβάλλον παραγωγικής σου κι, κλπ οι τύπου κακόκεφους αποστηθίσει, δε των πλέον τρόποι. Πιθανότητες χαρακτηριστικών σας κι, γραφικά δημιουργήσεις μια οι, πω πολλοί εξαρτάται προσεκτικά εδώ. Σταματάς παράγοντες για' ώς, στις ρωτάει το ναι! Καρέκλα ζητήσεις συνδυασμούς τη ήδη! - -Για μαγικά συνεχώς ακούσει το. Σταματάς προϊόντα βουτήξουν ώς ροή. Είχαν πρώτες οι ναι, μα λες αποστηθίσει ανακαλύπτεις. Όροφο άλγεβρα παραπάνω εδώ τη, πρόσληψη λαμβάνουν καταλάθος ήδη ας? Ως και εισαγωγή κρατήσουν, ένας κακόκεφους κι μας, όχι κώδικάς παίξουν πω. Πω νέα κρατάει εκφράσουν, τότε τελικών τη όχι, ας της τρέξει αλλάζοντας αποκλειστικούς. - -Ένας βιβλίο σε άρα, ναι ως γράψει ταξινομεί διορθώσεις! Εδώ να γεγονός συγγραφείς, ώς ήδη διακόψουμε επιχειρηματίες? Ότι πακέτων εσφαλμένη κι, θα όρο κόλπα παραγωγικής? Αν έχω κεντρικό υψηλότερη, κι δεν ίδιο πετάνε παρατηρούμενη! Που λοιπόν σημαντικό μα, προκαλείς χειροκροτήματα ως όλα, μα επί κόλπα άγχος γραμμές! Δε σου κάνεις βουτήξουν, μη έργων επενδυτής χρησιμοποίησέ στα, ως του πρώτες διάσημα σημαντικό. - -Βιβλίο τεράστιο προκύπτουν σαν το, σαν τρόπο επιδιόρθωση ας. Είχαν προσοχή προσπάθεια κι ματ, εδώ ως έτσι σελίδων συζήτηση. Και στην βγαίνει εσφαλμένη με, δυστυχής παράδειγμα δε μας, από σε υόρκη επιδιόρθωσης. Νέα πω νέου πιθανό, στήλες συγγραφείς μπαίνοντας μα για', το ρωτήσει κακόκεφους της? Μου σε αρέσει συγγραφής συγχωνευτεί, μη μου υόρκη ξέχασε διακοπής! Ώς επί αποφάσισε αποκλειστικούς χρησιμοποιώντας, χρήματα σελίδων ταξινομεί ναι με. - -Μη ανά γραμμή απόλαυσε, πω ναι μάτσο διασφαλίζεται. Τη έξι μόλις εργάστηκε δημιουργούν, έκδοση αναφορά δυσκολότερο οι νέο. Σας ως μπορούσε παράδειγμα, αν ότι δούλευε μπορούσε αποκλειστικούς, πιο λέει βουτήξουν διορθώσει ως. Έχω τελευταία κακόκεφους ας, όσο εργαζόμενων δημιουργήσεις τα. - -Του αν δουλέψει μπορούσε, πετούν χαμηλός εδώ ας? Κύκλο τύπους με που, δεν σε έχουν συνεχώς χειρότερα, τις τι απαράδεκτη συνηθίζουν? Θα μην τους αυτήν, τη ένα πήρε πακέτων, κι προκύπτουν περιβάλλον πως. Μα για δουλέψει απόλαυσε εφαμοργής, ώς εδώ σημαίνει μπορούσες, άμεση ακούσει προσοχή τη εδώ? - -Στα δώσε αθόρυβες λιγότερους οι, δε αναγκάζονται αποκλειστικούς όλα! Ας μπουν διοικητικό μια, πάντα ελέγχου διορθώσεις ώς τον. Ότι πήρε κανόνα μα. Που άτομα κάνεις δημιουργίες τα, οι μας αφού κόλπα προγραμματιστής, αφού ωραίο προκύπτουν στα ως. Θέμα χρησιμοποιήσει αν όλα, του τα άλγεβρα σελίδων. Τα ότι ανώδυνη δυστυχώς συνδυασμούς, μας οι πάντα γνωρίζουμε ανταγωνιστής, όχι τα δοκιμάσεις σχεδιαστής! Στην συνεντεύξης επιδιόρθωση πιο τα, μα από πουλάς περιβάλλον παραγωγικής. - -Έχουν μεταγλωτίσει σε σας, σε πάντα πρώτης μειώσει των, γράψει ρουτίνα δυσκολότερο ήδη μα? Ταξινομεί διορθώσεις να μας. Θα της προσπαθούν περιεχόμενα, δε έχω τοπικές στέλνοντάς. Ανά δε αλφα άμεση, κάποιο ρωτάει γνωρίζουμε πω στη, φράση μαγικά συνέχεια δε δύο! Αν είχαμε μειώσει ροή, μας μετράει καθυστερούσε επιδιορθώσεις μη. Χάος υόρκη κεντρικό έχω σε, ανά περίπου αναγκάζονται πω. - -Όσο επιστρέφουν χρονοδιαγράμματα μη. Πως ωραίο κακόκεφος διαχειριστής ως, τις να διακοπής αναζήτησης. Κάποιο ποσοστό ταξινομεί επί τη? Μάθε άμεση αλλάζοντας δύο με, μου νέου πάντα να. - -Πω του δυστυχώς πιθανότητες. Κι ρωτάει υψηλότερη δημιουργια ότι, πω εισαγωγή τελευταία απομόνωση ναι. Των ζητήσεις γνωρίζουμε ώς? Για' μη παραδοτέου αναφέρονται! Ύψος παραγωγικά ροή ως, φυσικά διάβασε εικόνες όσο σε? Δεν υόρκη διορθώσεις επεξεργασία θα, ως μέση σύστημα χρησιμοποιήσει τις. \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/two.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/two.txt deleted file mode 100644 index 2443fc4d..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/two.txt +++ /dev/null @@ -1,3 +0,0 @@ -रखति आवश्यकत प्रेरना मुख्यतह हिंदी किएलोग असक्षम कार्यलय करते विवरण किके मानसिक दिनांक पुर्व संसाध एवम् कुशलता अमितकुमार प्रोत्साहित जनित देखने उदेशीत विकसित बलवान ब्रौशर किएलोग विश्लेषण लोगो कैसे जागरुक प्रव्रुति प्रोत्साहित सदस्य आवश्यकत प्रसारन उपलब्धता अथवा हिंदी जनित दर्शाता यन्त्रालय बलवान अतित सहयोग शुरुआत सभीकुछ माहितीवानीज्य लिये खरिदे है।अभी एकत्रित सम्पर्क रिती मुश्किल प्राथमिक भेदनक्षमता विश्व उन्हे गटको द्वारा तकरीबन - -विश्व द्वारा व्याख्या सके। आजपर वातावरण व्याख्यान पहोच। हमारी कीसे प्राथमिक विचारशिलता पुर्व करती कम्प्युटर भेदनक्षमता लिये बलवान और्४५० यायेका वार्तालाप सुचना भारत शुरुआत लाभान्वित पढाए संस्था वर्णित मार्गदर्शन चुनने \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/dkim/dkim.test.priv b/vendor/swiftmailer/swiftmailer/tests/_samples/dkim/dkim.test.priv deleted file mode 100644 index 3bd381a9..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/dkim/dkim.test.priv +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQDZeUdi1RKnm9cRYNn6E24xxrRTouh3Va8JOEHQ5SB018lvbjwH -2lW5mZ/I0kh/dHsTN0zcN0VE62WIbnLreMk/af/4Pg1i93+c9TmfXmoropsmdLos -w0tjq50jGbBqtHZNJYAokP/u3uUuRw8g0V/O4zlQ3GlO/PDH7xDQzekl9wIDAQAB -AoGAaoCBXD5a72hbb/BNb7HaUlgscZUjYWW93bcGTGYZef8/b+m9Tl83gjhgzvlk -db62k1eOtX3/11uskp78eqLhctv7yWc0mQQhgOogY2qCwHTCH8wja8kJkUAnKQhs -P9sa5iJvgckiuX3SdxgTMwib9d1VyGq6YywiORiZF9rxyhECQQD/xhiZSi7y0ciB -g4bassy0GVMS7EDRumMHc8wC23E1H2mj5yPE/QLqkW4ddmCv2BbJnYmyNvOaK9tk -T2W+mn3/AkEA2aqDGja9CaTlY4BCXfiT166n+xVl5+d+1DENQ4FK9O2jpSi1265J -tjEkXVxUOpV1ZEcUVOdK6RpvsKpc7vVICQJBALEFO5UsQJ4SD0GD9Ft8kCy9sj9Q -f/Qnmc5YmIQJuKpZmVW07Y6yxcfu61U8zuIlHnBftiM/4Q18+RTN1s86QaUCQHoL -9MTfCnH85q46/XuJZQRbp07O+bvlfqTl+CTwuyHImaiCwi2ydRxWQ6ihm4zZvuAC -RvEwWz2HGDc73y4RlFkCQDDdnN9e46l1nMDLDI4cyyGBVg4Z2IZ3IAu5GaoUCGjM -a8w6kxE8f1d8DD5vvqVbmfK89TA/DjT+7/arBNBCiCM= ------END RSA PRIVATE KEY----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/dkim/dkim.test.pub b/vendor/swiftmailer/swiftmailer/tests/_samples/dkim/dkim.test.pub deleted file mode 100644 index b503a911..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/dkim/dkim.test.pub +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDZeUdi1RKnm9cRYNn6E24xxrRT -ouh3Va8JOEHQ5SB018lvbjwH2lW5mZ/I0kh/dHsTN0zcN0VE62WIbnLreMk/af/4 -Pg1i93+c9TmfXmoropsmdLosw0tjq50jGbBqtHZNJYAokP/u3uUuRw8g0V/O4zlQ -3GlO/PDH7xDQzekl9wIDAQAB ------END PUBLIC KEY----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/files/data.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/files/data.txt deleted file mode 100644 index 3f35021f..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/files/data.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/files/textfile.zip b/vendor/swiftmailer/swiftmailer/tests/_samples/files/textfile.zip deleted file mode 100644 index 5a580ecb..00000000 Binary files a/vendor/swiftmailer/swiftmailer/tests/_samples/files/textfile.zip and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/ca.crt b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/ca.crt deleted file mode 100644 index f9b681db..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/ca.crt +++ /dev/null @@ -1,33 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFvTCCA6WgAwIBAgIJAMfbOeZpF5T7MA0GCSqGSIb3DQEBBQUAMHUxCzAJBgNV -BAYTAkZSMQ8wDQYDVQQIDAZGcmFuY2UxDjAMBgNVBAcMBVBhcmlzMRQwEgYDVQQK -DAtTd2lmdG1haWxlcjEOMAwGA1UEAwwFc21pbWUxHzAdBgkqhkiG9w0BCQEWEGlu -Zm9AZXhhbXBsZS5jb20wHhcNMTIwNzA1MTMwNTA4WhcNMTMwNzA1MTMwNTA4WjB1 -MQswCQYDVQQGEwJGUjEPMA0GA1UECAwGRnJhbmNlMQ4wDAYDVQQHDAVQYXJpczEU -MBIGA1UECgwLU3dpZnRtYWlsZXIxDjAMBgNVBAMMBXNtaW1lMR8wHQYJKoZIhvcN -AQkBFhBpbmZvQGV4YW1wbGUuY29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC -CgKCAgEAm4Ry8cHla8loHgbR+TAWjtvUj6uEVV1ZzYY4EWX5Ny6iuFRezKpy8737 -Pv8HJ48OrGqWsWrXwjRsd11eIClOEyBvq7oIbzL5/wR9yelT55b+QGngQkq3nbTs -Aej8G/8HB/SEB3cA1jLRVykSssDPtuutMv5ggh4gj9piJU9cCmLpSoqXSvNQJf4V -wrTp4IHb4qRAUvlxYIYJZDHu5vsFUr+eXQvguZjxlSm3HKSe1biRuDy3RO34kt1m -fNT+53d4UNDJjdHs0yJClZv7NY3YCvC6TMkcsRJItlbl1i6Zrp/ZSjxNW6R7GaLC -NV4a34rLDbRp5GD2Kt5LVA5gpjKU6NUJU2QPdr8iMR7Iuyj2cttZFjaLOcM8p8sM -zlQqTjR0ZFVt6OapguWdi+BP/EyKKWIjCFQR/Rqr2ifpgldTGkU2gKC41W7X6+MJ -EwaxfekMvCRvEOvBDGEnHrMMRMpt0JQtrzCVaxzHsJjAqSHlLiL0SVYW9eGftRQr -sq4Pk5hSUxwCqQ9nCUft9/ttiJ6xee4Qv4wkUSHYscKl/yPJOqXYeqiD/SVlKTqC -98sCAPSsgaiiEaV5pzhJdFdhw7I/4h+liMQq7FRnjKyl815qd9+Uxrbl140eYb71 -p8QGBtnl+CyBxdHLvxagnkVccqknxkl4umJ7mYEjzdFn44J+cdUCAwEAAaNQME4w -HQYDVR0OBBYEFKPRSJpOWw7egbOTpaXoIx3CV273MB8GA1UdIwQYMBaAFKPRSJpO -Ww7egbOTpaXoIx3CV273MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggIB -AA3Kkp7u/fZd8NPqPmPQNhsQNhDxAXjtNKIC3crwO8rSJCWtaLFmngfVCCI8hsbe -KDUD3wsNwH2i08RXjwUkvCqFyEj/JlKtlYYzgq1pQ/cz5rAToHUBTMVq5k1HR7dp -J7OcOan4hV8VWO+ph6YrWDtSGqrErUPRiU1/Y7PNGnc+e2M/XUfJHcAdWgQ0C3uU -/GnuDtu12G9++yQODZw8CmsZp6/5DrTku7aBBrvgeuLt1629WhAD6tloIkP8dZtu -GMdcJFrAZ7l7Iovg7WREiC2sfTTPVM5u+7O2bA95rAPS2wL6X9jN/36m+iQZQxPC -F+/vt/4SaSya19PJkHr496qLNQmK/1rke6eg0ASv88aVBF1nyOcDZ8S+E1tPzfcH -Eao0hO89zBA8G1sLtAi4qF0zub7UJ79a6YMd+XI5ckmzN+MbEqKqoNB3Ay1PNPH+ -bH7sKN5wFwEbyPydQ/CZKBIApFy0J/xhLEpOOP/gePWJzFciXLJDD2D+d9mmAO1C -1/spWexhBoLa04WTzqUATVZ8grDzi1PDyFa0swhl5HRQgWK765A38xwaXqwzh+R7 -mYFJPr3hOkcTrb/RKQFHHSqtmKVf7TWcXN5liBx5Qwi9P57M/LKGFEAkk2iqM/TY -y/QiqwrLy7kNbYJKatJBmxwoZFF/bajBqzWgJ25cwQT3 ------END CERTIFICATE----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/ca.key b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/ca.key deleted file mode 100644 index 602df00f..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/ca.key +++ /dev/null @@ -1,54 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,6B641FB918566EBA - -JmfykH5+jbXqp31r838O3xg+MBD9zAN5KnLWhVBnIr+AjG7bzSldhpj9upSUy4C9 -rb+pq2KkDs2Z1fHS2RelOBvj1BeYrM4MEMQiAwHabQE1A2Q53Ef5uZH15hNfvL/J -ZgHCqR8EpZ7a/5Bybr5jJPiTTWOVxXq3SKxhCzqvQPD2z/ADgYGMw2AcLwN6EeAa -IHgLgvBfX280snL2CgoQpvog7Vzk1zoVu0Vf+n8iOi65F0xViAPY3r6PlIpcqb5U -lI6Tuy+32AKpimSTqgHSWj8iqmtMNRRZ988s01wGgVAjL2B1dk1wJaerU0X04dM3 -2acRKHTsdDqmm8KLhYYZjf/CkLp3ArLnIa7LUg50T8LiN/A3H2tXuLRknsTLtud4 -95PC6NHMztT1Vs6BxkAoB+bJGKTB+Rj0z7FvfPydS3Y5UlrYbOgRlVAF2LCF53kq -2Z0zEfQUC4wxZ3stX+xZ6fa8kf/ET19jzo2YhA4pDNHf05iizkzTPsiUlmHZiuC0 -kaw1XuT5/dsyF6xZqAtwvnIgS4VCicmwJGo20CCYx39icm1Uw6f3LvlIFVL3Tl5B -tHICscGTrRNlqszRoU2Qps5Svs40qJzOQhOhN5SfoRyFx/s3Nq1yBaLfO5IkXmlE -KvvG3DSJiQ0RaADHi0IKacJOs2bnAC4ZqZhndNUz4P58HXIy6LEj1Pulb55Rc/tt -kG4znrmoKjXIIs05RMzVFbKh7XRUEB3xhha9CmkqcLxSV3NM3qOKcHhXitrER7IS -ldXI8ksJqtEhyniN8XlsIHenypCv7lHOCpim1h6B0jEIaouB3AJTialNxfSRBwfd -X5yq6y5JKlujj5ybgE7y7sNHjGp7nC3sr7lf6QWBw2OoWJm/qQ5SpmHzfzzg0fkz -BOAFuSE/+/tiht/Ky5Knh4fK6xH6GrUWBYyAl8wD8l/YKH8uvR1ndjiorW7mC2H+ -pXXLum9bMfgubVBb/F2mP2LVtLsthlnwkH4pzg5n5NyI3VePguXZOZlI6gXRbaSc -13marX9KoW4gL9i7XZXzRIA0VhY3ixmhoQC2qjeO5fnhttPQtWsn1w3A1xPjUMJ+ -5SmPvXbd5fjTrPD9M+RqL6r4OWi0cH0kiub3kcM/xEgElgmEDp2eVTepkfBmcSeF -ZQt1sD5+9ho+GT61lJT0IuSRyhX1F7bUR1g3MNiu1g5j+vZUBjr2QaXYqyKNGHyZ -/SvRb91btzRkg3Sm8DgCyWavmm2GbUoWnnrghcu7HzHUn2om7UsT3yUmvL+17v4+ -WY45TM/iu4Jn7r+kQxBqx1hp8AEjEjQLHU1jw+J9ZPAGpTJiJLEUN3LByn3+urjt -Iivy1MlxAwuXCBeEs/UwGhG7fxmZJUFZ99eL8zoGb6kDDWvEyqdfmtvS3e5QJ+7X -MbCXO2yeLWPG+Ccy/YoZIXfTwlNEq4otwP+TqIg5HbPZPpP3m2FRQ3au5WJjrqID -AXLhgyAG+4QwMr3hx656n/bXNypNjNJQmQodGvSigy6wC2bRWnotD9MLkk0VHqDu -aIp95jADNchTMlafP/ZdGkU+uJT8v8bCFwFV+iHubpytnvaMj7VZ4U2E8tKnT02c -HnrzwSCU7TuldnMZ4C5UiFtaY7hB1a2XBR/fpJaeo9Veir1rHD62mf0C+jsxZ9Is -VCVv0JoJKj3W9Zgqc3YxPFYEPqAkgjQl22wlI24+9YW/t1icHAPyFPN/tUlCGyO1 -jJtvW9MIlGGnA2OClucA4/bThMj8DBn6a3Q236adimiyPamPN4HlyRHeaWNN4RBx -uysUP69E7doe72wEDLNCPLEPA8uKnhhWVJh1I0FzDmoOUp9VCC+qlozi+4KlVA7A -DW//4kOzOiIrnGBLJimQBhitU6lIarwWL7+ic3LTukFHcS8ChMeAt6yrfUnMSDNe -W9f1rOJOiSnV7XxOchc+dcwANPcyd78s0Upw6jLA/fOl4oX8AUE5/G2iplIlC6Si -3i/ES7MyxMdJPoJoxQWhs7xNo4P5XFhBT+uNK95B2Q/Hr9I3OcJ7Dnlr76aIRxhJ -59BZFCggooZAYaCpXWBH5AbGwLPTAFipHBhGKgkQDg+Wz9W6cxYL5v4sOUCE7p9n -EFFtM+vlYabKD11a51c1XkN7JwSTKmCK1HQ0cPw2jMXePWr9ldyGTk0euFVn97ZM -gD0uLqPn7uqw9ro8gztgTnmFl6Y3/gtlSVV5RnKw7UKTRZ3rfNycVd/vupj7JpW5 -dzkxF2nVrhELEa5eOJN9vck/KNfWmZO+ZzFVALZ+aFS5gxbNFWS+U6bB9C34oMIZ -6c+r5T/P4b2AnWSiJ8vVqRouWCdmEPdcX2j7I2onh7UJrQhWwxNgDZZKjQ5bCEiX -N2wSeh55smVy80ywGz67coYoF4Mt18o7cH/N6XLo1QMQfamElwPsaKEnCM+Ab3JM -GqnjdWavDJK80MxXtJNy+9ZUWl30eag967prvEQ7kCoXhiIrz20dmZMNMRLpgRS9 -CAtvSP/3K6O713qxqFgjA46P0ZCmlPvhVPYqjyVDmbYb61r0Io+4PPlUFlXBWTc1 -W6EV47SsGHqjWYBw/uh5omz6fMaPApOt5SzPb1wdFI8pDGUrjW5TLXwZ8ZKeEYY0 -4qlVG0H1dJUU/bnDMzIXuzB0CXnF92kiubtOBwFXqTDNxgZmQj3vf/qITJyqnLxF -03qtxEi7u8O+3ahI4OcrvmSsFwuTmMEYK0xySbKvkOr7mKRSMSR5MaGv2Q9EKBXD -bvnnMaAIC00i2vqfNhIIdOTnUweQj4CCawzL8bjiDSO4WH4HKV22RA+8SH4Aw5hw -4v/WHMw4ulacYvlEEicMcrmUGzcu3Hms46RF/Kz4d25qGv75LJhLKLX7dvXxBOt8 -zaehgPeJ5+Om3ckhnSfWOYyj2EAU7RfyLJat52xZcB4zPZzTxoFeCAIs3UjWId3g -PO+twFxtZ74Nd2l/x162Xjf9BhdIJT/5pf+I2vDi16r4t+7j4Jo+8+Zd/36QhXYv -7ilatnjbaWsAJQq8j3/P1uP4SSL3cXfU9rYwiNb7dN9+S9DpEklkBr7ZgbFFhHfA -OHpwbX/pWy65hHZ6OvZ8WCNtNcLIbwwJUbQAuzR8gNPBI2JlWlSwPvs1MRRcJgkP ------END RSA PRIVATE KEY----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.crt b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.crt deleted file mode 100644 index 62c671f4..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.crt +++ /dev/null @@ -1,33 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFZjCCA04CAQIwDQYJKoZIhvcNAQEFBQAwdTELMAkGA1UEBhMCRlIxDzANBgNV -BAgMBkZyYW5jZTEOMAwGA1UEBwwFUGFyaXMxFDASBgNVBAoMC1N3aWZ0bWFpbGVy -MQ4wDAYDVQQDDAVzbWltZTEfMB0GCSqGSIb3DQEJARYQaW5mb0BleGFtcGxlLmNv -bTAeFw0xMjA3MDUxMzQ4MDNaFw0xNDA3MDUxMzQ4MDNaMH0xCzAJBgNVBAYTAkZS -MQ8wDQYDVQQIDAZGcmFuY2UxDjAMBgNVBAcMBVBhcmlzMRQwEgYDVQQKDAtTd2lm -dG1haWxlcjEWMBQGA1UEAwwNc21pbWUtZW5jcnlwdDEfMB0GCSqGSIb3DQEJARYQ -aW5mb0BleGFtcGxlLmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB -AMJ41eLHumb6qpE4tb6gOUWX2vxZciLAnn9P87VoYSTCTN9z/xSFAlf0wuBwarrt -6CR7WAMHq4JOMgQrZRPTw8tOeKjP42LrPh4xZcTKQof+L/xM0EoK64NbwHxjUE2N -qwNZJhCvWpjOYawHWGm+UFmNU31eC6MiPbALiBYjEhrQBdfJ/1/k9KWYkqe/doUc -XUgP4PoOFZy/RZ4O2s5EnJKYTgh5vL0T2XA6xHGpsnlRJLku0ll0uF8PhKsnB8qJ -uzWJbQjmve3G/QSZBm+/XJscSx37HiyzADD/aHZOFM83qUs7fV/GQiyCCPVzHbyI -QngunEwlWf1UcTfvxsfCqIVwxl3gLJvPRg1NIQFOMPf+1bB5ViBmn6DPPM89PhYF -vwpzimoXWLa7bIC8pA5i6cfmhtFn+w+8MbgoPnmtixmU1e5nqTguD8ChgIa0u+Z8 -+IHurVFaq6nC/3d658FmC2DKXoo4/lKyUV/U6leBLMo2kgDsnBpbt0FLZ7Q4Jc1w -XIunLedbXZ+LgCb1zKxmrqG4gBKgYHxd6HNWlqjL0PUy9XL+ZP1hqP39GvuQisL/ -BzwVhWXTHwxJ50gDkHVQhkohge9sBlSoV3MrMDRFDgvBaaLJEFd87cFjMY2XSSxn -3vBTK0TEjVSLw1WFS1xTXO55J2Un3nJ2iULl+QYIplz3AgMBAAEwDQYJKoZIhvcN -AQEFBQADggIBAEtVmMuuyaTnwGFca0HPTizzrsjAPUL7skgQ8iUTqDwJPmAmDqTM -ql9Iy/ZGc8IrYODi/Fl8t1LwAV9R1RU176jtQXGu6Jb3x/BBvCyw5ZhioLaDwx0w -jjifep2gQnYy8e9tm172WXStMYFe70oRY9tgTbqzQ7PzXadAcqtSShGePIoeLl/0 -NsO45IstaL0q9AlvyNrbn3JxYGTEGiQ3HmhEYFwJEfpULMmTUPa15lasZ8IkhQ65 -QzqKkmElIeNwzBgMRypKZ/IueKq7xCra9MoeVkShgmiw2xyv1kR50dDpxneBPg3E -vxczYq7tlF2sJC7PlIyfi9AJdfU1fl0lKav06ck0Ge3rEh2Sj+LJmKQ3DQggwJjy -E29L9C6LXAjs80Pe7plElDsYmFEwWy1aEhTTwlPp7J3PcDpsEmtycYDE6xCTzhda -eBoHkNmls+lNdLGYBGMf1VhZ5krbGDDXuPSBG+QFJgJS3LT5/sCShhQ5Nk82Vl7a -pdRA271mBrYHTjkQqcf6c0nb/ZLNfSDhi/vO+iQ6og5J95Muc8g3kK7r0j6Grx2h -skB9RnjC1TBtRVXoYc9fjKLLHuYCkNkeovtRax0qZaaY0NbwJQ5fIqvDaN9U6r5i -ftuEjVb2OXWob6ZQ0fsPBAnLGCT3FYU68sDLpmy+jms2hwxtWXnSyrBLMEowCgYI -KwYBBQUHAwSgFAYIKwYBBQUHAwIGCCsGAQUFBwMBDCZTd2lmdG1haWxlciBTL01J -TUUgRW5jcnlwdCBDZXJ0aWZpY2F0ZQ== ------END CERTIFICATE----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.key b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.key deleted file mode 100644 index c6116516..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.key +++ /dev/null @@ -1,54 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,7662C83C21081CC6 - -1j+olY4K5EcFUfTfheSMXTJF2aqw49syZ0ZjIKRtJle89Nx7raS1u2mHgAe4xxtq -CS+Hj2M86PqLP7J2gdVFwaMtnVnrqKiDYv34zwo8WPg4mz+IFYu96huswAA8UyCO -7M4IRWzPlb4U/bo2tEaEtfduenRBGNaORnFJy66+7tmmj7cYE1WUeHXfjHPnoTTG -670rWJIacJAZQDk2CiGM+Y2fpxgAZKKXFYIBj7qErIlLG7eVH5VqoABrIzOZjF+G -dvgVXrrKjjc3ZMV2f1wEYxUe2rTQQbQa1YFnN1aUBienRPdaXiyvCeUeIclKFS/o -nnE3WRc2XF52SeZeDSyEYFl0w0B1ccwtcTgaqTuTdXCgGP0vkOeg2fII9+EbxYx4 -xFiEMoXQnps24IzvcrQYsKkBEUhctwosmrDjSGTAtP2zMqLO8CJDQDDkMsMaSvCG -M0jMuTHz5gq50edKKlTvwThungqrvDKuCw5NXFR4Y4hFaN2oOStFji3P6fnLXi6/ -e61CEYxK5ClMVBzhKDfrUHSMLcS7C85rMDS4ua7k3E/QHFCI7Wspcl/54VZ1Ku3c -kYZfGjqnkqGPAnaBMDIZOboeNGqiSBqo9BsQH7sKnLGW/K1pHC8E33IxHT+KKWBW -A2AA18TL92/t1iHtUZzL7FBpBdd6cuotWVAJyghe7d8BcmZ/PrQn8uxbvIHLIXSo -hQSzjwvn8VQBqnkxB9IfJFJPXtoUkz1ViHA851F1KnnX1yCi+sc0WZrZPn2szH9h -W/CQnqJzwk8yn8WAJoj+CpFHLJ53nk3mjzJS90/7MRlNUF29sQl0Mm8ybCGncs0g -SJqoTMaWQoEzURnFRxWm57jppsxc/uKdxcfVE85qhd3IXGfIgY9DfIwkZfd9keVA -iP07Z7OCeVs+Q8MpD8UGunD7luZM0H1j1nqFOtlUKpiQGBnxySNmnktC40GZvSPP -V8e0K46sBLiS9E9fYKMJWxzieLkEoYnQrIH9Erz9nBFpG0k6uvd4B2kjkoG6JpLZ -+slJZUTmaV0Z3HGLd3myF+gb/mvFBQdSncDfyOD/hG0jiq2E/xRTb1ws369NNOTh -NvW+FNrevQtchAIQXrHIOIqmFM7i1LNLk9UNB/lXi+u+up18i4i+ad07/3iTON4I -v0RmYZOUuxpm+ReypOWB7mjSm+nk+WrCSCMVlK21m9VBGKa1z/Wr/sUIIJvCfmq6 -TAbJ7/+V9o2S7vbhGJ5zy5u6mM3Oi2wqnOl/MeKbfudkIXNcCFZQH4rXSAUX6ID0 -fkSloO4A1ZLym1OOAP+08ZHHj4r+qM2PnyYUmHZ2FExRjdtVm1W5N3zP+gsPNBZ2 -aK7XCsYFNb3hJw90INQfd9nj7dR0gmIkmE9tJ3kHXf+xwm2mOu+jt9ciCxrg575z -3mv5mbYdi5Vq3cn5uE80LNyFrmpLuz1SSOcznNQ4KX+BFV1qgoNyi1PwWGA7VH/9 -ApXIPR1M1ziZI8hY/yZmc7pdT+5JYv0mYZ4peOan6nBjYwE7/qR72H4ES6CIc0m/ -9ZW1cHLOigrJg+OKD7W0aoufzN+vdWfcyo2X7n7S/LyUSMtnHUtGhCR1IBv5w18q -B7u9Od6iiejrYNOnqc3no2UiZu9upePv+QtoJTIPCDD14U12NvOS4JApws1X5lH0 -iecKhyNZYz7chRCBXzCRwEHxHKc7GzKTsEbMkR+H/TCG6MYDF/yQj2nLpXBYraIK -ula/u7+yM7mHHUp09W8+tgk5cGRwjPqzeEuVVosfQg1UU+FnJw2wS4fGNCC1pzUT -HV3S79p0YX3/SrNtQ1wOfHsHBtzFtJqMDrneR4xAOxJot8wM7Mo0v6SRtz350egF -ZSYdymzn1Q8pw71voidFmbJ3VzULSyR9vak3K2mozdG/kT5tQ8AhWP+j66UmVCu8 -87rv02wmITi2WwjBtnNq8pwjSrtajezpSvt4S072rXE1iOwqodXL19Z7tS/fDTOJ -7Sf7WFwksVjhkIM+Lqrgz7G30CO0+OFE+gAC+Q3SbUkzo4vPrXzxqXuB2gLlEIsn -4HWhYHPMuJMXpgy/5fH1sS5CXvl3x4hoETaJOARmdje2pmPqGUxpq9mMnbQfKqM+ -QzLXW1cq7mIz8s4lF4SKgP0wpKo8tNhlz51SbYD664IRYGqAP36Y/XcMFWfTh1IX -ZOZVJFPJthGLCsatxu+OTR6xvx9/Sc3OcPh15wsy4BssRcTZumBzGOI9JuGtVUM/ -X44yWdFki3Nu5v9Ag2Qj6CHg5bwDRpQboabjHvSgopDHM/doRdVPytGSAIbZG8DI -dqe9HN94w8K1EDtCARNVCrHGOWu+hmta86+I11w1lx1mdfjWLZE/uJyeQFrTiI6W -IaoBf7m05XB8HaHxLnr+zELck2GXsyZGKOGdKQZ6kbt3IIE+hezpUaGMsHx7yLI1 -ZDZpYlEUVDZq41OxT6d8RkgesDCc/NEZMbpzqXrkwGOiLpYYKeYHx+yIhxrInE48 -Kv9AGAEiFxK1EeqoY9GLGbj7S3biKtLreT9jtczOP/k2XMujR0WaqPesyz0XYA1d -XvstAHDi8z7heuMhOHo3rJ36aF1D5rQwlT/C+zR5TuEZZdJo4UJo3Jtk6dbvluN0 -IpAOQyewnWH+UvIzjnoABKwRXVyjs8ypuNWpyUfVZoXt86gmgIUxjx8U8UeFdyt7 -qsk2eCsW8VyiecMk25MZ0ooirItlQ0KawfhHK0KbIqa4DSyecR+cSjQ7PpuOFqSK -2vedOd3qZuY+4HDDa5KWXrzt0jiP+Y4wEHQBxlk1rJJ+8UgysI5lUc4i+cBPugP+ -PYs4jknYpzwzlRMqF6RJeMytVHAdfzuIYGx0/39hY2mfSBHDd6Fi1yupxB0Hm697 -9VKwLoo3GiO/AkHGsTeylXAOWL5eDa8EBO8Lgj8nHTgsh7mM8UWFNMxO1F35OyRo -zT/GDus51Noe+KTnvVctlZF62mYlBpniQ0rZf3nNMDyAglZV1HsvtMGtqsTdwoqG -Wvo5GYqsrrttcIg0Ad7aw+ouk+fC/sH0rN6yMiCLoopf/uBmNNMFZQtU43FFssWl -eea1ZPaN5HcM7E35nZlTp9rFCPzfAYQ1BogDIRZSVOqLWqHudgjNP10HyeCHe6BS ------END RSA PRIVATE KEY----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.p12 b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.p12 deleted file mode 100644 index c00d3004..00000000 Binary files a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.p12 and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt2.crt b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt2.crt deleted file mode 100644 index f1dffd34..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt2.crt +++ /dev/null @@ -1,33 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFXzCCA0cCAQEwDQYJKoZIhvcNAQEFBQAwdTELMAkGA1UEBhMCRlIxDzANBgNV -BAgMBkZyYW5jZTEOMAwGA1UEBwwFUGFyaXMxFDASBgNVBAoMC1N3aWZ0bWFpbGVy -MQ4wDAYDVQQDDAVzbWltZTEfMB0GCSqGSIb3DQEJARYQaW5mb0BleGFtcGxlLmNv -bTAeFw0xMjA4MDgwODQ3NTVaFw0xMzA4MDgwODQ3NTVaMHYxCzAJBgNVBAYTAkZS -MQ8wDQYDVQQIDAZGcmFuY2UxDjAMBgNVBAcMBVBhcmlzMRQwEgYDVQQKDAtTd2lm -dG1haWxlcjEPMA0GA1UEAwwGc21pbWUyMR8wHQYJKoZIhvcNAQkBFhBpbmZvQGV4 -YW1wbGUuY29tMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqOagZ7Ui -QNNtdSWj29NZIKnTt7IruP7EqEiPYgGQDk2tP1f8u1QS6JrLr9GEvLuT7jDT6q5d -tqFAomDbZR9kjv9V8Kq28k5JQ1SJYDxt7sIgRum30woUy7ua3dgB8v9LheNvoPzU -ytuJf9X9t33y/U75dxnjPOkD/7HwnihIPLJcf2N5Pyt8ggcc5tmMhqelzf2gy5be -xcdWuIPgsm+0KzdD9SRu1fB3QwTmWRIAxxuifS0732djBfLCu/DyVVqWVczRppEX -nu/euEoxzKXgAvJOYUNSbCi2SZO60v+gW8WWYoPvVCa8pClP181YkqQCP6BAxl/X -OS7nNt+vHclzJj6000clndy2bUa25wb4w49WpAusQUcb4j6PQFz+qzumTQmH16AE -GrOqwQKDNmkulRXXfDpV9PIwZpE3VPIlH7dPoeaiJAok5IghBpzy6J3VbXqjo7fe -3+Kgg2LjOt5tMAN0xCn4/nevN0/JByQcQj/NG8ZVt9Cyxfh0GD7Vicu3ym7OlSYb -313HWU1sOy2sIECgS7zkWe8Wy2l85RbFB1bFyBYmCf2eskEW0EyVc/2/DewtozFl -wPj6LC9CITLUydNTrosXtpyyeEETWbsNsA9gTzs6XI+BxLUXuoNmDKFsAisKDdrG -V5FUUt+FCuXiPzIJmOM2Vb95fOzjjqjCAjcCAwEAATANBgkqhkiG9w0BAQUFAAOC -AgEAQHHZk8zKAjDhA55bVs4MgPFlN06glTrURypSwpf2bXlnqZZnVjpLvY2Qz+Wb -N2bwXx2FhV5ZlTjYCzDBra8V/Yni5EauobB5NOzzrzZrlWaHFbkyNpoz/JDaV8Mg -twCtS0aftMhgEM/F+HB7SnSyAvLcjcqoEMx2RrMm63wdPM+LbX9Fkt4m4+FWWdP7 -QJO2eV1BjkNsoMClNp2JDcyWmY6loCJYqH9NqRF2zVpw81T+iYsClas5yEBZNRg5 -eHInRX52UtepD2KUqG7evX3Uh2NEsey17k2um4uGX4DE/rJHbsfLqENMfl9nynuL -bBpdnRzUlnk/ZpD4qvPH/VwpwjTyOXNetenqWaK4VzQLP/psA4B4VSl/8gVsi3PX -C91lvlw+a2t9Z4FqYzJS0ncEVH1Ulxr3S9Dm6LSVysOBd6BLP0urcWNR2edaUb0o -xwowCZS5MhsvzwEBCbxZ67pHXLA3O6uGhuF7Vq6HyVX91tRWbjERfukjgiha90zN -XGeEmhqi4JfDN2upFcXgKwlDrevAuLFD3RJs6DbGe0L8pp1sKB+F+9lWT9HgDYEy -6R55/KjN9o4P6zvW6EpbBIGGcxk0Hak84JP016WnSqk64xHnVydLDumvC6oss4Ry -C5xUujR+QuoZRSuc1lF50iptv1j1GXeow+UHstv+IznS7WgwPTAKBggrBgEFBQcD -BKAUBggrBgEFBQcDAgYIKwYBBQUHAwEMGVNtaW1lMiBFLU1haWwgQ2VydGlmaWNh -dGU= ------END CERTIFICATE----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt2.key b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt2.key deleted file mode 100644 index 14e1412e..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt2.key +++ /dev/null @@ -1,54 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,AD54708BA16E6007 - -xWTYXMib1ULkXl0/KynSJ5P4qvcbYZvyclRoP0ppD+egj0WFi0HMRtQlfo2asIBf -DHk8myDsUp73mV6SpYmZPwzGqIJkoA3tZvyKWfb+5OG2x+KpLwzGtCcEoA+Z1TMm -/BCRvQwEbcYgKPoEBXLnFgK/mWBEPm3VtyFHJ11C5zzKCRmjlQBJSAWzJ8UFPkX0 -Dt/w5yBIKQL8dhdxCdWirqpx33wghltu6AMgWcGlsHXl/PExXw9ir3/ddyi9MRCW -/x9XXhqr+K1BSJKW8LIRj0O4ipHQ8mRvvUfCX87nn4Sp39yslyokJhhvttrjCg30 -YlyVeQZi3BgZCS5QG6F3VR9KAGIpw37dguEO4/LLhDYDVZxTfIvuCssY6mDfiGB0 -M/qeZq6OfGKOzuLtMXiCMtGacdc8mzEvLI2x5XmoTaNI7SRh1c2VlUdydvgrm+Fu -9EUt7zqkBlwCO9RAGHCjK21Mh9Zf7q/jzQLTDLXL5rURfga5Jx3XhRUpyb1VOV62 -75gaYU/rUpcFnsWiJxyWwPHV++AgXHzC/EoOeOBsRtVVZprhXR40sv/TjJxc3WTj -LnMmt9u44pVPmv1R/++sd834PgPvuSEKL1dPRb4zDsjEZhtV5ispZAXC3ljYv3eS -iwgJm3WLh1AmRBnoi7T+A6pG9cLbHX6hasPBAD3Wn/w/lGOFY9bt2v00dU3z5F1x -NWgefx0CX+evxfuS48yBG4XntL99DX+BVIsuqyQc1L4/pPWsxJ/Ihbgoi6NAz3BZ -I5M87mcy3rIBru7/bmMssV1hZ5ZS+vKVjuDHfT3oJAJzoHf9m82+4S+oS9+FUieR -ARj74aAmT+6PbPN4gxFsXv4cwOJbCZNuIyNdaAul2+X+k2zgwVbjOWoH6ge6iZXb -LFFU0cVUVKPtT4P8JiE/i8K7VH5mAf/CTmXqG57UD/YU175Q+U15ZKnZ70EMFoGy -clNtewyZZGBIIEMuy4pCDg4FQpk6lpCp0VTF5idDOIAyHCyzsYB3IQIbCathZ0XO -VtKFTcJqLGxPGVD9ElX4X21oXxNBQc7UiLGm/ESFRiUZR4mBGh8ZKpm3x5A+iNfy -bypwXCkmeehykXMglvbiQ1ROUGujQmFDGBe76V/eUhXGV99qAs8FtWzmqoW8iocR -jRH3hwSl4UL1N4dLn1Csb3sFyazBWmVOetvUab4LVY1yezESRCPaIngyLSL5dwRr -u8yhYF1exXBrk9a2nTeSfRn16IAGxOOr2fT0UmW5+Q11xBZzNlDBICErBjKe0T0P -UdQqFjX+kzekRThyJr+5Hcwr6dMiR/t/Um2m0jb1ejhW7Pq+G7hxN4N45zBvSZHN -R81454iHIBp9vtlHN3/hBhJg1HHmsxihqiiRzRpdMpw5mWJNI/+/w27RzhJUVgwx -qlym4Q38wCUoIUj3aqdGCgNqSuzYCRUSg2d87OBWqKLHFiNptzb7vzuwv0F4xFHK -aXB5N2ER5miY4GblWmxhBjPjc6gBwtfBe1ClMTZcABOD1Mhs7kKQi3U00qndykIW -GR0FDvHIMBTWQJFNTu9a+gd+B1cTqjscvjH9sVA46yuSjftBbqxc/GVuXWpAU7Gl -rFRiuf9yL9uWXzwsZTXWuPjYQxxEshJJ9fdCpuBnNODKppMUDIs0wgvXZ7gWmy1U -zkX+6Vwzs1hZUQqQOKk2XQgWIQR+dBrsC611pU1VDCr0f2uTLqFWmkcNSnyqJyOI -bNpbihkim+PJxhHf9T4rZthNGpynLQTXrsADndMaFM/CxBfoAHKvrS3B0DdYHA0e -J36sbYpjtd5SXiUVtmplkFXUC1vkq2fq9X7TbGbUOCZ18/O6SYxrZp6YXuTYK4lo -nqSqhgKohFo40I7mTivGU3P3WMeU6LVC8zj3UjVUaYh8EbhWvFUjU1rROl4ecTmE -H0WDEhXp7+0K9gEz689Ui3nTz/CJ7V9lbU4eZby1o8S9AKrAL7fZxiQz98Cgf0Qp -Q7WQXgyUzg1tyYVHq8XLkyggs/YNCzpA3fnxmdxQeNvYu1z+dIHLTesgbbxSXpvv -BJSTWJOT0uNL1aBrtlrSnFbOQBdYK1J7W6GRaMZFyqTFIjNqXP/6pl0GBVT8r6kk -5ksgcQ/0ZJeNXUhEnGQvhrKKPJqhYt8zM3iuL6oRyaxuMmR6q9+p6ulTONXcLBl6 -KnjkL2IKfEOebBmXtIbVaSgVxnl/5IwF7C0MN39cpfwQifElE/7zREXpgvccl1Av -59nRewkVcfDJUO7Fg3xZO3SpngifUAPiABhS5cQOfTp6M9LFAgbYHolGMJ6WXSWi -TI/8luBgUawGOhN+nTl9akzVw5FmaixLNWU6ahS5RE3I1ENXBVVO3RF+qhN4Lnbv -BtyXrorIBNvrNsnP4po3+nFLYGpoiUDA/h/nhuwBDG27bRxoesZCYSOOTKo4CDaO -0zmqsFKCWBoZwWDS05VVUHgWz3s8RLrzIQGDxQhkO3EjJ+FQxdizgnDC1GTCx3CT -510iKlXRqk1zqWJbmAPUevI6hicFwzVKWQsncrNATupG0WC8eDyCgBgbpdAni473 -F5wR1m8+pQ6fqpRVeVAE2hy4l+UDaAjNldgW06KAC4onqtRbdKek8AXFCC0wPOPG -NE3UmiT4auUkeKrAK9TKEehzSBXzVnAhthowkydApiUDJDcqxHhp/xfXTLS72l9L -MFEvDMZDHdyHYrD2tBVsSGiuqgBCxeCdbczJg9ocSRfVqutJAFzxs8Wo6aJJzXxg -azaWM4u1aPld9rtM65d3Z/UpS96qEuHlcPDhAOpg6wZfaNY+EeilMlrQU2ITy3m7 -qC1kzpu+fqYOBPBoLKIeXfCr+3ScCDn4XasZYE+YPoWmm3WELCPhCDDxea+qmh2A -/z5gUzZAdyt30NbKPyRRgyQRHvnJgLdQZW/jEcXq3wXBUsL+vzK8figqcbQR/Mew -xKH9vsIzojDXHd90isfFCreu6+xqBQib3chujMc7/jBlqZ3JUmtI7cWM9AamwujQ -zEVuKfQyrGqaJNy8w7yaRW45ffuJAqffpOjNQWIr2RMsKw2NetAIw8mMgp0CWb3p -6mFHZerpiEe7CPhSUj2bSATOavVDOxvHyg7AY9zytBuumMdBxi49fP2igCF7frBV ------END RSA PRIVATE KEY----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.crt b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.crt deleted file mode 100644 index cae05a09..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.crt +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEYzCCAksCAQEwDQYJKoZIhvcNAQEFBQAwdTELMAkGA1UEBhMCRlIxDzANBgNV -BAgMBkZyYW5jZTEOMAwGA1UEBwwFUGFyaXMxFDASBgNVBAoMC1N3aWZ0bWFpbGVy -MQ4wDAYDVQQDDAVzbWltZTEfMB0GCSqGSIb3DQEJARYQaW5mb0BleGFtcGxlLmNv -bTAeFw0xMjA3MDUxMzEyNDhaFw0xNDA3MDUxMzEyNDhaMHoxCzAJBgNVBAYTAkZS -MQ8wDQYDVQQIDAZGcmFuY2UxDjAMBgNVBAcMBVBhcmlzMRQwEgYDVQQKDAtTd2lm -dG1haWxlcjETMBEGA1UEAwwKc21pbWUtc2lnbjEfMB0GCSqGSIb3DQEJARYQaW5m -b0BleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJzR -CMJ7ZqrqgCOUPcIAQHD/NStY4QOaU3P8/OOke9/ZgM4qKxXAKcWiqh0rOZWXTyFp -sIEVQJocsGxgsC967cmUcHn6o1cE6kAxL8PKwzQ9v4wqWB6eak1RAZSjjdNTkePi -mZSH/1I9DFp2wO94+paZtv2pgYh/Iu4Nrm7NuRypXNgMP2RuMaUgW6ayjP2lizXG -8Zc3cfTOHMmoBaXzmf6cRemB01vVkshKZoyVlZ7catn5fX198TozDgWV3JY1pVIt -fVP1N6yJLIfQVEeXCJsL+/ROdxCgArhpKazVL2FdsM4va6Wk6yqpu11g8bG7QWBq -v+PSkU6FEqj3AdDRrV8CAwEAATANBgkqhkiG9w0BAQUFAAOCAgEARdAkfO/jQ8Tq -XNn9vS6TVcqlv/hiW234wwKaGXWw7y0ToSVxzHJB8++5g762jsUDOnzd+hVI2bxS -3y7oaVR7ZLoHyCYLFTQa2cVU30YjZUKPFi5rffy6+71uZNW8OO0/5QQ0JcoXPjw4 -PoEGurhaku9nmxbhYnOtRFWjS+npq9XPQpn2oZa43n80nAfnR09RwyqKltRcbIP1 -CXcQ+7jVRUVhAMOr+OEQT2yK1HJ118Bu2I++Ep7FjBIo41b+70aKjFxZO8NUd8rV -meDb9LC4kF58qn4sH4kQIFJFRx25hEbSZ8D6UTgKDp6jrdH/z0xYLi0GGGMGvkoK -ADFjWbEZaLr5zKJEE3a5XZkjMaxDXMYkIZ3CIwdC3rpsuo2F931YalB0TRQnStxw -10H9cWpQk1386850ROMkZ4EcNlTGiHzyBZOYyGXf1zSyW8KoOyHvzss6D+Hwl/nu -bHm8ZZ4hJ8kyMgN+klR0yaJ5Ao8ED9UkPZ2vLlpnIblSHjO/8sTmqAsfx6D3z7kM -qN9JWwkXLVXasXfySeFb1rqbini59keKqmSnSXkjqCwgtzKm4iysVPjfqOaz31W/ -yDT76ANGO0z1Ko+7O7t+LydJMYVsbnHKuupiQSiludsr8KNTEWZ29PPRaQZjgVur -5hT7lvRoIK/KxLM9E1nUJBNi58MRqrYwSTAKBggrBgEFBQcDBKAUBggrBgEFBQcD -AgYIKwYBBQUHAwEMJVN3aWZ0bWFpbGVyIFMvTUlNRSBTaWduZXIgQ2VydGlmaWNh -dGU= ------END CERTIFICATE----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.csr b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.csr deleted file mode 100644 index 3299a1a7..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.csr +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIICvzCCAacCAQAwejELMAkGA1UEBhMCRlIxDzANBgNVBAgMBkZyYW5jZTEOMAwG -A1UEBwwFUGFyaXMxFDASBgNVBAoMC1N3aWZ0bWFpbGVyMRMwEQYDVQQDDApzbWlt -ZS1zaWduMR8wHQYJKoZIhvcNAQkBFhBpbmZvQGV4YW1wbGUuY29tMIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnNEIwntmquqAI5Q9wgBAcP81K1jhA5pT -c/z846R739mAziorFcApxaKqHSs5lZdPIWmwgRVAmhywbGCwL3rtyZRwefqjVwTq -QDEvw8rDND2/jCpYHp5qTVEBlKON01OR4+KZlIf/Uj0MWnbA73j6lpm2/amBiH8i -7g2ubs25HKlc2Aw/ZG4xpSBbprKM/aWLNcbxlzdx9M4cyagFpfOZ/pxF6YHTW9WS -yEpmjJWVntxq2fl9fX3xOjMOBZXcljWlUi19U/U3rIksh9BUR5cImwv79E53EKAC -uGkprNUvYV2wzi9rpaTrKqm7XWDxsbtBYGq/49KRToUSqPcB0NGtXwIDAQABoAAw -DQYJKoZIhvcNAQEFBQADggEBAFnUGItXD/3Cgc2cLCVcjlMAiiPT4wpRFAWmb3kA -hiuT5fdv5zM5vmnG5Kgfa5TY14BOXUqYP+ebKdzk6CcsX5Rl0yrYDaTiDt2YJYBJ -05puOqDVLQ8rcc6oykil4/1LG2FrrBQwMBd2Y8PD7ck+XMPMDCk5oYEe1jvgSeLZ -rHW+lcI002M1L84tLe81d1+2I3IUwN1sL5W8APRmXhtokMzEyP8CvfvpLzY27C6M -baaPwTnV4RcyDf9l4hudzTxtoFi2PEYc8MAgAXhwyTf8fj2iV6y5iZUjlMt+BLRk -icGQkpYoz24m8hkk2FOUgJDXcx6kF6CLjkAPoHeldlt/XaE= ------END CERTIFICATE REQUEST----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.key b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.key deleted file mode 100644 index 78954d31..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAnNEIwntmquqAI5Q9wgBAcP81K1jhA5pTc/z846R739mAzior -FcApxaKqHSs5lZdPIWmwgRVAmhywbGCwL3rtyZRwefqjVwTqQDEvw8rDND2/jCpY -Hp5qTVEBlKON01OR4+KZlIf/Uj0MWnbA73j6lpm2/amBiH8i7g2ubs25HKlc2Aw/ -ZG4xpSBbprKM/aWLNcbxlzdx9M4cyagFpfOZ/pxF6YHTW9WSyEpmjJWVntxq2fl9 -fX3xOjMOBZXcljWlUi19U/U3rIksh9BUR5cImwv79E53EKACuGkprNUvYV2wzi9r -paTrKqm7XWDxsbtBYGq/49KRToUSqPcB0NGtXwIDAQABAoIBACZzw1gc9jHWypDu -2q3lbefHTHxSkOpXPztjv4b6YD2lkcX75RCyTAvgNSJt5PLfZVHmHpeoZGzluAT7 -OHiMBh61vVbLtJ2z4NTYusOhxnfa5Es0XuMzKRHIWUDfUfmNtmpQuCQJrPu3aH4O -PIT7/0ZKbuqIU/Dqa+A/jpQw8cErDABrOviwsUgMjBlfE/ogjfQ99Glv27JWPoy0 -jXe5SWleCjPSQE3sKPxxFSKoMnlpf7P0cKPHVq2O53S3q5HWI4K+6QCcGMf19iR9 -xj2igdt2S5cgW3DSypLxGvIKBS7IDw2pm4bhSyTI1RAjyq+3GTlrsaDnkkbYYkpT -kZhDlKECgYEAzpjl7Tq8DjMkKI42wbNxlEIufN81M5peEwwha3qfD/S2Lxsfepqe -D8n+y75Nb9b9xwZaCMdfj3U7qEuBpd+R3MzquONxcTjJASI+zveGGVwciWfrL2fg -YLhia09rnoL0maZe/TrYunIHrRMKXXl0/qE+ZVSJBbaX+eX7w/Er/OkCgYEAwlC/ -vU+1/nmiaf4l4FzE7dvMD0jHcVO/c9IvjmiFvuq3Su6vAFa7NX+uH9wetfTLJ8Un -58nXOtpydXCvoA1uxxKeoCBFsEa4RDV9+oFoBId6wdOpLE3Qj3Yjg/pfzA2TiArH -VQQ5qboA4BvfLyJLR5z44dSQo6xm6eIksY/pywcCgYEAiA9INdEdsphZst/eDfl4 -zrQ7W3/A0OhUFmVByT/ra521MhbBx4P2nt1gEZyV8Rb88UsslmV/eMIzdOWtT6mK -rYjC+NrJhlBoiHeeN73qMd9o59FpoUHfErO8FYIrlSwXnO1l144e18NrbL+Cbwcj -VuKobiGbUAjt0+VzxpqZZqkCgYAeYQ15BWtIm6+erpMxXo+TOFfQ0+oKd7No4iV5 -ODIgxQVe+630eZrPJGUOqhVLEThpwVMZ096IXvqiDboHZdI54VlXY3RBuOy6DTri -3TRr8NpqTzMVsBy5MRkgWxZ7CmxUSosbaYuyU1grsW/VKKFoUsw+UkNCs4NrcWWX -NQ6yJQKBgC+AhhVFANliX7wJI9bz85q4HD3txDrfH3g9bJRBVTq+5CXDrSQSXaKR -bcEInr/b28NyVLBSxfYSc2EUoA+s9/2FZulYaTgmQ80PQCZQBiHmZGbKblFn9h4r -ENGPvkyCZXkOUsDBYPuSFAlpGCYFIh7xYQkEU8YA39yfM11H235C ------END RSA PRIVATE KEY----- diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.p12 b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.p12 deleted file mode 100644 index c676feaa..00000000 Binary files a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.p12 and /dev/null differ diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance.conf.php.default b/vendor/swiftmailer/swiftmailer/tests/acceptance.conf.php.default deleted file mode 100644 index 99f356ae..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance.conf.php.default +++ /dev/null @@ -1,44 +0,0 @@ -skipUnless( - SWIFT_TMP_DIR, 'Cannot run test without a writable directory to use (' . - 'define SWIFT_TMP_DIR in tests/config.php if you wish to run this test)' - ); - } - - public function setUp() - { - $this->_tmpDir = SWIFT_TMP_DIR; - $this->_testFile = $this->_tmpDir . '/swift-test-file' . __CLASS__; - file_put_contents($this->_testFile, 'abcdefghijklm'); - } - - public function tearDown() - { - unlink($this->_testFile); - } - - public function testFileDataCanBeRead() - { - $file = $this->_createFileStream($this->_testFile); - $str = ''; - while (false !== $bytes = $file->read(8192)) { - $str .= $bytes; - } - $this->assertEqual('abcdefghijklm', $str); - } - - public function testFileDataCanBeReadSequentially() - { - $file = $this->_createFileStream($this->_testFile); - $this->assertEqual('abcde', $file->read(5)); - $this->assertEqual('fghijklm', $file->read(8)); - $this->assertFalse($file->read(1)); - } - - public function testFilenameIsReturned() - { - $file = $this->_createFileStream($this->_testFile); - $this->assertEqual($this->_testFile, $file->getPath()); - } - - public function testFileCanBeWrittenTo() - { - $file = $this->_createFileStream( - $this->_testFile, true - ); - $file->write('foobar'); - $this->assertEqual('foobar', $file->read(8192)); - } - - public function testReadingFromThenWritingToFile() - { - $file = $this->_createFileStream( - $this->_testFile, true - ); - $file->write('foobar'); - $this->assertEqual('foobar', $file->read(8192)); - $file->write('zipbutton'); - $this->assertEqual('zipbutton', $file->read(8192)); - } - - public function testWritingToFileWithCanonicalization() - { - $file = $this->_createFileStream( - $this->_testFile, true - ); - $file->addFilter($this->_createFilter(array("\r\n", "\r"), "\n"), 'allToLF'); - $file->write("foo\r\nbar\r"); - $file->write("\nzip\r\ntest\r"); - $file->flushBuffers(); - $this->assertEqual("foo\nbar\nzip\ntest\n", file_get_contents($this->_testFile)); - } - - public function testBindingOtherStreamsMirrorsWriteOperations() - { - $file = $this->_createFileStream( - $this->_testFile, true - ); - $is1 = $this->_createMockInputStream(); - $is2 = $this->_createMockInputStream(); - - $this->_checking(Expectations::create() - -> one($is1)->write('x') - -> one($is2)->write('x') - -> one($is1)->write('y') - -> one($is2)->write('y') - ); - - $file->bind($is1); - $file->bind($is2); - - $file->write('x'); - $file->write('y'); - } - - public function testBindingOtherStreamsMirrorsFlushOperations() - { - $file = $this->_createFileStream( - $this->_testFile, true - ); - $is1 = $this->_createMockInputStream(); - $is2 = $this->_createMockInputStream(); - - $this->_checking(Expectations::create() - -> one($is1)->flushBuffers() - -> one($is2)->flushBuffers() - ); - - $file->bind($is1); - $file->bind($is2); - - $file->flushBuffers(); - } - - public function testUnbindingStreamPreventsFurtherWrites() - { - $file = $this->_createFileStream( - $this->_testFile, true - ); - $is1 = $this->_createMockInputStream(); - $is2 = $this->_createMockInputStream(); - - $this->_checking(Expectations::create() - -> one($is1)->write('x') - -> one($is2)->write('x') - -> one($is1)->write('y') - ); - - $file->bind($is1); - $file->bind($is2); - - $file->write('x'); - - $file->unbind($is2); - - $file->write('y'); - } - - // -- Creation methods - - private function _createFilter($search, $replace) - { - return new Swift_StreamFilters_StringReplacementFilter($search, $replace); - } - - private function _createMockInputStream() - { - return $this->_mock('Swift_InputByteStream'); - } - - private function _createFileStream($file, $writable = false) - { - return new Swift_ByteStream_FileByteStream($file, $writable); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/CharacterReaderFactory/SimpleCharacterReaderFactoryAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/CharacterReaderFactory/SimpleCharacterReaderFactoryAcceptanceTest.php deleted file mode 100644 index c6383373..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/CharacterReaderFactory/SimpleCharacterReaderFactoryAcceptanceTest.php +++ /dev/null @@ -1,183 +0,0 @@ -_factory = new Swift_CharacterReaderFactory_SimpleCharacterReaderFactory(); - } - - public function testCreatingUtf8Reader() - { - foreach (array('utf8', 'utf-8', 'UTF-8', 'UTF8') as $utf8) { - $reader = $this->_factory->getReaderFor($utf8); - $this->assertIsA($reader, $this->_prefix . 'Utf8Reader'); - } - } - - public function testCreatingIso8859XReaders() - { - $charsets = array(); - foreach (range(1, 16) as $number) { - foreach (array('iso', 'iec') as $body) { - $charsets[] = $body . '-8859-' . $number; - $charsets[] = $body . '8859-' . $number; - $charsets[] = strtoupper($body) . '-8859-' . $number; - $charsets[] = strtoupper($body) . '8859-' . $number; - } - } - - foreach ($charsets as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(1, $reader->getInitialByteSize()); - } - } - - public function testCreatingWindows125XReaders() - { - $charsets = array(); - foreach (range(0, 8) as $number) { - $charsets[] = 'windows-125' . $number; - $charsets[] = 'windows125' . $number; - $charsets[] = 'WINDOWS-125' . $number; - $charsets[] = 'WINDOWS125' . $number; - } - - foreach ($charsets as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(1, $reader->getInitialByteSize()); - } - } - - public function testCreatingCodePageReaders() - { - $charsets = array(); - foreach (range(0, 8) as $number) { - $charsets[] = 'cp-125' . $number; - $charsets[] = 'cp125' . $number; - $charsets[] = 'CP-125' . $number; - $charsets[] = 'CP125' . $number; - } - - foreach (array(437, 737, 850, 855, 857, 858, 860, - 861, 863, 865, 866, 869) as $number) - { - $charsets[] = 'cp-' . $number; - $charsets[] = 'cp' . $number; - $charsets[] = 'CP-' . $number; - $charsets[] = 'CP' . $number; - } - - foreach ($charsets as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(1, $reader->getInitialByteSize()); - } - } - - public function testCreatingAnsiReader() - { - foreach (array('ansi', 'ANSI') as $ansi) { - $reader = $this->_factory->getReaderFor($ansi); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(1, $reader->getInitialByteSize()); - } - } - - public function testCreatingMacintoshReader() - { - foreach (array('macintosh', 'MACINTOSH') as $mac) { - $reader = $this->_factory->getReaderFor($mac); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(1, $reader->getInitialByteSize()); - } - } - - public function testCreatingKOIReaders() - { - $charsets = array(); - foreach (array('7', '8-r', '8-u', '8u', '8r') as $end) { - $charsets[] = 'koi-' . $end; - $charsets[] = 'koi' . $end; - $charsets[] = 'KOI-' . $end; - $charsets[] = 'KOI' . $end; - } - - foreach ($charsets as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(1, $reader->getInitialByteSize()); - } - } - - public function testCreatingIsciiReaders() - { - foreach (array('iscii', 'ISCII', 'viscii', 'VISCII') as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(1, $reader->getInitialByteSize()); - } - } - - public function testCreatingMIKReader() - { - foreach (array('mik', 'MIK') as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(1, $reader->getInitialByteSize()); - } - } - - public function testCreatingCorkReader() - { - foreach (array('cork', 'CORK', 't1', 'T1') as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(1, $reader->getInitialByteSize()); - } - } - - public function testCreatingUcs2Reader() - { - foreach (array('ucs-2', 'UCS-2', 'ucs2', 'UCS2') as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(2, $reader->getInitialByteSize()); - } - } - - public function testCreatingUtf16Reader() - { - foreach (array('utf-16', 'UTF-16', 'utf16', 'UTF16') as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(2, $reader->getInitialByteSize()); - } - } - - public function testCreatingUcs4Reader() - { - foreach (array('ucs-4', 'UCS-4', 'ucs4', 'UCS4') as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(4, $reader->getInitialByteSize()); - } - } - - public function testCreatingUtf32Reader() - { - foreach (array('utf-32', 'UTF-32', 'utf32', 'UTF32') as $charset) { - $reader = $this->_factory->getReaderFor($charset); - $this->assertIsA($reader, $this->_prefix . 'GenericFixedWidthReader'); - $this->assertEqual(4, $reader->getInitialByteSize()); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/DependencyContainerAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/DependencyContainerAcceptanceTest.php deleted file mode 100644 index 8efa4fd0..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/DependencyContainerAcceptanceTest.php +++ /dev/null @@ -1,22 +0,0 @@ -listItems() as $itemName) { - try { - $di->lookup($itemName); - } catch (Swift_DependencyException $e) { - $this->fail($e->getMessage()); - } - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/EmbeddedFileAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/EmbeddedFileAcceptanceTest.php deleted file mode 100644 index 44a8e48d..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/EmbeddedFileAcceptanceTest.php +++ /dev/null @@ -1,13 +0,0 @@ -_samplesDir = realpath(dirname(__FILE__) . '/../../../_samples/charsets'); - $this->_encoder = new Swift_Encoder_Base64Encoder(); - } - - public function testEncodingAndDecodingSamples() - { - $sampleFp = opendir($this->_samplesDir); - while (false !== $encodingDir = readdir($sampleFp)) { - if (substr($encodingDir, 0, 1) == '.') { - continue; - } - - $sampleDir = $this->_samplesDir . '/' . $encodingDir; - - if (is_dir($sampleDir)) { - - $fileFp = opendir($sampleDir); - while (false !== $sampleFile = readdir($fileFp)) { - if (substr($sampleFile, 0, 1) == '.') { - continue; - } - - $text = file_get_contents($sampleDir . '/' . $sampleFile); - $encodedText = $this->_encoder->encodeString($text); - - $this->assertEqual( - base64_decode($encodedText), $text, - '%s: Encoded string should decode back to original string for sample ' . - $sampleDir . '/' . $sampleFile - ); - } - closedir($fileFp); - } - - } - closedir($sampleFp); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/QpEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/QpEncoderAcceptanceTest.php deleted file mode 100644 index 4406e1db..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/QpEncoderAcceptanceTest.php +++ /dev/null @@ -1,58 +0,0 @@ -_samplesDir = realpath(dirname(__FILE__) . '/../../../_samples/charsets'); - $this->_factory = new Swift_CharacterReaderFactory_SimpleCharacterReaderFactory(); - } - - public function testEncodingAndDecodingSamples() - { - $sampleFp = opendir($this->_samplesDir); - while (false !== $encodingDir = readdir($sampleFp)) { - if (substr($encodingDir, 0, 1) == '.') { - continue; - } - - $encoding = $encodingDir; - $charStream = new Swift_CharacterStream_ArrayCharacterStream( - $this->_factory, $encoding); - $encoder = new Swift_Encoder_QpEncoder($charStream); - - $sampleDir = $this->_samplesDir . '/' . $encodingDir; - - if (is_dir($sampleDir)) { - - $fileFp = opendir($sampleDir); - while (false !== $sampleFile = readdir($fileFp)) { - if (substr($sampleFile, 0, 1) == '.') { - continue; - } - - $text = file_get_contents($sampleDir . '/' . $sampleFile); - $encodedText = $encoder->encodeString($text); - - $this->assertEqual( - quoted_printable_decode($encodedText), $text, - '%s: Encoded string should decode back to original string for sample ' . - $sampleDir . '/' . $sampleFile - ); - } - closedir($fileFp); - } - - } - closedir($sampleFp); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/Rfc2231EncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/Rfc2231EncoderAcceptanceTest.php deleted file mode 100644 index 8c472b18..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/Rfc2231EncoderAcceptanceTest.php +++ /dev/null @@ -1,56 +0,0 @@ -_samplesDir = realpath(dirname(__FILE__) . '/../../../_samples/charsets'); - $this->_factory = new Swift_CharacterReaderFactory_SimpleCharacterReaderFactory(); - } - - public function testEncodingAndDecodingSamples() - { - $sampleFp = opendir($this->_samplesDir); - while (false !== $encodingDir = readdir($sampleFp)) { - if (substr($encodingDir, 0, 1) == '.') { - continue; - } - - $encoding = $encodingDir; - $charStream = new Swift_CharacterStream_ArrayCharacterStream( - $this->_factory, $encoding); - $encoder = new Swift_Encoder_Rfc2231Encoder($charStream); - - $sampleDir = $this->_samplesDir . '/' . $encodingDir; - - if (is_dir($sampleDir)) { - - $fileFp = opendir($sampleDir); - while (false !== $sampleFile = readdir($fileFp)) { - if (substr($sampleFile, 0, 1) == '.') { - continue; - } - - $text = file_get_contents($sampleDir . '/' . $sampleFile); - $encodedText = $encoder->encodeString($text); - - $this->assertEqual( - urldecode(implode('', explode("\r\n", $encodedText))), $text, - '%s: Encoded string should decode back to original string for sample ' . - $sampleDir . '/' . $sampleFile - ); - } - closedir($fileFp); - } - - } - closedir($sampleFp); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/EncodingAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/EncodingAcceptanceTest.php deleted file mode 100644 index 9fa461ad..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/EncodingAcceptanceTest.php +++ /dev/null @@ -1,31 +0,0 @@ -assertEqual('7bit', $encoder->getName()); - } - - public function testGet8BitEncodingReturns8BitEncoder() - { - $encoder = Swift_Encoding::get8BitEncoding(); - $this->assertEqual('8bit', $encoder->getName()); - } - - public function testGetQpEncodingReturnsQpEncoder() - { - $encoder = Swift_Encoding::getQpEncoding(); - $this->assertEqual('quoted-printable', $encoder->getName()); - } - - public function testGetBase64EncodingReturnsBase64Encoder() - { - $encoder = Swift_Encoding::getBase64Encoding(); - $this->assertEqual('base64', $encoder->getName()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/KeyCache/ArrayKeyCacheAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/KeyCache/ArrayKeyCacheAcceptanceTest.php deleted file mode 100644 index da051f48..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/KeyCache/ArrayKeyCacheAcceptanceTest.php +++ /dev/null @@ -1,179 +0,0 @@ -_cache = new Swift_KeyCache_ArrayKeyCache( - new Swift_KeyCache_SimpleKeyCacheInputStream() - ); - } - - public function testStringDataCanBeSetAndFetched() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('test', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testStringDataCanBeOverwritten() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->_cache->setString( - $this->_key1, 'foo', 'whatever', Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('whatever', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testStringDataCanBeAppended() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->_cache->setString( - $this->_key1, 'foo', 'ing', Swift_KeyCache::MODE_APPEND - ); - $this->assertEqual('testing', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testHasKeyReturnValue() - { - $this->assertFalse($this->_cache->hasKey($this->_key1, 'foo')); - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->assertTrue($this->_cache->hasKey($this->_key1, 'foo')); - } - - public function testNsKeyIsWellPartitioned() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->_cache->setString( - $this->_key2, 'foo', 'ing', Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('test', $this->_cache->getString($this->_key1, 'foo')); - $this->assertEqual('ing', $this->_cache->getString($this->_key2, 'foo')); - } - - public function testItemKeyIsWellPartitioned() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->_cache->setString( - $this->_key1, 'bar', 'ing', Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('test', $this->_cache->getString($this->_key1, 'foo')); - $this->assertEqual('ing', $this->_cache->getString($this->_key1, 'bar')); - } - - public function testByteStreamCanBeImported() - { - $os = new Swift_ByteStream_ArrayByteStream(); - $os->write('abcdef'); - - $this->_cache->importFromByteStream( - $this->_key1, 'foo', $os, Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('abcdef', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testByteStreamCanBeAppended() - { - $os1 = new Swift_ByteStream_ArrayByteStream(); - $os1->write('abcdef'); - - $os2 = new Swift_ByteStream_ArrayByteStream(); - $os2->write('xyzuvw'); - - $this->_cache->importFromByteStream( - $this->_key1, 'foo', $os1, Swift_KeyCache::MODE_APPEND - ); - $this->_cache->importFromByteStream( - $this->_key1, 'foo', $os2, Swift_KeyCache::MODE_APPEND - ); - - $this->assertEqual('abcdefxyzuvw', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testByteStreamAndStringCanBeAppended() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_APPEND - ); - - $os = new Swift_ByteStream_ArrayByteStream(); - $os->write('abcdef'); - - $this->_cache->importFromByteStream( - $this->_key1, 'foo', $os, Swift_KeyCache::MODE_APPEND - ); - $this->assertEqual('testabcdef', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testDataCanBeExportedToByteStream() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - - $is = new Swift_ByteStream_ArrayByteStream(); - - $this->_cache->exportToByteStream($this->_key1, 'foo', $is); - - $string = ''; - while (false !== $bytes = $is->read(8192)) { - $string .= $bytes; - } - - $this->assertEqual('test', $string); - } - - public function testKeyCanBeCleared() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->assertTrue($this->_cache->hasKey($this->_key1, 'foo')); - $this->_cache->clearKey($this->_key1, 'foo'); - $this->assertFalse($this->_cache->hasKey($this->_key1, 'foo')); - } - - public function testNsKeyCanBeCleared() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->_cache->setString( - $this->_key1, 'bar', 'xyz', Swift_KeyCache::MODE_WRITE - ); - $this->assertTrue($this->_cache->hasKey($this->_key1, 'foo')); - $this->assertTrue($this->_cache->hasKey($this->_key1, 'bar')); - $this->_cache->clearAll($this->_key1); - $this->assertFalse($this->_cache->hasKey($this->_key1, 'foo')); - $this->assertFalse($this->_cache->hasKey($this->_key1, 'bar')); - } - - public function testKeyCacheInputStream() - { - $is = $this->_cache->getInputByteStream($this->_key1, 'foo'); - $is->write('abc'); - $is->write('xyz'); - $this->assertEqual('abcxyz', $this->_cache->getString($this->_key1, 'foo')); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/KeyCache/DiskKeyCacheAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/KeyCache/DiskKeyCacheAcceptanceTest.php deleted file mode 100644 index a3a37c19..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/KeyCache/DiskKeyCacheAcceptanceTest.php +++ /dev/null @@ -1,189 +0,0 @@ -skipUnless( - SWIFT_TMP_DIR, 'Cannot run test without a writable directory to use (' . - 'define SWIFT_TMP_DIR in tests/config.php if you wish to run this test)' - ); - } - - public function setUp() - { - $this->_key1 = uniqid(microtime(true), true); - $this->_key2 = uniqid(microtime(true), true); - $this->_cache = new Swift_KeyCache_DiskKeyCache( - new Swift_KeyCache_SimpleKeyCacheInputStream(), - SWIFT_TMP_DIR - ); - } - - public function testStringDataCanBeSetAndFetched() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('test', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testStringDataCanBeOverwritten() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->_cache->setString( - $this->_key1, 'foo', 'whatever', Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('whatever', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testStringDataCanBeAppended() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->_cache->setString( - $this->_key1, 'foo', 'ing', Swift_KeyCache::MODE_APPEND - ); - $this->assertEqual('testing', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testHasKeyReturnValue() - { - $this->assertFalse($this->_cache->hasKey($this->_key1, 'foo')); - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->assertTrue($this->_cache->hasKey($this->_key1, 'foo')); - } - - public function testNsKeyIsWellPartitioned() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->_cache->setString( - $this->_key2, 'foo', 'ing', Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('test', $this->_cache->getString($this->_key1, 'foo')); - $this->assertEqual('ing', $this->_cache->getString($this->_key2, 'foo')); - } - - public function testItemKeyIsWellPartitioned() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->_cache->setString( - $this->_key1, 'bar', 'ing', Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('test', $this->_cache->getString($this->_key1, 'foo')); - $this->assertEqual('ing', $this->_cache->getString($this->_key1, 'bar')); - } - - public function testByteStreamCanBeImported() - { - $os = new Swift_ByteStream_ArrayByteStream(); - $os->write('abcdef'); - - $this->_cache->importFromByteStream( - $this->_key1, 'foo', $os, Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('abcdef', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testByteStreamCanBeAppended() - { - $os1 = new Swift_ByteStream_ArrayByteStream(); - $os1->write('abcdef'); - - $os2 = new Swift_ByteStream_ArrayByteStream(); - $os2->write('xyzuvw'); - - $this->_cache->importFromByteStream( - $this->_key1, 'foo', $os1, Swift_KeyCache::MODE_APPEND - ); - $this->_cache->importFromByteStream( - $this->_key1, 'foo', $os2, Swift_KeyCache::MODE_APPEND - ); - - $this->assertEqual('abcdefxyzuvw', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testByteStreamAndStringCanBeAppended() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_APPEND - ); - - $os = new Swift_ByteStream_ArrayByteStream(); - $os->write('abcdef'); - - $this->_cache->importFromByteStream( - $this->_key1, 'foo', $os, Swift_KeyCache::MODE_APPEND - ); - $this->assertEqual('testabcdef', $this->_cache->getString($this->_key1, 'foo')); - } - - public function testDataCanBeExportedToByteStream() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - - $is = new Swift_ByteStream_ArrayByteStream(); - - $this->_cache->exportToByteStream($this->_key1, 'foo', $is); - - $string = ''; - while (false !== $bytes = $is->read(8192)) { - $string .= $bytes; - } - - $this->assertEqual('test', $string); - } - - public function testKeyCanBeCleared() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->assertTrue($this->_cache->hasKey($this->_key1, 'foo')); - $this->_cache->clearKey($this->_key1, 'foo'); - $this->assertFalse($this->_cache->hasKey($this->_key1, 'foo')); - } - - public function testNsKeyCanBeCleared() - { - $this->_cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->_cache->setString( - $this->_key1, 'bar', 'xyz', Swift_KeyCache::MODE_WRITE - ); - $this->assertTrue($this->_cache->hasKey($this->_key1, 'foo')); - $this->assertTrue($this->_cache->hasKey($this->_key1, 'bar')); - $this->_cache->clearAll($this->_key1); - $this->assertFalse($this->_cache->hasKey($this->_key1, 'foo')); - $this->assertFalse($this->_cache->hasKey($this->_key1, 'bar')); - } - - public function testKeyCacheInputStream() - { - $is = $this->_cache->getInputByteStream($this->_key1, 'foo'); - $is->write('abc'); - $is->write('xyz'); - $this->assertEqual('abcxyz', $this->_cache->getString($this->_key1, 'foo')); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/MessageAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/MessageAcceptanceTest.php deleted file mode 100644 index 89dab6c3..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/MessageAcceptanceTest.php +++ /dev/null @@ -1,58 +0,0 @@ -_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - - $id = $message->getId(); - $date = $message->getDate(); - $boundary = $message->getBoundary(); - - $message->addPart('foo', 'text/plain', 'iso-8859-1'); - $message->addPart('test foo', 'text/html', 'iso-8859-1'); - - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/alternative;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/plain; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foo' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/html; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'test foo' . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n", - $message->toString() - ); - } - - // -- Private helpers - - protected function _createMessage() - { - Swift_DependencyContainer::getInstance() - ->register('properties.charset')->asValue(null); - - return Swift_Message::newInstance(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/AttachmentAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/AttachmentAcceptanceTest.php deleted file mode 100644 index 3a318ae5..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/AttachmentAcceptanceTest.php +++ /dev/null @@ -1,137 +0,0 @@ -_cache = new Swift_KeyCache_ArrayKeyCache( - new Swift_KeyCache_SimpleKeyCacheInputStream() - ); - $factory = new Swift_CharacterReaderFactory_SimpleCharacterReaderFactory(); - $this->_contentEncoder = new Swift_Mime_ContentEncoder_Base64ContentEncoder(); - - $headerEncoder = new Swift_Mime_HeaderEncoder_QpHeaderEncoder( - new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8') - ); - $paramEncoder = new Swift_Encoder_Rfc2231Encoder( - new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8') - ); - $this->_grammar = new Swift_Mime_Grammar(); - $this->_headers = new Swift_Mime_SimpleHeaderSet( - new Swift_Mime_SimpleHeaderFactory($headerEncoder, $paramEncoder, $this->_grammar) - ); - } - - public function testDispositionIsSetInHeader() - { - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $attachment->setDisposition('inline'); - $this->assertEqual( - 'Content-Type: application/pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline' . "\r\n", - $attachment->toString() - ); - } - - public function testDispositionIsAttachmentByDefault() - { - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $this->assertEqual( - 'Content-Type: application/pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment' . "\r\n", - $attachment->toString() - ); - } - - public function testFilenameIsSetInHeader() - { - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $attachment->setFilename('foo.pdf'); - $this->assertEqual( - 'Content-Type: application/pdf; name=foo.pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment; filename=foo.pdf' . "\r\n", - $attachment->toString() - ); - } - - public function testSizeIsSetInHeader() - { - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $attachment->setSize(12340); - $this->assertEqual( - 'Content-Type: application/pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment; size=12340' . "\r\n", - $attachment->toString() - ); - } - - public function testMultipleParametersInHeader() - { - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $attachment->setFilename('foo.pdf'); - $attachment->setSize(12340); - $this->assertEqual( - 'Content-Type: application/pdf; name=foo.pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment; filename=foo.pdf; size=12340' . "\r\n", - $attachment->toString() - ); - } - - public function testEndToEnd() - { - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $attachment->setFilename('foo.pdf'); - $attachment->setSize(12340); - $attachment->setBody('abcd'); - $this->assertEqual( - 'Content-Type: application/pdf; name=foo.pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment; filename=foo.pdf; size=12340' . "\r\n" . - "\r\n" . - base64_encode('abcd'), - $attachment->toString() - ); - } - - // -- Private helpers - - protected function _createAttachment() - { - $entity = new Swift_Mime_Attachment( - $this->_headers, - $this->_contentEncoder, - $this->_cache, - $this->_grammar - ); - - return $entity; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/Base64ContentEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/Base64ContentEncoderAcceptanceTest.php deleted file mode 100644 index 03ad0f72..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/Base64ContentEncoderAcceptanceTest.php +++ /dev/null @@ -1,62 +0,0 @@ -_samplesDir = realpath(dirname(__FILE__) . '/../../../../_samples/charsets'); - $this->_encoder = new Swift_Mime_ContentEncoder_Base64ContentEncoder(); - } - - public function testEncodingAndDecodingSamples() - { - $sampleFp = opendir($this->_samplesDir); - while (false !== $encodingDir = readdir($sampleFp)) { - if (substr($encodingDir, 0, 1) == '.') { - continue; - } - - $sampleDir = $this->_samplesDir . '/' . $encodingDir; - - if (is_dir($sampleDir)) { - - $fileFp = opendir($sampleDir); - while (false !== $sampleFile = readdir($fileFp)) { - if (substr($sampleFile, 0, 1) == '.') { - continue; - } - - $text = file_get_contents($sampleDir . '/' . $sampleFile); - - $os = new Swift_ByteStream_ArrayByteStream(); - $os->write($text); - - $is = new Swift_ByteStream_ArrayByteStream(); - - $this->_encoder->encodeByteStream($os, $is); - - $encoded = ''; - while (false !== $bytes = $is->read(8192)) { - $encoded .= $bytes; - } - - $this->assertEqual( - base64_decode($encoded), $text, - '%s: Encoded string should decode back to original string for sample ' . - $sampleDir . '/' . $sampleFile - ); - } - closedir($fileFp); - } - - } - closedir($sampleFp); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/NativeQpContentEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/NativeQpContentEncoderAcceptanceTest.php deleted file mode 100644 index 38fbb0b4..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/NativeQpContentEncoderAcceptanceTest.php +++ /dev/null @@ -1,95 +0,0 @@ -_samplesDir = realpath(dirname(__FILE__) . '/../../../../_samples/charsets'); - $this->_encoder = new Swift_Mime_ContentEncoder_NativeQpContentEncoder(); - } - - public function testEncodingAndDecodingSamples() - { - $sampleFp = opendir($this->_samplesDir); - while (false !== $encodingDir = readdir($sampleFp)) { - if (substr($encodingDir, 0, 1) == '.') { - continue; - } - - $sampleDir = $this->_samplesDir . '/' . $encodingDir; - - if (is_dir($sampleDir)) { - - $fileFp = opendir($sampleDir); - while (false !== $sampleFile = readdir($fileFp)) { - if (substr($sampleFile, 0, 1) == '.') { - continue; - } - - $text = file_get_contents($sampleDir . '/' . $sampleFile); - - $os = new Swift_ByteStream_ArrayByteStream(); - $os->write($text); - - $is = new Swift_ByteStream_ArrayByteStream(); - $this->_encoder->encodeByteStream($os, $is); - - $encoded = ''; - while (false !== $bytes = $is->read(8192)) { - $encoded .= $bytes; - } - - $this->assertEqual( - quoted_printable_decode($encoded), - // CR and LF are converted to CRLF - preg_replace('~\r(?!\n)|(?_createEncoderFromContainer(); - $this->assertSame('=C3=A4=C3=B6=C3=BC=C3=9F', $encoder->encodeString('äöüß')); - } - - public function testCharsetChangeNotImplemented() - { - $this->_encoder->charsetChanged('utf-8'); - $this->expectException(new RuntimeException('Charset "charset" not supported. NativeQpContentEncoder only supports "utf-8"')); - $this->_encoder->charsetChanged('charset'); - $this->_encoder->encodeString('foo'); - } - - public function testGetName() - { - $this->assertSame('quoted-printable', $this->_encoder->getName()); - } - - // -- Private Methods - - private function _createEncoderFromContainer() - { - return Swift_DependencyContainer::getInstance() - ->lookup('mime.nativeqpcontentencoder') - ; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/PlainContentEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/PlainContentEncoderAcceptanceTest.php deleted file mode 100644 index 103bbf45..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/PlainContentEncoderAcceptanceTest.php +++ /dev/null @@ -1,96 +0,0 @@ -_samplesDir = realpath(dirname(__FILE__) . '/../../../../_samples/charsets'); - $this->_encoder = new Swift_Mime_ContentEncoder_PlainContentEncoder('8bit'); - } - - public function testEncodingAndDecodingSamplesString() - { - $sampleFp = opendir($this->_samplesDir); - while (false !== $encodingDir = readdir($sampleFp)) { - if (substr($encodingDir, 0, 1) == '.') { - continue; - } - - $sampleDir = $this->_samplesDir . '/' . $encodingDir; - - if (is_dir($sampleDir)) { - - $fileFp = opendir($sampleDir); - while (false !== $sampleFile = readdir($fileFp)) { - if (substr($sampleFile, 0, 1) == '.') { - continue; - } - - $text = file_get_contents($sampleDir . '/' . $sampleFile); - $encodedText = $this->_encoder->encodeString($text); - - $this->assertEqual( - $encodedText, $text, - '%s: Encoded string should be identical to original string for sample ' . - $sampleDir . '/' . $sampleFile - ); - } - closedir($fileFp); - } - - } - closedir($sampleFp); - } - - public function testEncodingAndDecodingSamplesByteStream() - { - $sampleFp = opendir($this->_samplesDir); - while (false !== $encodingDir = readdir($sampleFp)) { - if (substr($encodingDir, 0, 1) == '.') { - continue; - } - - $sampleDir = $this->_samplesDir . '/' . $encodingDir; - - if (is_dir($sampleDir)) { - - $fileFp = opendir($sampleDir); - while (false !== $sampleFile = readdir($fileFp)) { - if (substr($sampleFile, 0, 1) == '.') { - continue; - } - - $text = file_get_contents($sampleDir . '/' . $sampleFile); - - $os = new Swift_ByteStream_ArrayByteStream(); - $os->write($text); - - $is = new Swift_ByteStream_ArrayByteStream(); - - $this->_encoder->encodeByteStream($os, $is); - - $encoded = ''; - while (false !== $bytes = $is->read(8192)) { - $encoded .= $bytes; - } - - $this->assertEqual( - $encoded, $text, - '%s: Encoded string should be identical to original string for sample ' . - $sampleDir . '/' . $sampleFile - ); - } - closedir($fileFp); - } - - } - closedir($sampleFp); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/QpContentEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/QpContentEncoderAcceptanceTest.php deleted file mode 100644 index 1373fd3d..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/QpContentEncoderAcceptanceTest.php +++ /dev/null @@ -1,170 +0,0 @@ -_samplesDir = realpath(dirname(__FILE__) . '/../../../../_samples/charsets'); - $this->_factory = new Swift_CharacterReaderFactory_SimpleCharacterReaderFactory(); - } - - public function testEncodingAndDecodingSamples() - { - $sampleFp = opendir($this->_samplesDir); - while (false !== $encodingDir = readdir($sampleFp)) { - if (substr($encodingDir, 0, 1) == '.') { - continue; - } - - $encoding = $encodingDir; - $charStream = new Swift_CharacterStream_NgCharacterStream( - $this->_factory, $encoding); - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - - $sampleDir = $this->_samplesDir . '/' . $encodingDir; - - if (is_dir($sampleDir)) { - - $fileFp = opendir($sampleDir); - while (false !== $sampleFile = readdir($fileFp)) { - if (substr($sampleFile, 0, 1) == '.') { - continue; - } - - $text = file_get_contents($sampleDir . '/' . $sampleFile); - - $os = new Swift_ByteStream_ArrayByteStream(); - $os->write($text); - - $is = new Swift_ByteStream_ArrayByteStream(); - $encoder->encodeByteStream($os, $is); - - $encoded = ''; - while (false !== $bytes = $is->read(8192)) { - $encoded .= $bytes; - } - - $this->assertEqual( - quoted_printable_decode($encoded), $text, - '%s: Encoded string should decode back to original string for sample ' . - $sampleDir . '/' . $sampleFile - ); - } - closedir($fileFp); - } - - } - closedir($sampleFp); - } - - public function testEncodingAndDecodingSamplesFromDiConfiguredInstance() - { - $sampleFp = opendir($this->_samplesDir); - while (false !== $encodingDir = readdir($sampleFp)) { - if (substr($encodingDir, 0, 1) == '.') { - continue; - } - - $encoding = $encodingDir; - $encoder = $this->_createEncoderFromContainer(); - - $sampleDir = $this->_samplesDir . '/' . $encodingDir; - - if (is_dir($sampleDir)) { - - $fileFp = opendir($sampleDir); - while (false !== $sampleFile = readdir($fileFp)) { - if (substr($sampleFile, 0, 1) == '.') { - continue; - } - - $text = file_get_contents($sampleDir . '/' . $sampleFile); - - $os = new Swift_ByteStream_ArrayByteStream(); - $os->write($text); - - $is = new Swift_ByteStream_ArrayByteStream(); - $encoder->encodeByteStream($os, $is); - - $encoded = ''; - while (false !== $bytes = $is->read(8192)) { - $encoded .= $bytes; - } - - $this->assertEqual( - str_replace("\r\n", "\n", quoted_printable_decode($encoded)), str_replace("\r\n", "\n", $text), - '%s: Encoded string should decode back to original string for sample ' . - $sampleDir . '/' . $sampleFile - ); - } - closedir($fileFp); - } - - } - closedir($sampleFp); - } - - public function testEncodingLFTextWithDiConfiguredInstance() - { - $encoder = $this->_createEncoderFromContainer(); - $this->assertEqual("a\r\nb\r\nc", $encoder->encodeString("a\nb\nc")); - } - - public function testEncodingCRTextWithDiConfiguredInstance() - { - $encoder = $this->_createEncoderFromContainer(); - $this->assertEqual("a\r\nb\r\nc", $encoder->encodeString("a\rb\rc")); - } - - public function testEncodingLFCRTextWithDiConfiguredInstance() - { - $encoder = $this->_createEncoderFromContainer(); - $this->assertEqual("a\r\n\r\nb\r\n\r\nc", $encoder->encodeString("a\n\rb\n\rc")); - } - - public function testEncodingCRLFTextWithDiConfiguredInstance() - { - $encoder = $this->_createEncoderFromContainer(); - $this->assertEqual("a\r\nb\r\nc", $encoder->encodeString("a\r\nb\r\nc")); - } - - public function testEncodingDotStuffingWithDiConfiguredInstance() - { - // Enable DotEscaping - Swift_Preferences::getInstance()->setQPDotEscape(true); - $encoder = $this->_createEncoderFromContainer(); - $this->assertEqual("a=2E\r\n=2E\r\n=2Eb\r\nc", $encoder->encodeString("a.\r\n.\r\n.b\r\nc")); - // Return to default - Swift_Preferences::getInstance()->setQPDotEscape(false); - $encoder = $this->_createEncoderFromContainer(); - $this->assertEqual("a.\r\n.\r\n.b\r\nc", $encoder->encodeString("a.\r\n.\r\n.b\r\nc")); - } - - public function testDotStuffingEncodingAndDecodingSamplesFromDiConfiguredInstance() - { - // Enable DotEscaping - Swift_Preferences::getInstance()->setQPDotEscape(true); - $this->testEncodingAndDecodingSamplesFromDiConfiguredInstance(); - // Disable DotStuffing to continue - Swift_Preferences::getInstance()->setQPDotEscape(false); - } - - // -- Private Methods - - private function _createEncoderFromContainer() - { - return Swift_DependencyContainer::getInstance() - ->lookup('mime.qpcontentencoder') - ; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/EmbeddedFileAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/EmbeddedFileAcceptanceTest.php deleted file mode 100644 index cf6186af..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/EmbeddedFileAcceptanceTest.php +++ /dev/null @@ -1,150 +0,0 @@ -_cache = new Swift_KeyCache_ArrayKeyCache( - new Swift_KeyCache_SimpleKeyCacheInputStream() - ); - $factory = new Swift_CharacterReaderFactory_SimpleCharacterReaderFactory(); - $this->_contentEncoder = new Swift_Mime_ContentEncoder_Base64ContentEncoder(); - - $headerEncoder = new Swift_Mime_HeaderEncoder_QpHeaderEncoder( - new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8') - ); - $paramEncoder = new Swift_Encoder_Rfc2231Encoder( - new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8') - ); - $this->_grammar = new Swift_Mime_Grammar(); - $this->_headers = new Swift_Mime_SimpleHeaderSet( - new Swift_Mime_SimpleHeaderFactory($headerEncoder, $paramEncoder, $this->_grammar) - ); - } - - public function testContentIdIsSetInHeader() - { - $file = $this->_createEmbeddedFile(); - $file->setContentType('application/pdf'); - $file->setId('foo@bar'); - $this->assertEqual( - 'Content-Type: application/pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline' . "\r\n" . - 'Content-ID: ' . "\r\n", - $file->toString() - ); - } - - public function testDispositionIsSetInHeader() - { - $file = $this->_createEmbeddedFile(); - $id = $file->getId(); - $file->setContentType('application/pdf'); - $file->setDisposition('attachment'); - $this->assertEqual( - 'Content-Type: application/pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment' . "\r\n" . - 'Content-ID: <'. $id . '>' . "\r\n", - $file->toString() - ); - } - - public function testFilenameIsSetInHeader() - { - $file = $this->_createEmbeddedFile(); - $id = $file->getId(); - $file->setContentType('application/pdf'); - $file->setFilename('foo.pdf'); - $this->assertEqual( - 'Content-Type: application/pdf; name=foo.pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline; filename=foo.pdf' . "\r\n" . - 'Content-ID: <'. $id . '>' . "\r\n", - $file->toString() - ); - } - - public function testSizeIsSetInHeader() - { - $file = $this->_createEmbeddedFile(); - $id = $file->getId(); - $file->setContentType('application/pdf'); - $file->setSize(12340); - $this->assertEqual( - 'Content-Type: application/pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline; size=12340' . "\r\n" . - 'Content-ID: <'. $id . '>' . "\r\n", - $file->toString() - ); - } - - public function testMultipleParametersInHeader() - { - $file = $this->_createEmbeddedFile(); - $id = $file->getId(); - $file->setContentType('application/pdf'); - $file->setFilename('foo.pdf'); - $file->setSize(12340); - $this->assertEqual( - 'Content-Type: application/pdf; name=foo.pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline; filename=foo.pdf; size=12340' . "\r\n" . - 'Content-ID: <'. $id . '>' . "\r\n", - $file->toString() - ); - } - - public function testEndToEnd() - { - $file = $this->_createEmbeddedFile(); - $id = $file->getId(); - $file->setContentType('application/pdf'); - $file->setFilename('foo.pdf'); - $file->setSize(12340); - $file->setBody('abcd'); - $this->assertEqual( - 'Content-Type: application/pdf; name=foo.pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline; filename=foo.pdf; size=12340' . "\r\n" . - 'Content-ID: <'. $id . '>' . "\r\n" . - "\r\n" . - base64_encode('abcd'), - $file->toString() - ); - } - - // -- Private helpers - - protected function _createEmbeddedFile() - { - $entity = new Swift_Mime_EmbeddedFile( - $this->_headers, - $this->_contentEncoder, - $this->_cache, - $this->_grammar - ); - - return $entity; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/HeaderEncoder/Base64HeaderEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/HeaderEncoder/Base64HeaderEncoderAcceptanceTest.php deleted file mode 100644 index 1ef16096..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/HeaderEncoder/Base64HeaderEncoderAcceptanceTest.php +++ /dev/null @@ -1,35 +0,0 @@ -_encoder = new Swift_Mime_HeaderEncoder_Base64HeaderEncoder(); - } - - public function testEncodingJIS() - { - if (function_exists('mb_convert_encoding')) { - // base64_encode and split cannot handle long JIS text to fold - $subject = "長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い件名"; - - $encodedWrapperLength = strlen('=?iso-2022-jp?' . $this->_encoder->getName() . '??='); - - $old = mb_internal_encoding(); - mb_internal_encoding('utf-8'); - $newstring = mb_encode_mimeheader($subject, 'iso-2022-jp', 'B', "\r\n"); - mb_internal_encoding($old); - - $encoded = $this->_encoder->encodeString($subject, 0, 75 - $encodedWrapperLength, 'iso-2022-jp'); - $this->assertEqual( - $encoded, $newstring, - 'Encoded string should decode back to original string for sample ' - ); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/MimePartAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/MimePartAcceptanceTest.php deleted file mode 100644 index bd8d0606..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/MimePartAcceptanceTest.php +++ /dev/null @@ -1,143 +0,0 @@ -_cache = new Swift_KeyCache_ArrayKeyCache( - new Swift_KeyCache_SimpleKeyCacheInputStream() - ); - $factory = new Swift_CharacterReaderFactory_SimpleCharacterReaderFactory(); - $this->_contentEncoder = new Swift_Mime_ContentEncoder_QpContentEncoder( - new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'), - new Swift_StreamFilters_ByteArrayReplacementFilter( - array(array(0x0D, 0x0A), array(0x0D), array(0x0A)), - array(array(0x0A), array(0x0A), array(0x0D, 0x0A)) - ) - ); - - $headerEncoder = new Swift_Mime_HeaderEncoder_QpHeaderEncoder( - new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8') - ); - $paramEncoder = new Swift_Encoder_Rfc2231Encoder( - new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8') - ); - $this->_grammar = new Swift_Mime_Grammar(); - $this->_headers = new Swift_Mime_SimpleHeaderSet( - new Swift_Mime_SimpleHeaderFactory($headerEncoder, $paramEncoder, $this->_grammar) - ); - } - - public function testCharsetIsSetInHeader() - { - $part = $this->_createMimePart(); - $part->setContentType('text/plain'); - $part->setCharset('utf-8'); - $part->setBody('foobar'); - $this->assertEqual( - 'Content-Type: text/plain; charset=utf-8' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foobar', - $part->toString() - ); - } - - public function testFormatIsSetInHeaders() - { - $part = $this->_createMimePart(); - $part->setContentType('text/plain'); - $part->setFormat('flowed'); - $part->setBody('> foobar'); - $this->assertEqual( - 'Content-Type: text/plain; format=flowed' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - '> foobar', - $part->toString() - ); - } - - public function testDelSpIsSetInHeaders() - { - $part = $this->_createMimePart(); - $part->setContentType('text/plain'); - $part->setDelSp(true); - $part->setBody('foobar'); - $this->assertEqual( - 'Content-Type: text/plain; delsp=yes' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foobar', - $part->toString() - ); - } - - public function testAll3ParamsInHeaders() - { - $part = $this->_createMimePart(); - $part->setContentType('text/plain'); - $part->setCharset('utf-8'); - $part->setFormat('fixed'); - $part->setDelSp(true); - $part->setBody('foobar'); - $this->assertEqual( - 'Content-Type: text/plain; charset=utf-8; format=fixed; delsp=yes' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foobar', - $part->toString() - ); - } - - public function testBodyIsCanonicalized() - { - $part = $this->_createMimePart(); - $part->setContentType('text/plain'); - $part->setCharset('utf-8'); - $part->setBody("foobar\r\rtest\ning\r"); - $this->assertEqual( - 'Content-Type: text/plain; charset=utf-8' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - "foobar\r\n" . - "\r\n" . - "test\r\n" . - "ing\r\n", - $part->toString() - ); - } - - // -- Private helpers - - protected function _createMimePart() - { - $entity = new Swift_Mime_MimePart( - $this->_headers, - $this->_contentEncoder, - $this->_cache, - $this->_grammar - ); - - return $entity; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/SimpleMessageAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/SimpleMessageAcceptanceTest.php deleted file mode 100644 index 87e4db8c..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/SimpleMessageAcceptanceTest.php +++ /dev/null @@ -1,1254 +0,0 @@ -setCharset(null); //TODO: Test with the charset defined - } - - public function testBasicHeaders() - { - /* -- RFC 2822, 3.6. - */ - - $message = $this->_createMessage(); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'From: ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString(), - '%s: Only required headers, and non-empty headers should be displayed' - ); - } - - public function testSubjectIsDisplayedIfSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testDateCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $id = $message->getId(); - $message->setDate(1234); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', 1234) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testMessageIdCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setId('foo@bar'); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: ' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testContentTypeCanBeChanged() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setContentType('text/html'); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/html' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testCharsetCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setContentType('text/html'); - $message->setCharset('iso-8859-1'); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/html; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testFormatCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFormat('flowed'); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain; format=flowed' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testEncoderCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setContentType('text/html'); - $message->setEncoder( - new Swift_Mime_ContentEncoder_PlainContentEncoder('7bit') - ); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/html' . "\r\n" . - 'Content-Transfer-Encoding: 7bit' . "\r\n", - $message->toString() - ); - } - - public function testFromAddressCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom('chris.corbyn@swiftmailer.org'); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: chris.corbyn@swiftmailer.org' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testFromAddressCanBeSetWithName() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array('chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testMultipleFromAddressesCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' - )); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn , mark@swiftmailer.org' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testReturnPathAddressCanBeSet() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testEmptyReturnPathHeaderCanBeUsed() - { - $message = $this->_createMessage(); - $message->setReturnPath(''); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Return-Path: <>' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testSenderCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setSender('chris.corbyn@swiftmailer.org'); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Sender: chris.corbyn@swiftmailer.org' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testSenderCanBeSetWithName() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setSender(array('chris.corbyn@swiftmailer.org'=>'Chris')); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Sender: Chris ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testReplyToCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array('chris.corbyn@swiftmailer.org'=>'Chris')); - $message->setReplyTo(array('chris@w3style.co.uk'=>'Myself')); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris ' . "\r\n" . - 'Reply-To: Myself ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testMultipleReplyAddressCanBeUsed() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array('chris.corbyn@swiftmailer.org'=>'Chris')); - $message->setReplyTo(array( - 'chris@w3style.co.uk' => 'Myself', - 'my.other@address.com' => 'Me' - )); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris ' . "\r\n" . - 'Reply-To: Myself , Me ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testToAddressCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array('chris.corbyn@swiftmailer.org'=>'Chris')); - $message->setReplyTo(array( - 'chris@w3style.co.uk' => 'Myself', - 'my.other@address.com' => 'Me' - )); - $message->setTo('mark@swiftmailer.org'); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris ' . "\r\n" . - 'Reply-To: Myself , Me ' . "\r\n" . - 'To: mark@swiftmailer.org' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testMultipleToAddressesCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array('chris.corbyn@swiftmailer.org'=>'Chris')); - $message->setReplyTo(array( - 'chris@w3style.co.uk' => 'Myself', - 'my.other@address.com' => 'Me' - )); - $message->setTo(array( - 'mark@swiftmailer.org', 'chris@swiftmailer.org' => 'Chris Corbyn' - )); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris ' . "\r\n" . - 'Reply-To: Myself , Me ' . "\r\n" . - 'To: mark@swiftmailer.org, Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testCcAddressCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array('chris.corbyn@swiftmailer.org'=>'Chris')); - $message->setReplyTo(array( - 'chris@w3style.co.uk' => 'Myself', - 'my.other@address.com' => 'Me' - )); - $message->setTo(array( - 'mark@swiftmailer.org', 'chris@swiftmailer.org' => 'Chris Corbyn' - )); - $message->setCc('john@some-site.com'); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris ' . "\r\n" . - 'Reply-To: Myself , Me ' . "\r\n" . - 'To: mark@swiftmailer.org, Chris Corbyn ' . "\r\n" . - 'Cc: john@some-site.com' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testMultipleCcAddressesCanBeSet() - { - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array('chris.corbyn@swiftmailer.org'=>'Chris')); - $message->setReplyTo(array( - 'chris@w3style.co.uk' => 'Myself', - 'my.other@address.com' => 'Me' - )); - $message->setTo(array( - 'mark@swiftmailer.org', 'chris@swiftmailer.org' => 'Chris Corbyn' - )); - $message->setCc(array( - 'john@some-site.com' => 'John West', - 'fred@another-site.co.uk' => 'Big Fred' - )); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris ' . "\r\n" . - 'Reply-To: Myself , Me ' . "\r\n" . - 'To: mark@swiftmailer.org, Chris Corbyn ' . "\r\n" . - 'Cc: John West , Big Fred ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testBccAddressCanBeSet() - { - //Obviously Transports need to setBcc(array()) and send to each Bcc recipient - // separately in accordance with RFC 2822/2821 - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array('chris.corbyn@swiftmailer.org'=>'Chris')); - $message->setReplyTo(array( - 'chris@w3style.co.uk' => 'Myself', - 'my.other@address.com' => 'Me' - )); - $message->setTo(array( - 'mark@swiftmailer.org', 'chris@swiftmailer.org' => 'Chris Corbyn' - )); - $message->setCc(array( - 'john@some-site.com' => 'John West', - 'fred@another-site.co.uk' => 'Big Fred' - )); - $message->setBcc('x@alphabet.tld'); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris ' . "\r\n" . - 'Reply-To: Myself , Me ' . "\r\n" . - 'To: mark@swiftmailer.org, Chris Corbyn ' . "\r\n" . - 'Cc: John West , Big Fred ' . "\r\n" . - 'Bcc: x@alphabet.tld' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testMultipleBccAddressesCanBeSet() - { - //Obviously Transports need to setBcc(array()) and send to each Bcc recipient - // separately in accordance with RFC 2822/2821 - $message = $this->_createMessage(); - $message->setSubject('just a test subject'); - $message->setFrom(array('chris.corbyn@swiftmailer.org'=>'Chris')); - $message->setReplyTo(array( - 'chris@w3style.co.uk' => 'Myself', - 'my.other@address.com' => 'Me' - )); - $message->setTo(array( - 'mark@swiftmailer.org', 'chris@swiftmailer.org' => 'Chris Corbyn' - )); - $message->setCc(array( - 'john@some-site.com' => 'John West', - 'fred@another-site.co.uk' => 'Big Fred' - )); - $message->setBcc(array('x@alphabet.tld', 'a@alphabet.tld' => 'A')); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris ' . "\r\n" . - 'Reply-To: Myself , Me ' . "\r\n" . - 'To: mark@swiftmailer.org, Chris Corbyn ' . "\r\n" . - 'Cc: John West , Big Fred ' . "\r\n" . - 'Bcc: x@alphabet.tld, A ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString() - ); - } - - public function testStringBodyIsAppended() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - $message->setBody( - 'just a test body' . "\r\n" . - 'with a new line' - ); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'just a test body' . "\r\n" . - 'with a new line', - $message->toString() - ); - } - - public function testStringBodyIsEncoded() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - $message->setBody( - 'Just s' . pack('C*', 0xC2, 0x01, 0x01) . 'me multi-' . "\r\n" . - 'line message!' - ); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'Just s=C2=01=01me multi-' . "\r\n" . - 'line message!', - $message->toString() - ); - } - - public function testChildrenCanBeAttached() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - - $id = $message->getId(); - $date = $message->getDate(); - $boundary = $message->getBoundary(); - - $part1 = $this->_createMimePart(); - $part1->setContentType('text/plain'); - $part1->setCharset('iso-8859-1'); - $part1->setBody('foo'); - - $message->attach($part1); - - $part2 = $this->_createMimePart(); - $part2->setContentType('text/html'); - $part2->setCharset('iso-8859-1'); - $part2->setBody('test foo'); - - $message->attach($part2); - - $this->assertEqual( - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/alternative;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/plain; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foo' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/html; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'test foo' . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n", - $message->toString() - ); - } - - public function testAttachmentsBeingAttached() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - - $id = $message->getId(); - $date = preg_quote(date('r', $message->getDate()), '~'); - $boundary = $message->getBoundary(); - - $part = $this->_createMimePart(); - $part->setContentType('text/plain'); - $part->setCharset('iso-8859-1'); - $part->setBody('foo'); - - $message->attach($part); - - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $attachment->setFilename('foo.pdf'); - $attachment->setBody(''); - - $message->attach($attachment); - - $this->assertPattern( - '~^' . - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/mixed;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: multipart/alternative;' . "\r\n" . - ' boundary="(.*?)"' . "\r\n" . - "\r\n\r\n" . - '--\\1' . "\r\n" . - 'Content-Type: text/plain; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foo' . - "\r\n\r\n" . - '--\\1--' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: application/pdf; name=foo.pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment; filename=foo.pdf' . "\r\n" . - "\r\n" . - preg_quote(base64_encode(''), '~') . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n" . - '$~D', - $message->toString() - ); - } - - public function testAttachmentsAndEmbeddedFilesBeingAttached() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - - $id = $message->getId(); - $date = preg_quote(date('r', $message->getDate()), '~'); - $boundary = $message->getBoundary(); - - $part = $this->_createMimePart(); - $part->setContentType('text/plain'); - $part->setCharset('iso-8859-1'); - $part->setBody('foo'); - - $message->attach($part); - - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $attachment->setFilename('foo.pdf'); - $attachment->setBody(''); - - $message->attach($attachment); - - $file = $this->_createEmbeddedFile(); - $file->setContentType('image/jpeg'); - $file->setFilename('myimage.jpg'); - $file->setBody(''); - - $message->attach($file); - - $cid = $file->getId(); - - $this->assertPattern( - '~^' . - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/mixed;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: multipart/alternative;' . "\r\n" . - ' boundary="(.*?)"' . "\r\n" . - "\r\n\r\n" . - '--\\1' . "\r\n" . - 'Content-Type: text/plain; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foo' . - - "\r\n\r\n" . - '--\\1' . "\r\n" . - 'Content-Type: multipart/related;' . "\r\n" . - ' boundary="(.*?)"' . "\r\n" . - "\r\n\r\n" . - '--\\2' . "\r\n" . - 'Content-Type: image/jpeg; name=myimage.jpg' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline; filename=myimage.jpg' . "\r\n" . - 'Content-ID: <' . $cid . '>' . "\r\n" . - "\r\n" . - preg_quote(base64_encode(''), '~') . - "\r\n\r\n" . - '--\\2--' . "\r\n" . - "\r\n\r\n" . - '--\\1--' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: application/pdf; name=foo.pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment; filename=foo.pdf' . "\r\n" . - "\r\n" . - preg_quote(base64_encode(''), '~') . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n" . - '$~D', - $message->toString() - ); - } - - public function testComplexEmbeddingOfContent() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - - $id = $message->getId(); - $date = preg_quote(date('r', $message->getDate()), '~'); - $boundary = $message->getBoundary(); - - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $attachment->setFilename('foo.pdf'); - $attachment->setBody(''); - - $message->attach($attachment); - - $file = $this->_createEmbeddedFile(); - $file->setContentType('image/jpeg'); - $file->setFilename('myimage.jpg'); - $file->setBody(''); - - $part = $this->_createMimePart(); - $part->setContentType('text/html'); - $part->setCharset('iso-8859-1'); - $part->setBody('foo '); - - $message->attach($part); - - $cid = $file->getId(); - - $this->assertPattern( - '~^' . - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/mixed;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: multipart/related;' . "\r\n" . - ' boundary="(.*?)"' . "\r\n" . - "\r\n\r\n" . - '--\\1' . "\r\n" . - 'Content-Type: text/html; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foo ' . //=3D is just = in QP - "\r\n\r\n" . - '--\\1' . "\r\n" . - 'Content-Type: image/jpeg; name=myimage.jpg' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline; filename=myimage.jpg' . "\r\n" . - 'Content-ID: <' . $cid . '>' . "\r\n" . - "\r\n" . - preg_quote(base64_encode(''), '~') . - "\r\n\r\n" . - '--\\1--' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: application/pdf; name=foo.pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment; filename=foo.pdf' . "\r\n" . - "\r\n" . - preg_quote(base64_encode(''), '~') . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n" . - '$~D', - $message->toString() - ); - } - - public function testAttachingAndDetachingContent() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - - $id = $message->getId(); - $date = preg_quote(date('r', $message->getDate()), '~'); - $boundary = $message->getBoundary(); - - $part = $this->_createMimePart(); - $part->setContentType('text/plain'); - $part->setCharset('iso-8859-1'); - $part->setBody('foo'); - - $message->attach($part); - - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $attachment->setFilename('foo.pdf'); - $attachment->setBody(''); - - $message->attach($attachment); - - $file = $this->_createEmbeddedFile(); - $file->setContentType('image/jpeg'); - $file->setFilename('myimage.jpg'); - $file->setBody(''); - - $message->attach($file); - - $cid = $file->getId(); - - $message->detach($attachment); - - $this->assertPattern( - '~^' . - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/alternative;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/plain; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foo' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: multipart/related;' . "\r\n" . - ' boundary="(.*?)"' . "\r\n" . - "\r\n\r\n" . - '--\\1' . "\r\n" . - 'Content-Type: image/jpeg; name=myimage.jpg' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline; filename=myimage.jpg' . "\r\n" . - 'Content-ID: <' . $cid . '>' . "\r\n" . - "\r\n" . - preg_quote(base64_encode(''), '~') . - "\r\n\r\n" . - '--\\1--' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n" . - '$~D', - $message->toString(), - '%s: Attachment should have been detached' - ); - } - - public function testBoundaryDoesNotAppearAfterAllPartsAreDetached() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - - $id = $message->getId(); - $date = $message->getDate(); - $boundary = $message->getBoundary(); - - $part1 = $this->_createMimePart(); - $part1->setContentType('text/plain'); - $part1->setCharset('iso-8859-1'); - $part1->setBody('foo'); - - $message->attach($part1); - - $part2 = $this->_createMimePart(); - $part2->setContentType('text/html'); - $part2->setCharset('iso-8859-1'); - $part2->setBody('test foo'); - - $message->attach($part2); - - $message->detach($part1); - $message->detach($part2); - - $this->assertEqual( - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n", - $message->toString(), - '%s: Message should be restored to orignal state after parts are detached' - ); - } - - public function testCharsetFormatOrDelSpAreNotShownWhenBoundaryIsSet() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - $message->setCharset('utf-8'); - $message->setFormat('flowed'); - $message->setDelSp(true); - - $id = $message->getId(); - $date = $message->getDate(); - $boundary = $message->getBoundary(); - - $part1 = $this->_createMimePart(); - $part1->setContentType('text/plain'); - $part1->setCharset('iso-8859-1'); - $part1->setBody('foo'); - - $message->attach($part1); - - $part2 = $this->_createMimePart(); - $part2->setContentType('text/html'); - $part2->setCharset('iso-8859-1'); - $part2->setBody('test foo'); - - $message->attach($part2); - - $this->assertEqual( - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/alternative;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/plain; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foo' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/html; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'test foo' . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n", - $message->toString() - ); - } - - public function testBodyCanBeSetWithAttachments() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - $message->setContentType('text/html'); - $message->setCharset('iso-8859-1'); - $message->setBody('foo'); - - $id = $message->getId(); - $date = date('r', $message->getDate()); - $boundary = $message->getBoundary(); - - $attachment = $this->_createAttachment(); - $attachment->setContentType('application/pdf'); - $attachment->setFilename('foo.pdf'); - $attachment->setBody(''); - - $message->attach($attachment); - - $this->assertEqual( - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/mixed;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/html; charset=iso-8859-1' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foo' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: application/pdf; name=foo.pdf' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment; filename=foo.pdf' . "\r\n" . - "\r\n" . - base64_encode('') . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n", - $message->toString() - ); - } - - public function testHtmlPartAlwaysAppearsLast() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - - $id = $message->getId(); - $date = date('r', $message->getDate()); - $boundary = $message->getBoundary(); - - $part1 = $this->_createMimePart(); - $part1->setContentType('text/html'); - $part1->setBody('foo'); - - $part2 = $this->_createMimePart(); - $part2->setContentType('text/plain'); - $part2->setBody('bar'); - - $message->attach($part1); - $message->attach($part2); - - $this->assertEqual( - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/alternative;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'bar' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/html' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foo' . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n", - $message->toString() - ); - } - - public function testBodyBecomesPartIfOtherPartsAttached() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - $message->setContentType('text/html'); - $message->setBody('foo'); - - $id = $message->getId(); - $date = date('r', $message->getDate()); - $boundary = $message->getBoundary(); - - $part2 = $this->_createMimePart(); - $part2->setContentType('text/plain'); - $part2->setBody('bar'); - - $message->attach($part2); - - $this->assertEqual( - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/alternative;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'bar' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/html' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'foo' . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n", - $message->toString() - ); - } - - public function testBodyIsCanonicalized() - { - $message = $this->_createMessage(); - $message->setReturnPath('chris@w3style.co.uk'); - $message->setSubject('just a test subject'); - $message->setFrom(array( - 'chris.corbyn@swiftmailer.org' => 'Chris Corbyn')); - $message->setBody( - 'just a test body' . "\n" . - 'with a new line' - ); - $id = $message->getId(); - $date = $message->getDate(); - $this->assertEqual( - 'Return-Path: ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . date('r', $date) . "\r\n" . - 'Subject: just a test subject' . "\r\n" . - 'From: Chris Corbyn ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: text/plain' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'just a test body' . "\r\n" . - 'with a new line', - $message->toString() - ); - } - - // -- Private helpers - - protected function _createMessage() - { - return new Swift_Message(); - } - - protected function _createMimePart() - { - return new Swift_MimePart(); - } - - protected function _createAttachment() - { - return new Swift_Attachment(); - } - - protected function _createEmbeddedFile() - { - return new Swift_EmbeddedFile(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/MimePartAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/MimePartAcceptanceTest.php deleted file mode 100644 index e94795c5..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/MimePartAcceptanceTest.php +++ /dev/null @@ -1,15 +0,0 @@ -register('properties.charset')->asValue(null); - - return Swift_MimePart::newInstance(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/AbstractStreamBufferAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/AbstractStreamBufferAcceptanceTest.php deleted file mode 100644 index 7b6c7266..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/AbstractStreamBufferAcceptanceTest.php +++ /dev/null @@ -1,122 +0,0 @@ -_buffer = new Swift_Transport_StreamBuffer( - $this->_stub('Swift_ReplacementFilterFactory') - ); - } - - public function testReadLine() - { - $this->_initializeBuffer(); - - $line = $this->_buffer->readLine(0); - $this->assertPattern('/^[0-9]{3}.*?\r\n$/D', $line); - $seq = $this->_buffer->write("QUIT\r\n"); - $this->assertTrue($seq); - $line = $this->_buffer->readLine($seq); - $this->assertPattern('/^[0-9]{3}.*?\r\n$/D', $line); - $this->_buffer->terminate(); - } - - public function testWrite() - { - $this->_initializeBuffer(); - - $line = $this->_buffer->readLine(0); - $this->assertPattern('/^[0-9]{3}.*?\r\n$/D', $line); - - $seq = $this->_buffer->write("HELO foo\r\n"); - $this->assertTrue($seq); - $line = $this->_buffer->readLine($seq); - $this->assertPattern('/^[0-9]{3}.*?\r\n$/D', $line); - - $seq = $this->_buffer->write("QUIT\r\n"); - $this->assertTrue($seq); - $line = $this->_buffer->readLine($seq); - $this->assertPattern('/^[0-9]{3}.*?\r\n$/D', $line); - $this->_buffer->terminate(); - } - - public function testBindingOtherStreamsMirrorsWriteOperations() - { - $this->_initializeBuffer(); - - $is1 = $this->_createMockInputStream(); - $is2 = $this->_createMockInputStream(); - - $this->_checking(Expectations::create() - -> one($is1)->write('x') - -> one($is2)->write('x') - -> one($is1)->write('y') - -> one($is2)->write('y') - ); - - $this->_buffer->bind($is1); - $this->_buffer->bind($is2); - - $this->_buffer->write('x'); - $this->_buffer->write('y'); - } - - public function testBindingOtherStreamsMirrorsFlushOperations() - { - $this->_initializeBuffer(); - - $is1 = $this->_createMockInputStream(); - $is2 = $this->_createMockInputStream(); - - $this->_checking(Expectations::create() - -> one($is1)->flushBuffers() - -> one($is2)->flushBuffers() - ); - - $this->_buffer->bind($is1); - $this->_buffer->bind($is2); - - $this->_buffer->flushBuffers(); - } - - public function testUnbindingStreamPreventsFurtherWrites() - { - $this->_initializeBuffer(); - - $is1 = $this->_createMockInputStream(); - $is2 = $this->_createMockInputStream(); - - $this->_checking(Expectations::create() - -> one($is1)->write('x') - -> one($is2)->write('x') - -> one($is1)->write('y') - ); - - $this->_buffer->bind($is1); - $this->_buffer->bind($is2); - - $this->_buffer->write('x'); - - $this->_buffer->unbind($is2); - - $this->_buffer->write('y'); - } - - // -- Creation Methods - - private function _createMockInputStream() - { - return $this->_mock('Swift_InputByteStream'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/BasicSocketAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/BasicSocketAcceptanceTest.php deleted file mode 100644 index 364e353f..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/BasicSocketAcceptanceTest.php +++ /dev/null @@ -1,31 +0,0 @@ -skipUnless(SWIFT_SMTP_HOST, - 'Cannot run test without an SMTP host to connect to (define ' . - 'SWIFT_SMTP_HOST in tests/acceptance.conf.php if you wish to run this test)' - ); - } - - protected function _initializeBuffer() - { - $parts = explode(':', SWIFT_SMTP_HOST); - $host = $parts[0]; - $port = isset($parts[1]) ? $parts[1] : 25; - - $this->_buffer->initialize(array( - 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET, - 'host' => $host, - 'port' => $port, - 'protocol' => 'tcp', - 'blocking' => 1, - 'timeout' => 15 - )); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/ProcessAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/ProcessAcceptanceTest.php deleted file mode 100644 index a108ba22..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/ProcessAcceptanceTest.php +++ /dev/null @@ -1,23 +0,0 @@ -skipIf(!SWIFT_SENDMAIL_PATH, - 'Cannot run test without a path to sendmail (define ' . - 'SWIFT_SENDMAIL_PATH in tests/acceptance.conf.php if you wish to run this test)' - ); - } - - protected function _initializeBuffer() - { - $this->_buffer->initialize(array( - 'type' => Swift_Transport_IoBuffer::TYPE_PROCESS, - 'command' => SWIFT_SENDMAIL_PATH . ' -bs' - )); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SocketTimeoutTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SocketTimeoutTest.php deleted file mode 100644 index 93fb74a0..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SocketTimeoutTest.php +++ /dev/null @@ -1,72 +0,0 @@ -_buffer = new Swift_Transport_StreamBuffer( - $this->_stub('Swift_ReplacementFilterFactory') - ); - } - - public function skip() - { - $serverStarted=false; - for ($i=0; $i<5; ++$i) { - $this->_randomHighPort=rand(50000,65000); - $this->_server = stream_socket_server('tcp://127.0.0.1:' . $this->_randomHighPort); - if ($this->_server) { - $serverStarted=true; - } - } - $this->skipUnless(SWIFT_SMTP_HOST, - 'Cannot run test without an SMTP host to connect to (define ' . - 'SWIFT_SMTP_HOST in tests/acceptance.conf.php if you wish to run this test)' - ); - } - - protected function _initializeBuffer() - { - $host = '127.0.0.1'; - $port = $this->_randomHighPort; - - $this->_buffer->initialize(array( - 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET, - 'host' => $host, - 'port' => $port, - 'protocol' => 'tcp', - 'blocking' => 1, - 'timeout' => 1 - )); - } - - public function testTimeoutException() - { - $this->_initializeBuffer(); - $e=null; - try { - $line = $this->_buffer->readLine(0); - } catch (Exception $e) { - } - $this->assertIsA($e, 'Swift_IoException', 'IO Exception Not Thrown On Connection Timeout'); - $this->assertPattern('/Connection to .* Timed Out/', $e->getMessage()); - } - - public function tearDown() - { - if ($this->_server) { - stream_socket_shutdown($this->_server, STREAM_SHUT_RDWR); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SslSocketAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SslSocketAcceptanceTest.php deleted file mode 100644 index 4dea91c6..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SslSocketAcceptanceTest.php +++ /dev/null @@ -1,35 +0,0 @@ -skipIf(!in_array('ssl', $streams), - 'SSL is not configured for your system. It is not possible to run this test' - ); - $this->skipIf(!SWIFT_SSL_HOST, - 'Cannot run test without an SSL enabled SMTP host to connect to (define ' . - 'SWIFT_SSL_HOST in tests/acceptance.conf.php if you wish to run this test)' - ); - } - - protected function _initializeBuffer() - { - $parts = explode(':', SWIFT_SSL_HOST); - $host = $parts[0]; - $port = isset($parts[1]) ? $parts[1] : 25; - - $this->_buffer->initialize(array( - 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET, - 'host' => $host, - 'port' => $port, - 'protocol' => 'ssl', - 'blocking' => 1, - 'timeout' => 15 - )); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/TlsSocketAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/TlsSocketAcceptanceTest.php deleted file mode 100644 index b1e38d7c..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/TlsSocketAcceptanceTest.php +++ /dev/null @@ -1,35 +0,0 @@ -skipIf(!in_array('tls', $streams), - 'TLS is not configured for your system. It is not possible to run this test' - ); - $this->skipIf(!SWIFT_TLS_HOST, - 'Cannot run test without a TLS enabled SMTP host to connect to (define ' . - 'SWIFT_TLS_HOST in tests/acceptance.conf.php if you wish to run this test)' - ); - } - - protected function _initializeBuffer() - { - $parts = explode(':', SWIFT_TLS_HOST); - $host = $parts[0]; - $port = isset($parts[1]) ? $parts[1] : 25; - - $this->_buffer->initialize(array( - 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET, - 'host' => $host, - 'port' => $port, - 'protocol' => 'tls', - 'blocking' => 1, - 'timeout' => 15 - )); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug111Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug111Test.php deleted file mode 100644 index 1afb64c1..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug111Test.php +++ /dev/null @@ -1,44 +0,0 @@ - array( - 'email1@example.com', - 'email2@example.com', - 'email3@example.com', - 'email4@example.com', - 'email5@example.com', - ), - 'sub' => array( - '-name-' => array( - 'email1', - '"email2"', - 'email3\\', - 'email4', - 'email5', - ), - '-url-' => array( - 'http://google.com', - 'http://yahoo.com', - 'http://hotmail.com', - 'http://aol.com', - 'http://facebook.com', - ), - ) - ); - $json = json_encode($complicated_header); - - $message = new Swift_Message(); - $headers = $message->getHeaders(); - $headers->addTextHeader('X-SMTPAPI', $json); - $header = $headers->get('X-SMTPAPI'); - - $this->assertEqual('Swift_Mime_Headers_UnstructuredHeader', get_class($header)); - $this->assertEqual($json, $header->getFieldBody()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug118Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug118Test.php deleted file mode 100644 index 0800a00d..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug118Test.php +++ /dev/null @@ -1,22 +0,0 @@ -_message = new Swift_Message(); - } - - public function testCallingGenerateIdChangesTheMessageId() - { - $currentId = $this->_message->getId(); - $this->_message->generateId(); - $newId = $this->_message->getId(); - - $this->assertNotEqual($currentId, $newId); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug206Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug206Test.php deleted file mode 100644 index 8833eb2f..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug206Test.php +++ /dev/null @@ -1,40 +0,0 @@ -_factory = new Swift_Mime_SimpleHeaderFactory($headerEncoder, $paramEncoder, $grammar); - } - - public function testMailboxHeaderEncoding() - { - $this->_testHeaderIsFullyEncoded('email@example.org', 'Family Name, Name', ' "Family Name, Name" '); - $this->_testHeaderIsFullyEncoded('email@example.org', 'Family Namé, Name', ' Family =?utf-8?Q?Nam=C3=A9=2C?= Name'); - $this->_testHeaderIsFullyEncoded('email@example.org', 'Family Namé , Name', ' Family =?utf-8?Q?Nam=C3=A9_=2C?= Name'); - $this->_testHeaderIsFullyEncoded('email@example.org', 'Family Namé ;Name', ' Family =?utf-8?Q?Nam=C3=A9_=3BName?= '); - } - - private function _testHeaderIsFullyEncoded($email, $name, $expected) - { - $mailboxHeader = $this->_factory->createMailboxHeader('To', array( - $email => $name - )); - - $headerBody = substr($mailboxHeader->toString(), 3, strlen($expected)); - - $this->assertEqual($expected, $headerBody); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug274Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug274Test.php deleted file mode 100644 index 0fab7596..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug274Test.php +++ /dev/null @@ -1,23 +0,0 @@ -expectException(new Swift_IoException('The path cannot be empty')); - $message->attach(Swift_Attachment::fromPath('')); - } - - public function testNonEmptyFileNameAsAttachement() - { - $message = new Swift_Message(); - try { - $message->attach(Swift_Attachment::fromPath(__FILE__)); - } catch (Exception $e) { - $this->fail('Path should not be empty'); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug34Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug34Test.php deleted file mode 100644 index c87bd78e..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug34Test.php +++ /dev/null @@ -1,77 +0,0 @@ -setCharset('utf-8'); - } - - public function testEmbeddedFilesWithMultipartDataCreateMultipartRelatedContentAsAnAlternative() - { - $message = Swift_Message::newInstance(); - $message->setCharset('utf-8'); - $message->setSubject('test subject'); - $message->addPart('plain part', 'text/plain'); - - $image = Swift_Image::newInstance('', 'image.gif', 'image/gif'); - $cid = $message->embed($image); - - $message->setBody('', 'text/html'); - - $message->setTo(array('user@domain.tld' => 'User')); - - $message->setFrom(array('other@domain.tld' => 'Other')); - $message->setSender(array('other@domain.tld' => 'Other')); - - $id = $message->getId(); - $date = preg_quote(date('r', $message->getDate()), '~'); - $boundary = $message->getBoundary(); - $cidVal = $image->getId(); - - $this->assertPattern( - '~^' . - 'Sender: Other ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: test subject' . "\r\n" . - 'From: Other ' . "\r\n" . - 'To: User ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/alternative;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/plain; charset=utf-8' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'plain part' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: multipart/related;' . "\r\n" . - ' boundary="(.*?)"' . "\r\n" . - "\r\n\r\n" . - '--\\1' . "\r\n" . - 'Content-Type: text/html; charset=utf-8' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - '' . - "\r\n\r\n" . - '--\\1' . "\r\n" . - 'Content-Type: image/gif; name=image.gif' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline; filename=image.gif' . "\r\n" . - 'Content-ID: <' . $cidVal . '>' . "\r\n" . - "\r\n" . - preg_quote(base64_encode(''), '~') . - "\r\n\r\n" . - '--\\1--' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n" . - '$~D', - $message->toString() - ); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug35Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug35Test.php deleted file mode 100644 index 51387908..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug35Test.php +++ /dev/null @@ -1,75 +0,0 @@ -setCharset('utf-8'); - } - - public function testHTMLPartAppearsLastEvenWhenAttachmentsAdded() - { - $message = Swift_Message::newInstance(); - $message->setCharset('utf-8'); - $message->setSubject('test subject'); - $message->addPart('plain part', 'text/plain'); - - $attachment = Swift_Attachment::newInstance('', 'image.gif', 'image/gif'); - $message->attach($attachment); - - $message->setBody('HTML part', 'text/html'); - - $message->setTo(array('user@domain.tld' => 'User')); - - $message->setFrom(array('other@domain.tld' => 'Other')); - $message->setSender(array('other@domain.tld' => 'Other')); - - $id = $message->getId(); - $date = preg_quote(date('r', $message->getDate()), '~'); - $boundary = $message->getBoundary(); - - $this->assertPattern( - '~^' . - 'Sender: Other ' . "\r\n" . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: test subject' . "\r\n" . - 'From: Other ' . "\r\n" . - 'To: User ' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/mixed;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: multipart/alternative;' . "\r\n" . - ' boundary="(.*?)"' . "\r\n" . - "\r\n\r\n" . - '--\\1' . "\r\n" . - 'Content-Type: text/plain; charset=utf-8' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'plain part' . - "\r\n\r\n" . - '--\\1' . "\r\n" . - 'Content-Type: text/html; charset=utf-8' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'HTML part' . - "\r\n\r\n" . - '--\\1--' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: image/gif; name=image.gif' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment; filename=image.gif' . "\r\n" . - "\r\n" . - preg_quote(base64_encode(''), '~') . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n" . - '$~D', - $message->toString() - ); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug38Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug38Test.php deleted file mode 100644 index d28b8eb4..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug38Test.php +++ /dev/null @@ -1,196 +0,0 @@ -_attFileName = 'data.txt'; - $this->_attFileType = 'text/plain'; - $this->_attFile = dirname(__FILE__) . '/../../_samples/files/data.txt'; - Swift_Preferences::getInstance()->setCharset('utf-8'); - } - - public function testWritingMessageToByteStreamProducesCorrectStructure() - { - $message = new Swift_Message(); - $message->setSubject('test subject'); - $message->setTo('user@domain.tld'); - $message->setCc('other@domain.tld'); - $message->setFrom('user@domain.tld'); - - $image = new Swift_Image('', 'image.gif', 'image/gif'); - - $cid = $message->embed($image); - $message->setBody('HTML part', 'text/html'); - - $id = $message->getId(); - $date = preg_quote(date('r', $message->getDate()), '~'); - $boundary = $message->getBoundary(); - $imgId = $image->getId(); - - $stream = new Swift_ByteStream_ArrayByteStream(); - - $message->toByteStream($stream); - - $this->assertPatternInStream( - '~^' . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: test subject' . "\r\n" . - 'From: user@domain.tld' . "\r\n" . - 'To: user@domain.tld' . "\r\n" . - 'Cc: other@domain.tld' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/related;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/html; charset=utf-8' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'HTML part' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: image/gif; name=image.gif' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline; filename=image.gif' . "\r\n" . - 'Content-ID: <' . preg_quote($imgId, '~') . '>' . "\r\n" . - "\r\n" . - preg_quote(base64_encode(''), '~') . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n" . - '$~D', - $stream - ); - } - - public function testWritingMessageToByteStreamTwiceProducesCorrectStructure() - { - $message = new Swift_Message(); - $message->setSubject('test subject'); - $message->setTo('user@domain.tld'); - $message->setCc('other@domain.tld'); - $message->setFrom('user@domain.tld'); - - $image = new Swift_Image('', 'image.gif', 'image/gif'); - - $cid = $message->embed($image); - $message->setBody('HTML part', 'text/html'); - - $id = $message->getId(); - $date = preg_quote(date('r', $message->getDate()), '~'); - $boundary = $message->getBoundary(); - $imgId = $image->getId(); - - $pattern = '~^' . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: test subject' . "\r\n" . - 'From: user@domain.tld' . "\r\n" . - 'To: user@domain.tld' . "\r\n" . - 'Cc: other@domain.tld' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/related;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/html; charset=utf-8' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'HTML part' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: image/gif; name=image.gif' . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: inline; filename=image.gif' . "\r\n" . - 'Content-ID: <' . preg_quote($imgId, '~') . '>' . "\r\n" . - "\r\n" . - preg_quote(base64_encode(''), '~') . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n" . - '$~D' - ; - - $streamA = new Swift_ByteStream_ArrayByteStream(); - $streamB = new Swift_ByteStream_ArrayByteStream(); - - $message->toByteStream($streamA); - $message->toByteStream($streamB); - - $this->assertPatternInStream($pattern, $streamA); - $this->assertPatternInStream($pattern, $streamB); - } - - public function testWritingMessageToByteStreamTwiceUsingAFileAttachment() - { - $message = new Swift_Message(); - $message->setSubject('test subject'); - $message->setTo('user@domain.tld'); - $message->setCc('other@domain.tld'); - $message->setFrom('user@domain.tld'); - - $attachment = Swift_Attachment::fromPath($this->_attFile); - - $message->attach($attachment); - - $message->setBody('HTML part', 'text/html'); - - $id = $message->getId(); - $date = preg_quote(date('r', $message->getDate()), '~'); - $boundary = $message->getBoundary(); - - $streamA = new Swift_ByteStream_ArrayByteStream(); - $streamB = new Swift_ByteStream_ArrayByteStream(); - - $pattern = '~^' . - 'Message-ID: <' . $id . '>' . "\r\n" . - 'Date: ' . $date . "\r\n" . - 'Subject: test subject' . "\r\n" . - 'From: user@domain.tld' . "\r\n" . - 'To: user@domain.tld' . "\r\n" . - 'Cc: other@domain.tld' . "\r\n" . - 'MIME-Version: 1.0' . "\r\n" . - 'Content-Type: multipart/mixed;' . "\r\n" . - ' boundary="' . $boundary . '"' . "\r\n" . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: text/html; charset=utf-8' . "\r\n" . - 'Content-Transfer-Encoding: quoted-printable' . "\r\n" . - "\r\n" . - 'HTML part' . - "\r\n\r\n" . - '--' . $boundary . "\r\n" . - 'Content-Type: ' . $this->_attFileType . '; name=' . $this->_attFileName . "\r\n" . - 'Content-Transfer-Encoding: base64' . "\r\n" . - 'Content-Disposition: attachment; filename=' . $this->_attFileName . "\r\n" . - "\r\n" . - preg_quote(base64_encode(file_get_contents($this->_attFile)), '~') . - "\r\n\r\n" . - '--' . $boundary . '--' . "\r\n" . - '$~D' - ; - - $message->toByteStream($streamA); - $message->toByteStream($streamB); - - $this->assertPatternInStream($pattern, $streamA); - $this->assertPatternInStream($pattern, $streamB); - } - - // -- Helpers - - public function assertPatternInStream($pattern, $stream, $message = '%s') - { - $string = ''; - while (false !== $bytes = $stream->read(8192)) { - $string .= $bytes; - } - $this->assertPattern($pattern, $string, $message); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug51Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug51Test.php deleted file mode 100644 index 51d69b91..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug51Test.php +++ /dev/null @@ -1,125 +0,0 @@ -skipUnless( - is_writable(SWIFT_TMP_DIR), - '%s: This test requires tests/acceptance.conf.php to specify a ' . - 'writable SWIFT_TMP_DIR' - ); - } - - public function setUp() - { - $this->_attachmentFile = SWIFT_TMP_DIR . '/attach.rand.bin'; - file_put_contents($this->_attachmentFile, ''); - - $this->_outputFile = SWIFT_TMP_DIR . '/attach.out.bin'; - file_put_contents($this->_outputFile, ''); - } - - public function tearDown() - { - unlink($this->_attachmentFile); - unlink($this->_outputFile); - } - - public function testAttachmentsDoNotGetTruncatedUsingToByteStream() - { - //Run 100 times with 10KB attachments - for ($i = 0; $i < 10; ++$i) { - $message = $this->_createMessageWithRandomAttachment( - 10000, $this->_attachmentFile - ); - - file_put_contents($this->_outputFile, ''); - $message->toByteStream( - new Swift_ByteStream_FileByteStream($this->_outputFile, true) - ); - - $emailSource = file_get_contents($this->_outputFile); - - $this->assertAttachmentFromSourceMatches( - file_get_contents($this->_attachmentFile), - $emailSource - ); - } - } - - public function testAttachmentsDoNotGetTruncatedUsingToString() - { - //Run 100 times with 10KB attachments - for ($i = 0; $i < 10; ++$i) { - $message = $this->_createMessageWithRandomAttachment( - 10000, $this->_attachmentFile - ); - - $emailSource = $message->toString(); - - $this->assertAttachmentFromSourceMatches( - file_get_contents($this->_attachmentFile), - $emailSource - ); - } - } - - // -- Custom Assertions - - public function assertAttachmentFromSourceMatches($attachmentData, $source) - { - $encHeader = 'Content-Transfer-Encoding: base64'; - $base64declaration = strpos($source, $encHeader); - - $attachmentDataStart = strpos($source, "\r\n\r\n", $base64declaration); - $attachmentDataEnd = strpos($source, "\r\n--", $attachmentDataStart); - - if (false === $attachmentDataEnd) { - $attachmentBase64 = trim(substr($source, $attachmentDataStart)); - } else { - $attachmentBase64 = trim(substr( - $source, $attachmentDataStart, - $attachmentDataEnd - $attachmentDataStart - )); - } - - $this->assertIdenticalBinary($attachmentData, base64_decode($attachmentBase64)); - } - - // -- Creation Methods - - private function _fillFileWithRandomBytes($byteCount, $file) - { - // I was going to use dd with if=/dev/random but this way seems more - // cross platform even if a hella expensive!! - - file_put_contents($file, ''); - $fp = fopen($file, 'wb'); - for ($i = 0; $i < $byteCount; ++$i) { - $byteVal = rand(0, 255); - fwrite($fp, pack('i', $byteVal)); - } - fclose($fp); - } - - private function _createMessageWithRandomAttachment($size, $attachmentPath) - { - $this->_fillFileWithRandomBytes($size, $attachmentPath); - - $message = Swift_Message::newInstance() - ->setSubject('test') - ->setBody('test') - ->setFrom('a@b.c') - ->setTo('d@e.f') - ->attach(Swift_Attachment::fromPath($attachmentPath)) - ; - - return $message; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug71Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug71Test.php deleted file mode 100644 index d00ebafd..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug71Test.php +++ /dev/null @@ -1,22 +0,0 @@ -_message = new Swift_Message('test'); - } - - public function testCallingToStringAfterSettingNewBodyReflectsChanges() - { - $this->_message->setBody('BODY1'); - $this->assertPattern('/BODY1/', $this->_message->toString()); - - $this->_message->setBody('BODY2'); - $this->assertPattern('/BODY2/', $this->_message->toString()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug76Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug76Test.php deleted file mode 100644 index ce8714b8..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug76Test.php +++ /dev/null @@ -1,86 +0,0 @@ -skipUnless( - is_writable(SWIFT_TMP_DIR), - '%s: This test requires tests/acceptance.conf.php to specify a ' . - 'writable SWIFT_TMP_DIR' - ); - } - - public function setUp() - { - $this->_inputFile = SWIFT_TMP_DIR . '/in.bin'; - file_put_contents($this->_inputFile, ''); - - $this->_outputFile = SWIFT_TMP_DIR . '/out.bin'; - file_put_contents($this->_outputFile, ''); - - $this->_encoder = $this->_createEncoder(); - } - - public function tearDown() - { - unlink($this->_inputFile); - unlink($this->_outputFile); - } - - public function testBase64EncodedLineLengthNeverExceeds76CharactersEvenIfArgsDo() - { - $this->_fillFileWithRandomBytes(1000, $this->_inputFile); - - $os = $this->_createStream($this->_inputFile); - $is = $this->_createStream($this->_outputFile); - - $this->_encoder->encodeByteStream($os, $is, 0, 80); //Exceeds 76 - - $this->assertMaxLineLength(76, $this->_outputFile, - '%s: Line length should not exceed 76 characters' - ); - } - - // -- Custom Assertions - - public function assertMaxLineLength($length, $filePath, $message = '%s') - { - $lines = file($filePath); - foreach ($lines as $line) { - $this->assertTrue((strlen(trim($line)) <= 76), $message); - } - } - - // -- Creation Methods - - private function _fillFileWithRandomBytes($byteCount, $file) - { - // I was going to use dd with if=/dev/random but this way seems more - // cross platform even if a hella expensive!! - - file_put_contents($file, ''); - $fp = fopen($file, 'wb'); - for ($i = 0; $i < $byteCount; ++$i) { - $byteVal = rand(0, 255); - fwrite($fp, pack('i', $byteVal)); - } - fclose($fp); - } - - private function _createEncoder() - { - return new Swift_Mime_ContentEncoder_Base64ContentEncoder(); - } - - private function _createStream($file) - { - return new Swift_ByteStream_FileByteStream($file, true); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/helpers/Swift/Tests/IdenticalBinaryExpectation.php b/vendor/swiftmailer/swiftmailer/tests/helpers/Swift/Tests/IdenticalBinaryExpectation.php deleted file mode 100644 index e50c2719..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/helpers/Swift/Tests/IdenticalBinaryExpectation.php +++ /dev/null @@ -1,79 +0,0 @@ -_left = $left; - } - - /** - * Get the given string of bytes as a stirng of Hexadecimal sequences. - * @param string $binary - * @return string - */ - public function asHexString($binary) - { - $hex = ''; - - $bytes = unpack('H*', $binary); - - foreach ($bytes as &$byte) { - $byte = strtoupper($byte); - } - - return implode('', $bytes); - } - - /** - * Test that the passed subject ($right) is identical to $left. - * @param string $right, subject - * @return boolean - */ - public function test($right) - { - $aHex = $this->asHexString($this->_left); - $bHex = $this->asHexString($right); - - return $aHex === $bHex; - } - - /** - * Get the message depending upon whether this expectation is satisfied. - * @param $right subject to compare against - * @return string - */ - public function testMessage($right) - { - if ($this->test($right)) { - return 'Identical binary expectation [' . $this->asHexString($right) . ']'; - } else { - $this->_dumper=new SimpleDumper(); - - return 'Identical binary expectation fails ' . - $this->_dumper->describeDifference( - $this->asHexString($this->_left), - $this->asHexString($right) - ); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/helpers/Swift/Tests/SwiftSmokeTestCase.php b/vendor/swiftmailer/swiftmailer/tests/helpers/Swift/Tests/SwiftSmokeTestCase.php deleted file mode 100644 index e85563ef..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/helpers/Swift/Tests/SwiftSmokeTestCase.php +++ /dev/null @@ -1,53 +0,0 @@ -skipUnless(SWIFT_SMOKE_TRANSPORT_TYPE, - '%s: Smoke tests are skipped if tests/smoke.conf.php is not editted' - ); - } - - protected function _getMailer() - { - switch (SWIFT_SMOKE_TRANSPORT_TYPE) { - case 'smtp': - $transport = Swift_DependencyContainer::getInstance()->lookup('transport.smtp') - ->setHost(SWIFT_SMOKE_SMTP_HOST) - ->setPort(SWIFT_SMOKE_SMTP_PORT) - ->setUsername(SWIFT_SMOKE_SMTP_USER) - ->setPassword(SWIFT_SMOKE_SMTP_PASS) - ->setEncryption(SWIFT_SMOKE_SMTP_ENCRYPTION) - ; - break; - case 'sendmail': - $transport = Swift_DependencyContainer::getInstance()->lookup('transport.sendmail') - ->setCommand(SWIFT_SMOKE_SENDMAIL_COMMAND) - ; - break; - case 'mail': - case 'nativemail': - $transport = Swift_DependencyContainer::getInstance()->lookup('transport.mail'); - break; - default: - throw new Exception('Undefined transport [' . SWIFT_SMOKE_TRANSPORT_TYPE . ']'); - } - - return new Swift_Mailer($transport); - } - - protected function _visualCheck($url) - { - $this->dump('{image @ ' . $url . '}'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/helpers/Swift/Tests/SwiftUnitTestCase.php b/vendor/swiftmailer/swiftmailer/tests/helpers/Swift/Tests/SwiftUnitTestCase.php deleted file mode 100644 index 93524ba4..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/helpers/Swift/Tests/SwiftUnitTestCase.php +++ /dev/null @@ -1,100 +0,0 @@ -_mockery()->assertIsSatisfied(); - } catch (Yay_NotSatisfiedException $e) { - $this->fail($e->getMessage()); - } - $this->_mockery = null; - - return parent::after($method); - } - - /** - * Assert two binary strings are an exact match. - * @param string $a - * @param string $b - * @param string $s formatted message - */ - public function assertIdenticalBinary($a, $b, $s = '%s') - { - return $this->assert(new Swift_Tests_IdenticalBinaryExpectation($a), $b, $s); - } - - // -- Protected methods - - /** - * Returns a singleton-per-test method for Yay_Mockery. - * @return Yay_Mockery - */ - protected function _mockery() - { - if (!isset($this->_mockery)) { - $this->_mockery = new Yay_Mockery(); - } - - return $this->_mockery; - } - - /** - * Create a mock object. - * @param string $class - * @return Yay_Mock - */ - protected function _mock($class) - { - return $this->_mockery()->mock($class); - } - - /** - * Add mock expectations. - * @param Yay_Expectations $expectations - */ - protected function _checking($expectations) - { - return $this->_mockery()->checking($expectations); - } - - /** - * Create a mock object which does nothing. - * @param string $class - * @return Yay_Mock - */ - protected function _stub($class) - { - $stub = $this->_mockery()->mock($class); - $this->_mockery()->checking(Yay_Expectations::create() - -> ignoring($stub) - ); - - return $stub; - } - - protected function _states($machineName) - { - return $this->_mockery()->states($machineName); - } - - protected function _sequence($sequenceName) - { - return $this->_mockery()->sequence($sequenceName); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/smoke.conf.php.default b/vendor/swiftmailer/swiftmailer/tests/smoke.conf.php.default deleted file mode 100644 index 2a75b7d7..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/smoke.conf.php.default +++ /dev/null @@ -1,63 +0,0 @@ -_attFile = dirname(__FILE__) . '/../../../_samples/files/textfile.zip'; - } - - public function testAttachmentSending() - { - $mailer = $this->_getMailer(); - $message = Swift_Message::newInstance() - ->setSubject('[Swift Mailer] AttachmentSmokeTest') - ->setFrom(array(SWIFT_SMOKE_EMAIL_ADDRESS => 'Swift Mailer')) - ->setTo(SWIFT_SMOKE_EMAIL_ADDRESS) - ->setBody('This message should contain an attached ZIP file (named "textfile.zip").' . PHP_EOL . - 'When unzipped, the archive should produce a text file which reads:' . PHP_EOL . - '"This is part of a Swift Mailer v4 smoke test."' - ) - ->attach(Swift_Attachment::fromPath($this->_attFile)) - ; - $this->assertEqual(1, $mailer->send($message), - '%s: The smoke test should send a single message' - ); - $this->_visualCheck('http://swiftmailer.org/smoke/4.0.0/attachment.jpg'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/BasicSmokeTest.php b/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/BasicSmokeTest.php deleted file mode 100644 index 1436a22a..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/BasicSmokeTest.php +++ /dev/null @@ -1,24 +0,0 @@ -_getMailer(); - $message = Swift_Message::newInstance() - ->setSubject('[Swift Mailer] BasicSmokeTest') - ->setFrom(array(SWIFT_SMOKE_EMAIL_ADDRESS => 'Swift Mailer')) - ->setTo(SWIFT_SMOKE_EMAIL_ADDRESS) - ->setBody('One, two, three, four, five...' . PHP_EOL . - 'six, seven, eight...' - ) - ; - $this->assertEqual(1, $mailer->send($message), - '%s: The smoke test should send a single message' - ); - $this->_visualCheck('http://swiftmailer.org/smoke/4.0.0/basic.jpg'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/HtmlWithAttachmentSmokeTest.php b/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/HtmlWithAttachmentSmokeTest.php deleted file mode 100644 index e6fa4a83..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/HtmlWithAttachmentSmokeTest.php +++ /dev/null @@ -1,30 +0,0 @@ -_attFile = dirname(__FILE__) . '/../../../_samples/files/textfile.zip'; - } - - public function testAttachmentSending() - { - $mailer = $this->_getMailer(); - $message = Swift_Message::newInstance('[Swift Mailer] HtmlWithAttachmentSmokeTest') - ->setFrom(array(SWIFT_SMOKE_EMAIL_ADDRESS => 'Swift Mailer')) - ->setTo(SWIFT_SMOKE_EMAIL_ADDRESS) - ->attach(Swift_Attachment::fromPath($this->_attFile)) - ->setBody('

    This HTML-formatted message should contain an attached ZIP file (named "textfile.zip").' . PHP_EOL . - 'When unzipped, the archive should produce a text file which reads:

    ' . PHP_EOL . - '

    This is part of a Swift Mailer v4 smoke test.

    ', 'text/html' - ) - ; - $this->assertEqual(1, $mailer->send($message), - '%s: The smoke test should send a single message' - ); - $this->_visualCheck('http://swiftmailer.org/smoke/4.0.0/attachment.jpg'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/InternationalSmokeTest.php b/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/InternationalSmokeTest.php deleted file mode 100644 index e3131c8d..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/InternationalSmokeTest.php +++ /dev/null @@ -1,37 +0,0 @@ -_attFile = dirname(__FILE__) . '/../../../_samples/files/textfile.zip'; - } - - public function testAttachmentSending() - { - $mailer = $this->_getMailer(); - $message = Swift_Message::newInstance() - ->setCharset('utf-8') - ->setSubject('[Swift Mailer] InternationalSmokeTest (διεθνής)') - ->setFrom(array(SWIFT_SMOKE_EMAIL_ADDRESS => 'Χριστοφορου (Swift Mailer)')) - ->setTo(SWIFT_SMOKE_EMAIL_ADDRESS) - ->setBody('This message should contain an attached ZIP file (named "κείμενο, εδάφιο, θέμα.zip").' . PHP_EOL . - 'When unzipped, the archive should produce a text file which reads:' . PHP_EOL . - '"This is part of a Swift Mailer v4 smoke test."' . PHP_EOL . - PHP_EOL . - 'Following is some arbitrary Greek text:' . PHP_EOL . - 'Δεν βρέθηκαν λέξεις.' - ) - ->attach(Swift_Attachment::fromPath($this->_attFile) - ->setContentType('application/zip') - ->setFilename('κείμενο, εδάφιο, θέμα.zip') - ) - ; - $this->assertEqual(1, $mailer->send($message), - '%s: The smoke test should send a single message' - ); - $this->_visualCheck('http://swiftmailer.org/smoke/4.0.0/international.jpg'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/ByteStream/ArrayByteStreamTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/ByteStream/ArrayByteStreamTest.php deleted file mode 100644 index 80ca0c31..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/ByteStream/ArrayByteStreamTest.php +++ /dev/null @@ -1,204 +0,0 @@ -_createArrayStream($input); - $output = array(); - while (false !== $bytes = $bs->read(1)) { - $output[] = $bytes; - } - $this->assertEqual($input, $output, - '%s: Bytes read from stream should be the same as bytes in constructor' - ); - } - - public function testReadingMultipleBytesFromBaseInput() - { - $input = array('a', 'b', 'c', 'd'); - $bs = $this->_createArrayStream($input); - $output = array(); - while (false !== $bytes = $bs->read(2)) { - $output[] = $bytes; - } - $this->assertEqual(array('ab', 'cd'), $output, - '%s: Bytes read from stream should be in pairs' - ); - } - - public function testReadingOddOffsetOnLastByte() - { - $input = array('a', 'b', 'c', 'd', 'e'); - $bs = $this->_createArrayStream($input); - $output = array(); - while (false !== $bytes = $bs->read(2)) { - $output[] = $bytes; - } - $this->assertEqual(array('ab', 'cd', 'e'), $output, - '%s: Bytes read from stream should be in pairs except final read' - ); - } - - public function testSettingPointerPartway() - { - $input = array('a', 'b', 'c'); - $bs = $this->_createArrayStream($input); - $bs->setReadPointer(1); - $this->assertEqual('b', $bs->read(1), - '%s: Byte should be second byte since pointer as at offset 1' - ); - } - - public function testResettingPointerAfterExhaustion() - { - $input = array('a', 'b', 'c'); - $bs = $this->_createArrayStream($input); - - while (false !== $bs->read(1)); - - $bs->setReadPointer(0); - $this->assertEqual('a', $bs->read(1), - '%s: Byte should be first byte since pointer as at offset 0' - ); - } - - public function testPointerNeverSetsBelowZero() - { - $input = array('a', 'b', 'c'); - $bs = $this->_createArrayStream($input); - - $bs->setReadPointer(-1); - $this->assertEqual('a', $bs->read(1), - '%s: Byte should be first byte since pointer should be at offset 0' - ); - } - - public function testPointerNeverSetsAboveStackSize() - { - $input = array('a', 'b', 'c'); - $bs = $this->_createArrayStream($input); - - $bs->setReadPointer(3); - $this->assertIdentical(false, $bs->read(1), - '%s: Stream should be at end and thus return false' - ); - } - - public function testBytesCanBeWrittenToStream() - { - $input = array('a', 'b', 'c'); - $bs = $this->_createArrayStream($input); - - $bs->write('de'); - - $output = array(); - while (false !== $bytes = $bs->read(1)) { - $output[] = $bytes; - } - $this->assertEqual(array('a', 'b', 'c', 'd', 'e'), $output, - '%s: Bytes read from stream should be from initial stack + written' - ); - } - - public function testContentsCanBeFlushed() - { - $input = array('a', 'b', 'c'); - $bs = $this->_createArrayStream($input); - - $bs->flushBuffers(); - - $this->assertIdentical(false, $bs->read(1), - '%s: Contents have been flushed so read() should return false' - ); - } - - public function testConstructorCanTakeStringArgument() - { - $bs = $this->_createArrayStream('abc'); - $output = array(); - while (false !== $bytes = $bs->read(1)) { - $output[] = $bytes; - } - $this->assertEqual(array('a', 'b', 'c'), $output, - '%s: Bytes read from stream should be the same as bytes in constructor' - ); - } - - public function testBindingOtherStreamsMirrorsWriteOperations() - { - $bs = $this->_createArrayStream(''); - $is1 = $this->_createMockInputStream(); - $is2 = $this->_createMockInputStream(); - - $this->_checking(Expectations::create() - -> one($is1)->write('x') - -> one($is2)->write('x') - -> one($is1)->write('y') - -> one($is2)->write('y') - ); - - $bs->bind($is1); - $bs->bind($is2); - - $bs->write('x'); - $bs->write('y'); - } - - public function testBindingOtherStreamsMirrorsFlushOperations() - { - $bs = $this->_createArrayStream(''); - $is1 = $this->_createMockInputStream(); - $is2 = $this->_createMockInputStream(); - - $this->_checking(Expectations::create() - -> one($is1)->flushBuffers() - -> one($is2)->flushBuffers() - ); - - $bs->bind($is1); - $bs->bind($is2); - - $bs->flushBuffers(); - } - - public function testUnbindingStreamPreventsFurtherWrites() - { - $bs = $this->_createArrayStream(''); - $is1 = $this->_createMockInputStream(); - $is2 = $this->_createMockInputStream(); - - $this->_checking(Expectations::create() - -> one($is1)->write('x') - -> one($is2)->write('x') - -> one($is1)->write('y') - ); - - $bs->bind($is1); - $bs->bind($is2); - - $bs->write('x'); - - $bs->unbind($is2); - - $bs->write('y'); - } - - // -- Creation Methods - - private function _createArrayStream($input) - { - return new Swift_ByteStream_ArrayByteStream($input); - } - - private function _createMockInputStream() - { - return $this->_mock('Swift_InputByteStream'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/GenericFixedWidthReaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/GenericFixedWidthReaderTest.php deleted file mode 100644 index 130c47f8..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/GenericFixedWidthReaderTest.php +++ /dev/null @@ -1,46 +0,0 @@ -assertIdentical(1, $reader->getInitialByteSize()); - - $reader = new Swift_CharacterReader_GenericFixedWidthReader(4); - $this->assertIdentical(4, $reader->getInitialByteSize()); - } - - public function testValidationValueIsBasedOnOctetCount() - { - $reader = new Swift_CharacterReader_GenericFixedWidthReader(4); - - $this->assertIdentical( - 1, $reader->validateByteSequence(array(0x01, 0x02, 0x03), 3) - ); //3 octets - - $this->assertIdentical( - 2, $reader->validateByteSequence(array(0x01, 0x0A), 2) - ); //2 octets - - $this->assertIdentical( - 3, $reader->validateByteSequence(array(0xFE), 1) - ); //1 octet - - $this->assertIdentical( - 0, $reader->validateByteSequence(array(0xFE, 0x03, 0x67, 0x9A), 4) - ); //All 4 octets - } - - public function testValidationFailsIfTooManyOctets() - { - $reader = new Swift_CharacterReader_GenericFixedWidthReader(6); - - $this->assertIdentical(-1, $reader->validateByteSequence( - array(0xFE, 0x03, 0x67, 0x9A, 0x10, 0x09, 0x85), 7 - )); //7 octets - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/UsAsciiReaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/UsAsciiReaderTest.php deleted file mode 100644 index 76112624..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/UsAsciiReaderTest.php +++ /dev/null @@ -1,55 +0,0 @@ -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; - - public function setUp() - { - $this->_reader = new Swift_CharacterReader_UsAsciiReader(); - } - - public function testAllValidAsciiCharactersReturnZero() - { - for ($ordinal = 0x00; $ordinal <= 0x7F; ++$ordinal) { - $this->assertIdentical( - 0, $this->_reader->validateByteSequence(array($ordinal), 1) - ); - } - } - - public function testMultipleBytesAreInvalid() - { - for ($ordinal = 0x00; $ordinal <= 0x7F; $ordinal += 2) { - $this->assertIdentical( - -1, $this->_reader->validateByteSequence(array($ordinal, $ordinal + 1), 2) - ); - } - } - - public function testBytesAboveAsciiRangeAreInvalid() - { - for ($ordinal = 0x80; $ordinal <= 0xFF; ++$ordinal) { - $this->assertIdentical( - -1, $this->_reader->validateByteSequence(array($ordinal), 1) - ); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/Utf8ReaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/Utf8ReaderTest.php deleted file mode 100644 index 02e21b1b..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/Utf8ReaderTest.php +++ /dev/null @@ -1,68 +0,0 @@ -_reader = new Swift_CharacterReader_Utf8Reader(); - } - - public function testLeading7BitOctetCausesReturnZero() - { - for ($ordinal = 0x00; $ordinal <= 0x7F; ++$ordinal) { - $this->assertIdentical( - 0, $this->_reader->validateByteSequence(array($ordinal), 1) - ); - } - } - - public function testLeadingByteOf2OctetCharCausesReturn1() - { - for ($octet = 0xC0; $octet <= 0xDF; ++$octet) { - $this->assertIdentical( - 1, $this->_reader->validateByteSequence(array($octet), 1) - ); - } - } - - public function testLeadingByteOf3OctetCharCausesReturn2() - { - for ($octet = 0xE0; $octet <= 0xEF; ++$octet) { - $this->assertIdentical( - 2, $this->_reader->validateByteSequence(array($octet), 1) - ); - } - } - - public function testLeadingByteOf4OctetCharCausesReturn3() - { - for ($octet = 0xF0; $octet <= 0xF7; ++$octet) { - $this->assertIdentical( - 3, $this->_reader->validateByteSequence(array($octet), 1) - ); - } - } - - public function testLeadingByteOf5OctetCharCausesReturn4() - { - for ($octet = 0xF8; $octet <= 0xFB; ++$octet) { - $this->assertIdentical( - 4, $this->_reader->validateByteSequence(array($octet),1) - ); - } - } - - public function testLeadingByteOf6OctetCharCausesReturn5() - { - for ($octet = 0xFC; $octet <= 0xFD; ++$octet) { - $this->assertIdentical( - 5, $this->_reader->validateByteSequence(array($octet),1) - ); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterStream/ArrayCharacterStreamTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterStream/ArrayCharacterStreamTest.php deleted file mode 100644 index f3e82976..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterStream/ArrayCharacterStreamTest.php +++ /dev/null @@ -1,375 +0,0 @@ -_getReader(); - $factory = $this->_getFactory($reader); - - $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'); - - $seq = $this->_mockery()->sequence('read-sequence'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD1), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - ); - - $stream->importString(pack('C*', - 0xD0, 0x94, - 0xD0, 0xB6, - 0xD0, 0xBE, - 0xD1, 0x8D, - 0xD0, 0xBB, - 0xD0, 0xB0 - ) - ); - } - - public function testCharactersWrittenUseValidator() - { - $reader = $this->_getReader(); - $factory = $this->_getFactory($reader); - - $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'); - - $seq = $this->_mockery()->sequence('read-sequence'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD1), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD1), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD1), 1) -> inSequence($seq) -> returns(1) - ); - - $stream->importString(pack('C*', 0xD0, 0x94, 0xD0, 0xB6, 0xD0, 0xBE)); - - $stream->write(pack('C*', - 0xD0, 0xBB, - 0xD1, 0x8E, - 0xD0, 0xB1, - 0xD1, 0x8B, - 0xD1, 0x85 - ) - ); - } - - public function testReadCharactersAreInTact() - { - $reader = $this->_getReader(); - $factory = $this->_getFactory($reader); - - $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'); - - $seq = $this->_mockery()->sequence('read-sequence'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(1) - //String - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - //Stream - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD1), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD1), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD1), 1) -> inSequence($seq) -> returns(1) - ); - - $stream->importString(pack('C*', 0xD0, 0x94, 0xD0, 0xB6, 0xD0, 0xBE)); - - $stream->write(pack('C*', - 0xD0, 0xBB, - 0xD1, 0x8E, - 0xD0, 0xB1, - 0xD1, 0x8B, - 0xD1, 0x85 - ) - ); - - $this->assertIdenticalBinary(pack('C*', 0xD0, 0x94), $stream->read(1)); - $this->assertIdenticalBinary( - pack('C*', 0xD0, 0xB6, 0xD0, 0xBE), $stream->read(2) - ); - $this->assertIdenticalBinary(pack('C*', 0xD0, 0xBB), $stream->read(1)); - $this->assertIdenticalBinary( - pack('C*', 0xD1, 0x8E, 0xD0, 0xB1, 0xD1, 0x8B), $stream->read(3) - ); - $this->assertIdenticalBinary(pack('C*', 0xD1, 0x85), $stream->read(1)); - - $this->assertIdentical(false, $stream->read(1)); - } - - public function testCharactersCanBeReadAsByteArrays() - { - $reader = $this->_getReader(); - $factory = $this->_getFactory($reader); - - $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'); - - $seq = $this->_mockery()->sequence('read-sequence'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(1) - //String - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - //Stream - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD1), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD1), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD1), 1) -> inSequence($seq) -> returns(1) - ); - - $stream->importString(pack('C*', 0xD0, 0x94, 0xD0, 0xB6, 0xD0, 0xBE)); - - $stream->write(pack('C*', - 0xD0, 0xBB, - 0xD1, 0x8E, - 0xD0, 0xB1, - 0xD1, 0x8B, - 0xD1, 0x85 - ) - ); - - $this->assertEqual(array(0xD0, 0x94), $stream->readBytes(1)); - $this->assertEqual(array(0xD0, 0xB6, 0xD0, 0xBE), $stream->readBytes(2)); - $this->assertEqual(array(0xD0, 0xBB), $stream->readBytes(1)); - $this->assertEqual( - array(0xD1, 0x8E, 0xD0, 0xB1, 0xD1, 0x8B), $stream->readBytes(3) - ); - $this->assertEqual(array(0xD1, 0x85), $stream->readBytes(1)); - - $this->assertIdentical(false, $stream->readBytes(1)); - } - - public function testRequestingLargeCharCountPastEndOfStream() - { - $reader = $this->_getReader(); - $factory = $this->_getFactory($reader); - - $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'); - - $seq = $this->_mockery()->sequence('read-sequence'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - ); - - $stream->importString(pack('C*', 0xD0, 0x94, 0xD0, 0xB6, 0xD0, 0xBE)); - - $this->assertIdenticalBinary(pack('C*', 0xD0, 0x94, 0xD0, 0xB6, 0xD0, 0xBE), - $stream->read(100) - ); - - $this->assertIdentical(false, $stream->read(1)); - } - - public function testRequestingByteArrayCountPastEndOfStream() - { - $reader = $this->_getReader(); - $factory = $this->_getFactory($reader); - - $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'); - - $seq = $this->_mockery()->sequence('read-sequence'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - ); - - $stream->importString(pack('C*', 0xD0, 0x94, 0xD0, 0xB6, 0xD0, 0xBE)); - - $this->assertEqual(array(0xD0, 0x94, 0xD0, 0xB6, 0xD0, 0xBE), - $stream->readBytes(100) - ); - - $this->assertIdentical(false, $stream->readBytes(1)); - } - - public function testPointerOffsetCanBeSet() - { - $reader = $this->_getReader(); - $factory = $this->_getFactory($reader); - - $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'); - - $seq = $this->_mockery()->sequence('read-sequence'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - ); - - $stream->importString(pack('C*', 0xD0, 0x94, 0xD0, 0xB6, 0xD0, 0xBE)); - - $this->assertIdenticalBinary(pack('C*', 0xD0, 0x94), $stream->read(1)); - - $stream->setPointer(0); - - $this->assertIdenticalBinary(pack('C*', 0xD0, 0x94), $stream->read(1)); - - $stream->setPointer(2); - - $this->assertIdenticalBinary(pack('C*', 0xD0, 0xBE), $stream->read(1)); - } - - public function testContentsCanBeFlushed() - { - $reader = $this->_getReader(); - $factory = $this->_getFactory($reader); - - $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'); - - $seq = $this->_mockery()->sequence('read-sequence'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - ); - - $stream->importString(pack('C*', 0xD0, 0x94, 0xD0, 0xB6, 0xD0, 0xBE)); - - $stream->flushContents(); - - $this->assertIdentical(false, $stream->read(1)); - } - - public function testByteStreamCanBeImportingUsesValidator() - { - $reader = $this->_getReader(); - $factory = $this->_getFactory($reader); - $os = $this->_getByteStream(); - - $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'); - - $seq = $this->_mockery()->sequence('read-stream'); - $this->_checking(Expectations::create() - -> between(0,1)->of($os)->setReadPointer(0) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0xD0)) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0x94)) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0xD0)) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0xB6)) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0xD0)) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0xBE)) - -> ignoring($os)->read(any()) -> returns(false) - ); - - $seq = $this->_mockery()->sequence('read-chars'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - ); - - $stream->importByteStream($os); - } - - public function testImportingStreamProducesCorrectCharArray() - { - $reader = $this->_getReader(); - $factory = $this->_getFactory($reader); - $os = $this->_getByteStream(); - - $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8'); - - $seq = $this->_mockery()->sequence('read-stream'); - $this->_checking(Expectations::create() - -> between(0,1)->of($os)->setReadPointer(0) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0xD0)) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0x94)) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0xD0)) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0xB6)) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0xD0)) - -> one($os)->read(any()) -> inSequence($seq) -> returns(pack('C*', 0xBE)) - -> ignoring($os)->read(any()) -> returns(false) - ); - - $seq = $this->_mockery()->sequence('read-chars'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - -> one($reader)->validateByteSequence(array(0xD0), 1) -> inSequence($seq) -> returns(1) - ); - - $stream->importByteStream($os); - - $this->assertIdenticalBinary(pack('C*', 0xD0, 0x94), $stream->read(1)); - $this->assertIdenticalBinary(pack('C*', 0xD0, 0xB6), $stream->read(1)); - $this->assertIdenticalBinary(pack('C*', 0xD0, 0xBE), $stream->read(1)); - - $this->assertIdentical(false, $stream->read(1)); - } - - public function testAlgorithmWithFixedWidthCharsets() - { - $reader = $this->_getReader(); - $factory = $this->_getFactory($reader); - - $seq = $this->_mockery()->sequence('read-chars'); - $this->_checking(Expectations::create() - -> ignoring($reader)->getInitialByteSize() -> returns(2) - -> one($reader)->validateByteSequence(array(0xD1, 0x8D), 2) -> inSequence($seq) - -> one($reader)->validateByteSequence(array(0xD0, 0xBB), 2) -> inSequence($seq) - -> one($reader)->validateByteSequence(array(0xD0, 0xB0), 2) -> inSequence($seq) - ); - - $stream = new Swift_CharacterStream_ArrayCharacterStream( - $factory, 'utf-8' - ); - $stream->importString(pack('C*', 0xD1, 0x8D, 0xD0, 0xBB, 0xD0, 0xB0)); - - $this->assertIdenticalBinary(pack('C*', 0xD1, 0x8D), $stream->read(1)); - $this->assertIdenticalBinary(pack('C*', 0xD0, 0xBB), $stream->read(1)); - $this->assertIdenticalBinary(pack('C*', 0xD0, 0xB0), $stream->read(1)); - - $this->assertIdentical(false, $stream->read(1)); - } - - // -- Creation methods - - private function _getReader() - { - return $this->_mock('Swift_CharacterReader'); - } - - private function _getFactory($reader) - { - $factory = $this->_mock('Swift_CharacterReaderFactory'); - $this->_checking(Expectations::create() - -> allowing($factory)->getReaderFor('utf-8') -> returns($reader) - ); - - return $factory; - } - - private function _getByteStream() - { - return $this->_mock('Swift_OutputByteStream'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/DependencyContainerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/DependencyContainerTest.php deleted file mode 100644 index 4037e165..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/DependencyContainerTest.php +++ /dev/null @@ -1,177 +0,0 @@ -arg1 = $arg1; - $this->arg2 = $arg2; - } -} - -class Swift_DependencyContainerTest extends Swift_Tests_SwiftUnitTestCase -{ - private $_container; - - public function setUp() - { - $this->_container = new Swift_DependencyContainer(); - } - - public function testRegisterAndLookupValue() - { - $this->_container->register('foo')->asValue('bar'); - $this->assertIdentical('bar', $this->_container->lookup('foo')); - } - - public function testHasReturnsTrueForRegisteredValue() - { - $this->_container->register('foo')->asValue('bar'); - $this->assertTrue($this->_container->has('foo')); - } - - public function testHasReturnsFalseForUnregisteredValue() - { - $this->assertFalse($this->_container->has('foo')); - } - - public function testRegisterAndLookupNewInstance() - { - $this->_container->register('one')->asNewInstanceOf('One'); - $this->assertIsA($this->_container->lookup('one'), 'One'); - } - - public function testHasReturnsTrueForRegisteredInstance() - { - $this->_container->register('one')->asNewInstanceOf('One'); - $this->assertTrue($this->_container->has('one')); - } - - public function testNewInstanceIsAlwaysNew() - { - $this->_container->register('one')->asNewInstanceOf('One'); - $a = $this->_container->lookup('one'); - $b = $this->_container->lookup('one'); - $this->assertClone($a, $b); - } - - public function testRegisterAndLookupSharedInstance() - { - $this->_container->register('one')->asSharedInstanceOf('One'); - $this->assertIsA($this->_container->lookup('one'), 'One'); - } - - public function testHasReturnsTrueForSharedInstance() - { - $this->_container->register('one')->asSharedInstanceOf('One'); - $this->assertTrue($this->_container->has('one')); - } - - public function testMultipleSharedInstancesAreSameInstance() - { - $this->_container->register('one')->asSharedInstanceOf('One'); - $a = $this->_container->lookup('one'); - $b = $this->_container->lookup('one'); - $this->assertSame($a, $b); - } - - public function testNewInstanceWithDependencies() - { - $this->_container->register('foo')->asValue('FOO'); - $this->_container->register('one')->asNewInstanceOf('One') - ->withDependencies(array('foo')); - $obj = $this->_container->lookup('one'); - $this->assertIdentical('FOO', $obj->arg1); - } - - public function testNewInstanceWithMultipleDependencies() - { - $this->_container->register('foo')->asValue('FOO'); - $this->_container->register('bar')->asValue(42); - $this->_container->register('one')->asNewInstanceOf('One') - ->withDependencies(array('foo', 'bar')); - $obj = $this->_container->lookup('one'); - $this->assertIdentical('FOO', $obj->arg1); - $this->assertIdentical(42, $obj->arg2); - } - - public function testNewInstanceWithInjectedObjects() - { - $this->_container->register('foo')->asValue('FOO'); - $this->_container->register('one')->asNewInstanceOf('One'); - $this->_container->register('two')->asNewInstanceOf('One') - ->withDependencies(array('one', 'foo')); - $obj = $this->_container->lookup('two'); - $this->assertClone($this->_container->lookup('one'), $obj->arg1); - $this->assertIdentical('FOO', $obj->arg2); - } - - public function testNewInstanceWithAddConstructorValue() - { - $this->_container->register('one')->asNewInstanceOf('One') - ->addConstructorValue('x') - ->addConstructorValue(99); - $obj = $this->_container->lookup('one'); - $this->assertIdentical('x', $obj->arg1); - $this->assertIdentical(99, $obj->arg2); - } - - public function testNewInstanceWithAddConstructorLookup() - { - $this->_container->register('foo')->asValue('FOO'); - $this->_container->register('bar')->asValue(42); - $this->_container->register('one')->asNewInstanceOf('One') - ->addConstructorLookup('foo') - ->addConstructorLookup('bar'); - - $obj = $this->_container->lookup('one'); - $this->assertIdentical('FOO', $obj->arg1); - $this->assertIdentical(42, $obj->arg2); - } - - public function testResolvedDependenciesCanBeLookedUp() - { - $this->_container->register('foo')->asValue('FOO'); - $this->_container->register('one')->asNewInstanceOf('One'); - $this->_container->register('two')->asNewInstanceOf('One') - ->withDependencies(array('one', 'foo')); - $deps = $this->_container->createDependenciesFor('two'); - $this->assertEqual( - array($this->_container->lookup('one'), 'FOO'), $deps - ); - } - - public function testArrayOfDependenciesCanBeSpecified() - { - $this->_container->register('foo')->asValue('FOO'); - $this->_container->register('one')->asNewInstanceOf('One'); - $this->_container->register('two')->asNewInstanceOf('One') - ->withDependencies(array(array('one', 'foo'), 'foo')); - - $obj = $this->_container->lookup('two'); - $this->assertEqual(array($this->_container->lookup('one'), 'FOO'), $obj->arg1); - $this->assertIdentical('FOO', $obj->arg2); - } - - public function testAliasCanBeSet() - { - $this->_container->register('foo')->asValue('FOO'); - $this->_container->register('bar')->asAliasOf('foo'); - - $this->assertIdentical('FOO', $this->_container->lookup('bar')); - } - - public function testAliasOfAliasCanBeSet() - { - $this->_container->register('foo')->asValue('FOO'); - $this->_container->register('bar')->asAliasOf('foo'); - $this->_container->register('zip')->asAliasOf('bar'); - $this->_container->register('button')->asAliasOf('zip'); - - $this->assertIdentical('FOO', $this->_container->lookup('button')); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/Base64EncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/Base64EncoderTest.php deleted file mode 100644 index 1a271acc..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/Base64EncoderTest.php +++ /dev/null @@ -1,175 +0,0 @@ -_encoder = new Swift_Encoder_Base64Encoder(); - } - - /* - There's really no point in testing the entire base64 encoding to the - level QP encoding has been tested. base64_encode() has been in PHP for - years. - */ - - public function testInputOutputRatioIs3to4Bytes() - { - /* - RFC 2045, 6.8 - - The encoding process represents 24-bit groups of input bits as output - strings of 4 encoded characters. Proceeding from left to right, a - 24-bit input group is formed by concatenating 3 8bit input groups. - These 24 bits are then treated as 4 concatenated 6-bit groups, each - of which is translated into a single digit in the base64 alphabet. - */ - - $this->assertEqual( - 'MTIz', $this->_encoder->encodeString('123'), - '%s: 3 bytes of input should yield 4 bytes of output' - ); - $this->assertEqual( - 'MTIzNDU2', $this->_encoder->encodeString('123456'), - '%s: 6 bytes in input should yield 8 bytes of output' - ); - $this->assertEqual( - 'MTIzNDU2Nzg5', $this->_encoder->encodeString('123456789'), - '%s: 9 bytes in input should yield 12 bytes of output' - ); - } - - public function testPadLength() - { - /* - RFC 2045, 6.8 - - Special processing is performed if fewer than 24 bits are available - at the end of the data being encoded. A full encoding quantum is - always completed at the end of a body. When fewer than 24 input bits - are available in an input group, zero bits are added (on the right) - to form an integral number of 6-bit groups. Padding at the end of - the data is performed using the "=" character. Since all base64 - input is an integral number of octets, only the following cases can - arise: (1) the final quantum of encoding input is an integral - multiple of 24 bits; here, the final unit of encoded output will be - an integral multiple of 4 characters with no "=" padding, (2) the - final quantum of encoding input is exactly 8 bits; here, the final - unit of encoded output will be two characters followed by two "=" - padding characters, or (3) the final quantum of encoding input is - exactly 16 bits; here, the final unit of encoded output will be three - characters followed by one "=" padding character. - */ - - for ($i = 0; $i < 30; ++$i) { - $input = pack('C', rand(0, 255)); - $this->assertPattern( - '~^[a-zA-Z0-9/\+]{2}==$~', $this->_encoder->encodeString($input), - '%s: A single byte should have 2 bytes of padding' - ); - } - - for ($i = 0; $i < 30; ++$i) { - $input = pack('C*', rand(0, 255), rand(0, 255)); - $this->assertPattern( - '~^[a-zA-Z0-9/\+]{3}=$~', $this->_encoder->encodeString($input), - '%s: Two bytes should have 1 byte of padding' - ); - } - - for ($i = 0; $i < 30; ++$i) { - $input = pack('C*', rand(0, 255), rand(0, 255), rand(0, 255)); - $this->assertPattern( - '~^[a-zA-Z0-9/\+]{4}$~', $this->_encoder->encodeString($input), - '%s: Three bytes should have no padding' - ); - } - } - - public function testMaximumLineLengthIs76Characters() - { - /* - The encoded output stream must be represented in lines of no more - than 76 characters each. All line breaks or other characters not - found in Table 1 must be ignored by decoding software. - */ - - $input = - 'abcdefghijklmnopqrstuvwxyz' . - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . - '1234567890' . - 'abcdefghijklmnopqrstuvwxyz' . - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . - '1234567890' . - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - - $output = - 'YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQk' . //38 - 'NERUZHSElKS0xNTk9QUVJTVFVWV1hZWjEyMzQ1' . "\r\n" . //76 * - 'Njc4OTBhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3' . //38 - 'h5ekFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFla' . "\r\n" . //76 * - 'MTIzNDU2Nzg5MEFCQ0RFRkdISUpLTE1OT1BRUl' . //38 - 'NUVVZXWFla'; //48 - - $this->assertEqual( - $output, $this->_encoder->encodeString($input), - '%s: Lines should be no more than 76 characters' - ); - } - - public function testMaximumLineLengthCanBeSpecified() - { - $input = - 'abcdefghijklmnopqrstuvwxyz' . - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . - '1234567890' . - 'abcdefghijklmnopqrstuvwxyz' . - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . - '1234567890' . - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - - $output = - 'YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQk' . //38 - 'NERUZHSElKS0' . "\r\n" . //50 * - 'xNTk9QUVJTVFVWV1hZWjEyMzQ1Njc4OTBhYmNk' . //38 - 'ZWZnaGlqa2xt' . "\r\n" . //50 * - 'bm9wcXJzdHV2d3h5ekFCQ0RFRkdISUpLTE1OT1' . //38 - 'BRUlNUVVZXWF' . "\r\n" . //50 * - 'laMTIzNDU2Nzg5MEFCQ0RFRkdISUpLTE1OT1BR' . //38 - 'UlNUVVZXWFla'; //50 * - - $this->assertEqual( - $output, $this->_encoder->encodeString($input, 0, 50), - '%s: Lines should be no more than 100 characters' - ); - } - - public function testFirstLineLengthCanBeDifferent() - { - $input = - 'abcdefghijklmnopqrstuvwxyz' . - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . - '1234567890' . - 'abcdefghijklmnopqrstuvwxyz' . - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . - '1234567890' . - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - - $output = - 'YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQk' . //38 - 'NERUZHSElKS0xNTk9QU' . "\r\n" . //57 * - 'VJTVFVWV1hZWjEyMzQ1Njc4OTBhYmNkZWZnaGl' . //38 - 'qa2xtbm9wcXJzdHV2d3h5ekFCQ0RFRkdISUpLT' . "\r\n" . //76 * - 'E1OT1BRUlNUVVZXWFlaMTIzNDU2Nzg5MEFCQ0R' . //38 - 'FRkdISUpLTE1OT1BRUlNUVVZXWFla'; //67 - - $this->assertEqual( - $output, $this->_encoder->encodeString($input, 19), - '%s: First line offset is 19 so first line should be 57 chars long' - ); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/QpEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/QpEncoderTest.php deleted file mode 100644 index e87b26d4..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/QpEncoderTest.php +++ /dev/null @@ -1,361 +0,0 @@ -_createCharStream(); - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importString($char) - -> one($charStream)->readBytes(optional()) -> returns(array($ordinal)) - -> atLeast(1)->of($charStream)->readBytes(optional()) -> returns(false) - ); - - $encoder = new Swift_Encoder_QpEncoder($charStream); - - $this->assertIdenticalBinary($char, $encoder->encodeString($char)); - } - } - - public function testWhiteSpaceAtLineEndingIsEncoded() - { - /* -- RFC 2045, 6.7 -- - (3) (White Space) Octets with values of 9 and 32 MAY be - represented as US-ASCII TAB (HT) and SPACE characters, - respectively, but MUST NOT be so represented at the end - of an encoded line. Any TAB (HT) or SPACE characters - on an encoded line MUST thus be followed on that line - by a printable character. In particular, an "=" at the - end of an encoded line, indicating a soft line break - (see rule #5) may follow one or more TAB (HT) or SPACE - characters. It follows that an octet with decimal - value 9 or 32 appearing at the end of an encoded line - must be represented according to Rule #1. This rule is - necessary because some MTAs (Message Transport Agents, - programs which transport messages from one user to - another, or perform a portion of such transfers) are - known to pad lines of text with SPACEs, and others are - known to remove "white space" characters from the end - of a line. Therefore, when decoding a Quoted-Printable - body, any trailing white space on a line must be - deleted, as it will necessarily have been added by - intermediate transport agents. - */ - - $HT = chr(0x09); //9 - $SPACE = chr(0x20); //32 - - //HT - $string = 'a' . $HT . $HT . "\r\n" . 'b'; - - $seq = $this->_mockery()->sequence('byte-sequence'); - $charStream = $this->_createCharStream(); - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importString($string) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(ord('a'))) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x09)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x09)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x0D)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x0A)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(ord('b'))) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(false) - ); - - $encoder = new Swift_Encoder_QpEncoder($charStream); - $this->assertEqual( - 'a' . $HT . '=09' . "\r\n" . 'b', - $encoder->encodeString($string) - ); - - //SPACE - $string = 'a' . $SPACE . $SPACE . "\r\n" . 'b'; - - $seq = $this->_mockery()->sequence('byte-sequence'); - $charStream = $this->_createCharStream(); - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importString($string) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(ord('a'))) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x20)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x20)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x0D)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x0A)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(ord('b'))) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(false) - ); - - $encoder = new Swift_Encoder_QpEncoder($charStream); - $this->assertEqual( - 'a' . $SPACE . '=20' . "\r\n" . 'b', - $encoder->encodeString($string) - ); - } - - public function testCRLFIsLeftAlone() - { - /* - (4) (Line Breaks) A line break in a text body, represented - as a CRLF sequence in the text canonical form, must be - represented by a (RFC 822) line break, which is also a - CRLF sequence, in the Quoted-Printable encoding. Since - the canonical representation of media types other than - text do not generally include the representation of - line breaks as CRLF sequences, no hard line breaks - (i.e. line breaks that are intended to be meaningful - and to be displayed to the user) can occur in the - quoted-printable encoding of such types. Sequences - like "=0D", "=0A", "=0A=0D" and "=0D=0A" will routinely - appear in non-text data represented in quoted- - printable, of course. - - Note that many implementations may elect to encode the - local representation of various content types directly - rather than converting to canonical form first, - encoding, and then converting back to local - representation. In particular, this may apply to plain - text material on systems that use newline conventions - other than a CRLF terminator sequence. Such an - implementation optimization is permissible, but only - when the combined canonicalization-encoding step is - equivalent to performing the three steps separately. - */ - - $string = 'a' . "\r\n" . 'b' . "\r\n" . 'c' . "\r\n"; - - $seq = $this->_mockery()->sequence('byte-sequence'); - $charStream = $this->_createCharStream(); - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importString($string) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(ord('a'))) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x0D)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x0A)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(ord('b'))) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x0D)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x0A)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(ord('c'))) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x0D)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(0x0A)) - -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(false) - ); - - $encoder = new Swift_Encoder_QpEncoder($charStream); - $this->assertEqual($string, $encoder->encodeString($string)); - } - - public function testLinesLongerThan76CharactersAreSoftBroken() - { - /* - (5) (Soft Line Breaks) The Quoted-Printable encoding - REQUIRES that encoded lines be no more than 76 - characters long. If longer lines are to be encoded - with the Quoted-Printable encoding, "soft" line breaks - must be used. An equal sign as the last character on a - encoded line indicates such a non-significant ("soft") - line break in the encoded text. - */ - - $input = str_repeat('a', 140); - - $charStream = $this->_createCharStream(); - $seq = $this->_mockery()->sequence('byte-sequence'); - - $exps = Expectations::create(); - - $exps -> one($charStream)->flushContents() - -> one($charStream)->importString($input) - ; - - $output = ''; - for ($i = 0; $i < 140; ++$i) { - $exps -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(ord('a'))); - - if (75 == $i) { - $output .= "=\r\n"; - } - $output .= 'a'; - } - - $exps -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(false); - - $this->_checking($exps); - - $encoder = new Swift_Encoder_QpEncoder($charStream); - $this->assertEqual($output, $encoder->encodeString($input)); - } - - public function testMaxLineLengthCanBeSpecified() - { - $input = str_repeat('a', 100); - - $charStream = $this->_createCharStream(); - $seq = $this->_mockery()->sequence('byte-sequence'); - - $exps = Expectations::create(); - - $exps -> one($charStream)->flushContents() - -> one($charStream)->importString($input) - ; - - $output = ''; - for ($i = 0; $i < 100; ++$i) { - $exps -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(ord('a'))); - - if (53 == $i) { - $output .= "=\r\n"; - } - $output .= 'a'; - } - $exps -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(false); - - $this->_checking($exps); - - $encoder = new Swift_Encoder_QpEncoder($charStream); - $this->assertEqual($output, $encoder->encodeString($input, 0, 54)); - } - - public function testBytesBelowPermittedRangeAreEncoded() - { - /* - According to Rule (1 & 2) - */ - - foreach (range(0, 32) as $ordinal) { - $char = chr($ordinal); - - $charStream = $this->_createCharStream(); - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importString($char) - -> one($charStream)->readBytes(optional()) -> returns(array($ordinal)) - -> atLeast(1)->of($charStream)->readBytes(optional()) -> returns(false) - ); - - $encoder = new Swift_Encoder_QpEncoder($charStream); - - $this->assertEqual( - sprintf('=%02X', $ordinal), $encoder->encodeString($char) - ); - } - } - - public function testDecimalByte61IsEncoded() - { - /* - According to Rule (1 & 2) - */ - - $char = '='; - - $charStream = $this->_createCharStream(); - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importString($char) - -> one($charStream)->readBytes(optional()) -> returns(array(61)) - -> atLeast(1)->of($charStream)->readBytes(optional()) -> returns(false) - ); - - $encoder = new Swift_Encoder_QpEncoder($charStream); - - $this->assertEqual('=3D', $encoder->encodeString('=')); - } - - public function testBytesAbovePermittedRangeAreEncoded() - { - /* - According to Rule (1 & 2) - */ - - foreach (range(127, 255) as $ordinal) { - $char = chr($ordinal); - - $charStream = $this->_createCharStream(); - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importString($char) - -> one($charStream)->readBytes(optional()) -> returns(array($ordinal)) - -> atLeast(1)->of($charStream)->readBytes(optional()) -> returns(false) - ); - - $encoder = new Swift_Encoder_QpEncoder($charStream); - - $this->assertEqual( - sprintf('=%02X', $ordinal), $encoder->encodeString($char) - ); - } - } - - public function testFirstLineLengthCanBeDifferent() - { - $input = str_repeat('a', 140); - - $charStream = $this->_createCharStream(); - $seq = $this->_mockery()->sequence('byte-sequence'); - - $exps = Expectations::create(); - - $exps -> one($charStream)->flushContents(); - $exps -> one($charStream)->importString($input); - - $output = ''; - for ($i = 0; $i < 140; ++$i) { - $exps -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(array(ord('a'))); - - if (53 == $i || 53 + 75 == $i) { - $output .= "=\r\n"; - } - $output .= 'a'; - } - - $exps -> one($charStream)->readBytes(optional()) -> inSequence($seq) -> returns(false); - - $this->_checking($exps); - - $encoder = new Swift_Encoder_QpEncoder($charStream); - $this->assertEqual( - $output, $encoder->encodeString($input, 22), - '%s: First line should start at offset 22 so can only have max length 54' - ); - } - - // -- Creation methods - - private function _createCharStream() - { - return $this->_mock('Swift_CharacterStream'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/Rfc2231EncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/Rfc2231EncoderTest.php deleted file mode 100644 index 1e8e9f98..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/Rfc2231EncoderTest.php +++ /dev/null @@ -1,143 +0,0 @@ -_mock('Swift_CharacterStream'); - $seq = $this->_sequence('byte-sequence'); - - $string = ''; - foreach (range(0x00, 0x7F) as $octet) { - $char = pack('C', $octet); - $string .= $char; - $this->_checking(Expectations::create() - -> one($charStream)->read(optional()) -> inSequence($seq) -> returns($char) - ); - } - $this->_checking(Expectations::create() - -> atLeast(1)->of($charStream)->read(optional()) -> inSequence($seq) -> returns(false) - -> one($charStream)->importString($string) - -> ignoring($charStream)->flushContents() - ); - - $encoder = new Swift_Encoder_Rfc2231Encoder($charStream); - $encoded = $encoder->encodeString($string); - - foreach (explode("\r\n", $encoded) as $line) { - $this->assertPattern($this->_rfc2045Token, $line, - '%s: Encoder should always return a valid RFC 2045 token.'); - } - - - } - - public function testEncodingNonAsciiCharactersProducesValidToken() - { - $charStream = $this->_mock('Swift_CharacterStream'); - $seq = $this->_sequence('byte-sequence'); - - $string = ''; - foreach (range(0x80, 0xFF) as $octet) { - $char = pack('C', $octet); - $string .= $char; - $this->_checking(Expectations::create() - -> one($charStream)->read(optional()) -> inSequence($seq) -> returns($char) - ); - } - $this->_checking(Expectations::create() - -> atLeast(1)->of($charStream)->read(optional()) -> inSequence($seq) -> returns(false) - -> one($charStream)->importString($string) - -> ignoring($charStream)->flushContents() - ); - $encoder = new Swift_Encoder_Rfc2231Encoder($charStream); - - $encoded = $encoder->encodeString($string); - - foreach (explode("\r\n", $encoded) as $line) { - $this->assertPattern($this->_rfc2045Token, $line, - '%s: Encoder should always return a valid RFC 2045 token.'); - } - - - } - - public function testMaximumLineLengthCanBeSet() - { - $charStream = $this->_mock('Swift_CharacterStream'); - $seq = $this->_sequence('byte-sequence'); - - $string = ''; - for ($x = 0; $x < 200; ++$x) { - $char = 'a'; - $string .= $char; - $this->_checking(Expectations::create() - -> one($charStream)->read(optional()) -> inSequence($seq) -> returns($char) - ); - } - $this->_checking(Expectations::create() - -> atLeast(1)->of($charStream)->read(optional()) -> inSequence($seq) -> returns(false) - -> one($charStream)->importString($string) - -> ignoring($charStream)->flushContents() - ); - $encoder = new Swift_Encoder_Rfc2231Encoder($charStream); - - $encoded = $encoder->encodeString($string, 0, 75); - - $this->assertEqual( - str_repeat('a', 75) . "\r\n" . - str_repeat('a', 75) . "\r\n" . - str_repeat('a', 50), - $encoded, - '%s: Lines should be wrapped at each 75 characters' - ); - - - } - - public function testFirstLineCanHaveShorterLength() - { - $charStream = $this->_mock('Swift_CharacterStream'); - $seq = $this->_sequence('byte-sequence'); - - $string = ''; - for ($x = 0; $x < 200; ++$x) { - $char = 'a'; - $string .= $char; - $this->_checking(Expectations::create() - -> one($charStream)->read(optional()) -> inSequence($seq) -> returns($char) - ); - } - $this->_checking(Expectations::create() - -> atLeast(1)->of($charStream)->read(optional()) -> inSequence($seq) -> returns(false) - -> one($charStream)->importString($string) - -> ignoring($charStream)->flushContents() - ); - $encoder = new Swift_Encoder_Rfc2231Encoder($charStream); - $encoded = $encoder->encodeString($string, 25, 75); - - $this->assertEqual( - str_repeat('a', 50) . "\r\n" . - str_repeat('a', 75) . "\r\n" . - str_repeat('a', 75), - $encoded, - '%s: First line should be 25 bytes shorter than the others.' - ); - - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/CommandEventTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/CommandEventTest.php deleted file mode 100644 index dee66131..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/CommandEventTest.php +++ /dev/null @@ -1,41 +0,0 @@ -_createEvent($this->_createTransport(), "FOO\r\n"); - $this->assertEqual("FOO\r\n", $evt->getCommand()); - } - - public function testSuccessCodesCanBeFetchedViaGetter() - { - $evt = $this->_createEvent($this->_createTransport(), "FOO\r\n", array(250)); - $this->assertEqual(array(250), $evt->getSuccessCodes()); - } - - public function testSourceIsBuffer() - { - $transport = $this->_createTransport(); - $evt = $this->_createEvent($transport, "FOO\r\n"); - $ref = $evt->getSource(); - $this->assertReference($transport, $ref); - } - - // -- Creation Methods - - private function _createEvent(Swift_Transport $source, $command, - $successCodes = array()) - { - return new Swift_Events_CommandEvent($source, $command, $successCodes); - } - - private function _createTransport() - { - return $this->_stub('Swift_Transport'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/EventObjectTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/EventObjectTest.php deleted file mode 100644 index f6fab7f0..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/EventObjectTest.php +++ /dev/null @@ -1,37 +0,0 @@ -_createEvent($source); - $ref = $evt->getSource(); - $this->assertReference($source, $ref); - } - - public function testEventDoesNotHaveCancelledBubbleWhenNew() - { - $source = new stdClass(); - $evt = $this->_createEvent($source); - $this->assertFalse($evt->bubbleCancelled()); - } - - public function testBubbleCanBeCancelledInEvent() - { - $source = new stdClass(); - $evt = $this->_createEvent($source); - $evt->cancelBubble(); - $this->assertTrue($evt->bubbleCancelled()); - } - - // -- Creation Methods - - private function _createEvent($source) - { - return new Swift_Events_EventObject($source); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/ResponseEventTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/ResponseEventTest.php deleted file mode 100644 index adb47008..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/ResponseEventTest.php +++ /dev/null @@ -1,44 +0,0 @@ -_createEvent($this->_createTransport(), "250 Ok\r\n", true); - $this->assertEqual("250 Ok\r\n", $evt->getResponse(), - '%s: Response should be available via getResponse()' - ); - } - - public function testResultCanBeFetchedViaGetter() - { - $evt = $this->_createEvent($this->_createTransport(), "250 Ok\r\n", false); - $this->assertFalse($evt->isValid(), - '%s: Result should be checkable via isValid()' - ); - } - - public function testSourceIsBuffer() - { - $transport = $this->_createTransport(); - $evt = $this->_createEvent($transport, "250 Ok\r\n", true); - $ref = $evt->getSource(); - $this->assertReference($transport, $ref); - } - - // -- Creation Methods - - private function _createEvent(Swift_Transport $source, $response, $result) - { - return new Swift_Events_ResponseEvent($source, $response, $result); - } - - private function _createTransport() - { - return $this->_stub('Swift_Transport'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/SendEventTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/SendEventTest.php deleted file mode 100644 index 399c4e36..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/SendEventTest.php +++ /dev/null @@ -1,104 +0,0 @@ -_createMessage(); - $transport = $this->_createTransport(); - - $evt = $this->_createEvent($transport, $message); - - $ref = $evt->getMessage(); - $this->assertReference($message, $ref, - '%s: Message should be returned from getMessage()' - ); - } - - public function testTransportCanBeFetchViaGetter() - { - $message = $this->_createMessage(); - $transport = $this->_createTransport(); - - $evt = $this->_createEvent($transport, $message); - - $ref = $evt->getTransport(); - $this->assertReference($transport, $ref, - '%s: Transport should be returned from getTransport()' - ); - } - - public function testTransportCanBeFetchViaGetSource() - { - $message = $this->_createMessage(); - $transport = $this->_createTransport(); - - $evt = $this->_createEvent($transport, $message); - - $ref = $evt->getSource(); - $this->assertReference($transport, $ref, - '%s: Transport should be returned from getSource()' - ); - } - - public function testResultCanBeSetAndGet() - { - $message = $this->_createMessage(); - $transport = $this->_createTransport(); - - $evt = $this->_createEvent($transport, $message); - - $evt->setResult( - Swift_Events_SendEvent::RESULT_SUCCESS | Swift_Events_SendEvent::RESULT_TENTATIVE - ); - - $this->assertTrue($evt->getResult() & Swift_Events_SendEvent::RESULT_SUCCESS); - $this->assertTrue($evt->getResult() & Swift_Events_SendEvent::RESULT_TENTATIVE); - } - - public function testFailedRecipientsCanBeSetAndGet() - { - $message = $this->_createMessage(); - $transport = $this->_createTransport(); - - $evt = $this->_createEvent($transport, $message); - - $evt->setFailedRecipients(array('foo@bar', 'zip@button')); - - $this->assertEqual(array('foo@bar', 'zip@button'), $evt->getFailedRecipients(), - '%s: FailedRecipients should be returned from getter' - ); - } - - public function testFailedRecipientsGetsPickedUpCorrectly() - { - $message = $this->_createMessage(); - $transport = $this->_createTransport(); - - $evt = $this->_createEvent($transport, $message); - $this->assertEqual(array(), $evt->getFailedRecipients()); - } - - // -- Creation Methods - - private function _createEvent(Swift_Transport $source, - Swift_Mime_Message $message) - { - return new Swift_Events_SendEvent($source, $message); - } - - private function _createTransport() - { - return $this->_stub('Swift_Transport'); - } - - private function _createMessage() - { - return $this->_stub('Swift_Mime_Message'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/SimpleEventDispatcherTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/SimpleEventDispatcherTest.php deleted file mode 100644 index aa058882..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/SimpleEventDispatcherTest.php +++ /dev/null @@ -1,167 +0,0 @@ -_dispatcher = new Swift_Events_SimpleEventDispatcher(); - } - - public function testSendEventCanBeCreated() - { - $transport = $this->_stub('Swift_Transport'); - $message = $this->_stub('Swift_Mime_Message'); - $evt = $this->_dispatcher->createSendEvent($transport, $message); - $this->assertIsA($evt, 'Swift_Events_SendEvent'); - $this->assertSame($message, $evt->getMessage()); - $this->assertSame($transport, $evt->getTransport()); - } - - public function testCommandEventCanBeCreated() - { - $buf = $this->_stub('Swift_Transport'); - $evt = $this->_dispatcher->createCommandEvent($buf, "FOO\r\n", array(250)); - $this->assertIsA($evt, 'Swift_Events_CommandEvent'); - $this->assertSame($buf, $evt->getSource()); - $this->assertEqual("FOO\r\n", $evt->getCommand()); - $this->assertEqual(array(250), $evt->getSuccessCodes()); - } - - public function testResponseEventCanBeCreated() - { - $buf = $this->_stub('Swift_Transport'); - $evt = $this->_dispatcher->createResponseEvent($buf, "250 Ok\r\n", true); - $this->assertIsA($evt, 'Swift_Events_ResponseEvent'); - $this->assertSame($buf, $evt->getSource()); - $this->assertEqual("250 Ok\r\n", $evt->getResponse()); - $this->assertTrue($evt->isValid()); - } - - public function testTransportChangeEventCanBeCreated() - { - $transport = $this->_stub('Swift_Transport'); - $evt = $this->_dispatcher->createTransportChangeEvent($transport); - $this->assertIsA($evt, 'Swift_Events_TransportChangeEvent'); - $this->assertSame($transport, $evt->getSource()); - } - - public function testTransportExceptionEventCanBeCreated() - { - $transport = $this->_stub('Swift_Transport'); - $ex = new Swift_TransportException(''); - $evt = $this->_dispatcher->createTransportExceptionEvent($transport, $ex); - $this->assertIsA($evt, 'Swift_Events_TransportExceptionEvent'); - $this->assertSame($transport, $evt->getSource()); - $this->assertSame($ex, $evt->getException()); - } - - public function testListenersAreNotifiedOfDispatchedEvent() - { - $transport = $this->_stub('Swift_Transport'); - - $evt = $this->_dispatcher->createTransportChangeEvent($transport); - - $listenerA = $this->_mock('Swift_Events_TransportChangeListener'); - $listenerB = $this->_mock('Swift_Events_TransportChangeListener'); - - $this->_dispatcher->bindEventListener($listenerA); - $this->_dispatcher->bindEventListener($listenerB); - - $this->_checking(Expectations::create() - -> one($listenerA)->transportStarted($evt) - -> one($listenerB)->transportStarted($evt) - ); - - $this->_dispatcher->dispatchEvent($evt, 'transportStarted'); - } - - public function testListenersAreOnlyCalledIfImplementingCorrectInterface() - { - $transport = $this->_stub('Swift_Transport'); - $message = $this->_stub('Swift_Mime_Message'); - - $evt = $this->_dispatcher->createSendEvent($transport, $message); - - $targetListener = $this->_mock('Swift_Events_SendListener'); - $otherListener = $this->_mock('Swift_Events_TransportChangeListener'); - - $this->_dispatcher->bindEventListener($targetListener); - $this->_dispatcher->bindEventListener($otherListener); - - $this->_checking(Expectations::create() - -> one($targetListener)->sendPerformed($evt) - -> never($otherListener) - ); - - $this->_dispatcher->dispatchEvent($evt, 'sendPerformed'); - } - - public function testListenersCanCancelBubblingOfEvent() - { - $transport = $this->_stub('Swift_Transport'); - $message = $this->_stub('Swift_Mime_Message'); - - $evt = $this->_dispatcher->createSendEvent($transport, $message); - - $listenerA = $this->_mock('Swift_Events_SendListener'); - $listenerB = $this->_mock('Swift_Events_SendListener'); - - $this->_dispatcher->bindEventListener($listenerA); - $this->_dispatcher->bindEventListener($listenerB); - - $this->_checking(Expectations::create() - -> one($listenerA)->sendPerformed($evt) -> calls(array($this, '_cancelBubble')) - -> never($listenerB) - ); - - $this->_dispatcher->dispatchEvent($evt, 'sendPerformed'); - - $this->assertTrue($evt->bubbleCancelled()); - } - - public function testAddingListenerTwiceDoesNotReceiveEventTwice() - { - $transport = $this->_stub('Swift_Transport'); - - $evt = $this->_dispatcher->createTransportChangeEvent($transport); - - $listener = $this->_mock('Swift_Events_TransportChangeListener'); - - $this->_dispatcher->bindEventListener($listener); - $this->_dispatcher->bindEventListener($listener); - - $this->_checking(Expectations::create() - -> one($listener)->transportStarted($evt) - -> never($listener)->transportStarted($evt) - ); - - $this->_dispatcher->dispatchEvent($evt, 'transportStarted'); - } - - // -- Mock callbacks - - public function _cancelBubble(Yay_Invocation $inv) - { - $args = $inv->getArguments(); - $args[0]->cancelBubble(true); - } - - // -- Private methods - - private function _createDispatcher(array $map) - { - $dispatcher = new Swift_Events_SimpleEventDispatcher($map); - - return $dispatcher; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/TransportChangeEventTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/TransportChangeEventTest.php deleted file mode 100644 index b78e3155..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/TransportChangeEventTest.php +++ /dev/null @@ -1,36 +0,0 @@ -_createTransport(); - $evt = $this->_createEvent($transport); - $ref = $evt->getTransport(); - $this->assertReference($transport, $ref); - } - - public function testSourceIsTransport() - { - $transport = $this->_createTransport(); - $evt = $this->_createEvent($transport); - $ref = $evt->getSource(); - $this->assertReference($transport, $ref); - } - - // -- Creation Methods - - private function _createEvent(Swift_Transport $source) - { - return new Swift_Events_TransportChangeEvent($source); - } - - private function _createTransport() - { - return $this->_stub('Swift_Transport'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/TransportExceptionEventTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/TransportExceptionEventTest.php deleted file mode 100644 index 430117a6..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/TransportExceptionEventTest.php +++ /dev/null @@ -1,49 +0,0 @@ -_createException(); - $transport = $this->_createTransport(); - $evt = $this->_createEvent($transport, $ex); - $ref = $evt->getException(); - $this->assertReference($ex, $ref, - '%s: Exception should be available via getException()' - ); - } - - public function testSourceIsTransport() - { - $ex = $this->_createException(); - $transport = $this->_createTransport(); - $evt = $this->_createEvent($transport, $ex); - $ref = $evt->getSource(); - $this->assertReference($transport, $ref, - '%s: Transport should be available via getSource()' - ); - } - - // -- Creation Methods - - private function _createEvent(Swift_Transport $transport, - Swift_TransportException $ex) - { - return new Swift_Events_TransportExceptionEvent($transport, $ex); - } - - private function _createTransport() - { - return $this->_stub('Swift_Transport'); - } - - private function _createException() - { - return new Swift_TransportException(''); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/KeyCache/ArrayKeyCacheTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/KeyCache/ArrayKeyCacheTest.php deleted file mode 100644 index 68ea3d1a..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/KeyCache/ArrayKeyCacheTest.php +++ /dev/null @@ -1,242 +0,0 @@ -_createKeyCacheInputStream(true); - $cache = $this->_createCache($is); - $cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('test', $cache->getString($this->_key1, 'foo')); - } - - public function testStringDataCanBeOverwritten() - { - $is = $this->_createKeyCacheInputStream(true); - $cache = $this->_createCache($is); - $cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $cache->setString( - $this->_key1, 'foo', 'whatever', Swift_KeyCache::MODE_WRITE - ); - - $this->assertEqual('whatever', $cache->getString($this->_key1, 'foo')); - } - - public function testStringDataCanBeAppended() - { - $is = $this->_createKeyCacheInputStream(true); - $cache = $this->_createCache($is); - $cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $cache->setString( - $this->_key1, 'foo', 'ing', Swift_KeyCache::MODE_APPEND - ); - - $this->assertEqual('testing', $cache->getString($this->_key1, 'foo')); - } - - public function testHasKeyReturnValue() - { - $is = $this->_createKeyCacheInputStream(true); - $cache = $this->_createCache($is); - $cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - - $this->assertTrue($cache->hasKey($this->_key1, 'foo')); - } - - public function testNsKeyIsWellPartitioned() - { - $is = $this->_createKeyCacheInputStream(true); - $cache = $this->_createCache($is); - $cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $cache->setString( - $this->_key2, 'foo', 'ing', Swift_KeyCache::MODE_WRITE - ); - - $this->assertEqual('test', $cache->getString($this->_key1, 'foo')); - $this->assertEqual('ing', $cache->getString($this->_key2, 'foo')); - } - - public function testItemKeyIsWellPartitioned() - { - $is = $this->_createKeyCacheInputStream(true); - $cache = $this->_createCache($is); - $cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $cache->setString( - $this->_key1, 'bar', 'ing', Swift_KeyCache::MODE_WRITE - ); - - $this->assertEqual('test', $cache->getString($this->_key1, 'foo')); - $this->assertEqual('ing', $cache->getString($this->_key1, 'bar')); - } - - public function testByteStreamCanBeImported() - { - $os = $this->_createOutputStream(); - $this->_checking(Expectations::create() - -> one($os)->read(optional()) -> returns('abc') - -> one($os)->read(optional()) -> returns('def') - -> one($os)->read(optional()) -> returns(false) - -> ignoring($os) - ); - $is = $this->_createKeyCacheInputStream(true); - $cache = $this->_createCache($is); - $cache->importFromByteStream( - $this->_key1, 'foo', $os, Swift_KeyCache::MODE_WRITE - ); - $this->assertEqual('abcdef', $cache->getString($this->_key1, 'foo')); - } - - public function testByteStreamCanBeAppended() - { - $os1 = $this->_createOutputStream(); - $os2 = $this->_createOutputStream(); - $this->_checking(Expectations::create() - -> one($os1)->read(optional()) -> returns('abc') - -> one($os1)->read(optional()) -> returns('def') - -> one($os1)->read(optional()) -> returns(false) - -> ignoring($os1) - - -> one($os2)->read(optional()) -> returns('xyz') - -> one($os2)->read(optional()) -> returns('uvw') - -> one($os2)->read(optional()) -> returns(false) - -> ignoring($os2) - ); - $is = $this->_createKeyCacheInputStream(true); - - $cache = $this->_createCache($is); - - $cache->importFromByteStream( - $this->_key1, 'foo', $os1, Swift_KeyCache::MODE_APPEND - ); - $cache->importFromByteStream( - $this->_key1, 'foo', $os2, Swift_KeyCache::MODE_APPEND - ); - - $this->assertEqual('abcdefxyzuvw', $cache->getString($this->_key1, 'foo')); - } - - public function testByteStreamAndStringCanBeAppended() - { - $os = $this->_createOutputStream(); - $this->_checking(Expectations::create() - -> one($os)->read(optional()) -> returns('abc') - -> one($os)->read(optional()) -> returns('def') - -> one($os)->read(optional()) -> returns(false) - -> ignoring($os) - ); - $is = $this->_createKeyCacheInputStream(true); - - $cache = $this->_createCache($is); - - $cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_APPEND - ); - $cache->importFromByteStream( - $this->_key1, 'foo', $os, Swift_KeyCache::MODE_APPEND - ); - $this->assertEqual('testabcdef', $cache->getString($this->_key1, 'foo')); - } - - public function testDataCanBeExportedToByteStream() - { - //See acceptance test for more detail - $is = $this->_createInputStream(); - $this->_checking(Expectations::create() - -> atLeast(1)->of($is)->write(any()) - -> ignoring($is) - ); - $kcis = $this->_createKeyCacheInputStream(true); - - $cache = $this->_createCache($kcis); - - $cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - - $cache->exportToByteStream($this->_key1, 'foo', $is); - } - - public function testKeyCanBeCleared() - { - $is = $this->_createKeyCacheInputStream(true); - $cache = $this->_createCache($is); - - $cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $this->assertTrue($cache->hasKey($this->_key1, 'foo')); - $cache->clearKey($this->_key1, 'foo'); - $this->assertFalse($cache->hasKey($this->_key1, 'foo')); - } - - public function testNsKeyCanBeCleared() - { - $is = $this->_createKeyCacheInputStream(true); - $cache = $this->_createCache($is); - - $cache->setString( - $this->_key1, 'foo', 'test', Swift_KeyCache::MODE_WRITE - ); - $cache->setString( - $this->_key1, 'bar', 'xyz', Swift_KeyCache::MODE_WRITE - ); - $this->assertTrue($cache->hasKey($this->_key1, 'foo')); - $this->assertTrue($cache->hasKey($this->_key1, 'bar')); - $cache->clearAll($this->_key1); - $this->assertFalse($cache->hasKey($this->_key1, 'foo')); - $this->assertFalse($cache->hasKey($this->_key1, 'bar')); - } - - // -- Creation methods - - private function _createCache($is) - { - return new Swift_KeyCache_ArrayKeyCache($is); - } - - private function _createKeyCacheInputStream($stub = false) - { - return $stub - ? $this->_stub('Swift_KeyCache_KeyCacheInputStream') - : $this->_mock('Swift_KeyCache_KeyCacheInputStream') - ; - } - - private function _createOutputStream($stub = false) - { - return $stub - ? $this->_stub('Swift_OutputByteStream') - : $this->_mock('Swift_OutputByteStream') - ; - } - - private function _createInputStream($stub = false) - { - return $stub - ? $this->_stub('Swift_InputByteStream') - : $this->_mock('Swift_InputByteStream') - ; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/KeyCache/SimpleKeyCacheInputStreamTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/KeyCache/SimpleKeyCacheInputStreamTest.php deleted file mode 100644 index 94a86baa..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/KeyCache/SimpleKeyCacheInputStreamTest.php +++ /dev/null @@ -1,77 +0,0 @@ -_createKeyCache(); - $this->_checking(Expectations::create() - -> one($cache)->setString($this->_nsKey, 'foo', 'a', Swift_KeyCache::MODE_APPEND) - -> one($cache)->setString($this->_nsKey, 'foo', 'b', Swift_KeyCache::MODE_APPEND) - -> one($cache)->setString($this->_nsKey, 'foo', 'c', Swift_KeyCache::MODE_APPEND) - ); - - $stream = new Swift_KeyCache_SimpleKeyCacheInputStream(); - $stream->setKeyCache($cache); - $stream->setNsKey($this->_nsKey); - $stream->setItemKey('foo'); - - $stream->write('a'); - $stream->write('b'); - $stream->write('c'); - } - - public function testFlushContentClearsKey() - { - $cache = $this->_createKeyCache(); - $this->_checking(Expectations::create() - -> one($cache)->clearKey($this->_nsKey, 'foo') - ); - - $stream = new Swift_KeyCache_SimpleKeyCacheInputStream(); - $stream->setKeyCache($cache); - $stream->setNsKey($this->_nsKey); - $stream->setItemKey('foo'); - - $stream->flushBuffers(); - } - - public function testClonedStreamStillReferencesSameCache() - { - $cache = $this->_createKeyCache(); - $this->_checking(Expectations::create() - -> one($cache)->setString($this->_nsKey, 'foo', 'a', Swift_KeyCache::MODE_APPEND) - -> one($cache)->setString($this->_nsKey, 'foo', 'b', Swift_KeyCache::MODE_APPEND) - -> one($cache)->setString('test', 'bar', 'x', Swift_KeyCache::MODE_APPEND) - ); - - $stream = new Swift_KeyCache_SimpleKeyCacheInputStream(); - $stream->setKeyCache($cache); - $stream->setNsKey($this->_nsKey); - $stream->setItemKey('foo'); - - $stream->write('a'); - $stream->write('b'); - - $newStream = clone $stream; - $newStream->setKeyCache($cache); - $newStream->setNsKey('test'); - $newStream->setItemKey('bar'); - - $newStream->write('x'); - } - - // -- Creation Methods - - private function _createKeyCache() - { - return $this->_mock('Swift_KeyCache'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mailer/ArrayRecipientIteratorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mailer/ArrayRecipientIteratorTest.php deleted file mode 100644 index f86b1819..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mailer/ArrayRecipientIteratorTest.php +++ /dev/null @@ -1,46 +0,0 @@ -assertFalse($it->hasNext()); - } - - public function testHasNextReturnsTrueIfItemsLeft() - { - $it = new Swift_Mailer_ArrayRecipientIterator(array('foo@bar' => 'Foo')); - $this->assertTrue($it->hasNext()); - } - - public function testReadingToEndOfListCausesHasNextToReturnFalse() - { - $it = new Swift_Mailer_ArrayRecipientIterator(array('foo@bar' => 'Foo')); - $this->assertTrue($it->hasNext()); - $it->nextRecipient(); - $this->assertFalse($it->hasNext()); - } - - public function testReturnedValueHasPreservedKeyValuePair() - { - $it = new Swift_Mailer_ArrayRecipientIterator(array('foo@bar' => 'Foo')); - $this->assertEqual(array('foo@bar' => 'Foo'), $it->nextRecipient()); - } - - public function testIteratorMovesNextAfterEachIteration() - { - $it = new Swift_Mailer_ArrayRecipientIterator(array( - 'foo@bar' => 'Foo', - 'zip@button' => 'Zip thing', - 'test@test' => null - )); - $this->assertEqual(array('foo@bar' => 'Foo'), $it->nextRecipient()); - $this->assertEqual(array('zip@button' => 'Zip thing'), $it->nextRecipient()); - $this->assertEqual(array('test@test' => null), $it->nextRecipient()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/MailerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/MailerTest.php deleted file mode 100644 index 48c209d9..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/MailerTest.php +++ /dev/null @@ -1,149 +0,0 @@ -_createTransport(); - $message = $this->_createMessage(); - $con = $this->_states('Connection')->startsAs('off'); - $this->_checking(Expectations::create() - -> allowing($transport)->isStarted() -> returns(false) -> when($con->is('off')) - -> allowing($transport)->isStarted() -> returns(false) -> when($con->is('on')) - -> one($transport)->start() -> when($con->is('off')) -> then($con->is('on')) - -> ignoring($transport) - -> ignoring($message) - ); - - $mailer = $this->_createMailer($transport); - $mailer->send($message); - } - - public function testTransportIsOnlyStartedOnce() - { - $transport = $this->_createTransport(); - $message = $this->_createMessage(); - $con = $this->_states('Connection')->startsAs('off'); - $this->_checking(Expectations::create() - -> allowing($transport)->isStarted() -> returns(false) -> when($con->is('off')) - -> allowing($transport)->isStarted() -> returns(false) -> when($con->is('on')) - -> one($transport)->start() -> when($con->is('off')) -> then($con->is('on')) - -> ignoring($transport) - -> ignoring($message) - ); - $mailer = $this->_createMailer($transport); - for ($i = 0; $i < 10; ++$i) { - $mailer->send($message); - } - } - - public function testMessageIsPassedToTransport() - { - $transport = $this->_createTransport(); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> one($transport)->send($message, optional()) - -> ignoring($transport) - -> ignoring($message) - ); - - $mailer = $this->_createMailer($transport); - $mailer->send($message); - } - - public function testSendReturnsCountFromTransport() - { - $transport = $this->_createTransport(); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> one($transport)->send($message, optional()) -> returns(57) - -> ignoring($transport) - -> ignoring($message) - ); - - $mailer = $this->_createMailer($transport); - $this->assertEqual(57, $mailer->send($message)); - } - - public function testFailedRecipientReferenceIsPassedToTransport() - { - $failures = array(); - - $transport = $this->_createTransport(); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> one($transport)->send($message, reference($failures)) - -> ignoring($transport) - -> ignoring($message) - ); - - $mailer = $this->_createMailer($transport); - $mailer->send($message, $failures); - } - - public function testSendRecordsRfcComplianceExceptionAsEntireSendFailure() - { - $failures = array(); - - $rfcException = new Swift_RfcComplianceException('test'); - $transport = $this->_createTransport(); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array('foo&invalid' => 'Foo', 'bar@valid.tld' => 'Bar')) - -> one($transport)->send($message, reference($failures)) -> throws($rfcException) - -> ignoring($transport) - -> ignoring($message) - ); - - $mailer = $this->_createMailer($transport); - $this->assertEqual(0, $mailer->send($message, $failures), '%s: Should return 0'); - $this->assertEqual(array('foo&invalid', 'bar@valid.tld'), $failures, '%s: Failures should contain all addresses since the entire message failed to compile'); - } - - public function testRegisterPluginDelegatesToTransport() - { - $plugin = $this->_createPlugin(); - $transport = $this->_createTransport(); - $mailer = $this->_createMailer($transport); - - $this->_checking(Expectations::create() - -> one($transport)->registerPlugin($plugin) - ); - $mailer->registerPlugin($plugin); - } - - // -- Creation methods - - private function _createPlugin() - { - return $this->_mock('Swift_Events_EventListener'); - } - - private function _createTransport() - { - return $this->_mock('Swift_Transport'); - } - - private function _createMessage() - { - return $this->_mock('Swift_Mime_Message'); - } - - private function _createIterator() - { - return $this->_mock('Swift_Mailer_RecipientIterator'); - } - - private function _createMailer(Swift_Transport $transport) - { - return new Swift_Mailer($transport); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/AbstractMimeEntityTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/AbstractMimeEntityTest.php deleted file mode 100644 index 08792793..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/AbstractMimeEntityTest.php +++ /dev/null @@ -1,1102 +0,0 @@ -_createHeaderSet(); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $this->assertSame($headers, $entity->getHeaders()); - } - - public function testContentTypeIsReturnedFromHeader() - { - $ctype = $this->_createHeader('Content-Type', 'image/jpeg-test'); - $headers = $this->_createHeaderSet(array('Content-Type' => $ctype)); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $this->assertEqual('image/jpeg-test', $entity->getContentType()); - } - - public function testContentTypeIsSetInHeader() - { - $ctype = $this->_createHeader('Content-Type', 'text/plain', array(), false); - $headers = $this->_createHeaderSet(array('Content-Type' => $ctype)); - $this->_checking(Expectations::create() - -> one($ctype)->setFieldBodyModel('image/jpeg') - -> ignoring($ctype) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setContentType('image/jpeg'); - } - - public function testContentTypeHeaderIsAddedIfNoneSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addParameterizedHeader('Content-Type', 'image/jpeg') - -> ignoring($headers) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setContentType('image/jpeg'); - } - - public function testContentTypeCanBeSetViaSetBody() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addParameterizedHeader('Content-Type', 'text/html') - -> ignoring($headers) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setBody('foo', 'text/html'); - } - - public function testGetEncoderFromConstructor() - { - $encoder = $this->_createEncoder('base64'); - $entity = $this->_createEntity($this->_createHeaderSet(), $encoder, - $this->_createCache() - ); - $this->assertSame($encoder, $entity->getEncoder()); - } - - public function testSetAndGetEncoder() - { - $encoder = $this->_createEncoder('base64'); - $headers = $this->_createHeaderSet(); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setEncoder($encoder); - $this->assertSame($encoder, $entity->getEncoder()); - } - - public function testSettingEncoderUpdatesTransferEncoding() - { - $encoder = $this->_createEncoder('base64'); - $encoding = $this->_createHeader( - 'Content-Transfer-Encoding', '8bit', array(), false - ); - $headers = $this->_createHeaderSet(array( - 'Content-Transfer-Encoding' => $encoding - )); - $this->_checking(Expectations::create() - -> one($encoding)->setFieldBodyModel('base64') - -> ignoring($encoding) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setEncoder($encoder); - } - - public function testSettingEncoderAddsEncodingHeaderIfNonePresent() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addTextHeader('Content-Transfer-Encoding', 'something') - -> ignoring($headers) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setEncoder($this->_createEncoder('something')); - } - - public function testIdIsReturnedFromHeader() - { - /* -- RFC 2045, 7. - In constructing a high-level user agent, it may be desirable to allow - one body to make reference to another. Accordingly, bodies may be - labelled using the "Content-ID" header field, which is syntactically - identical to the "Message-ID" header field - */ - - $cid = $this->_createHeader('Content-ID', 'zip@button'); - $headers = $this->_createHeaderSet(array('Content-ID' => $cid)); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $this->assertEqual('zip@button', $entity->getId()); - } - - public function testIdIsSetInHeader() - { - $cid = $this->_createHeader('Content-ID', 'zip@button', array(), false); - $headers = $this->_createHeaderSet(array('Content-ID' => $cid)); - $this->_checking(Expectations::create() - -> one($cid)->setFieldBodyModel('foo@bar') - -> ignoring($cid) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setId('foo@bar'); - } - - public function testIdIsAutoGenerated() - { - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertPattern('/^.*?@.*?$/D', $entity->getId()); - } - - public function testGenerateIdCreatesNewId() - { - $headers = $this->_createHeaderSet(); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $id1 = $entity->generateId(); - $id2 = $entity->generateId(); - $this->assertNotEqual($id1, $id2); - } - - public function testGenerateIdSetsNewId() - { - $headers = $this->_createHeaderSet(); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $id = $entity->generateId(); - $this->assertEqual($id, $entity->getId()); - } - - public function testDescriptionIsReadFromHeader() - { - /* -- RFC 2045, 8. - The ability to associate some descriptive information with a given - body is often desirable. For example, it may be useful to mark an - "image" body as "a picture of the Space Shuttle Endeavor." Such text - may be placed in the Content-Description header field. This header - field is always optional. - */ - - $desc = $this->_createHeader('Content-Description', 'something'); - $headers = $this->_createHeaderSet(array('Content-Description' => $desc)); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $this->assertEqual('something', $entity->getDescription()); - } - - public function testDescriptionIsSetInHeader() - { - $desc = $this->_createHeader('Content-Description', '', array(), false); - $headers = $this->_createHeaderSet(array('Content-Description' => $desc)); - $this->_checking(Expectations::create() - -> one($desc)->setFieldBodyModel('whatever') - -> ignoring($desc) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setDescription('whatever'); - } - - public function testDescriptionHeaderIsAddedIfNotPresent() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addTextHeader('Content-Description', 'whatever') - -> ignoring($headers) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setDescription('whatever'); - } - - public function testSetAndGetMaxLineLength() - { - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setMaxLineLength(60); - $this->assertEqual(60, $entity->getMaxLineLength()); - } - - public function testEncoderIsUsedForStringGeneration() - { - $encoder = $this->_createEncoder('base64', false); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString('blah', optional()) - -> ignoring($encoder) - ); - $entity = $this->_createEntity($this->_createHeaderSet(), - $encoder, $this->_createCache() - ); - $entity->setBody("blah"); - $entity->toString(); - } - - public function testMaxLineLengthIsProvidedWhenEncoding() - { - $encoder = $this->_createEncoder('base64', false); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString('blah', 0, 65) - -> ignoring($encoder) - ); - $entity = $this->_createEntity($this->_createHeaderSet(), - $encoder, $this->_createCache() - ); - $entity->setBody("blah"); - $entity->setMaxLineLength(65); - $entity->toString(); - } - - public function testHeadersAppearInString() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: text/plain; charset=utf-8\r\n" . - "X-MyHeader: foobar\r\n" - ) - -> ignoring($headers) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $this->assertEqual( - "Content-Type: text/plain; charset=utf-8\r\n" . - "X-MyHeader: foobar\r\n", - $entity->toString() - ); - } - - public function testSetAndGetBody() - { - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setBody("blah\r\nblah!"); - $this->assertEqual("blah\r\nblah!", $entity->getBody()); - } - - public function testBodyIsAppended() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: text/plain; charset=utf-8\r\n" - ) - -> ignoring($headers) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setBody("blah\r\nblah!"); - $this->assertEqual( - "Content-Type: text/plain; charset=utf-8\r\n" . - "\r\n" . - "blah\r\nblah!", - $entity->toString() - ); - } - - public function testGetBodyReturnsStringFromByteStream() - { - $os = $this->_createOutputStream("byte stream string"); - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setBody($os); - $this->assertEqual("byte stream string", $entity->getBody()); - } - - public function testByteStreamBodyIsAppended() - { - $headers = $this->_createHeaderSet(array(), false); - $os = $this->_createOutputStream("streamed"); - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: text/plain; charset=utf-8\r\n" - ) - -> ignoring($headers) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setBody($os); - $this->assertEqual( - "Content-Type: text/plain; charset=utf-8\r\n" . - "\r\n" . - "streamed", - $entity->toString() - ); - } - - public function testBoundaryCanBeRetrieved() - { - /* -- RFC 2046, 5.1.1. - boundary := 0*69 bcharsnospace - - bchars := bcharsnospace / " " - - bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" / - "+" / "_" / "," / "-" / "." / - "/" / ":" / "=" / "?" - */ - - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertPattern( - '/^[a-zA-Z0-9\'\(\)\+_\-,\.\/:=\?\ ]{0,69}[a-zA-Z0-9\'\(\)\+_\-,\.\/:=\?]$/D', - $entity->getBoundary() - ); - } - - public function testBoundaryNeverChanges() - { - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $firstBoundary = $entity->getBoundary(); - for ($i = 0; $i < 10; $i++) { - $this->assertEqual($firstBoundary, $entity->getBoundary()); - } - } - - public function testBoundaryCanBeSet() - { - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setBoundary('foobar'); - $this->assertEqual('foobar', $entity->getBoundary()); - } - - public function testAddingChildrenGeneratesBoundaryInHeaders() - { - $child = $this->_createChild(); - $cType = $this->_createHeader('Content-Type', 'text/plain', array(), false); - $this->_checking(Expectations::create() - -> one($cType)->setParameter('boundary', any()) - -> ignoring($cType) - ); - - $entity = $this->_createEntity($this->_createHeaderSet(array( - 'Content-Type' => $cType - )), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setChildren(array($child)); - } - - public function testChildrenOfLevelAttachmentAndLessCauseMultipartMixed() - { - for ($level = Swift_Mime_MimeEntity::LEVEL_MIXED; - $level > Swift_Mime_MimeEntity::LEVEL_TOP; $level /= 2) - { - $child = $this->_createChild($level); - $cType = $this->_createHeader( - 'Content-Type', 'text/plain', array(), false - ); - $this->_checking(Expectations::create() - -> one($cType)->setFieldBodyModel('multipart/mixed') - -> ignoring($cType) - ); - $entity = $this->_createEntity($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setChildren(array($child)); - } - } - - public function testChildrenOfLevelAlternativeAndLessCauseMultipartAlternative() - { - for ($level = Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE; - $level > Swift_Mime_MimeEntity::LEVEL_MIXED; $level /= 2) - { - $child = $this->_createChild($level); - $cType = $this->_createHeader( - 'Content-Type', 'text/plain', array(), false - ); - $this->_checking(Expectations::create() - -> one($cType)->setFieldBodyModel('multipart/alternative') - -> ignoring($cType) - ); - $entity = $this->_createEntity($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setChildren(array($child)); - } - } - - public function testChildrenOfLevelRelatedAndLessCauseMultipartRelated() - { - for ($level = Swift_Mime_MimeEntity::LEVEL_RELATED; - $level > Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE; $level /= 2) - { - $child = $this->_createChild($level); - $cType = $this->_createHeader( - 'Content-Type', 'text/plain', array(), false - ); - $this->_checking(Expectations::create() - -> one($cType)->setFieldBodyModel('multipart/related') - -> ignoring($cType) - ); - $entity = $this->_createEntity($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setChildren(array($child)); - } - } - - public function testHighestLevelChildDeterminesContentType() - { - $combinations = array( - array('levels' => array(Swift_Mime_MimeEntity::LEVEL_MIXED, - Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE, - Swift_Mime_MimeEntity::LEVEL_RELATED - ), - 'type' => 'multipart/mixed' - ), - array('levels' => array(Swift_Mime_MimeEntity::LEVEL_MIXED, - Swift_Mime_MimeEntity::LEVEL_RELATED - ), - 'type' => 'multipart/mixed' - ), - array('levels' => array(Swift_Mime_MimeEntity::LEVEL_MIXED, - Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE - ), - 'type' => 'multipart/mixed' - ), - array('levels' => array(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE, - Swift_Mime_MimeEntity::LEVEL_RELATED - ), - 'type' => 'multipart/alternative' - ) - ); - - foreach ($combinations as $combination) { - $children = array(); - foreach ($combination['levels'] as $level) { - $children[] = $this->_createChild($level); - } - - $cType = $this->_createHeader( - 'Content-Type', 'text/plain', array(), false - ); - $this->_checking(Expectations::create() - -> one($cType)->setFieldBodyModel($combination['type']) - -> ignoring($cType) - ); - $entity = $this->_createEntity($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setChildren($children); - } - } - - public function testChildrenAppearNestedInString() - { - /* -- RFC 2046, 5.1.1. - (excerpt too verbose to paste here) - */ - - $headers = $this->_createHeaderSet(array(), false); - - $child1 = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE, - "Content-Type: text/plain\r\n" . - "\r\n" . - "foobar" - ); - - $child2 = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE, - "Content-Type: text/html\r\n" . - "\r\n" . - "foobar" - ); - - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: multipart/alternative; boundary=\"xxx\"\r\n" - ) - -> ignoring($headers) - ); - - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setBoundary('xxx'); - $entity->setChildren(array($child1, $child2)); - - $this->assertEqual( - "Content-Type: multipart/alternative; boundary=\"xxx\"\r\n" . - "\r\n" . - "\r\n--xxx\r\n" . - "Content-Type: text/plain\r\n" . - "\r\n" . - "foobar\r\n" . - "\r\n--xxx\r\n" . - "Content-Type: text/html\r\n" . - "\r\n" . - "foobar\r\n" . - "\r\n--xxx--\r\n", - $entity->toString() - ); - } - - public function testMixingLevelsIsHierarchical() - { - $headers = $this->_createHeaderSet(array(), false); - $newHeaders = $this->_createHeaderSet(array(), false); - - $part = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE, - "Content-Type: text/plain\r\n" . - "\r\n" . - "foobar" - ); - - $attachment = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_MIXED, - "Content-Type: application/octet-stream\r\n" . - "\r\n" . - "data" - ); - - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: multipart/mixed; boundary=\"xxx\"\r\n" - ) - -> ignoring($headers)->newInstance() -> returns($newHeaders) - -> ignoring($headers) - -> ignoring($newHeaders)->toString() -> returns( - "Content-Type: multipart/alternative; boundary=\"yyy\"\r\n" - ) - -> ignoring($newHeaders) - ); - - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setBoundary('xxx'); - $entity->setChildren(array($part, $attachment)); - - $this->assertPattern( - "~^" . - "Content-Type: multipart/mixed; boundary=\"xxx\"\r\n" . - "\r\n\r\n--xxx\r\n" . - "Content-Type: multipart/alternative; boundary=\"yyy\"\r\n" . - "\r\n\r\n--(.*?)\r\n" . - "Content-Type: text/plain\r\n" . - "\r\n" . - "foobar" . - "\r\n\r\n--\\1--\r\n" . - "\r\n\r\n--xxx\r\n" . - "Content-Type: application/octet-stream\r\n" . - "\r\n" . - "data" . - "\r\n\r\n--xxx--\r\n" . - "\$~", - $entity->toString() - ); - } - - public function testSettingEncoderNotifiesChildren() - { - $child = $this->_createChild(0, '', false); - $encoder = $this->_createEncoder('base64'); - - $this->_checking(Expectations::create() - -> one($child)->encoderChanged($encoder) - -> ignoring($child) - ); - - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setChildren(array($child)); - $entity->setEncoder($encoder); - } - - public function testReceiptOfEncoderChangeNotifiesChildren() - { - $child = $this->_createChild(0, '', false); - $encoder = $this->_createEncoder('base64'); - - $this->_checking(Expectations::create() - -> one($child)->encoderChanged($encoder) - -> ignoring($child) - ); - - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setChildren(array($child)); - $entity->encoderChanged($encoder); - } - - public function testReceiptOfCharsetChangeNotifiesChildren() - { - $child = $this->_createChild(0, '', false); - - $this->_checking(Expectations::create() - -> one($child)->charsetChanged('windows-874') - -> ignoring($child) - ); - - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $entity->setChildren(array($child)); - $entity->charsetChanged('windows-874'); - } - - public function testEntityIsWrittenToByteStream() - { - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $is = $this->_createInputStream(false); - $this->_checking(Expectations::create() - -> atLeast(1)->of($is)->write(any()) - -> ignoring($is) - ); - - $entity->toByteStream($is); - } - - public function testEntityHeadersAreComittedToByteStream() - { - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $is = $this->_createInputStream(false); - $this->_checking(Expectations::create() - -> atLeast(1)->of($is)->commit() - -> atLeast(1)->of($is)->write(any()) - -> ignoring($is) - ); - - $entity->toByteStream($is); - } - - public function testOrderingTextBeforeHtml() - { - $htmlChild = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE, - "Content-Type: text/html\r\n" . - "\r\n" . - "HTML PART", - false - ); - $textChild = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE, - "Content-Type: text/plain\r\n" . - "\r\n" . - "TEXT PART", - false - ); - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: multipart/alternative; boundary=\"xxx\"\r\n" - ) - -> ignoring($headers) - -> ignoring($htmlChild)->getContentType() -> returns('text/html') - -> ignoring($htmlChild) - -> ignoring($textChild)->getContentType() -> returns('text/plain') - -> ignoring($textChild) - ); - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $this->_createCache() - ); - $entity->setBoundary('xxx'); - $entity->setChildren(array($htmlChild, $textChild)); - - $this->assertEqual( - "Content-Type: multipart/alternative; boundary=\"xxx\"\r\n" . - "\r\n\r\n--xxx\r\n" . - "Content-Type: text/plain\r\n" . - "\r\n" . - "TEXT PART" . - "\r\n\r\n--xxx\r\n" . - "Content-Type: text/html\r\n" . - "\r\n" . - "HTML PART" . - "\r\n\r\n--xxx--\r\n", - $entity->toString() - ); - } - - public function testUnsettingChildrenRestoresContentType() - { - $cType = $this->_createHeader('Content-Type', 'text/plain', array(), false); - $child = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE); - - $s = $this->_mockery()->sequence('Type setting'); - $this->_checking(Expectations::create() - -> one($cType)->setFieldBodyModel('image/jpeg') -> inSequence($s) - -> one($cType)->setFieldBodyModel('multipart/alternative') -> inSequence($s) - -> one($cType)->setFieldBodyModel('image/jpeg') -> inSequence($s) - -> ignoring($cType) - ); - - $entity = $this->_createEntity($this->_createHeaderSet(array( - 'Content-Type' => $cType - )), - $this->_createEncoder(), $this->_createCache() - ); - - $entity->setContentType('image/jpeg'); - $entity->setChildren(array($child)); - $entity->setChildren(array()); - } - - public function testBodyIsReadFromCacheWhenUsingToStringIfPresent() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: text/plain; charset=utf-8\r\n" - ) - -> ignoring($headers) - ); - - $cache = $this->_createCache(false); - $this->_checking(Expectations::create() - -> one($cache)->hasKey(any(), 'body') -> returns(true) - -> one($cache)->getString(any(), 'body') -> returns("\r\ncache\r\ncache!") - -> ignoring($cache) - ); - - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $cache - ); - - $entity->setBody("blah\r\nblah!"); - $this->assertEqual( - "Content-Type: text/plain; charset=utf-8\r\n" . - "\r\n" . - "cache\r\ncache!", - $entity->toString() - ); - } - - public function testBodyIsAddedToCacheWhenUsingToString() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: text/plain; charset=utf-8\r\n" - ) - -> ignoring($headers) - ); - - $cache = $this->_createCache(false); - $this->_checking(Expectations::create() - -> one($cache)->hasKey(any(), 'body') -> returns(false) - -> one($cache)->setString(any(), 'body', "\r\nblah\r\nblah!", Swift_KeyCache::MODE_WRITE) - -> ignoring($cache) - ); - - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $cache - ); - - $entity->setBody("blah\r\nblah!"); - $entity->toString(); - } - - public function testBodyIsClearedFromCacheIfNewBodySet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: text/plain; charset=utf-8\r\n" - ) - -> ignoring($headers) - ); - - $cache = $this->_createCache(false); - $this->_checking(Expectations::create() - -> one($cache)->clearKey(any(), 'body') - -> ignoring($cache) - ); - - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $cache - ); - - $entity->setBody("blah\r\nblah!"); - $entity->toString(); - - $entity->setBody("new\r\nnew!"); - } - - public function testBodyIsNotClearedFromCacheIfSameBodySet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: text/plain; charset=utf-8\r\n" - ) - -> ignoring($headers) - ); - - $cache = $this->_createCache(false); - $this->_checking(Expectations::create() - -> never($cache)->clearKey(any(), 'body') - -> ignoring($cache) - ); - - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $cache - ); - - $entity->setBody("blah\r\nblah!"); - $entity->toString(); - - $entity->setBody("blah\r\nblah!"); - } - - public function testBodyIsClearedFromCacheIfNewEncoderSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: text/plain; charset=utf-8\r\n" - ) - -> ignoring($headers) - ); - - $cache = $this->_createCache(false); - $this->_checking(Expectations::create() - -> one($cache)->clearKey(any(), 'body') - -> ignoring($cache) - ); - - $otherEncoder = $this->_createEncoder(); - - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $cache - ); - - $entity->setBody("blah\r\nblah!"); - $entity->toString(); - - $entity->setEncoder($otherEncoder); - } - - public function testBodyIsReadFromCacheWhenUsingToByteStreamIfPresent() - { - $is = $this->_createInputStream(); - $cache = $this->_createCache(false); - - $this->_checking(Expectations::create() - -> one($cache)->hasKey(any(), 'body') -> returns(true) - -> one($cache)->exportToByteStream(any(), 'body', $is) - -> ignoring($cache) - ); - - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $cache - ); - $entity->setBody('foo'); - - $entity->toByteStream($is); - } - - public function testBodyIsAddedToCacheWhenUsingToByteStream() - { - $is = $this->_createInputStream(); - $cache = $this->_createCache(false); - - $this->_checking(Expectations::create() - -> one($cache)->hasKey(any(), 'body') -> returns(false) - //The input stream should be fetched for writing - // Proving that it's actually written to is possible, but extremely - // fragile. Best let the acceptance tests cover this aspect - -> one($cache)->getInputByteStream(any(), 'body') - -> ignoring($cache) - ); - - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $cache - ); - $entity->setBody('foo'); - - $entity->toByteStream($is); - } - - public function testFluidInterface() - { - $entity = $this->_createEntity($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - - $this->assertSame($entity, - $entity - ->setContentType('text/plain') - ->setEncoder($this->_createEncoder()) - ->setId('foo@bar') - ->setDescription('my description') - ->setMaxLineLength(998) - ->setBody('xx') - ->setBoundary('xyz') - ->setChildren(array()) - ); - } - - // -- Private helpers - - abstract protected function _createEntity($headers, $encoder, $cache); - - protected function _createChild($level = null, $string = '', $stub = true) - { - $child = $this->_mock('Swift_Mime_MimeEntity'); - if (isset($level)) { - $this->_checking(Expectations::create() - -> ignoring($child)->getNestingLevel() -> returns($level) - ); - } - $this->_checking(Expectations::create() - -> ignoring($child)->toString() -> returns($string) - ); - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($child) - ); - } - - return $child; - } - - protected function _createEncoder($name = 'quoted-printable', $stub = true) - { - $encoder = $this->_mock('Swift_Mime_ContentEncoder'); - $this->_checking(Expectations::create() - -> ignoring($encoder)->getName() -> returns($name) - ); - - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($encoder)->encodeString(any(), optional()) - -> calls(array($this, 'returnStringFromEncoder')) - -> ignoring($encoder) - ); - } - - return $encoder; - } - - protected function _createCache($stub = true) - { - $cache = $this->_mock('Swift_KeyCache'); - - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($cache) - ); - } - - return $cache; - } - - protected function _createHeaderSet($headers = array(), $stub = true) - { - $set = $this->_mock('Swift_Mime_HeaderSet'); - foreach ($headers as $key => $header) { - $this->_checking(Expectations::create() - -> ignoring($set)->has($key) -> returns(true) - -> ignoring($set)->get($key) -> returns($header) - ); - } - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($set)->newInstance() -> returns($set) - -> ignoring($set) - ); - } - - return $set; - } - - protected function _createHeader($name, $model = null, $params = array(), $stub = true) - { - $header = $this->_mock('Swift_Mime_ParameterizedHeader'); - $this->_checking(Expectations::create() - -> ignoring($header)->getFieldName() -> returns($name) - -> ignoring($header)->getFieldBodyModel() -> returns($model) - ); - foreach ($params as $key => $value) { - $this->_checking(Expectations::create() - -> ignoring($header)->getParameter($key) -> returns($value) - ); - } - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($header) - ); - } - - return $header; - } - - protected function _createOutputStream($data = null, $stub = true) - { - $os = $this->_mock('Swift_OutputByteStream'); - if (isset($data)) { - $pos = $this->_mockery()->states('position')->startsAs('at beginning'); - $this->_checking(Expectations::create() - -> ignoring($os)->read(optional()) -> returns($data) - -> when($pos->isNot('at end')) -> then($pos->is('at end')) - - -> ignoring($os)->read(optional()) -> returns(false) - ); - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($os) - ); - } - } - - return $os; - } - - protected function _createInputStream($stub = true) - { - $is = $this->_mock('Swift_InputByteStream'); - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($is) - ); - } - - return $is; - } - - // -- Mock helpers - - public function returnStringFromEncoder(Yay_Invocation $invocation) - { - $args = $invocation->getArguments(); - - return array_shift($args); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/AttachmentTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/AttachmentTest.php deleted file mode 100644 index f7817afe..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/AttachmentTest.php +++ /dev/null @@ -1,298 +0,0 @@ -_createAttachment($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual( - Swift_Mime_MimeEntity::LEVEL_MIXED, $attachment->getNestingLevel() - ); - } - - public function testDispositionIsReturnedFromHeader() - { - /* -- RFC 2183, 2.1, 2.2. - */ - - $disposition = $this->_createHeader('Content-Disposition', 'attachment'); - $attachment = $this->_createAttachment($this->_createHeaderSet(array( - 'Content-Disposition' => $disposition)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual('attachment', $attachment->getDisposition()); - } - - public function testDispositionIsSetInHeader() - { - $disposition = $this->_createHeader('Content-Disposition', 'attachment', - array(), false - ); - $this->_checking(Expectations::create() - -> one($disposition)->setFieldBodyModel('inline') - -> ignoring($disposition) - ); - $attachment = $this->_createAttachment($this->_createHeaderSet(array( - 'Content-Disposition' => $disposition)), - $this->_createEncoder(), $this->_createCache() - ); - $attachment->setDisposition('inline'); - } - - public function testDispositionIsAddedIfNonePresent() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addParameterizedHeader('Content-Disposition', 'inline') - -> ignoring($headers) - ); - $attachment = $this->_createAttachment($headers, $this->_createEncoder(), - $this->_createCache() - ); - $attachment->setDisposition('inline'); - } - - public function testDispositionIsAutoDefaultedToAttachment() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addParameterizedHeader('Content-Disposition', 'attachment') - -> ignoring($headers) - ); - $attachment = $this->_createAttachment($headers, $this->_createEncoder(), - $this->_createCache() - ); - } - - public function testDefaultContentTypeInitializedToOctetStream() - { - $cType = $this->_createHeader('Content-Type', '', - array(), false - ); - $this->_checking(Expectations::create() - -> one($cType)->setFieldBodyModel('application/octet-stream') - -> ignoring($cType) - ); - $attachment = $this->_createAttachment($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - } - - public function testFilenameIsReturnedFromHeader() - { - /* -- RFC 2183, 2.3. - */ - - $disposition = $this->_createHeader('Content-Disposition', 'attachment', - array('filename'=>'foo.txt') - ); - $attachment = $this->_createAttachment($this->_createHeaderSet(array( - 'Content-Disposition' => $disposition)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual('foo.txt', $attachment->getFilename()); - } - - public function testFilenameIsSetInHeader() - { - $disposition = $this->_createHeader('Content-Disposition', 'attachment', - array('filename'=>'foo.txt'), false - ); - $this->_checking(Expectations::create() - -> one($disposition)->setParameter('filename', 'bar.txt') - -> ignoring($disposition) - ); - $attachment = $this->_createAttachment($this->_createHeaderSet(array( - 'Content-Disposition' => $disposition)), - $this->_createEncoder(), $this->_createCache() - ); - $attachment->setFilename('bar.txt'); - } - - public function testSettingFilenameSetsNameInContentType() - { - /* - This is a legacy requirement which isn't covered by up-to-date RFCs. - */ - - $cType = $this->_createHeader('Content-Type', 'text/plain', - array(), false - ); - $this->_checking(Expectations::create() - -> one($cType)->setParameter('name', 'bar.txt') - -> ignoring($cType) - ); - $attachment = $this->_createAttachment($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $attachment->setFilename('bar.txt'); - } - - public function testSizeIsReturnedFromHeader() - { - /* -- RFC 2183, 2.7. - */ - - $disposition = $this->_createHeader('Content-Disposition', 'attachment', - array('size'=>1234) - ); - $attachment = $this->_createAttachment($this->_createHeaderSet(array( - 'Content-Disposition' => $disposition)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual(1234, $attachment->getSize()); - } - - public function testSizeIsSetInHeader() - { - $disposition = $this->_createHeader('Content-Disposition', 'attachment', - array(), false - ); - $this->_checking(Expectations::create() - -> one($disposition)->setParameter('size', 12345) - -> ignoring($disposition) - ); - $attachment = $this->_createAttachment($this->_createHeaderSet(array( - 'Content-Disposition' => $disposition)), - $this->_createEncoder(), $this->_createCache() - ); - $attachment->setSize(12345); - } - - public function testFilnameCanBeReadFromFileStream() - { - $file = $this->_createFileStream('/bar/file.ext', ''); - $disposition = $this->_createHeader('Content-Disposition', 'attachment', - array('filename'=>'foo.txt'), false - ); - $this->_checking(Expectations::create() - -> one($disposition)->setParameter('filename', 'file.ext') - -> ignoring($disposition) - ); - $attachment = $this->_createAttachment($this->_createHeaderSet(array( - 'Content-Disposition' => $disposition)), - $this->_createEncoder(), $this->_createCache() - ); - $attachment->setFile($file); - } - - public function testContentTypeCanBeSetViaSetFile() - { - $file = $this->_createFileStream('/bar/file.ext', ''); - $disposition = $this->_createHeader('Content-Disposition', 'attachment', - array('filename'=>'foo.txt'), false - ); - $ctype = $this->_createHeader('Content-Type', 'text/plain', array(), false); - $headers = $this->_createHeaderSet(array( - 'Content-Disposition' => $disposition, - 'Content-Type' => $ctype - )); - $this->_checking(Expectations::create() - -> one($disposition)->setParameter('filename', 'file.ext') - -> one($ctype)->setFieldBodyModel('text/html') - -> ignoring($disposition) - -> ignoring($ctype) - ); - $attachment = $this->_createAttachment($headers, $this->_createEncoder(), - $this->_createCache() - ); - $attachment->setFile($file, 'text/html'); - } - - public function XtestContentTypeCanBeLookedUpFromCommonListIfNotProvided() - { - $file = $this->_createFileStream('/bar/file.zip', ''); - $disposition = $this->_createHeader('Content-Disposition', 'attachment', - array('filename'=>'foo.zip'), false - ); - $ctype = $this->_createHeader('Content-Type', 'text/plain', array(), false); - $headers = $this->_createHeaderSet(array( - 'Content-Disposition' => $disposition, - 'Content-Type' => $ctype - )); - $this->_checking(Expectations::create() - -> one($disposition)->setParameter('filename', 'file.zip') - -> one($ctype)->setFieldBodyModel('application/zip') - -> ignoring($disposition) - -> ignoring($ctype) - ); - $attachment = $this->_createAttachment($headers, $this->_createEncoder(), - $this->_createCache(), array('zip'=>'application/zip', 'txt'=>'text/plain') - ); - $attachment->setFile($file); - } - - public function testDataCanBeReadFromFile() - { - $file = $this->_createFileStream('/foo/file.ext', ''); - $attachment = $this->_createAttachment($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $attachment->setFile($file); - $this->assertEqual('', $attachment->getBody()); - } - - public function testFluidInterface() - { - $attachment = $this->_createAttachment($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertSame($attachment, - $attachment - ->setContentType('application/pdf') - ->setEncoder($this->_createEncoder()) - ->setId('foo@bar') - ->setDescription('my pdf') - ->setMaxLineLength(998) - ->setBody('xx') - ->setBoundary('xyz') - ->setChildren(array()) - ->setDisposition('inline') - ->setFilename('afile.txt') - ->setSize(123) - ->setFile($this->_createFileStream('foo.txt', '')) - ); - } - - // -- Private helpers - - protected function _createEntity($headers, $encoder, $cache) - { - return $this->_createAttachment($headers, $encoder, $cache); - } - - protected function _createAttachment($headers, $encoder, $cache, - $mimeTypes = array()) - { - return new Swift_Mime_Attachment($headers, $encoder, $cache, new Swift_Mime_Grammar(), $mimeTypes); - } - - protected function _createFileStream($path, $data, $stub = true) - { - $file = $this->_mock('Swift_FileStream'); - $pos = $this->_mockery()->states('position')->startsAs('at start'); - $this->_checking(Expectations::create() - -> ignoring($file)->getPath() -> returns($path) - -> ignoring($file)->read(optional()) -> returns($data) - -> when($pos->isNot('at end')) -> then($pos->is('at end')) - -> ignoring($file)->read(optional()) -> returns(false) - ); - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($file) - ); - } - - return $file; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/Base64ContentEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/Base64ContentEncoderTest.php deleted file mode 100644 index 2f02765b..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/Base64ContentEncoderTest.php +++ /dev/null @@ -1,295 +0,0 @@ -getArguments(); - $this->content .= current($args); - } - public function describeTo(Yay_Description $description) - { - $description->appendText(' gathers input;'); - } -} - -class Swift_Mime_ContentEncoder_Base64ContentEncoderTest - extends Swift_Tests_SwiftUnitTestCase -{ - private $_encoder; - - public function setUp() - { - $this->_encoder = new Swift_Mime_ContentEncoder_Base64ContentEncoder(); - } - - public function testNameIsBase64() - { - $this->assertEqual('base64', $this->_encoder->getName()); - } - - /* - There's really no point in testing the entire base64 encoding to the - level QP encoding has been tested. base64_encode() has been in PHP for - years. - */ - - public function testInputOutputRatioIs3to4Bytes() - { - /* - RFC 2045, 6.8 - - The encoding process represents 24-bit groups of input bits as output - strings of 4 encoded characters. Proceeding from left to right, a - 24-bit input group is formed by concatenating 3 8bit input groups. - These 24 bits are then treated as 4 concatenated 6-bit groups, each - of which is translated into a single digit in the base64 alphabet. - */ - - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns('123') - -> allowing($os)->read(optional()) -> returns(false) - - -> ignoring($os) - ); - - $this->_encoder->encodeByteStream($os, $is); - $this->assertEqual('MTIz', $collection->content); - } - - public function testPadLength() - { - /* - RFC 2045, 6.8 - - Special processing is performed if fewer than 24 bits are available - at the end of the data being encoded. A full encoding quantum is - always completed at the end of a body. When fewer than 24 input bits - are available in an input group, zero bits are added (on the right) - to form an integral number of 6-bit groups. Padding at the end of - the data is performed using the "=" character. Since all base64 - input is an integral number of octets, only the following cases can - arise: (1) the final quantum of encoding input is an integral - multiple of 24 bits; here, the final unit of encoded output will be - an integral multiple of 4 characters with no "=" padding, (2) the - final quantum of encoding input is exactly 8 bits; here, the final - unit of encoded output will be two characters followed by two "=" - padding characters, or (3) the final quantum of encoding input is - exactly 16 bits; here, the final unit of encoded output will be three - characters followed by one "=" padding character. - */ - - for ($i = 0; $i < 30; ++$i) { - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns(pack('C', rand(0, 255))) - -> allowing($os)->read(optional()) -> returns(false) - -> ignoring($os) - ); - - $this->_encoder->encodeByteStream($os, $is); - $this->assertPattern('~^[a-zA-Z0-9/\+]{2}==$~', $collection->content, - '%s: A single byte should have 2 bytes of padding' - ); - } - - for ($i = 0; $i < 30; ++$i) { - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns(pack('C*', rand(0, 255), rand(0, 255))) - -> allowing($os)->read(optional()) -> returns(false) - -> ignoring($os) - ); - - $this->_encoder->encodeByteStream($os, $is); - $this->assertPattern('~^[a-zA-Z0-9/\+]{3}=$~', $collection->content, - '%s: Two bytes should have 1 byte of padding' - ); - } - - for ($i = 0; $i < 30; ++$i) { - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns(pack('C*', rand(0, 255), rand(0, 255), rand(0, 255))) - -> allowing($os)->read(optional()) -> returns(false) - -> ignoring($os) - ); - - $this->_encoder->encodeByteStream($os, $is); - $this->assertPattern('~^[a-zA-Z0-9/\+]{4}$~', $collection->content, - '%s: Three bytes should have no padding' - ); - } - } - - public function testMaximumLineLengthIs76Characters() - { - /* - The encoded output stream must be represented in lines of no more - than 76 characters each. All line breaks or other characters not - found in Table 1 must be ignored by decoding software. - */ - - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns('abcdefghijkl') //12 - -> one($os)->read(optional()) -> returns('mnopqrstuvwx') //24 - -> one($os)->read(optional()) -> returns('yzabc1234567') //36 - -> one($os)->read(optional()) -> returns('890ABCDEFGHI') //48 - -> one($os)->read(optional()) -> returns('JKLMNOPQRSTU') //60 - -> one($os)->read(optional()) -> returns('VWXYZ1234567') //72 - -> one($os)->read(optional()) -> returns('abcdefghijkl') //84 - -> allowing($os)->read(optional()) -> returns(false) - -> ignoring($os) - ); - - $this->_encoder->encodeByteStream($os, $is); - $this->assertEqual( - "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXphYmMxMjM0NTY3ODkwQUJDREVGR0hJSktMTU5PUFFS\r\n" . - "U1RVVldYWVoxMjM0NTY3YWJjZGVmZ2hpamts", - $collection->content - ); - } - - public function testMaximumLineLengthCanBeDifferent() - { - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns('abcdefghijkl') //12 - -> one($os)->read(optional()) -> returns('mnopqrstuvwx') //24 - -> one($os)->read(optional()) -> returns('yzabc1234567') //36 - -> one($os)->read(optional()) -> returns('890ABCDEFGHI') //48 - -> one($os)->read(optional()) -> returns('JKLMNOPQRSTU') //60 - -> one($os)->read(optional()) -> returns('VWXYZ1234567') //72 - -> one($os)->read(optional()) -> returns('abcdefghijkl') //84 - -> allowing($os)->read(optional()) -> returns(false) - -> ignoring($os) - ); - - $this->_encoder->encodeByteStream($os, $is, 0, 50); - $this->assertEqual( - "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXphYmMxMjM0NTY3OD\r\n" . - "kwQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVoxMjM0NTY3YWJj\r\n" . - "ZGVmZ2hpamts", - $collection->content - ); - } - - public function testMaximumLineLengthIsNeverMoreThan76Chars() - { - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns('abcdefghijkl') //12 - -> one($os)->read(optional()) -> returns('mnopqrstuvwx') //24 - -> one($os)->read(optional()) -> returns('yzabc1234567') //36 - -> one($os)->read(optional()) -> returns('890ABCDEFGHI') //48 - -> one($os)->read(optional()) -> returns('JKLMNOPQRSTU') //60 - -> one($os)->read(optional()) -> returns('VWXYZ1234567') //72 - -> one($os)->read(optional()) -> returns('abcdefghijkl') //84 - -> allowing($os)->read(optional()) -> returns(false) - -> ignoring($os) - ); - - $this->_encoder->encodeByteStream($os, $is, 0, 100); - $this->assertEqual( - "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXphYmMxMjM0NTY3ODkwQUJDREVGR0hJSktMTU5PUFFS\r\n" . - "U1RVVldYWVoxMjM0NTY3YWJjZGVmZ2hpamts", - $collection->content - ); - } - - public function testFirstLineLengthCanBeDifferent() - { - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns('abcdefghijkl') //12 - -> one($os)->read(optional()) -> returns('mnopqrstuvwx') //24 - -> one($os)->read(optional()) -> returns('yzabc1234567') //36 - -> one($os)->read(optional()) -> returns('890ABCDEFGHI') //48 - -> one($os)->read(optional()) -> returns('JKLMNOPQRSTU') //60 - -> one($os)->read(optional()) -> returns('VWXYZ1234567') //72 - -> one($os)->read(optional()) -> returns('abcdefghijkl') //84 - -> allowing($os)->read(optional()) -> returns(false) - -> ignoring($os) - ); - - $this->_encoder->encodeByteStream($os, $is, 19); - $this->assertEqual( - "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXphYmMxMjM0NTY3ODkwQUJDR\r\n" . - "EVGR0hJSktMTU5PUFFSU1RVVldYWVoxMjM0NTY3YWJjZGVmZ2hpamts", - $collection->content - ); - } - - // -- Private Methods - - private function _createOutputByteStream($stub = false) - { - return $stub - ? $this->_stub('Swift_OutputByteStream') - : $this->_mock('Swift_OutputByteStream') - ; - } - - private function _createInputByteStream($stub = false) - { - return $stub - ? $this->_stub('Swift_InputByteStream') - : $this->_mock('Swift_InputByteStream') - ; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/PlainContentEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/PlainContentEncoderTest.php deleted file mode 100644 index 5da1aa08..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/PlainContentEncoderTest.php +++ /dev/null @@ -1,277 +0,0 @@ -getArguments(); - $this->content .= current($args); - } - public function describeTo(Yay_Description $description) - { - $description->appendText(' gathers input;'); - } -} - -class Swift_Mime_ContentEncoder_PlainContentEncoderTest - extends Swift_Tests_SwiftUnitTestCase -{ - public function testNameCanBeSpecifiedInConstructor() - { - $encoder = $this->_getEncoder('7bit'); - $this->assertEqual('7bit', $encoder->getName()); - - $encoder = $this->_getEncoder('8bit'); - $this->assertEqual('8bit', $encoder->getName()); - } - - public function testNoOctetsAreModifiedInString() - { - $encoder = $this->_getEncoder('7bit'); - foreach (range(0x00, 0xFF) as $octet) { - $byte = pack('C', $octet); - $this->assertIdenticalBinary($byte, $encoder->encodeString($byte)); - } - } - - public function testNoOctetsAreModifiedInByteStream() - { - $encoder = $this->_getEncoder('7bit'); - foreach (range(0x00, 0xFF) as $octet) { - $byte = pack('C', $octet); - - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns($byte) - -> allowing($os)->read(optional()) -> returns(false) - - -> ignoring($os) - ); - - $encoder->encodeByteStream($os, $is); - $this->assertIdenticalBinary($byte, $collection->content); - } - } - - public function testLineLengthCanBeSpecified() - { - $encoder = $this->_getEncoder('7bit'); - - $chars = array(); - for ($i = 0; $i < 50; $i++) { - $chars[] = 'a'; - } - $input = implode(' ', $chars); //99 chars long - - $this->assertEqual( - 'a a a a a a a a a a a a a a a a a a a a a a a a a ' . "\r\n" . //50 * - 'a a a a a a a a a a a a a a a a a a a a a a a a a', //99 - $encoder->encodeString($input, 0, 50), - '%s: Lines should be wrapped at 50 chars' - ); - } - - public function testLineLengthCanBeSpecifiedInByteStream() - { - $encoder = $this->_getEncoder('7bit'); - - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - ); - - for ($i = 0; $i < 50; $i++) { - $this->_checking(Expectations::create() - -> one($os)->read(optional()) -> returns('a ') - ); - } - - $this->_checking(Expectations::create() - -> allowing($os)->read(optional()) -> returns(false) - ); - - $encoder->encodeByteStream($os, $is, 0, 50); - $this->assertEqual( - str_repeat('a ', 25) . "\r\n" . str_repeat('a ', 25), - $collection->content - ); - } - - public function testencodeStringGeneratesCorrectCrlf() - { - $encoder = $this->_getEncoder('7bit', true); - $this->assertEqual("a\r\nb", $encoder->encodeString("a\rb"), - '%s: Line endings should be standardized' - ); - $this->assertEqual("a\r\nb", $encoder->encodeString("a\nb"), - '%s: Line endings should be standardized' - ); - $this->assertEqual("a\r\n\r\nb", $encoder->encodeString("a\n\rb"), - '%s: Line endings should be standardized' - ); - $this->assertEqual("a\r\n\r\nb", $encoder->encodeString("a\r\rb"), - '%s: Line endings should be standardized' - ); - $this->assertEqual("a\r\n\r\nb", $encoder->encodeString("a\n\nb"), - '%s: Line endings should be standardized' - ); - } - - public function testCanonicEncodeByteStreamGeneratesCorrectCrlf_1() - { - $encoder = $this->_getEncoder('7bit', true); - - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns('a') - -> one($os)->read(optional()) -> returns("\r") - -> one($os)->read(optional()) -> returns('b') - -> allowing($os)->read(optional()) -> returns(false) - - -> ignoring($os) - ); - - $encoder->encodeByteStream($os, $is); - $this->assertEqual("a\r\nb", $collection->content); - } - - public function testCanonicEncodeByteStreamGeneratesCorrectCrlf_2() - { - $encoder = $this->_getEncoder('7bit', true); - - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns('a') - -> one($os)->read(optional()) -> returns("\n") - -> one($os)->read(optional()) -> returns('b') - -> allowing($os)->read(optional()) -> returns(false) - - -> ignoring($os) - ); - - $encoder->encodeByteStream($os, $is); - $this->assertEqual("a\r\nb", $collection->content); - } - - public function testCanonicEncodeByteStreamGeneratesCorrectCrlf_3() - { - $encoder = $this->_getEncoder('7bit', true); - - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns('a') - -> one($os)->read(optional()) -> returns("\n\r") - -> one($os)->read(optional()) -> returns('b') - -> allowing($os)->read(optional()) -> returns(false) - - -> ignoring($os) - ); - - $encoder->encodeByteStream($os, $is); - $this->assertEqual("a\r\n\r\nb", $collection->content); - } - - public function testCanonicEncodeByteStreamGeneratesCorrectCrlf_4() - { - $encoder = $this->_getEncoder('7bit', true); - - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns('a') - -> one($os)->read(optional()) -> returns("\n\n") - -> one($os)->read(optional()) -> returns('b') - -> allowing($os)->read(optional()) -> returns(false) - - -> ignoring($os) - ); - - $encoder->encodeByteStream($os, $is); - $this->assertEqual("a\r\n\r\nb", $collection->content); - } - - public function testCanonicEncodeByteStreamGeneratesCorrectCrlf_5() - { - $encoder = $this->_getEncoder('7bit', true); - - $os = $this->_createOutputByteStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> one($os)->read(optional()) -> returns('a') - -> one($os)->read(optional()) -> returns("\r\r") - -> one($os)->read(optional()) -> returns('b') - -> allowing($os)->read(optional()) -> returns(false) - - -> ignoring($os) - ); - - $encoder->encodeByteStream($os, $is); - $this->assertEqual("a\r\n\r\nb", $collection->content); - } - - // -- Private helpers - - private function _getEncoder($name, $canonical = false) - { - return new Swift_Mime_ContentEncoder_PlainContentEncoder($name, $canonical); - } - - private function _createOutputByteStream($stub = false) - { - return $stub - ? $this->_stub('Swift_OutputByteStream') - : $this->_mock('Swift_OutputByteStream') - ; - } - - private function _createInputByteStream($stub = false) - { - return $stub - ? $this->_stub('Swift_InputByteStream') - : $this->_mock('Swift_InputByteStream') - ; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/QpContentEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/QpContentEncoderTest.php deleted file mode 100644 index 0682f916..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/QpContentEncoderTest.php +++ /dev/null @@ -1,476 +0,0 @@ -getArguments(); - $this->content .= current($args); - } - public function describeTo(Yay_Description $description) - { - $description->appendText(' gathers input;'); - } -} - -class Swift_Mime_ContentEncoder_QpContentEncoderTest - extends Swift_Tests_SwiftUnitTestCase -{ - public function testNameIsQuotedPrintable() - { - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder( - $this->_createCharacterStream(true) - ); - $this->assertEqual('quoted-printable', $encoder->getName()); - } - - /* -- RFC 2045, 6.7 -- - (1) (General 8bit representation) Any octet, except a CR or - LF that is part of a CRLF line break of the canonical - (standard) form of the data being encoded, may be - represented by an "=" followed by a two digit - hexadecimal representation of the octet's value. The - digits of the hexadecimal alphabet, for this purpose, - are "0123456789ABCDEF". Uppercase letters must be - used; lowercase letters are not allowed. Thus, for - example, the decimal value 12 (US-ASCII form feed) can - be represented by "=0C", and the decimal value 61 (US- - ASCII EQUAL SIGN) can be represented by "=3D". This - rule must be followed except when the following rules - allow an alternative encoding. - */ - - public function testPermittedCharactersAreNotEncoded() - { - /* -- RFC 2045, 6.7 -- - (2) (Literal representation) Octets with decimal values of - 33 through 60 inclusive, and 62 through 126, inclusive, - MAY be represented as the US-ASCII characters which - correspond to those octets (EXCLAMATION POINT through - LESS THAN, and GREATER THAN through TILDE, - respectively). - */ - - foreach (array_merge(range(33, 60), range(62, 126)) as $ordinal) { - $char = chr($ordinal); - - $os = $this->_createOutputByteStream(true); - $charStream = $this->_createCharacterStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importByteStream($os) - -> one($charStream)->readBytes(any()) -> returns(array($ordinal)) - -> allowing($charStream)->readBytes(any()) -> returns(false) - - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> ignoring($os) - ); - - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - $encoder->encodeByteStream($os, $is); - $this->assertIdenticalBinary($char, $collection->content); - } - } - - public function testLinearWhiteSpaceAtLineEndingIsEncoded() - { - /* -- RFC 2045, 6.7 -- - (3) (White Space) Octets with values of 9 and 32 MAY be - represented as US-ASCII TAB (HT) and SPACE characters, - respectively, but MUST NOT be so represented at the end - of an encoded line. Any TAB (HT) or SPACE characters - on an encoded line MUST thus be followed on that line - by a printable character. In particular, an "=" at the - end of an encoded line, indicating a soft line break - (see rule #5) may follow one or more TAB (HT) or SPACE - characters. It follows that an octet with decimal - value 9 or 32 appearing at the end of an encoded line - must be represented according to Rule #1. This rule is - necessary because some MTAs (Message Transport Agents, - programs which transport messages from one user to - another, or perform a portion of such transfers) are - known to pad lines of text with SPACEs, and others are - known to remove "white space" characters from the end - of a line. Therefore, when decoding a Quoted-Printable - body, any trailing white space on a line must be - deleted, as it will necessarily have been added by - intermediate transport agents. - */ - - $HT = chr(0x09); //9 - $SPACE = chr(0x20); //32 - - //HT - $os = $this->_createOutputByteStream(true); - $charStream = $this->_createCharacterStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importByteStream($os) - -> one($charStream)->readBytes(any()) -> returns(array(ord('a'))) - -> one($charStream)->readBytes(any()) -> returns(array(0x09)) - -> one($charStream)->readBytes(any()) -> returns(array(0x09)) - -> one($charStream)->readBytes(any()) -> returns(array(0x0D)) - -> one($charStream)->readBytes(any()) -> returns(array(0x0A)) - -> one($charStream)->readBytes(any()) -> returns(array(ord('b'))) - -> allowing($charStream)->readBytes(any()) -> returns(false) - - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> ignoring($os) - ); - - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - $encoder->encodeByteStream($os, $is); - - $this->assertEqual("a\t=09\r\nb", $collection->content); - - //SPACE - $os = $this->_createOutputByteStream(true); - $charStream = $this->_createCharacterStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importByteStream($os) - -> one($charStream)->readBytes(any()) -> returns(array(ord('a'))) - -> one($charStream)->readBytes(any()) -> returns(array(0x20)) - -> one($charStream)->readBytes(any()) -> returns(array(0x20)) - -> one($charStream)->readBytes(any()) -> returns(array(0x0D)) - -> one($charStream)->readBytes(any()) -> returns(array(0x0A)) - -> one($charStream)->readBytes(any()) -> returns(array(ord('b'))) - -> allowing($charStream)->readBytes(any()) -> returns(false) - - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> ignoring($os) - ); - - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - $encoder->encodeByteStream($os, $is); - - $this->assertEqual("a =20\r\nb", $collection->content); - } - - public function testCRLFIsLeftAlone() - { - /* - (4) (Line Breaks) A line break in a text body, represented - as a CRLF sequence in the text canonical form, must be - represented by a (RFC 822) line break, which is also a - CRLF sequence, in the Quoted-Printable encoding. Since - the canonical representation of media types other than - text do not generally include the representation of - line breaks as CRLF sequences, no hard line breaks - (i.e. line breaks that are intended to be meaningful - and to be displayed to the user) can occur in the - quoted-printable encoding of such types. Sequences - like "=0D", "=0A", "=0A=0D" and "=0D=0A" will routinely - appear in non-text data represented in quoted- - printable, of course. - - Note that many implementations may elect to encode the - local representation of various content types directly - rather than converting to canonical form first, - encoding, and then converting back to local - representation. In particular, this may apply to plain - text material on systems that use newline conventions - other than a CRLF terminator sequence. Such an - implementation optimization is permissible, but only - when the combined canonicalization-encoding step is - equivalent to performing the three steps separately. - */ - - $os = $this->_createOutputByteStream(true); - $charStream = $this->_createCharacterStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importByteStream($os) - -> one($charStream)->readBytes(any()) -> returns(array(ord('a'))) - -> one($charStream)->readBytes(any()) -> returns(array(0x0D)) - -> one($charStream)->readBytes(any()) -> returns(array(0x0A)) - -> one($charStream)->readBytes(any()) -> returns(array(ord('b'))) - -> one($charStream)->readBytes(any()) -> returns(array(0x0D)) - -> one($charStream)->readBytes(any()) -> returns(array(0x0A)) - -> one($charStream)->readBytes(any()) -> returns(array(ord('c'))) - -> one($charStream)->readBytes(any()) -> returns(array(0x0D)) - -> one($charStream)->readBytes(any()) -> returns(array(0x0A)) - -> allowing($charStream)->readBytes(any()) -> returns(false) - - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> ignoring($os) - ); - - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - $encoder->encodeByteStream($os, $is); - $this->assertEqual("a\r\nb\r\nc\r\n", $collection->content); - } - - public function testLinesLongerThan76CharactersAreSoftBroken() - { - /* - (5) (Soft Line Breaks) The Quoted-Printable encoding - REQUIRES that encoded lines be no more than 76 - characters long. If longer lines are to be encoded - with the Quoted-Printable encoding, "soft" line breaks - must be used. An equal sign as the last character on a - encoded line indicates such a non-significant ("soft") - line break in the encoded text. - */ - - $os = $this->_createOutputByteStream(true); - $charStream = $this->_createCharacterStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importByteStream($os) - - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> ignoring($os) - ); - - for ($seq = 0; $seq <= 140; ++$seq) { - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(array(ord('a'))) - ); - } - $this->_checking(Expectations::create() - -> allowing($charStream)->readBytes(any()) -> returns(false) - ); - - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - $encoder->encodeByteStream($os, $is); - $this->assertEqual(str_repeat('a', 75) . "=\r\n" . str_repeat('a', 66), $collection->content); - } - - public function testMaxLineLengthCanBeSpecified() - { - $os = $this->_createOutputByteStream(true); - $charStream = $this->_createCharacterStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importByteStream($os) - - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> ignoring($os) - ); - - - for ($seq = 0; $seq <= 100; ++$seq) { - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(array(ord('a'))) - ); - } - - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(false) - ); - - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - $encoder->encodeByteStream($os, $is, 0, 54); - $this->assertEqual(str_repeat('a', 53) . "=\r\n" . str_repeat('a', 48), $collection->content); - } - - public function testBytesBelowPermittedRangeAreEncoded() - { - /* - According to Rule (1 & 2) - */ - - foreach (range(0, 32) as $ordinal) { - $char = chr($ordinal); - - $os = $this->_createOutputByteStream(true); - $charStream = $this->_createCharacterStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importByteStream($os) - - -> one($charStream)->readBytes(any()) -> returns(array($ordinal)) - -> allowing($charStream)->readBytes(any()) -> returns(false) - - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> ignoring($os) - ); - - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - $encoder->encodeByteStream($os, $is); - $this->assertEqual(sprintf('=%02X', $ordinal), $collection->content); - } - } - - public function testDecimalByte61IsEncoded() - { - /* - According to Rule (1 & 2) - */ - - $char = chr(61); - - $os = $this->_createOutputByteStream(true); - $charStream = $this->_createCharacterStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importByteStream($os) - - -> one($charStream)->readBytes(any()) -> returns(array(61)) - -> allowing($charStream)->readBytes(any()) -> returns(false) - - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> ignoring($os) - ); - - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - $encoder->encodeByteStream($os, $is); - $this->assertEqual(sprintf('=%02X', 61), $collection->content); - } - - public function testBytesAbovePermittedRangeAreEncoded() - { - /* - According to Rule (1 & 2) - */ - - foreach (range(127, 255) as $ordinal) { - $char = chr($ordinal); - - $os = $this->_createOutputByteStream(true); - $charStream = $this->_createCharacterStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importByteStream($os) - - -> one($charStream)->readBytes(any()) -> returns(array($ordinal)) - -> allowing($charStream)->readBytes(any()) -> returns(false) - - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> ignoring($os) - ); - - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - $encoder->encodeByteStream($os, $is); - $this->assertEqual(sprintf('=%02X', $ordinal), $collection->content); - } - } - - public function testFirstLineLengthCanBeDifferent() - { - $os = $this->_createOutputByteStream(true); - $charStream = $this->_createCharacterStream(); - $is = $this->_createInputByteStream(); - $collection = new Swift_StreamCollector(); - - $this->_checking(Expectations::create() - -> one($charStream)->flushContents() - -> one($charStream)->importByteStream($os) - - -> allowing($is)->write(any(), optional()) -> will($collection) - -> ignoring($is) - - -> ignoring($os) - ); - - for ($seq = 0; $seq <= 140; ++$seq) { - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(array(ord('a'))) - ); - } - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(false) - ); - - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($charStream); - $encoder->encodeByteStream($os, $is, 22); - $this->assertEqual( - str_repeat('a', 53) . "=\r\n" . str_repeat('a', 75) . "=\r\n" . str_repeat('a', 13), - $collection->content - ); - } - - public function testObserverInterfaceCanChangeCharset() - { - $stream = $this->_createCharacterStream(); - $this->_checking(Expectations::create() - -> one($stream)->setCharacterSet('windows-1252') - -> ignoring($stream) - ); - $encoder = new Swift_Mime_ContentEncoder_QpContentEncoder($stream); - $encoder->charsetChanged('windows-1252'); - } - - // -- Creation Methods - - private function _createCharacterStream($stub = false) - { - return $stub - ? $this->_stub('Swift_CharacterStream') - : $this->_mock('Swift_CharacterStream') - ; - } - - private function _createEncoder($charStream) - { - return new Swift_Mime_HeaderEncoder_QpHeaderEncoder($charStream); - } - - private function _createOutputByteStream($stub = false) - { - return $stub - ? $this->_stub('Swift_OutputByteStream') - : $this->_mock('Swift_OutputByteStream') - ; - } - - private function _createInputByteStream($stub = false) - { - return $stub - ? $this->_stub('Swift_InputByteStream') - : $this->_mock('Swift_InputByteStream') - ; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/EmbeddedFileTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/EmbeddedFileTest.php deleted file mode 100644 index 4b5c711b..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/EmbeddedFileTest.php +++ /dev/null @@ -1,63 +0,0 @@ -_createEmbeddedFile($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual( - Swift_Mime_MimeEntity::LEVEL_RELATED, $file->getNestingLevel() - ); - } - - public function testIdIsAutoGenerated() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addIdHeader('Content-ID', pattern('/^.*?@.*?$/D')) - -> ignoring($headers) - ); - $file = $this->_createEmbeddedFile($headers, $this->_createEncoder(), - $this->_createCache() - ); - } - - public function testDefaultDispositionIsAttachment() - { //Overridden - } - - public function testDefaultDispositionIsInline() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addParameterizedHeader('Content-Disposition', 'inline') - -> ignoring($headers) - ); - $file = $this->_createEmbeddedFile($headers, $this->_createEncoder(), - $this->_createCache() - ); - } - - // -- Private helpers - - protected function _createAttachment($headers, $encoder, $cache, - $mimeTypes = array()) - { - return $this->_createEmbeddedFile($headers, $encoder, $cache, $mimeTypes); - } - - private function _createEmbeddedFile($headers, $encoder, $cache) - { - return new Swift_Mime_EmbeddedFile($headers, $encoder, $cache, new Swift_Mime_Grammar()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/Base64HeaderEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/Base64HeaderEncoderTest.php deleted file mode 100644 index 780d3534..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/Base64HeaderEncoderTest.php +++ /dev/null @@ -1,15 +0,0 @@ -assertEqual('B', $encoder->getName()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/QpHeaderEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/QpHeaderEncoderTest.php deleted file mode 100644 index 0b61c1ce..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/QpHeaderEncoderTest.php +++ /dev/null @@ -1,222 +0,0 @@ -_createEncoder( - $this->_createCharacterStream(true) - ); - $this->assertEqual('Q', $encoder->getName()); - } - - public function testSpaceAndTabNeverAppear() - { - /* -- RFC 2047, 4. - Only a subset of the printable ASCII characters may be used in - 'encoded-text'. Space and tab characters are not allowed, so that - the beginning and end of an 'encoded-word' are obvious. - */ - - $charStream = $this->_createCharacterStream(); - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(array(ord('a'))) - -> one($charStream)->readBytes(any()) -> returns(array(0x20)) - -> one($charStream)->readBytes(any()) -> returns(array(0x09)) - -> one($charStream)->readBytes(any()) -> returns(array(0x20)) - -> one($charStream)->readBytes(any()) -> returns(array(ord('b'))) - -> allowing($charStream)->readBytes(any()) -> returns(false) - -> ignoring($charStream) - ); - - $encoder = $this->_createEncoder($charStream); - $this->assertNoPattern('~[ \t]~', $encoder->encodeString("a \t b"), - '%s: encoded-words in headers cannot contain LWSP as per RFC 2047.' - ); - } - - public function testSpaceIsRepresentedByUnderscore() - { - /* -- RFC 2047, 4.2. - (2) The 8-bit hexadecimal value 20 (e.g., ISO-8859-1 SPACE) may be - represented as "_" (underscore, ASCII 95.). (This character may - not pass through some internetwork mail gateways, but its use - will greatly enhance readability of "Q" encoded data with mail - readers that do not support this encoding.) Note that the "_" - always represents hexadecimal 20, even if the SPACE character - occupies a different code position in the character set in use. - */ - $charStream = $this->_createCharacterStream(); - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(array(ord('a'))) - -> one($charStream)->readBytes(any()) -> returns(array(0x20)) - -> one($charStream)->readBytes(any()) -> returns(array(ord('b'))) - -> allowing($charStream)->readBytes(any()) -> returns(false) - -> ignoring($charStream) - ); - - $encoder = $this->_createEncoder($charStream); - $this->assertEqual('a_b', $encoder->encodeString('a b'), - '%s: Spaces can be represented by more readable underscores as per RFC 2047.' - ); - } - - public function testEqualsAndQuestionAndUnderscoreAreEncoded() - { - /* -- RFC 2047, 4.2. - (3) 8-bit values which correspond to printable ASCII characters other - than "=", "?", and "_" (underscore), MAY be represented as those - characters. (But see section 5 for restrictions.) In - particular, SPACE and TAB MUST NOT be represented as themselves - within encoded words. - */ - $charStream = $this->_createCharacterStream(); - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(array(ord('='))) - -> one($charStream)->readBytes(any()) -> returns(array(ord('?'))) - -> one($charStream)->readBytes(any()) -> returns(array(ord('_'))) - -> allowing($charStream)->readBytes(any()) -> returns(false) - -> ignoring($charStream) - ); - - $encoder = $this->_createEncoder($charStream); - $this->assertEqual('=3D=3F=5F', $encoder->encodeString('=?_'), - '%s: Chars =, ? and _ (underscore) may not appear as per RFC 2047.' - ); - } - - public function testParensAndQuotesAreEncoded() - { - /* -- RFC 2047, 5 (2). - A "Q"-encoded 'encoded-word' which appears in a 'comment' MUST NOT - contain the characters "(", ")" or " - */ - - $charStream = $this->_createCharacterStream(); - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(array(ord('('))) - -> one($charStream)->readBytes(any()) -> returns(array(ord('"'))) - -> one($charStream)->readBytes(any()) -> returns(array(ord(')'))) - -> allowing($charStream)->readBytes(any()) -> returns(false) - -> ignoring($charStream) - ); - - $encoder = $this->_createEncoder($charStream); - $this->assertEqual('=28=22=29', $encoder->encodeString('(")'), - '%s: Chars (, " (DQUOTE) and ) may not appear as per RFC 2047.' - ); - } - - public function testOnlyCharactersAllowedInPhrasesAreUsed() - { - /* -- RFC 2047, 5. - (3) As a replacement for a 'word' entity within a 'phrase', for example, - one that precedes an address in a From, To, or Cc header. The ABNF - definition for 'phrase' from RFC 822 thus becomes: - - phrase = 1*( encoded-word / word ) - - In this case the set of characters that may be used in a "Q"-encoded - 'encoded-word' is restricted to: . An 'encoded-word' that appears within a - 'phrase' MUST be separated from any adjacent 'word', 'text' or - 'special' by 'linear-white-space'. - */ - - $allowedBytes = array_merge( - range(ord('a'), ord('z')), range(ord('A'), ord('Z')), - range(ord('0'), ord('9')), - array(ord('!'), ord('*'), ord('+'), ord('-'), ord('/')) - ); - - foreach (range(0x00, 0xFF) as $byte) { - $char = pack('C', $byte); - - $charStream = $this->_createCharacterStream(); - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(array($byte)) - -> allowing($charStream)->readBytes(any()) -> returns(false) - -> ignoring($charStream) - ); - - $encoder = $this->_createEncoder($charStream); - $encodedChar = $encoder->encodeString($char); - - if (in_array($byte, $allowedBytes)) { - $this->assertEqual($char, $encodedChar, - '%s: Character ' . $char . ' should not be encoded.' - ); - } elseif (0x20 == $byte) //Special case - { - $this->assertEqual('_', $encodedChar, - '%s: Space character should be replaced.' - ); - } else { - $this->assertEqual(sprintf('=%02X', $byte), $encodedChar, - '%s: Byte ' . $byte . ' should be encoded.' - ); - } - } - } - - public function testEqualsNeverAppearsAtEndOfLine() - { - /* -- RFC 2047, 5 (3). - The 'encoded-text' in an 'encoded-word' must be self-contained; - 'encoded-text' MUST NOT be continued from one 'encoded-word' to - another. This implies that the 'encoded-text' portion of a "B" - 'encoded-word' will be a multiple of 4 characters long; for a "Q" - 'encoded-word', any "=" character that appears in the 'encoded-text' - portion will be followed by two hexadecimal characters. - */ - - $input = str_repeat('a', 140); - - $charStream = $this->_createCharacterStream(); - - $output = ''; - $seq = 0; - for (; $seq < 140; ++$seq) { - $this->_checking(Expectations::create() - -> one($charStream)->readBytes(any()) -> returns(array(ord('a'))) - ); - - if (75 == $seq) { - $output .= "\r\n"; // =\r\n - } - $output .= 'a'; - } - - $this->_checking(Expectations::create() - -> allowing($charStream)->readBytes(any()) -> returns(false) - -> ignoring($charStream) - ); - - $encoder = $this->_createEncoder($charStream); - $this->assertEqual($output, $encoder->encodeString($input)); - } - - // -- Creation Methods - - private function _createEncoder($charStream) - { - return new Swift_Mime_HeaderEncoder_QpHeaderEncoder($charStream); - } - - private function _createCharacterStream($stub = false) - { - return $stub - ? $this->_stub('Swift_CharacterStream') - : $this->_mock('Swift_CharacterStream') - ; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/DateHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/DateHeaderTest.php deleted file mode 100644 index 3fa3adf8..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/DateHeaderTest.php +++ /dev/null @@ -1,76 +0,0 @@ -_getHeader('Date'); - $this->assertEqual(Swift_Mime_Header::TYPE_DATE, $header->getFieldType()); - } - - public function testGetTimestamp() - { - $timestamp = time(); - $header = $this->_getHeader('Date'); - $header->setTimestamp($timestamp); - $this->assertIdentical($timestamp, $header->getTimestamp()); - } - - public function testTimestampCanBeSetBySetter() - { - $timestamp = time(); - $header = $this->_getHeader('Date'); - $header->setTimestamp($timestamp); - $this->assertIdentical($timestamp, $header->getTimestamp()); - } - - public function testIntegerTimestampIsConvertedToRfc2822Date() - { - $timestamp = time(); - $header = $this->_getHeader('Date'); - $header->setTimestamp($timestamp); - $this->assertEqual(date('r', $timestamp), $header->getFieldBody()); - } - - public function testSetBodyModel() - { - $timestamp = time(); - $header = $this->_getHeader('Date'); - $header->setFieldBodyModel($timestamp); - $this->assertEqual(date('r', $timestamp), $header->getFieldBody()); - } - - public function testGetBodyModel() - { - $timestamp = time(); - $header = $this->_getHeader('Date'); - $header->setTimestamp($timestamp); - $this->assertEqual($timestamp, $header->getFieldBodyModel()); - } - - public function testToString() - { - $timestamp = time(); - $header = $this->_getHeader('Date'); - $header->setTimestamp($timestamp); - $this->assertEqual('Date: ' . date('r', $timestamp) . "\r\n", - $header->toString() - ); - } - - // -- Private methods - - private function _getHeader($name) - { - return new Swift_Mime_Headers_DateHeader($name, new Swift_Mime_Grammar()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/IdentificationHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/IdentificationHeaderTest.php deleted file mode 100644 index bf4ae96d..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/IdentificationHeaderTest.php +++ /dev/null @@ -1,199 +0,0 @@ -_getHeader('Message-ID'); - $this->assertEqual(Swift_Mime_Header::TYPE_ID, $header->getFieldType()); - } - - public function testValueMatchesMsgIdSpec() - { - /* -- RFC 2822, 3.6.4. - message-id = "Message-ID:" msg-id CRLF - - in-reply-to = "In-Reply-To:" 1*msg-id CRLF - - references = "References:" 1*msg-id CRLF - - msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS] - - id-left = dot-atom-text / no-fold-quote / obs-id-left - - id-right = dot-atom-text / no-fold-literal / obs-id-right - - no-fold-quote = DQUOTE *(qtext / quoted-pair) DQUOTE - - no-fold-literal = "[" *(dtext / quoted-pair) "]" - */ - - $header = $this->_getHeader('Message-ID'); - $header->setId('id-left@id-right'); - $this->assertEqual('', $header->getFieldBody()); - } - - public function testIdCanBeRetrievedVerbatim() - { - $header = $this->_getHeader('Message-ID'); - $header->setId('id-left@id-right'); - $this->assertEqual('id-left@id-right', $header->getId()); - } - - public function testMultipleIdsCanBeSet() - { - $header = $this->_getHeader('References'); - $header->setIds(array('a@b', 'x@y')); - $this->assertEqual(array('a@b', 'x@y'), $header->getIds()); - } - - public function testSettingMultipleIdsProducesAListValue() - { - /* -- RFC 2822, 3.6.4. - The "References:" and "In-Reply-To:" field each contain one or more - unique message identifiers, optionally separated by CFWS. - - .. SNIP .. - - in-reply-to = "In-Reply-To:" 1*msg-id CRLF - - references = "References:" 1*msg-id CRLF - */ - - $header = $this->_getHeader('References'); - $header->setIds(array('a@b', 'x@y')); - $this->assertEqual(' ', $header->getFieldBody()); - } - - public function testIdLeftCanBeQuoted() - { - /* -- RFC 2822, 3.6.4. - id-left = dot-atom-text / no-fold-quote / obs-id-left - */ - - $header = $this->_getHeader('References'); - $header->setId('"ab"@c'); - $this->assertEqual('"ab"@c', $header->getId()); - $this->assertEqual('<"ab"@c>', $header->getFieldBody()); - } - - public function testIdLeftCanContainAnglesAsQuotedPairs() - { - /* -- RFC 2822, 3.6.4. - no-fold-quote = DQUOTE *(qtext / quoted-pair) DQUOTE - */ - - $header = $this->_getHeader('References'); - $header->setId('"a\\<\\>b"@c'); - $this->assertEqual('"a\\<\\>b"@c', $header->getId()); - $this->assertEqual('<"a\\<\\>b"@c>', $header->getFieldBody()); - } - - public function testIdLeftCanBeDotAtom() - { - $header = $this->_getHeader('References'); - $header->setId('a.b+&%$.c@d'); - $this->assertEqual('a.b+&%$.c@d', $header->getId()); - $this->assertEqual('', $header->getFieldBody()); - } - - public function testInvalidIdLeftThrowsException() - { - try { - $header = $this->_getHeader('References'); - $header->setId('a b c@d'); - $this->fail( - 'Exception should be thrown since "a b c" is not valid id-left.' - ); - } catch (Exception $e) { - $this->pass(); - } - } - - public function testIdRightCanBeDotAtom() - { - /* -- RFC 2822, 3.6.4. - id-right = dot-atom-text / no-fold-literal / obs-id-right - */ - - $header = $this->_getHeader('References'); - $header->setId('a@b.c+&%$.d'); - $this->assertEqual('a@b.c+&%$.d', $header->getId()); - $this->assertEqual('', $header->getFieldBody()); - } - - public function testIdRightCanBeLiteral() - { - /* -- RFC 2822, 3.6.4. - no-fold-literal = "[" *(dtext / quoted-pair) "]" - */ - - $header = $this->_getHeader('References'); - $header->setId('a@[1.2.3.4]'); - $this->assertEqual('a@[1.2.3.4]', $header->getId()); - $this->assertEqual('', $header->getFieldBody()); - } - - public function testInvalidIdRightThrowsException() - { - try { - $header = $this->_getHeader('References'); - $header->setId('a@b c d'); - $this->fail( - 'Exception should be thrown since "b c d" is not valid id-right.' - ); - } catch (Exception $e) { - $this->pass(); - } - } - - public function testMissingAtSignThrowsException() - { - /* -- RFC 2822, 3.6.4. - msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS] - */ - - try { - $header = $this->_getHeader('References'); - $header->setId('abc'); - $this->fail( - 'Exception should be thrown since "abc" is does not contain @.' - ); - } catch (Exception $e) { - $this->pass(); - } - } - - public function testSetBodyModel() - { - $header = $this->_getHeader('Message-ID'); - $header->setFieldBodyModel('a@b'); - $this->assertEqual(array('a@b'), $header->getIds()); - } - - public function testGetBodyModel() - { - $header = $this->_getHeader('Message-ID'); - $header->setId('a@b'); - $this->assertEqual(array('a@b'), $header->getFieldBodyModel()); - } - - public function testStringValue() - { - $header = $this->_getHeader('References'); - $header->setIds(array('a@b', 'x@y')); - $this->assertEqual('References: ' . "\r\n", $header->toString()); - } - - // -- Private methods - - private function _getHeader($name) - { - return new Swift_Mime_Headers_IdentificationHeader($name, new Swift_Mime_Grammar()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/MailboxHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/MailboxHeaderTest.php deleted file mode 100644 index d8506d1f..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/MailboxHeaderTest.php +++ /dev/null @@ -1,340 +0,0 @@ -_getHeader('To', $this->_getEncoder('Q', true)); - $this->assertEqual(Swift_Mime_Header::TYPE_MAILBOX, $header->getFieldType()); - } - - public function testMailboxIsSetForAddress() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setAddresses('chris@swiftmailer.org'); - $this->assertEqual(array('chris@swiftmailer.org'), - $header->getNameAddressStrings() - ); - } - - public function testMailboxIsRenderedForNameAddress() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array('chris@swiftmailer.org' => 'Chris Corbyn')); - $this->assertEqual( - array('Chris Corbyn '), $header->getNameAddressStrings() - ); - } - - public function testAddressCanBeReturnedForAddress() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setAddresses('chris@swiftmailer.org'); - $this->assertEqual(array('chris@swiftmailer.org'), $header->getAddresses()); - } - - public function testAddressCanBeReturnedForNameAddress() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array('chris@swiftmailer.org' => 'Chris Corbyn')); - $this->assertEqual(array('chris@swiftmailer.org'), $header->getAddresses()); - } - - public function testQuotesInNameAreQuoted() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn, "DHE"' - )); - $this->assertEqual( - array('"Chris Corbyn, \"DHE\"" '), - $header->getNameAddressStrings() - ); - } - - public function testEscapeCharsInNameAreQuoted() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn, \\escaped\\' - )); - $this->assertEqual( - array('"Chris Corbyn, \\\\escaped\\\\" '), - $header->getNameAddressStrings() - ); - } - - public function testGetMailboxesReturnsNameValuePairs() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn, DHE' - )); - $this->assertEqual( - array('chris@swiftmailer.org' => 'Chris Corbyn, DHE'), $header->getNameAddresses() - ); - } - - public function testMultipleAddressesCanBeSetAndFetched() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setAddresses(array( - 'chris@swiftmailer.org', 'mark@swiftmailer.org' - )); - $this->assertEqual( - array('chris@swiftmailer.org', 'mark@swiftmailer.org'), - $header->getAddresses() - ); - } - - public function testMultipleAddressesAsMailboxes() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setAddresses(array( - 'chris@swiftmailer.org', 'mark@swiftmailer.org' - )); - $this->assertEqual( - array('chris@swiftmailer.org'=>null, 'mark@swiftmailer.org'=>null), - $header->getNameAddresses() - ); - } - - public function testMultipleAddressesAsMailboxStrings() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setAddresses(array( - 'chris@swiftmailer.org', 'mark@swiftmailer.org' - )); - $this->assertEqual( - array('chris@swiftmailer.org', 'mark@swiftmailer.org'), - $header->getNameAddressStrings() - ); - } - - public function testMultipleNamedMailboxesReturnsMultipleAddresses() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' => 'Mark Corbyn' - )); - $this->assertEqual( - array('chris@swiftmailer.org', 'mark@swiftmailer.org'), - $header->getAddresses() - ); - } - - public function testMultipleNamedMailboxesReturnsMultipleMailboxes() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' => 'Mark Corbyn' - )); - $this->assertEqual(array( - 'chris@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' => 'Mark Corbyn' - ), - $header->getNameAddresses() - ); - } - - public function testMultipleMailboxesProducesMultipleMailboxStrings() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' => 'Mark Corbyn' - )); - $this->assertEqual(array( - 'Chris Corbyn ', - 'Mark Corbyn ' - ), - $header->getNameAddressStrings() - ); - } - - public function testSetAddressesOverwritesAnyMailboxes() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' => 'Mark Corbyn' - )); - $this->assertEqual( - array('chris@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' => 'Mark Corbyn'), - $header->getNameAddresses() - ); - $this->assertEqual( - array('chris@swiftmailer.org', 'mark@swiftmailer.org'), - $header->getAddresses() - ); - - $header->setAddresses(array('chris@swiftmailer.org', 'mark@swiftmailer.org')); - - $this->assertEqual( - array('chris@swiftmailer.org' => null, 'mark@swiftmailer.org' => null), - $header->getNameAddresses() - ); - $this->assertEqual( - array('chris@swiftmailer.org', 'mark@swiftmailer.org'), - $header->getAddresses() - ); - } - - public function testNameIsEncodedIfNonAscii() - { - $name = 'C' . pack('C', 0x8F) . 'rbyn'; - - $encoder = $this->_getEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($name, any(), any()) -> returns('C=8Frbyn') - -> ignoring($encoder) - ); - - $header = $this->_getHeader('From', $encoder); - $header->setNameAddresses(array('chris@swiftmailer.org'=>'Chris ' . $name)); - - $addresses = $header->getNameAddressStrings(); - $this->assertEqual( - 'Chris =?' . $this->_charset . '?Q?C=8Frbyn?= ', - array_shift($addresses) - ); - } - - public function testEncodingLineLengthCalculations() - { - /* -- RFC 2047, 2. - An 'encoded-word' may not be more than 75 characters long, including - 'charset', 'encoding', 'encoded-text', and delimiters. - */ - - $name = 'C' . pack('C', 0x8F) . 'rbyn'; - - $encoder = $this->_getEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($name, 6, 63) -> returns('C=8Frbyn') - -> ignoring($encoder) - ); - - $header = $this->_getHeader('From', $encoder); - $header->setNameAddresses(array('chris@swiftmailer.org'=>'Chris ' . $name)); - - $header->getNameAddressStrings(); - } - - public function testGetValueReturnsMailboxStringValue() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn' - )); - $this->assertEqual( - 'Chris Corbyn ', $header->getFieldBody() - ); - } - - public function testGetValueReturnsMailboxStringValueForMultipleMailboxes() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' => 'Mark Corbyn' - )); - $this->assertEqual( - 'Chris Corbyn , Mark Corbyn ', - $header->getFieldBody() - ); - } - - public function testRemoveAddressesWithSingleValue() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' => 'Mark Corbyn' - )); - $header->removeAddresses('chris@swiftmailer.org'); - $this->assertEqual(array('mark@swiftmailer.org'), - $header->getAddresses() - ); - } - - public function testRemoveAddressesWithList() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' => 'Mark Corbyn' - )); - $header->removeAddresses( - array('chris@swiftmailer.org', 'mark@swiftmailer.org') - ); - $this->assertEqual(array(), $header->getAddresses()); - } - - public function testSetBodyModel() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setFieldBodyModel('chris@swiftmailer.org'); - $this->assertEqual(array('chris@swiftmailer.org'=>null), $header->getNameAddresses()); - } - - public function testGetBodyModel() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setAddresses(array('chris@swiftmailer.org')); - $this->assertEqual(array('chris@swiftmailer.org'=>null), $header->getFieldBodyModel()); - } - - public function testToString() - { - $header = $this->_getHeader('From', $this->_getEncoder('Q', true)); - $header->setNameAddresses(array( - 'chris@swiftmailer.org' => 'Chris Corbyn', - 'mark@swiftmailer.org' => 'Mark Corbyn' - )); - $this->assertEqual( - 'From: Chris Corbyn , ' . - 'Mark Corbyn ' . "\r\n", - $header->toString() - ); - } - - // -- Private methods - - private function _getHeader($name, $encoder) - { - $header = new Swift_Mime_Headers_MailboxHeader($name, $encoder, new Swift_Mime_Grammar()); - $header->setCharset($this->_charset); - - return $header; - } - - private function _getEncoder($type, $stub = false) - { - $encoder = $this->_mock('Swift_Mime_HeaderEncoder'); - $this->_checking(Expectations::create() - -> ignoring($encoder)->getName() -> returns($type) - ); - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($encoder) - ); - } - - return $encoder; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/ParameterizedHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/ParameterizedHeaderTest.php deleted file mode 100644 index 2783aea9..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/ParameterizedHeaderTest.php +++ /dev/null @@ -1,422 +0,0 @@ -_getHeader('Content-Type', - $this->_getHeaderEncoder('Q', true), $this->_getParameterEncoder(true) - ); - $this->assertEqual(Swift_Mime_Header::TYPE_PARAMETERIZED, $header->getFieldType()); - } - - public function testValueIsReturnedVerbatim() - { - $header = $this->_getHeader('Content-Type', - $this->_getHeaderEncoder('Q', true), $this->_getParameterEncoder(true) - ); - $header->setValue('text/plain'); - $this->assertEqual('text/plain', $header->getValue()); - } - - public function testParametersAreAppended() - { - /* -- RFC 2045, 5.1 - parameter := attribute "=" value - - attribute := token - ; Matching of attributes - ; is ALWAYS case-insensitive. - - value := token / quoted-string - - token := 1* - - tspecials := "(" / ")" / "<" / ">" / "@" / - "," / ";" / ":" / "\" / <"> - "/" / "[" / "]" / "?" / "=" - ; Must be in quoted-string, - ; to use within parameter values - */ - - $header = $this->_getHeader('Content-Type', - $this->_getHeaderEncoder('Q', true), $this->_getParameterEncoder(true) - ); - $header->setValue('text/plain'); - $header->setParameters(array('charset' => 'utf-8')); - $this->assertEqual('text/plain; charset=utf-8', $header->getFieldBody()); - } - - public function testSpaceInParamResultsInQuotedString() - { - $header = $this->_getHeader('Content-Disposition', - $this->_getHeaderEncoder('Q', true), $this->_getParameterEncoder(true) - ); - $header->setValue('attachment'); - $header->setParameters(array('filename' => 'my file.txt')); - $this->assertEqual('attachment; filename="my file.txt"', - $header->getFieldBody() - ); - } - - public function testLongParamsAreBrokenIntoMultipleAttributeStrings() - { - /* -- RFC 2231, 3. - The asterisk character ("*") followed - by a decimal count is employed to indicate that multiple parameters - are being used to encapsulate a single parameter value. The count - starts at 0 and increments by 1 for each subsequent section of the - parameter value. Decimal values are used and neither leading zeroes - nor gaps in the sequence are allowed. - - The original parameter value is recovered by concatenating the - various sections of the parameter, in order. For example, the - content-type field - - Content-Type: message/external-body; access-type=URL; - URL*0="ftp://"; - URL*1="cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar" - - is semantically identical to - - Content-Type: message/external-body; access-type=URL; - URL="ftp://cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar" - - Note that quotes around parameter values are part of the value - syntax; they are NOT part of the value itself. Furthermore, it is - explicitly permitted to have a mixture of quoted and unquoted - continuation fields. - */ - - $value = str_repeat('a', 180); - - $encoder = $this->_getParameterEncoder(); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($value, any(), 63) - -> returns(str_repeat('a', 63) . "\r\n" . - str_repeat('a', 63) . "\r\n" . str_repeat('a', 54)) - - -> ignoring($encoder) - ); - - $header = $this->_getHeader('Content-Disposition', - $this->_getHeaderEncoder('Q', true), $encoder - ); - $header->setValue('attachment'); - $header->setParameters(array('filename' => $value)); - $header->setMaxLineLength(78); - $this->assertEqual( - 'attachment; ' . - 'filename*0*=utf-8\'\'' . str_repeat('a', 63) . ";\r\n " . - 'filename*1*=' . str_repeat('a', 63) . ";\r\n " . - 'filename*2*=' . str_repeat('a', 54), - $header->getFieldBody() - ); - } - - public function testEncodedParamDataIncludesCharsetAndLanguage() - { - /* -- RFC 2231, 4. - Asterisks ("*") are reused to provide the indicator that language and - character set information is present and encoding is being used. A - single quote ("'") is used to delimit the character set and language - information at the beginning of the parameter value. Percent signs - ("%") are used as the encoding flag, which agrees with RFC 2047. - - Specifically, an asterisk at the end of a parameter name acts as an - indicator that character set and language information may appear at - the beginning of the parameter value. A single quote is used to - separate the character set, language, and actual value information in - the parameter value string, and an percent sign is used to flag - octets encoded in hexadecimal. For example: - - Content-Type: application/x-stuff; - title*=us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A - - Note that it is perfectly permissible to leave either the character - set or language field blank. Note also that the single quote - delimiters MUST be present even when one of the field values is - omitted. - */ - - $value = str_repeat('a', 20) . pack('C', 0x8F) . str_repeat('a', 10); - - $encoder = $this->_getParameterEncoder(); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($value, 12, 62) - -> returns(str_repeat('a', 20) . '%8F' . str_repeat('a', 10)) - - -> ignoring($encoder) - ); - - $header = $this->_getHeader('Content-Disposition', - $this->_getHeaderEncoder('Q', true), $encoder - ); - $header->setValue('attachment'); - $header->setParameters(array('filename' => $value)); - $header->setMaxLineLength(78); - $header->setLanguage($this->_lang); - $this->assertEqual( - 'attachment; filename*=' . $this->_charset . "'" . $this->_lang . "'" . - str_repeat('a', 20) . '%8F' . str_repeat('a', 10), - $header->getFieldBody() - ); - } - - public function testMultipleEncodedParamLinesAreFormattedCorrectly() - { - /* -- RFC 2231, 4.1. - Character set and language information may be combined with the - parameter continuation mechanism. For example: - - Content-Type: application/x-stuff - title*0*=us-ascii'en'This%20is%20even%20more%20 - title*1*=%2A%2A%2Afun%2A%2A%2A%20 - title*2="isn't it!" - - Note that: - - (1) Language and character set information only appear at - the beginning of a given parameter value. - - (2) Continuations do not provide a facility for using more - than one character set or language in the same - parameter value. - - (3) A value presented using multiple continuations may - contain a mixture of encoded and unencoded segments. - - (4) The first segment of a continuation MUST be encoded if - language and character set information are given. - - (5) If the first segment of a continued parameter value is - encoded the language and character set field delimiters - MUST be present even when the fields are left blank. - */ - - $value = str_repeat('a', 20) . pack('C', 0x8F) . str_repeat('a', 60); - - $encoder = $this->_getParameterEncoder(); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($value, 12, 62) - -> returns(str_repeat('a', 20) . '%8F' . str_repeat('a', 28) . "\r\n" . - str_repeat('a', 32)) - - -> ignoring($encoder) - ); - - $header = $this->_getHeader('Content-Disposition', - $this->_getHeaderEncoder('Q', true), $encoder - ); - $header->setValue('attachment'); - $header->setParameters(array('filename' => $value)); - $header->setMaxLineLength(78); - $header->setLanguage($this->_lang); - $this->assertEqual( - 'attachment; filename*0*=' . $this->_charset . "'" . $this->_lang . "'" . - str_repeat('a', 20) . '%8F' . str_repeat('a', 28) . ";\r\n " . - 'filename*1*=' . str_repeat('a', 32), - $header->getFieldBody() - ); - } - - public function testToString() - { - $header = $this->_getHeader('Content-Type', - $this->_getHeaderEncoder('Q', true), $this->_getParameterEncoder(true) - ); - $header->setValue('text/html'); - $header->setParameters(array('charset' => 'utf-8')); - $this->assertEqual('Content-Type: text/html; charset=utf-8' . "\r\n", - $header->toString() - ); - } - - public function testValueCanBeEncodedIfNonAscii() - { - $value = 'fo' . pack('C', 0x8F) .'bar'; - - $encoder = $this->_getHeaderEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($value, any(), any()) -> returns('fo=8Fbar') - -> ignoring($encoder) - ); - - $header = $this->_getHeader('X-Foo', $encoder, $this->_getParameterEncoder(true)); - $header->setValue($value); - $header->setParameters(array('lookslike' => 'foobar')); - $this->assertEqual('X-Foo: =?utf-8?Q?fo=8Fbar?=; lookslike=foobar' . "\r\n", - $header->toString() - ); - } - - public function testValueAndParamCanBeEncodedIfNonAscii() - { - $value = 'fo' . pack('C', 0x8F) .'bar'; - - $encoder = $this->_getHeaderEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($value, any(), any()) -> returns('fo=8Fbar') - -> ignoring($encoder) - ); - - $paramEncoder = $this->_getParameterEncoder(); - $this->_checking(Expectations::create() - -> one($paramEncoder)->encodeString($value, any(), any()) -> returns('fo%8Fbar') - -> ignoring($paramEncoder) - ); - - $header = $this->_getHeader('X-Foo', $encoder, $paramEncoder); - $header->setValue($value); - $header->setParameters(array('says' => $value)); - $this->assertEqual("X-Foo: =?utf-8?Q?fo=8Fbar?=; says*=utf-8''fo%8Fbar\r\n", - $header->toString() - ); - } - - public function testParamsAreEncodedWithEncodedWordsIfNoParamEncoderSet() - { - $value = 'fo' . pack('C', 0x8F) .'bar'; - - $encoder = $this->_getHeaderEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($value, any(), any()) -> returns('fo=8Fbar') - -> ignoring($encoder) - ); - - $header = $this->_getHeader('X-Foo', $encoder, null); - $header->setValue('bar'); - $header->setParameters(array('says' => $value)); - $this->assertEqual("X-Foo: bar; says=\"=?utf-8?Q?fo=8Fbar?=\"\r\n", - $header->toString() - ); - } - - public function testLanguageInformationAppearsInEncodedWords() - { - /* -- RFC 2231, 5. - 5. Language specification in Encoded Words - - RFC 2047 provides support for non-US-ASCII character sets in RFC 822 - message header comments, phrases, and any unstructured text field. - This is done by defining an encoded word construct which can appear - in any of these places. Given that these are fields intended for - display, it is sometimes necessary to associate language information - with encoded words as well as just the character set. This - specification extends the definition of an encoded word to allow the - inclusion of such information. This is simply done by suffixing the - character set specification with an asterisk followed by the language - tag. For example: - - From: =?US-ASCII*EN?Q?Keith_Moore?= - */ - - $value = 'fo' . pack('C', 0x8F) .'bar'; - - $encoder = $this->_getHeaderEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($value, any(), any()) -> returns('fo=8Fbar') - -> ignoring($encoder) - ); - - $paramEncoder = $this->_getParameterEncoder(); - $this->_checking(Expectations::create() - -> one($paramEncoder)->encodeString($value, any(), any()) -> returns('fo%8Fbar') - -> ignoring($paramEncoder) - ); - - $header = $this->_getHeader('X-Foo', $encoder, $paramEncoder); - $header->setLanguage('en'); - $header->setValue($value); - $header->setParameters(array('says' => $value)); - $this->assertEqual("X-Foo: =?utf-8*en?Q?fo=8Fbar?=; says*=utf-8'en'fo%8Fbar\r\n", - $header->toString() - ); - } - - public function testSetBodyModel() - { - $header = $this->_getHeader('Content-Type', - $this->_getHeaderEncoder('Q', true), $this->_getParameterEncoder(true) - ); - $header->setFieldBodyModel('text/html'); - $this->assertEqual('text/html', $header->getValue()); - } - - public function testGetBodyModel() - { - $header = $this->_getHeader('Content-Type', - $this->_getHeaderEncoder('Q', true), $this->_getParameterEncoder(true) - ); - $header->setValue('text/plain'); - $this->assertEqual('text/plain', $header->getFieldBodyModel()); - } - - public function testSetParameter() - { - $header = $this->_getHeader('Content-Type', - $this->_getHeaderEncoder('Q', true), $this->_getParameterEncoder(true) - ); - $header->setParameters(array('charset'=>'utf-8', 'delsp' => 'yes')); - $header->setParameter('delsp', 'no'); - $this->assertEqual(array('charset'=>'utf-8', 'delsp'=>'no'), - $header->getParameters() - ); - } - - public function testGetParameter() - { - $header = $this->_getHeader('Content-Type', - $this->_getHeaderEncoder('Q', true), $this->_getParameterEncoder(true) - ); - $header->setParameters(array('charset'=>'utf-8', 'delsp' => 'yes')); - $this->assertEqual('utf-8', $header->getParameter('charset')); - } - - // -- Private helper - - private function _getHeader($name, $encoder, $paramEncoder) - { - $header = new Swift_Mime_Headers_ParameterizedHeader($name, $encoder, - $paramEncoder, new Swift_Mime_Grammar() - ); - $header->setCharset($this->_charset); - - return $header; - } - - private function _getHeaderEncoder($type, $stub = false) - { - $encoder = $this->_mock('Swift_Mime_HeaderEncoder'); - $this->_checking(Expectations::create() - -> ignoring($encoder)->getName() -> returns($type) - ); - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($encoder) - ); - } - - return $encoder; - } - - private function _getParameterEncoder($stub = false) - { - if ($stub) { - return $this->_stub('Swift_Encoder'); - } else { - return $this->_mock('Swift_Encoder'); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/PathHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/PathHeaderTest.php deleted file mode 100644 index 256dd919..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/PathHeaderTest.php +++ /dev/null @@ -1,84 +0,0 @@ -_getHeader('Return-Path'); - $this->assertEqual(Swift_Mime_Header::TYPE_PATH, $header->getFieldType()); - } - - public function testSingleAddressCanBeSetAndFetched() - { - $header = $this->_getHeader('Return-Path'); - $header->setAddress('chris@swiftmailer.org'); - $this->assertEqual('chris@swiftmailer.org', $header->getAddress()); - } - - public function testAddressMustComplyWithRfc2822() - { - try { - $header = $this->_getHeader('Return-Path'); - $header->setAddress('chr is@swiftmailer.org'); - $this->fail('Address must be valid according to RFC 2822 addr-spec grammar.'); - } catch (Exception $e) { - $this->pass(); - } - } - - public function testValueIsAngleAddrWithValidAddress() - { - /* -- RFC 2822, 3.6.7. - - return = "Return-Path:" path CRLF - - path = ([CFWS] "<" ([CFWS] / addr-spec) ">" [CFWS]) / - obs-path - */ - - $header = $this->_getHeader('Return-Path'); - $header->setAddress('chris@swiftmailer.org'); - $this->assertEqual('', $header->getFieldBody()); - } - - public function testValueIsEmptyAngleBracketsIfEmptyAddressSet() - { - $header = $this->_getHeader('Return-Path'); - $header->setAddress(''); - $this->assertEqual('<>', $header->getFieldBody()); - } - - public function testSetBodyModel() - { - $header = $this->_getHeader('Return-Path'); - $header->setFieldBodyModel('foo@bar.tld'); - $this->assertEqual('foo@bar.tld', $header->getAddress()); - } - - public function testGetBodyModel() - { - $header = $this->_getHeader('Return-Path'); - $header->setAddress('foo@bar.tld'); - $this->assertEqual('foo@bar.tld', $header->getFieldBodyModel()); - } - - public function testToString() - { - $header = $this->_getHeader('Return-Path'); - $header->setAddress('chris@swiftmailer.org'); - $this->assertEqual('Return-Path: ' . "\r\n", - $header->toString() - ); - } - - // -- Private methods - - private function _getHeader($name) - { - return new Swift_Mime_Headers_PathHeader($name, new Swift_Mime_Grammar()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/UnstructuredHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/UnstructuredHeaderTest.php deleted file mode 100644 index f14519e7..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/UnstructuredHeaderTest.php +++ /dev/null @@ -1,366 +0,0 @@ -_getHeader('Subject', $this->_getEncoder('Q', true)); - $this->assertEqual(Swift_Mime_Header::TYPE_TEXT, $header->getFieldType()); - } - - public function testGetNameReturnsNameVerbatim() - { - $header = $this->_getHeader('Subject', $this->_getEncoder('Q', true)); - $this->assertEqual('Subject', $header->getFieldName()); - } - - public function testGetValueReturnsValueVerbatim() - { - $header = $this->_getHeader('Subject', $this->_getEncoder('Q', true)); - $header->setValue('Test'); - $this->assertEqual('Test', $header->getValue()); - } - - public function testBasicStructureIsKeyValuePair() - { - /* -- RFC 2822, 2.2 - Header fields are lines composed of a field name, followed by a colon - (":"), followed by a field body, and terminated by CRLF. - */ - $header = $this->_getHeader('Subject', $this->_getEncoder('Q', true)); - $header->setValue('Test'); - $this->assertEqual('Subject: Test' . "\r\n", $header->toString()); - } - - public function testLongHeadersAreFoldedAtWordBoundary() - { - /* -- RFC 2822, 2.2.3 - Each header field is logically a single line of characters comprising - the field name, the colon, and the field body. For convenience - however, and to deal with the 998/78 character limitations per line, - the field body portion of a header field can be split into a multiple - line representation; this is called "folding". The general rule is - that wherever this standard allows for folding white space (not - simply WSP characters), a CRLF may be inserted before any WSP. - */ - - $value = 'The quick brown fox jumped over the fence, he was a very very ' . - 'scary brown fox with a bushy tail'; - $header = $this->_getHeader('X-Custom-Header', - $this->_getEncoder('Q', true) - ); - $header->setValue($value); - $header->setMaxLineLength(78); //A safe [RFC 2822, 2.2.3] default - /* - X-Custom-Header: The quick brown fox jumped over the fence, he was a very very - scary brown fox with a bushy tail - */ - $this->assertEqual( - 'X-Custom-Header: The quick brown fox jumped over the fence, he was a' . - ' very very' . "\r\n" . //Folding - ' scary brown fox with a bushy tail' . "\r\n", - $header->toString(), '%s: The header should have been folded at 78th char' - ); - } - - public function testPrintableAsciiOnlyAppearsInHeaders() - { - /* -- RFC 2822, 2.2. - A field name MUST be composed of printable US-ASCII characters (i.e., - characters that have values between 33 and 126, inclusive), except - colon. A field body may be composed of any US-ASCII characters, - except for CR and LF. - */ - - $nonAsciiChar = pack('C', 0x8F); - $header = $this->_getHeader('X-Test', $this->_getEncoder('Q', true)); - $header->setValue($nonAsciiChar); - $this->assertPattern( - '~^[^:\x00-\x20\x80-\xFF]+: [^\x80-\xFF\r\n]+\r\n$~s', - $header->toString() - ); - } - - public function testEncodedWordsFollowGeneralStructure() - { - /* -- RFC 2047, 1. - Generally, an "encoded-word" is a sequence of printable ASCII - characters that begins with "=?", ends with "?=", and has two "?"s in - between. - */ - - $nonAsciiChar = pack('C', 0x8F); - $header = $this->_getHeader('X-Test', $this->_getEncoder('Q', true)); - $header->setValue($nonAsciiChar); - $this->assertPattern( - '~^X-Test: \=?.*?\?.*?\?.*?\?=\r\n$~s', - $header->toString() - ); - } - - public function testEncodedWordIncludesCharsetAndEncodingMethodAndText() - { - /* -- RFC 2047, 2. - An 'encoded-word' is defined by the following ABNF grammar. The - notation of RFC 822 is used, with the exception that white space - characters MUST NOT appear between components of an 'encoded-word'. - - encoded-word = "=?" charset "?" encoding "?" encoded-text "?=" - */ - - $nonAsciiChar = pack('C', 0x8F); - - $encoder = $this->_getEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($nonAsciiChar, any(), any()) -> returns('=8F') - -> ignoring($encoder) - ); - $header = $this->_getHeader('X-Test', $encoder); - $header->setValue($nonAsciiChar); - $this->assertEqual( - 'X-Test: =?' . $this->_charset . '?Q?=8F?=' . "\r\n", - $header->toString() - ); - } - - public function testEncodedWordsAreUsedToEncodedNonPrintableAscii() - { - //SPACE and TAB permitted - $nonPrintableBytes = array_merge( - range(0x00, 0x08), range(0x10, 0x19), array(0x7F) - ); - - foreach ($nonPrintableBytes as $byte) { - $char = pack('C', $byte); - $encodedChar = sprintf('=%02X', $byte); - - $encoder = $this->_getEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($char, any(), any()) -> returns($encodedChar) - -> ignoring($encoder) - ); - - $header = $this->_getHeader('X-A', $encoder); - $header->setValue($char); - - $this->assertEqual( - 'X-A: =?' . $this->_charset . '?Q?' . $encodedChar . '?=' . "\r\n", - $header->toString(), '%s: Non-printable ascii should be encoded' - ); - } - } - - public function testEncodedWordsAreUsedToEncode8BitOctets() - { - $_8BitBytes = range(0x80, 0xFF); - - foreach ($_8BitBytes as $byte) { - $char = pack('C', $byte); - $encodedChar = sprintf('=%02X', $byte); - - $encoder = $this->_getEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($char, any(), any()) -> returns($encodedChar) - -> ignoring($encoder) - ); - - $header = $this->_getHeader('X-A', $encoder); - $header->setValue($char); - - $this->assertEqual( - 'X-A: =?' . $this->_charset . '?Q?' . $encodedChar . '?=' . "\r\n", - $header->toString(), '%s: 8-bit octets should be encoded' - ); - } - } - - public function testEncodedWordsAreNoMoreThan75CharsPerLine() - { - /* -- RFC 2047, 2. - An 'encoded-word' may not be more than 75 characters long, including - 'charset', 'encoding', 'encoded-text', and delimiters. - - ... SNIP ... - - While there is no limit to the length of a multiple-line header - field, each line of a header field that contains one or more - 'encoded-word's is limited to 76 characters. - */ - - $nonAsciiChar = pack('C', 0x8F); - - $encoder = $this->_getEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($nonAsciiChar, 8, 63) -> returns('=8F') - -> ignoring($encoder) - ); - //Note that multi-line headers begin with LWSP which makes 75 + 1 = 76 - //Note also that =?utf-8?q??= is 12 chars which makes 75 - 12 = 63 - - //* X-Test: is 8 chars - $header = $this->_getHeader('X-Test', $encoder); - $header->setValue($nonAsciiChar); - - $this->assertEqual( - 'X-Test: =?' . $this->_charset . '?Q?=8F?=' . "\r\n", - $header->toString() - ); - } - - public function testFWSPIsUsedWhenEncoderReturnsMultipleLines() - { - /* --RFC 2047, 2. - If it is desirable to encode more text than will fit in an 'encoded-word' of - 75 characters, multiple 'encoded-word's (separated by CRLF SPACE) may - be used. - */ - - //Note the Mock does NOT return 8F encoded, the 8F merely triggers - // encoding for the sake of testing - $nonAsciiChar = pack('C', 0x8F); - - $encoder = $this->_getEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($nonAsciiChar, 8, 63) - -> returns('line_one_here' . "\r\n" . 'line_two_here') - -> ignoring($encoder) - ); - - //Note that multi-line headers begin with LWSP which makes 75 + 1 = 76 - //Note also that =?utf-8?q??= is 12 chars which makes 75 - 12 = 63 - - //* X-Test: is 8 chars - $header = $this->_getHeader('X-Test', $encoder); - $header->setValue($nonAsciiChar); - - $this->assertEqual( - 'X-Test: =?' . $this->_charset . '?Q?line_one_here?=' . "\r\n" . - ' =?' . $this->_charset . '?Q?line_two_here?=' . "\r\n", - $header->toString() - ); - } - - public function testAdjacentWordsAreEncodedTogether() - { - /* -- RFC 2047, 5 (1) - Ordinary ASCII text and 'encoded-word's may appear together in the - same header field. However, an 'encoded-word' that appears in a - header field defined as '*text' MUST be separated from any adjacent - 'encoded-word' or 'text' by 'linear-white-space'. - - -- RFC 2047, 2. - IMPORTANT: 'encoded-word's are designed to be recognized as 'atom's - by an RFC 822 parser. As a consequence, unencoded white space - characters (such as SPACE and HTAB) are FORBIDDEN within an - 'encoded-word'. - */ - - //It would be valid to encode all words needed, however it's probably - // easiest to encode the longest amount required at a time - - $word = 'w' . pack('C', 0x8F) . 'rd'; - $text = 'start ' . $word . ' ' . $word . ' then end ' . $word; - // 'start', ' word word', ' and end', ' word' - - $encoder = $this->_getEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($word . ' ' . $word, any(), any()) - -> returns('w=8Frd_w=8Frd') - -> one($encoder)->encodeString($word, any(), any()) -> returns('w=8Frd') - -> ignoring($encoder) - ); - - $header = $this->_getHeader('X-Test', $encoder); - $header->setValue($text); - - $headerString = $header->toString(); - - $this->assertEqual('X-Test: start =?' . $this->_charset . '?Q?' . - 'w=8Frd_w=8Frd?= then end =?' . $this->_charset . '?Q?'. - 'w=8Frd?=' . "\r\n", $headerString, - '%s: Adjacent encoded words should appear grouped with WSP encoded' - ); - } - - public function testLanguageInformationAppearsInEncodedWords() - { - /* -- RFC 2231, 5. - 5. Language specification in Encoded Words - - RFC 2047 provides support for non-US-ASCII character sets in RFC 822 - message header comments, phrases, and any unstructured text field. - This is done by defining an encoded word construct which can appear - in any of these places. Given that these are fields intended for - display, it is sometimes necessary to associate language information - with encoded words as well as just the character set. This - specification extends the definition of an encoded word to allow the - inclusion of such information. This is simply done by suffixing the - character set specification with an asterisk followed by the language - tag. For example: - - From: =?US-ASCII*EN?Q?Keith_Moore?= - */ - - $value = 'fo' . pack('C', 0x8F) . 'bar'; - - $encoder = $this->_getEncoder('Q'); - $this->_checking(Expectations::create() - -> one($encoder)->encodeString($value, any(), any()) -> returns('fo=8Fbar') - -> ignoring($encoder) - ); - - $header = $this->_getHeader('Subject', $encoder); - $header->setLanguage('en'); - $header->setValue($value); - $this->assertEqual("Subject: =?utf-8*en?Q?fo=8Fbar?=\r\n", - $header->toString() - ); - } - - public function testSetBodyModel() - { - $header = $this->_getHeader('Subject', $this->_getEncoder('Q', true)); - $header->setFieldBodyModel('test'); - $this->assertEqual('test', $header->getValue()); - } - - public function testGetBodyModel() - { - $header = $this->_getHeader('Subject', $this->_getEncoder('Q', true)); - $header->setValue('test'); - $this->assertEqual('test', $header->getFieldBodyModel()); - } - - // -- Private methods - - private function _getHeader($name, $encoder) - { - $header = new Swift_Mime_Headers_UnstructuredHeader($name, $encoder, new Swift_Mime_Grammar()); - $header->setCharset($this->_charset); - - return $header; - } - - private function _getEncoder($type, $stub = false) - { - $encoder = $this->_mock('Swift_Mime_HeaderEncoder'); - $this->_checking(Expectations::create() - -> ignoring($encoder)->getName() -> returns($type) - ); - if ($stub) { - $this->_checking(Expectations::create() - -> ignoring($encoder) - ); - } - - return $encoder; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/MimePartTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/MimePartTest.php deleted file mode 100644 index aadf7880..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/MimePartTest.php +++ /dev/null @@ -1,252 +0,0 @@ -_createMimePart($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual( - Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE, $part->getNestingLevel() - ); - } - - public function testCharsetIsReturnedFromHeader() - { - /* -- RFC 2046, 4.1.2. - A critical parameter that may be specified in the Content-Type field - for "text/plain" data is the character set. This is specified with a - "charset" parameter, as in: - - Content-type: text/plain; charset=iso-8859-1 - - Unlike some other parameter values, the values of the charset - parameter are NOT case sensitive. The default character set, which - must be assumed in the absence of a charset parameter, is US-ASCII. - */ - - $cType = $this->_createHeader('Content-Type', 'text/plain', - array('charset' => 'iso-8859-1') - ); - $part = $this->_createMimePart($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual('iso-8859-1', $part->getCharset()); - } - - public function testCharsetIsSetInHeader() - { - $cType = $this->_createHeader('Content-Type', 'text/plain', - array('charset' => 'iso-8859-1'), false - ); - $this->_checking(Expectations::create() - -> one($cType)->setParameter('charset', 'utf-8') - -> ignoring($cType) - ); - $part = $this->_createMimePart($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $part->setCharset('utf-8'); - } - - public function testCharsetIsSetInHeaderIfPassedToSetBody() - { - $cType = $this->_createHeader('Content-Type', 'text/plain', - array('charset' => 'iso-8859-1'), false - ); - $this->_checking(Expectations::create() - -> one($cType)->setParameter('charset', 'utf-8') - -> ignoring($cType) - ); - $part = $this->_createMimePart($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $part->setBody('', 'text/plian', 'utf-8'); - } - - public function testSettingCharsetNotifiesEncoder() - { - $encoder = $this->_createEncoder('quoted-printable', false); - $this->_checking(Expectations::create() - -> one($encoder)->charsetChanged('utf-8') - -> ignoring($encoder) - ); - $part = $this->_createMimePart($this->_createHeaderSet(), - $encoder, $this->_createCache() - ); - $part->setCharset('utf-8'); - } - - public function testSettingCharsetNotifiesHeaders() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->charsetChanged('utf-8') - -> ignoring($headers) - ); - $part = $this->_createMimePart($headers, $this->_createEncoder(), - $this->_createCache() - ); - $part->setCharset('utf-8'); - } - - public function testSettingCharsetNotifiesChildren() - { - $child = $this->_createChild(0, '', false); - - $this->_checking(Expectations::create() - -> one($child)->charsetChanged('windows-874') - -> ignoring($child) - ); - - $part = $this->_createMimePart($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $part->setChildren(array($child)); - $part->setCharset('windows-874'); - } - - public function testCharsetChangeUpdatesCharset() - { - $cType = $this->_createHeader('Content-Type', 'text/plain', - array('charset' => 'iso-8859-1'), false - ); - $this->_checking(Expectations::create() - -> one($cType)->setParameter('charset', 'utf-8') - -> ignoring($cType) - ); - $part = $this->_createMimePart($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $part->charsetChanged('utf-8'); - } - - public function testSettingCharsetClearsCache() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> ignoring($headers)->toString() -> returns( - "Content-Type: text/plain; charset=utf-8\r\n" - ) - -> ignoring($headers) - ); - - $cache = $this->_createCache(false); - $this->_checking(Expectations::create() - -> one($cache)->clearKey(any(), 'body') - -> ignoring($cache) - ); - - $entity = $this->_createEntity($headers, $this->_createEncoder(), - $cache - ); - - $entity->setBody("blah\r\nblah!"); - $entity->toString(); - - $entity->setCharset('iso-2022'); - } - - public function testFormatIsReturnedFromHeader() - { - /* -- RFC 3676. - */ - - $cType = $this->_createHeader('Content-Type', 'text/plain', - array('format' => 'flowed') - ); - $part = $this->_createMimePart($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual('flowed', $part->getFormat()); - } - - public function testFormatIsSetInHeader() - { - $cType = $this->_createHeader('Content-Type', 'text/plain', array(), false); - $this->_checking(Expectations::create() - -> one($cType)->setParameter('format', 'fixed') - -> ignoring($cType) - ); - $part = $this->_createMimePart($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $part->setFormat('fixed'); - } - - public function testDelSpIsReturnedFromHeader() - { - /* -- RFC 3676. - */ - - $cType = $this->_createHeader('Content-Type', 'text/plain', - array('delsp' => 'no') - ); - $part = $this->_createMimePart($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertIdentical(false, $part->getDelSp()); - } - - public function testDelSpIsSetInHeader() - { - $cType = $this->_createHeader('Content-Type', 'text/plain', array(), false); - $this->_checking(Expectations::create() - -> one($cType)->setParameter('delsp', 'yes') - -> ignoring($cType) - ); - $part = $this->_createMimePart($this->_createHeaderSet(array( - 'Content-Type' => $cType)), - $this->_createEncoder(), $this->_createCache() - ); - $part->setDelSp(true); - } - - public function testFluidInterface() - { - $part = $this->_createMimePart($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - - $this->assertSame($part, - $part - ->setContentType('text/plain') - ->setEncoder($this->_createEncoder()) - ->setId('foo@bar') - ->setDescription('my description') - ->setMaxLineLength(998) - ->setBody('xx') - ->setBoundary('xyz') - ->setChildren(array()) - ->setCharset('utf-8') - ->setFormat('flowed') - ->setDelSp(true) - ); - } - - // -- Private helpers - - //abstract - protected function _createEntity($headers, $encoder, $cache) - { - return $this->_createMimePart($headers, $encoder, $cache); - } - - protected function _createMimePart($headers, $encoder, $cache) - { - return new Swift_Mime_MimePart($headers, $encoder, $cache, new Swift_Mime_Grammar()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleHeaderFactoryTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleHeaderFactoryTest.php deleted file mode 100644 index 4f56f522..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleHeaderFactoryTest.php +++ /dev/null @@ -1,179 +0,0 @@ -_factory = $this->_createFactory(); - } - - public function testMailboxHeaderIsCorrectType() - { - $header = $this->_factory->createMailboxHeader('X-Foo'); - $this->assertIsA($header, 'Swift_Mime_Headers_MailboxHeader'); - } - - public function testMailboxHeaderHasCorrectName() - { - $header = $this->_factory->createMailboxHeader('X-Foo'); - $this->assertEqual('X-Foo', $header->getFieldName()); - } - - public function testMailboxHeaderHasCorrectModel() - { - $header = $this->_factory->createMailboxHeader('X-Foo', - array('foo@bar'=>'FooBar') - ); - $this->assertEqual(array('foo@bar'=>'FooBar'), $header->getFieldBodyModel()); - } - - public function testDateHeaderHasCorrectType() - { - $header = $this->_factory->createDateHeader('X-Date'); - $this->assertIsA($header, 'Swift_Mime_Headers_DateHeader'); - } - - public function testDateHeaderHasCorrectName() - { - $header = $this->_factory->createDateHeader('X-Date'); - $this->assertEqual('X-Date', $header->getFieldName()); - } - - public function testDateHeaderHasCorrectModel() - { - $header = $this->_factory->createDateHeader('X-Date', 123); - $this->assertEqual(123, $header->getFieldBodyModel()); - } - - public function testTextHeaderHasCorrectType() - { - $header = $this->_factory->createTextHeader('X-Foo'); - $this->assertIsA($header, 'Swift_Mime_Headers_UnstructuredHeader'); - } - - public function testTextHeaderHasCorrectName() - { - $header = $this->_factory->createTextHeader('X-Foo'); - $this->assertEqual('X-Foo', $header->getFieldName()); - } - - public function testTextHeaderHasCorrectModel() - { - $header = $this->_factory->createTextHeader('X-Foo', 'bar'); - $this->assertEqual('bar', $header->getFieldBodyModel()); - } - - public function testParameterizedHeaderHasCorrectType() - { - $header = $this->_factory->createParameterizedHeader('X-Foo'); - $this->assertIsA($header, 'Swift_Mime_Headers_ParameterizedHeader'); - } - - public function testParameterizedHeaderHasCorrectName() - { - $header = $this->_factory->createParameterizedHeader('X-Foo'); - $this->assertEqual('X-Foo', $header->getFieldName()); - } - - public function testParameterizedHeaderHasCorrectModel() - { - $header = $this->_factory->createParameterizedHeader('X-Foo', 'bar'); - $this->assertEqual('bar', $header->getFieldBodyModel()); - } - - public function testParameterizedHeaderHasCorrectParams() - { - $header = $this->_factory->createParameterizedHeader('X-Foo', 'bar', - array('zip' => 'button') - ); - $this->assertEqual(array('zip'=>'button'), $header->getParameters()); - } - - public function testIdHeaderHasCorrectType() - { - $header = $this->_factory->createIdHeader('X-ID'); - $this->assertIsA($header, 'Swift_Mime_Headers_IdentificationHeader'); - } - - public function testIdHeaderHasCorrectName() - { - $header = $this->_factory->createIdHeader('X-ID'); - $this->assertEqual('X-ID', $header->getFieldName()); - } - - public function testIdHeaderHasCorrectModel() - { - $header = $this->_factory->createIdHeader('X-ID', 'xyz@abc'); - $this->assertEqual(array('xyz@abc'), $header->getFieldBodyModel()); - } - - public function testPathHeaderHasCorrectType() - { - $header = $this->_factory->createPathHeader('X-Path'); - $this->assertIsA($header, 'Swift_Mime_Headers_PathHeader'); - } - - public function testPathHeaderHasCorrectName() - { - $header = $this->_factory->createPathHeader('X-Path'); - $this->assertEqual('X-Path', $header->getFieldName()); - } - - public function testPathHeaderHasCorrectModel() - { - $header = $this->_factory->createPathHeader('X-Path', 'foo@bar'); - $this->assertEqual('foo@bar', $header->getFieldBodyModel()); - } - - public function testCharsetChangeNotificationNotifiesEncoders() - { - $encoder = $this->_createHeaderEncoder(false); - $paramEncoder = $this->_createParamEncoder(false); - - $factory = $this->_createFactory($encoder, $paramEncoder); - - $this->_checking(Expectations::create() - -> one($encoder)->charsetChanged('utf-8') - -> one($paramEncoder)->charsetChanged('utf-8') - -> ignoring($encoder) - -> ignoring($paramEncoder) - ); - - $factory->charsetChanged('utf-8'); - } - - // -- Creation methods - - private function _createFactory($encoder = null, $paramEncoder = null) - { - return new Swift_Mime_SimpleHeaderFactory( - $encoder - ? $encoder : $this->_createHeaderEncoder(), - $paramEncoder - ? $paramEncoder : $this->_createParamEncoder(), - new Swift_Mime_Grammar() - ); - } - - private function _createHeaderEncoder($stub = true) - { - return $stub - ? $this->_stub('Swift_Mime_HeaderEncoder') - : $this->_mock('Swift_Mime_HeaderEncoder'); - } - - private function _createParamEncoder($stub = true) - { - return $stub - ? $this->_stub('Swift_Encoder') - : $this->_mock('Swift_Encoder'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleHeaderSetTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleHeaderSetTest.php deleted file mode 100644 index 624e8dc3..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleHeaderSetTest.php +++ /dev/null @@ -1,653 +0,0 @@ -_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createMailboxHeader('From', array('person@domain'=>'Person')) - -> returns($this->_createHeader('From')) - ); - $set = $this->_createSet($factory); - $set->addMailboxHeader('From', array('person@domain'=>'Person')); - } - - public function testAddDateHeaderDelegatesToFactory() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createDateHeader('Date', 1234) - -> returns($this->_createHeader('Date')) - ); - $set = $this->_createSet($factory); - $set->addDateHeader('Date', 1234); - } - - public function testAddTextHeaderDelegatesToFactory() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createTextHeader('Subject', 'some text') - -> returns($this->_createHeader('Subject')) - ); - $set = $this->_createSet($factory); - $set->addTextHeader('Subject', 'some text'); - } - - public function testAddParameterizedHeaderDelegatesToFactory() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createParameterizedHeader( - 'Content-Type', 'text/plain', array('charset'=>'utf-8') - ) -> returns($this->_createHeader('Content-Type')) - ); - $set = $this->_createSet($factory); - $set->addParameterizedHeader('Content-Type', 'text/plain', - array('charset'=>'utf-8') - ); - } - - public function testAddIdHeaderDelegatesToFactory() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($this->_createHeader('Message-ID')) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - } - - public function testAddPathHeaderDelegatesToFactory() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createPathHeader('Return-Path', 'some@path') - -> returns($this->_createHeader('Return-Path')) - ); - $set = $this->_createSet($factory); - $set->addPathHeader('Return-Path', 'some@path'); - } - - public function testHasReturnsFalseWhenNoHeaders() - { - $set = $this->_createSet($this->_createFactory()); - $this->assertFalse($set->has('Some-Header')); - } - - public function testAddedMailboxHeaderIsSeenByHas() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createMailboxHeader('From', array('person@domain'=>'Person')) - -> returns($this->_createHeader('From')) - ); - $set = $this->_createSet($factory); - $set->addMailboxHeader('From', array('person@domain'=>'Person')); - $this->assertTrue($set->has('From')); - } - - public function testAddedDateHeaderIsSeenByHas() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createDateHeader('Date', 1234) - -> returns($this->_createHeader('Date')) - ); - $set = $this->_createSet($factory); - $set->addDateHeader('Date', 1234); - $this->assertTrue($set->has('Date')); - } - - public function testAddedTextHeaderIsSeenByHas() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createTextHeader('Subject', 'some text') - -> returns($this->_createHeader('Subject')) - ); - $set = $this->_createSet($factory); - $set->addTextHeader('Subject', 'some text'); - $this->assertTrue($set->has('Subject')); - } - - public function testAddedParameterizedHeaderIsSeenByHas() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createParameterizedHeader( - 'Content-Type', 'text/plain', array('charset'=>'utf-8') - ) -> returns($this->_createHeader('Content-Type')) - ); - $set = $this->_createSet($factory); - $set->addParameterizedHeader('Content-Type', 'text/plain', - array('charset'=>'utf-8') - ); - $this->assertTrue($set->has('Content-Type')); - } - - public function testAddedIdHeaderIsSeenByHas() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($this->_createHeader('Message-ID')) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $this->assertTrue($set->has('Message-ID')); - } - - public function testAddedPathHeaderIsSeenByHas() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createPathHeader('Return-Path', 'some@path') - -> returns($this->_createHeader('Return-Path')) - ); - $set = $this->_createSet($factory); - $set->addPathHeader('Return-Path', 'some@path'); - $this->assertTrue($set->has('Return-Path')); - } - - public function testNewlySetHeaderIsSeenByHas() - { - $factory = $this->_createFactory(); - $header = $this->_createHeader('X-Foo', 'bar'); - $set = $this->_createSet($factory); - $set->set($header); - $this->assertTrue($set->has('X-Foo')); - } - - public function testHasCanAcceptOffset() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($this->_createHeader('Message-ID')) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $this->assertTrue($set->has('Message-ID', 0)); - } - - public function testHasWithIllegalOffsetReturnsFalse() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($this->_createHeader('Message-ID')) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $this->assertFalse($set->has('Message-ID', 1)); - } - - public function testHasCanDistinguishMultipleHeaders() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($this->_createHeader('Message-ID')) - -> ignoring($factory)->createIdHeader('Message-ID', 'other@id') - -> returns($this->_createHeader('Message-ID')) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->addIdHeader('Message-ID', 'other@id'); - $this->assertTrue($set->has('Message-ID', 1)); - } - - public function testGetWithUnspecifiedOffset() - { - $header = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $this->assertSame($header, $set->get('Message-ID')); - } - - public function testGetWithSpeiciedOffset() - { - $header0 = $this->_createHeader('Message-ID'); - $header1 = $this->_createHeader('Message-ID'); - $header2 = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header0) - -> ignoring($factory)->createIdHeader('Message-ID', 'other@id') - -> returns($header1) - -> ignoring($factory)->createIdHeader('Message-ID', 'more@id') - -> returns($header2) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->addIdHeader('Message-ID', 'other@id'); - $set->addIdHeader('Message-ID', 'more@id'); - $this->assertSame($header1, $set->get('Message-ID', 1)); - } - - public function testGetReturnsNullIfHeaderNotSet() - { - $set = $this->_createSet($this->_createFactory()); - $this->assertNull($set->get('Message-ID', 99)); - } - - public function testGetAllReturnsAllHeadersMatchingName() - { - $header0 = $this->_createHeader('Message-ID'); - $header1 = $this->_createHeader('Message-ID'); - $header2 = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header0) - -> ignoring($factory)->createIdHeader('Message-ID', 'other@id') - -> returns($header1) - -> ignoring($factory)->createIdHeader('Message-ID', 'more@id') - -> returns($header2) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->addIdHeader('Message-ID', 'other@id'); - $set->addIdHeader('Message-ID', 'more@id'); - - $this->assertEqual(array($header0, $header1, $header2), - $set->getAll('Message-ID') - ); - } - - public function testGetAllReturnsAllHeadersIfNoArguments() - { - $header0 = $this->_createHeader('Message-ID'); - $header1 = $this->_createHeader('Subject'); - $header2 = $this->_createHeader('To'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header0) - -> ignoring($factory)->createIdHeader('Subject', 'thing') - -> returns($header1) - -> ignoring($factory)->createIdHeader('To', 'person@example.org') - -> returns($header2) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->addIdHeader('Subject', 'thing'); - $set->addIdHeader('To', 'person@example.org'); - - $this->assertEqual(array($header0, $header1, $header2), - $set->getAll() - ); - } - - public function testGetAllReturnsEmptyArrayIfNoneSet() - { - $set = $this->_createSet($this->_createFactory()); - $this->assertEqual(array(), $set->getAll('Received')); - } - - public function testRemoveWithUnspecifiedOffset() - { - $header = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->remove('Message-ID'); - $this->assertFalse($set->has('Message-ID')); - } - - public function testRemoveWithSpecifiedIndexRemovesHeader() - { - $header0 = $this->_createHeader('Message-ID'); - $header1 = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header0) - -> ignoring($factory)->createIdHeader('Message-ID', 'other@id') - -> returns($header1) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->addIdHeader('Message-ID', 'other@id'); - $set->remove('Message-ID', 1); - $this->assertFalse($set->has('Message-ID', 1)); - } - - public function testRemoveWithSpecifiedIndexLeavesOtherHeaders() - { - $header0 = $this->_createHeader('Message-ID'); - $header1 = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header0) - -> ignoring($factory)->createIdHeader('Message-ID', 'other@id') - -> returns($header1) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->addIdHeader('Message-ID', 'other@id'); - $set->remove('Message-ID', 1); - $this->assertTrue($set->has('Message-ID', 0)); - } - - public function testRemoveWithInvalidOffsetDoesNothing() - { - $header = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->remove('Message-ID', 50); - $this->assertTrue($set->has('Message-ID')); - } - - public function testRemoveAllRemovesAllHeadersWithName() - { - $header0 = $this->_createHeader('Message-ID'); - $header1 = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header0) - -> ignoring($factory)->createIdHeader('Message-ID', 'other@id') - -> returns($header1) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->addIdHeader('Message-ID', 'other@id'); - $set->removeAll('Message-ID'); - $this->assertFalse($set->has('Message-ID', 0)); - $this->assertFalse($set->has('Message-ID', 1)); - } - - public function testHasIsNotCaseSensitive() - { - $header = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $this->assertTrue($set->has('message-id')); - } - - public function testGetIsNotCaseSensitive() - { - $header = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $this->assertSame($header, $set->get('message-id')); - } - - public function testGetAllIsNotCaseSensitive() - { - $header = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $this->assertEqual(array($header), $set->getAll('message-id')); - } - - public function testRemoveIsNotCaseSensitive() - { - $header = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->remove('message-id'); - $this->assertFalse($set->has('Message-ID')); - } - - public function testRemoveAllIsNotCaseSensitive() - { - $header = $this->_createHeader('Message-ID'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createIdHeader('Message-ID', 'some@id') - -> returns($header) - ); - $set = $this->_createSet($factory); - $set->addIdHeader('Message-ID', 'some@id'); - $set->removeAll('message-id'); - $this->assertFalse($set->has('Message-ID')); - } - - public function testNewInstance() - { - $set = $this->_createSet($this->_createFactory()); - $instance = $set->newInstance(); - $this->assertIsA($instance, 'Swift_Mime_HeaderSet'); - } - - public function testToStringJoinsHeadersTogether() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createTextHeader('Foo', 'bar') - -> returns($this->_createHeader('Foo', 'bar')) - -> one($factory)->createTextHeader('Zip', 'buttons') - -> returns($this->_createHeader('Zip', 'buttons')) - ); - $set = $this->_createSet($factory); - $set->addTextHeader('Foo', 'bar'); - $set->addTextHeader('Zip', 'buttons'); - $this->assertEqual( - "Foo: bar\r\n" . - "Zip: buttons\r\n", - $set->toString() - ); - } - - public function testHeadersWithoutBodiesAreNotDisplayed() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createTextHeader('Foo', 'bar') - -> returns($this->_createHeader('Foo', 'bar')) - -> one($factory)->createTextHeader('Zip', '') - -> returns($this->_createHeader('Zip', '')) - ); - $set = $this->_createSet($factory); - $set->addTextHeader('Foo', 'bar'); - $set->addTextHeader('Zip', ''); - $this->assertEqual( - "Foo: bar\r\n", - $set->toString() - ); - } - - public function testHeadersWithoutBodiesCanBeForcedToDisplay() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createTextHeader('Foo', '') - -> returns($this->_createHeader('Foo', '')) - -> one($factory)->createTextHeader('Zip', '') - -> returns($this->_createHeader('Zip', '')) - ); - $set = $this->_createSet($factory); - $set->addTextHeader('Foo', ''); - $set->addTextHeader('Zip', ''); - $set->setAlwaysDisplayed(array('Foo', 'Zip')); - $this->assertEqual( - "Foo: \r\n" . - "Zip: \r\n", - $set->toString() - ); - } - - public function testHeaderSequencesCanBeSpecified() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createTextHeader('First', 'one') - -> returns($this->_createHeader('First', 'one')) - -> one($factory)->createTextHeader('Second', 'two') - -> returns($this->_createHeader('Second', 'two')) - -> one($factory)->createTextHeader('Third', 'three') - -> returns($this->_createHeader('Third', 'three')) - ); - $set = $this->_createSet($factory); - $set->addTextHeader('Third', 'three'); - $set->addTextHeader('First', 'one'); - $set->addTextHeader('Second', 'two'); - - $set->defineOrdering(array('First', 'Second', 'Third')); - - $this->assertEqual( - "First: one\r\n" . - "Second: two\r\n" . - "Third: three\r\n", - $set->toString() - ); - } - - public function testUnsortedHeadersAppearAtEnd() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createTextHeader('First', 'one') - -> returns($this->_createHeader('First', 'one')) - -> one($factory)->createTextHeader('Second', 'two') - -> returns($this->_createHeader('Second', 'two')) - -> one($factory)->createTextHeader('Third', 'three') - -> returns($this->_createHeader('Third', 'three')) - -> one($factory)->createTextHeader('Fourth', 'four') - -> returns($this->_createHeader('Fourth', 'four')) - -> one($factory)->createTextHeader('Fifth', 'five') - -> returns($this->_createHeader('Fifth', 'five')) - ); - $set = $this->_createSet($factory); - $set->addTextHeader('Fourth', 'four'); - $set->addTextHeader('Fifth', 'five'); - $set->addTextHeader('Third', 'three'); - $set->addTextHeader('First', 'one'); - $set->addTextHeader('Second', 'two'); - - $set->defineOrdering(array('First', 'Second', 'Third')); - - $this->assertEqual( - "First: one\r\n" . - "Second: two\r\n" . - "Third: three\r\n" . - "Fourth: four\r\n" . - "Fifth: five\r\n", - $set->toString() - ); - } - - public function testSettingCharsetNotifiesAlreadyExistingHeaders() - { - $subject = $this->_createHeader('Subject', 'some text'); - $xHeader = $this->_createHeader('X-Header', 'some text'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createTextHeader('Subject', 'some text') - -> returns($subject) - -> ignoring($factory)->createTextHeader('X-Header', 'some text') - -> returns($xHeader) - -> ignoring($factory) - -> one($subject)->setCharset('utf-8') - -> one($xHeader)->setCharset('utf-8') - ); - $set = $this->_createSet($factory); - $set->addTextHeader('Subject', 'some text'); - $set->addTextHeader('X-Header', 'some text'); - - $set->setCharset('utf-8'); - } - - public function testCharsetChangeNotifiesAlreadyExistingHeaders() - { - $subject = $this->_createHeader('Subject', 'some text'); - $xHeader = $this->_createHeader('X-Header', 'some text'); - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> ignoring($factory)->createTextHeader('Subject', 'some text') - -> returns($subject) - -> ignoring($factory)->createTextHeader('X-Header', 'some text') - -> returns($xHeader) - -> ignoring($factory) - -> one($subject)->setCharset('utf-8') - -> one($xHeader)->setCharset('utf-8') - ); - $set = $this->_createSet($factory); - $set->addTextHeader('Subject', 'some text'); - $set->addTextHeader('X-Header', 'some text'); - - $set->charsetChanged('utf-8'); - } - - public function testCharsetChangeNotifiesFactory() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->charsetChanged('utf-8') - -> ignoring($factory) - ); - $set = $this->_createSet($factory); - - $set->setCharset('utf-8'); - } - - // -- Creation methods - - private function _createSet($factory) - { - return new Swift_Mime_SimpleHeaderSet($factory); - } - - private function _createFactory() - { - return $this->_mock('Swift_Mime_HeaderFactory'); - } - - private function _createHeader($name, $body = '') - { - $header = $this->_mock('Swift_Mime_Header'); - $this->_checking(Expectations::create() - -> ignoring($header)->getFieldName() -> returns($name) - -> ignoring($header)->toString() -> returns(sprintf("%s: %s\r\n", $name, $body)) - -> ignoring($header)->getFieldBody() -> returns($body) - ); - - return $header; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleMessageTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleMessageTest.php deleted file mode 100644 index 0b89416d..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleMessageTest.php +++ /dev/null @@ -1,801 +0,0 @@ -_createMessage($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual( - Swift_Mime_MimeEntity::LEVEL_TOP, $message->getNestingLevel() - ); - } - - public function testDateIsReturnedFromHeader() - { - $date = $this->_createHeader('Date', 123); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Date' => $date)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual(123, $message->getDate()); - } - - public function testDateIsSetInHeader() - { - $date = $this->_createHeader('Date', 123, array(), false); - $this->_checking(Expectations::create() - -> one($date)->setFieldBodyModel(1234) - -> ignoring($date) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Date' => $date)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setDate(1234); - } - - public function testDateHeaderIsCreatedIfNonePresent() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addDateHeader('Date', 1234) - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setDate(1234); - } - - public function testDateHeaderIsAddedDuringConstruction() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addDateHeader('Date', pattern('/^[0-9]+$/D')) - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - } - - public function testIdIsReturnedFromHeader() - { - /* -- RFC 2045, 7. - In constructing a high-level user agent, it may be desirable to allow - one body to make reference to another. Accordingly, bodies may be - labelled using the "Content-ID" header field, which is syntactically - identical to the "Message-ID" header field - */ - - $messageId = $this->_createHeader('Message-ID', 'a@b'); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Message-ID' => $messageId)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual('a@b', $message->getId()); - } - - public function testIdIsSetInHeader() - { - $messageId = $this->_createHeader('Message-ID', 'a@b', array(), false); - $this->_checking(Expectations::create() - -> one($messageId)->setFieldBodyModel('x@y') - -> ignoring($messageId) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Message-ID' => $messageId)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setId('x@y'); - } - - public function testIdIsAutoGenerated() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addIdHeader('Message-ID', pattern('/^.*?@.*?$/D')) - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - } - - public function testSubjectIsReturnedFromHeader() - { - /* -- RFC 2822, 3.6.5. - */ - - $subject = $this->_createHeader('Subject', 'example subject'); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Subject' => $subject)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual('example subject', $message->getSubject()); - } - - public function testSubjectIsSetInHeader() - { - $subject = $this->_createHeader('Subject', '', array(), false); - $this->_checking(Expectations::create() - -> one($subject)->setFieldBodyModel('foo') - -> ignoring($subject) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Subject' => $subject)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setSubject('foo'); - } - - public function testSubjectHeaderIsCreatedIfNotPresent() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addTextHeader('Subject', 'example subject') - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setSubject('example subject'); - } - - public function testReturnPathIsReturnedFromHeader() - { - /* -- RFC 2822, 3.6.7. - */ - - $path = $this->_createHeader('Return-Path', 'bounces@domain'); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Return-Path' => $path)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual('bounces@domain', $message->getReturnPath()); - } - - public function testReturnPathIsSetInHeader() - { - $path = $this->_createHeader('Return-Path', '', array(), false); - $this->_checking(Expectations::create() - -> one($path)->setFieldBodyModel('bounces@domain') - -> ignoring($path) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Return-Path' => $path)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setReturnPath('bounces@domain'); - } - - public function testReturnPathHeaderIsAddedIfNoneSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addPathHeader('Return-Path', 'bounces@domain') - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setReturnPath('bounces@domain'); - } - - public function testSenderIsReturnedFromHeader() - { - /* -- RFC 2822, 3.6.2. - */ - - $sender = $this->_createHeader('Sender', array('sender@domain'=>'Name')); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Sender' => $sender)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual(array('sender@domain'=>'Name'), $message->getSender()); - } - - public function testSenderIsSetInHeader() - { - $sender = $this->_createHeader('Sender', array('sender@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($sender)->setFieldBodyModel(array('other@domain'=>'Other')) - -> ignoring($sender) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Sender' => $sender)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setSender(array('other@domain'=>'Other')); - } - - public function testSenderHeaderIsAddedIfNoneSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('Sender', (array) 'sender@domain') - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setSender('sender@domain'); - } - - public function testNameCanBeUsedInSenderHeader() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('Sender', array('sender@domain'=>'Name')) - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setSender('sender@domain', 'Name'); - } - - public function testFromIsReturnedFromHeader() - { - /* -- RFC 2822, 3.6.2. - */ - - $from = $this->_createHeader('From', array('from@domain'=>'Name')); - $message = $this->_createMessage( - $this->_createHeaderSet(array('From' => $from)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual(array('from@domain'=>'Name'), $message->getFrom()); - } - - public function testFromIsSetInHeader() - { - $from = $this->_createHeader('From', array('from@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($from)->setFieldBodyModel(array('other@domain'=>'Other')) - -> ignoring($from) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('From' => $from)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setFrom(array('other@domain'=>'Other')); - } - - public function testFromIsAddedToHeadersDuringAddFrom() - { - $from = $this->_createHeader('From', array('from@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($from)->setFieldBodyModel(array('from@domain'=>'Name', 'other@domain'=>'Other')) - -> ignoring($from) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('From' => $from)), - $this->_createEncoder(), $this->_createCache() - ); - $message->addFrom('other@domain', 'Other'); - } - - public function testFromHeaderIsAddedIfNoneSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('From', (array) 'from@domain') - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setFrom('from@domain'); - } - - public function testPersonalNameCanBeUsedInFromAddress() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('From', array('from@domain'=>'Name')) - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setFrom('from@domain', 'Name'); - } - - public function testReplyToIsReturnedFromHeader() - { - /* -- RFC 2822, 3.6.2. - */ - - $reply = $this->_createHeader('Reply-To', array('reply@domain'=>'Name')); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Reply-To' => $reply)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual(array('reply@domain'=>'Name'), $message->getReplyTo()); - } - - public function testReplyToIsSetInHeader() - { - $reply = $this->_createHeader('Reply-To', array('reply@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($reply)->setFieldBodyModel(array('other@domain'=>'Other')) - -> ignoring($reply) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Reply-To' => $reply)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setReplyTo(array('other@domain'=>'Other')); - } - - public function testReplyToIsAddedToHeadersDuringAddReplyTo() - { - $replyTo = $this->_createHeader('Reply-To', array('from@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($replyTo)->setFieldBodyModel(array('from@domain'=>'Name', 'other@domain'=>'Other')) - -> ignoring($replyTo) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Reply-To' => $replyTo)), - $this->_createEncoder(), $this->_createCache() - ); - $message->addReplyTo('other@domain', 'Other'); - } - - public function testReplyToHeaderIsAddedIfNoneSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('Reply-To', (array) 'reply@domain') - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setReplyTo('reply@domain'); - } - - public function testNameCanBeUsedInReplyTo() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('Reply-To', array('reply@domain'=>'Name')) - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setReplyTo('reply@domain', 'Name'); - } - - public function testToIsReturnedFromHeader() - { - /* -- RFC 2822, 3.6.3. - */ - - $to = $this->_createHeader('To', array('to@domain'=>'Name')); - $message = $this->_createMessage( - $this->_createHeaderSet(array('To' => $to)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual(array('to@domain'=>'Name'), $message->getTo()); - } - - public function testToIsSetInHeader() - { - $to = $this->_createHeader('To', array('to@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($to)->setFieldBodyModel(array('other@domain'=>'Other')) - -> ignoring($to) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('To' => $to)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setTo(array('other@domain'=>'Other')); - } - - public function testToIsAddedToHeadersDuringAddTo() - { - $to = $this->_createHeader('To', array('from@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($to)->setFieldBodyModel(array('from@domain'=>'Name', 'other@domain'=>'Other')) - -> ignoring($to) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('To' => $to)), - $this->_createEncoder(), $this->_createCache() - ); - $message->addTo('other@domain', 'Other'); - } - - public function testToHeaderIsAddedIfNoneSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('To', (array) 'to@domain') - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setTo('to@domain'); - } - - public function testNameCanBeUsedInToHeader() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('To', array('to@domain'=>'Name')) - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setTo('to@domain', 'Name'); - } - - public function testCcIsReturnedFromHeader() - { - /* -- RFC 2822, 3.6.3. - */ - - $cc = $this->_createHeader('Cc', array('cc@domain'=>'Name')); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Cc' => $cc)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual(array('cc@domain'=>'Name'), $message->getCc()); - } - - public function testCcIsSetInHeader() - { - $cc = $this->_createHeader('Cc', array('cc@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($cc)->setFieldBodyModel(array('other@domain'=>'Other')) - -> ignoring($cc) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Cc' => $cc)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setCc(array('other@domain'=>'Other')); - } - - public function testCcIsAddedToHeadersDuringAddCc() - { - $cc = $this->_createHeader('Cc', array('from@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($cc)->setFieldBodyModel(array('from@domain'=>'Name', 'other@domain'=>'Other')) - -> ignoring($cc) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Cc' => $cc)), - $this->_createEncoder(), $this->_createCache() - ); - $message->addCc('other@domain', 'Other'); - } - - public function testCcHeaderIsAddedIfNoneSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('Cc', (array) 'cc@domain') - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setCc('cc@domain'); - } - - public function testNameCanBeUsedInCcHeader() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('Cc', array('cc@domain'=>'Name')) - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setCc('cc@domain', 'Name'); - } - - public function testBccIsReturnedFromHeader() - { - /* -- RFC 2822, 3.6.3. - */ - - $bcc = $this->_createHeader('Bcc', array('bcc@domain'=>'Name')); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Bcc' => $bcc)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual(array('bcc@domain'=>'Name'), $message->getBcc()); - } - - public function testBccIsSetInHeader() - { - $bcc = $this->_createHeader('Bcc', array('bcc@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($bcc)->setFieldBodyModel(array('other@domain'=>'Other')) - -> ignoring($bcc) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Bcc' => $bcc)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setBcc(array('other@domain'=>'Other')); - } - - public function testBccIsAddedToHeadersDuringAddBcc() - { - $bcc = $this->_createHeader('Bcc', array('from@domain'=>'Name'), - array(), false - ); - $this->_checking(Expectations::create() - -> one($bcc)->setFieldBodyModel(array('from@domain'=>'Name', 'other@domain'=>'Other')) - -> ignoring($bcc) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Bcc' => $bcc)), - $this->_createEncoder(), $this->_createCache() - ); - $message->addBcc('other@domain', 'Other'); - } - - public function testBccHeaderIsAddedIfNoneSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('Bcc', (array) 'bcc@domain') - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setBcc('bcc@domain'); - } - - public function testNameCanBeUsedInBcc() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader('Bcc', array('bcc@domain'=>'Name')) - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setBcc('bcc@domain', 'Name'); - } - - public function testPriorityIsReadFromHeader() - { - $prio = $this->_createHeader('X-Priority', '2 (High)'); - $message = $this->_createMessage( - $this->_createHeaderSet(array('X-Priority' => $prio)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual(2, $message->getPriority()); - } - - public function testPriorityIsSetInHeader() - { - $prio = $this->_createHeader('X-Priority', '2 (High)', array(), false); - $this->_checking(Expectations::create() - -> one($prio)->setFieldBodyModel('5 (Lowest)') - -> ignoring($prio) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('X-Priority' => $prio)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setPriority(5); - } - - public function testPriorityHeaderIsAddedIfNoneSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addTextHeader('X-Priority', '4 (Low)') - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setPriority(4); - } - - public function testReadReceiptAddressReadFromHeader() - { - $rcpt = $this->_createHeader('Disposition-Notification-To', - array('chris@swiftmailer.org'=>'Chris') - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Disposition-Notification-To' => $rcpt)), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertEqual(array('chris@swiftmailer.org'=>'Chris'), - $message->getReadReceiptTo() - ); - } - - public function testReadReceiptIsSetInHeader() - { - $rcpt = $this->_createHeader('Disposition-Notification-To', array(), array(), false); - $this->_checking(Expectations::create() - -> one($rcpt)->setFieldBodyModel('mark@swiftmailer.org') - -> ignoring($rcpt) - ); - $message = $this->_createMessage( - $this->_createHeaderSet(array('Disposition-Notification-To' => $rcpt)), - $this->_createEncoder(), $this->_createCache() - ); - $message->setReadReceiptTo('mark@swiftmailer.org'); - } - - public function testReadReceiptHeaderIsAddedIfNoneSet() - { - $headers = $this->_createHeaderSet(array(), false); - $this->_checking(Expectations::create() - -> one($headers)->addMailboxHeader( - 'Disposition-Notification-To', 'mark@swiftmailer.org' - ) - -> ignoring($headers) - ); - $message = $this->_createMessage($headers, $this->_createEncoder(), - $this->_createCache() - ); - $message->setReadReceiptTo('mark@swiftmailer.org'); - } - - public function testChildrenCanBeAttached() - { - $child1 = $this->_createChild(); - $child2 = $this->_createChild(); - - $message = $this->_createMessage($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - - $message->attach($child1); - $message->attach($child2); - - $this->assertEqual(array($child1, $child2), $message->getChildren()); - } - - public function testChildrenCanBeDetached() - { - $child1 = $this->_createChild(); - $child2 = $this->_createChild(); - - $message = $this->_createMessage($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - - $message->attach($child1); - $message->attach($child2); - - $message->detach($child1); - - $this->assertEqual(array($child2), $message->getChildren()); - } - - public function testEmbedAttachesChild() - { - $child = $this->_createChild(); - - $message = $this->_createMessage($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - - $message->embed($child); - - $this->assertEqual(array($child), $message->getChildren()); - } - - public function testEmbedReturnsValidCid() - { - $child = $this->_createChild(Swift_Mime_MimeEntity::LEVEL_RELATED, '', - false - ); - $this->_checking(Expectations::create() - -> ignoring($child)->getId() -> returns('foo@bar') - -> ignoring($child) - ); - $message = $this->_createMessage($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - - $this->assertEqual('cid:foo@bar', $message->embed($child)); - } - - public function testFluidInterface() - { - $child = $this->_createChild(); - $message = $this->_createMessage($this->_createHeaderSet(), - $this->_createEncoder(), $this->_createCache() - ); - $this->assertSame($message, - $message - ->setContentType('text/plain') - ->setEncoder($this->_createEncoder()) - ->setId('foo@bar') - ->setDescription('my description') - ->setMaxLineLength(998) - ->setBody('xx') - ->setBoundary('xyz') - ->setChildren(array()) - ->setCharset('iso-8859-1') - ->setFormat('flowed') - ->setDelSp(false) - ->setSubject('subj') - ->setDate(123) - ->setReturnPath('foo@bar') - ->setSender('foo@bar') - ->setFrom(array('x@y' => 'XY')) - ->setReplyTo(array('ab@cd' => 'ABCD')) - ->setTo(array('chris@site.tld', 'mark@site.tld')) - ->setCc('john@somewhere.tld') - ->setBcc(array('one@site', 'two@site' => 'Two')) - ->setPriority(4) - ->setReadReceiptTo('a@b') - ->attach($child) - ->detach($child) - ); - } - - // -- Private helpers - - //abstract - protected function _createEntity($headers, $encoder, $cache) - { - return $this->_createMessage($headers, $encoder, $cache); - } - - protected function _createMimePart($headers, $encoder, $cache) - { - return $this->_createMessage($headers, $encoder, $cache); - } - - private function _createMessage($headers, $encoder, $cache) - { - return new Swift_Mime_SimpleMessage($headers, $encoder, $cache, new Swift_Mime_Grammar()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleMimeEntityTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleMimeEntityTest.php deleted file mode 100644 index 02277e3c..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleMimeEntityTest.php +++ /dev/null @@ -1,15 +0,0 @@ -assertEqual(10, $plugin->getThreshold()); - $plugin->setThreshold(100); - $this->assertEqual(100, $plugin->getThreshold()); - } - - public function testSleepTimeCanBeSetAndFetched() - { - $plugin = new Swift_Plugins_AntiFloodPlugin(10, 5); - $this->assertEqual(5, $plugin->getSleepTime()); - $plugin->setSleepTime(1); - $this->assertEqual(1, $plugin->getSleepTime()); - } - - public function testPluginStopsConnectionAfterThreshold() - { - $transport = $this->_createTransport(); - $evt = $this->_createSendEvent($transport); - $this->_checking(Expectations::create() - -> one($transport)->start() - -> one($transport)->stop() - -> ignoring($transport) - ); - - $plugin = new Swift_Plugins_AntiFloodPlugin(10); - for ($i = 0; $i < 12; $i++) { - $plugin->sendPerformed($evt); - } - } - - public function testPluginCanStopAndStartMultipleTimes() - { - $transport = $this->_createTransport(); - $evt = $this->_createSendEvent($transport); - $this->_checking(Expectations::create() - -> exactly(5)->of($transport)->start() - -> exactly(5)->of($transport)->stop() - -> ignoring($transport) - ); - - $plugin = new Swift_Plugins_AntiFloodPlugin(2); - for ($i = 0; $i < 11; $i++) { - $plugin->sendPerformed($evt); - } - } - - public function testPluginCanSleepDuringRestart() - { - $sleeper = $this->_createSleeper(); - $transport = $this->_createTransport(); - $evt = $this->_createSendEvent($transport); - $this->_checking(Expectations::create() - -> one($sleeper)->sleep(10) - -> one($transport)->start() - -> one($transport)->stop() - -> ignoring($transport) - ); - - $plugin = new Swift_Plugins_AntiFloodPlugin(99, 10, $sleeper); - for ($i = 0; $i < 101; $i++) { - $plugin->sendPerformed($evt); - } - } - - // -- Creation Methods - - private function _createTransport() - { - return $this->_mock('Swift_Transport'); - } - - private function _createSendEvent($transport) - { - $evt = $this->_mock('Swift_Events_SendEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getSource() -> returns($transport) - -> ignoring($evt)->getTransport() -> returns($transport) - ); - - return $evt; - } - - private function _createSleeper() - { - return $this->_mock('Swift_Plugins_Sleeper'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/BandwidthMonitorPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/BandwidthMonitorPluginTest.php deleted file mode 100644 index aecce899..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/BandwidthMonitorPluginTest.php +++ /dev/null @@ -1,129 +0,0 @@ -_monitor = new Swift_Plugins_BandwidthMonitorPlugin(); - } - - public function testBytesOutIncreasesAccordingToMessageLength() - { - $message = $this->_createMessageWithByteCount(6); - $evt = $this->_createSendEvent($message); - - $this->assertEqual(0, $this->_monitor->getBytesOut()); - $this->_monitor->sendPerformed($evt); - $this->assertEqual(6, $this->_monitor->getBytesOut()); - $this->_monitor->sendPerformed($evt); - $this->assertEqual(12, $this->_monitor->getBytesOut()); - } - - public function testBytesOutIncreasesWhenCommandsSent() - { - $evt = $this->_createCommandEvent("RCPT TO: \r\n"); - - $this->assertEqual(0, $this->_monitor->getBytesOut()); - $this->_monitor->commandSent($evt); - $this->assertEqual(24, $this->_monitor->getBytesOut()); - $this->_monitor->commandSent($evt); - $this->assertEqual(48, $this->_monitor->getBytesOut()); - } - - public function testBytesInIncreasesWhenResponsesReceived() - { - $evt = $this->_createResponseEvent("250 Ok\r\n"); - - $this->assertEqual(0, $this->_monitor->getBytesIn()); - $this->_monitor->responseReceived($evt); - $this->assertEqual(8, $this->_monitor->getBytesIn()); - $this->_monitor->responseReceived($evt); - $this->assertEqual(16, $this->_monitor->getBytesIn()); - } - - public function testCountersCanBeReset() - { - $evt = $this->_createResponseEvent("250 Ok\r\n"); - - $this->assertEqual(0, $this->_monitor->getBytesIn()); - $this->_monitor->responseReceived($evt); - $this->assertEqual(8, $this->_monitor->getBytesIn()); - $this->_monitor->responseReceived($evt); - $this->assertEqual(16, $this->_monitor->getBytesIn()); - - $evt = $this->_createCommandEvent("RCPT TO: \r\n"); - - $this->assertEqual(0, $this->_monitor->getBytesOut()); - $this->_monitor->commandSent($evt); - $this->assertEqual(24, $this->_monitor->getBytesOut()); - $this->_monitor->commandSent($evt); - $this->assertEqual(48, $this->_monitor->getBytesOut()); - - $this->_monitor->reset(); - - $this->assertEqual(0, $this->_monitor->getBytesOut()); - $this->assertEqual(0, $this->_monitor->getBytesIn()); - } - - // -- Creation Methods - - private function _createSendEvent($message) - { - $evt = $this->_mock('Swift_Events_SendEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getMessage() -> returns($message) - ); - - return $evt; - } - - private function _createCommandEvent($command) - { - $evt = $this->_mock('Swift_Events_CommandEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getCommand() -> returns($command) - ); - - return $evt; - } - - private function _createResponseEvent($response) - { - $evt = $this->_mock('Swift_Events_ResponseEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getResponse() -> returns($response) - ); - - return $evt; - } - - private function _createMessageWithByteCount($bytes) - { - $this->_bytes = $bytes; - $msg = $this->_mock('Swift_Mime_Message'); - $this->_checking(Expectations::create() - -> ignoring($msg)->toByteStream(any()) -> calls(array($this, '_write')) - ); - - return $msg; - } - - private $_bytes = 0; - public function _write($invocation) - { - $args = $invocation->getArguments(); - $is = $args[0]; - for ($i = 0; $i < $this->_bytes; ++$i) { - $is->write('x'); - } - } - -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/DecoratorPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/DecoratorPluginTest.php deleted file mode 100644 index 46bc63a7..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/DecoratorPluginTest.php +++ /dev/null @@ -1,235 +0,0 @@ -_createMessage( - $this->_createHeaders(), - array('zip@button.tld' => 'Zipathon'), - array('chris.corbyn@swiftmailer.org' => 'Chris'), - 'Subject', - 'Hello {name}, you are customer #{id}' - ); - $this->_checking(Expectations::create() - -> one($message)->setBody('Hello Zip, you are customer #456') - -> ignoring($message) - ); - - $plugin = $this->_createPlugin( - array('zip@button.tld' => array('{name}' => 'Zip', '{id}' => '456')) - ); - - $evt = $this->_createSendEvent($message); - - $plugin->beforeSendPerformed($evt); - $plugin->sendPerformed($evt); - } - - public function testReplacementsCanBeAppliedToSameMessageMultipleTimes() - { - $message = $this->_createMessage( - $this->_createHeaders(), - array('zip@button.tld' => 'Zipathon', 'foo@bar.tld' => 'Foo'), - array('chris.corbyn@swiftmailer.org' => 'Chris'), - 'Subject', - 'Hello {name}, you are customer #{id}' - ); - $this->_checking(Expectations::create() - -> one($message)->setBody('Hello Zip, you are customer #456') - -> one($message)->setBody('Hello {name}, you are customer #{id}') - -> one($message)->setBody('Hello Foo, you are customer #123') - -> ignoring($message) - ); - - $plugin = $this->_createPlugin( - array( - 'foo@bar.tld' => array('{name}' => 'Foo', '{id}' => '123'), - 'zip@button.tld' => array('{name}' => 'Zip', '{id}' => '456') - ) - ); - - $evt = $this->_createSendEvent($message); - - $plugin->beforeSendPerformed($evt); - $plugin->sendPerformed($evt); - $plugin->beforeSendPerformed($evt); - $plugin->sendPerformed($evt); - } - - public function testReplacementsCanBeMadeInHeaders() - { - $headers = $this->_createHeaders(array( - $returnPathHeader = $this->_createHeader('Return-Path', 'foo-{id}@swiftmailer.org'), - $toHeader = $this->_createHeader('Subject', 'A message for {name}!') - )); - - $message = $this->_createMessage( - $headers, - array('zip@button.tld' => 'Zipathon'), - array('chris.corbyn@swiftmailer.org' => 'Chris'), - 'A message for {name}!', - 'Hello {name}, you are customer #{id}' - ); - $this->_checking(Expectations::create() - -> one($message)->setBody('Hello Zip, you are customer #456') - -> one($toHeader)->setFieldBodyModel('A message for Zip!') - -> one($returnPathHeader)->setFieldBodyModel('foo-456@swiftmailer.org') - -> ignoring($message) - -> ignoring($toHeader) - -> ignoring($returnPathHeader) - ); - - $plugin = $this->_createPlugin( - array('zip@button.tld' => array('{name}' => 'Zip', '{id}' => '456')) - ); - - $evt = $this->_createSendEvent($message); - - $plugin->beforeSendPerformed($evt); - $plugin->sendPerformed($evt); - } - - public function testReplacementsAreMadeOnSubparts() - { - $part1 = $this->_createPart('text/plain', 'Your name is {name}?', '1@x'); - $part2 = $this->_createPart('text/html', 'Your name is {name}?', '2@x'); - $message = $this->_createMessage( - $this->_createHeaders(), - array('zip@button.tld' => 'Zipathon'), - array('chris.corbyn@swiftmailer.org' => 'Chris'), - 'A message for {name}!', - 'Subject' - ); - $this->_checking(Expectations::create() - -> ignoring($message)->getChildren() -> returns(array($part1, $part2)) - -> one($part1)->setBody('Your name is Zip?') - -> one($part2)->setBody('Your name is Zip?') - -> ignoring($part1) - -> ignoring($part2) - -> ignoring($message) - ); - - $plugin = $this->_createPlugin( - array('zip@button.tld' => array('{name}' => 'Zip', '{id}' => '456')) - ); - - $evt = $this->_createSendEvent($message); - - $plugin->beforeSendPerformed($evt); - $plugin->sendPerformed($evt); - } - - public function testReplacementsCanBeTakenFromCustomReplacementsObject() - { - $message = $this->_createMessage( - $this->_createHeaders(), - array('foo@bar' => 'Foobar', 'zip@zap' => 'Zip zap'), - array('chris.corbyn@swiftmailer.org' => 'Chris'), - 'Subject', - 'Something {a}' - ); - - $replacements = $this->_createReplacements(); - - $this->_checking(Expectations::create() - -> one($message)->setBody('Something b') - -> one($message)->setBody('Something c') - -> one($replacements)->getReplacementsFor('foo@bar') -> returns(array('{a}'=>'b')) - -> one($replacements)->getReplacementsFor('zip@zap') -> returns(array('{a}'=>'c')) - -> ignoring($message) - ); - - $plugin = $this->_createPlugin($replacements); - - $evt = $this->_createSendEvent($message); - - $plugin->beforeSendPerformed($evt); - $plugin->sendPerformed($evt); - $plugin->beforeSendPerformed($evt); - $plugin->sendPerformed($evt); - } - - // -- Creation methods - - private function _createMessage($headers, $to = array(), $from = null, $subject = null, - $body = null) - { - $message = $this->_mock('Swift_Mime_Message'); - foreach ($to as $addr => $name) { - $this->_checking(Expectations::create() - -> one($message)->getTo() -> returns(array($addr => $name)) - ); - } - $this->_checking(Expectations::create() - -> allowing($message)->getHeaders() -> returns($headers) - -> ignoring($message)->getFrom() -> returns($from) - -> ignoring($message)->getSubject() -> returns($subject) - -> ignoring($message)->getBody() -> returns($body) - ); - - return $message; - } - - private function _createPlugin($replacements) - { - return new Swift_Plugins_DecoratorPlugin($replacements); - } - - private function _createReplacements() - { - return $this->_mock('Swift_Plugins_Decorator_Replacements'); - } - - private function _createSendEvent(Swift_Mime_Message $message) - { - $evt = $this->_mock('Swift_Events_SendEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getMessage() -> returns($message) - -> ignoring($evt) - ); - - return $evt; - } - - private function _createPart($type, $body, $id) - { - $part = $this->_mock('Swift_Mime_MimeEntity'); - $this->_checking(Expectations::create() - -> ignoring($part)->getContentType() -> returns($type) - -> ignoring($part)->getBody() -> returns($body) - -> ignoring($part)->getId() -> returns($id) - ); - - return $part; - } - - private function _createHeaders($headers = array()) - { - $set = $this->_mock('Swift_Mime_HeaderSet'); - - $this->_checking(Expectations::create() - -> allowing($set)->getAll() -> returns($headers) - -> ignoring($set) - ); - - foreach ($headers as $header) { - $set->set($header); - } - - return $set; - } - - private function _createHeader($name, $body = '') - { - $header = $this->_mock('Swift_Mime_Header'); - $this->_checking(Expectations::create() - -> ignoring($header)->getFieldName() -> returns($name) - -> ignoring($header)->getFieldBodyModel() -> returns($body) - ); - - return $header; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/LoggerPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/LoggerPluginTest.php deleted file mode 100644 index 96706891..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/LoggerPluginTest.php +++ /dev/null @@ -1,198 +0,0 @@ -_createLogger(); - $this->_checking(Expectations::create() - -> one($logger)->add('foo') - ); - - $plugin = $this->_createPlugin($logger); - $plugin->add('foo'); - } - - public function testLoggerDelegatesDumpingEntries() - { - $logger = $this->_createLogger(); - $this->_checking(Expectations::create() - -> one($logger)->dump() -> returns('foobar') - ); - - $plugin = $this->_createPlugin($logger); - $this->assertEqual('foobar', $plugin->dump()); - } - - public function testLoggerDelegatesClearingEntries() - { - $logger = $this->_createLogger(); - $this->_checking(Expectations::create() - -> one($logger)->clear() - ); - - $plugin = $this->_createPlugin($logger); - $plugin->clear(); - } - - public function testCommandIsSentToLogger() - { - $evt = $this->_createCommandEvent("foo\r\n"); - $logger = $this->_createLogger(); - $this->_checking(Expectations::create() - -> one($logger)->add(pattern('~foo\r\n~')) - ); - - $plugin = $this->_createPlugin($logger); - $plugin->commandSent($evt); - } - - public function testResponseIsSentToLogger() - { - $evt = $this->_createResponseEvent("354 Go ahead\r\n"); - $logger = $this->_createLogger(); - $this->_checking(Expectations::create() - -> one($logger)->add(pattern('~354 Go ahead\r\n~')) - ); - - $plugin = $this->_createPlugin($logger); - $plugin->responseReceived($evt); - } - - public function testTransportBeforeStartChangeIsSentToLogger() - { - $evt = $this->_createTransportChangeEvent(); - $logger = $this->_createLogger(); - $this->_checking(Expectations::create() - -> one($logger)->add(any()) - ); - - $plugin = $this->_createPlugin($logger); - $plugin->beforeTransportStarted($evt); - } - - public function testTransportStartChangeIsSentToLogger() - { - $evt = $this->_createTransportChangeEvent(); - $logger = $this->_createLogger(); - $this->_checking(Expectations::create() - -> one($logger)->add(any()) - ); - - $plugin = $this->_createPlugin($logger); - $plugin->transportStarted($evt); - } - - public function testTransportStopChangeIsSentToLogger() - { - $evt = $this->_createTransportChangeEvent(); - $logger = $this->_createLogger(); - $this->_checking(Expectations::create() - -> one($logger)->add(any()) - ); - - $plugin = $this->_createPlugin($logger); - $plugin->transportStopped($evt); - } - - public function testTransportBeforeStopChangeIsSentToLogger() - { - $evt = $this->_createTransportChangeEvent(); - $logger = $this->_createLogger(); - $this->_checking(Expectations::create() - -> one($logger)->add(any()) - ); - - $plugin = $this->_createPlugin($logger); - $plugin->beforeTransportStopped($evt); - } - - public function testExceptionsArePassedToDelegateAndLeftToBubbleUp() - { - $transport = $this->_createTransport(); - $evt = $this->_createTransportExceptionEvent(); - $logger = $this->_createLogger(); - $this->_checking(Expectations::create() - -> one($logger)->add(any()) - -> allowing($logger) - ); - - $plugin = $this->_createPlugin($logger); - try { - $plugin->exceptionThrown($evt); - $this->fail('Exception should bubble up.'); - } catch (Swift_TransportException $ex) { - } - } - - // -- Creation Methods - - private function _createLogger() - { - return $this->_mock('Swift_Plugins_Logger'); - } - - private function _createPlugin($logger) - { - return new Swift_Plugins_LoggerPlugin($logger); - } - - private function _createCommandEvent($command) - { - $evt = $this->_mock('Swift_Events_CommandEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getCommand() -> returns($command) - -> ignoring($evt) - ); - - return $evt; - } - - private function _createResponseEvent($response) - { - $evt = $this->_mock('Swift_Events_ResponseEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getResponse() -> returns($response) - -> ignoring($evt) - ); - - return $evt; - } - - private function _createTransport() - { - return $this->_mock('Swift_Transport'); - } - - private function _createTransportChangeEvent() - { - $evt = $this->_mock('Swift_Events_TransportChangeEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getSource() -> returns($this->_createTransport()) - -> ignoring($evt) - ); - - return $evt; - } - - private function _createTransportExceptionEvent() - { - $evt = $this->_mock('Swift_Events_TransportExceptionEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getException() -> returns(new Swift_TransportException('')) - -> ignoring($evt) - ); - - return $evt; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Loggers/ArrayLoggerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Loggers/ArrayLoggerTest.php deleted file mode 100644 index 6ecff3a9..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Loggers/ArrayLoggerTest.php +++ /dev/null @@ -1,70 +0,0 @@ -add(">> Foo\r\n"); - $this->assertEqual(">> Foo\r\n", $logger->dump()); - } - - public function testAddingMultipleEntriesDumpsMultipleLines() - { - $logger = new Swift_Plugins_Loggers_ArrayLogger(); - $logger->add(">> FOO\r\n"); - $logger->add("<< 502 That makes no sense\r\n"); - $logger->add(">> RSET\r\n"); - $logger->add("<< 250 OK\r\n"); - - $this->assertEqual( - ">> FOO\r\n" . PHP_EOL . - "<< 502 That makes no sense\r\n" . PHP_EOL . - ">> RSET\r\n" . PHP_EOL . - "<< 250 OK\r\n", - $logger->dump() - ); - } - - public function testLogCanBeCleared() - { - $logger = new Swift_Plugins_Loggers_ArrayLogger(); - $logger->add(">> FOO\r\n"); - $logger->add("<< 502 That makes no sense\r\n"); - $logger->add(">> RSET\r\n"); - $logger->add("<< 250 OK\r\n"); - - $this->assertEqual( - ">> FOO\r\n" . PHP_EOL . - "<< 502 That makes no sense\r\n" . PHP_EOL . - ">> RSET\r\n" . PHP_EOL . - "<< 250 OK\r\n", - $logger->dump() - ); - - $logger->clear(); - - $this->assertEqual('', $logger->dump()); - } - - public function testLengthCanBeTruncated() - { - $logger = new Swift_Plugins_Loggers_ArrayLogger(2); - $logger->add(">> FOO\r\n"); - $logger->add("<< 502 That makes no sense\r\n"); - $logger->add(">> RSET\r\n"); - $logger->add("<< 250 OK\r\n"); - - $this->assertEqual( - ">> RSET\r\n" . PHP_EOL . - "<< 250 OK\r\n", - $logger->dump(), - '%s: Log should be truncated to last 2 entries' - ); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Loggers/EchoLoggerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Loggers/EchoLoggerTest.php deleted file mode 100644 index 1c5bcc68..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Loggers/EchoLoggerTest.php +++ /dev/null @@ -1,29 +0,0 @@ -add(">> Foo"); - $data = ob_get_clean(); - - $this->assertEqual(">> Foo" . PHP_EOL, $data); - } - - public function testAddingEntryDumpsEscapedLineWithHtml() - { - $logger = new Swift_Plugins_Loggers_EchoLogger(true); - ob_start(); - $logger->add(">> Foo"); - $data = ob_get_clean(); - - $this->assertEqual(">> Foo
    " . PHP_EOL, $data); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/PopBeforeSmtpPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/PopBeforeSmtpPluginTest.php deleted file mode 100644 index 38369256..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/PopBeforeSmtpPluginTest.php +++ /dev/null @@ -1,114 +0,0 @@ -_createConnection(); - - $plugin = $this->_createPlugin('pop.host.tld', 110); - $plugin->setConnection($connection); - - $transport = $this->_createTransport(); - $evt = $this->_createTransportChangeEvent($transport); - - $this->_checking(Expectations::create() - -> one($connection)->connect() - -> ignoring($connection) - ); - - $plugin->beforeTransportStarted($evt); - } - - public function testPluginDisconnectsFromPop3HostBeforeTransportStarts() - { - $connection = $this->_createConnection(); - - $plugin = $this->_createPlugin('pop.host.tld', 110); - $plugin->setConnection($connection); - - $transport = $this->_createTransport(); - $evt = $this->_createTransportChangeEvent($transport); - - $this->_checking(Expectations::create() - -> one($connection)->disconnect() - -> ignoring($connection) - ); - - $plugin->beforeTransportStarted($evt); - } - - public function testPluginDoesNotConnectToSmtpIfBoundToDifferentTransport() - { - $connection = $this->_createConnection(); - - $smtp = $this->_createTransport(); - - $plugin = $this->_createPlugin('pop.host.tld', 110); - $plugin->setConnection($connection); - $plugin->bindSmtp($smtp); - - $transport = $this->_createTransport(); - $evt = $this->_createTransportChangeEvent($transport); - - $this->_checking(Expectations::create() - -> never($connection) - ); - - $plugin->beforeTransportStarted($evt); - } - - public function testPluginCanBindToSpecificTransport() - { - $connection = $this->_createConnection(); - - $smtp = $this->_createTransport(); - - $plugin = $this->_createPlugin('pop.host.tld', 110); - $plugin->setConnection($connection); - $plugin->bindSmtp($smtp); - - $evt = $this->_createTransportChangeEvent($smtp); - - $this->_checking(Expectations::create() - -> one($connection)->connect() - -> ignoring($connection) - ); - - $plugin->beforeTransportStarted($evt); - } - - // -- Creation Methods - - private function _createTransport() - { - return $this->_mock('Swift_Transport'); - } - - private function _createTransportChangeEvent($transport) - { - $evt = $this->_mock('Swift_Events_TransportChangeEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getSource() -> returns($transport) - -> ignoring($evt)->getTransport() -> returns($transport) - ); - - return $evt; - } - - public function _createConnection() - { - return $this->_mock('Swift_Plugins_Pop_Pop3Connection'); - } - - public function _createPlugin($host, $port, $crypto = null) - { - return new Swift_Plugins_PopBeforeSmtpPlugin($host, $port, $crypto); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/RedirectingPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/RedirectingPluginTest.php deleted file mode 100644 index 6f65c25f..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/RedirectingPluginTest.php +++ /dev/null @@ -1,113 +0,0 @@ -assertEqual('fabien@example.com', $plugin->getRecipient()); - $plugin->setRecipient('chris@example.com'); - $this->assertEqual('chris@example.com', $plugin->getRecipient()); - } - - public function testPluginChangesRecipients() - { - $message = Swift_Message::newInstance() - ->setSubject('...') - ->setFrom(array('john@example.com' => 'John Doe')) - ->setTo($to = array( - 'fabien-to@example.com' => 'Fabien (To)', - 'chris-to@example.com' => 'Chris (To)', - )) - ->setCc($cc = array( - 'fabien-cc@example.com' => 'Fabien (Cc)', - 'chris-cc@example.com' => 'Chris (Cc)', - )) - ->setBcc($bcc = array( - 'fabien-bcc@example.com' => 'Fabien (Bcc)', - 'chris-bcc@example.com' => 'Chris (Bcc)', - )) - ->setBody('...') - ; - - $plugin = new Swift_Plugins_RedirectingPlugin('god@example.com'); - - $evt = $this->_createSendEvent($message); - - $plugin->beforeSendPerformed($evt); - - $this->assertEqual($message->getTo(), array('god@example.com' => '')); - $this->assertEqual($message->getCc(), array()); - $this->assertEqual($message->getBcc(), array()); - - $plugin->sendPerformed($evt); - - $this->assertEqual($message->getTo(), $to); - $this->assertEqual($message->getCc(), $cc); - $this->assertEqual($message->getBcc(), $bcc); - } - - public function testPluginRespectsAWhitelistOfPatterns() - { - $message = Swift_Message::newInstance() - ->setSubject('...') - ->setFrom(array('john@example.com' => 'John Doe')) - ->setTo($to = array( - 'fabien-to@example.com' => 'Fabien (To)', - 'chris-to@example.com' => 'Chris (To)', - 'lars-to@internal.com' => 'Lars (To)', - )) - ->setCc($cc = array( - 'fabien-cc@example.com' => 'Fabien (Cc)', - 'chris-cc@example.com' => 'Chris (Cc)', - 'lars-cc@internal.org' => 'Lars (Cc)', - )) - ->setBcc($bcc = array( - 'fabien-bcc@example.com' => 'Fabien (Bcc)', - 'chris-bcc@example.com' => 'Chris (Bcc)', - 'john-bcc@example.org' => 'John (Bcc)', - )) - ->setBody('...') - ; - - $recipient = 'god@example.com'; - $patterns = array('/^.*@internal.[a-z]+$/', '/^john-.*$/'); - - $plugin = new Swift_Plugins_RedirectingPlugin($recipient, $patterns); - - $this->assertEqual($recipient, $plugin->getRecipient()); - $this->assertEqual($plugin->getWhitelist(), $patterns); - - $evt = $this->_createSendEvent($message); - - $plugin->beforeSendPerformed($evt); - - $this->assertEqual($message->getTo(), array('lars-to@internal.com' => 'Lars (To)', 'god@example.com' => null)); - $this->assertEqual($message->getCc(), array('lars-cc@internal.org' => 'Lars (Cc)')); - $this->assertEqual($message->getBcc(), array('john-bcc@example.org' => 'John (Bcc)')); - - $plugin->sendPerformed($evt); - - $this->assertEqual($message->getTo(), $to); - $this->assertEqual($message->getCc(), $cc); - $this->assertEqual($message->getBcc(), $bcc); - } - - // -- Creation Methods - - private function _createSendEvent(Swift_Mime_Message $message) - { - $evt = $this->_mock('Swift_Events_SendEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getMessage() -> returns($message) - -> ignoring($evt) - ); - - return $evt; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/ReporterPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/ReporterPluginTest.php deleted file mode 100644 index 72279d77..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/ReporterPluginTest.php +++ /dev/null @@ -1,120 +0,0 @@ -_createMessage(); - $evt = $this->_createSendEvent(); - $reporter = $this->_createReporter(); - - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array('foo@bar.tld' => 'Foo')) - -> allowing($evt)->getMessage() -> returns($message) - -> allowing($evt)->getFailedRecipients() -> returns(array()) - -> one($reporter)->notify($message, 'foo@bar.tld', Swift_Plugins_Reporter::RESULT_PASS) - -> ignoring($message) - -> ignoring($evt) - ); - - $plugin = new Swift_Plugins_ReporterPlugin($reporter); - $plugin->sendPerformed($evt); - } - - public function testReportingFailedTo() - { - $message = $this->_createMessage(); - $evt = $this->_createSendEvent(); - $reporter = $this->_createReporter(); - - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array( - 'foo@bar.tld' => 'Foo', 'zip@button' => 'Zip' - )) - -> allowing($evt)->getMessage() -> returns($message) - -> allowing($evt)->getFailedRecipients() -> returns(array('zip@button')) - -> one($reporter)->notify($message, 'foo@bar.tld', Swift_Plugins_Reporter::RESULT_PASS) - -> one($reporter)->notify($message, 'zip@button', Swift_Plugins_Reporter::RESULT_FAIL) - -> ignoring($message) - -> ignoring($evt) - ); - - $plugin = new Swift_Plugins_ReporterPlugin($reporter); - $plugin->sendPerformed($evt); - } - - public function testReportingFailedCc() - { - $message = $this->_createMessage(); - $evt = $this->_createSendEvent(); - $reporter = $this->_createReporter(); - - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array( - 'foo@bar.tld' => 'Foo' - )) - -> allowing($message)->getCc() -> returns(array( - 'zip@button' => 'Zip', 'test@test.com' => 'Test' - )) - -> allowing($evt)->getMessage() -> returns($message) - -> allowing($evt)->getFailedRecipients() -> returns(array('zip@button')) - -> one($reporter)->notify($message, 'foo@bar.tld', Swift_Plugins_Reporter::RESULT_PASS) - -> one($reporter)->notify($message, 'zip@button', Swift_Plugins_Reporter::RESULT_FAIL) - -> one($reporter)->notify($message, 'test@test.com', Swift_Plugins_Reporter::RESULT_PASS) - -> ignoring($message) - -> ignoring($evt) - ); - - $plugin = new Swift_Plugins_ReporterPlugin($reporter); - $plugin->sendPerformed($evt); - } - - public function testReportingFailedBcc() - { - $message = $this->_createMessage(); - $evt = $this->_createSendEvent(); - $reporter = $this->_createReporter(); - - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array( - 'foo@bar.tld' => 'Foo' - )) - -> allowing($message)->getBcc() -> returns(array( - 'zip@button' => 'Zip', 'test@test.com' => 'Test' - )) - -> allowing($evt)->getMessage() -> returns($message) - -> allowing($evt)->getFailedRecipients() -> returns(array('zip@button')) - -> one($reporter)->notify($message, 'foo@bar.tld', Swift_Plugins_Reporter::RESULT_PASS) - -> one($reporter)->notify($message, 'zip@button', Swift_Plugins_Reporter::RESULT_FAIL) - -> one($reporter)->notify($message, 'test@test.com', Swift_Plugins_Reporter::RESULT_PASS) - -> ignoring($message) - -> ignoring($evt) - ); - - $plugin = new Swift_Plugins_ReporterPlugin($reporter); - $plugin->sendPerformed($evt); - } - - // -- Creation Methods - - private function _createMessage() - { - return $this->_mock('Swift_Mime_Message'); - } - - private function _createSendEvent() - { - return $this->_mock('Swift_Events_SendEvent'); - } - - private function _createReporter() - { - return $this->_mock('Swift_Plugins_Reporter'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Reporters/HitReporterTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Reporters/HitReporterTest.php deleted file mode 100644 index 3d4e3108..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Reporters/HitReporterTest.php +++ /dev/null @@ -1,69 +0,0 @@ -_hitReporter = new Swift_Plugins_Reporters_HitReporter(); - $this->_message = $this->_mock('Swift_Mime_Message'); - } - - public function testReportingFail() - { - $this->_hitReporter->notify($this->_message, 'foo@bar.tld', - Swift_Plugins_Reporter::RESULT_FAIL - ); - $this->assertEqual(array('foo@bar.tld'), - $this->_hitReporter->getFailedRecipients() - ); - } - - public function testMultipleReports() - { - $this->_hitReporter->notify($this->_message, 'foo@bar.tld', - Swift_Plugins_Reporter::RESULT_FAIL - ); - $this->_hitReporter->notify($this->_message, 'zip@button', - Swift_Plugins_Reporter::RESULT_FAIL - ); - $this->assertEqual(array('foo@bar.tld', 'zip@button'), - $this->_hitReporter->getFailedRecipients() - ); - } - - public function testReportingPassIsIgnored() - { - $this->_hitReporter->notify($this->_message, 'foo@bar.tld', - Swift_Plugins_Reporter::RESULT_FAIL - ); - $this->_hitReporter->notify($this->_message, 'zip@button', - Swift_Plugins_Reporter::RESULT_PASS - ); - $this->assertEqual(array('foo@bar.tld'), - $this->_hitReporter->getFailedRecipients() - ); - } - - public function testBufferCanBeCleared() - { - $this->_hitReporter->notify($this->_message, 'foo@bar.tld', - Swift_Plugins_Reporter::RESULT_FAIL - ); - $this->_hitReporter->notify($this->_message, 'zip@button', - Swift_Plugins_Reporter::RESULT_FAIL - ); - $this->assertEqual(array('foo@bar.tld', 'zip@button'), - $this->_hitReporter->getFailedRecipients() - ); - $this->_hitReporter->clear(); - $this->assertEqual(array(), $this->_hitReporter->getFailedRecipients()); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Reporters/HtmlReporterTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Reporters/HtmlReporterTest.php deleted file mode 100644 index 76ab3e3d..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Reporters/HtmlReporterTest.php +++ /dev/null @@ -1,59 +0,0 @@ -_html = new Swift_Plugins_Reporters_HtmlReporter(); - $this->_message = $this->_mock('Swift_Mime_Message'); - } - - public function testReportingPass() - { - ob_start(); - $this->_html->notify($this->_message, 'foo@bar.tld', - Swift_Plugins_Reporter::RESULT_PASS - ); - $html = ob_get_clean(); - - $this->assertPattern('~ok|pass~i', $html, '%s: Reporter should indicate pass'); - $this->assertPattern('~foo@bar\.tld~', $html, '%s: Reporter should show address'); - } - - public function testReportingFail() - { - ob_start(); - $this->_html->notify($this->_message, 'zip@button', - Swift_Plugins_Reporter::RESULT_FAIL - ); - $html = ob_get_clean(); - - $this->assertPattern('~fail~i', $html, '%s: Reporter should indicate fail'); - $this->assertPattern('~zip@button~', $html, '%s: Reporter should show address'); - } - - public function testMultipleReports() - { - ob_start(); - $this->_html->notify($this->_message, 'foo@bar.tld', - Swift_Plugins_Reporter::RESULT_PASS - ); - $this->_html->notify($this->_message, 'zip@button', - Swift_Plugins_Reporter::RESULT_FAIL - ); - $html = ob_get_clean(); - - $this->assertPattern('~ok|pass~i', $html, '%s: Reporter should indicate pass'); - $this->assertPattern('~foo@bar\.tld~', $html, '%s: Reporter should show address'); - $this->assertPattern('~fail~i', $html, '%s: Reporter should indicate fail'); - $this->assertPattern('~zip@button~', $html, '%s: Reporter should show address'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/ThrottlerPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/ThrottlerPluginTest.php deleted file mode 100644 index 1f7e985d..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/ThrottlerPluginTest.php +++ /dev/null @@ -1,126 +0,0 @@ -_createSleeper(); - $timer = $this->_createTimer(); - - //10MB/min - $plugin = new Swift_Plugins_ThrottlerPlugin( - 10000000, Swift_Plugins_ThrottlerPlugin::BYTES_PER_MINUTE, - $sleeper, $timer - ); - - $this->_checking(Expectations::create() - -> one($timer)->getTimestamp() -> returns(0) - -> one($timer)->getTimestamp() -> returns(1) //expected 0.6 - -> one($timer)->getTimestamp() -> returns(1) //expected 1.2 (sleep 1) - -> one($timer)->getTimestamp() -> returns(2) //expected 1.8 - -> one($timer)->getTimestamp() -> returns(2) //expected 2.4 (sleep 1) - -> ignoring($timer) - - -> exactly(2)->of($sleeper)->sleep(1) - ); - - //10,000,000 bytes per minute - //100,000 bytes per email - - // .: (10,000,000/100,000)/60 emails per second = 1.667 emais/sec - - $message = $this->_createMessageWithByteCount(100000); //100KB - - $evt = $this->_createSendEvent($message); - - for ($i = 0; $i < 5; ++$i) { - $plugin->beforeSendPerformed($evt); - $plugin->sendPerformed($evt); - } - } - - public function testMessagesPerMinuteThrottling() - { - $sleeper = $this->_createSleeper(); - $timer = $this->_createTimer(); - - //60/min - $plugin = new Swift_Plugins_ThrottlerPlugin( - 60, Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE, - $sleeper, $timer - ); - - $this->_checking(Expectations::create() - -> one($timer)->getTimestamp() -> returns(0) - -> one($timer)->getTimestamp() -> returns(0) //expected 1 (sleep 1) - -> one($timer)->getTimestamp() -> returns(2) //expected 2 - -> one($timer)->getTimestamp() -> returns(2) //expected 3 (sleep 1) - -> one($timer)->getTimestamp() -> returns(4) //expected 4 - -> ignoring($timer) - - -> exactly(2)->of($sleeper)->sleep(1) - ); - - //60 messages per minute - //1 message per second - - $message = $this->_createMessageWithByteCount(10); - - $evt = $this->_createSendEvent($message); - - for ($i = 0; $i < 5; ++$i) { - $plugin->beforeSendPerformed($evt); - $plugin->sendPerformed($evt); - } - } - - // -- Creation Methods - - private function _createSleeper() - { - return $this->_mock('Swift_Plugins_Sleeper'); - } - - private function _createTimer() - { - return $this->_mock('Swift_Plugins_Timer'); - } - - private function _createMessageWithByteCount($bytes) - { - $this->_bytes = $bytes; - $msg = $this->_mock('Swift_Mime_Message'); - $this->_checking(Expectations::create() - -> ignoring($msg)->toByteStream(any()) -> calls(array($this, '_write')) - ); - - return $msg; - } - - private function _createSendEvent($message) - { - $evt = $this->_mock('Swift_Events_SendEvent'); - $this->_checking(Expectations::create() - -> ignoring($evt)->getMessage() -> returns($message) - ); - - return $evt; - } - - private $_bytes = 0; - public function _write($invocation) - { - $args = $invocation->getArguments(); - $is = $args[0]; - for ($i = 0; $i < $this->_bytes; ++$i) { - $is->write('x'); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/DKIMSignerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/DKIMSignerTest.php deleted file mode 100644 index 5c11cacf..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/DKIMSignerTest.php +++ /dev/null @@ -1,212 +0,0 @@ -_createHeaders(); - $messageContent = "Hello World"; - $signer = new Swift_Signers_DKIMSigner(file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . '/_samples/dkim/dkim.test.priv'), 'dummy.nxdomain.be', 'dummySelector'); - /* @var $signer Swift_Signers_HeaderSigner */ - $altered = $signer->getAlteredHeaders(); - $signer->reset(); - // Headers - $signer->setHeaders($headers); - // Body - $signer->startBody(); - $signer->write($messageContent); - $signer->endBody(); - // Signing - $signer->addSignature($headers); - } - - // Default Signing - public function testSigningDefaults() - { - $headerSet = $this->_createHeaderSet(); - $messageContent = "Hello World"; - $signer = new Swift_Signers_DKIMSigner(file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . '/_samples/dkim/dkim.test.priv'), 'dummy.nxdomain.be', 'dummySelector'); - $signer->setSignatureTimestamp('1299879181'); - $altered = $signer->getAlteredHeaders(); - $this->assertEqual(array('DKIM-Signature'), $altered); - $signer->reset(); - $signer->setHeaders($headerSet); - $this->assertFalse($headerSet->has('DKIM-Signature')); - $signer->startBody(); - $signer->write($messageContent); - $signer->endBody(); - $signer->addSignature($headerSet); - $this->assertTrue($headerSet->has('DKIM-Signature')); - $dkim = $headerSet->getAll('DKIM-Signature'); - $sig = reset($dkim); - $this->assertEqual($sig->getValue(), 'v=1; a=rsa-sha1; bh=wlbYcY9O9OPInGJ4D0E/rGsvMLE=; d=dummy.nxdomain.be; h=; i=@dummy.nxdomain.be; s=dummySelector; t=1299879181; b=RMSNelzM2O5MAAnMjT3G3/VF36S3DGJXoPCXR001F1WDReu0prGphWjuzK/m6V1pwqQL8cCNg Hi74mTx2bvyAvmkjvQtJf1VMUOCc9WHGcm1Yec66I3ZWoNMGSWZ1EKAm2CtTzyG0IFw4ml9DI wSkyAFxlgicckDD6FibhqwX4w='); - } - - // SHA256 Signing - public function testSigning256() - { - $headerSet = $this->_createHeaderSet(); - $messageContent = "Hello World"; - $signer = new Swift_Signers_DKIMSigner(file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . '/_samples/dkim/dkim.test.priv'), 'dummy.nxdomain.be', 'dummySelector'); - $signer->setHashAlgorithm('rsa-sha256'); - $signer->setSignatureTimestamp('1299879181'); - $altered = $signer->getAlteredHeaders(); - $this->assertEqual(array('DKIM-Signature'), $altered); - $signer->reset(); - $signer->setHeaders($headerSet); - $this->assertFalse($headerSet->has('DKIM-Signature')); - $signer->startBody(); - $signer->write($messageContent); - $signer->endBody(); - $signer->addSignature($headerSet); - $this->assertTrue($headerSet->has('DKIM-Signature')); - $dkim = $headerSet->getAll('DKIM-Signature'); - $sig = reset($dkim); - $this->assertEqual($sig->getValue(), 'v=1; a=rsa-sha256; bh=f+W+hu8dIhf2VAni89o8lF6WKTXi7nViA4RrMdpD5/U=; d=dummy.nxdomain.be; h=; i=@dummy.nxdomain.be; s=dummySelector; t=1299879181; b=jqPmieHzF5vR9F4mXCAkowuphpO4iJ8IAVuioh1BFZ3VITXZj5jlOFxULJMBiiApm2keJirnh u4mzogj444QkpT3lJg8/TBGAYQPdcvkG3KC0jdyN6QpSgpITBJG2BwWa+keXsv2bkQgLRAzNx qRhP45vpHCKun0Tg9LrwW/KCg='); - } - - // Relaxed/Relaxed Hash Signing - public function testSigningRelaxedRelaxed256() - { - $headerSet = $this->_createHeaderSet(); - $messageContent = "Hello World"; - $signer = new Swift_Signers_DKIMSigner(file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . '/_samples/dkim/dkim.test.priv'), 'dummy.nxdomain.be', 'dummySelector'); - $signer->setHashAlgorithm('rsa-sha256'); - $signer->setSignatureTimestamp('1299879181'); - $signer->setBodyCanon('relaxed'); - $signer->setHeaderCanon('relaxed'); - $altered = $signer->getAlteredHeaders(); - $this->assertEqual(array('DKIM-Signature'), $altered); - $signer->reset(); - $signer->setHeaders($headerSet); - $this->assertFalse($headerSet->has('DKIM-Signature')); - $signer->startBody(); - $signer->write($messageContent); - $signer->endBody(); - $signer->addSignature($headerSet); - $this->assertTrue($headerSet->has('DKIM-Signature')); - $dkim = $headerSet->getAll('DKIM-Signature'); - $sig = reset($dkim); - $this->assertEqual($sig->getValue(), 'v=1; a=rsa-sha256; bh=f+W+hu8dIhf2VAni89o8lF6WKTXi7nViA4RrMdpD5/U=; d=dummy.nxdomain.be; h=; i=@dummy.nxdomain.be; s=dummySelector; c=relaxed/relaxed; t=1299879181; b=gzOI+PX6HpZKQFzwwmxzcVJsyirdLXOS+4pgfCpVHQIdqYusKLrhlLeFBTNoz75HrhNvGH6T0 Rt3w5aTqkrWfUuAEYt0Ns14GowLM7JojaFN+pZ4eYnRB3CBBgW6fee4NEMD5WPca3uS09tr1E 10RYh9ILlRtl+84sovhx5id3Y='); - } - - - // Relaxed/Simple Hash Signing - public function testSigningRelaxedSimple256() - { - $headerSet = $this->_createHeaderSet(); - $messageContent = "Hello World"; - $signer = new Swift_Signers_DKIMSigner(file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . '/_samples/dkim/dkim.test.priv'), 'dummy.nxdomain.be', 'dummySelector'); - $signer->setHashAlgorithm('rsa-sha256'); - $signer->setSignatureTimestamp('1299879181'); - $signer->setHeaderCanon('relaxed'); - $altered = $signer->getAlteredHeaders(); - $this->assertEqual(array('DKIM-Signature'), $altered); - $signer->reset(); - $signer->setHeaders($headerSet); - $this->assertFalse($headerSet->has('DKIM-Signature')); - $signer->startBody(); - $signer->write($messageContent); - $signer->endBody(); - $signer->addSignature($headerSet); - $this->assertTrue($headerSet->has('DKIM-Signature')); - $dkim = $headerSet->getAll('DKIM-Signature'); - $sig = reset($dkim); - $this->assertEqual($sig->getValue(), 'v=1; a=rsa-sha256; bh=f+W+hu8dIhf2VAni89o8lF6WKTXi7nViA4RrMdpD5/U=; d=dummy.nxdomain.be; h=; i=@dummy.nxdomain.be; s=dummySelector; c=relaxed; t=1299879181; b=dLPJNec5v81oelyzGOY0qPqTlGnQeNfUNBOrV/JKbStr3NqWGI9jH4JAe2YvO2V32lfPNoby1 4MMzZ6EPkaZkZDDSPa+53YbCPQAlqiD9QZZIUe2UNM33HN8yAMgiWEF5aP7MbQnxeVZMfVLEl 9S8qOImu+K5JZqhQQTL0dgLwA='); - } - - // Simple/Relaxed Hash Signing - public function testSigningSimpleRelaxed256() - { - $headerSet = $this->_createHeaderSet(); - $messageContent = "Hello World"; - $signer = new Swift_Signers_DKIMSigner(file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . '/_samples/dkim/dkim.test.priv'), 'dummy.nxdomain.be', 'dummySelector'); - $signer->setHashAlgorithm('rsa-sha256'); - $signer->setSignatureTimestamp('1299879181'); - $signer->setBodyCanon('relaxed'); - $altered = $signer->getAlteredHeaders(); - $this->assertEqual(array('DKIM-Signature'), $altered); - $signer->reset(); - $signer->setHeaders($headerSet); - $this->assertFalse($headerSet->has('DKIM-Signature')); - $signer->startBody(); - $signer->write($messageContent); - $signer->endBody(); - $signer->addSignature($headerSet); - $this->assertTrue($headerSet->has('DKIM-Signature')); - $dkim = $headerSet->getAll('DKIM-Signature'); - $sig = reset($dkim); - $this->assertEqual($sig->getValue(), 'v=1; a=rsa-sha256; bh=f+W+hu8dIhf2VAni89o8lF6WKTXi7nViA4RrMdpD5/U=; d=dummy.nxdomain.be; h=; i=@dummy.nxdomain.be; s=dummySelector; c=simple/relaxed; t=1299879181; b=M5eomH/zamyzix9kOes+6YLzQZxuJdBP4x3nP9zF2N26eMLG2/cBKbnNyqiOTDhJdYfWPbLIa 1CWnjST0j5p4CpeOkGYuiE+M4TWEZwhRmRWootlPO3Ii6XpbBJKFk1o9zviS7OmXblUUE4aqb yRSIMDhtLdCK5GlaCneFLN7RQ='); - } - - // -- Creation Methods - private function _createHeaderSet() - { - $cache = new Swift_KeyCache_ArrayKeyCache(new Swift_KeyCache_SimpleKeyCacheInputStream()); - $factory = new Swift_CharacterReaderFactory_SimpleCharacterReaderFactory(); - $contentEncoder = new Swift_Mime_ContentEncoder_Base64ContentEncoder(); - - $headerEncoder = new Swift_Mime_HeaderEncoder_QpHeaderEncoder(new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8')); - $paramEncoder = new Swift_Encoder_Rfc2231Encoder(new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8')); - $grammar = new Swift_Mime_Grammar(); - $headers = new Swift_Mime_SimpleHeaderSet(new Swift_Mime_SimpleHeaderFactory($headerEncoder, $paramEncoder, $grammar)); - return $headers; - } - - /** - * @return Swift_Mime_Headers - */ - private function _createHeaders() - { - $x = 0; - $cache = new Swift_KeyCache_ArrayKeyCache(new Swift_KeyCache_SimpleKeyCacheInputStream()); - $factory = new Swift_CharacterReaderFactory_SimpleCharacterReaderFactory(); - $contentEncoder = new Swift_Mime_ContentEncoder_Base64ContentEncoder(); - - $headerEncoder = new Swift_Mime_HeaderEncoder_QpHeaderEncoder(new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8')); - $paramEncoder = new Swift_Encoder_Rfc2231Encoder(new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8')); - $grammar = new Swift_Mime_Grammar(); - $headerFactory = new Swift_Mime_SimpleHeaderFactory($headerEncoder, $paramEncoder, $grammar); - $headers = $this->_mock('Swift_Mime_HeaderSet'); - $this->_checking(Expectations::create() - ->ignoring($headers) - ->listAll() - ->returns(array('From', 'To', 'Date', 'Subject')) - ->ignoring($headers) - ->has('From') - ->returns(True) - ->ignoring($headers) - ->getAll('From') - ->returns(array($headerFactory->createMailboxHeader('From', 'test@test.test'))) - ->ignoring($headers) - ->has('To') - ->returns(True) - ->ignoring($headers) - ->getAll('To') - ->returns(array($headerFactory->createMailboxHeader('To', 'test@test.test'))) - ->ignoring($headers) - ->has('Date') - ->returns(True) - ->ignoring($headers) - ->getAll('Date') - ->returns(array($headerFactory->createTextHeader('Date', 'Fri, 11 Mar 2011 20:56:12 +0000 (GMT)'))) - ->ignoring($headers) - ->has('Subject') - ->returns(True) - ->ignoring($headers) - ->getAll('Subject') - ->returns(array($headerFactory->createTextHeader('Subject', 'Foo Bar Text Message'))) - ->ignoring($headers) - ->addTextHeader('DKIM-Signature', any()) - ->returns(true) - ->ignoring($headers) - ->getAll('DKIM-Signature') - ->returns(array($headerFactory->createTextHeader('DKIM-Signature', 'Foo Bar Text Message')))); - return $headers; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/SMimeSignerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/SMimeSignerTest.php deleted file mode 100644 index 8e9cfc88..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/SMimeSignerTest.php +++ /dev/null @@ -1,515 +0,0 @@ -replacementFactory = Swift_DependencyContainer::getInstance() - ->lookup('transport.replacementfactory'); - - $this->samplesDir = str_replace('\\', '/', realpath(dirname(__FILE__) . '/../../../_samples/')) . '/'; - } - - public function testUnSingedMessage() - { - $message = Swift_SignedMessage::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - ->setBody('Here is the message itself'); - - $this->assertEqual('Here is the message itself', $message->getBody()); - } - - public function testSingedMessage() - { - $message = Swift_SignedMessage::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - ->setBody('Here is the message itself'); - - $signer = new Swift_Signers_SMimeSigner(); - $signer->setSignCertificate($this->samplesDir . 'smime/sign.crt', $this->samplesDir . 'smime/sign.key'); - $message->attachSigner($signer); - - $messageStream = $this->newFilteredStream(); - $message->toByteStream($messageStream); - $messageStream->commit(); - - $entityString = $messageStream->getContent(); - $headers = self::getHeadersOfMessage($entityString); - - if (!($boundary = $this->getBoundary($headers['content-type']))) { - return false; - } - - $expectedBody = <<assertValidVerify($expectedBody, $messageStream); - unset($messageStream); - } - - public function testSingedMessageBinary() - { - $message = Swift_SignedMessage::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - ->setBody('Here is the message itself'); - - $signer = new Swift_Signers_SMimeSigner(); - $signer->setSignCertificate($this->samplesDir . 'smime/sign.crt', $this->samplesDir . 'smime/sign.key', PKCS7_BINARY); - $message->attachSigner($signer); - - $messageStream = $this->newFilteredStream(); - $message->toByteStream($messageStream); - $messageStream->commit(); - - $entityString = $messageStream->getContent(); - $headers = self::getHeadersOfMessage($entityString); - - if (!preg_match('#^application/(x\-)?pkcs7-mime; smime-type=signed\-data;#', $headers['content-type'])) { - $this->fail('Content-type does not match.'); - - return false; - } - - $this->assertEqual($headers['content-transfer-encoding'], 'base64'); - $this->assertEqual($headers['content-disposition'], 'attachment; filename="smime.p7m"'); - - $expectedBody = '(?:^[a-zA-Z0-9\/\\r\\n+]*={0,2})'; - - $messageStreamClean = $this->newFilteredStream(); - - $this->assertValidVerify($expectedBody, $messageStream); - unset($messageStreamClean, $messageStream); - } - - public function testSingedMessageWithAttachments() - { - $message = Swift_SignedMessage::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - ->setBody('Here is the message itself'); - - $message->attach(Swift_Attachment::fromPath($this->samplesDir . '/files/textfile.zip')); - - $signer = new Swift_Signers_SMimeSigner(); - $signer->setSignCertificate($this->samplesDir . 'smime/sign.crt', $this->samplesDir . 'smime/sign.key'); - $message->attachSigner($signer); - - $messageStream = $this->newFilteredStream(); - $message->toByteStream($messageStream); - $messageStream->commit(); - - $entityString = $messageStream->getContent(); - $headers = self::getHeadersOfMessage($entityString); - - if (!($boundary = $this->getBoundary($headers['content-type']))) { - return false; - } - - $expectedBody = <<assertValidVerify($expectedBody, $messageStream); - unset($messageStream); - } - - public function testEncryptedMessage() - { - $message = Swift_SignedMessage::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - ->setBody('Here is the message itself'); - - $originalMessage = $this->cleanMessage($message->toString()); - - $signer = new Swift_Signers_SMimeSigner(); - $signer->setEncryptCertificate($this->samplesDir . 'smime/encrypt.crt'); - $message->attachSigner($signer); - - $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); - $message->toByteStream($messageStream); - $messageStream->commit(); - - $entityString = $messageStream->getContent(); - $headers = self::getHeadersOfMessage($entityString); - - if (!preg_match('#^application/(x\-)?pkcs7-mime; smime-type=enveloped\-data;#', $headers['content-type'])) { - $this->fail('Content-type does not match.'); - - return false; - } - - $expectedBody = '(?:^[a-zA-Z0-9\/\\r\\n+]*={0,2})'; - - $decryptedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); - - if (!openssl_pkcs7_decrypt($messageStream->getPath(), $decryptedMessageStream->getPath(), 'file://' . $this->samplesDir . 'smime/encrypt.crt', array('file://' . $this->samplesDir . 'smime/encrypt.key', 'swift'))) { - $this->fail(sprintf('Decrypt of the message failed. Internal error "%s".', openssl_error_string())); - } - - $this->assertEqual($originalMessage, $decryptedMessageStream->getContent()); - unset($decryptedMessageStream, $messageStream); - } - - public function testEncryptedMessageWithMultipleCerts() - { - $message = Swift_SignedMessage::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - ->setBody('Here is the message itself'); - - $originalMessage = $this->cleanMessage($message->toString()); - - $signer = new Swift_Signers_SMimeSigner(); - $signer->setEncryptCertificate(array($this->samplesDir . 'smime/encrypt.crt', $this->samplesDir . 'smime/encrypt2.crt')); - $message->attachSigner($signer); - - $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); - $message->toByteStream($messageStream); - $messageStream->commit(); - - $entityString = $messageStream->getContent(); - $headers = self::getHeadersOfMessage($entityString); - - if (!preg_match('#^application/(x\-)?pkcs7-mime; smime-type=enveloped\-data;#', $headers['content-type'])) { - $this->fail('Content-type does not match.'); - - return false; - } - - $expectedBody = '(?:^[a-zA-Z0-9\/\\r\\n+]*={0,2})'; - - $decryptedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); - - if (!openssl_pkcs7_decrypt($messageStream->getPath(), $decryptedMessageStream->getPath(), 'file://' . $this->samplesDir . 'smime/encrypt.crt', array('file://' . $this->samplesDir . 'smime/encrypt.key', 'swift'))) { - $this->fail(sprintf('Decrypt of the message failed. Internal error "%s".', openssl_error_string())); - } - - $this->assertEqual($originalMessage, $decryptedMessageStream->getContent()); - unset($decryptedMessageStream); - - $decryptedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); - - if (!openssl_pkcs7_decrypt($messageStream->getPath(), $decryptedMessageStream->getPath(), 'file://' . $this->samplesDir . 'smime/encrypt2.crt', array('file://' . $this->samplesDir . 'smime/encrypt2.key', 'swift'))) { - $this->fail(sprintf('Decrypt of the message failed. Internal error "%s".', openssl_error_string())); - } - - $this->assertEqual($originalMessage, $decryptedMessageStream->getContent()); - unset($decryptedMessageStream, $messageStream); - } - - public function testSignThenEncryptedMessage() - { - $message = Swift_SignedMessage::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - ->setBody('Here is the message itself'); - - $signer = new Swift_Signers_SMimeSigner(); - $signer->setSignCertificate($this->samplesDir . 'smime/sign.crt', $this->samplesDir . 'smime/sign.key'); - $signer->setEncryptCertificate($this->samplesDir . 'smime/encrypt.crt'); - $message->attachSigner($signer); - - $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); - $message->toByteStream($messageStream); - $messageStream->commit(); - - $entityString = $messageStream->getContent(); - $headers = self::getHeadersOfMessage($entityString); - - if (!preg_match('#^application/(x\-)?pkcs7-mime; smime-type=enveloped\-data;#', $headers['content-type'])) { - $this->fail('Content-type does not match.'); - - return false; - } - - $expectedBody = '(?:^[a-zA-Z0-9\/\\r\\n+]*={0,2})'; - - $decryptedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); - - if (!openssl_pkcs7_decrypt($messageStream->getPath(), $decryptedMessageStream->getPath(), 'file://' . $this->samplesDir . 'smime/encrypt.crt', array('file://' . $this->samplesDir . 'smime/encrypt.key', 'swift'))) { - $this->fail(sprintf('Decrypt of the message failed. Internal error "%s".', openssl_error_string())); - } - - $entityString = $decryptedMessageStream->getContent(); - $headers = self::getHeadersOfMessage($entityString); - - if (!($boundary = $this->getBoundary($headers['content-type']))) { - return false; - } - - $expectedBody = <<assertValidVerify($expectedBody, $decryptedMessageStream)) { - return false; - } - - unset($decryptedMessageStream, $messageStream); - } - - public function testEncryptThenSignMessage() - { - $message = Swift_SignedMessage::newInstance('Wonderful Subject') - ->setFrom(array('john@doe.com' => 'John Doe')) - ->setTo(array('receiver@domain.org', 'other@domain.org' => 'A name')) - ->setBody('Here is the message itself'); - - $originalMessage = $this->cleanMessage($message->toString()); - - $signer = Swift_Signers_SMimeSigner::newInstance(); - $signer->setSignCertificate($this->samplesDir . 'smime/sign.crt', $this->samplesDir . 'smime/sign.key'); - $signer->setEncryptCertificate($this->samplesDir . 'smime/encrypt.crt'); - $signer->setSignThenEncrypt(false); - $message->attachSigner($signer); - - $messageStream = $this->newFilteredStream(); - $message->toByteStream($messageStream); - $messageStream->commit(); - - $entityString = $messageStream->getContent(); - $headers = self::getHeadersOfMessage($entityString); - - if (!($boundary = $this->getBoundary($headers['content-type']))) { - return false; - } - - $expectedBody = <<MIME-Version: 1\.0 -Content-Disposition: attachment; filename="smime\.p7m" -Content-Type: application/(x\-)?pkcs7-mime; smime-type=enveloped-data; name="smime\.p7m" -Content-Transfer-Encoding: base64 - -(?:^[a-zA-Z0-9\/\\r\\n+]*={0,2}) - - -)--$boundary -Content-Type: application/(x\-)?pkcs7-signature; name="smime\.p7s" -Content-Transfer-Encoding: base64 -Content-Disposition: attachment; filename="smime\.p7s" - -(?:^[a-zA-Z0-9\/\\r\\n+]*={0,2}) - ---$boundary-- -OEL; - - if (!$this->assertValidVerify($expectedBody, $messageStream)) { - return false; - } - - $expectedBody = str_replace("\n", "\r\n", $expectedBody); - if (!preg_match('%' . $expectedBody . '*%m', $entityString, $entities)) { - $this->fail('Failed regex match.'); - - return false; - } - - $messageStreamClean = new Swift_ByteStream_TemporaryFileByteStream(); - $messageStreamClean->write($entities['encrypted_message']); - - $decryptedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); - - if (!openssl_pkcs7_decrypt($messageStreamClean->getPath(), $decryptedMessageStream->getPath(), 'file://' . $this->samplesDir . 'smime/encrypt.crt', array('file://' . $this->samplesDir . 'smime/encrypt.key', 'swift'))) { - $this->fail(sprintf('Decrypt of the message failed. Internal error "%s".', openssl_error_string())); - } - - $this->assertEqual($originalMessage, $decryptedMessageStream->getContent()); - unset($messageStreamClean, $messageStream, $decryptedMessageStream); - } - - protected function assertValidVerify($expected, Swift_ByteStream_TemporaryFileByteStream $messageStream) - { - $actual = $messageStream->getContent(); - - // File is UNIX encoded so convert them to correct line ending - $expected = str_replace("\n", "\r\n", $expected); - - $actual = trim(self::getBodyOfMessage($actual)); - if (!$this->assertPattern('%^' . $expected . '$\s*%m', $actual)) { - return false; - } - - $opensslOutput = new Swift_ByteStream_TemporaryFileByteStream(); - $verify = openssl_pkcs7_verify($messageStream->getPath(), null, $opensslOutput->getPath(), array($this->samplesDir . 'smime/ca.crt')); - - if (false === $verify) { - $this->fail('Verification of the message failed.'); - - return false; - } elseif (-1 === $verify) { - $this->fail(sprintf('Verification of the message failed. Internal error "%s".', openssl_error_string())); - - return false; - } - - return true; - } - - protected function getBoundary($contentType) - { - if (!preg_match('/boundary=("[^"]+"|(?:[^\s]+|$))/is', $contentType, $contentTypeData)) { - $this->fail('Failed to find Boundary parameter'); - - return false; - } - - return trim($contentTypeData[1], '"'); - } - - protected function newFilteredStream() - { - $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); - $messageStream->addFilter($this->replacementFactory->createFilter("\r\n", "\n"), 'CRLF to LF'); - $messageStream->addFilter($this->replacementFactory->createFilter("\n", "\r\n"), 'LF to CRLF'); - - return $messageStream; - } - - protected static function getBodyOfMessage($message) - { - return substr($message, strpos($message, "\r\n\r\n")); - } - - /** - * Strips of the sender headers and Mime-Version. - * - * @param Swift_ByteStream_TemporaryFileByteStream $messageStream - * @param Swift_ByteStream_TemporaryFileByteStream $inputStream - */ - protected function cleanMessage($content) - { - $newContent = ''; - - $headers = self::getHeadersOfMessage($content); - foreach ($headers as $headerName => $value) { - if (!in_array($headerName, array('content-type', 'content-transfer-encoding', 'content-disposition'))) { - continue; - } - - $headerName = explode('-', $headerName); - $headerName = array_map('ucfirst', $headerName); - $headerName = implode('-', $headerName); - - if (strlen($value) > 62) { - $value = wordwrap($value, 62, "\n "); - } - - $newContent .= "$headerName: $value\r\n"; - } - - return $newContent . "\r\n" . ltrim(self::getBodyOfMessage($content)); - } - - /** - * Returns the headers of the message. - * - * Header-names are lowercase. - * - * @param string $message - * - * @return array - */ - protected static function getHeadersOfMessage($message) - { - $headersPosEnd = strpos($message, "\r\n\r\n"); - $headerData = substr($message, 0, $headersPosEnd); - $headerLines = explode("\r\n", $headerData); - - if (empty($headerLines)) { - return array(); - } - - $headers = array(); - - foreach ($headerLines as $headerLine) { - if (ctype_space($headerLines[0]) || false === strpos($headerLine, ':')) { - $headers[$currentHeaderName] .= ' ' . trim($headerLine); - continue; - } - - $header = explode(':', $headerLine, 2); - $currentHeaderName = strtolower($header[0]); - $headers[$currentHeaderName] = trim($header[1]); - } - - return $headers; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/ByteArrayReplacementFilterTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/ByteArrayReplacementFilterTest.php deleted file mode 100644 index 5a6977fd..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/ByteArrayReplacementFilterTest.php +++ /dev/null @@ -1,135 +0,0 @@ -_createFilter(array(0x61, 0x62), array(0x63, 0x64)); - $this->assertEqual( - array(0x59, 0x60, 0x63, 0x64, 0x65), - $filter->filter(array(0x59, 0x60, 0x61, 0x62, 0x65)) - ); - } - - public function testShouldBufferReturnsTrueIfPartialMatchAtEndOfBuffer() - { - $filter = $this->_createFilter(array(0x61, 0x62), array(0x63, 0x64)); - $this->assertTrue($filter->shouldBuffer(array(0x59, 0x60, 0x61)), - '%s: Filter should buffer since 0x61 0x62 is the needle and the ending ' . - '0x61 could be from 0x61 0x62' - ); - } - - public function testFilterCanMakeMultipleReplacements() - { - $filter = $this->_createFilter(array(array(0x61), array(0x62)), array(0x63)); - $this->assertEqual( - array(0x60, 0x63, 0x60, 0x63, 0x60), - $filter->filter(array(0x60, 0x61, 0x60, 0x62, 0x60)) - ); - } - - public function testMultipleReplacementsCanBeDifferent() - { - $filter = $this->_createFilter(array(array(0x61), array(0x62)), array(array(0x63), array(0x64))); - $this->assertEqual( - array(0x60, 0x63, 0x60, 0x64, 0x60), - $filter->filter(array(0x60, 0x61, 0x60, 0x62, 0x60)) - ); - } - - public function testShouldBufferReturnsFalseIfPartialMatchNotAtEndOfString() - { - $filter = $this->_createFilter(array(0x0D, 0x0A), array(0x0A)); - $this->assertFalse($filter->shouldBuffer(array(0x61, 0x62, 0x0D, 0x0A, 0x63)), - '%s: Filter should not buffer since x0Dx0A is the needle and is not at EOF' - ); - } - - public function testShouldBufferReturnsTrueIfAnyOfMultipleMatchesAtEndOfString() - { - $filter = $this->_createFilter(array(array(0x61, 0x62), array(0x63)), array(0x64)); - $this->assertTrue($filter->shouldBuffer(array(0x59, 0x60, 0x61)), - '%s: Filter should buffer since 0x61 0x62 is a needle and the ending ' . - '0x61 could be from 0x61 0x62' - ); - } - - public function testConvertingAllLineEndingsToCRLFWhenInputIsLF() - { - $filter = $this->_createFilter( - array(array(0x0D, 0x0A), array(0x0D), array(0x0A)), - array(array(0x0A), array(0x0A), array(0x0D, 0x0A)) - ); - - $this->assertEqual( - array(0x60, 0x0D, 0x0A, 0x61, 0x0D, 0x0A, 0x62, 0x0D, 0x0A, 0x63), - $filter->filter(array(0x60, 0x0A, 0x61, 0x0A, 0x62, 0x0A, 0x63)) - ); - } - - public function testConvertingAllLineEndingsToCRLFWhenInputIsCR() - { - $filter = $this->_createFilter( - array(array(0x0D, 0x0A), array(0x0D), array(0x0A)), - array(array(0x0A), array(0x0A), array(0x0D, 0x0A)) - ); - - $this->assertEqual( - array(0x60, 0x0D, 0x0A, 0x61, 0x0D, 0x0A, 0x62, 0x0D, 0x0A, 0x63), - $filter->filter(array(0x60, 0x0D, 0x61, 0x0D, 0x62, 0x0D, 0x63)) - ); - } - - public function testConvertingAllLineEndingsToCRLFWhenInputIsCRLF() - { - $filter = $this->_createFilter( - array(array(0x0D, 0x0A), array(0x0D), array(0x0A)), - array(array(0x0A), array(0x0A), array(0x0D, 0x0A)) - ); - - $this->assertEqual( - array(0x60, 0x0D, 0x0A, 0x61, 0x0D, 0x0A, 0x62, 0x0D, 0x0A, 0x63), - $filter->filter(array(0x60, 0x0D, 0x0A, 0x61, 0x0D, 0x0A, 0x62, 0x0D, 0x0A, 0x63)) - ); - } - - public function testConvertingAllLineEndingsToCRLFWhenInputIsLFCR() - { - $filter = $this->_createFilter( - array(array(0x0D, 0x0A), array(0x0D), array(0x0A)), - array(array(0x0A), array(0x0A), array(0x0D, 0x0A)) - ); - - $this->assertEqual( - array(0x60, 0x0D, 0x0A, 0x0D, 0x0A, 0x61, 0x0D, 0x0A, 0x0D, 0x0A, 0x62, 0x0D, 0x0A, 0x0D, 0x0A, 0x63), - $filter->filter(array(0x60, 0x0A, 0x0D, 0x61, 0x0A, 0x0D, 0x62, 0x0A, 0x0D, 0x63)) - ); - } - - public function testConvertingAllLineEndingsToCRLFWhenInputContainsLFLF() - { - //Lighthouse Bug #23 - - $filter = $this->_createFilter( - array(array(0x0D, 0x0A), array(0x0D), array(0x0A)), - array(array(0x0A), array(0x0A), array(0x0D, 0x0A)) - ); - - $this->assertEqual( - array(0x60, 0x0D, 0x0A, 0x0D, 0x0A, 0x61, 0x0D, 0x0A, 0x0D, 0x0A, 0x62, 0x0D, 0x0A, 0x0D, 0x0A, 0x63), - $filter->filter(array(0x60, 0x0A, 0x0A, 0x61, 0x0A, 0x0A, 0x62, 0x0A, 0x0A, 0x63)) - ); - } - - // -- Creation methods - - private function _createFilter($search, $replace) - { - return new Swift_StreamFilters_ByteArrayReplacementFilter($search, $replace); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/StringReplacementFilterFactoryTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/StringReplacementFilterFactoryTest.php deleted file mode 100644 index 81909884..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/StringReplacementFilterFactoryTest.php +++ /dev/null @@ -1,41 +0,0 @@ -_createFactory(); - $this->assertIsA($factory->createFilter('a', 'b'), - 'Swift_StreamFilters_StringReplacementFilter' - ); - } - - public function testSameInstancesAreCached() - { - $factory = $this->_createFactory(); - $filter1 = $factory->createFilter('a', 'b'); - $filter2 = $factory->createFilter('a', 'b'); - $this->assertSame($filter1, $filter2, '%s: Instances should be cached'); - } - - public function testDifferingInstancesAreNotCached() - { - $factory = $this->_createFactory(); - $filter1 = $factory->createFilter('a', 'b'); - $filter2 = $factory->createFilter('a', 'c'); - $this->assertNotEqual($filter1, $filter2, - '%s: Differing instances should not be cached' - ); - } - - // -- Creation methods - - private function _createFactory() - { - return new Swift_StreamFilters_StringReplacementFilterFactory(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/StringReplacementFilterTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/StringReplacementFilterTest.php deleted file mode 100644 index 712f1dc4..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/StringReplacementFilterTest.php +++ /dev/null @@ -1,59 +0,0 @@ -_createFilter('foo', 'bar'); - $this->assertEqual('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(array('a', 'b'), 'foo'); - $this->assertEqual('XfooYfooZ', $filter->filter('XaYbZ')); - } - - public function testMultipleReplacementsCanBeDifferent() - { - $filter = $this->_createFilter(array('a', 'b'), array('foo', 'zip')); - $this->assertEqual('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(array('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"' - ); - } - - // -- Creation methods - - private function _createFilter($search, $replace) - { - return new Swift_StreamFilters_StringReplacementFilter($search, $replace); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpEventSupportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpEventSupportTest.php deleted file mode 100644 index e1749f2f..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpEventSupportTest.php +++ /dev/null @@ -1,378 +0,0 @@ -_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $listener = $this->_mock('Swift_Events_EventListener'); - $smtp = $this->_getTransport($buf, $dispatcher); - $this->_checking(Expectations::create() - -> one($dispatcher)->bindEventListener($listener) - ); - $smtp->registerPlugin($listener); - } - - public function testSendingDispatchesBeforeSendEvent() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $message = $this->_createMessage(); - $smtp = $this->_getTransport($buf, $dispatcher); - $evt = $this->_mock('Swift_Events_SendEvent'); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('chris@swiftmailer.org'=>null)) - -> allowing($message)->getTo() -> returns(array('mark@swiftmailer.org'=>'Mark')) - -> ignoring($message) - -> one($dispatcher)->createSendEvent(optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'beforeSendPerformed') - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(1, $smtp->send($message)); - } - - public function testSendingDispatchesSendEvent() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $message = $this->_createMessage(); - $smtp = $this->_getTransport($buf, $dispatcher); - $evt = $this->_mock('Swift_Events_SendEvent'); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('chris@swiftmailer.org'=>null)) - -> allowing($message)->getTo() -> returns(array('mark@swiftmailer.org'=>'Mark')) - -> ignoring($message) - -> one($dispatcher)->createSendEvent(optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'sendPerformed') - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(1, $smtp->send($message)); - } - - public function testSendEventCapturesFailures() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_SendEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('chris@swiftmailer.org'=>null)) - -> allowing($message)->getTo() -> returns(array('mark@swiftmailer.org'=>'Mark')) - -> ignoring($message) - -> one($buf)->write("MAIL FROM: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(2) - -> one($buf)->readLine(2) -> returns("500 Not now\r\n") - -> allowing($dispatcher)->createSendEvent($smtp, optional()) -> returns($evt) - -> one($evt)->setFailedRecipients(array('mark@swiftmailer.org')) - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(0, $smtp->send($message)); - } - - public function testSendEventHasResultFailedIfAllFailures() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_SendEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('chris@swiftmailer.org'=>null)) - -> allowing($message)->getTo() -> returns(array('mark@swiftmailer.org'=>'Mark')) - -> ignoring($message) - -> one($buf)->write("MAIL FROM: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(2) - -> one($buf)->readLine(2) -> returns("500 Not now\r\n") - -> allowing($dispatcher)->createSendEvent($smtp, optional()) -> returns($evt) - -> one($evt)->setResult(Swift_Events_SendEvent::RESULT_FAILED) - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(0, $smtp->send($message)); - } - - public function testSendEventHasResultTentativeIfSomeFailures() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_SendEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('chris@swiftmailer.org'=>null)) - -> allowing($message)->getTo() -> returns(array( - 'mark@swiftmailer.org'=>'Mark', 'chris@site.tld'=>'Chris' - )) - -> ignoring($message) - -> one($buf)->write("MAIL FROM: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(2) - -> one($buf)->readLine(2) -> returns("500 Not now\r\n") - -> allowing($dispatcher)->createSendEvent($smtp, optional()) -> returns($evt) - -> one($evt)->setResult(Swift_Events_SendEvent::RESULT_TENTATIVE) - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(1, $smtp->send($message)); - } - - public function testSendEventHasResultSuccessIfNoFailures() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_SendEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('chris@swiftmailer.org'=>null)) - -> allowing($message)->getTo() -> returns(array( - 'mark@swiftmailer.org'=>'Mark', 'chris@site.tld'=>'Chris' - )) - -> ignoring($message) - -> allowing($dispatcher)->createSendEvent($smtp, optional()) -> returns($evt) - -> one($evt)->setResult(Swift_Events_SendEvent::RESULT_SUCCESS) - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(2, $smtp->send($message)); - } - - public function testCancellingEventBubbleBeforeSendStopsEvent() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_SendEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('chris@swiftmailer.org'=>null)) - -> allowing($message)->getTo() -> returns(array('mark@swiftmailer.org'=>'Mark')) - -> ignoring($message) - -> allowing($dispatcher)->createSendEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'beforeSendPerformed') - -> ignoring($dispatcher) - -> atLeast(1)->of($evt)->bubbleCancelled() -> returns(true) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(0, $smtp->send($message)); - } - - public function testStartingTransportDispatchesTransportChangeEvent() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_TransportChangeEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $this->_checking(Expectations::create() - -> allowing($dispatcher)->createTransportChangeEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'transportStarted') - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - } - - public function testStartingTransportDispatchesBeforeTransportChangeEvent() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_TransportChangeEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $this->_checking(Expectations::create() - -> allowing($dispatcher)->createTransportChangeEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'beforeTransportStarted') - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - } - - public function testCancellingBubbleBeforeTransportStartStopsEvent() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_TransportChangeEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $this->_checking(Expectations::create() - -> allowing($dispatcher)->createTransportChangeEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'beforeTransportStarted') - -> allowing($evt)->bubbleCancelled() -> returns(true) - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - - $this->assertFalse($smtp->isStarted(), - '%s: Transport should not be started since event bubble was cancelled' - ); - } - - public function testStoppingTransportDispatchesTransportChangeEvent() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_TransportChangeEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $this->_checking(Expectations::create() - -> allowing($dispatcher)->createTransportChangeEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'transportStopped') - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->stop(); - } - - public function testStoppingTransportDispatchesBeforeTransportChangeEvent() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_TransportChangeEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $this->_checking(Expectations::create() - -> allowing($dispatcher)->createTransportChangeEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'beforeTransportStopped') - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->stop(); - } - - public function testCancellingBubbleBeforeTransportStoppedStopsEvent() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_TransportChangeEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $seq = $this->_sequence('stopping transport'); - $this->_checking(Expectations::create() - -> allowing($dispatcher)->createTransportChangeEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'beforeTransportStopped') -> inSequence($seq) - -> allowing($evt)->bubbleCancelled() -> inSequence($seq) -> returns(true) - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->stop(); - - $this->assertTrue($smtp->isStarted(), - '%s: Transport should not be stopped since event bubble was cancelled' - ); - } - - public function testResponseEventsAreGenerated() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_ResponseEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $this->_checking(Expectations::create() - -> allowing($dispatcher)->createResponseEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'responseReceived') - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - } - - public function testCommandEventsAreGenerated() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_CommandEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $this->_checking(Expectations::create() - -> allowing($dispatcher)->createCommandEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'commandSent') - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - } - - public function testExceptionsCauseExceptionEvents() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_TransportExceptionEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $this->_checking(Expectations::create() - -> atLeast(1)->of($buf)->readLine(any()) -> returns("503 I'm sleepy, go away!\r\n") - -> allowing($dispatcher)->createTransportExceptionEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'exceptionThrown') - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - try { - $smtp->start(); - $this->fail('TransportException should be thrown on invalid response'); - } catch (Swift_TransportException $e) { - } - } - - public function testExceptionBubblesCanBeCancelled() - { - $buf = $this->_getBuffer(); - $dispatcher = $this->_createEventDispatcher(false); - $evt = $this->_mock('Swift_Events_TransportExceptionEvent'); - $smtp = $this->_getTransport($buf, $dispatcher); - $this->_checking(Expectations::create() - -> atLeast(1)->of($buf)->readLine(any()) -> returns("503 I'm sleepy, go away!\r\n") - -> allowing($dispatcher)->createTransportExceptionEvent($smtp, optional()) -> returns($evt) - -> one($dispatcher)->dispatchEvent($evt, 'exceptionThrown') - -> atLeast(1)->of($evt)->bubbleCancelled() -> returns(true) - -> ignoring($dispatcher) - -> ignoring($evt) - ); - $this->_finishBuffer($buf); - $smtp->start(); - } - - // -- Creation Methods - - protected function _createEventDispatcher($stub = true) - { - return $stub - ? $this->_stub('Swift_Events_EventDispatcher') - : $this->_mock('Swift_Events_EventDispatcher') - ; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpTest.php deleted file mode 100644 index 298969e8..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpTest.php +++ /dev/null @@ -1,924 +0,0 @@ -_getBuffer(); - $smtp = $this->_getTransport($buf); - $s = $this->_sequence('SMTP-convo'); - $this->_checking(Expectations::create() - -> one($buf)->initialize() -> inSequence($s) - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 some.server.tld bleh\r\n") - ); - $this->_finishBuffer($buf); - try { - $this->assertFalse($smtp->isStarted(), '%s: SMTP should begin non-started'); - $smtp->start(); - $this->assertTrue($smtp->isStarted(), '%s: start() should have started connection'); - } catch (Exception $e) { - $this->fail('220 is a valid SMTP greeting and should be accepted'); - } - } - - public function testBadGreetingCausesException() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $s = $this->_sequence('SMTP-convo'); - $this->_checking(Expectations::create() - -> one($buf)->initialize() -> inSequence($s) - -> one($buf)->readLine(0) -> inSequence($s) -> returns("554 I'm busy\r\n") - ); - $this->_finishBuffer($buf); - try { - $this->assertFalse($smtp->isStarted(), '%s: SMTP should begin non-started'); - $smtp->start(); - $this->fail('554 greeting indicates an error and should cause an exception'); - } catch (Exception $e) { - $this->assertFalse($smtp->isStarted(), '%s: start() should have failed'); - } - } - - public function testStartSendsHeloToInitiate() - { - /* -- RFC 2821, 3.2. - - 3.2 Client Initiation - - Once the server has sent the welcoming message and the client has - received it, the client normally sends the EHLO command to the - server, indicating the client's identity. In addition to opening the - session, use of EHLO indicates that the client is able to process - service extensions and requests that the server provide a list of the - extensions it supports. Older SMTP systems which are unable to - support service extensions and contemporary clients which do not - require service extensions in the mail session being initiated, MAY - use HELO instead of EHLO. Servers MUST NOT return the extended - EHLO-style response to a HELO command. For a particular connection - attempt, if the server returns a "command not recognized" response to - EHLO, the client SHOULD be able to fall back and send HELO. - - In the EHLO command the host sending the command identifies itself; - the command may be interpreted as saying "Hello, I am " (and, - in the case of EHLO, "and I support service extension requests"). - - -- RFC 2281, 4.1.1.1. - - ehlo = "EHLO" SP Domain CRLF - helo = "HELO" SP Domain CRLF - - -- RFC 2821, 4.3.2. - - EHLO or HELO - S: 250 - E: 504, 550 - - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $s = $this->_sequence('SMTP-convo'); - $this->_checking(Expectations::create() - -> one($buf)->initialize() -> inSequence($s) - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 some.server.tld bleh\r\n") - -> one($buf)->write(pattern('~^HELO .*?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns('250 ServerName' . "\r\n") - ); - $this->_finishBuffer($buf); - try { - $smtp->start(); - } catch (Exception $e) { - $this->fail('Starting SMTP should send HELO and accept 250 response'); - } - } - - public function testInvalidHeloResponseCausesException() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $s = $this->_sequence('SMTP-convo'); - $this->_checking(Expectations::create() - -> one($buf)->initialize() -> inSequence($s) - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 some.server.tld bleh\r\n") - -> one($buf)->write(pattern('~^HELO .*?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns('504 WTF' . "\r\n") - ); - $this->_finishBuffer($buf); - try { - $this->assertFalse($smtp->isStarted(), '%s: SMTP should begin non-started'); - $smtp->start(); - $this->fail('Non 250 HELO response should raise Exception'); - } catch (Exception $e) { - $this->assertFalse($smtp->isStarted(), '%s: SMTP start() should have failed'); - } - } - - public function testDomainNameIsPlacedInHelo() - { - /* -- RFC 2821, 4.1.4. - - The SMTP client MUST, if possible, ensure that the domain parameter - to the EHLO command is a valid principal host name (not a CNAME or MX - name) for its host. If this is not possible (e.g., when the client's - address is dynamically assigned and the client does not have an - obvious name), an address literal SHOULD be substituted for the - domain name and supplemental information provided that will assist in - identifying the client. - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $s = $this->_sequence('SMTP-convo'); - $this->_checking(Expectations::create() - -> one($buf)->initialize() -> inSequence($s) - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 some.server.tld bleh\r\n") - -> one($buf)->write("HELO mydomain.com\r\n") -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns('250 ServerName' . "\r\n") - ); - $this->_finishBuffer($buf); - $smtp->setLocalDomain('mydomain.com'); - $smtp->start(); - } - - public function testSuccessfulMailCommand() - { - /* -- RFC 2821, 3.3. - - There are three steps to SMTP mail transactions. The transaction - starts with a MAIL command which gives the sender identification. - - ..... - - The first step in the procedure is the MAIL command. - - MAIL FROM: [SP ] - - -- RFC 2821, 4.1.1.2. - - Syntax: - - "MAIL FROM:" ("<>" / Reverse-Path) - [SP Mail-parameters] CRLF - -- RFC 2821, 4.1.2. - - Reverse-path = Path - Forward-path = Path - Path = "<" [ A-d-l ":" ] Mailbox ">" - A-d-l = At-domain *( "," A-d-l ) - ; Note that this form, the so-called "source route", - ; MUST BE accepted, SHOULD NOT be generated, and SHOULD be - ; ignored. - At-domain = "@" domain - - -- RFC 2821, 4.3.2. - - MAIL - S: 250 - E: 552, 451, 452, 550, 553, 503 - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null)) - -> allowing($message) - - -> one($buf)->write("MAIL FROM: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns('250 OK' . "\r\n") - ); - $this->_finishBuffer($buf); - try { - $smtp->start(); - $smtp->send($message); - } catch (Exception $e) { - $this->fail('MAIL FROM should accept a 250 response'); - } - } - - public function testInvalidResponseCodeFromMailCausesException() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null)) - -> allowing($message) - - -> one($buf)->write("MAIL FROM: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns('553 Bad' . "\r\n") - ); - $this->_finishBuffer($buf); - try { - $smtp->start(); - $smtp->send($message); - $this->fail('MAIL FROM should accept a 250 response'); - } catch (Exception $e) { - } - } - - public function testSenderIsPreferredOverFrom() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getSender() -> returns(array('another@domain.com'=>'Someone')) - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null)) - -> allowing($message) - - -> one($buf)->write("MAIL FROM: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns('250 OK' . "\r\n") - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->send($message); - } - - public function testReturnPathIsPreferredOverSender() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getSender() -> returns(array('another@domain.com'=>'Someone')) - -> allowing($message)->getReturnPath() -> returns('more@domain.com') - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null)) - -> allowing($message) - - -> one($buf)->write("MAIL FROM: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns('250 OK' . "\r\n") - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->send($message); - } - - public function testSuccessfulRcptCommandWith250Response() - { - /* -- RFC 2821, 3.3. - - The second step in the procedure is the RCPT command. - - RCPT TO: [ SP ] - - The first or only argument to this command includes a forward-path - (normally a mailbox and domain, always surrounded by "<" and ">" - brackets) identifying one recipient. If accepted, the SMTP server - returns a 250 OK reply and stores the forward-path. If the recipient - is known not to be a deliverable address, the SMTP server returns a - 550 reply, typically with a string such as "no such user - " and the - mailbox name (other circumstances and reply codes are possible). - This step of the procedure can be repeated any number of times. - - -- RFC 2821, 4.1.1.3. - - This command is used to identify an individual recipient of the mail - data; multiple recipients are specified by multiple use of this - command. The argument field contains a forward-path and may contain - optional parameters. - - The forward-path normally consists of the required destination - mailbox. Sending systems SHOULD not generate the optional list of - hosts known as a source route. - - ....... - - "RCPT TO:" ("" / "" / Forward-Path) - [SP Rcpt-parameters] CRLF - - -- RFC 2821, 4.2.2. - - 250 Requested mail action okay, completed - 251 User not local; will forward to - (See section 3.4) - 252 Cannot VRFY user, but will accept message and attempt - delivery - - -- RFC 2821, 4.3.2. - - RCPT - S: 250, 251 (but see section 3.4 for discussion of 251 and 551) - E: 550, 551, 552, 553, 450, 451, 452, 503, 550 - */ - - //We'll treat 252 as accepted since it isn't really a failure - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $s = $this->_sequence('SMTP-envelope'); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null)) - -> allowing($message) - - -> one($buf)->write("MAIL FROM: \r\n") -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> returns('250 OK' . "\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> inSequence($s) -> returns(2) - -> one($buf)->readLine(2) -> returns('250 OK' . "\r\n") - ); - $this->_finishBuffer($buf); - try { - $smtp->start(); - $smtp->send($message); - } catch (Exception $e) { - $this->fail('RCPT TO should accept a 250 response'); - } - } - - public function testMailFromCommandIsOnlySentOncePerMessage() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $s = $this->_sequence('SMTP-envelope'); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null)) - -> allowing($message) - - -> one($buf)->write("MAIL FROM: \r\n") -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> returns('250 OK' . "\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> inSequence($s) -> returns(2) - -> one($buf)->readLine(2) -> returns('250 OK' . "\r\n") - -> never($buf)->write("MAIL FROM: \r\n") - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->send($message); - } - - public function testMultipleRecipientsSendsMultipleRcpt() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array( - 'foo@bar' => null, - 'zip@button' => 'Zip Button', - 'test@domain' => 'Test user' - )) - -> allowing($message) - - -> one($buf)->write("RCPT TO: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns('250 OK' . "\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(2) - -> one($buf)->readLine(2) -> returns('250 OK' . "\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(3) - -> one($buf)->readLine(3) -> returns('250 OK' . "\r\n") - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->send($message); - } - - public function testCcRecipientsSendsMultipleRcpt() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - -> allowing($message)->getCc() -> returns(array( - 'zip@button' => 'Zip Button', - 'test@domain' => 'Test user' - )) - -> allowing($message) - - -> one($buf)->write("RCPT TO: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns('250 OK' . "\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(2) - -> one($buf)->readLine(2) -> returns('250 OK' . "\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(3) - -> one($buf)->readLine(3) -> returns('250 OK' . "\r\n") - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->send($message); - } - - public function testSendReturnsNumberOfSuccessfulRecipients() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - -> allowing($message)->getCc() -> returns(array( - 'zip@button' => 'Zip Button', - 'test@domain' => 'Test user' - )) - -> allowing($message) - - -> one($buf)->write("RCPT TO: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns('250 OK' . "\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(2) - -> one($buf)->readLine(2) -> returns('501 Nobody here' . "\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(3) - -> one($buf)->readLine(3) -> returns('250 OK' . "\r\n") - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(2, $smtp->send($message), - '%s: 1 of 3 recipients failed so 2 should be returned' - ); - } - - public function testRsetIsSentIfNoSuccessfulRecipients() - { - /* --RFC 2821, 4.1.1.5. - - This command specifies that the current mail transaction will be - aborted. Any stored sender, recipients, and mail data MUST be - discarded, and all buffers and state tables cleared. The receiver - MUST send a "250 OK" reply to a RSET command with no arguments. A - reset command may be issued by the client at any time. - - -- RFC 2821, 4.3.2. - - RSET - S: 250 - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - -> allowing($message) - - -> one($buf)->write("RCPT TO: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns('503 Bad' . "\r\n") - -> one($buf)->write("RSET\r\n") -> returns(2) - -> one($buf)->readLine(2) -> returns('250 OK' . "\r\n") - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(0, $smtp->send($message), - '%s: 1 of 1 recipients failed so 0 should be returned' - ); - } - - public function testSuccessfulDataCommand() - { - /* -- RFC 2821, 3.3. - - The third step in the procedure is the DATA command (or some - alternative specified in a service extension). - - DATA - - If accepted, the SMTP server returns a 354 Intermediate reply and - considers all succeeding lines up to but not including the end of - mail data indicator to be the message text. - - -- RFC 2821, 4.1.1.4. - - The receiver normally sends a 354 response to DATA, and then treats - the lines (strings ending in sequences, as described in - section 2.3.7) following the command as mail data from the sender. - This command causes the mail data to be appended to the mail data - buffer. The mail data may contain any of the 128 ASCII character - codes, although experience has indicated that use of control - characters other than SP, HT, CR, and LF may cause problems and - SHOULD be avoided when possible. - - -- RFC 2821, 4.3.2. - - DATA - I: 354 -> data -> S: 250 - E: 552, 554, 451, 452 - E: 451, 554, 503 - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - -> allowing($message) - - -> one($buf)->write("DATA\r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns('354 Go ahead' . "\r\n") - ); - $this->_finishBuffer($buf); - try { - $smtp->start(); - $smtp->send($message); - } catch (Exception $e) { - $this->fail('354 is the expected response to DATA'); - } - } - - public function testBadDataResponseCausesException() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - -> allowing($message) - - -> one($buf)->write("DATA\r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns('451 Bad' . "\r\n") - ); - $this->_finishBuffer($buf); - try { - $smtp->start(); - $smtp->send($message); - $this->fail('354 is the expected response to DATA (not observed)'); - } catch (Exception $e) { - } - } - - public function testMessageIsStreamedToBufferForData() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $s = $this->_sequence('DATA Streaming'); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - - -> one($buf)->write("DATA\r\n") -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> returns('354 OK' . "\r\n") - -> one($message)->toByteStream($buf) -> inSequence($s) - -> one($buf)->write("\r\n.\r\n") -> inSequence($s) -> returns(2) - -> one($buf)->readLine(2) -> returns('250 OK' . "\r\n") - - -> allowing($message) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->send($message); - } - - public function testBadResponseAfterDataTransmissionCausesException() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $s = $this->_sequence('DATA Streaming'); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - - -> one($buf)->write("DATA\r\n") -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> returns('354 OK' . "\r\n") - -> one($message)->toByteStream($buf) -> inSequence($s) - -> one($buf)->write("\r\n.\r\n") -> inSequence($s) -> returns(2) - -> one($buf)->readLine(2) -> returns('554 Error' . "\r\n") - - -> allowing($message) - ); - $this->_finishBuffer($buf); - try { - $smtp->start(); - $smtp->send($message); - $this->fail('250 is the expected response after a DATA transmission (not observed)'); - } catch (Exception $e) { - } - } - - public function testBccRecipientsAreRemovedFromHeaders() - { - /* -- RFC 2821, 7.2. - - Addresses that do not appear in the message headers may appear in the - RCPT commands to an SMTP server for a number of reasons. The two - most common involve the use of a mailing address as a "list exploder" - (a single address that resolves into multiple addresses) and the - appearance of "blind copies". Especially when more than one RCPT - command is present, and in order to avoid defeating some of the - purpose of these mechanisms, SMTP clients and servers SHOULD NOT copy - the full set of RCPT command arguments into the headers, either as - part of trace headers or as informational or private-extension - headers. Since this rule is often violated in practice, and cannot - be enforced, sending SMTP systems that are aware of "bcc" use MAY - find it helpful to send each blind copy as a separate message - transaction containing only a single RCPT command. - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - -> allowing($message)->getBcc() -> returns(array( - 'zip@button' => 'Zip Button', - 'test@domain' => 'Test user' - )) - -> atLeast(1)->of($message)->setBcc(array()) - -> allowing($message) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->send($message); - } - - public function testEachBccRecipientIsSentASeparateMessage() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - -> allowing($message)->getBcc() -> returns(array( - 'zip@button' => 'Zip Button', - 'test@domain' => 'Test user' - )) - -> atLeast(1)->of($message)->setBcc(array()) - -> one($message)->setBcc(array('zip@button' => 'Zip Button')) - -> one($message)->setBcc(array('test@domain' => 'Test user')) - -> atLeast(1)->of($message)->setBcc(array( - 'zip@button' => 'Zip Button', - 'test@domain' => 'Test user' - )) - -> allowing($message) - - -> one($buf)->write("MAIL FROM: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(2) - -> one($buf)->readLine(2) -> returns("250 OK\r\n") - -> one($buf)->write("DATA\r\n") -> returns(3) - -> one($buf)->readLine(3) -> returns("354 OK\r\n") - -> one($buf)->write("\r\n.\r\n") -> returns(4) - -> one($buf)->readLine(4) -> returns("250 OK\r\n") - - -> one($buf)->write("MAIL FROM: \r\n") -> returns(5) - -> one($buf)->readLine(5) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(6) - -> one($buf)->readLine(6) -> returns("250 OK\r\n") - -> one($buf)->write("DATA\r\n") -> returns(7) - -> one($buf)->readLine(7) -> returns("354 OK\r\n") - -> one($buf)->write("\r\n.\r\n") -> returns(8) - -> one($buf)->readLine(8) -> returns("250 OK\r\n") - - -> one($buf)->write("MAIL FROM: \r\n") -> returns(9) - -> one($buf)->readLine(9) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(10) - -> one($buf)->readLine(10) -> returns("250 OK\r\n") - -> one($buf)->write("DATA\r\n") -> returns(11) - -> one($buf)->readLine(11) -> returns("354 OK\r\n") - -> one($buf)->write("\r\n.\r\n") -> returns(12) - -> one($buf)->readLine(12) -> returns("250 OK\r\n") - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(3, $smtp->send($message)); - } - - public function testMessageStateIsRestoredOnFailure() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - -> allowing($message)->getBcc() -> returns(array( - 'zip@button' => 'Zip Button', - 'test@domain' => 'Test user' - )) - -> one($message)->setBcc(array()) - -> one($message)->setBcc(array( - 'zip@button' => 'Zip Button', - 'test@domain' => 'Test user' - )) - -> allowing($message) - -> one($buf)->write("MAIL FROM: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(2) - -> one($buf)->readLine(2) -> returns("250 OK\r\n") - -> one($buf)->write("DATA\r\n") -> returns(3) - -> one($buf)->readLine(3) -> returns("451 No\r\n") - ); - $this->_finishBuffer($buf); - - $smtp->start(); - try { - $smtp->send($message); - $this->fail('A bad response was given so exception is expected'); - } catch (Exception $e) { - } - } - - public function testStopSendsQuitCommand() - { - /* -- RFC 2821, 4.1.1.10. - - This command specifies that the receiver MUST send an OK reply, and - then close the transmission channel. - - The receiver MUST NOT intentionally close the transmission channel - until it receives and replies to a QUIT command (even if there was an - error). The sender MUST NOT intentionally close the transmission - channel until it sends a QUIT command and SHOULD wait until it - receives the reply (even if there was an error response to a previous - command). If the connection is closed prematurely due to violations - of the above or system or network failure, the server MUST cancel any - pending transaction, but not undo any previously completed - transaction, and generally MUST act as if the command or transaction - in progress had received a temporary error (i.e., a 4yz response). - - The QUIT command may be issued at any time. - - Syntax: - "QUIT" CRLF - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> one($buf)->initialize() - -> one($buf)->write("QUIT\r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns("221 Bye\r\n") - -> one($buf)->terminate() - ); - $this->_finishBuffer($buf); - - $this->assertFalse($smtp->isStarted()); - $smtp->start(); - $this->assertTrue($smtp->isStarted()); - $smtp->stop(); - $this->assertFalse($smtp->isStarted()); - } - - public function testBufferCanBeFetched() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $ref = $smtp->getBuffer(); - $this->assertReference($buf, $ref); - } - - public function testBufferCanBeWrittenToUsingExecuteCommand() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> one($buf)->write("FOO\r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns("250 OK\r\n") - -> ignoring($buf) - ); - - $res = $smtp->executeCommand("FOO\r\n"); - $this->assertEqual("250 OK\r\n", $res); - } - - public function testResponseCodesAreValidated() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> one($buf)->write("FOO\r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns("551 Not ok\r\n") - -> ignoring($buf) - ); - - try { - $smtp->executeCommand("FOO\r\n", array(250, 251)); - $this->fail('A 250 or 251 response was needed but 551 was returned.'); - } catch (Exception $e) { - } - } - - public function testFailedRecipientsCanBeCollectedByReference() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar' => null)) - -> allowing($message)->getBcc() -> returns(array( - 'zip@button' => 'Zip Button', - 'test@domain' => 'Test user' - )) - -> atLeast(1)->of($message)->setBcc(array()) - -> one($message)->setBcc(array('zip@button' => 'Zip Button')) - -> one($message)->setBcc(array('test@domain' => 'Test user')) - -> atLeast(1)->of($message)->setBcc(array( - 'zip@button' => 'Zip Button', - 'test@domain' => 'Test user' - )) - -> allowing($message) - - -> one($buf)->write("MAIL FROM: \r\n") -> returns(1) - -> one($buf)->readLine(1) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(2) - -> one($buf)->readLine(2) -> returns("250 OK\r\n") - -> one($buf)->write("DATA\r\n") -> returns(3) - -> one($buf)->readLine(3) -> returns("354 OK\r\n") - -> one($buf)->write("\r\n.\r\n") -> returns(4) - -> one($buf)->readLine(4) -> returns("250 OK\r\n") - - -> one($buf)->write("MAIL FROM: \r\n") -> returns(5) - -> one($buf)->readLine(5) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(6) - -> one($buf)->readLine(6) -> returns("500 Bad\r\n") - -> one($buf)->write("RSET\r\n") -> returns(7) - -> one($buf)->readLine(7) -> returns("250 OK\r\n") - - -> one($buf)->write("MAIL FROM: \r\n") -> returns(8) - -> one($buf)->readLine(8) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> returns(9) - -> one($buf)->readLine(9) -> returns("500 Bad\r\n") - -> one($buf)->write("RSET\r\n") -> returns(10) - -> one($buf)->readLine(10) -> returns("250 OK\r\n") - ); - $this->_finishBuffer($buf); - $smtp->start(); - $this->assertEqual(1, $smtp->send($message, $failures)); - $this->assertEqual(array('zip@button', 'test@domain'), $failures, - '%s: Failures should be caught in an array' - ); - } - - public function testSendingRegeneratesMessageId() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $message = $this->_createMessage(); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain.com'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null)) - -> one($message)->generateId() - -> allowing($message) - ); - $this->_finishBuffer($buf); - $smtp->start(); - $smtp->send($message); - } - - // -- Protected methods - - protected function _getBuffer() - { - return $this->_mock('Swift_Transport_IoBuffer'); - } - - protected function _createMessage() - { - return $this->_mock('Swift_Mime_Message'); - } - - protected function _finishBuffer($buf) - { - $this->_checking(Expectations::create() - -> ignoring($buf)->readLine(0) -> returns('220 server.com foo' . "\r\n") - -> ignoring($buf)->write(pattern('~^(EH|HE)LO .*?\r\n$~D')) -> returns($x = uniqid()) - -> ignoring($buf)->readLine($x) -> returns('250 ServerName' . "\r\n") - -> ignoring($buf)->write(pattern('~^MAIL FROM: <.*?>\r\n$~D')) -> returns($x = uniqid()) - -> ignoring($buf)->readLine($x) -> returns('250 OK' . "\r\n") - -> ignoring($buf)->write(pattern('~^RCPT TO: <.*?>\r\n$~D')) -> returns($x = uniqid()) - -> ignoring($buf)->readLine($x) -> returns('250 OK' . "\r\n") - -> ignoring($buf)->write("DATA\r\n") -> returns($x = uniqid()) - -> ignoring($buf)->readLine($x) -> returns('354 OK' . "\r\n") - -> ignoring($buf)->write("\r\n.\r\n") -> returns($x = uniqid()) - -> ignoring($buf)->readLine($x) -> returns('250 OK' . "\r\n") - -> ignoring($buf)->write("RSET\r\n") -> returns($x = uniqid()) - -> ignoring($buf)->readLine($x) -> returns("250 OK\r\n") - -> ignoring($buf) -> returns(false) - ); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/CramMd5AuthenticatorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/CramMd5AuthenticatorTest.php deleted file mode 100644 index ee0eab91..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/CramMd5AuthenticatorTest.php +++ /dev/null @@ -1,67 +0,0 @@ -_agent = $this->_mock('Swift_Transport_SmtpAgent'); - } - - public function testKeywordIsCramMd5() - { - /* -- RFC 2195, 2. - The authentication type associated with CRAM is "CRAM-MD5". - */ - - $cram = $this->_getAuthenticator(); - $this->assertEqual('CRAM-MD5', $cram->getAuthKeyword()); - } - - public function testSuccessfulAuthentication() - { - $cram = $this->_getAuthenticator(); - $this->_checking(Expectations::create() - -> one($this->_agent)->executeCommand("AUTH CRAM-MD5\r\n", array(334)) - -> returns('334 ' . base64_encode('') . "\r\n") - // The use of any() is controversial, but here to avoid crazy test logic - -> one($this->_agent)->executeCommand(any(), array(235)) - ); - - $this->assertTrue($cram->authenticate($this->_agent, 'jack', 'pass'), - '%s: The buffer accepted all commands authentication should succeed' - ); - } - - public function testAuthenticationFailureSendRsetAndReturnFalse() - { - $cram = $this->_getAuthenticator(); - $this->_checking(Expectations::create() - -> one($this->_agent)->executeCommand("AUTH CRAM-MD5\r\n", array(334)) - -> returns('334 ' . base64_encode('') . "\r\n") - // The use of any() is controversial, but here to avoid crazy test logic - -> one($this->_agent)->executeCommand(any(), array(235)) - -> throws(new Swift_TransportException("")) - - -> one($this->_agent)->executeCommand("RSET\r\n", array(250)) - ); - - $this->assertFalse($cram->authenticate($this->_agent, 'jack', 'pass'), - '%s: Authentication fails, so RSET should be sent' - ); - } - - // -- Private helpers - - private function _getAuthenticator() - { - return new Swift_Transport_Esmtp_Auth_CramMd5Authenticator(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/LoginAuthenticatorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/LoginAuthenticatorTest.php deleted file mode 100644 index 7a9f0b47..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/LoginAuthenticatorTest.php +++ /dev/null @@ -1,60 +0,0 @@ -_agent = $this->_mock('Swift_Transport_SmtpAgent'); - } - - public function testKeywordIsLogin() - { - $login = $this->_getAuthenticator(); - $this->assertEqual('LOGIN', $login->getAuthKeyword()); - } - - public function testSuccessfulAuthentication() - { - $login = $this->_getAuthenticator(); - $this->_checking(Expectations::create() - -> one($this->_agent)->executeCommand("AUTH LOGIN\r\n", array(334)) - -> one($this->_agent)->executeCommand(base64_encode('jack') . "\r\n", array(334)) - -> one($this->_agent)->executeCommand(base64_encode('pass') . "\r\n", array(235)) - ); - - $this->assertTrue($login->authenticate($this->_agent, 'jack', 'pass'), - '%s: The buffer accepted all commands authentication should succeed' - ); - } - - public function testAuthenticationFailureSendRsetAndReturnFalse() - { - $login = $this->_getAuthenticator(); - $this->_checking(Expectations::create() - -> one($this->_agent)->executeCommand("AUTH LOGIN\r\n", array(334)) - -> one($this->_agent)->executeCommand(base64_encode('jack') . "\r\n", array(334)) - -> one($this->_agent)->executeCommand(base64_encode('pass') . "\r\n", array(235)) - -> throws(new Swift_TransportException("")) - -> one($this->_agent)->executeCommand("RSET\r\n", array(250)) - ); - - $this->assertFalse($login->authenticate($this->_agent, 'jack', 'pass'), - '%s: Authentication fails, so RSET should be sent' - ); - } - - // -- Private helpers - - private function _getAuthenticator() - { - return new Swift_Transport_Esmtp_Auth_LoginAuthenticator(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/PlainAuthenticatorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/PlainAuthenticatorTest.php deleted file mode 100644 index 19c2bc2e..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/PlainAuthenticatorTest.php +++ /dev/null @@ -1,71 +0,0 @@ -_agent = $this->_mock('Swift_Transport_SmtpAgent'); - } - - public function testKeywordIsPlain() - { - /* -- RFC 4616, 1. - The name associated with this mechanism is "PLAIN". - */ - - $login = $this->_getAuthenticator(); - $this->assertEqual('PLAIN', $login->getAuthKeyword()); - } - - public function testSuccessfulAuthentication() - { - /* -- RFC 4616, 2. - The client presents the authorization identity (identity to act as), - followed by a NUL (U+0000) character, followed by the authentication - identity (identity whose password will be used), followed by a NUL - (U+0000) character, followed by the clear-text password. - */ - - $plain = $this->_getAuthenticator(); - $this->_checking(Expectations::create() - -> one($this->_agent)->executeCommand('AUTH PLAIN ' . base64_encode( - 'jack' . chr(0) . 'jack' . chr(0) . 'pass' - ) . "\r\n", array(235)) - ); - - $this->assertTrue($plain->authenticate($this->_agent, 'jack', 'pass'), - '%s: The buffer accepted all commands authentication should succeed' - ); - } - - public function testAuthenticationFailureSendRsetAndReturnFalse() - { - $plain = $this->_getAuthenticator(); - $this->_checking(Expectations::create() - -> one($this->_agent)->executeCommand('AUTH PLAIN ' . base64_encode( - 'jack' . chr(0) . 'jack' . chr(0) . 'pass' - ) . "\r\n", array(235)) -> throws(new Swift_TransportException("")) - - -> one($this->_agent)->executeCommand("RSET\r\n", array(250)) - ); - - $this->assertFalse($plain->authenticate($this->_agent, 'jack', 'pass'), - '%s: Authentication fails, so RSET should be sent' - ); - } - - // -- Private helpers - - private function _getAuthenticator() - { - return new Swift_Transport_Esmtp_Auth_PlainAuthenticator(); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/AuthHandlerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/AuthHandlerTest.php deleted file mode 100644 index 682381da..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/AuthHandlerTest.php +++ /dev/null @@ -1,157 +0,0 @@ -_agent = $this->_mock('Swift_Transport_SmtpAgent'); - } - - public function testKeywordIsAuth() - { - $auth = $this->_createHandler(array()); - $this->assertEqual('AUTH', $auth->getHandledKeyword()); - } - - public function testUsernameCanBeSetAndFetched() - { - $auth = $this->_createHandler(array()); - $auth->setUsername('jack'); - $this->assertEqual('jack', $auth->getUsername()); - } - - public function testPasswordCanBeSetAndFetched() - { - $auth = $this->_createHandler(array()); - $auth->setPassword('pass'); - $this->assertEqual('pass', $auth->getPassword()); - } - - public function testAuthModeCanBeSetAndFetched() - { - $auth = $this->_createHandler(array()); - $auth->setAuthMode('PLAIN'); - $this->assertEqual('PLAIN', $auth->getAuthMode()); - } - - public function testMixinMethods() - { - $auth = $this->_createHandler(array()); - $mixins = $auth->exposeMixinMethods(); - $this->assertTrue(in_array('getUsername', $mixins), - '%s: getUsername() should be accessible via mixin' - ); - $this->assertTrue(in_array('setUsername', $mixins), - '%s: setUsername() should be accessible via mixin' - ); - $this->assertTrue(in_array('getPassword', $mixins), - '%s: getPassword() should be accessible via mixin' - ); - $this->assertTrue(in_array('setPassword', $mixins), - '%s: setPassword() should be accessible via mixin' - ); - $this->assertTrue(in_array('setAuthMode', $mixins), - '%s: setAuthMode() should be accessible via mixin' - ); - $this->assertTrue(in_array('getAuthMode', $mixins), - '%s: getAuthMode() should be accessible via mixin' - ); - } - - public function testAuthenticatorsAreCalledAccordingToParamsAfterEhlo() - { - $a1 = $this->_createMockAuthenticator('PLAIN'); - $a2 = $this->_createMockAuthenticator('LOGIN'); - - $this->_checking(Expectations::create() - -> never($a1)->authenticate($this->_agent, 'jack', 'pass') - -> one($a2)->authenticate($this->_agent, 'jack', 'pass') -> returns(true) - ); - - $auth = $this->_createHandler(array($a1, $a2)); - $auth->setUsername('jack'); - $auth->setPassword('pass'); - - $auth->setKeywordParams(array('CRAM-MD5', 'LOGIN')); - $auth->afterEhlo($this->_agent); - } - - public function testAuthenticatorsAreNotUsedIfNoUsernameSet() - { - $a1 = $this->_createMockAuthenticator('PLAIN'); - $a2 = $this->_createMockAuthenticator('LOGIN'); - - $this->_checking(Expectations::create() - -> never($a1)->authenticate($this->_agent, 'jack', 'pass') - -> never($a2)->authenticate($this->_agent, 'jack', 'pass') -> returns(true) - ); - - $auth = $this->_createHandler(array($a1, $a2)); - - $auth->setKeywordParams(array('CRAM-MD5', 'LOGIN')); - $auth->afterEhlo($this->_agent); - } - - public function testSeveralAuthenticatorsAreTriedIfNeeded() - { - $a1 = $this->_createMockAuthenticator('PLAIN'); - $a2 = $this->_createMockAuthenticator('LOGIN'); - - $this->_checking(Expectations::create() - -> one($a1)->authenticate($this->_agent, 'jack', 'pass') -> returns(false) - -> one($a2)->authenticate($this->_agent, 'jack', 'pass') -> returns(true) - ); - - $auth = $this->_createHandler(array($a1, $a2)); - $auth->setUsername('jack'); - $auth->setPassword('pass'); - - $auth->setKeywordParams(array('PLAIN', 'LOGIN')); - $auth->afterEhlo($this->_agent); - } - - public function testFirstAuthenticatorToPassBreaksChain() - { - $a1 = $this->_createMockAuthenticator('PLAIN'); - $a2 = $this->_createMockAuthenticator('LOGIN'); - $a3 = $this->_createMockAuthenticator('CRAM-MD5'); - - $this->_checking(Expectations::create() - -> one($a1)->authenticate($this->_agent, 'jack', 'pass') -> returns(false) - -> one($a2)->authenticate($this->_agent, 'jack', 'pass') -> returns(true) - -> never($a3)->authenticate($this->_agent, 'jack', 'pass') - ); - - $auth = $this->_createHandler(array($a1, $a2)); - $auth->setUsername('jack'); - $auth->setPassword('pass'); - - $auth->setKeywordParams(array('PLAIN', 'LOGIN', 'CRAM-MD5')); - $auth->afterEhlo($this->_agent); - } - - // -- Private helpers - - private function _createHandler($authenticators) - { - return new Swift_Transport_Esmtp_AuthHandler($authenticators); - } - - private function _createMockAuthenticator($type) - { - $authenticator = $this->_mock('Swift_Transport_Esmtp_Authenticator'); - $this->_checking(Expectations::create() - -> ignoring($authenticator)->getAuthKeyword() -> returns($type) - ); - - return $authenticator; - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransport/ExtensionSupportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransport/ExtensionSupportTest.php deleted file mode 100644 index 744541fa..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransport/ExtensionSupportTest.php +++ /dev/null @@ -1,314 +0,0 @@ -_getBuffer(); - $smtp = $this->_getTransport($buf); - $ext1 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext2 = $this->_mock('Swift_Transport_EsmtpHandler'); - $this->_checking(Expectations::create() - -> allowing($ext1)->getHandledKeyword() -> returns('AUTH') - -> allowing($ext1)->getPriorityOver('STARTTLS') -> returns(0) - -> allowing($ext2)->getHandledKeyword() -> returns('STARTTLS') - -> allowing($ext2)->getPriorityOver('AUTH') -> returns(-1) - -> ignoring($ext1) - -> ignoring($ext2) - ); - $this->_finishBuffer($buf); - $smtp->setExtensionHandlers(array($ext1, $ext2)); - $this->assertEqual(array($ext2, $ext1), $smtp->getExtensionHandlers()); - } - - public function testHandlersAreNotifiedOfParams() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $ext1 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext2 = $this->_mock('Swift_Transport_EsmtpHandler'); - $s = $this->_sequence('Initiation-sequence'); - $this->_checking(Expectations::create() - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 server.com foo\r\n") - -> one($buf)->write(pattern('~^EHLO .*?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-ServerName.tld\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-AUTH PLAIN LOGIN\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250 SIZE=123456\r\n") - - -> allowing($ext1)->getHandledKeyword() -> returns('AUTH') - -> one($ext1)->setKeywordParams(array('PLAIN', 'LOGIN')) - -> allowing($ext2)->getHandledKeyword() -> returns('SIZE') - -> allowing($ext2)->setKeywordParams(array('123456')) - -> ignoring($ext1) - -> ignoring($ext2) - ); - $this->_finishBuffer($buf); - $smtp->setExtensionHandlers(array($ext1, $ext2)); - $smtp->start(); - } - - public function testSupportedExtensionHandlersAreRunAfterEhlo() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $ext1 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext2 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext3 = $this->_mock('Swift_Transport_EsmtpHandler'); - $s = $this->_sequence('Initiation-sequence'); - $this->_checking(Expectations::create() - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 server.com foo\r\n") - -> one($buf)->write(pattern('~^EHLO .*?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-ServerName.tld\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-AUTH PLAIN LOGIN\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250 SIZE=123456\r\n") - - -> allowing($ext1)->getHandledKeyword() -> returns('AUTH') - -> one($ext1)->afterEhlo($smtp) - -> allowing($ext2)->getHandledKeyword() -> returns('SIZE') - -> allowing($ext2)->afterEhlo($smtp) - -> allowing($ext3)->getHandledKeyword() -> returns('STARTTLS') - -> never($ext3)->afterEhlo(any()) - -> ignoring($ext1) - -> ignoring($ext2) - -> ignoring($ext3) - ); - $this->_finishBuffer($buf); - $smtp->setExtensionHandlers(array($ext1, $ext2, $ext3)); - $smtp->start(); - } - - public function testExtensionsCanModifyMailFromParams() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $ext1 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext2 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext3 = $this->_mock('Swift_Transport_EsmtpHandler'); - $message = $this->_createMessage(); - $s = $this->_sequence('Initiation-sequence'); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null)) - -> ignoring($message) - - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 server.com foo\r\n") - -> one($buf)->write(pattern('~^EHLO .*?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-ServerName.tld\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-AUTH PLAIN LOGIN\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250 SIZE=123456\r\n") - -> one($buf)->write("MAIL FROM: FOO ZIP\r\n") -> inSequence($s) -> returns(2) - -> one($buf)->readLine(2) -> inSequence($s) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: \r\n") -> inSequence($s) -> returns(3) - -> one($buf)->readLine(3) -> inSequence($s) -> returns("250 OK\r\n") - - -> allowing($ext1)->getHandledKeyword() -> returns('AUTH') - -> one($ext1)->getMailParams() -> returns('FOO') - -> allowing($ext1)->getPriorityOver('AUTH') -> returns(-1) - -> allowing($ext2)->getHandledKeyword() -> returns('SIZE') - -> one($ext2)->getMailParams() -> returns('ZIP') - -> allowing($ext2)->getPriorityOver('AUTH') -> returns(1) - -> allowing($ext3)->getHandledKeyword() -> returns('STARTTLS') - -> never($ext3)->getMailParams() - -> ignoring($ext1) - -> ignoring($ext2) - -> ignoring($ext3) - ); - $this->_finishBuffer($buf); - $smtp->setExtensionHandlers(array($ext1, $ext2, $ext3)); - $smtp->start(); - $smtp->send($message); - } - - public function testExtensionsCanModifyRcptParams() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $ext1 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext2 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext3 = $this->_mock('Swift_Transport_EsmtpHandler'); - $message = $this->_createMessage(); - $s = $this->_sequence('Initiation-sequence'); - $this->_checking(Expectations::create() - -> allowing($message)->getFrom() -> returns(array('me@domain'=>'Me')) - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null)) - -> ignoring($message) - - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 server.com foo\r\n") - -> one($buf)->write(pattern('~^EHLO .*?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-ServerName.tld\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-AUTH PLAIN LOGIN\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250 SIZE=123456\r\n") - -> one($buf)->write("MAIL FROM: \r\n") -> inSequence($s) -> returns(2) - -> one($buf)->readLine(2) -> inSequence($s) -> returns("250 OK\r\n") - -> one($buf)->write("RCPT TO: FOO ZIP\r\n") -> inSequence($s) -> returns(3) - -> one($buf)->readLine(3) -> inSequence($s) -> returns("250 OK\r\n") - - -> allowing($ext1)->getHandledKeyword() -> returns('AUTH') - -> one($ext1)->getRcptParams() -> returns('FOO') - -> allowing($ext1)->getPriorityOver('AUTH') -> returns(-1) - -> allowing($ext2)->getHandledKeyword() -> returns('SIZE') - -> one($ext2)->getRcptParams() -> returns('ZIP') - -> allowing($ext2)->getPriorityOver('AUTH') -> returns(1) - -> allowing($ext3)->getHandledKeyword() -> returns('STARTTLS') - -> never($ext3)->getRcptParams() - -> ignoring($ext1) - -> ignoring($ext2) - -> ignoring($ext3) - ); - $this->_finishBuffer($buf); - $smtp->setExtensionHandlers(array($ext1, $ext2, $ext3)); - $smtp->start(); - $smtp->send($message); - } - - public function testExtensionsAreNotifiedOnCommand() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $ext1 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext2 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext3 = $this->_mock('Swift_Transport_EsmtpHandler'); - $s = $this->_sequence('Initiation-sequence'); - $this->_checking(Expectations::create() - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 server.com foo\r\n") - -> one($buf)->write(pattern('~^EHLO .*?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-ServerName.tld\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-AUTH PLAIN LOGIN\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250 SIZE=123456\r\n") - -> one($buf)->write("FOO\r\n") -> inSequence($s) -> returns(2) - -> one($buf)->readLine(2) -> inSequence($s) -> returns("250 Cool\r\n") - - -> allowing($ext1)->getHandledKeyword() -> returns('AUTH') - -> one($ext1)->onCommand($smtp, "FOO\r\n", array(250, 251), optional()) - -> allowing($ext2)->getHandledKeyword() -> returns('SIZE') - -> one($ext2)->onCommand($smtp, "FOO\r\n", array(250, 251), optional()) - -> allowing($ext3)->getHandledKeyword() -> returns('STARTTLS') - -> never($ext3)->onCommand(any(), any(), any(), optional()) - -> ignoring($ext1) - -> ignoring($ext2) - -> ignoring($ext3) - ); - $this->_finishBuffer($buf); - $smtp->setExtensionHandlers(array($ext1, $ext2, $ext3)); - $smtp->start(); - $smtp->executeCommand("FOO\r\n", array(250, 251)); - } - - public function testChainOfCommandAlgorithmWhenNotifyingExtensions() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $ext1 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext2 = $this->_mock('Swift_Transport_EsmtpHandler'); - $ext3 = $this->_mock('Swift_Transport_EsmtpHandler'); - $s = $this->_sequence('Initiation-sequence'); - $this->_checking(Expectations::create() - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 server.com foo\r\n") - -> one($buf)->write(pattern('~^EHLO .*?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-ServerName.tld\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250-AUTH PLAIN LOGIN\r\n") - -> one($buf)->readLine(1) -> inSequence($s) -> returns("250 SIZE=123456\r\n") - -> never($buf)->write("FOO\r\n") - - -> allowing($ext1)->getHandledKeyword() -> returns('AUTH') - -> one($ext1)->onCommand($smtp, "FOO\r\n", array(250, 251), optional()) -> calls(array($this, 'cbStopCommand')) - -> allowing($ext2)->getHandledKeyword() -> returns('SIZE') - -> never($ext2)->onCommand(any(), any(), any(), optional()) - -> allowing($ext3)->getHandledKeyword() -> returns('STARTTLS') - -> never($ext3)->onCommand(any(), any(), any(), optional()) - -> ignoring($ext1) - -> ignoring($ext2) - -> ignoring($ext3) - ); - $this->_finishBuffer($buf); - $smtp->setExtensionHandlers(array($ext1, $ext2, $ext3)); - $smtp->start(); - $smtp->executeCommand("FOO\r\n", array(250, 251)); - } - - public function cbStopCommand(Yay_Invocation $invocation) - { - $args =& $invocation->getArguments(); - $stop =& $args[4]; - $stop = true; - - return "250 ok"; - } - - public function testExtensionsCanExposeMixinMethods() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $ext1 = $this->_mock('Swift_Transport_EsmtpHandlerMixin'); - $ext2 = $this->_mock('Swift_Transport_EsmtpHandler'); - $this->_checking(Expectations::create() - -> allowing($ext1)->getHandledKeyword() -> returns('AUTH') - -> allowing($ext1)->exposeMixinMethods() -> returns(array('setUsername', 'setPassword')) - -> one($ext1)->setUsername('mick') - -> one($ext1)->setPassword('pass') - -> allowing($ext2)->getHandledKeyword() -> returns('STARTTLS') - -> ignoring($ext1) - -> ignoring($ext2) - ); - $this->_finishBuffer($buf); - $smtp->setExtensionHandlers(array($ext1, $ext2)); - $smtp->setUsername('mick'); - $smtp->setPassword('pass'); - } - - public function testMixinMethodsBeginningWithSetAndNullReturnAreFluid() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $ext1 = $this->_mock('Swift_Transport_EsmtpHandlerMixin'); - $ext2 = $this->_mock('Swift_Transport_EsmtpHandler'); - $this->_checking(Expectations::create() - -> allowing($ext1)->getHandledKeyword() -> returns('AUTH') - -> allowing($ext1)->exposeMixinMethods() -> returns(array('setUsername', 'setPassword')) - -> one($ext1)->setUsername('mick') -> returns(NULL) - -> one($ext1)->setPassword('pass') -> returns(NULL) - -> allowing($ext2)->getHandledKeyword() -> returns('STARTTLS') - -> ignoring($ext1) - -> ignoring($ext2) - ); - $this->_finishBuffer($buf); - $smtp->setExtensionHandlers(array($ext1, $ext2)); - $ret = $smtp->setUsername('mick'); - $this->assertReference($smtp, $ret); - $ret = $smtp->setPassword('pass'); - $this->assertReference($smtp, $ret); - } - - public function testMixinSetterWhichReturnValuesAreNotFluid() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $ext1 = $this->_mock('Swift_Transport_EsmtpHandlerMixin'); - $ext2 = $this->_mock('Swift_Transport_EsmtpHandler'); - $this->_checking(Expectations::create() - -> allowing($ext1)->getHandledKeyword() -> returns('AUTH') - -> allowing($ext1)->exposeMixinMethods() -> returns(array('setUsername', 'setPassword')) - -> one($ext1)->setUsername('mick') -> returns('x') - -> one($ext1)->setPassword('pass') -> returns('x') - -> allowing($ext2)->getHandledKeyword() -> returns('STARTTLS') - -> ignoring($ext1) - -> ignoring($ext2) - ); - $this->_finishBuffer($buf); - $smtp->setExtensionHandlers(array($ext1, $ext2)); - $this->assertEqual('x', $smtp->setUsername('mick')); - $this->assertEqual('x', $smtp->setPassword('pass')); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransportTest.php deleted file mode 100644 index 50596991..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransportTest.php +++ /dev/null @@ -1,235 +0,0 @@ -_createEventDispatcher(); - } - - return new Swift_Transport_EsmtpTransport($buf, array(), $dispatcher); - } - - public function testHostCanBeSetAndFetched() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $smtp->setHost('foo'); - $this->assertEqual('foo', $smtp->getHost(), '%s: Host should be returned'); - } - - public function testPortCanBeSetAndFetched() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $smtp->setPort(25); - $this->assertEqual(25, $smtp->getPort(), '%s: Port should be returned'); - } - - public function testTimeoutCanBeSetAndFetched() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $this->_checking(Expectations::create() - -> one($buf)->setParam('timeout', 10)); - $smtp->setTimeout(10); - $this->assertEqual(10, $smtp->getTimeout(), '%s: Timeout should be returned'); - } - - public function testEncryptionCanBeSetAndFetched() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $smtp->setEncryption('tls'); - $this->assertEqual('tls', $smtp->getEncryption(), '%s: Crypto should be returned'); - } - - public function testStartSendsHeloToInitiate() - {//Overridden for EHLO instead - } - - public function testStartSendsEhloToInitiate() - { - /* -- RFC 2821, 3.2. - - 3.2 Client Initiation - - Once the server has sent the welcoming message and the client has - received it, the client normally sends the EHLO command to the - server, indicating the client's identity. In addition to opening the - session, use of EHLO indicates that the client is able to process - service extensions and requests that the server provide a list of the - extensions it supports. Older SMTP systems which are unable to - support service extensions and contemporary clients which do not - require service extensions in the mail session being initiated, MAY - use HELO instead of EHLO. Servers MUST NOT return the extended - EHLO-style response to a HELO command. For a particular connection - attempt, if the server returns a "command not recognized" response to - EHLO, the client SHOULD be able to fall back and send HELO. - - In the EHLO command the host sending the command identifies itself; - the command may be interpreted as saying "Hello, I am " (and, - in the case of EHLO, "and I support service extension requests"). - - -- RFC 2281, 4.1.1.1. - - ehlo = "EHLO" SP Domain CRLF - helo = "HELO" SP Domain CRLF - - -- RFC 2821, 4.3.2. - - EHLO or HELO - S: 250 - E: 504, 550 - - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $s = $this->_sequence('SMTP-convo'); - $this->_checking(Expectations::create() - -> one($buf)->initialize() -> inSequence($s) - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 some.server.tld bleh\r\n") - -> one($buf)->write(pattern('~^EHLO .+?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns('250 ServerName' . "\r\n") - ); - $this->_finishBuffer($buf); - try { - $smtp->start(); - } catch (Exception $e) { - $this->fail('Starting Esmtp should send EHLO and accept 250 response'); - } - } - - public function testHeloIsUsedAsFallback() - { - /* -- RFC 2821, 4.1.4. - - If the EHLO command is not acceptable to the SMTP server, 501, 500, - or 502 failure replies MUST be returned as appropriate. The SMTP - server MUST stay in the same state after transmitting these replies - that it was in before the EHLO was received. - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $s = $this->_sequence('SMTP-convo'); - $this->_checking(Expectations::create() - -> one($buf)->initialize() -> inSequence($s) - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 some.server.tld bleh\r\n") - -> one($buf)->write(pattern('~^EHLO .+?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns('501 WTF' . "\r\n") - -> one($buf)->write(pattern('~^HELO .+?\r\n$~D')) -> inSequence($s) -> returns(2) - -> one($buf)->readLine(2) -> inSequence($s) -> returns('250 HELO' . "\r\n") - ); - $this->_finishBuffer($buf); - try { - $smtp->start(); - } catch (Exception $e) { - $this->fail( - 'Starting Esmtp should fallback to HELO if needed and accept 250 response' - ); - } - } - - public function testInvalidHeloResponseCausesException() - {//Overridden to first try EHLO - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $s = $this->_sequence('SMTP-convo'); - $this->_checking(Expectations::create() - -> one($buf)->initialize() -> inSequence($s) - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 some.server.tld bleh\r\n") - -> one($buf)->write(pattern('~^EHLO .*?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns('501 WTF' . "\r\n") - -> one($buf)->write(pattern('~^HELO .*?\r\n$~D')) -> inSequence($s) -> returns(2) - -> one($buf)->readLine(2) -> inSequence($s) -> returns('504 WTF' . "\r\n") - ); - $this->_finishBuffer($buf); - try { - $this->assertFalse($smtp->isStarted(), '%s: SMTP should begin non-started'); - $smtp->start(); - $this->fail('Non 250 HELO response should raise Exception'); - } catch (Exception $e) { - $this->assertFalse($smtp->isStarted(), '%s: SMTP start() should have failed'); - } - } - - public function testDomainNameIsPlacedInEhlo() - { - /* -- RFC 2821, 4.1.4. - - The SMTP client MUST, if possible, ensure that the domain parameter - to the EHLO command is a valid principal host name (not a CNAME or MX - name) for its host. If this is not possible (e.g., when the client's - address is dynamically assigned and the client does not have an - obvious name), an address literal SHOULD be substituted for the - domain name and supplemental information provided that will assist in - identifying the client. - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $s = $this->_sequence('SMTP-convo'); - $this->_checking(Expectations::create() - -> one($buf)->initialize() -> inSequence($s) - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 some.server.tld bleh\r\n") - -> one($buf)->write("EHLO mydomain.com\r\n") -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns('250 ServerName' . "\r\n") - ); - $this->_finishBuffer($buf); - $smtp->setLocalDomain('mydomain.com'); - $smtp->start(); - } - - public function testDomainNameIsPlacedInHelo() - { //Overridden to include ESMTP - /* -- RFC 2821, 4.1.4. - - The SMTP client MUST, if possible, ensure that the domain parameter - to the EHLO command is a valid principal host name (not a CNAME or MX - name) for its host. If this is not possible (e.g., when the client's - address is dynamically assigned and the client does not have an - obvious name), an address literal SHOULD be substituted for the - domain name and supplemental information provided that will assist in - identifying the client. - */ - - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $s = $this->_sequence('SMTP-convo'); - $this->_checking(Expectations::create() - -> one($buf)->initialize() -> inSequence($s) - -> one($buf)->readLine(0) -> inSequence($s) -> returns("220 some.server.tld bleh\r\n") - -> one($buf)->write(pattern('~^EHLO .+?\r\n$~D')) -> inSequence($s) -> returns(1) - -> one($buf)->readLine(1) -> inSequence($s) -> returns('501 WTF' . "\r\n") - -> one($buf)->write("HELO mydomain.com\r\n") -> inSequence($s) -> returns(2) - -> one($buf)->readLine(2) -> inSequence($s) -> returns('250 ServerName' . "\r\n") - ); - $this->_finishBuffer($buf); - $smtp->setLocalDomain('mydomain.com'); - $smtp->start(); - } - - public function testFluidInterface() - { - $buf = $this->_getBuffer(); - $smtp = $this->_getTransport($buf); - $this->_checking(Expectations::create() - -> one($buf)->setParam('timeout', 30)); - - $ref = $smtp - ->setHost('foo') - ->setPort(25) - ->setEncryption('tls') - ->setTimeout(30) - ; - $this->assertReference($ref, $smtp); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/FailoverTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/FailoverTransportTest.php deleted file mode 100644 index 5f7b5aae..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/FailoverTransportTest.php +++ /dev/null @@ -1,335 +0,0 @@ -mock('Swift_Mime_Message'); - $message2 = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message1) - -> ignoring($message2) - -> allowing($t1)->isStarted() -> returns(false) -> when($con->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con->is('on')) - -> one($t1)->start() -> when($con->isNot('on')) -> then($con->is('on')) - -> one($t1)->send($message1, optional()) -> returns(1) -> when($con->is('on')) - -> one($t1)->send($message2, optional()) -> returns(1) -> when($con->is('on')) - -> ignoring($t1) - -> never($t2)->start() - -> never($t2)->send(any(), optional()) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertEqual(1, $transport->send($message1)); - $this->assertEqual(1, $transport->send($message2)); - $context->assertIsSatisfied(); - } - - public function testMessageCanBeTriedOnNextTransportIfExceptionThrown() - { - $e = new Swift_TransportException('b0rken'); - - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message, optional()) -> throws($e) -> when($con1->is('on')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message, optional()) -> returns(1) -> when($con2->is('on')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertEqual(1, $transport->send($message)); - $context->assertIsSatisfied(); - } - - public function testZeroIsReturnedIfTransportReturnsZero() - { - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $con = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con->is('on')) - -> one($t1)->start() -> when($con->isNot('on')) -> then($con->is('on')) - -> one($t1)->send($message, optional()) -> returns(0) -> when($con->is('on')) - -> ignoring($t1) - ); - - $transport = $this->_getTransport(array($t1)); - $transport->start(); - $this->assertEqual(0, $transport->send($message)); - $context->assertIsSatisfied(); - } - - public function testTransportsWhichThrowExceptionsAreNotRetried() - { - $e = new Swift_TransportException('maur b0rken'); - - $context = new Mockery(); - $message1 = $context->mock('Swift_Mime_Message'); - $message2 = $context->mock('Swift_Mime_Message'); - $message3 = $context->mock('Swift_Mime_Message'); - $message4 = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message1) - -> ignoring($message2) - -> ignoring($message3) - -> ignoring($message4) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message1, optional()) -> throws($e) -> when($con1->is('on')) - -> never($t1)->send($message2, optional()) - -> never($t1)->send($message3, optional()) - -> never($t1)->send($message4, optional()) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message1, optional()) -> returns(1) -> when($con2->is('on')) - -> one($t2)->send($message2, optional()) -> returns(1) -> when($con2->is('on')) - -> one($t2)->send($message3, optional()) -> returns(1) -> when($con2->is('on')) - -> one($t2)->send($message4, optional()) -> returns(1) -> when($con2->is('on')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertEqual(1, $transport->send($message1)); - $this->assertEqual(1, $transport->send($message2)); - $this->assertEqual(1, $transport->send($message3)); - $this->assertEqual(1, $transport->send($message4)); - } - - public function testExceptionIsThrownIfAllTransportsDie() - { - $e = new Swift_TransportException('b0rken'); - - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message, optional()) -> throws($e) -> when($con1->is('on')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message, optional()) -> throws($e) -> when($con2->is('on')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - try { - $transport->send($message); - $this->fail('All transports failed so Exception should be thrown'); - } catch (Exception $e) { - } - $context->assertIsSatisfied(); - } - - public function testStoppingTransportStopsAllDelegates() - { - $context = new Mockery(); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('on'); - $con2 = $context->states('Connection')->startsAs('on'); - $context->checking(Expectations::create() - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->stop() -> when($con1->is('on')) -> then($con1->is('off')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->stop() -> when($con2->is('on')) -> then($con2->is('off')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $transport->stop(); - $context->assertIsSatisfied(); - } - - public function testTransportShowsAsNotStartedIfAllDelegatesDead() - { - $e = new Swift_TransportException('b0rken'); - - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message, optional()) -> throws($e) -> when($con1->is('on')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message, optional()) -> throws($e) -> when($con2->is('on')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertTrue($transport->isStarted()); - try { - $transport->send($message); - $this->fail('All transports failed so Exception should be thrown'); - } catch (Exception $e) { - $this->assertFalse($transport->isStarted()); - } - $context->assertIsSatisfied(); - } - - public function testRestartingTransportRestartsDeadDelegates() - { - $e = new Swift_TransportException('b0rken'); - - $context = new Mockery(); - $message1 = $context->mock('Swift_Mime_Message'); - $message2 = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message1) - -> ignoring($message2) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> exactly(2)->of($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message1, optional()) -> throws($e) -> when($con1->is('on')) -> then($con1->is('off')) - -> one($t1)->send($message2, optional()) -> returns(10) -> when($con1->is('on')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message1, optional()) -> throws($e) -> when($con2->is('on')) - -> never($t2)->send($message2, optional()) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertTrue($transport->isStarted()); - try { - $transport->send($message1); - $this->fail('All transports failed so Exception should be thrown'); - } catch (Exception $e) { - $this->assertFalse($transport->isStarted()); - } - //Restart and re-try - $transport->start(); - $this->assertTrue($transport->isStarted()); - $this->assertEqual(10, $transport->send($message2)); - $context->assertIsSatisfied(); - } - - public function testFailureReferenceIsPassedToDelegates() - { - $failures = array(); - - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $con = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con->is('on')) - -> one($t1)->start() -> when($con->isNot('on')) -> then($con->is('on')) - -> one($t1)->send($message, reference($failures)) -> returns(1) -> when($con->is('on')) - -> ignoring($t1) - ); - - $transport = $this->_getTransport(array($t1)); - $transport->start(); - $transport->send($message, $failures); - $context->assertIsSatisfied(); - } - - public function testRegisterPluginDelegatesToLoadedTransports() - { - $context = new Mockery(); - - $plugin = $this->_createPlugin($context); - - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $context->checking(Expectations::create() - -> one($t1)->registerPlugin($plugin) - -> one($t2)->registerPlugin($plugin) - -> ignoring($t1) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->registerPlugin($plugin); - - $context->assertIsSatisfied(); - } - - // -- Private helpers - - private function _getTransport(array $transports) - { - $transport = new Swift_Transport_FailoverTransport(); - $transport->setTransports($transports); - - return $transport; - } - - private function _createPlugin($context) - { - return $context->mock('Swift_Events_EventListener'); - } - - private function _createInnerTransport() - { - return $this->_mockery()->mock('Swift_Transport'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/LoadBalancedTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/LoadBalancedTransportTest.php deleted file mode 100644 index 794ff3f4..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/LoadBalancedTransportTest.php +++ /dev/null @@ -1,419 +0,0 @@ -mock('Swift_Mime_Message'); - $message2 = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection 1')->startsAs('off'); - $con2 = $context->states('Connection 2')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message1) - -> ignoring($message2) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> allowing($t1)->start() -> when($con1->is('off')) -> then($con1->is('on')) - -> one($t1)->send($message1, optional()) -> returns(1) -> when($con1->is('on')) - -> never($t1)->send($message2, optional()) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> allowing($t2)->start() -> when($con2->is('off')) -> then($con2->is('on')) - -> one($t2)->send($message2, optional()) -> returns(1) -> when($con2->is('on')) - -> never($t2)->send($message1, optional()) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertEqual(1, $transport->send($message1)); - $this->assertEqual(1, $transport->send($message2)); - - $context->assertIsSatisfied(); - } - - public function testTransportsAreReusedInRotatingFashion() - { - $context = new Mockery(); - $message1 = $context->mock('Swift_Mime_Message'); - $message2 = $context->mock('Swift_Mime_Message'); - $message3 = $context->mock('Swift_Mime_Message'); - $message4 = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection 1')->startsAs('off'); - $con2 = $context->states('Connection 2')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message1) - -> ignoring($message2) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> allowing($t1)->start() -> when($con1->is('off')) -> then($con1->is('on')) - -> one($t1)->send($message1, optional()) -> returns(1) -> when($con1->is('on')) - -> never($t1)->send($message2, optional()) - -> one($t1)->send($message3, optional()) -> returns(1) -> when($con1->is('on')) - -> never($t1)->send($message4, optional()) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> allowing($t2)->start() -> when($con2->is('off')) -> then($con2->is('on')) - -> one($t2)->send($message2, optional()) -> returns(1) -> when($con2->is('on')) - -> never($t2)->send($message1, optional()) - -> one($t2)->send($message4, optional()) -> returns(1) -> when($con2->is('on')) - -> never($t2)->send($message3, optional()) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - - $this->assertEqual(1, $transport->send($message1)); - $this->assertEqual(1, $transport->send($message2)); - $this->assertEqual(1, $transport->send($message3)); - $this->assertEqual(1, $transport->send($message4)); - - $context->assertIsSatisfied(); - } - - public function testMessageCanBeTriedOnNextTransportIfExceptionThrown() - { - $e = new Swift_TransportException('b0rken'); - - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message, optional()) -> throws($e) -> when($con1->is('on')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message, optional()) -> returns(1) -> when($con2->is('on')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertEqual(1, $transport->send($message)); - $context->assertIsSatisfied(); - } - - public function testMessageIsTriedOnNextTransportIfZeroReturned() - { - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message, optional()) -> returns(0) -> when($con1->is('on')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message, optional()) -> returns(1) -> when($con2->is('on')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertEqual(1, $transport->send($message)); - $context->assertIsSatisfied(); - } - - public function testZeroIsReturnedIfAllTransportsReturnZero() - { - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message, optional()) -> returns(0) -> when($con1->is('on')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message, optional()) -> returns(0) -> when($con2->is('on')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertEqual(0, $transport->send($message)); - $context->assertIsSatisfied(); - } - - public function testTransportsWhichThrowExceptionsAreNotRetried() - { - $e = new Swift_TransportException('maur b0rken'); - - $context = new Mockery(); - $message1 = $context->mock('Swift_Mime_Message'); - $message2 = $context->mock('Swift_Mime_Message'); - $message3 = $context->mock('Swift_Mime_Message'); - $message4 = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message1) - -> ignoring($message2) - -> ignoring($message3) - -> ignoring($message4) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message1, optional()) -> throws($e) -> when($con1->is('on')) - -> never($t1)->send($message2, optional()) - -> never($t1)->send($message3, optional()) - -> never($t1)->send($message4, optional()) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message1, optional()) -> returns(1) -> when($con2->is('on')) - -> one($t2)->send($message2, optional()) -> returns(1) -> when($con2->is('on')) - -> one($t2)->send($message3, optional()) -> returns(1) -> when($con2->is('on')) - -> one($t2)->send($message4, optional()) -> returns(1) -> when($con2->is('on')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertEqual(1, $transport->send($message1)); - $this->assertEqual(1, $transport->send($message2)); - $this->assertEqual(1, $transport->send($message3)); - $this->assertEqual(1, $transport->send($message4)); - } - - public function testExceptionIsThrownIfAllTransportsDie() - { - $e = new Swift_TransportException('b0rken'); - - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message, optional()) -> throws($e) -> when($con1->is('on')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message, optional()) -> throws($e) -> when($con2->is('on')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - try { - $transport->send($message); - $this->fail('All transports failed so Exception should be thrown'); - } catch (Exception $e) { - } - $context->assertIsSatisfied(); - } - - public function testStoppingTransportStopsAllDelegates() - { - $context = new Mockery(); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('on'); - $con2 = $context->states('Connection')->startsAs('on'); - $context->checking(Expectations::create() - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->stop() -> when($con1->is('on')) -> then($con1->is('off')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->stop() -> when($con2->is('on')) -> then($con2->is('off')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $transport->stop(); - $context->assertIsSatisfied(); - } - - public function testTransportShowsAsNotStartedIfAllDelegatesDead() - { - $e = new Swift_TransportException('b0rken'); - - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> one($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message, optional()) -> throws($e) -> when($con1->is('on')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message, optional()) -> throws($e) -> when($con2->is('on')) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertTrue($transport->isStarted()); - try { - $transport->send($message); - $this->fail('All transports failed so Exception should be thrown'); - } catch (Exception $e) { - $this->assertFalse($transport->isStarted()); - } - $context->assertIsSatisfied(); - } - - public function testRestartingTransportRestartsDeadDelegates() - { - $e = new Swift_TransportException('b0rken'); - - $context = new Mockery(); - $message1 = $context->mock('Swift_Mime_Message'); - $message2 = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $con1 = $context->states('Connection')->startsAs('off'); - $con2 = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message1) - -> ignoring($message2) - -> allowing($t1)->isStarted() -> returns(false) -> when($con1->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con1->is('on')) - -> exactly(2)->of($t1)->start() -> when($con1->isNot('on')) -> then($con1->is('on')) - -> one($t1)->send($message1, optional()) -> throws($e) -> when($con1->is('on')) -> then($con1->is('off')) - -> one($t1)->send($message2, optional()) -> returns(10) -> when($con1->is('on')) - -> ignoring($t1) - -> allowing($t2)->isStarted() -> returns(false) -> when($con2->is('off')) - -> allowing($t2)->isStarted() -> returns(true) -> when($con2->is('on')) - -> one($t2)->start() -> when($con2->isNot('on')) -> then($con2->is('on')) - -> one($t2)->send($message1, optional()) -> throws($e) -> when($con2->is('on')) - -> never($t2)->send($message2, optional()) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->start(); - $this->assertTrue($transport->isStarted()); - try { - $transport->send($message1); - $this->fail('All transports failed so Exception should be thrown'); - } catch (Exception $e) { - $this->assertFalse($transport->isStarted()); - } - //Restart and re-try - $transport->start(); - $this->assertTrue($transport->isStarted()); - $this->assertEqual(10, $transport->send($message2)); - $context->assertIsSatisfied(); - } - - public function testFailureReferenceIsPassedToDelegates() - { - $failures = array(); - - $context = new Mockery(); - $message = $context->mock('Swift_Mime_Message'); - $t1 = $context->mock('Swift_Transport'); - $con = $context->states('Connection')->startsAs('off'); - $context->checking(Expectations::create() - -> ignoring($message) - -> allowing($t1)->isStarted() -> returns(false) -> when($con->is('off')) - -> allowing($t1)->isStarted() -> returns(true) -> when($con->is('on')) - -> one($t1)->start() -> when($con->isNot('on')) -> then($con->is('on')) - -> one($t1)->send($message, reference($failures)) -> returns(1) -> when($con->is('on')) - -> ignoring($t1) - ); - - $transport = $this->_getTransport(array($t1)); - $transport->start(); - $transport->send($message, $failures); - $context->assertIsSatisfied(); - } - - public function testRegisterPluginDelegatesToLoadedTransports() - { - $context = new Mockery(); - - $plugin = $this->_createPlugin($context); - - $t1 = $context->mock('Swift_Transport'); - $t2 = $context->mock('Swift_Transport'); - $context->checking(Expectations::create() - -> one($t1)->registerPlugin($plugin) - -> one($t2)->registerPlugin($plugin) - -> ignoring($t1) - -> ignoring($t2) - ); - - $transport = $this->_getTransport(array($t1, $t2)); - $transport->registerPlugin($plugin); - - $context->assertIsSatisfied(); - } - - // -- Private helpers - - private function _getTransport(array $transports) - { - $transport = new Swift_Transport_LoadBalancedTransport(); - $transport->setTransports($transports); - - return $transport; - } - - private function _createPlugin($context) - { - return $context->mock('Swift_Events_EventListener'); - } - - private function _createInnerTransport() - { - return $this->_mockery()->mock('Swift_Transport'); - } - -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/MailTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/MailTransportTest.php deleted file mode 100644 index 90833cfa..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/MailTransportTest.php +++ /dev/null @@ -1,315 +0,0 @@ -_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $headers = $this->_createHeaders(); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> one($invoker)->mail(any(), any(), any(), any(), optional()) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - ); - - $transport->send($message); - } - - public function testTransportUsesToFieldBodyInSending() - { - $invoker = $this->_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $to = $this->_createHeader(); - $headers = $this->_createHeaders(array( - 'To' => $to - )); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> allowing($to)->getFieldBody() -> returns("Foo ") - -> one($invoker)->mail("Foo ", any(), any(), any(), optional()) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - -> ignoring($to) - ); - - $transport->send($message); - } - - public function testTransportUsesSubjectFieldBodyInSending() - { - $invoker = $this->_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $subj = $this->_createHeader(); - $headers = $this->_createHeaders(array( - 'Subject' => $subj - )); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> allowing($subj)->getFieldBody() -> returns("Thing") - -> one($invoker)->mail(any(), "Thing", any(), any(), optional()) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - -> ignoring($subj) - ); - - $transport->send($message); - } - - public function testTransportUsesBodyOfMessage() - { - $invoker = $this->_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $headers = $this->_createHeaders(); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> allowing($message)->toString() -> returns( - "To: Foo \r\n" . - "\r\n" . - "This body" - ) - -> one($invoker)->mail(any(), any(), "This body", any(), optional()) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - ); - - $transport->send($message); - } - - public function testTransportUsesHeadersFromMessage() - { - $invoker = $this->_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $headers = $this->_createHeaders(); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> allowing($message)->toString() -> returns( - "Subject: Stuff\r\n" . - "\r\n" . - "This body" - ) - -> one($invoker)->mail(any(), any(), any(), "Subject: Stuff" . PHP_EOL, optional()) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - ); - - $transport->send($message); - } - - public function testTransportReturnsCountOfAllRecipientsIfInvokerReturnsTrue() - { - $invoker = $this->_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $headers = $this->_createHeaders(); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null, 'zip@button'=>null)) - -> allowing($message)->getCc() -> returns(array('test@test'=>null)) - -> one($invoker)->mail(any(), any(), any(), any(), optional()) -> returns(true) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - ); - - $this->assertEqual(3, $transport->send($message)); - } - - public function testTransportReturnsZeroIfInvokerReturnsFalse() - { - $invoker = $this->_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $headers = $this->_createHeaders(); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array('foo@bar'=>null, 'zip@button'=>null)) - -> allowing($message)->getCc() -> returns(array('test@test'=>null)) - -> one($invoker)->mail(any(), any(), any(), any(), optional()) -> returns(false) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - ); - - $this->assertEqual(0, $transport->send($message)); - } - - public function testToHeaderIsRemovedFromHeaderSetDuringSending() - { - $invoker = $this->_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $to = $this->_createHeader(); - $headers = $this->_createHeaders(array( - 'To' => $to - )); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> one($headers)->remove('To') - -> one($invoker)->mail(any(), any(), any(), any(), optional()) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - -> ignoring($to) - ); - - $transport->send($message); - } - - public function testSubjectHeaderIsRemovedFromHeaderSetDuringSending() - { - $invoker = $this->_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $subject = $this->_createHeader(); - $headers = $this->_createHeaders(array( - 'Subject' => $subject - )); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> one($headers)->remove('Subject') - -> one($invoker)->mail(any(), any(), any(), any(), optional()) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - -> ignoring($subject) - ); - - $transport->send($message); - } - - public function testToHeaderIsPutBackAfterSending() - { - $invoker = $this->_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $to = $this->_createHeader(); - $headers = $this->_createHeaders(array( - 'To' => $to - )); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> one($headers)->set($to, optional()) - -> one($invoker)->mail(any(), any(), any(), any(), optional()) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - -> ignoring($to) - ); - - $transport->send($message); - } - - public function testSubjectHeaderIsPutBackAfterSending() - { - $invoker = $this->_createInvoker(); - $dispatcher = $this->_createEventDispatcher(); - $transport = $this->_createTransport($invoker, $dispatcher); - - $subject = $this->_createHeader(); - $headers = $this->_createHeaders(array( - 'Subject' => $subject - )); - $message = $this->_createMessage($headers); - - $this->_checking(Expectations::create() - -> one($headers)->set($subject, optional()) - -> one($invoker)->mail(any(), any(), any(), any(), optional()) - -> ignoring($dispatcher) - -> ignoring($headers) - -> ignoring($message) - -> ignoring($subject) - ); - - $transport->send($message); - } - - // -- Creation Methods - - private function _createTransport($invoker, $dispatcher) - { - return new Swift_Transport_MailTransport($invoker, $dispatcher); - } - - private function _createEventDispatcher() - { - return $this->_mock('Swift_Events_EventDispatcher'); - } - - private function _createInvoker() - { - return $this->_mock('Swift_Transport_MailInvoker'); - } - - private function _createMessage($headers) - { - $message = $this->_mock('Swift_Mime_Message'); - - $this->_checking(Expectations::create() - -> allowing($message)->getHeaders() -> returns($headers) - ); - - return $message; - } - - private function _createHeaders($headers = array()) - { - $set = $this->_mock('Swift_Mime_HeaderSet'); - - if (count($headers) > 0) { - foreach ($headers as $name => $header) { - $this->_checking(Expectations::create() - -> allowing($set)->get($name) -> returns($header) - -> allowing($set)->has($name) -> returns(true) - ); - } - } - - $header = $this->_createHeader(); - $this->_checking(Expectations::create() - -> allowing($set)->get(any()) -> returns($header) - -> allowing($set)->has(any()) -> returns(true) - -> ignoring($header) - ); - - return $set; - } - - private function _createHeader() - { - return $this->_mock('Swift_Mime_Header'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/SendmailTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/SendmailTransportTest.php deleted file mode 100644 index 558f4148..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/SendmailTransportTest.php +++ /dev/null @@ -1,135 +0,0 @@ -_createEventDispatcher(); - } - $transport = new Swift_Transport_SendmailTransport($buf, $dispatcher); - $transport->setCommand($command); - - return $transport; - } - - protected function _getSendmail($buf, $dispatcher = null) - { - if (!$dispatcher) { - $dispatcher = $this->_createEventDispatcher(); - } - $sendmail = new Swift_Transport_SendmailTransport($buf, $dispatcher); - - return $sendmail; - } - - public function testCommandCanBeSetAndFetched() - { - $buf = $this->_getBuffer(); - $sendmail = $this->_getSendmail($buf); - - $sendmail->setCommand('/usr/sbin/sendmail -bs'); - $this->assertEqual('/usr/sbin/sendmail -bs', $sendmail->getCommand()); - $sendmail->setCommand('/usr/sbin/sendmail -oi -t'); - $this->assertEqual('/usr/sbin/sendmail -oi -t', $sendmail->getCommand()); - } - - public function testSendingMessageIn_t_ModeUsesSimplePipe() - { - $buf = $this->_getBuffer(); - $sendmail = $this->_getSendmail($buf); - $message = $this->_createMessage(); - - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array('foo@bar'=>'Foobar', 'zip@button'=>'Zippy')) - -> one($message)->toByteStream($buf) - -> ignoring($message) - -> one($buf)->initialize() - -> one($buf)->terminate() - -> one($buf)->setWriteTranslations(array("\r\n"=>"\n", "\n." => "\n..")) - -> one($buf)->setWriteTranslations(array()) - -> ignoring($buf) - ); - - $sendmail->setCommand('/usr/sbin/sendmail -t'); - $this->assertEqual(2, $sendmail->send($message)); - } - - public function testSendingIn_t_ModeWith_i_FlagDoesntEscapeDot() - { - $buf = $this->_getBuffer(); - $sendmail = $this->_getSendmail($buf); - $message = $this->_createMessage(); - - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array('foo@bar'=>'Foobar', 'zip@button'=>'Zippy')) - -> one($message)->toByteStream($buf) - -> ignoring($message) - -> one($buf)->initialize() - -> one($buf)->terminate() - -> one($buf)->setWriteTranslations(array("\r\n"=>"\n")) - -> one($buf)->setWriteTranslations(array()) - -> ignoring($buf) - ); - - $sendmail->setCommand('/usr/sbin/sendmail -i -t'); - $this->assertEqual(2, $sendmail->send($message)); - } - - public function testSendingInTModeWith_oi_FlagDoesntEscapeDot() - { - $buf = $this->_getBuffer(); - $sendmail = $this->_getSendmail($buf); - $message = $this->_createMessage(); - - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array('foo@bar'=>'Foobar', 'zip@button'=>'Zippy')) - -> one($message)->toByteStream($buf) - -> ignoring($message) - -> one($buf)->initialize() - -> one($buf)->terminate() - -> one($buf)->setWriteTranslations(array("\r\n"=>"\n")) - -> one($buf)->setWriteTranslations(array()) - -> ignoring($buf) - ); - - $sendmail->setCommand('/usr/sbin/sendmail -oi -t'); - $this->assertEqual(2, $sendmail->send($message)); - } - - public function testSendingMessageRegeneratesId() - { - $buf = $this->_getBuffer(); - $sendmail = $this->_getSendmail($buf); - $message = $this->_createMessage(); - - $this->_checking(Expectations::create() - -> allowing($message)->getTo() -> returns(array('foo@bar'=>'Foobar', 'zip@button'=>'Zippy')) - -> one($message)->generateId() - -> ignoring($message) - -> one($buf)->initialize() - -> one($buf)->terminate() - -> one($buf)->setWriteTranslations(array("\r\n"=>"\n", "\n." => "\n..")) - -> one($buf)->setWriteTranslations(array()) - -> ignoring($buf) - ); - - $sendmail->setCommand('/usr/sbin/sendmail -t'); - $this->assertEqual(2, $sendmail->send($message)); - } - - public function testFluidInterface() - { - $buf = $this->_getBuffer(); - $sendmail = $this->_getTransport($buf); - - $ref = $sendmail->setCommand('/foo'); - $this->assertReference($ref, $sendmail); - } -} diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/StreamBufferTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/StreamBufferTest.php deleted file mode 100644 index 8b225af4..00000000 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/StreamBufferTest.php +++ /dev/null @@ -1,50 +0,0 @@ -_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createFilter('a', 'b') -> returns($this->_createFilter()) - -> never($factory) - ); - $buffer = $this->_createBuffer($factory); - $buffer->setWriteTranslations(array('a' => 'b')); - } - - public function testOverridingTranslationsOnlyAddsNeededFilters() - { - $factory = $this->_createFactory(); - $this->_checking(Expectations::create() - -> one($factory)->createFilter('a', 'b') -> returns($this->_createFilter()) - -> one($factory)->createFilter('x', 'y') -> returns($this->_createFilter()) - -> never($factory) - ); - $buffer = $this->_createBuffer($factory); - $buffer->setWriteTranslations(array('a' => 'b')); - $buffer->setWriteTranslations(array('x' => 'y', 'a' => 'b')); - } - - // -- Creation methods - - private function _createBuffer($replacementFactory) - { - return new Swift_Transport_StreamBuffer($replacementFactory); - } - - private function _createFactory() - { - return $this->_mock('Swift_ReplacementFilterFactory'); - } - - private function _createFilter() - { - return $this->_stub('Swift_StreamFilter'); - } -}