dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce ContentGetParserOutput hook
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
MediaWikiTestCase.php
diff --git
a/tests/phpunit/MediaWikiTestCase.php
b/tests/phpunit/MediaWikiTestCase.php
index
3742a54
..
53b944d
100644
(file)
--- a/
tests/phpunit/MediaWikiTestCase.php
+++ b/
tests/phpunit/MediaWikiTestCase.php
@@
-4,7
+4,6
@@
* @since 1.18
*/
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
* @since 1.18
*/
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
-
/**
* $called tracks whether the setUp and tearDown method has been called.
* class extending MediaWikiTestCase usually override setUp and tearDown
/**
* $called tracks whether the setUp and tearDown method has been called.
* class extending MediaWikiTestCase usually override setUp and tearDown
@@
-157,7
+156,7
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
*
* @since 1.20
*
*
* @since 1.20
*
- * @return string
a
bsolute name of the temporary file
+ * @return string
A
bsolute name of the temporary file
*/
protected function getNewTempFile() {
$fileName = tempnam( wfTempDir(), 'MW_PHPUnit_' . get_class( $this ) . '_' );
*/
protected function getNewTempFile() {
$fileName = tempnam( wfTempDir(), 'MW_PHPUnit_' . get_class( $this ) . '_' );
@@
-254,7
+253,8
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
$oldHex = strtoupper( dechex( $this->phpErrorLevel ) );
$newHex = strtoupper( dechex( $phpErrorLevel ) );
$oldHex = strtoupper( dechex( $this->phpErrorLevel ) );
$newHex = strtoupper( dechex( $phpErrorLevel ) );
- $message = "PHP error_reporting setting was left dirty: was 0x$oldHex before test, 0x$newHex after test!";
+ $message = "PHP error_reporting setting was left dirty: "
+ . "was 0x$oldHex before test, 0x$newHex after test!";
$this->fail( $message );
}
$this->fail( $message );
}
@@
-467,7
+467,7
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
//Make 1 page with 1 revision
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
//Make 1 page with 1 revision
$page = WikiPage::factory( Title::newFromText( 'UTPage' ) );
- if (
!
$page->getId() == 0 ) {
+ if ( $page->getId() == 0 ) {
$page->doEditContent(
new WikitextContent( 'UTContent' ),
'UTPageSummary',
$page->doEditContent(
new WikitextContent( 'UTContent' ),
'UTPageSummary',
@@
-512,7
+512,7
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
* even if using different parameters.
*
* @param DatabaseBase $db The database connection
* even if using different parameters.
*
* @param DatabaseBase $db The database connection
- * @param
S
tring $prefix The prefix to use for the new table set (aka schema).
+ * @param
s
tring $prefix The prefix to use for the new table set (aka schema).
*
* @throws MWException if the database table prefix is already $prefix
*/
*
* @throws MWException if the database table prefix is already $prefix
*/
@@
-599,6
+599,8
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
/**
* Used as a compatibility method for phpunit < 3.7.32
/**
* Used as a compatibility method for phpunit < 3.7.32
+ * @param string $value
+ * @param string $msg
*/
private function assertEmpty2( $value, $msg ) {
return $this->assertTrue( $value == '', $msg );
*/
private function assertEmpty2( $value, $msg ) {
return $this->assertTrue( $value == '', $msg );
@@
-660,6
+662,8
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
/**
* @since 1.18
/**
* @since 1.18
+ * @param string $offset
+ * @return mixed
*/
public function getCliArg( $offset ) {
if ( isset( MediaWikiPHPUnitCommand::$additionalOptions[$offset] ) ) {
*/
public function getCliArg( $offset ) {
if ( isset( MediaWikiPHPUnitCommand::$additionalOptions[$offset] ) ) {
@@
-669,6
+673,8
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
/**
* @since 1.18
/**
* @since 1.18
+ * @param string $offset
+ * @param mixed $value
*/
public function setCliArg( $offset, $value ) {
MediaWikiPHPUnitCommand::$additionalOptions[$offset] = $value;
*/
public function setCliArg( $offset, $value ) {
MediaWikiPHPUnitCommand::$additionalOptions[$offset] = $value;
@@
-680,7
+686,6
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
* @since 1.19
*
* @param string $function
* @since 1.19
*
* @param string $function
- * @return null
*/
public function hideDeprecated( $function ) {
wfSuppressWarnings();
*/
public function hideDeprecated( $function ) {
wfSuppressWarnings();
@@
-767,7
+772,9
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
* @param bool $ordered If the order of the values should match
* @param bool $named If the keys should match
*/
* @param bool $ordered If the order of the values should match
* @param bool $named If the keys should match
*/
- protected function assertArrayEquals( array $expected, array $actual, $ordered = false, $named = false ) {
+ protected function assertArrayEquals( array $expected, array $actual,
+ $ordered = false, $named = false
+ ) {
if ( !$ordered ) {
$this->objectAssociativeSort( $expected );
$this->objectAssociativeSort( $actual );
if ( !$ordered ) {
$this->objectAssociativeSort( $expected );
$this->objectAssociativeSort( $actual );
@@
-1007,6
+1014,8
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
* test whenever it is not loaded.
*
* @since 1.21
* test whenever it is not loaded.
*
* @since 1.21
+ * @param string $extName
+ * @return bool
*/
protected function checkPHPExtension( $extName ) {
$loaded = extension_loaded( $extName );
*/
protected function checkPHPExtension( $extName ) {
$loaded = extension_loaded( $extName );
@@
-1098,5
+1107,4
@@
abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
$this->assertEmpty( $errors, implode( "\n", $errors ) );
}
$this->assertEmpty( $errors, implode( "\n", $errors ) );
}
-
}
}