Skip to content

Commit

Permalink
fixed test cases for last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Feb 23, 2014
1 parent 01c9a11 commit 5d873dd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions _test/tests/inc/common_pageinfo.test.php
Expand Up @@ -38,6 +38,7 @@ function _get_expected_pageinfo() {
$info['writable'] = true;
$info['editable'] = true;
$info['lastmod'] = false;
$info['currentrev'] = false;
$info['meta'] = array();
$info['ip'] = null;
$info['user'] = null;
Expand Down Expand Up @@ -77,6 +78,7 @@ function test_basic_existingpage(){
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
$info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);

$this->assertEquals($info, pageinfo());
Expand All @@ -101,6 +103,7 @@ function test_anonymoususer(){
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
$info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);
$info['rev'] = '';

Expand Down Expand Up @@ -131,6 +134,7 @@ function test_rev(){
$info['namespace'] = 'wiki';
$info['meta'] = p_get_metadata($ID);
$info['rev'] = $REV;
$info['currentrev'] = $rev;
$info['filepath'] = str_replace('pages','attic',substr($filename,0,-3).$REV.'.txt.gz');

$this->assertEquals($info, pageinfo());
Expand All @@ -153,6 +157,7 @@ function test_range(){
$info['namespace'] = 'wiki';
$info['exists'] = true;
$info['lastmod'] = $rev;
$info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);
$info['filepath'] = $filename;

Expand Down Expand Up @@ -197,6 +202,7 @@ function test_editor_and_externaledits(){
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
$info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID); // need $INFO set correctly for addLogEntry()

global $INFO;
Expand Down Expand Up @@ -226,6 +232,7 @@ function test_editor_and_externaledits(){
touch($filename,$now);

$info['lastmod'] = $now;
$info['currentrev'] = $now;
$info['meta']['last_change'] = false;
$info['ip'] = null;
$info['user'] = null;
Expand All @@ -251,6 +258,7 @@ function test_draft(){
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
$info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);

// setup a draft, make it more recent than the current page
Expand Down

0 comments on commit 5d873dd

Please sign in to comment.