You are here

public function RoleSplitFilterTest::filterReadProvider in Config Role Split 8

1 call to RoleSplitFilterTest::filterReadProvider()
RoleSplitFilterTest::testFilterReadMultiple in src/Tests/RoleSplitFilterTest.php
Test that the filter reads multiple objects correctly.

File

src/Tests/RoleSplitFilterTest.php, line 125

Class

RoleSplitFilterTest
Class SplitFilterTest.

Namespace

Drupal\config_role_split\Tests

Code

public function filterReadProvider() {
  return [
    [
      'split',
      [
        'test' => [
          'can test',
        ],
      ],
      'user.role.test',
      [
        'id' => 'test',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
      [
        'id' => 'test',
        'permissions' => [
          'a tester',
          'can test',
          'without a doubt',
        ],
      ],
    ],
    [
      'fork',
      [
        'test' => [
          'can test',
        ],
      ],
      'user.role.test',
      [
        'id' => 'test',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
      [
        'id' => 'test',
        'permissions' => [
          'a tester',
          'can test',
          'without a doubt',
        ],
      ],
    ],
    [
      'exclude',
      [
        'test' => [
          'can test',
        ],
      ],
      'user.role.test',
      [
        'id' => 'test',
        'permissions' => [
          'a tester',
          'can test',
          'without a doubt',
        ],
      ],
      [
        'id' => 'test',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
    ],
    [
      'split',
      [
        'other' => [
          'can test too',
        ],
        'yet' => [
          'no',
        ],
      ],
      'user.role.other',
      [
        'id' => 'other',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
      [
        'id' => 'other',
        'permissions' => [
          'a tester',
          'can test too',
          'without a doubt',
        ],
      ],
    ],
    [
      'fork',
      [
        'other' => [
          'can test too',
        ],
        'yet' => [
          'no',
        ],
      ],
      'user.role.other',
      [
        'id' => 'other',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
      [
        'id' => 'other',
        'permissions' => [
          'a tester',
          'can test too',
          'without a doubt',
        ],
      ],
    ],
    [
      'exclude',
      [
        'other' => [
          'can test too',
        ],
        'yet' => [
          'no',
        ],
      ],
      'user.role.other',
      [
        'id' => 'other',
        'permissions' => [
          'a tester',
          'can test too',
          'without a doubt',
        ],
      ],
      [
        'id' => 'other',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
    ],
    [
      'split',
      [
        'test' => [
          'can test',
        ],
        'other' => [
          'can test too',
        ],
        'yet' => [
          'no',
        ],
      ],
      'user.role.unrelated',
      [
        'id' => 'unrelated',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
      [
        'id' => 'unrelated',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
    ],
    [
      'fork',
      [
        'test' => [
          'can test',
        ],
        'other' => [
          'can test too',
        ],
        'yet' => [
          'no',
        ],
      ],
      'user.role.unrelated',
      [
        'id' => 'unrelated',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
      [
        'id' => 'unrelated',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
    ],
    [
      'exclude',
      [
        'test' => [
          'can test',
        ],
        'other' => [
          'can test too',
        ],
        'yet' => [
          'no',
        ],
      ],
      'user.role.unrelated',
      [
        'id' => 'unrelated',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
      [
        'id' => 'unrelated',
        'permissions' => [
          'a tester',
          'without a doubt',
        ],
      ],
    ],
  ];

  // @codingStandardsIgnoreEnd
}