<?php
+use Wikimedia\TestingAccessWrapper;
+
/**
* @covers ChangesListFilter
*/
'filters' => [],
]
);
+ }
+
+ // @codingStandardsIgnoreStart
+ /**
+ * @expectedException MWException
+ * @expectedExceptionMessage Filter names may not contain '_'. Use the naming convention: 'lowercase'
+ */
+ // @codingStandardsIgnoreEnd
+ public function testReservedCharacter() {
+ $filter = new MockChangesListFilter(
+ [
+ 'group' => $this->group,
+ 'name' => 'some_name',
+ 'priority' => 1,
+ ]
+ );
+ }
+
+ // @codingStandardsIgnoreStart
+ /**
+ * @expectedException MWException
+ * @expectedExceptionMessage Two filters in a group cannot have the same name: 'somename'
+ */
+ // @codingStandardsIgnoreEnd
+ public function testDuplicateName() {
+ new MockChangesListFilter(
+ [
+ 'group' => $this->group,
+ 'name' => 'somename',
+ 'priority' => 1,
+ ]
+ );
+ new MockChangesListFilter(
+ [
+ 'group' => $this->group,
+ 'name' => 'somename',
+ 'priority' => 2,
+ ]
+ );
}
/**