mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-17 17:58:40 +00:00
test fixes
This commit is contained in:
parent
3c2420c8f4
commit
075184865b
|
|
@ -182,6 +182,8 @@ class MediaMapper extends DataMapperFactory
|
||||||
/**
|
/**
|
||||||
* Get parent collection
|
* Get parent collection
|
||||||
*
|
*
|
||||||
|
* WARNING: THIS IS NOT RETURNING THE COLLECTION OF A MEDIA OBJECT BUT ITS PARENT!!!
|
||||||
|
*
|
||||||
* @param string $path Virtual path
|
* @param string $path Virtual path
|
||||||
*
|
*
|
||||||
* @return ReadMapper
|
* @return ReadMapper
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ trait ApiControllerMediaTrait
|
||||||
files: ['test'],
|
files: ['test'],
|
||||||
account: 1,
|
account: 1,
|
||||||
basePath: '/test',
|
basePath: '/test',
|
||||||
)
|
)->sources
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ final class MediaMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertGreaterThan(0, $media->id);
|
self::assertGreaterThan(0, $media->id);
|
||||||
self::assertEquals($idMedia, $media->id);
|
self::assertEquals($idMedia, $media->id);
|
||||||
|
|
||||||
$collectionR = MediaMapper::getParentCollection($media->getVirtualPath())->execute();
|
$collectionR = MediaMapper::getParentCollection($collection->virtualPath . '/sub/file.txt')->execute();
|
||||||
self::assertEquals($idCollection, $collectionR->id);
|
self::assertEquals($idCollection, $collectionR->id);
|
||||||
self::assertEquals($collection->name, $collectionR->name);
|
self::assertEquals($collection->name, $collectionR->name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user