PhpOffice\PhpPresentation\Shape\Comment::setDate PHP Method

setDate() public method

public setDate ( integer $dtComment ) : Comment
$dtComment integer timestamp of the comment
return Comment
    public function setDate($dtComment)
    {
        $this->dtComment = (int) $dtComment;
        return $this;
    }

Usage Example

Example #1
0
 public function testGetSetDate()
 {
     $expectedDate = time();
     $object = new Comment();
     $this->assertInternalType('int', $object->getDate());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Comment', $object->setDate($expectedDate));
     $this->assertEquals($expectedDate, $object->getDate());
     $this->assertInternalType('int', $object->getDate());
 }