*
* @since 1.20
*
- * @return string absolute name of the temporary file
+ * @return string Absolute name of the temporary file
*/
protected function getNewTempFile() {
$fileName = tempnam( wfTempDir(), 'MW_PHPUnit_' . get_class( $this ) . '_' );
}
// NOTE; some things such as Closures are not serializable
// in this case just set the value!
- catch( Exception $e ) {
+ catch ( Exception $e ) {
$this->mwGlobals[$globalKey] = $GLOBALS[$globalKey];
}
}
//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',
* even if using different parameters.
*
* @param DatabaseBase $db The database connection
- * @param String $prefix The prefix to use for the new table set (aka schema).
+ * @param string $prefix The prefix to use for the new table set (aka schema).
*
* @throws MWException if the database table prefix is already $prefix
*/
*/
public function __call( $func, $args ) {
static $compatibility = array(
- 'assertInternalType' => 'assertType', // assertInternalType was added in phpunit 3.5.0
- 'assertNotInternalType' => 'assertNotType', // assertNotInternalType was added in phpunit 3.5.0
- 'assertInstanceOf' => 'assertType', // assertInstanceOf was added in phpunit 3.5.0
'assertEmpty' => 'assertEmpty2', // assertEmpty was added in 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 );
/**
* @since 1.18
+ * @param string $offset
+ * @return mixed
*/
public function getCliArg( $offset ) {
if ( isset( MediaWikiPHPUnitCommand::$additionalOptions[$offset] ) ) {
/**
* @since 1.18
+ * @param string $offset
+ * @param mixed $value
*/
public function setCliArg( $offset, $value ) {
MediaWikiPHPUnitCommand::$additionalOptions[$offset] = $value;
* @since 1.19
*
* @param string $function
- * @return null
*/
public function hideDeprecated( $function ) {
wfSuppressWarnings();
* test whenever it is not loaded.
*
* @since 1.21
+ * @param string $extName
+ * @return bool
*/
protected function checkPHPExtension( $extName ) {
$loaded = extension_loaded( $extName );