Commit 908f21ce authored by Dries's avatar Dries

Issue #1934802 by msonnabaum: Update symfony to 2.2.

parent a92b264d
......@@ -2,28 +2,23 @@
"name": "drupal/drupal",
"description": "Drupal is an open source content management platform powering millions of websites and applications.",
"license": "GPL-2.0+",
"repositories": [{
"type": "vcs",
"url": "https://github.com/msonnabaum/phpunit.git"
}
],
"require": {
"symfony/class-loader": "2.2.0-BETA2",
"symfony/dependency-injection": "2.2.0-BETA2",
"symfony/event-dispatcher": "2.2.0-BETA2",
"symfony/http-foundation": "2.2.0-BETA2",
"symfony/http-kernel": "2.2.0-BETA2",
"symfony/routing": "2.2.0-BETA2",
"symfony/serializer": "2.2.0-BETA2",
"symfony/validator": "2.2.0-BETA2",
"symfony/yaml": "2.2.0-BETA2",
"symfony/class-loader": "2.2.0",
"symfony/dependency-injection": "2.2.0",
"symfony/event-dispatcher": "2.2.0",
"symfony/http-foundation": "2.2.0",
"symfony/http-kernel": "2.2.0",
"symfony/routing": "2.2.0",
"symfony/serializer": "2.2.0",
"symfony/validator": "2.2.0",
"symfony/yaml": "2.2.0",
"twig/twig": "1.12.1",
"doctrine/common": "2.3.0",
"guzzle/http": "3.1.0",
"kriswallsmith/assetic": "1.1.0-alpha1",
"symfony-cmf/routing": "dev-master#ea4a10",
"easyrdf/easyrdf": "0.8.0-beta.1",
"phpunit/phpunit": "3.7 as dev-3.7"
"phpunit/phpunit": "3.7.15"
},
"minimum-stability": "dev"
}
This diff is collapsed.
......@@ -38,6 +38,19 @@ public function accept(ValidationVisitorInterface $visitor, $typed_data, $group,
}
}
/**
* Implements PropertyMetadataContainerInterface::hasPropertyMetadata().
*/
public function hasPropertyMetadata($property_name) {
try {
$exists = (bool)$this->getPropertyMetadata($property_name);
}
catch (\LogicException $e) {
$exists = FALSE;
}
return $exists;
}
/**
* Implements PropertyMetadataContainerInterface::getPropertyMetadata().
*/
......
3rd party libraries provided by Drupal core should be placed in this directory.
They should not be modified from their original form at any time. They should
be changed only to keep up to date with upstream projects.
Code in this directory MAY be licensed under a GPL-compatible non-GPL license.
If so, it must be properly documented in COPYRIGHT.txt.
......@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit481bddffaf22b51d159ec1b257c2bd7f::getLoader();
return ComposerAutoloaderInit7f0efddf867398398517e0ca6863b8f1::getLoader();
This diff is collapsed.
......@@ -2,7 +2,7 @@
// autoload_real.php generated by Composer
class ComposerAutoloaderInit481bddffaf22b51d159ec1b257c2bd7f
class ComposerAutoloaderInit7f0efddf867398398517e0ca6863b8f1
{
private static $loader;
......@@ -19,9 +19,9 @@ public static function getLoader()
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit481bddffaf22b51d159ec1b257c2bd7f', 'loadClassLoader'));
spl_autoload_register(array('ComposerAutoloaderInit7f0efddf867398398517e0ca6863b8f1', 'loadClassLoader'));
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit481bddffaf22b51d159ec1b257c2bd7f', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit7f0efddf867398398517e0ca6863b8f1', 'loadClassLoader'));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
......@@ -42,8 +42,6 @@ public static function getLoader()
$loader->register(true);
require $vendorDir . '/phpunit/phpunit/PHPUnit/Autoload.php';
return $loader;
}
}
This diff is collapsed.
......@@ -11,7 +11,7 @@ before_script:
- git clone --branch=master --depth=100 --quiet git://github.com/sebastianbergmann/php-text-template.git vendor/php-text-template
- git clone --branch=master --depth=100 --quiet git://github.com/sebastianbergmann/php-token-stream.git vendor/php-token-stream
- git clone --branch=master --depth=100 --quiet git://github.com/sebastianbergmann/php-file-iterator.git vendor/php-file-iterator
- git clone --branch=master --depth=100 --quiet git://github.com/sebastianbergmann/php-timer.git vendor/php-timer
- git clone --branch=1.0 --depth=100 --quiet git://github.com/sebastianbergmann/php-timer.git vendor/php-timer
- git clone --branch=master --depth=100 --quiet git://github.com/pear/pear-core.git vendor/pear-core
- git clone --branch=trunk --depth=100 --quiet git://github.com/pear/Console_Getopt.git vendor/console-getopt
......
......@@ -3,6 +3,20 @@ PHP_CodeCoverage 1.2
This is the list of changes for the PHP_CodeCoverage 1.2 release series.
PHP_CodeCoverage 1.2.9
----------------------
* Improved rendering of "lines covered" numbers for functions and methods with long names or argument lists.
* Fixed the title of the Y axis of the Code Coverage ./. Cyclomatic Complexity dashboard chart.
* Upgraded to Highcharts 2.3.5.
* Upgraded to jQuery 1.9.1.
PHP_CodeCoverage 1.2.8
----------------------
* Reduced vertical whitespace in sourcecode view.
* Upgraded to Bootstrap 2.2.2.
PHP_CodeCoverage 1.2.7
----------------------
......
......@@ -113,6 +113,7 @@ public function __construct($templatePath, $charset, $generator, $date, $lowUppe
*/
protected function renderItemTemplate(Text_Template $template, array $data)
{
$numSeperator = ' / ';
$classesBar = ' ';
$classesLevel = 'None';
$classesNumber = ' ';
......@@ -120,7 +121,7 @@ protected function renderItemTemplate(Text_Template $template, array $data)
if (isset($data['numClasses']) && $data['numClasses'] > 0) {
$classesLevel = $this->getColorLevel($data['testedClassesPercent']);
$classesNumber = $data['numTestedClasses'] . ' / ' .
$classesNumber = $data['numTestedClasses'] . $numSeperator .
$data['numClasses'];
$classesBar = $this->getCoverageBar(
......@@ -135,7 +136,7 @@ protected function renderItemTemplate(Text_Template $template, array $data)
if ($data['numMethods'] > 0) {
$methodsLevel = $this->getColorLevel($data['testedMethodsPercent']);
$methodsNumber = $data['numTestedMethods'] . ' / ' .
$methodsNumber = $data['numTestedMethods'] . $numSeperator .
$data['numMethods'];
$methodsBar = $this->getCoverageBar(
......@@ -150,7 +151,7 @@ protected function renderItemTemplate(Text_Template $template, array $data)
if ($data['numExecutableLines'] > 0) {
$linesLevel = $this->getColorLevel($data['linesExecutedPercent']);
$linesNumber = $data['numExecutedLines'] . ' / ' .
$linesNumber = $data['numExecutedLines'] . $numSeperator .
$data['numExecutableLines'];
$linesBar = $this->getCoverageBar(
......
......@@ -58,60 +58,60 @@
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/highcharts.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
var classCoverageDistribution = new Highcharts.Chart({
chart: {
renderTo: 'classCoverageDistribution',
type: 'column'
},
title: {text: ''},
legend: {enabled: false},
credits: {enabled: false},
tooltip: {enabled: false},
xAxis: {
labels: {style: {fontSize: '8px'}},
categories: [
'0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
]
},
yAxis: {
title: '',
labels: {style: {fontSize: '8px'}},
},
series: [{
data: {ccd_values}
}],
});
$(document).ready(function() {
var classCoverageDistribution = new Highcharts.Chart({
chart: {
renderTo: 'classCoverageDistribution',
type: 'column'
},
title: {text: ''},
legend: {enabled: false},
credits: {enabled: false},
tooltip: {enabled: false},
xAxis: {
labels: {style: {fontSize: '8px'}},
categories: [
'0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
]
},
yAxis: {
title: '',
labels: {style: {fontSize: '8px'}},
},
series: [{
data: {ccd_values}
}],
});
var classComplexity = new Highcharts.Chart({
chart: {
renderTo: 'classComplexity',
type: 'scatter'
},
title: {text: ''},
legend: {enabled: false},
credits: {enabled: false},
xAxis: {
title: {text: 'Code Coverage (in percent)'},
labels: {enabled: true},
},
yAxis: {
title: 'Cyclomatic Complexity',
labels: {enabled: true},
},
tooltip: {
formatter: function() {
return this.point.config[2];
}
},
series: [{
data: {cc_values},
marker: {
symbol: 'diamond'
}
}],
});
});
var classComplexity = new Highcharts.Chart({
chart: {
renderTo: 'classComplexity',
type: 'scatter'
},
title: {text: ''},
legend: {enabled: false},
credits: {enabled: false},
xAxis: {
title: {text: 'Code Coverage (in percent)'},
labels: {enabled: true},
},
yAxis: {
title: {text: 'Cyclomatic Complexity'},
labels: {enabled: true},
},
tooltip: {
formatter: function() {
return this.point.config[2];
}
},
series: [{
data: {cc_values},
marker: {
symbol: 'diamond'
}
}],
});
});
</script>
</body>
</html>
......@@ -56,7 +56,7 @@
*/
class PHP_CodeCoverage_Version
{
const VERSION = '1.2.7';
const VERSION = '1.2.9';
protected static $version;
/**
......
......@@ -171,7 +171,10 @@ public function testGetLinesToBeIgnoredOneLineAnnotations()
6 => TRUE,
8 => TRUE,
9 => TRUE,
13 => TRUE,
10 => TRUE,
11 => TRUE,
12 => TRUE,
13 => TRUE
),
PHP_CodeCoverage_Util::getLinesToBeIgnored(
TEST_FILES_PATH . 'source_with_oneline_annotations.php'
......
......@@ -17,9 +17,9 @@
<email>sb@sebastian-bergmann.de</email>
<active>yes</active>
</lead>
<date>2012-12-02</date>
<date>2013-02-26</date>
<version>
<release>1.2.7</release>
<release>1.2.9</release>
<api>1.2.0</api>
</version>
<stability>
......
......@@ -5,10 +5,12 @@ build/logs
build/pdepend
build/phar
build/phpdox
build/phpunit.phar
build/*.phar
Tests/TextUI/*.diff
Tests/TextUI/*.exp
Tests/TextUI/*.log
Tests/TextUI/*.out
Tests/TextUI/*.php
phpunit.xml
cache.properties
.idea
language: php
php:
- 5.3
- 5.4
env:
- INSTALL_PHP_INVOKER=0
- INSTALL_PHP_INVOKER=1
before_script:
- composer install --dev --prefer-source
- sh -c "if [ '$INSTALL_PHP_INVOKER' = '1' ]; then git clone --branch=master --depth=100 --quiet git://github.com/sebastianbergmann/php-invoker.git vendor/php-invoker; fi"
script: php -d include_path=vendor:vendor/php-invoker -d auto_prepend_file=vendor/autoload.php ./phpunit.php --configuration ./build/travis-ci.xml
notifications:
email: false
irc:
channels:
- "irc.freenode.org#phpunit"
use_notice: true
......@@ -3,19 +3,105 @@ PHPUnit 3.7
This is the list of changes for the PHPUnit 3.7 release series.
PHPUnit 3.7.15
--------------
* Fixed #823: Process isolation not working on windows if there are spaces in path to `php.exe`
* Fixed #830: PHP notice in `PHPUnit_Util_XML`
PHPUnit 3.7.14
--------------
* Fixed #751: NaN is not equal to NaN now to match PHPs behavior
* Fixed #796 in #799: Mocking a method with a reference to an object made argument matches fail.
PHPUnit 3.7.13
--------------
* Fixed #710: Ensure isolation tests display errors so they can be handled by the test runner.
* Fixed sebastianbergmann/phpunit-mock-objects#81.
* Fixed an issue where PHP complained about an undeclared `$time` variable when running tests in strict mode.
PHPUnit 3.7.12
--------------
* Fixed version number.
PHPUnit 3.7.11
--------------
* Fixed installation issue for Symfony/Yaml.
PHPUnit 3.7.10
--------------
* Fixed #734: `phpunit.phar` cannot be executed if it is renamed.
* Fixed error message when `assertArrayHasKey()` and `assertArrayNotHasKey()` are invoked with wrong arguments.
* Fixed #709: `assertJsonStringEqualsJsonFile` didn't work with json arrays.
PHPUnit 3.7.9
-------------
* Fixed #708: JSON matcher source files missing from `package.xml`.
PHPUnit 3.7.8
-------------
* Fixed #688: Invoke autoloader when checking for `Symfony\Component\Yaml\Dumper`.
PHPUnit 3.7.7
-------------
* Added missing file to PEAR package.
PHPUnit 3.7.6
-------------
* Fixed #682: `phpunit` script appears in stacktrace (when PHPUnit is installed through Composer).
PHPUnit 3.7.5
-------------
* PHPUnit now uses `$_SERVER['SCRIPT_NAME']` instead of `$_SERVER['_']` to filter the `phpunit` script (as the latter is not set when PHPUnit is invoked from Apache Ant's `<exec>` task, for instance).
PHPUnit 3.7.4
-------------
* Fixed #682: `phpunit` script appears in stacktrace.
PHPUnit 3.7.3
-------------
* Improvements to running PHPUnit from a PHAR.
PHPUnit 3.7.2
-------------
* Implemented #656: Always clean up mock objects (and free up memory).
* Implemented #664: Do not rely on autoloader class map to populate blacklist.
* Added the `addUncoveredFilesFromWhitelist` configuration setting back in.
* Fixed #655: Reverted 'More than two positional arguments provided' check as it turned out to be a BC issue.
* Disable token caching (in PHP_TokenStream, used by PHP_CodeCoverage) by default (to reduce memory footprint).
PHPUnit 3.7.1
-------------
* The version number is now displayed when using PHPUnit from a Composer install or Git checkout.
PHPUnit 3.7.0
-------------
* PHPUnit 3.7 is only supported on PHP 5.3.3 (or later) and PHP 5.4.6 (or later) is highly recommended.
* PHPUnit 3.7 is only supported on PHP 5.3.3 (or later) and PHP 5.4.7 (or later) is highly recommended.
* Implemented #200: When using process-isolation don't die silently when unserializing the test result fails.
* Implemented #206: Added a `callback` constraint that is useful for making complex assertions.
* Implemented #207: Restore current working directory if is changed by a test case.
* Implemented #208: Added --test-suffix that allows specifying which filename suffixes are recognised by PHPUnit.
* Implemented #208: Added `--test-suffix` that allows specifying which filename suffixes are recognised by PHPUnit.
* Implemented #295: `assertArrayHasKey()` and `assertArrayNotHasKey()` now work with objects that implement ArrayAccess.
* Implemented #333: Improved reporting when there are unused CLI arguments to avoid misconceptions.
* Implemented #377: Show messages and stracktraces in JSON output for skipped and incomplete tests.
* Implemented #424: Added `assertJson*` functions that work like the existing `assertXml*` functions.
* Implemented #492: PHPUnit now provides a `configuration.xsd` schema file at [http://schema.phpunit.de/configuration.xsd]() that can be used to validate your `phpunit.xml` and `phpunit.xml.dist` configuration files.
* Implemented #495: Added `--testsuite` argument, allowing to filter files/directory by parent testsuite name attribute.
* Implemented #504: Expanded the `@requires` annotation to allow for checking the existence of functions and extensions using multiple `@requires function name` statements.
* Implemented #508 #86: `@expectedExceptionCode` and `@expectedExceptionMessage` can now use constants like `Classname::CONST` as their parameters. They will get evaluated if the class constant exists and used for comparison so test authors can avoid duplication.
* Implemented #512: Test listeners now trigger one autoload call instead of being silently ignored when the class was not loaded.
......@@ -25,14 +111,14 @@ PHPUnit 3.7.0
* Implemented #586: Improved reporting of exceptions by printing out the previous exception names, messages and traces.
* The `@requires` annotation can now be used on the class DocBlock. Required versions can be overridden in the methods annotation, required functions and extensions will be merged.
* Added `processUncoveredFilesFromWhitelist` configuration setting. When enabled, uncovered whitelisted files are processed to properly calculate the number of executable lines.
* Fixed #322 #320 thanks to #607: Commandline option now override group/exclude settings in phpunit.xml
* Fixed #322 #320 thanks to #607: Commandline option now override group/exclude settings in `phpunit.xml`
* Fixed #440: Possible crash when using `--process-isolation` with PHP 5.3 and `detect_unicode=on`.
* Fixed #523: `assertAttributeEquals()` now works with classes extending internal classes like `ArrayIterator`.
* Fixed #581: Generating a diffs could add extra newlines in Windows.
* Fixed #636, #631: Using selenium in combination with autoloaders that die()d or produced errors when a class could't be found caused led to broken tests.
* Fixed #636, #631: Using Selenium in combination with autoloaders that `die()` or produce errors when a class cannot be found caused broken tests.
* If no tests where executed, for example because of a `--filter`, PHPUnit now prints a "No tests executed" warning instead of "OK (0 tests...)".
* It is possible again to expect the generic `Exception` class.
* Removed `addUncoveredFilesFromWhitelist` configuration setting.
* Removed deprecated `--skeleton-class` and `--skeleton-test` switches. The functionality is now provided by the `phpunit-skel` command of the `PHPUnit_SkeletonGenerator` package.
* Removed deprecated `--skeleton-class` and `--skeleton-test` switches. The functionality is now provided by the `phpunit-skelgen` command of the `PHPUnit_SkeletonGenerator` package.
* Removed deprecated `PHPUnit_Extensions_OutputTestCase` class.
PHPUnit
Copyright (c) 2002-2012, Sebastian Bergmann <sebastian@phpunit.de>.
Copyright (c) 2002-2013, Sebastian Bergmann <sebastian@phpunit.de>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
......@@ -2,7 +2,7 @@
/**
* PHPUnit
*
* Copyright (c) 2001-2012, Sebastian Bergmann <sebastian@phpunit.de>.
* Copyright (c) 2001-2013, Sebastian Bergmann <sebastian@phpunit.de>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -36,7 +36,7 @@
*
* @package PHPUnit
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 2001-2012 Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de>
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
* @link http://www.phpunit.de/
* @since File available since Release 3.5.0
......@@ -47,45 +47,29 @@ require_once 'PHP/CodeCoverage/Autoload.php';
require_once 'PHP/Timer/Autoload.php';
require_once 'PHPUnit/Framework/MockObject/Autoload.php';
require_once 'Text/Template/Autoload.php';
require_once 'Symfony/Component/Yaml/autoloader.php';
function phpunit_autoload($class = NULL)
{
static $classes = NULL;
static $path = NULL;
spl_autoload_register(
function ($class)
{
static $classes = NULL;
static $path = NULL;
if ($classes === NULL) {
$classes = array(
___CLASSLIST___
);
if ($classes === NULL) {
$classes = array(
___CLASSLIST___
);
$path = dirname(__FILE__);
}
$path = dirname(__FILE__);
}
if ($class === NULL) {
$result = array(__FILE__);
$cn = strtolower($class);
if (isset($_SERVER['_']) &&
strpos($_SERVER['_'], 'phpunit') !== FALSE) {
$result[] = $_SERVER['_'];
}
foreach ($classes as $file) {
$result[] = $path . $file;
}
return $result;
}