4 * @covers ChangesListFilterGroup
6 class ChangesListFilterGroupTest
extends MediaWikiTestCase
{
7 // @codingStandardsIgnoreStart
9 * @expectedException MWException
10 * @expectedExceptionMessage Group names may not contain '_'. Use the naming convention: 'camelCase'
12 // @codingStandardsIgnoreEnd
13 public function testReservedCharacter() {
14 new MockChangesListFilterGroup(
16 'type' => 'some_type',
17 'name' => 'group_name',
24 public function testAutoPriorities() {
25 $group = new MockChangesListFilterGroup(
27 'type' => 'some_type',
28 'name' => 'groupName',
29 'isFullCoverage' => true,
32 [ 'name' => 'hidefoo' ],
33 [ 'name' => 'hidebar' ],
34 [ 'name' => 'hidebaz' ],
39 $filters = $group->getFilters();
48 return $f->getPriority();
50 array_values( $filters )
55 // Get without warnings
56 public function testGetFilter() {
57 $group = new MockChangesListFilterGroup(
59 'type' => 'some_type',
60 'name' => 'groupName',
61 'isFullCoverage' => true,
71 $group->getFilter( 'foo' )->getName()
76 $group->getFilter( 'bar' )