MediaWiki REL1_31
ApiClearHasMsgTest.php
Go to the documentation of this file.
1<?php
2
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}
API medium ApiClearHasMsg.
testClearFlag()
Test clearing hasmsg flag for current user.
doApiRequest(array $params, array $session=null, $appendModule=false, User $user=null, $tokenType=null)
Does the API request and returns the result.