From 834ca6f184a644cbe6c5d8c13cf8731a5abbae9c Mon Sep 17 00:00:00 2001 From: Travis Swientek Date: Thu, 18 Jul 2013 12:59:36 -0500 Subject: [PATCH] Added PHPUnit --- composer.lock | 422 +- phpunit.phar | 69889 ---------------- vendor/autoload.php | 2 +- vendor/composer/autoload_classmap.php | 343 + vendor/composer/autoload_namespaces.php | 1 + vendor/composer/autoload_real.php | 10 +- vendor/composer/installed.json | 437 +- vendor/guzzle/guzzle/.travis.yml | 10 +- vendor/guzzle/guzzle/CHANGELOG.md | 16 - vendor/guzzle/guzzle/README.md | 6 +- .../guzzle/src/Guzzle/Common/Version.php | 2 +- .../guzzle/guzzle/src/Guzzle/Http/Client.php | 13 +- .../src/Guzzle/Http/Curl/RequestMediator.php | 19 +- .../guzzle/src/Guzzle/Http/EntityBody.php | 8 +- .../guzzle/src/Guzzle/Http/Message/Header.php | 11 +- .../src/Guzzle/Http/Message/Request.php | 15 + .../Guzzle/Http/Message/RequestFactory.php | 20 - .../Http/Message/RequestFactoryInterface.php | 6 - vendor/guzzle/guzzle/src/Guzzle/Http/Url.php | 7 +- .../src/Guzzle/Plugin/Cookie/Cookie.php | 4 - .../Plugin/Md5/CommandContentMd5Plugin.php | 4 +- .../src/Guzzle/Plugin/Oauth/OauthPlugin.php | 10 +- .../LocationVisitor/Request/XmlVisitor.php | 153 +- .../Command/OperationResponseParser.php | 88 +- .../Guzzle/Service/Description/Parameter.php | 5 +- .../Guzzle/Stream/PhpStreamRequestFactory.php | 12 +- .../guzzle/src/Guzzle/Stream/Stream.php | 3 +- .../tests/Guzzle/Tests/Http/ClientTest.php | 15 - .../Guzzle/Tests/Http/Curl/CurlHandleTest.php | 71 +- .../Tests/Http/Message/Header/LinkTest.php | 7 +- .../Guzzle/Tests/Http/Message/HeaderTest.php | 12 +- .../Tests/Http/Message/PostFileTest.php | 9 +- .../Tests/Http/Message/RequestFactoryTest.php | 30 - .../Guzzle/Tests/Http/Message/RequestTest.php | 34 + .../tests/Guzzle/Tests/Http/UrlTest.php | 8 - .../guzzle/tests/Guzzle/Tests/Http/server.js | 12 +- .../Guzzle/Tests/Plugin/Cookie/CookieTest.php | 6 - .../Request/XmlVisitorTest.php | 17 +- .../Response/XmlVisitorTest.php | 16 - 39 files changed, 1396 insertions(+), 70357 deletions(-) delete mode 100644 phpunit.phar diff --git a/composer.lock b/composer.lock index 1346f26..fa0caa8 100644 --- a/composer.lock +++ b/composer.lock @@ -3,20 +3,20 @@ "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": "ceb22f026edcfffa78d1c1eda80bb8af", + "hash": "310ef17b762e0b0089b3d47f095feb45", "packages": [ { "name": "guzzle/guzzle", - "version": "v3.7.1", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "v3.7.1" + "reference": "v3.7.0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/v3.7.1", - "reference": "v3.7.1", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/v3.7.0", + "reference": "v3.7.0", "shasum": "" }, "require": { @@ -95,7 +95,7 @@ "rest", "web service" ], - "time": "2013-07-05 20:17:54" + "time": "2013-06-11 00:24:07" }, { "name": "symfony/event-dispatcher", @@ -153,7 +153,415 @@ } ], "packages-dev": [ - + { + "name": "phpunit/php-code-coverage", + "version": "1.2.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "1.2.12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.12", + "reference": "1.2.12", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": ">=1.3.0@stable", + "phpunit/php-text-template": ">=1.1.1@stable", + "phpunit/php-token-stream": ">=1.1.3@stable" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*@dev" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.0.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2013-07-06 06:26:16" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.3.3", + "source": { + "type": "git", + "url": "git://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "1.3.3" + }, + "dist": { + "type": "zip", + "url": "https://github.com/sebastianbergmann/php-file-iterator/zipball/1.3.3", + "reference": "1.3.3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "File/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2012-10-11 04:44:38" + }, + { + "name": "phpunit/php-text-template", + "version": "1.1.4", + "source": { + "type": "git", + "url": "git://github.com/sebastianbergmann/php-text-template.git", + "reference": "1.1.4" + }, + "dist": { + "type": "zip", + "url": "https://github.com/sebastianbergmann/php-text-template/zipball/1.1.4", + "reference": "1.1.4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "Text/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2012-10-31 11:15:28" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.4", + "source": { + "type": "git", + "url": "git://github.com/sebastianbergmann/php-timer.git", + "reference": "1.0.4" + }, + "dist": { + "type": "zip", + "url": "https://github.com/sebastianbergmann/php-timer/zipball/1.0.4", + "reference": "1.0.4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "timer" + ], + "time": "2012-10-11 04:45:58" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.1.5", + "source": { + "type": "git", + "url": "git://github.com/sebastianbergmann/php-token-stream.git", + "reference": "1.1.5" + }, + "dist": { + "type": "zip", + "url": "https://github.com/sebastianbergmann/php-token-stream/zipball/1.1.5", + "reference": "1.1.5", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "tokenizer" + ], + "time": "2012-10-11 04:47:14" + }, + { + "name": "phpunit/phpunit", + "version": "3.7.22", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "3.7.22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.22", + "reference": "3.7.22", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpunit/php-code-coverage": "~1.2.1", + "phpunit/php-file-iterator": ">=1.3.1", + "phpunit/php-text-template": ">=1.1.1", + "phpunit/php-timer": "~1.0.2", + "phpunit/phpunit-mock-objects": "~1.2.0", + "symfony/yaml": "~2.0" + }, + "require-dev": { + "pear-pear/pear": "1.9.4" + }, + "suggest": { + "ext-json": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "phpunit/php-invoker": ">=1.1.0,<1.2.0" + }, + "bin": [ + "composer/bin/phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "", + "../../symfony/yaml/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2013-07-06 06:29:15" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "1.2.3", + "source": { + "type": "git", + "url": "git://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "1.2.3" + }, + "dist": { + "type": "zip", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects/archive/1.2.3.zip", + "reference": "1.2.3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-text-template": ">=1.1.1@stable" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2013-01-13 10:24:48" + }, + { + "name": "symfony/yaml", + "version": "v2.3.2", + "target-dir": "Symfony/Component/Yaml", + "source": { + "type": "git", + "url": "https://github.com/symfony/Yaml.git", + "reference": "v2.3.2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.3.2", + "reference": "v2.3.2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Yaml\\": "" + } + }, + "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 Yaml Component", + "homepage": "http://symfony.com", + "time": "2013-07-11 19:36:36" + } ], "aliases": [ diff --git a/phpunit.phar b/phpunit.phar deleted file mode 100644 index 2dd1c5e..0000000 --- a/phpunit.phar +++ /dev/null @@ -1,69889 +0,0 @@ -#!/usr/bin/env php - '/DbUnit-1.2.3/Samples/BankAccountDB/BankAccount.php', - 'bankaccountdbtest' => '/DbUnit-1.2.3/Samples/BankAccountDB/BankAccountDBTest.php', - 'bankaccountdbtestmysql' => '/DbUnit-1.2.3/Samples/BankAccountDB/BankAccountDBTestMySQL.php', - 'bankaccountexception' => '/DbUnit-1.2.3/Samples/BankAccountDB/BankAccount.php', - 'file_iterator' => '/File_Iterator-1.3.3/File/Iterator.php', - 'file_iterator_facade' => '/File_Iterator-1.3.3/File/Iterator/Facade.php', - 'file_iterator_factory' => '/File_Iterator-1.3.3/File/Iterator/Factory.php', - 'php_codecoverage' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage.php', - 'php_codecoverage_driver' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Driver.php', - 'php_codecoverage_driver_xdebug' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Driver/Xdebug.php', - 'php_codecoverage_exception' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Exception.php', - 'php_codecoverage_filter' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Filter.php', - 'php_codecoverage_report_clover' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/Clover.php', - 'php_codecoverage_report_factory' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/Factory.php', - 'php_codecoverage_report_html' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/HTML.php', - 'php_codecoverage_report_html_renderer' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/HTML/Renderer.php', - 'php_codecoverage_report_html_renderer_dashboard' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/HTML/Renderer/Dashboard.php', - 'php_codecoverage_report_html_renderer_directory' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/HTML/Renderer/Directory.php', - 'php_codecoverage_report_html_renderer_file' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/HTML/Renderer/File.php', - 'php_codecoverage_report_node' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/Node.php', - 'php_codecoverage_report_node_directory' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/Node/Directory.php', - 'php_codecoverage_report_node_file' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/Node/File.php', - 'php_codecoverage_report_node_iterator' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/Node/Iterator.php', - 'php_codecoverage_report_php' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/PHP.php', - 'php_codecoverage_report_text' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Report/Text.php', - 'php_codecoverage_util' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Util.php', - 'php_codecoverage_util_invalidargumenthelper' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Util/InvalidArgumentHelper.php', - 'php_codecoverage_version' => '/PHP_CodeCoverage-1.2.12/PHP/CodeCoverage/Version.php', - 'php_invoker' => '/PHP_Invoker-1.1.2/PHP/Invoker.php', - 'php_invoker_timeoutexception' => '/PHP_Invoker-1.1.2/PHP/Invoker/TimeoutException.php', - 'php_timer' => '/PHP_Timer-1.0.4/PHP/Timer.php', - 'php_token' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_abstract' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_ampersand' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_and_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_array' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_array_cast' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_as' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_at' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_backtick' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_bad_character' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_bool_cast' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_boolean_and' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_boolean_or' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_break' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_callable' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_caret' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_case' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_catch' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_character' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_class' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_class_c' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_clone' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_close_bracket' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_close_curly' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_close_square' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_close_tag' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_colon' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_comma' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_comment' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_concat_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_const' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_constant_encapsed_string' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_continue' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_curly_open' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_dec' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_declare' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_default' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_dir' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_div' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_div_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_dnumber' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_do' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_doc_comment' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_dollar' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_dollar_open_curly_braces' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_dot' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_double_arrow' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_double_cast' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_double_colon' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_double_quotes' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_echo' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_else' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_elseif' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_empty' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_encapsed_and_whitespace' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_end_heredoc' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_enddeclare' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_endfor' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_endforeach' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_endif' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_endswitch' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_endwhile' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_eval' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_exclamation_mark' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_exit' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_extends' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_file' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_final' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_for' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_foreach' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_func_c' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_function' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_global' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_goto' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_gt' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_halt_compiler' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_if' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_implements' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_inc' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_include' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_include_once' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_includes' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_inline_html' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_instanceof' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_insteadof' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_int_cast' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_interface' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_is_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_is_greater_or_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_is_identical' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_is_not_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_is_not_identical' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_is_smaller_or_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_isset' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_line' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_list' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_lnumber' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_logical_and' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_logical_or' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_logical_xor' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_lt' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_method_c' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_minus' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_minus_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_mod_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_mul_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_mult' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_namespace' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_new' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_ns_c' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_ns_separator' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_num_string' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_object_cast' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_object_operator' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_open_bracket' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_open_curly' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_open_square' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_open_tag' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_open_tag_with_echo' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_or_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_paamayim_nekudotayim' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_percent' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_pipe' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_plus' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_plus_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_print' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_private' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_protected' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_public' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_question_mark' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_require' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_require_once' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_return' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_semicolon' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_sl' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_sl_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_sr' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_sr_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_start_heredoc' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_static' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_stream' => '/PHP_TokenStream-1.1.5/PHP/Token/Stream.php', - 'php_token_stream_cachingfactory' => '/PHP_TokenStream-1.1.5/PHP/Token/Stream/CachingFactory.php', - 'php_token_string' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_string_cast' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_string_varname' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_switch' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_throw' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_tilde' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_trait' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_trait_c' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_try' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_unset' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_unset_cast' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_use' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_var' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_variable' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_while' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_whitespace' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_token_xor_equal' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_tokenwithscope' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'php_tokenwithscopeandvisibility' => '/PHP_TokenStream-1.1.5/PHP/Token.php', - 'phpunit_extensions_database_abstracttester' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/AbstractTester.php', - 'phpunit_extensions_database_constraint_datasetisequal' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Constraint/DataSetIsEqual.php', - 'phpunit_extensions_database_constraint_tableisequal' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Constraint/TableIsEqual.php', - 'phpunit_extensions_database_constraint_tablerowcount' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Constraint/TableRowCount.php', - 'phpunit_extensions_database_dataset_abstractdataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/AbstractDataSet.php', - 'phpunit_extensions_database_dataset_abstracttable' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/AbstractTable.php', - 'phpunit_extensions_database_dataset_abstracttablemetadata' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/AbstractTableMetaData.php', - 'phpunit_extensions_database_dataset_abstractxmldataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/AbstractXmlDataSet.php', - 'phpunit_extensions_database_dataset_compositedataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/CompositeDataSet.php', - 'phpunit_extensions_database_dataset_csvdataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/CsvDataSet.php', - 'phpunit_extensions_database_dataset_datasetfilter' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/DataSetFilter.php', - 'phpunit_extensions_database_dataset_defaultdataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/DefaultDataSet.php', - 'phpunit_extensions_database_dataset_defaulttable' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/DefaultTable.php', - 'phpunit_extensions_database_dataset_defaulttableiterator' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/DefaultTableIterator.php', - 'phpunit_extensions_database_dataset_defaulttablemetadata' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/DefaultTableMetaData.php', - 'phpunit_extensions_database_dataset_flatxmldataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/FlatXmlDataSet.php', - 'phpunit_extensions_database_dataset_idataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/IDataSet.php', - 'phpunit_extensions_database_dataset_ipersistable' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/IPersistable.php', - 'phpunit_extensions_database_dataset_ispec' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ISpec.php', - 'phpunit_extensions_database_dataset_itable' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ITable.php', - 'phpunit_extensions_database_dataset_itableiterator' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ITableIterator.php', - 'phpunit_extensions_database_dataset_itablemetadata' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ITableMetaData.php', - 'phpunit_extensions_database_dataset_mysqlxmldataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/MysqlXmlDataSet.php', - 'phpunit_extensions_database_dataset_persistors_abstract' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/Abstract.php', - 'phpunit_extensions_database_dataset_persistors_factory' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/Factory.php', - 'phpunit_extensions_database_dataset_persistors_flatxml' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/FlatXml.php', - 'phpunit_extensions_database_dataset_persistors_mysqlxml' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/MysqlXml.php', - 'phpunit_extensions_database_dataset_persistors_xml' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/Xml.php', - 'phpunit_extensions_database_dataset_persistors_yaml' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/Yaml.php', - 'phpunit_extensions_database_dataset_querydataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/QueryDataSet.php', - 'phpunit_extensions_database_dataset_querytable' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/QueryTable.php', - 'phpunit_extensions_database_dataset_replacementdataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ReplacementDataSet.php', - 'phpunit_extensions_database_dataset_replacementtable' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ReplacementTable.php', - 'phpunit_extensions_database_dataset_replacementtableiterator' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ReplacementTableIterator.php', - 'phpunit_extensions_database_dataset_specs_csv' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/Csv.php', - 'phpunit_extensions_database_dataset_specs_dbquery' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/DbQuery.php', - 'phpunit_extensions_database_dataset_specs_dbtable' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/DbTable.php', - 'phpunit_extensions_database_dataset_specs_factory' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/Factory.php', - 'phpunit_extensions_database_dataset_specs_flatxml' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/FlatXml.php', - 'phpunit_extensions_database_dataset_specs_ifactory' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/IFactory.php', - 'phpunit_extensions_database_dataset_specs_xml' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/Xml.php', - 'phpunit_extensions_database_dataset_specs_yaml' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/Yaml.php', - 'phpunit_extensions_database_dataset_tablefilter' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/TableFilter.php', - 'phpunit_extensions_database_dataset_tablemetadatafilter' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/TableMetaDataFilter.php', - 'phpunit_extensions_database_dataset_xmldataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/XmlDataSet.php', - 'phpunit_extensions_database_dataset_yamldataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/YamlDataSet.php', - 'phpunit_extensions_database_db_dataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/DataSet.php', - 'phpunit_extensions_database_db_defaultdatabaseconnection' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/DefaultDatabaseConnection.php', - 'phpunit_extensions_database_db_filtereddataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/FilteredDataSet.php', - 'phpunit_extensions_database_db_idatabaseconnection' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/IDatabaseConnection.php', - 'phpunit_extensions_database_db_imetadata' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/IMetaData.php', - 'phpunit_extensions_database_db_metadata' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData.php', - 'phpunit_extensions_database_db_metadata_informationschema' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/InformationSchema.php', - 'phpunit_extensions_database_db_metadata_mysql' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/MySQL.php', - 'phpunit_extensions_database_db_metadata_oci' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/Oci.php', - 'phpunit_extensions_database_db_metadata_pgsql' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/PgSQL.php', - 'phpunit_extensions_database_db_metadata_sqlite' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/Sqlite.php', - 'phpunit_extensions_database_db_metadata_sqlsrv' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/SqlSrv.php', - 'phpunit_extensions_database_db_resultsettable' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/ResultSetTable.php', - 'phpunit_extensions_database_db_table' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/Table.php', - 'phpunit_extensions_database_db_tableiterator' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/TableIterator.php', - 'phpunit_extensions_database_db_tablemetadata' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/TableMetaData.php', - 'phpunit_extensions_database_defaulttester' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/DefaultTester.php', - 'phpunit_extensions_database_exception' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Exception.php', - 'phpunit_extensions_database_idatabaselistconsumer' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/IDatabaseListConsumer.php', - 'phpunit_extensions_database_itester' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/ITester.php', - 'phpunit_extensions_database_operation_composite' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Composite.php', - 'phpunit_extensions_database_operation_delete' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Delete.php', - 'phpunit_extensions_database_operation_deleteall' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/DeleteAll.php', - 'phpunit_extensions_database_operation_exception' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Exception.php', - 'phpunit_extensions_database_operation_factory' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Factory.php', - 'phpunit_extensions_database_operation_idatabaseoperation' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/IDatabaseOperation.php', - 'phpunit_extensions_database_operation_insert' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Insert.php', - 'phpunit_extensions_database_operation_null' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Null.php', - 'phpunit_extensions_database_operation_replace' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Replace.php', - 'phpunit_extensions_database_operation_rowbased' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/RowBased.php', - 'phpunit_extensions_database_operation_truncate' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Truncate.php', - 'phpunit_extensions_database_operation_update' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Update.php', - 'phpunit_extensions_database_testcase' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/TestCase.php', - 'phpunit_extensions_database_ui_command' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/Command.php', - 'phpunit_extensions_database_ui_context' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/Context.php', - 'phpunit_extensions_database_ui_imedium' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/IMedium.php', - 'phpunit_extensions_database_ui_imediumprinter' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/IMediumPrinter.php', - 'phpunit_extensions_database_ui_imode' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/IMode.php', - 'phpunit_extensions_database_ui_imodefactory' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/IModeFactory.php', - 'phpunit_extensions_database_ui_invalidmodeexception' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/InvalidModeException.php', - 'phpunit_extensions_database_ui_mediums_text' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/Mediums/Text.php', - 'phpunit_extensions_database_ui_modefactory' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/ModeFactory.php', - 'phpunit_extensions_database_ui_modes_exportdataset' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/Modes/ExportDataSet.php', - 'phpunit_extensions_database_ui_modes_exportdataset_arguments' => '/DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/Modes/ExportDataSet/Arguments.php', - 'phpunit_extensions_grouptestsuite' => '/PHPUnit/Extensions/GroupTestSuite.php', - 'phpunit_extensions_phpttestcase' => '/PHPUnit/Extensions/PhptTestCase.php', - 'phpunit_extensions_phpttestcase_logger' => '/PHPUnit/Extensions/PhptTestCase/Logger.php', - 'phpunit_extensions_phpttestsuite' => '/PHPUnit/Extensions/PhptTestSuite.php', - 'phpunit_extensions_repeatedtest' => '/PHPUnit/Extensions/RepeatedTest.php', - 'phpunit_extensions_selenium2testcase' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase.php', - 'phpunit_extensions_selenium2testcase_command' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Command.php', - 'phpunit_extensions_selenium2testcase_commandsholder' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php', - 'phpunit_extensions_selenium2testcase_driver' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Driver.php', - 'phpunit_extensions_selenium2testcase_element' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Element.php', - 'phpunit_extensions_selenium2testcase_element_accessor' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php', - 'phpunit_extensions_selenium2testcase_element_select' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php', - 'phpunit_extensions_selenium2testcase_elementcommand_attribute' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.php', - 'phpunit_extensions_selenium2testcase_elementcommand_click' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php', - 'phpunit_extensions_selenium2testcase_elementcommand_css' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php', - 'phpunit_extensions_selenium2testcase_elementcommand_equals' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.php', - 'phpunit_extensions_selenium2testcase_elementcommand_genericaccessor' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php', - 'phpunit_extensions_selenium2testcase_elementcommand_genericpost' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.php', - 'phpunit_extensions_selenium2testcase_elementcommand_value' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.php', - 'phpunit_extensions_selenium2testcase_elementcriteria' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.php', - 'phpunit_extensions_selenium2testcase_exception' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Exception.php', - 'phpunit_extensions_selenium2testcase_keys' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Keys.php', - 'phpunit_extensions_selenium2testcase_keysholder' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php', - 'phpunit_extensions_selenium2testcase_noseleniumexception' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/NoSeleniumException.php', - 'phpunit_extensions_selenium2testcase_response' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Response.php', - 'phpunit_extensions_selenium2testcase_screenshotlistener' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php', - 'phpunit_extensions_selenium2testcase_session' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Session.php', - 'phpunit_extensions_selenium2testcase_session_cookie' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.php', - 'phpunit_extensions_selenium2testcase_session_cookie_builder' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php', - 'phpunit_extensions_selenium2testcase_session_storage' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Session/Storage.php', - 'phpunit_extensions_selenium2testcase_session_timeouts' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_acceptalert' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_alerttext' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_click' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_dismissalert' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_frame' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_genericaccessor' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_genericattribute' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_keys' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_location' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_moveto' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_orientation' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_url' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php', - 'phpunit_extensions_selenium2testcase_sessioncommand_window' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.php', - 'phpunit_extensions_selenium2testcase_sessionstrategy' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php', - 'phpunit_extensions_selenium2testcase_sessionstrategy_isolated' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php', - 'phpunit_extensions_selenium2testcase_sessionstrategy_shared' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php', - 'phpunit_extensions_selenium2testcase_statecommand' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/StateCommand.php', - 'phpunit_extensions_selenium2testcase_url' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/URL.php', - 'phpunit_extensions_selenium2testcase_waituntil' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.php', - 'phpunit_extensions_selenium2testcase_webdriverexception' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/WebDriverException.php', - 'phpunit_extensions_selenium2testcase_window' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Window.php', - 'phpunit_extensions_seleniumbrowsersuite' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumBrowserSuite.php', - 'phpunit_extensions_seleniumcommon_remotecoverage' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumCommon/RemoteCoverage.php', - 'phpunit_extensions_seleniumtestcase' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumTestCase.php', - 'phpunit_extensions_seleniumtestcase_driver' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumTestCase/Driver.php', - 'phpunit_extensions_seleniumtestsuite' => '/PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumTestSuite.php', - 'phpunit_extensions_testdecorator' => '/PHPUnit/Extensions/TestDecorator.php', - 'phpunit_extensions_ticketlistener' => '/PHPUnit/Extensions/TicketListener.php', - 'phpunit_framework_assert' => '/PHPUnit/Framework/Assert.php', - 'phpunit_framework_assertionfailederror' => '/PHPUnit/Framework/AssertionFailedError.php', - 'phpunit_framework_comparator' => '/PHPUnit/Framework/Comparator.php', - 'phpunit_framework_comparator_array' => '/PHPUnit/Framework/Comparator/Array.php', - 'phpunit_framework_comparator_domdocument' => '/PHPUnit/Framework/Comparator/DOMDocument.php', - 'phpunit_framework_comparator_double' => '/PHPUnit/Framework/Comparator/Double.php', - 'phpunit_framework_comparator_exception' => '/PHPUnit/Framework/Comparator/Exception.php', - 'phpunit_framework_comparator_mockobject' => '/PHPUnit/Framework/Comparator/MockObject.php', - 'phpunit_framework_comparator_numeric' => '/PHPUnit/Framework/Comparator/Numeric.php', - 'phpunit_framework_comparator_object' => '/PHPUnit/Framework/Comparator/Object.php', - 'phpunit_framework_comparator_resource' => '/PHPUnit/Framework/Comparator/Resource.php', - 'phpunit_framework_comparator_scalar' => '/PHPUnit/Framework/Comparator/Scalar.php', - 'phpunit_framework_comparator_splobjectstorage' => '/PHPUnit/Framework/Comparator/SplObjectStorage.php', - 'phpunit_framework_comparator_type' => '/PHPUnit/Framework/Comparator/Type.php', - 'phpunit_framework_comparatorfactory' => '/PHPUnit/Framework/ComparatorFactory.php', - 'phpunit_framework_comparisonfailure' => '/PHPUnit/Framework/ComparisonFailure.php', - 'phpunit_framework_constraint' => '/PHPUnit/Framework/Constraint.php', - 'phpunit_framework_constraint_and' => '/PHPUnit/Framework/Constraint/And.php', - 'phpunit_framework_constraint_arrayhaskey' => '/PHPUnit/Framework/Constraint/ArrayHasKey.php', - 'phpunit_framework_constraint_attribute' => '/PHPUnit/Framework/Constraint/Attribute.php', - 'phpunit_framework_constraint_callback' => '/PHPUnit/Framework/Constraint/Callback.php', - 'phpunit_framework_constraint_classhasattribute' => '/PHPUnit/Framework/Constraint/ClassHasAttribute.php', - 'phpunit_framework_constraint_classhasstaticattribute' => '/PHPUnit/Framework/Constraint/ClassHasStaticAttribute.php', - 'phpunit_framework_constraint_composite' => '/PHPUnit/Framework/Constraint/Composite.php', - 'phpunit_framework_constraint_count' => '/PHPUnit/Framework/Constraint/Count.php', - 'phpunit_framework_constraint_exception' => '/PHPUnit/Framework/Constraint/Exception.php', - 'phpunit_framework_constraint_exceptioncode' => '/PHPUnit/Framework/Constraint/ExceptionCode.php', - 'phpunit_framework_constraint_exceptionmessage' => '/PHPUnit/Framework/Constraint/ExceptionMessage.php', - 'phpunit_framework_constraint_fileexists' => '/PHPUnit/Framework/Constraint/FileExists.php', - 'phpunit_framework_constraint_greaterthan' => '/PHPUnit/Framework/Constraint/GreaterThan.php', - 'phpunit_framework_constraint_isanything' => '/PHPUnit/Framework/Constraint/IsAnything.php', - 'phpunit_framework_constraint_isempty' => '/PHPUnit/Framework/Constraint/IsEmpty.php', - 'phpunit_framework_constraint_isequal' => '/PHPUnit/Framework/Constraint/IsEqual.php', - 'phpunit_framework_constraint_isfalse' => '/PHPUnit/Framework/Constraint/IsFalse.php', - 'phpunit_framework_constraint_isidentical' => '/PHPUnit/Framework/Constraint/IsIdentical.php', - 'phpunit_framework_constraint_isinstanceof' => '/PHPUnit/Framework/Constraint/IsInstanceOf.php', - 'phpunit_framework_constraint_isjson' => '/PHPUnit/Framework/Constraint/IsJson.php', - 'phpunit_framework_constraint_isnull' => '/PHPUnit/Framework/Constraint/IsNull.php', - 'phpunit_framework_constraint_istrue' => '/PHPUnit/Framework/Constraint/IsTrue.php', - 'phpunit_framework_constraint_istype' => '/PHPUnit/Framework/Constraint/IsType.php', - 'phpunit_framework_constraint_jsonmatches' => '/PHPUnit/Framework/Constraint/JsonMatches.php', - 'phpunit_framework_constraint_jsonmatches_errormessageprovider' => '/PHPUnit/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', - 'phpunit_framework_constraint_lessthan' => '/PHPUnit/Framework/Constraint/LessThan.php', - 'phpunit_framework_constraint_not' => '/PHPUnit/Framework/Constraint/Not.php', - 'phpunit_framework_constraint_objecthasattribute' => '/PHPUnit/Framework/Constraint/ObjectHasAttribute.php', - 'phpunit_framework_constraint_or' => '/PHPUnit/Framework/Constraint/Or.php', - 'phpunit_framework_constraint_pcrematch' => '/PHPUnit/Framework/Constraint/PCREMatch.php', - 'phpunit_framework_constraint_samesize' => '/PHPUnit/Framework/Constraint/SameSize.php', - 'phpunit_framework_constraint_stringcontains' => '/PHPUnit/Framework/Constraint/StringContains.php', - 'phpunit_framework_constraint_stringendswith' => '/PHPUnit/Framework/Constraint/StringEndsWith.php', - 'phpunit_framework_constraint_stringmatches' => '/PHPUnit/Framework/Constraint/StringMatches.php', - 'phpunit_framework_constraint_stringstartswith' => '/PHPUnit/Framework/Constraint/StringStartsWith.php', - 'phpunit_framework_constraint_traversablecontains' => '/PHPUnit/Framework/Constraint/TraversableContains.php', - 'phpunit_framework_constraint_traversablecontainsonly' => '/PHPUnit/Framework/Constraint/TraversableContainsOnly.php', - 'phpunit_framework_constraint_xor' => '/PHPUnit/Framework/Constraint/Xor.php', - 'phpunit_framework_error' => '/PHPUnit/Framework/Error.php', - 'phpunit_framework_error_deprecated' => '/PHPUnit/Framework/Error/Deprecated.php', - 'phpunit_framework_error_notice' => '/PHPUnit/Framework/Error/Notice.php', - 'phpunit_framework_error_warning' => '/PHPUnit/Framework/Error/Warning.php', - 'phpunit_framework_exception' => '/PHPUnit/Framework/Exception.php', - 'phpunit_framework_expectationfailedexception' => '/PHPUnit/Framework/ExpectationFailedException.php', - 'phpunit_framework_incompletetest' => '/PHPUnit/Framework/IncompleteTest.php', - 'phpunit_framework_incompletetesterror' => '/PHPUnit/Framework/IncompleteTestError.php', - 'phpunit_framework_mockobject_builder_identity' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/Identity.php', - 'phpunit_framework_mockobject_builder_invocationmocker' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/InvocationMocker.php', - 'phpunit_framework_mockobject_builder_match' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/Match.php', - 'phpunit_framework_mockobject_builder_methodnamematch' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/MethodNameMatch.php', - 'phpunit_framework_mockobject_builder_namespace' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/Namespace.php', - 'phpunit_framework_mockobject_builder_parametersmatch' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/ParametersMatch.php', - 'phpunit_framework_mockobject_builder_stub' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/Stub.php', - 'phpunit_framework_mockobject_generator' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Generator.php', - 'phpunit_framework_mockobject_invocation' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Invocation.php', - 'phpunit_framework_mockobject_invocation_object' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Invocation/Object.php', - 'phpunit_framework_mockobject_invocation_static' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Invocation/Static.php', - 'phpunit_framework_mockobject_invocationmocker' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/InvocationMocker.php', - 'phpunit_framework_mockobject_invokable' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Invokable.php', - 'phpunit_framework_mockobject_matcher' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher.php', - 'phpunit_framework_mockobject_matcher_anyinvokedcount' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/AnyInvokedCount.php', - 'phpunit_framework_mockobject_matcher_anyparameters' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/AnyParameters.php', - 'phpunit_framework_mockobject_matcher_invocation' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/Invocation.php', - 'phpunit_framework_mockobject_matcher_invokedatindex' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/InvokedAtIndex.php', - 'phpunit_framework_mockobject_matcher_invokedatleastonce' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', - 'phpunit_framework_mockobject_matcher_invokedcount' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/InvokedCount.php', - 'phpunit_framework_mockobject_matcher_invokedrecorder' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/InvokedRecorder.php', - 'phpunit_framework_mockobject_matcher_methodname' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/MethodName.php', - 'phpunit_framework_mockobject_matcher_parameters' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/Parameters.php', - 'phpunit_framework_mockobject_matcher_statelessinvocation' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/StatelessInvocation.php', - 'phpunit_framework_mockobject_mockbuilder' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/MockBuilder.php', - 'phpunit_framework_mockobject_mockobject' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/MockObject.php', - 'phpunit_framework_mockobject_stub' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub.php', - 'phpunit_framework_mockobject_stub_consecutivecalls' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/ConsecutiveCalls.php', - 'phpunit_framework_mockobject_stub_exception' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/Exception.php', - 'phpunit_framework_mockobject_stub_matchercollection' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/MatcherCollection.php', - 'phpunit_framework_mockobject_stub_return' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/Return.php', - 'phpunit_framework_mockobject_stub_returnargument' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/ReturnArgument.php', - 'phpunit_framework_mockobject_stub_returncallback' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/ReturnCallback.php', - 'phpunit_framework_mockobject_stub_returnself' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/ReturnSelf.php', - 'phpunit_framework_mockobject_stub_returnvaluemap' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/ReturnValueMap.php', - 'phpunit_framework_mockobject_verifiable' => '/PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Verifiable.php', - 'phpunit_framework_outputerror' => '/PHPUnit/Framework/OutputError.php', - 'phpunit_framework_selfdescribing' => '/PHPUnit/Framework/SelfDescribing.php', - 'phpunit_framework_skippedtest' => '/PHPUnit/Framework/SkippedTest.php', - 'phpunit_framework_skippedtesterror' => '/PHPUnit/Framework/SkippedTestError.php', - 'phpunit_framework_skippedtestsuiteerror' => '/PHPUnit/Framework/SkippedTestSuiteError.php', - 'phpunit_framework_syntheticerror' => '/PHPUnit/Framework/SyntheticError.php', - 'phpunit_framework_test' => '/PHPUnit/Framework/Test.php', - 'phpunit_framework_testcase' => '/PHPUnit/Framework/TestCase.php', - 'phpunit_framework_testfailure' => '/PHPUnit/Framework/TestFailure.php', - 'phpunit_framework_testlistener' => '/PHPUnit/Framework/TestListener.php', - 'phpunit_framework_testresult' => '/PHPUnit/Framework/TestResult.php', - 'phpunit_framework_testsuite' => '/PHPUnit/Framework/TestSuite.php', - 'phpunit_framework_testsuite_dataprovider' => '/PHPUnit/Framework/TestSuite/DataProvider.php', - 'phpunit_framework_warning' => '/PHPUnit/Framework/Warning.php', - 'phpunit_runner_basetestrunner' => '/PHPUnit/Runner/BaseTestRunner.php', - 'phpunit_runner_standardtestsuiteloader' => '/PHPUnit/Runner/StandardTestSuiteLoader.php', - 'phpunit_runner_testsuiteloader' => '/PHPUnit/Runner/TestSuiteLoader.php', - 'phpunit_runner_version' => '/PHPUnit/Runner/Version.php', - 'phpunit_textui_command' => '/PHPUnit/TextUI/Command.php', - 'phpunit_textui_resultprinter' => '/PHPUnit/TextUI/ResultPrinter.php', - 'phpunit_textui_testrunner' => '/PHPUnit/TextUI/TestRunner.php', - 'phpunit_util_class' => '/PHPUnit/Util/Class.php', - 'phpunit_util_configuration' => '/PHPUnit/Util/Configuration.php', - 'phpunit_util_deprecatedfeature' => '/PHPUnit/Util/DeprecatedFeature.php', - 'phpunit_util_deprecatedfeature_logger' => '/PHPUnit/Util/DeprecatedFeature/Logger.php', - 'phpunit_util_diff' => '/PHPUnit/Util/Diff.php', - 'phpunit_util_errorhandler' => '/PHPUnit/Util/ErrorHandler.php', - 'phpunit_util_fileloader' => '/PHPUnit/Util/Fileloader.php', - 'phpunit_util_filesystem' => '/PHPUnit/Util/Filesystem.php', - 'phpunit_util_filter' => '/PHPUnit/Util/Filter.php', - 'phpunit_util_getopt' => '/PHPUnit/Util/Getopt.php', - 'phpunit_util_globalstate' => '/PHPUnit/Util/GlobalState.php', - 'phpunit_util_invalidargumenthelper' => '/PHPUnit/Util/InvalidArgumentHelper.php', - 'phpunit_util_log_json' => '/PHPUnit/Util/Log/JSON.php', - 'phpunit_util_log_junit' => '/PHPUnit/Util/Log/JUnit.php', - 'phpunit_util_log_tap' => '/PHPUnit/Util/Log/TAP.php', - 'phpunit_util_php' => '/PHPUnit/Util/PHP.php', - 'phpunit_util_php_default' => '/PHPUnit/Util/PHP/Default.php', - 'phpunit_util_php_windows' => '/PHPUnit/Util/PHP/Windows.php', - 'phpunit_util_printer' => '/PHPUnit/Util/Printer.php', - 'phpunit_util_string' => '/PHPUnit/Util/String.php', - 'phpunit_util_test' => '/PHPUnit/Util/Test.php', - 'phpunit_util_testdox_nameprettifier' => '/PHPUnit/Util/TestDox/NamePrettifier.php', - 'phpunit_util_testdox_resultprinter' => '/PHPUnit/Util/TestDox/ResultPrinter.php', - 'phpunit_util_testdox_resultprinter_html' => '/PHPUnit/Util/TestDox/ResultPrinter/HTML.php', - 'phpunit_util_testdox_resultprinter_text' => '/PHPUnit/Util/TestDox/ResultPrinter/Text.php', - 'phpunit_util_testsuiteiterator' => '/PHPUnit/Util/TestSuiteIterator.php', - 'phpunit_util_type' => '/PHPUnit/Util/Type.php', - 'phpunit_util_xml' => '/PHPUnit/Util/XML.php', - 'symfony\\component\\yaml\\dumper' => '/Yaml-2.2.0/Symfony/Component/Yaml/Dumper.php', - 'symfony\\component\\yaml\\escaper' => '/Yaml-2.2.0/Symfony/Component/Yaml/Escaper.php', - 'symfony\\component\\yaml\\exception\\dumpexception' => '/Yaml-2.2.0/Symfony/Component/Yaml/Exception/DumpException.php', - 'symfony\\component\\yaml\\exception\\exceptioninterface' => '/Yaml-2.2.0/Symfony/Component/Yaml/Exception/ExceptionInterface.php', - 'symfony\\component\\yaml\\exception\\parseexception' => '/Yaml-2.2.0/Symfony/Component/Yaml/Exception/ParseException.php', - 'symfony\\component\\yaml\\exception\\runtimeexception' => '/Yaml-2.2.0/Symfony/Component/Yaml/Exception/RuntimeException.php', - 'symfony\\component\\yaml\\inline' => '/Yaml-2.2.0/Symfony/Component/Yaml/Inline.php', - 'symfony\\component\\yaml\\parser' => '/Yaml-2.2.0/Symfony/Component/Yaml/Parser.php', - 'symfony\\component\\yaml\\tests\\a' => '/Yaml-2.2.0/Symfony/Component/Yaml/Tests/DumperTest.php', - 'symfony\\component\\yaml\\tests\\b' => '/Yaml-2.2.0/Symfony/Component/Yaml/Tests/ParserTest.php', - 'symfony\\component\\yaml\\tests\\dumpertest' => '/Yaml-2.2.0/Symfony/Component/Yaml/Tests/DumperTest.php', - 'symfony\\component\\yaml\\tests\\inlinetest' => '/Yaml-2.2.0/Symfony/Component/Yaml/Tests/InlineTest.php', - 'symfony\\component\\yaml\\tests\\parsertest' => '/Yaml-2.2.0/Symfony/Component/Yaml/Tests/ParserTest.php', - 'symfony\\component\\yaml\\tests\\yamltest' => '/Yaml-2.2.0/Symfony/Component/Yaml/Tests/YamlTest.php', - 'symfony\\component\\yaml\\unescaper' => '/Yaml-2.2.0/Symfony/Component/Yaml/Unescaper.php', - 'symfony\\component\\yaml\\yaml' => '/Yaml-2.2.0/Symfony/Component/Yaml/Yaml.php', - 'text_template' => '/Text_Template-1.1.4/Text/Template.php' - ); - } - - $class = strtolower($class); - - if (isset($classes[$class])) { - require 'phar://phpunit-3.7.22.phar' . $classes[$class]; - } - } -); - -Phar::mapPhar('phpunit-3.7.22.phar'); -PHPUnit_TextUI_Command::main(); - -__HALT_COMPILER(); ?> -Ý®phpunit-3.7.22.pharFile_Iterator-1.3.3/LICENSE ¹×Q  þæ¶&File_Iterator-1.3.3/ChangeLog.markdownT¹×QTÇŽÌX¶#File_Iterator-1.3.3/README.markdownF¹×QF_h'¶%File_Iterator-1.3.3/File/Iterator.phpk¹×QkÂM¶,File_Iterator-1.3.3/File/Iterator/Facade.php­¹×Q­žmɶ-File_Iterator-1.3.3/File/Iterator/Factory.phpC¹×QCÏ=—ˆ¶ PHPUnit_MockObject-1.2.3/LICENSE¹×QBÒ¶CPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Invokable.php= ¹×Q= °‹²¶SPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Generator/wsdl_class.tpl.distµ¹×QµŽ§¶WPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Generator/unmocked_clone.tpl.distŸ¹×QŸ8W}ض]PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Generator/mocked_object_method.tpl.dist„¹×Q„ãbVæ¶TPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Generator/wsdl_method.tpl.dist<¹×Q<¾Ði‰¶]PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Generator/mocked_static_method.tpl.dist‰¹×Q‰>¦K¶UPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Generator/mocked_class.tpl.dist‚¹×Q‚Àb)¶UPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Generator/mocked_clone.tpl.dist„¹×Q„œaT¶TPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Generator/trait_class.tpl.dist-¹×Q-˜1°,¶CPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Generator.php%i¹×Q%ipúp)¶LPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/MethodName.phpJ¹×QJÔk¶TPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/InvokedAtLeastOnce.php7 ¹×Q7 ‡äßQ¶QPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/InvokedRecorder.phpÓ¹×QÓŠ?ïd¶OPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/AnyParameters.php® ¹×Q® g‚Œ¾¶NPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/InvokedCount.phpz¹×Qz³_F¶QPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/AnyInvokedCount.phpI ¹×QI ™çDH¶LPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/Parameters.php£¹×Q£¸¦¶LPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/Invocation.php¹×Qéan¶UPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/StatelessInvocation.php¹×QtšÅ¶PPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher/InvokedAtIndex.php}¹×Q}£Ó骶EPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/MockBuilder.php‡¹×Q‡ q¶APHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Matcher.php´&¹×Q´&$q¶JPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/InvocationMocker.php¹×Qfû¬¶KPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Invocation/Static.phpF¹×QF (ü™¶KPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Invocation/Object.php - ¹×Q - ­Ò¥‹¶EPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/Return.phpÇ ¹×QÇ #£àʶPPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/MatcherCollection.phpj ¹×Qj ÍôÙ_¶MPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/ReturnArgument.phpm ¹×Qm #D j¶IPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/ReturnSelf.php˜ ¹×Q˜ pžWʶHPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/Exception.phpb ¹×Qb +«`¶OPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/ConsecutiveCalls.php ¹×Q ì®G—¶MPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/ReturnCallback.phpû ¹×Qû ’+­¶MPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub/ReturnValueMap.phpê ¹×Qê `ËY¸¶DPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Verifiable.php ¹×Q |¶DPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Invocation.phpö ¹×Qö ²7ù°¶>PHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Stub.php] ¹×Q] ¹…íǶQPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/ParametersMatch.phpi¹×Qi’9¶GPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/Match.phpx ¹×Qx h“þ¶RPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/InvocationMocker.phpĹ×QÄ–*¬b¶KPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/Namespace.phpŽ ¹×QŽ ÃG“¶QPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/MethodNameMatch.php ¹×Q ·6»¶JPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/Identity.phpý ¹×Qý ÊÚh_¶FPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/Builder/Stub.phpË ¹×QË 0üĶDPHPUnit_MockObject-1.2.3/PHPUnit/Framework/MockObject/MockObject.php¡¹×Q¡ǧü4¶+PHPUnit_MockObject-1.2.3/ChangeLog.markdownã¹×QãU¬z¶PHPUnit_Selenium-1.3.1/LICENSE¹×Qvç Þ¶?PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumTestSuite.phpD¹×QDrF™¶?PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase.phpéA¹×QéA­LT϶EPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumTestCase/Driver.phpR«¹×QR«År°¶BPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumBrowserSuite.phpæ¹×Qæ¤È3”¶>PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumTestCase.php¢–¹×Q¢–B Ãó¶RPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Css.php] ¹×Q] _ç4@¶^PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericAccessor.php] -¹×Q] -ÉdŽ°¶UPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Equals.phpT ¹×QT ³g—›¶ZPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/GenericPost.phpK -¹×QK -²û¬š¶TPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Value.phpƒ -¹×Qƒ -¤º¶XPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Attribute.phph ¹×Qh (‡¿$¶TPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCommand/Click.php -¹×Q -´à&¶JPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/KeysHolder.php¹×Q)˪p¶PPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Element/Accessor.php¶¹×Q¶›!.¡¶NPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Element/Select.php0¹×Q0þO®¨¶GPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Command.php@ ¹×Q@ [·ÞL¶IPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Exception.php× ¹×Q× 2 -´c¶FPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Driver.php"¹×Q":0Üx¶LPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/StateCommand.phpk -¹×Qk -›O©¶HPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Response.phpF ¹×QF ü y̶SPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/NoSeleniumException.php¹ ¹×Q¹ -d}L¶RPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/WebDriverException.phpZ ¹×QZ -Àd°¶GPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Session.php2,¹×Q2,ªI¶XPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php† ¹×Q† 6™¥‡¶VPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Shared.php<¹×Q<NÕR¶FPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Window.phpC ¹×QC óê+¶CPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/URL.php¹×QRrê¶DPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Keys.php=¹×Q=ž¢¶OPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Session/Storage.php, ¹×Q, é®Þ¶NPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie.phpñ¹×Qñ<9.D¶VPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Session/Cookie/Builder.php¹×QY¦n…¶PPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Session/Timeouts.phpM¹×QMñ`â¶OPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy.php• ¹×Q• R$³r¶OPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ElementCriteria.phpB ¹×QB xÄA\¶WPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Location.php¿ ¹×Q¿ Èâ>•¶[PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/DismissAlert.php* -¹×Q* -漩/¶TPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Frame.phpª ¹×Qª ¶´Û¶^PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAccessor.phpH -¹×QH -2ï µ¶RPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Url.php ¹×Q ;¦JÛ¶XPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AlertText.php7 ¹×Q7 Hÿxs¶UPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Window.phpÐ -¹×QÐ -Kaö¶SPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Keys.php¹×Q³ßF¶UPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/MoveTo.php„ ¹×Q„ z–]¶_PHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/GenericAttribute.php“ -¹×Q“ -ì”â¶ZPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/AcceptAlert.php% -¹×Q% -OÎâ¶ZPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Orientation.phpÎ ¹×QÎ `Ö¸¶TPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/SessionCommand/Click.php¯ ¹×Q¯ àɿ߶RPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/ScreenshotListener.php{¹×Q{6;ÁE¶GPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/Element.php½¹×Q½fFÄ:¶NPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/CommandsHolder.php¿¹×Q¿õ"Õ¶IPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/Selenium2TestCase/WaitUntil.phpx¹×Qx §|†¶DPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumCommon/prepend.phpê -¹×Qê -ª%Ù±¶KPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumCommon/RemoteCoverage.php>¹×Q>*dBʶMPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php¥ ¹×Q¥ ow™¶CPHPUnit_Selenium-1.3.1/PHPUnit/Extensions/SeleniumCommon/append.php ¹×Q ›·ú÷¶)PHPUnit_Selenium-1.3.1/ChangeLog.markdown¹×Qª*Ån¶DbUnit-1.2.3/dbunit.batn¹×Qnq{Oª¶DbUnit-1.2.3/LICENSE¹×QÓ î ¶IDbUnit-1.2.3/PHPUnit/Extensions/Database/DB/DefaultDatabaseConnection.phpý¹×Qý0ë¶5DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/Table.php ¹×Q (ZjK¶9DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/IMetaData.php*¹×Q*æX¶=DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/TableIterator.php~¹×Q~Hê"ñ¶CDbUnit-1.2.3/PHPUnit/Extensions/Database/DB/IDatabaseConnection.phpˆ¹×Qˆ^p²¶7DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/DataSet.phpѹ×QÑ?>–õ¶?DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/FilteredDataSet.phpA ¹×QA Ê‚‚:¶JDbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/InformationSchema.phpù×QÃdGT6¶<DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/Oci.phpJ¹×QJ®×[¶>DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/PgSQL.phpv¹×Qvyr¡-¶?DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/Sqlite.php¹×Q³Û†&¶>DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/MySQL.phpʹ×QÊ÷§­Æ¶?DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData/SqlSrv.php™¹×Q™‡b“2¶=DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/TableMetaData.php ¹×Q ÞYó%¶>DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/ResultSetTable.phpÝ ¹×QÝ žÎô -¶8DbUnit-1.2.3/PHPUnit/Extensions/Database/DB/MetaData.php±¹×Q±³„þʶ5DbUnit-1.2.3/PHPUnit/Extensions/Database/TestCase.php%¹×Q%ë×Ü=¶7DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/Command.phpF ¹×QF ËìÌW¶7DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/IMedium.phpM ¹×QM b£»Å¶MDbUnit-1.2.3/PHPUnit/Extensions/Database/UI/Modes/ExportDataSet/Arguments.php¹×Q#_Ñü¶CDbUnit-1.2.3/PHPUnit/Extensions/Database/UI/Modes/ExportDataSet.phpï¹×Qï|àÍ ¶;DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/ModeFactory.php¹×Q?Š_"¶<DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/Mediums/Text.php•¹×Q•|ªJÁ¶7DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/Context.php ¹×Q Ñ«’¶DDbUnit-1.2.3/PHPUnit/Extensions/Database/UI/InvalidModeException.phpÀ ¹×QÀ LFi¶5DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/IMode.php± -¹×Q± -¿W;¶>DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/IMediumPrinter.php£ -¹×Q£ -{4J˶<DbUnit-1.2.3/PHPUnit/Extensions/Database/UI/IModeFactory.phpè -¹×Qè -cg]9¶@DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Exception.php¾¹×Q¾ò¾h¶=DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Delete.php÷ ¹×Q÷ …›¦~¶=DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Insert.php͹×QÍÌ~Ìù¶?DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/RowBased.php6¹×Q6~ -JN¶@DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/DeleteAll.php– ¹×Q– n{¶=DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Update.php›¹×Q›ã3f€¶;DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Null.phpˆ -¹×Qˆ -Õ˜MX¶IDbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/IDatabaseOperation.phpÇ ¹×QÇ >k´¶@DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Composite.phpƒ¹×QƒöJ¶?DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Truncate.php² ¹×Q² ¦kJ­¶>DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Replace.phpQ¹×QQÎçȶ>DbUnit-1.2.3/PHPUnit/Extensions/Database/Operation/Factory.php¬¹×Q¬šÝÙ¶6DbUnit-1.2.3/PHPUnit/Extensions/Database/Exception.phpþ ¹×Qþ àY?¤¶DDbUnit-1.2.3/PHPUnit/Extensions/Database/Constraint/TableIsEqual.phpX¹×QX}¼¶FDbUnit-1.2.3/PHPUnit/Extensions/Database/Constraint/DataSetIsEqual.phpf¹×QfáÁTu¶EDbUnit-1.2.3/PHPUnit/Extensions/Database/Constraint/TableRowCount.phpW ¹×QW wV±¶BDbUnit-1.2.3/PHPUnit/Extensions/Database/IDatabaseListConsumer.php5 -¹×Q5 -ê—§c¶ADbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/QueryDataSet.phpc¹×Qc{É.G¶DDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/MysqlXmlDataSet.php#¹×Q#Ó^N¦¶?DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/QueryTable.phpô¹×Qô¾žÑG¶:DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ISpec.php} -¹×Q} -šííû¶HDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/TableMetaDataFilter.php¹×QîkOͶGDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/AbstractXmlDataSet.phpǹ×QÇ]Õ喝;DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ITable.php ¹×Q }¬"¶ADbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/DefaultTable.phpx¹×QxU—9œ¶MDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ReplacementTableIterator.php„¹×Q„V(ß ¶GDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ReplacementDataSet.phpT¹×QT»øÅʶ=DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/IDataSet.phpÄ ¹×QÄ V€?¶CDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/DefaultDataSet.php‹ ¹×Q‹ óª¶EDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ReplacementTable.php¹×Q%Í﮶BDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/AbstractTable.phpʹ×QÊ4RçO¶CDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ITableIterator.phpþ -¹×Qþ -²’¶?DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/CsvDataSet.php̹×QÌc4]¶IDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/DefaultTableMetaData.php– ¹×Q– î8`¶?DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/Yaml.php§ ¹×Q§ ˆ"Šî¶>DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/Xml.php¡ ¹×Q¡ H%z}¶CDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/IFactory.phpE -¹×QE -Pº—¶>DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/Csv.phpU¹×QUhçB›¶BDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/DbTable.phpx¹×Qx>ÜëжBDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/DbQuery.phpÓ¹×QÓ4¶BDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/FlatXml.php» ¹×Q» hë*¶BDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Specs/Factory.php³ ¹×Q³ PúÙ»¶IDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/DefaultTableIterator.phpŠ¹×QŠù< ¶BDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/DataSetFilter.php -¹×Q -•”¸7¶CDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/ITableMetaData.php, ¹×Q, Înùû¶DDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/AbstractDataSet.php¹×Q¿ÙK¶?DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/XmlDataSet.php¸¹×Q¸þl •¶DDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/Yaml.phpá¹×Qárñ¤¹¶CDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/Xml.php -¹×Q -_ð¶HDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/MysqlXml.php¸¹×Q¸V÷?I¶HDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/Abstract.phpç¹×Qç;ÓŽ@¶GDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/FlatXml.php^¹×Q^m ×ã¶GDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/Persistors/Factory.phpÄ ¹×QÄ käV@¶ADbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/IPersistable.phpˆ -¹×Qˆ -R®¼Î¶CDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/FlatXmlDataSet.phpJ¹×QJÉ٠ζEDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/CompositeDataSet.php;¹×Q;|Qñù¶@DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/YamlDataSet.php÷¹×Q÷úc¶JDbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/AbstractTableMetaData.phpܹ×Qܳ'nn¶@DbUnit-1.2.3/PHPUnit/Extensions/Database/DataSet/TableFilter.php°¹×Q°PÈ'¶;DbUnit-1.2.3/PHPUnit/Extensions/Database/AbstractTester.php¹×Q Ußé¶:DbUnit-1.2.3/PHPUnit/Extensions/Database/DefaultTester.php£ ¹×Q£ ¹B»¶4DbUnit-1.2.3/PHPUnit/Extensions/Database/ITester.phpž¹×QžÝ¿$¶DbUnit-1.2.3/ChangeLog.markdown ¹×Q /¤]W¶DbUnit-1.2.3/dbunit.phpu¹×Qudizt¶=DbUnit-1.2.3/Samples/BankAccountDB/BankAccountDBTestMySQL.phpò¹×QòsãDÛ¶LDbUnit-1.2.3/Samples/BankAccountDB/_files/bank-account-after-new-account.xmlQ¹×QQüÂ)¶IDbUnit-1.2.3/Samples/BankAccountDB/_files/bank-account-after-deposits.xml¹×QCP$ƶLDbUnit-1.2.3/Samples/BankAccountDB/_files/bank-account-after-withdrawals.xml -¹×Q -':ݶ?DbUnit-1.2.3/Samples/BankAccountDB/_files/bank-account-seed.xml ¹×Q ›Yaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/sfObjects.yml¹×Qè<öGYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/YtsNullsAndEmpties.yml«¹×Q«×>;¥¶<Yaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml÷¹×Q÷U“¶>Yaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/sfCompact.ymlU ¹×QU Ó¯¶BYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/YtsErrorTests.ymlq¹×Qqtõür¶FYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.ymlõ¹×Qõá*£Â¶MYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/YtsSpecificationExamples.yml0¢¹×Q0¢,x`k¶BYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/YtsBasicTests.ymlô¹×QôçõXœ¶GYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/YtsFlowCollections.ymlX¹×QXZ{kì¶?Yaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml¹×QZÀܶ?Yaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/sfComments.yml¹×Q@ÖÛï¶EYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/YtsTypeTransfers.ymlä¹×Qä€T -¯¶DYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/YtsBlockMapping.yml—¹×Q—Œ¼õ¶CYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/YtsAnchorAlias.yml[¹×Q[á5ÒR¶?Yaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/sfMergeKey.ymlJ¹×QJ;:šQ¶IYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/YtsDocumentSeparator.ymlú¹×Qú%MC¶=Yaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/sfQuotes.ymlå¹×Qåˆ섶:Yaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/index.yml8¹×Q8£ôܶEYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/YtsFoldedScalars.ymlz¹×Qzګغ¶JYaml-2.2.0/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml-¹×Q-Çè¶/Yaml-2.2.0/Symfony/Component/Yaml/composer.jsonÓ¹×QÓæùßF¶,Yaml-2.2.0/Symfony/Component/Yaml/.gitignore#¹×Q#Ü0å¶)Yaml-2.2.0/Symfony/Component/Yaml/LICENSE)¹×Q)NmòQ¶,Yaml-2.2.0/Symfony/Component/Yaml/Dumper.php” ¹×Q” 8¹n¶0Yaml-2.2.0/Symfony/Component/Yaml/autoloader.phpú¹×QúçU2¾¶2Yaml-2.2.0/Symfony/Component/Yaml/phpunit.xml.dist3¹×Q3ø>[¶>Yaml-2.2.0/Symfony/Component/Yaml/Exception/ParseException.php9 ¹×Q9 ^Ÿ[¶BYaml-2.2.0/Symfony/Component/Yaml/Exception/ExceptionInterface.phpƹ×QÆî+­l¶@Yaml-2.2.0/Symfony/Component/Yaml/Exception/RuntimeException.phpð¹×QðÏ|-¶=Yaml-2.2.0/Symfony/Component/Yaml/Exception/DumpException.phpÒ¹×QÒؙ՚¶,Yaml-2.2.0/Symfony/Component/Yaml/Parser.phpX¹×QXÞHñ?¶/Yaml-2.2.0/Symfony/Component/Yaml/Unescaper.php™¹×Q™Š°Ân¶+Yaml-2.2.0/Symfony/Component/Yaml/README.mda¹×QaŸ•#X¶,Yaml-2.2.0/Symfony/Component/Yaml/Inline.php¨>¹×Q¨>ßhàâ¶-Yaml-2.2.0/Symfony/Component/Yaml/Escaper.phpi ¹×Qi ἶ.Yaml-2.2.0/Symfony/Component/Yaml/CHANGELOG.md²¹×Q²XÁl¶!PHPUnit/Framework/TestFailure.phpŸ¹×QŸy…x˶'PHPUnit/Framework/ComparatorFactory.phpI¹×QIèØZ\¶+PHPUnit/Framework/SkippedTestSuiteError.php: -¹×Q: -õ±c¶PHPUnit/Framework/Assert.phpJe¹×QJe$—z¶PHPUnit/Framework/TestCase.phpÍѹ×QÍÑç²á…¶&PHPUnit/Framework/Assert/Functions.php ú¹×Q úÆ­ì8¶)PHPUnit/Framework/Assert/Functions.php.inå¹×Qådx˜û¶)PHPUnit/Framework/IncompleteTestError.php9 -¹×Q9 -—do¶!PHPUnit/Framework/OutputError.php -¹×Q -ŠCÐg¶PHPUnit/Framework/Exception.php¬ ¹×Q¬ ¿/`?¶PHPUnit/Framework/Warning.php5¹×Q5ež¶'PHPUnit/Framework/ComparisonFailure.php­¹×Q­ëÄM¶&PHPUnit/Framework/SkippedTestError.php/ -¹×Q/ -aà,*¶3PHPUnit/Framework/Constraint/ObjectHasAttribute.phpL ¹×QL »;2¶*PHPUnit/Framework/Constraint/PCREMatch.phpJ¹×QJeâm¶.PHPUnit/Framework/Constraint/ExceptionCode.phpy¹×Qy)V»¶-PHPUnit/Framework/Constraint/IsInstanceOf.phpã¹×Qãc§¨ý¶)PHPUnit/Framework/Constraint/SameSize.php ¹×Q !n+‘¶(PHPUnit/Framework/Constraint/IsEqual.php–¹×Q–çZȶ'PHPUnit/Framework/Constraint/IsNull.php ¹×Q 8®î$¶'PHPUnit/Framework/Constraint/IsJson.php¹×QÂxVZP¶'PHPUnit/Framework/Constraint/IsTrue.php ¹×Q ,+ÜͶ,PHPUnit/Framework/Constraint/ArrayHasKey.php™¹×Q™'ÑFÙ¶,PHPUnit/Framework/Constraint/IsIdentical.phpI¹×QIÝ¢é¶*PHPUnit/Framework/Constraint/Exception.phpD¹×QD-xDɶ$PHPUnit/Framework/Constraint/And.phpι×QÎQ¨ï€¶8PHPUnit/Framework/Constraint/TraversableContainsOnly.phpI¹×QIê L½¶)PHPUnit/Framework/Constraint/Callback.php{¹×Q{‚Q™c¶$PHPUnit/Framework/Constraint/Not.phpc¹×Qc`ü:¶2PHPUnit/Framework/Constraint/ClassHasAttribute.phpC¹×QC­¤ô“¶APHPUnit/Framework/Constraint/JsonMatches/ErrorMessageProvider.php›¹×Q›nY¤¶,PHPUnit/Framework/Constraint/GreaterThan.phpY ¹×QY c׆¶+PHPUnit/Framework/Constraint/IsAnything.php ¹×Q ZèµM¶/PHPUnit/Framework/Constraint/StringContains.php¹×QÂõÂdj¶4PHPUnit/Framework/Constraint/TraversableContains.php¹×Q­µ÷¶)PHPUnit/Framework/Constraint/LessThan.phpP ¹×QP >”–µ¶.PHPUnit/Framework/Constraint/StringMatches.php;¹×Q;$–n:¶*PHPUnit/Framework/Constraint/Composite.php¹×QG$a|¶1PHPUnit/Framework/Constraint/ExceptionMessage.php[¹×Q[h¢9¶+PHPUnit/Framework/Constraint/FileExists.phpY¹×QYCÅ”©¶*PHPUnit/Framework/Constraint/Attribute.php¹×QÞ ¶#PHPUnit/Framework/Constraint/Or.php¹×Q¸Å+¶/PHPUnit/Framework/Constraint/StringEndsWith.phpg ¹×Qg qR ¥¶8PHPUnit/Framework/Constraint/ClassHasStaticAttribute.php)¹×Q)Òîi¶(PHPUnit/Framework/Constraint/IsFalse.php$ ¹×Q$ c{ðR¶1PHPUnit/Framework/Constraint/StringStartsWith.phpV ¹×QV u/<¿¶,PHPUnit/Framework/Constraint/JsonMatches.php¹×Qùª$¸¶(PHPUnit/Framework/Constraint/IsEmpty.phpj¹×QjØ·Eò¶&PHPUnit/Framework/Constraint/Count.phpþ¹×Qþï‡È)¶$PHPUnit/Framework/Constraint/Xor.phpy¹×Qy%(í¶'PHPUnit/Framework/Constraint/IsType.phpϹ×QÏÈZ-Ÿ¶ PHPUnit/Framework/Constraint.php‹¹×Q‹. -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 Sebastian Bergmann nor the names of his - 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. -File_Iterator 1.3 -================= - -This is the list of changes for the File_Iterator 1.3 release series. - -File_Iterator 1.3.3 -------------------- - -* No changes. - -File_Iterator 1.3.2 -------------------- - -* No changes. - -File_Iterator 1.3.1 -------------------- - -* Fixed infinite loop in `File_Iterator_Facade::getCommonPath()` for empty directories. - -File_Iterator 1.3.0 -------------------- - -* Added `File_Iterator_Facade` for the most common use case. -* Moved `File_Iterator_Factory::getFilesAsArray()` to `File_Iterator_Facade::getFilesAsArray()`. -* `File_Iterator_Factory` is no longer static. -File_Iterator -============= - -Installation ------------- - -File_Iterator should be installed using the [PEAR Installer](http://pear.php.net/). This installer is the backbone of PEAR, which provides a distribution system for PHP packages, and is shipped with every release of PHP since version 4.3.0. - -The PEAR channel (`pear.phpunit.de`) that is used to distribute File_Iterator needs to be registered with the local PEAR environment: - - sb@ubuntu ~ % pear channel-discover pear.phpunit.de - Adding Channel "pear.phpunit.de" succeeded - Discovery of channel "pear.phpunit.de" succeeded - -This has to be done only once. Now the PEAR Installer can be used to install packages from the PHPUnit channel: - - sb@vmware ~ % pear install phpunit/File_Iterator - downloading File_Iterator-1.1.1.tgz ... - Starting to download File_Iterator-1.1.1.tgz (3,173 bytes) - ....done: 3,173 bytes - install ok: channel://pear.phpunit.de/File_Iterator-1.1.1 - -After the installation you can find the File_Iterator source files inside your local PEAR directory; the path is usually `/usr/lib/php/File`. -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package File - * @author Sebastian Bergmann - * @copyright 2009-2012 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.0.0 - */ - -/** - * FilterIterator implementation that filters files based on prefix(es) and/or - * suffix(es). Hidden files and files from hidden directories are also filtered. - * - * @author Sebastian Bergmann - * @copyright 2009-2012 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.3 - * @link http://github.com/sebastianbergmann/php-file-iterator/tree - * @since Class available since Release 1.0.0 - */ -class File_Iterator extends FilterIterator -{ - const PREFIX = 0; - const SUFFIX = 1; - - /** - * @var array - */ - protected $suffixes = array(); - - /** - * @var array - */ - protected $prefixes = array(); - - /** - * @var array - */ - protected $exclude = array(); - - /** - * @var string - */ - protected $basepath; - - /** - * @param Iterator $iterator - * @param array $suffixes - * @param array $prefixes - * @param array $exclude - * @param string $basepath - */ - public function __construct(Iterator $iterator, array $suffixes = array(), array $prefixes = array(), array $exclude = array(), $basepath = NULL) - { - $exclude = array_filter(array_map('realpath', $exclude)); - - if ($basepath !== NULL) { - $basepath = realpath($basepath); - } - - if ($basepath === FALSE) { - $basepath = NULL; - } else { - foreach ($exclude as &$_exclude) { - $_exclude = str_replace($basepath, '', $_exclude); - } - } - - $this->prefixes = $prefixes; - $this->suffixes = $suffixes; - $this->exclude = $exclude; - $this->basepath = $basepath; - - parent::__construct($iterator); - } - - /** - * @return boolean - */ - public function accept() - { - $current = $this->getInnerIterator()->current(); - $filename = $current->getFilename(); - $realpath = $current->getRealPath(); - - if ($this->basepath !== NULL) { - $realpath = str_replace($this->basepath, '', $realpath); - } - - // Filter files in hidden directories. - if (preg_match('=/\.[^/]*/=', $realpath)) { - return FALSE; - } - - return $this->acceptPath($realpath) && - $this->acceptPrefix($filename) && - $this->acceptSuffix($filename); - } - - /** - * @param string $path - * @return boolean - * @since Method available since Release 1.1.0 - */ - protected function acceptPath($path) - { - foreach ($this->exclude as $exclude) { - if (strpos($path, $exclude) === 0) { - return FALSE; - } - } - - return TRUE; - } - - /** - * @param string $filename - * @return boolean - * @since Method available since Release 1.1.0 - */ - protected function acceptPrefix($filename) - { - return $this->acceptSubString($filename, $this->prefixes, self::PREFIX); - } - - /** - * @param string $filename - * @return boolean - * @since Method available since Release 1.1.0 - */ - protected function acceptSuffix($filename) - { - return $this->acceptSubString($filename, $this->suffixes, self::SUFFIX); - } - - /** - * @param string $filename - * @param array $subString - * @param integer $type - * @return boolean - * @since Method available since Release 1.1.0 - */ - protected function acceptSubString($filename, array $subStrings, $type) - { - if (empty($subStrings)) { - return TRUE; - } - - $matched = FALSE; - - foreach ($subStrings as $string) { - if (($type == self::PREFIX && strpos($filename, $string) === 0) || - ($type == self::SUFFIX && - substr($filename, -1 * strlen($string)) == $string)) { - $matched = TRUE; - break; - } - } - - return $matched; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package File - * @author Sebastian Bergmann - * @copyright 2009-2012 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.3.0 - */ - -/** - * Façade implementation that uses File_Iterator_Factory to create a - * File_Iterator that operates on an AppendIterator that contains an - * RecursiveDirectoryIterator for each given path. The list of unique - * files is returned as an array. - * - * @author Sebastian Bergmann - * @copyright 2009-2012 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.3 - * @link http://github.com/sebastianbergmann/php-file-iterator/tree - * @since Class available since Release 1.3.0 - */ -class File_Iterator_Facade -{ - /** - * @param array|string $paths - * @param array|string $suffixes - * @param array|string $prefixes - * @param array $exclude - * @param boolean $commonPath - * @return array - */ - public function getFilesAsArray($paths, $suffixes = '', $prefixes = '', array $exclude = array(), $commonPath = FALSE) - { - if (is_string($paths)) { - $paths = array($paths); - } - - $factory = new File_Iterator_Factory; - $iterator = $factory->getFileIterator( - $paths, $suffixes, $prefixes, $exclude - ); - - $files = array(); - - foreach ($iterator as $file) { - $file = $file->getRealPath(); - - if ($file) { - $files[] = $file; - } - } - - foreach ($paths as $path) { - if (is_file($path)) { - $files[] = realpath($path); - } - } - - $files = array_unique($files); - sort($files); - - if ($commonPath) { - return array( - 'commonPath' => $this->getCommonPath($files), - 'files' => $files - ); - } else { - return $files; - } - } - - /** - * Returns the common path of a set of files. - * - * @param array $files - * @return string - */ - protected function getCommonPath(array $files) - { - $count = count($files); - - if ($count == 0) { - return ''; - } - - if ($count == 1) { - return dirname($files[0]) . DIRECTORY_SEPARATOR; - } - - $_files = array(); - - foreach ($files as $file) { - $_files[] = $_fileParts = explode(DIRECTORY_SEPARATOR, $file); - - if (empty($_fileParts[0])) { - $_fileParts[0] = DIRECTORY_SEPARATOR; - } - } - - $common = ''; - $done = FALSE; - $j = 0; - $count--; - - while (!$done) { - for ($i = 0; $i < $count; $i++) { - if ($_files[$i][$j] != $_files[$i+1][$j]) { - $done = TRUE; - break; - } - } - - if (!$done) { - $common .= $_files[0][$j]; - - if ($j > 0) { - $common .= DIRECTORY_SEPARATOR; - } - } - - $j++; - } - - return DIRECTORY_SEPARATOR . $common; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package File - * @author Sebastian Bergmann - * @copyright 2009-2012 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @since File available since Release 1.1.0 - */ - -/** - * Factory Method implementation that creates a File_Iterator that operates on - * an AppendIterator that contains an RecursiveDirectoryIterator for each given - * path. - * - * @author Sebastian Bergmann - * @copyright 2009-2012 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.3 - * @link http://github.com/sebastianbergmann/php-file-iterator/tree - * @since Class available since Release 1.1.0 - */ -class File_Iterator_Factory -{ - /** - * @param array|string $paths - * @param array|string $suffixes - * @param array|string $prefixes - * @param array $exclude - * @return AppendIterator - */ - public function getFileIterator($paths, $suffixes = '', $prefixes = '', array $exclude = array()) - { - if (is_string($paths)) { - $paths = array($paths); - } - - $_paths = array(); - - foreach ($paths as $path) { - if ($locals = glob($path, GLOB_ONLYDIR)) { - $_paths = array_merge($_paths, $locals); - } else { - $_paths[] = $path; - } - } - - $paths = $_paths; - unset($_paths); - - if (is_string($prefixes)) { - if ($prefixes != '') { - $prefixes = array($prefixes); - } else { - $prefixes = array(); - } - } - - if (is_string($suffixes)) { - if ($suffixes != '') { - $suffixes = array($suffixes); - } else { - $suffixes = array(); - } - } - - $iterator = new AppendIterator; - - foreach ($paths as $path) { - if (is_dir($path)) { - $iterator->append( - new File_Iterator( - new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($path) - ), - $suffixes, - $prefixes, - $exclude, - $path - ) - ); - } - } - - return $iterator; - } -} -PHPUnit_MockObject - -Copyright (c) 2002-2013, Sebastian Bergmann . -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 Sebastian Bergmann nor the names of his - 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. -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Interface for classes which can be invoked. - * - * The invocation will be taken from a mock object and passed to an object - * of this class. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Invokable extends PHPUnit_Framework_MockObject_Verifiable -{ - /** - * Invokes the invocation object $invocation so that it can be checked for - * expectations or matched against stubs. - * - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * The invocation object passed from mock object. - * @return object - */ - public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation); - - /** - * Checks if the invocation matches. - * - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * The invocation object passed from mock object. - * @return boolean - */ - public function matches(PHPUnit_Framework_MockObject_Invocation $invocation); -} -{namespace} - -class {class_name} extends \SOAPClient -{ - public function __construct($wsdl, array $options) - { - parent::__construct('{wsdl}', $options); - } -{methods}} - public function __clone() - { - $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker(); - parent::__clone(); - } - - {modifier} function {reference}{method_name}({arguments_decl}) - { - $arguments = array({arguments_call}); - $count = func_num_args(); - - if ($count > {arguments_count}) { - $_arguments = func_get_args(); - - for ($i = {arguments_count}; $i < $count; $i++) { - $arguments[] = $_arguments[$i]; - } - } - - $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - '{class_name}', '{method_name}', $arguments, $this, {clone_arguments} - ) - ); - - return $result; - } - - public function {method_name}({arguments}) - { - } - - {modifier} static function {reference}{method_name}({arguments_decl}) - { - $arguments = array({arguments_call}); - $count = func_num_args(); - - if ($count > {arguments_count}) { - $_arguments = func_get_args(); - - for ($i = {arguments_count}; $i < $count; $i++) { - $arguments[] = $_arguments[$i]; - } - } - - $result = self::__phpunit_getStaticInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Static( - '{class_name}', '{method_name}', $arguments, {clone_arguments} - ) - ); - - return $result; - } -{prologue}{class_declaration} -{ - private static $__phpunit_staticInvocationMocker; - private $__phpunit_invocationMocker; - -{clone}{mocked_methods} - public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher) - { - return $this->__phpunit_getInvocationMocker()->expects($matcher); - } - - public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher) - { - return self::__phpunit_getStaticInvocationMocker()->expects($matcher); - } - - public function __phpunit_getInvocationMocker() - { - if ($this->__phpunit_invocationMocker === NULL) { - $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; - } - - return $this->__phpunit_invocationMocker; - } - - public static function __phpunit_getStaticInvocationMocker() - { - if (self::$__phpunit_staticInvocationMocker === NULL) { - self::$__phpunit_staticInvocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; - } - - return self::$__phpunit_staticInvocationMocker; - } - - public function __phpunit_hasMatchers() - { - return self::__phpunit_getStaticInvocationMocker()->hasMatchers() || - $this->__phpunit_getInvocationMocker()->hasMatchers(); - } - - public function __phpunit_verify() - { - self::__phpunit_getStaticInvocationMocker()->verify(); - $this->__phpunit_getInvocationMocker()->verify(); - } - - public function __phpunit_cleanup() - { - self::$__phpunit_staticInvocationMocker = NULL; - $this->__phpunit_invocationMocker = NULL; - } -}{epilogue} - public function __clone() - { - $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker(); - } -class {class_name} -{ - use {trait_name}; -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Mock Object Code Generator - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Generator -{ - /** - * @var array - */ - protected static $cache = array(); - - /** - * @var array - */ - protected static $blacklistedMethodNames = array( - '__clone' => TRUE, - 'abstract' => TRUE, - 'and' => TRUE, - 'array' => TRUE, - 'as' => TRUE, - 'break' => TRUE, - 'case' => TRUE, - 'catch' => TRUE, - 'class' => TRUE, - 'clone' => TRUE, - 'const' => TRUE, - 'continue' => TRUE, - 'declare' => TRUE, - 'default' => TRUE, - 'die' => TRUE, - 'do' => TRUE, - 'echo' => TRUE, - 'else' => TRUE, - 'elseif' => TRUE, - 'empty' => TRUE, - 'enddeclare' => TRUE, - 'endfor' => TRUE, - 'endforeach' => TRUE, - 'endif' => TRUE, - 'endswitch' => TRUE, - 'endwhile' => TRUE, - 'eval' => TRUE, - 'exit' => TRUE, - 'expects' => TRUE, - 'extends' => TRUE, - 'final' => TRUE, - 'for' => TRUE, - 'foreach' => TRUE, - 'function' => TRUE, - 'global' => TRUE, - 'goto' => TRUE, - 'if' => TRUE, - 'implements' => TRUE, - 'include' => TRUE, - 'include_once' => TRUE, - 'instanceof' => TRUE, - 'interface' => TRUE, - 'isset' => TRUE, - 'list' => TRUE, - 'namespace' => TRUE, - 'new' => TRUE, - 'or' => TRUE, - 'print' => TRUE, - 'private' => TRUE, - 'protected' => TRUE, - 'public' => TRUE, - 'require' => TRUE, - 'require_once' => TRUE, - 'return' => TRUE, - 'static' => TRUE, - 'staticExpects' => TRUE, - 'switch' => TRUE, - 'throw' => TRUE, - 'try' => TRUE, - 'unset' => TRUE, - 'use' => TRUE, - 'var' => TRUE, - 'while' => TRUE, - 'xor' => TRUE - ); - - /** - * @var boolean - */ - protected static $soapLoaded = NULL; - - /** - * Returns a mock object for the specified class. - * - * @param string $originalClassName - * @param array $methods - * @param array $arguments - * @param string $mockClassName - * @param boolean $callOriginalConstructor - * @param boolean $callOriginalClone - * @param boolean $callAutoload - * @param boolean $cloneArguments - * @return object - * @throws InvalidArgumentException - * @since Method available since Release 1.0.0 - */ - public static function getMock($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = TRUE, $callOriginalClone = TRUE, $callAutoload = TRUE, $cloneArguments = TRUE) - { - if (!is_string($originalClassName)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - if (!is_string($mockClassName)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(4, 'string'); - } - - if (!is_array($methods) && !is_null($methods)) { - throw new InvalidArgumentException; - } - - if (NULL !== $methods) { - foreach ($methods as $method) { - if (!preg_match('~[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*~', $method)) { - throw new PHPUnit_Framework_Exception( - sprintf( - 'Cannot stub or mock method with invalid name "%s"', - $method - ) - ); - } - } - if ($methods != array_unique($methods)) { - throw new PHPUnit_Framework_Exception( - sprintf( - 'Cannot stub or mock using a method list that contains duplicates: "%s"', - implode(', ', $methods) - ) - ); - } - } - - if ($mockClassName != '' && class_exists($mockClassName, FALSE)) { - $reflect = new ReflectionClass($mockClassName); - if (!$reflect->implementsInterface("PHPUnit_Framework_MockObject_MockObject")) { - throw new PHPUnit_Framework_Exception( - sprintf( - 'Class "%s" already exists.', - $mockClassName - ) - ); - } - } - - $mock = self::generate( - $originalClassName, - $methods, - $mockClassName, - $callOriginalClone, - $callAutoload, - $cloneArguments - ); - - return self::getObject( - $mock['code'], - $mock['mockClassName'], - $originalClassName, - $callOriginalConstructor, - $callAutoload, - $arguments - ); - } - - /** - * @param string $code - * @param string $className - * @param string $originalClassName - * @param string $callOriginalConstructor - * @param string $callAutoload - * @param array $arguments - * @return object - */ - protected static function getObject($code, $className, $originalClassName = '', $callOriginalConstructor = FALSE, $callAutoload = FALSE, array $arguments = array()) - { - if (!class_exists($className, FALSE)) { - eval($code); - } - - if ($callOriginalConstructor && - !interface_exists($originalClassName, $callAutoload)) { - if (count($arguments) == 0) { - $object = new $className; - } else { - $class = new ReflectionClass($className); - $object = $class->newInstanceArgs($arguments); - } - } else { - // Use a trick to create a new object of a class - // without invoking its constructor. - $object = unserialize( - sprintf('O:%d:"%s":0:{}', strlen($className), $className) - ); - } - - return $object; - } - - /** - * Returns a mock object for the specified abstract class with all abstract - * methods of the class mocked. Concrete methods to mock can be specified with - * the last parameter - * - * @param string $originalClassName - * @param array $arguments - * @param string $mockClassName - * @param boolean $callOriginalConstructor - * @param boolean $callOriginalClone - * @param boolean $callAutoload - * @param array $mockedMethods - * @param boolean $cloneArguments - * @return object - * @since Method available since Release 1.0.0 - * @throws InvalidArgumentException - */ - public static function getMockForAbstractClass($originalClassName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = TRUE, $callOriginalClone = TRUE, $callAutoload = TRUE, $mockedMethods = array(), $cloneArguments = TRUE) - { - if (!is_string($originalClassName)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - if (!is_string($mockClassName)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(3, 'string'); - } - - if (class_exists($originalClassName, $callAutoload) || - interface_exists($originalClassName, $callAutoload)) { - $methods = array(); - $reflector = new ReflectionClass($originalClassName); - - foreach ($reflector->getMethods() as $method) { - if ($method->isAbstract() || in_array($method->getName(), $mockedMethods)) { - $methods[] = $method->getName(); - } - } - - if (empty($methods)) { - $methods = NULL; - } - - return self::getMock( - $originalClassName, - $methods, - $arguments, - $mockClassName, - $callOriginalConstructor, - $callOriginalClone, - $callAutoload, - $cloneArguments - ); - } else { - throw new PHPUnit_Framework_Exception( - sprintf( - 'Class "%s" does not exist.', - $originalClassName - ) - ); - } - } - - /** - * Returns an object for the specified trait. - * - * @param string $traitName - * @param array $arguments - * @param string $traitClassName - * @param boolean $callOriginalConstructor - * @param boolean $callOriginalClone - * @param boolean $callAutoload - * @return object - * @since Method available since Release 1.1.0 - * @throws InvalidArgumentException - */ - public static function getObjectForTrait($traitName, array $arguments = array(), $traitClassName = '', $callOriginalConstructor = TRUE, $callOriginalClone = TRUE, $callAutoload = TRUE) - { - if (!is_string($traitName)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - if (!is_string($traitClassName)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(3, 'string'); - } - - if (!trait_exists($traitName, $callAutoload)) { - throw new PHPUnit_Framework_Exception( - sprintf( - 'Trait "%s" does not exist.', - $traitName - ) - ); - } - - $className = self::generateClassName( - $traitName, $traitClassName, 'Trait_' - ); - - $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . - DIRECTORY_SEPARATOR; - $classTemplate = new Text_Template( - $templateDir . 'trait_class.tpl' - ); - - $classTemplate->setVar( - array( - 'class_name' => $className['className'], - 'trait_name' => $traitName - ) - ); - - return self::getObject( - $classTemplate->render(), - $className['className'] - ); - } - - /** - * @param string $originalClassName - * @param array $methods - * @param string $mockClassName - * @param boolean $callOriginalClone - * @param boolean $callAutoload - * @param boolean $cloneArguments - * @return array - */ - public static function generate($originalClassName, array $methods = NULL, $mockClassName = '', $callOriginalClone = TRUE, $callAutoload = TRUE, $cloneArguments = TRUE) - { - if ($mockClassName == '') { - $key = md5( - $originalClassName . - serialize($methods) . - serialize($callOriginalClone) . - serialize($cloneArguments) - ); - - if (isset(self::$cache[$key])) { - return self::$cache[$key]; - } - } - - $mock = self::generateMock( - $originalClassName, - $methods, - $mockClassName, - $callOriginalClone, - $callAutoload, - $cloneArguments - ); - - if (isset($key)) { - self::$cache[$key] = $mock; - } - - return $mock; - } - - /** - * @param string $wsdlFile - * @param string $originalClassName - * @param array $methods - * @param array $options - * @return array - */ - public static function generateClassFromWsdl($wsdlFile, $originalClassName, array $methods = array(), array $options = array()) - { - if (self::$soapLoaded === NULL) { - self::$soapLoaded = extension_loaded('soap'); - } - - if (self::$soapLoaded) { - $client = new SOAPClient($wsdlFile, $options); - $_methods = array_unique($client->__getFunctions()); - unset($client); - - $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . - 'Generator' . DIRECTORY_SEPARATOR; - $methodTemplate = new Text_Template( - $templateDir . 'wsdl_method.tpl' - ); - $methodsBuffer = ''; - - foreach ($_methods as $method) { - $nameStart = strpos($method, ' ') + 1; - $nameEnd = strpos($method, '('); - $name = substr($method, $nameStart, $nameEnd - $nameStart); - - if (empty($methods) || in_array($name, $methods)) { - $args = explode( - ',', - substr( - $method, - $nameEnd + 1, - strpos($method, ')') - $nameEnd - 1 - ) - ); - $numArgs = count($args); - - for ($i = 0; $i < $numArgs; $i++) { - $args[$i] = substr($args[$i], strpos($args[$i], '$')); - } - - $methodTemplate->setVar( - array( - 'method_name' => $name, - 'arguments' => join(', ', $args) - ) - ); - - $methodsBuffer .= $methodTemplate->render(); - } - } - - $optionsBuffer = 'array('; - foreach ($options as $key => $value) { - $optionsBuffer .= $key . ' => ' . $value; - } - - $optionsBuffer .= ')'; - - $classTemplate = new Text_Template( - $templateDir . 'wsdl_class.tpl' - ); - - $namespace = ''; - if(strpos($originalClassName, '\\') !== FALSE) { - $parts = explode('\\', $originalClassName); - $originalClassName = array_pop($parts); - $namespace = 'namespace ' . join('\\', $parts) . ';'; - } - - $classTemplate->setVar( - array( - 'namespace' => $namespace, - 'class_name' => $originalClassName, - 'wsdl' => $wsdlFile, - 'options' => $optionsBuffer, - 'methods' => $methodsBuffer - ) - ); - - return $classTemplate->render(); - } else { - throw new PHPUnit_Framework_Exception( - 'The SOAP extension is required to generate a mock object ' . - 'from WSDL.' - ); - } - } - - /** - * @param string $originalClassName - * @param array|null $methods - * @param string $mockClassName - * @param boolean $callOriginalClone - * @param boolean $callAutoload - * @param boolean $cloneArguments - * @return array - */ - protected static function generateMock($originalClassName, $methods, $mockClassName, $callOriginalClone, $callAutoload, $cloneArguments = TRUE) - { - $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . - DIRECTORY_SEPARATOR; - $classTemplate = new Text_Template( - $templateDir . 'mocked_class.tpl' - ); - $cloneTemplate = ''; - $isClass = FALSE; - $isInterface = FALSE; - - $mockClassName = self::generateClassName( - $originalClassName, $mockClassName, 'Mock_' - ); - - if (class_exists($mockClassName['fullClassName'], $callAutoload)) { - $isClass = TRUE; - } else { - if (interface_exists($mockClassName['fullClassName'], $callAutoload)) { - $isInterface = TRUE; - } - } - - if (!class_exists($mockClassName['fullClassName'], $callAutoload) && - !interface_exists($mockClassName['fullClassName'], $callAutoload)) { - $prologue = 'class ' . $mockClassName['originalClassName'] . "\n{\n}\n\n"; - - if (!empty($mockClassName['namespaceName'])) { - $prologue = 'namespace ' . $mockClassName['namespaceName'] . - " {\n\n" . $prologue . "}\n\n" . - "namespace {\n\n"; - - $epilogue = "\n\n}"; - } - - $cloneTemplate = new Text_Template( - $templateDir . 'mocked_clone.tpl' - ); - } else { - $class = new ReflectionClass($mockClassName['fullClassName']); - - if ($class->isFinal()) { - throw new PHPUnit_Framework_Exception( - sprintf( - 'Class "%s" is declared "final" and cannot be mocked.', - $mockClassName['fullClassName'] - ) - ); - } - - if ($class->hasMethod('__clone')) { - $cloneMethod = $class->getMethod('__clone'); - - if (!$cloneMethod->isFinal()) { - if ($callOriginalClone && !$isInterface) { - $cloneTemplate = new Text_Template( - $templateDir . 'unmocked_clone.tpl' - ); - } else { - $cloneTemplate = new Text_Template( - $templateDir . 'mocked_clone.tpl' - ); - } - } - } else { - $cloneTemplate = new Text_Template( - $templateDir . 'mocked_clone.tpl' - ); - } - } - - if (is_object($cloneTemplate)) { - $cloneTemplate = $cloneTemplate->render(); - } - - if (is_array($methods) && empty($methods) && - ($isClass || $isInterface)) { - $methods = get_class_methods($mockClassName['fullClassName']); - } - - if (!is_array($methods)) { - $methods = array(); - } - - $mockedMethods = ''; - - if (isset($class)) { - foreach ($methods as $methodName) { - try { - $method = $class->getMethod($methodName); - - if (self::canMockMethod($method)) { - $mockedMethods .= self::generateMockedMethodDefinitionFromExisting( - $templateDir, $method, $cloneArguments - ); - } - } - - catch (ReflectionException $e) { - $mockedMethods .= self::generateMockedMethodDefinition( - $templateDir, $mockClassName['fullClassName'], $methodName, $cloneArguments - ); - } - } - } else { - foreach ($methods as $methodName) { - $mockedMethods .= self::generateMockedMethodDefinition( - $templateDir, $mockClassName['fullClassName'], $methodName, $cloneArguments - ); - } - } - - $classTemplate->setVar( - array( - 'prologue' => isset($prologue) ? $prologue : '', - 'epilogue' => isset($epilogue) ? $epilogue : '', - 'class_declaration' => self::generateMockClassDeclaration( - $mockClassName, $isInterface - ), - 'clone' => $cloneTemplate, - 'mock_class_name' => $mockClassName['className'], - 'mocked_methods' => $mockedMethods - ) - ); - - return array( - 'code' => $classTemplate->render(), - 'mockClassName' => $mockClassName['className'] - ); - } - - /** - * @param string $originalClassName - * @param string $className - * @param string $prefix - * @return array - */ - protected static function generateClassName($originalClassName, $className, $prefix) - { - if ($originalClassName[0] == '\\') { - $originalClassName = substr($originalClassName, 1); - } - - $classNameParts = explode('\\', $originalClassName); - - if (count($classNameParts) > 1) { - $originalClassName = array_pop($classNameParts); - $namespaceName = join('\\', $classNameParts); - $fullClassName = $namespaceName . '\\' . $originalClassName; - } else { - $namespaceName = ''; - $fullClassName = $originalClassName; - } - - if ($className == '') { - do { - $className = $prefix . $originalClassName . '_' . - substr(md5(microtime()), 0, 8); - } - while (class_exists($className, FALSE)); - } - - return array( - 'className' => $className, - 'originalClassName' => $originalClassName, - 'fullClassName' => $fullClassName, - 'namespaceName' => $namespaceName - ); - } - - /** - * @param array $mockClassName - * @param boolean $isInterface - * @return array - */ - protected static function generateMockClassDeclaration(array $mockClassName, $isInterface) - { - $buffer = 'class '; - - if ($isInterface) { - $buffer .= sprintf( - "%s implements PHPUnit_Framework_MockObject_MockObject, %s%s", - $mockClassName['className'], - !empty($mockClassName['namespaceName']) ? $mockClassName['namespaceName'] . '\\' : '', - $mockClassName['originalClassName'] - ); - } else { - $buffer .= sprintf( - "%s extends %s%s implements PHPUnit_Framework_MockObject_MockObject", - $mockClassName['className'], - !empty($mockClassName['namespaceName']) ? $mockClassName['namespaceName'] . '\\' : '', - $mockClassName['originalClassName'] - ); - } - - return $buffer; - } - - /** - * @param string $templateDir - * @param ReflectionMethod $method - * @param boolean $cloneArguments - * @return string - */ - protected static function generateMockedMethodDefinitionFromExisting($templateDir, ReflectionMethod $method, $cloneArguments = TRUE) - { - if ($method->isPrivate()) { - $modifier = 'private'; - } - - else if ($method->isProtected()) { - $modifier = 'protected'; - } - - else { - $modifier = 'public'; - } - - if ($method->isStatic()) { - $static = TRUE; - } else { - $static = FALSE; - } - - if ($method->returnsReference()) { - $reference = '&'; - } else { - $reference = ''; - } - - return self::generateMockedMethodDefinition( - $templateDir, - $method->getDeclaringClass()->getName(), - $method->getName(), - $cloneArguments, - $modifier, - PHPUnit_Util_Class::getMethodParameters($method), - PHPUnit_Util_Class::getMethodParameters($method, TRUE), - $reference, - $static - ); - } - - /** - * @param string $templateDir - * @param string $className - * @param string $methodName - * @param boolean $cloneArguments - * @param string $modifier - * @param string $arguments_decl - * @param string $arguments_call - * @param string $reference - * @param boolean $static - * @return string - */ - protected static function generateMockedMethodDefinition($templateDir, $className, $methodName, $cloneArguments = TRUE, $modifier = 'public', $arguments_decl = '', $arguments_call = '', $reference = '', $static = FALSE) - { - if ($static) { - $template = new Text_Template( - $templateDir . 'mocked_static_method.tpl' - ); - } else { - $template = new Text_Template( - $templateDir . 'mocked_object_method.tpl' - ); - } - - $template->setVar( - array( - 'arguments_decl' => $arguments_decl, - 'arguments_call' => $arguments_call, - 'arguments_count' => !empty($arguments_call) ? count(explode(',', $arguments_call)) : 0, - 'class_name' => $className, - 'method_name' => $methodName, - 'modifier' => $modifier, - 'reference' => $reference, - 'clone_arguments' => $cloneArguments ? 'TRUE' : 'FALSE' - ) - ); - - return $template->render(); - } - - /** - * @param ReflectionMethod $method - * @return boolean - */ - protected static function canMockMethod(ReflectionMethod $method) - { - if ($method->isConstructor() || $method->isFinal() || - isset(self::$blacklistedMethodNames[$method->getName()])) { - return FALSE; - } - - return TRUE; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Invocation matcher which looks for a specific method name in the invocations. - * - * Checks the method name all incoming invocations, the name is checked against - * the defined constraint $constraint. If the constraint is met it will return - * true in matches(). - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Matcher_MethodName extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation -{ - /** - * @var PHPUnit_Framework_Constraint - */ - protected $constraint; - - /** - * @param PHPUnit_Framework_Constraint|string - * @throws PHPUnit_Framework_Constraint - */ - public function __construct($constraint) - { - if (!$constraint instanceof PHPUnit_Framework_Constraint) { - if (!is_string($constraint)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - $constraint = new PHPUnit_Framework_Constraint_IsEqual( - $constraint, 0, 10, FALSE, TRUE - ); - } - - $this->constraint = $constraint; - } - - /** - * @return string - */ - public function toString() - { - return 'method name ' . $this->constraint->toString(); - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @return boolean - */ - public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) - { - return $this->constraint->evaluate($invocation->methodName, '', TRUE); - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Invocation matcher which checks if a method has been invoked at least one - * time. - * - * If the number of invocations is 0 it will throw an exception in verify. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder -{ - /** - * @return string - */ - public function toString() - { - return 'invoked at least once'; - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws PHPUnit_Framework_ExpectationFailedException - */ - public function verify() - { - $count = $this->getInvocationCount(); - - if ($count < 1) { - throw new PHPUnit_Framework_ExpectationFailedException( - 'Expected invocation at least once but it never occured.' - ); - } - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Records invocations and provides convenience methods for checking them later - * on. - * This abstract class can be implemented by matchers which needs to check the - * number of times an invocation has occured. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - * @abstract - */ -abstract class PHPUnit_Framework_MockObject_Matcher_InvokedRecorder implements PHPUnit_Framework_MockObject_Matcher_Invocation -{ - /** - * @var PHPUnit_Framework_MockObject_Invocation[] - */ - protected $invocations = array(); - - /** - * @return integer - */ - public function getInvocationCount() - { - return count($this->invocations); - } - - /** - * @return PHPUnit_Framework_MockObject_Invocation[] - */ - public function getInvocations() - { - return $this->invocations; - } - - /** - * @return boolean - */ - public function hasBeenInvoked() - { - return count($this->invocations) > 0; - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - */ - public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation) - { - $this->invocations[] = $invocation; - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @return boolean - */ - public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) - { - return TRUE; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Invocation matcher which allos any parameters to a method. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Matcher_AnyParameters extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation -{ - /** - * @return string - */ - public function toString() - { - return 'with any parameters'; - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @return boolean - */ - public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) - { - return TRUE; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Invocation matcher which checks if a method has been invoked a certain amount - * of times. - * If the number of invocations exceeds the value it will immediately throw an - * exception, - * If the number is less it will later be checked in verify() and also throw an - * exception. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Matcher_InvokedCount extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder -{ - /** - * @var integer - */ - protected $expectedCount; - - /** - * @param interger $expectedCount - */ - public function __construct($expectedCount) - { - $this->expectedCount = $expectedCount; - } - - /** - * @return string - */ - public function toString() - { - return 'invoked ' . $this->expectedCount . ' time(s)'; - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @throws PHPUnit_Framework_ExpectationFailedException - */ - public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation) - { - parent::invoked($invocation); - - $count = $this->getInvocationCount(); - - if ($count > $this->expectedCount) { - $message = $invocation->toString() . ' '; - - switch ($this->expectedCount) { - case 0: { - $message .= 'was not expected to be called.'; - } - break; - - case 1: { - $message .= 'was not expected to be called more than once.'; - } - break; - - default: { - $message .= sprintf( - 'was not expected to be called more than %d times.', - - $this->expectedCount - ); - } - } - - throw new PHPUnit_Framework_ExpectationFailedException($message); - } - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws PHPUnit_Framework_ExpectationFailedException - */ - public function verify() - { - $count = $this->getInvocationCount(); - - if ($count !== $this->expectedCount) { - throw new PHPUnit_Framework_ExpectationFailedException( - sprintf( - 'Method was expected to be called %d times, ' . - 'actually called %d times.', - - $this->expectedCount, - $count - ) - ); - } - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Invocation matcher which checks if a method has been invoked zero or more - * times. This matcher will always match. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder -{ - /** - * @return string - */ - public function toString() - { - return 'invoked zero or more times'; - } - - /** - */ - public function verify() - { - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Invocation matcher which looks for specific parameters in the invocations. - * - * Checks the parameters of all incoming invocations, the parameter list is - * checked against the defined constraints in $parameters. If the constraint - * is met it will return true in matches(). - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Matcher_Parameters extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation -{ - /** - * @var array - */ - protected $parameters = array(); - - /** - * @var PHPUnit_Framework_MockObject_Invocation - */ - protected $invocation; - - /** - * @param array $parameters - */ - public function __construct(array $parameters) - { - foreach ($parameters as $parameter) { - if (!($parameter instanceof PHPUnit_Framework_Constraint)) { - $parameter = new PHPUnit_Framework_Constraint_IsEqual( - $parameter - ); - } - - $this->parameters[] = $parameter; - } - } - - /** - * @return string - */ - public function toString() - { - $text = 'with parameter'; - - foreach ($this->parameters as $index => $parameter) { - if ($index > 0) { - $text .= ' and'; - } - - $text .= ' ' . $index . ' ' . $parameter->toString(); - } - - return $text; - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @return boolean - */ - public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) - { - $this->invocation = $invocation; - $this->verify(); - - return count($invocation->parameters) < count($this->parameters); - } - - /** - * Checks if the invocation $invocation matches the current rules. If it - * does the matcher will get the invoked() method called which should check - * if an expectation is met. - * - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * Object containing information on a mocked or stubbed method which - * was invoked. - * @return bool - * @throws PHPUnit_Framework_ExpectationFailedException - */ - public function verify() - { - if ($this->invocation === NULL) { - throw new PHPUnit_Framework_ExpectationFailedException( - 'Mocked method does not exist.' - ); - } - - if (count($this->invocation->parameters) < count($this->parameters)) { - throw new PHPUnit_Framework_ExpectationFailedException( - sprintf( - 'Parameter count for invocation %s is too low.', - - $this->invocation->toString() - ) - ); - } - - foreach ($this->parameters as $i => $parameter) { - $parameter->evaluate( - $this->invocation->parameters[$i], - sprintf( - 'Parameter %s for invocation %s does not match expected ' . - 'value.', - - $i, - $this->invocation->toString() - ) - ); - } - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Interface for classes which matches an invocation based on its - * method name, argument, order or call count. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Matcher_Invocation extends PHPUnit_Framework_SelfDescribing, PHPUnit_Framework_MockObject_Verifiable -{ - /** - * Registers the invocation $invocation in the object as being invoked. - * This will only occur after matches() returns true which means the - * current invocation is the correct one. - * - * The matcher can store information from the invocation which can later - * be checked in verify(), or it can check the values directly and throw - * and exception if an expectation is not met. - * - * If the matcher is a stub it will also have a return value. - * - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * Object containing information on a mocked or stubbed method which - * was invoked. - * @return mixed - */ - public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation); - - /** - * Checks if the invocation $invocation matches the current rules. If it does - * the matcher will get the invoked() method called which should check if an - * expectation is met. - * - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * Object containing information on a mocked or stubbed method which - * was invoked. - * @return bool - */ - public function matches(PHPUnit_Framework_MockObject_Invocation $invocation); -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Invocation matcher which does not care about previous state from earlier - * invocations. - * - * This abstract class can be implemented by matchers which does not care about - * state but only the current run-time value of the invocation itself. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - * @abstract - */ -abstract class PHPUnit_Framework_MockObject_Matcher_StatelessInvocation implements PHPUnit_Framework_MockObject_Matcher_Invocation -{ - /** - * Registers the invocation $invocation in the object as being invoked. - * This will only occur after matches() returns true which means the - * current invocation is the correct one. - * - * The matcher can store information from the invocation which can later - * be checked in verify(), or it can check the values directly and throw - * and exception if an expectation is not met. - * - * If the matcher is a stub it will also have a return value. - * - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * Object containing information on a mocked or stubbed method which - * was invoked. - * @return mixed - */ - public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation) - { - } - - /** - * Checks if the invocation $invocation matches the current rules. If it does - * the matcher will get the invoked() method called which should check if an - * expectation is met. - * - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * Object containing information on a mocked or stubbed method which - * was invoked. - * @return bool - */ - public function verify() - { - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Invocation matcher which checks if a method was invoked at a certain index. - * - * If the expected index number does not match the current invocation index it - * will not match which means it skips all method and parameter matching. Only - * once the index is reached will the method and parameter start matching and - * verifying. - * - * If the index is never reached it will throw an exception in index. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex implements PHPUnit_Framework_MockObject_Matcher_Invocation -{ - /** - * @var integer - */ - protected $sequenceIndex; - - /** - * @var integer - */ - protected $currentIndex = -1; - - /** - * @param integer $sequenceIndex - */ - public function __construct($sequenceIndex) - { - $this->sequenceIndex = $sequenceIndex; - } - - /** - * @return string - */ - public function toString() - { - return 'invoked at sequence index ' . $this->sequenceIndex; - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @return boolean - */ - public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) - { - $this->currentIndex++; - - return $this->currentIndex == $this->sequenceIndex; - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - */ - public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation) - { - } - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws PHPUnit_Framework_ExpectationFailedException - */ - public function verify() - { - if ($this->currentIndex < $this->sequenceIndex) { - throw new PHPUnit_Framework_ExpectationFailedException( - sprintf( - 'The expected invocation at index %s was never reached.', - - $this->sequenceIndex - ) - ); - } - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Giorgio Sironi - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Implementation of the Builder pattern for Mock objects. - * - * @package PHPUnit_MockObject - * @author Giorgio Sironi - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_MockBuilder -{ - /** - * @var PHPUnit_Framework_TestCase - */ - protected $testCase; - - /** - * @var string - */ - protected $className; - - /** - * @var array - */ - protected $methods = array(); - - /** - * @var string - */ - protected $mockClassName = ''; - - /** - * @var array - */ - protected $constructorArgs = array(); - - /** - * @var boolean - */ - protected $originalConstructor = TRUE; - - /** - * @var boolean - */ - protected $originalClone = TRUE; - - /** - * @var boolean - */ - protected $autoload = TRUE; - - /** - * @var boolean - */ - protected $cloneArguments = FALSE; - - /** - * @param PHPUnit_Framework_TestCase - * @param string - */ - public function __construct(PHPUnit_Framework_TestCase $testCase, $className) - { - $this->testCase = $testCase; - $this->className = $className; - } - - /** - * Creates a mock object using a fluent interface. - * - * @return PHPUnit_Framework_MockObject_MockObject - */ - public function getMock() - { - return $this->testCase->getMock( - $this->className, - $this->methods, - $this->constructorArgs, - $this->mockClassName, - $this->originalConstructor, - $this->originalClone, - $this->autoload, - $this->cloneArguments - ); - } - - /** - * Creates a mock object for an abstract class using a fluent interface. - * - * @return PHPUnit_Framework_MockObject_MockObject - */ - public function getMockForAbstractClass() - { - return $this->testCase->getMockForAbstractClass( - $this->className, - $this->constructorArgs, - $this->mockClassName, - $this->originalConstructor, - $this->originalClone, - $this->autoload, - $this->methods, - $this->cloneArguments - ); - } - - /** - * Specifies the subset of methods to mock. Default is to mock all of them. - * - * @param array|null $methods - * @return PHPUnit_Framework_MockObject_MockBuilder - */ - public function setMethods($methods) - { - $this->methods = $methods; - - return $this; - } - - /** - * Specifies the arguments for the constructor. - * - * @param array $args - * @return PHPUnit_Framework_MockObject_MockBuilder - */ - public function setConstructorArgs(array $args) - { - $this->constructorArgs = $args; - - return $this; - } - - /** - * Specifies the name for the mock class. - * - * @param string $name - * @return PHPUnit_Framework_MockObject_MockBuilder - */ - public function setMockClassName($name) - { - $this->mockClassName = $name; - - return $this; - } - - /** - * Disables the invocation of the original constructor. - * - * @return PHPUnit_Framework_MockObject_MockBuilder - */ - public function disableOriginalConstructor() - { - $this->originalConstructor = FALSE; - - return $this; - } - - /** - * Enables the invocation of the original constructor. - * - * @return PHPUnit_Framework_MockObject_MockBuilder - * @since Method available since Release 1.2.0 - */ - public function enableOriginalConstructor() - { - $this->originalConstructor = TRUE; - - return $this; - } - - /** - * Disables the invocation of the original clone constructor. - * - * @return PHPUnit_Framework_MockObject_MockBuilder - */ - public function disableOriginalClone() - { - $this->originalClone = FALSE; - - return $this; - } - - /** - * Enables the invocation of the original clone constructor. - * - * @return PHPUnit_Framework_MockObject_MockBuilder - * @since Method available since Release 1.2.0 - */ - public function enableOriginalClone() - { - $this->originalClone = TRUE; - - return $this; - } - - /** - * Disables the use of class autoloading while creating the mock object. - * - * @return PHPUnit_Framework_MockObject_MockBuilder - */ - public function disableAutoload() - { - $this->autoload = FALSE; - - return $this; - } - - /** - * Enables the use of class autoloading while creating the mock object. - * - * @return PHPUnit_Framework_MockObject_MockBuilder - * @since Method available since Release 1.2.0 - */ - public function enableAutoload() - { - $this->autoload = TRUE; - - return $this; - } - - /** - * Disables the cloning of arguments passed to mocked methods. - * - * @return PHPUnit_Framework_MockObject_MockBuilder - * @since Method available since Release 1.2.0 - */ - public function disableArgumentCloning() - { - $this->cloneArguments = FALSE; - - return $this; - } - - /** - * Enables the cloning of arguments passed to mocked methods. - * - * @return PHPUnit_Framework_MockObject_MockBuilder - * @since Method available since Release 1.2.0 - */ - public function enableArgumentCloning() - { - $this->cloneArguments = TRUE; - - return $this; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Main matcher which defines a full expectation using method, parameter and - * invocation matchers. - * This matcher encapsulates all the other matchers and allows the builder to - * set the specific matchers when the appropriate methods are called (once(), - * where() etc.). - * - * All properties are public so that they can easily be accessed by the builder. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Matcher implements PHPUnit_Framework_MockObject_Matcher_Invocation -{ - /** - * @var PHPUnit_Framework_MockObject_Matcher_Invocation - */ - public $invocationMatcher; - - /** - * @var mixed - */ - public $afterMatchBuilderId = NULL; - - /** - * @var boolean - */ - public $afterMatchBuilderIsInvoked = FALSE; - - /** - * @var PHPUnit_Framework_MockObject_Matcher_MethodName - */ - public $methodNameMatcher = NULL; - - /** - * @var PHPUnit_Framework_MockObject_Matcher_Parameters - */ - public $parametersMatcher = NULL; - - /** - * @var PHPUnit_Framework_MockObject_Stub - */ - public $stub = NULL; - - /** - * @param PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher - */ - public function __construct(PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher) - { - $this->invocationMatcher = $invocationMatcher; - } - - /** - * @return string - */ - public function toString() - { - $list = array(); - - if ($this->invocationMatcher !== NULL) { - $list[] = $this->invocationMatcher->toString(); - } - - if ($this->methodNameMatcher !== NULL) { - $list[] = 'where ' . $this->methodNameMatcher->toString(); - } - - if ($this->parametersMatcher !== NULL) { - $list[] = 'and ' . $this->parametersMatcher->toString(); - } - - if ($this->afterMatchBuilderId !== NULL) { - $list[] = 'after ' . $this->afterMatchBuilderId; - } - - if ($this->stub !== NULL) { - $list[] = 'will ' . $this->stub->toString(); - } - - return join(' ', $list); - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @return mixed - */ - public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation) - { - if ($this->invocationMatcher === NULL) { - throw new PHPUnit_Framework_Exception( - 'No invocation matcher is set' - ); - } - - if ($this->methodNameMatcher === NULL) { - throw new PHPUnit_Framework_Exception('No method matcher is set'); - } - - if ($this->afterMatchBuilderId !== NULL) { - $builder = $invocation->object - ->__phpunit_getInvocationMocker() - ->lookupId($this->afterMatchBuilderId); - - if (!$builder) { - throw new PHPUnit_Framework_Exception( - sprintf( - 'No builder found for match builder identification <%s>', - - $this->afterMatchBuilderId - ) - ); - } - - $matcher = $builder->getMatcher(); - - if ($matcher && $matcher->invocationMatcher->hasBeenInvoked()) { - $this->afterMatchBuilderIsInvoked = TRUE; - } - } - - $this->invocationMatcher->invoked($invocation); - - try { - if ( $this->parametersMatcher !== NULL && - !$this->parametersMatcher->matches($invocation)) { - $this->parametersMatcher->verify(); - } - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { - throw new PHPUnit_Framework_ExpectationFailedException( - sprintf( - "Expectation failed for %s when %s\n%s", - - $this->methodNameMatcher->toString(), - $this->invocationMatcher->toString(), - $e->getMessage() - ), - $e->getComparisonFailure() - ); - } - - if ($this->stub) { - return $this->stub->invoke($invocation); - } - - return NULL; - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @return boolean - */ - public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) - { - if ($this->afterMatchBuilderId !== NULL) { - $builder = $invocation->object - ->__phpunit_getInvocationMocker() - ->lookupId($this->afterMatchBuilderId); - - if (!$builder) { - throw new PHPUnit_Framework_Exception( - sprintf( - 'No builder found for match builder identification <%s>', - - $this->afterMatchBuilderId - ) - ); - } - - $matcher = $builder->getMatcher(); - - if (!$matcher) { - return FALSE; - } - - if (!$matcher->invocationMatcher->hasBeenInvoked()) { - return FALSE; - } - } - - if ($this->invocationMatcher === NULL) { - throw new PHPUnit_Framework_Exception( - 'No invocation matcher is set' - ); - } - - if ($this->methodNameMatcher === NULL) { - throw new PHPUnit_Framework_Exception('No method matcher is set'); - } - - if (!$this->invocationMatcher->matches($invocation)) { - return FALSE; - } - - try { - if (!$this->methodNameMatcher->matches($invocation)) { - return FALSE; - } - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { - throw new PHPUnit_Framework_ExpectationFailedException( - sprintf( - "Expectation failed for %s when %s\n%s", - - $this->methodNameMatcher->toString(), - $this->invocationMatcher->toString(), - $e->getMessage() - ), - $e->getComparisonFailure() - ); - } - - return TRUE; - } - - /** - * @throws PHPUnit_Framework_Exception - * @throws PHPUnit_Framework_ExpectationFailedException - */ - public function verify() - { - if ($this->invocationMatcher === NULL) { - throw new PHPUnit_Framework_Exception( - 'No invocation matcher is set' - ); - } - - if ($this->methodNameMatcher === NULL) { - throw new PHPUnit_Framework_Exception('No method matcher is set'); - } - - try { - $this->invocationMatcher->verify(); - - if ($this->parametersMatcher === NULL) { - $this->parametersMatcher = new PHPUnit_Framework_MockObject_Matcher_AnyParameters; - } - - $invocationIsAny = get_class($this->invocationMatcher) === 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount'; - if (!$invocationIsAny) { - $this->parametersMatcher->verify(); - } - } - - catch (PHPUnit_Framework_ExpectationFailedException $e) { - throw new PHPUnit_Framework_ExpectationFailedException( - sprintf( - "Expectation failed for %s when %s.\n%s", - - $this->methodNameMatcher->toString(), - $this->invocationMatcher->toString(), - $e->getMessage() - ) - ); - } - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Mocker for invocations which are sent from - * PHPUnit_Framework_MockObject_MockObject objects. - * - * Keeps track of all expectations and stubs as well as registering - * identifications for builders. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_InvocationMocker implements PHPUnit_Framework_MockObject_Stub_MatcherCollection, PHPUnit_Framework_MockObject_Invokable, PHPUnit_Framework_MockObject_Builder_Namespace -{ - /** - * @var PHPUnit_Framework_MockObject_Matcher_Invocation[] - */ - protected $matchers = array(); - - /** - * @var PHPUnit_Framework_MockObject_Builder_Match[] - */ - protected $builderMap = array(); - - /** - * @param PHPUnit_Framework_MockObject_Matcher_Invocation $matcher - */ - public function addMatcher(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher) - { - $this->matchers[] = $matcher; - } - - /** - * @since Method available since Release 1.1.0 - */ - public function hasMatchers() - { - if (empty($this->matchers)) { - return FALSE; - } - - foreach ($this->matchers as $matcher) { - if (!$matcher instanceof PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount) { - return TRUE; - } - } - - return FALSE; - } - - /** - * @param mixed $id - * @return boolean|null - */ - public function lookupId($id) - { - if (isset($this->builderMap[$id])) { - return $this->builderMap[$id]; - } - - return NULL; - } - - /** - * @param mixed $id - * @param PHPUnit_Framework_MockObject_Builder_Match $builder - * @throws PHPUnit_Framework_Exception - */ - public function registerId($id, PHPUnit_Framework_MockObject_Builder_Match $builder) - { - if (isset($this->builderMap[$id])) { - throw new PHPUnit_Framework_Exception( - 'Match builder with id <' . $id . '> is already registered.' - ); - } - - $this->builderMap[$id] = $builder; - } - - /** - * @param PHPUnit_Framework_MockObject_Matcher_Invocation $matcher - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher) - { - return new PHPUnit_Framework_MockObject_Builder_InvocationMocker( - $this, $matcher - ); - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @return mixed - */ - public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation) - { - $exception = NULL; - $hasReturnValue = FALSE; - - if (strtolower($invocation->methodName) == '__tostring') { - $returnValue = ''; - } else { - $returnValue = NULL; - } - - foreach ($this->matchers as $match) { - try { - if ($match->matches($invocation)) { - $value = $match->invoked($invocation); - - if (!$hasReturnValue) { - $returnValue = $value; - $hasReturnValue = TRUE; - } - } - } - - catch (Exception $e) { - $exception = $e; - } - } - - if ($exception !== NULL) { - throw $exception; - } - - return $returnValue; - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @return boolean - */ - public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) - { - foreach ($this->matchers as $matcher) { - if (!$matcher->matches($invocation)) { - return FALSE; - } - } - - return TRUE; - } - - /** - * @return boolean - */ - public function verify() - { - foreach ($this->matchers as $matcher) { - $matcher->verify(); - } - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Represents a static invocation. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Invocation_Static implements PHPUnit_Framework_MockObject_Invocation, PHPUnit_Framework_SelfDescribing -{ - /** - * @var array - */ - protected static $uncloneableExtensions = array( - 'mysqli' => TRUE, - 'SQLite' => TRUE, - 'sqlite3' => TRUE, - 'tidy' => TRUE, - 'xmlwriter' => TRUE, - 'xsl' => TRUE - ); - - /** - * @var array - */ - protected static $uncloneableClasses = array( - 'Closure', - 'COMPersistHelper', - 'IteratorIterator', - 'RecursiveIteratorIterator', - 'SplFileObject', - 'PDORow', - 'ZipArchive' - ); - - /** - * @var string - */ - public $className; - - /** - * @var string - */ - public $methodName; - - /** - * @var array - */ - public $parameters; - - /** - * @param string $className - * @param string $methodname - * @param array $parameters - * @param boolean $cloneObjects - */ - public function __construct($className, $methodName, array $parameters, $cloneObjects = FALSE) - { - $this->className = $className; - $this->methodName = $methodName; - $this->parameters = $parameters; - - if (!$cloneObjects) { - return; - } - - foreach ($this->parameters as $key => $value) { - if (is_object($value)) { - $this->parameters[$key] = $this->cloneObject($value); - } - } - } - - /** - * @return string - */ - public function toString() - { - return sprintf( - "%s::%s(%s)", - - $this->className, - $this->methodName, - join( - ', ', - array_map( - array('PHPUnit_Util_Type', 'shortenedExport'), - $this->parameters - ) - ) - ); - } - - /** - * @param object $original - * @return object - */ - protected function cloneObject($original) - { - $cloneable = NULL; - $object = new ReflectionObject($original); - - // Check the blacklist before asking PHP reflection to work around - // https://bugs.php.net/bug.php?id=53967 - if ($object->isInternal() && - isset(self::$uncloneableExtensions[$object->getExtensionName()])) { - $cloneable = FALSE; - } - - if ($cloneable === NULL) { - foreach (self::$uncloneableClasses as $class) { - if ($original instanceof $class) { - $cloneable = FALSE; - break; - } - } - } - - if ($cloneable === NULL && method_exists($object, 'isCloneable')) { - $cloneable = $object->isCloneable(); - } - - if ($cloneable === NULL && $object->hasMethod('__clone')) { - $method = $object->getMethod('__clone'); - $cloneable = $method->isPublic(); - } - - if ($cloneable === NULL) { - $cloneable = TRUE; - } - - if ($cloneable) { - try { - return clone $original; - } - - catch (Exception $e) { - return $original; - } - } else { - return $original; - } - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Represents a non-static invocation. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Invocation_Object extends PHPUnit_Framework_MockObject_Invocation_Static -{ - /** - * @var object - */ - public $object; - - /** - * @param string $className - * @param string $methodname - * @param array $parameters - * @param object $object - * @param object $cloneObjects - */ - public function __construct($className, $methodName, array $parameters, $object, $cloneObjects = FALSE) - { - parent::__construct($className, $methodName, $parameters, $cloneObjects); - $this->object = $object; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Stubs a method by returning a user-defined value. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Stub_Return implements PHPUnit_Framework_MockObject_Stub -{ - protected $value; - - public function __construct($value) - { - $this->value = $value; - } - - public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation) - { - return $this->value; - } - - public function toString() - { - return sprintf( - 'return user-specified value %s', - - PHPUnit_Util_Type::toString($this->value) - ); - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Stubs a method by returning a user-defined value. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Stub_MatcherCollection -{ - /** - * Adds a new matcher to the collection which can be used as an expectation - * or a stub. - * - * @param PHPUnit_Framework_MockObject_Matcher_Invocation $matcher - * Matcher for invocations to mock objects. - */ - public function addMatcher(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher); -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Stubs a method by returning an argument that was passed to the mocked method. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Stub_ReturnArgument extends PHPUnit_Framework_MockObject_Stub_Return -{ - protected $argumentIndex; - - public function __construct($argumentIndex) - { - $this->argumentIndex = $argumentIndex; - } - - public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation) - { - if (isset($invocation->parameters[$this->argumentIndex])) { - return $invocation->parameters[$this->argumentIndex]; - } else { - return NULL; - } - } - - public function toString() - { - return sprintf('return argument #%d', $this->argumentIndex); - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @author Kris Wallsmith - * @copyright 2010 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.1.0 - */ - -/** - * Stubs a method by returning the current object. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @author Kris Wallsmith - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.1.0 - */ -class PHPUnit_Framework_MockObject_Stub_ReturnSelf implements PHPUnit_Framework_MockObject_Stub -{ - public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation) - { - if (!$invocation instanceof PHPUnit_Framework_MockObject_Invocation_Object) { - throw new PHPUnit_Framework_Exception( - 'The current object can only be returned when mocking an ' . - 'object, not a static class.' - ); - } - - return $invocation->object; - } - - public function toString() - { - return 'return the current object'; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Oliver Schlicht - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Stubs a method by raising a user-defined exception. - * - * @package PHPUnit_MockObject - * @author Oliver Schlicht - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Stub_Exception implements PHPUnit_Framework_MockObject_Stub -{ - protected $exception; - - public function __construct(Exception $exception) - { - $this->exception = $exception; - } - - public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation) - { - throw $this->exception; - } - - public function toString() - { - return sprintf( - 'raise user-specified exception %s', - - PHPUnit_Util_Type::toString($this->exception) - ); - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Patrick Müller - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Stubs a method by returning a user-defined stack of values. - * - * @package PHPUnit_MockObject - * @author Patrick Müller - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls implements PHPUnit_Framework_MockObject_Stub -{ - protected $stack; - protected $value; - - public function __construct($stack) - { - $this->stack = $stack; - } - - public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation) - { - $this->value = array_shift($this->stack); - - if ($this->value instanceof PHPUnit_Framework_MockObject_Stub) { - $this->value = $this->value->invoke($invocation); - } - - return $this->value; - } - - public function toString() - { - return sprintf( - 'return user-specified value %s', - - PHPUnit_Util_Type::toString($this->value) - ); - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Stub_ReturnCallback implements PHPUnit_Framework_MockObject_Stub -{ - protected $callback; - - public function __construct($callback) - { - $this->callback = $callback; - } - - public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation) - { - return call_user_func_array($this->callback, $invocation->parameters); - } - - public function toString() - { - if (is_array($this->callback)) { - if (is_object($this->callback[0])) { - $class = get_class($this->callback[0]); - $type = '->'; - } else { - $class = $this->callback[0]; - $type = '::'; - } - - return sprintf( - 'return result of user defined callback %s%s%s() with the ' . - 'passed arguments', - - $class, - $type, - $this->callback[1] - ); - } else { - return 'return result of user defined callback ' . $this->callback . - ' with the passed arguments'; - } - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.1.0 - */ - -/** - * Stubs a method by returning a value from a map. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.1.0 - */ -class PHPUnit_Framework_MockObject_Stub_ReturnValueMap implements PHPUnit_Framework_MockObject_Stub -{ - protected $valueMap; - - public function __construct(array $valueMap) - { - $this->valueMap = $valueMap; - } - - public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation) - { - $parameterCount = count($invocation->parameters); - - foreach ($this->valueMap as $map) { - if (!is_array($map) || $parameterCount != count($map) - 1) { - continue; - } - - $return = array_pop($map); - if ($invocation->parameters === $map) { - return $return; - } - } - - return NULL; - } - - public function toString() - { - return 'return value from a map'; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Interface for classes which must verify a given expectation. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Verifiable -{ - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws PHPUnit_Framework_ExpectationFailedException - */ - public function verify(); -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Interface for invocations. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Invocation -{ -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * An object that stubs the process of a normal method for a mock object. - * - * The stub object will replace the code for the stubbed method and return a - * specific value instead of the original value. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Stub extends PHPUnit_Framework_SelfDescribing -{ - /** - * Fakes the processing of the invocation $invocation by returning a - * specific value. - * - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * The invocation which was mocked and matched by the current method - * and argument matchers. - * @return mixed - */ - public function invoke(PHPUnit_Framework_MockObject_Invocation $invocation); -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Builder interface for parameter matchers. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Builder_ParametersMatch extends PHPUnit_Framework_MockObject_Builder_Match -{ - /** - * Sets the parameters to match for, each parameter to this funtion will - * be part of match. To perform specific matches or constraints create a - * new PHPUnit_Framework_Constraint and use it for the parameter. - * If the parameter value is not a constraint it will use the - * PHPUnit_Framework_Constraint_IsEqual for the value. - * - * Some examples: - * - * // match first parameter with value 2 - * $b->with(2); - * // match first parameter with value 'smock' and second identical to 42 - * $b->with('smock', new PHPUnit_Framework_Constraint_IsEqual(42)); - * - * - * @return PHPUnit_Framework_MockObject_Builder_ParametersMatch - */ - public function with(); - - /** - * Sets a matcher which allows any kind of parameters. - * - * Some examples: - * - * // match any number of parameters - * $b->withAnyParamers(); - * - * - * @return PHPUnit_Framework_MockObject_Matcher_AnyParameters - */ - public function withAnyParameters(); -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Builder interface for invocation order matches. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Builder_Match extends PHPUnit_Framework_MockObject_Builder_Stub -{ - /** - * Defines the expectation which must occur before the current is valid. - * - * @param string $id The identification of the expectation that should - * occur before this one. - * @return PHPUnit_Framework_MockObject_Builder_Stub - */ - public function after($id); -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Builder for mocked or stubbed invocations. - * - * Provides methods for building expectations without having to resort to - * instantiating the various matchers manually. These methods also form a - * more natural way of reading the expectation. This class should be together - * with the test case PHPUnit_Framework_MockObject_TestCase. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Framework_MockObject_Builder_InvocationMocker implements PHPUnit_Framework_MockObject_Builder_MethodNameMatch -{ - /** - * @var PHPUnit_Framework_MockObject_Stub_MatcherCollection - */ - protected $collection; - - /** - * @var PHPUnit_Framework_MockObject_Matcher - */ - protected $matcher; - - /** - * @param PHPUnit_Framework_MockObject_Stub_MatcherCollection $collection - * @param PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher - */ - public function __construct(PHPUnit_Framework_MockObject_Stub_MatcherCollection $collection, PHPUnit_Framework_MockObject_Matcher_Invocation $invocationMatcher) - { - $this->collection = $collection; - $this->matcher = new PHPUnit_Framework_MockObject_Matcher( - $invocationMatcher - ); - - $this->collection->addMatcher($this->matcher); - } - - /** - * @return PHPUnit_Framework_MockObject_Matcher - */ - public function getMatcher() - { - return $this->matcher; - } - - /** - * @param mixed $id - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public function id($id) - { - $this->collection->registerId($id, $this); - - return $this; - } - - /** - * @param PHPUnit_Framework_MockObject_Stub $stub - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public function will(PHPUnit_Framework_MockObject_Stub $stub) - { - $this->matcher->stub = $stub; - - return $this; - } - - /** - * @param mixed $id - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public function after($id) - { - $this->matcher->afterMatchBuilderId = $id; - - return $this; - } - - /** - * @param mixed $argument, ... - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public function with() - { - $args = func_get_args(); - - if ($this->matcher->methodNameMatcher === NULL) { - throw new PHPUnit_Framework_Exception( - 'Method name matcher is not defined, cannot define parameter ' . - ' matcher without one' - ); - } - - if ($this->matcher->parametersMatcher !== NULL) { - throw new PHPUnit_Framework_Exception( - 'Parameter matcher is already defined, cannot redefine' - ); - } - - $this->matcher->parametersMatcher = new PHPUnit_Framework_MockObject_Matcher_Parameters($args); - - return $this; - } - - /** - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public function withAnyParameters() - { - if ($this->matcher->methodNameMatcher === NULL) { - throw new PHPUnit_Framework_Exception( - 'Method name matcher is not defined, cannot define parameter ' . - 'matcher without one' - ); - } - - if ($this->matcher->parametersMatcher !== NULL) { - throw new PHPUnit_Framework_Exception( - 'Parameter matcher is already defined, cannot redefine' - ); - } - - $this->matcher->parametersMatcher = new PHPUnit_Framework_MockObject_Matcher_AnyParameters; - - return $this; - } - - /** - * @param PHPUnit_Framework_Constraint|string $constraint - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public function method($constraint) - { - if ($this->matcher->methodNameMatcher !== NULL) { - throw new PHPUnit_Framework_Exception( - 'Method name matcher is already defined, cannot redefine' - ); - } - - $this->matcher->methodNameMatcher = new PHPUnit_Framework_MockObject_Matcher_MethodName($constraint); - - return $this; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Interface for builders which can register builders with a given identification. - * - * This interface relates to PHPUnit_Framework_MockObject_Builder_Identity. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Builder_Namespace -{ - /** - * Looks up the match builder with identification $id and returns it. - * - * @param string $id The identifiction of the match builder. - * @return PHPUnit_Framework_MockObject_Builder_Match - */ - public function lookupId($id); - - /** - * Registers the match builder $builder with the identification $id. The - * builder can later be looked up using lookupId() to figure out if it - * has been invoked. - * - * @param string $id - * The identification of the match builder. - * @param PHPUnit_Framework_MockObject_Builder_Match $builder - * The builder which is being registered. - */ - public function registerId($id, PHPUnit_Framework_MockObject_Builder_Match $builder); -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Builder interface for matcher of method names. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Builder_MethodNameMatch extends PHPUnit_Framework_MockObject_Builder_ParametersMatch -{ - /** - * Adds a new method name match and returns the parameter match object for - * further matching possibilities. - * - * @param PHPUnit_Framework_Constraint $name - * Constraint for matching method, if a string is passed it will use - * the PHPUnit_Framework_Constraint_IsEqual. - * @return PHPUnit_Framework_MockObject_Builder_ParametersMatch - */ - public function method($name); -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Builder interface for unique identifiers. - * - * Defines the interface for recording unique identifiers. The identifiers - * can be used to define the invocation order of expectations. The expectation - * is recorded using id() and then defined in order using - * PHPUnit_Framework_MockObject_Builder_Match::after(). - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Builder_Identity -{ - /** - * Sets the identification of the expectation to $id. - * - * @note The identifier is unique per mock object. - * @param string $id Unique identifiation of expectation. - */ - public function id($id); -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Builder interface for stubs which are actions replacing an invocation. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_Builder_Stub extends PHPUnit_Framework_MockObject_Builder_Identity -{ - /** - * Stubs the matching method with the stub object $stub. Any invocations of - * the matched method will now be handled by the stub instead. - * - * @param PHPUnit_Framework_MockObject_Stub $stub The stub object. - * @return PHPUnit_Framework_MockObject_Builder_Identity - */ - public function will(PHPUnit_Framework_MockObject_Stub $stub); -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since File available since Release 1.0.0 - */ - -/** - * Interface for all mock objects which are generated by - * PHPUnit_Framework_MockObject_Mock. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.2.3 - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - * @since Interface available since Release 1.0.0 - */ -interface PHPUnit_Framework_MockObject_MockObject /*extends PHPUnit_Framework_MockObject_Verifiable*/ -{ - /** - * Registers a new expectation in the mock object and returns the match - * object which can be infused with further details. - * - * @param PHPUnit_Framework_MockObject_Matcher_Invocation $matcher - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher); - - /** - * Registers a new static expectation in the mock object and returns the - * match object which can be infused with further details. - * - * @param PHPUnit_Framework_MockObject_Matcher_Invocation $matcher - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher); - - /** - * @return PHPUnit_Framework_MockObject_InvocationMocker - */ - public function __phpunit_getInvocationMocker(); - - /** - * @return PHPUnit_Framework_MockObject_InvocationMocker - */ - public static function __phpunit_getStaticInvocationMocker(); - - /** - * Verifies that the current expectation is valid. If everything is OK the - * code should just return, if not it must throw an exception. - * - * @throws PHPUnit_Framework_ExpectationFailedException - */ - public function __phpunit_verify(); -} -PHPUnit_MockObject 1.2 -====================== - -This is the list of changes for the PHPUnit_MockObject 1.2 release series. - -PHPUnit_MockObject 1.2.3 ------------------------- - -* Fixed a bug where getting two mocks with different argument cloning options returned the same mock. - -PHPUnit_MockObject 1.2.2 ------------------------- - -* Fixed #100: Removed the unique mock object ID introduced in version 1.2. - -PHPUnit_MockObject 1.2.1 ------------------------- - -* No changes. - -PHPUnit_MockObject 1.2.0 ------------------------- - -* Implemented #47: Make cloning of arguments passed to mocked methods optional. -* Implemented #84: `getMockFromWsdl()` now works with namespaces. -* Fixed #90: Mocks with a fixed class name could only be created once. - -PHPUnit_Selenium - -Copyright (c) 2002-2013, Sebastian Bergmann . -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 Sebastian Bergmann nor the names of his - 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. -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.2 - */ - -/** - * TestSuite class for Selenium 1 tests - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.0 - */ -class PHPUnit_Extensions_SeleniumTestSuite extends PHPUnit_Framework_TestSuite -{ - /** - * Overriding the default: Selenium suites are always built from a TestCase class. - * @var boolean - */ - protected $testCase = TRUE; - - /** - * Making the method public. - */ - public function addTestMethod(ReflectionClass $class, ReflectionMethod $method) - { - return parent::addTestMethod($class, $method); - } - - /** - * @param string $className extending PHPUnit_Extensions_SeleniumTestCase - * @return PHPUnit_Extensions_SeleniumTestSuite - */ - public static function fromTestCaseClass($className) - { - $suite = new self(); - $suite->setName($className); - - $class = new ReflectionClass($className); - $classGroups = PHPUnit_Util_Test::getGroups($className); - $staticProperties = $class->getStaticProperties(); - - //BC: renamed seleneseDirectory -> selenesePath - if (!isset($staticProperties['selenesePath']) && isset($staticProperties['seleneseDirectory'])) { - $staticProperties['selenesePath'] = $staticProperties['seleneseDirectory']; - } - - // Create tests from Selenese/HTML files. - if (isset($staticProperties['selenesePath']) && - (is_dir($staticProperties['selenesePath']) || is_file($staticProperties['selenesePath']))) { - - if (is_dir($staticProperties['selenesePath'])) { - $files = array_merge( - self::getSeleneseFiles($staticProperties['selenesePath'], '.htm'), - self::getSeleneseFiles($staticProperties['selenesePath'], '.html') - ); - } else { - $files[] = realpath($staticProperties['selenesePath']); - } - - // Create tests from Selenese/HTML files for multiple browsers. - if (!empty($staticProperties['browsers'])) { - foreach ($staticProperties['browsers'] as $browser) { - $browserSuite = PHPUnit_Extensions_SeleniumBrowserSuite::fromClassAndBrowser($className, $browser); - - foreach ($files as $file) { - self::addGeneratedTestTo($browserSuite, - new $className($file, array(), '', $browser), - $classGroups - ); - } - - $suite->addTest($browserSuite); - } - } - else { - // Create tests from Selenese/HTML files for single browser. - foreach ($files as $file) { - self::addGeneratedTestTo($suite, - new $className($file), - $classGroups); - } - } - } - - // Create tests from test methods for multiple browsers. - if (!empty($staticProperties['browsers'])) { - foreach ($staticProperties['browsers'] as $browser) { - $browserSuite = PHPUnit_Extensions_SeleniumBrowserSuite::fromClassAndBrowser($className, $browser); - foreach ($class->getMethods() as $method) { - $browserSuite->addTestMethod($class, $method); - } - $browserSuite->setupSpecificBrowser($browser); - - $suite->addTest($browserSuite); - } - } - else { - // Create tests from test methods for single browser. - foreach ($class->getMethods() as $method) { - $suite->addTestMethod($class, $method); - } - } - - return $suite; - } - - private static function addGeneratedTestTo(PHPUnit_Framework_TestSuite $suite, PHPUnit_Framework_TestCase $test, $classGroups) - { - list ($methodName, ) = explode(' ', $test->getName()); - $test->setDependencies( - PHPUnit_Util_Test::getDependencies(get_class($test), $methodName) - ); - $suite->addTest($test, $classGroups); - } - - /** - * @param string $directory - * @param string $suffix - * @return array - */ - private static function getSeleneseFiles($directory, $suffix) - { - $facade = new File_Iterator_Facade; - - return $facade->getFilesAsArray($directory, $suffix); - } - -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.0 - */ - -/** - * TestCase class that uses Selenium 2 - * (WebDriver API and JsonWire protocol) to provide - * the functionality required for web testing. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.0 - * @method void acceptAlert() Press OK on an alert, or confirms a dialog - * @method mixed alertText() alertText($value = NULL) Gets the alert dialog text, or sets the text for a prompt dialog - * @method void back() - * @method \PHPUnit_Extensions_Selenium2TestCase_Element byClassName() byClassName($value) - * @method \PHPUnit_Extensions_Selenium2TestCase_Element byCssSelector() byCssSelector($value) - * @method \PHPUnit_Extensions_Selenium2TestCase_Element byId() byId($value) - * @method \PHPUnit_Extensions_Selenium2TestCase_Element byLinkText() byLinkText($value) - * @method \PHPUnit_Extensions_Selenium2TestCase_Element byName() byName($value) - * @method \PHPUnit_Extensions_Selenium2TestCase_Element byTag() byTag($value) - * @method \PHPUnit_Extensions_Selenium2TestCase_Element byXPath() byXPath($value) - * @method void click() click(int $button = 0) Click any mouse button (at the coordinates set by the last moveto command). - * @method void clickOnElement() clickOnElement($id) - * @method string currentScreenshot() BLOB of the image file - * @method void dismissAlert() Press Cancel on an alert, or does not confirm a dialog - * @method \PHPUnit_Extensions_Selenium2TestCase_Element element() element(\PHPUnit_Extensions_Selenium2TestCase_ElementCriteria $criteria) Retrieves an element - * @method array elements() elements(\PHPUnit_Extensions_Selenium2TestCase_ElementCriteria $criteria) Retrieves an array of Element instances - * @method string execute() execute($javaScriptCode) Injects arbitrary JavaScript in the page and returns the last - * @method string executeAsync() executeAsync($javaScriptCode) Injects arbitrary JavaScript and wait for the callback (last element of arguments) to be called - * @method void forward() - * @method void frame() frame(mixed $element) Changes the focus to a frame in the page (by frameCount of type int, htmlId of type string, htmlName of type string or element of type \PHPUnit_Extensions_Selenium2TestCase_Element) - * @method void moveto() moveto(\PHPUnit_Extensions_Selenium2TestCase_Element $element) Move the mouse by an offset of the specificed element. - * @method void refresh() - * @method \PHPUnit_Extensions_Selenium2TestCase_Element_Select select() select($element) - * @method string source() Returns the HTML source of the page - * @method \PHPUnit_Extensions_Selenium2TestCase_Session_Timeouts timeouts() - * @method string title() - * @method void|string url() url($url = NULL) - * @method PHPUnit_Extensions_Selenium2TestCase_ElementCriteria using() using($strategy) Factory Method for Criteria objects - * @method void window() window($name) Changes the focus to another window - * @method string windowHandle() Retrieves the current window handle - * @method string windowHandles() Retrieves a list of all available window handles - * @method string keys() Send a sequence of key strokes to the active element. - * @method void closeWindow() Close the current window. - */ -abstract class PHPUnit_Extensions_Selenium2TestCase extends PHPUnit_Framework_TestCase -{ - const VERSION = '1.3.1'; - - /** - * @var string override to provide code coverage data from the server - */ - protected $coverageScriptUrl; - - /** - * @var PHPUnit_Extensions_Selenium2TestCase_Session - */ - private $session; - - /** - * @var array - */ - private $parameters; - - /** - * @var PHPUnit_Extensions_Selenium2TestCase_SessionStrategy - */ - protected static $sessionStrategy; - - /** - * @var PHPUnit_Extensions_Selenium2TestCase_SessionStrategy - */ - protected static $browserSessionStrategy; - - /** - * @var PHPUnit_Extensions_Selenium2TestCase_SessionStrategy - */ - protected $localSessionStrategy; - - /** - * @var array - */ - private static $lastBrowserParams; - - /** - * @var string - */ - private $testId; - - /** - * @var boolean - */ - private $collectCodeCoverageInformation; - - /** - * @var PHPUnit_Extensions_Selenium2TestCase_KeysHolder - */ - private $keysHolder; - - /** - * @param boolean - */ - public static function shareSession($shareSession) - { - if (!is_bool($shareSession)) { - throw new InvalidArgumentException("The shared session support can only be switched on or off."); - } - if (!$shareSession) { - self::$sessionStrategy = self::defaultSessionStrategy(); - } else { - self::$sessionStrategy = new PHPUnit_Extensions_Selenium2TestCase_SessionStrategy_Shared(self::defaultSessionStrategy()); - } - } - - private static function sessionStrategy() - { - if (!self::$sessionStrategy) { - self::$sessionStrategy = self::defaultSessionStrategy(); - } - return self::$sessionStrategy; - } - - private static function defaultSessionStrategy() - { - return new PHPUnit_Extensions_Selenium2TestCase_SessionStrategy_Isolated; - } - - public function __construct($name = NULL, array $data = array(), $dataName = '') - { - parent::__construct($name, $data, $dataName); - $this->parameters = array( - 'host' => 'localhost', - 'port' => 4444, - 'browser' => NULL, - 'browserName' => NULL, - 'desiredCapabilities' => array(), - 'seleniumServerRequestsTimeout' => 60 - ); - - $this->keysHolder = new PHPUnit_Extensions_Selenium2TestCase_KeysHolder(); - } - - public function setupSpecificBrowser($params) - { - $this->setUpSessionStrategy($params); - $params = array_merge($this->parameters, $params); - $this->setHost($params['host']); - $this->setPort($params['port']); - $this->setBrowser($params['browserName']); - $this->parameters['browser'] = $params['browser']; - $this->setDesiredCapabilities($params['desiredCapabilities']); - $this->setSeleniumServerRequestsTimeout( - $params['seleniumServerRequestsTimeout']); - } - - protected function setUpSessionStrategy($params) - { - // This logic enables us to have a session strategy reused for each - // item in self::$browsers. We don't want them both to share one - // and we don't want each test for a specific browser to have a - // new strategy - if ($params == self::$lastBrowserParams) { - // do nothing so we use the same session strategy for this - // browser - } elseif (isset($params['sessionStrategy'])) { - $strat = $params['sessionStrategy']; - if ($strat != "isolated" && $strat != "shared") { - throw new InvalidArgumentException("Session strategy must be either 'isolated' or 'shared'"); - } elseif ($strat == "isolated") { - self::$browserSessionStrategy = new PHPUnit_Extensions_Selenium2TestCase_SessionStrategy_Isolated; - } else { - self::$browserSessionStrategy = new PHPUnit_Extensions_Selenium2TestCase_SessionStrategy_Shared(self::defaultSessionStrategy()); - } - } else { - self::$browserSessionStrategy = self::defaultSessionStrategy(); - } - self::$lastBrowserParams = $params; - $this->localSessionStrategy = self::$browserSessionStrategy; - - } - - private function getStrategy() - { - if ($this->localSessionStrategy) - return $this->localSessionStrategy; - else - return self::sessionStrategy(); - } - - public function prepareSession() - { - try { - if (!$this->session) { - $this->session = $this->getStrategy()->session($this->parameters); - } - } catch (PHPUnit_Extensions_Selenium2TestCase_NoSeleniumException $e) { - $this->markTestSkipped("The Selenium Server is not active on host {$this->parameters['host']} at port {$this->parameters['port']}."); - } - return $this->session; - } - - public function run(PHPUnit_Framework_TestResult $result = NULL) - { - $this->testId = get_class($this) . '__' . $this->getName(); - - if ($result === NULL) { - $result = $this->createResult(); - } - - - $this->collectCodeCoverageInformation = $result->getCollectCodeCoverageInformation(); - - parent::run($result); - - if ($this->collectCodeCoverageInformation) { - $coverage = new PHPUnit_Extensions_SeleniumCommon_RemoteCoverage( - $this->coverageScriptUrl, - $this->testId - ); - $result->getCodeCoverage()->append( - $coverage->get(), $this - ); - } - - // do not call this before to give the time to the Listeners to run - $this->getStrategy()->endOfTest($this->session); - - return $result; - } - - /** - * @throws RuntimeException - */ - protected function runTest() - { - $this->prepareSession(); - - $thrownException = NULL; - - if ($this->collectCodeCoverageInformation) { - $this->session->cookie()->remove('PHPUNIT_SELENIUM_TEST_ID'); - $this->session->cookie()->add('PHPUNIT_SELENIUM_TEST_ID', $this->testId)->set(); - } - - try { - $this->setUpPage(); - $result = parent::runTest(); - - if (!empty($this->verificationErrors)) { - $this->fail(implode("\n", $this->verificationErrors)); - } - } catch (Exception $e) { - $thrownException = $e; - } - - - if (NULL !== $thrownException) { - throw $thrownException; - } - - return $result; - } - - - public static function suite($className) - { - return PHPUnit_Extensions_SeleniumTestSuite::fromTestCaseClass($className); - } - - public function onNotSuccessfulTest(Exception $e) - { - $this->getStrategy()->notSuccessfulTest(); - parent::onNotSuccessfulTest($e); - } - - /** - * Delegate method calls to the Session. - * - * @param string $command - * @param array $arguments - * @return mixed - */ - public function __call($command, $arguments) - { - if ($this->session === NULL) { - throw new PHPUnit_Extensions_Selenium2TestCase_Exception("There is currently no active session to execute the '$command' command. You're probably trying to set some option in setUp() with an incorrect setter name. You may consider using setUpPage() instead."); - } - $result = call_user_func_array( - array($this->session, $command), $arguments - ); - - return $result; - } - - /** - * @param string $host - * @throws InvalidArgumentException - */ - public function setHost($host) - { - if (!is_string($host)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - $this->parameters['host'] = $host; - } - - public function getHost() - { - return $this->parameters['host']; - } - - /** - * @param integer $port - * @throws InvalidArgumentException - */ - public function setPort($port) - { - if (!is_int($port)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer'); - } - - $this->parameters['port'] = $port; - } - - public function getPort() - { - return $this->parameters['port']; - } - - /** - * @param string $browser - * @throws InvalidArgumentException - */ - public function setBrowser($browserName) - { - if (!is_string($browserName)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - $this->parameters['browserName'] = $browserName; - } - - public function getBrowser() - { - return $this->parameters['browserName']; - } - - /** - * @param string $browserUrl - * @throws InvalidArgumentException - */ - public function setBrowserUrl($browserUrl) - { - if (!is_string($browserUrl)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - $this->parameters['browserUrl'] = new PHPUnit_Extensions_Selenium2TestCase_URL($browserUrl); - } - - public function getBrowserUrl() - { - if (isset($this->parameters['browserUrl'])) { - return $this->parameters['browserUrl']; - } - return ''; - } - - /** - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol - */ - public function setDesiredCapabilities(array $capabilities) - { - $this->parameters['desiredCapabilities'] = $capabilities; - } - - - public function getDesiredCapabilities() - { - return $this->parameters['desiredCapabilities']; - } - - /** - * @param int $timeout seconds - */ - public function setSeleniumServerRequestsTimeout($timeout) - { - $this->parameters['seleniumServerRequestsTimeout'] = $timeout; - } - - public function getSeleniumServerRequestsTimeout() - { - return $this->parameters['seleniumServerRequestsTimeout']; - } - - /** - * Get test id (generated internally) - * @return string - */ - public function getTestId() - { - return $this->testId; - } - - /** - * Get Selenium2 current session id - * @return string - */ - public function getSessionId() - { - if ($this->session) - return $this->session->id(); - - return FALSE; - } - - /** - * Wait until callback isn't null or timeout occurs - * - * @param $callback - * @param null $timeout - * @return mixed - */ - public function waitUntil($callback, $timeout = null) - { - $waitUntil = new PHPUnit_Extensions_Selenium2TestCase_WaitUntil($this); - return $waitUntil->run($callback, $timeout); - } - - /** - * Sends a special key - * Deprecated due to issues with IE webdriver. Use keys() method instead - * @deprecated - * @param string $name - * @throws PHPUnit_Extensions_Selenium2TestCase_Exception - * @see PHPUnit_Extensions_Selenium2TestCase_KeysHolder - */ - public function keysSpecial($name) - { - $names = explode(',', $name); - - foreach ($names as $key) { - $this->keys($this->keysHolder->specialKey(trim($key))); - } - } - - /** - * setUp method that is called after the session has been prepared. - * It is possible to use session-specific commands like url() here. - */ - public function setUpPage() - { - - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.0.0 - */ - -/** - * Implementation of the Selenium RC client/server protocol. - * - * @package PHPUnit_Selenium - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.0.0 - */ -class PHPUnit_Extensions_SeleniumTestCase_Driver -{ - /** - * @var PHPUnit_Extensions_SeleniumTestCase - */ - protected $testCase; - - /** - * @var string - */ - protected $testId; - - /** - * @var string - */ - protected $name; - - /** - * @var string - */ - protected $browser; - - /** - * @var string - */ - protected $browserUrl; - - /** - * @var boolean - */ - protected $collectCodeCoverageInformation = FALSE; - - /** - * @var string - */ - protected $host = 'localhost'; - - /** - * @var integer - */ - protected $port = 4444; - - /** - * @var integer - */ - protected $httpTimeout = 45; - - /** - * @var integer - */ - protected $seleniumTimeout = 30; - - /** - * @var string - */ - protected $sessionId; - - /** - * @var integer - */ - protected $sleep = 0; - - /** - * @var boolean - */ - protected $useWaitForPageToLoad = TRUE; - - /** - * @var boolean - */ - protected $wait = 5; - - /** - * @var array - */ - protected static $autoGeneratedCommands = array(); - - /** - * @var array - */ - protected $commands = array(); - - /** - * @var array $userCommands A numerical array which holds custom user commands. - */ - protected $userCommands = array(); - - /** - * @var array - */ - protected $verificationErrors = array(); - - /** - * @var array - */ - private $webDriverCapabilities; - - public function __construct() - { - if (empty(self::$autoGeneratedCommands)) { - self::autoGenerateCommands(); - } - } - - /** - * Only browserName is supported. - */ - public function setWebDriverCapabilities(array $capabilities) - { - $this->webDriverCapabilities = $capabilities; - } - - /** - * @return string - */ - public function start() - { - if ($this->browserUrl == NULL) { - throw new PHPUnit_Framework_Exception( - 'setBrowserUrl() needs to be called before start().' - ); - } - - if ($this->webDriverCapabilities !== NULL) { - $seleniumServerUrl = PHPUnit_Extensions_Selenium2TestCase_URL::fromHostAndPort($this->host, $this->port); - $driver = new PHPUnit_Extensions_Selenium2TestCase_Driver($seleniumServerUrl); - $session = $driver->startSession($this->webDriverCapabilities, new PHPUnit_Extensions_Selenium2TestCase_URL($this->browserUrl)); - $webDriverSessionId = $session->id(); - $this->sessionId = $this->getString( - 'getNewBrowserSession', - array($this->browser, $this->browserUrl, '', - "webdriver.remote.sessionid=$webDriverSessionId") - ); - - $this->doCommand('setTimeout', array($this->seleniumTimeout * 1000)); - } - - if (!isset($this->sessionId)) { - $this->sessionId = $this->getString( - 'getNewBrowserSession', - array($this->browser, $this->browserUrl) - ); - - $this->doCommand('setTimeout', array($this->seleniumTimeout * 1000)); - } - - return $this->sessionId; - } - - /** - * @return string - * @since Method available since Release 1.1.0 - */ - public function getSessionId() - { - return $this->sessionId; - } - - /** - * @param string - * @since Method available since Release 1.2.0 - */ - public function setSessionId($sessionId) - { - $this->sessionId = $sessionId; - } - - /** - */ - public function stop() - { - if (!isset($this->sessionId)) { - return; - } - - $this->doCommand('testComplete'); - - $this->sessionId = NULL; - } - - /** - * @param boolean $flag - * @throws InvalidArgumentException - */ - public function setCollectCodeCoverageInformation($flag) - { - if (!is_bool($flag)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean'); - } - - $this->collectCodeCoverageInformation = $flag; - } - - /** - * @param PHPUnit_Extensions_SeleniumTestCase $testCase - */ - public function setTestCase(PHPUnit_Extensions_SeleniumTestCase $testCase) - { - $this->testCase = $testCase; - } - - /** - * @param integer $testId - */ - public function setTestId($testId) - { - $this->testId = $testId; - } - - /** - * @param string $name - * @throws InvalidArgumentException - */ - public function setName($name) - { - if (!is_string($name)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - $this->name = $name; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $browser - * @throws InvalidArgumentException - */ - public function setBrowser($browser) - { - if (!is_string($browser)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - $this->browser = $browser; - } - - /** - * @return string - */ - public function getBrowser() - { - return $this->browser; - } - - /** - * @param string $browserUrl - * @throws InvalidArgumentException - */ - public function setBrowserUrl($browserUrl) - { - if (!is_string($browserUrl)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - $this->browserUrl = $browserUrl; - } - - /** - * @param string $host - * @throws InvalidArgumentException - */ - public function setHost($host) - { - if (!is_string($host)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - - $this->host = $host; - } - - /** - * @return string - * @since Method available since Release 1.1.0 - */ - public function getHost() - { - return $this->host; - } - - /** - * @param integer $port - * @throws InvalidArgumentException - */ - public function setPort($port) - { - if (!is_int($port)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer'); - } - - $this->port = $port; - } - - /** - * @return integer - * @since Method available since Release 1.1.0 - */ - public function getPort() - { - return $this->port; - } - - /** - * @param integer $timeout for Selenium RC in seconds - * @throws InvalidArgumentException - */ - public function setTimeout($timeout) - { - if (!is_int($timeout)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer'); - } - - $this->seleniumTimeout = $timeout; - } - - /** - * @param integer $timeout for HTTP connection to Selenium RC in seconds - * @throws InvalidArgumentException - */ - public function setHttpTimeout($timeout) - { - if (!is_int($timeout)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer'); - } - - $this->httpTimeout = $timeout; - } - - /** - * @param integer $seconds - * @throws InvalidArgumentException - */ - public function setSleep($seconds) - { - if (!is_int($seconds)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer'); - } - - $this->sleep = $seconds; - } - - /** - * Sets the number of seconds to sleep() after *AndWait commands - * when setWaitForPageToLoad(FALSE) is used. - * - * @param integer $seconds - * @throws InvalidArgumentException - */ - public function setWait($seconds) - { - if (!is_int($seconds)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer'); - } - - $this->wait = $seconds; - } - - /** - * Sets whether waitForPageToLoad (TRUE) or sleep() (FALSE) - * is used after *AndWait commands. - * - * @param boolean $flag - * @throws InvalidArgumentException - */ - public function setWaitForPageToLoad($flag) - { - if (!is_bool($flag)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean'); - } - - $this->useWaitForPageToLoad = $flag; - } - - /** - * Adds allowed user commands into {@link self::$userCommands}. See - * {@link self::__call()} (switch/case -> default) for usage. - * - * @param string $command A command. - * - * @return $this - * @see self::__call() - */ - public function addUserCommand($command) - { - if (!is_string($command)) { - throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); - } - $this->userCommands[] = $command; - return $this; - } - - /** - * This method implements the Selenium RC protocol. - * - * @param string $command - * @param array $arguments - * @return mixed - * @method unknown addLocationStrategy() - * @method unknown addLocationStrategyAndWait() - * @method unknown addScript() - * @method unknown addScriptAndWait() - * @method unknown addSelection() - * @method unknown addSelectionAndWait() - * @method unknown allowNativeXpath() - * @method unknown allowNativeXpathAndWait() - * @method unknown altKeyDown() - * @method unknown altKeyDownAndWait() - * @method unknown altKeyUp() - * @method unknown altKeyUpAndWait() - * @method unknown answerOnNextPrompt() - * @method unknown assignId() - * @method unknown assignIdAndWait() - * @method unknown attachFile() - * @method unknown break() - * @method unknown captureEntirePageScreenshot() - * @method unknown captureEntirePageScreenshotAndWait() - * @method unknown captureEntirePageScreenshotToStringAndWait() - * @method unknown captureScreenshotAndWait() - * @method unknown captureScreenshotToStringAndWait() - * @method unknown check() - * @method unknown checkAndWait() - * @method unknown chooseCancelOnNextConfirmation() - * @method unknown chooseCancelOnNextConfirmationAndWait() - * @method unknown chooseOkOnNextConfirmation() - * @method unknown chooseOkOnNextConfirmationAndWait() - * @method unknown click() - * @method unknown clickAndWait() - * @method unknown clickAt() - * @method unknown clickAtAndWait() - * @method unknown close() - * @method unknown contextMenu() - * @method unknown contextMenuAndWait() - * @method unknown contextMenuAt() - * @method unknown contextMenuAtAndWait() - * @method unknown controlKeyDown() - * @method unknown controlKeyDownAndWait() - * @method unknown controlKeyUp() - * @method unknown controlKeyUpAndWait() - * @method unknown createCookie() - * @method unknown createCookieAndWait() - * @method unknown deleteAllVisibleCookies() - * @method unknown deleteAllVisibleCookiesAndWait() - * @method unknown deleteCookie() - * @method unknown deleteCookieAndWait() - * @method unknown deselectPopUp() - * @method unknown deselectPopUpAndWait() - * @method unknown doubleClick() - * @method unknown doubleClickAndWait() - * @method unknown doubleClickAt() - * @method unknown doubleClickAtAndWait() - * @method unknown dragAndDrop() - * @method unknown dragAndDropAndWait() - * @method unknown dragAndDropToObject() - * @method unknown dragAndDropToObjectAndWait() - * @method unknown dragDrop() - * @method unknown dragDropAndWait() - * @method unknown echo() - * @method unknown fireEvent() - * @method unknown fireEventAndWait() - * @method unknown focus() - * @method unknown focusAndWait() - * @method string getAlert() - * @method array getAllButtons() - * @method array getAllFields() - * @method array getAllLinks() - * @method array getAllWindowIds() - * @method array getAllWindowNames() - * @method array getAllWindowTitles() - * @method string getAttribute(string $attributeLocator) - * @method array getAttributeFromAllWindows(string $attributeName) - * @method string getBodyText() - * @method string getConfirmation() - * @method string getCookie() - * @method string getCookieByName(string $name) - * @method integer getCssCount(string $locator) - * @method integer getCursorPosition(string $locator) - * @method integer getElementHeight(string $locator) - * @method integer getElementIndex(string $locator) - * @method integer getElementPositionLeft(string $locator) - * @method integer getElementPositionTop(string $locator) - * @method integer getElementWidth(string $locator) - * @method string getEval(string $script) - * @method string getExpression(string $expression) - * @method string getHtmlSource() - * @method string getLocation() - * @method string getLogMessages() - * @method integer getMouseSpeed() - * @method string getPrompt() - * @method array getSelectOptions(string $selectLocator) - * @method string getSelectedId(string $selectLocator) - * @method array getSelectedIds(string $selectLocator) - * @method string getSelectedIndex(string $selectLocator) - * @method array getSelectedIndexes(string $selectLocator) - * @method string getSelectedLabel(string $selectLocator) - * @method array getSelectedLabels(string $selectLocator) - * @method string getSelectedValue(string $selectLocator) - * @method array getSelectedValues(string $selectLocator) - * @method unknown getSpeed() - * @method unknown getSpeedAndWait() - * @method string getTable(string $tableCellAddress) - * @method string getText(string $locator) - * @method string getTitle() - * @method string getValue(string $locator) - * @method boolean getWhetherThisFrameMatchFrameExpression(string $currentFrameString, string $target) - * @method boolean getWhetherThisWindowMatchWindowExpression(string $currentWindowString, string $target) - * @method integer getXpathCount(string $xpath) - * @method unknown goBack() - * @method unknown goBackAndWait() - * @method unknown highlight(string $locator) - * @method unknown highlightAndWait(string $locator) - * @method unknown ignoreAttributesWithoutValue(string $ignore) - * @method unknown ignoreAttributesWithoutValueAndWait(string $ignore) - * @method boolean isAlertPresent() - * @method boolean isChecked(locator) - * @method boolean isConfirmationPresent() - * @method boolean isCookiePresent(string $name) - * @method boolean isEditable(string $locator) - * @method boolean isElementPresent(string $locator) - * @method boolean isOrdered(string $locator1, string $locator2) - * @method boolean isPromptPresent() - * @method boolean isSomethingSelected(string $selectLocator) - * @method boolean isTextPresent(pattern) - * @method boolean isVisible(locator) - * @method unknown keyDown() - * @method unknown keyDownAndWait() - * @method unknown keyDownNative() - * @method unknown keyDownNativeAndWait() - * @method unknown keyPress() - * @method unknown keyPressAndWait() - * @method unknown keyPressNative() - * @method unknown keyPressNativeAndWait() - * @method unknown keyUp() - * @method unknown keyUpAndWait() - * @method unknown keyUpNative() - * @method unknown keyUpNativeAndWait() - * @method unknown metaKeyDown() - * @method unknown metaKeyDownAndWait() - * @method unknown metaKeyUp() - * @method unknown metaKeyUpAndWait() - * @method unknown mouseDown() - * @method unknown mouseDownAndWait() - * @method unknown mouseDownAt() - * @method unknown mouseDownAtAndWait() - * @method unknown mouseMove() - * @method unknown mouseMoveAndWait() - * @method unknown mouseMoveAt() - * @method unknown mouseMoveAtAndWait() - * @method unknown mouseOut() - * @method unknown mouseOutAndWait() - * @method unknown mouseOver() - * @method unknown mouseOverAndWait() - * @method unknown mouseUp() - * @method unknown mouseUpAndWait() - * @method unknown mouseUpAt() - * @method unknown mouseUpAtAndWait() - * @method unknown mouseUpRight() - * @method unknown mouseUpRightAndWait() - * @method unknown mouseUpRightAt() - * @method unknown mouseUpRightAtAndWait() - * @method unknown open() - * @method unknown openWindow() - * @method unknown openWindowAndWait() - * @method unknown pause() - * @method unknown refresh() - * @method unknown refreshAndWait() - * @method unknown removeAllSelections() - * @method unknown removeAllSelectionsAndWait() - * @method unknown removeScript() - * @method unknown removeScriptAndWait() - * @method unknown removeSelection() - * @method unknown removeSelectionAndWait() - * @method unknown retrieveLastRemoteControlLogs() - * @method unknown rollup() - * @method unknown rollupAndWait() - * @method unknown runScript() - * @method unknown runScriptAndWait() - * @method unknown select() - * @method unknown selectAndWait() - * @method unknown selectFrame() - * @method unknown selectPopUp() - * @method unknown selectPopUpAndWait() - * @method unknown selectWindow() - * @method unknown setBrowserLogLevel() - * @method unknown setBrowserLogLevelAndWait() - * @method unknown setContext() - * @method unknown setCursorPosition() - * @method unknown setCursorPositionAndWait() - * @method unknown setMouseSpeed() - * @method unknown setMouseSpeedAndWait() - * @method unknown setSpeed() - * @method unknown setSpeedAndWait() - * @method unknown shiftKeyDown() - * @method unknown shiftKeyDownAndWait() - * @method unknown shiftKeyUp() - * @method unknown shiftKeyUpAndWait() - * @method unknown shutDownSeleniumServer() - * @method unknown store() - * @method unknown submit() - * @method unknown submitAndWait() - * @method unknown type() - * @method unknown typeAndWait() - * @method unknown typeKeys() - * @method unknown typeKeysAndWait() - * @method unknown uncheck() - * @method unknown uncheckAndWait() - * @method unknown useXpathLibrary() - * @method unknown useXpathLibraryAndWait() - * @method unknown waitForCondition() - * @method unknown waitForElementPresent() - * @method unknown waitForElementNotPresent() - * @method unknown waitForPageToLoad() - * @method unknown waitForPopUp() - * @method unknown windowFocus() - * @method unknown windowMaximize() - */ - public function __call($command, $arguments) - { - $arguments = $this->preprocessParameters($arguments); - - $wait = FALSE; - - if (substr($command, -7, 7) == 'AndWait') { - $command = substr($command, 0, -7); - $wait = TRUE; - } - - switch ($command) { - case 'addLocationStrategy': - case 'addScript': - case 'addSelection': - case 'allowNativeXpath': - case 'altKeyDown': - case 'altKeyUp': - case 'answerOnNextPrompt': - case 'assignId': - case 'attachFile': - case 'break': - case 'captureEntirePageScreenshot': - case 'captureScreenshot': - case 'check': - case 'chooseCancelOnNextConfirmation': - case 'chooseOkOnNextConfirmation': - case 'click': - case 'clickAt': - case 'close': - case 'contextMenu': - case 'contextMenuAt': - case 'controlKeyDown': - case 'controlKeyUp': - case 'createCookie': - case 'deleteAllVisibleCookies': - case 'deleteCookie': - case 'deselectPopUp': - case 'doubleClick': - case 'doubleClickAt': - case 'dragAndDrop': - case 'dragAndDropToObject': - case 'dragDrop': - case 'echo': - case 'fireEvent': - case 'focus': - case 'goBack': - case 'highlight': - case 'ignoreAttributesWithoutValue': - case 'keyDown': - case 'keyDownNative': - case 'keyPress': - case 'keyPressNative': - case 'keyUp': - case 'keyUpNative': - case 'metaKeyDown': - case 'metaKeyUp': - case 'mouseDown': - case 'mouseDownAt': - case 'mouseMove': - case 'mouseMoveAt': - case 'mouseOut': - case 'mouseOver': - case 'mouseUp': - case 'mouseUpAt': - case 'mouseUpRight': - case 'mouseUpRightAt': - case 'open': - case 'openWindow': - case 'pause': - case 'refresh': - case 'removeAllSelections': - case 'removeScript': - case 'removeSelection': - case 'retrieveLastRemoteControlLogs': - case 'rollup': - case 'runScript': - case 'select': - case 'selectFrame': - case 'selectPopUp': - case 'selectWindow': - case 'setBrowserLogLevel': - case 'setContext': - case 'setCursorPosition': - case 'setMouseSpeed': - case 'setSpeed': - case 'shiftKeyDown': - case 'shiftKeyUp': - case 'shutDownSeleniumServer': - case 'store': - case 'submit': - case 'type': - case 'typeKeys': - case 'uncheck': - case 'useXpathLibrary': - case 'windowFocus': - case 'windowMaximize': - case isset(self::$autoGeneratedCommands[$command]): { - // Pre-Command Actions - switch ($command) { - case 'open': - case 'openWindow': { - if ($this->collectCodeCoverageInformation) { - $this->deleteCookie('PHPUNIT_SELENIUM_TEST_ID', 'path=/'); - - $this->createCookie( - 'PHPUNIT_SELENIUM_TEST_ID=' . $this->testId, - 'path=/' - ); - } - } - break; - case 'store': - // store is a synonym of storeExpression - // and RC only understands storeExpression - $command = 'storeExpression'; - break; - } - - if (isset(self::$autoGeneratedCommands[$command]) && self::$autoGeneratedCommands[$command]['functionHelper']) { - $helperArguments = array($command, $arguments, self::$autoGeneratedCommands[$command]); - call_user_func_array(array($this, self::$autoGeneratedCommands[$command]['functionHelper']), $helperArguments); - } else { - $this->doCommand($command, $arguments); - } - - // Post-Command Actions - switch ($command) { - case 'addLocationStrategy': - case 'allowNativeXpath': - case 'assignId': - case 'captureEntirePageScreenshot': - case 'captureScreenshot': { - // intentionally empty - } - break; - - default: { - if ($wait) { - if ($this->useWaitForPageToLoad) { - $this->waitForPageToLoad($this->seleniumTimeout * 1000); - } else { - sleep($this->wait); - } - } - - if ($this->sleep > 0) { - sleep($this->sleep); - } - - $this->testCase->runDefaultAssertions($command); - } - } - } - break; - - case 'getWhetherThisFrameMatchFrameExpression': - case 'getWhetherThisWindowMatchWindowExpression': - case 'isAlertPresent': - case 'isChecked': - case 'isConfirmationPresent': - case 'isCookiePresent': - case 'isEditable': - case 'isElementPresent': - case 'isOrdered': - case 'isPromptPresent': - case 'isSomethingSelected': - case 'isTextPresent': - case 'isVisible': { - return $this->getBoolean($command, $arguments); - } - break; - - case 'getCssCount': - case 'getCursorPosition': - case 'getElementHeight': - case 'getElementIndex': - case 'getElementPositionLeft': - case 'getElementPositionTop': - case 'getElementWidth': - case 'getMouseSpeed': - case 'getSpeed': - case 'getXpathCount': { - $result = $this->getNumber($command, $arguments); - - if ($wait) { - $this->waitForPageToLoad($this->seleniumTimeout * 1000); - } - - return $result; - } - break; - - case 'getAlert': - case 'getAttribute': - case 'getBodyText': - case 'getConfirmation': - case 'getCookie': - case 'getCookieByName': - case 'getEval': - case 'getExpression': - case 'getHtmlSource': - case 'getLocation': - case 'getLogMessages': - case 'getPrompt': - case 'getSelectedId': - case 'getSelectedIndex': - case 'getSelectedLabel': - case 'getSelectedValue': - case 'getTable': - case 'getText': - case 'getTitle': - case 'captureEntirePageScreenshotToString': - case 'captureScreenshotToString': - case 'getValue': { - $result = $this->getString($command, $arguments); - - if ($wait) { - $this->waitForPageToLoad($this->seleniumTimeout * 1000); - } - - return $result; - } - break; - - case 'getAllButtons': - case 'getAllFields': - case 'getAllLinks': - case 'getAllWindowIds': - case 'getAllWindowNames': - case 'getAllWindowTitles': - case 'getAttributeFromAllWindows': - case 'getSelectedIds': - case 'getSelectedIndexes': - case 'getSelectedLabels': - case 'getSelectedValues': - case 'getSelectOptions': { - $result = $this->getStringArray($command, $arguments); - - if ($wait) { - $this->waitForPageToLoad($this->seleniumTimeout * 1000); - } - - return $result; - } - break; - - case 'waitForCondition': - case 'waitForElementPresent': - case 'waitForElementNotPresent': - case 'waitForFrameToLoad': - case 'waitForPopUp': { - if (count($arguments) == 1) { - $arguments[] = $this->seleniumTimeout * 1000; - } - - $this->doCommand($command, $arguments); - $this->testCase->runDefaultAssertions($command); - } - break; - - case 'waitForPageToLoad': { - if (empty($arguments)) { - $arguments[] = $this->seleniumTimeout * 1000; - } - - $this->doCommand($command, $arguments); - $this->testCase->runDefaultAssertions($command); - } - break; - - default: { - if (!in_array($command, $this->userCommands)) { - throw new BadMethodCallException( - "Method $command not defined." - ); - } - $this->doCommand($command, $arguments); - } - } - } - - /** - * Send a command to the Selenium RC server. - * - * @param string $command - * @param array $arguments - * @param array $namedArguments - * @return string - * @author Seth Casana - */ - protected function doCommand($command, array $arguments = array(), array $namedArguments = array()) - { - $url = sprintf( - 'http://%s:%s/selenium-server/driver/', - $this->host, - $this->port - ); - - $numArguments = count($arguments); - $postData = sprintf('cmd=%s', urlencode($command)); - for ($i = 0; $i < $numArguments; $i++) { - $argNum = strval($i + 1); - - if ($arguments[$i] == ' ') { - $postData .= sprintf('&%s=%s', $argNum, urlencode($arguments[$i])); - } else { - $postData .= sprintf('&%s=%s', $argNum, urlencode(trim($arguments[$i]))); - } - } - foreach ($namedArguments as $key => $value) { - $postData .= sprintf('&%s=%s', $key, urlencode($value)); - } - - if (isset($this->sessionId)) { - $postData .= sprintf('&%s=%s', 'sessionId', $this->sessionId); - } - - $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, $url); - curl_setopt($curl, CURLOPT_HEADER, 0); - curl_setopt($curl, CURLOPT_POST, TRUE); - curl_setopt($curl, CURLOPT_POSTFIELDS, $postData); - curl_setopt($curl, CURLOPT_HTTPHEADER, array( - 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' - )); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 60); - - $response = curl_exec($curl); - $info = curl_getinfo($curl); - - if (!$response) { - throw new RuntimeException("CURL error while accessing the Selenium Server at '$url': " . curl_error($curl)); - } - - curl_close($curl); - - if (!preg_match('/^OK/', $response)) { - throw new RuntimeException("Invalid response while accessing the Selenium Server at '$url': " . $response); - } - - if ($info['http_code'] != 200) { - throw new RuntimeException( - 'The response from the Selenium RC server is invalid: ' . - $response - ); - } - - return $response; - } - - protected function preprocessParameters($params) - { - foreach ($params as $key => $param ) { - if (is_string($param) && (strlen($param) > 0)) { - $params[$key] = $this->getString('getExpression', array($param)); - } - } - return $params; - } - - /** - * Send a command to the Selenium RC server and treat the result - * as a boolean. - * - * @param string $command - * @param array $arguments - * @return boolean - * @author Shin Ohno - * @author Bjoern Schotte - */ - protected function getBoolean($command, array $arguments) - { - $result = $this->getString($command, $arguments); - - switch ($result) { - case 'true': return TRUE; - - case 'false': return FALSE; - - default: { - throw new PHPUnit_Framework_Exception( - 'Result is neither "true" nor "false": ' . PHPUnit_Util_Type::export($result) - ); - } - } - } - - /** - * Send a command to the Selenium RC server and treat the result - * as a number. - * - * @param string $command - * @param array $arguments - * @return numeric - * @author Shin Ohno - * @author Bjoern Schotte - */ - protected function getNumber($command, array $arguments) - { - $result = $this->getString($command, $arguments); - - if (!is_numeric($result)) { - throw new PHPUnit_Framework_Exception( - 'Result is not numeric: ' . PHPUnit_Util_Type::export($result) - ); - } - - return $result; - } - - /** - * Send a command to the Selenium RC server and treat the result - * as a string. - * - * @param string $command - * @param array $arguments - * @return string - * @author Shin Ohno - * @author Bjoern Schotte - */ - protected function getString($command, array $arguments) - { - try { - $result = $this->doCommand($command, $arguments); - } - - catch (RuntimeException $e) { - throw $e; - } - - return (strlen($result) > 3) ? substr($result, 3) : ''; - } - - /** - * Send a command to the Selenium RC server and treat the result - * as an array of strings. - * - * @param string $command - * @param array $arguments - * @return array - * @author Shin Ohno - * @author Bjoern Schotte - */ - protected function getStringArray($command, array $arguments) - { - $csv = $this->getString($command, $arguments); - $token = ''; - $tokens = array(); - $letters = preg_split('//', $csv, -1, PREG_SPLIT_NO_EMPTY); - $count = count($letters); - - for ($i = 0; $i < $count; $i++) { - $letter = $letters[$i]; - - switch($letter) { - case '\\': { - $letter = $letters[++$i]; - $token .= $letter; - } - break; - - case ',': { - $tokens[] = $token; - $token = ''; - } - break; - - default: { - $token .= $letter; - } - } - } - - $tokens[] = $token; - - return $tokens; - } - - public function getVerificationErrors() - { - return $this->verificationErrors; - } - - public function clearVerificationErrors() - { - $this->verificationErrors = array(); - } - - protected function assertCommand($command, $arguments, $info) - { - $method = $info['originalMethod']; - $requiresTarget = $info['requiresTarget']; - $result = $this->__call($method, $arguments); - $message = "Failed command: " . $command . "('" - . (array_key_exists(0, $arguments) ? $arguments[0] . "'" : '') - . (array_key_exists(1, $arguments) ? ", '" . $arguments[1] . "'" : '') - . ")"; - - if ($info['isBoolean']) { - if (!isset($info['negative']) || !$info['negative']) { - PHPUnit_Framework_Assert::assertTrue($result, $message); - } else { - PHPUnit_Framework_Assert::assertFalse($result, $message); - } - } else { - if ($requiresTarget === TRUE) { - $expected = $arguments[1]; - } else { - $expected = $arguments[0]; - } - - if (strpos($expected, 'exact:') === 0) { - $expected = substr($expected, strlen('exact:')); - - if (!isset($info['negative']) || !$info['negative']) { - PHPUnit_Framework_Assert::assertEquals($expected, $result, $message); - } else { - PHPUnit_Framework_Assert::assertNotEquals($expected, $result, $message); - } - } else { - $caseInsensitive = FALSE; - - if (strpos($expected, 'regexp:') === 0) { - $expected = substr($expected, strlen('regexp:')); - } - - else if (strpos($expected, 'regexpi:') === 0) { - $expected = substr($expected, strlen('regexpi:')); - $caseInsensitive = TRUE; - } - - else { - if (strpos($expected, 'glob:') === 0) { - $expected = substr($expected, strlen('glob:')); - } - - $expected = '^' . str_replace( - array('*', '?'), array('.*', '.?'), $expected - ) . '$'; - } - - $expected = '/' . str_replace('/', '\/', $expected) . '/'; - - if ($caseInsensitive) { - $expected .= 'i'; - } - - if (!isset($info['negative']) || !$info['negative']) { - PHPUnit_Framework_Assert::assertRegExp( - $expected, $result, $message - ); - } else { - PHPUnit_Framework_Assert::assertNotRegExp( - $expected, $result, $message - ); - } - } - } - } - - protected function verifyCommand($command, $arguments, $info) - { - try { - $this->assertCommand($command, $arguments, $info); - } - - catch (PHPUnit_Framework_AssertionFailedError $e) { - array_push($this->verificationErrors, $e->toString()); - } - } - - protected function waitForCommand($command, $arguments, $info) - { - $lastExceptionMessage = ''; - for ($second = 0; ; $second++) { - if ($second > $this->httpTimeout) { - PHPUnit_Framework_Assert::fail( - "WaitFor timeout. \n" - . "Last exception message: \n" . $lastExceptionMessage - ); - } - - try { - $this->assertCommand($command, $arguments, $info); - return; - } - - catch (Exception $e) { - $lastExceptionMessage = $e->getMessage(); - } - - sleep(1); - } - } - - /** - * Parses the docblock of PHPUnit_Extensions_SeleniumTestCase_Driver::__call - * for get*(), is*(), assert*(), verify*(), assertNot*(), verifyNot*(), - * store*(), waitFor*(), and waitForNot*() methods. - */ - protected static function autoGenerateCommands() - { - $method = new ReflectionMethod(__CLASS__, '__call'); - $docComment = $method->getDocComment(); - - if (preg_match_all('(@method\s+(\w+)\s+([\w]+)\((.*)\))', $docComment, $matches)) { - foreach ($matches[2] as $methodKey => $method) { - if (preg_match('/^(get|is)([A-Z].+)$/', $method, $methodMatches)) { - $baseName = $methodMatches[2]; - $isBoolean = $methodMatches[1] == 'is'; - $requiresTarget = (strlen($matches[3][$methodKey]) > 0); - - if (preg_match('/^(.*)Present$/', $baseName, $methodMatches)) { - $notBaseName = $methodMatches[1] . 'NotPresent'; - } else { - $notBaseName = 'Not' . $baseName; - } - - self::$autoGeneratedCommands['store' . $baseName] = array( - 'functionHelper' => FALSE - ); - - self::$autoGeneratedCommands['assert' . $baseName] = array( - 'originalMethod' => $method, - 'isBoolean' => $isBoolean, - 'functionHelper' => 'assertCommand', - 'requiresTarget' => $requiresTarget - ); - - self::$autoGeneratedCommands['assert' . $notBaseName] = array( - 'originalMethod' => $method, - 'isBoolean' => $isBoolean, - 'negative' => TRUE, - 'functionHelper' => 'assertCommand', - 'requiresTarget' => $requiresTarget - ); - - self::$autoGeneratedCommands['verify' . $baseName] = array( - 'originalMethod' => $method, - 'isBoolean' => $isBoolean, - 'functionHelper' => 'verifyCommand', - 'requiresTarget' => $requiresTarget - ); - - self::$autoGeneratedCommands['verify' . $notBaseName] = array( - 'originalMethod' => $method, - 'isBoolean' => $isBoolean, - 'negative' => TRUE, - 'functionHelper' => 'verifyCommand', - 'requiresTarget' => $requiresTarget - ); - - self::$autoGeneratedCommands['waitFor' . $baseName] = array( - 'originalMethod' => $method, - 'isBoolean' => $isBoolean, - 'functionHelper' => 'waitForCommand', - 'requiresTarget' => $requiresTarget - ); - - self::$autoGeneratedCommands['waitFor' . $notBaseName] = array( - 'originalMethod' => $method, - 'isBoolean' => $isBoolean, - 'negative' => TRUE, - 'functionHelper' => 'waitForCommand', - 'requiresTarget' => $requiresTarget - ); - } - } - } - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.6 - */ - -/** - * TestSuite class for a set of tests from a single Testcase Class - * executed with a particular browser. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.6 - */ -class PHPUnit_Extensions_SeleniumBrowserSuite extends PHPUnit_Framework_TestSuite -{ - /** - * Overriding the default: Selenium suites are always built from a TestCase class. - * @var boolean - */ - protected $testCase = TRUE; - - public function addTestMethod(ReflectionClass $class, ReflectionMethod $method) - { - return parent::addTestMethod($class, $method); - } - - public static function fromClassAndBrowser($className, array $browser) - { - $browserSuite = new self(); - if (isset($browser['browserName'])) { - $name = $browser['browserName']; - } else if (isset($browser['name'])) { - $name = $browser['name']; - } else { - $name = $browser['browser']; - } - $browserSuite->setName($className . ': ' . $name); - return $browserSuite; - } - - public function setupSpecificBrowser(array $browser) - { - $this->browserOnAllTests($this, $browser); - } - - private function browserOnAllTests(PHPUnit_Framework_TestSuite $suite, array $browser) - { - foreach ($suite->tests() as $test) { - if ($test instanceof PHPUnit_Framework_TestSuite) { - $this->browserOnAllTests($test, $browser); - } else { - $test->setupSpecificBrowser($browser); - } - } - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.0.0 - */ - -/** - * TestCase class that uses Selenium to provide - * the functionality required for web testing. - * - * @package PHPUnit_Selenium - * @author Sebastian Bergmann - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.0.0 - * - * @method unknown addLocationStrategy() - * @method unknown addLocationStrategyAndWait() - * @method unknown addScript() - * @method unknown addScriptAndWait() - * @method unknown addSelection() - * @method unknown addSelectionAndWait() - * @method unknown allowNativeXpath() - * @method unknown allowNativeXpathAndWait() - * @method unknown altKeyDown() - * @method unknown altKeyDownAndWait() - * @method unknown altKeyUp() - * @method unknown altKeyUpAndWait() - * @method unknown answerOnNextPrompt() - * @method unknown assignId() - * @method unknown assignIdAndWait() - * @method unknown assertAlert - * @method unknown assertAlertNotPresent - * @method unknown assertAlertPresent - * @method unknown assertAllButtons - * @method unknown assertAllFields - * @method unknown assertAllLinks - * @method unknown assertAllWindowIds - * @method unknown assertAllWindowNames - * @method unknown assertAllWindowTitles - * @method unknown assertAttribute - * @method unknown assertAttributeFromAllWindows - * @method unknown assertBodyText - * @method unknown assertChecked - * @method unknown assertConfirmation - * @method unknown assertConfirmationNotPresent - * @method unknown assertConfirmationPresent - * @method unknown assertCookie - * @method unknown assertCookieByName - * @method unknown assertCookieNotPresent - * @method unknown assertCookiePresent - * @method unknown assertCssCount - * @method unknown assertCursorPosition - * @method unknown assertEditable - * @method unknown assertElementHeight - * @method unknown assertElementIndex - * @method unknown assertElementNotPresent - * @method unknown assertElementPositionLeft - * @method unknown assertElementPositionTop - * @method unknown assertElementPresent - * @method unknown assertElementWidth - * @method unknown assertEval - * @method unknown assertExpression - * @method unknown assertHtmlSource - * @method unknown assertLocation - * @method unknown assertLogMessages - * @method unknown assertMouseSpeed - * @method unknown assertNotAlert - * @method unknown assertNotAllButtons - * @method unknown assertNotAllFields - * @method unknown assertNotAllLinks - * @method unknown assertNotAllWindowIds - * @method unknown assertNotAllWindowNames - * @method unknown assertNotAllWindowTitles - * @method unknown assertNotAttribute - * @method unknown assertNotAttributeFromAllWindows - * @method unknown assertNotBodyText - * @method unknown assertNotChecked - * @method unknown assertNotConfirmation - * @method unknown assertNotCookie - * @method unknown assertNotCookieByName - * @method unknown assertNotCssCount - * @method unknown assertNotCursorPosition - * @method unknown assertNotEditable - * @method unknown assertNotElementHeight - * @method unknown assertNotElementIndex - * @method unknown assertNotElementPositionLeft - * @method unknown assertNotElementPositionTop - * @method unknown assertNotElementWidth - * @method unknown assertNotEval - * @method unknown assertNotExpression - * @method unknown assertNotHtmlSource - * @method unknown assertNotLocation - * @method unknown assertNotLogMessages - * @method unknown assertNotMouseSpeed - * @method unknown assertNotOrdered - * @method unknown assertNotPrompt - * @method unknown assertNotSelectOptions - * @method unknown assertNotSelectedId - * @method unknown assertNotSelectedIds - * @method unknown assertNotSelectedIndex - * @method unknown assertNotSelectedIndexes - * @method unknown assertNotSelectedLabel - * @method unknown assertNotSelectedLabels - * @method unknown assertNotSelectedValue - * @method unknown assertNotSelectedValues - * @method unknown assertNotSomethingSelected - * @method unknown assertNotSpeed - * @method unknown assertNotSpeedAndWait - * @method unknown assertNotTable - * @method unknown assertNotText - * @method unknown assertNotTitle - * @method unknown assertNotValue - * @method unknown assertNotVisible - * @method unknown assertNotWhetherThisFrameMatchFrameExpression - * @method unknown assertNotWhetherThisWindowMatchWindowExpression - * @method unknown assertNotXpathCount - * @method unknown assertOrdered - * @method unknown assertPrompt - * @method unknown assertPromptNotPresent - * @method unknown assertPromptPresent - * @method unknown assertSelectOptions - * @method unknown assertSelectedId - * @method unknown assertSelectedIds - * @method unknown assertSelectedIndex - * @method unknown assertSelectedIndexes - * @method unknown assertSelectedLabel - * @method unknown assertSelectedLabels - * @method unknown assertSelectedValue - * @method unknown assertSelectedValues - * @method unknown assertSomethingSelected - * @method unknown assertSpeed - * @method unknown assertSpeedAndWait - * @method unknown assertTable - * @method unknown assertText - * @method unknown assertTextNotPresent - * @method unknown assertTextPresent - * @method unknown assertTitle - * @method unknown assertValue - * @method unknown assertVisible - * @method unknown assertWhetherThisFrameMatchFrameExpression - * @method unknown assertWhetherThisWindowMatchWindowExpression - * @method unknown assertXpathCount - * @method unknown attachFile() - * @method unknown break() - * @method unknown captureEntirePageScreenshot() - * @method unknown captureEntirePageScreenshotAndWait() - * @method unknown captureEntirePageScreenshotToStringAndWait() - * @method unknown captureScreenshotAndWait() - * @method unknown captureScreenshotToStringAndWait() - * @method unknown check() - * @method unknown checkAndWait() - * @method unknown chooseCancelOnNextConfirmation() - * @method unknown chooseCancelOnNextConfirmationAndWait() - * @method unknown chooseOkOnNextConfirmation() - * @method unknown chooseOkOnNextConfirmationAndWait() - * @method unknown click() - * @method unknown clickAndWait() - * @method unknown clickAt() - * @method unknown clickAtAndWait() - * @method unknown close() - * @method unknown contextMenu() - * @method unknown contextMenuAndWait() - * @method unknown contextMenuAt() - * @method unknown contextMenuAtAndWait() - * @method unknown controlKeyDown() - * @method unknown controlKeyDownAndWait() - * @method unknown controlKeyUp() - * @method unknown controlKeyUpAndWait() - * @method unknown createCookie() - * @method unknown createCookieAndWait() - * @method unknown deleteAllVisibleCookies() - * @method unknown deleteAllVisibleCookiesAndWait() - * @method unknown deleteCookie() - * @method unknown deleteCookieAndWait() - * @method unknown deselectPopUp() - * @method unknown deselectPopUpAndWait() - * @method unknown doubleClick() - * @method unknown doubleClickAndWait() - * @method unknown doubleClickAt() - * @method unknown doubleClickAtAndWait() - * @method unknown dragAndDrop() - * @method unknown dragAndDropAndWait() - * @method unknown dragAndDropToObject() - * @method unknown dragAndDropToObjectAndWait() - * @method unknown dragDrop() - * @method unknown dragDropAndWait() - * @method unknown echo() - * @method unknown fireEvent() - * @method unknown fireEventAndWait() - * @method unknown focus() - * @method unknown focusAndWait() - * @method string getAlert() - * @method array getAllButtons() - * @method array getAllFields() - * @method array getAllLinks() - * @method array getAllWindowIds() - * @method array getAllWindowNames() - * @method array getAllWindowTitles() - * @method string getAttribute() - * @method array getAttributeFromAllWindows() - * @method string getBodyText() - * @method string getConfirmation() - * @method string getCookie() - * @method string getCookieByName() - * @method integer getCursorPosition() - * @method integer getElementHeight() - * @method integer getElementIndex() - * @method integer getElementPositionLeft() - * @method integer getElementPositionTop() - * @method integer getElementWidth() - * @method string getEval() - * @method string getExpression() - * @method string getHtmlSource() - * @method string getLocation() - * @method string getLogMessages() - * @method integer getMouseSpeed() - * @method string getPrompt() - * @method array getSelectOptions() - * @method string getSelectedId() - * @method array getSelectedIds() - * @method string getSelectedIndex() - * @method array getSelectedIndexes() - * @method string getSelectedLabel() - * @method array getSelectedLabels() - * @method string getSelectedValue() - * @method array getSelectedValues() - * @method unknown getSpeed() - * @method unknown getSpeedAndWait() - * @method string getTable() - * @method string getText() - * @method string getTitle() - * @method string getValue() - * @method boolean getWhetherThisFrameMatchFrameExpression() - * @method boolean getWhetherThisWindowMatchWindowExpression() - * @method integer getXpathCount() - * @method unknown goBack() - * @method unknown goBackAndWait() - * @method unknown highlight() - * @method unknown highlightAndWait() - * @method unknown ignoreAttributesWithoutValue() - * @method unknown ignoreAttributesWithoutValueAndWait() - * @method boolean isAlertPresent() - * @method boolean isChecked() - * @method boolean isConfirmationPresent() - * @method boolean isCookiePresent() - * @method boolean isEditable() - * @method boolean isElementPresent() - * @method boolean isOrdered() - * @method boolean isPromptPresent() - * @method boolean isSomethingSelected() - * @method boolean isTextPresent() - * @method boolean isVisible() - * @method unknown keyDown() - * @method unknown keyDownAndWait() - * @method unknown keyDownNative() - * @method unknown keyDownNativeAndWait() - * @method unknown keyPress() - * @method unknown keyPressAndWait() - * @method unknown keyPressNative() - * @method unknown keyPressNativeAndWait() - * @method unknown keyUp() - * @method unknown keyUpAndWait() - * @method unknown keyUpNative() - * @method unknown keyUpNativeAndWait() - * @method unknown metaKeyDown() - * @method unknown metaKeyDownAndWait() - * @method unknown metaKeyUp() - * @method unknown metaKeyUpAndWait() - * @method unknown mouseDown() - * @method unknown mouseDownAndWait() - * @method unknown mouseDownAt() - * @method unknown mouseDownAtAndWait() - * @method unknown mouseMove() - * @method unknown mouseMoveAndWait() - * @method unknown mouseMoveAt() - * @method unknown mouseMoveAtAndWait() - * @method unknown mouseOut() - * @method unknown mouseOutAndWait() - * @method unknown mouseOver() - * @method unknown mouseOverAndWait() - * @method unknown mouseUp() - * @method unknown mouseUpAndWait() - * @method unknown mouseUpAt() - * @method unknown mouseUpAtAndWait() - * @method unknown mouseUpRight() - * @method unknown mouseUpRightAndWait() - * @method unknown mouseUpRightAt() - * @method unknown mouseUpRightAtAndWait() - * @method unknown open() - * @method unknown openWindow() - * @method unknown openWindowAndWait() - * @method unknown pause() - * @method unknown refresh() - * @method unknown refreshAndWait() - * @method unknown removeAllSelections() - * @method unknown removeAllSelectionsAndWait() - * @method unknown removeScript() - * @method unknown removeScriptAndWait() - * @method unknown removeSelection() - * @method unknown removeSelectionAndWait() - * @method unknown retrieveLastRemoteControlLogs() - * @method unknown rollup() - * @method unknown rollupAndWait() - * @method unknown runScript() - * @method unknown runScriptAndWait() - * @method unknown select() - * @method unknown selectAndWait() - * @method unknown selectFrame() - * @method unknown selectPopUp() - * @method unknown selectPopUpAndWait() - * @method unknown selectWindow() - * @method unknown setBrowserLogLevel() - * @method unknown setBrowserLogLevelAndWait() - * @method unknown setContext() - * @method unknown setCursorPosition() - * @method unknown setCursorPositionAndWait() - * @method unknown setMouseSpeed() - * @method unknown setMouseSpeedAndWait() - * @method unknown setSpeed() - * @method unknown setSpeedAndWait() - * @method unknown shiftKeyDown() - * @method unknown shiftKeyDownAndWait() - * @method unknown shiftKeyUp() - * @method unknown shiftKeyUpAndWait() - * @method unknown shutDownSeleniumServer() - * @method unknown store() - * @method unknown submit() - * @method unknown submitAndWait() - * @method unknown type() - * @method unknown typeAndWait() - * @method unknown typeKeys() - * @method unknown typeKeysAndWait() - * @method unknown uncheck() - * @method unknown uncheckAndWait() - * @method unknown useXpathLibrary() - * @method unknown useXpathLibraryAndWait() - * @method unknown waitForAlert - * @method unknown waitForAlertNotPresent - * @method unknown waitForAlertPresent - * @method unknown waitForAllButtons - * @method unknown waitForAllFields - * @method unknown waitForAllLinks - * @method unknown waitForAllWindowIds - * @method unknown waitForAllWindowNames - * @method unknown waitForAllWindowTitles - * @method unknown waitForAttribute - * @method unknown waitForAttributeFromAllWindows - * @method unknown waitForBodyText - * @method unknown waitForChecked - * @method unknown waitForCondition() - * @method unknown waitForConfirmation - * @method unknown waitForConfirmationNotPresent - * @method unknown waitForConfirmationPresent - * @method unknown waitForCookie - * @method unknown waitForCookieByName - * @method unknown waitForCookieNotPresent - * @method unknown waitForCookiePresent - * @method unknown waitForCssCount - * @method unknown waitForCursorPosition - * @method unknown waitForEditable - * @method unknown waitForElementHeight - * @method unknown waitForElementIndex - * @method unknown waitForElementNotPresent - * @method unknown waitForElementPositionLeft - * @method unknown waitForElementPositionTop - * @method unknown waitForElementPresent - * @method unknown waitForElementWidth - * @method unknown waitForEval - * @method unknown waitForExpression - * @method unknown waitForHtmlSource - * @method unknown waitForLocation - * @method unknown waitForLogMessages - * @method unknown waitForMouseSpeed - * @method unknown waitForNotAlert - * @method unknown waitForNotAllButtons - * @method unknown waitForNotAllFields - * @method unknown waitForNotAllLinks - * @method unknown waitForNotAllWindowIds - * @method unknown waitForNotAllWindowNames - * @method unknown waitForNotAllWindowTitles - * @method unknown waitForNotAttribute - * @method unknown waitForNotAttributeFromAllWindows - * @method unknown waitForNotBodyText - * @method unknown waitForNotChecked - * @method unknown waitForNotConfirmation - * @method unknown waitForNotCookie - * @method unknown waitForNotCookieByName - * @method unknown waitForNotCssCount - * @method unknown waitForNotCursorPosition - * @method unknown waitForNotEditable - * @method unknown waitForNotElementHeight - * @method unknown waitForNotElementIndex - * @method unknown waitForNotElementPositionLeft - * @method unknown waitForNotElementPositionTop - * @method unknown waitForNotElementWidth - * @method unknown waitForNotEval - * @method unknown waitForNotExpression - * @method unknown waitForNotHtmlSource - * @method unknown waitForNotLocation - * @method unknown waitForNotLogMessages - * @method unknown waitForNotMouseSpeed - * @method unknown waitForNotOrdered - * @method unknown waitForNotPrompt - * @method unknown waitForNotSelectOptions - * @method unknown waitForNotSelectedId - * @method unknown waitForNotSelectedIds - * @method unknown waitForNotSelectedIndex - * @method unknown waitForNotSelectedIndexes - * @method unknown waitForNotSelectedLabel - * @method unknown waitForNotSelectedLabels - * @method unknown waitForNotSelectedValue - * @method unknown waitForNotSelectedValues - * @method unknown waitForNotSomethingSelected - * @method unknown waitForNotSpeed - * @method unknown waitForNotSpeedAndWait - * @method unknown waitForNotTable - * @method unknown waitForNotText - * @method unknown waitForNotTitle - * @method unknown waitForNotValue - * @method unknown waitForNotVisible - * @method unknown waitForNotWhetherThisFrameMatchFrameExpression - * @method unknown waitForNotWhetherThisWindowMatchWindowExpression - * @method unknown waitForNotXpathCount - * @method unknown waitForOrdered - * @method unknown waitForPageToLoad() - * @method unknown waitForPopUp() - * @method unknown waitForPrompt - * @method unknown waitForPromptNotPresent - * @method unknown waitForPromptPresent - * @method unknown waitForSelectOptions - * @method unknown waitForSelectedId - * @method unknown waitForSelectedIds - * @method unknown waitForSelectedIndex - * @method unknown waitForSelectedIndexes - * @method unknown waitForSelectedLabel - * @method unknown waitForSelectedLabels - * @method unknown waitForSelectedValue - * @method unknown waitForSelectedValues - * @method unknown waitForSomethingSelected - * @method unknown waitForSpeed - * @method unknown waitForSpeedAndWait - * @method unknown waitForTable - * @method unknown waitForText - * @method unknown waitForTextNotPresent - * @method unknown waitForTextPresent - * @method unknown waitForTitle - * @method unknown waitForValue - * @method unknown waitForVisible - * @method unknown waitForWhetherThisFrameMatchFrameExpression - * @method unknown waitForWhetherThisWindowMatchWindowExpression - * @method unknown waitForXpathCount - * @method unknown windowFocus() - * @method unknown windowMaximize() - */ -abstract class PHPUnit_Extensions_SeleniumTestCase extends PHPUnit_Framework_TestCase -{ - /** - * @var array - */ - public static $browsers = array(); - - /** - * @var string - */ - protected $browserName; - - /** - * @var boolean - */ - protected $collectCodeCoverageInformation = FALSE; - - /** - * @var string - */ - protected $coverageScriptUrl = ''; - - /** - * @var PHPUnit_Extensions_SeleniumTestCase_Driver[] - */ - protected $drivers = array(); - - /** - * @var boolean - */ - protected $inDefaultAssertions = FALSE; - - /** - * @var string - */ - protected $testId; - - /** - * @var array - * @access protected - */ - protected $verificationErrors = array(); - - /** - * @var boolean - */ - protected $captureScreenshotOnFailure = FALSE; - - /** - * @var string - */ - protected $screenshotPath = ''; - - /** - * @var string - */ - protected $screenshotUrl = ''; - - /** - * @var integer the number of seconds to wait before declaring - * the Selenium server not reachable - */ - protected $serverConnectionTimeOut = 10; - - /** - * @var boolean - */ - private $serverRunning; - - /** - * @var boolean - */ - private static $shareSession; - - /** - * The last sessionId used for running a test. - * @var string - */ - private static $sessionId; - - /** - * @param boolean - */ - public static function shareSession($shareSession) - { - self::$shareSession = $shareSession; - } - - /** - * @param string $name - * @param array $data - * @param string $dataName - * @param array $browser - * @throws InvalidArgumentException - */ - public function __construct($name = NULL, array $data = array(), $dataName = '') - { - parent::__construct($name, $data, $dataName); - $this->testId = md5(uniqid(rand(), TRUE)); - $this->getDriver(array()); - } - - public function setupSpecificBrowser(array $browser) - { - $this->getDriver($browser); - } - - /** - * Stops any shared session still open at the end of the current - * PHPUnit process. - */ - public function __destruct() - { - $this->stopSession(); - } - - /** - * @param string $className - * @return PHPUnit_Framework_TestSuite - */ - public static function suite($className) - { - return PHPUnit_Extensions_SeleniumTestSuite::fromTestCaseClass($className); - } - - /** - * Runs the test case and collects the results in a TestResult object. - * If no TestResult object is passed a new one will be created. - * - * @param PHPUnit_Framework_TestResult $result - * @return PHPUnit_Framework_TestResult - * @throws InvalidArgumentException - */ - public function run(PHPUnit_Framework_TestResult $result = NULL) - { - if ($result === NULL) { - $result = $this->createResult(); - } - - $this->collectCodeCoverageInformation = $result->getCollectCodeCoverageInformation(); - - foreach ($this->drivers as $driver) { - $driver->setCollectCodeCoverageInformation( - $this->collectCodeCoverageInformation - ); - } - - parent::run($result); - - if ($this->collectCodeCoverageInformation) { - $result->getCodeCoverage()->append( - $this->getCodeCoverage(), $this - ); - } - - return $result; - } - - /** - * @param array $browser - * @return PHPUnit_Extensions_SeleniumTestCase_Driver - */ - protected function getDriver(array $browser) - { - if (isset($browser['name'])) { - if (!is_string($browser['name'])) { - throw new InvalidArgumentException( - 'Array element "name" is no string.' - ); - } - } else { - $browser['name'] = ''; - } - - if (isset($browser['browser'])) { - if (!is_string($browser['browser'])) { - throw new InvalidArgumentException( - 'Array element "browser" is no string.' - ); - } - } else { - $browser['browser'] = ''; - } - - if (isset($browser['host'])) { - if (!is_string($browser['host'])) { - throw new InvalidArgumentException( - 'Array element "host" is no string.' - ); - } - } else { - $browser['host'] = 'localhost'; - } - - if (isset($browser['port'])) { - if (!is_int($browser['port'])) { - throw new InvalidArgumentException( - 'Array element "port" is no integer.' - ); - } - } else { - $browser['port'] = 4444; - } - - if (isset($browser['timeout'])) { - if (!is_int($browser['timeout'])) { - throw new InvalidArgumentException( - 'Array element "timeout" is no integer.' - ); - } - } else { - $browser['timeout'] = 30; - } - - if (isset($browser['httpTimeout'])) { - if (!is_int($browser['httpTimeout'])) { - throw new InvalidArgumentException( - 'Array element "httpTimeout" is no integer.' - ); - } - } else { - $browser['httpTimeout'] = 45; - } - - $driver = new PHPUnit_Extensions_SeleniumTestCase_Driver; - $driver->setName($browser['name']); - $driver->setBrowser($browser['browser']); - $driver->setHost($browser['host']); - $driver->setPort($browser['port']); - $driver->setTimeout($browser['timeout']); - $driver->setHttpTimeout($browser['httpTimeout']); - $driver->setTestCase($this); - $driver->setTestId($this->testId); - - $this->drivers[0] = $driver; - - return $driver; - } - - public function skipWithNoServerRunning() - { - try { - fsockopen($this->drivers[0]->getHost(), $this->drivers[0]->getPort(), $errno, $errstr, $this->serverConnectionTimeOut); - $this->serverRunning = TRUE; - } catch (PHPUnit_Framework_Error_Warning $e) { - $this->markTestSkipped( - sprintf( - 'Could not connect to the Selenium Server on %s:%d.', - $this->drivers[0]->getHost(), - $this->drivers[0]->getPort() - ) - ); - $this->serverRunning = FALSE; - } - } - - /** - * @return string - */ - protected function prepareTestSession() - { - $testCaseClassVars = get_class_vars(get_class($this)); - if ($testCaseClassVars['browsers']) { - return $this->start(); - } - if (self::$shareSession && self::$sessionId !== NULL) { - $this->setSessionId(self::$sessionId); - $this->selectWindow('null'); - } else { - self::$sessionId = $this->start(); - } - - return self::$sessionId; - } - - /** - * @throws RuntimeException - */ - protected function runTest() - { - $this->skipWithNoServerRunning(); - - $this->prepareTestSession(); - - if (!is_file($this->getName(FALSE))) { - $result = parent::runTest(); - } else { - $this->runSelenese($this->getName(FALSE)); - $result = NULL; - } - - if (!empty($this->verificationErrors)) { - $this->fail(implode("\n", $this->verificationErrors)); - } - - if (!self::$shareSession) { - $this->stopSession(); - } - - return $result; - } - - private function stopSession() - { - try { - $this->stop(); - } catch (RuntimeException $e) { } - } - - /** - * Returns a string representation of the test case. - * - * @return string - */ - public function toString() - { - $buffer = parent::toString(); - - if (!empty($this->browserName)) { - $buffer .= ' with browser ' . $this->browserName; - } - - return $buffer; - } - - /** - * Runs a test from a Selenese (HTML) specification. - * - * @param string $filename - */ - public function runSelenese($filename) - { - $document = PHPUnit_Util_XML::loadFile($filename, TRUE); - $xpath = new DOMXPath($document); - $rows = $xpath->query('body/table/tbody/tr'); - - foreach ($rows as $row) { - $action = NULL; - $arguments = array(); - $columns = $xpath->query('td', $row); - - foreach ($columns as $column) { - if ($action === NULL) { - $action = PHPUnit_Util_XML::nodeToText($column); - } else { - $arguments[] = PHPUnit_Util_XML::nodeToText($column); - } - } - - if (method_exists($this, $action)) { - call_user_func_array(array($this, $action), $arguments); - } else { - $this->__call($action, $arguments); - } - } - } - - /** - * Delegate method calls to the driver. - * - * @param string $command - * @param array $arguments - * @return mixed - */ - public function __call($command, $arguments) - { - $result = call_user_func_array( - array($this->drivers[0], $command), $arguments - ); - - $this->verificationErrors = array_merge( - $this->verificationErrors, $this->drivers[0]->getVerificationErrors() - ); - - $this->drivers[0]->clearVerificationErrors(); - - return $result; - } - - /** - * Asserts that an element's value is equal to a given string. - * - * @param string $locator - * @param string $text - * @param string $message - */ - public function assertElementValueEquals($locator, $text, $message = '') - { - $this->assertEquals($text, $this->getValue($locator), $message); - } - - /** - * Asserts that an element's value is not equal to a given string. - * - * @param string $locator - * @param string $text - * @param string $message - */ - public function assertElementValueNotEquals($locator, $text, $message = '') - { - $this->assertNotEquals($text, $this->getValue($locator), $message); - } - - /** - * Asserts that an element's value contains a given string. - * - * @param string $locator - * @param string $text - * @param string $message - */ - public function assertElementValueContains($locator, $text, $message = '') - { - $this->assertContains($text, $this->getValue($locator), $message); - } - - /** - * Asserts that an element's value does not contain a given string. - * - * @param string $locator - * @param string $text - * @param string $message - */ - public function assertElementValueNotContains($locator, $text, $message = '') - { - $this->assertNotContains($text, $this->getValue($locator), $message); - } - - /** - * Asserts that an element contains a given string. - * - * @param string $locator - * @param string $text - * @param string $message - */ - public function assertElementContainsText($locator, $text, $message = '') - { - $this->assertContains($text, $this->getText($locator), $message); - } - - /** - * Asserts that an element does not contain a given string. - * - * @param string $locator - * @param string $text - * @param string $message - */ - public function assertElementNotContainsText($locator, $text, $message = '') - { - $this->assertNotContains($text, $this->getText($locator), $message); - } - - /** - * Asserts that a select element has a specific option. - * - * @param string $selectLocator - * @param string $option - * @param string $message - */ - public function assertSelectHasOption($selectLocator, $option, $message = '') - { - $this->assertContains($option, $this->getSelectOptions($selectLocator), $message); - } - - /** - * Asserts that a select element does not have a specific option. - * - * @param string $selectLocator - * @param string $option - * @param string $message - */ - public function assertSelectNotHasOption($selectLocator, $option, $message = '') - { - $this->assertNotContains($option, $this->getSelectOptions($selectLocator), $message); - } - - /** - * Asserts that a specific label is selected. - * - * @param string $selectLocator - * @param string $value - * @param string $message - */ - public function assertSelected($selectLocator, $option, $message = '') - { - if ($message == '') { - $message = sprintf( - 'Label "%s" not selected in "%s".', - $option, - $selectLocator - ); - } - - $this->assertEquals( - $option, - $this->getSelectedLabel($selectLocator), - $message - ); - } - - /** - * Asserts that a specific label is not selected. - * - * @param string $selectLocator - * @param string $value - * @param string $message - */ - public function assertNotSelected($selectLocator, $option, $message = '') - { - if ($message == '') { - $message = sprintf( - 'Label "%s" selected in "%s".', - $option, - $selectLocator - ); - } - - $this->assertNotEquals( - $option, - $this->getSelectedLabel($selectLocator), - $message - ); - } - - /** - * Asserts that a specific value is selected. - * - * @param string $selectLocator - * @param string $value - * @param string $message - */ - public function assertIsSelected($selectLocator, $value, $message = '') - { - if ($message == '') { - $message = sprintf( - 'Value "%s" not selected in "%s".', - $value, - $selectLocator - ); - } - - $this->assertEquals( - $value, $this->getSelectedValue($selectLocator), - $message - ); - } - - /** - * Asserts that a specific value is not selected. - * - * @param string $selectLocator - * @param string $value - * @param string $message - */ - public function assertIsNotSelected($selectLocator, $value, $message = '') - { - if ($message == '') { - $message = sprintf( - 'Value "%s" selected in "%s".', - $value, - $selectLocator - ); - } - - $this->assertNotEquals( - $value, - $this->getSelectedValue($selectLocator), - $message - ); - } - - /** - * Template Method that is called after Selenium actions. - * - * @param string $action - */ - protected function defaultAssertions($action) - { - } - - /** - * @return array - */ - protected function getCodeCoverage() - { - $coverage = new PHPUnit_Extensions_SeleniumCommon_RemoteCoverage( - $this->coverageScriptUrl, - $this->testId - ); - return $coverage->get(); - } - - /** - * @param string $action - */ - public function runDefaultAssertions($action) - { - if (!$this->inDefaultAssertions) { - $this->inDefaultAssertions = TRUE; - $this->defaultAssertions($action); - $this->inDefaultAssertions = FALSE; - } - } - - /** - * This method is called when a test method did not execute successfully. - * - * @param Exception $e - */ - protected function onNotSuccessfulTest(Exception $e) - { - if (!$this->serverRunning) { - throw $e; - } - - try { - $this->restoreSessionStateAfterFailedTest(); - $buffer = ''; - - if ($this->captureScreenshotOnFailure) { - $buffer .= 'Current URL: ' . $this->drivers[0]->getLocation() . - "\n"; - - $screenshotInfo = $this->takeScreenshot(); - if ($screenshotInfo != '') { - $buffer .= $screenshotInfo; - } - } - - $this->stopSession(); - } catch (Exception $another) { - $buffer = "Issues while capturing the screenshot:\n" . $another->getMessage(); - } - - if ($e instanceof PHPUnit_Framework_ExpectationFailedException - && is_object($e->getComparisonFailure())) { - $message = $e->getComparisonFailure()->toString(); - } else { - $message = $e->getMessage(); - } - - $buffer .= "\n" . $message; - - // gain the screenshot path, lose the stack trace - if ($this->captureScreenshotOnFailure) { - throw new PHPUnit_Framework_Error($buffer, $e->getCode(), $e->getFile(), $e->getLine(), $e); - } - - // yes to stack trace and everything - if ($e instanceof PHPUnit_Framework_IncompleteTestError - || $e instanceof PHPUnit_Framework_SkippedTestError - || $e instanceof PHPUnit_Framework_AssertionFailedError) { - throw $e; - } - - // yes to stack trace, only for F tests - // PHPUnit issue 471 prevents getTrace() from being useful - throw new PHPUnit_Framework_Error($buffer, $e->getCode(), $e->getFile(), $e->getLine(), $e); - } - - private function restoreSessionStateAfterFailedTest() - { - self::$sessionId = NULL; - } - - /** - * Returns correct path to screenshot save path. - * - * @return string - */ - protected function getScreenshotPath() - { - $path = $this->screenshotPath; - - if (!in_array(substr($path, strlen($path) -1, 1), array("/","\\"))) { - $path .= DIRECTORY_SEPARATOR; - } - - return $path; - } - - /** - * Take a screenshot and return information about it. - * Return an empty string if the screenshotPath and screenshotUrl - * properties are empty. - * Issue #88. - * - * @access protected - * @return string - */ - protected function takeScreenshot() - { - if (!empty($this->screenshotPath) && - !empty($this->screenshotUrl)) { - $filename = $this->getScreenshotPath() . $this->testId . '.png'; - - $this->drivers[0]->captureEntirePageScreenshot($filename); - - return 'Screenshot: ' . $this->screenshotUrl . '/' . - $this->testId . ".png\n"; - } else { - return ''; - } - } - - /** - * Pause support for runSelenese() HTML cases - * @param $milliseconds - */ - protected function pause($milliseconds){ - sleep(round($milliseconds/1000)); - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.4 - */ - -/** - * Retrieves the value of a CSS property. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.4 - */ -class PHPUnit_Extensions_Selenium2TestCase_ElementCommand_Css - extends PHPUnit_Extensions_Selenium2TestCase_Command -{ - /** - * @param array $propertyName - */ - public function __construct($propertyName, - PHPUnit_Extensions_Selenium2TestCase_URL $cssResourceBaseUrl) - { - $this->jsonParameters = array(); - $this->url = $cssResourceBaseUrl->descend($propertyName); - } - - public function httpMethod() - { - return 'GET'; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.0 - */ - -/** - * Class for implementing commands that just return a value - * (obtained with GET). - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.0 - */ -class PHPUnit_Extensions_Selenium2TestCase_ElementCommand_GenericAccessor - extends PHPUnit_Extensions_Selenium2TestCase_Command -{ - public function httpMethod() - { - return 'GET'; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.4 - */ - -/** - * Checks equality (same element on the page) with another DOM element. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.4 - */ -class PHPUnit_Extensions_Selenium2TestCase_ElementCommand_Equals - extends PHPUnit_Extensions_Selenium2TestCase_Command -{ - /** - * @param array $parameter - */ - public function __construct($parameter, - PHPUnit_Extensions_Selenium2TestCase_URL $equalsResourceBaseUrl) - { - $this->jsonParameters = array(); - if (!($parameter instanceof PHPUnit_Extensions_Selenium2TestCase_Element)) { - throw new InvalidArgumentException("Elements can only test equality with other Element instances."); - } - $this->url = $equalsResourceBaseUrl->descend($parameter->getId()); - } - - public function httpMethod() - { - return 'GET'; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2012 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.4 - */ - -/** - * Class for implementing commands that just accomplishes an action (via POST). - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2012 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.4 - */ -class PHPUnit_Extensions_Selenium2TestCase_ElementCommand_GenericPost - extends PHPUnit_Extensions_Selenium2TestCase_Command -{ - public function httpMethod() - { - return 'POST'; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.0 - */ - -/** - * Get and set the element's value attribute. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.0 - */ -class PHPUnit_Extensions_Selenium2TestCase_ElementCommand_Value - extends PHPUnit_Extensions_Selenium2TestCase_SessionCommand_Keys -{ - public function httpMethod() - { - if ($this->jsonParameters) { - return 'POST'; - } - - return 'GET'; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.4 - */ - -/** - * Retrieves an attribute of a DOM element. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.4 - */ -class PHPUnit_Extensions_Selenium2TestCase_ElementCommand_Attribute - extends PHPUnit_Extensions_Selenium2TestCase_Command -{ - /** - * @param array $parameter - */ - public function __construct($parameter, - PHPUnit_Extensions_Selenium2TestCase_URL $attributeResourceBaseUrl) - { - $this->jsonParameters = array(); - $this->url = $attributeResourceBaseUrl->descend($parameter); - } - - public function httpMethod() - { - return 'GET'; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.0 - */ - -/** - * Clicks ok on an alert popup. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.0 - */ -class PHPUnit_Extensions_Selenium2TestCase_ElementCommand_Click - extends PHPUnit_Extensions_Selenium2TestCase_Command -{ - public function httpMethod() - { - return 'POST'; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Ivan Kurnosov - * @copyright 2010-2011 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.12 - */ - -/** - * Class-mapper, that converts requested special key into correspondent Unicode character - * - * @package PHPUnit_Selenium - * @author Ivan Kurnosov - * @copyright 2010-2011 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - * @since Class available since Release 1.2.12 - * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value - */ -class PHPUnit_Extensions_Selenium2TestCase_KeysHolder -{ - private $_keys = array( - 'null' => "\xEE\x80\x80", - 'cancel' => "\xEE\x80\x81", - 'help' => "\xEE\x80\x82", - 'backspace' => "\xEE\x80\x83", - 'tab' => "\xEE\x80\x84", - 'clear' => "\xEE\x80\x85", - 'return' => "\xEE\x80\x86", - 'enter' => "\xEE\x80\x87", - 'shift' => "\xEE\x80\x88", - 'control' => "\xEE\x80\x89", - 'alt' => "\xEE\x80\x8A", - 'pause' => "\xEE\x80\x8B", - 'escape' => "\xEE\x80\x8C", - 'space' => "\xEE\x80\x8D", - 'pageup' => "\xEE\x80\x8E", - 'pagedown' => "\xEE\x80\x8F", - 'end' => "\xEE\x80\x90", - 'home' => "\xEE\x80\x91", - 'left' => "\xEE\x80\x92", - 'up' => "\xEE\x80\x93", - 'right' => "\xEE\x80\x94", - 'down' => "\xEE\x80\x95", - 'insert' => "\xEE\x80\x96", - 'delete' => "\xEE\x80\x97", - 'semicolon' => "\xEE\x80\x98", - 'equals' => "\xEE\x80\x99", - 'numpad0' => "\xEE\x80\x9A", - 'numpad1' => "\xEE\x80\x9B", - 'numpad2' => "\xEE\x80\x9C", - 'numpad3' => "\xEE\x80\x9D", - 'numpad4' => "\xEE\x80\x9E", - 'numpad5' => "\xEE\x80\x9F", - 'numpad6' => "\xEE\x80\xA0", - 'numpad7' => "\xEE\x80\xA1", - 'numpad8' => "\xEE\x80\xA2", - 'numpad9' => "\xEE\x80\xA3", - 'multiply' => "\xEE\x80\xA4", - 'add' => "\xEE\x80\xA5", - 'separator' => "\xEE\x80\xA6", - 'subtract' => "\xEE\x80\xA7", - 'decimal' => "\xEE\x80\xA8", - 'divide' => "\xEE\x80\xA9", - 'f1' => "\xEE\x80\xB1", - 'f2' => "\xEE\x80\xB2", - 'f3' => "\xEE\x80\xB3", - 'f4' => "\xEE\x80\xB4", - 'f5' => "\xEE\x80\xB5", - 'f6' => "\xEE\x80\xB6", - 'f7' => "\xEE\x80\xB7", - 'f8' => "\xEE\x80\xB8", - 'f9' => "\xEE\x80\xB9", - 'f10' => "\xEE\x80\xBA", - 'f11' => "\xEE\x80\xBB", - 'f12' => "\xEE\x80\xBC", - 'command' => "\xEE\x80\xBD", - ); - - public function specialKey($name) - { - $normalizedName = strtolower($name); - - if (!isset($this->_keys[$normalizedName])) { - throw new PHPUnit_Extensions_Selenium2TestCase_Exception("There is no special key '$name' defined"); - } - - return $this->_keys[$normalizedName]; - } -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - */ - - -/** - * Provides access to /element and /elements commands - * - * @package PHPUnit_Selenium - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: 1.3.1 - * @link http://www.phpunit.de/ - */ -abstract class PHPUnit_Extensions_Selenium2TestCase_Element_Accessor - extends PHPUnit_Extensions_Selenium2TestCase_CommandsHolder -{ - - /** - * @param string $value e.g. 'container' - * @return PHPUnit_Extensions_Selenium2TestCase_Element - */ - public function byClassName($value) - { - return $this->by('class name', $value); - } - - /** - * @param string $value e.g. 'div.container' - * @return PHPUnit_Extensions_Selenium2TestCase_Element - */ - public function byCssSelector($value) - { - return $this->by('css selector', $value); - } - - /** - * @param string $value e.g. 'uniqueId' - * @return PHPUnit_Extensions_Selenium2TestCase_Element - */ - public function byId($value) - { - return $this->by('id', $value); - } - - /** - * @param string $value e.g. 'Link text' - * @return PHPUnit_Extensions_Selenium2TestCase_Element - */ - public function byLinkText($value) - { - return $this->by('link text', $value); - } - - /** - * @param string $value e.g. 'email_address' - * @return PHPUnit_Extensions_Selenium2TestCase_Element - */ - public function byName($value) - { - return $this->by('name', $value); - } - - /** - * @param string $value e.g. 'body' - * @return PHPUnit_Extensions_Selenium2TestCase_Element - */ - public function byTag($value) - { - return $this->by('tag name', $value); - } - - /** - * @param string $value e.g. '/div[@attribute="value"]' - * @return PHPUnit_Extensions_Selenium2TestCase_Element - */ - public function byXPath($value) - { - return $this->by('xpath', $value); - } - - /** - * @return PHPUnit_Extensions_Selenium2TestCase_Element - */ - public function element(PHPUnit_Extensions_Selenium2TestCase_ElementCriteria $criteria) - { - $value = $this->postCommand('element', $criteria); - return PHPUnit_Extensions_Selenium2TestCase_Element::fromResponseValue( - $value, $this->getSessionUrl()->descend('element'), $this->driver); - } - - /** - * @return array instances of PHPUnit_Extensions_Selenium2TestCase_Element - */ - public function elements(PHPUnit_Extensions_Selenium2TestCase_ElementCriteria $criteria) - { - $values = $this->postCommand('elements', $criteria); - $elements = array(); - foreach ($values as $value) { - $elements[] = - PHPUnit_Extensions_Selenium2TestCase_Element::fromResponseValue( - $value, $this->getSessionUrl()->descend('element'), $this->driver); - } - return $elements; - } - - /** - * @param string $strategy - * @return PHPUnit_Extensions_Selenium2TestCase_ElementCriteria - */ - public function using($strategy) - { - return new PHPUnit_Extensions_Selenium2TestCase_ElementCriteria($strategy); - } - - /** - * @return PHPUnit_Extensions_Selenium2TestCase_URL - */ - protected abstract function getSessionUrl(); - - /** - * @param string $strategy supported by JsonWireProtocol element/ command - * @param string $value - * @return PHPUnit_Extensions_Selenium2TestCase_Element - */ - private function by($strategy, $value) - { - return $this->element($this->using($strategy)->value($value)); - } - -} -. - * 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 Sebastian Bergmann nor the names of his - * 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. - * - * @package PHPUnit_Selenium - * @author Giorgio Sironi - * @copyright 2010-2013 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.phpunit.de/ - * @since File available since Release 1.2.2 - */ - -/** - * Object representing a ",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="
t
",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; -return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="
",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) -}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("