コード例 #1
0
 public function handleRequest(HttpRequestA $oHttpRequest)
 {
     $oModel = new StaticFileModel();
     $oModel->setFilePath($this->sFilePath);
     return $oModel;
 }
コード例 #2
0
ファイル: getFilePathTest.php プロジェクト: bogdananton/vsc
 public function testBasicGetFilePath()
 {
     $o = new StaticFileModel();
     $o->setFilePath(__FILE__);
     $this->assertEquals(__FILE__, $o->getFilePath());
 }
コード例 #3
0
 public function testGetLastModifiedMatchesFilemtimeOfFile()
 {
     $o = new StaticFileModel();
     $o->setFilePath(__FILE__);
     $this->assertEquals(date('Y-m-d G:i:s', filemtime(__FILE__)), $o->getLastModified());
 }
コード例 #4
0
 public function testBasic__get()
 {
     $o = new StaticFileModel();
     $o->setFilePath(__FILE__);
     $this->assertEquals(file_get_contents(__FILE__), $o->getFileContent());
 }
コード例 #5
0
ファイル: getFileNameTest.php プロジェクト: bogdananton/vsc
 public function testGetFileNameMatchesAfterSet()
 {
     $o = new StaticFileModel();
     $o->setFilePath(__FILE__);
     $this->assertEquals(basename(__FILE__), $o->getFileName());
 }