update 1.0.8.0

Commits for version update
This commit is contained in:
Manish Verma
2016-10-17 12:02:27 +05:30
parent dec927987b
commit 76e85db070
9674 changed files with 495757 additions and 58922 deletions

View File

@@ -1,3 +1,4 @@
/build export-ignore
*.php diff=php
composer.json merge=ours
src/Runner/Version.php merge=ours

View File

@@ -1,6 +1,9 @@
/.ant_targets
/.idea
/build/documentation
/build/logfiles
/build/phar
/build/phpdox
/build/*.phar
/build/*.phar.asc
/tests/TextUI/*.diff

View File

@@ -2,6 +2,12 @@
All notable changes of the PHPUnit 4.8 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [4.8.27] - 2016-07-21
### Fixed
* Fixed [#1968](https://github.com/sebastianbergmann/phpunit/issues/1968): Invalid data sets are not handled correctly for `@testWith` annotation
## [4.8.26] - 2016-05-17
### Fixed
@@ -190,6 +196,7 @@ New PHAR release due to updated dependencies
* Made the argument check of `assertContains()` and `assertNotContains()` more strict to prevent undefined behavior such as [#1808](https://github.com/sebastianbergmann/phpunit/issues/1808)
* Changed the name of the default group from `__nogroup__` to `default`
[4.8.27]: https://github.com/sebastianbergmann/phpunit/compare/4.8.26...4.8.27
[4.8.26]: https://github.com/sebastianbergmann/phpunit/compare/4.8.25...4.8.26
[4.8.25]: https://github.com/sebastianbergmann/phpunit/compare/4.8.24...4.8.25
[4.8.24]: https://github.com/sebastianbergmann/phpunit/compare/4.8.23...4.8.24

View File

@@ -7,17 +7,25 @@
<delete dir="${basedir}/bin"/>
<delete dir="${basedir}/vendor"/>
<delete file="${basedir}/composer.lock"/>
<delete dir="${basedir}/build/documentation"/>
<delete dir="${basedir}/build/logfiles"/>
<delete dir="${basedir}/build/phar"/>
<delete>
<fileset dir="${basedir}/build">
<include name="**/*.phar"/>
<include name="**/*.phar.asc"/>
<include name="**/phpunit*.phar"/>
<include name="**/phpunit*.phar.asc"/>
</fileset>
</delete>
<property name="clean.done" value="true"/>
</target>
<target name="prepare" unless="prepare.done" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/documentation"/>
<mkdir dir="${basedir}/build/logfiles"/>
<property name="prepare.done" value="true"/>
</target>
<target name="validate-composer-json" unless="validate-composer-json.done" description="Validate composer.json">
<exec executable="${basedir}/build/tools/composer" failonerror="true" taskname="composer">
<env key="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
@@ -319,5 +327,46 @@
<arg value="${basedir}/phpunit --version | awk 'BEGIN { ORS = &quot;&quot;; } {print $2}'"/>
</exec>
</target>
<target name="generate-project-documentation" depends="-phploc,-phpcs,-phpmd,-phpunit">
<exec executable="${basedir}/build/tools/phpdox" dir="${basedir}/build" taskname="phpdox"/>
</target>
<target name="-phploc" depends="prepare">
<exec executable="${basedir}/build/tools/phploc" output="/dev/null" taskname="phploc">
<arg value="--count-tests"/>
<arg value="--log-xml"/>
<arg path="${basedir}/build/logfiles/phploc.xml"/>
<arg path="${basedir}/src"/>
<arg path="${basedir}/tests"/>
</exec>
</target>
<target name="-phpcs" depends="prepare">
<exec executable="${basedir}/build/tools/phpcs" output="/dev/null" taskname="phpcs">
<arg value="--report=checkstyle"/>
<arg value="--report-file=${basedir}/build/logfiles/checkstyle.xml"/>
<arg value="--standard=PSR2"/>
<arg value="--extensions=php"/>
<arg path="${basedir}/src"/>
</exec>
</target>
<target name="-phpmd" depends="prepare">
<exec executable="${basedir}/build/tools/phpmd" taskname="phpmd">
<arg path="${basedir}/src"/>
<arg value="xml"/>
<arg path="${basedir}/build/phpmd.xml"/>
<arg value="--reportfile"/>
<arg path="${basedir}/build/logfiles/pmd.xml"/>
</exec>
</target>
<target name="-phpunit" depends="setup">
<exec executable="${basedir}/phpunit" taskname="phpunit">
<arg value="--configuration"/>
<arg path="${basedir}/build/phpunit.xml"/>
</exec>
</target>
</project>

View File

