You are here

public function StrToTimeTest::testStrToTimeFormat in Tamper 8

Test converting string to time.

@covers ::tamper

File

tests/src/Unit/Plugin/Tamper/StrToTimeTest.php, line 28

Class

StrToTimeTest
Tests the strtotime plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testStrToTimeFormat() {
  $this
    ->assertEquals(515995200, $this->plugin
    ->tamper('1986-05-09 04:00:00 GMT'));
  $this
    ->assertEquals(515995200, $this->plugin
    ->tamper('May 9, 1986 04:00:00 GMT'));
  $this
    ->assertEquals(515995200, $this->plugin
    ->tamper('Fri, 09 May 1986 04:00:00 GMT'));
}