Skip to content

Commit

Permalink
closes issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
desolat committed Aug 11, 2011
1 parent 69e34be commit 8f3fcd1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions _test/pagemove.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function setUp() {

$text = <<<EOT
[[$this->movedId|$this->movedId]]
[[:$this->movedId|:$this->movedId]]
[[.current_ns:test_page|.current_ns:test_page]]
[[.:current_ns:test_page|.:current_ns:test_page]]
[[..parent_ns:current_ns:test_page|..parent_ns:current_ns:test_page]]
Expand All @@ -68,6 +69,7 @@ function setUp() {

$text = <<<EOT
[[$this->movedId|$this->movedId]]
[[:$this->movedId|:$this->movedId]]
[[..current_ns:test_page|..current_ns:test_page]]
[[..:current_ns:test_page|..:current_ns:test_page]]
[[test_page|test_page]]
Expand Down Expand Up @@ -97,6 +99,7 @@ function setUp() {

$text = <<<EOT
[[$this->movedId|$this->movedId]]
[[:$this->movedId|:$this->movedId]]
[[.current_ns:test_page|.current_ns:test_page]]
[[.:current_ns:test_page|.:current_ns:test_page]]
[[test_page|test_page]]
Expand All @@ -121,6 +124,7 @@ function setUp() {

$text = <<<EOT
[[$this->movedId|$this->movedId]]
[[:$this->movedId|:$this->movedId]]
[[..:..current_ns:test_page|..:..current_ns:test_page]]
[[..:..:current_ns:test_page|..:..:current_ns:test_page]]
[[test_page|test_page]]
Expand Down Expand Up @@ -193,6 +197,7 @@ function test_move_page_in_same_ns() {
$newContent = rawWiki($this->parentBacklinkingId);
$expectedContent = <<<EOT
[[.:current_ns:new_page|$this->movedId]]
[[.:current_ns:new_page|:$this->movedId]]
[[.:current_ns:new_page|.current_ns:test_page]]
[[.:current_ns:new_page|.:current_ns:test_page]]
[[.:current_ns:new_page|..parent_ns:current_ns:test_page]]
Expand All @@ -219,6 +224,7 @@ function test_move_page_in_same_ns() {
$newContent = rawWiki($this->currentNsBacklinkingId);
$expectedContent = <<<EOT
[[new_page|$this->movedId]]
[[new_page|:$this->movedId]]
[[new_page|..current_ns:test_page]]
[[new_page|..:current_ns:test_page]]
[[new_page|test_page]]
Expand Down Expand Up @@ -249,6 +255,7 @@ function test_move_page_in_same_ns() {
$newContent = rawWiki($this->otherBacklinkingId);
$expectedContent = <<<EOT
[[parent_ns:current_ns:new_page|$this->movedId]]
[[$newId|:$this->movedId]]
[[.current_ns:test_page|.current_ns:test_page]]
[[.:current_ns:test_page|.:current_ns:test_page]]
[[test_page|test_page]]
Expand Down Expand Up @@ -308,6 +315,7 @@ function test_move_page_to_parallel_ns() {
$newContent = rawWiki($this->parentBacklinkingId);
$expectedContent = <<<EOT
[[.:parallel_ns:new_page|$this->movedId]]
[[.:parallel_ns:new_page|:$this->movedId]]
[[.:parallel_ns:new_page|.current_ns:test_page]]
[[.:parallel_ns:new_page|.:current_ns:test_page]]
[[.:parallel_ns:new_page|..parent_ns:current_ns:test_page]]
Expand All @@ -334,6 +342,7 @@ function test_move_page_to_parallel_ns() {
$newContent = rawWiki($this->currentNsBacklinkingId);
$expectedContent = <<<EOT
[[parent_ns:parallel_ns:new_page|$this->movedId]]
[[$newId|:$this->movedId]]
[[parent_ns:parallel_ns:new_page|..current_ns:test_page]]
[[parent_ns:parallel_ns:new_page|..:current_ns:test_page]]
[[parent_ns:parallel_ns:new_page|test_page]]
Expand Down Expand Up @@ -364,6 +373,7 @@ function test_move_page_to_parallel_ns() {
$newContent = rawWiki($this->otherBacklinkingId);
$expectedContent = <<<EOT
[[parent_ns:parallel_ns:new_page|$this->movedId]]
[[$newId|:$this->movedId]]
[[.current_ns:test_page|.current_ns:test_page]]
[[.:current_ns:test_page|.:current_ns:test_page]]
[[test_page|test_page]]
Expand Down Expand Up @@ -425,6 +435,7 @@ function test_move_page_to_parent_ns() {
$newContent = rawWiki($this->parentBacklinkingId);
$expectedContent = <<<EOT
[[new_page|$this->movedId]]
[[new_page|:$this->movedId]]
[[new_page|.current_ns:test_page]]
[[new_page|.:current_ns:test_page]]
[[new_page|..parent_ns:current_ns:test_page]]
Expand All @@ -451,6 +462,7 @@ function test_move_page_to_parent_ns() {
$newContent = rawWiki($this->currentNsBacklinkingId);
$expectedContent = <<<EOT
[[parent_ns:new_page|$this->movedId]]
[[$newId|:$this->movedId]]
[[parent_ns:new_page|..current_ns:test_page]]
[[parent_ns:new_page|..:current_ns:test_page]]
[[parent_ns:new_page|test_page]]
Expand Down Expand Up @@ -481,6 +493,7 @@ function test_move_page_to_parent_ns() {
$newContent = rawWiki($this->otherBacklinkingId);
$expectedContent = <<<EOT
[[parent_ns:new_page|$this->movedId]]
[[$newId|:$this->movedId]]
[[.current_ns:test_page|.current_ns:test_page]]
[[.:current_ns:test_page|.:current_ns:test_page]]
[[test_page|test_page]]
Expand Down

0 comments on commit 8f3fcd1

Please sign in to comment.