コード例 #1
0
 public function testDateRenameByYear()
 {
     $obj = new DummyEntity();
     $obj->setCreatedAt(new \DateTime('2013-05-21 12:12:12'));
     $propertyMapping = $this->getMappingWithObject($obj);
     $this->assertSame($this->namer->dateRename($propertyMapping, 'some-dir', array('field' => 'createdAt', 'depth' => 'year')), '2013');
 }
コード例 #2
0
 public function testPropertyPostfixRename()
 {
     $obj = new DummyEntity();
     $obj->setTitle('some-title');
     $propertyMapping = $this->getMappingWithObject($obj);
     $this->assertSame($this->namer->propertyPostfixRename($propertyMapping, 'some-name.jpg', array('field' => 'title')), 'some-name-some-title.jpg');
 }