| @@ 20-35 (lines=16) @@ | ||
| 17 | { |
|
| 18 | protected static $fixture_file = 'FileFormBuilderTest.yml'; |
|
| 19 | ||
| 20 | public function setUp() |
|
| 21 | { |
|
| 22 | parent::setUp(); |
|
| 23 | ||
| 24 | // Set backend and base url |
|
| 25 | TestAssetStore::activate('FileFormBuilderTest'); |
|
| 26 | ||
| 27 | /** @var File $testfile */ |
|
| 28 | $testfile = $this->objFromFixture(File::class, 'file1'); |
|
| 29 | $testfile->setFromLocalFile(__DIR__ .'/fixtures/testfile.txt', 'files/testfile.txt'); |
|
| 30 | $testfile->write(); |
|
| 31 | ||
| 32 | /** @var Image $testimage */ |
|
| 33 | $testimage = $this->objFromFixture(Image::class, 'image1'); |
|
| 34 | $testimage->setFromLocalFile(__DIR__.'/fixtures/testimage.png', 'files/testimage.png'); |
|
| 35 | } |
|
| 36 | ||
| 37 | public function tearDown() |
|
| 38 | { |
|
| @@ 21-36 (lines=16) @@ | ||
| 18 | { |
|
| 19 | protected static $fixture_file = 'FileFormBuilderTest.yml'; |
|
| 20 | ||
| 21 | public function setUp() |
|
| 22 | { |
|
| 23 | parent::setUp(); |
|
| 24 | ||
| 25 | // Set backend and base url |
|
| 26 | TestAssetStore::activate('FileFormBuilderTest'); |
|
| 27 | ||
| 28 | /** @var File $testfile */ |
|
| 29 | $testfile = $this->objFromFixture(File::class, 'file1'); |
|
| 30 | $testfile->setFromLocalFile(__DIR__ . '/fixtures/testfile.txt', 'files/testfile.txt'); |
|
| 31 | $testfile->write(); |
|
| 32 | ||
| 33 | /** @var Image $testimage */ |
|
| 34 | $testimage = $this->objFromFixture(Image::class, 'image1'); |
|
| 35 | $testimage->setFromLocalFile(__DIR__ . '/fixtures/testimage.png', 'files/testimage.png'); |
|
| 36 | } |
|
| 37 | ||
| 38 | public function tearDown() |
|
| 39 | { |
|