rework directories
This commit is contained in:
parent
eb840b1d69
commit
f3e65a200d
@ -103,7 +103,7 @@ class PostFixtures {
|
|||||||
*/
|
*/
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
function render_admin() {
|
function render_admin() {
|
||||||
|
$fixtures = $this->find_fixtures();
|
||||||
|
|
||||||
include(dirname(__FILE__) . '/partials/admin.inc');
|
include(dirname(__FILE__) . '/partials/admin.inc');
|
||||||
}
|
}
|
||||||
@ -116,6 +116,10 @@ class PostFixtures {
|
|||||||
|
|
||||||
$this->_find_fixtures_recurse($this->wpcontent_path());
|
$this->_find_fixtures_recurse($this->wpcontent_path());
|
||||||
|
|
||||||
|
foreach ($this->fixtures as &$path) {
|
||||||
|
$path = str_replace($this->wpcontent_path() . '/', '', $path);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->fixtures;
|
return $this->fixtures;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,11 +350,11 @@ class PostFixturesTest extends PHPUnit_Framework_TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$pf = $this->getMock('PostFixtures', array('wpcontent_path'));
|
$pf = $this->getMock('PostFixtures', array('wpcontent_path'));
|
||||||
$pf->expects($this->once())->method('wpcontent_path')->will($this->returnValue(vfsStream::url('root')));
|
$pf->expects($this->any())->method('wpcontent_path')->will($this->returnValue(vfsStream::url('root')));
|
||||||
|
|
||||||
$this->assertEquals(array(
|
$this->assertEquals(array(
|
||||||
vfsStream::url('root/dir/fixtures/test.json'),
|
'dir/fixtures/test.json',
|
||||||
vfsStream::url('root/dir/fixtures/test.inc'),
|
'dir/fixtures/test.inc',
|
||||||
), $pf->find_fixtures());
|
), $pf->find_fixtures());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user