Drupal 8  8.0.2
DateTest Class Reference
Inheritance diagram for DateTest:

Public Member Functions

 testFormatInterval ($interval, $granularity, $expected, $langcode=NULL)
 
 providerTestFormatInterval ()
 
 testFormatIntervalZeroSecond ()
 
 testGetSampleDateFormats ()
 
 testFormatTimeDiffUntil ()
 
 testFormatTimeDiffSince ()
 
 testformatDiff ($expected, $timestamp1, $timestamp2, $options=array())
 
 providerTestFormatDiff ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from UnitTestCase
 setUp ()
 
 getRandomGenerator ()
 
 assertArrayEquals (array $expected, array $actual, $message=NULL)
 
 getBlockMockWithMachineName ($machine_name)
 
 getContainerWithCacheTagsInvalidator (CacheTagsInvalidatorInterface $cache_tags_validator)
 
 getClassResolverStub ()
 

Protected Attributes

 $entityManager
 
 $languageManager
 
 $stringTranslation
 
 $requestStack
 
 $dateFormatter
 
 $dateFormatterStub
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Datetime

Member Function Documentation

providerTestFormatDiff ( )

Data provider for testformatDiff().

providerTestFormatInterval ( )

Provides some test data for the format interval test.

testformatDiff (   $expected,
  $timestamp1,
  $timestamp2,
  $options = array() 
)

Tests the formatDiff method.

providerTestFormatDiff

::formatDiff

testFormatInterval (   $interval,
  $granularity,
  $expected,
  $langcode = NULL 
)

Tests the formatInterval method.

providerTestFormatInterval

::formatInterval

testFormatIntervalZeroSecond ( )

Tests the formatInterval method for 0 second.

testFormatTimeDiffSince ( )

Tests the formatTimeDiffSince method.

::formatTimeDiffSince

References Drupal\requestStack().

Here is the call graph for this function:

testFormatTimeDiffUntil ( )

Tests the formatTimeDiffUntil method.

::formatTimeDiffUntil

References Drupal\requestStack().

Here is the call graph for this function:

testGetSampleDateFormats ( )

Tests the getSampleDateFormats method.

::getSampleDateFormats


The documentation for this class was generated from the following file: