You are here

protected function ActivityUiTest::randomDate in CRM Core 8

Same name and namespace in other branches
  1. 8.2 modules/crm_core_activity/src/Tests/ActivityUiTest.php \Drupal\crm_core_activity\Tests\ActivityUiTest::randomDate()

Generate random Date for form element input.

2 calls to ActivityUiTest::randomDate()
ActivityUiTest::testActivityOperations in modules/crm_core_activity/src/Tests/ActivityUiTest.php
Test basic UI operations with Activities.
ActivityUiTest::testActivityRevisions in modules/crm_core_activity/src/Tests/ActivityUiTest.php
Test activity revisions.

File

modules/crm_core_activity/src/Tests/ActivityUiTest.php, line 338

Class

ActivityUiTest
Tests the UI for Activity CRUD operations.

Namespace

Drupal\crm_core_activity\Tests

Code

protected function randomDate() {
  return \Drupal::service('date.formatter')
    ->format(REQUEST_TIME + rand(0, 100000), 'custom', 'Y-m-d');
}