setAddedDate() public method

Set the added date
public setAddedDate ( DateTime $added ) : Image
$added DateTime When the image was added
return Image
示例#1
0
文件: ImageTest.php 项目: imbo/imbo
 /**
  * @covers Imbo\Model\Image::setAddedDate
  * @covers Imbo\Model\Image::getAddedDate
  */
 public function testCanSetAndGetTheAddedDate()
 {
     $date = $this->getMock('DateTime');
     $this->assertNull($this->image->getAddedDate());
     $this->assertSame($this->image, $this->image->setAddedDate($date));
     $this->assertSame($date, $this->image->getAddedDate());
 }