mirror of
https://github.com/flextype/flextype.git
synced 2025-08-08 22:26:46 +02:00
feat(tests): add tests for MediaFiles getFileLocation() method #477
This commit is contained in:
@@ -70,3 +70,9 @@ test('test has() method', function () {
|
||||
$this->assertTrue(flextype('media_files')->has('foo.txt'));
|
||||
$this->assertFalse(flextype('media_files')->has('bar.txt'));
|
||||
});
|
||||
|
||||
test('test getFileLocation() method', function () {
|
||||
flextype('filesystem')->file(PATH['project'] . '/uploads/foo.txt')->put('foo');
|
||||
flextype('filesystem')->file(PATH['project'] . '/uploads/.meta/foo.txt.yaml')->put(flextype('yaml')->encode(['title' => 'Foo', 'description' => '', 'type' => 'text/plain', 'filesize' => 3, 'uploaded_on' => 1603090370, 'exif' => []]));
|
||||
$this->assertStringContainsString('foo.txt', flextype('media_files')->getFileLocation('foo.txt'));
|
||||
});
|
||||
|
Reference in New Issue
Block a user