getClass(); $restriction = new $class( 1, 2 ); $this->assertFalse( $restriction->matches( $this->createMock( Title::class ) ) ); } public function testGetType() { $class = $this->getClass(); $restriction = new $class( 1, 2 ); $this->assertEquals( 'action', $restriction->getType() ); } /** * @inheritDoc */ protected function getClass() { return ActionRestriction::class; } }