Alcaeus\MongoDbAdapter\Tests\Mongo\MongoDateTest::testCreate PHP Method

testCreate() public method

public testCreate ( )
    public function testCreate()
    {
        $date = new \MongoDate(1234567890, 123456);
        $this->assertAttributeSame(1234567890, 'sec', $date);
        $this->assertAttributeSame(123000, 'usec', $date);
        $this->assertSame('0.12300000 1234567890', (string) $date);
        $dateTime = $date->toDateTime();
        $this->assertSame(1234567890, $dateTime->getTimestamp());
        $this->assertSame('123000', $dateTime->format('u'));
        return $date;
    }