reverted: --- b/composer.json +++ a/composer.json @@ -17,13 +17,13 @@ "symfony/validator": "2.6.*", "symfony/yaml": "2.6.*", "twig/twig": "1.16.*", + "doctrine/common": "dev-master#a45d110f71c323e29f41eb0696fa230e3fa1b1b5", - "doctrine/common": "2.4.*", "doctrine/annotations": "1.2.*", "guzzlehttp/guzzle": "~5.0", "symfony-cmf/routing": "1.3.*", "easyrdf/easyrdf": "0.8.*", "phpunit/phpunit": "4.1.*", + "phpunit/phpunit-mock-objects": "dev-master#e60bb929c50ae4237aaf680a4f6773f4ee17f0a2", - "phpunit/phpunit-mock-objects": "2.1.*", "zendframework/zend-feed": "2.2.*", "mikey179/vfsStream": "1.*", "stack/builder": "1.0.*", reverted: --- b/composer.lock +++ a/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], + "hash": "f42dce2268b1a6fcf8ffc8720c45f28f", - "hash": "acf426245efcfd12a41d52c126ea9eef", "packages": [ { "name": "doctrine/annotations", @@ -213,16 +213,16 @@ }, { "name": "doctrine/common", + "version": "dev-master", - "version": "v2.4.2", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", + "reference": "a45d110f71c323e29f41eb0696fa230e3fa1b1b5" - "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b" }, "dist": { "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/a45d110f71c323e29f41eb0696fa230e3fa1b1b5", + "reference": "a45d110f71c323e29f41eb0696fa230e3fa1b1b5", - "url": "https://api.github.com/repos/doctrine/common/zipball/5db6ab40e4c531f14dad4ca96a394dfce5d4255b", - "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b", "shasum": "" }, "require": { @@ -239,7 +239,7 @@ "type": "library", "extra": { "branch-alias": { + "dev-master": "2.5.x-dev" - "dev-master": "2.4.x-dev" } }, "autoload": { @@ -274,7 +274,7 @@ { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com", + "homepage": "http://jmsyst.com", - "homepage": "https://github.com/schmittjoh", "role": "Developer of wrapped JMSSerializerBundle" } ], @@ -287,7 +287,7 @@ "persistence", "spl" ], + "time": "2014-01-12 22:00:08" - "time": "2014-05-21 19:28:51" }, { "name": "doctrine/inflector", @@ -1085,24 +1085,25 @@ }, { "name": "phpunit/phpunit-mock-objects", + "version": "dev-master", - "version": "2.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "e60bb929c50ae4237aaf680a4f6773f4ee17f0a2" - "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a" }, "dist": { "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/96c5b81f9842f38fe6c73ad0020306cc4862a9e3", + "reference": "e60bb929c50ae4237aaf680a4f6773f4ee17f0a2", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/7878b9c41edb3afab92b85edf5f0981014a2713a", - "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a", "shasum": "" }, "require": { + "doctrine/instantiator": "~1.0,>=1.0.2", "php": ">=5.3.3", "phpunit/php-text-template": "~1.2" }, "require-dev": { + "phpunit/phpunit": "4.4.*@dev" - "phpunit/phpunit": "~4.1" }, "suggest": { "ext-soap": "*" @@ -1110,7 +1111,7 @@ "type": "library", "extra": { "branch-alias": { + "dev-master": "2.4.x-dev" - "dev-master": "2.1.x-dev" } }, "autoload": { @@ -1119,9 +1120,6 @@ ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -1138,7 +1136,7 @@ "mock", "xunit" ], + "time": "2014-10-04 10:04:20" - "time": "2014-06-12 07:22:15" }, { "name": "psr/log", @@ -2525,7 +2523,10 @@ "packages-dev": [], "aliases": [], "minimum-stability": "stable", + "stability-flags": { + "doctrine/common": 20, + "phpunit/phpunit-mock-objects": 20 + }, - "stability-flags": [], "prefer-stable": false, "platform": { "php": ">=5.4.5" reverted: --- b/core/vendor/composer/autoload_classmap.php +++ a/core/vendor/composer/autoload_classmap.php @@ -87,7 +87,6 @@ 'PHPUnit_Framework_MockObject_Matcher' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', - 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', 'PHPUnit_Framework_MockObject_Matcher_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', reverted: --- b/core/vendor/composer/include_paths.php +++ a/core/vendor/composer/include_paths.php @@ -12,5 +12,4 @@ $vendorDir . '/phpunit/php-code-coverage', $vendorDir . '/phpunit/phpunit', $vendorDir . '/symfony/yaml', - $vendorDir . '/phpunit/phpunit-mock-objects', ); reverted: --- b/core/vendor/composer/installed.json +++ a/core/vendor/composer/installed.json @@ -330,6 +330,86 @@ ] }, { + "name": "doctrine/common", + "version": "dev-master", + "version_normalized": "9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "a45d110f71c323e29f41eb0696fa230e3fa1b1b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/a45d110f71c323e29f41eb0696fa230e3fa1b1b5", + "reference": "a45d110f71c323e29f41eb0696fa230e3fa1b1b5", + "shasum": "" + }, + "require": { + "doctrine/annotations": "1.*", + "doctrine/cache": "1.*", + "doctrine/collections": "1.*", + "doctrine/inflector": "1.*", + "doctrine/lexer": "1.*", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~3.7" + }, + "time": "2014-01-12 22:00:08", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Doctrine\\Common\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com", + "homepage": "http://www.jwage.com/", + "role": "Creator" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com", + "homepage": "http://www.instaclick.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "http://jmsyst.com", + "role": "Developer of wrapped JMSSerializerBundle" + } + ], + "description": "Common Library for Doctrine projects", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "collections", + "eventmanager", + "persistence", + "spl" + ] + }, + { "name": "easyrdf/easyrdf", "version": "0.8.0", "version_normalized": "0.8.0.0", @@ -905,6 +985,63 @@ ] }, { + "name": "phpunit/phpunit-mock-objects", + "version": "dev-master", + "version_normalized": "9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "e60bb929c50ae4237aaf680a4f6773f4ee17f0a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/96c5b81f9842f38fe6c73ad0020306cc4862a9e3", + "reference": "e60bb929c50ae4237aaf680a4f6773f4ee17f0a2", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "~1.0,>=1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "4.4.*@dev" + }, + "suggest": { + "ext-soap": "*" + }, + "time": "2014-10-04 10:04:20", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ] + }, + { "name": "phpunit/php-timer", "version": "1.0.5", "version_normalized": "1.0.5.0", @@ -2466,144 +2603,5 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com" - }, - { - "name": "doctrine/common", - "version": "v2.4.2", - "version_normalized": "2.4.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/5db6ab40e4c531f14dad4ca96a394dfce5d4255b", - "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/inflector": "1.*", - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "time": "2014-05-21 19:28:51", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": "Creator" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Common Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "collections", - "eventmanager", - "persistence", - "spl" - ] - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.1.5", - "version_normalized": "2.1.5.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/7878b9c41edb3afab92b85edf5f0981014a2713a", - "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.1" - }, - "suggest": { - "ext-soap": "*" - }, - "time": "2014-06-12 07:22:15", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ] } ] reverted: --- b/core/vendor/doctrine/common/README.md +++ a/core/vendor/doctrine/common/README.md @@ -7,6 +7,6 @@ ## More resources: * [Website](http://www.doctrine-project.org) +* [Documentation](http://www.doctrine-project.org/projects/common/current/docs/en) -* [Documentation](http://docs.doctrine-project.org/projects/doctrine-common/en/latest/) * [Issue Tracker](http://www.doctrine-project.org/jira/browse/DCOM) * [Downloads](http://github.com/doctrine/common/downloads) reverted: --- b/core/vendor/doctrine/common/composer.json +++ a/core/vendor/doctrine/common/composer.json @@ -29,7 +29,7 @@ }, "extra": { "branch-alias": { + "dev-master": "2.5.x-dev" - "dev-master": "2.4.x-dev" } }, "archive": { reverted: --- b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php +++ a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php @@ -49,13 +49,6 @@ protected $paths = array(); /** - * The paths excluded from path where to look for mapping files. - * - * @var array - */ - protected $excludePaths = array(); - - /** * The file extension of mapping documents. * * @var string @@ -114,27 +107,7 @@ } /** + * Retrieves the current annotation reader. - * Append exclude lookup paths to metadata driver. - * - * @param array $paths - */ - public function addExcludePaths(array $paths) - { - $this->excludePaths = array_unique(array_merge($this->excludePaths, $paths)); - } - - /** - * Retrieve the defined metadata lookup exclude paths. - * - * @return array - */ - public function getExcludePaths() - { - return $this->excludePaths; - } - - /** - * Retrieve the current annotation reader * * @return AnnotationReader */ @@ -219,20 +192,7 @@ ); foreach ($iterator as $file) { + $sourceFile = realpath($file[0]); - $sourceFile = $file[0]; - - if ( ! preg_match('(^phar:)i', $sourceFile)) { - $sourceFile = realpath($sourceFile); - } - - foreach ($this->excludePaths as $excludePath) { - $exclude = str_replace('\\', '/', realpath($excludePath)); - $current = str_replace('\\', '/', $sourceFile); - - if (strpos($current, $exclude) !== false) { - continue 2; - } - } require_once $sourceFile; reverted: --- b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php +++ a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php @@ -21,9 +21,6 @@ use ReflectionClass; use ReflectionProperty; -use ReflectionMethod; -use ReflectionException; - use Doctrine\Common\Reflection\RuntimePublicReflectionProperty; use Doctrine\Common\Persistence\Mapping\MappingException; @@ -95,12 +92,6 @@ */ public function hasPublicMethod($class, $method) { + return method_exists($class, $method) && is_callable(array($class, $method)); - try { - $reflectionMethod = new ReflectionMethod($class, $method); - } catch (ReflectionException $e) { - return false; - } - - return $reflectionMethod->isPublic(); } } reverted: --- b/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php +++ a/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php @@ -78,6 +78,6 @@ */ public function hasPublicMethod($class, $method) { + return method_exists($class, $method) && is_callable(array($class, $method)); - return true; } } reverted: --- b/core/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php +++ a/core/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php @@ -48,10 +48,17 @@ * @param mixed $var The variable to dump. * @param integer $maxDepth The maximum nesting level for object properties. * @param boolean $stripTags Whether output should strip HTML tags. + * @param boolean $echo Send the dumped value to the output buffer + * + * @return string */ + public static function dump($var, $maxDepth = 2, $stripTags = true, $echo = true) - public static function dump($var, $maxDepth = 2, $stripTags = true) { + $html = ini_get('html_errors'); + + if ($html !== true) { + ini_set('html_errors', true); + } - ini_set('html_errors', 'On'); if (extension_loaded('xdebug')) { ini_set('xdebug.var_display_max_depth', $maxDepth); @@ -61,12 +68,20 @@ ob_start(); var_dump($var); + $dump = ob_get_contents(); + ob_end_clean(); + $dumpText = ($stripTags ? strip_tags(html_entity_decode($dump)) : $dump); - echo ($stripTags ? strip_tags(html_entity_decode($dump)) : $dump); + ini_set('html_errors', $html); + + if ($echo) { + echo $dumpText; + } + + return $dumpText; - ini_set('html_errors', 'Off'); } /** reverted: --- b/core/vendor/doctrine/common/lib/Doctrine/Common/Version.php +++ a/core/vendor/doctrine/common/lib/Doctrine/Common/Version.php @@ -34,7 +34,7 @@ /** * Current Doctrine Version. */ + const VERSION = '2.5.0-DEV'; - const VERSION = '2.4.2'; /** * Compares a Doctrine version with the current one. reverted: --- b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/AnnotationDriverTest.php +++ /dev/null @@ -1,29 +0,0 @@ -getAllClassNames(); - - $this->assertEquals(array('Doctrine\TestClass'), $classes); - } -} - -class SimpleAnnotationDriver extends AnnotationDriver -{ - protected $entityAnnotationClasses = array('Doctrine\Entity' => true); - - public function loadMetadataForClass($className, ClassMetadata $metadata) - { - } -} reverted: --- b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticReflectionServiceTest.php +++ a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticReflectionServiceTest.php @@ -58,7 +58,7 @@ public function testGetMethods() { $this->assertTrue($this->reflectionService->hasPublicMethod(__CLASS__, "testGetMethods")); + $this->assertFalse($this->reflectionService->hasPublicMethod(__CLASS__, "testGetMethods2")); - $this->assertTrue($this->reflectionService->hasPublicMethod(__CLASS__, "testGetMethods2")); } public function testGetAccessibleProperty() reverted: --- b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/_files/annotation/TestClass.php +++ /dev/null @@ -1,17 +0,0 @@ -assertContains('foobar', $var->__STORAGE__); } + + public function testReturnsOutput() + { + ob_start(); + + $dump = Debug::dump('foo'); + $outputValue = ob_get_contents(); + + ob_end_clean(); + + $this->assertSame($outputValue, $dump); + } + + public function testDisablesOutput() + { + ob_start(); + + $dump = Debug::dump('foo', 2, true, false); + $outputValue = ob_get_contents(); + + ob_end_clean(); + + $this->assertEmpty($outputValue); + $this->assertNotSame($outputValue, $dump); + } } reverted: --- /dev/null +++ a/core/vendor/doctrine/common/tests/NativePhpunitTask.php @@ -0,0 +1,246 @@ + + */ +class NativePhpunitTask extends Task +{ + private $test; + private $testfile; + private $testdirectory; + private $configuration = null; + private $coverageClover = null; + private $junitlogfile = null; + private $haltonfailure = true; + private $haltonerror = true; + + public function setTestdirectory($directory) { + $this->testdirectory = $directory; + } + + public function setTest($test) { + $this->test = $test; + } + + public function setTestfile($testfile) { + $this->testfile = $testfile; + } + + public function setJunitlogfile($junitlogfile) { + if (strlen($junitlogfile) == 0) { + $junitlogfile = NULL; + } + + $this->junitlogfile = $junitlogfile; + } + + public function setConfiguration($configuration) { + if (strlen($configuration) == 0) { + $configuration = NULL; + } + + $this->configuration = $configuration; + } + + public function setCoverageClover($coverageClover) { + if (strlen($coverageClover) == 0) { + $coverageClover = NULL; + } + + $this->coverageClover = $coverageClover; + } + + public function setHaltonfailure($haltonfailures) { + $this->haltonfailure = $haltonfailures; + } + + public function setHaltonerror($haltonerrors) { + $this->haltonerror = $haltonerrors; + } + + public function init() + { + require_once "PHPUnit/Runner/Version.php"; + $version = PHPUnit_Runner_Version::id(); + + if (version_compare($version, '3.4.0') < 0) { + throw new BuildException("NativePHPUnitTask requires PHPUnit version >= 3.2.0", $this->getLocation()); + } + + require_once 'PHPUnit/Util/Filter.php'; + + // point PHPUnit_MAIN_METHOD define to non-existing method + if (!defined('PHPUnit_MAIN_METHOD')) { + define('PHPUnit_MAIN_METHOD', 'PHPUnitTask::undefined'); + } + } + + public function main() + { + if (!is_dir(realpath($this->testdirectory))) { + throw new BuildException("NativePHPUnitTask requires a Test Directory path given, '".$this->testdirectory."' given."); + } + set_include_path(realpath($this->testdirectory) . PATH_SEPARATOR . get_include_path()); + + $printer = new NativePhpunitPrinter(); + + $arguments = array( + 'configuration' => $this->configuration, + 'coverageClover' => $this->coverageClover, + 'junitLogfile' => $this->junitlogfile, + 'printer' => $printer, + ); + + $runner = new PHPUnit_TextUI_TestRunner(); + $suite = $runner->getTest($this->test, $this->testfile, true); + + try { + $result = $runner->doRun($suite, $arguments); + /* @var $result PHPUnit_Framework_TestResult */ + + if ( ($this->haltonfailure && $result->failureCount() > 0) || ($this->haltonerror && $result->errorCount() > 0) ) { + throw new BuildException("PHPUnit: ".$result->failureCount()." Failures and ".$result->errorCount()." Errors, ". + "last failure message: ".$printer->getMessages()); + } + + $this->log("PHPUnit Success: ".count($result->passed())." tests passed, no ". + "failures (".$result->skippedCount()." skipped, ".$result->notImplementedCount()." not implemented)"); + + // Hudson for example doesn't like the backslash in class names + if (is_file($this->coverageClover)) { + $this->log("Generated Clover Coverage XML to: ".$this->coverageClover); + $content = file_get_contents($this->coverageClover); + $content = str_replace("\\", ".", $content); + file_put_contents($this->coverageClover, $content); + unset($content); + } + + } catch(\Exception $e) { + throw new BuildException("NativePhpunitTask failed: ".$e->getMessage()); + } + } +} + +class NativePhpunitPrinter extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener +{ + private $_messages = array(); + + public function write($buffer) + { + // do nothing + } + + public function getMessages() + { + return $this->_messages; + } + + /** + * An error occurred. + * + * @param PHPUnit_Framework_Test $test + * @param Exception $e + * @param float $time + */ + public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) + { + $this->_messages[] = "Test ERROR: ".$test->getName().": ".$e->getMessage(); + } + + /** + * A failure occurred. + * + * @param PHPUnit_Framework_Test $test + * @param PHPUnit_Framework_AssertionFailedError $e + * @param float $time + */ + public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) + { + $this->_messages[] = "Test FAILED: ".$test->getName().": ".$e->getMessage(); + } + + /** + * Incomplete test. + * + * @param PHPUnit_Framework_Test $test + * @param Exception $e + * @param float $time + */ + public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) + { + + } + + /** + * Skipped test. + * + * @param PHPUnit_Framework_Test $test + * @param Exception $e + * @param float $time + * @since Method available since Release 3.0.0 + */ + public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) + { + + } + + /** + * A test suite started. + * + * @param PHPUnit_Framework_TestSuite $suite + * @since Method available since Release 2.2.0 + */ + public function startTestSuite(PHPUnit_Framework_TestSuite $suite) + { + + } + + /** + * A test suite ended. + * + * @param PHPUnit_Framework_TestSuite $suite + * @since Method available since Release 2.2.0 + */ + public function endTestSuite(PHPUnit_Framework_TestSuite $suite) + { + + } + + /** + * A test started. + * + * @param PHPUnit_Framework_Test $test + */ + public function startTest(PHPUnit_Framework_Test $test) + { + + } + + /** + * A test ended. + * + * @param PHPUnit_Framework_Test $test + * @param float $time + */ + public function endTest(PHPUnit_Framework_Test $test, $time) + { + + } +} reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/README.md +++ a/core/vendor/phpunit/phpunit-mock-objects/README.md @@ -1,5 +1,5 @@ [![Latest Stable Version](https://poser.pugx.org/phpunit/phpunit-mock-objects/v/stable.png)](https://packagist.org/packages/phpunit/phpunit-mock-objects) +[![Build Status](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects.png?branch=2.0)](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects) -[![Build Status](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects.png?branch=master)](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects) # PHPUnit_MockObject @@ -15,7 +15,7 @@ { "require": { + "phpunit/phpunit-mock-objects": "2.0.*" - "phpunit/phpunit-mock-objects": "2.1.*" } } reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml +++ a/core/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml @@ -1,6 +1,6 @@ reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/composer.json +++ a/core/vendor/phpunit/phpunit-mock-objects/composer.json @@ -24,7 +24,7 @@ "phpunit/php-text-template": "~1.2" }, "require-dev": { + "phpunit/phpunit": ">=4.0.0,<4.1.0" - "phpunit/phpunit": "~4.1" }, "suggest": { "ext-soap": "*" @@ -36,7 +36,7 @@ }, "extra": { "branch-alias": { + "dev-master": "2.0.x-dev" - "dev-master": "2.1.x-dev" } }, "include-path": [ reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist +++ a/core/vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist @@ -1,6 +1,6 @@ reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php +++ a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php @@ -212,12 +212,13 @@ } /** + * @param mixed $argument, ... + * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - * Validate that a parameters matcher can be defined, throw exceptions otherwise. - * - * @throws PHPUnit_Framework_Exception */ + public function with() - private function canDefineParameters() { + $args = func_get_args(); + if ($this->matcher->methodNameMatcher === NULL) { throw new PHPUnit_Framework_Exception( 'Method name matcher is not defined, cannot define parameter ' . @@ -230,17 +231,6 @@ 'Parameter matcher is already defined, cannot redefine' ); } - } - - /** - * @param mixed $argument, ... - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public function with() - { - $args = func_get_args(); - - $this->canDefineParameters(); $this->matcher->parametersMatcher = new PHPUnit_Framework_MockObject_Matcher_Parameters($args); @@ -248,27 +238,22 @@ } /** - * @param mixed ...$argument - * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker - */ - public function withConsecutive() { - - $args = func_get_args(); - - $this->canDefineParameters(); - - $this->matcher->parametersMatcher = - new PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters($args); - - return $this; - } - - /** * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker */ public function withAnyParameters() { + if ($this->matcher->methodNameMatcher === NULL) { + throw new PHPUnit_Framework_Exception( + 'Method name matcher is not defined, cannot define parameter ' . + 'matcher without one' + ); + } + + if ($this->matcher->parametersMatcher !== NULL) { + throw new PHPUnit_Framework_Exception( + 'Parameter matcher is already defined, cannot redefine' + ); + } - $this->canDefineParameters(); $this->matcher->parametersMatcher = new PHPUnit_Framework_MockObject_Matcher_AnyParameters; reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php +++ /dev/null @@ -1,162 +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. - * - * * Neither the name of Sebastian Bergmann nor the names of his - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - */ - -/** - * Invocation matcher which looks for sets of specific parameters in the invocations. - * - * Checks the parameters of the incoming invocations, the parameter list is - * checked against the defined constraints in $parameters. If the constraint - * is met it will return true in matches(). - * - * It takes a list of match groups and and increases a call index after each invocation. - * So the first invocation uses the first group of constraints, the second the next and so on. - * - * @package PHPUnit_MockObject - * @author Sebastian Bergmann - * @copyright 2010-2014 Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @version Release: @package_version@ - * @link http://github.com/sebastianbergmann/phpunit-mock-objects - */ -class PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters - extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation -{ - - /** - * @var array - */ - private $_parameterGroups = array(); - - /** - * @var array - */ - private $_invocations = array(); - - /** - * @param array $parameterGroups - */ - public function __construct(array $parameterGroups) - { - foreach ($parameterGroups as $index => $parameters) { - foreach ($parameters as $parameter) { - if (!($parameter instanceof \PHPUnit_Framework_Constraint)) - { - $parameter = new \PHPUnit_Framework_Constraint_IsEqual($parameter); - } - $this->_parameterGroups[$index][] = $parameter; - } - } - } - - /** - * @return string - */ - public function toString() - { - $text = 'with consecutive parameters'; - - return $text; - } - - /** - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @return bool - */ - public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) - { - $this->_invocations[] = $invocation; - $callIndex = count($this->_invocations) - 1; - $this->verifyInvocation($invocation, $callIndex); - return FALSE; - } - - public function verify() - { - foreach ($this->_invocations as $callIndex => $invocation) { - $this->verifyInvocation($invocation, $callIndex); - } - } - - /** - * Verify a single invocation - * - * @param PHPUnit_Framework_MockObject_Invocation $invocation - * @param int $callIndex - * @throws PHPUnit_Framework_ExpectationFailedException - */ - private function verifyInvocation(PHPUnit_Framework_MockObject_Invocation $invocation, $callIndex) - { - - if (isset($this->_parameterGroups[$callIndex])) { - $parameters = $this->_parameterGroups[$callIndex]; - } - - if ($invocation === NULL) { - throw new PHPUnit_Framework_ExpectationFailedException( - 'Mocked method does not exist.' - ); - } - - if (count($invocation->parameters) < count($parameters)) { - throw new PHPUnit_Framework_ExpectationFailedException( - sprintf( - 'Parameter count for invocation %s is too low.', - $invocation->toString() - ) - ); - } - - foreach ($parameters as $i => $parameter) { - $parameter->evaluate( - $invocation->parameters[$i], - sprintf( - 'Parameter %s for invocation #%d %s does not match expected ' . - 'value.', - $i, - $callIndex, - $invocation->toString() - ) - ); - } - } -} reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php +++ a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php @@ -110,7 +110,9 @@ public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) { $this->invocation = $invocation; + $this->verify(); + + return count($invocation->parameters) < count($this->parameters); - return $this->verify(); } /** @@ -154,7 +156,5 @@ ) ); } - - return true; } } reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php +++ /dev/null @@ -1,32 +0,0 @@ -getMock('stdClass', array('foo')); - $mock - ->expects($this->any()) - ->method('foo') - ->withConsecutive( - array('bar'), - array(21, 42) - ); - $mock->foo('bar'); - $mock->foo(21, 42); - } - - public function testIntegrationExpectingException() - { - $mock = $this->getMock('stdClass', array('foo')); - $mock - ->expects($this->any()) - ->method('foo') - ->withConsecutive( - array('bar'), - array(21, 42) - ); - $mock->foo('bar'); - $this->setExpectedException('PHPUnit_Framework_ExpectationFailedException'); - $mock->foo('invalid'); - } -} \ No newline at end of file reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt +++ a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt @@ -11,7 +11,7 @@ $generator = new PHPUnit_Framework_MockObject_Generator; print $generator->generateClassFromWsdl( + dirname(dirname(__FILE__)) . '/_files/GoogleSearch.wsdl', - dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl', 'GoogleSearch' ); ?> reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt +++ a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt @@ -11,7 +11,7 @@ $generator = new PHPUnit_Framework_MockObject_Generator; print $generator->generateClassFromWsdl( + dirname(dirname(__FILE__)) . '/_files/GoogleSearch.wsdl', - dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl', 'My\\Space\\GoogleSearch' ); ?> reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt +++ a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt @@ -11,7 +11,7 @@ $generator = new PHPUnit_Framework_MockObject_Generator; print $generator->generateClassFromWsdl( + dirname(dirname(__FILE__)) . '/_files/GoogleSearch.wsdl', - dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl', 'GoogleSearch', array('doGoogleSearch') ); reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php +++ a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php @@ -730,7 +730,7 @@ */ public function testCreateMockFromWsdl() { + $mock = $this->getMockFromWsdl(__DIR__ . '/_files/GoogleSearch.wsdl', 'WsdlMock'); - $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl', 'WsdlMock'); $this->assertStringStartsWith( 'Mock_WsdlMock_', get_class($mock) @@ -742,7 +742,7 @@ */ public function testCreateNamespacedMockFromWsdl() { + $mock = $this->getMockFromWsdl(__DIR__ . '/_files/GoogleSearch.wsdl', 'My\\Space\\WsdlMock'); - $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl', 'My\\Space\\WsdlMock'); $this->assertStringStartsWith( 'Mock_WsdlMock_', get_class($mock) @@ -754,8 +754,8 @@ */ public function testCreateTwoMocksOfOneWsdlFile() { + $mock = $this->getMockFromWsdl(__DIR__ . '/_files/GoogleSearch.wsdl'); + $mock = $this->getMockFromWsdl(__DIR__ . '/_files/GoogleSearch.wsdl'); - $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl'); - $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl'); } /** reverted: --- /dev/null +++ a/core/vendor/phpunit/phpunit-mock-objects/tests/_files/AbstractMockTestClass.php @@ -0,0 +1,10 @@ +doSomethingElse(); + } +} reverted: --- /dev/null +++ a/core/vendor/phpunit/phpunit-mock-objects/tests/_files/FunctionCallback.php @@ -0,0 +1,9 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + reverted: --- /dev/null +++ a/core/vendor/phpunit/phpunit-mock-objects/tests/_files/InterfaceWithStaticMethod.php @@ -0,0 +1,6 @@ +constructorArgs = array($arg1, $arg2); + } + + public function mockableMethod() + { + // something different from NULL + return TRUE; + } + + public function anotherMockableMethod() + { + // something different from NULL + return TRUE; + } + + public function __clone() + { + $this->cloned = TRUE; + } +} reverted: --- /dev/null +++ a/core/vendor/phpunit/phpunit-mock-objects/tests/_files/PartialMockTestClass.php @@ -0,0 +1,18 @@ +constructorCalled = TRUE; + } + + public function doSomething() + { + } + + public function doAnotherThing() + { + } +} reverted: --- /dev/null +++ a/core/vendor/phpunit/phpunit-mock-objects/tests/_files/SomeClass.php @@ -0,0 +1,13 @@ +doSomethingElse(); - } -} reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/InterfaceWithStaticMethod.php +++ /dev/null @@ -1,6 +0,0 @@ -constructorArgs = array($arg1, $arg2); - } - - public function mockableMethod() - { - // something different from NULL - return TRUE; - } - - public function anotherMockableMethod() - { - // something different from NULL - return TRUE; - } - - public function __clone() - { - $this->cloned = TRUE; - } -} reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/PartialMockTestClass.php +++ /dev/null @@ -1,18 +0,0 @@ -constructorCalled = TRUE; - } - - public function doSomething() - { - } - - public function doAnotherThing() - { - } -} reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SomeClass.php +++ /dev/null @@ -1,13 +0,0 @@ - '/_files/AbstractMockTestClass.php', + 'abstracttrait' => '/_files/AbstractTrait.php', + 'aninterface' => '/_files/AnInterface.php', + 'anotherinterface' => '/_files/AnotherInterface.php', + 'bar' => '/_files/Bar.php', - 'abstractmocktestclass' => '/_fixture/AbstractMockTestClass.php', - 'abstracttrait' => '/_fixture/AbstractTrait.php', - 'aninterface' => '/_fixture/AnInterface.php', - 'anotherinterface' => '/_fixture/AnotherInterface.php', - 'bar' => '/_fixture/Bar.php', 'classthatimplementsserializable' => '/_files/ClassThatImplementsSerializable.php', 'classwithstaticmethod' => '/_files/ClassWithStaticMethod.php', + 'foo' => '/_files/Foo.php', - 'foo' => '/_fixture/Foo.php', 'framework_mockbuildertest' => '/MockBuilderTest.php', 'framework_mockobject_generatortest' => '/GeneratorTest.php', 'framework_mockobject_invocation_objecttest' => '/MockObject/Invocation/ObjectTest.php', 'framework_mockobject_invocation_statictest' => '/MockObject/Invocation/StaticTest.php', - 'framework_mockobject_matcher_consecutiveparameterstest' => '/MockObject/Matcher/ConsecutiveParametersTest.php', 'framework_mockobjecttest' => '/MockObjectTest.php', 'framework_proxyobjecttest' => '/ProxyObjectTest.php', + 'interfacewithstaticmethod' => '/_files/InterfaceWithStaticMethod.php', + 'methodcallback' => '/_files/MethodCallback.php', + 'methodcallbackbyreference' => '/_files/MethodCallbackByReference.php', + 'mockable' => '/_files/Mockable.php', + 'partialmocktestclass' => '/_files/PartialMockTestClass.php', + 'someclass' => '/_files/SomeClass.php', + 'staticmocktestclass' => '/_files/StaticMockTestClass.php', + 'traversablemocktestinterface' => '/_files/TraversableMockTestInterface.php' - 'interfacewithstaticmethod' => '/_fixture/InterfaceWithStaticMethod.php', - 'methodcallback' => '/_fixture/MethodCallback.php', - 'methodcallbackbyreference' => '/_fixture/MethodCallbackByReference.php', - 'mockable' => '/_fixture/Mockable.php', - 'partialmocktestclass' => '/_fixture/PartialMockTestClass.php', - 'someclass' => '/_fixture/SomeClass.php', - 'staticmocktestclass' => '/_fixture/StaticMockTestClass.php', - 'traversablemocktestinterface' => '/_fixture/TraversableMockTestInterface.php' ); } $cn = strtolower($class); reverted: --- b/core/vendor/phpunit/phpunit-mock-objects/tests/bootstrap.php +++ a/core/vendor/phpunit/phpunit-mock-objects/tests/bootstrap.php @@ -1,5 +1,5 @@ =1.0.2", "php": ">=5.3.3", "phpunit/php-text-template": "~1.2" }, "require-dev": { - "phpunit/phpunit": "4.4.*@dev" + "phpunit/phpunit": "~4.1" }, "suggest": { "ext-soap": "*" @@ -1115,7 +1114,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -1124,6 +1123,9 @@ ] }, "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], "license": [ "BSD-3-Clause" ], @@ -1140,7 +1142,7 @@ "mock", "xunit" ], - "time": "2014-10-04 10:04:20" + "time": "2014-06-12 07:22:15" }, { "name": "psr/log", @@ -2592,10 +2594,7 @@ "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "doctrine/common": 20, - "phpunit/phpunit-mock-objects": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": {