public function AgreementTest::frequencyTimestampProvider in Agreement 8.2
Same name and namespace in other branches
- 3.0.x tests/src/Unit/Entity/AgreementTest.php \Drupal\Tests\agreement\Unit\Entity\AgreementTest::frequencyTimestampProvider()
Provides various settings and expected values.
Return value
array An array of test arguments.
File
- tests/
src/ Unit/ Entity/ AgreementTest.php, line 88
Class
- AgreementTest
- Tests methods on the agreement entity.
Namespace
Drupal\Tests\agreement\Unit\EntityCode
public function frequencyTimestampProvider() {
$defaults = Agreement::getDefaultSettings();
$no_reset_date = self::DEFAULT_AGREEMENT_SETTINGS;
unset($no_reset_date['reset_date']);
$frequency_set = self::DEFAULT_AGREEMENT_SETTINGS;
$frequency_set['frequency'] = 3600;
return [
'no settings provided' => [
0,
$defaults,
],
'default agreement' => [
0,
self::DEFAULT_AGREEMENT_SETTINGS,
],
'no reset date' => [
0,
$no_reset_date,
],
'frequency > reset_date' => [
time(),
$frequency_set,
],
];
}