/**
* Tests that object methods are chainable.
*
* @covers ::__call
*/
public function testChainable() { $tz =
new \
DateTimeZone(date_default_timezone_get());
$date =
new DrupalDateTime('now',
$tz,
['langcode' => 'en'
]);
$date->
setTimestamp(12345678
);
$rendered =
$date->
render();
$this->
assertEquals('1970-05-24 07:21:18 Australia/Sydney',
$rendered);
$date->
setTimestamp(23456789
);
$rendered =
$date->
setTimezone(new \
DateTimeZone('America/New_York'
))->
render();
$this->
assertEquals('1970-09-29 07:46:29 America/New_York',
$rendered);
} /**
* Tests that non-chainable methods work.
*
* @covers ::__call
*/