Open Journal Systems  3.3.0
FakeFile.php
1 <?php
2 
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
13 
15 
16 class FakeFile extends OrigFile
17 {
18  private $realpath;
19 
20  public function __construct($realpath, $path)
21  {
22  $this->realpath = $realpath;
23  parent::__construct($path, false);
24  }
25 
26  public function isReadable()
27  {
28  return true;
29  }
30 
31  public function getRealpath()
32  {
33  return $this->realpath;
34  }
35 
36  public function getSize()
37  {
38  return 42;
39  }
40 
41  public function getMTime()
42  {
43  return time();
44  }
45 }
Symfony\Component\HttpFoundation\File\File
Definition: lib/vendor/symfony/http-foundation/File/File.php:24
Symfony\Component\HttpFoundation\Tests\File\FakeFile
Definition: FakeFile.php:16
Symfony\Component\HttpFoundation\Tests\File
Definition: FakeFile.php:12
Symfony\Component\HttpFoundation\Tests\File\FakeFile\getRealpath
getRealpath()
Definition: FakeFile.php:31
Symfony\Component\HttpFoundation\Tests\File\FakeFile\isReadable
isReadable()
Definition: FakeFile.php:26
Symfony\Component\HttpFoundation\Tests\File\FakeFile\__construct
__construct($realpath, $path)
Definition: FakeFile.php:20
Symfony\Component\HttpFoundation\Tests\File\FakeFile\getSize
getSize()
Definition: FakeFile.php:36
Symfony\Component\HttpFoundation\Tests\File\FakeFile\getMTime
getMTime()
Definition: FakeFile.php:41