@@ -1,34 +0,0 @@
#!/usr/bin/env php
<?php
if (__FILE__ == realpath($GLOBALS['_SERVER']['SCRIPT_NAME'])) {
$execute = true;
} else {
$execute = false;
}
define('__PHPUNIT_PHAR__', str_replace(DIRECTORY_SEPARATOR, '/', __FILE__));
define('__PHPUNIT_PHAR_ROOT__', 'phar://___PHAR___');
Phar::mapPhar('___PHAR___');
___FILELIST___
if ($execute) {
if (version_compare('5.3.3', PHP_VERSION, '>')) {
fwrite(
STDERR,
'This version of PHPUnit requires PHP 5.3.3; using the latest version of PHP is highly recommended.' . PHP_EOL
);
die(1);
}
if (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == '--manifest') {
print file_get_contents(__PHPUNIT_PHAR_ROOT__ . '/manifest.txt');
exit;
}
PHPUnit_TextUI_Command::main();
}
__HALT_COMPILER();

View File

@@ -1,25 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
-----END CERTIFICATE-----

View File

@@ -1,9 +0,0 @@
<?php
define('__PHPUNIT_PHAR__', str_replace(DIRECTORY_SEPARATOR, '/', __FILE__));
define('__PHPUNIT_PHAR_ROOT__', 'phar://___PHAR___');
Phar::mapPhar('___PHAR___');
___FILELIST___
__HALT_COMPILER();

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env php
<?php
print 'phpunit/phpunit: ';
$tag = @exec('git describe --tags 2>&1');
if (strpos($tag, '-') === false && strpos($tag, 'No names found') === false) {
print $tag;
} else {
$branch = @exec('git rev-parse --abbrev-ref HEAD');
$hash = @exec('git log -1 --format="%H"');
print $branch . '@' . $hash;
}
print "\n";
$lock = json_decode(file_get_contents(__DIR__ . '/../composer.lock'));
foreach ($lock->packages as $package) {
print $package->name . ': ' . $package->version;
if (!preg_match('/^[v= ]*(([0-9]+)(\\.([0-9]+)(\\.([0-9]+)(-([0-9]+))?(-?([a-zA-Z-+][a-zA-Z0-9\\.\\-:]*)?)?)?)?)$/', $package->version)) {
print '@' . $package->source->reference;
}
print "\n";
}

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env php
<?php
if (!isset($argv[1]) || !isset($argv[2])) {
exit(1);
}
file_put_contents(
__DIR__ . '/phar/phpunit/Runner/Version.php',
str_replace(
'private static $pharVersion;',
'private static $pharVersion = "' . $argv[1] . '";',
file_get_contents(__DIR__ . '/phar/phpunit/Runner/Version.php')
)
);
if ($argv[2] == 'release') {
print $argv[1];
} else {
print $argv[2];
}

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.4/phpunit.xsd"
bootstrap="../tests/bootstrap.php"
backupGlobals="false"
verbose="true">
<testsuites>
<testsuite name="small">
<directory suffix=".phpt">../tests/Fail</directory>
</testsuite>
</testsuites>
<php>
<const name="PHPUNIT_TESTSUITE" value="true"/>
</php>
</phpunit>

View File

@@ -30,7 +30,7 @@ class PHPUnit_Runner_Version
}
if (self::$version === null) {
$version = new SebastianBergmann\Version('4.8.26', dirname(dirname(__DIR__)));
$version = new SebastianBergmann\Version('4.8.27', dirname(dirname(__DIR__)));
self::$version = $version->getVersion();
}

View File

@@ -467,12 +467,24 @@ class PHPUnit_Util_Test
$offset = strlen($matches[0][0]) + $matches[0][1];
$annotationContent = substr($docComment, $offset);
$data = array();
foreach (explode("\n", $annotationContent) as $candidateRow) {
$candidateRow = trim($candidateRow);
$dataSet = json_decode($candidateRow, true);
if (json_last_error() != JSON_ERROR_NONE) {
if ($candidateRow[0] !== '[') {
break;
}
$dataSet = json_decode($candidateRow, true);
if (json_last_error() != JSON_ERROR_NONE) {
$error = function_exists('json_last_error_msg') ? json_last_error_msg() : json_last_error();
throw new PHPUnit_Framework_Exception(
'The dataset for the @testWith annotation cannot be parsed: ' . $error
);
}
$data[] = $dataSet;
}

View File

@@ -346,13 +346,25 @@ class Util_TestTest extends PHPUnit_Framework_TestCase
{
$this->setExpectedExceptionRegExp(
'PHPUnit_Framework_Exception',
'/^The dataset for the @testWith annotation cannot be parsed.$/'
'/^The dataset for the @testWith annotation cannot be parsed:/'
);
PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
* @testWith [s]
*/');
}
public function testTestWithThrowsProperExceptionIfMultiLineDatasetCannotBeParsed()
{
$this->setExpectedExceptionRegExp(
'PHPUnit_Framework_Exception',
'/^The dataset for the @testWith annotation cannot be parsed:/'
);
PHPUnit_Util_Test::getDataFromTestWithAnnotation('/**
* @testWith ["valid"]
* [invalid]
*/');
}
/**
* @covers PHPUnit_Util_Test::getDependencies
*