public function AuthcacheEnumCombTestCase::testCombine in Authenticated User Page Caching (Authcache) 7.2
Test calculation of combinations.
File
- modules/
authcache_enum/ lib/ Drupal/ authcache_enum/ Tests/ AuthcacheEnumCombTestCase.php, line 95 - Defines a test case covering _authcache_enum_comb.
Class
- AuthcacheEnumCombTestCase
- Unit tests for _authcache_enum_comb.
Namespace
Drupal\authcache_enum\TestsCode
public function testCombine() {
$set = array(
'a',
'b',
'c',
'd',
);
$expect = array(
array(
'a',
),
array(
'b',
),
array(
'c',
),
array(
'd',
),
array(
'a',
'b',
),
array(
'a',
'c',
),
array(
'a',
'd',
),
array(
'b',
'c',
),
array(
'b',
'd',
),
array(
'c',
'd',
),
array(
'a',
'b',
'c',
),
array(
'a',
'b',
'd',
),
array(
'a',
'c',
'd',
),
array(
'b',
'c',
'd',
),
array(
'a',
'b',
'c',
'd',
),
);
$result = _authcache_enum_comb($set);
$this
->assertEqual($expect, $result);
}