MediaWiki
REL1_31
ApiClearHasMsgTest.php
Go to the documentation of this file.
1
<?php
2
8
class
ApiClearHasMsgTest
extends
ApiTestCase
{
9
13
public
function
testClearFlag
() {
14
$user = self::$users[
'sysop'
]->getUser();
15
$user->setNewtalk(
true
);
16
$this->assertTrue( $user->getNewtalk(),
'sanity check'
);
17
18
$data = $this->
doApiRequest
( [
'action'
=>
'clearhasmsg'
], [] );
19
20
$this->assertEquals(
'success'
, $data[0][
'clearhasmsg'
] );
21
$this->assertFalse( $user->getNewtalk() );
22
}
23
24
}
ApiClearHasMsgTest
API medium ApiClearHasMsg.
Definition
ApiClearHasMsgTest.php:8
ApiClearHasMsgTest\testClearFlag
testClearFlag()
Test clearing hasmsg flag for current user.
Definition
ApiClearHasMsgTest.php:13
ApiTestCase
Definition
ApiTestCase.php:5
ApiTestCase\doApiRequest
doApiRequest(array $params, array $session=null, $appendModule=false, User $user=null, $tokenType=null)
Does the API request and returns the result.
Definition
ApiTestCase.php:100
tests
phpunit
includes
api
ApiClearHasMsgTest.php
Generated on Mon Nov 25 2024 15:36:13 for MediaWiki by
1.10.0