public function DurationServiceTest::testcreateEmptyDateInterval in Duration Field 8.2
Same name and namespace in other branches
- 3.0.x tests/src/Unit/Service/DurationServiceTest.php \Drupal\Tests\duration_field\Unit\Service\DurationServiceTest::testcreateEmptyDateInterval()
@covers ::createEmptyDateInterval
File
- tests/
src/ Unit/ Service/ DurationServiceTest.php, line 167
Class
- DurationServiceTest
- @coversDefaultClass \Drupal\duration_field\Service\DurationService @group duration_field
Namespace
Drupal\Tests\duration_field\Unit\ServiceCode
public function testcreateEmptyDateInterval() {
$duration_service = new DurationService();
$response = $duration_service
->createEmptyDateInterval();
$expected_response = new DateInterval('P0M');
$this
->assertEquals($response, $expected_response, 'An empty date interval was successfully created');
}