b63482fc7a8fd957d52223e1069e01c8b7e53144
4 * @covers ChangesListFilter
6 class ChangesListFilterTest
extends MediaWikiTestCase
{
9 public function setUp() {
10 $this->group
= $this->getGroup( [ 'name' => 'group' ] );
15 protected function getGroup( $groupDefinition ) {
16 return new MockChangesListFilterGroup(
18 'isFullCoverage' => true,
19 'type' => 'some_type',
28 * @expectedException MWException
29 * @expectedExceptionMessage Supersets can only be defined for filters in the same group
31 public function testSetAsSupersetOf() {
32 $groupA = $this->getGroup(
46 $groupB = $this->getGroup(
57 $foo = TestingAccessWrapper
::newFromObject( $groupA->getFilter( 'foo' ) );
59 $bar = $groupA->getFilter( 'bar' );
61 $baz = $groupB->getFilter( 'baz' );
63 $foo->setAsSupersetOf( $bar );
64 $this->assertArrayEquals( [
71 /** ordered= */ false,
75 $foo->setAsSupersetOf( $baz );