Debian Codegraph @

tests/phpunit/includes/block/Restriction/ActionRestrictionTest.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Tests\Block\Restriction;
4
5 use MediaWiki\Block\Restriction\ActionRestriction;
6 use MediaWiki\Title\Title;
7
8 /**
9 * @group Blocking
10 * @covers \MediaWiki\Block\Restriction\AbstractRestriction
11 * @covers \MediaWiki\Block\Restriction\ActionRestriction
12 */
13 class ActionRestrictionTest extends RestrictionTestCase {
14
15 public function testMatches() {
16 $class = $this->getClass();
17 $restriction = new $class( 1, 2 );
18 $this->assertFalse( $restriction->matches(
19 $this->createMock( Title::class )
20 ) );
21 }
22
23 public function testGetType() {
24 $class = $this->getClass();
25 $restriction = new $class( 1, 2 );
26 $this->assertEquals( 'action', $restriction->getType() );
27 }
28
29 /**
30 * @inheritDoc
31 */
32 protected function getClass() {
33 return ActionRestriction::class;
34 }
35 }