You are here

public function DurationServiceTest::testgetSecondsFromDateInterval in Duration Field 8.2

Same name and namespace in other branches
  1. 3.0.x tests/src/Unit/Service/DurationServiceTest.php \Drupal\Tests\duration_field\Unit\Service\DurationServiceTest::testgetSecondsFromDateInterval()

@covers ::getSecondsFromDateInterval @dataProvider getSecondsFromDateIntervalDataProvider

File

tests/src/Unit/Service/DurationServiceTest.php, line 262

Class

DurationServiceTest
@coversDefaultClass \Drupal\duration_field\Service\DurationService @group duration_field

Namespace

Drupal\Tests\duration_field\Unit\Service

Code

public function testgetSecondsFromDateInterval($input, $expectedResponse, $message) {
  $duration_service = new DurationService();
  $response = $duration_service
    ->getSecondsFromDateInterval($input);
  $this
    ->assertSame($response, $expectedResponse, $message);
}