Skip to content
Browse files

Do not echo stuff, these are unit tests.

git-svn-id: http://svn.php.net/repository/pear/packages/DB_NestedSet/trunk@321982 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent a98854c commit 1e099a93460f8a9b550d8e523a93706a2cf3892f Daniel Convissor committed Jan 10, 2012
Showing with 17 additions and 15 deletions.
  1. +6 −4 tests/DB/NestedSet/TestCase.php
  2. +11 −11 tests/DB_NestedSet_APITest.php
View
10 tests/DB/NestedSet/TestCase.php
@@ -108,14 +108,14 @@ function _moveTree__Across($branches, $mvt, $nodecount) {
if ($p['id'] != $mnode['parent']) {
// <DEBUG>
// <DEBUG>
- echo "\n<pre>\n";
+ // echo "\n<pre>\n";
print_r($p);
- echo "\n</pre>\n";
+ // echo "\n</pre>\n";
// </DEBUG>
// <DEBUG>
- echo "\n<pre>\n";
+ // echo "\n<pre>\n";
print_r($mnode);
- echo "\n</pre>\n";
+ // echo "\n</pre>\n";
// </DEBUG>
// </DEBUG>
}
@@ -518,6 +518,8 @@ function _traverseChildRelations($relationTree, $nid, $deep = false, $init = fal
}
function _indentTree($tree) {
+ return;
+
echo "\n";
foreach($tree AS $nid => $node) {
printf('%s %02d-%02d [%02d|%02d|%02d] | %s (%s)',
View
22 tests/DB_NestedSet_APITest.php
@@ -7,7 +7,7 @@ function test_sortMethods() {
// Rootnodes
- echo "<code>";
+ // echo "<code>";
$values['STRNA'] = 'Skireisen';
$skireisen = $this->_NeSe->createRootNode($values, false, true);
@@ -34,55 +34,55 @@ function test_sortMethods() {
$meransen = $this->_NeSe->createSubNode($italien, $values);
- echo "DEFAULT\n";
+ // echo "DEFAULT\n";
$this->_NeSe->setSortMode(NESE_SORT_LEVEL);
$allnodes_default = $this->_NeSe->getAllNodes(true);
$this->_indentTree($allnodes_default);
- echo "BY NAME\n";
+ // echo "BY NAME\n";
$this->_NeSe->setSortMode(NESE_SORT_LEVEL);
$this->_NeSe->secondarySort = 'STRNA';
$allnodes_byname = $this->_NeSe->getAllNodes(true);
$this->_indentTree($allnodes_byname);
- echo "PREORDER\n";
+ // echo "PREORDER\n";
$this->_NeSe->setSortMode(NESE_SORT_PREORDER);
$this->_NeSe->secondarySort = 'STREH';
$allnodes_preorder = $this->_NeSe->getAllNodes(true);
$this->_indentTree($allnodes_preorder);
- echo "BY NAME PREORDER\n";
+ // echo "BY NAME PREORDER\n";
$this->_NeSe->setSortMode(NESE_SORT_PREORDER);
$this->_NeSe->secondarySort = 'STRNA';
$allnodes_byname_pre = $this->_NeSe->getAllNodes(true);
$this->_indentTree($allnodes_byname_pre);
- echo "BY NAME PREORDER getSubBranch\n";
+ // echo "BY NAME PREORDER getSubBranch\n";
$this->_NeSe->setSortMode(NESE_SORT_PREORDER);
$this->_NeSe->secondarySort = 'STRNA';
$allnodes_preorder = $this->_NeSe->getSubBranch($oesterreich, true);
$this->_indentTree($allnodes_preorder);
- echo "BY NAME PREORDER getSubBranch empty subbranch\n";
+ // echo "BY NAME PREORDER getSubBranch empty subbranch\n";
$this->_NeSe->setSortMode(NESE_SORT_PREORDER);
$this->_NeSe->secondarySort = 'STRNA';
$allnodes_preorder = $this->_NeSe->getSubBranch($grindelwald, true);
$this->_indentTree($allnodes_preorder);
- echo "TRYING getBranch()\n";
+ // echo "TRYING getBranch()\n";
$atbranch = $this->_NeSe->getBranch($oesterreich, true);
$this->_indentTree($atbranch);
- echo "TRYING getChildren()\n";
+ // echo "TRYING getChildren()\n";
$atbranch = $this->_NeSe->getChildren($oesterreich, true);
$this->_indentTree($atbranch);
- echo "TRYING getSubBranch()\n";
+ // echo "TRYING getSubBranch()\n";
$atbranch = $this->_NeSe->getSubBranch($skireisen, true);
$this->_indentTree($atbranch);
- echo "</code>";
+ // echo "</code>";
}
function test_convertModel() {

0 comments on commit 1e099a9

Please sign in to comment.
Something went wrong with that request. Please try again.