diff --git a/com.piece_framework.makegood.stagehandtestrunner/.gitignore b/com.piece_framework.makegood.stagehandtestrunner/.gitignore index 09e3bc9b..f33995c7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/.gitignore +++ b/com.piece_framework.makegood.stagehandtestrunner/.gitignore @@ -1,2 +1,3 @@ /bin/ /target/ +/resources/php/.configsnapshots/* diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/.config b/com.piece_framework.makegood.stagehandtestrunner/resources/php/.config index 0ec0562e..91d9cba3 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/.config +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/.config @@ -1,2 +1,2 @@ -/usr/lib/php5/20090626resources/php/cfgresources/php/docsresources/php/binresources/php/wwwresources/php/testsresources/php/src/usr/bin/php +/usr/lib/php5/20100525resources/php/cfgresources/php/docsresources/php/binresources/php/wwwresources/php/testsresources/php/src/usr/bin/php/home/iteman/site-php/config/5.4/php-cli.ini diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/.configsnapshots/configsnapshot-2012-04-17 16-27-14.xml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/.configsnapshots/configsnapshot-2012-04-17 16-27-14.xml deleted file mode 100644 index d1ce1a41..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/.configsnapshots/configsnapshot-2012-04-17 16-27-14.xml +++ /dev/null @@ -1,2 +0,0 @@ - -resources/php/php/usr/lib/php5/20090626resources/php/cfgresources/php/docsresources/php/binresources/php/dataresources/php/wwwresources/php/testsresources/php/src/usr/bin/php/home/iteman/site-php/config/xdebug/php-cli.ini diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/.configsnapshots/configsnapshot-2012-04-17 16-31-24.xml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/.configsnapshots/configsnapshot-2012-04-17 16-31-24.xml deleted file mode 100644 index a1f1888a..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/.configsnapshots/configsnapshot-2012-04-17 16-31-24.xml +++ /dev/null @@ -1,2 +0,0 @@ - -resources/php/php/usr/lib/php5/20090626resources/php/cfgresources/php/docsresources/php/binresources/php/dataresources/php/wwwresources/php/testsresources/php/src/usr/bin/php diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/.configsnapshots/configsnapshot-2012-09-21 14-03-25.xml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/.configsnapshots/configsnapshot-2012-09-21 14-03-25.xml deleted file mode 100644 index d45afdf9..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/.configsnapshots/configsnapshot-2012-09-21 14-03-25.xml +++ /dev/null @@ -1,2 +0,0 @@ - -/home/iteman/GITREPOS/piece/makegood/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/usr/lib/php5/20090626resources/php/cfgresources/php/docsresources/php/bin/home/iteman/GITREPOS/piece/makegood/com.piece_framework.makegood.stagehandtestrunner/resources/php/dataresources/php/wwwresources/php/testsresources/php/src/usr/bin/php diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/.pear2registry b/com.piece_framework.makegood.stagehandtestrunner/resources/php/.pear2registry index 1be2cbca..0ab21a28 100644 Binary files a/com.piece_framework.makegood.stagehandtestrunner/resources/php/.pear2registry and b/com.piece_framework.makegood.stagehandtestrunner/resources/php/.pear2registry differ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/bin/testrunner b/com.piece_framework.makegood.stagehandtestrunner/resources/php/bin/testrunner index fe4c57e6..4f304b57 100755 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/bin/testrunner +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/bin/testrunner @@ -32,7 +32,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/bin/testrunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/bin/testrunner.php index fe4c57e6..4f304b57 100755 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/bin/testrunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/bin/testrunner.php @@ -32,7 +32,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/LICENSE index cdffe7ae..88a57f8d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/LICENSE +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2012 Fabien Potencier +Copyright (c) 2004-2013 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/README.md index 64dffe9a..5ac31c64 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/README.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/README.md @@ -64,9 +64,6 @@ Resources You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/ClassLoader/ + $ composer.phar install --dev + $ phpunit diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/composer.json b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/composer.json index ccd9ba9b..57f2f340 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/composer.json +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/ClassLoader/Symfony/Component/ClassLoader/composer.json @@ -20,16 +20,15 @@ "php": ">=5.3.3" }, "require-dev": { - "symfony/finder": "2.1.*" + "symfony/finder": "~2.0" }, "autoload": { - "psr-0": { "Symfony\\Component\\ClassLoader": "" } + "psr-0": { "Symfony\\Component\\ClassLoader\\": "" } }, "target-dir": "Symfony/Component/ClassLoader", - "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/LICENSE index cdffe7ae..88a57f8d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/LICENSE +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2012 Fabien Potencier +Copyright (c) 2004-2013 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/README.md index e87363df..c7865b38 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/README.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/README.md @@ -11,4 +11,7 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Config/ + $ composer.phar install --dev + $ phpunit + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/composer.json b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/composer.json index 7d809454..e148c27c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/composer.json +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Config/Symfony/Component/Config/composer.json @@ -19,13 +19,13 @@ "php": ">=5.3.3" }, "autoload": { - "psr-0": { "Symfony\\Component\\Config": "" } + "psr-0": { "Symfony\\Component\\Config\\": "" } }, "target-dir": "Symfony/Component/Config", "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/LICENSE index cdffe7ae..88a57f8d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/LICENSE +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2012 Fabien Potencier +Copyright (c) 2004-2013 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/README.md index d8179521..fbf05fc8 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/README.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/README.md @@ -41,11 +41,19 @@ output abstractions (so that you can easily unit-test your commands), validation, automatic help messages, ... Tests ---------- +----- You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Console/ + $ composer.phar install --dev + $ phpunit + +Third Party +----------- + +`Resources/bin/hiddeninput.exe` is a third party binary provided within this +component. Find sources and license at https://github.com/Seldaek/hidden-input. Resources --------- diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/composer.json b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/composer.json index 4488bf60..33696815 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/composer.json +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Console/Symfony/Component/Console/composer.json @@ -19,13 +19,13 @@ "php": ">=5.3.3" }, "autoload": { - "psr-0": { "Symfony\\Component\\Console": "" } + "psr-0": { "Symfony\\Component\\Console\\": "" } }, "target-dir": "Symfony/Component/Console", "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/LICENSE index cdffe7ae..88a57f8d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/LICENSE +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2012 Fabien Potencier +Copyright (c) 2004-2013 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/README.md index 5cb62cf1..ab675952 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/README.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/README.md @@ -68,9 +68,6 @@ Resources You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/DependencyInjection/ + $ composer.phar install --dev + $ phpunit diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/composer.json b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/composer.json index de7ad5dd..33357d3a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/composer.json +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/DependencyInjection/Symfony/Component/DependencyInjection/composer.json @@ -19,21 +19,21 @@ "php": ">=5.3.3" }, "require-dev": { - "symfony/yaml": "2.1.*", - "symfony/config": "2.1.*" + "symfony/yaml": "~2.0", + "symfony/config": ">=2.2,<2.3-dev" }, "suggest": { - "symfony/yaml": "2.1.*", - "symfony/config": "2.1.*" + "symfony/yaml": "2.2.*", + "symfony/config": "2.2.*" }, "autoload": { - "psr-0": { "Symfony\\Component\\DependencyInjection": "" } + "psr-0": { "Symfony\\Component\\DependencyInjection\\": "" } }, "target-dir": "Symfony/Component/DependencyInjection", "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/LICENSE index cdffe7ae..88a57f8d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/LICENSE +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2012 Fabien Potencier +Copyright (c) 2004-2013 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/README.md index 0c4516f7..a4caf93b 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/README.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/README.md @@ -35,4 +35,7 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Finder/ + $ composer.phar install --dev + $ phpunit + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/composer.json b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/composer.json index aeac80ea..2ad5b34c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/composer.json +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Finder/Symfony/Component/Finder/composer.json @@ -19,13 +19,13 @@ "php": ">=5.3.3" }, "autoload": { - "psr-0": { "Symfony\\Component\\Finder": "" } + "psr-0": { "Symfony\\Component\\Finder\\": "" } }, "target-dir": "Symfony/Component/Finder", "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/LICENSE index cdffe7ae..88a57f8d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/LICENSE +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2012 Fabien Potencier +Copyright (c) 2004-2013 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/README.md index 2a8a4f76..7b9f3075 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/README.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/README.md @@ -42,4 +42,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/XXX/ + $ composer.phar install --dev + $ phpunit diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/composer.json b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/composer.json index a9f85f1a..1681ef6c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/composer.json +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Process/Symfony/Component/Process/composer.json @@ -19,13 +19,13 @@ "php": ">=5.3.3" }, "autoload": { - "psr-0": { "Symfony\\Component\\Process": "" } + "psr-0": { "Symfony\\Component\\Process\\": "" } }, "target-dir": "Symfony/Component/Process", "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/LICENSE index cdffe7ae..88a57f8d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/LICENSE +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2012 Fabien Potencier +Copyright (c) 2004-2013 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/README.md index 34413166..0864e49d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/README.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/README.md @@ -14,4 +14,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Yaml/ + $ composer.phar install --dev + $ phpunit diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/composer.json b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/composer.json index 88460ce3..e04dabf3 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/composer.json +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/docs/Yaml/Symfony/Component/Yaml/composer.json @@ -19,13 +19,13 @@ "php": ">=5.3.3" }, "autoload": { - "psr-0": { "Symfony\\Component\\Yaml": "" } + "psr-0": { "Symfony\\Component\\Yaml\\": "" } }, "target-dir": "Symfony/Component/Yaml", "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/Terminal.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/Terminal.php index 9b820eb1..28c728d6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/Terminal.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/Terminal.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class Terminal diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Application.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Application.php index c09dbb1e..8179de77 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Application.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Application.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -49,7 +49,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class Application extends \Symfony\Component\Console\Application @@ -62,7 +62,7 @@ class Application extends \Symfony\Component\Console\Application public function __construct() { $this->commandRepository = new CommandRepository(); - parent::__construct('Stagehand_TestRunner', '3.6.0'); + parent::__construct('Stagehand_TestRunner', '3.6.1'); $this->setAutoExit(false); // For compatibility with Symfony 2.0 diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CIUnitCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CIUnitCommand.php index 28c9b0de..4685c07a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CIUnitCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CIUnitCommand.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -50,7 +50,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CIUnitCommand extends PHPUnitCommand diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CakePHPCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CakePHPCommand.php index a2b0c476..1aa2b0bb 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CakePHPCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CakePHPCommand.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -50,7 +50,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CakePHPCommand extends SimpleTestCommand diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/Command.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/Command.php index bb1099be..751476d7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/Command.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/Command.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ abstract class Command extends \Symfony\Component\Console\Command\Command diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CommandRepository.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CommandRepository.php index bc57e995..066c3c45 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CommandRepository.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CommandRepository.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CommandRepository diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CompileCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CompileCommand.php index 22db1d42..fc8c127a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CompileCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/CompileCommand.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -46,7 +46,7 @@ * @package Stagehand_TestRunner * @copyright 2012-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CompileCommand extends Command diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/HelpCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/HelpCommand.php index bb250a7f..0b032844 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/HelpCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/HelpCommand.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class HelpCommand extends Command diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/ListCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/ListCommand.php index 84926eaa..1e9ca4a5 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/ListCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/ListCommand.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class ListCommand extends Command diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPSpecCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPSpecCommand.php index d3f7a781..ae966599 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPSpecCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPSpecCommand.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -48,7 +48,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPSpecCommand extends PluginCommand diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitCommand.php index 9d4a5a92..4f4cd90e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitCommand.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -50,7 +50,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPUnitCommand extends PluginCommand diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand.php index 22a89f0d..4384faa2 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -51,7 +51,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ class PHPUnitPassthroughCommand extends Command diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand/Command.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand/Command.php index 3f2e112b..981f6d01 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand/Command.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand/Command.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ class Command extends \PHPUnit_TextUI_Command diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand/TestRunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand/TestRunner.php index 840cc223..5bdf237d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand/TestRunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PHPUnitPassthroughCommand/TestRunner.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ class TestRunner extends \PHPUnit_TextUI_TestRunner diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PluginCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PluginCommand.php index e46bca15..c0125c87 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PluginCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/PluginCommand.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -53,7 +53,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ abstract class PluginCommand extends Command diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/SimpleTestCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/SimpleTestCommand.php index f84e19f3..7bd7f878 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/SimpleTestCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/CLI/TestRunnerApplication/Command/SimpleTestCommand.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -48,7 +48,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class SimpleTestCommand extends PluginCommand diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CIUnitCollector.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CIUnitCollector.php index 14f128e7..6912a5eb 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CIUnitCollector.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CIUnitCollector.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since File available since Release 2.16.0 */ @@ -42,7 +42,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since Class available since Release 2.16.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CakePHPCollector.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CakePHPCollector.php index 75bd1838..b150efaf 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CakePHPCollector.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CakePHPCollector.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class CakePHPCollector extends SimpleTestCollector diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CollectingType.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CollectingType.php index 52cd5f90..c40b4d65 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CollectingType.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CollectingType.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.20.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.20.0 */ class CollectingType diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CollectingTypeFactory.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CollectingTypeFactory.php index 1c8fab96..176519d6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CollectingTypeFactory.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/CollectingTypeFactory.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CollectingTypeFactory extends ComponentAwareFactory diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/Collector.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/Collector.php index bf781f58..29523e79 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/Collector.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/Collector.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.1.0 */ @@ -50,7 +50,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.1.0 */ abstract class Collector @@ -111,8 +111,9 @@ public function collect() { $self = $this; $fileSystem = new FileSystem(); - $this->testTargetRepository->walkOnResources(function ($resource, $index, TestTargetRepository $testTargetRepository) use ($self, $fileSystem) { - $absoluteTargetPath = $fileSystem->getAbsolutePath($resource, $this->environment->getWorkingDirectoryAtStartup()); + $environment = $this->environment; + $this->testTargetRepository->walkOnResources(function ($resource, $index, TestTargetRepository $testTargetRepository) use ($self, $fileSystem, $environment) { + $absoluteTargetPath = $fileSystem->getAbsolutePath($resource, $environment->getWorkingDirectoryAtStartup()); if (!file_exists($absoluteTargetPath)) { throw new \UnexpectedValueException(sprintf('The directory or file [ %s ] is not found', $absoluteTargetPath)); } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/PHPSpecCollector.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/PHPSpecCollector.php index 0218cbca..fe34059b 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/PHPSpecCollector.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/PHPSpecCollector.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpspec.org/ * @since File available since Release 2.1.0 */ @@ -46,7 +46,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpspec.org/ * @since Class available since Release 2.1.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/PHPUnitCollector.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/PHPUnitCollector.php index 2c9cb856..c43767e5 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/PHPUnitCollector.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/PHPUnitCollector.php @@ -33,7 +33,7 @@ * @copyright 2007-2013 KUBO Atsuhiro * @copyright 2012 tsyk goto * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since File available since Release 2.1.0 */ @@ -51,7 +51,7 @@ * @copyright 2007-2013 KUBO Atsuhiro * @copyright 2012 tsyk goto * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since Class available since Release 2.1.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/SimpleTestCollector.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/SimpleTestCollector.php index bea33eb2..5e6b92e1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/SimpleTestCollector.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Collector/SimpleTestCollector.php @@ -33,7 +33,7 @@ * @copyright 2007 Masahiko Sakamoto * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since File available since Release 2.1.0 */ @@ -47,7 +47,7 @@ * @copyright 2007 Masahiko Sakamoto * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since Class available since Release 2.1.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/ApplicationContext.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/ApplicationContext.php index 92aa4316..53ef312f 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/ApplicationContext.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/ApplicationContext.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class ApplicationContext diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Bootstrap.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Bootstrap.php index fc5b5671..9585a222 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Bootstrap.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Bootstrap.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class Bootstrap diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/CIUnitConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/CIUnitConfiguration.php deleted file mode 100644 index 3dbcc3ac..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/CIUnitConfiguration.php +++ /dev/null @@ -1,82 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Configuration; - -use Symfony\Component\Config\Definition\Builder\NodeBuilder; - -use Stagehand\TestRunner\Core\Plugin\CIUnitPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class CIUnitConfiguration extends PHPUnitConfiguration -{ - public static function getConfigurationID() - { - return strtolower(CIUnitPlugin::getPluginID()); - } - - /** - * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder - */ - protected function defineGrammar(NodeBuilder $nodeBuilder) - { - parent::defineGrammar($nodeBuilder); - $nodeBuilder - ->scalarNode('ciunit_path') - ->defaultNull() - ->cannotBeEmpty() - ->end() - ; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/CakePHPConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/CakePHPConfiguration.php deleted file mode 100644 index 3e3e1239..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/CakePHPConfiguration.php +++ /dev/null @@ -1,86 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Configuration; - -use Symfony\Component\Config\Definition\Builder\NodeBuilder; - -use Stagehand\TestRunner\Core\Plugin\CakePHPPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class CakePHPConfiguration extends SimpleTestConfiguration -{ - public static function getConfigurationID() - { - return strtolower(CakePHPPlugin::getPluginID()); - } - - /** - * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder - */ - protected function defineGrammar(NodeBuilder $nodeBuilder) - { - parent::defineGrammar($nodeBuilder); - $nodeBuilder - ->scalarNode('app_path') - ->defaultNull() - ->cannotBeEmpty() - ->end() - ->scalarNode('core_path') - ->defaultNull() - ->cannotBeEmpty() - ->end() - ; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/Configuration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/Configuration.php deleted file mode 100644 index d4d5f48a..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/Configuration.php +++ /dev/null @@ -1,74 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Configuration; - -use Symfony\Component\Config\Definition\Builder\NodeBuilder; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; - -/** - * @package Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -abstract class Configuration implements IConfiguration -{ - public function getConfigTreeBuilder() - { - $treeBuilder = new TreeBuilder(); - $this->defineGrammar($treeBuilder->root($this->getConfigurationID())->children()); - return $treeBuilder; - } - - /** - * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder - */ - abstract protected function defineGrammar(NodeBuilder $nodeBuilder); -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/GeneralConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/GeneralConfiguration.php deleted file mode 100644 index e4ee0c7f..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/GeneralConfiguration.php +++ /dev/null @@ -1,160 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Configuration; - -use Symfony\Component\Config\Definition\Builder\NodeBuilder; - -use Stagehand\TestRunner\Core\ApplicationContext; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class GeneralConfiguration extends Configuration -{ - /** - * @var string - */ - private static $CONFIGURATION_ID = 'general'; - - public static function getConfigurationID() - { - return self::$CONFIGURATION_ID; - } - - /** - * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder - */ - protected function defineGrammar(NodeBuilder $nodeBuilder) - { - $nodeBuilder - ->scalarNode('framework') // This element is just a label for YAML-based configuration. - ->end() - ->arrayNode('test_targets') - ->addDefaultsIfNotSet() - ->children() - ->arrayNode('resources') - ->defaultValue(array(ApplicationContext::getInstance()->getEnvironment()->getWorkingDirectoryAtStartup())) - ->validate() - ->ifTrue(function ($v) { return count($v) == 0; }) - ->then(function ($v) { return array(ApplicationContext::getInstance()->getEnvironment()->getWorkingDirectoryAtStartup()); }) - ->end() - ->prototype('scalar') - ->cannotBeEmpty() - ->end() - ->end() - ->booleanNode('recursive') - ->defaultFalse() - ->end() - ->arrayNode('methods') - ->defaultValue(array()) - ->prototype('scalar') - ->cannotBeEmpty() - ->end() - ->end() - ->arrayNode('classes') - ->defaultValue(array()) - ->prototype('scalar') - ->cannotBeEmpty() - ->end() - ->end() - ->scalarNode('file_pattern') - ->defaultNull() - ->cannotBeEmpty() - ->end() - ->end() - ->end() - ->arrayNode('autotest') - ->addDefaultsIfNotSet() - ->treatNullLike(array('enabled' => true)) - ->treatTrueLike(array('enabled' => true)) - ->treatFalseLike(array('enabled' => false)) - ->children() - ->booleanNode('enabled') - ->defaultFalse() - ->end() - ->arrayNode('watch_dirs') - ->defaultValue(array()) - ->prototype('scalar') - ->cannotBeEmpty() - ->end() - ->end() - ->end() - ->end() - ->booleanNode('notify') - ->defaultFalse() - ->end() - ->arrayNode('junit_xml') - ->addDefaultsIfNotSet() - ->beforeNormalization() - ->ifString() - ->then(function ($v) { return array('file' => $v); }) - ->end() - ->children() - ->scalarNode('file') - ->defaultNull() - ->cannotBeEmpty() - ->end() - ->booleanNode('realtime') - ->defaultFalse() - ->end() - ->end() - ->end() - ->booleanNode('stop_on_failure') - ->defaultFalse() - ->end() - ->booleanNode('detailed_progress') - ->defaultFalse() - ->end() - ; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/IConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/IConfiguration.php deleted file mode 100644 index 1f2d41b2..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/IConfiguration.php +++ /dev/null @@ -1,66 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Configuration; - -use Symfony\Component\Config\Definition\ConfigurationInterface; - -/** - * @package Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -interface IConfiguration extends ConfigurationInterface -{ - /** - * @return string - */ - public static function getConfigurationID(); -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/PHPSpecConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/PHPSpecConfiguration.php deleted file mode 100644 index 073f3e10..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/PHPSpecConfiguration.php +++ /dev/null @@ -1,76 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Configuration; - -use Symfony\Component\Config\Definition\Builder\NodeBuilder; - -use Stagehand\TestRunner\Core\Plugin\PHPSpecPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class PHPSpecConfiguration extends Configuration -{ - public static function getConfigurationID() - { - return strtolower(PHPSpecPlugin::getPluginID()); - } - - /** - * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder - */ - protected function defineGrammar(NodeBuilder $nodeBuilder) - { - } -} - - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/PHPUnitConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/PHPUnitConfiguration.php deleted file mode 100644 index 569b6796..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/PHPUnitConfiguration.php +++ /dev/null @@ -1,82 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Configuration; - -use Symfony\Component\Config\Definition\Builder\NodeBuilder; - -use Stagehand\TestRunner\Core\Plugin\PHPUnitPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class PHPUnitConfiguration extends Configuration -{ - public static function getConfigurationID() - { - return strtolower(PHPUnitPlugin::getPluginID()); - } - - /** - * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder - */ - protected function defineGrammar(NodeBuilder $nodeBuilder) - { - $nodeBuilder - ->scalarNode('config') - ->defaultNull() - ->cannotBeEmpty() - ->end() - ; - } -} - - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/SimpleTestConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/SimpleTestConfiguration.php deleted file mode 100644 index 24f5a6e3..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Configuration/SimpleTestConfiguration.php +++ /dev/null @@ -1,76 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Configuration; - -use Symfony\Component\Config\Definition\Builder\NodeBuilder; - -use Stagehand\TestRunner\Core\Plugin\SimpleTestPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class SimpleTestConfiguration extends Configuration -{ - public static function getConfigurationID() - { - return strtolower(SimpleTestPlugin::getPluginID()); - } - - /** - * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder - */ - protected function defineGrammar(NodeBuilder $nodeBuilder) - { - } -} - - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/CompiledContainer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/CompiledContainer.php deleted file mode 100644 index 9cb555ca..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/CompiledContainer.php +++ /dev/null @@ -1,1244 +0,0 @@ -getDefaultParameters())); - } - - /** - * Gets the 'alteration_monitoring' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %alteration_monitoring.class% instance. - */ - protected function getAlterationMonitoringService() - { - $class = $this->getParameter('alteration_monitoring.class'); - return $this->services['alteration_monitoring'] = new $class(); - } - - /** - * Gets the 'autotest_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %autotest_factory.class% instance. - */ - protected function getAutotestFactoryService() - { - return $this->services['autotest_factory'] = $this->get('component_aware_factory_factory')->create('autotest', $this->getParameter('plugin_aware_factory.class')); - } - - /** - * Gets the 'cakephp.autotest' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %cakephp.autotest.class% instance. - */ - protected function getCakephp_AutotestService() - { - $class = $this->getParameter('cakephp.autotest.class'); - $this->services['cakephp.autotest'] = $instance = new $class($this->get('preparer_factory')); - - $instance->setAlterationMonitoring($this->get('alteration_monitoring')); - $instance->setLegacyProxy($this->get('legacy_proxy')); - $instance->setMonitoringDirectories($this->getParameter('monitoring_directories')); - $instance->setNotifierFactory($this->get('notifier_factory')); - $instance->setOS($this->get('os')); - $instance->setRunnerFactory($this->get('runner_factory')); - $instance->setTerminal($this->get('terminal')); - $instance->setTestTargets($this->get('test_targets')); - - return $instance; - } - - /** - * Gets the 'cakephp.collector' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %cakephp.collector.class% instance. - */ - protected function getCakephp_CollectorService() - { - $class = $this->getParameter('cakephp.collector.class'); - $this->services['cakephp.collector'] = $instance = new $class($this->get('test_targets')); - - $instance->setCollectingTypeFactory($this->get('collecting_type_factory')); - - return $instance; - } - - /** - * Gets the 'cakephp.junit_xml_reporter' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %cakephp.junit_xml_reporter.class% instance. - */ - protected function getCakephp_JunitXmlReporterService() - { - $class = $this->getParameter('cakephp.junit_xml_reporter.class'); - return $this->services['cakephp.junit_xml_reporter'] = new $class(); - } - - /** - * Gets the 'cakephp.preparer' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %cakephp.preparer.class% instance. - */ - protected function getCakephp_PreparerService() - { - $class = $this->getParameter('cakephp.preparer.class'); - $this->services['cakephp.preparer'] = $instance = new $class(); - - $instance->setCakePHPAppPath($this->getParameter('cakephp.cakephp_app_path')); - $instance->setCakePHPCorePath($this->getParameter('cakephp.cakephp_core_path')); - - return $instance; - } - - /** - * Gets the 'cakephp.runner' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %cakephp.runner.class% instance. - */ - protected function getCakephp_RunnerService() - { - $class = $this->getParameter('cakephp.runner.class'); - $this->services['cakephp.runner'] = $instance = new $class(); - - $instance->setJUnitXMLFile($this->getParameter('junit_xml_file')); - $instance->setPrintsDetailedProgressReport($this->getParameter('prints_detailed_progress_report')); - $instance->setStopsOnFailure($this->getParameter('stops_on_failure')); - $instance->setTerminal($this->get('terminal')); - $instance->setTestTargets($this->get('test_targets')); - $instance->setUsesNotification($this->getParameter('uses_notification')); - $instance->setJUnitXMLReporterFactory($this->get('simpletest.junit_xml_reporter_factory')); - - return $instance; - } - - /** - * Gets the 'ciunit.autotest' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %ciunit.autotest.class% instance. - */ - protected function getCiunit_AutotestService() - { - $class = $this->getParameter('ciunit.autotest.class'); - $this->services['ciunit.autotest'] = $instance = new $class($this->get('preparer_factory')); - - $instance->setAlterationMonitoring($this->get('alteration_monitoring')); - $instance->setLegacyProxy($this->get('legacy_proxy')); - $instance->setMonitoringDirectories($this->getParameter('monitoring_directories')); - $instance->setNotifierFactory($this->get('notifier_factory')); - $instance->setOS($this->get('os')); - $instance->setRunnerFactory($this->get('runner_factory')); - $instance->setTerminal($this->get('terminal')); - $instance->setTestTargets($this->get('test_targets')); - $instance->setPHPUnitXMLConfiguration($this->get('phpunit.phpunit_xml_configuration')); - - return $instance; - } - - /** - * Gets the 'ciunit.collector' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %ciunit.collector.class% instance. - */ - protected function getCiunit_CollectorService() - { - $class = $this->getParameter('ciunit.collector.class'); - $this->services['ciunit.collector'] = $instance = new $class($this->get('test_targets')); - - $instance->setCollectingTypeFactory($this->get('collecting_type_factory')); - $instance->setPHPUnitXMLConfiguration($this->get('phpunit.phpunit_xml_configuration')); - - return $instance; - } - - /** - * Gets the 'ciunit.preparer' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %ciunit.preparer.class% instance. - */ - protected function getCiunit_PreparerService() - { - $class = $this->getParameter('ciunit.preparer.class'); - $this->services['ciunit.preparer'] = $instance = new $class(); - - $instance->setPHPUnitXMLConfiguration($this->get('phpunit.phpunit_xml_configuration')); - $instance->setTerminal($this->get('terminal')); - $instance->setCIUnitPath($this->getParameter('ciunit.ciunit_path')); - - return $instance; - } - - /** - * Gets the 'ciunit.runner' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %ciunit.runner.class% instance. - */ - protected function getCiunit_RunnerService() - { - $class = $this->getParameter('ciunit.runner.class'); - $this->services['ciunit.runner'] = $instance = new $class(); - - $instance->setJUnitXMLFile($this->getParameter('junit_xml_file')); - $instance->setPrintsDetailedProgressReport($this->getParameter('prints_detailed_progress_report')); - $instance->setStopsOnFailure($this->getParameter('stops_on_failure')); - $instance->setTerminal($this->get('terminal')); - $instance->setTestTargets($this->get('test_targets')); - $instance->setUsesNotification($this->getParameter('uses_notification')); - $instance->setPHPUnitXMLConfiguration($this->get('phpunit.phpunit_xml_configuration')); - $instance->setJUnitXMLPrinterFactory($this->get('phpunit.junit_xml_printer_factory')); - - return $instance; - } - - /** - * Gets the 'collecting_type' service. - * - * @return Object A %collecting_type.class% instance. - */ - protected function getCollectingTypeService() - { - $class = $this->getParameter('collecting_type.class'); - $instance = new $class(); - - $instance->setLegacyProxy($this->get('legacy_proxy')); - - return $instance; - } - - /** - * Gets the 'collecting_type_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %collecting_type_factory.class% instance. - */ - protected function getCollectingTypeFactoryService() - { - return $this->services['collecting_type_factory'] = $this->get('component_aware_factory_factory')->create('collecting_type', $this->getParameter('collecting_type_factory.class')); - } - - /** - * Gets the 'collector_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %collector_factory.class% instance. - */ - protected function getCollectorFactoryService() - { - return $this->services['collector_factory'] = $this->get('component_aware_factory_factory')->create('collector', $this->getParameter('plugin_aware_factory.class')); - } - - /** - * Gets the 'component_aware_factory_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %component_aware_factory_factory.class% instance. - */ - protected function getComponentAwareFactoryFactoryService() - { - $class = $this->getParameter('component_aware_factory_factory.class'); - $this->services['component_aware_factory_factory'] = $instance = new $class(); - - $instance->setFactoryClass($this->getParameter('component_aware_factory.class')); - $instance->setComponentFactory($this->get('component_factory')); - - return $instance; - } - - /** - * Gets the 'component_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @throws \RuntimeException always since this service is expected to be injected dynamically - */ - protected function getComponentFactoryService() - { - throw new \RuntimeException('You have requested a synthetic service ("component_factory"). The DIC does not know how to construct this service.'); - } - - /** - * Gets the 'input' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @throws \RuntimeException always since this service is expected to be injected dynamically - */ - protected function getInputService() - { - throw new \RuntimeException('You have requested a synthetic service ("input"). The DIC does not know how to construct this service.'); - } - - /** - * Gets the 'junit_xml_dom_writer' service. - * - * @return Object A %junit_xml_dom_writer.class% instance. - */ - protected function getJunitXmlDomWriterService() - { - $class = $this->getParameter('junit_xml_dom_writer.class'); - return new $class(); - } - - /** - * Gets the 'junit_xml_dom_writer_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %junit_xml_dom_writer_factory.class% instance. - */ - protected function getJunitXmlDomWriterFactoryService() - { - return $this->services['junit_xml_dom_writer_factory'] = $this->get('component_aware_factory_factory')->create('junit_xml_dom_writer'); - } - - /** - * Gets the 'junit_xml_stream_writer' service. - * - * @return Object A %junit_xml_stream_writer.class% instance. - */ - protected function getJunitXmlStreamWriterService() - { - $class = $this->getParameter('junit_xml_stream_writer.class'); - return new $class(); - } - - /** - * Gets the 'junit_xml_stream_writer_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %junit_xml_stream_writer_factory.class% instance. - */ - protected function getJunitXmlStreamWriterFactoryService() - { - return $this->services['junit_xml_stream_writer_factory'] = $this->get('component_aware_factory_factory')->create('junit_xml_stream_writer'); - } - - /** - * Gets the 'junit_xml_writer_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %junit_xml_writer_factory.class% instance. - */ - protected function getJunitXmlWriterFactoryService() - { - $class = $this->getParameter('junit_xml_writer_factory.class'); - $this->services['junit_xml_writer_factory'] = $instance = new $class(); - - $instance->setLogsResultsInRealtime($this->getParameter('logs_results_in_junit_xml_in_realtime')); - $instance->setJUnitXMLDOMWriterFactory($this->get('junit_xml_dom_writer_factory')); - $instance->setJUnitXMLStreamWriterFactory($this->get('junit_xml_stream_writer_factory')); - - return $instance; - } - - /** - * Gets the 'legacy_proxy' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %legacy_proxy.class% instance. - */ - protected function getLegacyProxyService() - { - $class = $this->getParameter('legacy_proxy.class'); - return $this->services['legacy_proxy'] = new $class(); - } - - /** - * Gets the 'notifier' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %notifier.class% instance. - */ - protected function getNotifierService() - { - $class = $this->getParameter('notifier.class'); - $this->services['notifier'] = $instance = new $class(); - - $instance->setLegacyProxy($this->get('legacy_proxy')); - $instance->setOS($this->get('os')); - - return $instance; - } - - /** - * Gets the 'notifier_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %notifier_factory.class% instance. - */ - protected function getNotifierFactoryService() - { - return $this->services['notifier_factory'] = $this->get('component_aware_factory_factory')->create('notifier'); - } - - /** - * Gets the 'os' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %os.class% instance. - */ - protected function getOsService() - { - $class = $this->getParameter('os.class'); - $this->services['os'] = $instance = new $class(); - - $instance->setLegacyProxy($this->get('legacy_proxy')); - - return $instance; - } - - /** - * Gets the 'output' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @throws \RuntimeException always since this service is expected to be injected dynamically - */ - protected function getOutputService() - { - throw new \RuntimeException('You have requested a synthetic service ("output"). The DIC does not know how to construct this service.'); - } - - /** - * Gets the 'output_buffering' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %output_buffering.class% instance. - */ - protected function getOutputBufferingService() - { - $class = $this->getParameter('output_buffering.class'); - $this->services['output_buffering'] = $instance = new $class(); - - $instance->setLegacyProxy($this->get('legacy_proxy')); - - return $instance; - } - - /** - * Gets the 'phpspec.autotest' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.autotest.class% instance. - */ - protected function getPhpspec_AutotestService() - { - $class = $this->getParameter('phpspec.autotest.class'); - $this->services['phpspec.autotest'] = $instance = new $class($this->get('preparer_factory')); - - $instance->setAlterationMonitoring($this->get('alteration_monitoring')); - $instance->setLegacyProxy($this->get('legacy_proxy')); - $instance->setMonitoringDirectories($this->getParameter('monitoring_directories')); - $instance->setNotifierFactory($this->get('notifier_factory')); - $instance->setOS($this->get('os')); - $instance->setRunnerFactory($this->get('runner_factory')); - $instance->setTerminal($this->get('terminal')); - $instance->setTestTargets($this->get('test_targets')); - - return $instance; - } - - /** - * Gets the 'phpspec.cli_runner' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.cli_runner.class% instance. - */ - protected function getPhpspec_CliRunnerService() - { - $class = $this->getParameter('phpspec.cli_runner.class'); - $this->services['phpspec.cli_runner'] = $instance = new $class(); - - $instance->setLoader($this->get('phpspec.spec_loader_factory')); - $instance->setExampleRunner($this->get('phpspec.example_runner')); - - return $instance; - } - - /** - * Gets the 'phpspec.collector' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.collector.class% instance. - */ - protected function getPhpspec_CollectorService() - { - $class = $this->getParameter('phpspec.collector.class'); - $this->services['phpspec.collector'] = $instance = new $class($this->get('test_targets')); - - $instance->setCollectingTypeFactory($this->get('collecting_type_factory')); - - return $instance; - } - - /** - * Gets the 'phpspec.documentation_formatter' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.documentation_formatter.class% instance. - */ - protected function getPhpspec_DocumentationFormatterService() - { - $class = $this->getParameter('phpspec.documentation_formatter.class'); - return $this->services['phpspec.documentation_formatter'] = new $class($this->get('phpspec.reporter')); - } - - /** - * Gets the 'phpspec.documentation_formatter_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.documentation_formatter_factory.class% instance. - */ - protected function getPhpspec_DocumentationFormatterFactoryService() - { - return $this->services['phpspec.documentation_formatter_factory'] = $this->get('component_aware_factory_factory')->create('documentation_formatter', $this->getParameter('plugin_aware_factory.class')); - } - - /** - * Gets the 'phpspec.example_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.example_factory.class% instance. - */ - protected function getPhpspec_ExampleFactoryService() - { - $class = $this->getParameter('phpspec.example_factory.class'); - $this->services['phpspec.example_factory'] = $instance = new $class(); - - $instance->setTestTargets($this->get('test_targets')); - - return $instance; - } - - /** - * Gets the 'phpspec.example_runner' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.example_runner.class% instance. - */ - protected function getPhpspec_ExampleRunnerService() - { - $class = $this->getParameter('phpspec.example_runner.class'); - $this->services['phpspec.example_runner'] = $instance = new $class(); - - $instance->setExampleFactory($this->get('phpspec.example_factory')); - - return $instance; - } - - /** - * Gets the 'phpspec.junit_xml_formatter' service. - * - * @return Object A %phpspec.junit_xml_formatter.class% instance. - */ - protected function getPhpspec_JunitXmlFormatterService() - { - $class = $this->getParameter('phpspec.junit_xml_formatter.class'); - $instance = new $class($this->get('phpspec.reporter')); - - $instance->setTestTargets($this->get('test_targets')); - - return $instance; - } - - /** - * Gets the 'phpspec.junit_xml_formatter_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.junit_xml_formatter_factory.class% instance. - */ - protected function getPhpspec_JunitXmlFormatterFactoryService() - { - $this->services['phpspec.junit_xml_formatter_factory'] = $instance = $this->get('component_aware_factory_factory')->create('junit_xml_formatter', $this->getParameter('phpspec.junit_xml_formatter_factory.class')); - - $instance->setJUnitXMLWriterFactory($this->get('junit_xml_writer_factory')); - - return $instance; - } - - /** - * Gets the 'phpspec.notification_formatter' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.notification_formatter.class% instance. - */ - protected function getPhpspec_NotificationFormatterService() - { - $class = $this->getParameter('phpspec.notification_formatter.class'); - return $this->services['phpspec.notification_formatter'] = new $class($this->get('phpspec.reporter')); - } - - /** - * Gets the 'phpspec.notification_formatter_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.notification_formatter_factory.class% instance. - */ - protected function getPhpspec_NotificationFormatterFactoryService() - { - return $this->services['phpspec.notification_formatter_factory'] = $this->get('component_aware_factory_factory')->create('notification_formatter', $this->getParameter('plugin_aware_factory.class')); - } - - /** - * Gets the 'phpspec.preparer' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.preparer.class% instance. - */ - protected function getPhpspec_PreparerService() - { - $class = $this->getParameter('phpspec.preparer.class'); - return $this->services['phpspec.preparer'] = new $class(); - } - - /** - * Gets the 'phpspec.progress_formatter' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.progress_formatter.class% instance. - */ - protected function getPhpspec_ProgressFormatterService() - { - $class = $this->getParameter('phpspec.progress_formatter.class'); - return $this->services['phpspec.progress_formatter'] = new $class($this->get('phpspec.reporter')); - } - - /** - * Gets the 'phpspec.progress_formatter_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.progress_formatter_factory.class% instance. - */ - protected function getPhpspec_ProgressFormatterFactoryService() - { - return $this->services['phpspec.progress_formatter_factory'] = $this->get('component_aware_factory_factory')->create('progress_formatter', $this->getParameter('plugin_aware_factory.class')); - } - - /** - * Gets the 'phpspec.reporter' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.reporter.class% instance. - */ - protected function getPhpspec_ReporterService() - { - $class = $this->getParameter('phpspec.reporter.class'); - return $this->services['phpspec.reporter'] = new $class(); - } - - /** - * Gets the 'phpspec.runner' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.runner.class% instance. - */ - protected function getPhpspec_RunnerService() - { - $class = $this->getParameter('phpspec.runner.class'); - $this->services['phpspec.runner'] = $instance = new $class(); - - $instance->setJUnitXMLFile($this->getParameter('junit_xml_file')); - $instance->setPrintsDetailedProgressReport($this->getParameter('prints_detailed_progress_report')); - $instance->setStopsOnFailure($this->getParameter('stops_on_failure')); - $instance->setTerminal($this->get('terminal')); - $instance->setTestTargets($this->get('test_targets')); - $instance->setUsesNotification($this->getParameter('uses_notification')); - $instance->setCliRunner($this->get('phpspec.cli_runner')); - $instance->setDocumentationFormatterFactory($this->get('phpspec.documentation_formatter_factory')); - $instance->setJUnitXMLFormatterFactory($this->get('phpspec.junit_xml_formatter_factory')); - $instance->setNotificationFormatterFactory($this->get('phpspec.notification_formatter_factory')); - $instance->setProgressFormatterFactory($this->get('phpspec.progress_formatter_factory')); - $instance->setReporter($this->get('phpspec.reporter')); - - return $instance; - } - - /** - * Gets the 'phpspec.spec_loader_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpspec.spec_loader_factory.class% instance. - */ - protected function getPhpspec_SpecLoaderFactoryService() - { - $class = $this->getParameter('phpspec.spec_loader_factory.class'); - return $this->services['phpspec.spec_loader_factory'] = new $class(); - } - - /** - * Gets the 'phpunit.autotest' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpunit.autotest.class% instance. - */ - protected function getPhpunit_AutotestService() - { - $class = $this->getParameter('phpunit.autotest.class'); - $this->services['phpunit.autotest'] = $instance = new $class($this->get('preparer_factory')); - - $instance->setAlterationMonitoring($this->get('alteration_monitoring')); - $instance->setLegacyProxy($this->get('legacy_proxy')); - $instance->setMonitoringDirectories($this->getParameter('monitoring_directories')); - $instance->setNotifierFactory($this->get('notifier_factory')); - $instance->setOS($this->get('os')); - $instance->setRunnerFactory($this->get('runner_factory')); - $instance->setTerminal($this->get('terminal')); - $instance->setTestTargets($this->get('test_targets')); - $instance->setPHPUnitXMLConfiguration($this->get('phpunit.phpunit_xml_configuration')); - - return $instance; - } - - /** - * Gets the 'phpunit.collector' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpunit.collector.class% instance. - */ - protected function getPhpunit_CollectorService() - { - $class = $this->getParameter('phpunit.collector.class'); - $this->services['phpunit.collector'] = $instance = new $class($this->get('test_targets')); - - $instance->setCollectingTypeFactory($this->get('collecting_type_factory')); - $instance->setPHPUnitXMLConfiguration($this->get('phpunit.phpunit_xml_configuration')); - - return $instance; - } - - /** - * Gets the 'phpunit.junit_xml_printer' service. - * - * @return Object A %phpunit.junit_xml_printer.class% instance. - */ - protected function getPhpunit_JunitXmlPrinterService() - { - $class = $this->getParameter('phpunit.junit_xml_printer.class'); - $instance = new $class(); - - $instance->setTestTargets($this->get('test_targets')); - - return $instance; - } - - /** - * Gets the 'phpunit.junit_xml_printer_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpunit.junit_xml_printer_factory.class% instance. - */ - protected function getPhpunit_JunitXmlPrinterFactoryService() - { - $this->services['phpunit.junit_xml_printer_factory'] = $instance = $this->get('component_aware_factory_factory')->create('phpunit.junit_xml_printer', $this->getParameter('phpunit.junit_xml_printer_factory.class')); - - $instance->setJUnitXMLWriterFactory($this->get('junit_xml_writer_factory')); - - return $instance; - } - - /** - * Gets the 'phpunit.phpunit_xml_configuration' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpunit.phpunit_xml_configuration.class% instance. - */ - protected function getPhpunit_PhpunitXmlConfigurationService() - { - $class = $this->getParameter('phpunit.phpunit_xml_configuration.class'); - $this->services['phpunit.phpunit_xml_configuration'] = $instance = new $class(); - - $instance->setFileName($this->getParameter('phpunit.phpunit_config_file')); - - return $instance; - } - - /** - * Gets the 'phpunit.preparer' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpunit.preparer.class% instance. - */ - protected function getPhpunit_PreparerService() - { - $class = $this->getParameter('phpunit.preparer.class'); - $this->services['phpunit.preparer'] = $instance = new $class(); - - $instance->setPHPUnitXMLConfiguration($this->get('phpunit.phpunit_xml_configuration')); - $instance->setTerminal($this->get('terminal')); - - return $instance; - } - - /** - * Gets the 'phpunit.runner' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %phpunit.runner.class% instance. - */ - protected function getPhpunit_RunnerService() - { - $class = $this->getParameter('phpunit.runner.class'); - $this->services['phpunit.runner'] = $instance = new $class(); - - $instance->setJUnitXMLFile($this->getParameter('junit_xml_file')); - $instance->setPrintsDetailedProgressReport($this->getParameter('prints_detailed_progress_report')); - $instance->setStopsOnFailure($this->getParameter('stops_on_failure')); - $instance->setTerminal($this->get('terminal')); - $instance->setTestTargets($this->get('test_targets')); - $instance->setUsesNotification($this->getParameter('uses_notification')); - $instance->setPHPUnitXMLConfiguration($this->get('phpunit.phpunit_xml_configuration')); - $instance->setJUnitXMLPrinterFactory($this->get('phpunit.junit_xml_printer_factory')); - - return $instance; - } - - /** - * Gets the 'preparer_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %preparer_factory.class% instance. - */ - protected function getPreparerFactoryService() - { - return $this->services['preparer_factory'] = $this->get('component_aware_factory_factory')->create('preparer', $this->getParameter('plugin_aware_factory.class')); - } - - /** - * Gets the 'runner_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %runner_factory.class% instance. - */ - protected function getRunnerFactoryService() - { - return $this->services['runner_factory'] = $this->get('component_aware_factory_factory')->create('runner', $this->getParameter('plugin_aware_factory.class')); - } - - /** - * Gets the 'simpletest.autotest' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %simpletest.autotest.class% instance. - */ - protected function getSimpletest_AutotestService() - { - $class = $this->getParameter('simpletest.autotest.class'); - $this->services['simpletest.autotest'] = $instance = new $class($this->get('preparer_factory')); - - $instance->setAlterationMonitoring($this->get('alteration_monitoring')); - $instance->setLegacyProxy($this->get('legacy_proxy')); - $instance->setMonitoringDirectories($this->getParameter('monitoring_directories')); - $instance->setNotifierFactory($this->get('notifier_factory')); - $instance->setOS($this->get('os')); - $instance->setRunnerFactory($this->get('runner_factory')); - $instance->setTerminal($this->get('terminal')); - $instance->setTestTargets($this->get('test_targets')); - - return $instance; - } - - /** - * Gets the 'simpletest.collector' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %simpletest.collector.class% instance. - */ - protected function getSimpletest_CollectorService() - { - $class = $this->getParameter('simpletest.collector.class'); - $this->services['simpletest.collector'] = $instance = new $class($this->get('test_targets')); - - $instance->setCollectingTypeFactory($this->get('collecting_type_factory')); - - return $instance; - } - - /** - * Gets the 'simpletest.junit_xml_reporter' service. - * - * @return Object A %simpletest.junit_xml_reporter.class% instance. - */ - protected function getSimpletest_JunitXmlReporterService() - { - $class = $this->getParameter('simpletest.junit_xml_reporter.class'); - return new $class(); - } - - /** - * Gets the 'simpletest.junit_xml_reporter_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %simpletest.junit_xml_reporter_factory.class% instance. - */ - protected function getSimpletest_JunitXmlReporterFactoryService() - { - $this->services['simpletest.junit_xml_reporter_factory'] = $instance = $this->get('component_aware_factory_factory')->create('junit_xml_reporter', $this->getParameter('simpletest.junit_xml_reporter_factory.class')); - - $instance->setJUnitXMLWriterFactory($this->get('junit_xml_writer_factory')); - - return $instance; - } - - /** - * Gets the 'simpletest.preparer' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %simpletest.preparer.class% instance. - */ - protected function getSimpletest_PreparerService() - { - $class = $this->getParameter('simpletest.preparer.class'); - return $this->services['simpletest.preparer'] = new $class(); - } - - /** - * Gets the 'simpletest.runner' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %simpletest.runner.class% instance. - */ - protected function getSimpletest_RunnerService() - { - $class = $this->getParameter('simpletest.runner.class'); - $this->services['simpletest.runner'] = $instance = new $class(); - - $instance->setJUnitXMLFile($this->getParameter('junit_xml_file')); - $instance->setPrintsDetailedProgressReport($this->getParameter('prints_detailed_progress_report')); - $instance->setStopsOnFailure($this->getParameter('stops_on_failure')); - $instance->setTerminal($this->get('terminal')); - $instance->setTestTargets($this->get('test_targets')); - $instance->setUsesNotification($this->getParameter('uses_notification')); - $instance->setJUnitXMLReporterFactory($this->get('simpletest.junit_xml_reporter_factory')); - - return $instance; - } - - /** - * Gets the 'terminal' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %terminal.class% instance. - */ - protected function getTerminalService() - { - $class = $this->getParameter('terminal.class'); - $this->services['terminal'] = $instance = new $class(); - - $instance->setInput($this->get('input')); - $instance->setOutput($this->get('output')); - - return $instance; - } - - /** - * Gets the 'test_run' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %test_run.class% instance. - */ - protected function getTestRunService() - { - $class = $this->getParameter('test_run.class'); - $this->services['test_run'] = $instance = new $class(); - - $instance->setCollectorFactory($this->get('collector_factory')); - $instance->setNotifierFactory($this->get('notifier_factory')); - $instance->setPreparerFactory($this->get('preparer_factory')); - $instance->setRunnerFactory($this->get('runner_factory')); - $instance->setOutputBuffering($this->get('output_buffering')); - - return $instance; - } - - /** - * Gets the 'test_run_factory' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %test_run_factory.class% instance. - */ - protected function getTestRunFactoryService() - { - return $this->services['test_run_factory'] = $this->get('component_aware_factory_factory')->create('test_run'); - } - - /** - * Gets the 'test_runner' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %test_runner.class% instance. - */ - protected function getTestRunnerService() - { - $class = $this->getParameter('test_runner.class'); - $this->services['test_runner'] = $instance = new $class(); - - $instance->setAutotestFactory($this->get('autotest_factory')); - $instance->setEnablesAutotest($this->getParameter('enables_autotest')); - $instance->setTestRunFactory($this->get('test_run_factory')); - - return $instance; - } - - /** - * Gets the 'test_targets' service. - * - * This service is shared. - * This method always returns the same instance of the service. - * - * @return Object A %test_targets.class% instance. - */ - protected function getTestTargetsService() - { - $class = $this->getParameter('test_targets.class'); - $this->services['test_targets'] = $instance = new $class(); - - $instance->setClasses($this->getParameter('test_classes')); - $instance->setFilePattern($this->getParameter('test_file_pattern')); - $instance->setMethods($this->getParameter('test_methods')); - $instance->setRecursivelyScans($this->getParameter('recursively_scans')); - $instance->setResources($this->getParameter('test_resources')); - - return $instance; - } - - /** - * Gets the default parameters. - * - * @return array An array of the default parameters - */ - protected function getDefaultParameters() - { - return array( - 'component_aware_factory.class' => 'Stagehand\\ComponentFactory\\ComponentAwareFactory', - 'component_aware_factory_factory.class' => 'Stagehand\\ComponentFactory\\ComponentAwareFactoryFactory', - 'plugin_aware_factory.class' => 'Stagehand\\TestRunner\\Core\\Plugin\\PluginAwareFactory', - 'alteration_monitoring.class' => 'Stagehand\\TestRunner\\Process\\AlterationMonitoring', - 'autotest_factory.class' => 'Stagehand\\TestRunner\\Process\\Autotest\\Autotest', - 'collecting_type.class' => 'Stagehand\\TestRunner\\Collector\\CollectingType', - 'collecting_type_factory.class' => 'Stagehand\\TestRunner\\Collector\\CollectingTypeFactory', - 'collector_factory.class' => 'Stagehand\\TestRunner\\Collector\\Collector', - 'junit_xml_dom_writer.class' => 'Stagehand\\TestRunner\\JUnitXMLWriter\\JUnitXMLDOMWriter', - 'junit_xml_dom_writer_factory.class' => 'Stagehand\\TestRunner\\JUnitXMLWriter\\JUnitXMLDOMWriter', - 'junit_xml_stream_writer.class' => 'Stagehand\\TestRunner\\JUnitXMLWriter\\JUnitXMLStreamWriter', - 'junit_xml_stream_writer_factory.class' => 'Stagehand\\TestRunner\\JUnitXMLWriter\\JUnitXMLStreamWriter', - 'junit_xml_writer_factory.class' => 'Stagehand\\TestRunner\\JUnitXMLWriter\\JUnitXMLWriterFactory', - 'legacy_proxy.class' => 'Stagehand\\TestRunner\\Util\\LegacyProxy', - 'notifier.class' => 'Stagehand\\TestRunner\\Notification\\Notifier', - 'notifier_factory.class' => 'Stagehand\\TestRunner\\Notification\\Notifier', - 'os.class' => 'Stagehand\\TestRunner\\Util\\OS', - 'output_buffering.class' => 'Stagehand\\TestRunner\\Util\\OutputBuffering', - 'preparer_factory.class' => 'Stagehand\\TestRunner\\Preparer\\Preparer', - 'runner_factory.class' => 'Stagehand\\TestRunner\\Runner\\Runner', - 'terminal.class' => 'Stagehand\\TestRunner\\CLI\\Terminal', - 'test_run.class' => 'Stagehand\\TestRunner\\Process\\TestRun', - 'test_run_factory.class' => 'Stagehand\\TestRunner\\Process\\TestRun', - 'test_runner.class' => 'Stagehand\\TestRunner\\CLI\\TestRunner', - 'test_targets.class' => 'Stagehand\\TestRunner\\Core\\TestTargets', - 'recursively_scans' => false, - 'enables_autotest' => false, - 'monitoring_directories' => array( - - ), - 'uses_notification' => false, - 'test_methods' => array( - - ), - 'test_classes' => array( - - ), - 'junit_xml_file' => NULL, - 'logs_results_in_junit_xml_in_realtime' => false, - 'stops_on_failure' => false, - 'test_file_pattern' => NULL, - 'test_resources' => array( - - ), - 'prints_detailed_progress_report' => false, - 'ciunit.autotest.class' => 'Stagehand\\TestRunner\\Process\\Autotest\\CIUnitAutotest', - 'ciunit.collector.class' => 'Stagehand\\TestRunner\\Collector\\CIUnitCollector', - 'ciunit.preparer.class' => 'Stagehand\\TestRunner\\Preparer\\CIUnitPreparer', - 'ciunit.runner.class' => 'Stagehand\\TestRunner\\Runner\\CIUnitRunner', - 'ciunit.ciunit_path' => NULL, - 'cakephp.autotest.class' => 'Stagehand\\TestRunner\\Process\\Autotest\\CakePHPAutotest', - 'cakephp.collector.class' => 'Stagehand\\TestRunner\\Collector\\CakePHPCollector', - 'cakephp.junit_xml_reporter.class' => 'Stagehand\\TestRunner\\Runner\\CakePHPRunner\\JUnitXMLReporter', - 'cakephp.preparer.class' => 'Stagehand\\TestRunner\\Preparer\\CakePHPPreparer', - 'cakephp.runner.class' => 'Stagehand\\TestRunner\\Runner\\CakePHPRunner', - 'cakephp.cakephp_app_path' => NULL, - 'cakephp.cakephp_core_path' => NULL, - 'phpspec.autotest.class' => 'Stagehand\\TestRunner\\Process\\Autotest\\PHPSpecAutotest', - 'phpspec.cli_runner.class' => 'PHPSpec\\Runner\\Cli\\Runner', - 'phpspec.collector.class' => 'Stagehand\\TestRunner\\Collector\\PHPSpecCollector', - 'phpspec.documentation_formatter.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\DocumentationFormatter', - 'phpspec.documentation_formatter_factory.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\DocumentationFormatterFactory', - 'phpspec.example_factory.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\ExampleFactory', - 'phpspec.example_runner.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\ExampleRunner', - 'phpspec.junit_xml_formatter.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\JUnitXMLFormatter', - 'phpspec.junit_xml_formatter_factory.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\JUnitXMLFormatterFactory', - 'phpspec.notification_formatter.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\NotificationFormatter', - 'phpspec.notification_formatter_factory.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\NotificationFormatterFactory', - 'phpspec.preparer.class' => 'Stagehand\\TestRunner\\Preparer\\PHPSpecPreparer', - 'phpspec.progress_formatter.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\ProgressFormatter', - 'phpspec.progress_formatter_factory.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\ProgressFormatterFactory', - 'phpspec.reporter.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Reporter', - 'phpspec.runner.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner', - 'phpspec.spec_loader_factory.class' => 'Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\SpecLoaderFactory', - 'phpunit.autotest.class' => 'Stagehand\\TestRunner\\Process\\Autotest\\PHPUnitAutotest', - 'phpunit.collector.class' => 'Stagehand\\TestRunner\\Collector\\PHPUnitCollector', - 'phpunit.junit_xml_printer.class' => 'Stagehand\\TestRunner\\Runner\\PHPUnitRunner\\Printer\\JUnitXMLPrinter', - 'phpunit.junit_xml_printer_factory.class' => 'Stagehand\\TestRunner\\Runner\\PHPUnitRunner\\Printer\\JUnitXMLPrinterFactory', - 'phpunit.phpunit_xml_configuration.class' => 'Stagehand\\TestRunner\\Core\\PHPUnitXMLConfiguration', - 'phpunit.preparer.class' => 'Stagehand\\TestRunner\\Preparer\\PHPUnitPreparer', - 'phpunit.runner.class' => 'Stagehand\\TestRunner\\Runner\\PHPUnitRunner', - 'phpunit.phpunit_config_file' => NULL, - 'simpletest.autotest.class' => 'Stagehand\\TestRunner\\Process\\Autotest\\SimpleTestAutotest', - 'simpletest.collector.class' => 'Stagehand\\TestRunner\\Collector\\SimpleTestCollector', - 'simpletest.junit_xml_reporter.class' => 'Stagehand\\TestRunner\\Runner\\SimpleTestRunner\\JUnitXMLReporter', - 'simpletest.junit_xml_reporter_factory.class' => 'Stagehand\\TestRunner\\Runner\\SimpleTestRunner\\JUnitXMLReporterFactory', - 'simpletest.preparer.class' => 'Stagehand\\TestRunner\\Preparer\\SimpleTestPreparer', - 'simpletest.runner.class' => 'Stagehand\\TestRunner\\Runner\\SimpleTestRunner', - ); - } -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Compiler.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Compiler.php deleted file mode 100644 index 13feb6e2..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Compiler.php +++ /dev/null @@ -1,99 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection; - -use Stagehand\ComponentFactory\UnfreezableContainerBuilder; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass; - -use Stagehand\TestRunner\Core\DependencyInjection\Extension\ExtensionRepository; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class Compiler -{ - const COMPILED_CONTAINER_NAMESPACE = 'Stagehand\TestRunner\Core\DependencyInjection'; - const COMPILED_CONTAINER_CLASS = 'CompiledContainer'; - - public function compile() - { - $containerBuilder = new UnfreezableContainerBuilder(); - - foreach (ExtensionRepository::findAll() as $extension) { - $containerBuilder->registerExtension($extension); - } - - foreach ($containerBuilder->getExtensions() as $extension) { /* @var $extension \Symfony\Component\DependencyInjection\Extension\ExtensionInterface */ - $containerBuilder->loadFromExtension($extension->getAlias(), array()); - } - - $containerBuilder->getCompilerPassConfig()->setOptimizationPasses( - array_filter( - $containerBuilder->getCompilerPassConfig()->getOptimizationPasses(), - function (CompilerPassInterface $compilerPass) { - return !($compilerPass instanceof ResolveParameterPlaceHoldersPass); - } - )); - - $compiler = new \Stagehand\ComponentFactory\Compiler( - $containerBuilder, - self::COMPILED_CONTAINER_CLASS, - self::COMPILED_CONTAINER_NAMESPACE - ); - file_put_contents( - __DIR__ . '/' . self::COMPILED_CONTAINER_CLASS . '.php', - $compiler->compile() - ); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Container.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Container.php deleted file mode 100644 index fda972a1..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Container.php +++ /dev/null @@ -1,71 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class Container extends CompiledContainer -{ - /** - * @throws \UnexpectedValueException - */ - public function setParameter($name, $value) - { - if (!$this->hasParameter($name)) { - throw new \UnexpectedValueException(sprintf('The parameter [ %s ] is not found in the container.', $name)); - } - - parent::setParameter($name, $value); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/cakephp.yml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/cakephp.yml deleted file mode 100644 index 1928551e..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/cakephp.yml +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (c) 2011-2012 KUBO Atsuhiro , -# 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. -# -# 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. - -parameters: - # Domain Components - cakephp.autotest.class: "Stagehand\\TestRunner\\Process\\Autotest\\CakePHPAutotest" - cakephp.collector.class: "Stagehand\\TestRunner\\Collector\\CakePHPCollector" - cakephp.junit_xml_reporter.class: "Stagehand\\TestRunner\\Runner\\CakePHPRunner\\JUnitXMLReporter" - cakephp.preparer.class: "Stagehand\\TestRunner\\Preparer\\CakePHPPreparer" - cakephp.runner.class: "Stagehand\\TestRunner\\Runner\\CakePHPRunner" - - # Configuration Parameters - cakephp.cakephp_app_path: null - cakephp.cakephp_core_path: null - -services: - # Collector - cakephp.collector: - parent: simpletest.collector - class: "%cakephp.collector.class%" - - # Preparer - cakephp.preparer: - parent: simpletest.preparer - class: "%cakephp.preparer.class%" - calls: - - [ setCakePHPAppPath, [ "%cakephp.cakephp_app_path%" ] ] - - [ setCakePHPCorePath, [ "%cakephp.cakephp_core_path%" ] ] - - # Process - cakephp.autotest: - parent: simpletest.autotest - class: "%cakephp.autotest.class%" - - # Runner - cakephp.junit_xml_reporter: - parent: simpletest.junit_xml_reporter - class: "%cakephp.junit_xml_reporter.class%" - cakephp.runner: - parent: simpletest.runner - class: "%cakephp.runner.class%" - -# Local Variables: -# mode: conf -# coding: iso-8859-1 -# tab-width: 2 -# c-basic-offset: 2 -# c-hanging-comment-ender-p: nil -# indent-tabs-mode: nil -# End: diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/ciunit.yml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/ciunit.yml deleted file mode 100644 index 40b15bb3..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/ciunit.yml +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (c) 2011-2012 KUBO Atsuhiro , -# 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. -# -# 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. - -parameters: - # Domain Components - ciunit.autotest.class: "Stagehand\\TestRunner\\Process\\Autotest\\CIUnitAutotest" - ciunit.collector.class: "Stagehand\\TestRunner\\Collector\\CIUnitCollector" - ciunit.preparer.class: "Stagehand\\TestRunner\\Preparer\\CIUnitPreparer" - ciunit.runner.class: "Stagehand\\TestRunner\\Runner\\CIUnitRunner" - - # Configuration Parameters - ciunit.ciunit_path: null - -services: - # Collector - ciunit.collector: - parent: phpunit.collector - class: "%ciunit.collector.class%" - - # Preparer - ciunit.preparer: - parent: phpunit.preparer - class: "%ciunit.preparer.class%" - calls: - - [ setCIUnitPath, [ "%ciunit.ciunit_path%" ] ] - - # Process - ciunit.autotest: - parent: phpunit.autotest - class: "%ciunit.autotest.class%" - - # Runner - ciunit.runner: - parent: phpunit.runner - class: "%ciunit.runner.class%" - -# Local Variables: -# mode: conf -# coding: iso-8859-1 -# tab-width: 2 -# c-basic-offset: 2 -# c-hanging-comment-ender-p: nil -# indent-tabs-mode: nil -# End: diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/general.yml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/general.yml deleted file mode 100644 index e1352059..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/general.yml +++ /dev/null @@ -1,242 +0,0 @@ -# Copyright (c) 2011-2012 KUBO Atsuhiro , -# 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. -# -# 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. - -parameters: - # Component Factory - component_aware_factory.class: "Stagehand\\ComponentFactory\\ComponentAwareFactory" - component_aware_factory_factory.class: "Stagehand\\ComponentFactory\\ComponentAwareFactoryFactory" - plugin_aware_factory.class: "Stagehand\\TestRunner\\Core\\Plugin\\PluginAwareFactory" - - # Domain Components - alteration_monitoring.class: "Stagehand\\TestRunner\\Process\\AlterationMonitoring" - autotest_factory.class: "Stagehand\\TestRunner\\Process\\Autotest\\Autotest" - collecting_type.class: "Stagehand\\TestRunner\\Collector\\CollectingType" - collecting_type_factory.class: "Stagehand\\TestRunner\\Collector\\CollectingTypeFactory" - collector_factory.class: "Stagehand\\TestRunner\\Collector\\Collector" - junit_xml_dom_writer.class: "Stagehand\\TestRunner\\JUnitXMLWriter\\JUnitXMLDOMWriter" - junit_xml_dom_writer_factory.class: "%junit_xml_dom_writer.class%" - junit_xml_stream_writer.class: "Stagehand\\TestRunner\\JUnitXMLWriter\\JUnitXMLStreamWriter" - junit_xml_stream_writer_factory.class: "%junit_xml_stream_writer.class%" - junit_xml_writer_factory.class: "Stagehand\\TestRunner\\JUnitXMLWriter\\JUnitXMLWriterFactory" - legacy_proxy.class: "Stagehand\\TestRunner\\Util\\LegacyProxy" - notifier.class: "Stagehand\\TestRunner\\Notification\\Notifier" - notifier_factory.class: "Stagehand\\TestRunner\\Notification\\Notifier" - os.class: "Stagehand\\TestRunner\\Util\\OS" - output_buffering.class: "Stagehand\\TestRunner\\Util\\OutputBuffering" - preparer_factory.class: "Stagehand\\TestRunner\\Preparer\\Preparer" - runner_factory.class: "Stagehand\\TestRunner\\Runner\\Runner" - terminal.class: "Stagehand\\TestRunner\\CLI\\Terminal" - test_run.class: "Stagehand\\TestRunner\\Process\\TestRun" - test_run_factory.class: "Stagehand\\TestRunner\\Process\\TestRun" - test_runner.class: "Stagehand\\TestRunner\\CLI\\TestRunner" - test_targets.class: "Stagehand\\TestRunner\\Core\\TestTargets" - - # Configuration Parameters - recursively_scans: false - enables_autotest: false - monitoring_directories: [] - uses_notification: false - test_methods: [] - test_classes: [] - junit_xml_file: null - logs_results_in_junit_xml_in_realtime: false - stops_on_failure: false - test_file_pattern: ~ - test_resources: [] - prints_detailed_progress_report: false - -services: - # Component Factory - component_aware_factory_factory: - class: "%component_aware_factory_factory.class%" - calls: - - [ setFactoryClass, [ "%component_aware_factory.class%" ] ] - - [ setComponentFactory, [ "@component_factory" ] ] - component_factory: - synthetic: true - - # Util - legacy_proxy: - class: "%legacy_proxy.class%" - os: - class: "%os.class%" - calls: - - [ setLegacyProxy, [ "@legacy_proxy" ] ] - output_buffering: - class: "%output_buffering.class%" - calls: - - [ setLegacyProxy, [ "@legacy_proxy" ] ] - - # CLI - input: - synthetic: true - output: - synthetic: true - terminal: - class: "%terminal.class%" - calls: - - [ setInput, [ "@input" ] ] - - [ setOutput, [ "@output" ] ] - test_runner: - class: "%test_runner.class%" - calls: - - [ setAutotestFactory, [ "@autotest_factory" ] ] - - [ setEnablesAutotest, [ "%enables_autotest%" ] ] - - [ setTestRunFactory, [ "@test_run_factory" ] ] - - # Collector - collecting_type: - scope: prototype - class: "%collecting_type.class%" - calls: - - [ setLegacyProxy, [ "@legacy_proxy" ] ] - collecting_type_factory: - class: "%collecting_type_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "collecting_type", "%collecting_type_factory.class%" ] - collector: - abstract: true - arguments: [ "@test_targets" ] - calls: - - [ setCollectingTypeFactory, [ "@collecting_type_factory" ] ] - collector_factory: - class: "%collector_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "collector", "%plugin_aware_factory.class%" ] - - # Core - test_targets: - class: "%test_targets.class%" - calls: - - [ setClasses, [ "%test_classes%" ] ] - - [ setFilePattern, [ "%test_file_pattern%" ] ] - - [ setMethods, [ "%test_methods%" ] ] - - [ setRecursivelyScans, [ "%recursively_scans%" ] ] - - [ setResources, [ "%test_resources%" ] ] - - # JUnitXMLWriter - junit_xml_dom_writer: - scope: prototype - class: "%junit_xml_dom_writer.class%" - junit_xml_dom_writer_factory: - class: "%junit_xml_dom_writer_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "junit_xml_dom_writer" ] - junit_xml_stream_writer: - scope: prototype - class: "%junit_xml_stream_writer.class%" - junit_xml_stream_writer_factory: - class: "%junit_xml_stream_writer_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "junit_xml_stream_writer" ] - junit_xml_writer_factory: - class: "%junit_xml_writer_factory.class%" - calls: - - [ setLogsResultsInRealtime, [ "%logs_results_in_junit_xml_in_realtime%" ] ] - - [ setJUnitXMLDOMWriterFactory, [ "@junit_xml_dom_writer_factory" ] ] - - [ setJUnitXMLStreamWriterFactory, [ "@junit_xml_stream_writer_factory" ] ] - - # Notification - notifier: - class: "%notifier.class%" - calls: - - [ setLegacyProxy, [ "@legacy_proxy" ] ] - - [ setOS, [ "@os" ] ] - notifier_factory: - class: "%notifier_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "notifier" ] - - # Preparer - preparer: - abstract: true - preparer_factory: - class: "%preparer_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "preparer", "%plugin_aware_factory.class%" ] - - # Process - alteration_monitoring: - class: "%alteration_monitoring.class%" - autotest: - abstract: true - arguments: [ "@preparer_factory" ] - calls: - - [ setAlterationMonitoring, [ "@alteration_monitoring" ] ] - - [ setLegacyProxy, [ "@legacy_proxy" ] ] - - [ setMonitoringDirectories, [ "%monitoring_directories%" ] ] - - [ setNotifierFactory, [ "@notifier_factory" ] ] - - [ setOS, [ "@os" ] ] - - [ setRunnerFactory, [ "@runner_factory" ] ] - - [ setTerminal, [ "@terminal" ] ] - - [ setTestTargets, [ "@test_targets" ] ] - autotest_factory: - class: "%autotest_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "autotest", "%plugin_aware_factory.class%" ] - test_run: - class: "%test_run.class%" - calls: - - [ setCollectorFactory, [ "@collector_factory" ] ] - - [ setNotifierFactory, [ "@notifier_factory" ] ] - - [ setPreparerFactory, [ "@preparer_factory" ] ] - - [ setRunnerFactory, [ "@runner_factory" ] ] - - [ setOutputBuffering, [ "@output_buffering" ] ] - test_run_factory: - class: "%test_run_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "test_run" ] - - # Runner - runner: - abstract: true - calls: - - [ setJUnitXMLFile, [ "%junit_xml_file%" ] ] - - [ setPrintsDetailedProgressReport, [ "%prints_detailed_progress_report%" ] ] - - [ setStopsOnFailure, [ "%stops_on_failure%" ] ] - - [ setTerminal, [ "@terminal" ] ] - - [ setTestTargets, [ "@test_targets" ] ] - - [ setUsesNotification, [ "%uses_notification%" ] ] - runner_factory: - class: "%runner_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "runner", "%plugin_aware_factory.class%" ] - -# Local Variables: -# mode: conf -# coding: iso-8859-1 -# tab-width: 2 -# c-basic-offset: 2 -# c-hanging-comment-ender-p: nil -# indent-tabs-mode: nil -# End: diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/phpspec.yml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/phpspec.yml deleted file mode 100644 index 26b87312..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/phpspec.yml +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright (c) 2011-2012 KUBO Atsuhiro , -# 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. -# -# 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. - -parameters: - # Domain Components - phpspec.autotest.class: "Stagehand\\TestRunner\\Process\\Autotest\\PHPSpecAutotest" - phpspec.cli_runner.class: "PHPSpec\\Runner\\Cli\\Runner" - phpspec.collector.class: "Stagehand\\TestRunner\\Collector\\PHPSpecCollector" - phpspec.documentation_formatter.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\DocumentationFormatter" - phpspec.documentation_formatter_factory.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\DocumentationFormatterFactory" - phpspec.example_factory.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\ExampleFactory" - phpspec.example_runner.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\ExampleRunner" - phpspec.junit_xml_formatter.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\JUnitXMLFormatter" - phpspec.junit_xml_formatter_factory.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\JUnitXMLFormatterFactory" - phpspec.notification_formatter.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\NotificationFormatter" - phpspec.notification_formatter_factory.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\NotificationFormatterFactory" - phpspec.preparer.class: "Stagehand\\TestRunner\\Preparer\\PHPSpecPreparer" - phpspec.progress_formatter.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\ProgressFormatter" - phpspec.progress_formatter_factory.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Formatter\\ProgressFormatterFactory" - phpspec.reporter.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\Reporter" - phpspec.runner.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner" - phpspec.spec_loader_factory.class: "Stagehand\\TestRunner\\Runner\\PHPSpecRunner\\SpecLoaderFactory" - -services: - # Collector - phpspec.collector: - parent: collector - class: "%phpspec.collector.class%" - - # Preparer - phpspec.preparer: - parent: preparer - class: "%phpspec.preparer.class%" - - # Process - phpspec.autotest: - parent: autotest - class: "%phpspec.autotest.class%" - - # Runner - phpspec.cli_runner: - class: "%phpspec.cli_runner.class%" - calls: - - [ setLoader, [ "@phpspec.spec_loader_factory" ] ] - - [ setExampleRunner, [ "@phpspec.example_runner" ] ] - phpspec.documentation_formatter: - class: "%phpspec.documentation_formatter.class%" - arguments: [ "@phpspec.reporter" ] - phpspec.documentation_formatter_factory: - class: "%phpspec.documentation_formatter_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "documentation_formatter", "%plugin_aware_factory.class%" ] - phpspec.example_factory: - class: "%phpspec.example_factory.class%" - calls: - - [ setTestTargets, [ "@test_targets" ] ] - phpspec.example_runner: - class: "%phpspec.example_runner.class%" - calls: - - [ setExampleFactory, [ "@phpspec.example_factory" ] ] - phpspec.junit_xml_formatter: - scope: prototype - class: "%phpspec.junit_xml_formatter.class%" - arguments: [ "@phpspec.reporter" ] - calls: - - [ setTestTargets, [ "@test_targets" ] ] - phpspec.junit_xml_formatter_factory: - class: "%phpspec.junit_xml_formatter_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "junit_xml_formatter", "%phpspec.junit_xml_formatter_factory.class%" ] - calls: - - [ setJUnitXMLWriterFactory, [ "@junit_xml_writer_factory" ] ] - phpspec.notification_formatter: - class: "%phpspec.notification_formatter.class%" - arguments: [ "@phpspec.reporter" ] - phpspec.notification_formatter_factory: - class: "%phpspec.notification_formatter_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "notification_formatter", "%plugin_aware_factory.class%" ] - phpspec.progress_formatter: - class: "%phpspec.progress_formatter.class%" - arguments: [ "@phpspec.reporter" ] - phpspec.progress_formatter_factory: - class: "%phpspec.progress_formatter_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "progress_formatter", "%plugin_aware_factory.class%" ] - phpspec.reporter: - class: "%phpspec.reporter.class%" - phpspec.runner: - parent: runner - class: "%phpspec.runner.class%" - calls: - - [ setCliRunner, [ "@phpspec.cli_runner" ] ] - - [ setDocumentationFormatterFactory, [ "@phpspec.documentation_formatter_factory" ] ] - - [ setJUnitXMLFormatterFactory, [ "@phpspec.junit_xml_formatter_factory" ] ] - - [ setNotificationFormatterFactory, [ "@phpspec.notification_formatter_factory" ] ] - - [ setProgressFormatterFactory, [ "@phpspec.progress_formatter_factory" ] ] - - [ setReporter, [ "@phpspec.reporter" ] ] - phpspec.spec_loader_factory: - class: "%phpspec.spec_loader_factory.class%" - -# Local Variables: -# mode: conf -# coding: iso-8859-1 -# tab-width: 2 -# c-basic-offset: 2 -# c-hanging-comment-ender-p: nil -# indent-tabs-mode: nil -# End: diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/phpunit.yml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/phpunit.yml deleted file mode 100644 index 3616341d..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/phpunit.yml +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) 2011-2012 KUBO Atsuhiro , -# 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. -# -# 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. - -parameters: - # Domain Components - phpunit.autotest.class: "Stagehand\\TestRunner\\Process\\Autotest\\PHPUnitAutotest" - phpunit.collector.class: "Stagehand\\TestRunner\\Collector\\PHPUnitCollector" - phpunit.junit_xml_printer.class: "Stagehand\\TestRunner\\Runner\\PHPUnitRunner\\Printer\\JUnitXMLPrinter" - phpunit.junit_xml_printer_factory.class: "Stagehand\\TestRunner\\Runner\\PHPUnitRunner\\Printer\\JUnitXMLPrinterFactory" - phpunit.phpunit_xml_configuration.class: "Stagehand\\TestRunner\\Core\\PHPUnitXMLConfiguration" - phpunit.preparer.class: "Stagehand\\TestRunner\\Preparer\\PHPUnitPreparer" - phpunit.runner.class: "Stagehand\\TestRunner\\Runner\\PHPUnitRunner" - - # Configuration Parameters - phpunit.phpunit_config_file: null - -services: - # Collector - phpunit.collector: - parent: collector - class: "%phpunit.collector.class%" - calls: - - [ setPHPUnitXMLConfiguration, [ "@phpunit.phpunit_xml_configuration" ] ] - - # Core - phpunit.phpunit_xml_configuration: - class: "%phpunit.phpunit_xml_configuration.class%" - calls: - - [ setFileName, [ "%phpunit.phpunit_config_file%" ] ] - - # Preparer - phpunit.preparer: - parent: preparer - class: "%phpunit.preparer.class%" - calls: - - [ setPHPUnitXMLConfiguration, [ "@phpunit.phpunit_xml_configuration" ] ] - - [ setTerminal, [ "@terminal" ] ] - - # Process - phpunit.autotest: - parent: autotest - class: "%phpunit.autotest.class%" - calls: - - [ setPHPUnitXMLConfiguration, [ "@phpunit.phpunit_xml_configuration" ] ] - - # Runner - phpunit.junit_xml_printer: - scope: prototype - class: "%phpunit.junit_xml_printer.class%" - calls: - - [ setTestTargets, [ "@test_targets" ] ] - phpunit.junit_xml_printer_factory: - class: "%phpunit.junit_xml_printer_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "phpunit.junit_xml_printer", "%phpunit.junit_xml_printer_factory.class%" ] - calls: - - [ setJUnitXMLWriterFactory, [ "@junit_xml_writer_factory" ] ] - phpunit.runner: - parent: runner - class: "%phpunit.runner.class%" - calls: - - [ setPHPUnitXMLConfiguration, [ "@phpunit.phpunit_xml_configuration" ] ] - - [ setJUnitXMLPrinterFactory, [ "@phpunit.junit_xml_printer_factory" ] ] - -# Local Variables: -# mode: conf -# coding: iso-8859-1 -# tab-width: 2 -# c-basic-offset: 2 -# c-hanging-comment-ender-p: nil -# indent-tabs-mode: nil -# End: diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/simpletest.yml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/simpletest.yml deleted file mode 100644 index 7e42b9ed..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Definitions/simpletest.yml +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2011-2012 KUBO Atsuhiro , -# 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. -# -# 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. - -parameters: - # Domain Components - simpletest.autotest.class: "Stagehand\\TestRunner\\Process\\Autotest\\SimpleTestAutotest" - simpletest.collector.class: "Stagehand\\TestRunner\\Collector\\SimpleTestCollector" - simpletest.junit_xml_reporter.class: "Stagehand\\TestRunner\\Runner\\SimpleTestRunner\\JUnitXMLReporter" - simpletest.junit_xml_reporter_factory.class: "Stagehand\\TestRunner\\Runner\\SimpleTestRunner\\JUnitXMLReporterFactory" - simpletest.preparer.class: "Stagehand\\TestRunner\\Preparer\\SimpleTestPreparer" - simpletest.runner.class: "Stagehand\\TestRunner\\Runner\\SimpleTestRunner" - -services: - # Collector - simpletest.collector: - parent: collector - class: "%simpletest.collector.class%" - - # Preparer - simpletest.preparer: - parent: preparer - class: "%simpletest.preparer.class%" - - # Process - simpletest.autotest: - parent: autotest - class: "%simpletest.autotest.class%" - - # Runner - simpletest.junit_xml_reporter: - scope: prototype - class: "%simpletest.junit_xml_reporter.class%" - simpletest.junit_xml_reporter_factory: - class: "%simpletest.junit_xml_reporter_factory.class%" - factory_service: component_aware_factory_factory - factory_method: create - arguments: [ "junit_xml_reporter", "%simpletest.junit_xml_reporter_factory.class%" ] - calls: - - [ setJUnitXMLWriterFactory, [ "@junit_xml_writer_factory" ] ] - simpletest.runner: - parent: runner - class: "%simpletest.runner.class%" - calls: - - [ setJUnitXMLReporterFactory, [ "@simpletest.junit_xml_reporter_factory" ] ] - -# Local Variables: -# mode: conf -# coding: iso-8859-1 -# tab-width: 2 -# c-basic-offset: 2 -# c-hanging-comment-ender-p: nil -# indent-tabs-mode: nil -# End: diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/CIUnitExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/CIUnitExtension.php deleted file mode 100644 index b8c7f5f8..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/CIUnitExtension.php +++ /dev/null @@ -1,66 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection\Extension; - -use Stagehand\TestRunner\Core\Plugin\CIUnitPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class CIUnitExtension extends Extension -{ - public function getAlias() - { - return strtolower(CIUnitPlugin::getPluginID()); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/CakePHPExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/CakePHPExtension.php deleted file mode 100644 index 13862c33..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/CakePHPExtension.php +++ /dev/null @@ -1,66 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection\Extension; - -use Stagehand\TestRunner\Core\Plugin\CakePHPPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class CakePHPExtension extends Extension -{ - public function getAlias() - { - return strtolower(CakePHPPlugin::getPluginID()); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/Extension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/Extension.php deleted file mode 100644 index c48cdc5c..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/Extension.php +++ /dev/null @@ -1,80 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection\Extension; - -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -abstract class Extension implements ExtensionInterface -{ - public function load(array $configs, ContainerBuilder $container) - { - $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Definitions')); - $loader->load($this->getAlias() . '.yml'); - } - - public function getNamespace() - { - return false; - } - - public function getXsdValidationBasePath() - { - return false; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/ExtensionRepository.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/ExtensionRepository.php deleted file mode 100644 index c0c3cddf..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/ExtensionRepository.php +++ /dev/null @@ -1,85 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection\Extension; - -use Stagehand\TestRunner\Core\Plugin\PluginRepository; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class ExtensionRepository -{ - /** - * @return array - * @throws \Stagehand\TestRunner\Core\DependencyInjection\Extension\FrameworkUnavailableException - */ - public static function findAll() - { - $plugins = PluginRepository::findAll(); - if (count($plugins) == 0) { - throw new FrameworkUnavailableException('Stagehand_TestRunner is unavailable since no plugins are found in this installation.'); - } - - $extensions = array(new GeneralExtension()); - foreach ($plugins as $plugin) { /* @var $plugin \Stagehand\TestRunner\Core\Plugin\IPlugin */ - $extensionClass = new \ReflectionClass(__NAMESPACE__ . '\\' . $plugin->getPluginID() . 'Extension'); - if (!$extensionClass->isInterface() - && !$extensionClass->isAbstract() - && $extensionClass->isSubclassOf('Symfony\Component\DependencyInjection\Extension\ExtensionInterface')) { - $extensions[] = $extensionClass->newInstance(); - } - } - - return $extensions; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/FrameworkUnavailableException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/FrameworkUnavailableException.php deleted file mode 100644 index abfeeae7..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/FrameworkUnavailableException.php +++ /dev/null @@ -1,60 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection\Extension; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class FrameworkUnavailableException extends \RuntimeException -{ -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/GeneralExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/GeneralExtension.php deleted file mode 100644 index 0c74fc9c..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/GeneralExtension.php +++ /dev/null @@ -1,64 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection\Extension; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class GeneralExtension extends Extension -{ - public function getAlias() - { - return 'general'; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/PHPSpecExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/PHPSpecExtension.php deleted file mode 100644 index 3fa5fd92..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/PHPSpecExtension.php +++ /dev/null @@ -1,66 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection\Extension; - -use Stagehand\TestRunner\Core\Plugin\PHPSpecPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class PHPSpecExtension extends Extension -{ - public function getAlias() - { - return strtolower(PHPSpecPlugin::getPluginID()); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/PHPUnitExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/PHPUnitExtension.php deleted file mode 100644 index 830d2175..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/PHPUnitExtension.php +++ /dev/null @@ -1,66 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection\Extension; - -use Stagehand\TestRunner\Core\Plugin\PHPUnitPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class PHPUnitExtension extends Extension -{ - public function getAlias() - { - return strtolower(PHPUnitPlugin::getPluginID()); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/SimpleTestExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/SimpleTestExtension.php deleted file mode 100644 index cdb74630..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/DependencyInjection/Extension/SimpleTestExtension.php +++ /dev/null @@ -1,66 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\DependencyInjection\Extension; - -use Stagehand\TestRunner\Core\Plugin\SimpleTestPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class SimpleTestExtension extends Extension -{ - public function getAlias() - { - return strtolower(SimpleTestPlugin::getPluginID()); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Environment.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Environment.php index 1b33d1ad..30ab84af 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Environment.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Environment.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class Environment diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/PHPUnitXMLConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/PHPUnitXMLConfiguration.php deleted file mode 100644 index 971db393..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/PHPUnitXMLConfiguration.php +++ /dev/null @@ -1,169 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class PHPUnitXMLConfiguration -{ - /** - * @var string - * @since Property available since Release 3.0.1 - */ - protected $fileName; - - /** - * @param string $fileName - * @since Method available since Release 3.0.1 - */ - public function setFileName($fileName) - { - $this->fileName = $fileName; - } - - /** - * @return boolean - * @since Method available since Release 3.0.1 - */ - public function isEnabled() - { - return !is_null($this->fileName); - } - - /** - * @return string - */ - public function getFileName() - { - return $this->fileName; - } - - /** - * @param string $name - * @return boolean - */ - public function hasPHPUnitConfiguration($name) - { - $phpunitConfiguration = $this->createConfiguration()->getPHPUnitConfiguration(); - return array_key_exists($name, $phpunitConfiguration); - } - - /** - * @param string $name - * @return mixed - */ - public function getPHPUnitConfiguration($name) - { - $phpunitConfiguration = $this->createConfiguration()->getPHPUnitConfiguration(); - return $phpunitConfiguration[$name]; - } - - /** - * @return boolean - */ - public function hasSeleniumBrowserConfiguration() - { - return count($this->createConfiguration()->getSeleniumBrowserConfiguration()); - } - - /** - * @return array - */ - public function getSeleniumBrowserConfiguration() - { - return $this->createConfiguration()->getSeleniumBrowserConfiguration(); - } - - /** - * @param string $name - * @return boolean - */ - public function hasGroupConfiguration($name) - { - $groupConfiguration = $this->createConfiguration()->getGroupConfiguration(); - return array_key_exists($name, $groupConfiguration) && count($groupConfiguration[$name]); - } - - /** - * @param string $name - * @return array - */ - public function getGroupConfiguration($name) - { - $groupConfiguration = $this->createConfiguration()->getGroupConfiguration(); - return $groupConfiguration[$name]; - } - - /** - * @since Method available since Release 3.2.0 - */ - public function handlePHPConfiguration() - { - $this->createConfiguration()->handlePHPConfiguration(); - } - - /** - * @return \PHPUnit_Util_Configuration - * @throws \InvalidArgumentException - * @since Method available since Release 3.0.1 - */ - protected function createConfiguration() - { - if (is_null($this->fileName)) { - throw new \InvalidArgumentException('The name of the XML configuration file must be specified.'); - } - - return \PHPUnit_Util_Configuration::getInstance($this->fileName); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/CIUnitPlugin.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/CIUnitPlugin.php index 754daec9..dc87a893 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/CIUnitPlugin.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/CIUnitPlugin.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CIUnitPlugin extends PHPUnitPlugin diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/CakePHPPlugin.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/CakePHPPlugin.php index c849a399..ccfa4ee3 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/CakePHPPlugin.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/CakePHPPlugin.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CakePHPPlugin extends SimpleTestPlugin diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PHPSpecPlugin.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PHPSpecPlugin.php index 681959ff..9ce17acb 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PHPSpecPlugin.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PHPSpecPlugin.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPSpecPlugin extends Plugin diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PHPUnitPlugin.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PHPUnitPlugin.php index 49b6c5e5..378e0502 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PHPUnitPlugin.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PHPUnitPlugin.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPUnitPlugin extends Plugin diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/Plugin.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/Plugin.php index 5094773d..19b737d1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/Plugin.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/Plugin.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ abstract class Plugin implements PluginInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PluginInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PluginInterface.php index efcf5d1e..79b92af9 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PluginInterface.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PluginInterface.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2012-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ interface PluginInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PluginRepository.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PluginRepository.php index f617a982..6c05b810 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PluginRepository.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/PluginRepository.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PluginRepository diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/SimpleTestPlugin.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/SimpleTestPlugin.php index e07a0fef..c66d62c5 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/SimpleTestPlugin.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Plugin/SimpleTestPlugin.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class SimpleTestPlugin extends Plugin diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/TestTargetRepository.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/TestTargetRepository.php index cd3cf92c..b75208a6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/TestTargetRepository.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/TestTargetRepository.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class TestTargetRepository diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/TestTargets.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/TestTargets.php deleted file mode 100644 index 1e538dbf..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/TestTargets.php +++ /dev/null @@ -1,224 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class TestTargets -{ - /** - * @var array - */ - protected $resources; - - /** - * @var array - */ - protected $methods; - - /** - * @var array - */ - protected $classes; - - /** - * The pattern of test files by a regular expression literal. - * The regular expression literal must not contain .php. - * - * @var string - */ - protected $filePattern; - - /** - * @var boolean - */ - protected $recursivelyScans; - - /** - * @param array $resources - */ - public function setResources(array $resources) - { - $this->resources = $resources; - } - - /** - * @return array - */ - public function getResources() - { - return $this->resources; - } - - /** - * @param \Closure $callable - */ - public function walkOnResources(\Closure $callable) - { - array_walk($this->resources, $callable, $this); - } - - /** - * @param array $methods - */ - public function setMethods(array $methods) - { - $this->methods = array_map(function ($v) { return strtolower(ltrim(urldecode($v), '\\')); }, $methods); - } - - /** - * @return boolean - */ - public function testsOnlySpecifiedMethods() - { - return count($this->methods); - } - - /** - * @param array $classes - */ - public function setClasses(array $classes) - { - $this->classes = array_map(function ($v) { return strtolower(ltrim(urldecode($v), '\\')); }, $classes); - } - - /** - * @return boolean - */ - public function testsOnlySpecifiedClasses() - { - return count($this->classes); - } - - /** - * @param string $class - * @param string $method - * @return boolean - */ - public function shouldTreatElementAsTest($class, $method = null) - { - if ($this->testsOnlySpecifiedMethods() || $this->testsOnlySpecifiedClasses()) { - if (is_null($method)) { - return in_array(strtolower($class), $this->classes); - } else { - foreach (array($class . '::' . $method, $method) as $fullyQualifiedMethodName) { - if (in_array(strtolower($fullyQualifiedMethodName), $this->methods)) { - return true; - } - } - - return false; - } - } else { - return true; - } - } - - /** - * @param string $filePattern - */ - public function setFilePattern($filePattern) - { - $this->filePattern = $filePattern; - } - - /** - * @return string - */ - public function getFilePattern() - { - return $this->filePattern; - } - - /** - * @return boolean - */ - public function isDefaultFilePattern() - { - return $this->getFilePattern() == ApplicationContext::getInstance()->getPlugin()->getTestFilePattern(); - } - - /** - * @param string $file - * @return boolean - */ - public function shouldTreatFileAsTest($file) - { - return (boolean)preg_match('/' . str_replace('/', '\/', $this->getFilePattern()) . '/', basename($file)); - } - - /** - * @param boolean $recursivelyScans - */ - public function setRecursivelyScans($recursivelyScans) - { - $this->recursivelyScans = $recursivelyScans; - } - - /** - * @return boolean - */ - public function recursivelyScans() - { - return $this->recursivelyScans; - } - - /** - * @return array - */ - public function getRequiredSuperTypes() - { - return ApplicationContext::getInstance()->getPlugin()->getTestClassSuperTypes(); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/CIUnitTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/CIUnitTransformer.php deleted file mode 100644 index 8a312570..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/CIUnitTransformer.php +++ /dev/null @@ -1,77 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Transformation; - -use Stagehand\TestRunner\Core\Configuration\CIUnitConfiguration; -use Stagehand\TestRunner\Core\Plugin\CIUnitPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class CIUnitTransformer extends Transformer -{ - public function transform() - { - $this->setParameter('ciunit_path', $this->configurationPart['ciunit_path']); - } - - protected function createConfiguration() - { - return new CIUnitConfiguration(); - } - - protected function getParameterPrefix() - { - return CIUnitPlugin::getPluginID(); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/CakePHPTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/CakePHPTransformer.php deleted file mode 100644 index 13b077ec..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/CakePHPTransformer.php +++ /dev/null @@ -1,78 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Transformation; - -use Stagehand\TestRunner\Core\Configuration\CakePHPConfiguration; -use Stagehand\TestRunner\Core\Plugin\CakePHPPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class CakePHPTransformer extends Transformer -{ - public function transform() - { - $this->setParameter('cakephp_app_path', $this->configurationPart['app_path']); - $this->setParameter('cakephp_core_path', $this->configurationPart['core_path']); - } - - protected function createConfiguration() - { - return new CakePHPConfiguration(); - } - - protected function getParameterPrefix() - { - return CakePHPPlugin::getPluginID(); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/GeneralTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/GeneralTransformer.php deleted file mode 100644 index 43de5f00..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/GeneralTransformer.php +++ /dev/null @@ -1,91 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Transformation; - -use Stagehand\TestRunner\Core\Configuration\GeneralConfiguration; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class GeneralTransformer extends Transformer -{ - public function transform() - { - $this->setParameter('test_resources', $this->configurationPart['test_targets']['resources']); - $this->setParameter('recursively_scans', $this->configurationPart['test_targets']['recursive']); - $this->setParameter('test_methods', $this->configurationPart['test_targets']['methods']); - $this->setParameter('test_classes', $this->configurationPart['test_targets']['classes']); - $this->setParameter('test_file_pattern', $this->configurationPart['test_targets']['file_pattern']); - - $this->setParameter('enables_autotest', $this->configurationPart['autotest']['enabled']); - $this->setParameter('monitoring_directories', $this->configurationPart['autotest']['watch_dirs']); - - $this->setParameter('uses_notification', $this->configurationPart['notify']); - - $this->setParameter('junit_xml_file', $this->configurationPart['junit_xml']['file']); - $this->setParameter('logs_results_in_junit_xml_in_realtime', $this->configurationPart['junit_xml']['realtime']); - - $this->setParameter('stops_on_failure', $this->configurationPart['stop_on_failure']); - $this->setParameter('prints_detailed_progress_report', $this->configurationPart['detailed_progress']); - } - - protected function createConfiguration() - { - return new GeneralConfiguration(); - } - - protected function getParameterPrefix() - { - return ''; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/PHPSpecTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/PHPSpecTransformer.php deleted file mode 100644 index 190b465a..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/PHPSpecTransformer.php +++ /dev/null @@ -1,76 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Transformation; - -use Stagehand\TestRunner\Core\Configuration\PHPSpecConfiguration; -use Stagehand\TestRunner\Core\Plugin\PHPSpecPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class PHPSpecTransformer extends Transformer -{ - public function transform() - { - } - - protected function createConfiguration() - { - return new PHPSpecConfiguration(); - } - - protected function getParameterPrefix() - { - return PHPSpecPlugin::getPluginID(); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/PHPUnitTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/PHPUnitTransformer.php deleted file mode 100644 index 79820bac..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/PHPUnitTransformer.php +++ /dev/null @@ -1,77 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Transformation; - -use Stagehand\TestRunner\Core\Configuration\PHPUnitConfiguration; -use Stagehand\TestRunner\Core\Plugin\PHPUnitPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class PHPUnitTransformer extends Transformer -{ - public function transform() - { - $this->setParameter('phpunit_config_file', $this->configurationPart['config']); - } - - protected function createConfiguration() - { - return new PHPUnitConfiguration(); - } - - protected function getParameterPrefix() - { - return PHPUnitPlugin::getPluginID(); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/SimpleTestTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/SimpleTestTransformer.php deleted file mode 100644 index a9de467a..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/SimpleTestTransformer.php +++ /dev/null @@ -1,76 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Transformation; - -use Stagehand\TestRunner\Core\Configuration\SimpleTestConfiguration; -use Stagehand\TestRunner\Core\Plugin\SimpleTestPlugin; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class SimpleTestTransformer extends Transformer -{ - public function transform() - { - } - - protected function createConfiguration() - { - return new SimpleTestConfiguration(); - } - - protected function getParameterPrefix() - { - return SimpleTestPlugin::getPluginID(); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/Transformation.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/Transformation.php deleted file mode 100644 index 4d4a35b2..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/Transformation.php +++ /dev/null @@ -1,161 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Transformation; - -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\Yaml\Yaml; - -use Stagehand\TestRunner\Core\ApplicationContext; -use Stagehand\TestRunner\Core\Configuration\GeneralConfiguration; -use Stagehand\TestRunner\Core\Plugin\PluginRepository; -use Stagehand\TestRunner\Util\String; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class Transformation -{ - /** - * @var array - */ - protected $configuration = array(); - - /** - * @var \Symfony\Component\DependencyInjection\ContainerInterface - */ - protected $container; - - /** - * @var string - */ - protected $configurationFile; - - /** - * @param \Symfony\Component\DependencyInjection\ContainerInterface $container - */ - public function __construct(ContainerInterface $container) - { - $pluginConfigurationClass = - 'Stagehand\TestRunner\Core\Configuration' . '\\' . - ApplicationContext::getInstance()->getPlugin()->getPluginID() . 'Configuration'; - $this->configuration[ $pluginConfigurationClass::getConfigurationID() ] = array(); - $this->configuration[ GeneralConfiguration::getConfigurationID() ] = array(); - - $this->container = $container; - } - - /** - * @param string $configurationID - * @param array $configurationPart - * @throws \InvalidArgumentException - */ - public function setConfigurationPart($configurationID, array $configurationPart) - { - if (!array_key_exists($configurationID, $this->configuration)) { - throw new \InvalidArgumentException(sprintf( - 'The configuration ID must be a one of %s, [ %s ] is given.', - implode(' and ', array_keys($this->configuration)), - $configurationID - )); - } - - $this->configuration[$configurationID][] = $configurationPart; - } - - public function transformToContainerParameters() - { - if (!is_null($this->configurationFile)) { - foreach (Yaml::parse($this->configurationFile) as $configurationID => $configurationPart) { - if (!is_null($configurationPart)) { - if (!array_key_exists($configurationID, $this->configuration)) { - $this->configuration[$configurationID] = array(); - } - - array_unshift($this->configuration[$configurationID], $configurationPart); - } - } - } - - foreach ($this->configuration as $configurationID => $configurationParts) { - $configurations = array(); - foreach ($configurationParts as $configurationPart) { - $configurations[] = $configurationPart; - } - - if ($configurationID == GeneralConfiguration::getConfigurationID()) { - $transformerID = 'General'; - } else { - $plugin = PluginRepository::findByPluginID($configurationID); - $transformerID = $plugin->getPluginID(); - } - $transformerClass = __NAMESPACE__ . '\\' . $transformerID . 'Transformer'; - $transformer = new $transformerClass($configurations, $this->container); /* @var $transformer \Stagehand\TestRunner\Core\Transformation\Transformer */ - $transformer->transform(); - } - - if (is_null($this->container->getParameter('test_file_pattern'))) { - $this->container->setParameter( - 'test_file_pattern', - ApplicationContext::getInstance()->getPlugin()->getTestFilePattern() - ); - } - } - - /** - * @param string $configurationFile - */ - public function setConfigurationFile($configurationFile) - { - $this->configurationFile = $configurationFile; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/Transformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/Transformer.php deleted file mode 100644 index 68fba6fd..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Core/Transformation/Transformer.php +++ /dev/null @@ -1,112 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Core\Transformation; - -use Symfony\Component\Config\Definition\Processor; -use Symfony\Component\DependencyInjection\ContainerInterface; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -abstract class Transformer -{ - /** - * @var array - */ - protected $configurationPart; - - /** - * @var \Symfony\Component\DependencyInjection\ContainerInterface - */ - protected $container; - - /** - * @param array $configurationPart - * @param \Symfony\Component\DependencyInjection\ContainerInterface $container - */ - public function __construct(array $configurationPart, ContainerInterface $container) - { - $this->container = $container; - - $processor = new Processor(); - $this->configurationPart = $processor->processConfiguration( - $this->createConfiguration(), - $configurationPart - ); - } - - abstract public function transform(); - - /** - * @return \Symfony\Component\Config\Definition\ConfigurationInterface - */ - abstract protected function createConfiguration(); - - /** - * @return string - */ - abstract protected function getParameterPrefix(); - - /** - * @param string $name - * @param string $value - */ - protected function setParameter($name, $value) - { - $parameterPrefix = $this->getParameterPrefix(); - $this->container->setParameter( - (strlen($parameterPrefix) > 0 ? (strtolower($parameterPrefix) . '.') : '') . $name, - $value - ); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Compiler/Compiler.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Compiler/Compiler.php index 033bcee7..3402f9b1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Compiler/Compiler.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Compiler/Compiler.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -49,7 +49,7 @@ * @package Stagehand_TestRunner * @copyright 2012-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class Compiler diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Compiler/ReplaceDefinitionByPluginDefinitionPass.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Compiler/ReplaceDefinitionByPluginDefinitionPass.php index 7dc73acb..cf963fc7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Compiler/ReplaceDefinitionByPluginDefinitionPass.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Compiler/ReplaceDefinitionByPluginDefinitionPass.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -46,7 +46,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ class ReplaceDefinitionByPluginDefinitionPass implements CompilerPassInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/CIUnitConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/CIUnitConfiguration.php index 7a6f89d3..85b615f4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/CIUnitConfiguration.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/CIUnitConfiguration.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CIUnitConfiguration extends PHPUnitConfiguration diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/CakePHPConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/CakePHPConfiguration.php index f8897a79..1f64a74f 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/CakePHPConfiguration.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/CakePHPConfiguration.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CakePHPConfiguration extends SimpleTestConfiguration diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/Configuration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/Configuration.php index 50ccc9db..0d14d2f8 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/Configuration.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/Configuration.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ abstract class Configuration implements ConfigurationInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/ConfigurationInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/ConfigurationInterface.php index 8fa59856..f65a50d4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/ConfigurationInterface.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/ConfigurationInterface.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011, 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011, 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ interface ConfigurationInterface extends \Symfony\Component\Config\Definition\ConfigurationInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/GeneralConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/GeneralConfiguration.php index d492ef9d..b26907b4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/GeneralConfiguration.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/GeneralConfiguration.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class GeneralConfiguration extends Configuration diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/PHPSpecConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/PHPSpecConfiguration.php index 2e5e1616..b1c6b065 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/PHPSpecConfiguration.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/PHPSpecConfiguration.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPSpecConfiguration extends Configuration diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/PHPUnitConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/PHPUnitConfiguration.php index 26b3e587..4a202a44 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/PHPUnitConfiguration.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/PHPUnitConfiguration.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPUnitConfiguration extends Configuration diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/SimpleTestConfiguration.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/SimpleTestConfiguration.php index 040fc341..dc83d006 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/SimpleTestConfiguration.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Configuration/SimpleTestConfiguration.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class SimpleTestConfiguration extends Configuration diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/CIUnitExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/CIUnitExtension.php index c4722dab..c2ff2117 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/CIUnitExtension.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/CIUnitExtension.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -47,7 +47,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CIUnitExtension extends PHPUnitExtension diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/CakePHPExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/CakePHPExtension.php index 1f8a6b2c..54b612c2 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/CakePHPExtension.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/CakePHPExtension.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -47,7 +47,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CakePHPExtension extends SimpleTestExtension diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/Extension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/Extension.php index a797b3a3..9879ee57 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/Extension.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/Extension.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ abstract class Extension implements ExtensionInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/FrameworkUnavailableException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/FrameworkUnavailableException.php index 76e0cd3a..2d1dc806 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/FrameworkUnavailableException.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/FrameworkUnavailableException.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class FrameworkUnavailableException extends \RuntimeException diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/GeneralExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/GeneralExtension.php index e0e9444b..e6bebac4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/GeneralExtension.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/GeneralExtension.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class GeneralExtension extends Extension diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/PHPSpecExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/PHPSpecExtension.php index d7c8ab6f..fe787ac5 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/PHPSpecExtension.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/PHPSpecExtension.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -47,7 +47,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPSpecExtension extends Extension diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/PHPUnitExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/PHPUnitExtension.php index 929e9d35..fa67971d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/PHPUnitExtension.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/PHPUnitExtension.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -47,7 +47,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPUnitExtension extends Extension diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/SimpleTestExtension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/SimpleTestExtension.php index ad7a9622..e4597dff 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/SimpleTestExtension.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Extension/SimpleTestExtension.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -47,7 +47,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class SimpleTestExtension extends Extension diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/PHPUnitConfigurationFactory.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/PHPUnitConfigurationFactory.php index 6a38a68a..4e59bed4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/PHPUnitConfigurationFactory.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/PHPUnitConfigurationFactory.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.5.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2012-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.5.0 */ class PHPUnitConfigurationFactory diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/CIUnitTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/CIUnitTransformer.php index dfaec9f6..964f5bd6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/CIUnitTransformer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/CIUnitTransformer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CIUnitTransformer extends Transformer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/CakePHPTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/CakePHPTransformer.php index e938c0e3..3ee25516 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/CakePHPTransformer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/CakePHPTransformer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class CakePHPTransformer extends Transformer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/GeneralTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/GeneralTransformer.php index 7ad3c8b4..bab66acd 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/GeneralTransformer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/GeneralTransformer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class GeneralTransformer extends Transformer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/PHPSpecTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/PHPSpecTransformer.php index 76c609d3..f03990f4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/PHPSpecTransformer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/PHPSpecTransformer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPSpecTransformer extends Transformer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/PHPUnitTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/PHPUnitTransformer.php index 9660a0da..d54f1f19 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/PHPUnitTransformer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/PHPUnitTransformer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPUnitTransformer extends Transformer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/SimpleTestTransformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/SimpleTestTransformer.php index 87387c60..ac47f5db 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/SimpleTestTransformer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/SimpleTestTransformer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class SimpleTestTransformer extends Transformer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/Transformation.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/Transformation.php index 2e024c57..b896dadf 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/Transformation.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/Transformation.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -49,7 +49,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class Transformation diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/Transformer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/Transformer.php index d2168dda..34e63a40 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/Transformer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/DependencyInjection/Transformation/Transformer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ abstract class Transformer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/DOMJUnitXMLWriter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/DOMJUnitXMLWriter.php index aeb0e359..233e2fc4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/DOMJUnitXMLWriter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/DOMJUnitXMLWriter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.10.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class DOMJUnitXMLWriter implements JUnitXMLWriterInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLDOMWriter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLDOMWriter.php deleted file mode 100644 index 71872d70..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLDOMWriter.php +++ /dev/null @@ -1,275 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2009-2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 2.10.0 - */ - -namespace Stagehand\TestRunner\JUnitXMLWriter; - -use Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLDOMWriter\TestsuiteDOMElement; -use Stagehand\TestRunner\Util\StreamWriter; - -/** - * @package Stagehand_TestRunner - * @copyright 2009-2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 2.10.0 - */ -class JUnitXMLDOMWriter implements JUnitXMLWriter -{ - protected $xmlWriter; - - /** - * @param \Stagehand\TestRunner\Util\StreamWriter - */ - protected $streamWriter; - - protected $elementStack = array(); - - /** - * @var \Stagehand\TestRunner\JUnitXMLWriter\UTF8Converter - */ - protected $utf8Converter; - - /** - */ - public function __construct() - { - $this->xmlWriter = new \DOMDocument('1.0', 'UTF-8'); - $this->utf8Converter = UTF8ConverterFactory::create(); - } - - /** - * @param \Stagehand\TestRunner\Util\StreamWriter $streamWriter - * @since Method available since Release 3.0.0 - */ - public function setStreamWriter(StreamWriter $streamWriter) - { - $this->streamWriter = $streamWriter; - } - - /** - */ - public function startTestSuites() - { - $testsuites = $this->xmlWriter->createElement('testsuites'); - $this->xmlWriter->appendChild($testsuites); - $this->elementStack[] = $testsuites; - } - - /** - * @param string $name - * @param integer $testCount - */ - public function startTestSuite($name, $testCount = null) - { - if (preg_match('/^(.+)::(.+)/', $name, $matches)) { - $name = $matches[2]; - $className = $matches[1]; - } else { - $className = $name; - } - - $testsuite = new TestsuiteDOMElement(); - $this->getCurrentTestsuite()->appendChild($testsuite); - $testsuite->setAttribute('name', $this->utf8Converter->convert($name)); - $testsuite->setAttribute('tests', 0); - $testsuite->setAttribute('assertions', 0); - $testsuite->setAttribute('failures', 0); - $testsuite->setAttribute('errors', 0); - $testsuite->setAttribute('time', sprintf('%F', 0)); - - if (strlen($className) && class_exists($className, false)) { - try { - $class = new \ReflectionClass($className); - $testsuite->setAttribute('file', $this->utf8Converter->convert($class->getFileName())); - } catch (\ReflectionException $e) { - } - } - - $this->elementStack[] = $testsuite; - } - - /** - * @param string $name - * @param mixed $test - * @param string $methodName - */ - public function startTestCase($name, $test, $methodName = null) - { - $testcase = $this->xmlWriter->createElement('testcase'); - $this->getCurrentTestsuite()->appendChild($testcase); - $testcase->setAttribute('name', $this->utf8Converter->convert($name)); - - $class = new \ReflectionClass($test); - if (is_null($methodName)) { - $methodName = $name; - } - if ($class->hasMethod($methodName)) { - $method = $class->getMethod($methodName); - $testcase->setAttribute('class', $this->utf8Converter->convert($method->getDeclaringClass()->getName())); - $testcase->setAttribute('file', $this->utf8Converter->convert($method->getDeclaringClass()->getFileName())); - $testcase->setAttribute('line', $method->getStartLine()); - } - - $this->elementStack[] = $testcase; - } - - /** - * @param string $text - * @param string $type - * @param string $file - * @param string $line - * @param string $message - */ - public function writeError($text, $type = null, $file = null, $line = null, $message = null) - { - $this->writeFailureOrError($text, $type, 'error'); - } - - /** - * @param string $text - * @param string $type - * @param string $file - * @param string $line - * @param string $message - */ - public function writeFailure($text, $type = null, $file = null, $line = null, $message = null) - { - $this->writeFailureOrError($text, $type, 'failure'); - } - - /** - * @param float $time - * @param integer $assertionCount - */ - public function endTestCase($time, $assertionCount = null) - { - $testCase = array_pop($this->elementStack); - if (!is_null($assertionCount)) { - $testCase->setAttribute('assertions', $assertionCount); - } - $testCase->setAttribute('time', $time); - $this->getCurrentTestsuite()->addAssertionCount($assertionCount); - $this->getCurrentTestsuite()->addTime($time); - $this->getCurrentTestsuite()->increaseTestCount(); - } - - /** - */ - public function endTestSuite() - { - $suite = array_pop($this->elementStack); - if ($this->getCurrentTestsuite() instanceof TestsuiteDOMElement) { - $this->getCurrentTestsuite()->addTestCount($suite->getAttribute('tests')); - if ($suite->hasAttribute('assertions')) { - $this->getCurrentTestsuite()->addAssertionCount( - $suite->getAttribute('assertions') - ); - } - $this->getCurrentTestsuite()->addErrorCount($suite->getAttribute('errors')); - $this->getCurrentTestsuite()->addFailureCount($suite->getAttribute('failures')); - $this->getCurrentTestsuite()->addTime($suite->getAttribute('time')); - } - } - - /** - */ - public function endTestSuites() - { - $this->flush(); - $this->streamWriter->close(); - } - - /** - * @param string $text - * @param string $type - * @param string $failureOrError - */ - protected function writeFailureOrError($text, $type, $failureOrError) - { - $error = $this->xmlWriter->createElement($failureOrError, htmlspecialchars($text, ENT_QUOTES, 'UTF-8')); // TODO Since the DOM implementation ignores ENT_QUOTES, single quotes and double quotes is output as is. - $this->getCurrentElement()->appendChild($error); - if (!is_null($type)) { - $error->setAttribute('type', $this->utf8Converter->convert($type)); - } - - $this->getCurrentTestsuite()->{ 'increase' . $failureOrError . 'Count' }(); - } - - protected function flush() - { - $this->streamWriter->write($this->xmlWriter->saveXML()); - } - - /** - * @return \Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLDOMWriter\TestsuiteDOMElement - */ - protected function getCurrentTestsuite() - { - if ($this->getCurrentElement()->tagName == 'testcase') { - return $this->getPreviousElement(); - } - - return $this->getCurrentElement(); - } - - /** - * @return \DOMElement - */ - protected function getCurrentElement() - { - return $this->elementStack[ count($this->elementStack) - 1 ]; - } - - /** - * @return \DOMElement - */ - protected function getPreviousElement() - { - return $this->elementStack[ count($this->elementStack) - 2 ]; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLDOMWriter/TestsuiteDOMElement.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLDOMWriter/TestsuiteDOMElement.php deleted file mode 100644 index b62c18d9..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLDOMWriter/TestsuiteDOMElement.php +++ /dev/null @@ -1,137 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2009-2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 2.10.0 - */ - -namespace Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLDOMWriter; - -/** - * @package Stagehand_TestRunner - * @copyright 2009-2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 2.10.0 - */ -class TestsuiteDOMElement extends \DOMElement -{ - /** - * @param string $name - * @param string $value - * @param string $namespaceURI - */ - public function __construct($name = null, $value = null, $namespaceURI = null) - { - parent::__construct('testsuite', $value, $namespaceURI); - } - - /** - * @param integer $testCount - */ - public function addTestCount($testCount) - { - $this->setAttribute('tests', $this->getAttribute('tests') + $testCount); - } - - public function increaseTestCount() - { - $this->addTestCount(1); - } - - /** - * @param integer $assertionCount - */ - public function addAssertionCount($assertionCount) - { - if (!$this->hasAttribute('assertions')) { - $this->setAttribute('assertions', $assertionCount); - } else { - $this->setAttribute('assertions', $this->getAttribute('assertions') + $assertionCount); - } - } - - public function increaseAssertionCount() - { - $this->addAssertionCount(1); - } - - /** - * @param integer $failureCount - */ - public function addFailureCount($failureCount) - { - $this->setAttribute('failures', $this->getAttribute('failures') + $failureCount); - } - - public function increaseFailureCount() - { - $this->addFailureCount(1); - } - - /** - * @param integer $errorCount - */ - public function addErrorCount($errorCount) - { - $this->setAttribute('errors', $this->getAttribute('errors') + $errorCount); - } - - public function increaseErrorCount() - { - $this->addErrorCount(1); - } - - /** - * @param float $time - */ - public function addTime($time) - { - if (!$this->hasAttribute('time')) { - $this->setAttribute('time', $time); - } else { - $this->setAttribute('time', $this->getAttribute('time') + $time); - } - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLStreamWriter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLStreamWriter.php deleted file mode 100644 index 6f366484..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLStreamWriter.php +++ /dev/null @@ -1,243 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2009-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 2.10.0 - */ - -namespace Stagehand\TestRunner\JUnitXMLWriter; - -use Stagehand\TestRunner\Util\StreamWriter; - -/** - * @package Stagehand_TestRunner - * @copyright 2009-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 2.10.0 - */ -class JUnitXMLStreamWriter implements JUnitXMLWriter -{ - /** - * @var \Stagehand\TestRunner\JUnitXMLWriter\XMLStreamWriter - */ - protected $xmlWriter; - - /** - * @param \Stagehand\TestRunner\Util\StreamWriter - */ - protected $streamWriter; - - /** - * @var \Stagehand\TestRunner\JUnitXMLWriter\UTF8Converter - */ - protected $utf8Converter; - - /** - */ - public function __construct() - { - $this->xmlWriter = new XMLStreamWriter(); - $this->utf8Converter = UTF8ConverterFactory::create(); - } - - /** - * @param \Stagehand\TestRunner\Util\StreamWriter $streamWriter - * @since Method available since Release 3.0.0 - */ - public function setStreamWriter(StreamWriter $streamWriter) - { - $this->streamWriter = $streamWriter; - } - - public function startTestSuites() - { - $this->xmlWriter->startElement('testsuites'); - $this->xmlWriter->closeStartTag(); - $this->flush(); - } - - /** - * @param string $name - * @param integer $testCount - */ - public function startTestSuite($name, $testCount = null) - { - if (preg_match('/^(.+)::(.+)/', $name, $matches)) { - $name = $matches[2]; - $className = $matches[1]; - } else { - $className = $name; - } - - $this->xmlWriter->startElement('testsuite'); - $this->xmlWriter->writeAttribute('name', $this->utf8Converter->convert($name)); - if (!is_null($testCount)) { - $this->xmlWriter->writeAttribute('tests', $testCount); - } - - if (strlen($className) > 0 && class_exists($className, false)) { - try { - $class = new \ReflectionClass($className); - $this->xmlWriter->writeAttribute('class', $this->utf8Converter->convert($class->getName())); - $this->xmlWriter->writeAttribute('file', $this->utf8Converter->convert($class->getFileName())); - } catch (\ReflectionException $e) { - } - } - - $this->xmlWriter->closeStartTag(); - $this->flush(); - } - - /** - * @param string $name - * @param mixed $test - * @param string $methodName - */ - public function startTestCase($name, $test, $methodName = null) - { - $this->xmlWriter->startElement('testcase'); - $this->xmlWriter->writeAttribute('name', $this->utf8Converter->convert($name)); - - $class = new \ReflectionClass($test); - if (is_null($methodName)) { - $methodName = $name; - } - if ($class->hasMethod($methodName)) { - $method = $class->getMethod($methodName); - $this->xmlWriter->writeAttribute('class', $this->utf8Converter->convert($method->getDeclaringClass()->getName())); - $this->xmlWriter->writeAttribute('method', $method->getName()); - $this->xmlWriter->writeAttribute('file', $this->utf8Converter->convert($method->getDeclaringClass()->getFileName())); - $this->xmlWriter->writeAttribute('line', $method->getStartLine()); - } - - $this->xmlWriter->closeStartTag(); - $this->flush(); - } - - /** - * @param string $text - * @param string $type - * @param string $file - * @param string $line - * @param string $message - */ - public function writeError($text, $type = null, $file = null, $line = null, $message = null) - { - $this->writeFailureOrError($text, $type, 'error', $file, $line, $message); - } - - /** - * @param string $text - * @param string $type - * @param string $file - * @param string $line - * @param string $message - */ - public function writeFailure($text, $type = null, $file = null, $line = null, $message = null) - { - $this->writeFailureOrError($text, $type, 'failure', $file, $line, $message); - } - - /** - * @param float $time - * @param integer $assertionCount - */ - public function endTestCase($time, $assertionCount = null) - { - $this->endElementAndFlush(); - } - - public function endTestSuite() - { - $this->endElementAndFlush(); - } - - public function endTestSuites() - { - $this->xmlWriter->endElement(); - $this->flush(); - $this->streamWriter->close(); - } - - /** - * @param string $text - * @param string $type - * @param string $failureOrError - * @param string $file - * @param string $line - * @param string $message - */ - protected function writeFailureOrError($text, $type, $failureOrError, $file, $line, $message) - { - $this->xmlWriter->startElement($failureOrError); - if (!is_null($type)) { - $this->xmlWriter->writeAttribute('type', $this->utf8Converter->convert($type)); - } - if (!is_null($file)) { - $this->xmlWriter->writeAttribute('file', $this->utf8Converter->convert($file)); - } - if (!is_null($line)) { - $this->xmlWriter->writeAttribute('line', $line); - } - if (!is_null($message)) { - $this->xmlWriter->writeAttribute('message', $this->utf8Converter->convert($message)); - } - $this->xmlWriter->text($this->utf8Converter->convert($text)); - $this->xmlWriter->endElement(); - - $this->flush(); - } - - protected function endElementAndFlush() - { - $this->xmlWriter->endElement(); - $this->flush(); - } - - protected function flush() - { - $this->streamWriter->write($this->xmlWriter->flush()); - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLWriterFactory.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLWriterFactory.php deleted file mode 100644 index bde327fb..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLWriterFactory.php +++ /dev/null @@ -1,119 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @link http://simpletest.org/ - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\JUnitXMLWriter; - -use Stagehand\ComponentFactory\IComponentAwareFactory; - -use Stagehand\TestRunner\Util\StreamWriter; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @link http://simpletest.org/ - * @since Class available since Release 3.0.0 - */ -class JUnitXMLWriterFactory -{ - /** - * @var boolean - */ - protected $logsResultsInRealtime; - - /** - * @var \Stagehand\ComponentFactory\IComponentAwareFactory - */ - protected $junitXMLDOMWriterFactory; - - /** - * @var \Stagehand\ComponentFactory\IComponentAwareFactory - */ - protected $junitXMLStreamWriterFactory; - - /** - * @param \Stagehand\TestRunner\Util\StreamWriter $streamWriter - * @return \Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLWriter - */ - public function create(StreamWriter $streamWriter) - { - if ($this->logsResultsInRealtime) { - $junitXMLWriter = $this->junitXMLStreamWriterFactory->create(); /* @var $junitXMLWriter \Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLWriter */ - } else { - $junitXMLWriter = $this->junitXMLDOMWriterFactory->create(); /* @var $junitXMLWriter \Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLWriter */ - } - $junitXMLWriter->setStreamWriter($streamWriter); - return $junitXMLWriter; - } - - /** - * @param boolean $logsResultsInRealtime - */ - public function setLogsResultsInRealtime($logsResultsInRealtime) - { - $this->logsResultsInRealtime = $logsResultsInRealtime; - } - - /** - * @param \Stagehand\ComponentFactory\IComponentAwareFactory $junitXMLDOMWriterFactory - */ - public function setJUnitXMLDOMWriterFactory(IComponentAwareFactory $junitXMLDOMWriterFactory) - { - $this->junitXMLDOMWriterFactory = $junitXMLDOMWriterFactory; - } - - /** - * @param \Stagehand\ComponentFactory\IComponentAwareFactory $junitXMLStreamWriterFactory - */ - public function setJUnitXMLStreamWriterFactory(IComponentAwareFactory $junitXMLStreamWriterFactory) - { - $this->junitXMLStreamWriterFactory = $junitXMLStreamWriterFactory; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLWriterInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLWriterInterface.php index 07a11fae..41770728 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLWriterInterface.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/JUnitXMLWriterInterface.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.10.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ interface JUnitXMLWriterInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/NullUTF8Converter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/NullUTF8Converter.php index 58acdafa..edf1f5cc 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/NullUTF8Converter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/NullUTF8Converter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.10.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class NullUTF8Converter extends UTF8Converter diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/StreamJUnitXMLWriter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/StreamJUnitXMLWriter.php index 619d6956..7e0ecedf 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/StreamJUnitXMLWriter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/StreamJUnitXMLWriter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.10.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class StreamJUnitXMLWriter implements JUnitXMLWriterInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/TestsuiteDOMElement.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/TestsuiteDOMElement.php index cb5e7297..e604dae9 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/TestsuiteDOMElement.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/TestsuiteDOMElement.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.10.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class TestsuiteDOMElement extends \DOMElement diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/UTF8Converter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/UTF8Converter.php index 935d3f9a..9a710012 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/UTF8Converter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/UTF8Converter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.10.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class UTF8Converter diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/UTF8ConverterFactory.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/UTF8ConverterFactory.php deleted file mode 100644 index 456cef1e..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/UTF8ConverterFactory.php +++ /dev/null @@ -1,71 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2009-2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 2.10.0 - */ - -namespace Stagehand\TestRunner\JUnitXMLWriter; - -/** - * @package Stagehand_TestRunner - * @copyright 2009-2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 2.10.0 - */ -class UTF8ConverterFactory -{ - /** - * @return \Stagehand\TestRunner\JUnitXMLWriter\UTF8Converter - */ - public static function create() - { - if (extension_loaded('mbstring')) { - return new UTF8Converter(); - } else { - return new NullUTF8Converter(); - } - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/XMLStreamWriter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/XMLStreamWriter.php index b4070e4f..321b9b17 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/XMLStreamWriter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/JUnitXMLWriter/XMLStreamWriter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.11.2 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.11.2 */ class XMLStreamWriter diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Notification/Notification.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Notification/Notification.php index de6601e9..04b1ab61 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Notification/Notification.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Notification/Notification.php @@ -33,7 +33,7 @@ * @copyright 2011 KUBO Atsuhiro * @copyright 2011 Shigenobu Nishikawa * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.18.0 */ @@ -46,7 +46,7 @@ * @copyright 2011 KUBO Atsuhiro * @copyright 2011 Shigenobu Nishikawa * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.18.0 */ class Notification diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Notification/Notifier.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Notification/Notifier.php index 286e907e..36ee0c49 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Notification/Notifier.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Notification/Notifier.php @@ -33,7 +33,7 @@ * @copyright 2011-2012 KUBO Atsuhiro * @copyright 2011 Shigenobu Nishikawa * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.18.0 */ @@ -51,7 +51,7 @@ * @copyright 2011-2012 KUBO Atsuhiro * @copyright 2011 Shigenobu Nishikawa * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.18.0 */ class Notifier diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CIUnitPreparer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CIUnitPreparer.php index 40e87a40..9050de30 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CIUnitPreparer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CIUnitPreparer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class CIUnitPreparer extends PHPUnitPreparer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CakePHPPreparer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CakePHPPreparer.php index 10aded5e..5af07349 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CakePHPPreparer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CakePHPPreparer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class CakePHPPreparer extends Preparer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CakePHPPreparer/TestRunnerShellDispatcher.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CakePHPPreparer/TestRunnerShellDispatcher.php index a3e32c20..3fc1cd72 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CakePHPPreparer/TestRunnerShellDispatcher.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/CakePHPPreparer/TestRunnerShellDispatcher.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class TestRunnerShellDispatcher extends \ShellDispatcher diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/PHPSpecPreparer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/PHPSpecPreparer.php index 7042b634..f16c6563 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/PHPSpecPreparer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/PHPSpecPreparer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.12.0 */ @@ -47,7 +47,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.12.0 */ class PHPSpecPreparer extends Preparer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/PHPUnitPreparer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/PHPUnitPreparer.php index 258aa477..f907fe43 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/PHPUnitPreparer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/PHPUnitPreparer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.12.0 */ @@ -46,7 +46,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.12.0 */ class PHPUnitPreparer extends Preparer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/Preparer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/Preparer.php index a46439bb..14eebe96 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/Preparer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/Preparer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.12.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.12.0 */ abstract class Preparer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/SimpleTestPreparer.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/SimpleTestPreparer.php index cc3b1fe2..3a9b9549 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/SimpleTestPreparer.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Preparer/SimpleTestPreparer.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class SimpleTestPreparer extends Preparer diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/AlterationMonitoring.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/AlterationMonitoring.php index 95ea0bfa..183d2dbe 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/AlterationMonitoring.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/AlterationMonitoring.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class AlterationMonitoring diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CIUnitCommandLineOptionBuilder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CIUnitCommandLineOptionBuilder.php index 0dd1d478..4b0b13e2 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CIUnitCommandLineOptionBuilder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CIUnitCommandLineOptionBuilder.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ class CIUnitCommandLineOptionBuilder extends PHPUnitCommandLineOptionBuilder diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CakePHPCommandLineOptionBuilder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CakePHPCommandLineOptionBuilder.php index 7914abf8..16d8db56 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CakePHPCommandLineOptionBuilder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CakePHPCommandLineOptionBuilder.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ class CakePHPCommandLineOptionBuilder implements CommandLineOptionBuilderInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CommandLineBuilder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CommandLineBuilder.php index ab3e8f40..232c1683 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CommandLineBuilder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CommandLineBuilder.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -49,7 +49,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ class CommandLineBuilder diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CommandLineOptionBuilderInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CommandLineOptionBuilderInterface.php index b7fc9136..ce56cd5a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CommandLineOptionBuilderInterface.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/CommandLineOptionBuilderInterface.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ interface CommandLineOptionBuilderInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/ContinuousTestRunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/ContinuousTestRunner.php index 354336e1..076ed93c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/ContinuousTestRunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/ContinuousTestRunner.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.18.0 */ @@ -54,7 +54,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.18.0 */ class ContinuousTestRunner implements TestRunnerInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/FatalError.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/FatalError.php index 497ae4c4..0625dc19 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/FatalError.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/FatalError.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class FatalError diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/PHPUnitCommandLineOptionBuilder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/PHPUnitCommandLineOptionBuilder.php index 38adaf1f..c5dbeeb4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/PHPUnitCommandLineOptionBuilder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/ContinuousTesting/PHPUnitCommandLineOptionBuilder.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ class PHPUnitCommandLineOptionBuilder implements CommandLineOptionBuilderInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/StreamException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/StreamException.php deleted file mode 100644 index c1245ef5..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/StreamException.php +++ /dev/null @@ -1,60 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Process; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class StreamException extends \RuntimeException -{ -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/StreamableProcess.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/StreamableProcess.php deleted file mode 100644 index cd9cbd3e..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/StreamableProcess.php +++ /dev/null @@ -1,142 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.1.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Process; - -/** - * @package Stagehand_TestRunner - * @copyright 2011 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.1.0 - * @since Class available since Release 3.0.0 - */ -class StreamableProcess -{ - /** - * @var string - */ - protected $command; - - /** - * @var array - */ - protected $outputStreamListeners = array(); - - /** - * @var array - */ - protected $errorStreamListeners = array(); - - /** - * @param string $command - */ - public function __construct($command) - { - $this->command = $command; - } - - /** - * @return integer - * @throws \Stagehand\TestRunner\Process\StreamException - */ - public function run() - { - $process = proc_open( - $this->command, - array(1 => array('pipe', 'w'), 2 => array('pipe', 'w')), - $pipes - ); - stream_set_blocking($pipes[1], 0); - stream_set_blocking($pipes[2], 0); - - while (!feof($pipes[1]) || !feof($pipes[2])) { - $readingStreams = array($pipes[1], $pipes[2]); - $writingStreams = null; - $exceptStreams = null; - $changedStreamCount = stream_select($readingStreams, $writingStreams, $exceptStreams, 1); - if ($changedStreamCount === false) { - throw new StreamException('An error is raised during waiting for any data to be written to the standard output or standard error.'); - } - - if ($changedStreamCount > 0) { - foreach ($readingStreams as $readingStream) { - $output = fread($readingStream, 8192); - if ($readingStream === $pipes[1]) { - foreach ($this->outputStreamListeners as $outputStreamListener) { - call_user_func($outputStreamListener, $output); - } - } elseif ($readingStream === $pipes[2]) { - foreach ($this->errorStreamListeners as $errorStreamListener) { - call_user_func($errorStreamListener, $output); - } - } - } - } - } - - fclose($pipes[1]); - fclose($pipes[2]); - return proc_close($process); - } - - /** - * @param \Closure $outputStreamListener - */ - public function addOutputStreamListener(\Closure $outputStreamListener) - { - $this->outputStreamListeners[] = $outputStreamListener; - } - - /** - * @param \Closure $errorStreamListener - */ - public function addErrorStreamListener(\Closure $errorStreamListener) - { - $this->errorStreamListeners[] = $errorStreamListener; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/TestRunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/TestRunner.php index 8f17f3ef..0a031a20 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/TestRunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/TestRunner.php @@ -33,7 +33,7 @@ * @copyright 2010-2013 KUBO Atsuhiro * @copyright 2011 Shigenobu Nishikawa * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -50,7 +50,7 @@ * @copyright 2010-2013 KUBO Atsuhiro * @copyright 2011 Shigenobu Nishikawa * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class TestRunner implements TestRunnerInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/TestRunnerInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/TestRunnerInterface.php index a91063d2..d18d4869 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/TestRunnerInterface.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Process/TestRunnerInterface.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ interface TestRunnerInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/CIUnit/testNonExistingDataProvider.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/CIUnit/testNonExistingDataProvider.php index 4ea5cb0c..b066c0b1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/CIUnit/testNonExistingDataProvider.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/CIUnit/testNonExistingDataProvider.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.5.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.5.0 */ class testNonExistingDataProvider extends \CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/CIUnitWithAnyPatternTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/CIUnitWithAnyPatternTest.php index fc7eeb57..bb0d204d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/CIUnitWithAnyPatternTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/CIUnitWithAnyPatternTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testStagehand_TestRunner_CIUnitWithAnyPattern extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpec/DescriptionOfBehaviourAndExpectationSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpec/DescriptionOfBehaviourAndExpectationSpec.php index 247b9d3e..8845244e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpec/DescriptionOfBehaviourAndExpectationSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpec/DescriptionOfBehaviourAndExpectationSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Describe振舞やエクスペクテーションã®èª¬æ˜Ž extends Context @@ -62,7 +62,7 @@ public function itã¯æ—¥æœ¬èªžã‚’使用ã§ãã‚‹ã“ã¨() * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class 日本語Spec extends Context @@ -79,7 +79,7 @@ public function itShouldPass() * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class EnglishSpec extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecCommon.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecCommon.php index 477f0d34..86ff1c79 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecCommon.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecCommon.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.2.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.2.0 */ abstract class PHPSpecCommon extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecErrorAndPassSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecErrorAndPassSpec.php index 9c2dc9db..0c324a88 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecErrorAndPassSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecErrorAndPassSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class DescribePhpSpecErrorAndPass extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecErrorSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecErrorSpec.php index e178e380..d780c2f8 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecErrorSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecErrorSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class DescribePhpSpecError extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecExceptionSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecExceptionSpec.php index 3a6b586a..60c4b4ee 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecExceptionSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecExceptionSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class DescribePhpSpecException extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecExtendedSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecExtendedSpec.php index 1f15df30..b357fd0f 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecExtendedSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecExtendedSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.2.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.2.0 */ class DescribePhpSpecExtended extends PHPSpecCommon diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecFailureAndPassSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecFailureAndPassSpec.php index 9869fc47..a9ecd5c4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecFailureAndPassSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecFailureAndPassSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class DescribePhpSpecFailureAndPass extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecFailureSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecFailureSpec.php index 165ad8ee..e2dfe921 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecFailureSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecFailureSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class DescribePhpSpecFailure extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecMultipleClassesSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecMultipleClassesSpec.php index a08997b6..caa3bb05 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecMultipleClassesSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecMultipleClassesSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class DescribePhpSpecMultipleClasses1 extends Context @@ -63,7 +63,7 @@ public function itShouldPass2() * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class DescribePhpSpecMultipleClasses2 extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecMultipleFailuresSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecMultipleFailuresSpec.php index f9034bdb..108c4ac6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecMultipleFailuresSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecMultipleFailuresSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class DescribePhpSpecMultipleFailures extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecNoSpecsSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecNoSpecsSpec.php index f99adc61..d5e46cbd 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecNoSpecsSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecNoSpecsSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.7.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.7.0 */ class DescribePhpSpecNoSpecs extends Context {} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecPassSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecPassSpec.php index 89fd3522..98759d50 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecPassSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecPassSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class DescribePhpSpecPass extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecPendingSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecPendingSpec.php index 02e41666..b5491ea8 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecPendingSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecPendingSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class DescribePhpSpecPending extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecSpec/PHPSpecPassSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecSpec/PHPSpecPassSpec.php index f9143900..36bef52f 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecSpec/PHPSpecPassSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecSpec/PHPSpecPassSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class DescribePhpSpecSpecPass extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecWithoutNamespaceSpec.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecWithoutNamespaceSpec.php index 595576b5..5aadb5ca 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecWithoutNamespaceSpec.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPSpecWithoutNamespaceSpec.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.4 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.4 */ class DescribePhpSpecWithoutNamespace extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnit/NonExistingDataProviderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnit/NonExistingDataProviderTest.php index a4e9b960..63b5d763 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnit/NonExistingDataProviderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnit/NonExistingDataProviderTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.5.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.5.0 */ class NonExistingDataProviderTest extends \PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitCommonTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitCommonTest.php index ae249f9a..2bdd2862 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitCommonTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitCommonTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.2.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.2.0 */ abstract class Stagehand_TestRunner_PHPUnitCommonTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitDataProviderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitDataProviderTest.php index 8d9b7da9..d0d75536 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitDataProviderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitDataProviderTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.10.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class Stagehand_TestRunner_PHPUnitDataProviderTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitDependsTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitDependsTest.php index 474557bd..21b46cd0 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitDependsTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitDependsTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Stagehand_TestRunner_PHPUnitDependsTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitErrorAndPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitErrorAndPassTest.php index 6d624f91..9fc25422 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitErrorAndPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitErrorAndPassTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.11.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.11.0 */ class Stagehand_TestRunner_PHPUnitErrorAndPassTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitErrorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitErrorTest.php index 216f9c18..80ccc4ff 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitErrorTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitErrorTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Stagehand_TestRunner_PHPUnitErrorTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitExceptionTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitExceptionTest.php index 366bc170..a86d227f 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitExceptionTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitExceptionTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class Stagehand_TestRunner_PHPUnitExceptionTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitExtendedTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitExtendedTest.php index 224a5fd5..26812632 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitExtendedTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitExtendedTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.2.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.2.0 */ class Stagehand_TestRunner_PHPUnitExtendedTest extends Stagehand_TestRunner_PHPUnitCommonTest diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureAndPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureAndPassTest.php index e703e1a8..356cd868 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureAndPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureAndPassTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.11.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.11.0 */ class Stagehand_TestRunner_PHPUnitFailureAndPassTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureInAnonymousFunctionTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureInAnonymousFunctionTest.php index 06d4f12b..c9a3bf70 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureInAnonymousFunctionTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureInAnonymousFunctionTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class Stagehand_TestRunner_PHPUnitFailureInAnonymousFunctionTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureTest.php index a7e28b2f..cb3a3750 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitFailureTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Stagehand_TestRunner_PHPUnitFailureTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitGroupsTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitGroupsTest.php index 6952a72d..4d7c4f17 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitGroupsTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitGroupsTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.17.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.17.0 */ class Stagehand_TestRunner_PHPUnitGroupsTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitIncompleteTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitIncompleteTest.php index ae2e58bf..1bc756cb 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitIncompleteTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitIncompleteTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 1.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 1.0.0 */ class Stagehand_TestRunner_PHPUnitIncompleteTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitIncompleteWithDataProviderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitIncompleteWithDataProviderTest.php index 53c4ed80..cf047099 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitIncompleteWithDataProviderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitIncompleteWithDataProviderTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.11.1 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.11.1 */ class Stagehand_TestRunner_PHPUnitIncompleteWithDataProviderTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleClassesTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleClassesTest.php index f87423dd..1465fccb 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleClassesTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleClassesTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.8.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class Stagehand_TestRunner_PHPUnitMultipleClassesTest {} @@ -52,7 +52,7 @@ class Stagehand_TestRunner_PHPUnitMultipleClassesTest {} * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.8.0 * * @group one @@ -82,7 +82,7 @@ public function pass2() * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.8.0 */ class Stagehand_TestRunner_PHPUnitMultipleClasses2Test extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleClassesWithNamespaceTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleClassesWithNamespaceTest.php index bc78b34e..cb87e679 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleClassesWithNamespaceTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleClassesWithNamespaceTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.15.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.15.0 */ class PHPUnitMultipleClassesWithNamespaceTest {} @@ -52,7 +52,7 @@ class PHPUnitMultipleClassesWithNamespaceTest {} * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.15.0 */ class PHPUnitMultipleClassesWithNamespace1Test extends \PHPUnit_Framework_TestCase @@ -78,7 +78,7 @@ public function pass2() * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.15.0 */ class PHPUnitMultipleClassesWithNamespace2Test extends \PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleFailuresTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleFailuresTest.php index 55540f33..bcaeb602 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleFailuresTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitMultipleFailuresTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_PHPUnitMultipleFailuresTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitNoTestsTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitNoTestsTest.php index d0496967..b42a3f33 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitNoTestsTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitNoTestsTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.7.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.7.0 */ class Stagehand_TestRunner_PHPUnitNoTestsTest extends PHPUnit_Framework_TestCase {} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitOutputTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitOutputTest.php index a2d88000..e3121411 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitOutputTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitOutputTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.1.1 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.1.1 */ class PHPUnitOutputTest extends \PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitPassTest.php index 6874278a..c2bf0a48 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitPassTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Stagehand_TestRunner_PHPUnitPassTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSkippedTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSkippedTest.php index 271c9e9a..637dc653 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSkippedTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSkippedTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Stagehand_TestRunner_PHPUnitSkippedTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSkippedWithDataProviderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSkippedWithDataProviderTest.php index 1b96642f..3bd00b08 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSkippedWithDataProviderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSkippedWithDataProviderTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.11.1 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.11.1 */ class Stagehand_TestRunner_PHPUnitSkippedWithDataProviderTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSpecialCharactersInFailureMessageTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSpecialCharactersInFailureMessageTest.php index a9622ec1..7dbf2a01 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSpecialCharactersInFailureMessageTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitSpecialCharactersInFailureMessageTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_PHPUnitSpecialCharactersInFailureMessageTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTest1/PHPUnitPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTest1/PHPUnitPassTest.php index 1afff6fc..8a1efced 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTest1/PHPUnitPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTest1/PHPUnitPassTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Stagehand_TestRunner_PHPUnitTest1_PHPUnitPassTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTest2/PHPUnitPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTest2/PHPUnitPassTest.php index e4d93b9f..62dd2669 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTest2/PHPUnitPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTest2/PHPUnitPassTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.9.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.9.0 */ class Stagehand_TestRunner_PHPUnitTest2_PHPUnitPassTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTrait.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTrait.php index 821e2811..3646fd96 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTrait.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTrait.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ trait PHPUnitTrait diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTraitTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTraitTest.php index 85662065..cb70c12c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTraitTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitTraitTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.6.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.6.0 */ class PHPUnitTraitTest extends \PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitUTF8ConversionTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitUTF8ConversionTest.php index 72e39876..6610f07e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitUTF8ConversionTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/PHPUnitUTF8ConversionTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.10.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class Stagehand_TestRunner_EUCJP¤«¤éUTF8¤Ø¤ÎÊÑ´¹Test extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestCommonTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestCommonTest.php index 85ec4198..a3040fc9 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestCommonTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestCommonTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.2.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.2.0 */ abstract class Stagehand_TestRunner_SimpleTestCommonTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestErrorAndPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestErrorAndPassTest.php index e7be13f9..50c5a853 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestErrorAndPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestErrorAndPassTest.php @@ -33,7 +33,7 @@ * @copyright 2010 KUMAKURA Yousuke * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.11.0 */ @@ -44,7 +44,7 @@ * @copyright 2010 KUMAKURA Yousuke * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.11.0 */ class Stagehand_TestRunner_SimpleTestErrorAndPassTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestErrorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestErrorTest.php index 19a83dd1..c6bea3e8 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestErrorTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestErrorTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Stagehand_TestRunner_SimpleTestErrorTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestExtendedTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestExtendedTest.php index 06b981ad..35017ae1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestExtendedTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestExtendedTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.2.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.2.0 */ class Stagehand_TestRunner_SimpleTestExtendedTest extends Stagehand_TestRunner_SimpleTestCommonTest diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureAndPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureAndPassTest.php index cffa513c..89e3feb5 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureAndPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureAndPassTest.php @@ -33,7 +33,7 @@ * @copyright 2010 KUMAKURA Yousuke * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.11.0 */ @@ -44,7 +44,7 @@ * @copyright 2010 KUMAKURA Yousuke * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.11.0 */ class Stagehand_TestRunner_SimpleTestFailureAndPassTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureInAnonymousFunctionTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureInAnonymousFunctionTest.php index 0ab233bb..2ebcdf18 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureInAnonymousFunctionTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureInAnonymousFunctionTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class Stagehand_TestRunner_SimpleTestFailureInAnonymousFunctionTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureTest.php index 6a24f84d..410d5cd2 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestFailureTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Stagehand_TestRunner_SimpleTestFailureTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleClassesTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleClassesTest.php index f5ac8aac..350a1cfb 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleClassesTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleClassesTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.10.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class Stagehand_TestRunner_SimpleTestMultipleClassesTest {} @@ -50,7 +50,7 @@ class Stagehand_TestRunner_SimpleTestMultipleClassesTest {} * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class Stagehand_TestRunner_SimpleTestMultipleClasses1Test extends UnitTestCase @@ -72,7 +72,7 @@ public function testPass2() * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class Stagehand_TestRunner_SimpleTestMultipleClasses2Test extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleClassesWithNamespaceTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleClassesWithNamespaceTest.php index 20281151..e8747b14 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleClassesWithNamespaceTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleClassesWithNamespaceTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.15.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.15.0 */ class SimpleTestMultipleClassesWithNamespaceTest {} @@ -50,7 +50,7 @@ class SimpleTestMultipleClassesWithNamespaceTest {} * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.15.0 */ class SimpleTestMultipleClassesWithNamespace1Test extends \UnitTestCase @@ -70,7 +70,7 @@ public function testPass2() * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.15.0 */ class SimpleTestMultipleClassesWithNamespace2Test extends \UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleFailuresTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleFailuresTest.php index b215768a..f30ff0bb 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleFailuresTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestMultipleFailuresTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_SimpleTestMultipleFailuresTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestNoTestsTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestNoTestsTest.php index c7f0cdcf..b50c4259 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestNoTestsTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestNoTestsTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.7.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.7.0 */ class Stagehand_TestRunner_SimpleTestNoTestsTest extends UnitTestCase {} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestPassTest.php index 52397e87..bc9e7700 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestPassTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Stagehand_TestRunner_SimpleTestPassTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestSkipClassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestSkipClassTest.php index 15a07e3b..dad32833 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestSkipClassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestSkipClassTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.17.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.17.0 */ class Stagehand_TestRunner_SimpleTestSkipClassTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestSkipMethodTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestSkipMethodTest.php index 0513a557..5bcac52a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestSkipMethodTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestSkipMethodTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.17.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.17.0 */ class Stagehand_TestRunner_SimpleTestSkipMethodTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestTest/SimpleTestPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestTest/SimpleTestPassTest.php index a853e0cc..b7452109 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestTest/SimpleTestPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/SimpleTestTest/SimpleTestPassTest.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.0.0 */ class Stagehand_TestRunner_SimpleTestTest_SimpleTestPassTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_always_called_methods.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_always_called_methods.test.php index 87e76c64..f3f1efe4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_always_called_methods.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_always_called_methods.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.2 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.2 */ class Stagehand_TestRunner_CakePHPAlwaysCalledMethodsTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_common.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_common.test.php index 4c778281..ea951f48 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_common.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_common.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ abstract class Stagehand_TestRunner_CakePHPCommonTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_error.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_error.test.php index 9eb79317..600692f7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_error.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_error.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_CakePHPErrorTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_error_and_pass.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_error_and_pass.test.php index e364af47..2216f853 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_error_and_pass.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_error_and_pass.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_CakePHPErrorAndPassTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_extended.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_extended.test.php index df05b109..5097bea6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_extended.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_extended.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class Stagehand_TestRunner_CakePHPExtendedTest extends Stagehand_TestRunner_CakePHPCommonTest diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure.test.php index 0f3e260e..27af160b 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_CakePHPFailureTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure_and_pass.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure_and_pass.test.php index 7d3ef1a4..88c9af22 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure_and_pass.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure_and_pass.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_CakePHPFailureAndPassTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure_in_anonymous_function.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure_in_anonymous_function.test.php index 6839bd29..bd75bcba 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure_in_anonymous_function.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_failure_in_anonymous_function.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class Stagehand_TestRunner_CakePHPFailureInAnonymousFunctionTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_classes.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_classes.test.php index e3a6f0d1..b2e5f1ed 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_classes.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_classes.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_CakePHPMultipleClassesTest {} @@ -48,7 +48,7 @@ class Stagehand_TestRunner_CakePHPMultipleClassesTest {} * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_CakePHPMultipleClasses1Test extends CakeTestCase @@ -68,7 +68,7 @@ public function testPass2() * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_CakePHPMultipleClasses2Test extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_classes_with_namespace.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_classes_with_namespace.test.php index dd4aa41b..46445a86 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_classes_with_namespace.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_classes_with_namespace.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.15.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.15.0 */ class CakePHPMultipleClassesWithNamespaceTest {} @@ -50,7 +50,7 @@ class CakePHPMultipleClassesWithNamespaceTest {} * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.15.0 */ class CakePHPMultipleClassesWithNamespace1Test extends \CakeTestCase @@ -70,7 +70,7 @@ public function testPass2() * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.15.0 */ class CakePHPMultipleClassesWithNamespace2Test extends \CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_failures.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_failures.test.php index dd621db0..cc9f8767 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_failures.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_multiple_failures.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_CakePHPMultipleFailuresTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_pass.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_pass.test.php index 160b6704..b98144b6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_pass.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_pass.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class Stagehand_TestRunner_CakePHPPassTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_skip_class.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_skip_class.test.php index 4f9e469f..346e6eb6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_skip_class.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_skip_class.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.17.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.17.0 */ class Stagehand_TestRunner_CakePHPSkipClassTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_skip_method.test.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_skip_method.test.php index fb858b31..6175c2b6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_skip_method.test.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/cakephp_skip_method.test.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.17.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.17.0 */ class Stagehand_TestRunner_CakePHPSkipMethodTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/spec_PHPSpecWithAnyPattern.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/spec_PHPSpecWithAnyPattern.php index 98df5004..15990aa1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/spec_PHPSpecWithAnyPattern.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/spec_PHPSpecWithAnyPattern.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class DescribePhpSpecWithAnyPattern extends Context diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitError.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitError.php index 2d24085b..7e4f894c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitError.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitError.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testStagehand_TestRunner_CIUnitError extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitErrorAndPass.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitErrorAndPass.php index a43285c1..95a2fa69 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitErrorAndPass.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitErrorAndPass.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testStagehand_TestRunner_CIUnitErrorAndPass extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitFailure.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitFailure.php index c1b85d61..b111fab7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitFailure.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitFailure.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testStagehand_TestRunner_CIUnitFailure extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitFailureAndPass.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitFailureAndPass.php index 2fcfd17c..1ea5d1c1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitFailureAndPass.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitFailureAndPass.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testStagehand_TestRunner_CIUnitFailureAndPass extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitGroups.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitGroups.php index d198681f..1fa8a72d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitGroups.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitGroups.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.17.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.17.0 */ class testStagehand_TestRunner_CIUnitGroups extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitIncomplete.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitIncomplete.php index 9cf2243f..4af19620 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitIncomplete.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitIncomplete.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testStagehand_TestRunner_CIUnitIncomplete extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleClasses.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleClasses.php index 369a416e..5cd99d87 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleClasses.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleClasses.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 * * @group one @@ -67,7 +67,7 @@ public function pass2() * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testStagehand_TestRunner_CIUnitMultipleClasses2 extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleClassesWithNamespace.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleClassesWithNamespace.php index 4d403808..5293f37b 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleClassesWithNamespace.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleClassesWithNamespace.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testCIUnitMultipleClassesWithNamespace1 extends \CIUnit_TestCase @@ -67,7 +67,7 @@ public function pass2() * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testCIUnitMultipleClassesWithNamespace2 extends \CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleFailures.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleFailures.php index 8b91204d..ccc2b965 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleFailures.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitMultipleFailures.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testStagehand_TestRunner_CIUnitMultipleFailures extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitPass.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitPass.php index a914c5b3..ada4858c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitPass.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitPass.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testStagehand_TestRunner_CIUnitPass extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitSkipped.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitSkipped.php index 06d0e853..4bdffe92 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitSkipped.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/testCIUnitSkipped.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class testStagehand_TestRunner_CIUnitSkipped extends CIUnit_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_PHPUnitWithAnyPattern.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_PHPUnitWithAnyPattern.php index c66f927c..6cbaad0c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_PHPUnitWithAnyPattern.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_PHPUnitWithAnyPattern.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class Stagehand_TestRunner_PHPUnitWithAnyPatternTest extends PHPUnit_Framework_TestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_SimpleTestWithAnyPattern.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_SimpleTestWithAnyPattern.php index 035c70b1..87c585e1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_SimpleTestWithAnyPattern.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_SimpleTestWithAnyPattern.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class Stagehand_TestRunner_SimpleTestWithAnyPatternTest extends UnitTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_cakephp_with_any_pattern.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_cakephp_with_any_pattern.php index 82af1db9..0cb002e4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_cakephp_with_any_pattern.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Resources/examples/Stagehand/TestRunner/test_cakephp_with_any_pattern.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.16.0 */ @@ -39,7 +39,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.16.0 */ class Stagehand_TestRunner_CakePHPWithAnyPatternTest extends CakeTestCase diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CIUnitRunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CIUnitRunner.php index 8b592b26..2de99259 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CIUnitRunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CIUnitRunner.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since File available since Release 2.16.0 */ @@ -42,7 +42,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since Class available since Release 2.16.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner.php index 61bca568..0ec165a9 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class CakePHPRunner extends SimpleTestRunner diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner/JUnitXMLReporter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner/JUnitXMLReporter.php index 1e98864d..5046c8d0 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner/JUnitXMLReporter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner/JUnitXMLReporter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class JUnitXMLReporter extends \Stagehand\TestRunner\Runner\SimpleTestRunner\JUnitXMLReporter diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner/MethodFilterReporter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner/MethodFilterReporter.php index e176d689..310f5450 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner/MethodFilterReporter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/CakePHPRunner/MethodFilterReporter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since File available since Release 2.14.2 */ @@ -42,7 +42,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since Class available since Release 2.14.2 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner.php index 49a907be..a6853ec3 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpspec.org/ * @since File available since Release 2.1.0 */ @@ -57,7 +57,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpspec.org/ * @since Class available since Release 2.1.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Example.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Example.php index 2fbc32a1..ddda65a6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Example.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Example.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class Example extends \PHPSpec\Specification\Example diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/ExampleFactory.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/ExampleFactory.php index 1fbf109d..a72ef5f2 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/ExampleFactory.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/ExampleFactory.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class ExampleFactory extends \PHPSpec\Specification\ExampleFactory diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/ExampleRunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/ExampleRunner.php index e433cf39..af65ae87 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/ExampleRunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/ExampleRunner.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class ExampleRunner extends \PHPSpec\Specification\ExampleRunner diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/DocumentationFormatter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/DocumentationFormatter.php index 74e7f103..7a1caa6f 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/DocumentationFormatter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/DocumentationFormatter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class DocumentationFormatter extends Documentation diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/JUnitXMLFormatter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/JUnitXMLFormatter.php index af10563d..31524f52 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/JUnitXMLFormatter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/JUnitXMLFormatter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -49,7 +49,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class JUnitXMLFormatter extends Progress diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/JUnitXMLFormatterFactory.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/JUnitXMLFormatterFactory.php deleted file mode 100644 index 43556fd4..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/JUnitXMLFormatterFactory.php +++ /dev/null @@ -1,90 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Runner\PHPSpecRunner\Formatter; - -use Stagehand\TestRunner\Core\Plugin\PluginAwareFactory; -use Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLWriterFactory; -use Stagehand\TestRunner\TestSuite\PHPSpecTestSuite; -use Stagehand\TestRunner\Util\StreamWriter; - -/** - * @package Stagehand_TestRunner - * @copyright 2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @since Class available since Release 3.0.0 - */ -class JUnitXMLFormatterFactory extends PluginAwareFactory -{ - /** - * @var \Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLWriterFactory - */ - protected $junitXMLWriterFactory; - - /** - * @param \Stagehand\TestRunner\Util\StreamWriter $streamWriter - * @param \Stagehand\TestRunner\TestSuite\PHPSpecTestSuite $testSuite - * @return \Stagehand\TestRunner\Runner\PHPSpecRunner\Formatter\JUnitXMLFormatter - */ - public function create(StreamWriter $streamWriter = null, PHPSpecTestSuite $testSuite = null) - { - $junitXMLFormatter = parent::create(); - $junitXMLFormatter->setJUnitXMLWriter($this->junitXMLWriterFactory->create($streamWriter)); - $junitXMLFormatter->setTestSuite($testSuite); - return $junitXMLFormatter; - } - - /** - * @param \Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLWriterFactory $junitXMLWriterFactory - */ - public function setJUnitXMLWriterFactory(JUnitXMLWriterFactory $junitXMLWriterFactory) - { - $this->junitXMLWriterFactory = $junitXMLWriterFactory; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/NotificationFormatter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/NotificationFormatter.php index 03492089..09d5d15d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/NotificationFormatter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/NotificationFormatter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class NotificationFormatter extends Progress diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/ProgressFormatter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/ProgressFormatter.php index fa822541..43967090 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/ProgressFormatter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/ProgressFormatter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class ProgressFormatter extends Progress diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/TerminatableFormatter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/TerminatableFormatter.php index 9a976134..381015d9 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/TerminatableFormatter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Formatter/TerminatableFormatter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class TerminatableFormatter implements Formatter diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Reporter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Reporter.php index 7575de16..70431c00 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Reporter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/Reporter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class Reporter extends \PHPSpec\Runner\Cli\Reporter diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/SpecLoader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/SpecLoader.php index 19b7a73c..8f89dc72 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/SpecLoader.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/SpecLoader.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class SpecLoader diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/SpecLoaderFactory.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/SpecLoaderFactory.php index 61c3a80d..b1f6c228 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/SpecLoaderFactory.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPSpecRunner/SpecLoaderFactory.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class SpecLoaderFactory extends Loader diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner.php index 31d9dade..d178e0d6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since File available since Release 2.1.0 */ @@ -55,7 +55,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since Class available since Release 2.1.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/DetailedProgressPrinter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/DetailedProgressPrinter.php index 6495c22a..bf6b6b32 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/DetailedProgressPrinter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/DetailedProgressPrinter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since File available since Release 1.2.0 */ @@ -46,7 +46,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since Class available since Release 1.2.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/JUnitXMLPrinter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/JUnitXMLPrinter.php index f3ced92d..0edb3d38 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/JUnitXMLPrinter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/JUnitXMLPrinter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since File available since Release 2.10.0 */ @@ -48,7 +48,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since Class available since Release 2.10.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/JUnitXMLPrinterFactory.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/JUnitXMLPrinterFactory.php deleted file mode 100644 index 8cc96a96..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/JUnitXMLPrinterFactory.php +++ /dev/null @@ -1,90 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @link http://www.phpunit.de/ - * @since File available since Release 3.0.0 - */ - -namespace Stagehand\TestRunner\Runner\PHPUnitRunner\Printer; - -use Stagehand\ComponentFactory\ComponentAwareFactory; - -use Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLWriterFactory; -use Stagehand\TestRunner\Util\StreamWriter; - -/** - * @package Stagehand_TestRunner - * @copyright 2011-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.2.0 - * @link http://www.phpunit.de/ - * @since Class available since Release 3.0.0 - */ -class JUnitXMLPrinterFactory extends ComponentAwareFactory -{ - /** - * @var \Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLWriterFactory - */ - protected $junitXMLWriterFactory; - - /** - * @param \Stagehand\TestRunner\Util\StreamWriter $streamWriter - * @return \PHPUnit_Util_Printer - */ - public function create(StreamWriter $streamWriter = null) - { - $junitXMLPrinter = parent::create(); - $junitXMLPrinter->setJUnitXMLWriter($this->junitXMLWriterFactory->create($streamWriter)); - return $junitXMLPrinter; - } - - /** - * @param \Stagehand\TestRunner\JUnitXMLWriter\JUnitXMLWriterFactory $junitXMLWriterFactory - */ - public function setJUnitXMLWriterFactory(JUnitXMLWriterFactory $junitXMLWriterFactory) - { - $this->junitXMLWriterFactory = $junitXMLWriterFactory; - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/ProgressPrinter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/ProgressPrinter.php index 80754194..634d8841 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/ProgressPrinter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/ProgressPrinter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since File available since Release 1.2.0 */ @@ -46,7 +46,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since Class available since Release 1.2.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/ResultPrinter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/ResultPrinter.php index 80e290c2..9c4d9a86 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/ResultPrinter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/ResultPrinter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since File available since Release 1.2.0 */ @@ -48,7 +48,7 @@ * @package Stagehand_TestRunner * @copyright 2007-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since Class available since Release 1.2.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/TestDoxPrinter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/TestDoxPrinter.php index e6f0f127..0d8586de 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/TestDoxPrinter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/Printer/TestDoxPrinter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since File available since Release 2.4.0 */ @@ -47,7 +47,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since Class available since Release 2.4.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestDox/Stream.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestDox/Stream.php index 1cf9d743..a9748f3c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestDox/Stream.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestDox/Stream.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.php.net/manual/ja/function.stream-wrapper-register.php * @since File available since Release 2.4.0 */ @@ -46,7 +46,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.php.net/manual/ja/function.stream-wrapper-register.php * @since Class available since Release 2.4.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestDox/TestDox.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestDox/TestDox.php index 4de52c74..eb9d82c3 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestDox/TestDox.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestDox/TestDox.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.4.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.4.0 */ class TestDox diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestRunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestRunner.php index 4d8a0fc8..bcfb8102 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestRunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/PHPUnitRunner/TestRunner.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.10.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.10.0 */ class TestRunner extends \PHPUnit_TextUI_TestRunner diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/Runner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/Runner.php index a18b2b14..3f78a010 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/Runner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/Runner.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.3.0 */ @@ -51,7 +51,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.3.0 */ abstract class Runner diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner.php index c934f624..44b9f225 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner.php @@ -35,7 +35,7 @@ * @copyright 2007-2012 KUBO Atsuhiro * @copyright 2010 KUMAKURA Yousuke * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since File available since Release 2.1.0 */ @@ -56,7 +56,7 @@ * @copyright 2007-2012 KUBO Atsuhiro * @copyright 2010 KUMAKURA Yousuke * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since Class available since Release 2.1.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/ClassFilterReporter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/ClassFilterReporter.php index 1f71bb25..59681dfa 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/ClassFilterReporter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/ClassFilterReporter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since File available since Release 2.10.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since Class available since Release 2.10.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/JUnitXMLReporter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/JUnitXMLReporter.php index 20431862..10ffc747 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/JUnitXMLReporter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/JUnitXMLReporter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since File available since Release 2.10.0 */ @@ -46,7 +46,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since Class available since Release 2.10.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/JUnitXMLReporterFactory.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/JUnitXMLReporterFactory.php index 0fe2d184..e09326be 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/JUnitXMLReporterFactory.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/JUnitXMLReporterFactory.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since File available since Release 3.0.0 */ @@ -46,7 +46,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since Class available since Release 3.0.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/MethodFilterReporter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/MethodFilterReporter.php index 4df6164b..7d79df5d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/MethodFilterReporter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/MethodFilterReporter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since File available since Release 2.10.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since Class available since Release 2.10.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/StopOnFailureReporter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/StopOnFailureReporter.php index 223f25ff..be1da527 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/StopOnFailureReporter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/StopOnFailureReporter.php @@ -33,7 +33,7 @@ * @copyright 2010 KUMAKURA Yousuke * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since File available since Release 2.11.0 */ @@ -45,7 +45,7 @@ * @copyright 2010 KUMAKURA Yousuke * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since Class available since Release 2.11.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/TextReporter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/TextReporter.php index 09987e39..6f688eb3 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/TextReporter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Runner/SimpleTestRunner/TextReporter.php @@ -32,7 +32,7 @@ * @copyright 2010 KUMAKURA Yousuke * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -48,7 +48,7 @@ * @copyright 2010 KUMAKURA Yousuke * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class TextReporter extends \TextReporter diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/CakePHPTestSuite.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/CakePHPTestSuite.php index 35aeec4b..601a8462 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/CakePHPTestSuite.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/CakePHPTestSuite.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.14.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2010-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.14.0 */ class CakePHPTestSuite extends SimpleTestTestSuite diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPSpecTestSuite.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPSpecTestSuite.php index 7bcc823f..8432b980 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPSpecTestSuite.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPSpecTestSuite.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -46,7 +46,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class PHPSpecTestSuite diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPUnitGroupFilterTestSuite.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPUnitGroupFilterTestSuite.php index 0b195ff1..e1127b86 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPUnitGroupFilterTestSuite.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPUnitGroupFilterTestSuite.php @@ -33,7 +33,7 @@ * @copyright 2011-2012 KUBO Atsuhiro * @copyright 2012 tsyk goto * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since File available since Release 2.17.0 */ @@ -45,7 +45,7 @@ * @copyright 2011-2012 KUBO Atsuhiro * @copyright 2012 tsyk goto * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://www.phpunit.de/ * @since Class available since Release 2.17.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPUnitMethodFilterTestSuite.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPUnitMethodFilterTestSuite.php deleted file mode 100644 index aebe4b34..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/PHPUnitMethodFilterTestSuite.php +++ /dev/null @@ -1,104 +0,0 @@ -, - * 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. - * - * 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 Stagehand_TestRunner - * @copyright 2009-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.0.2 - * @link http://www.phpunit.de/ - * @since File available since Release 2.7.0 - */ - -namespace Stagehand\TestRunner\TestSuite; - -use Stagehand\TestRunner\Core\TestTargets; - -/** - * @package Stagehand_TestRunner - * @copyright 2009-2012 KUBO Atsuhiro - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.0.2 - * @link http://www.phpunit.de/ - * @since Class available since Release 2.7.0 - */ -class PHPUnitMethodFilterTestSuite extends \PHPUnit_Framework_TestSuite -{ - /** - * @var \Stagehand\TestRunner\Core\TestTargets - * @since Property available since Release 3.0.0 - */ - protected $testTargets; - - /** - * @param \ReflectionClass $theClass - * @param \Stagehand\TestRunner\Core\TestTargets $testTargets - */ - public function __construct(\ReflectionClass $theClass, TestTargets $testTargets) - { - $this->testTargets = $testTargets; - parent::__construct($theClass); - } - - /** - * @param \PHPUnit_Framework_Test $test - * @param array $groups - */ - public function addTest(\PHPUnit_Framework_Test $test, $groups = array()) - { - if ($test instanceof \PHPUnit_Framework_Warning - && preg_match('/^No tests found in class/', $test->getMessage()) - ) { - return; - } - - parent::addTest($test, $groups); - } - - /** - * @since Method available since Release 3.0.0 - */ - protected function addTestMethod(\ReflectionClass $class, \ReflectionMethod $method) - { - if ($this->testTargets->shouldTreatElementAsTest($class->getName(), $method->getName())) { - parent::addTestMethod($class, $method); - } - } -} - -/* - * Local Variables: - * mode: php - * coding: iso-8859-1 - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * indent-tabs-mode: nil - * End: - */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/SimpleTestTestSuite.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/SimpleTestTestSuite.php index 26037f6d..50da8d32 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/SimpleTestTestSuite.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/TestSuite/SimpleTestTestSuite.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since File available since Release 2.10.0 */ @@ -44,7 +44,7 @@ * @package Stagehand_TestRunner * @copyright 2009-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @link http://simpletest.org/ * @since Class available since Release 2.10.0 */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/Coloring.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/Coloring.php index 7e163f87..6e144cfe 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/Coloring.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/Coloring.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.4.0 */ @@ -45,7 +45,7 @@ * @package Stagehand_TestRunner * @copyright 2008-2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.4.0 */ class Coloring diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/ErrorReporting.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/ErrorReporting.php index f877cfdb..d7ca2637 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/ErrorReporting.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/ErrorReporting.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class ErrorReporting diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FailureTrace.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FailureTrace.php index 15bcd4b5..ba43d700 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FailureTrace.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FailureTrace.php @@ -33,7 +33,7 @@ * @copyright 2012 KUBO Atsuhiro * @copyright 2013 tsyk goto * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -44,7 +44,7 @@ * @copyright 2012 KUBO Atsuhiro * @copyright 2013 tsyk goto * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class FailureTrace diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FileStreamWriter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FileStreamWriter.php index d024ca28..482c9ea7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FileStreamWriter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FileStreamWriter.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class FileStreamWriter implements StreamWriterInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FileSystem.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FileSystem.php index f90db0ce..3e0fbf8e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FileSystem.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/FileSystem.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.18.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.18.0 */ class FileSystem diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/LegacyProxy.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/LegacyProxy.php index a0a252e8..b6ffb05e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/LegacyProxy.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/LegacyProxy.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ class LegacyProxy diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/OS.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/OS.php index 5f40b4df..c40e0792 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/OS.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/OS.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.1 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.1 */ class OS diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/OutputBuffering.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/OutputBuffering.php index f9a72788..3d8131fa 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/OutputBuffering.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/OutputBuffering.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.19.0 */ @@ -43,7 +43,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.19.0 */ class OutputBuffering diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/StreamWriterInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/StreamWriterInterface.php index fbb3d96c..b52f3b02 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/StreamWriterInterface.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/StreamWriterInterface.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011, 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 3.0.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011, 2013 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 3.0.0 */ interface StreamWriterInterface diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/String.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/String.php index 8b6020e6..e21786c2 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/String.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Stagehand/TestRunner/Util/String.php @@ -31,7 +31,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since File available since Release 2.18.0 */ @@ -41,7 +41,7 @@ * @package Stagehand_TestRunner * @copyright 2011-2012 KUBO Atsuhiro * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 3.6.0 + * @version Release: 3.6.1 * @since Class available since Release 2.18.0 */ class String diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/.gitattributes b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/.gitattributes deleted file mode 100644 index 80481513..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/Tests export-ignore -phpunit.xml.dist export-ignore diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/.gitignore b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/.gitignore index d1502b08..44de97a3 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/.gitignore +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ApcClassLoader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ApcClassLoader.php index 0c99e6ad..c4c156f7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ApcClassLoader.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ApcClassLoader.php @@ -42,28 +42,38 @@ class ApcClassLoader { private $prefix; - private $classFinder; + + /** + * The class loader object being decorated. + * + * @var \Symfony\Component\ClassLoader\ClassLoader + * A class loader object that implements the findFile() method. + */ + protected $decorated; /** * Constructor. * - * @param string $prefix A prefix to create a namespace in APC - * @param object $classFinder An object that implements findFile() method. + * @param string $prefix The APC namespace prefix to use. + * @param object $decorated A class loader object that implements the findFile() method. + * + * @throws \RuntimeException + * @throws \InvalidArgumentException * * @api */ - public function __construct($prefix, $classFinder) + public function __construct($prefix, $decorated) { if (!extension_loaded('apc')) { throw new \RuntimeException('Unable to use ApcClassLoader as APC is not enabled.'); } - if (!method_exists($classFinder, 'findFile')) { + if (!method_exists($decorated, 'findFile')) { throw new \InvalidArgumentException('The class finder must implement a "findFile" method.'); } $this->prefix = $prefix; - $this->classFinder = $classFinder; + $this->decorated = $decorated; } /** @@ -110,9 +120,18 @@ public function loadClass($class) public function findFile($class) { if (false === $file = apc_fetch($this->prefix.$class)) { - apc_store($this->prefix.$class, $file = $this->classFinder->findFile($class)); + apc_store($this->prefix.$class, $file = $this->decorated->findFile($class)); } return $file; } + + /** + * Passes through all unknown calls onto the decorated object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->decorated, $method), $args); + } + } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php index 379fbe4a..023f7ba1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php @@ -69,6 +69,8 @@ class ApcUniversalClassLoader extends UniversalClassLoader * * @param string $prefix A prefix to create a namespace in APC * + * @throws \RuntimeException + * * @api */ public function __construct($prefix) diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ClassCollectionLoader.php index 59318eac..1de202a5 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -104,14 +104,14 @@ public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', file_get_contents($class->getFileName())); - // add namespace declaration for global code + // fakes namespace declaration for global code if (!$class->inNamespace()) { - $c = "\nnamespace\n{\n".self::stripComments($c)."\n}\n"; - } else { - $c = self::fixNamespaceDeclarations('getName()] = true; - - array_unshift($classes, $trait); + foreach (self::resolveDependencies(self::computeTraitDeps($c), $c) as $trait) { + if ($trait !== $c) { + $traits[] = $trait; + } } } } - return array_merge(self::getInterfaces($class), $classes); + return array_merge(self::getInterfaces($class), $traits, $classes); } private static function getInterfaces(\ReflectionClass $class) @@ -308,26 +312,54 @@ private static function getInterfaces(\ReflectionClass $class) return $classes; } - private static function getTraits(\ReflectionClass $class) + private static function computeTraitDeps(\ReflectionClass $class) { $traits = $class->getTraits(); - $classes = array(); + $deps = array($class->getName() => $traits); while ($trait = array_pop($traits)) { if ($trait->isUserDefined() && !isset(self::$seen[$trait->getName()])) { - $classes[] = $trait; - - $traits = array_merge($traits, $trait->getTraits()); + self::$seen[$trait->getName()] = true; + $traitDeps = $trait->getTraits(); + $deps[$trait->getName()] = $traitDeps; + $traits = array_merge($traits, $traitDeps); } } - return $classes; + return $deps; } /** - * This method is only useful for testing. + * Dependencies resolution. + * + * This function does not check for circular dependencies as it should never + * occur with PHP traits. + * + * @param array $tree The dependency tree + * @param \ReflectionClass $node The node + * @param \ArrayObject $resolved An array of already resolved dependencies + * @param \ArrayObject $unresolved An array of dependencies to be resolved + * + * @return \ArrayObject The dependencies for the given node + * + * @throws \RuntimeException if a circular dependency is detected */ - public static function enableTokenizer($bool) + private static function resolveDependencies(array $tree, $node, \ArrayObject $resolved = null, \ArrayObject $unresolved = null) { - self::$useTokenizer = (Boolean) $bool; + if (null === $resolved) { + $resolved = new \ArrayObject(); + } + if (null === $unresolved) { + $unresolved = new \ArrayObject(); + } + $nodeName = $node->getName(); + $unresolved[$nodeName] = $node; + foreach ($tree[$nodeName] as $dependency) { + if (!$resolved->offsetExists($dependency->getName())) { + self::resolveDependencies($tree, $dependency, $resolved, $unresolved); + } + } + $resolved[$nodeName] = $node; + unset($unresolved[$nodeName]); + return $resolved; } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/DebugClassLoader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/DebugClassLoader.php index dbfb5ab1..d8de9363 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/DebugClassLoader.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/DebugClassLoader.php @@ -69,12 +69,26 @@ public function unregister() spl_autoload_unregister(array($this, 'loadClass')); } + /** + * Finds a file by class name + * + * @param string $class A class name to resolve to file + * + * @return string|null + */ + public function findFile($class) + { + return $this->classFinder->findFile($class); + } + /** * Loads the given class or interface. * * @param string $class The name of the class * * @return Boolean|null True, if loaded + * + * @throws \RuntimeException */ public function loadClass($class) { @@ -82,6 +96,10 @@ public function loadClass($class) require $file; if (!class_exists($class, false) && !interface_exists($class, false) && (!function_exists('trait_exists') || !trait_exists($class, false))) { + if (false !== strpos($class, '/')) { + throw new \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class)); + } + throw new \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file)); } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/LICENSE deleted file mode 100644 index cdffe7ae..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2012 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/README.md deleted file mode 100644 index bdfcb8e2..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/README.md +++ /dev/null @@ -1,60 +0,0 @@ -ClassLoader Component -===================== - -ClassLoader loads your project classes automatically if they follow some -standard PHP conventions. - -The Universal ClassLoader is able to autoload classes that implement the PSR-0 -standard or the PEAR naming convention. - -First, register the autoloader: - - require_once __DIR__.'/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; - - use Symfony\Component\ClassLoader\UniversalClassLoader; - - $loader = new UniversalClassLoader(); - $loader->register(); - -Then, register some namespaces with the `registerNamespace()` method: - - $loader->registerNamespace('Symfony', __DIR__.'/src'); - $loader->registerNamespace('Monolog', __DIR__.'/vendor/monolog/src'); - -The `registerNamespace()` method takes a namespace prefix and a path where to -look for the classes as arguments. - -You can also register a sub-namespaces: - - $loader->registerNamespace('Doctrine\\Common', __DIR__.'/vendor/doctrine-common/lib'); - -The order of registration is significant and the first registered namespace -takes precedence over later registered one. - -You can also register more than one path for a given namespace: - - $loader->registerNamespace('Symfony', array(__DIR__.'/src', __DIR__.'/symfony/src')); - -Alternatively, you can use the `registerNamespaces()` method to register more -than one namespace at once: - - $loader->registerNamespaces(array( - 'Symfony' => array(__DIR__.'/src', __DIR__.'/symfony/src'), - 'Doctrine\\Common' => __DIR__.'/vendor/doctrine-common/lib', - 'Doctrine' => __DIR__.'/vendor/doctrine/lib', - 'Monolog' => __DIR__.'/vendor/monolog/src', - )); - -For better performance, you can use the APC based version of the universal -class loader: - - require_once __DIR__.'/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; - require_once __DIR__.'/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php'; - - use Symfony\Component\ClassLoader\ApcUniversalClassLoader; - - $loader = new ApcUniversalClassLoader('apc.prefix.'); - -Furthermore, the component provides tools to aggregate classes into a single -file, which is especially useful to improve performance on servers that do not -provide byte caches. diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php index d5c153dd..73bdc46d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php @@ -20,6 +20,35 @@ class ClassCollectionLoaderTest extends \PHPUnit_Framework_TestCase { + public function testTraitDependencies() + { + if (version_compare(phpversion(), '5.4', '<')) { + $this->markTestSkipped('Requires PHP > 5.4'); + + return; + } + + require_once __DIR__.'/Fixtures/deps/traits.php'; + + $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); + $m = $r->getMethod('getOrderedClasses'); + $m->setAccessible(true); + + $ordered = $m->invoke('Symfony\Component\ClassLoader\ClassCollectionLoader', array('CTFoo')); + + $this->assertEquals( + array('TD', 'TC', 'TB', 'TA', 'TZ', 'CTFoo'), + array_map(function ($class) { return $class->getName(); }, $ordered) + ); + + $ordered = $m->invoke('Symfony\Component\ClassLoader\ClassCollectionLoader', array('CTBar')); + + $this->assertEquals( + array('TD', 'TZ', 'TC', 'TB', 'TA', 'CTBar'), + array_map(function ($class) { return $class->getName(); }, $ordered) + ); + } + /** * @dataProvider getDifferentOrders */ @@ -71,8 +100,8 @@ public function getDifferentOrders() */ public function testClassWithTraitsReordering(array $classes) { - if (version_compare(phpversion(), '5.4.0', '<')) { - $this->markTestSkipped('Requires PHP > 5.4.0.'); + if (version_compare(phpversion(), '5.4', '<')) { + $this->markTestSkipped('Requires PHP > 5.4'); return; } @@ -86,9 +115,9 @@ public function testClassWithTraitsReordering(array $classes) $expected = array( 'ClassesWithParents\\GInterface', 'ClassesWithParents\\CInterface', - 'ClassesWithParents\\CTrait', 'ClassesWithParents\\ATrait', 'ClassesWithParents\\BTrait', + 'ClassesWithParents\\CTrait', 'ClassesWithParents\\B', 'ClassesWithParents\\A', 'ClassesWithParents\\D', @@ -125,8 +154,20 @@ public function testFixNamespaceDeclarations($source, $expected) $this->assertEquals('assertEquals(<< realpath(__DIR__).'/Fixtures/Namespaced/Bar.php', - 'Namespaced\\Foo' => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php', - 'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php', + 'Namespaced\\Bar' => realpath(__DIR__).'/Fixtures/Namespaced/Bar.php', + 'Namespaced\\Foo' => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php', + 'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php', + 'Namespaced\\WithComments' => realpath(__DIR__).'/Fixtures/Namespaced/WithComments.php', ) ), array(__DIR__.'/Fixtures/beta/NamespaceCollision', array( @@ -84,9 +85,10 @@ public function getTestCreateMapTests() 'NamespaceCollision\\C\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Foo.php', )), array(__DIR__.'/Fixtures/Pearlike', array( - 'Pearlike_Foo' => realpath(__DIR__).'/Fixtures/Pearlike/Foo.php', - 'Pearlike_Bar' => realpath(__DIR__).'/Fixtures/Pearlike/Bar.php', - 'Pearlike_Baz' => realpath(__DIR__).'/Fixtures/Pearlike/Baz.php', + 'Pearlike_Foo' => realpath(__DIR__).'/Fixtures/Pearlike/Foo.php', + 'Pearlike_Bar' => realpath(__DIR__).'/Fixtures/Pearlike/Bar.php', + 'Pearlike_Baz' => realpath(__DIR__).'/Fixtures/Pearlike/Baz.php', + 'Pearlike_WithComments' => realpath(__DIR__).'/Fixtures/Pearlike/WithComments.php', )), array(__DIR__.'/Fixtures/classmap', array( 'Foo\\Bar\\A' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php new file mode 100644 index 00000000..e6f87c65 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Namespaced; + +class WithComments +{ + /** @Boolean */ + public static $loaded = true; +} + +$string = 'string shoult not be modified'; + + +$heredoc = << + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +class Pearlike_WithComments +{ + /** @Boolean */ + public static $loaded = true; +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php new file mode 100644 index 00000000..a5537ac9 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/Fixtures/deps/traits.php @@ -0,0 +1,36 @@ +registerNamespace('Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerPrefix('Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); - $loader->loadClass($testClassName); + $this->assertTrue($loader->loadClass($testClassName)); $this->assertTrue(class_exists($className), $message); } @@ -92,7 +92,7 @@ public function testLoadClassFromFallback($className, $testClassName, $message) $loader->registerPrefix('Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $loader->registerNamespaceFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/fallback')); $loader->registerPrefixFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/fallback')); - $loader->loadClass($testClassName); + $this->assertTrue($loader->loadClass($testClassName)); $this->assertTrue(class_exists($className), $message); } @@ -128,7 +128,7 @@ public function testLoadClassNamespaceCollision($namespaces, $className, $messag $loader = new UniversalClassLoader(); $loader->registerNamespaces($namespaces); - $loader->loadClass($className); + $this->assertTrue($loader->loadClass($className)); $this->assertTrue(class_exists($className), $message); } @@ -178,7 +178,7 @@ public function testLoadClassPrefixCollision($prefixes, $className, $message) $loader = new UniversalClassLoader(); $loader->registerPrefixes($prefixes); - $loader->loadClass($className); + $this->assertTrue($loader->loadClass($className)); $this->assertTrue(class_exists($className), $message); } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/bootstrap.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/bootstrap.php deleted file mode 100644 index 54dac3fd..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\ClassLoader')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\ClassLoader')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/UniversalClassLoader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/UniversalClassLoader.php index b6128ad6..ee16e480 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/UniversalClassLoader.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/UniversalClassLoader.php @@ -242,11 +242,15 @@ public function register($prepend = false) * Loads the given class or interface. * * @param string $class The name of the class + * + * @return Boolean|null True, if loaded */ public function loadClass($class) { if ($file = $this->findFile($class)) { require $file; + + return true; } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/XcacheClassLoader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/XcacheClassLoader.php index 2decbce8..31bb0068 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/XcacheClassLoader.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/XcacheClassLoader.php @@ -51,6 +51,9 @@ class XcacheClassLoader * @param string $prefix A prefix to create a namespace in Xcache * @param object $classFinder An object that implements findFile() method. * + * @throws \RuntimeException + * @throws \InvalidArgumentException + * * @api */ public function __construct($prefix, $classFinder) diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/autoloader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/autoloader.php new file mode 100644 index 00000000..e38020d5 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/autoloader.php @@ -0,0 +1,11 @@ +=5.3.2" - }, - "autoload": { - "psr-0": { "Symfony\\Component\\ClassLoader": "" } - }, - "target-dir": "Symfony/Component/ClassLoader" -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/phpunit.xml.dist b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/phpunit.xml.dist index ae7e2ad9..0d29c115 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/phpunit.xml.dist +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/ClassLoader/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/.gitattributes b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/.gitattributes deleted file mode 100644 index 80481513..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/Tests export-ignore -phpunit.xml.dist export-ignore diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/.gitignore b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/.gitignore new file mode 100644 index 00000000..44de97a3 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/CHANGELOG.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/CHANGELOG.md index 27dd9311..59b30a3a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/CHANGELOG.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/CHANGELOG.md @@ -1,6 +1,17 @@ CHANGELOG ========= +2.2.0 +----- + + * added ArrayNodeDefinition::canBeEnabled() and ArrayNodeDefinition::canBeDisabled() + to ease configuration when some sections are respectively disabled / enabled + by default. + * added a `normalizeKeys()` method for array nodes (to avoid key normalization) + * added numerical type handling for config definitions + * added convenience methods for optional configuration sections to ArrayNodeDefinition + * added a utils class for XML manipulations + 2.1.0 ----- diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/ConfigCache.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/ConfigCache.php index 1a96bddd..e3ce58ad 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/ConfigCache.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/ConfigCache.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Config; +use Symfony\Component\Config\Resource\ResourceInterface; + /** * ConfigCache manages PHP cache files. * @@ -83,8 +85,8 @@ public function isFresh() /** * Writes cache. * - * @param string $content The content to write in the cache - * @param array $metadata An array of ResourceInterface instances + * @param string $content The content to write in the cache + * @param ResourceInterface[] $metadata An array of ResourceInterface instances * * @throws \RuntimeException When cache file can't be wrote */ @@ -99,7 +101,7 @@ public function write($content, array $metadata = null) throw new \RuntimeException(sprintf('Unable to write in the %s directory', $dir)); } - $tmpFile = tempnam(dirname($this->file), basename($this->file)); + $tmpFile = tempnam($dir, basename($this->file)); if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $this->file)) { @chmod($this->file, 0666 & ~umask()); } else { @@ -108,7 +110,7 @@ public function write($content, array $metadata = null) if (null !== $metadata && true === $this->debug) { $file = $this->file.'.meta'; - $tmpFile = tempnam(dirname($file), basename($file)); + $tmpFile = tempnam($dir, basename($file)); if (false !== @file_put_contents($tmpFile, serialize($metadata)) && @rename($tmpFile, $file)) { @chmod($file, 0666 & ~umask()); } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/ArrayNode.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/ArrayNode.php index 170a9033..cf9ba08d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/ArrayNode.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/ArrayNode.php @@ -29,6 +29,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface protected $addIfNotSet; protected $performDeepMerging; protected $ignoreExtraKeys; + protected $normalizeKeys; /** * Constructor. @@ -47,6 +48,41 @@ public function __construct($name, NodeInterface $parent = null) $this->addIfNotSet = false; $this->allowNewKeys = true; $this->performDeepMerging = true; + $this->normalizeKeys = true; + } + + public function setNormalizeKeys($normalizeKeys) + { + $this->normalizeKeys = (Boolean) $normalizeKeys; + } + + /** + * Normalizes keys between the different configuration formats. + * + * Namely, you mostly have foo_bar in YAML while you have foo-bar in XML. + * After running this method, all keys are normalized to foo_bar. + * + * If you have a mixed key like foo-bar_moo, it will not be altered. + * The key will also not be altered if the target key already exists. + * + * @param mixed $value + * + * @return array The value with normalized keys + */ + protected function preNormalize($value) + { + if (!$this->normalizeKeys || !is_array($value)) { + return $value; + } + + foreach ($value as $k => $v) { + if (false !== strpos($k, '-') && false === strpos($k, '_') && !array_key_exists($normalizedKey = str_replace('-', '_', $k), $value)) { + $value[$normalizedKey] = $v; + unset($value[$k]); + } + } + + return $value; } /** @@ -255,6 +291,8 @@ protected function validateType($value) * @param mixed $value The value to normalize * * @return mixed The normalized value + * + * @throws InvalidConfigurationException */ protected function normalizeValue($value) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/BaseNode.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/BaseNode.php index 099da4b3..cbb8df9c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/BaseNode.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/BaseNode.php @@ -158,7 +158,7 @@ public function setAllowOverwrite($allow) /** * Sets the closures used for normalization. * - * @param array $closures An array of Closures used for normalization + * @param \Closure[] $closures An array of Closures used for normalization */ public function setNormalizationClosures(array $closures) { @@ -168,7 +168,7 @@ public function setNormalizationClosures(array $closures) /** * Sets the closures used for final validation. * - * @param array $closures An array of Closures used for final validation + * @param \Closure[] $closures An array of Closures used for final validation */ public function setFinalValidationClosures(array $closures) { @@ -247,6 +247,8 @@ final public function merge($leftSide, $rightSide) */ final public function normalize($value) { + $value = $this->preNormalize($value); + // run custom normalization closures foreach ($this->normalizationClosures as $closure) { $value = $closure($value); @@ -266,12 +268,26 @@ final public function normalize($value) return $this->normalizeValue($value); } + /** + * Normalizes the value before any other normalization is applied. + * + * @param $value + * + * @return $value The normalized array value + */ + protected function preNormalize($value) + { + return $value; + } + /** * Finalizes a value, applying all finalization closures. * * @param mixed $value The value to finalize * * @return mixed The finalized value + * + * @throws InvalidConfigurationException */ final public function finalize($value) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php index b4378845..4db15480 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Config\Definition\Builder; -use Symfony\Component\Config\Definition\NodeInterface; use Symfony\Component\Config\Definition\ArrayNode; use Symfony\Component\Config\Definition\PrototypedArrayNode; use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; @@ -34,6 +33,7 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition protected $addDefaults; protected $addDefaultChildren; protected $nodeBuilder; + protected $normalizeKeys; /** * {@inheritDoc} @@ -51,6 +51,7 @@ public function __construct($name, NodeParentInterface $parent = null) $this->performDeepMerging = true; $this->nullEquivalent = array(); $this->trueEquivalent = array(); + $this->normalizeKeys = true; } /** @@ -210,6 +211,65 @@ public function canBeUnset($allow = true) return $this; } + /** + * Adds an "enabled" boolean to enable the current section. + * + * By default, the section is disabled. If any configuration is specified then + * the node will be automatically enabled: + * + * enableableArrayNode: {enabled: true, ...} # The config is enabled & default values get overridden + * enableableArrayNode: ~ # The config is enabled & use the default values + * enableableArrayNode: true # The config is enabled & use the default values + * enableableArrayNode: {other: value, ...} # The config is enabled & default values get overridden + * enableableArrayNode: {enabled: false, ...} # The config is disabled + * enableableArrayNode: false # The config is disabled + * + * @return ArrayNodeDefinition + */ + public function canBeEnabled() + { + $this + ->addDefaultsIfNotSet() + ->treatFalseLike(array('enabled' => false)) + ->treatTrueLike(array('enabled' => true)) + ->treatNullLike(array('enabled' => true)) + ->beforeNormalization() + ->ifArray() + ->then(function($v) { + $v['enabled'] = isset($v['enabled']) ? $v['enabled'] : true; + return $v; + }) + ->end() + ->children() + ->booleanNode('enabled') + ->defaultFalse() + ; + + return $this; + } + + /** + * Adds an "enabled" boolean to enable the current section. + * + * By default, the section is enabled. + * + * @return ArrayNodeDefinition + */ + public function canBeDisabled() + { + $this + ->addDefaultsIfNotSet() + ->treatFalseLike(array('enabled' => false)) + ->treatTrueLike(array('enabled' => true)) + ->treatNullLike(array('enabled' => true)) + ->children() + ->booleanNode('enabled') + ->defaultTrue() + ; + + return $this; + } + /** * Disables the deep merging of the node. * @@ -239,6 +299,20 @@ public function ignoreExtraKeys() return $this; } + /** + * Sets key normalization. + * + * @param Boolean $bool Whether to enable key normalization + * + * @return ArrayNodeDefinition + */ + public function normalizeKeys($bool) + { + $this->normalizeKeys = (Boolean) $bool; + + return $this; + } + /** * Appends a node definition. * @@ -326,6 +400,7 @@ protected function createNode() $node->setPerformDeepMerging($this->performDeepMerging); $node->setRequired($this->required); $node->setIgnoreExtraKeys($this->ignoreExtraKeys); + $node->setNormalizeKeys($this->normalizeKeys); if (null !== $this->normalization) { $node->setNormalizationClosures($this->normalization->before); @@ -347,9 +422,9 @@ protected function createNode() /** * Validate the configuration of a concrete node. * - * @param NodeInterface $node The related node + * @param ArrayNode $node The related node * - * @throws InvalidDefinitionException When an error is detected in the configuration + * @throws InvalidDefinitionException */ protected function validateConcreteNode(ArrayNode $node) { @@ -383,9 +458,9 @@ protected function validateConcreteNode(ArrayNode $node) /** * Validate the configuration of a prototype node. * - * @param NodeInterface $node The related node + * @param PrototypedArrayNode $node The related node * - * @throws InvalidDefinitionException When an error is detected in the configuration + * @throws InvalidDefinitionException */ protected function validatePrototypeNode(PrototypedArrayNode $node) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php index 1db01def..521c9014 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/EnumNodeDefinition.php @@ -23,7 +23,7 @@ public function values(array $values) } $this->values = $values; - + return $this; } @@ -31,6 +31,8 @@ public function values(array $values) * Instantiate a Node * * @return EnumNode The node + * + * @throws \RuntimeException */ protected function instantiateNode() { @@ -40,4 +42,4 @@ protected function instantiateNode() return new EnumNode($this->name, $this->parent, $this->values); } -} \ No newline at end of file +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/ExprBuilder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/ExprBuilder.php index 10d2e00d..7e06944c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/ExprBuilder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/ExprBuilder.php @@ -170,6 +170,8 @@ public function thenEmptyArray() * @param string $message * * @return ExprBuilder + * + * @throws \InvalidArgumentException */ public function thenInvalid($message) { @@ -182,6 +184,8 @@ public function thenInvalid($message) * Sets a closure unsetting this key of the array at validation time. * * @return ExprBuilder + * + * @throws UnsetKeyException */ public function thenUnset() { @@ -194,6 +198,8 @@ public function thenUnset() * Returns the related node * * @return NodeDefinition + * + * @throws \RuntimeException */ public function end() { @@ -210,7 +216,7 @@ public function end() /** * Builds the expressions. * - * @param array $expressions An array of ExprBuilder instances to build + * @param ExprBuilder[] $expressions An array of ExprBuilder instances to build * * @return array */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/FloatNodeDefinition.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/FloatNodeDefinition.php new file mode 100644 index 00000000..c0bed462 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/FloatNodeDefinition.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\FloatNode; + +/** + * This class provides a fluent interface for defining a float node. + * + * @author Jeanmonod David + */ +class FloatNodeDefinition extends NumericNodeDefinition +{ + /** + * Instantiates a Node. + * + * @return FloatNode The node + */ + protected function instantiateNode() + { + return new FloatNode($this->name, $this->parent, $this->min, $this->max); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/IntegerNodeDefinition.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/IntegerNodeDefinition.php new file mode 100644 index 00000000..f6c3c147 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/IntegerNodeDefinition.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +use Symfony\Component\Config\Definition\IntegerNode; + +/** + * This class provides a fluent interface for defining an integer node. + * + * @author Jeanmonod David + */ +class IntegerNodeDefinition extends NumericNodeDefinition +{ + /** + * Instantiates a Node. + * + * @return IntegerNode The node + */ + protected function instantiateNode() + { + return new IntegerNode($this->name, $this->parent, $this->min, $this->max); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NodeBuilder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NodeBuilder.php index c960ac43..5ea1c0e8 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NodeBuilder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NodeBuilder.php @@ -31,6 +31,8 @@ public function __construct() 'variable' => __NAMESPACE__.'\\VariableNodeDefinition', 'scalar' => __NAMESPACE__.'\\ScalarNodeDefinition', 'boolean' => __NAMESPACE__.'\\BooleanNodeDefinition', + 'integer' => __NAMESPACE__.'\\IntegerNodeDefinition', + 'float' => __NAMESPACE__.'\\FloatNodeDefinition', 'array' => __NAMESPACE__.'\\ArrayNodeDefinition', 'enum' => __NAMESPACE__.'\\EnumNodeDefinition', ); @@ -86,6 +88,30 @@ public function booleanNode($name) return $this->node($name, 'boolean'); } + /** + * Creates a child integer node. + * + * @param string $name the name of the node + * + * @return IntegerNodeDefinition The child node + */ + public function integerNode($name) + { + return $this->node($name, 'integer'); + } + + /** + * Creates a child float node. + * + * @param string $name the name of the node + * + * @return FloatNodeDefinition The child node + */ + public function floatNode($name) + { + return $this->node($name, 'float'); + } + /** * Creates a child EnumNode. * @@ -155,6 +181,8 @@ public function node($name, $type) * ->end() * ; * + * @param NodeDefinition $node + * * @return NodeBuilder This node builder */ public function append(NodeDefinition $node) diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NodeDefinition.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NodeDefinition.php index 614ceff3..289e1c4f 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NodeDefinition.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NodeDefinition.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Config\Definition\Builder; use Symfony\Component\Config\Definition\NodeInterface; +use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; /** * This class provides a fluent interface for defining a node. @@ -31,6 +32,9 @@ abstract class NodeDefinition implements NodeParentInterface protected $nullEquivalent; protected $trueEquivalent; protected $falseEquivalent; + /** + * @var NodeParentInterface|NodeInterface + */ protected $parent; protected $attributes = array(); @@ -336,7 +340,7 @@ protected function normalization() * * @return NodeInterface $node The node instance * - * @throws Symfony\Component\Config\Definition\Exception\InvalidDefinitionException When the definition is invalid + * @throws InvalidDefinitionException When the definition is invalid */ abstract protected function createNode(); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php new file mode 100644 index 00000000..5b6e9550 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition\Builder; + +/** + * Abstract class that contain common code of integer and float node definition. + * + * @author David Jeanmonod + */ +abstract class NumericNodeDefinition extends ScalarNodeDefinition +{ + protected $min; + protected $max; + + /** + * Ensures that the value is smaller than the given reference. + * + * @param mixed $max + * + * @return NumericNodeDefinition + * + * @throws \InvalidArgumentException when the constraint is inconsistent + */ + public function max($max) + { + if (isset($this->min) && $this->min > $max) { + throw new \InvalidArgumentException(sprintf('You cannot define a max(%s) as you already have a min(%s)', $max, $this->min)); + } + $this->max = $max; + + return $this; + } + + /** + * Ensures that the value is bigger than the given reference. + * + * @param mixed $min + * + * @return NumericNodeDefinition + * + * @throws \InvalidArgumentException when the constraint is inconsistent + */ + public function min($min) + { + if (isset($this->max) && $this->max < $min) { + throw new \InvalidArgumentException(sprintf('You cannot define a min(%s) as you already have a max(%s)', $min, $this->max)); + } + $this->min = $min; + + return $this; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/TreeBuilder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/TreeBuilder.php index 1070fd78..5d02848a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/TreeBuilder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Builder/TreeBuilder.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Config\Definition\Builder; +use Symfony\Component\Config\Definition\NodeInterface; + /** * This is the entry class for building a config tree. * @@ -44,6 +46,8 @@ public function root($name, $type = 'array', NodeBuilder $builder = null) * Builds the tree. * * @return NodeInterface + * + * @throws \RuntimeException */ public function buildTree() { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/FloatNode.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/FloatNode.php new file mode 100644 index 00000000..17c570ac --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/FloatNode.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidTypeException; + +/** + * This node represents a float value in the config tree. + * + * @author Jeanmonod David + */ +class FloatNode extends NumericNode +{ + /** + * {@inheritDoc} + */ + protected function validateType($value) + { + // Integers are also accepted, we just cast them + if (is_int($value)) { + $value = (float) $value; + } + + if (!is_float($value)) { + $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected float, but got %s.', $this->getPath(), gettype($value))); + $ex->setPath($this->getPath()); + + throw $ex; + } + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/IntegerNode.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/IntegerNode.php new file mode 100644 index 00000000..dbc04122 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/IntegerNode.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidTypeException; + +/** + * This node represents an integer value in the config tree. + * + * @author Jeanmonod David + */ +class IntegerNode extends NumericNode +{ + /** + * {@inheritDoc} + */ + protected function validateType($value) + { + if (!is_int($value)) { + $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected int, but got %s.', $this->getPath(), gettype($value))); + $ex->setPath($this->getPath()); + + throw $ex; + } + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/NumericNode.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/NumericNode.php new file mode 100644 index 00000000..df45f2eb --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/NumericNode.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; + +/** + * This node represents a numeric value in the config tree + * + * @author David Jeanmonod + */ +class NumericNode extends ScalarNode +{ + protected $min; + protected $max; + + public function __construct($name, NodeInterface $parent = null, $min = null, $max = null) + { + parent::__construct($name, $parent); + $this->min = $min; + $this->max = $max; + } + + /** + * {@inheritDoc} + */ + protected function finalizeValue($value) + { + $value = parent::finalizeValue($value); + + $errorMsg = null; + if (isset($this->min) && $value < $this->min) { + $errorMsg = sprintf('The value %s is too small for path "%s". Should be greater than: %s', $value, $this->getPath(), $this->min); + } + if (isset($this->max) && $value > $this->max) { + $errorMsg = sprintf('The value %s is too big for path "%s". Should be less than: %s', $value, $this->getPath(), $this->max); + } + if (isset($errorMsg)) { + $ex = new InvalidConfigurationException($errorMsg); + $ex->setPath($this->getPath()); + throw $ex; + } + + return $value; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Processor.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Processor.php index 3b00c7e4..025e6937 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Processor.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/Processor.php @@ -28,8 +28,6 @@ class Processor */ public function process(NodeInterface $configTree, array $configs) { - $configs = self::normalizeKeys($configs); - $currentConfig = array(); foreach ($configs as $config) { $config = $configTree->normalize($config); @@ -52,35 +50,6 @@ public function processConfiguration(ConfigurationInterface $configuration, arra return $this->process($configuration->getConfigTreeBuilder()->buildTree(), $configs); } - /** - * This method normalizes keys between the different configuration formats - * - * Namely, you mostly have foo_bar in YAML while you have foo-bar in XML. - * After running this method, all keys are normalized to foo_bar. - * - * If you have a mixed key like foo-bar_moo, it will not be altered. - * The key will also not be altered if the target key already exists. - * - * @param array $config - * - * @return array the config with normalized keys - */ - public static function normalizeKeys(array $config) - { - foreach ($config as $key => $value) { - if (is_array($value)) { - $config[$key] = self::normalizeKeys($value); - } - - if (false !== strpos($key, '-') && false === strpos($key, '_') && !array_key_exists($normalizedKey = str_replace('-', '_', $key), $config)) { - $config[$normalizedKey] = $config[$key]; - unset($config[$key]); - } - } - - return $config; - } - /** * Normalizes a configuration entry. * @@ -110,18 +79,19 @@ public static function normalizeConfig($config, $key, $plural = null) $plural = $key.'s'; } - $values = array(); if (isset($config[$plural])) { - $values = $config[$plural]; - } elseif (isset($config[$key])) { + return $config[$plural]; + } + + if (isset($config[$key])) { if (is_string($config[$key]) || !is_int(key($config[$key]))) { // only one - $values = array($config[$key]); - } else { - $values = $config[$key]; + return array($config[$key]); } + + return $config[$key]; } - return $values; + return array(); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/PrototypedArrayNode.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/PrototypedArrayNode.php index 5676093a..2e761565 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/PrototypedArrayNode.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/PrototypedArrayNode.php @@ -183,7 +183,7 @@ public function getPrototype() * * @param NodeInterface $node The child node to add * - * @throws \RuntimeException Prototyped array nodes can't have concrete children. + * @throws Exception */ public function addChild(NodeInterface $node) { @@ -233,6 +233,9 @@ protected function finalizeValue($value) * @param mixed $value The value to normalize * * @return mixed The normalized value + * + * @throws InvalidConfigurationException + * @throws DuplicateKeyException */ protected function normalizeValue($value) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/ReferenceDumper.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/ReferenceDumper.php new file mode 100644 index 00000000..ef2b05d1 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Definition/ReferenceDumper.php @@ -0,0 +1,193 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Definition; + +/** + * Dumps a reference configuration for the given configuration/node instance. + * + * Currently, only YML format is supported. + * + * @author Kevin Bond + */ +class ReferenceDumper +{ + private $reference; + + public function dump(ConfigurationInterface $configuration) + { + return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree()); + } + + public function dumpNode(NodeInterface $node) + { + $this->reference = ''; + $this->writeNode($node); + $ref = $this->reference; + $this->reference = null; + + return $ref; + } + + /** + * @param NodeInterface $node + * @param integer $depth + */ + private function writeNode(NodeInterface $node, $depth = 0) + { + $comments = array(); + $default = ''; + $defaultArray = null; + $children = null; + $example = $node->getExample(); + + // defaults + if ($node instanceof ArrayNode) { + $children = $node->getChildren(); + + if ($node instanceof PrototypedArrayNode) { + $prototype = $node->getPrototype(); + + if ($prototype instanceof ArrayNode) { + $children = $prototype->getChildren(); + } + + // check for attribute as key + if ($key = $node->getKeyAttribute()) { + $keyNode = new ArrayNode($key, $node); + $keyNode->setInfo('Prototype'); + + // add children + foreach ($children as $childNode) { + $keyNode->addChild($childNode); + } + $children = array($key => $keyNode); + } + } + + if (!$children) { + if ($node->hasDefaultValue() && count($defaultArray = $node->getDefaultValue())) { + $default = ''; + } elseif (!is_array($example)) { + $default = '[]'; + } + } + } else { + $default = '~'; + + if ($node->hasDefaultValue()) { + $default = $node->getDefaultValue(); + + if (true === $default) { + $default = 'true'; + } elseif (false === $default) { + $default = 'false'; + } elseif (null === $default) { + $default = '~'; + } elseif (is_array($default)) { + if ($node->hasDefaultValue() && count($defaultArray = $node->getDefaultValue())) { + $default = ''; + } elseif (!is_array($example)) { + $default = '[]'; + } + } + } + } + + // required? + if ($node->isRequired()) { + $comments[] = 'Required'; + } + + // example + if ($example && !is_array($example)) { + $comments[] = 'Example: '.$example; + } + + $default = (string) $default != '' ? ' '.$default : ''; + $comments = count($comments) ? '# '.implode(', ', $comments) : ''; + + $text = rtrim(sprintf('%-20s %s %s', $node->getName() . ':', $default, $comments), ' '); + + if ($info = $node->getInfo()) { + $this->writeLine(''); + // indenting multi-line info + $info = str_replace("\n", sprintf("\n%" . $depth * 4 . "s# ", ' '), $info); + $this->writeLine('# '.$info, $depth * 4); + } + + $this->writeLine($text, $depth * 4); + + // output defaults + if ($defaultArray) { + $this->writeLine(''); + + $message = count($defaultArray) > 1 ? 'Defaults' : 'Default'; + + $this->writeLine('# '.$message.':', $depth * 4 + 4); + + $this->writeArray($defaultArray, $depth + 1); + } + + if (is_array($example)) { + $this->writeLine(''); + + $message = count($example) > 1 ? 'Examples' : 'Example'; + + $this->writeLine('# '.$message.':', $depth * 4 + 4); + + $this->writeArray($example, $depth + 1); + } + + if ($children) { + foreach ($children as $childNode) { + $this->writeNode($childNode, $depth + 1); + } + } + } + + /** + * Outputs a single config reference line + * + * @param string $text + * @param int $indent + */ + private function writeLine($text, $indent = 0) + { + $indent = strlen($text) + $indent; + $format = '%'.$indent.'s'; + + $this->reference .= sprintf($format, $text)."\n"; + } + + private function writeArray(array $array, $depth) + { + $isIndexed = array_values($array) === $array; + + foreach ($array as $key => $value) { + if (is_array($value)) { + $val = ''; + } else { + $val = $value; + } + + if ($isIndexed) { + $this->writeLine('- '.$val, $depth * 4); + } else { + $this->writeLine(sprintf('%-20s %s', $key.':', $val), $depth * 4); + } + + if (is_array($value)) { + $this->writeArray($value, $depth + 1); + } + } + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Exception/FileLoaderLoadException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Exception/FileLoaderLoadException.php index fcf61db9..1adaf629 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Exception/FileLoaderLoadException.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Exception/FileLoaderLoadException.php @@ -19,10 +19,10 @@ class FileLoaderLoadException extends \Exception { /** - * @param string $resource The resource that could not be imported - * @param string $sourceResource The original resource importing the new resource - * @param integer $code The error code - * @param Exception $previous A previous exception + * @param string $resource The resource that could not be imported + * @param string $sourceResource The original resource importing the new resource + * @param integer $code The error code + * @param \Exception $previous A previous exception */ public function __construct($resource, $sourceResource = null, $code = null, $previous = null) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/LICENSE deleted file mode 100644 index cdffe7ae..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2012 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Loader/FileLoader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Loader/FileLoader.php index 3c2556a8..972f54f5 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Loader/FileLoader.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Loader/FileLoader.php @@ -57,6 +57,9 @@ public function getLocator() * @param string $sourceResource The original resource importing the new resource * * @return mixed + * + * @throws FileLoaderLoadException + * @throws FileLoaderImportCircularReferenceException */ public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Loader/Loader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Loader/Loader.php index b9c174f9..9acfb7b0 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Loader/Loader.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Loader/Loader.php @@ -47,10 +47,12 @@ public function setResolver(LoaderResolverInterface $resolver) * * @param mixed $resource A Resource * @param string $type The resource type + * + * @return mixed */ public function import($resource, $type = null) { - $this->resolve($resource)->load($resource, $type); + return $this->resolve($resource)->load($resource, $type); } /** diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/README.md deleted file mode 100644 index 35cec934..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Config Component -================ - -Config provides the infrastructure for loading configurations from different -data sources and optionally monitoring these data sources for changes. There -are additional tools for validating, normalizing and handling of defaults that -can optionally be used to convert from different formats to arrays. - -Resources ---------- - -Unit tests: - -https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/Config diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php index ef45ba81..6d241cad 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php @@ -16,7 +16,7 @@ class ArrayNodeTest extends \PHPUnit_Framework_TestCase { /** - * @expectedException Symfony\Component\Config\Definition\Exception\InvalidTypeException + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException */ public function testNormalizeThrowsExceptionWhenFalseIsNotAllowed() { @@ -25,19 +25,13 @@ public function testNormalizeThrowsExceptionWhenFalseIsNotAllowed() } /** - * normalize() should protect against child values with no corresponding node + * @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage Unrecognized options "foo" under "root" */ public function testExceptionThrownOnUnrecognizedChild() { $node = new ArrayNode('root'); - - try { - $node->normalize(array('foo' => 'bar')); - $this->fail('An exception should have been throw for a bad child node'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException', $e); - $this->assertEquals('Unrecognized options "foo" under "root"', $e->getMessage()); - } + $node->normalize(array('foo' => 'bar')); } /** @@ -54,4 +48,35 @@ public function testIgnoreExtraKeysNoException() $node->normalize(array('foo' => 'bar')); $this->assertTrue(true, 'No exception was thrown when setIgnoreExtraKeys is true'); } + + /** + * @dataProvider getPreNormalizationTests + */ + public function testPreNormalize($denormalized, $normalized) + { + $node = new ArrayNode('foo'); + + $r = new \ReflectionMethod($node, 'preNormalize'); + $r->setAccessible(true); + + $this->assertSame($normalized, $r->invoke($node, $denormalized)); + } + + public function getPreNormalizationTests() + { + return array( + array( + array('foo-bar' => 'foo'), + array('foo_bar' => 'foo'), + ), + array( + array('foo-bar_moo' => 'foo'), + array('foo-bar_moo' => 'foo'), + ), + array( + array('foo-bar' => null, 'foo_bar' => 'foo'), + array('foo-bar' => null, 'foo_bar' => 'foo'), + ) + ); + } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php index ea5fffe7..0753d64b 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php @@ -34,7 +34,7 @@ public function getValidValues() /** * @dataProvider getInvalidValues - * @expectedException Symfony\Component\Config\Definition\Exception\InvalidTypeException + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException */ public function testNormalizeThrowsExceptionOnInvalidValues($value) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php index 3831d701..06dacf2a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Config\Tests\Definition\Builder; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; +use Symfony\Component\Config\Definition\Processor; use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition; use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; @@ -34,7 +35,7 @@ public function testAppendingSomeNode() } /** - * @expectedException Symfony\Component\Config\Definition\Exception\InvalidDefinitionException + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException * @dataProvider providePrototypeNodeSpecificCalls */ public function testPrototypeNodeSpecificOption($method, $args) @@ -57,17 +58,20 @@ public function providePrototypeNodeSpecificCalls() } /** - * @expectedException Symfony\Component\Config\Definition\Exception\InvalidDefinitionException + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException */ public function testConcreteNodeSpecificOption() { $node = new ArrayNodeDefinition('root'); - $node->addDefaultsIfNotSet()->prototype('array'); + $node + ->addDefaultsIfNotSet() + ->prototype('array') + ; $node->getNode(); } /** - * @expectedException Symfony\Component\Config\Definition\Exception\InvalidDefinitionException + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException */ public function testPrototypeNodesCantHaveADefaultValueWhenUsingDefaultChildren() { @@ -149,6 +153,50 @@ public function testNestedPrototypedArrayNodes() $node->getNode(); } + public function testEnabledNodeDefaults() + { + $node = new ArrayNodeDefinition('root'); + $node + ->canBeEnabled() + ->children() + ->scalarNode('foo')->defaultValue('bar')->end() + ; + + $this->assertEquals(array('enabled' => false, 'foo' => 'bar'), $node->getNode()->getDefaultValue()); + } + + /** + * @dataProvider getEnableableNodeFixtures + */ + public function testTrueEnableEnabledNode($expected, $config, $message) + { + $processor = new Processor(); + $node = new ArrayNodeDefinition('root'); + $node + ->canBeEnabled() + ->children() + ->scalarNode('foo')->defaultValue('bar')->end() + ; + + $this->assertEquals( + $expected, + $processor->process($node->getNode(), $config), + $message + ); + } + + public function getEnableableNodeFixtures() + { + return array( + array(array('enabled' => true, 'foo' => 'bar'), array(true), 'true enables an enableable node'), + array(array('enabled' => true, 'foo' => 'bar'), array(null), 'null enables an enableable node'), + array(array('enabled' => true, 'foo' => 'bar'), array(array('enabled' => true)), 'An enableable node can be enabled'), + array(array('enabled' => true, 'foo' => 'baz'), array(array('foo' => 'baz')), 'any configuration enables an enableable node'), + array(array('enabled' => false, 'foo' => 'baz'), array(array('foo' => 'baz', 'enabled' => false)), 'An enableable node can be disabled'), + array(array('enabled' => false, 'foo' => 'bar'), array(false), 'false disables an enableable node'), + ); + } + protected function getField($object, $field) { $reflection = new \ReflectionProperty($object, $field); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php index 11d20a45..2b8a876f 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php @@ -132,7 +132,7 @@ public function testThenEmptyArrayExpression() } /** - * @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException */ public function testThenInvalid() { @@ -171,11 +171,11 @@ protected function getTestBuilder() /** * Close the validation process and finalize with the given config * @param TreeBuilder $testBuilder The tree builder to finalize - * @param array $config The config you want to use for the finalization, if nothing provided + * @param array $config The config you want to use for the finalization, if nothing provided * a simple array('key'=>'value') will be used * @return array The finalized config values */ - protected function finalizeTestBuilder($testBuilder, $config=null) + protected function finalizeTestBuilder($testBuilder, $config = null) { return $testBuilder ->end() @@ -200,11 +200,12 @@ protected function returnClosure($val) /** * Assert that the given test builder, will return the given value + * * @param mixed $value The value to test * @param TreeBuilder $treeBuilder The tree builder to finalize * @param mixed $config The config values that new to be finalized */ - protected function assertFinalizedValueIs($value, $treeBuilder, $config=null) + protected function assertFinalizedValueIs($value, $treeBuilder, $config = null) { $this->assertEquals(array('key'=>$value), $this->finalizeTestBuilder($treeBuilder, $config)); } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php index c8295916..8d0a8453 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/NodeBuilderTest.php @@ -76,6 +76,17 @@ public function testNodeTypesAreNotCaseSensitive() $this->assertEquals(get_class($node1), get_class($node2)); } + + public function testNumericNodeCreation() + { + $builder = new NodeBuilder(); + + $node = $builder->integerNode('foo')->min(3)->max(5); + $this->assertEquals('Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition', get_class($node)); + + $node = $builder->floatNode('bar')->min(3.0)->max(5.0); + $this->assertEquals('Symfony\Component\Config\Definition\Builder\FloatNodeDefinition', get_class($node)); + } } class SomeNodeDefinition extends BaseVariableNodeDefinition diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/NumericNodeDefinitionTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/NumericNodeDefinitionTest.php new file mode 100644 index 00000000..1cb08f90 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/Builder/NumericNodeDefinitionTest.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition\Builder; + +use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition as NumericNodeDefinition; +use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition; +use Symfony\Component\Config\Definition\Builder\FloatNodeDefinition; + +class NumericNodeDefinitionTest extends \PHPUnit_Framework_TestCase +{ + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage You cannot define a min(4) as you already have a max(3) + */ + public function testIncoherentMinAssertion() + { + $def = new NumericNodeDefinition('foo'); + $def->max(3)->min(4); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage You cannot define a max(2) as you already have a min(3) + */ + public function testIncoherentMaxAssertion() + { + $node = new NumericNodeDefinition('foo'); + $node->min(3)->max(2); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The value 4 is too small for path "foo". Should be greater than: 5 + */ + public function testIntegerMinAssertion() + { + $def = new IntegerNodeDefinition('foo'); + $def->min(5)->getNode()->finalize(4); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The value 4 is too big for path "foo". Should be less than: 3 + */ + public function testIntegerMaxAssertion() + { + $def = new IntegerNodeDefinition('foo'); + $def->max(3)->getNode()->finalize(4); + } + + public function testIntegerValidMinMaxAssertion() + { + $def = new IntegerNodeDefinition('foo'); + $node = $def->min(3)->max(7)->getNode(); + $this->assertEquals(4, $node->finalize(4)); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The value 400 is too small for path "foo". Should be greater than: 500 + */ + public function testFloatMinAssertion() + { + $def = new FloatNodeDefinition('foo'); + $def->min(5E2)->getNode()->finalize(4e2); + } + + /** + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedExceptionMessage The value 4.3 is too big for path "foo". Should be less than: 0.3 + */ + public function testFloatMaxAssertion() + { + $def = new FloatNodeDefinition('foo'); + $def->max(0.3)->getNode()->finalize(4.3); + } + + public function testFloatValidMinMaxAssertion() + { + $def = new FloatNodeDefinition('foo'); + $node = $def->min(3.0)->max(7e2)->getNode(); + $this->assertEquals(4.5, $node->finalize(4.5)); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php index 8e3d66a3..2b84de6b 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/EnumNodeTest.php @@ -30,7 +30,7 @@ public function testConstructionWithOneValue() } /** - * @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException * @expectedExceptionMessage The value "foobar" is not allowed for path "foo". Permissible values: "foo", "bar" */ public function testFinalizeWithInvalidValue() diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php new file mode 100644 index 00000000..bdf79ece --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/FloatNodeTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use Symfony\Component\Config\Definition\FloatNode; + +class FloatNodeTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getValidValues + */ + public function testNormalize($value) + { + $node = new FloatNode('test'); + $this->assertSame($value, $node->normalize($value)); + } + + public function getValidValues() + { + return array( + array(1798.0), + array(-678.987), + array(12.56E45), + array(0.0), + // Integer are accepted too, they will be cast + array(17), + array(-10), + array(0) + ); + } + + /** + * @dataProvider getInvalidValues + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException + */ + public function testNormalizeThrowsExceptionOnInvalidValues($value) + { + $node = new FloatNode('test'); + $node->normalize($value); + } + + public function getInvalidValues() + { + return array( + array(null), + array(''), + array('foo'), + array(true), + array(false), + array(array()), + array(array('foo' => 'bar')), + array(new \stdClass()), + ); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php new file mode 100644 index 00000000..1527db7a --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/IntegerNodeTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use Symfony\Component\Config\Definition\IntegerNode; + +class IntegerNodeTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getValidValues + */ + public function testNormalize($value) + { + $node = new IntegerNode('test'); + $this->assertSame($value, $node->normalize($value)); + } + + public function getValidValues() + { + return array( + array(1798), + array(-678), + array(0), + ); + } + + /** + * @dataProvider getInvalidValues + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException + */ + public function testNormalizeThrowsExceptionOnInvalidValues($value) + { + $node = new IntegerNode('test'); + $node->normalize($value); + } + + public function getInvalidValues() + { + return array( + array(null), + array(''), + array('foo'), + array(true), + array(false), + array(0.0), + array(0.1), + array(array()), + array(array('foo' => 'bar')), + array(new \stdClass()), + ); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/MergeTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/MergeTest.php index d90a3a9f..d78027d0 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/MergeTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/MergeTest.php @@ -16,7 +16,7 @@ class MergeTest extends \PHPUnit_Framework_TestCase { /** - * @expectedException Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException + * @expectedException \Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException */ public function testForbiddenOverwrite() { @@ -92,7 +92,7 @@ public function testUnsetKey() } /** - * @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException */ public function testDoesNotAllowNewKeysInSubsequentConfigs() { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/NormalizationTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/NormalizationTest.php index 77f1ea91..4b0e6bf9 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/NormalizationTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/NormalizationTest.php @@ -169,7 +169,7 @@ public function getNumericKeysTests() } /** - * @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException + * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException * @expectedExceptionMessage The attribute "id" must be set for path "root.thing". */ public function testNonAssociativeArrayThrowsExceptionIfAttributeNotSet() diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/ProcessorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/ProcessorTest.php deleted file mode 100644 index 56368ac8..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/ProcessorTest.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use Symfony\Component\Config\Definition\Processor; - -class ProcessorTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider getKeyNormalizationTests - */ - public function testNormalizeKeys($denormalized, $normalized) - { - $this->assertSame($normalized, Processor::normalizeKeys($denormalized)); - } - - public function getKeyNormalizationTests() - { - return array( - array( - array('foo-bar' => 'foo'), - array('foo_bar' => 'foo'), - ), - array( - array('foo-bar_moo' => 'foo'), - array('foo-bar_moo' => 'foo'), - ), - array( - array('foo-bar' => null, 'foo_bar' => 'foo'), - array('foo-bar' => null, 'foo_bar' => 'foo'), - ), - array( - array('foo-bar' => array('foo-bar' => 'foo')), - array('foo_bar' => array('foo_bar' => 'foo')), - ), - array( - array('foo_bar' => array('foo-bar' => 'foo')), - array('foo_bar' => array('foo_bar' => 'foo')), - ) - ); - } -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php index 31d3c89f..d200574e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php @@ -17,7 +17,6 @@ class PrototypedArrayNodeTest extends \PHPUnit_Framework_TestCase { - public function testGetDefaultValueReturnsAnEmptyArrayForPrototypes() { $node = new PrototypedArrayNode('root'); @@ -31,8 +30,8 @@ public function testGetDefaultValueReturnsDefaultValueForPrototypes() $node = new PrototypedArrayNode('root'); $prototype = new ArrayNode(null, $node); $node->setPrototype($prototype); - $node->setDefaultValue(array ('test')); - $this->assertEquals(array ('test'), $node->getDefaultValue()); + $node->setDefaultValue(array('test')); + $this->assertEquals(array('test'), $node->getDefaultValue()); } // a remapped key (e.g. "mapping" -> "mappings") should be unset after being used diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/ReferenceDumperTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/ReferenceDumperTest.php new file mode 100644 index 00000000..137caf8c --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Definition/ReferenceDumperTest.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Definition; + +use Symfony\Component\Config\Definition\ReferenceDumper; +use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration; + +class ReferenceDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testDumper() + { + $configuration = new ExampleConfiguration(); + + $dumper = new ReferenceDumper(); + $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration)); + } + + private function getConfigurationAsString() + { + return << + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Fixtures\Configuration; + +use Symfony\Component\Config\Definition\Builder\TreeBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +class ExampleConfiguration implements ConfigurationInterface +{ + public function getConfigTreeBuilder() + { + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('root'); + + $rootNode + ->children() + ->booleanNode('boolean')->defaultTrue()->end() + ->scalarNode('scalar_empty')->end() + ->scalarNode('scalar_null')->defaultNull()->end() + ->scalarNode('scalar_true')->defaultTrue()->end() + ->scalarNode('scalar_false')->defaultFalse()->end() + ->scalarNode('scalar_default')->defaultValue('default')->end() + ->scalarNode('scalar_array_empty')->defaultValue(array())->end() + ->scalarNode('scalar_array_defaults')->defaultValue(array('elem1', 'elem2'))->end() + ->arrayNode('array') + ->info('some info') + ->canBeUnset() + ->children() + ->scalarNode('child1')->end() + ->scalarNode('child2')->end() + ->scalarNode('child3') + ->info( + "this is a long\n". + "multi-line info text\n". + "which should be indented" + ) + ->example('example setting') + ->end() + ->end() + ->end() + ->arrayNode('array_prototype') + ->children() + ->arrayNode('parameters') + ->useAttributeAsKey('name') + ->prototype('array') + ->children() + ->scalarNode('value')->isRequired()->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ; + + return $treeBuilder; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/document_type.xml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/document_type.xml new file mode 100644 index 00000000..4c252282 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/document_type.xml @@ -0,0 +1,3 @@ + +]> + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/invalid.xml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/invalid.xml new file mode 100644 index 00000000..a07af9fd --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/invalid.xml @@ -0,0 +1,2 @@ + + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/invalid_schema.xml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/invalid_schema.xml new file mode 100644 index 00000000..e2725a2c --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/invalid_schema.xml @@ -0,0 +1,2 @@ + + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/schema.xsd b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/schema.xsd new file mode 100644 index 00000000..e56820f6 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/schema.xsd @@ -0,0 +1,9 @@ + + + + + + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/valid.xml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/valid.xml new file mode 100644 index 00000000..a96bb382 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Fixtures/Util/valid.xml @@ -0,0 +1,3 @@ + + + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php index 3b04a011..7641e248 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php @@ -69,7 +69,7 @@ public function testLoad() } /** - * @expectedException Symfony\Component\Config\Exception\FileLoaderLoadException + * @expectedException \Symfony\Component\Config\Exception\FileLoaderLoadException */ public function testLoadThrowsAnExceptionIfTheResourceCannotBeLoaded() { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Loader/LoaderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Loader/LoaderTest.php index 5b14e197..8ce5a8b6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Loader/LoaderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Loader/LoaderTest.php @@ -55,6 +55,15 @@ public function testResolve() $this->assertInstanceOf('Symfony\Component\Config\Exception\FileLoaderLoadException', $e, '->resolve() throws a FileLoaderLoadException if the resource cannot be loaded'); } } + + public function testImport() + { + $loader = $this->getMock('Symfony\Component\Config\Loader\Loader', array('supports', 'load')); + $loader->expects($this->once())->method('supports')->will($this->returnValue(true)); + $loader->expects($this->once())->method('load')->will($this->returnValue('yes')); + + $this->assertEquals('yes', $loader->import('foo')); + } } class ProjectLoader1 extends Loader diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php new file mode 100644 index 00000000..a3d264e1 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Tests\Loader; + +use Symfony\Component\Config\Util\XmlUtils; + +class XmlUtilsTest extends \PHPUnit_Framework_TestCase +{ + public function testLoadFile() + { + $fixtures = __DIR__.'/../Fixtures/Util/'; + + try { + XmlUtils::loadFile($fixtures.'invalid.xml'); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertContains('ERROR 77', $e->getMessage()); + } + + try { + XmlUtils::loadFile($fixtures.'document_type.xml'); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertContains('Document types are not allowed', $e->getMessage()); + } + + try { + XmlUtils::loadFile($fixtures.'invalid_schema.xml', $fixtures.'schema.xsd'); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertContains('ERROR 1845', $e->getMessage()); + } + + try { + XmlUtils::loadFile($fixtures.'invalid_schema.xml', 'invalid_callback_or_file'); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertContains('XSD file or callable', $e->getMessage()); + } + + $mock = $this->getMock(__NAMESPACE__.'\Validator'); + $mock->expects($this->exactly(2))->method('validate')->will($this->onConsecutiveCalls(false, true)); + + try { + XmlUtils::loadFile($fixtures.'valid.xml', array($mock, 'validate')); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertContains('is not valid', $e->getMessage()); + } + + $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile($fixtures.'valid.xml', array($mock, 'validate'))); + } + + /** + * @dataProvider getDataForConvertDomToArray + */ + public function testConvertDomToArray($expected, $xml, $root = false, $checkPrefix = true) + { + $dom = new \DOMDocument(); + $dom->loadXML($root ? $xml : ''.$xml.''); + + $this->assertSame($expected, XmlUtils::convertDomElementToArray($dom->documentElement, $checkPrefix)); + } + + public function getDataForConvertDomToArray() + { + return array( + array(null, ''), + array('bar', 'bar'), + array(array('bar' => 'foobar'), '', true), + array(array('foo' => null), ''), + array(array('foo' => 'bar'), 'bar'), + array(array('foo' => array('foo' => 'bar')), ''), + array(array('foo' => array('foo' => 'bar')), 'bar'), + array(array('foo' => array('foo' => 'bar', 'value' => 'text')), 'text'), + array(array('foo' => array('attr' => 'bar', 'foo' => 'text')), 'text'), + array(array('foo' => array('bar', 'text')), 'bartext'), + array(array('foo' => array(array('foo' => 'bar'), array('foo' => 'text'))), ''), + array(array('foo' => array('foo' => array('bar', 'text'))), 'text'), + array(array('foo' => 'bar'), 'bar'), + array(array('foo' => 'text'), 'text'), + array(array('foo' => array('bar' => 'bar', 'value' => 'text')), 'text', false, false), + array(array('attr' => 1, 'b' => 'hello'), 'hello2', true), + ); + } + + /** + * @dataProvider getDataForPhpize + */ + public function testPhpize($expected, $value) + { + $this->assertSame($expected, XmlUtils::phpize($value)); + } + + public function getDataForPhpize() + { + return array( + array(null, 'null'), + array(true, 'true'), + array(false, 'false'), + array(null, 'Null'), + array(true, 'True'), + array(false, 'False'), + array(0, '0'), + array(1, '1'), + array(0777, '0777'), + array(255, '0xFF'), + array(100.0, '1e2'), + array(-120.0, '-1.2E2'), + array(-10100.1, '-10100.1'), + array(-10100.1, '-10,100.1'), + array('foo', 'foo'), + ); + } +} + +interface Validator +{ + public function validate(); +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/bootstrap.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/bootstrap.php deleted file mode 100644 index 3a61b6d5..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Config')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Config')).'.php')) { - require_once $file; - } - } -}); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Util/XmlUtils.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Util/XmlUtils.php new file mode 100644 index 00000000..9317e15e --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/Util/XmlUtils.php @@ -0,0 +1,222 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Config\Util; + +/** + * XMLUtils is a bunch of utility methods to XML operations. + * + * This class contains static methods only and is not meant to be instantiated. + * + * @author Fabien Potencier + * @author Martin Hasoň + */ +class XmlUtils +{ + /** + * This class should not be instantiated + */ + private function __construct() + { + } + + /** + * Loads an XML file. + * + * @param string $file An XML file path + * @param string|callable $schemaOrCallable An XSD schema file path or callable + * + * @return \DOMDocument + * + * @throws \InvalidArgumentException When loading of XML file returns error + */ + public static function loadFile($file, $schemaOrCallable = null) + { + $internalErrors = libxml_use_internal_errors(true); + $disableEntities = libxml_disable_entity_loader(true); + libxml_clear_errors(); + + $dom = new \DOMDocument(); + $dom->validateOnParse = true; + if (!$dom->loadXML(file_get_contents($file), LIBXML_NONET | (defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0))) { + libxml_disable_entity_loader($disableEntities); + + throw new \InvalidArgumentException(implode("\n", static::getXmlErrors($internalErrors))); + } + + $dom->normalizeDocument(); + + libxml_use_internal_errors($internalErrors); + libxml_disable_entity_loader($disableEntities); + + foreach ($dom->childNodes as $child) { + if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { + throw new \InvalidArgumentException('Document types are not allowed.'); + } + } + + if (null !== $schemaOrCallable) { + $internalErrors = libxml_use_internal_errors(true); + libxml_clear_errors(); + + $e = null; + if (is_callable($schemaOrCallable)) { + try { + $valid = call_user_func($schemaOrCallable, $dom, $internalErrors); + } catch (\Exception $e) { + $valid = false; + } + } elseif (!is_array($schemaOrCallable) && is_file((string) $schemaOrCallable)) { + $valid = @$dom->schemaValidate($schemaOrCallable); + } else { + libxml_use_internal_errors($internalErrors); + + throw new \InvalidArgumentException('The schemaOrCallable argument has to be a valid path to XSD file or callable.'); + } + + if (!$valid) { + $messages = static::getXmlErrors($internalErrors); + if (empty($messages)) { + $messages = array(sprintf('The XML file "%s" is not valid.', $file)); + } + throw new \InvalidArgumentException(implode("\n", $messages), 0, $e); + } + + libxml_use_internal_errors($internalErrors); + } + + return $dom; + } + + /** + * Converts a \DomElement object to a PHP array. + * + * The following rules applies during the conversion: + * + * * Each tag is converted to a key value or an array + * if there is more than one "value" + * + * * The content of a tag is set under a "value" key (bar) + * if the tag also has some nested tags + * + * * The attributes are converted to keys () + * + * * The nested-tags are converted to keys (bar) + * + * @param \DomElement $element A \DomElement instance + * @param Boolean $checkPrefix Check prefix in an element or an attribute name + * + * @return array A PHP array + */ + public static function convertDomElementToArray(\DomElement $element, $checkPrefix = true) + { + $prefix = (string) $element->prefix; + $empty = true; + $config = array(); + foreach ($element->attributes as $name => $node) { + if ($checkPrefix && !in_array((string) $node->prefix, array('', $prefix), true)) { + continue; + } + $config[$name] = static::phpize($node->value); + $empty = false; + } + + $nodeValue = false; + foreach ($element->childNodes as $node) { + if ($node instanceof \DOMText) { + if (trim($node->nodeValue)) { + $nodeValue = trim($node->nodeValue); + $empty = false; + } + } elseif ($checkPrefix && $prefix != (string) $node->prefix) { + continue; + } elseif (!$node instanceof \DOMComment) { + $value = static::convertDomElementToArray($node, $checkPrefix); + + $key = $node->localName; + if (isset($config[$key])) { + if (!is_array($config[$key]) || !is_int(key($config[$key]))) { + $config[$key] = array($config[$key]); + } + $config[$key][] = $value; + } else { + $config[$key] = $value; + } + + $empty = false; + } + } + + if (false !== $nodeValue) { + $value = static::phpize($nodeValue); + if (count($config)) { + $config['value'] = $value; + } else { + $config = $value; + } + } + + return !$empty ? $config : null; + } + + /** + * Converts an xml value to a php type. + * + * @param mixed $value + * + * @return mixed + */ + public static function phpize($value) + { + $value = (string) $value; + $lowercaseValue = strtolower($value); + + switch (true) { + case 'null' === $lowercaseValue: + return null; + case ctype_digit($value): + $raw = $value; + $cast = intval($value); + + return '0' == $value[0] ? octdec($value) : (((string) $raw == (string) $cast) ? $cast : $raw); + case 'true' === $lowercaseValue: + return true; + case 'false' === $lowercaseValue: + return false; + case is_numeric($value): + return '0x' == $value[0].$value[1] ? hexdec($value) : floatval($value); + case preg_match('/^(-|\+)?[0-9,]+(\.[0-9]+)?$/', $value): + return floatval(str_replace(',', '', $value)); + default: + return $value; + } + } + + protected static function getXmlErrors($internalErrors) + { + $errors = array(); + foreach (libxml_get_errors() as $error) { + $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', + LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', + $error->code, + trim($error->message), + $error->file ? $error->file : 'n/a', + $error->line, + $error->column + ); + } + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); + + return $errors; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/autoloader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/autoloader.php new file mode 100644 index 00000000..e38020d5 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/autoloader.php @@ -0,0 +1,11 @@ +=5.3.2" - }, - "autoload": { - "psr-0": { "Symfony\\Component\\Config": "" } - }, - "target-dir": "Symfony/Component/Config" -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/phpunit.xml.dist b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/phpunit.xml.dist index e0195190..7ba6e552 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/phpunit.xml.dist +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Config/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/.gitattributes b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/.gitattributes deleted file mode 100644 index 80481513..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/Tests export-ignore -phpunit.xml.dist export-ignore diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/.gitignore b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/.gitignore new file mode 100644 index 00000000..44de97a3 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Application.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Application.php index 5a37f1e6..34a1f912 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Application.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Application.php @@ -26,6 +26,7 @@ use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Helper\FormatterHelper; use Symfony\Component\Console\Helper\DialogHelper; +use Symfony\Component\Console\Helper\ProgressHelper; /** * An Application is the container for a collection of commands. @@ -219,6 +220,18 @@ public function getHelperSet() return $this->helperSet; } + /** + * Set an input definition set to be used with this application + * + * @param InputDefinition $definition The input definition + * + * @api + */ + public function setDefinition(InputDefinition $definition) + { + $this->definition = $definition; + } + /** * Gets the InputDefinition related to this Application. * @@ -240,7 +253,8 @@ public function getHelp() $this->getLongVersion(), '', 'Usage:', - sprintf(" [options] command [arguments]\n"), + ' [options] command [arguments]', + '', 'Options:', ); @@ -606,7 +620,7 @@ public function find($name) * * @param string $namespace A namespace name * - * @return array An array of Command instances + * @return Command[] An array of Command instances * * @api */ @@ -784,7 +798,7 @@ public function renderException($e, $output) $len = $strlen($title); $width = $this->getTerminalWidth() ? $this->getTerminalWidth() - 1 : PHP_INT_MAX; $lines = array(); - foreach (preg_split("{\r?\n}", $e->getMessage()) as $line) { + foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) { foreach (str_split($line, $width - 4) as $line) { $lines[] = sprintf(' %s ', $line); $len = max($strlen($line) + 4, $len); @@ -848,19 +862,9 @@ public function renderException($e, $output) */ protected function getTerminalWidth() { - if (defined('PHP_WINDOWS_VERSION_BUILD')) { - if ($ansicon = getenv('ANSICON')) { - return preg_replace('{^(\d+)x.*$}', '$1', $ansicon); - } + $dimensions = $this->getTerminalDimensions(); - if (preg_match('{columns:\s*(\d+)}i', $this->getConsoleMode(), $matches)) { - return $matches[1]; - } - } - - if (preg_match("{rows.(\d+);.columns.(\d+);}i", $this->getSttyColumns(), $match)) { - return $match[2]; - } + return $dimensions[0]; } /** @@ -869,20 +873,42 @@ protected function getTerminalWidth() * @return int|null */ protected function getTerminalHeight() + { + $dimensions = $this->getTerminalDimensions(); + + return $dimensions[1]; + } + + /** + * Tries to figure out the terminal dimensions based on the current environment + * + * @return array Array containing width and height + */ + public function getTerminalDimensions() { if (defined('PHP_WINDOWS_VERSION_BUILD')) { - if ($ansicon = getenv('ANSICON')) { - return preg_replace('{^\d+x\d+ \(\d+x(\d+)\)$}', '$1', trim($ansicon)); + // extract [w, H] from "wxh (WxH)" + if (preg_match('/^(\d+)x\d+ \(\d+x(\d+)\)$/', trim(getenv('ANSICON')), $matches)) { + return array((int) $matches[1], (int) $matches[2]); } - - if (preg_match('{lines:\s*(\d+)}i', $this->getConsoleMode(), $matches)) { - return $matches[1]; + // extract [w, h] from "wxh" + if (preg_match('/^(\d+)x(\d+)$/', $this->getConsoleMode(), $matches)) { + return array((int) $matches[1], (int) $matches[2]); } } - if (preg_match("{rows.(\d+);.columns.(\d+);}i", $this->getSttyColumns(), $match)) { - return $match[1]; + if ($sttyString = $this->getSttyColumns()) { + // extract [w, h] from "rows h; columns w;" + if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) { + return array((int) $matches[2], (int) $matches[1]); + } + // extract [w, h] from "; h rows; w columns" + if (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) { + return array((int) $matches[2], (int) $matches[1]); + } } + + return array(null, null); } /** @@ -920,7 +946,7 @@ protected function getDefaultInputDefinition() /** * Gets the default commands that should always be available. * - * @return array An array of default Command instances + * @return Command[] An array of default Command instances */ protected function getDefaultCommands() { @@ -937,6 +963,7 @@ protected function getDefaultHelperSet() return new HelperSet(array( new FormatterHelper(), new DialogHelper(), + new ProgressHelper(), )); } @@ -966,7 +993,7 @@ private function getSttyColumns() /** * Runs and parses mode CON if it's available, suppressing any error output * - * @return string + * @return string x or null if it could not be parsed */ private function getConsoleMode() { @@ -982,7 +1009,9 @@ private function getConsoleMode() fclose($pipes[2]); proc_close($process); - return $info; + if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) { + return $matches[2].'x'.$matches[1]; + } } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/CHANGELOG.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/CHANGELOG.md index 79449d82..739b0e08 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/CHANGELOG.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/CHANGELOG.md @@ -1,6 +1,14 @@ CHANGELOG ========= +2.2.0 +----- + + * added support for colorization on Windows via ConEmu + * add a method to Dialog Helper to ask for a question and hide the response + * added support for interactive selections in console (DialogHelper::select()) + * added support for autocompletion as you type in Dialog Helper + 2.1.0 ----- diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Command/Command.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Command/Command.php index 6c54d99d..f475ad53 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Command/Command.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Command/Command.php @@ -202,6 +202,8 @@ protected function initialize(InputInterface $input, OutputInterface $output) * * @return integer The command exit code * + * @throws \Exception + * * @see setCode() * @see execute() * @@ -247,16 +249,22 @@ public function run(InputInterface $input, OutputInterface $output) * If this method is used, it overrides the code defined * in the execute() method. * - * @param \Closure $code A \Closure + * @param callable $code A callable(InputInterface $input, OutputInterface $output) * * @return Command The current instance * + * @throws \InvalidArgumentException + * * @see execute() * * @api */ - public function setCode(\Closure $code) + public function setCode($code) { + if (!is_callable($code)) { + throw new \InvalidArgumentException('Invalid callable provided to Command::setCode.'); + } + $this->code = $code; return $this; @@ -264,16 +272,20 @@ public function setCode(\Closure $code) /** * Merges the application definition with the command definition. + * + * @param Boolean $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments */ - private function mergeApplicationDefinition() + private function mergeApplicationDefinition($mergeArgs = true) { if (null === $this->application || true === $this->applicationDefinitionMerged) { return; } - $currentArguments = $this->definition->getArguments(); - $this->definition->setArguments($this->application->getDefinition()->getArguments()); - $this->definition->addArguments($currentArguments); + if ($mergeArgs) { + $currentArguments = $this->definition->getArguments(); + $this->definition->setArguments($this->application->getDefinition()->getArguments()); + $this->definition->addArguments($currentArguments); + } $this->definition->addOptions($this->application->getDefinition()->getOptions()); @@ -550,6 +562,11 @@ public function getHelper($name) */ public function asText() { + if ($this->application && !$this->applicationDefinitionMerged) { + $this->getSynopsis(); + $this->mergeApplicationDefinition(false); + } + $messages = array( 'Usage:', ' '.$this->getSynopsis(), @@ -579,6 +596,11 @@ public function asText() */ public function asXml($asDom = false) { + if ($this->application && !$this->applicationDefinitionMerged) { + $this->getSynopsis(); + $this->mergeApplicationDefinition(false); + } + $dom = new \DOMDocument('1.0', 'UTF-8'); $dom->formatOutput = true; $dom->appendChild($commandXML = $dom->createElement('command')); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Command/HelpCommand.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Command/HelpCommand.php index abb5fbdc..ac4dd3d5 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Command/HelpCommand.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Command/HelpCommand.php @@ -48,6 +48,8 @@ protected function configure() You can also output the help as XML by using the --xml option: php %command.full_name% --xml list + +To display the list of available commands, please use the list command. EOF ) ; @@ -69,7 +71,7 @@ public function setCommand(Command $command) protected function execute(InputInterface $input, OutputInterface $output) { if (null === $this->command) { - $this->command = $this->getApplication()->get($input->getArgument('command_name')); + $this->command = $this->getApplication()->find($input->getArgument('command_name')); } if ($input->getOption('xml')) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Formatter/OutputFormatter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Formatter/OutputFormatter.php index b16e8447..642590dc 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Formatter/OutputFormatter.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Formatter/OutputFormatter.php @@ -23,7 +23,7 @@ class OutputFormatter implements OutputFormatterInterface /** * The pattern to phrase the format. */ - const FORMAT_PATTERN = '#(\\\\?)<(/?)([a-z][a-z0-9_=;-]+)?>((?:(?!\\\\?<).)*)#is'; + const FORMAT_PATTERN = '#(\\\\?)<(/?)([a-z][a-z0-9_=;-]+)?>((?: [^<\\\\]+ | (?!<(?:/?[a-z]|/>)). | .(?<=\\\\<) )*)#isx'; private $decorated; private $styles = array(); @@ -44,8 +44,8 @@ public static function escape($text) /** * Initializes console output formatter. * - * @param Boolean $decorated Whether this formatter should actually decorate strings - * @param array $styles Array of "name => FormatterStyle" instances + * @param Boolean $decorated Whether this formatter should actually decorate strings + * @param FormatterStyle[] $styles Array of "name => FormatterStyle" instances * * @api */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/DialogHelper.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/DialogHelper.php index 03daf8c7..bef83bc8 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/DialogHelper.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/DialogHelper.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Console\Helper; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Formatter\OutputFormatterStyle; /** * The Dialog class provides helpers to interact with the user. @@ -21,27 +22,171 @@ class DialogHelper extends Helper { private $inputStream; + private static $shell; + private static $stty; + + /** + * Asks the user to select a value. + * + * @param OutputInterface $output An Output instance + * @param string|array $question The question to ask + * @param array $choices List of choices to pick from + * @param Boolean $default The default answer if the user enters nothing + * @param Boolean|integer $attempts Max number of times to ask before giving up (false by default, which means infinite) + * @param string $errorMessage Message which will be shown if invalid value from choice list would be picked + * + * @return integer|string The selected value (the key of the choices array) + * + * @throws \InvalidArgumentException + */ + public function select(OutputInterface $output, $question, $choices, $default = null, $attempts = false, $errorMessage = 'Value "%s" is invalid') + { + $width = max(array_map('strlen', array_keys($choices))); + + $messages = (array) $question; + foreach ($choices as $key => $value) { + $messages[] = sprintf(" [%-${width}s] %s", $key, $value); + } + + $output->writeln($messages); + + $result = $this->askAndValidate($output, '> ', function ($picked) use ($choices, $errorMessage) { + if (empty($choices[$picked])) { + throw new \InvalidArgumentException(sprintf($errorMessage, $picked)); + } + + return $picked; + }, $attempts, $default); + + return $result; + } /** * Asks a question to the user. * - * @param OutputInterface $output An Output instance - * @param string|array $question The question to ask - * @param string $default The default answer if none is given by the user + * @param OutputInterface $output An Output instance + * @param string|array $question The question to ask + * @param string $default The default answer if none is given by the user + * @param array $autocomplete List of values to autocomplete * * @return string The user answer * * @throws \RuntimeException If there is no data to read in the input stream */ - public function ask(OutputInterface $output, $question, $default = null) + public function ask(OutputInterface $output, $question, $default = null, array $autocomplete = null) { $output->write($question); - $ret = fgets($this->inputStream ?: STDIN, 4096); - if (false === $ret) { - throw new \RuntimeException('Aborted'); + $inputStream = $this->inputStream ?: STDIN; + + if (null === $autocomplete || !$this->hasSttyAvailable()) { + $ret = fgets($inputStream, 4096); + if (false === $ret) { + throw new \RuntimeException('Aborted'); + } + $ret = trim($ret); + } else { + $ret = ''; + + $i = 0; + $ofs = -1; + $matches = $autocomplete; + $numMatches = count($matches); + + $sttyMode = shell_exec('stty -g'); + + // Disable icanon (so we can fread each keypress) and echo (we'll do echoing here instead) + shell_exec('stty -icanon -echo'); + + // Add highlighted text style + $output->getFormatter()->setStyle('hl', new OutputFormatterStyle('black', 'white')); + + // Read a keypress + while ($c = fread($inputStream, 1)) { + // Backspace Character + if ("\177" === $c) { + if (0 === $numMatches && 0 !== $i) { + $i--; + // Move cursor backwards + $output->write("\033[1D"); + } + + if ($i === 0) { + $ofs = -1; + $matches = $autocomplete; + $numMatches = count($matches); + } else { + $numMatches = 0; + } + + // Pop the last character off the end of our string + $ret = substr($ret, 0, $i); + } elseif ("\033" === $c) { // Did we read an escape sequence? + $c .= fread($inputStream, 2); + + // A = Up Arrow. B = Down Arrow + if ('A' === $c[2] || 'B' === $c[2]) { + if ('A' === $c[2] && -1 === $ofs) { + $ofs = 0; + } + + if (0 === $numMatches) { + continue; + } + + $ofs += ('A' === $c[2]) ? -1 : 1; + $ofs = ($numMatches + $ofs) % $numMatches; + } + } elseif (ord($c) < 32) { + if ("\t" === $c || "\n" === $c) { + if ($numMatches > 0 && -1 !== $ofs) { + $ret = $matches[$ofs]; + // Echo out remaining chars for current match + $output->write(substr($ret, $i)); + $i = strlen($ret); + } + + if ("\n" === $c) { + $output->write($c); + break; + } + + $numMatches = 0; + } + + continue; + } else { + $output->write($c); + $ret .= $c; + $i++; + + $numMatches = 0; + $ofs = 0; + + foreach ($autocomplete as $value) { + // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle) + if (0 === strpos($value, $ret) && $i !== strlen($value)) { + $matches[$numMatches++] = $value; + } + } + } + + // Erase characters from cursor to end of line + $output->write("\033[K"); + + if ($numMatches > 0 && -1 !== $ofs) { + // Save cursor position + $output->write("\0337"); + // Write highlighted text + $output->write('' . substr($matches[$ofs], $i) . ''); + // Restore cursor position + $output->write("\0338"); + } + } + + // Reset stty so it behaves normally again + shell_exec(sprintf('stty %s', $sttyMode)); } - $ret = trim($ret); return strlen($ret) > 0 ? $ret : $default; } @@ -71,6 +216,76 @@ public function askConfirmation(OutputInterface $output, $question, $default = t return !$answer || 'y' == strtolower($answer[0]); } + /** + * Asks a question to the user, the response is hidden + * + * @param OutputInterface $output An Output instance + * @param string|array $question The question + * @param Boolean $fallback In case the response can not be hidden, whether to fallback on non-hidden question or not + * + * @return string The answer + * + * @throws \RuntimeException In case the fallback is deactivated and the response can not be hidden + */ + public function askHiddenResponse(OutputInterface $output, $question, $fallback = true) + { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + $exe = __DIR__ . '/../../Resources/bin/hiddeninput.exe'; + + // handle code running from a phar + if ('phar:' === substr(__FILE__, 0, 5)) { + $tmpExe = sys_get_temp_dir() . '/../../Resources/bin/hiddeninput.exe'; + copy($exe, $tmpExe); + $exe = $tmpExe; + } + + $output->write($question); + $value = rtrim(shell_exec($exe)); + $output->writeln(''); + + if (isset($tmpExe)) { + unlink($tmpExe); + } + + return $value; + } + + if ($this->hasSttyAvailable()) { + $output->write($question); + + $sttyMode = shell_exec('stty -g'); + + shell_exec('stty -echo'); + $value = fgets($this->inputStream ?: STDIN, 4096); + shell_exec(sprintf('stty %s', $sttyMode)); + + if (false === $value) { + throw new \RuntimeException('Aborted'); + } + + $value = trim($value); + $output->writeln(''); + + return $value; + } + + if (false !== $shell = $this->getShell()) { + $output->write($question); + $readCmd = $shell === 'csh' ? 'set mypassword = $<' : 'read -r mypassword'; + $command = sprintf("/usr/bin/env %s -c 'stty -echo; %s; stty echo; echo \$mypassword'", $shell, $readCmd); + $value = rtrim(shell_exec($command)); + $output->writeln(''); + + return $value; + } + + if ($fallback) { + return $this->ask($output, $question); + } + + throw new \RuntimeException('Unable to hide the response'); + } + /** * Asks for a value and validates the response. * @@ -78,33 +293,56 @@ public function askConfirmation(OutputInterface $output, $question, $default = t * validated data when the data is valid and throw an exception * otherwise. * - * @param OutputInterface $output An Output instance - * @param string|array $question The question to ask - * @param callback $validator A PHP callback - * @param integer $attempts Max number of times to ask before giving up (false by default, which means infinite) - * @param string $default The default answer if none is given by the user + * @param OutputInterface $output An Output instance + * @param string|array $question The question to ask + * @param callable $validator A PHP callback + * @param integer $attempts Max number of times to ask before giving up (false by default, which means infinite) + * @param string $default The default answer if none is given by the user + * @param array $autocomplete List of values to autocomplete * * @return mixed * * @throws \Exception When any of the validators return an error */ - public function askAndValidate(OutputInterface $output, $question, $validator, $attempts = false, $default = null) + public function askAndValidate(OutputInterface $output, $question, $validator, $attempts = false, $default = null, array $autocomplete = null) { - $error = null; - while (false === $attempts || $attempts--) { - if (null !== $error) { - $output->writeln($this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error')); - } + $that = $this; - $value = $this->ask($output, $question, $default); + $interviewer = function() use ($output, $question, $default, $autocomplete, $that) { + return $that->ask($output, $question, $default, $autocomplete); + }; - try { - return call_user_func($validator, $value); - } catch (\Exception $error) { - } - } + return $this->validateAttempts($interviewer, $output, $validator, $attempts); + } - throw $error; + /** + * Asks for a value, hide and validates the response. + * + * The validator receives the data to validate. It must return the + * validated data when the data is valid and throw an exception + * otherwise. + * + * @param OutputInterface $output An Output instance + * @param string|array $question The question to ask + * @param callable $validator A PHP callback + * @param integer $attempts Max number of times to ask before giving up (false by default, which means infinite) + * @param Boolean $fallback In case the response can not be hidden, whether to fallback on non-hidden question or not + * + * @return string The response + * + * @throws \Exception When any of the validators return an error + * @throws \RuntimeException In case the fallback is deactivated and the response can not be hidden + * + */ + public function askHiddenResponseAndValidate(OutputInterface $output, $question, $validator, $attempts = false, $fallback = true) + { + $that = $this; + + $interviewer = function() use ($output, $question, $fallback, $that) { + return $that->askHiddenResponse($output, $question, $fallback); + }; + + return $this->validateAttempts($interviewer, $output, $validator, $attempts); } /** @@ -130,12 +368,77 @@ public function getInputStream() } /** - * Returns the helper's canonical name. - * - * @return string The helper name + * {@inheritDoc} */ public function getName() { return 'dialog'; } + + /** + * Return a valid unix shell + * + * @return string|Boolean The valid shell name, false in case no valid shell is found + */ + private function getShell() + { + if (null !== self::$shell) { + return self::$shell; + } + + self::$shell = false; + + if (file_exists('/usr/bin/env')) { + // handle other OSs with bash/zsh/ksh/csh if available to hide the answer + $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null"; + foreach (array('bash', 'zsh', 'ksh', 'csh') as $sh) { + if ('OK' === rtrim(shell_exec(sprintf($test, $sh)))) { + self::$shell = $sh; + break; + } + } + } + + return self::$shell; + } + + private function hasSttyAvailable() + { + if (null !== self::$stty) { + return self::$stty; + } + + exec('stty 2>&1', $output, $exitcode); + + return self::$stty = $exitcode === 0; + } + + /** + * Validate an attempt + * + * @param callable $interviewer A callable that will ask for a question and return the result + * @param OutputInterface $output An Output instance + * @param callable $validator A PHP callback + * @param integer $attempts Max number of times to ask before giving up ; false will ask infinitely + * + * @return string The validated response + * + * @throws \Exception In case the max number of attempts has been reached and no valid response has been given + */ + private function validateAttempts($interviewer, OutputInterface $output, $validator, $attempts) + { + $error = null; + while (false === $attempts || $attempts--) { + if (null !== $error) { + $output->writeln($this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error')); + } + + try { + return call_user_func($validator, $interviewer()); + } catch (\Exception $error) { + } + } + + throw $error; + } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/FormatterHelper.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/FormatterHelper.php index 34ae3945..20c754cc 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/FormatterHelper.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/FormatterHelper.php @@ -91,9 +91,7 @@ private function strlen($string) } /** - * Returns the helper's canonical name. - * - * @return string The canonical name of the helper + * {@inheritDoc} */ public function getName() { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/ProgressHelper.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/ProgressHelper.php new file mode 100644 index 00000000..25736af6 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Helper/ProgressHelper.php @@ -0,0 +1,411 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Output\OutputInterface; + +/** + * The Progress class providers helpers to display progress output. + * + * @author Chris Jones + * @author Fabien Potencier + */ +class ProgressHelper extends Helper +{ + const FORMAT_QUIET = ' %percent%%'; + const FORMAT_NORMAL = ' %current%/%max% [%bar%] %percent%%'; + const FORMAT_VERBOSE = ' %current%/%max% [%bar%] %percent%% Elapsed: %elapsed%'; + const FORMAT_QUIET_NOMAX = ' %current%'; + const FORMAT_NORMAL_NOMAX = ' %current% [%bar%]'; + const FORMAT_VERBOSE_NOMAX = ' %current% [%bar%] Elapsed: %elapsed%'; + + // options + private $barWidth = 28; + private $barChar = '='; + private $emptyBarChar = '-'; + private $progressChar = '>'; + private $format = null; + private $redrawFreq = 1; + + private $lastMessagesLength; + private $barCharOriginal; + + /** + * @var OutputInterface + */ + private $output; + + /** + * Current step + * + * @var integer + */ + private $current; + + /** + * Maximum number of steps + * + * @var integer + */ + private $max; + + /** + * Start time of the progress bar + * + * @var integer + */ + private $startTime; + + /** + * List of formatting variables + * + * @var array + */ + private $defaultFormatVars = array( + 'current', + 'max', + 'bar', + 'percent', + 'elapsed', + ); + + /** + * Available formatting variables + * + * @var array + */ + private $formatVars; + + /** + * Stored format part widths (used for padding) + * + * @var array + */ + private $widths = array( + 'current' => 4, + 'max' => 4, + 'percent' => 3, + 'elapsed' => 6, + ); + + /** + * Various time formats + * + * @var array + */ + private $timeFormats = array( + array(0, '???'), + array(2, '1 sec'), + array(59, 'secs', 1), + array(60, '1 min'), + array(3600, 'mins', 60), + array(5400, '1 hr'), + array(86400, 'hrs', 3600), + array(129600, '1 day'), + array(604800, 'days', 86400), + ); + + /** + * Sets the progress bar width. + * + * @param int $size The progress bar size + */ + public function setBarWidth($size) + { + $this->barWidth = (int) $size; + } + + /** + * Sets the bar character. + * + * @param string $char A character + */ + public function setBarCharacter($char) + { + $this->barChar = $char; + } + + /** + * Sets the empty bar character. + * + * @param string $char A character + */ + public function setEmptyBarCharacter($char) + { + $this->emptyBarChar = $char; + } + + /** + * Sets the progress bar character. + * + * @param string $char A character + */ + public function setProgressCharacter($char) + { + $this->progressChar = $char; + } + + /** + * Sets the progress bar format. + * + * @param string $format The format + */ + public function setFormat($format) + { + $this->format = $format; + } + + /** + * Sets the redraw frequency. + * + * @param int $freq The frequency in seconds + */ + public function setRedrawFrequency($freq) + { + $this->redrawFreq = (int) $freq; + } + + /** + * Starts the progress output. + * + * @param OutputInterface $output An Output instance + * @param integer $max Maximum steps + */ + public function start(OutputInterface $output, $max = null) + { + $this->startTime = time(); + $this->current = 0; + $this->max = (int) $max; + $this->output = $output; + + if (null === $this->format) { + switch ($output->getVerbosity()) { + case OutputInterface::VERBOSITY_QUIET: + $this->format = self::FORMAT_QUIET_NOMAX; + if ($this->max > 0) { + $this->format = self::FORMAT_QUIET; + } + break; + case OutputInterface::VERBOSITY_VERBOSE: + $this->format = self::FORMAT_VERBOSE_NOMAX; + if ($this->max > 0) { + $this->format = self::FORMAT_VERBOSE; + } + break; + default: + $this->format = self::FORMAT_NORMAL_NOMAX; + if ($this->max > 0) { + $this->format = self::FORMAT_NORMAL; + } + break; + } + } + + $this->initialize(); + } + + /** + * Advances the progress output X steps. + * + * @param integer $step Number of steps to advance + * @param Boolean $redraw Whether to redraw or not + * + * @throws \LogicException + */ + public function advance($step = 1, $redraw = false) + { + if (null === $this->startTime) { + throw new \LogicException('You must start the progress bar before calling advance().'); + } + + if ($this->current === 0) { + $redraw = true; + } + $this->current += $step; + if ($redraw || $this->current % $this->redrawFreq === 0) { + $this->display(); + } + } + + /** + * Outputs the current progress string. + * + * @param Boolean $finish Forces the end result + * + * @throws \LogicException + */ + public function display($finish = false) + { + if (null === $this->startTime) { + throw new \LogicException('You must start the progress bar before calling display().'); + } + + $message = $this->format; + foreach ($this->generate($finish) as $name => $value) { + $message = str_replace("%{$name}%", $value, $message); + } + $this->overwrite($this->output, $message); + } + + /** + * Finishes the progress output. + */ + public function finish() + { + if (null === $this->startTime) { + throw new \LogicException('You must start the progress bar before calling finish().'); + } + + if ($this->startTime !== null) { + if (!$this->max) { + $this->barChar = $this->barCharOriginal; + $this->display(true); + } + $this->startTime = null; + $this->output->writeln(''); + $this->output = null; + } + } + + /** + * Initializes the progress helper. + */ + private function initialize() + { + $this->formatVars = array(); + foreach ($this->defaultFormatVars as $var) { + if (strpos($this->format, "%{$var}%") !== false) { + $this->formatVars[$var] = true; + } + } + + if ($this->max > 0) { + $this->widths['max'] = strlen($this->max); + $this->widths['current'] = $this->widths['max']; + } else { + $this->barCharOriginal = $this->barChar; + $this->barChar = $this->emptyBarChar; + } + } + + /** + * Generates the array map of format variables to values. + * + * @param Boolean $finish Forces the end result + * + * @return array Array of format vars and values + */ + private function generate($finish = false) + { + $vars = array(); + $percent = 0; + if ($this->max > 0) { + $percent = (double) round($this->current / $this->max, 2); + } + + if (isset($this->formatVars['bar'])) { + $completeBars = 0; + $emptyBars = 0; + if ($this->max > 0) { + $completeBars = floor($percent * $this->barWidth); + } else { + if (!$finish) { + $completeBars = floor($this->current % $this->barWidth); + } else { + $completeBars = $this->barWidth; + } + } + + $emptyBars = $this->barWidth - $completeBars - strlen($this->progressChar); + $bar = str_repeat($this->barChar, $completeBars); + if ($completeBars < $this->barWidth) { + $bar .= $this->progressChar; + $bar .= str_repeat($this->emptyBarChar, $emptyBars); + } + + $vars['bar'] = $bar; + } + + if (isset($this->formatVars['elapsed'])) { + $elapsed = time() - $this->startTime; + $vars['elapsed'] = str_pad($this->humaneTime($elapsed), $this->widths['elapsed'], ' ', STR_PAD_LEFT); + } + + if (isset($this->formatVars['current'])) { + $vars['current'] = str_pad($this->current, $this->widths['current'], ' ', STR_PAD_LEFT); + } + + if (isset($this->formatVars['max'])) { + $vars['max'] = $this->max; + } + + if (isset($this->formatVars['percent'])) { + $vars['percent'] = str_pad($percent * 100, $this->widths['percent'], ' ', STR_PAD_LEFT); + } + + return $vars; + } + + /** + * Converts seconds into human-readable format. + * + * @param integer $secs Number of seconds + * + * @return string Time in readable format + */ + private function humaneTime($secs) + { + $text = ''; + foreach ($this->timeFormats as $format) { + if ($secs < $format[0]) { + if (count($format) == 2) { + $text = $format[1]; + break; + } else { + $text = ceil($secs / $format[2]) . ' ' . $format[1]; + break; + } + } + } + + return $text; + } + + /** + * Overwrites a previous message to the output. + * + * @param OutputInterface $output An Output instance + * @param string|array $messages The message as an array of lines or a single string + */ + private function overwrite(OutputInterface $output, $messages) + { + // carriage return + $output->write("\x0D"); + if ($this->lastMessagesLength!==null) { + // clear the line with the length of the last message + $output->write(str_repeat("\x20", $this->lastMessagesLength)); + // carriage return + $output->write("\x0D"); + } + $output->write($messages); + + $this->lastMessagesLength=strlen($messages); + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return 'progress'; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/ArgvInput.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/ArgvInput.php index 3ca9b052..2618c069 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/ArgvInput.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/ArgvInput.php @@ -68,6 +68,7 @@ public function __construct(array $argv = null, InputDefinition $definition = nu protected function setTokens(array $tokens) { $this->tokens = $tokens; + $this->parse(); } /** @@ -215,12 +216,14 @@ private function addLongOption($name, $value) $option = $this->definition->getOption($name); - if (null === $value && $option->acceptValue()) { + if (null === $value && $option->acceptValue() && count($this->parsed)) { // if option accepts an optional or mandatory argument // let's see if there is one provided $next = array_shift($this->parsed); - if ('-' !== $next[0]) { + if (isset($next[0]) && '-' !== $next[0]) { $value = $next; + } elseif (empty($next)) { + $value = ''; } else { array_unshift($this->parsed, $next); } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/Input.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/Input.php index 70291be7..57f2972e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/Input.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/Input.php @@ -37,6 +37,8 @@ abstract class Input implements InputInterface public function __construct(InputDefinition $definition = null) { if (null === $definition) { + $this->arguments = array(); + $this->options = array(); $this->definition = new InputDefinition(); } else { $this->bind($definition); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/InputDefinition.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/InputDefinition.php index e1f16d79..69d2f1ef 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/InputDefinition.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Input/InputDefinition.php @@ -72,7 +72,7 @@ public function setDefinition(array $definition) /** * Sets the InputArgument objects. * - * @param array $arguments An array of InputArgument objects + * @param InputArgument[] $arguments An array of InputArgument objects * * @api */ @@ -178,7 +178,7 @@ public function hasArgument($name) /** * Gets the array of InputArgument objects. * - * @return array An array of InputArgument objects + * @return InputArgument[] An array of InputArgument objects * * @api */ @@ -225,7 +225,7 @@ public function getArgumentDefaults() /** * Sets the InputOption objects. * - * @param array $options An array of InputOption objects + * @param InputOption[] $options An array of InputOption objects * * @api */ @@ -310,7 +310,7 @@ public function hasOption($name) /** * Gets the array of InputOption objects. * - * @return array An array of InputOption objects + * @return InputOption[] An array of InputOption objects * * @api */ @@ -433,7 +433,7 @@ public function asText() $default = ''; } - $description = str_replace("\n", "\n".str_pad('', $max + 2, ' '), $argument->getDescription()); + $description = str_replace("\n", "\n".str_repeat(' ', $max + 2), $argument->getDescription()); $text[] = sprintf(" %-${max}s %s%s", $argument->getName(), $description, $default); } @@ -452,7 +452,7 @@ public function asText() } $multiple = $option->isArray() ? ' (multiple values allowed)' : ''; - $description = str_replace("\n", "\n".str_pad('', $max + 2, ' '), $option->getDescription()); + $description = str_replace("\n", "\n".str_repeat(' ', $max + 2), $option->getDescription()); $optionMax = $max - strlen($option->getName()) - 2; $text[] = sprintf(" %s %-${optionMax}s%s%s%s", diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/LICENSE deleted file mode 100644 index cdffe7ae..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2012 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/Output.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/Output.php index 3866dbc1..2493ae66 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/Output.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/Output.php @@ -123,7 +123,7 @@ public function getVerbosity() /** * Writes a message to the output and adds a newline at the end. * - * @param string|array $messages The message as an array of lines of a single string + * @param string|array $messages The message as an array of lines or a single string * @param integer $type The type of output * * @api @@ -136,7 +136,7 @@ public function writeln($messages, $type = 0) /** * Writes a message to the output. * - * @param string|array $messages The message as an array of lines of a single string + * @param string|array $messages The message as an array of lines or a single string * @param Boolean $newline Whether to add a newline or not * @param integer $type The type of output * diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/OutputInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/OutputInterface.php index f36ae034..6ca9f371 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/OutputInterface.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/OutputInterface.php @@ -33,7 +33,7 @@ interface OutputInterface /** * Writes a message to the output. * - * @param string|array $messages The message as an array of lines of a single string + * @param string|array $messages The message as an array of lines or a single string * @param Boolean $newline Whether to add a newline or not * @param integer $type The type of output (0: normal, 1: raw, 2: plain) * diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/StreamOutput.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/StreamOutput.php index f6dadb8e..831b2ae8 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/StreamOutput.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Output/StreamOutput.php @@ -95,7 +95,7 @@ protected function doWrite($message, $newline) * * Colorization is disabled if not supported by the stream: * - * - windows without ansicon + * - windows without ansicon and ConEmu * - non tty consoles * * @return Boolean true if the stream supports colorization, false otherwise @@ -104,7 +104,7 @@ protected function hasColorSupport() { // @codeCoverageIgnoreStart if (DIRECTORY_SEPARATOR == '\\') { - return false !== getenv('ANSICON'); + return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); } return function_exists('posix_isatty') && @posix_isatty($this->stream); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/README.md deleted file mode 100644 index d903776a..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/README.md +++ /dev/null @@ -1,48 +0,0 @@ -Console Component -================= - -Console eases the creation of beautiful and testable command line interfaces. - -The Application object manages the CLI application: - - use Symfony\Component\Console\Application; - - $console = new Application(); - $console->run(); - -The ``run()`` method parses the arguments and options passed on the command -line and executes the right command. - -Registering a new command can easily be done via the ``register()`` method, -which returns a ``Command`` instance: - - use Symfony\Component\Console\Input\InputInterface; - use Symfony\Component\Console\Input\InputArgument; - use Symfony\Component\Console\Input\InputOption; - use Symfony\Component\Console\Output\OutputInterface; - - $console - ->register('ls') - ->setDefinition(array( - new InputArgument('dir', InputArgument::REQUIRED, 'Directory name'), - )) - ->setDescription('Displays the files in the given directory') - ->setCode(function (InputInterface $input, OutputInterface $output) { - $dir = $input->getArgument('dir'); - - $output->writeln(sprintf('Dir listing for %s', $dir)); - }) - ; - -You can also register new commands via classes. - -The component provides a lot of features like output coloring, input and -output abstractions (so that you can easily unit-test your commands), -validation, automatic help messages, ... - -Resources ---------- - -Unit tests: - -https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/Console diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Resources/bin/hiddeninput.exe b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Resources/bin/hiddeninput.exe new file mode 100644 index 00000000..c8cf65e8 Binary files /dev/null and b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Resources/bin/hiddeninput.exe differ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Shell.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Shell.php index 2dc51b67..f0faa35e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Shell.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Shell.php @@ -203,5 +203,9 @@ public function getProcessIsolation() public function setProcessIsolation($processIsolation) { $this->processIsolation = (Boolean) $processIsolation; + + if ($this->processIsolation && !class_exists('Symfony\\Component\\Process\\Process')) { + throw new \RuntimeException('Unable to isolate processes as the Symfony Process Component is not installed.'); + } } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tester/ApplicationTester.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tester/ApplicationTester.php index 2c576aad..3c863542 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tester/ApplicationTester.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tester/ApplicationTester.php @@ -20,6 +20,11 @@ /** * Eases the testing of console applications. * + * When testing an application, don't forget to disable the auto exit flag: + * + * $application = new Application(); + * $application->setAutoExit(false); + * * @author Fabien Potencier */ class ApplicationTester diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/ApplicationTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/ApplicationTest.php index 5ae642f3..23edd490 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/ApplicationTest.php @@ -12,8 +12,11 @@ namespace Symfony\Component\Console\Tests; use Symfony\Component\Console\Application; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Helper\FormatterHelper; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\Output; @@ -239,7 +242,6 @@ public function testFindAlternativeExceptionMessage() $this->assertRegExp('/Did you mean this/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with one alternative'); } - $application->add(new \Foo1Command()); $application->add(new \Foo2Command()); @@ -520,4 +522,139 @@ public function getAddingAlreadySetDefinitionElementData() array(new InputOption('query', 'q', InputOption::VALUE_NONE)), ); } + + public function testGetDefaultHelperSetReturnsDefaultValues() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $helperSet = $application->getHelperSet(); + + $this->assertTrue($helperSet->has('formatter')); + $this->assertTrue($helperSet->has('dialog')); + $this->assertTrue($helperSet->has('progress')); + } + + public function testAddingSingleHelperSetOverwritesDefaultValues() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); + + $helperSet = $application->getHelperSet(); + + $this->assertTrue($helperSet->has('formatter')); + + // no other default helper set should be returned + $this->assertFalse($helperSet->has('dialog')); + $this->assertFalse($helperSet->has('progress')); + } + + public function testOverwritingDefaultHelperSetOverwritesDefaultValues() + { + $application = new CustomApplication(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); + + $helperSet = $application->getHelperSet(); + + $this->assertTrue($helperSet->has('formatter')); + + // no other default helper set should be returned + $this->assertFalse($helperSet->has('dialog')); + $this->assertFalse($helperSet->has('progress')); + } + + public function testGetDefaultInputDefinitionReturnsDefaultValues() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $inputDefinition = $application->getDefinition(); + + $this->assertTrue($inputDefinition->hasArgument('command')); + + $this->assertTrue($inputDefinition->hasOption('help')); + $this->assertTrue($inputDefinition->hasOption('quiet')); + $this->assertTrue($inputDefinition->hasOption('verbose')); + $this->assertTrue($inputDefinition->hasOption('version')); + $this->assertTrue($inputDefinition->hasOption('ansi')); + $this->assertTrue($inputDefinition->hasOption('no-ansi')); + $this->assertTrue($inputDefinition->hasOption('no-interaction')); + } + + public function testOverwritingDefaultInputDefinitionOverwritesDefaultValues() + { + $application = new CustomApplication(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $inputDefinition = $application->getDefinition(); + + // check whether the default arguments and options are not returned any more + $this->assertFalse($inputDefinition->hasArgument('command')); + + $this->assertFalse($inputDefinition->hasOption('help')); + $this->assertFalse($inputDefinition->hasOption('quiet')); + $this->assertFalse($inputDefinition->hasOption('verbose')); + $this->assertFalse($inputDefinition->hasOption('version')); + $this->assertFalse($inputDefinition->hasOption('ansi')); + $this->assertFalse($inputDefinition->hasOption('no-ansi')); + $this->assertFalse($inputDefinition->hasOption('no-interaction')); + + $this->assertTrue($inputDefinition->hasOption('custom')); + } + + public function testSettingCustomInputDefinitionOverwritesDefaultValues() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $application->setDefinition(new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')))); + + $inputDefinition = $application->getDefinition(); + + // check whether the default arguments and options are not returned any more + $this->assertFalse($inputDefinition->hasArgument('command')); + + $this->assertFalse($inputDefinition->hasOption('help')); + $this->assertFalse($inputDefinition->hasOption('quiet')); + $this->assertFalse($inputDefinition->hasOption('verbose')); + $this->assertFalse($inputDefinition->hasOption('version')); + $this->assertFalse($inputDefinition->hasOption('ansi')); + $this->assertFalse($inputDefinition->hasOption('no-ansi')); + $this->assertFalse($inputDefinition->hasOption('no-interaction')); + + $this->assertTrue($inputDefinition->hasOption('custom')); + } +} + +class CustomApplication extends Application +{ + /** + * Overwrites the default input definition. + * + * @return InputDefinition An InputDefinition instance + */ + protected function getDefaultInputDefinition() + { + return new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.'))); + } + + /** + * Gets the default helper set with the helpers that should always be available. + * + * @return HelperSet A HelperSet instance + */ + protected function getDefaultHelperSet() + { + return new HelperSet(array(new FormatterHelper())); + } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Command/CommandTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Command/CommandTest.php index eb78b891..166ce787 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Command/CommandTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -240,6 +240,31 @@ public function testSetCode() $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); } + public function testSetCodeWithNonClosureCallable() + { + $command = new \TestCommand(); + $ret = $command->setCode(array($this, 'callableMethodCommand')); + $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); + $tester = new CommandTester($command); + $tester->execute(array()); + $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); + } + + /** + * @expectedException InvalidArgumentException + * @expectedExceptionMessage Invalid callable provided to Command::setCode. + */ + public function testSetCodeWithNonCallable() + { + $command = new \TestCommand(); + $command->setCode(array($this, 'nonExistentMethod')); + } + + public function callableMethodCommand(InputInterface $input, OutputInterface $output) + { + $output->writeln('from the code...'); + } + public function testAsText() { $command = new \TestCommand(); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Command/HelpCommandTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Command/HelpCommandTest.php index 417eea1a..b62973d9 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Command/HelpCommandTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Command/HelpCommandTest.php @@ -22,6 +22,14 @@ public function testExecute() { $command = new HelpCommand(); + $application = new Application(); + $command->setApplication($application); + $commandTester = new CommandTester($command); + $commandTester->execute(array('command_name' => 'li')); + $this->assertRegExp('/list \[--xml\] \[--raw\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); + + $command = new HelpCommand(); + $commandTester = new CommandTester($command); $command->setCommand(new ListCommand()); $commandTester->execute(array()); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php index ac2beee1..1c546399 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php @@ -8,4 +8,4 @@ protected function configure() { $this->setName('foo3:bar:toh'); } -} \ No newline at end of file +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt index ce21a328..ed168f25 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt @@ -10,7 +10,9 @@ You can also output the help as XML by using the <comment>--xml</comment> option: - <info>php app/console help --xml list</info> + <info>php app/console help --xml list</info> + + To display the list of available commands, please use the <info>list</info> command. @@ -24,6 +26,27 @@ + + + + + + + @@ -68,7 +91,29 @@ afoobar - + + + + + + + + + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt index 9e1f4a1d..ef92f85c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt @@ -9,7 +9,29 @@ afoobar - + + + + + + + + + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_run2.txt b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_run2.txt index cad7dd5e..6831afdd 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_run2.txt +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Fixtures/application_run2.txt @@ -23,4 +23,6 @@ Help: You can also output the help as XML by using the --xml option: php app/console help --xml list + + To display the list of available commands, please use the list command. diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php index 5f3b809c..497630e8 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php @@ -9,7 +9,6 @@ * file that was distributed with this source code. */ - namespace Symfony\Component\Console\Tests\Formatter; use Symfony\Component\Console\Formatter\OutputFormatter; @@ -74,6 +73,26 @@ public function testNestedStyles() ); } + public function testStyleMatchingNotGreedy() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals( + "(\033[32m>=2.0,<2.3\033[0m)", + $formatter->format('(>=2.0,<2.3)') + ); + } + + public function testStyleEscaping() + { + $formatter = new OutputFormatter(true); + + $this->assertEquals( + "(\033[32mz>=2.0,format('('.$formatter->escape('z>=2.0,)') + ); + } + public function testDeepNestedStyles() { $formatter = new OutputFormatter(true); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Helper/DialogHelperTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Helper/DialogHelperTest.php index a486f620..12f27005 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Helper/DialogHelperTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Helper/DialogHelperTest.php @@ -18,6 +18,31 @@ class DialogHelperTest extends \PHPUnit_Framework_TestCase { + public function testSelect() + { + $dialog = new DialogHelper(); + + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $heroes = array('Superman', 'Batman', 'Spiderman'); + + $dialog->setInputStream($this->getInputStream("\n1\nFabien\n1\nFabien\nFabien\n")); + $this->assertEquals('2', $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, '2')); + $this->assertEquals('1', $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes)); + $this->assertEquals('1', $dialog->select($output = $this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, false, 'Input "%s" is not a superhero!')); + + rewind($output->getStream()); + $this->assertContains('Input "Fabien" is not a superhero!', stream_get_contents($output->getStream())); + + try { + $this->assertEquals('1', $dialog->select($output = $this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, 1)); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertEquals('Value "Fabien" is invalid', $e->getMessage()); + } + } + public function testAsk() { $dialog = new DialogHelper(); @@ -31,6 +56,48 @@ public function testAsk() $this->assertEquals('What time is it?', stream_get_contents($output->getStream())); } + public function testAskWithAutocomplete() + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + // Acm + // AcsTest + // + // + // Test + // + // S + $inputStream = $this->getInputStream("Acm\nAc\177\177s\tTest\n\n\033[A\033[A\n\033[A\033[A\033[A\033[A\033[A\tTest\n\033[B\nS\177\177\033[B\033[B\n"); + + $dialog = new DialogHelper(); + $dialog->setInputStream($inputStream); + + $bundles = array('AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle'); + + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); + $this->assertEquals('AsseticBundleTest', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); + $this->assertEquals('FrameworkBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); + $this->assertEquals('SecurityBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); + $this->assertEquals('FooBundleTest', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); + $this->assertEquals('AsseticBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); + } + + public function testAskHiddenResponse() + { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->markTestSkipped('This test is not supported on Windows'); + } + + $dialog = new DialogHelper(); + + $dialog->setInputStream($this->getInputStream("8AM\n")); + + $this->assertEquals('8AM', $dialog->askHiddenResponse($this->getOutputStream(), 'What time is it?')); + } + public function testAskConfirmation() { $dialog = new DialogHelper(); @@ -90,4 +157,11 @@ protected function getOutputStream() { return new StreamOutput(fopen('php://memory', 'r+', false)); } + + private function hasSttyAvailable() + { + exec('stty 2>&1', $output, $exitcode); + + return $exitcode === 0; + } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php new file mode 100644 index 00000000..b5560263 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php @@ -0,0 +1,96 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use Symfony\Component\Console\Helper\ProgressHelper; +use Symfony\Component\Console\Output\StreamOutput; + +class ProgressHelperTest extends \PHPUnit_Framework_TestCase +{ + public function testAdvance() + { + $progress = new ProgressHelper(); + $progress->start($output = $this->getOutputStream()); + $progress->advance(); + + rewind($output->getStream()); + $this->assertEquals($this->generateOutput(' 1 [->--------------------------]'), stream_get_contents($output->getStream())); + } + + public function testAdvanceWithStep() + { + $progress = new ProgressHelper(); + $progress->start($output = $this->getOutputStream()); + $progress->advance(5); + + rewind($output->getStream()); + $this->assertEquals($this->generateOutput(' 5 [----->----------------------]'), stream_get_contents($output->getStream())); + } + + public function testAdvanceMultipleTimes() + { + $progress = new ProgressHelper(); + $progress->start($output = $this->getOutputStream()); + $progress->advance(3); + $progress->advance(2); + + rewind($output->getStream()); + $this->assertEquals($this->generateOutput(' 3 [--->------------------------]').$this->generateOutput(' 5 [----->----------------------]'), stream_get_contents($output->getStream())); + } + + public function testCustomizations() + { + $progress = new ProgressHelper(); + $progress->setBarWidth(10); + $progress->setBarCharacter('_'); + $progress->setEmptyBarCharacter(' '); + $progress->setProgressCharacter('/'); + $progress->setFormat(' %current%/%max% [%bar%] %percent%%'); + $progress->start($output = $this->getOutputStream(), 10); + $progress->advance(); + + rewind($output->getStream()); + $this->assertEquals($this->generateOutput(' 1/10 [_/ ] 10%'), stream_get_contents($output->getStream())); + } + + public function testPercent() + { + $progress = new ProgressHelper(); + $progress->start($output = $this->getOutputStream(), 50); + $progress->display(); + $progress->advance(); + $progress->advance(); + + rewind($output->getStream()); + $this->assertEquals($this->generateOutput(' 0/50 [>---------------------------] 0%').$this->generateOutput(' 1/50 [>---------------------------] 2%').$this->generateOutput(' 2/50 [=>--------------------------] 4%'), stream_get_contents($output->getStream())); + } + + protected function getOutputStream() + { + return new StreamOutput(fopen('php://memory', 'r+', false)); + } + + protected $lastMessagesLength; + + protected function generateOutput($expected) + { + $expectedout = $expected; + + if ($this->lastMessagesLength !== null) { + $expectedout = str_repeat("\x20", $this->lastMessagesLength)."\x0D".$expected; + } + + $this->lastMessagesLength = strlen($expected); + + return "\x0D".$expectedout; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Input/ArgvInputTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Input/ArgvInputTest.php index cf631770..fc7ab218 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Input/ArgvInputTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Input/ArgvInputTest.php @@ -71,6 +71,18 @@ public function testParser() $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)))); $this->assertEquals(array('foo' => 'bar'), $input->getOptions(), '->parse() parses short options with a required value (with a space separator)'); + $input = new ArgvInput(array('cli.php', '-f', '')); + $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)))); + $this->assertEquals(array('foo' => ''), $input->getOptions(), '->parse() parses short options with an optional empty value'); + + $input = new ArgvInput(array('cli.php', '-f', '', 'foo')); + $input->bind(new InputDefinition(array(new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)))); + $this->assertEquals(array('foo' => ''), $input->getOptions(), '->parse() parses short options with an optional empty value followed by an argument'); + + $input = new ArgvInput(array('cli.php', '-f', '', '-b')); + $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')))); + $this->assertEquals(array('foo' => '', 'bar' => true), $input->getOptions(), '->parse() parses short options with an optional empty value followed by an option'); + $input = new ArgvInput(array('cli.php', '-f', '-b', 'foo')); $input->bind(new InputDefinition(array(new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')))); $this->assertEquals(array('foo' => null, 'bar' => true), $input->getOptions(), '->parse() parses short options with an optional value which is not present'); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Input/StringInputTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Input/StringInputTest.php index 031797ce..4a165d4a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Input/StringInputTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/Input/StringInputTest.php @@ -12,6 +12,8 @@ namespace Symfony\Component\Console\Tests\Input; use Symfony\Component\Console\Input\StringInput; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputOption; class StringInputTest extends \PHPUnit_Framework_TestCase { @@ -27,6 +29,18 @@ public function testTokenize($input, $tokens, $message) $this->assertEquals($tokens, $p->getValue($input), $message); } + public function testInputOptionWithGivenString() + { + $definition = new InputDefinition( + array(new InputOption('foo', null, InputOption::VALUE_REQUIRED)) + ); + + $input = new StringInput('--foo=bar', $definition); + $actual = $input->getOption('foo'); + + $this->assertEquals('bar', $actual); + } + public function getTokenizeData() { return array( diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/bootstrap.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/bootstrap.php deleted file mode 100644 index c486b726..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Console')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Console')).'.php')) { - require_once $file; - } - } -}); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/autoloader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/autoloader.php new file mode 100644 index 00000000..e38020d5 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/autoloader.php @@ -0,0 +1,11 @@ +=5.3.2" - }, - "autoload": { - "psr-0": { "Symfony\\Component\\Console": "" } - }, - "target-dir": "Symfony/Component/Console" -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/phpunit.xml.dist b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/phpunit.xml.dist index fd1c069f..8a7edd46 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/phpunit.xml.dist +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Console/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/.gitattributes b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/.gitattributes deleted file mode 100644 index 80481513..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/Tests export-ignore -phpunit.xml.dist export-ignore diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/.gitignore b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/.gitignore index d1502b08..44de97a3 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/.gitignore +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/CHANGELOG.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/CHANGELOG.md index 8f5d6b32..4839bd8b 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/CHANGELOG.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/CHANGELOG.md @@ -1,6 +1,15 @@ CHANGELOG ========= +2.2.0 +----- + + * added Extension::isConfigEnabled() to ease working with enableable configurations + * added an Extension base class with sensible defaults to be used in conjunction + with the Config component. + * added PrependExtensionInterface (to be able to allow extensions to prepend + application configuration settings for any Bundle) + 2.1.0 ----- @@ -12,4 +21,3 @@ CHANGELOG (this includes dumped containers) * [BC BREAK] fixed unescaping of class arguments, method ParameterBag::unescapeValue() was made public - diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php index 9cb3ff06..e24b5b02 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php @@ -49,7 +49,7 @@ public function process(ContainerBuilder $container) /** * Checks for circular references. * - * @param array $edges An array of Nodes + * @param ServiceReferenceGraphEdge[] $edges An array of Edges * * @throws ServiceCircularReferenceException When a circular reference is found. */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php index a9beb5b9..7573084c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php @@ -12,6 +12,7 @@ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; /** * Merges extension configs into the container builder @@ -29,6 +30,12 @@ public function process(ContainerBuilder $container) $definitions = $container->getDefinitions(); $aliases = $container->getAliases(); + foreach ($container->getExtensions() as $extension) { + if ($extension instanceof PrependExtensionInterface) { + $extension->prepend($container); + } + } + foreach ($container->getExtensions() as $name => $extension) { if (!$config = $container->getExtensionConfig($name)) { // this extension was not called @@ -37,6 +44,7 @@ public function process(ContainerBuilder $container) $config = $container->getParameterBag()->resolveValue($config); $tmpContainer = new ContainerBuilder($container->getParameterBag()); + $tmpContainer->setResourceTracking($container->isTrackingResources()); $tmpContainer->addObjectResource($extension); $extension->load($config, $tmpContainer); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php index 41779b74..6073abe6 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php @@ -21,13 +21,20 @@ */ class RepeatedPass implements CompilerPassInterface { - private $repeat; + /** + * @var Boolean + */ + private $repeat = false; + + /** + * @var RepeatablePassInterface[] + */ private $passes; /** * Constructor. * - * @param array $passes An array of RepeatablePassInterface objects + * @param RepeatablePassInterface[] $passes An array of RepeatablePassInterface objects * * @throws InvalidArgumentException when the passes don't implement RepeatablePassInterface */ @@ -72,7 +79,7 @@ public function setRepeat() /** * Returns the passes * - * @return array An array of RepeatablePassInterface objects + * @return RepeatablePassInterface[] An array of RepeatablePassInterface objects */ public function getPasses() { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php index 19641849..972d708c 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php @@ -12,6 +12,7 @@ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Reference; /** @@ -30,6 +31,8 @@ class ReplaceAliasByActualDefinitionPass implements CompilerPassInterface * Process the Container to replace aliases with service definitions. * * @param ContainerBuilder $container + * + * @throws InvalidArgumentException if the service definition does not exist */ public function process(ContainerBuilder $container) { @@ -39,7 +42,11 @@ public function process(ContainerBuilder $container) foreach ($container->getAliases() as $id => $alias) { $aliasId = (string) $alias; - $definition = $container->getDefinition($aliasId); + try { + $definition = $container->getDefinition($aliasId); + } catch (InvalidArgumentException $e) { + throw new InvalidArgumentException(sprintf('Unable to replace alias "%s" with "%s".', $alias, $id), null, $e); + } if ($definition->isPublic()) { continue; diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php index 0674ad4f..6fad9a28 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php @@ -74,7 +74,7 @@ public function process(ContainerBuilder $container) * * @return array * - * @throws \RuntimeException When the config is invalid + * @throws RuntimeException When the config is invalid */ private function processArguments(array $arguments, $inMethodCall = false) { @@ -89,7 +89,7 @@ private function processArguments(array $arguments, $inMethodCall = false) // resolve invalid behavior if ($exists && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) { - $arguments[$k] = new Reference($id); + $arguments[$k] = new Reference($id, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $argument->isStrict()); } elseif (!$exists && ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) { $arguments[$k] = null; } elseif (!$exists && ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php index 0d9ed164..6fc0a873 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php @@ -26,7 +26,7 @@ class ResolveParameterPlaceHoldersPass implements CompilerPassInterface * * @param ContainerBuilder $container * - * @throws ParameterNotFoundException When an invalid parameter is referenced + * @throws ParameterNotFoundException */ public function process(ContainerBuilder $container) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php index 267bac42..fbd33eee 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php @@ -23,6 +23,9 @@ */ class ServiceReferenceGraph { + /** + * @var ServiceReferenceGraphNode[] + */ private $nodes; /** @@ -66,7 +69,7 @@ public function getNode($id) /** * Returns all nodes. * - * @return array An array of all ServiceReferenceGraphNode objects + * @return ServiceReferenceGraphNode[] An array of all ServiceReferenceGraphNode objects */ public function getNodes() { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Container.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Container.php index 1786158c..8a2c1b3a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Container.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Container.php @@ -61,7 +61,11 @@ */ class Container implements IntrospectableContainerInterface { + /** + * @var ParameterBagInterface + */ protected $parameterBag; + protected $services; protected $scopes; protected $scopeChildren; @@ -180,22 +184,22 @@ public function setParameter($name, $value) * @param object $service The service instance * @param string $scope The scope of the service * - * @throws \RuntimeException When trying to set a service in an inactive scope - * @throws \InvalidArgumentException When trying to set a service in the prototype scope + * @throws RuntimeException When trying to set a service in an inactive scope + * @throws InvalidArgumentException When trying to set a service in the prototype scope * * @api */ public function set($id, $service, $scope = self::SCOPE_CONTAINER) { if (self::SCOPE_PROTOTYPE === $scope) { - throw new InvalidArgumentException('You cannot set services of scope "prototype".'); + throw new InvalidArgumentException(sprintf('You cannot set service "%s" of scope "prototype".', $id)); } $id = strtolower($id); if (self::SCOPE_CONTAINER !== $scope) { if (!isset($this->scopedServices[$scope])) { - throw new RuntimeException('You cannot set services of inactive scopes.'); + throw new RuntimeException(sprintf('You cannot set service "%s" of inactive scope.', $id)); } $this->scopedServices[$scope][$id] = $service; @@ -334,8 +338,10 @@ public function enterScope($name) unset($this->scopedServices[$name]); foreach ($this->scopeChildren[$name] as $child) { - $services[$child] = $this->scopedServices[$child]; - unset($this->scopedServices[$child]); + if (isset($this->scopedServices[$child])) { + $services[$child] = $this->scopedServices[$child]; + unset($this->scopedServices[$child]); + } } // update global map @@ -397,7 +403,7 @@ public function leaveScope($name) * * @param ScopeInterface $scope * - * @throws \InvalidArgumentException When the scope is invalid + * @throws InvalidArgumentException * * @api */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/ContainerBuilder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/ContainerBuilder.php index 0fd333ae..d4a62b8b 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -31,14 +31,63 @@ */ class ContainerBuilder extends Container implements TaggedContainerInterface { - private $extensions = array(); - private $extensionsByNs = array(); - private $definitions = array(); - private $aliases = array(); - private $resources = array(); + /** + * @var ExtensionInterface[] + */ + private $extensions = array(); + + /** + * @var ExtensionInterface[] + */ + private $extensionsByNs = array(); + + /** + * @var Definition[] + */ + private $definitions = array(); + + /** + * @var Alias[] + */ + private $aliases = array(); + + /** + * @var ResourceInterface[] + */ + private $resources = array(); + private $extensionConfigs = array(); + + /** + * @var Compiler + */ private $compiler; + private $trackResources = true; + + /** + * Sets the track resources flag. + * + * If you are not using the loaders and therefore don't want + * to depend on the Config component, set this flag to false. + * + * @param Boolean $track true if you want to track resources, false otherwise + */ + public function setResourceTracking($track) + { + $this->trackResources = (Boolean) $track; + } + + /** + * Checks if resources are tracked. + * + * @return Boolean true if resources are tracked, false otherwise + */ + public function isTrackingResources() + { + return $this->trackResources; + } + /** * Registers an extension. * @@ -62,7 +111,7 @@ public function registerExtension(ExtensionInterface $extension) * * @return ExtensionInterface An extension instance * - * @throws \LogicException if the extension is not registered + * @throws LogicException if the extension is not registered * * @api */ @@ -82,7 +131,7 @@ public function getExtension($name) /** * Returns all registered extensions. * - * @return array An array of ExtensionInterface + * @return ExtensionInterface[] An array of ExtensionInterface * * @api */ @@ -128,13 +177,30 @@ public function getResources() */ public function addResource(ResourceInterface $resource) { + if (!$this->trackResources) { + return $this; + } + $this->resources[] = $resource; return $this; } + /** + * Sets the resources for this configuration. + * + * @param ResourceInterface[] $resources An array of resources + * + * @return ContainerBuilder The current instance + * + * @api + */ public function setResources(array $resources) { + if (!$this->trackResources) { + return $this; + } + $this->resources = $resources; return $this; @@ -145,14 +211,22 @@ public function setResources(array $resources) * * @param object $object An object instance * + * @return ContainerBuilder The current instance + * * @api */ public function addObjectResource($object) { + if (!$this->trackResources) { + return $this; + } + $parent = new \ReflectionObject($object); do { $this->addResource(new FileResource($parent->getFileName())); } while ($parent = $parent->getParentClass()); + + return $this; } /** @@ -187,6 +261,8 @@ public function loadFromExtension($extension, array $values = array()) * @param CompilerPassInterface $pass A compiler pass * @param string $type The type of compiler pass * + * @return ContainerBuilder The current instance + * * @api */ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) @@ -198,6 +274,8 @@ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig: $this->compiler->addPass($pass, $type); $this->addObjectResource($pass); + + return $this; } /** @@ -270,7 +348,10 @@ public function getScopeChildren() public function set($id, $service, $scope = self::SCOPE_CONTAINER) { if ($this->isFrozen()) { - throw new BadMethodCallException('Setting service on a frozen container is not allowed'); + // setting a synthetic service on a frozen container is alright + if (!isset($this->definitions[$id]) || !$this->definitions[$id]->isSynthetic()) { + throw new BadMethodCallException('Setting service on a frozen container is not allowed'); + } } $id = strtolower($id); @@ -393,8 +474,10 @@ public function merge(ContainerBuilder $container) $this->addAliases($container->getAliases()); $this->getParameterBag()->add($container->getParameterBag()->all()); - foreach ($container->getResources() as $resource) { - $this->addResource($resource); + if ($this->trackResources) { + foreach ($container->getResources() as $resource) { + $this->addResource($resource); + } } foreach ($this->extensions as $name => $extension) { @@ -424,6 +507,21 @@ public function getExtensionConfig($name) return $this->extensionConfigs[$name]; } + /** + * Prepends a config array to the configs of the given extension. + * + * @param string $name The name of the extension + * @param array $config The config to set + */ + public function prependExtensionConfig($name, array $config) + { + if (!isset($this->extensionConfigs[$name])) { + $this->extensionConfigs[$name] = array(); + } + + array_unshift($this->extensionConfigs[$name], $config); + } + /** * Compiles the container. * @@ -446,8 +544,10 @@ public function compile() $this->compiler = new Compiler(); } - foreach ($this->compiler->getPassConfig()->getPasses() as $pass) { - $this->addObjectResource($pass); + if ($this->trackResources) { + foreach ($this->compiler->getPassConfig()->getPasses() as $pass) { + $this->addObjectResource($pass); + } } $this->compiler->compile($this); @@ -484,7 +584,7 @@ public function addAliases(array $aliases) /** * Sets the service aliases. * - * @param array $aliases An array of service definitions + * @param array $aliases An array of aliases * * @api */ @@ -500,8 +600,8 @@ public function setAliases(array $aliases) * @param string $alias The alias to create * @param string|Alias $id The service to alias * - * @throws \InvalidArgumentException if the id is not a string or an Alias - * @throws \InvalidArgumentException if the alias is for itself + * @throws InvalidArgumentException if the id is not a string or an Alias + * @throws InvalidArgumentException if the alias is for itself * * @api */ @@ -619,7 +719,7 @@ public function addDefinitions(array $definitions) /** * Sets the service definitions. * - * @param array $definitions An array of service definitions + * @param Definition[] $definitions An array of service definitions * * @api */ @@ -734,19 +834,22 @@ public function findDefinition($id) * * @throws RuntimeException When the scope is inactive * @throws RuntimeException When the factory definition is incomplete + * @throws RuntimeException When the service is a synthetic service * @throws InvalidArgumentException When configure callable is not callable */ private function createService(Definition $definition, $id) { + if ($definition->isSynthetic()) { + throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id)); + } + $parameterBag = $this->getParameterBag(); if (null !== $definition->getFile()) { require_once $parameterBag->resolveValue($definition->getFile()); } - $arguments = $this->resolveServices( - $parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments())) - ); + $arguments = $this->resolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments()))); if (null !== $definition->getFactoryMethod()) { if (null !== $definition->getFactoryClass()) { @@ -754,7 +857,7 @@ private function createService(Definition $definition, $id) } elseif (null !== $definition->getFactoryService()) { $factory = $this->get($parameterBag->resolveValue($definition->getFactoryService())); } else { - throw new RuntimeException('Cannot create service from factory method without a factory service or factory class.'); + throw new RuntimeException(sprintf('Cannot create service "%s" from factory method without a factory service or factory class.', $id)); } $service = call_user_func_array(array($factory, $definition->getFactoryMethod()), $arguments); @@ -766,7 +869,7 @@ private function createService(Definition $definition, $id) if (self::SCOPE_PROTOTYPE !== $scope = $definition->getScope()) { if (self::SCOPE_CONTAINER !== $scope && !isset($this->scopedServices[$scope])) { - throw new RuntimeException('You tried to create a service of an inactive scope.'); + throw new RuntimeException(sprintf('You tried to create the "%s" service of an inactive scope.', $id)); } $this->services[$lowerId = strtolower($id)] = $service; @@ -798,10 +901,8 @@ private function createService(Definition $definition, $id) } if ($callable = $definition->getConfigurator()) { - if (is_array($callable) && is_object($callable[0]) && $callable[0] instanceof Reference) { - $callable[0] = $this->get((string) $callable[0]); - } elseif (is_array($callable)) { - $callable[0] = $parameterBag->resolveValue($callable[0]); + if (is_array($callable)) { + $callable[0] = $callable[0] instanceof Reference ? $this->get((string) $callable[0]) : $parameterBag->resolveValue($callable[0]); } if (!is_callable($callable)) { @@ -827,9 +928,9 @@ public function resolveServices($value) foreach ($value as &$v) { $v = $this->resolveServices($v); } - } elseif (is_object($value) && $value instanceof Reference) { + } elseif ($value instanceof Reference) { $value = $this->get((string) $value, $value->getInvalidBehavior()); - } elseif (is_object($value) && $value instanceof Definition) { + } elseif ($value instanceof Definition) { $value = $this->createService($value, null); } @@ -857,6 +958,21 @@ public function findTaggedServiceIds($name) return $tags; } + /** + * Returns all tags the defined services use. + * + * @return array An array of tags + */ + public function findTags() + { + $tags = array(); + foreach ($this->getDefinitions() as $id => $definition) { + $tags = array_merge(array_keys($definition->getTags()), $tags); + } + + return array_unique($tags); + } + /** * Returns the Service Conditionals. * @@ -872,7 +988,7 @@ public static function getServiceConditionals($value) foreach ($value as $v) { $services = array_unique(array_merge($services, self::getServiceConditionals($v))); } - } elseif (is_object($value) && $value instanceof Reference && $value->getInvalidBehavior() === ContainerInterface::IGNORE_ON_INVALID_REFERENCE) { + } elseif ($value instanceof Reference && $value->getInvalidBehavior() === ContainerInterface::IGNORE_ON_INVALID_REFERENCE) { $services[] = (string) $value; } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Definition.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Definition.php index 6928df8e..359553a0 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Definition.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Definition.php @@ -241,7 +241,7 @@ public function addArgument($argument) * * @return Definition The current instance * - * @throws \OutOfBoundsException When the replaced argument does not exist + * @throws OutOfBoundsException When the replaced argument does not exist * * @api */ @@ -275,7 +275,7 @@ public function getArguments() * * @return mixed The argument value * - * @throws \OutOfBoundsException When the argument does not exist + * @throws OutOfBoundsException When the argument does not exist * * @api */ @@ -373,7 +373,7 @@ public function hasMethodCall($method) /** * Gets the methods to call after service initialization. * - * @return array An array of method calls + * @return array An array of method calls * * @api */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/DefinitionDecorator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/DefinitionDecorator.php index 3ac561a4..ad3c3c1d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/DefinitionDecorator.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/DefinitionDecorator.php @@ -159,7 +159,7 @@ public function setPublic($boolean) * * @return mixed The argument value * - * @throws \OutOfBoundsException When the argument does not exist + * @throws OutOfBoundsException When the argument does not exist * * @api */ diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php index debdc527..4499e523 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php @@ -15,6 +15,8 @@ use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Parameter; use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; /** * GraphvizDumper dumps a service container as a graphviz file. @@ -130,7 +132,7 @@ private function findEdges($id, $arguments, $required, $name) { $edges = array(); foreach ($arguments as $argument) { - if (is_object($argument) && $argument instanceof Parameter) { + if ($argument instanceof Parameter) { $argument = $this->container->hasParameter($argument) ? $this->container->getParameter($argument) : null; } elseif (is_string($argument) && preg_match('/^%([^%]+)%$/', $argument, $match)) { $argument = $this->container->hasParameter($match[1]) ? $this->container->getParameter($match[1]) : null; @@ -159,7 +161,7 @@ private function findNodes() { $nodes = array(); - $container = clone $this->container; + $container = $this->cloneContainer(); foreach ($container->getDefinitions() as $id => $definition) { $nodes[$id] = array('class' => str_replace('\\', '\\\\', $this->container->getParameterBag()->resolveValue($definition->getClass())), 'attributes' => array_merge($this->options['node.definition'], array('style' => ContainerInterface::SCOPE_PROTOTYPE !== $definition->getScope() ? 'filled' : 'dotted'))); @@ -175,13 +177,32 @@ private function findNodes() } if (!$container->hasDefinition($id)) { - $nodes[$id] = array('class' => str_replace('\\', '\\\\', get_class($service)), 'attributes' => $this->options['node.instance']); + $class = ('service_container' === $id) ? get_class($this->container) : get_class($service); + $nodes[$id] = array('class' => str_replace('\\', '\\\\', $class), 'attributes' => $this->options['node.instance']); } } return $nodes; } + private function cloneContainer() + { + $parameterBag = new ParameterBag($this->container->getParameterBag()->all()); + + $container = new ContainerBuilder($parameterBag); + $container->setDefinitions($this->container->getDefinitions()); + $container->setAliases($this->container->getAliases()); + $container->setResources($this->container->getResources()); + foreach ($this->container->getScopes() as $scope) { + $container->addScope($scope); + } + foreach ($this->container->getExtensions() as $extension) { + $container->registerExtension($extension); + } + + return $container; + } + /** * Returns the start dot. * diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 870e96b1..8ae9b616 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -187,7 +187,7 @@ private function addServiceInclude($id, $definition) * * @return string * - * @throws \RuntimeException When the factory definition is incomplete + * @throws RuntimeException When the factory definition is incomplete * @throws ServiceCircularReferenceException When a circular reference is detected */ private function addServiceInlinedDefinitions($id, $definition) @@ -203,7 +203,7 @@ private function addServiceInlinedDefinitions($id, $definition) $nbOccurrences->offsetSet($definition, 1); } else { $i = $nbOccurrences->offsetGet($definition); - $nbOccurrences->offsetSet($definition, $i+1); + $nbOccurrences->offsetSet($definition, $i + 1); } } @@ -214,7 +214,7 @@ private function addServiceInlinedDefinitions($id, $definition) $processed->offsetSet($sDefinition); $class = $this->dumpValue($sDefinition->getClass()); - if ($nbOccurrences->offsetGet($sDefinition) > 1 || count($sDefinition->getMethodCalls()) > 0 || $sDefinition->getProperties() || null !== $sDefinition->getConfigurator() || false !== strpos($class, '$')) { + if ($nbOccurrences->offsetGet($sDefinition) > 1 || $sDefinition->getMethodCalls() || $sDefinition->getProperties() || null !== $sDefinition->getConfigurator() || false !== strpos($class, '$')) { $name = $this->getNextVariableName(); $variableMap->offsetSet($sDefinition, new Variable($name)); @@ -229,26 +229,9 @@ private function addServiceInlinedDefinitions($id, $definition) throw new ServiceCircularReferenceException($id, array($id)); } - $arguments = array(); - foreach ($sDefinition->getArguments() as $argument) { - $arguments[] = $this->dumpValue($argument); - } + $code .= $this->addNewInstance($id, $sDefinition, '$'.$name, ' = '); - if (null !== $sDefinition->getFactoryMethod()) { - if (null !== $sDefinition->getFactoryClass()) { - $code .= sprintf(" \$%s = call_user_func(array(%s, '%s')%s);\n", $name, $this->dumpValue($sDefinition->getFactoryClass()), $sDefinition->getFactoryMethod(), count($arguments) > 0 ? ', '.implode(', ', $arguments) : ''); - } elseif (null !== $sDefinition->getFactoryService()) { - $code .= sprintf(" \$%s = %s->%s(%s);\n", $name, $this->getServiceCall($sDefinition->getFactoryService()), $sDefinition->getFactoryMethod(), implode(', ', $arguments)); - } else { - throw new RuntimeException('Factory service or factory class must be defined in service definition for '.$id); - } - } elseif (false !== strpos($class, '$')) { - $code .= sprintf(" \$class = %s;\n \$%s = new \$class(%s);\n", $class, $name, implode(', ', $arguments)); - } else { - $code .= sprintf(" \$%s = new \\%s(%s);\n", $name, substr(str_replace('\\\\', '\\', $class), 1, -1), implode(', ', $arguments)); - } - - if (!$this->hasReference($id, $sDefinition->getMethodCalls()) && !$this->hasReference($id, $sDefinition->getProperties())) { + if (!$this->hasReference($id, $sDefinition->getMethodCalls(), true) && !$this->hasReference($id, $sDefinition->getProperties(), true)) { $code .= $this->addServiceMethodCalls(null, $sDefinition, $name); $code .= $this->addServiceProperties(null, $sDefinition, $name); $code .= $this->addServiceConfigurator(null, $sDefinition, $name); @@ -297,11 +280,6 @@ private function addServiceInstance($id, $definition) throw new InvalidArgumentException(sprintf('"%s" is not a valid class name for the "%s" service.', $class, $id)); } - $arguments = array(); - foreach ($definition->getArguments() as $value) { - $arguments[] = $this->dumpValue($value); - } - $simple = $this->isSimpleInstance($id, $definition); $instantiation = ''; @@ -320,19 +298,7 @@ private function addServiceInstance($id, $definition) $instantiation .= ' = '; } - if (null !== $definition->getFactoryMethod()) { - if (null !== $definition->getFactoryClass()) { - $code = sprintf(" $return{$instantiation}call_user_func(array(%s, '%s')%s);\n", $this->dumpValue($definition->getFactoryClass()), $definition->getFactoryMethod(), $arguments ? ', '.implode(', ', $arguments) : ''); - } elseif (null !== $definition->getFactoryService()) { - $code = sprintf(" $return{$instantiation}%s->%s(%s);\n", $this->getServiceCall($definition->getFactoryService()), $definition->getFactoryMethod(), implode(', ', $arguments)); - } else { - throw new RuntimeException('Factory method requires a factory service or factory class in service definition for '.$id); - } - } elseif (false !== strpos($class, '$')) { - $code = sprintf(" \$class = %s;\n\n $return{$instantiation}new \$class(%s);\n", $class, implode(', ', $arguments)); - } else { - $code = sprintf(" $return{$instantiation}new \\%s(%s);\n", substr(str_replace('\\\\', '\\', $class), 1, -1), implode(', ', $arguments)); - } + $code = $this->addNewInstance($id, $definition, $return, $instantiation); if (!$simple) { $code .= "\n"; @@ -417,16 +383,14 @@ private function addServiceInlinedDefinitionsSetup($id, $definition) } $processed->offsetSet($iDefinition); - if (!$this->hasReference($id, $iDefinition->getMethodCalls())) { + if (!$this->hasReference($id, $iDefinition->getMethodCalls(), true) && !$this->hasReference($id, $iDefinition->getProperties(), true)) { continue; } - if ($iDefinition->getMethodCalls()) { - $code .= $this->addServiceMethodCalls(null, $iDefinition, (string) $this->definitionVariables->offsetGet($iDefinition)); - } - if ($iDefinition->getConfigurator()) { - $code .= $this->addServiceConfigurator(null, $iDefinition, (string) $this->definitionVariables->offsetGet($iDefinition)); - } + $name = (string) $this->definitionVariables->offsetGet($iDefinition); + $code .= $this->addServiceMethodCalls(null, $iDefinition, $name); + $code .= $this->addServiceProperties(null, $iDefinition, $name); + $code .= $this->addServiceConfigurator(null, $iDefinition, $name); } if ('' !== $code) { @@ -452,7 +416,7 @@ private function addServiceConfigurator($id, $definition, $variableName = 'insta } if (is_array($callable)) { - if (is_object($callable[0]) && $callable[0] instanceof Reference) { + if ($callable[0] instanceof Reference) { return sprintf(" %s->%s(\$%s);\n", $this->getServiceCall((string) $callable[0]), $callable[1], $variableName); } @@ -613,6 +577,34 @@ private function addServices() return $publicServices.$aliasServices.$privateServices; } + private function addNewInstance($id, Definition $definition, $return, $instantiation) + { + $class = $this->dumpValue($definition->getClass()); + + $arguments = array(); + foreach ($definition->getArguments() as $value) { + $arguments[] = $this->dumpValue($value); + } + + if (null !== $definition->getFactoryMethod()) { + if (null !== $definition->getFactoryClass()) { + return sprintf(" $return{$instantiation}call_user_func(array(%s, '%s')%s);\n", $this->dumpValue($definition->getFactoryClass()), $definition->getFactoryMethod(), $arguments ? ', '.implode(', ', $arguments) : ''); + } + + if (null !== $definition->getFactoryService()) { + return sprintf(" $return{$instantiation}%s->%s(%s);\n", $this->getServiceCall($definition->getFactoryService()), $definition->getFactoryMethod(), implode(', ', $arguments)); + } + + throw new RuntimeException('Factory method requires a factory service or factory class in service definition for '.$id); + } + + if (false !== strpos($class, '$')) { + return sprintf(" \$class = %s;\n\n $return{$instantiation}new \$class(%s);\n", $class, implode(', ', $arguments)); + } + + return sprintf(" $return{$instantiation}new \\%s(%s);\n", substr(str_replace('\\\\', '\\', $class), 1, -1), implode(', ', $arguments)); + } + /** * Adds the class headers. * @@ -754,7 +746,7 @@ public function getParameter(\$name) { \$name = strtolower(\$name); - if (!array_key_exists(\$name, \$this->parameters)) { + if (!(isset(\$this->parameters[\$name]) || array_key_exists(\$name, \$this->parameters))) { throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', \$name)); } @@ -766,7 +758,9 @@ public function getParameter(\$name) */ public function hasParameter(\$name) { - return array_key_exists(strtolower(\$name), \$this->parameters); + \$name = strtolower(\$name); + + return isset(\$this->parameters[\$name]) || array_key_exists(\$name, \$this->parameters); } /** @@ -816,6 +810,8 @@ protected function getDefaultParameters() * @param integer $indent * * @return string + * + * @throws InvalidArgumentException */ private function exportParameters($parameters, $path = '', $indent = 12) { @@ -958,22 +954,34 @@ private function getDefinitionsFromArguments(array $arguments) /** * Checks if a service id has a reference * - * @param string $id - * @param array $arguments + * @param string $id + * @param array $arguments + * @param Boolean $deep * * @return Boolean */ - private function hasReference($id, array $arguments) + private function hasReference($id, array $arguments, $deep = false, $visited = array()) { foreach ($arguments as $argument) { if (is_array($argument)) { - if ($this->hasReference($id, $argument)) { + if ($this->hasReference($id, $argument, $deep, $visited)) { return true; } } elseif ($argument instanceof Reference) { if ($id === (string) $argument) { return true; } + + if ($deep && !isset($visited[(string) $argument])) { + $visited[(string) $argument] = true; + + $service = $this->container->getDefinition((string) $argument); + $arguments = array_merge($service->getMethodCalls(), $service->getArguments(), $service->getProperties()); + + if ($this->hasReference($id, $arguments, $deep, $visited)) { + return true; + } + } } } @@ -987,6 +995,8 @@ private function hasReference($id, array $arguments) * @param Boolean $interpolate * * @return string + * + * @throws RuntimeException */ private function dumpValue($value, $interpolate = true) { @@ -997,7 +1007,7 @@ private function dumpValue($value, $interpolate = true) } return sprintf('array(%s)', implode(', ', $code)); - } elseif (is_object($value) && $value instanceof Definition) { + } elseif ($value instanceof Definition) { if (null !== $this->definitionVariables && $this->definitionVariables->contains($value)) { return $this->dumpValue($this->definitionVariables->offsetGet($value), $interpolate); } @@ -1029,15 +1039,15 @@ private function dumpValue($value, $interpolate = true) } return sprintf("new \\%s(%s)", substr(str_replace('\\\\', '\\', $class), 1, -1), implode(', ', $arguments)); - } elseif (is_object($value) && $value instanceof Variable) { + } elseif ($value instanceof Variable) { return '$'.$value; - } elseif (is_object($value) && $value instanceof Reference) { + } elseif ($value instanceof Reference) { if (null !== $this->referenceVariables && isset($this->referenceVariables[$id = (string) $value])) { return $this->dumpValue($this->referenceVariables[$id], $interpolate); } return $this->getServiceCall((string) $value, $value); - } elseif (is_object($value) && $value instanceof Parameter) { + } elseif ($value instanceof Parameter) { return $this->dumpParameter($value); } elseif (true === $interpolate && is_string($value)) { if (preg_match('/^%([^%]+)%$/', $value, $match)) { @@ -1052,9 +1062,6 @@ private function dumpValue($value, $interpolate = true) $code = str_replace('%%', '%', preg_replace_callback('/(?getConfigurator()) { $configurator = $this->document->createElement('configurator'); if (is_array($callable)) { - $configurator->setAttribute((is_object($callable[0]) && $callable[0] instanceof Reference ? 'service' : 'class'), $callable[0]); + $configurator->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]); $configurator->setAttribute('method', $callable[1]); } else { $configurator->setAttribute('function', $callable); @@ -230,7 +230,7 @@ private function convertParameters($parameters, $type, \DOMElement $parent, $key if (is_array($value)) { $element->setAttribute('type', 'collection'); $this->convertParameters($value, $type, $element, 'key'); - } elseif (is_object($value) && $value instanceof Reference) { + } elseif ($value instanceof Reference) { $element->setAttribute('type', 'service'); $element->setAttribute('id', (string) $value); $behaviour = $value->getInvalidBehavior(); @@ -239,7 +239,7 @@ private function convertParameters($parameters, $type, \DOMElement $parent, $key } elseif ($behaviour == ContainerInterface::IGNORE_ON_INVALID_REFERENCE) { $element->setAttribute('on-invalid', 'ignore'); } - } elseif (is_object($value) && $value instanceof Definition) { + } elseif ($value instanceof Definition) { $element->setAttribute('type', 'service'); $this->addService($value, null, $element); } else { @@ -294,7 +294,7 @@ public static function phpToXml($value) return 'true'; case false === $value: return 'false'; - case is_object($value) && $value instanceof Parameter: + case $value instanceof Parameter: return '%'.$value.'%'; case is_object($value) || is_resource($value): throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php index bd87161e..e4e16825 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php @@ -120,7 +120,7 @@ private function addService($id, $definition) if ($callable = $definition->getConfigurator()) { if (is_array($callable)) { - if (is_object($callable[0]) && $callable[0] instanceof Reference) { + if ($callable[0] instanceof Reference) { $callable = array($this->getServiceCall((string) $callable[0], $callable[0]), $callable[1]); } else { $callable = array($callable[0], $callable[1]); @@ -184,11 +184,7 @@ private function addParameters() return ''; } - if ($this->container->isFrozen()) { - $parameters = $this->prepareParameters($this->container->getParameterBag()->all()); - } else { - $parameters = $this->container->getParameterBag()->all(); - } + $parameters = $this->prepareParameters($this->container->getParameterBag()->all(), $this->container->isFrozen()); return $this->dumper->dump(array('parameters' => $parameters), 2); } @@ -211,9 +207,9 @@ private function dumpValue($value) } return $code; - } elseif (is_object($value) && $value instanceof Reference) { + } elseif ($value instanceof Reference) { return $this->getServiceCall((string) $value, $value); - } elseif (is_object($value) && $value instanceof Parameter) { + } elseif ($value instanceof Parameter) { return $this->getParameterCall((string) $value); } elseif (is_object($value) || is_resource($value)) { throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); @@ -258,12 +254,12 @@ private function getParameterCall($id) * * @return array */ - private function prepareParameters($parameters) + private function prepareParameters($parameters, $escape = true) { $filtered = array(); foreach ($parameters as $key => $value) { if (is_array($value)) { - $value = $this->prepareParameters($value); + $value = $this->prepareParameters($value, $escape); } elseif ($value instanceof Reference) { $value = '@'.$value; } @@ -271,7 +267,7 @@ private function prepareParameters($parameters) $filtered[$key] = $value; } - return $this->escape($filtered); + return $escape ? $this->escape($filtered) : $filtered; } /** diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php index 1d96d240..6fcd9018 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php @@ -12,6 +12,7 @@ namespace Symfony\Component\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\Definition\ConfigurationInterface; /** * ConfigurationExtensionInterface is the interface implemented by container extension classes. diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Extension/Extension.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Extension/Extension.php new file mode 100644 index 00000000..bc1eaa1f --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Extension/Extension.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Extension; + +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\DependencyInjection\Exception\BadMethodCallException; +use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\Config\Definition\Processor; +use Symfony\Component\Config\Definition\ConfigurationInterface; + +/** + * Provides useful features shared by many extensions. + * + * @author Fabien Potencier + */ +abstract class Extension implements ExtensionInterface, ConfigurationExtensionInterface +{ + /** + * Returns the base path for the XSD files. + * + * @return string The XSD base path + */ + public function getXsdValidationBasePath() + { + return false; + } + + /** + * Returns the namespace to be used for this extension (XML namespace). + * + * @return string The XML namespace + */ + public function getNamespace() + { + return 'http://example.org/schema/dic/'.$this->getAlias(); + } + + /** + * Returns the recommended alias to use in XML. + * + * This alias is also the mandatory prefix to use when using YAML. + * + * This convention is to remove the "Extension" postfix from the class + * name and then lowercase and underscore the result. So: + * + * AcmeHelloExtension + * + * becomes + * + * acme_hello + * + * This can be overridden in a sub-class to specify the alias manually. + * + * @return string The alias + * + * @throws BadMethodCallException When the extension name does not follow conventions + */ + public function getAlias() + { + $className = get_class($this); + if (substr($className, -9) != 'Extension') { + throw new BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.'); + } + $classBaseName = substr(strrchr($className, '\\'), 1, -9); + + return Container::underscore($classBaseName); + } + + /** + * {@inheritDoc} + */ + public function getConfiguration(array $config, ContainerBuilder $container) + { + $reflected = new \ReflectionClass($this); + $namespace = $reflected->getNamespaceName(); + + $class = $namespace . '\\Configuration'; + if (class_exists($class)) { + $r = new \ReflectionClass($class); + $container->addResource(new FileResource($r->getFileName())); + + if (!method_exists($class, '__construct')) { + $configuration = new $class(); + + return $configuration; + } + } + + return null; + } + + final protected function processConfiguration(ConfigurationInterface $configuration, array $configs) + { + $processor = new Processor(); + + return $processor->processConfiguration($configuration, $configs); + } + + /** + * @param ContainerBuilder $container + * @param array $config + * + * @return Boolean Whether the configuration is enabled + * + * @throws InvalidArgumentException When the config is not enableable + */ + protected function isConfigEnabled(ContainerBuilder $container, array $config) + { + if (!array_key_exists('enabled', $config)) { + throw new InvalidArgumentException("The config array has no 'enabled' key."); + } + + return (Boolean) $container->getParameterBag()->resolveValue($config['enabled']); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php new file mode 100644 index 00000000..c666bdbc --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Extension/PrependExtensionInterface.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Extension; + +use Symfony\Component\DependencyInjection\ContainerBuilder; + +interface PrependExtensionInterface +{ + /** + * Allow an extension to prepend the extension configurations. + * + * @param ContainerBuilder $container + */ + public function prepend(ContainerBuilder $container); +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/LICENSE deleted file mode 100644 index cdffe7ae..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2012 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index a5c5ecdc..6296f5be 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -11,13 +11,14 @@ namespace Symfony\Component\DependencyInjection\Loader; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Config\Util\XmlUtils; use Symfony\Component\DependencyInjection\DefinitionDecorator; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\SimpleXMLElement; -use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Exception\RuntimeException; @@ -202,33 +203,17 @@ private function parseDefinition($id, $service, $file) * * @return SimpleXMLElement * - * @throws \InvalidArgumentException When loading of XML file returns error + * @throws InvalidArgumentException When loading of XML file returns error */ protected function parseFile($file) { - $internalErrors = libxml_use_internal_errors(true); - $disableEntities = libxml_disable_entity_loader(true); - libxml_clear_errors(); - - $dom = new \DOMDocument(); - $dom->validateOnParse = true; - if (!$dom->loadXML(file_get_contents($file), LIBXML_NONET | (defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0))) { - libxml_disable_entity_loader($disableEntities); - - throw new \InvalidArgumentException(implode("\n", $this->getXmlErrors($internalErrors))); + try { + $dom = XmlUtils::loadFile($file, array($this, 'validateSchema')); + } catch (\InvalidArgumentException $e) { + throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); } - $dom->normalizeDocument(); - libxml_use_internal_errors($internalErrors); - libxml_disable_entity_loader($disableEntities); - - foreach ($dom->childNodes as $child) { - if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { - throw new \InvalidArgumentException('Document types are not allowed.'); - } - } - - $this->validate($dom, $file); + $this->validateExtensions($dom, $file); return simplexml_import_dom($dom, 'Symfony\\Component\\DependencyInjection\\SimpleXMLElement'); } @@ -285,28 +270,16 @@ private function processAnonymousServices(SimpleXMLElement $xml, $file) } } - /** - * Validates an XML document. - * - * @param \DOMDocument $dom - * @param string $file - */ - private function validate(\DOMDocument $dom, $file) - { - $this->validateSchema($dom, $file); - $this->validateExtensions($dom, $file); - } - /** * Validates a documents XML schema. * * @param \DOMDocument $dom - * @param string $file * - * @throws RuntimeException When extension references a non-existent XSD file - * @throws InvalidArgumentException When xml doesn't validate its xsd schema + * @return Boolean + * + * @throws RuntimeException When extension references a non-existent XSD file */ - private function validateSchema(\DOMDocument $dom, $file) + public function validateSchema(\DOMDocument $dom) { $schemaLocations = array('http://symfony.com/schema/dic/services' => str_replace('\\', '/', __DIR__.'/schema/dic/services/services-1.0.xsd')); @@ -360,18 +333,13 @@ private function validateSchema(\DOMDocument $dom, $file) EOF ; - $current = libxml_use_internal_errors(true); - libxml_clear_errors(); - $valid = @$dom->schemaValidateSource($source); foreach ($tmpfiles as $tmpfile) { @unlink($tmpfile); } - if (!$valid) { - throw new InvalidArgumentException(implode("\n", $this->getXmlErrors($current))); - } - libxml_use_internal_errors($current); + + return $valid; } /** @@ -403,33 +371,6 @@ private function validateExtensions(\DOMDocument $dom, $file) } } - /** - * Returns an array of XML errors. - * - * @param Boolean $internalErrors - * - * @return array - */ - private function getXmlErrors($internalErrors) - { - $errors = array(); - foreach (libxml_get_errors() as $error) { - $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', - LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', - $error->code, - trim($error->message), - $error->file ? $error->file : 'n/a', - $error->line, - $error->column - ); - } - - libxml_clear_errors(); - libxml_use_internal_errors($internalErrors); - - return $errors; - } - /** * Loads from an extension. * @@ -472,50 +413,6 @@ private function loadFromExtensions(SimpleXMLElement $xml) */ public static function convertDomElementToArray(\DomElement $element) { - $empty = true; - $config = array(); - foreach ($element->attributes as $name => $node) { - $config[$name] = SimpleXMLElement::phpize($node->value); - $empty = false; - } - - $nodeValue = false; - foreach ($element->childNodes as $node) { - if ($node instanceof \DOMText) { - if (trim($node->nodeValue)) { - $nodeValue = trim($node->nodeValue); - $empty = false; - } - } elseif (!$node instanceof \DOMComment) { - if ($node instanceof \DOMElement && '_services' === $node->nodeName) { - $value = new Reference($node->getAttribute('id')); - } else { - $value = static::convertDomElementToArray($node); - } - - $key = $node->localName; - if (isset($config[$key])) { - if (!is_array($config[$key]) || !is_int(key($config[$key]))) { - $config[$key] = array($config[$key]); - } - $config[$key][] = $value; - } else { - $config[$key] = $value; - } - - $empty = false; - } - } - - if (false !== $nodeValue) { - $value = SimpleXMLElement::phpize($nodeValue); - if (count($config)) { - $config['value'] = $value; - } else { - $config = $value; - } - } - - return !$empty ? $config : null; + return XmlUtils::convertDomElementToArray($element); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/README.md deleted file mode 100644 index 6add4cb9..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/README.md +++ /dev/null @@ -1,26 +0,0 @@ -DependencyInjection Component -============================= - -DependencyInjection manages your services via a robust and flexible Dependency -Injection Container. - -Here is a simple example that shows how to register services and parameters: - - use Symfony\Component\DependencyInjection\ContainerBuilder; - use Symfony\Component\DependencyInjection\Reference; - - $sc = new ContainerBuilder(); - $sc - ->register('foo', '%foo.class%') - ->addArgument(new Reference('bar')) - ; - $sc->setParameter('foo.class', 'Foo'); - - $sc->get('foo'); - -Resources ---------- - -Unit tests: - -https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/DependencyInjection diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/SimpleXMLElement.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/SimpleXMLElement.php index d154602f..cc5e3119 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/SimpleXMLElement.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/SimpleXMLElement.php @@ -11,6 +11,8 @@ namespace Symfony\Component\DependencyInjection; +use Symfony\Component\Config\Util\XmlUtils; + /** * SimpleXMLElement class. * @@ -101,27 +103,6 @@ public function getArgumentsAsPhp($name, $lowercase = true) */ public static function phpize($value) { - $value = (string) $value; - $lowercaseValue = strtolower($value); - - switch (true) { - case 'null' === $lowercaseValue: - return null; - case ctype_digit($value): - $raw = $value; - $cast = intval($value); - - return '0' == $value[0] ? octdec($value) : (((string) $raw == (string) $cast) ? $cast : $raw); - case 'true' === $lowercaseValue: - return true; - case 'false' === $lowercaseValue: - return false; - case is_numeric($value): - return '0x' == $value[0].$value[1] ? hexdec($value) : floatval($value); - case preg_match('/^(-|\+)?[0-9,]+(\.[0-9]+)?$/', $value): - return floatval(str_replace(',', '', $value)); - default: - return $value; - } + return XmlUtils::phpize($value); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php index cbf9934a..e71835ed 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php @@ -31,7 +31,7 @@ public function testProcess() } /** - * @expectedException Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException */ public function testProcessThrowsExceptionOnInvalidReference() { @@ -46,7 +46,7 @@ public function testProcessThrowsExceptionOnInvalidReference() } /** - * @expectedException Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException */ public function testProcessThrowsExceptionOnInvalidReferenceFromInlinedDefinition() { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php index c16e9e01..1d4ea079 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php @@ -20,13 +20,6 @@ */ class IntegrationTest extends \PHPUnit_Framework_TestCase { - protected function setUp() - { - if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { - $this->markTestSkipped('The "Config" component is not available'); - } - } - /** * This tests that the following dependencies are correctly processed: * @@ -37,6 +30,7 @@ protected function setUp() public function testProcessRemovesAndInlinesRecursively() { $container = new ContainerBuilder(); + $container->setResourceTracking(false); $a = $container ->register('a', '\stdClass') @@ -66,6 +60,7 @@ public function testProcessRemovesAndInlinesRecursively() public function testProcessInlinesReferencesToAliases() { $container = new ContainerBuilder(); + $container->setResourceTracking(false); $a = $container ->register('a', '\stdClass') @@ -91,6 +86,7 @@ public function testProcessInlinesReferencesToAliases() public function testProcessInlinesWhenThereAreMultipleReferencesButFromTheSameDefinition() { $container = new ContainerBuilder(); + $container->setResourceTracking(false); $container ->register('a', '\stdClass') diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php index a445a20d..e4d22401 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php @@ -41,6 +41,16 @@ public function testProcess() ); } + /** + * @expectedException \InvalidArgumentException + */ + public function testProcessWithInvalidAlias() + { + $container = new ContainerBuilder(); + $container->setAlias('a_alias', 'a'); + $this->process($container); + } + protected function process(ContainerBuilder $container) { $pass = new ReplaceAliasByActualDefinitionPass(); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php index a18ba738..72058868 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveInvalidReferencesPassTest.php @@ -61,6 +61,20 @@ public function testProcessRemovesPropertiesOnInvalid() $this->assertEquals(array(), $def->getProperties()); } + public function testStrictFlagIsPreserved() + { + $container = new ContainerBuilder(); + $container->register('bar'); + $def = $container + ->register('foo') + ->addArgument(new Reference('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE, false)) + ; + + $this->process($container); + + $this->assertFalse($def->getArgument(0)->isStrict()); + } + protected function process(ContainerBuilder $container) { $pass = new ResolveInvalidReferencesPass(); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php index c9e6b078..de542db1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -210,11 +210,8 @@ public function testAddAliases() */ public function testAddGetCompilerPass() { - if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { - $this->markTestSkipped('The "Config" component is not available'); - } - $builder = new ContainerBuilder(); + $builder->setResourceTracking(false); $builderCompilerPasses = $builder->getCompiler()->getPassConfig()->getPasses(); $builder->addCompilerPass($this->getMock('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface')); $this->assertEquals(sizeof($builderCompilerPasses) + 1, sizeof($builder->getCompiler()->getPassConfig()->getPasses())); @@ -319,6 +316,17 @@ public function testCreateServiceConfigurator() } } + /** + * @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService + * @expectedException \RuntimeException + */ + public function testCreateSyntheticService() + { + $builder = new ContainerBuilder(); + $builder->register('foo', 'FooClass')->setSynthetic(true); + $builder->get('foo'); + } + /** * @covers Symfony\Component\DependencyInjection\ContainerBuilder::resolveServices */ @@ -335,16 +343,14 @@ public function testResolveServices() */ public function testMerge() { - if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { - $this->markTestSkipped('The "Config" component is not available'); - } - $container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo'))); + $container->setResourceTracking(false); $config = new ContainerBuilder(new ParameterBag(array('foo' => 'bar'))); $container->merge($config); $this->assertEquals(array('bar' => 'foo', 'foo' => 'bar'), $container->getParameterBag()->all(), '->merge() merges current parameters with the loaded ones'); $container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo'))); + $container->setResourceTracking(false); $config = new ContainerBuilder(new ParameterBag(array('foo' => '%bar%'))); $container->merge($config); ////// FIXME @@ -352,6 +358,7 @@ public function testMerge() $this->assertEquals(array('bar' => 'foo', 'foo' => 'foo'), $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones'); $container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo'))); + $container->setResourceTracking(false); $config = new ContainerBuilder(new ParameterBag(array('foo' => '%bar%', 'baz' => '%foo%'))); $container->merge($config); ////// FIXME @@ -359,6 +366,7 @@ public function testMerge() $this->assertEquals(array('bar' => 'foo', 'foo' => 'foo', 'baz' => 'foo'), $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones'); $container = new ContainerBuilder(); + $container->setResourceTracking(false); $container->register('foo', 'FooClass'); $container->register('bar', 'BarClass'); $config = new ContainerBuilder(); @@ -372,6 +380,7 @@ public function testMerge() $this->assertEquals('foo', (string) $aliases['alias_for_foo']); $container = new ContainerBuilder(); + $container->setResourceTracking(false); $container->register('foo', 'FooClass'); $config->setDefinition('foo', new Definition('BazClass')); $container->merge($config); @@ -384,11 +393,8 @@ public function testMerge() */ public function testMergeLogicException() { - if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { - $this->markTestSkipped('The "Config" component is not available'); - } - $container = new ContainerBuilder(); + $container->setResourceTracking(false); $container->compile(); $container->merge(new ContainerBuilder()); } @@ -456,11 +462,8 @@ public function testResources() */ public function testExtension() { - if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { - $this->markTestSkipped('The "Config" component is not available'); - } - $container = new ContainerBuilder(); + $container->setResourceTracking(false); $container->registerExtension($extension = new \ProjectExtension()); $this->assertTrue($container->getExtension('project') === $extension, '->registerExtension() registers an extension'); @@ -471,30 +474,24 @@ public function testExtension() public function testRegisteredButNotLoadedExtension() { - if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { - $this->markTestSkipped('The "Config" component is not available'); - } - $extension = $this->getMock('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface'); $extension->expects($this->once())->method('getAlias')->will($this->returnValue('project')); $extension->expects($this->never())->method('load'); $container = new ContainerBuilder(); + $container->setResourceTracking(false); $container->registerExtension($extension); $container->compile(); } public function testRegisteredAndLoadedExtension() { - if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { - $this->markTestSkipped('The "Config" component is not available'); - } - $extension = $this->getMock('Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface'); $extension->expects($this->exactly(2))->method('getAlias')->will($this->returnValue('project')); $extension->expects($this->once())->method('load')->with(array(array('foo' => 'bar'))); $container = new ContainerBuilder(); + $container->setResourceTracking(false); $container->registerExtension($extension); $container->loadFromExtension('project', array('foo' => 'bar')); $container->compile(); @@ -502,13 +499,10 @@ public function testRegisteredAndLoadedExtension() public function testPrivateServiceUser() { - if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { - $this->markTestSkipped('The "Config" component is not available'); - } - $fooDefinition = new Definition('BarClass'); $fooUserDefinition = new Definition('BarUserClass', array(new Reference('bar'))); $container = new ContainerBuilder(); + $container->setResourceTracking(false); $fooDefinition->setPublic(false); @@ -525,6 +519,18 @@ public function testPrivateServiceUser() * @expectedException BadMethodCallException */ public function testThrowsExceptionWhenSetServiceOnAFrozenContainer() + { + $container = new ContainerBuilder(); + $container->setResourceTracking(false); + $container->setDefinition('a', new Definition('stdClass')); + $container->compile(); + $container->set('a', new \stdClass()); + } + + /** + * @expectedException BadMethodCallException + */ + public function testThrowsExceptionWhenAddServiceOnAFrozenContainer() { if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { $this->markTestSkipped('The "Config" component is not available'); @@ -535,19 +541,53 @@ public function testThrowsExceptionWhenSetServiceOnAFrozenContainer() $container->set('a', new \stdClass()); } - /** - * @expectedException BadMethodCallException - */ - public function testThrowsExceptionWhenSetDefinitionOnAFrozenContainer() + public function testNoExceptionWhenSetSyntheticServiceOnAFrozenContainer() { if (!class_exists('Symfony\Component\Config\Resource\FileResource')) { $this->markTestSkipped('The "Config" component is not available'); } $container = new ContainerBuilder(); + $def = new Definition('stdClass'); + $def->setSynthetic(true); + $container->setDefinition('a', $def); + $container->compile(); + $container->set('a', $a = new \stdClass()); + $this->assertEquals($a, $container->get('a')); + } + + /** + * @expectedException BadMethodCallException + */ + public function testThrowsExceptionWhenSetDefinitionOnAFrozenContainer() + { + $container = new ContainerBuilder(); + $container->setResourceTracking(false); $container->compile(); $container->setDefinition('a', new Definition()); } + + /** + * @covers Symfony\Component\DependencyInjection\ContainerBuilder::getExtensionConfig + * @covers Symfony\Component\DependencyInjection\ContainerBuilder::prependExtensionConfig + */ + public function testExtensionConfig() + { + $container = new ContainerBuilder(); + + $configs = $container->getExtensionConfig('foo'); + $this->assertEmpty($configs); + + $first = array('foo' => 'bar'); + $container->prependExtensionConfig('foo', $first); + $configs = $container->getExtensionConfig('foo'); + $this->assertEquals(array($first), $configs); + + $second = array('ding' => 'dong'); + $container->prependExtensionConfig('foo', $second); + $configs = $container->getExtensionConfig('foo'); + $this->assertEquals(array($second, $first), $configs); + } } class FooClass {} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/ContainerTest.php index 95b39539..23c13c50 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/ContainerTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -261,6 +261,38 @@ public function testEnterLeaveScopeWithChildScopes() $this->assertFalse($container->has('a')); } + public function testEnterScopeRecursivelyWithInactiveChildScopes() + { + $container = new Container(); + $container->addScope(new Scope('foo')); + $container->addScope(new Scope('bar', 'foo')); + + $this->assertFalse($container->isScopeActive('foo')); + + $container->enterScope('foo'); + + $this->assertTrue($container->isScopeActive('foo')); + $this->assertFalse($container->isScopeActive('bar')); + $this->assertFalse($container->has('a')); + + $a = new \stdClass(); + $container->set('a', $a, 'foo'); + + $services = $this->getField($container, 'scopedServices'); + $this->assertTrue(isset($services['foo']['a'])); + $this->assertSame($a, $services['foo']['a']); + + $this->assertTrue($container->has('a')); + $container->enterScope('foo'); + + $services = $this->getField($container, 'scopedServices'); + $this->assertFalse(isset($services['a'])); + + $this->assertTrue($container->isScopeActive('foo')); + $this->assertFalse($container->isScopeActive('bar')); + $this->assertFalse($container->has('a')); + } + public function testLeaveScopeNotActive() { $container = new Container(); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php index ec82cc1e..3464a6af 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php @@ -80,18 +80,24 @@ public function testCrossCheck($fixture, $type) public function crossCheckLoadersDumpers() { - return array( + $tests = array( array('services1.xml', 'xml'), array('services2.xml', 'xml'), array('services6.xml', 'xml'), array('services8.xml', 'xml'), array('services9.xml', 'xml'), - - array('services1.yml', 'yaml'), - array('services2.yml', 'yaml'), - array('services6.yml', 'yaml'), - array('services8.yml', 'yaml'), - array('services9.yml', 'yaml'), ); + + if (class_exists('Symfony\Component\Yaml\Yaml')) { + $tests = array_merge($tests, array( + array('services1.yml', 'yaml'), + array('services2.yml', 'yaml'), + array('services6.yml', 'yaml'), + array('services8.yml', 'yaml'), + array('services9.yml', 'yaml'), + )); + } + + return $tests; } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php index 46ea75d5..89f7ae1e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php @@ -96,7 +96,7 @@ public function testMethodCalls() } /** - * @expectedException Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException * @expectedExceptionMessage Method name cannot be empty. */ public function testExceptionOnEmptyMethodCall() diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php index d3b93fde..0dc1ce8d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php @@ -18,13 +18,6 @@ class GraphvizDumperTest extends \PHPUnit_Framework_TestCase { protected static $fixturesPath; - protected function setUp() - { - if (!class_exists('Symfony\Component\Config\Loader\Loader')) { - $this->markTestSkipped('The "Config" component is not available'); - } - } - public static function setUpBeforeClass() { self::$fixturesPath = __DIR__.'/../Fixtures/'; @@ -55,4 +48,18 @@ public function testDump() 'node.missing' => array('fillcolor' => 'red', 'style' => 'empty'), )), str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services10-1.dot')), '->dump() dumps services'); } + + public function testDumpWithFrozenContainer() + { + $container = include self::$fixturesPath.'/containers/container13.php'; + $dumper = new GraphvizDumper($container); + $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services13.dot')), $dumper->dump(), '->dump() dumps services'); + } + + public function testDumpWithFrozenCustomClassContainer() + { + $container = include self::$fixturesPath.'/containers/container14.php'; + $dumper = new GraphvizDumper($container); + $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services14.dot')), $dumper->dump(), '->dump() dumps services'); + } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php index 859ca500..72d587ff 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -21,13 +21,6 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase { protected static $fixturesPath; - protected function setUp() - { - if (!class_exists('Symfony\Component\Config\Loader\Loader')) { - $this->markTestSkipped('The "Config" component is not available'); - } - } - public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); @@ -47,6 +40,7 @@ public function testDump() public function testDumpFrozenContainerWithNoParameter() { $container = new ContainerBuilder(); + $container->setResourceTracking(false); $container->register('foo', 'stdClass'); $container->compile(); @@ -76,6 +70,7 @@ public function testDumpOptimizationString() )); $container = new ContainerBuilder(); + $container->setResourceTracking(false); $container->setDefinition('test', $definition); $container->setParameter('empty_value', ''); $container->setParameter('some_string', '-'); @@ -103,10 +98,17 @@ public function testAddParameters() public function testAddService() { + // without compilation $container = include self::$fixturesPath.'/containers/container9.php'; $dumper = new PhpDumper($container); $this->assertEquals(str_replace('%path%', str_replace('\\','\\\\',self::$fixturesPath.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR), file_get_contents(self::$fixturesPath.'/php/services9.php')), $dumper->dump(), '->dump() dumps services'); + // with compilation + $container = include self::$fixturesPath.'/containers/container9.php'; + $container->compile(); + $dumper = new PhpDumper($container); + $this->assertEquals(str_replace('%path%', str_replace('\\','\\\\',self::$fixturesPath.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR), file_get_contents(self::$fixturesPath.'/php/services9_compiled.php')), $dumper->dump(), '->dump() dumps services'); + $dumper = new PhpDumper($container = new ContainerBuilder()); $container->register('foo', 'FooClass')->addArgument(new \stdClass()); try { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php index b2cddb59..9ec3438d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php @@ -18,13 +18,6 @@ class XmlDumperTest extends \PHPUnit_Framework_TestCase { protected static $fixturesPath; - protected function setUp() - { - if (!class_exists('Symfony\Component\Config\Loader\Loader')) { - $this->markTestSkipped('The "Config" component is not available'); - } - } - public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php index 47cc4bea..ca7aec05 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php @@ -20,8 +20,8 @@ class YamlDumperTest extends \PHPUnit_Framework_TestCase protected function setUp() { - if (!class_exists('Symfony\Component\Config\Loader\Loader')) { - $this->markTestSkipped('The "Config" component is not available'); + if (!class_exists('Symfony\Component\Yaml\Yaml')) { + $this->markTestSkipped('The "Yaml" component is not available'); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php new file mode 100644 index 00000000..e35bbd5d --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Extension/ExtensionTest.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Extension; + +class ExtensionTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getResolvedEnabledFixtures + */ + public function testIsConfigEnabledReturnsTheResolvedValue($enabled) + { + $pb = $this->getMockBuilder('Symfony\Component\DependencyInjection\ParameterBag\ParameterBag') + ->setMethods(array('resolveValue')) + ->getMock() + ; + + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder') + ->setMethods(array('getParameterBag')) + ->getMock() + ; + + $pb->expects($this->once()) + ->method('resolveValue') + ->with($this->equalTo($enabled)) + ->will($this->returnValue($enabled)) + ; + + $container->expects($this->once()) + ->method('getParameterBag') + ->will($this->returnValue($pb)) + ; + + $extension = $this->getMockBuilder('Symfony\Component\DependencyInjection\Extension\Extension') + ->setMethods(array()) + ->getMockForAbstractClass() + ; + + $r = new \ReflectionMethod('Symfony\Component\DependencyInjection\Extension\Extension', 'isConfigEnabled'); + $r->setAccessible(true); + + $r->invoke($extension, $container, array('enabled' => $enabled)); + } + + public function getResolvedEnabledFixtures() + { + return array( + array(true), + array(false) + ); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage The config array has no 'enabled' key. + */ + public function testIsConfigEnabledOnNonEnableableConfig() + { + $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder') + ->getMock() + ; + + $extension = $this->getMockBuilder('Symfony\Component\DependencyInjection\Extension\Extension') + ->setMethods(array()) + ->getMockForAbstractClass() + ; + + $r = new \ReflectionMethod('Symfony\Component\DependencyInjection\Extension\Extension', 'isConfigEnabled'); + $r->setAccessible(true); + + $r->invoke($extension, $container, array()); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container13.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container13.php new file mode 100644 index 00000000..cc716c78 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container13.php @@ -0,0 +1,16 @@ + + register('foo', 'FooClass')-> + addArgument(new Reference('bar')) +; +$container-> + register('bar', 'BarClass') +; +$container->compile(); + +return $container; diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container14.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container14.php new file mode 100644 index 00000000..593be9c3 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container14.php @@ -0,0 +1,11 @@ + 'bar'))-> setFactoryClass('FooClass')-> setFactoryMethod('getInstance')-> - setArguments(array('foo', new Reference('foo.baz'), array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, new Reference('service_container')))-> + setArguments(array('foo', new Reference('foo.baz'), array('%foo%' => 'foo is %foo%', 'foobar' => '%foo%'), true, new Reference('service_container')))-> setProperties(array('foo' => 'bar', 'moo' => new Reference('foo.baz')))-> - setScope('prototype')-> addMethodCall('setBar', array(new Reference('bar')))-> addMethodCall('initialize')-> setConfigurator('sc_configure') @@ -33,7 +32,10 @@ setFactoryMethod('getInstance')-> setConfigurator(array('%baz_class%', 'configureStatic1')) ; -$container->register('foo_bar', '%foo_class%'); +$container-> + register('foo_bar', '%foo_class%')-> + setScope('prototype') +; $container->getParameterBag()->clear(); $container->getParameterBag()->add(array( 'baz_class' => 'BazClass', @@ -50,9 +52,24 @@ addMethodCall('setBar', array(new Reference('foobaz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))) ; $container-> - register('factory_service')-> + register('factory_service', 'Bar')-> setFactoryService('foo.baz')-> setFactoryMethod('getInstance') ; +$container + ->register('foo_with_inline', 'Foo') + ->addMethodCall('setBar', array(new Reference('inlined'))) +; +$container + ->register('inlined', 'Bar') + ->setProperty('pub', 'pub') + ->addMethodCall('setBaz', array(new Reference('baz'))) + ->setPublic(false) +; +$container + ->register('baz', 'Baz') + ->addMethodCall('setFoo', array(new Reference('foo_with_inline'))) +; + return $container; diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services13.dot b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services13.dot new file mode 100644 index 00000000..bc7f8131 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services13.dot @@ -0,0 +1,10 @@ +digraph sc { + ratio="compress" + node [fontsize="11" fontname="Arial" shape="record"]; + edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; + + node_foo [label="foo\nFooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_bar [label="bar\nBarClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerBuilder\n", shape=record, fillcolor="#9999ff", style="filled"]; + node_foo -> node_bar [label="" style="filled"]; +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot new file mode 100644 index 00000000..d07dc389 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot @@ -0,0 +1,7 @@ +digraph sc { + ratio="compress" + node [fontsize="11" fontname="Arial" shape="record"]; + edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; + + node_service_container [label="service_container\nContainer14\\ProjectServiceContainer\n", shape=record, fillcolor="#9999ff", style="filled"]; +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot index fdff2219..73608e27 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services9.dot @@ -3,12 +3,15 @@ digraph sc { node [fontsize="11" fontname="Arial" shape="record"]; edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; - node_foo [label="foo (alias_for_foo)\nFooClass\n", shape=record, fillcolor="#eeeeee", style="dotted"]; + node_foo [label="foo (alias_for_foo)\nFooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; node_bar [label="bar\nFooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; node_foo_baz [label="foo.baz\nBazClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; - node_foo_bar [label="foo_bar\nFooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_foo_bar [label="foo_bar\nFooClass\n", shape=record, fillcolor="#eeeeee", style="dotted"]; node_method_call1 [label="method_call1\nFooClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; - node_factory_service [label="factory_service\n\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_factory_service [label="factory_service\nBar\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_foo_with_inline [label="foo_with_inline\nFoo\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_inlined [label="inlined\nBar\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_baz [label="baz\nBaz\n", shape=record, fillcolor="#eeeeee", style="filled"]; node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerBuilder\n", shape=record, fillcolor="#9999ff", style="filled"]; node_foo2 [label="foo2\n\n", shape=record, fillcolor="#ff9999", style="filled"]; node_foo3 [label="foo3\n\n", shape=record, fillcolor="#ff9999", style="filled"]; @@ -22,4 +25,7 @@ digraph sc { node_method_call1 -> node_foo2 [label="setBar()" style="dashed"]; node_method_call1 -> node_foo3 [label="setBar()" style="dashed"]; node_method_call1 -> node_foobaz [label="setBar()" style="dashed"]; + node_foo_with_inline -> node_inlined [label="setBar()" style="dashed"]; + node_inlined -> node_baz [label="setBaz()" style="dashed"]; + node_baz -> node_foo_with_inline [label="setFoo()" style="dashed"]; } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php index 514df23e..fb6d4cf1 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php @@ -7,10 +7,23 @@ function sc_configure($instance) class BarClass { + protected $baz; + + public function setBaz(BazClass $baz) + { + $this->baz = $baz; + } } class BazClass { + protected $foo; + + public function setFoo(Foo $foo) + { + $this->foo = $foo; + } + public function configure($instance) { $instance->configure(); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php index 53aa8bd2..5f321e33 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php @@ -55,7 +55,7 @@ public function getParameter($name) { $name = strtolower($name); - if (!array_key_exists($name, $this->parameters)) { + if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters))) { throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); } @@ -67,7 +67,9 @@ public function getParameter($name) */ public function hasParameter($name) { - return array_key_exists(strtolower($name), $this->parameters); + $name = strtolower($name); + + return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters); } /** diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php index c1513b63..80d24c54 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php @@ -43,13 +43,30 @@ protected function getBarService() return $instance; } + /** + * Gets the 'baz' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return Baz A Baz instance. + */ + protected function getBazService() + { + $this->services['baz'] = $instance = new \Baz(); + + $instance->setFoo($this->get('foo_with_inline')); + + return $instance; + } + /** * Gets the 'factory_service' service. * * This service is shared. * This method always returns the same instance of the service. * - * @return Object An instance returned by foo.baz::getInstance(). + * @return Bar A Bar instance. */ protected function getFactoryServiceService() { @@ -59,13 +76,16 @@ protected function getFactoryServiceService() /** * Gets the 'foo' service. * + * This service is shared. + * This method always returns the same instance of the service. + * * @return FooClass A FooClass instance. */ protected function getFooService() { $a = $this->get('foo.baz'); - $instance = call_user_func(array('FooClass', 'getInstance'), 'foo', $a, array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo'), 'bar' => $this->getParameter('foo')), true, $this); + $this->services['foo'] = $instance = call_user_func(array('FooClass', 'getInstance'), 'foo', $a, array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')), true, $this); $instance->setBar($this->get('bar')); $instance->initialize(); @@ -96,16 +116,30 @@ protected function getFoo_BazService() /** * Gets the 'foo_bar' service. * - * This service is shared. - * This method always returns the same instance of the service. - * * @return Object A %foo_class% instance. */ protected function getFooBarService() { $class = $this->getParameter('foo_class'); - return $this->services['foo_bar'] = new $class(); + return new $class(); + } + + /** + * Gets the 'foo_with_inline' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return Foo A Foo instance. + */ + protected function getFooWithInlineService() + { + $this->services['foo_with_inline'] = $instance = new \Foo(); + + $instance->setBar($this->get('inlined')); + + return $instance; } /** @@ -144,6 +178,28 @@ protected function getAliasForFooService() return $this->get('foo'); } + /** + * Gets the 'inlined' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * This service is private. + * If you want to be able to request this service from the container directly, + * make it public, otherwise you might end up with broken code. + * + * @return Bar A Bar instance. + */ + protected function getInlinedService() + { + $this->services['inlined'] = $instance = new \Bar(); + + $instance->setBaz($this->get('baz')); + $instance->pub = 'pub'; + + return $instance; + } + /** * Gets the default parameters. * diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php new file mode 100644 index 00000000..5c71db9e --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php @@ -0,0 +1,243 @@ +parameters = $this->getDefaultParameters(); + + $this->services = + $this->scopedServices = + $this->scopeStacks = array(); + + $this->set('service_container', $this); + + $this->scopes = array(); + $this->scopeChildren = array(); + } + + /** + * Gets the 'bar' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return FooClass A FooClass instance. + */ + protected function getBarService() + { + $this->services['bar'] = $instance = new \FooClass('foo', $this->get('foo.baz'), $this->getParameter('foo_bar')); + + $this->get('foo.baz')->configure($instance); + + return $instance; + } + + /** + * Gets the 'baz' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return Baz A Baz instance. + */ + protected function getBazService() + { + $this->services['baz'] = $instance = new \Baz(); + + $instance->setFoo($this->get('foo_with_inline')); + + return $instance; + } + + /** + * Gets the 'factory_service' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return Bar A Bar instance. + */ + protected function getFactoryServiceService() + { + return $this->services['factory_service'] = $this->get('foo.baz')->getInstance(); + } + + /** + * Gets the 'foo' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return FooClass A FooClass instance. + */ + protected function getFooService() + { + $a = $this->get('foo.baz'); + + $this->services['foo'] = $instance = call_user_func(array('FooClass', 'getInstance'), 'foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this); + + $instance->setBar($this->get('bar')); + $instance->initialize(); + $instance->foo = 'bar'; + $instance->moo = $a; + sc_configure($instance); + + return $instance; + } + + /** + * Gets the 'foo.baz' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return BazClass A BazClass instance. + */ + protected function getFoo_BazService() + { + $this->services['foo.baz'] = $instance = call_user_func(array('BazClass', 'getInstance')); + + call_user_func(array('BazClass', 'configureStatic1'), $instance); + + return $instance; + } + + /** + * Gets the 'foo_bar' service. + * + * @return FooClass A FooClass instance. + */ + protected function getFooBarService() + { + return new \FooClass(); + } + + /** + * Gets the 'foo_with_inline' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return Foo A Foo instance. + */ + protected function getFooWithInlineService() + { + $a = new \Bar(); + + $this->services['foo_with_inline'] = $instance = new \Foo(); + + $a->setBaz($this->get('baz')); + $a->pub = 'pub'; + + $instance->setBar($a); + + return $instance; + } + + /** + * Gets the 'method_call1' service. + * + * This service is shared. + * This method always returns the same instance of the service. + * + * @return FooClass A FooClass instance. + */ + protected function getMethodCall1Service() + { + require_once '%path%foo.php'; + + $this->services['method_call1'] = $instance = new \FooClass(); + + $instance->setBar($this->get('foo')); + $instance->setBar(NULL); + + return $instance; + } + + /** + * Gets the alias_for_foo service alias. + * + * @return FooClass An instance of the foo service + */ + protected function getAliasForFooService() + { + return $this->get('foo'); + } + + /** + * {@inheritdoc} + */ + public function getParameter($name) + { + $name = strtolower($name); + + if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters))) { + throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); + } + + return $this->parameters[$name]; + } + + /** + * {@inheritdoc} + */ + public function hasParameter($name) + { + $name = strtolower($name); + + return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters); + } + + /** + * {@inheritdoc} + */ + public function setParameter($name, $value) + { + throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); + } + + /** + * {@inheritDoc} + */ + public function getParameterBag() + { + if (null === $this->parameterBag) { + $this->parameterBag = new FrozenParameterBag($this->parameters); + } + + return $this->parameterBag; + } + /** + * Gets the default parameters. + * + * @return array An array of the default parameters + */ + protected function getDefaultParameters() + { + return array( + 'baz_class' => 'BazClass', + 'foo_class' => 'FooClass', + 'foo' => 'bar', + ); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml index a73fb3e7..58eb6d79 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services9.xml @@ -6,14 +6,14 @@ bar - + foo foo is %foo% - %foo% + %foo% true @@ -34,7 +34,7 @@ - + %path%foo.php @@ -50,7 +50,23 @@ - + + + + + + + + pub + + + + + + + + + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml index 0fd2ae37..fcbb83f4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml @@ -10,13 +10,12 @@ services: - { name: foo, foo: foo } - { name: foo, bar: bar } factory_method: getInstance - arguments: [foo, '@foo.baz', { '%foo%': 'foo is %foo%', bar: '%foo%' }, true, '@service_container'] + arguments: [foo, '@foo.baz', { '%foo%': 'foo is %foo%', foobar: '%foo%' }, true, '@service_container'] properties: { foo: bar, moo: '@foo.baz' } calls: - [setBar, ['@bar']] - [initialize, { }] - scope: prototype configurator: sc_configure bar: class: FooClass @@ -28,6 +27,7 @@ services: configurator: ['%baz_class%', configureStatic1] foo_bar: class: %foo_class% + scope: prototype method_call1: class: FooClass file: %path%foo.php @@ -38,6 +38,23 @@ services: - [setBar, ['@?foobaz']] factory_service: + class: Bar factory_method: getInstance factory_service: foo.baz + foo_with_inline: + class: Foo + calls: + - [setBar, ['@inlined']] + + inlined: + class: Bar + properties: { pub: pub } + calls: + - [setBaz, ['@baz']] + + baz: + class: Baz + calls: + - [setFoo, ['@foo_with_inline']] + alias_for_foo: @foo diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php index b589ed95..40ffd63a 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php @@ -98,6 +98,10 @@ public function testLoadParameters() public function testLoadImports() { + if (!class_exists('Symfony\Component\Yaml\Yaml')) { + $this->markTestSkipped('The "Yaml" component is not available'); + } + $container = new ContainerBuilder(); $resolver = new LoaderResolver(array( new IniFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')), diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/bootstrap.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/bootstrap.php deleted file mode 100644 index fd3118fc..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\DependencyInjection')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\DependencyInjection')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/autoloader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/autoloader.php new file mode 100644 index 00000000..e38020d5 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/autoloader.php @@ -0,0 +1,11 @@ +=5.3.2" - }, - "recommend": { - "symfony/config": "self.version" - }, - "suggest": { - "symfony/yaml": "self.version" - }, - "autoload": { - "psr-0": { "Symfony\\Component\\DependencyInjection": "" } - }, - "target-dir": "Symfony/Component/DependencyInjection" -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/phpunit.xml.dist b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/phpunit.xml.dist index 554d1046..53f5f99d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/phpunit.xml.dist +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/DependencyInjection/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/.gitattributes b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/.gitattributes deleted file mode 100644 index 80481513..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/Tests export-ignore -phpunit.xml.dist export-ignore diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/.gitignore b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/.gitignore new file mode 100644 index 00000000..44de97a3 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/AbstractAdapter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/AbstractAdapter.php new file mode 100644 index 00000000..839a6016 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/AbstractAdapter.php @@ -0,0 +1,225 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Adapter; + +/** + * Interface for finder engine implementations. + * + * @author Jean-François Simon + */ +abstract class AbstractAdapter implements AdapterInterface +{ + protected $followLinks = false; + protected $mode = 0; + protected $minDepth = 0; + protected $maxDepth = INF; + protected $exclude = array(); + protected $names = array(); + protected $notNames = array(); + protected $contains = array(); + protected $notContains = array(); + protected $sizes = array(); + protected $dates = array(); + protected $filters = array(); + protected $sort = false; + protected $paths = array(); + protected $notPaths = array(); + + private static $areSupported = array(); + + /** + * {@inheritDoc} + */ + public function isSupported() + { + $name = $this->getName(); + + if (!array_key_exists($name, self::$areSupported)) { + self::$areSupported[$name] = $this->canBeUsed(); + } + + return self::$areSupported[$name]; + } + + /** + * {@inheritdoc} + */ + public function setFollowLinks($followLinks) + { + $this->followLinks = $followLinks; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setMode($mode) + { + $this->mode = $mode; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setDepths(array $depths) + { + $this->minDepth = 0; + $this->maxDepth = INF; + + foreach ($depths as $comparator) { + switch ($comparator->getOperator()) { + case '>': + $this->minDepth = $comparator->getTarget() + 1; + break; + case '>=': + $this->minDepth = $comparator->getTarget(); + break; + case '<': + $this->maxDepth = $comparator->getTarget() - 1; + break; + case '<=': + $this->maxDepth = $comparator->getTarget(); + break; + default: + $this->minDepth = $this->maxDepth = $comparator->getTarget(); + } + } + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setExclude(array $exclude) + { + $this->exclude = $exclude; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setNames(array $names) + { + $this->names = $names; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setNotNames(array $notNames) + { + $this->notNames = $notNames; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setContains(array $contains) + { + $this->contains = $contains; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setNotContains(array $notContains) + { + $this->notContains = $notContains; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setSizes(array $sizes) + { + $this->sizes = $sizes; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setDates(array $dates) + { + $this->dates = $dates; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setFilters(array $filters) + { + $this->filters = $filters; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setSort($sort) + { + $this->sort = $sort; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setPath(array $paths) + { + $this->paths = $paths; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function setNotPath(array $notPaths) + { + $this->notPaths = $notPaths; + + return $this; + } + + /** + * Returns whether the adapter is supported in the current environment. + * + * This method should be implemented in all adapters. Do not implement + * isSupported in the adapters as the generic implementation provides a cache + * layer. + * + * @see isSupported + * + * @return Boolean Whether the adapter is supported + */ + abstract protected function canBeUsed(); +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php new file mode 100644 index 00000000..b0aef4d0 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php @@ -0,0 +1,320 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Adapter; + +use Symfony\Component\Finder\Iterator; +use Symfony\Component\Finder\Shell\Shell; +use Symfony\Component\Finder\Expression\Expression; +use Symfony\Component\Finder\Shell\Command; +use Symfony\Component\Finder\Iterator\SortableIterator; +use Symfony\Component\Finder\Comparator\NumberComparator; +use Symfony\Component\Finder\Comparator\DateComparator; + +/** + * Shell engine implementation using GNU find command. + * + * @author Jean-François Simon + */ +abstract class AbstractFindAdapter extends AbstractAdapter +{ + /** + * @var Shell + */ + protected $shell; + + /** + * Constructor. + */ + public function __construct() + { + $this->shell = new Shell(); + } + + /** + * {@inheritdoc} + */ + public function searchInDirectory($dir) + { + // having "/../" in path make find fail + $dir = realpath($dir); + + // searching directories containing or not containing strings leads to no result + if (Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES === $this->mode && ($this->contains || $this->notContains)) { + return new Iterator\FilePathsIterator(array(), $dir); + } + + $command = Command::create(); + $find = $this->buildFindCommand($command, $dir); + + if ($this->followLinks) { + $find->add('-follow'); + } + + $find->add('-mindepth')->add($this->minDepth + 1); + // warning! INF < INF => true ; INF == INF => false ; INF === INF => true + // https://bugs.php.net/bug.php?id=9118 + if (INF !== $this->maxDepth) { + $find->add('-maxdepth')->add($this->maxDepth + 1); + } + + if (Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES === $this->mode) { + $find->add('-type d'); + } elseif (Iterator\FileTypeFilterIterator::ONLY_FILES === $this->mode) { + $find->add('-type f'); + } + + $this->buildNamesFiltering($find, $this->names); + $this->buildNamesFiltering($find, $this->notNames, true); + $this->buildPathsFiltering($find, $dir, $this->paths); + $this->buildPathsFiltering($find, $dir, $this->notPaths, true); + $this->buildSizesFiltering($find, $this->sizes); + $this->buildDatesFiltering($find, $this->dates); + + $useGrep = $this->shell->testCommand('grep') && $this->shell->testCommand('xargs'); + $useSort = is_int($this->sort) && $this->shell->testCommand('sort') && $this->shell->testCommand('cut'); + + if ($useGrep && ($this->contains || $this->notContains)) { + $grep = $command->ins('grep'); + $this->buildContentFiltering($grep, $this->contains); + $this->buildContentFiltering($grep, $this->notContains, true); + } + + if ($useSort) { + $this->buildSorting($command, $this->sort); + } + + $paths = $this->shell->testCommand('uniq') ? $command->add('| uniq')->execute() : array_unique($command->execute()); + $iterator = new Iterator\FilePathsIterator($paths, $dir); + + if ($this->exclude) { + $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $this->exclude); + } + + if (!$useGrep && ($this->contains || $this->notContains)) { + $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains); + } + + if ($this->filters) { + $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); + } + + if (!$useSort && $this->sort) { + $iteratorAggregate = new Iterator\SortableIterator($iterator, $this->sort); + $iterator = $iteratorAggregate->getIterator(); + } + + return $iterator; + } + + /** + * {@inheritdoc} + */ + protected function canBeUsed() + { + return $this->shell->testCommand('find'); + } + + /** + * @param Command $command + * @param string $dir + * + * @return Command + */ + protected function buildFindCommand(Command $command, $dir) + { + return $command + ->ins('find') + ->add('find ') + ->arg($dir) + ->add('-noleaf'); // the -noleaf option is required for filesystems that don't follow the '.' and '..' conventions + } + + /** + * @param Command $command + * @param string[] $names + * @param Boolean $not + */ + private function buildNamesFiltering(Command $command, array $names, $not = false) + { + if (0 === count($names)) { + return; + } + + $command->add($not ? '-not' : null)->cmd('('); + + foreach ($names as $i => $name) { + $expr = Expression::create($name); + + // Find does not support expandable globs ("*.{a,b}" syntax). + if ($expr->isGlob() && $expr->getGlob()->isExpandable()) { + $expr = Expression::create($expr->getGlob()->toRegex(false)); + } + + // Fixes 'not search' and 'full path matching' regex problems. + // - Jokers '.' are replaced by [^/]. + // - We add '[^/]*' before and after regex (if no ^|$ flags are present). + if ($expr->isRegex()) { + $regex = $expr->getRegex(); + $regex->prepend($regex->hasStartFlag() ? '/' : '/[^/]*') + ->setStartFlag(false) + ->setStartJoker(true) + ->replaceJokers('[^/]'); + if (!$regex->hasEndFlag() || $regex->hasEndJoker()) { + $regex->setEndJoker(false)->append('[^/]*'); + } + } + + $command + ->add($i > 0 ? '-or' : null) + ->add($expr->isRegex() + ? ($expr->isCaseSensitive() ? '-regex' : '-iregex') + : ($expr->isCaseSensitive() ? '-name' : '-iname') + ) + ->arg($expr->renderPattern()); + } + + $command->cmd(')'); + } + + /** + * @param Command $command + * @param string $dir + * @param string[] $paths + * @param Boolean $not + */ + private function buildPathsFiltering(Command $command, $dir, array $paths, $not = false) + { + if (0 === count($paths)) { + return; + } + + $command->add($not ? '-not' : null)->cmd('('); + + foreach ($paths as $i => $path) { + $expr = Expression::create($path); + + // Find does not support expandable globs ("*.{a,b}" syntax). + if ($expr->isGlob() && $expr->getGlob()->isExpandable()) { + $expr = Expression::create($expr->getGlob()->toRegex(false)); + } + + // Fixes 'not search' regex problems. + if ($expr->isRegex()) { + $regex = $expr->getRegex(); + $regex->prepend($regex->hasStartFlag() ? $dir.DIRECTORY_SEPARATOR : '.*')->setEndJoker(!$regex->hasEndFlag()); + } else { + $expr->prepend('*')->append('*'); + } + + $command + ->add($i > 0 ? '-or' : null) + ->add($expr->isRegex() + ? ($expr->isCaseSensitive() ? '-regex' : '-iregex') + : ($expr->isCaseSensitive() ? '-path' : '-ipath') + ) + ->arg($expr->renderPattern()); + } + + $command->cmd(')'); + } + + /** + * @param Command $command + * @param NumberComparator[] $sizes + */ + private function buildSizesFiltering(Command $command, array $sizes) + { + foreach ($sizes as $i => $size) { + $command->add($i > 0 ? '-and' : null); + + switch ($size->getOperator()) { + case '<=': + $command->add('-size -' . ($size->getTarget() + 1) . 'c'); + break; + case '>=': + $command->add('-size +'. ($size->getTarget() - 1) . 'c'); + break; + case '>': + $command->add('-size +' . $size->getTarget() . 'c'); + break; + case '!=': + $command->add('-size -' . $size->getTarget() . 'c'); + $command->add('-size +' . $size->getTarget() . 'c'); + case '<': + default: + $command->add('-size -' . $size->getTarget() . 'c'); + } + } + } + + /** + * @param Command $command + * @param DateComparator[] $dates + */ + private function buildDatesFiltering(Command $command, array $dates) + { + foreach ($dates as $i => $date) { + $command->add($i > 0 ? '-and' : null); + + $mins = (int) round((time()-$date->getTarget()) / 60); + + if (0 > $mins) { + // mtime is in the future + $command->add(' -mmin -0'); + // we will have no result so we don't need to continue + return; + } + + switch ($date->getOperator()) { + case '<=': + $command->add('-mmin +' . ($mins - 1)); + break; + case '>=': + $command->add('-mmin -' . ($mins + 1)); + break; + case '>': + $command->add('-mmin -' . $mins); + break; + case '!=': + $command->add('-mmin +' . $mins.' -or -mmin -' . $mins); + break; + case '<': + default: + $command->add('-mmin +' . $mins); + } + } + } + + /** + * @param Command $command + * @param string $sort + * + * @throws \InvalidArgumentException + */ + private function buildSorting(Command $command, $sort) + { + $this->buildFormatSorting($command, $sort); + } + + /** + * @param Command $command + * @param string $sort + */ + abstract protected function buildFormatSorting(Command $command, $sort); + + /** + * @param Command $command + * @param array $contains + * @param Boolean $not + */ + abstract protected function buildContentFiltering(Command $command, array $contains, $not = false); +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/AdapterInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/AdapterInterface.php new file mode 100644 index 00000000..f28ffb31 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/AdapterInterface.php @@ -0,0 +1,137 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Adapter; + +/** + * @author Jean-François Simon + */ +interface AdapterInterface +{ + /** + * @param Boolean $followLinks + * + * @return AdapterInterface Current instance + */ + public function setFollowLinks($followLinks); + + /** + * @param integer $mode + * + * @return AdapterInterface Current instance + */ + public function setMode($mode); + + /** + * @param array $exclude + * + * @return AdapterInterface Current instance + */ + public function setExclude(array $exclude); + + /** + * @param array $depths + * + * @return AdapterInterface Current instance + */ + public function setDepths(array $depths); + + /** + * @param array $names + * + * @return AdapterInterface Current instance + */ + public function setNames(array $names); + + /** + * @param array $notNames + * + * @return AdapterInterface Current instance + */ + public function setNotNames(array $notNames); + + /** + * @param array $contains + * + * @return AdapterInterface Current instance + */ + public function setContains(array $contains); + + /** + * @param array $notContains + * + * @return AdapterInterface Current instance + */ + public function setNotContains(array $notContains); + + /** + * @param array $sizes + * + * @return AdapterInterface Current instance + */ + public function setSizes(array $sizes); + + /** + * @param array $dates + * + * @return AdapterInterface Current instance + */ + public function setDates(array $dates); + + /** + * @param array $filters + * + * @return AdapterInterface Current instance + */ + public function setFilters(array $filters); + + /** + * @param \Closure|integer $sort + * + * @return AdapterInterface Current instance + */ + public function setSort($sort); + + /** + * @param array $paths + * + * @return AdapterInterface Current instance + */ + public function setPath(array $paths); + + /** + * @param array $notPaths + * + * @return AdapterInterface Current instance + */ + public function setNotPath(array $notPaths); + + /** + * @param string $dir + * + * @return \Iterator Result iterator + */ + public function searchInDirectory($dir); + + /** + * Tests adapter support for current platform. + * + * @return Boolean + */ + public function isSupported(); + + /** + * Returns adapter name. + * + * @return string + */ + public function getName(); +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/BsdFindAdapter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/BsdFindAdapter.php new file mode 100644 index 00000000..d11ea3e2 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/BsdFindAdapter.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Adapter; + +use Symfony\Component\Finder\Shell\Shell; +use Symfony\Component\Finder\Shell\Command; +use Symfony\Component\Finder\Iterator\SortableIterator; +use Symfony\Component\Finder\Expression\Expression; + +/** + * Shell engine implementation using BSD find command. + * + * @author Jean-François Simon + */ +class BsdFindAdapter extends AbstractFindAdapter +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'bsd_find'; + } + + /** + * {@inheritdoc} + */ + protected function canBeUsed() + { + return in_array($this->shell->getType(), array(Shell::TYPE_BSD, Shell::TYPE_DARWIN)) && parent::canBeUsed(); + } + + /** + * {@inheritdoc} + */ + protected function buildFormatSorting(Command $command, $sort) + { + switch ($sort) { + case SortableIterator::SORT_BY_NAME: + $command->ins('sort')->add('| sort'); + + return; + case SortableIterator::SORT_BY_TYPE: + $format = '%HT'; + break; + case SortableIterator::SORT_BY_ACCESSED_TIME: + $format = '%a'; + break; + case SortableIterator::SORT_BY_CHANGED_TIME: + $format = '%c'; + break; + case SortableIterator::SORT_BY_MODIFIED_TIME: + $format = '%m'; + break; + default: + throw new \InvalidArgumentException('Unknown sort options: '.$sort.'.'); + } + + $command + ->add('-print0 | xargs -0 stat -f') + ->arg($format.'%t%N') + ->add('| sort | cut -f 2'); + } + + /** + * {@inheritdoc} + */ + protected function buildFindCommand(Command $command, $dir) + { + parent::buildFindCommand($command, $dir)->addAtIndex('-E', 1); + + return $command; + } + + /** + * {@inheritdoc} + */ + protected function buildContentFiltering(Command $command, array $contains, $not = false) + { + foreach ($contains as $contain) { + $expr = Expression::create($contain); + + // todo: avoid forking process for each $pattern by using multiple -e options + $command + ->add('| grep -v \'^$\'') + ->add('| xargs grep -I') + ->add($expr->isCaseSensitive() ? null : '-i') + ->add($not ? '-L' : '-l') + ->add('-Ee')->arg($expr->renderPattern()); + } + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/GnuFindAdapter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/GnuFindAdapter.php new file mode 100644 index 00000000..a235742c --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/GnuFindAdapter.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Adapter; + +use Symfony\Component\Finder\Shell\Shell; +use Symfony\Component\Finder\Shell\Command; +use Symfony\Component\Finder\Iterator\SortableIterator; +use Symfony\Component\Finder\Expression\Expression; + +/** + * Shell engine implementation using GNU find command. + * + * @author Jean-François Simon + */ +class GnuFindAdapter extends AbstractFindAdapter +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'gnu_find'; + } + + /** + * {@inheritdoc} + */ + protected function buildFormatSorting(Command $command, $sort) + { + switch ($sort) { + case SortableIterator::SORT_BY_NAME: + $command->ins('sort')->add('| sort'); + + return; + case SortableIterator::SORT_BY_TYPE: + $format = '%y'; + break; + case SortableIterator::SORT_BY_ACCESSED_TIME: + $format = '%A@'; + break; + case SortableIterator::SORT_BY_CHANGED_TIME: + $format = '%C@'; + break; + case SortableIterator::SORT_BY_MODIFIED_TIME: + $format = '%T@'; + break; + default: + throw new \InvalidArgumentException('Unknown sort options: '.$sort.'.'); + } + + $command + ->get('find') + ->add('-printf') + ->arg($format.' %h/%f\\n') + ->add('| sort | cut') + ->arg('-d ') + ->arg('-f2-') + ; + } + + /** + * {@inheritdoc} + */ + protected function canBeUsed() + { + return $this->shell->getType() === Shell::TYPE_UNIX && parent::canBeUsed(); + } + + /** + * {@inheritdoc} + */ + protected function buildFindCommand(Command $command, $dir) + { + return parent::buildFindCommand($command, $dir)->add('-regextype posix-extended'); + } + + /** + * {@inheritdoc} + */ + protected function buildContentFiltering(Command $command, array $contains, $not = false) + { + foreach ($contains as $contain) { + $expr = Expression::create($contain); + + // todo: avoid forking process for each $pattern by using multiple -e options + $command + ->add('| xargs -r grep -I') + ->add($expr->isCaseSensitive() ? null : '-i') + ->add($not ? '-L' : '-l') + ->add('-Ee')->arg($expr->renderPattern()); + } + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/PhpAdapter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/PhpAdapter.php new file mode 100644 index 00000000..dfc842f6 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Adapter/PhpAdapter.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Adapter; + +use Symfony\Component\Finder\Iterator; + +/** + * PHP finder engine implementation. + * + * @author Jean-François Simon + */ +class PhpAdapter extends AbstractAdapter +{ + /** + * {@inheritdoc} + */ + public function searchInDirectory($dir) + { + $flags = \RecursiveDirectoryIterator::SKIP_DOTS; + + if ($this->followLinks) { + $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS; + } + + $iterator = new \RecursiveIteratorIterator( + new Iterator\RecursiveDirectoryIterator($dir, $flags), + \RecursiveIteratorIterator::SELF_FIRST + ); + + if ($this->minDepth > 0 || $this->maxDepth < INF) { + $iterator = new Iterator\DepthRangeFilterIterator($iterator, $this->minDepth, $this->maxDepth); + } + + if ($this->mode) { + $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode); + } + + if ($this->exclude) { + $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $this->exclude); + } + + if ($this->names || $this->notNames) { + $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames); + } + + if ($this->contains || $this->notContains) { + $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains); + } + + if ($this->sizes) { + $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes); + } + + if ($this->dates) { + $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates); + } + + if ($this->filters) { + $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); + } + + if ($this->sort) { + $iteratorAggregate = new Iterator\SortableIterator($iterator, $this->sort); + $iterator = $iteratorAggregate->getIterator(); + } + + if ($this->paths || $this->notPaths) { + $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $this->notPaths); + } + + return $iterator; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'php'; + } + + /** + * {@inheritdoc} + */ + protected function canBeUsed() + { + return true; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/CHANGELOG.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/CHANGELOG.md index b47b26a1..7b8efdd9 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/CHANGELOG.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/CHANGELOG.md @@ -1,6 +1,14 @@ CHANGELOG ========= +2.2.0 +----- + + * added Finder::path() and Finder::notPath() methods + * added finder adapters to improve performance on specific platforms + * added support for wildcard characters (glob patterns) in the paths passed + to Finder::in() + 2.1.0 ----- diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Comparator/Comparator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Comparator/Comparator.php index 5d19d5d9..83c511a7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Comparator/Comparator.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Comparator/Comparator.php @@ -55,6 +55,8 @@ public function getOperator() * Sets the comparison operator. * * @param string $operator A valid operator + * + * @throws \InvalidArgumentException */ public function setOperator($operator) { @@ -73,6 +75,8 @@ public function setOperator($operator) * Tests against the target. * * @param mixed $test A test value + * + * @return Boolean */ public function test($test) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/AdapterFailureException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/AdapterFailureException.php new file mode 100644 index 00000000..15fa2214 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/AdapterFailureException.php @@ -0,0 +1,46 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Exception; + +use Symfony\Component\Finder\Adapter\AdapterInterface; + +/** + * Base exception for all adapter failures. + * + * @author Jean-François Simon + */ +class AdapterFailureException extends \RuntimeException implements ExceptionInterface +{ + /** + * @var \Symfony\Component\Finder\Adapter\AdapterInterface + */ + private $adapter; + + /** + * @param AdapterInterface $adapter + * @param string|null $message + * @param \Exception|null $previous + */ + public function __construct(AdapterInterface $adapter, $message = null, \Exception $previous = null) + { + $this->adapter = $adapter; + parent::__construct($message ?: 'Search failed with "'.$adapter->getName().'" adapter.', $previous); + } + + /** + * {@inheritdoc} + */ + public function getAdapter() + { + return $this->adapter; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/ExceptionInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/ExceptionInterface.php new file mode 100644 index 00000000..b0337c1a --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/ExceptionInterface.php @@ -0,0 +1,14 @@ + + */ +interface ExceptionInterface +{ + /** + * @return \Symfony\Component\Finder\Adapter\AdapterInterface + */ + public function getAdapter(); +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/OperationNotPermitedException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/OperationNotPermitedException.php new file mode 100644 index 00000000..36631122 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/OperationNotPermitedException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Exception; + +/** + * @author Jean-François Simon + */ +class OperationNotPermitedException extends AdapterFailureException +{ +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/ShellCommandFailureException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/ShellCommandFailureException.php new file mode 100644 index 00000000..2658f6a5 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Exception/ShellCommandFailureException.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Exception; + +use Symfony\Component\Finder\Adapter\AdapterInterface; +use Symfony\Component\Finder\Shell\Command; + +/** + * @author Jean-François Simon + */ +class ShellCommandFailureException extends AdapterFailureException +{ + /** + * @var Command + */ + private $command; + + /** + * @param AdapterInterface $adapter + * @param Command $command + * @param \Exception|null $previous + */ + public function __construct(AdapterInterface $adapter, Command $command, \Exception $previous = null) + { + $this->command = $command; + parent::__construct($adapter, 'Shell command failed: "'.$command->join().'".', $previous); + } + + /** + * @return Command + */ + public function getCommand() + { + return $this->command; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/Expression.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/Expression.php new file mode 100644 index 00000000..ceedbc18 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/Expression.php @@ -0,0 +1,146 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Expression; + +/** + * @author Jean-François Simon + */ +class Expression implements ValueInterface +{ + const TYPE_REGEX = 1; + const TYPE_GLOB = 2; + + /** + * @var ValueInterface + */ + private $value; + + /** + * @param string $expr + * + * @return Expression + */ + public static function create($expr) + { + return new self($expr); + } + + /** + * @param string $expr + */ + public function __construct($expr) + { + try { + $this->value = Regex::create($expr); + } catch (\InvalidArgumentException $e) { + $this->value = new Glob($expr); + } + } + + /** + * @return string + */ + public function __toString() + { + return $this->render(); + } + + /** + * {@inheritdoc} + */ + public function render() + { + return $this->value->render(); + } + + /** + * {@inheritdoc} + */ + public function renderPattern() + { + return $this->value->renderPattern(); + } + + /** + * @return bool + */ + public function isCaseSensitive() + { + return $this->value->isCaseSensitive(); + } + + /** + * @return int + */ + public function getType() + { + return $this->value->getType(); + } + + /** + * {@inheritdoc} + */ + public function prepend($expr) + { + $this->value->prepend($expr); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function append($expr) + { + $this->value->append($expr); + + return $this; + } + + /** + * @return bool + */ + public function isRegex() + { + return self::TYPE_REGEX === $this->value->getType(); + } + + /** + * @return bool + */ + public function isGlob() + { + return self::TYPE_GLOB === $this->value->getType(); + } + + /** + * @throws \LogicException + * + * @return Glob + */ + public function getGlob() + { + if (self::TYPE_GLOB !== $this->value->getType()) { + throw new \LogicException('Regex cant be transformed to glob.'); + } + + return $this->value; + } + + /** + * @return Regex + */ + public function getRegex() + { + return self::TYPE_REGEX === $this->value->getType() ? $this->value : $this->value->toRegex(); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/Glob.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/Glob.php new file mode 100644 index 00000000..3023ceea --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/Glob.php @@ -0,0 +1,157 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Expression; + +/** + * @author Jean-François Simon + */ +class Glob implements ValueInterface +{ + /** + * @var string + */ + private $pattern; + + /** + * @param string $pattern + */ + public function __construct($pattern) + { + $this->pattern = $pattern; + } + + /** + * {@inheritdoc} + */ + public function render() + { + return $this->pattern; + } + + /** + * {@inheritdoc} + */ + public function renderPattern() + { + return $this->pattern; + } + + /** + * {@inheritdoc} + */ + public function getType() + { + return Expression::TYPE_GLOB; + } + + /** + * {@inheritdoc} + */ + public function isCaseSensitive() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function prepend($expr) + { + $this->pattern = $expr.$this->pattern; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function append($expr) + { + $this->pattern .= $expr; + + return $this; + } + + /** + * Tests if glob is expandable ("*.{a,b}" syntax). + * + * @return bool + */ + public function isExpandable() + { + return false !== strpos($this->pattern, '{') + && false !== strpos($this->pattern, '}'); + } + + /** + * @param bool $strictLeadingDot + * @param bool $strictWildcardSlash + * + * @return Regex + */ + public function toRegex($strictLeadingDot = true, $strictWildcardSlash = true) + { + $firstByte = true; + $escaping = false; + $inCurlies = 0; + $regex = ''; + $sizeGlob = strlen($this->pattern); + for ($i = 0; $i < $sizeGlob; $i++) { + $car = $this->pattern[$i]; + if ($firstByte) { + if ($strictLeadingDot && '.' !== $car) { + $regex .= '(?=[^\.])'; + } + + $firstByte = false; + } + + if ('/' === $car) { + $firstByte = true; + } + + if ('.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) { + $regex .= "\\$car"; + } elseif ('*' === $car) { + $regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*'); + } elseif ('?' === $car) { + $regex .= $escaping ? '\\?' : ($strictWildcardSlash ? '[^/]' : '.'); + } elseif ('{' === $car) { + $regex .= $escaping ? '\\{' : '('; + if (!$escaping) { + ++$inCurlies; + } + } elseif ('}' === $car && $inCurlies) { + $regex .= $escaping ? '}' : ')'; + if (!$escaping) { + --$inCurlies; + } + } elseif (',' === $car && $inCurlies) { + $regex .= $escaping ? ',' : '|'; + } elseif ('\\' === $car) { + if ($escaping) { + $regex .= '\\\\'; + $escaping = false; + } else { + $escaping = true; + } + + continue; + } else { + $regex .= $car; + } + $escaping = false; + } + + return new Regex('^'.$regex.'$'); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/Regex.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/Regex.php new file mode 100644 index 00000000..05544d0c --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/Regex.php @@ -0,0 +1,317 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Expression; + +/** + * @author Jean-François Simon + */ +class Regex implements ValueInterface +{ + const START_FLAG = '^'; + const END_FLAG = '$'; + const BOUNDARY = '~'; + const JOKER = '.*'; + const ESCAPING = '\\'; + + /** + * @var string + */ + private $pattern; + + /** + * @var array + */ + private $options; + + /** + * @var bool + */ + private $startFlag; + + /** + * @var bool + */ + private $endFlag; + + /** + * @var bool + */ + private $startJoker; + + /** + * @var bool + */ + private $endJoker; + + /** + * @param string $expr + * + * @return Regex + * + * @throws \InvalidArgumentException + */ + public static function create($expr) + { + if (preg_match('/^(.{3,}?)([imsxuADU]*)$/', $expr, $m)) { + $start = substr($m[1], 0, 1); + $end = substr($m[1], -1); + + if (($start === $end && !preg_match('/[*?[:alnum:] \\\\]/', $start)) || ($start === '{' && $end === '}')) { + return new self(substr($m[1], 1, -1), $m[2], $end); + } + } + + throw new \InvalidArgumentException('Given expression is not a regex.'); + } + + /** + * @param string $pattern + * @param string $options + * @param string $delimiter + */ + public function __construct($pattern, $options = '', $delimiter = null) + { + if (null !== $delimiter) { + // removes delimiter escaping + $pattern = str_replace('\\'.$delimiter, $delimiter, $pattern); + } + + $this->parsePattern($pattern); + $this->options = $options; + } + + /** + * @return string + */ + public function __toString() + { + return $this->render(); + } + + /** + * {@inheritdoc} + */ + public function render() + { + return self::BOUNDARY + .$this->renderPattern() + .self::BOUNDARY + .$this->options; + } + + /** + * {@inheritdoc} + */ + public function renderPattern() + { + return ($this->startFlag ? self::START_FLAG : '') + .($this->startJoker ? self::JOKER : '') + .str_replace(self::BOUNDARY, '\\'.self::BOUNDARY, $this->pattern) + .($this->endJoker ? self::JOKER : '') + .($this->endFlag ? self::END_FLAG : ''); + } + + /** + * {@inheritdoc} + */ + public function isCaseSensitive() + { + return !$this->hasOption('i'); + } + + /** + * {@inheritdoc} + */ + public function getType() + { + return Expression::TYPE_REGEX; + } + + /** + * {@inheritdoc} + */ + public function prepend($expr) + { + $this->pattern = $expr.$this->pattern; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function append($expr) + { + $this->pattern .= $expr; + + return $this; + } + + /** + * @param string $option + * + * @return bool + */ + public function hasOption($option) + { + return false !== strpos($this->options, $option); + } + + /** + * @param string $option + * + * @return Regex + */ + public function addOption($option) + { + if (!$this->hasOption($option)) { + $this->options.= $option; + } + + return $this; + } + + /** + * @param string $option + * + * @return Regex + */ + public function removeOption($option) + { + $this->options = str_replace($option, '', $this->options); + + return $this; + } + + /** + * @param bool $startFlag + * + * @return Regex + */ + public function setStartFlag($startFlag) + { + $this->startFlag = $startFlag; + + return $this; + } + + /** + * @return bool + */ + public function hasStartFlag() + { + return $this->startFlag; + } + + /** + * @param bool $endFlag + * + * @return Regex + */ + public function setEndFlag($endFlag) + { + $this->endFlag = (bool) $endFlag; + + return $this; + } + + /** + * @return bool + */ + public function hasEndFlag() + { + return $this->endFlag; + } + + /** + * @param bool $startJoker + * + * @return Regex + */ + public function setStartJoker($startJoker) + { + $this->startJoker = $startJoker; + + return $this; + } + + /** + * @return bool + */ + public function hasStartJoker() + { + return $this->startJoker; + } + + /** + * @param bool $endJoker + * + * @return Regex + */ + public function setEndJoker($endJoker) + { + $this->endJoker = (bool) $endJoker; + + return $this; + } + + /** + * @return bool + */ + public function hasEndJoker() + { + return $this->endJoker; + } + + /** + * @param array $replacement + * + * @return Regex + */ + public function replaceJokers($replacement) + { + $replace = function ($subject) use ($replacement) { + $subject = $subject[0]; + $replace = 0 === substr_count($subject, '\\') % 2; + + return $replace ? str_replace('.', $replacement, $subject) : $subject; + }; + + $this->pattern = preg_replace_callback('~[\\\\]*\\.~', $replace, $this->pattern); + + return $this; + } + + /** + * @param string $pattern + */ + private function parsePattern($pattern) + { + if ($this->startFlag = self::START_FLAG === substr($pattern, 0, 1)) { + $pattern = substr($pattern, 1); + } + + if ($this->startJoker = self::JOKER === substr($pattern, 0, 2)) { + $pattern = substr($pattern, 2); + } + + if ($this->endFlag = (self::END_FLAG === substr($pattern, -1) && self::ESCAPING !== substr($pattern, -2, -1))) { + $pattern = substr($pattern, 0, -1); + } + + if ($this->endJoker = (self::JOKER === substr($pattern, -2) && self::ESCAPING !== substr($pattern, -3, -2))) { + $pattern = substr($pattern, 0, -2); + } + + $this->pattern = $pattern; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/ValueInterface.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/ValueInterface.php new file mode 100644 index 00000000..34ce0e7c --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Expression/ValueInterface.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Expression; + +/** + * @author Jean-François Simon + */ +interface ValueInterface +{ + /** + * Renders string representation of expression. + * + * @return string + */ + public function render(); + + /** + * Renders string representation of pattern. + * + * @return string + */ + public function renderPattern(); + + /** + * Returns value case sensitivity. + * + * @return bool + */ + public function isCaseSensitive(); + + /** + * Returns expression type. + * + * @return int + */ + public function getType(); + + /** + * @param string $expr + * + * @return ValueInterface + */ + public function prepend($expr); + + /** + * @param string $expr + * + * @return ValueInterface + */ + public function append($expr); +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Finder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Finder.php index dbb0f6fc..f3ba20cf 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Finder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Finder.php @@ -11,6 +11,12 @@ namespace Symfony\Component\Finder; +use Symfony\Component\Finder\Adapter\AdapterInterface; +use Symfony\Component\Finder\Adapter\GnuFindAdapter; +use Symfony\Component\Finder\Adapter\BsdFindAdapter; +use Symfony\Component\Finder\Adapter\PhpAdapter; +use Symfony\Component\Finder\Exception\ExceptionInterface; + /** * Finder allows to build rules to find files and directories. * @@ -46,6 +52,9 @@ class Finder implements \IteratorAggregate, \Countable private $iterators = array(); private $contains = array(); private $notContains = array(); + private $adapters = array(); + private $paths = array(); + private $notPaths = array(); private static $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'); @@ -55,6 +64,13 @@ class Finder implements \IteratorAggregate, \Countable public function __construct() { $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES; + + $this + ->addAdapter(new GnuFindAdapter()) + ->addAdapter(new BsdFindAdapter()) + ->addAdapter(new PhpAdapter(), -50) + ->setAdapter('php') + ; } /** @@ -69,6 +85,82 @@ public static function create() return new static(); } + /** + * Registers a finder engine implementation. + * + * @param AdapterInterface $adapter An adapter instance + * @param integer $priority Highest is selected first + * + * @return Finder The current Finder instance + */ + public function addAdapter(Adapter\AdapterInterface $adapter, $priority = 0) + { + $this->adapters[$adapter->getName()] = array( + 'adapter' => $adapter, + 'priority' => $priority, + 'selected' => false, + ); + + return $this->sortAdapters(); + } + + /** + * Sets the selected adapter to the best one according to the current platform the code is run on. + * + * @return Finder The current Finder instance + */ + public function useBestAdapter() + { + $this->resetAdapterSelection(); + + return $this->sortAdapters(); + } + + /** + * Selects the adapter to use. + * + * @param string $name + * + * @throws \InvalidArgumentException + * + * @return Finder The current Finder instance + */ + public function setAdapter($name) + { + if (!isset($this->adapters[$name])) { + throw new \InvalidArgumentException(sprintf('Adapter "%s" does not exist.', $name)); + } + + $this->resetAdapterSelection(); + $this->adapters[$name]['selected'] = true; + + return $this->sortAdapters(); + } + + /** + * Removes all adapters registered in the finder. + * + * @return Finder The current Finder instance + */ + public function removeAdapters() + { + $this->adapters = array(); + + return $this; + } + + /** + * Returns registered adapters ordered by priority without extra information. + * + * @return AdapterInterface[] + */ + public function getAdapters() + { + return array_values(array_map(function(array $adapter) { + return $adapter['adapter']; + }, $this->adapters)); + } + /** * Restricts the matching to directories only. * @@ -232,6 +324,52 @@ public function notContains($pattern) return $this; } + /** + * Adds rules that filenames must match. + * + * You can use patterns (delimited with / sign) or simple strings. + * + * $finder->path('some/special/dir') + * $finder->path('/some\/special\/dir/') // same as above + * + * Use only / as dirname separator. + * + * @param string $pattern A pattern (a regexp or a string) + * + * @return Finder The current Finder instance + * + * @see Symfony\Component\Finder\Iterator\FilenameFilterIterator + */ + public function path($pattern) + { + $this->paths[] = $pattern; + + return $this; + } + + /** + * Adds rules that filenames must not match. + * + * You can use patterns (delimited with / sign) or simple strings. + * + * $finder->notPath('some/special/dir') + * $finder->notPath('/some\/special\/dir/') // same as above + * + * Use only / as dirname separator. + * + * @param string $pattern A pattern (a regexp or a string) + * + * @return Finder The current Finder instance + * + * @see Symfony\Component\Finder\Iterator\FilenameFilterIterator + */ + public function notPath($pattern) + { + $this->notPaths[] = $pattern; + + return $this; + } + /** * Adds tests for file sizes. * @@ -317,9 +455,20 @@ public function ignoreVCS($ignoreVCS) return $this; } + /** + * Adds VCS patterns. + * + * @see ignoreVCS + * + * @param string|string[] $pattern VCS patterns to ignore + */ public static function addVCSPattern($pattern) { - self::$vcsPatterns[] = $pattern; + foreach ((array) $pattern as $p) { + self::$vcsPatterns[] = $p; + } + + self::$vcsPatterns = array_unique(self::$vcsPatterns); } /** @@ -484,21 +633,25 @@ public function followLinks() * * @return Finder The current Finder instance * - * @throws \InvalidArgumentException if one of the directory does not exist + * @throws \InvalidArgumentException if one of the directories does not exist * * @api */ public function in($dirs) { - $dirs = (array) $dirs; - - foreach ($dirs as $dir) { - if (!is_dir($dir)) { + $resolvedDirs = array(); + + foreach ((array) $dirs as $dir) { + if (is_dir($dir)) { + $resolvedDirs[] = $dir; + } elseif ($glob = glob($dir, GLOB_ONLYDIR)) { + $resolvedDirs = array_merge($resolvedDirs, $glob); + } else { throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir)); } } - $this->dirs = array_merge($this->dirs, $dirs); + $this->dirs = array_merge($this->dirs, $resolvedDirs); return $this; } @@ -514,8 +667,8 @@ public function in($dirs) */ public function getIterator() { - if (0 === count($this->dirs)) { - throw new \LogicException('You must call the in() method before iterating over a Finder.'); + if (0 === count($this->dirs) && 0 === count($this->iterators)) { + throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.'); } if (1 === count($this->dirs) && 0 === count($this->iterators)) { @@ -540,6 +693,10 @@ public function getIterator() * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array. * * @param mixed $iterator + * + * @return Finder The finder + * + * @throws \InvalidArgumentException When the given argument is not iterable. */ public function append($iterator) { @@ -556,6 +713,8 @@ public function append($iterator) } else { throw new \InvalidArgumentException('Finder::append() method wrong argument type.'); } + + return $this; } /** @@ -568,64 +727,85 @@ public function count() return iterator_count($this->getIterator()); } - private function searchInDirectory($dir) + /** + * @return Finder The current Finder instance + */ + private function sortAdapters() { - $flags = \RecursiveDirectoryIterator::SKIP_DOTS; - - if ($this->followLinks) { - $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS; - } - - $iterator = new \RecursiveIteratorIterator( - new Iterator\RecursiveDirectoryIterator($dir, $flags), - \RecursiveIteratorIterator::SELF_FIRST - ); + uasort($this->adapters, function (array $a, array $b) { + if ($a['selected'] || $b['selected']) { + return $a['selected'] ? -1 : 1; + } - if ($this->depths) { - $iterator = new Iterator\DepthRangeFilterIterator($iterator, $this->depths); - } + return $a['priority'] > $b['priority'] ? -1 : 1; + }); - if ($this->mode) { - $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode); - } + return $this; + } + /** + * @param $dir + * + * @return \Iterator + * + * @throws \RuntimeException When none of the adapters are supported + */ + private function searchInDirectory($dir) + { if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) { $this->exclude = array_merge($this->exclude, self::$vcsPatterns); } if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) { - $this->notNames[] = '/^\..+/'; - } - - if ($this->exclude) { - $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $this->exclude); - } - - if ($this->names || $this->notNames) { - $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames); + $this->notPaths[] = '#(^|/)\..+(/|$)#'; } - if ($this->contains || $this->notContains) { - $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains); - } - - if ($this->sizes) { - $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes); + foreach ($this->adapters as $adapter) { + if ($adapter['adapter']->isSupported()) { + try { + return $this + ->buildAdapter($adapter['adapter']) + ->searchInDirectory($dir); + } catch (ExceptionInterface $e) {} + } } - if ($this->dates) { - $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates); - } + throw new \RuntimeException('No supported adapter found.'); + } - if ($this->filters) { - $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); - } + /** + * @param AdapterInterface $adapter + * + * @return AdapterInterface + */ + private function buildAdapter(AdapterInterface $adapter) + { + return $adapter + ->setFollowLinks($this->followLinks) + ->setDepths($this->depths) + ->setMode($this->mode) + ->setExclude($this->exclude) + ->setNames($this->names) + ->setNotNames($this->notNames) + ->setContains($this->contains) + ->setNotContains($this->notContains) + ->setSizes($this->sizes) + ->setDates($this->dates) + ->setFilters($this->filters) + ->setSort($this->sort) + ->setPath($this->paths) + ->setNotPath($this->notPaths); + } - if ($this->sort) { - $iteratorAggregate = new Iterator\SortableIterator($iterator, $this->sort); - $iterator = $iteratorAggregate->getIterator(); - } + /** + * Unselects all adapters. + */ + private function resetAdapterSelection() + { + $this->adapters = array_map(function (array $properties) { + $properties['selected'] = false; - return $iterator; + return $properties; + }, $this->adapters); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/CustomFilterIterator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/CustomFilterIterator.php index 8ff57396..58976c07 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/CustomFilterIterator.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/CustomFilterIterator.php @@ -28,6 +28,8 @@ class CustomFilterIterator extends FilterIterator * * @param \Iterator $iterator The Iterator to filter * @param array $filters An array of PHP callbacks + * + * @throws \InvalidArgumentException */ public function __construct(\Iterator $iterator, array $filters) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php index 16647933..3e5713b8 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Finder\Iterator; +use Symfony\Component\Finder\Comparator\DateComparator; + /** * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates). * @@ -23,8 +25,8 @@ class DateRangeFilterIterator extends FilterIterator /** * Constructor. * - * @param \Iterator $iterator The Iterator to filter - * @param array $comparators An array of \DateCompare instances + * @param \Iterator $iterator The Iterator to filter + * @param DateComparator[] $comparators An array of DateComparator instances */ public function __construct(\Iterator $iterator, array $comparators) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php index 83212539..77a9f45f 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php @@ -24,31 +24,11 @@ class DepthRangeFilterIterator extends FilterIterator * Constructor. * * @param \RecursiveIteratorIterator $iterator The Iterator to filter - * @param array $comparators An array of \NumberComparator instances + * @param int $minDepth The min depth + * @param int $maxDepth The max depth */ - public function __construct(\RecursiveIteratorIterator $iterator, array $comparators) + public function __construct(\RecursiveIteratorIterator $iterator, $minDepth = 0, $maxDepth = INF) { - $minDepth = 0; - $maxDepth = INF; - foreach ($comparators as $comparator) { - switch ($comparator->getOperator()) { - case '>': - $minDepth = $comparator->getTarget() + 1; - break; - case '>=': - $minDepth = $comparator->getTarget(); - break; - case '<': - $maxDepth = $comparator->getTarget() - 1; - break; - case '<=': - $maxDepth = $comparator->getTarget(); - break; - default: - $minDepth = $maxDepth = $comparator->getTarget(); - } - } - $this->minDepth = $minDepth; $iterator->setMaxDepth(INF === $maxDepth ? -1 : $maxDepth); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/FilePathsIterator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/FilePathsIterator.php new file mode 100644 index 00000000..48634f27 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/FilePathsIterator.php @@ -0,0 +1,131 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +use Symfony\Component\Finder\SplFileInfo; + +/** + * Iterate over shell command result. + * + * @author Jean-François Simon + */ +class FilePathsIterator extends \ArrayIterator +{ + /** + * @var string + */ + private $baseDir; + + /** + * @var int + */ + private $baseDirLength; + + /** + * @var string + */ + private $subPath; + + /** + * @var string + */ + private $subPathname; + + /** + * @var SplFileInfo + */ + private $current; + + /** + * @param array $paths List of paths returned by shell command + * @param string $baseDir Base dir for relative path building + */ + public function __construct(array $paths, $baseDir) + { + $this->baseDir = $baseDir; + $this->baseDirLength = strlen($baseDir); + + parent::__construct($paths); + } + + /** + * @param string $name + * @param array $arguments + * + * @return mixed + */ + public function __call($name, array $arguments) + { + return call_user_func_array(array($this->current(), $name), $arguments); + } + + /** + * Return an instance of SplFileInfo with support for relative paths. + * + * @return SplFileInfo File information + */ + public function current() + { + return $this->current; + } + + /** + * @return string + */ + public function key() + { + return $this->current->getPathname(); + } + + public function next() + { + parent::next(); + $this->buildProperties(); + } + + public function rewind() + { + parent::rewind(); + $this->buildProperties(); + } + + /** + * @return string + */ + public function getSubPath() + { + return $this->subPath; + } + + /** + * @return string + */ + public function getSubPathname() + { + return $this->subPathname; + } + + private function buildProperties() + { + $absolutePath = parent::current(); + + if ($this->baseDir === substr($absolutePath, 0, $this->baseDirLength)) { + $this->subPathname = ltrim(substr($absolutePath, $this->baseDirLength), '/\\'); + $dir = dirname($this->subPathname); + $this->subPath = '.' === $dir ? '' : $dir; + } else { + $this->subPath = $this->subPathname = ''; + } + + $this->current = new SplFileInfo(parent::current(), $this->subPath, $this->subPathname); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php index 109b5f00..3c0f3aa7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Finder\Iterator; -use Symfony\Component\Finder\Glob; +use Symfony\Component\Finder\Expression\Expression; /** * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string). @@ -63,6 +63,6 @@ public function accept() */ protected function toRegex($str) { - return $this->isRegex($str) ? $str : Glob::toRegex($str); + return Expression::create($str)->getRegex()->render(); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php index 12584b18..3a9dd555 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Finder\Iterator; +use Symfony\Component\Finder\Expression\Expression; + /** * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings). * @@ -52,20 +54,7 @@ public function __construct(\Iterator $iterator, array $matchPatterns, array $no */ protected function isRegex($str) { - if (preg_match('/^(.{3,}?)[imsxuADU]*$/', $str, $m)) { - $start = substr($m[1], 0, 1); - $end = substr($m[1], -1); - - if ($start === $end) { - return !preg_match('/[*?[:alnum:] \\\\]/', $start); - } - - if ($start === '{' && $end === '}') { - return true; - } - } - - return false; + return Expression::create($str)->isRegex(); } /** diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/PathFilterIterator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/PathFilterIterator.php new file mode 100644 index 00000000..c736f0b3 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/PathFilterIterator.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Iterator; + +/** + * PathFilterIterator filters files by path patterns (e.g. some/special/dir). + * + * @author Fabien Potencier + * @author WÅ‚odzimierz Gajda + */ +class PathFilterIterator extends MultiplePcreFilterIterator +{ + + /** + * Filters the iterator values. + * + * @return Boolean true if the value should be kept, false otherwise + */ + public function accept() + { + $filename = $this->current()->getRelativePathname(); + + if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + $filename = strtr($filename, '\\', '/'); + } + + // should at least not match one rule to exclude + foreach ($this->noMatchRegexps as $regex) { + if (preg_match($regex, $filename)) { + return false; + } + } + + // should at least match one rule + $match = true; + if ($this->matchRegexps) { + $match = false; + foreach ($this->matchRegexps as $regex) { + if (preg_match($regex, $filename)) { + return true; + } + } + } + + return $match; + } + + /** + * Converts strings to regexp. + * + * PCRE patterns are left unchanged. + * + * Default conversion: + * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/' + * + * Use only / as directory separator (on Windows also). + * + * @param string $str Pattern: regexp or dirname. + * + * @return string regexp corresponding to a given string or regexp + */ + protected function toRegex($str) + { + return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php index 89a4fc43..77f9cc44 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Finder\Iterator; +use Symfony\Component\Finder\Comparator\NumberComparator; + /** * SizeRangeFilterIterator filters out files that are not in the given size range. * @@ -23,8 +25,8 @@ class SizeRangeFilterIterator extends FilterIterator /** * Constructor. * - * @param \Iterator $iterator The Iterator to filter - * @param array $comparators An array of \NumberComparator instances + * @param \Iterator $iterator The Iterator to filter + * @param NumberComparator[] $comparators An array of NumberComparator instances */ public function __construct(\Iterator $iterator, array $comparators) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/SortableIterator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/SortableIterator.php index f92088aa..cdc734f4 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/SortableIterator.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Iterator/SortableIterator.php @@ -32,6 +32,8 @@ class SortableIterator implements \IteratorAggregate * * @param \Traversable $iterator The Iterator to filter * @param integer|callback $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback) + * + * @throws \InvalidArgumentException */ public function __construct(\Traversable $iterator, $sort) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/LICENSE deleted file mode 100644 index cdffe7ae..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2012 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/README.md deleted file mode 100644 index 3e71447f..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Finder Component -================ - -Finder finds files and directories via an intuitive fluent interface. - - use Symfony\Component\Finder\Finder; - - $finder = new Finder(); - - $iterator = $finder - ->files() - ->name('*.php') - ->depth(0) - ->size('>= 1K') - ->in(__DIR__); - - foreach ($iterator as $file) { - print $file->getRealpath()."\n"; - } - -But you can also use it to find files stored remotely like in this example where -we are looking for files on Amazon S3: - - $s3 = new \Zend_Service_Amazon_S3($key, $secret); - $s3->registerStreamWrapper("s3"); - - $finder = new Finder(); - $finder->name('photos*')->size('< 100K')->date('since 1 hour ago'); - foreach ($finder->in('s3://bucket-name') as $file) { - print $file->getFilename()."\n"; - } - -Resources ---------- - -Unit tests: - -https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/Finder diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Shell/Command.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Shell/Command.php new file mode 100644 index 00000000..1a060c8c --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Shell/Command.php @@ -0,0 +1,264 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Shell; + +/** + * @author Jean-François Simon + */ +class Command +{ + /** + * @var Command|null + */ + private $parent; + + /** + * @var array + */ + private $bits; + + /** + * @var array + */ + private $labels; + + /** + * Constructor. + * + * @param Command $parent Parent command + */ + public function __construct(Command $parent = null) + { + $this->parent = $parent; + $this->bits = array(); + $this->labels = array(); + } + + /** + * Returns command as string. + * + * @return string + */ + public function __toString() + { + return $this->join(); + } + + /** + * Creates a new Command instance. + * + * @param Command $parent Parent command + * + * @return Command New Command instance + */ + public static function create(Command $parent = null) + { + return new self($parent); + } + + /** + * Escapes special chars from input. + * + * @param string $input A string to escape + * + * @return string The escaped string + */ + public static function escape($input) + { + return escapeshellcmd($input); + } + + /** + * Quotes input. + * + * @param string $input An argument string + * + * @return string The quoted string + */ + public static function quote($input) + { + return escapeshellarg($input); + } + + /** + * Appends a string or a Command instance. + * + * @param string|Command $bit + * + * @return Command The current Command instance + */ + public function add($bit) + { + $this->bits[] = $bit; + + return $this; + } + + /** + * Prepends a string or a command instance. + * + * @param string|Command $bit + * + * @return Command The current Command instance + */ + public function top($bit) + { + array_unshift($this->bits, $bit); + + foreach ($this->labels as $label => $index) { + $this->labels[$label] += 1; + } + + return $this; + } + + /** + * Appends an argument, will be quoted. + * + * @param string $arg + * + * @return Command The current Command instance + */ + public function arg($arg) + { + $this->bits[] = self::quote($arg); + + return $this; + } + + /** + * Appends escaped special command chars. + * + * @param string $esc + * + * @return Command The current Command instance + */ + public function cmd($esc) + { + $this->bits[] = self::escape($esc); + + return $this; + } + + /** + * Inserts a labeled command to feed later. + * + * @param string $label The unique label + * + * @return Command The current Command instance + * + * @throws \RuntimeException If label already exists + */ + public function ins($label) + { + if (isset($this->labels[$label])) { + throw new \RuntimeException('Label "'.$label.'" already exists.'); + } + + $this->bits[] = self::create($this); + $this->labels[$label] = count($this->bits)-1; + + return $this->bits[$this->labels[$label]]; + } + + /** + * Retrieves a previously labeled command. + * + * @param string $label + * + * @return Command The labeled command + * + * @throws \RuntimeException + */ + public function get($label) + { + if (!isset($this->labels[$label])) { + throw new \RuntimeException('Label "'.$label.'" does not exists.'); + } + + return $this->bits[$this->labels[$label]]; + } + + /** + * Returns parent command (if any). + * + * @return Command Parent command + * + * @throws \RuntimeException If command has no parent + */ + public function end() + { + if (null === $this->parent) { + throw new \RuntimeException('Calling end on root command doesn\'t make sense.'); + } + + return $this->parent; + } + + /** + * Counts bits stored in command. + * + * @return int The bits count + */ + public function length() + { + return count($this->bits); + } + + /** + * Executes current command. + * + * @return array The command result + * + * @throws \RuntimeException + */ + public function execute() + { + exec($this->join(), $output, $code); + + if (0 !== $code) { + throw new \RuntimeException('Execution failed with return code: '.$code.'.'); + } + + return $output ?: array(); + } + + /** + * Joins bits. + * + * @return string + */ + public function join() + { + return implode(' ', array_filter( + array_map(function($bit) { + return $bit instanceof Command ? $bit->join() : ($bit ?: null); + }, $this->bits), + function($bit) { return null !== $bit; } + )); + } + + /** + * Insert a string or a Command instance before the bit at given position $index (index starts from 0). + * + * @param string|Command $bit + * @param integer $index + * + * @return Command The current Command instance + */ + public function addAtIndex($bit, $index) + { + array_splice($this->bits, $index, 0, $bit); + + return $this; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Shell/Shell.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Shell/Shell.php new file mode 100644 index 00000000..0b01636c --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Shell/Shell.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Shell; + +/** + * @author Jean-François Simon + */ +class Shell +{ + const TYPE_UNIX = 1; + const TYPE_DARWIN = 2; + const TYPE_CYGWIN = 3; + const TYPE_WINDOWS = 4; + const TYPE_BSD = 5; + + /** + * @var string|null + */ + private $type; + + /** + * Returns guessed OS type. + * + * @return int + */ + public function getType() + { + if (null === $this->type) { + $this->type = $this->guessType(); + } + + return $this->type; + } + + /** + * Tests if a command is available. + * + * @param string $command + * + * @return bool + */ + public function testCommand($command) + { + if (self::TYPE_WINDOWS === $this->type) { + // todo: find a way to test if windows command exists + return false; + } + + if (!function_exists('exec')) { + return false; + } + + // todo: find a better way (command could not be available) + exec('command -v '.$command, $output, $code); + + return 0 === $code && count($output) > 0; + } + + /** + * Guesses OS type. + * + * @return int + */ + private function guessType() + { + $os = strtolower(PHP_OS); + + if (false !== strpos($os, 'cygwin')) { + return self::TYPE_CYGWIN; + } + + if (false !== strpos($os, 'darwin')) { + return self::TYPE_DARWIN; + } + + if (false !== strpos($os, 'bsd')) { + return self::TYPE_BSD; + } + + if (0 === strpos($os, 'win')) { + return self::TYPE_WINDOWS; + } + + return self::TYPE_UNIX; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/SplFileInfo.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/SplFileInfo.php index ee3d8ecf..e7e58f75 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/SplFileInfo.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/SplFileInfo.php @@ -59,13 +59,19 @@ public function getRelativePathname() * Returns the contents of the file * * @return string the contents of the file + * + * @throws \RuntimeException */ public function getContents() { - $file = new \SplFileObject($this->getRealpath(), 'rb'); - ob_start(); - $file->fpassthru(); + $level = error_reporting(0); + $content = file_get_contents($this->getRealpath()); + error_reporting($level); + if (false === $content) { + $error = error_get_last(); + throw new \RuntimeException($error['message']); + } - return ob_get_clean(); + return $content; } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Expression/ExpressionTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Expression/ExpressionTest.php new file mode 100644 index 00000000..c907d6a8 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Expression/ExpressionTest.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests; + +use Symfony\Component\Finder\Expression\Expression; + +class ExpressionTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getTypeGuesserData + */ + public function testTypeGuesser($expr, $type) + { + $this->assertEquals($type, Expression::create($expr)->getType()); + } + + /** + * @dataProvider getCaseSensitiveData + */ + public function testCaseSensitive($expr, $isCaseSensitive) + { + $this->assertEquals($isCaseSensitive, Expression::create($expr)->isCaseSensitive()); + } + + /** + * @dataProvider getRegexRenderingData + */ + public function testRegexRendering($expr, $body) + { + $this->assertEquals($body, Expression::create($expr)->renderPattern()); + } + + public function getTypeGuesserData() + { + return array( + array('{foo}', Expression::TYPE_REGEX), + array('/foo/', Expression::TYPE_REGEX), + array('foo', Expression::TYPE_GLOB), + array('foo*', Expression::TYPE_GLOB), + ); + } + + public function getCaseSensitiveData() + { + return array( + array('{foo}m', true), + array('/foo/i', false), + array('foo*', true), + ); + } + + public function getRegexRenderingData() + { + return array( + array('{foo}m', 'foo'), + array('/foo/i', 'foo'), + ); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/GlobTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Expression/GlobTest.php similarity index 77% rename from com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/GlobTest.php rename to com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Expression/GlobTest.php index 56077a10..fbaeb0e2 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/GlobTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Expression/GlobTest.php @@ -11,21 +11,21 @@ namespace Symfony\Component\Finder\Tests; -use Symfony\Component\Finder\Glob; +use Symfony\Component\Finder\Expression\Expression; class GlobTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getToRegexData */ - public function testToRegex($glob, $match, $noMatch) + public function testGlobToRegex($glob, $match, $noMatch) { foreach ($match as $m) { - $this->assertRegExp(Glob::toRegex($glob), $m, '::toRegex() converts a glob to a regexp'); + $this->assertRegExp(Expression::create($glob)->getRegex()->render(), $m, '::toRegex() converts a glob to a regexp'); } foreach ($noMatch as $m) { - $this->assertNotRegExp(Glob::toRegex($glob), $m, '::toRegex() converts a glob to a regexp'); + $this->assertNotRegExp(Expression::create($glob)->getRegex()->render(), $m, '::toRegex() converts a glob to a regexp'); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Expression/RegexTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Expression/RegexTest.php new file mode 100644 index 00000000..f252696a --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Expression/RegexTest.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests; + +use Symfony\Component\Finder\Expression\Expression; + +class RegexTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getHasFlagsData + */ + public function testHasFlags($regex, $start, $end) + { + $expr = new Expression($regex); + + $this->assertEquals($start, $expr->getRegex()->hasStartFlag()); + $this->assertEquals($end, $expr->getRegex()->hasEndFlag()); + } + + /** + * @dataProvider getHasJokersData + */ + public function testHasJokers($regex, $start, $end) + { + $expr = new Expression($regex); + + $this->assertEquals($start, $expr->getRegex()->hasStartJoker()); + $this->assertEquals($end, $expr->getRegex()->hasEndJoker()); + } + + /** + * @dataProvider getSetFlagsData + */ + public function testSetFlags($regex, $start, $end, $expected) + { + $expr = new Expression($regex); + $expr->getRegex()->setStartFlag($start)->setEndFlag($end); + + $this->assertEquals($expected, $expr->render()); + } + + /** + * @dataProvider getSetJokersData + */ + public function testSetJokers($regex, $start, $end, $expected) + { + $expr = new Expression($regex); + $expr->getRegex()->setStartJoker($start)->setEndJoker($end); + + $this->assertEquals($expected, $expr->render()); + } + + public function testOptions() + { + $expr = new Expression('~abc~is'); + $expr->getRegex()->removeOption('i')->addOption('m'); + + $this->assertEquals('~abc~sm', $expr->render()); + } + + public function testMixFlagsAndJokers() + { + $expr = new Expression('~^.*abc.*$~is'); + + $expr->getRegex()->setStartFlag(false)->setEndFlag(false)->setStartJoker(false)->setEndJoker(false); + $this->assertEquals('~abc~is', $expr->render()); + + $expr->getRegex()->setStartFlag(true)->setEndFlag(true)->setStartJoker(true)->setEndJoker(true); + $this->assertEquals('~^.*abc.*$~is', $expr->render()); + } + + /** + * @dataProvider getReplaceJokersTestData + */ + public function testReplaceJokers($regex, $expected) + { + $expr = new Expression($regex); + $expr = $expr->getRegex()->replaceJokers('@'); + + $this->assertEquals($expected, $expr->renderPattern()); + } + + public function getHasFlagsData() + { + return array( + array('~^abc~', true, false), + array('~abc$~', false, true), + array('~abc~', false, false), + array('~^abc$~', true, true), + array('~^abc\\$~', true, false), + ); + } + + public function getHasJokersData() + { + return array( + array('~.*abc~', true, false), + array('~abc.*~', false, true), + array('~abc~', false, false), + array('~.*abc.*~', true, true), + array('~.*abc\\.*~', true, false), + ); + } + + public function getSetFlagsData() + { + return array( + array('~abc~', true, false, '~^abc~'), + array('~abc~', false, true, '~abc$~'), + array('~abc~', false, false, '~abc~'), + array('~abc~', true, true, '~^abc$~'), + ); + } + + public function getSetJokersData() + { + return array( + array('~abc~', true, false, '~.*abc~'), + array('~abc~', false, true, '~abc.*~'), + array('~abc~', false, false, '~abc~'), + array('~abc~', true, true, '~.*abc.*~'), + ); + } + + public function getReplaceJokersTestData() + { + return array( + array('~.abc~', '@abc'), + array('~\\.abc~', '\\.abc'), + array('~\\\\.abc~', '\\\\@abc'), + array('~\\\\\\.abc~', '\\\\\\.abc'), + ); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/DummyAdapter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/DummyAdapter.php new file mode 100644 index 00000000..0cbae14b --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/DummyAdapter.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests\FakeAdapter; + +use Symfony\Component\Finder\Adapter\AbstractAdapter; + +/** + * @author Jean-François Simon + */ +class DummyAdapter extends AbstractAdapter +{ + /** + * @var \Iterator + */ + private $iterator; + + /** + * @param \Iterator $iterator + */ + public function __construct(\Iterator $iterator) + { + $this->iterator = $iterator; + } + + /** + * {@inheritdoc} + */ + public function searchInDirectory($dir) + { + return $this->iterator; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'yes'; + } + + /** + * {@inheritdoc} + */ + protected function canBeUsed() + { + return true; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/FailingAdapter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/FailingAdapter.php new file mode 100644 index 00000000..6e6ed24b --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/FailingAdapter.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests\FakeAdapter; + +use Symfony\Component\Finder\Adapter\AbstractAdapter; +use Symfony\Component\Finder\Exception\AdapterFailureException; + +/** + * @author Jean-François Simon + */ +class FailingAdapter extends AbstractAdapter +{ + /** + * {@inheritdoc} + */ + public function searchInDirectory($dir) + { + throw new AdapterFailureException($this); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'failing'; + } + + /** + * {@inheritdoc} + */ + protected function canBeUsed() + { + return true; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/NamedAdapter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/NamedAdapter.php new file mode 100644 index 00000000..5a260b0d --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/NamedAdapter.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests\FakeAdapter; + +use Symfony\Component\Finder\Adapter\AbstractAdapter; + +/** + * @author Jean-François Simon + */ +class NamedAdapter extends AbstractAdapter +{ + /** + * @var string + */ + private $name; + + /** + * @param string $name + */ + public function __construct($name) + { + $this->name = $name; + } + + /** + * {@inheritdoc} + */ + public function searchInDirectory($dir) + { + return new \ArrayIterator(array()); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->name; + } + + /** + * {@inheritdoc} + */ + protected function canBeUsed() + { + return true; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/UnsupportedAdapter.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/UnsupportedAdapter.php new file mode 100644 index 00000000..1f91b98a --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FakeAdapter/UnsupportedAdapter.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests\FakeAdapter; + +use Symfony\Component\Finder\Adapter\AbstractAdapter; + +/** + * @author Jean-François Simon + */ +class UnsupportedAdapter extends AbstractAdapter +{ + /** + * {@inheritdoc} + */ + public function searchInDirectory($dir) + { + return new \ArrayIterator(array()); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'unsupported'; + } + + /** + * {@inheritdoc} + */ + protected function canBeUsed() + { + return false; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FinderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FinderTest.php index ec7db1ec..33750fc2 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FinderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/FinderTest.php @@ -12,6 +12,8 @@ namespace Symfony\Component\Finder\Tests; use Symfony\Component\Finder\Finder; +use Symfony\Component\Finder\Adapter; +use Symfony\Component\Finder\Tests\FakeAdapter; class FinderTest extends Iterator\RealIteratorTestCase { @@ -21,7 +23,7 @@ public static function setUpBeforeClass() { parent::setUpBeforeClass(); - self::$tmpDir = sys_get_temp_dir().'/symfony2_finder'; + self::$tmpDir = realpath(sys_get_temp_dir().'/symfony2_finder'); } public function testCreate() @@ -29,198 +31,283 @@ public function testCreate() $this->assertInstanceOf('Symfony\Component\Finder\Finder', Finder::create()); } - public function testDirectories() + /** + * @dataProvider getAdaptersTestData + */ + public function testDirectories($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->directories()); $this->assertIterator($this->toAbsolute(array('foo', 'toto')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->directories(); $finder->files(); $finder->directories(); $this->assertIterator($this->toAbsolute(array('foo', 'toto')), $finder->in(self::$tmpDir)->getIterator()); } - public function testFiles() + /** + * @dataProvider getAdaptersTestData + */ + public function testFiles($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->files()); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->files(); $finder->directories(); $finder->files(); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); } - public function testDepth() + /** + * @dataProvider getAdaptersTestData + */ + public function testDepth($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->depth('< 1')); - $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->depth('<= 0')); - $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->depth('>= 1')); $this->assertIterator($this->toAbsolute(array('foo/bar.tmp')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->depth('< 1')->depth('>= 1'); $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); } - public function testName() + /** + * @dataProvider getAdaptersTestData + */ + public function testName($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->name('*.php')); $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->name('test.ph*'); $finder->name('test.py'); $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + + $finder = $this->buildFinder($adapter); + $finder->name('~^test~i'); + $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + + $finder = $this->buildFinder($adapter); + $finder->name('~\\.php$~i'); + $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); + + $finder = $this->buildFinder($adapter); + $finder->name('test.p{hp,y}'); + $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); } - public function testNotName() + /** + * @dataProvider getAdaptersTestData + */ + public function testNotName($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->notName('*.php')); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->notName('*.php'); $finder->notName('*.py'); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->name('test.ph*'); $finder->name('test.py'); $finder->notName('*.php'); $finder->notName('*.py'); $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); + + $finder = $this->buildFinder($adapter); + $finder->name('test.ph*'); + $finder->name('test.py'); + $finder->notName('*.p{hp,y}'); + $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); } - public function testSize() + /** + * @dataProvider getRegexNameTestData + * + * @group regexName + */ + public function testRegexName($adapter, $regex) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); + $finder->name($regex); + $this->assertIterator($this->toAbsolute(array('test.py', 'test.php')), $finder->in(self::$tmpDir)->getIterator()); + } + + /** + * @dataProvider getAdaptersTestData + */ + public function testSize($adapter) + { + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->files()->size('< 1K')->size('> 500')); $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); } - public function testDate() + /** + * @dataProvider getAdaptersTestData + */ + public function testDate($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->files()->date('until last month')); $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php')), $finder->in(self::$tmpDir)->getIterator()); } - public function testExclude() + /** + * @dataProvider getAdaptersTestData + */ + public function testExclude($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->exclude('foo')); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); } - public function testIgnoreVCS() + /** + * @dataProvider getAdaptersTestData + */ + public function testIgnoreVCS($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->ignoreVCS(false)->ignoreDotFiles(false)); - $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->ignoreVCS(false)->ignoreVCS(false)->ignoreDotFiles(false); - $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->ignoreVCS(true)->ignoreDotFiles(false)); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar')), $finder->in(self::$tmpDir)->getIterator()); - + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); } - public function testIgnoreDotFiles() + /** + * @dataProvider getAdaptersTestData + */ + public function testIgnoreDotFiles($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->ignoreDotFiles(false)->ignoreVCS(false)); - $this->assertIterator($this->toAbsolute(array('.git', '.bar', '.foo', '.foo/.bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->ignoreDotFiles(false)->ignoreDotFiles(false)->ignoreVCS(false); - $this->assertIterator($this->toAbsolute(array('.git', '.bar', '.foo', '.foo/.bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->ignoreDotFiles(true)->ignoreVCS(false)); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); - + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); } - public function testSortByName() + /** + * @dataProvider getAdaptersTestData + */ + public function testSortByName($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->sortByName()); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo bar', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); } - public function testSortByType() + /** + * @dataProvider getAdaptersTestData + */ + public function testSortByType($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->sortByType()); - $this->assertIterator($this->toAbsolute(array('foo', 'toto', 'foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo bar', 'toto', 'foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); } - public function testSortByAccessedTime() + /** + * @dataProvider getAdaptersTestData + */ + public function testSortByAccessedTime($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->sortByAccessedTime()); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); } - public function testSortByChangedTime() + /** + * @dataProvider getAdaptersTestData + */ + public function testSortByChangedTime($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->sortByChangedTime()); - $this->assertIterator($this->toAbsolute(array('toto', 'test.py', 'test.php', 'foo/bar.tmp', 'foo')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('toto', 'test.py', 'test.php', 'foo/bar.tmp', 'foo', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); } - public function testSortByModifiedTime() + /** + * @dataProvider getAdaptersTestData + */ + public function testSortByModifiedTime($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->sortByModifiedTime()); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); } - public function testSort() + /** + * @dataProvider getAdaptersTestData + */ + public function testSort($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->sort(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealpath(), $b->getRealpath()); })); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo bar', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); } - public function testFilter() + /** + * @dataProvider getAdaptersTestData + */ + public function testFilter($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->filter(function (\SplFileInfo $f) { return preg_match('/test/', $f) > 0; })); $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); } - public function testFollowLinks() + /** + * @dataProvider getAdaptersTestData + */ + public function testFollowLinks($adapter) { if ('\\' == DIRECTORY_SEPARATOR) { return; } - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertSame($finder, $finder->followLinks()); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); } - public function testIn() + /** + * @dataProvider getAdaptersTestData + */ + public function testIn($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); try { $finder->in('foobar'); $this->fail('->in() throws a \InvalidArgumentException if the directory does not exist'); @@ -228,15 +315,39 @@ public function testIn() $this->assertInstanceOf('InvalidArgumentException', $e, '->in() throws a \InvalidArgumentException if the directory does not exist'); } - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator(); - $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'bootstrap.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator); + $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php'), $iterator); + } + + /** + * @dataProvider getAdaptersTestData + */ + public function testInWithGlob($adapter) + { + $finder = $this->buildFinder($adapter); + $finder->in(array(__DIR__.'/Fixtures/*/B/C', __DIR__.'/Fixtures/*/*/B/C'))->getIterator(); + + $this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder); + } + + /** + * @dataProvider getAdaptersTestData + * @expectedException \InvalidArgumentException + */ + public function testInWithNonDirectoryGlob($adapter) + { + $finder = $this->buildFinder($adapter); + $finder->in(__DIR__.'/Fixtures/A/a*'); } - public function testGetIterator() + /** + * @dataProvider getAdaptersTestData + */ + public function testGetIterator($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); try { $finder->getIterator(); $this->fail('->getIterator() throws a \LogicException if the in() method has not been called'); @@ -244,7 +355,7 @@ public function testGetIterator() $this->assertInstanceOf('LogicException', $e, '->getIterator() throws a \LogicException if the in() method has not been called'); } - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $dirs = array(); foreach ($finder->directories()->in(self::$tmpDir) as $dir) { $dirs[] = (string) $dir; @@ -257,21 +368,22 @@ public function testGetIterator() $this->assertEquals($expected, $dirs, 'implements the \IteratorAggregate interface'); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $this->assertEquals(2, iterator_count($finder->directories()->in(self::$tmpDir)), 'implements the \IteratorAggregate interface'); - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $a = iterator_to_array($finder->directories()->in(self::$tmpDir)); $a = array_values(array_map(function ($a) { return (string) $a; }, $a)); sort($a); $this->assertEquals($expected, $a, 'implements the \IteratorAggregate interface'); } - public function testRelativePath() + /** + * @dataProvider getAdaptersTestData + */ + public function testRelativePath($adapter) { - $finder = new Finder(); - - $finder->in(self::$tmpDir); + $finder = $this->buildFinder($adapter)->in(self::$tmpDir); $paths = array(); @@ -279,19 +391,20 @@ public function testRelativePath() $paths[] = $file->getRelativePath(); } - $ref = array("", "", "", "", "foo"); + $ref = array("", "", "", "", "foo", ""); sort($ref); sort($paths); - $this->assertEquals($paths, $ref); + $this->assertEquals($ref, $paths); } - public function testRelativePathname() + /** + * @dataProvider getAdaptersTestData + */ + public function testRelativePathname($adapter) { - $finder = new Finder(); - - $finder->in(self::$tmpDir)->sortByName(); + $finder = $this->buildFinder($adapter)->in(self::$tmpDir)->sortByName(); $paths = array(); @@ -299,30 +412,36 @@ public function testRelativePathname() $paths[] = $file->getRelativePathname(); } - $ref = array("test.php", "toto", "test.py", "foo", "foo".DIRECTORY_SEPARATOR."bar.tmp"); + $ref = array("test.php", "toto", "test.py", "foo", "foo".DIRECTORY_SEPARATOR."bar.tmp", "foo bar"); sort($paths); sort($ref); - $this->assertEquals($paths, $ref); + $this->assertEquals($ref, $paths); } - public function testAppendWithAFinder() + /** + * @dataProvider getAdaptersTestData + */ + public function testAppendWithAFinder($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->files()->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo'); - $finder1 = new Finder(); + $finder1 = $this->buildFinder($adapter); $finder1->directories()->in(self::$tmpDir); - $finder->append($finder1); + $finder = $finder->append($finder1); $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->getIterator()); } - public function testAppendWithAnArray() + /** + * @dataProvider getAdaptersTestData + */ + public function testAppendWithAnArray($adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->files()->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo'); $finder->append($this->toAbsolute(array('foo', 'toto'))); @@ -330,10 +449,30 @@ public function testAppendWithAnArray() $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->getIterator()); } + /** + * @dataProvider getAdaptersTestData + */ + public function testAppendReturnsAFinder($adapter) + { + $this->assertInstanceOf('Symfony\\Component\\Finder\\Finder', $this->buildFinder($adapter)->append(array())); + } + + /** + * @dataProvider getAdaptersTestData + */ + public function testAppendDoesNotRequireIn($adapter) + { + $finder = $this->buildFinder($adapter); + $finder->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo'); + + $finder1 = Finder::create()->append($finder); + + $this->assertIterator(iterator_to_array($finder->getIterator()), $finder1->getIterator()); + } + public function testCountDirectories() { - $finder = new Finder(); - $directory = $finder->directories()->in(self::$tmpDir); + $directory = Finder::create()->directories()->in(self::$tmpDir); $i = 0; foreach ($directory as $dir) { @@ -345,8 +484,7 @@ public function testCountDirectories() public function testCountFiles() { - $finder = new Finder(); - $files = $finder->files()->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $files = Finder::create()->files()->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $i = 0; foreach ($files as $file) { @@ -356,17 +494,13 @@ public function testCountFiles() $this->assertCount($i, $files); } + /** + * @expectedException \LogicException + */ public function testCountWithoutIn() { - $finder = new Finder(); - $finder->files(); - - try { - count($finder); - $this->fail('Countable makes use of the getIterator command'); - } catch (\Exception $e) { - $this->assertInstanceOf('LogicException', $e, '->getIterator() throws \LogicException when no logic has been entered'); - } + $finder = Finder::create()->files(); + count($finder); } protected function toAbsolute($files) @@ -391,10 +525,11 @@ protected function toAbsoluteFixtures($files) /** * @dataProvider getContainsTestData + * @group grep */ - public function testContains($matchPatterns, $noMatchPatterns, $expected) + public function testContains($adapter, $matchPatterns, $noMatchPatterns, $expected) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures') ->name('*.txt')->sortByName() ->contains($matchPatterns) @@ -403,26 +538,12 @@ public function testContains($matchPatterns, $noMatchPatterns, $expected) $this->assertIterator($this->toAbsoluteFixtures($expected), $finder); } - public function getContainsTestData() - { - return array( - array('', '', array()), - array('foo', 'bar', array()), - array('', 'foobar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), - array('lorem ipsum dolor sit amet', 'foobar', array('lorem.txt')), - array('sit', 'bar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), - array('dolor sit amet', '@^L@m', array('dolor.txt', 'ipsum.txt')), - array('/^lorem ipsum dolor sit amet$/m', 'foobar', array('lorem.txt')), - array('lorem', 'foobar', array('lorem.txt')), - - array('', 'lorem', array('dolor.txt', 'ipsum.txt')), - array('ipsum dolor sit amet', '/^IPSUM/m', array('lorem.txt')), - ); - } - - public function testContainsOnDirectory() + /** + * @dataProvider getAdaptersTestData + */ + public function testContainsOnDirectory(Adapter\AdapterInterface $adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->in(__DIR__) ->directories() ->name('Fixtures') @@ -430,9 +551,12 @@ public function testContainsOnDirectory() $this->assertIterator(array(), $finder); } - public function testNotContainsOnDirectory() + /** + * @dataProvider getAdaptersTestData + */ + public function testNotContainsOnDirectory(Adapter\AdapterInterface $adapter) { - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->in(__DIR__) ->directories() ->name('Fixtures') @@ -442,11 +566,13 @@ public function testNotContainsOnDirectory() /** * Searching in multiple locations involves AppendIterator which does an unnecessary rewind which leaves FilterIterator - * with inner FilesystemIterator in an ivalid state. + * with inner FilesystemIterator in an invalid state. * * @see https://bugs.php.net/bug.php?id=49104 + * + * @dataProvider getAdaptersTestData */ - public function testMultipleLocations() + public function testMultipleLocations(Adapter\AdapterInterface $adapter) { $locations = array( self::$tmpDir.'/', @@ -454,9 +580,196 @@ public function testMultipleLocations() ); // it is expected that there are test.py test.php in the tmpDir - $finder = new Finder(); + $finder = $this->buildFinder($adapter); $finder->in($locations)->depth('< 1')->name('test.php'); $this->assertEquals(1, count($finder)); } + + /** + * Iterator keys must be the file pathname. + * + * @dataProvider getAdaptersTestData + */ + public function testIteratorKeys(Adapter\AdapterInterface $adapter) + { + $finder = $this->buildFinder($adapter)->in(self::$tmpDir); + foreach ($finder as $key => $file) { + $this->assertEquals($file->getPathname(), $key); + } + } + + public function testAdaptersOrdering() + { + $finder = Finder::create() + ->removeAdapters() + ->addAdapter(new FakeAdapter\NamedAdapter('a'), 0) + ->addAdapter(new FakeAdapter\NamedAdapter('b'), -50) + ->addAdapter(new FakeAdapter\NamedAdapter('c'), 50) + ->addAdapter(new FakeAdapter\NamedAdapter('d'), -25) + ->addAdapter(new FakeAdapter\NamedAdapter('e'), 25); + + $this->assertEquals( + array('c', 'e', 'a', 'd', 'b'), + array_map(function(Adapter\AdapterInterface $adapter) { + return $adapter->getName(); + }, $finder->getAdapters()) + ); + } + + public function testAdaptersChaining() + { + $iterator = new \ArrayIterator(array()); + $filenames = $this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')); + foreach ($filenames as $file) { + $iterator->append(new \Symfony\Component\Finder\SplFileInfo($file, null, null)); + } + + $finder = Finder::create() + ->removeAdapters() + ->addAdapter(new FakeAdapter\UnsupportedAdapter(), 3) + ->addAdapter(new FakeAdapter\FailingAdapter(), 2) + ->addAdapter(new FakeAdapter\DummyAdapter($iterator), 1); + + $this->assertIterator($filenames, $finder->in(sys_get_temp_dir())->getIterator()); + } + + public function getAdaptersTestData() + { + return array_map( + function ($adapter) { return array($adapter); }, + $this->getValidAdapters() + ); + } + + public function getContainsTestData() + { + $tests = array( + array('', '', array()), + array('foo', 'bar', array()), + array('', 'foobar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), + array('lorem ipsum dolor sit amet', 'foobar', array('lorem.txt')), + array('sit', 'bar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), + array('dolor sit amet', '@^L@m', array('dolor.txt', 'ipsum.txt')), + array('/^lorem ipsum dolor sit amet$/m', 'foobar', array('lorem.txt')), + array('lorem', 'foobar', array('lorem.txt')), + array('', 'lorem', array('dolor.txt', 'ipsum.txt')), + array('ipsum dolor sit amet', '/^IPSUM/m', array('lorem.txt')), + ); + + return $this->buildTestData($tests); + } + + public function getRegexNameTestData() + { + $tests = array( + array('~.+\\.p.+~i'), + array('~t.*s~i'), + ); + + return $this->buildTestData($tests); + } + + /** + * @dataProvider getTestPathData + */ + public function testPath(Adapter\AdapterInterface $adapter, $matchPatterns, $noMatchPatterns, array $expected) + { + $finder = $this->buildFinder($adapter); + $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures') + ->path($matchPatterns) + ->notPath($noMatchPatterns); + + $this->assertIterator($this->toAbsoluteFixtures($expected), $finder); + } + + public function testAdapterSelection() + { + // test that by default, PhpAdapter is selected + $adapters = Finder::create()->getAdapters(); + $this->assertTrue($adapters[0] instanceof Adapter\PhpAdapter); + + // test another adapter selection + $adapters = Finder::create()->setAdapter('gnu_find')->getAdapters(); + $this->assertTrue($adapters[0] instanceof Adapter\GnuFindAdapter); + + // test that useBestAdapter method removes selection + $adapters = Finder::create()->useBestAdapter()->getAdapters(); + $this->assertFalse($adapters[0] instanceof Adapter\PhpAdapter); + } + + public function getTestPathData() + { + $tests = array( + array('', '', array()), + array('/^A\/B\/C/', '/C$/', + array('A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat') + ), + array('/^A\/B/', 'foobar', + array( + 'A'.DIRECTORY_SEPARATOR.'B', + 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', + 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', + 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', + ) + ), + array('A/B/C', 'foobar', + array( + 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', + 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', + 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', + 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat.copy', + ) + ), + array('A/B', 'foobar', + array( + //dirs + 'A'.DIRECTORY_SEPARATOR.'B', + 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', + 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B', + 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', + //files + 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', + 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', + 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat.copy', + 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat.copy', + ) + ), + ); + + return $this->buildTestData($tests); + } + + private function buildTestData(array $tests) + { + $data = array(); + foreach ($this->getValidAdapters() as $adapter) { + foreach ($tests as $test) { + $data[] = array_merge(array($adapter), $test); + } + } + + return $data; + } + + private function buildFinder(Adapter\AdapterInterface $adapter) + { + return Finder::create() + ->removeAdapters() + ->addAdapter($adapter); + } + + private function getValidAdapters() + { + return array_filter( + array( + new Adapter\BsdFindAdapter(), + new Adapter\GnuFindAdapter(), + new Adapter\PhpAdapter() + ), + function (Adapter\AdapterInterface $adapter) { + return $adapter->isSupported(); + } + ); + } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/A/B/C/abc.dat b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/A/B/C/abc.dat new file mode 100644 index 00000000..e69de29b diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/A/B/ab.dat b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/A/B/ab.dat new file mode 100644 index 00000000..e69de29b diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/A/a.dat b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/A/a.dat new file mode 100644 index 00000000..e69de29b diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/C/abc.dat.copy b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/C/abc.dat.copy new file mode 100644 index 00000000..e69de29b diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/ab.dat.copy b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/ab.dat.copy new file mode 100644 index 00000000..e69de29b diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/copy/A/a.dat.copy b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Fixtures/copy/A/a.dat.copy new file mode 100644 index 00000000..e69de29b diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php index 6b5099ad..46319bfd 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php @@ -31,8 +31,8 @@ public function testAccept($size, $expected) public function getAcceptData() { return array( - array(array(new DateComparator('since 20 years ago')), array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar')), - array(array(new DateComparator('since 2 months ago')), array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar')), + array(array(new DateComparator('since 20 years ago')), array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar')), + array(array(new DateComparator('since 2 months ago')), array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar')), array(array(new DateComparator('until last month')), array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.foo')), ); } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php new file mode 100644 index 00000000..8c3df32f --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests\Iterator; + +use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; + +class DepthRangeFilterIteratorTest extends RealIteratorTestCase +{ + /** + * @dataProvider getAcceptData + */ + public function testAccept($minDepth, $maxDepth, $expected) + { + $inner = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->getAbsolutePath(''), \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST); + + $iterator = new DepthRangeFilterIterator($inner, $minDepth, $maxDepth); + + $actual = array_keys(iterator_to_array($iterator)); + sort($expected); + sort($actual); + $this->assertEquals($expected, $actual); + } + + public function getAcceptData() + { + return array( + array(0, 0, array($this->getAbsolutePath('/.git'), $this->getAbsolutePath('/test.py'), $this->getAbsolutePath('/foo'), $this->getAbsolutePath('/test.php'), $this->getAbsolutePath('/toto'), $this->getAbsolutePath('/.foo'), $this->getAbsolutePath('/.bar'), $this->getAbsolutePath('/foo bar'))), + array(0, 1, array($this->getAbsolutePath('/.git'), $this->getAbsolutePath('/test.py'), $this->getAbsolutePath('/foo'), $this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/test.php'), $this->getAbsolutePath('/toto'), $this->getAbsolutePath('/.foo'), $this->getAbsolutePath('/.foo/.bar'), $this->getAbsolutePath('/.bar'), $this->getAbsolutePath('/foo bar'), $this->getAbsolutePath('/.foo/bar'))), + array(2, INF, array()), + array(1, INF, array($this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/.foo/.bar'), $this->getAbsolutePath('/.foo/bar'))), + array(1, 1, array($this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/.foo/.bar'), $this->getAbsolutePath('/.foo/bar'))), + ); + } + + protected function getAbsolutePath($path) + { + return sys_get_temp_dir().'/symfony2_finder'.str_replace('/', DIRECTORY_SEPARATOR, $path); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/DepthRangeIteratorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/DepthRangeIteratorTest.php deleted file mode 100644 index 43ad4599..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/DepthRangeIteratorTest.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\Iterator; - -use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; -use Symfony\Component\Finder\Comparator\NumberComparator; - -class DepthRangeFilterIteratorTest extends RealIteratorTestCase -{ - /** - * @dataProvider getAcceptData - */ - public function testAccept($size, $expected) - { - $inner = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->getAbsolutePath(''), \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST); - - $iterator = new DepthRangeFilterIterator($inner, $size); - - $actual = array_keys(iterator_to_array($iterator)); - sort($expected); - sort($actual); - $this->assertEquals($expected, $actual); - } - - public function getAcceptData() - { - return array( - array(array(new NumberComparator('< 1')), array($this->getAbsolutePath('/.git'), $this->getAbsolutePath('/test.py'), $this->getAbsolutePath('/foo'), $this->getAbsolutePath('/test.php'), $this->getAbsolutePath('/toto'), $this->getAbsolutePath('/.foo'), $this->getAbsolutePath('/.bar'))), - array(array(new NumberComparator('<= 1')), array($this->getAbsolutePath('/.git'), $this->getAbsolutePath('/test.py'), $this->getAbsolutePath('/foo'), $this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/test.php'), $this->getAbsolutePath('/toto'), $this->getAbsolutePath('/.foo'), $this->getAbsolutePath('/.foo/.bar'), $this->getAbsolutePath('/.bar'))), - array(array(new NumberComparator('> 1')), array()), - array(array(new NumberComparator('>= 1')), array($this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/.foo/.bar'))), - array(array(new NumberComparator('1')), array($this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/.foo/.bar'))), - ); - } - - protected function getAbsolutePath($path) - { - return sys_get_temp_dir().'/symfony2_finder'.str_replace('/', DIRECTORY_SEPARATOR, $path); - } -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFileIteratorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php similarity index 84% rename from com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFileIteratorTest.php rename to com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php index a0c522bf..d68d7a36 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFileIteratorTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php @@ -37,21 +37,25 @@ public function getAcceptData() $tmpDir.DIRECTORY_SEPARATOR.'.bar', $tmpDir.DIRECTORY_SEPARATOR.'.foo', $tmpDir.DIRECTORY_SEPARATOR.'.foo'.DIRECTORY_SEPARATOR.'.bar', + $tmpDir.DIRECTORY_SEPARATOR.'.foo'.DIRECTORY_SEPARATOR.'bar', $tmpDir.DIRECTORY_SEPARATOR.'.git', $tmpDir.DIRECTORY_SEPARATOR.'test.py', $tmpDir.DIRECTORY_SEPARATOR.'test.php', - $tmpDir.DIRECTORY_SEPARATOR.'toto' + $tmpDir.DIRECTORY_SEPARATOR.'toto', + $tmpDir.DIRECTORY_SEPARATOR.'foo bar', )), array(array('fo'), array( $tmpDir.DIRECTORY_SEPARATOR.'.bar', $tmpDir.DIRECTORY_SEPARATOR.'.foo', $tmpDir.DIRECTORY_SEPARATOR.'.foo'.DIRECTORY_SEPARATOR.'.bar', + $tmpDir.DIRECTORY_SEPARATOR.'.foo'.DIRECTORY_SEPARATOR.'bar', $tmpDir.DIRECTORY_SEPARATOR.'.git', $tmpDir.DIRECTORY_SEPARATOR.'test.py', $tmpDir.DIRECTORY_SEPARATOR.'foo', $tmpDir.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.tmp', $tmpDir.DIRECTORY_SEPARATOR.'test.php', - $tmpDir.DIRECTORY_SEPARATOR.'toto' + $tmpDir.DIRECTORY_SEPARATOR.'toto', + $tmpDir.DIRECTORY_SEPARATOR.'foo bar', )), ); } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php new file mode 100644 index 00000000..61f0e9b2 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests\Iterator; + +use Symfony\Component\Finder\Iterator\FilePathsIterator; + +class FilePathsIteratorTest extends RealIteratorTestCase +{ + /** + * @dataProvider getSubPathData + */ + public function testSubPath($baseDir, array $paths, array $subPaths, array $subPathnames) + { + $iterator = new FilePathsIterator($paths, $baseDir); + + foreach ($iterator as $index => $file) { + $this->assertEquals($paths[$index], $file->getPathname()); + $this->assertEquals($subPaths[$index], $iterator->getSubPath()); + $this->assertEquals($subPathnames[$index], $iterator->getSubPathname()); + } + } + + public function getSubPathData() + { + $tmpDir = sys_get_temp_dir().'/symfony2_finder'; + + return array( + array( + $tmpDir, + array( // paths + $tmpDir.DIRECTORY_SEPARATOR.'.git' => $tmpDir.DIRECTORY_SEPARATOR.'.git', + $tmpDir.DIRECTORY_SEPARATOR.'test.py' => $tmpDir.DIRECTORY_SEPARATOR.'test.py', + $tmpDir.DIRECTORY_SEPARATOR.'foo' => $tmpDir.DIRECTORY_SEPARATOR.'foo', + $tmpDir.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.tmp' => $tmpDir.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.tmp', + $tmpDir.DIRECTORY_SEPARATOR.'test.php' => $tmpDir.DIRECTORY_SEPARATOR.'test.php', + $tmpDir.DIRECTORY_SEPARATOR.'toto' => $tmpDir.DIRECTORY_SEPARATOR.'toto' + ), + array( // subPaths + $tmpDir.DIRECTORY_SEPARATOR.'.git' => '', + $tmpDir.DIRECTORY_SEPARATOR.'test.py' => '', + $tmpDir.DIRECTORY_SEPARATOR.'foo' => '', + $tmpDir.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.tmp' => 'foo', + $tmpDir.DIRECTORY_SEPARATOR.'test.php' => '', + $tmpDir.DIRECTORY_SEPARATOR.'toto' => '' + ), + array( // subPathnames + $tmpDir.DIRECTORY_SEPARATOR.'.git' => '.git', + $tmpDir.DIRECTORY_SEPARATOR.'test.py' => 'test.py', + $tmpDir.DIRECTORY_SEPARATOR.'foo' => 'foo', + $tmpDir.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.tmp' => 'foo'.DIRECTORY_SEPARATOR.'bar.tmp', + $tmpDir.DIRECTORY_SEPARATOR.'test.php' => 'test.php', + $tmpDir.DIRECTORY_SEPARATOR.'toto' => 'toto' + ), + ), + ); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php index 852b19e5..c80b6aea 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php @@ -30,7 +30,7 @@ public function testAccept($mode, $expected) public function getAcceptData() { return array( - array(FileTypeFilterIterator::ONLY_FILES, array(sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/.bar')), + array(FileTypeFilterIterator::ONLY_FILES, array(sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar')), array(FileTypeFilterIterator::ONLY_DIRECTORIES, array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.foo')), ); } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php index 5f0625f9..5f2b3982 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php @@ -12,6 +12,8 @@ namespace Symfony\Component\Finder\Tests\Iterator; use Symfony\Component\Finder\Iterator\FilecontentFilterIterator; +use Symfony\Component\Finder\Tests\Iterator\MockSplFileInfo; +use Symfony\Component\Finder\Tests\Iterator\MockFileListIterator; class FilecontentFilterIteratorTest extends IteratorTestCase { @@ -85,107 +87,3 @@ public function getTestFilterData() ); } } - -class MockSplFileInfo extends \SplFileInfo -{ - const TYPE_DIRECTORY = 1; - const TYPE_FILE = 2; - const TYPE_UNKNOWN = 3; - - private $contents = null; - private $mode = null; - private $type = null; - - public function __construct($param) - { - if (is_string($param)) { - parent::__construct($param); - } elseif (is_array($param)) { - - $defaults = array( - 'name' => 'file.txt', - 'contents' => null, - 'mode' => null, - 'type' => null - ); - $defaults = array_merge($defaults, $param); - parent::__construct($defaults['name']); - $this->setContents($defaults['contents']); - $this->setMode($defaults['mode']); - $this->setType($defaults['type']); - } else { - throw new \RuntimeException(sprintf('Incorrect parameter "%s"', $param)); - } - } - - public function isFile() - { - if ($this->type === null) { - return preg_match('/file/', $this->getFilename()); - }; - - return self::TYPE_FILE === $this->type; - } - - public function isDir() - { - if ($this->type === null) { - return preg_match('/directory/', $this->getFilename()); - } - - return self::TYPE_DIRECTORY === $this->type; - } - - public function isReadable() - { - if ($this->mode === null) { - return preg_match('/r\+/', $this->getFilename()); - } - - return preg_match('/r\+/', $this->mode); - } - - public function getContents() - { - return $this->contents; - } - - public function setContents($contents) - { - $this->contents = $contents; - } - - public function setMode($mode) - { - $this->mode = $mode; - } - - public function setType($type) - { - if (is_string($type)) { - switch ($type) { - case 'directory': - case 'd': - $this->type = self::TYPE_DIRECTORY; - break; - case 'file': - case 'f': - $this->type = self::TYPE_FILE; - break; - default: - $this->type = self::TYPE_UNKNOWN; - } - } else { - $this->type = $type; - } - } -} - -class MockFileListIterator extends \ArrayIterator -{ - public function __construct(array $filesArray = array()) - { - $files = array_map(function($file){ return new MockSplFileInfo($file); }, $filesArray); - parent::__construct($files); - } -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php index 1deea0c0..c4b97959 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php @@ -38,7 +38,6 @@ public function getAcceptData() array(array(), array('/\.php$/'), array('test.py')), ); } - } class InnerNameIterator extends \ArrayIterator diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php index 8810ce75..7b3f8934 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php @@ -15,7 +15,11 @@ abstract class IteratorTestCase extends \PHPUnit_Framework_TestCase { protected function assertIterator($expected, \Traversable $iterator) { - $values = array_map(function (\SplFileInfo $fileinfo) { return $fileinfo->getPathname(); }, iterator_to_array($iterator)); + // set iterator_to_array $use_key to false to avoid values merge + // this made FinderTest::testAppendWithAnArray() failed with GnuFinderAdapter + $values = array_map(function (\SplFileInfo $fileinfo) { return str_replace('/', DIRECTORY_SEPARATOR, $fileinfo->getPathname()); }, iterator_to_array($iterator, false)); + + $expected = array_map(function ($path) { return str_replace('/', DIRECTORY_SEPARATOR, $path); }, $expected); sort($values); sort($expected); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php new file mode 100644 index 00000000..6d8ae395 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests\Iterator; + +class MockFileListIterator extends \ArrayIterator +{ + public function __construct(array $filesArray = array()) + { + $files = array_map(function($file){ return new MockSplFileInfo($file); }, $filesArray); + parent::__construct($files); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php new file mode 100644 index 00000000..a50e4c9f --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php @@ -0,0 +1,134 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests\Iterator; + +class MockSplFileInfo extends \SplFileInfo +{ + const TYPE_DIRECTORY = 1; + const TYPE_FILE = 2; + const TYPE_UNKNOWN = 3; + + private $contents = null; + private $mode = null; + private $type = null; + private $relativePath = null; + private $relativePathname = null; + + public function __construct($param) + { + if (is_string($param)) { + parent::__construct($param); + } elseif (is_array($param)) { + $defaults = array( + 'name' => 'file.txt', + 'contents' => null, + 'mode' => null, + 'type' => null, + 'relativePath' => null, + 'relativePathname' => null, + ); + $defaults = array_merge($defaults, $param); + parent::__construct($defaults['name']); + $this->setContents($defaults['contents']); + $this->setMode($defaults['mode']); + $this->setType($defaults['type']); + $this->setRelativePath($defaults['relativePath']); + $this->setRelativePathname($defaults['relativePathname']); + } else { + throw new \RuntimeException(sprintf('Incorrect parameter "%s"', $param)); + } + } + + public function isFile() + { + if ($this->type === null) { + return preg_match('/file/', $this->getFilename()); + }; + + return self::TYPE_FILE === $this->type; + } + + public function isDir() + { + if ($this->type === null) { + return preg_match('/directory/', $this->getFilename()); + } + + return self::TYPE_DIRECTORY === $this->type; + } + + public function isReadable() + { + if ($this->mode === null) { + return preg_match('/r\+/', $this->getFilename()); + } + + return preg_match('/r\+/', $this->mode); + } + + public function getContents() + { + return $this->contents; + } + + public function setContents($contents) + { + $this->contents = $contents; + } + + public function setMode($mode) + { + $this->mode = $mode; + } + + public function setType($type) + { + if (is_string($type)) { + switch ($type) { + case 'directory': + $this->type = self::TYPE_DIRECTORY; + case 'd': + $this->type = self::TYPE_DIRECTORY; + break; + case 'file': + $this->type = self::TYPE_FILE; + case 'f': + $this->type = self::TYPE_FILE; + break; + default: + $this->type = self::TYPE_UNKNOWN; + } + } else { + $this->type = $type; + } + } + + public function setRelativePath($relativePath) + { + $this->relativePath = $relativePath; + } + + public function setRelativePathname($relativePathname) + { + $this->relativePathname = $relativePathname; + } + + public function getRelativePath() + { + return $this->relativePath; + } + + public function getRelativePathname() + { + return $this->relativePathname; + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php new file mode 100644 index 00000000..7278beba --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests\Iterator; + +use Symfony\Component\Finder\Iterator\PathFilterIterator; + +class PathFilterIteratorTest extends IteratorTestCase +{ + + /** + * @dataProvider getTestFilterData + */ + public function testFilter(\Iterator $inner, array $matchPatterns, array $noMatchPatterns, array $resultArray) + { + $iterator = new PathFilterIterator($inner, $matchPatterns, $noMatchPatterns); + $this->assertIterator($resultArray, $iterator); + } + + public function getTestFilterData() + { + $inner = new MockFileListIterator(); + + //PATH: A/B/C/abc.dat + $inner[] = new MockSplFileInfo(array( + 'name' => 'abc.dat', + 'relativePathname' => 'A' . DIRECTORY_SEPARATOR . 'B' . DIRECTORY_SEPARATOR . 'C' . DIRECTORY_SEPARATOR . 'abc.dat', + )); + + //PATH: A/B/ab.dat + $inner[] = new MockSplFileInfo(array( + 'name' => 'ab.dat', + 'relativePathname' => 'A' . DIRECTORY_SEPARATOR . 'B' . DIRECTORY_SEPARATOR . 'ab.dat', + )); + + //PATH: A/a.dat + $inner[] = new MockSplFileInfo(array( + 'name' => 'a.dat', + 'relativePathname' => 'A' . DIRECTORY_SEPARATOR . 'a.dat', + )); + + //PATH: copy/A/B/C/abc.dat.copy + $inner[] = new MockSplFileInfo(array( + 'name' => 'abc.dat.copy', + 'relativePathname' => 'copy' . DIRECTORY_SEPARATOR . 'A' . DIRECTORY_SEPARATOR . 'B' . DIRECTORY_SEPARATOR . 'C' . DIRECTORY_SEPARATOR . 'abc.dat', + )); + + //PATH: copy/A/B/ab.dat.copy + $inner[] = new MockSplFileInfo(array( + 'name' => 'ab.dat.copy', + 'relativePathname' => 'copy' . DIRECTORY_SEPARATOR . 'A' . DIRECTORY_SEPARATOR . 'B' . DIRECTORY_SEPARATOR . 'ab.dat', + )); + + //PATH: copy/A/a.dat.copy + $inner[] = new MockSplFileInfo(array( + 'name' => 'a.dat.copy', + 'relativePathname' => 'copy' . DIRECTORY_SEPARATOR . 'A' . DIRECTORY_SEPARATOR . 'a.dat', + )); + + return array( + array($inner, array('/^A/'), array(), array('abc.dat', 'ab.dat', 'a.dat')), + array($inner, array('/^A\/B/'), array(), array('abc.dat', 'ab.dat')), + array($inner, array('/^A\/B\/C/'), array(), array('abc.dat')), + array($inner, array('/A\/B\/C/'), array(), array('abc.dat', 'abc.dat.copy')), + + array($inner, array('A'), array(), array('abc.dat', 'ab.dat', 'a.dat', 'abc.dat.copy', 'ab.dat.copy', 'a.dat.copy')), + array($inner, array('A/B'), array(), array('abc.dat', 'ab.dat', 'abc.dat.copy', 'ab.dat.copy')), + array($inner, array('A/B/C'), array(), array('abc.dat', 'abc.dat.copy')), + + array($inner, array('copy/A'), array(), array('abc.dat.copy', 'ab.dat.copy', 'a.dat.copy')), + array($inner, array('copy/A/B'), array(), array('abc.dat.copy', 'ab.dat.copy')), + array($inner, array('copy/A/B/C'), array(), array('abc.dat.copy')), + + ); + } + +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php index b7b7b40c..6b353bb9 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php @@ -22,12 +22,14 @@ public static function setUpBeforeClass() $tmpDir.'/.git/', $tmpDir.'/.foo/', $tmpDir.'/.foo/.bar', + $tmpDir.'/.foo/bar', $tmpDir.'/.bar', $tmpDir.'/test.py', $tmpDir.'/foo/', $tmpDir.'/foo/bar.tmp', $tmpDir.'/test.php', - $tmpDir.'/toto/' + $tmpDir.'/toto/', + $tmpDir.'/foo bar', ); if (is_dir($tmpDir)) { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php index 624d91ac..f231b785 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php @@ -40,9 +40,9 @@ public function testAccept($mode, $expected) public function getAcceptData() { return array( - array(SortableIterator::SORT_BY_NAME, array(sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/toto')), - array(SortableIterator::SORT_BY_TYPE, array(sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py')), - array(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealpath(), $b->getRealpath()); }, array(sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/toto')), + array(SortableIterator::SORT_BY_NAME, array(sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/toto')), + array(SortableIterator::SORT_BY_TYPE, array(sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py')), + array(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealpath(), $b->getRealpath()); }, array(sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/toto')), ); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/bootstrap.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/bootstrap.php deleted file mode 100644 index 3edc1b25..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Finder')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Finder')).'.php')) { - require_once $file; - } - } -}); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/autoloader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/autoloader.php new file mode 100644 index 00000000..e38020d5 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/autoloader.php @@ -0,0 +1,11 @@ +=5.3.2" - }, - "autoload": { - "psr-0": { "Symfony\\Component\\Finder": "" } - }, - "target-dir": "Symfony/Component/Finder" -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/phpunit.xml.dist b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/phpunit.xml.dist index cd116f57..23272235 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/phpunit.xml.dist +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Finder/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/.gitattributes b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/.gitattributes deleted file mode 100644 index 80481513..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/Tests export-ignore -phpunit.xml.dist export-ignore diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/.gitignore b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/.gitignore new file mode 100644 index 00000000..44de97a3 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/CHANGELOG.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/CHANGELOG.md index 8c73d54f..7fa5b72d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/CHANGELOG.md +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ========= +2.2.0 +----- + + * added ProcessBuilder::setArguments() to reset the arguments on a builder + * added a way to retrieve the standard and error output incrementally + * added Process:restart() + 2.1.0 ----- diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Exception/InvalidArgumentException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Exception/InvalidArgumentException.php new file mode 100644 index 00000000..926ee211 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Exception/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Exception; + +/** + * InvalidArgumentException for the Process Component. + * + * @author Romain Neutron + */ +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Exception/LogicException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Exception/LogicException.php new file mode 100644 index 00000000..be3d490d --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Exception/LogicException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Process\Exception; + +/** + * LogicException for the Process Component. + * + * @author Romain Neutron + */ +class LogicException extends \LogicException implements ExceptionInterface +{ +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Exception/ProcessFailedException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Exception/ProcessFailedException.php index a4540c06..936cbc61 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Exception/ProcessFailedException.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Exception/ProcessFailedException.php @@ -25,13 +25,15 @@ class ProcessFailedException extends RuntimeException public function __construct(Process $process) { if ($process->isSuccessful()) { - throw new \InvalidArgumentException('Expected a failed process, but the given process was successful.'); + throw new InvalidArgumentException('Expected a failed process, but the given process was successful.'); } parent::__construct( sprintf( - 'The command "%s" failed.'."\n\nOutput:\n================\n".$process->getOutput()."\n\nError Output:\n================\n".$process->getErrorOutput(), - $process->getCommandLine() + 'The command "%s" failed.'."\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", + $process->getCommandLine(), + $process->getOutput(), + $process->getErrorOutput() ) ); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/ExecutableFinder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/ExecutableFinder.php index 087c94b0..5cc99c76 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/ExecutableFinder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/ExecutableFinder.php @@ -19,22 +19,23 @@ */ class ExecutableFinder { - private static $isWindows; - private $suffixes = array('.exe', '.bat', '.cmd', '.com'); - public function __construct() - { - if (null === self::$isWindows) { - self::$isWindows = 0 === stripos(PHP_OS, 'win'); - } - } - + /** + * Replaces default suffixes of executable. + * + * @param array $suffixes + */ public function setSuffixes(array $suffixes) { $this->suffixes = $suffixes; } + /** + * Adds new possible suffix to check for executable. + * + * @param string $suffix + */ public function addSuffix($suffix) { $this->suffixes[] = $suffix; @@ -78,7 +79,7 @@ public function find($name, $default = null, array $extraDirs = array()) } foreach ($suffixes as $suffix) { foreach ($dirs as $dir) { - if (is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && (self::$isWindows || is_executable($file))) { + if (is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && (defined('PHP_WINDOWS_VERSION_BUILD') || is_executable($file))) { return $file; } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/PhpProcess.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/PhpProcess.php index 2bd56004..d146057e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/PhpProcess.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/PhpProcess.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Process; +use Symfony\Component\Process\Exception\RuntimeException; + /** * PhpProcess runs a PHP script in an independent process. * @@ -55,24 +57,17 @@ public function setPhpBinary($php) } /** - * Runs the process. - * - * @param Closure|string|array $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @return integer The exit status code - * - * @api + * {@inheritdoc} */ - public function run($callback = null) + public function start($callback = null) { if (null === $this->getCommandLine()) { if (false === $php = $this->executableFinder->find()) { - throw new \RuntimeException('Unable to find the PHP executable.'); + throw new RuntimeException('Unable to find the PHP executable.'); } $this->setCommandLine($php); } - return parent::run($callback); + parent::start($callback); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Process.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Process.php index ba762556..468d1478 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Process.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Process.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Process; +use Symfony\Component\Process\Exception\InvalidArgumentException; use Symfony\Component\Process\Exception\RuntimeException; /** @@ -50,6 +51,8 @@ class Process private $pipes; private $process; private $status = self::STATUS_READY; + private $incrementalOutputOffset; + private $incrementalErrorOutputOffset; private $fileHandles; private $readBytes; @@ -116,18 +119,22 @@ class Process * @param integer $timeout The timeout in seconds * @param array $options An array of options for proc_open * - * @throws \RuntimeException When proc_open is not installed + * @throws RuntimeException When proc_open is not installed * * @api */ public function __construct($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) { if (!function_exists('proc_open')) { - throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.'); + throw new RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.'); } $this->commandline = $commandline; - $this->cwd = null === $cwd ? getcwd() : $cwd; + $this->cwd = $cwd; + // on windows, if the cwd changed via chdir(), proc_open defaults to the dir where php was started + if (null === $this->cwd && defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->cwd = getcwd(); + } if (null !== $env) { $this->env = array(); foreach ($env as $key => $value) { @@ -149,6 +156,20 @@ public function __destruct() $this->stop(); } + public function __clone() + { + $this->exitcode = null; + $this->fallbackExitcode = null; + $this->processInformation = null; + $this->stdout = null; + $this->stderr = null; + $this->pipes = null; + $this->process = null; + $this->status = self::STATUS_READY; + $this->fileHandles = null; + $this->readBytes = null; + } + /** * Runs the process. * @@ -159,12 +180,12 @@ public function __destruct() * The STDOUT and STDERR are also available after the process is finished * via the getOutput() and getErrorOutput() methods. * - * @param Closure|string|array $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR + * @param callback|null $callback A PHP callback to run whenever there is some + * output available on STDOUT or STDERR * * @return integer The exit status code * - * @throws \RuntimeException When process can't be launch or is stopped + * @throws RuntimeException When process can't be launch or is stopped * * @api */ @@ -190,20 +211,22 @@ public function run($callback = null) * with true as a second parameter then the callback will get all data occurred * in (and since) the start call. * - * @param Closure|string|array $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR + * @param callback|null $callback A PHP callback to run whenever there is some + * output available on STDOUT or STDERR * - * @throws \RuntimeException When process can't be launch or is stopped - * @throws \RuntimeException When process is already running + * @throws RuntimeException When process can't be launch or is stopped + * @throws RuntimeException When process is already running */ public function start($callback = null) { if ($this->isRunning()) { - throw new \RuntimeException('Process is already running'); + throw new RuntimeException('Process is already running'); } $this->stdout = ''; $this->stderr = ''; + $this->incrementalOutputOffset = 0; + $this->incrementalErrorOutputOffset = 0; $callback = $this->buildCallback($callback); //Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big. @@ -213,6 +236,9 @@ public function start($callback = null) $this->fileHandles = array( self::STDOUT => tmpfile(), ); + if (false === $this->fileHandles[self::STDOUT]) { + throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable'); + } $this->readBytes = array( self::STDOUT => 0, ); @@ -244,7 +270,7 @@ public function start($callback = null) $this->process = proc_open($commandline, $descriptors, $this->pipes, $this->cwd, $this->env, $this->options); if (!is_resource($this->process)) { - throw new \RuntimeException('Unable to launch a new process.'); + throw new RuntimeException('Unable to launch a new process.'); } $this->status = self::STATUS_STARTED; @@ -281,7 +307,7 @@ public function start($callback = null) if ($n === 0) { proc_terminate($this->process); - throw new \RuntimeException('The process timed out.'); + throw new RuntimeException('The process timed out.'); } if ($w) { @@ -311,6 +337,33 @@ public function start($callback = null) $this->updateStatus(); } + /** + * Restarts the process. + * + * Be warned that the process is cloned before being started. + * + * @param callable $callback A PHP callback to run whenever there is some + * output available on STDOUT or STDERR + * + * @return Process The new process + * + * @throws \RuntimeException When process can't be launch or is stopped + * @throws \RuntimeException When process is already running + * + * @see start() + */ + public function restart($callback = null) + { + if ($this->isRunning()) { + throw new \RuntimeException('Process is already running'); + } + + $process = clone $this; + $process->start($callback); + + return $process; + } + /** * Waits for the process to terminate. * @@ -318,11 +371,12 @@ public function start($callback = null) * from the output in real-time while writing the standard input to the process. * It allows to have feedback from the independent process during execution. * - * @param mixed $callback A valid PHP callback + * @param callback|null $callback A valid PHP callback * - * @return int The exitcode of the process + * @return integer The exitcode of the process * - * @throws \RuntimeException + * @throws \RuntimeException When process timed out + * @throws \RuntimeException When process stopped after receiving signal */ public function wait($callback = null) { @@ -338,17 +392,20 @@ public function wait($callback = null) $w = null; $e = null; - $n = @stream_select($r, $w, $e, $this->timeout); + if (false === $n = @stream_select($r, $w, $e, $this->timeout)) { + $lastError = error_get_last(); - if (false === $n) { - $this->pipes = array(); + // stream_select returns false when the `select` system call is interrupted by an incoming signal + if (isset($lastError['message']) && false === stripos($lastError['message'], 'interrupted system call')) { + $this->pipes = array(); + } continue; } if (0 === $n) { proc_terminate($this->process); - throw new \RuntimeException('The process timed out.'); + throw new RuntimeException('The process timed out.'); } foreach ($r as $pipe) { @@ -372,7 +429,7 @@ public function wait($callback = null) } $this->updateStatus(); if ($this->processInformation['signaled']) { - throw new \RuntimeException(sprintf('The process stopped because of a "%s" signal.', $this->processInformation['stopsig'])); + throw new RuntimeException(sprintf('The process stopped because of a "%s" signal.', $this->processInformation['stopsig'])); } $time = 0; @@ -384,7 +441,7 @@ public function wait($callback = null) $exitcode = proc_close($this->process); if ($this->processInformation['signaled']) { - throw new \RuntimeException(sprintf('The process stopped because of a "%s" signal.', $this->processInformation['stopsig'])); + throw new RuntimeException(sprintf('The process stopped because of a "%s" signal.', $this->processInformation['stopsig'])); } $this->exitcode = $this->processInformation['running'] ? $exitcode : $this->processInformation['exitcode']; @@ -410,6 +467,24 @@ public function getOutput() return $this->stdout; } + /** + * Returns the output incrementally. + * + * In comparison with the getOutput method which always return the whole + * output, this one returns the new output since the last call. + * + * @return string The process output since the last call + */ + public function getIncrementalOutput() + { + $data = $this->getOutput(); + + $latest = substr($data, $this->incrementalOutputOffset); + $this->incrementalOutputOffset = strlen($data); + + return $latest; + } + /** * Returns the current error output of the process (STDERR). * @@ -424,6 +499,25 @@ public function getErrorOutput() return $this->stderr; } + /** + * Returns the errorOutput incrementally. + * + * In comparison with the getErrorOutput method which always return the + * whole error output, this one returns the new error output since the last + * call. + * + * @return string The process error output since the last call + */ + public function getIncrementalErrorOutput() + { + $data = $this->getErrorOutput(); + + $latest = substr($data, $this->incrementalErrorOutputOffset); + $this->incrementalErrorOutputOffset = strlen($data); + + return $latest; + } + /** * Returns the exit code returned by the process. * @@ -452,8 +546,6 @@ public function getExitCode() * * @return string A string representation for the exit status code * - * @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled - * * @see http://tldp.org/LDP/abs/html/exitcodes.html * @see http://en.wikipedia.org/wiki/Unix_signal */ @@ -469,8 +561,6 @@ public function getExitCodeText() * * @return Boolean true if the process ended successfully, false otherwise * - * @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled - * * @api */ public function isSuccessful() @@ -570,16 +660,52 @@ public function isRunning() return $this->processInformation['running']; } + /** + * Checks if the process has been started with no regard to the current state. + * + * @return Boolean true if status is ready, false otherwise + */ + public function isStarted() + { + return $this->status != self::STATUS_READY; + } + + /** + * Checks if the process is terminated. + * + * @return Boolean true if process is terminated, false otherwise + */ + public function isTerminated() + { + $this->updateStatus(); + + return $this->status == self::STATUS_TERMINATED; + } + + /** + * Gets the process status. + * + * The status is one of: ready, started, terminated. + * + * @return string The current process status + */ + public function getStatus() + { + $this->updateStatus(); + + return $this->status; + } + /** * Stops the process. * - * @param float $timeout The timeout in seconds + * @param integer|float $timeout The timeout in seconds * * @return integer The exit-code of the process * - * @throws \RuntimeException if the process got signaled + * @throws RuntimeException if the process got signaled */ - public function stop($timeout=10) + public function stop($timeout = 10) { $timeoutMicro = (int) $timeout*10E6; if ($this->isRunning()) { @@ -644,10 +770,14 @@ public function getCommandLine() * Sets the command line to be executed. * * @param string $commandline The command to execute + * + * @return self The current Process instance */ public function setCommandLine($commandline) { $this->commandline = $commandline; + + return $this; } /** @@ -667,23 +797,27 @@ public function getTimeout() * * @param integer|null $timeout The timeout in seconds * - * @throws \InvalidArgumentException if the timeout is negative + * @return self The current Process instance + * + * @throws InvalidArgumentException if the timeout is negative */ public function setTimeout($timeout) { if (null === $timeout) { $this->timeout = null; - return; + return $this; } $timeout = (integer) $timeout; if ($timeout < 0) { - throw new \InvalidArgumentException('The timeout value must be a valid positive integer.'); + throw new InvalidArgumentException('The timeout value must be a valid positive integer.'); } $this->timeout = $timeout; + + return $this; } /** @@ -693,6 +827,13 @@ public function setTimeout($timeout) */ public function getWorkingDirectory() { + // This is for BC only + if (null === $this->cwd) { + // getcwd() will return false if any one of the parent directories does not have + // the readable or search mode set, even if the current directory does + return getcwd() ?: null; + } + return $this->cwd; } @@ -700,10 +841,14 @@ public function getWorkingDirectory() * Sets the current working directory. * * @param string $cwd The new working directory + * + * @return self The current Process instance */ public function setWorkingDirectory($cwd) { $this->cwd = $cwd; + + return $this; } /** @@ -720,10 +865,14 @@ public function getEnv() * Sets the environment variables. * * @param array $env The new environment variables + * + * @return self The current Process instance */ public function setEnv(array $env) { $this->env = $env; + + return $this; } /** @@ -740,10 +889,14 @@ public function getStdin() * Sets the contents of STDIN. * * @param string $stdin The new contents + * + * @return self The current Process instance */ public function setStdin($stdin) { $this->stdin = $stdin; + + return $this; } /** @@ -760,10 +913,14 @@ public function getOptions() * Sets the options for proc_open. * * @param array $options The new options + * + * @return self The current Process instance */ public function setOptions(array $options) { $this->options = $options; + + return $this; } /** @@ -782,10 +939,14 @@ public function getEnhanceWindowsCompatibility() * Sets whether or not Windows compatibility is enabled * * @param Boolean $enhance + * + * @return self The current Process instance */ public function setEnhanceWindowsCompatibility($enhance) { $this->enhanceWindowsCompatibility = (Boolean) $enhance; + + return $this; } /** @@ -806,10 +967,14 @@ public function getEnhanceSigchildCompatibility() * the --enable-sigchild option * * @param Boolean $enhance + * + * @return self The current Process instance */ public function setEnhanceSigchildCompatibility($enhance) { $this->enhanceSigchildCompatibility = (Boolean) $enhance; + + return $this; } /** @@ -818,9 +983,9 @@ public function setEnhanceSigchildCompatibility($enhance) * The callbacks adds all occurred output to the specific buffer and calls * the user callback (if present) with the received output. * - * @param mixed $callback The user defined PHP callback + * @param callback|null $callback The user defined PHP callback * - * @return mixed A PHP callable + * @return callback A PHP callable */ protected function buildCallback($callback) { @@ -860,6 +1025,9 @@ protected function updateStatus() } } + /** + * Updates the current error output of the process (STDERR). + */ protected function updateErrorOutput() { if (isset($this->pipes[self::STDERR]) && is_resource($this->pipes[self::STDERR])) { @@ -867,6 +1035,9 @@ protected function updateErrorOutput() } } + /** + * Updates the current output of the process (STDOUT). + */ protected function updateOutput() { if (defined('PHP_WINDOWS_VERSION_BUILD') && isset($this->fileHandles[self::STDOUT]) && is_resource($this->fileHandles[self::STDOUT])) { @@ -897,7 +1068,7 @@ protected function isSigchildEnabled() /** * Handles the windows file handles fallbacks * - * @param mixed $callback A valid PHP callback + * @param callable $callback A valid PHP callback * @param Boolean $closeEmptyHandles if true, handles that are empty will be assumed closed */ private function processFileHandles($callback, $closeEmptyHandles = false) diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/ProcessBuilder.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/ProcessBuilder.php index 2ffb3af5..1a95bd0d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/ProcessBuilder.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/ProcessBuilder.php @@ -11,6 +11,9 @@ namespace Symfony\Component\Process; +use Symfony\Component\Process\Exception\InvalidArgumentException; +use Symfony\Component\Process\Exception\LogicException; + /** * Process builder. * @@ -45,6 +48,8 @@ public static function create(array $arguments = array()) * Adds an unescaped argument to the command string. * * @param string $argument A command argument + * + * @return ProcessBuilder */ public function add($argument) { @@ -53,6 +58,18 @@ public function add($argument) return $this; } + /** + * @param array $arguments + * + * @return ProcessBuilder + */ + public function setArguments(array $arguments) + { + $this->arguments = $arguments; + + return $this; + } + public function setWorkingDirectory($cwd) { $this->cwd = $cwd; @@ -87,6 +104,10 @@ public function setInput($stdin) * To disable the timeout, set this value to null. * * @param integer|null + * + * @return ProcessBuilder + * + * @throws InvalidArgumentException */ public function setTimeout($timeout) { @@ -99,7 +120,7 @@ public function setTimeout($timeout) $timeout = (integer) $timeout; if ($timeout < 0) { - throw new \InvalidArgumentException('The timeout value must be a valid positive integer.'); + throw new InvalidArgumentException('The timeout value must be a valid positive integer.'); } $this->timeout = $timeout; @@ -117,7 +138,7 @@ public function setOption($name, $value) public function getProcess() { if (!count($this->arguments)) { - throw new \LogicException('You must add() command arguments before calling getProcess().'); + throw new LogicException('You must add() command arguments before calling getProcess().'); } $options = $this->options; diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/AbstractProcessTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/AbstractProcessTest.php index d83c1f34..64798e34 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/AbstractProcessTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/AbstractProcessTest.php @@ -11,15 +11,15 @@ namespace Symfony\Component\Process\Tests; +use Symfony\Component\Process\Process; + /** * @author Robert Schönthal */ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase { - protected abstract function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()); - /** - * @expectedException \InvalidArgumentException + * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException */ public function testNegativeTimeoutFromConstructor() { @@ -27,7 +27,7 @@ public function testNegativeTimeoutFromConstructor() } /** - * @expectedException \InvalidArgumentException + * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException */ public function testNegativeTimeoutFromSetter() { @@ -111,6 +111,44 @@ public function testCallbackIsExecutedForOutput() $this->assertTrue($called, 'The callback should be executed with the output'); } + public function testGetErrorOutput() + { + $p = new Process(sprintf('php -r %s', escapeshellarg('ini_set(\'display_errors\',\'on\'); $n = 0; while ($n < 3) { echo $a; $n++; }'))); + + $p->run(); + $this->assertEquals(3, preg_match_all('/PHP Notice/', $p->getErrorOutput(), $matches)); + } + + public function testGetIncrementalErrorOutput() + { + $p = new Process(sprintf('php -r %s', escapeshellarg('ini_set(\'display_errors\',\'on\'); usleep(50000); $n = 0; while ($n < 3) { echo $a; $n++; }'))); + + $p->start(); + while ($p->isRunning()) { + $this->assertLessThanOrEqual(1, preg_match_all('/PHP Notice/', $p->getIncrementalOutput(), $matches)); + usleep(20000); + } + } + + public function testGetOutput() + { + $p = new Process(sprintf('php -r %s', escapeshellarg('$n=0;while ($n<3) {echo \' foo \';$n++;}'))); + + $p->run(); + $this->assertEquals(3, preg_match_all('/foo/', $p->getOutput(), $matches)); + } + + public function testGetIncrementalOutput() + { + $p = new Process(sprintf('php -r %s', escapeshellarg('$n=0;while ($n<3) { echo \' foo \'; usleep(50000); $n++; }'))); + + $p->start(); + while ($p->isRunning()) { + $this->assertLessThanOrEqual(1, preg_match_all('/foo/', $p->getIncrementalOutput(), $matches)); + usleep(20000); + } + } + public function testExitCodeCommandFailed() { if (defined('PHP_WINDOWS_VERSION_BUILD')) { @@ -158,14 +196,23 @@ public function testGetExitCode() $this->assertEquals(0, $process->getExitCode()); } - public function testIsRunning() + public function testStatus() { $process = $this->getProcess('php -r "sleep(1);"'); $this->assertFalse($process->isRunning()); + $this->assertFalse($process->isStarted()); + $this->assertFalse($process->isTerminated()); + $this->assertSame(Process::STATUS_READY, $process->getStatus()); $process->start(); $this->assertTrue($process->isRunning()); + $this->assertTrue($process->isStarted()); + $this->assertFalse($process->isTerminated()); + $this->assertSame(Process::STATUS_STARTED, $process->getStatus()); $process->wait(); $this->assertFalse($process->isRunning()); + $this->assertTrue($process->isStarted()); + $this->assertTrue($process->isTerminated()); + $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus()); } public function testStop() @@ -233,11 +280,32 @@ public function testProcessWithTermSignal() $this->markTestSkipped('Windows does not support POSIX signals'); } + // SIGTERM is only defined if pcntl extension is present + $termSignal = defined('SIGTERM') ? SIGTERM : 15; $process = $this->getProcess('php -r "while (true) {}"'); $process->start(); $process->stop(); - $this->assertEquals(SIGTERM, $process->getTermSignal()); + + $this->assertEquals($termSignal, $process->getTermSignal()); + } + + public function testRestart() + { + $process1 = $this->getProcess('php -r "echo getmypid();"'); + $process1->run(); + $process2 = $process1->restart(); + + usleep(300000); // wait for output + + // Ensure that both processed finished and the output is numeric + $this->assertFalse($process1->isRunning()); + $this->assertFalse($process2->isRunning()); + $this->assertTrue(is_numeric($process1->getOutput())); + $this->assertTrue(is_numeric($process2->getOutput())); + + // Ensure that restart returned a new process by check that the output is different + $this->assertNotEquals($process1->getOutput(), $process2->getOutput()); } public function testPhpDeadlock() @@ -297,4 +365,16 @@ public function methodProvider() return $defaults; } + + /** + * @param string $commandline + * @param null $cwd + * @param array $env + * @param null $stdin + * @param integer $timeout + * @param array $options + * + * @return Process + */ + abstract protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()); } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php index c632e31f..99c4a1e7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php @@ -21,7 +21,7 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase /** * tests find() with the env var PHP_PATH */ - public function testFindWithPHP_PATH() + public function testFindWithPhpPath() { if (defined('PHP_BINARY')) { $this->markTestSkipped('The PHP binary is easily available as of PHP 5.4'); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/PhpProcessTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/PhpProcessTest.php new file mode 100644 index 00000000..7bcdd2f0 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/PhpProcessTest.php @@ -0,0 +1,21 @@ +start(); + $process->wait(); + $this->assertEquals($expected, $process->getOutput()); + } +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/ProcessBuilderTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/ProcessBuilderTest.php index 9ca45a80..38e14910 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/ProcessBuilderTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/ProcessBuilderTest.php @@ -85,7 +85,7 @@ public function shouldNotReplaceExplicitlySetVars() } /** - * @expectedException \InvalidArgumentException + * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException */ public function testNegativeTimeoutFromSetter() { @@ -105,4 +105,14 @@ public function testNullTimeout() $this->assertNull($p->getValue($pb)); } + + public function testShouldSetArguments() + { + $pb = new ProcessBuilder(array('initial')); + $pb->setArguments(array('second')); + + $proc = $pb->getProcess(); + + $this->assertContains("second", $proc->getCommandLine()); + } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php index 356c7deb..9bc2fdf3 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php @@ -11,8 +11,7 @@ namespace Symfony\Component\Process\Tests; -use Symfony\Component\Process\Process, - Symfony\Component\Process\Exception\ProcessFailedException; +use Symfony\Component\Process\Exception\ProcessFailedException; /** * @author Sebastian Marek diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php index 4a321adf..1e4dc1d0 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php @@ -13,17 +13,8 @@ class SigchildDisabledProcessTest extends AbstractProcessTest { - - protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) - { - $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options); - $process->setEnhanceSigchildCompatibility(false); - - return $process; - } - /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testGetExitCode() { @@ -31,7 +22,7 @@ public function testGetExitCode() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testExitCodeCommandFailed() { @@ -39,7 +30,7 @@ public function testExitCodeCommandFailed() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testProcessIsSignaledIfStopped() { @@ -47,7 +38,7 @@ public function testProcessIsSignaledIfStopped() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testProcessWithTermSignal() { @@ -55,7 +46,7 @@ public function testProcessWithTermSignal() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testProcessIsNotSignaled() { @@ -63,7 +54,7 @@ public function testProcessIsNotSignaled() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testProcessWithoutTermSignal() { @@ -71,7 +62,7 @@ public function testProcessWithoutTermSignal() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testExitCodeText() { @@ -82,7 +73,7 @@ public function testExitCodeText() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testIsSuccessful() { @@ -90,10 +81,21 @@ public function testIsSuccessful() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testIsNotSuccessful() { parent::testIsNotSuccessful(); } + + /** + * {@inheritdoc} + */ + protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) + { + $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options); + $process->setEnhanceSigchildCompatibility(false); + + return $process; + } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php index 4c04ff14..5c664e24 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php @@ -13,17 +13,8 @@ class SigchildEnabledProcessTest extends AbstractProcessTest { - - protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) - { - $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options); - $process->setEnhanceSigchildCompatibility(true); - - return $process; - } - /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testProcessIsSignaledIfStopped() { @@ -31,7 +22,7 @@ public function testProcessIsSignaledIfStopped() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testProcessWithTermSignal() { @@ -39,7 +30,7 @@ public function testProcessWithTermSignal() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testProcessIsNotSignaled() { @@ -47,7 +38,7 @@ public function testProcessIsNotSignaled() } /** - * @expectedException Symfony\Component\Process\Exception\RuntimeException + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testProcessWithoutTermSignal() { @@ -62,4 +53,14 @@ public function testExitCodeText() $this->assertInternalType('string', $process->getExitCodeText()); } + /** + * {@inheritdoc} + */ + protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) + { + $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options); + $process->setEnhanceSigchildCompatibility(true); + + return $process; + } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SimpleProcessTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SimpleProcessTest.php index 8742a69e..17dea3fe 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SimpleProcessTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/SimpleProcessTest.php @@ -15,20 +15,14 @@ class SimpleProcessTest extends AbstractProcessTest { + private $enabledSigchild = false; - protected function skipIfPHPSigchild() + public function setUp() { ob_start(); phpinfo(INFO_GENERAL); - if (false !== strpos(ob_get_clean(), '--enable-sigchild')) { - $this->markTestSkipped('Your PHP has been compiled with --enable-sigchild, this test can not be executed'); - } - } - - protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) - { - return new Process($commandline, $cwd, $env, $stdin, $timeout, $options); + $this->enabledSigchild = false !== strpos(ob_get_clean(), '--enable-sigchild'); } public function testGetExitCode() @@ -84,4 +78,19 @@ public function testIsNotSuccessful() $this->skipIfPHPSigchild(); parent::testIsNotSuccessful(); } + + /** + * {@inheritdoc} + */ + protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) + { + return new Process($commandline, $cwd, $env, $stdin, $timeout, $options); + } + + private function skipIfPHPSigchild() + { + if ($this->enabledSigchild) { + $this->markTestSkipped('Your PHP has been compiled with --enable-sigchild, this test can not be executed'); + } + } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/bootstrap.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/bootstrap.php deleted file mode 100644 index 11054b98..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Process')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Process')).'.php')) { - require_once $file; - } - } -}); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/autoloader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/autoloader.php new file mode 100644 index 00000000..e38020d5 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Process/autoloader.php @@ -0,0 +1,11 @@ + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/.gitattributes b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/.gitattributes deleted file mode 100644 index 80481513..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/Tests export-ignore -phpunit.xml.dist export-ignore diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/.gitignore b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/.gitignore new file mode 100644 index 00000000..44de97a3 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Dumper.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Dumper.php index 220cb397..8709f8b7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Dumper.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Dumper.php @@ -28,7 +28,7 @@ class Dumper /** * Sets the indentation. * - * @param integer $num The amount of spaces to use for intendation of nested nodes. + * @param integer $num The amount of spaces to use for indentation of nested nodes. */ public function setIndentation($num) { @@ -38,19 +38,21 @@ public function setIndentation($num) /** * Dumps a PHP value to YAML. * - * @param mixed $input The PHP value - * @param integer $inline The level where you switch to inline YAML - * @param integer $indent The level of indentation (used internally) + * @param mixed $input The PHP value + * @param integer $inline The level where you switch to inline YAML + * @param integer $indent The level of indentation (used internally) + * @param Boolean $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise + * @param Boolean $objectSupport true if object support is enabled, false otherwise * * @return string The YAML representation of the PHP value */ - public function dump($input, $inline = 0, $indent = 0) + public function dump($input, $inline = 0, $indent = 0, $exceptionOnInvalidType = false, $objectSupport = false) { $output = ''; $prefix = $indent ? str_repeat(' ', $indent) : ''; if ($inline <= 0 || !is_array($input) || empty($input)) { - $output .= $prefix.Inline::dump($input); + $output .= $prefix.Inline::dump($input, $exceptionOnInvalidType, $objectSupport); } else { $isAHash = array_keys($input) !== range(0, count($input) - 1); @@ -59,9 +61,9 @@ public function dump($input, $inline = 0, $indent = 0) $output .= sprintf('%s%s%s%s', $prefix, - $isAHash ? Inline::dump($key).':' : '-', + $isAHash ? Inline::dump($key, $exceptionOnInvalidType, $objectSupport).':' : '-', $willBeInlined ? ' ' : "\n", - $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation) + $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $exceptionOnInvalidType, $objectSupport) ).($willBeInlined ? "\n" : ''); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/DumpException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/DumpException.php index 53952ce1..9b3e6de0 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/DumpException.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/DumpException.php @@ -18,6 +18,6 @@ * * @api */ -class DumpException extends \RuntimeException implements ExceptionInterface +class DumpException extends RuntimeException { } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/ParseException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/ParseException.php index 975fe6d4..a27a005e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/ParseException.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/ParseException.php @@ -18,7 +18,7 @@ * * @api */ -class ParseException extends \RuntimeException implements ExceptionInterface +class ParseException extends RuntimeException { private $parsedFile; private $parsedLine; diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/RuntimeException.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/RuntimeException.php new file mode 100644 index 00000000..3573bf15 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Exception/RuntimeException.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Exception; + +/** + * Exception class thrown when an error occurs during parsing. + * + * @author Romain Neutron + * + * @api + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Inline.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Inline.php index df892857..21a121a0 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Inline.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Inline.php @@ -22,15 +22,25 @@ class Inline { const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')'; + private static $exceptionOnInvalidType = false; + private static $objectSupport = false; + /** * Converts a YAML string to a PHP array. * - * @param string $value A YAML string + * @param string $value A YAML string + * @param Boolean $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise + * @param Boolean $objectSupport true if object support is enabled, false otherwise * * @return array A PHP array representing the YAML string + * + * @throws ParseException */ - public static function parse($value) + public static function parse($value, $exceptionOnInvalidType = false, $objectSupport = false) { + self::$exceptionOnInvalidType = $exceptionOnInvalidType; + self::$objectSupport = $objectSupport; + $value = trim($value); if (0 == strlen($value)) { @@ -42,21 +52,23 @@ public static function parse($value) mb_internal_encoding('ASCII'); } + $i = 0; switch ($value[0]) { case '[': - $result = self::parseSequence($value); + $result = self::parseSequence($value, $i); + ++$i; break; case '{': - $result = self::parseMapping($value); + $result = self::parseMapping($value, $i); + ++$i; break; default: - $i = 0; $result = self::parseScalar($value, null, array('"', "'"), $i); + } - // some comment can end the scalar - if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i))); - } + // some comments are allowed at the end + if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { + throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i))); } if (isset($mbEncoding)) { @@ -69,21 +81,35 @@ public static function parse($value) /** * Dumps a given PHP variable to a YAML string. * - * @param mixed $value The PHP variable to convert + * @param mixed $value The PHP variable to convert + * @param Boolean $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise + * @param Boolean $objectSupport true if object support is enabled, false otherwise * * @return string The YAML string representing the PHP array * * @throws DumpException When trying to dump PHP resource */ - public static function dump($value) + public static function dump($value, $exceptionOnInvalidType = false, $objectSupport = false) { switch (true) { case is_resource($value): - throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value))); + if ($exceptionOnInvalidType) { + throw new DumpException(sprintf('Unable to dump PHP resources in a YAML file ("%s").', get_resource_type($value))); + } + + return 'null'; case is_object($value): - return '!!php/object:'.serialize($value); + if ($objectSupport) { + return '!!php/object:'.serialize($value); + } + + if ($exceptionOnInvalidType) { + throw new DumpException('Object support when dumping a YAML file has been disabled.'); + } + + return 'null'; case is_array($value): - return self::dumpArray($value); + return self::dumpArray($value, $exceptionOnInvalidType, $objectSupport); case null === $value: return 'null'; case true === $value: @@ -121,11 +147,13 @@ public static function dump($value) /** * Dumps a PHP array to a YAML string. * - * @param array $value The PHP array to dump + * @param array $value The PHP array to dump + * @param Boolean $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise + * @param Boolean $objectSupport true if object support is enabled, false otherwise * * @return string The YAML string representing the PHP array */ - private static function dumpArray($value) + private static function dumpArray($value, $exceptionOnInvalidType, $objectSupport) { // array $keys = array_keys($value); @@ -134,7 +162,7 @@ private static function dumpArray($value) ) { $output = array(); foreach ($value as $val) { - $output[] = self::dump($val); + $output[] = self::dump($val, $exceptionOnInvalidType, $objectSupport); } return sprintf('[%s]', implode(', ', $output)); @@ -143,7 +171,7 @@ private static function dumpArray($value) // mapping $output = array(); foreach ($value as $key => $val) { - $output[] = sprintf('%s: %s', self::dump($key), self::dump($val)); + $output[] = sprintf('%s: %s', self::dump($key, $exceptionOnInvalidType, $objectSupport), self::dump($val, $exceptionOnInvalidType, $objectSupport)); } return sprintf('{ %s }', implode(', ', $output)); @@ -373,12 +401,25 @@ private static function evaluateScalar($scalar) case 0 === strpos($scalar, '! '): return intval(self::parseScalar(substr($scalar, 2))); case 0 === strpos($scalar, '!!php/object:'): - return unserialize(substr($scalar, 13)); + if (self::$objectSupport) { + return unserialize(substr($scalar, 13)); + } + + if (self::$exceptionOnInvalidType) { + throw new ParseException('Object support when parsing a YAML file has been disabled.'); + } + + return null; case ctype_digit($scalar): $raw = $scalar; $cast = intval($scalar); return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw); + case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)): + $raw = $scalar; + $cast = intval($scalar); + + return '0' == $scalar[1] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw); case 'true' === strtolower($scalar): return true; case 'false' === strtolower($scalar): @@ -400,9 +441,11 @@ private static function evaluateScalar($scalar) } /** - * Gets a regex that matches an unix timestamp + * Gets a regex that matches a YAML date. * * @return string The regular expression + * + * @see http://www.yaml.org/spec/1.2/spec.html#id2761573 */ private static function getTimestampRegex() { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/LICENSE b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/LICENSE deleted file mode 100644 index cdffe7ae..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2012 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Parser.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Parser.php index d09227b2..8129b41e 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Parser.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Parser.php @@ -38,13 +38,15 @@ public function __construct($offset = 0) /** * Parses a YAML string to a PHP value. * - * @param string $value A YAML string + * @param string $value A YAML string + * @param Boolean $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise + * @param Boolean $objectSupport true if object support is enabled, false otherwise * * @return mixed A PHP value * * @throws ParseException If the YAML is not valid */ - public function parse($value) + public function parse($value, $exceptionOnInvalidType = false, $objectSupport = false) { $this->currentLineNb = -1; $this->currentLine = ''; @@ -88,7 +90,7 @@ public function parse($value) $c = $this->getRealCurrentLineNb() + 1; $parser = new Parser($c); $parser->refs =& $this->refs; - $data[] = $parser->parse($this->getNextEmbedBlock()); + $data[] = $parser->parse($this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport); } else { if (isset($values['leadspaces']) && ' ' == $values['leadspaces'] @@ -104,9 +106,9 @@ public function parse($value) $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + 2); } - $data[] = $parser->parse($block); + $data[] = $parser->parse($block, $exceptionOnInvalidType, $objectSupport); } else { - $data[] = $this->parseValue($values['value']); + $data[] = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport); } } } elseif (preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\[\{].*?) *\:(\s+(?P.+?))?\s*$#u', $this->currentLine, $values)) { @@ -115,6 +117,8 @@ public function parse($value) } $context = 'mapping'; + // force correct settings + Inline::parse(null, $exceptionOnInvalidType, $objectSupport); try { $key = Inline::parseScalar($values['key']); } catch (ParseException $e) { @@ -139,7 +143,7 @@ public function parse($value) $c = $this->getRealCurrentLineNb() + 1; $parser = new Parser($c); $parser->refs =& $this->refs; - $parsed = $parser->parse($value); + $parsed = $parser->parse($value, $exceptionOnInvalidType, $objectSupport); $merged = array(); if (!is_array($parsed)) { @@ -176,20 +180,21 @@ public function parse($value) $c = $this->getRealCurrentLineNb() + 1; $parser = new Parser($c); $parser->refs =& $this->refs; - $data[$key] = $parser->parse($this->getNextEmbedBlock()); + $data[$key] = $parser->parse($this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport); } } else { if ($isInPlace) { $data = $this->refs[$isInPlace]; } else { - $data[$key] = $this->parseValue($values['value']); + $data[$key] = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport); } } } else { - // 1-liner followed by newline - if (2 == count($this->lines) && empty($this->lines[1])) { + // 1-liner optionally followed by newline + $lineCount = count($this->lines); + if (1 === $lineCount || (2 === $lineCount && empty($this->lines[1]))) { try { - $value = Inline::parse($this->lines[0]); + $value = Inline::parse($this->lines[0], $exceptionOnInvalidType, $objectSupport); } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); $e->setSnippet($this->currentLine); @@ -366,7 +371,7 @@ private function moveToPreviousLine() * * @throws ParseException When reference does not exist */ - private function parseValue($value) + private function parseValue($value, $exceptionOnInvalidType, $objectSupport) { if (0 === strpos($value, '*')) { if (false !== $pos = strpos($value, '#')) { @@ -389,7 +394,7 @@ private function parseValue($value) } try { - return Inline::parse($value); + return Inline::parse($value, $exceptionOnInvalidType, $objectSupport); } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); $e->setSnippet($this->currentLine); @@ -544,10 +549,6 @@ private function cleanup($value) { $value = str_replace(array("\r\n", "\r"), "\n", $value); - if (!preg_match("#\n$#", $value)) { - $value .= "\n"; - } - // strip YAML header $count = 0; $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#su', '', $value, -1, $count); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/README.md b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/README.md deleted file mode 100644 index f1c51290..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/README.md +++ /dev/null @@ -1,17 +0,0 @@ -Yaml Component -============== - -YAML implements most of the YAML 1.2 specification. - - use Symfony\Component\Yaml\Yaml; - - $array = Yaml::parse($file); - - print Yaml::dump($array); - -Resources ---------- - -Unit tests: - -https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/Yaml diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/DumperTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/DumperTest.php index c662eadb..1199118d 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/DumperTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/DumperTest.php @@ -152,11 +152,26 @@ public function testInlineLevel() $this->assertEquals($expected, $this->dumper->dump($array, 10), '->dump() takes an inline level argument'); } - public function testObjectsSupport() + public function testObjectSupportEnabled() { - $a = array('foo' => new A(), 'bar' => 1); + $dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, true); - $this->assertEquals('{ foo: !!php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $this->dumper->dump($a), '->dump() is able to dump objects'); + $this->assertEquals('{ foo: !!php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects'); + } + + public function testObjectSupportDisabledButNoExceptions() + { + $dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1)); + + $this->assertEquals('{ foo: null, bar: 1 }', $dump, '->dump() does not dump objects when disabled'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\DumpException + */ + public function testObjectSupportDisabledWithExceptions() + { + $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, true, false); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/InlineTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/InlineTest.php index 2684fa55..04e9d4df 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/InlineTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/InlineTest.php @@ -19,7 +19,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase public function testParse() { foreach ($this->getTestsForParse() as $yaml => $value) { - $this->assertEquals($value, Inline::parse($yaml), sprintf('::parse() converts an inline YAML to a PHP structure (%s)', $yaml)); + $this->assertSame($value, Inline::parse($yaml), sprintf('::parse() converts an inline YAML to a PHP structure (%s)', $yaml)); } } @@ -92,6 +92,22 @@ public function testParseInvalidMappingKeyShouldThrowException() Inline::parse($value); } + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseInvalidMappingShouldThrowException() + { + Inline::parse('[foo] bar'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseInvalidSequenceShouldThrowException() + { + Inline::parse('{ foo: bar } bar'); + } + public function testParseScalarWithCorrectlyQuotedStringShouldReturnString() { $value = "'don''t do somthin'' like that'"; @@ -108,6 +124,7 @@ protected function getTestsForParse() 'false' => false, 'true' => true, '12' => 12, + '-12' => -12, '"quoted string"' => 'quoted string', "'quoted string'" => 'quoted string', '12.30e+02' => 12.30e+02, @@ -117,7 +134,7 @@ protected function getTestsForParse() '-.Inf' => log(0), "'686e444'" => '686e444', '686e444' => 646e444, - '123456789123456789' => '123456789123456789', + '123456789123456789123456789123456789' => '123456789123456789123456789123456789', '"foo\r\nbar"' => "foo\r\nbar", "'foo#bar'" => 'foo#bar', "'foo # bar'" => 'foo # bar', @@ -127,6 +144,8 @@ protected function getTestsForParse() '2007-10-30' => mktime(0, 0, 0, 10, 30, 2007), '2007-10-30T02:59:43Z' => gmmktime(2, 59, 43, 10, 30, 2007), '2007-10-30 02:59:43 Z' => gmmktime(2, 59, 43, 10, 30, 2007), + '1960-10-30 02:59:43 Z' => gmmktime(2, 59, 43, 10, 30, 1960), + '1730-10-30T02:59:43Z' => gmmktime(2, 59, 43, 10, 30, 1730), '"a \\"string\\" with \'quoted strings inside\'"' => 'a "string" with \'quoted strings inside\'', "'a \"string\" with ''quoted strings inside'''" => 'a "string" with \'quoted strings inside\'', diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/ParserTest.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/ParserTest.php index e27482a6..231a37b7 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/ParserTest.php @@ -13,7 +13,6 @@ use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Parser; -use Symfony\Component\Yaml\Exception\ParseException; class ParserTest extends \PHPUnit_Framework_TestCase { @@ -106,14 +105,226 @@ public function testEndOfTheDocumentMarker() $this->assertEquals('foo', $this->parser->parse($yaml)); } - public function testObjectsSupport() + public function getBlockChompingTests() { - $b = array('foo' => new B(), 'bar' => 1); - $this->assertEquals($this->parser->parse(<< "one\ntwo", + 'bar' => "one\ntwo", + ); + $tests['Literal block chomping strip with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |- + one + two +bar: |- + one + two +EOF; + $expected = array( + 'foo' => "one\ntwo", + 'bar' => "one\ntwo", + ); + $tests['Literal block chomping strip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: | + one + two + +bar: | + one + two + +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo\n", + ); + $tests['Literal block chomping clip with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: | + one + two +bar: | + one + two +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo\n", + ); + $tests['Literal block chomping clip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |+ + one + two + +bar: |+ + one + two + +EOF; + $expected = array( + 'foo' => "one\ntwo\n\n", + 'bar' => "one\ntwo\n\n", + ); + $tests['Literal block chomping keep with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |+ + one + two +bar: |+ + one + two +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo\n", + ); + $tests['Literal block chomping keep without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >- + one + two + +bar: >- + one + two + +EOF; + $expected = array( + 'foo' => "one two", + 'bar' => "one two", + ); + $tests['Folded block chomping strip with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >- + one + two +bar: >- + one + two +EOF; + $expected = array( + 'foo' => "one two", + 'bar' => "one two", + ); + $tests['Folded block chomping strip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: > + one + two + +bar: > + one + two + +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => "one two\n", + ); + $tests['Folded block chomping clip with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: > + one + two +bar: > + one + two +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => "one two\n", + ); + $tests['Folded block chomping clip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >+ + one + two + +bar: >+ + one + two + +EOF; + $expected = array( + 'foo' => "one two\n\n", + 'bar' => "one two\n\n", + ); + $tests['Folded block chomping keep with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >+ + one + two +bar: >+ + one + two +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => "one two\n", + ); + $tests['Folded block chomping keep without trailing newline'] = array($expected, $yaml); + + return $tests; + } + + /** + * @dataProvider getBlockChompingTests + */ + public function testBlockChomping($expected, $yaml) + { + $this->assertSame($expected, $this->parser->parse($yaml)); + } + + public function testObjectSupportEnabled() + { + $input = <<parse() is able to dump objects'); +EOF; + $this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, false, true), '->parse() is able to parse objects'); + } + + public function testObjectSupportDisabledButNoExceptions() + { + $input = <<assertEquals(array('foo' => null, 'bar' => 1), $this->parser->parse($input), '->parse() does not parse objects'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testObjectsSupportDisabledWithExceptions() + { + $this->parser->parse('foo: !!php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";}', true, false); } public function testNonUtf8Exception() @@ -143,7 +354,7 @@ public function testNonUtf8Exception() /** * - * @expectedException Symfony\Component\Yaml\Exception\ParseException + * @expectedException \Symfony\Component\Yaml\Exception\ParseException * */ public function testUnindentedCollectionException() @@ -161,7 +372,7 @@ public function testUnindentedCollectionException() } /** - * @expectedException Symfony\Component\Yaml\Exception\ParseException + * @expectedException \Symfony\Component\Yaml\Exception\ParseException */ public function testSequenceInAMapping() { @@ -174,7 +385,7 @@ public function testSequenceInAMapping() } /** - * @expectedException Symfony\Component\Yaml\Exception\ParseException + * @expectedException \Symfony\Component\Yaml\Exception\ParseException */ public function testMappingInASequence() { diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/bootstrap.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/bootstrap.php deleted file mode 100644 index 985f1f22..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Yaml')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Yaml')).'.php')) { - require_once $file; - } - } -}); diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Unescaper.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Unescaper.php index ac3a576b..708f2a18 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Unescaper.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Unescaper.php @@ -130,7 +130,7 @@ public function unescapeCharacter($value) * * @return string The string with the new encoding * - * @throws \RuntimeException if no suitable encoding function is found (iconv or mbstring) + * @throws RuntimeException if no suitable encoding function is found (iconv or mbstring) */ private function convertEncoding($value, $to, $from) { @@ -140,6 +140,6 @@ private function convertEncoding($value, $to, $from) return iconv($from, $to, $value); } - throw new \RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).'); + throw new RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).'); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Yaml.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Yaml.php index 85cdf3db..adc99c47 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Yaml.php +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/Yaml.php @@ -22,13 +22,53 @@ */ class Yaml { + /** + * Be warned that PHP support will be removed in Symfony 2.3. + * + * @deprecated Deprecated since version 2.0, to be removed in 2.3. + */ public static $enablePhpParsing = false; + /** + * Enables PHP support when parsing YAML files. + * + * Be warned that PHP support will be removed in Symfony 2.3. + * + * @deprecated Deprecated since version 2.0, to be removed in 2.3. + */ public static function enablePhpParsing() { self::$enablePhpParsing = true; } + /** + * Sets the PHP support flag when parsing YAML files. + * + * Be warned that PHP support will be removed in Symfony 2.3. + * + * @param Boolean $boolean true if PHP parsing support is enabled, false otherwise + * + * @deprecated Deprecated since version 2.0, to be removed in 2.3. + */ + public static function setPhpParsing($boolean) + { + self::$enablePhpParsing = (Boolean) $boolean; + } + + /** + * Checks if PHP support is enabled when parsing YAML files. + * + * Be warned that PHP support will be removed in Symfony 2.3. + * + * @return Boolean true if PHP parsing support is enabled, false otherwise + * + * @deprecated Deprecated since version 2.0, to be removed in 2.3. + */ + public static function supportsPhpParsing() + { + return self::$enablePhpParsing; + } + /** * Parses YAML into a PHP array. * @@ -41,6 +81,10 @@ public static function enablePhpParsing() * print_r($array); * * + * As this method accepts both plain strings and file names as an input, + * you must validate the input before calling this method. Passing a file + * as an input is a deprecated feature and will be removed in 3.0. + * * @param string $input Path to a YAML file or a string containing YAML * * @return array The YAML converted to a PHP array @@ -49,7 +93,7 @@ public static function enablePhpParsing() * * @api */ - public static function parse($input) + public static function parse($input, $exceptionOnInvalidType = false, $objectSupport = false) { // if input is a file, process it $file = ''; @@ -79,7 +123,7 @@ public static function parse($input) $yaml = new Parser(); try { - return $yaml->parse($input); + return $yaml->parse($input, $exceptionOnInvalidType, $objectSupport); } catch (ParseException $e) { if ($file) { $e->setParsedFile($file); @@ -95,19 +139,21 @@ public static function parse($input) * The dump method, when supplied with an array, will do its best * to convert the array into friendly YAML. * - * @param array $array PHP array - * @param integer $inline The level where you switch to inline YAML - * @param integer $indent The amount of spaces to use for indentation of nested nodes. + * @param array $array PHP array + * @param integer $inline The level where you switch to inline YAML + * @param integer $indent The amount of spaces to use for indentation of nested nodes. + * @param Boolean $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise + * @param Boolean $objectSupport true if object support is enabled, false otherwise * * @return string A YAML string representing the original PHP array * * @api */ - public static function dump($array, $inline = 2, $indent = 4) + public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false) { $yaml = new Dumper(); $yaml->setIndentation($indent); - return $yaml->dump($array, $inline); + return $yaml->dump($array, $inline, 0, $exceptionOnInvalidType, $objectSupport); } } diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/autoloader.php b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/autoloader.php new file mode 100644 index 00000000..e38020d5 --- /dev/null +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/autoloader.php @@ -0,0 +1,11 @@ +=5.3.2" - }, - "autoload": { - "psr-0": { "Symfony\\Component\\Yaml": "" } - }, - "target-dir": "Symfony/Component/Yaml" -} diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/phpunit.xml.dist b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/phpunit.xml.dist index d025f9e4..aa77e9de 100644 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/phpunit.xml.dist +++ b/com.piece_framework.makegood.stagehandtestrunner/resources/php/php/Symfony/Component/Yaml/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/com.piece_framework.makegood.stagehandtestrunner/resources/php/tmp/.gitignore b/com.piece_framework.makegood.stagehandtestrunner/resources/php/tmp/.gitignore deleted file mode 100644 index 120f485d..00000000 --- a/com.piece_framework.makegood.stagehandtestrunner/resources/php/tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!/.gitignore