rework directories

This commit is contained in:
John Bintz 2010-01-17 21:34:24 -05:00
parent eb840b1d69
commit f3e65a200d
2 changed files with 8 additions and 4 deletions

View File

@ -103,7 +103,7 @@ class PostFixtures {
*/
// @codeCoverageIgnoreStart
function render_admin() {
$fixtures = $this->find_fixtures();
include(dirname(__FILE__) . '/partials/admin.inc');
}
@ -116,6 +116,10 @@ class PostFixtures {
$this->_find_fixtures_recurse($this->wpcontent_path());
foreach ($this->fixtures as &$path) {
$path = str_replace($this->wpcontent_path() . '/', '', $path);
}
return $this->fixtures;
}

View File

@ -350,11 +350,11 @@ class PostFixturesTest extends PHPUnit_Framework_TestCase {
}
$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(
vfsStream::url('root/dir/fixtures/test.json'),
vfsStream::url('root/dir/fixtures/test.inc'),
'dir/fixtures/test.json',
'dir/fixtures/test.inc',
), $pf->find_fixtures());
}
}