Skip to content

Commit

Permalink
Closes #3142
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed May 25, 2018
1 parent 8855eea commit 526470b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions ChangeLog-6.5.md
Expand Up @@ -2,6 +2,12 @@

All notable changes of the PHPUnit 6.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [6.5.9] - 2018-MM-DD

### Fixed

* Fixed [#3142](https://github.com/sebastianbergmann/phpunit/issues/3142): Method-level annotations (`@backupGlobals`, `@backupStaticAttributes`, `@errorHandler`, `@preserveGlobalState`) do not override class-level annotations

## [6.5.8] - 2018-04-10

### Fixed
Expand Down Expand Up @@ -62,6 +68,7 @@ All notable changes of the PHPUnit 6.5 release series are documented in this fil
* Fixed [#2654](https://github.com/sebastianbergmann/phpunit/issues/2654): Problems with `assertJsonStringEqualsJsonString()`
* Fixed [#2810](https://github.com/sebastianbergmann/phpunit/pull/2810): Code Coverage for PHPT tests does not work

[6.5.9]: https://github.com/sebastianbergmann/phpunit/compare/6.5.8...6.5.9
[6.5.8]: https://github.com/sebastianbergmann/phpunit/compare/6.5.7...6.5.8
[6.5.7]: https://github.com/sebastianbergmann/phpunit/compare/6.5.6...6.5.7
[6.5.6]: https://github.com/sebastianbergmann/phpunit/compare/6.5.5...6.5.6
Expand Down
12 changes: 6 additions & 6 deletions src/Util/Test.php
Expand Up @@ -967,22 +967,22 @@ private static function getBooleanAnnotationSetting($className, $methodName, $se
$methodName
);

if (isset($annotations['class'][$settingName])) {
if ($annotations['class'][$settingName][0] == 'enabled') {
if (isset($annotations['method'][$settingName])) {
if ($annotations['method'][$settingName][0] === 'enabled') {
return true;
}

if ($annotations['class'][$settingName][0] == 'disabled') {
if ($annotations['method'][$settingName][0] === 'disabled') {
return false;
}
}

if (isset($annotations['method'][$settingName])) {
if ($annotations['method'][$settingName][0] == 'enabled') {
if (isset($annotations['class'][$settingName])) {
if ($annotations['class'][$settingName][0] === 'enabled') {
return true;
}

if ($annotations['method'][$settingName][0] == 'disabled') {
if ($annotations['class'][$settingName][0] === 'disabled') {
return false;
}
}
Expand Down

0 comments on commit 526470b

Please sign in to comment.