private function OpignoModuleScoreTest::getKeepResultsOption in Opigno Learning path 8
Same name and namespace in other branches
- 3.x tests/src/Functional/OpignoModuleScoreTest.php \Drupal\Tests\opigno_learning_path\Functional\OpignoModuleScoreTest::getKeepResultsOption()
Get keep option by key.
Parameters
string $name: Option name.
Return value
int|null Option.
See also
OpignoModule::getKeepResultsOption()
1 call to OpignoModuleScoreTest::getKeepResultsOption()
- OpignoModuleScoreTest::testModuleScoreDisplay in tests/
src/ Functional/ OpignoModuleScoreTest.php - Test Opigno Module score on different pages (achievements, statistics etc).
File
- tests/
src/ Functional/ OpignoModuleScoreTest.php, line 102
Class
- OpignoModuleScoreTest
- Tests Opigno module score display.
Namespace
Drupal\Tests\opigno_learning_path\FunctionalCode
private function getKeepResultsOption($name) {
$options = [
'best' => 0,
'newest' => 1,
'all' => 2,
];
return in_array($name, $options) ? $options[$name] : NULL;
}