Merge pull request #652 from getgrav/feature/fix-testing-separate-pages-folder

Fix testing separate pages folder
This commit is contained in:
Flavio Copes 2016-02-01 15:08:48 +01:00
commit ddaca8a312
2 changed files with 6 additions and 6 deletions

View File

@ -44,7 +44,7 @@ $grav = Grav::instance(
$grav['uri']->init();
$grav['debugger']->init();
$grav['assets']->init();
$grav['config']->set('system.cache.enabled', false);
// Set default $_SERVER value used for nonces
empty( $_SERVER['HTTP_CLIENT_IP'] ) && $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.1';

View File

@ -27,9 +27,9 @@ class PagesTest extends \Codeception\TestCase\Test
$this->pages = $this->grav['pages'];
/** @var UniformResourceLocator $locator */
// $locator = $this->grav['locator'];
// $locator->addPath('page', '', 'tests/fake/simple-site/user/pages', false);
// $this->pages->init();
$locator = $this->grav['locator'];
$locator->addPath('page', '', 'tests/fake/simple-site/user/pages', false);
$this->pages->init();
}
public function testAll()
@ -43,7 +43,7 @@ class PagesTest extends \Codeception\TestCase\Test
{
$list = $this->pages->getList();
$this->assertTrue(is_array($list));
// $this->assertSame($list['/home'], 'Home');
// $this->assertSame($list['/blog'], 'Blog');
$this->assertSame($list['/'], 'Home');
$this->assertSame($list['/blog'], 'Blog');
}
}