You are here

protected function ActivityUiTest::randomTime 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::randomTime()

Generate random Time for form element input.

2 calls to ActivityUiTest::randomTime()
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 345

Class

ActivityUiTest
Tests the UI for Activity CRUD operations.

Namespace

Drupal\crm_core_activity\Tests

Code

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