dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
251b50a
)
Switch on expected value, since the actual one can obviously be wrong
author
jeroendedauw
<jeroendedauw@gmail.com>
Mon, 24 Sep 2012 13:14:28 +0000
(15:14 +0200)
committer
jeroendedauw
<jeroendedauw@gmail.com>
Mon, 24 Sep 2012 13:15:43 +0000
(15:15 +0200)
This gets rid of confusing error messages pointing to the provided type being invalid
Change-Id: Id283ef6e8fa6c3f18bc9ef3b740e8ec4bd181e3a
tests/phpunit/MediaWikiTestCase.php
patch
|
blob
|
history
diff --git
a/tests/phpunit/MediaWikiTestCase.php
b/tests/phpunit/MediaWikiTestCase.php
index
1cc45e0
..
f9e9f77
100644
(file)
--- a/
tests/phpunit/MediaWikiTestCase.php
+++ b/
tests/phpunit/MediaWikiTestCase.php
@@
-536,7
+536,7
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
* @param string $message
*/
protected function assertType( $type, $actual, $message = '' ) {
- if (
is_object( $actual
) ) {
+ if (
class_exists( $type ) || interface_exists( $type
) ) {
$this->assertInstanceOf( $type, $actual, $message );
}
else {