public function TimeTest::testItFormatsForWidgetsInExpectedFormat in Time Field For Drupal 8.x / 9.x 2.x
Same name and namespace in other branches
- 8 tests/src/Unit/TimeTest.php \Drupal\Tests\time_field\Unit\TimeTest::testItFormatsForWidgetsInExpectedFormat()
Test it formats for widgets in expected format.
File
- tests/
src/ Unit/ TimeTest.php, line 68
Class
- TimeTest
- Tests time.
Namespace
Drupal\Tests\time_field\UnitCode
public function testItFormatsForWidgetsInExpectedFormat() {
$time = new Time(13, 40, 30);
$this
->assertEquals('13:40:30', $time
->formatForWidget());
}