コード例 #1
0
 /**
  * @return void
  */
 public function testOptions()
 {
     $filter = new FileRenameUpload($this->_newFile);
     $this->assertEquals($this->_newFile, $filter->getTarget());
     $this->assertFalse($filter->getUseUploadName());
     $this->assertFalse($filter->getOverwrite());
     $this->assertFalse($filter->getRandomize());
     $filter = new FileRenameUpload(array('target' => $this->_oldFile, 'use_upload_name' => true, 'overwrite' => true, 'randomize' => true));
     $this->assertEquals($this->_oldFile, $filter->getTarget());
     $this->assertTrue($filter->getUseUploadName());
     $this->assertTrue($filter->getOverwrite());
     $this->assertTrue($filter->getRandomize());
 }