will need post id in fs backend ids
This commit is contained in:
parent
bec05cc7f9
commit
8e4d73b790
|
@ -122,7 +122,7 @@ class ComicPressBackendFilesystem extends ComicPressBackend {
|
|||
$result = $this->find_matching_files($patterns);
|
||||
if (!empty($result)) {
|
||||
$fs = new ComicPressBackendFilesystem();
|
||||
$fs->id = 'filesystem-' . md5($result);
|
||||
$fs->id = 'filesystem-' . $post->ID . '-' . md5($result);
|
||||
$fs->type = $type;
|
||||
$fs->filepath = $result;
|
||||
$return[] = $fs;
|
||||
|
|
|
@ -110,8 +110,8 @@ class ComicPressBackendFilesystemTest extends PHPUnit_Framework_TestCase {
|
|||
$return = $fs->generate_from_post($post);
|
||||
|
||||
$this->assertEquals(2, count($return));
|
||||
$this->assertEquals('filesystem-' . md5('comic'), $return[0]->id);
|
||||
$this->assertEquals('filesystem-' . md5('rss'), $return[1]->id);
|
||||
$this->assertEquals('filesystem-1-' . md5('comic'), $return[0]->id);
|
||||
$this->assertEquals('filesystem-1-' . md5('rss'), $return[1]->id);
|
||||
$this->assertEquals('comic', $return[0]->type);
|
||||
$this->assertEquals('rss', $return[1]->type);
|
||||
$this->assertEquals('comic', $return[0]->filepath);
|
||||
|
|
Loading…
Reference in New Issue