Author: ts Date: Thu Nov 29 16:35:40 2007 New Revision: 6890 Log: - Fixed test case for double iteration on an ezcConsoleTable instance.
Modified: trunk/ConsoleTools/tests/table_test.php Modified: trunk/ConsoleTools/tests/table_test.php ============================================================================== --- trunk/ConsoleTools/tests/table_test.php [iso-8859-1] (original) +++ trunk/ConsoleTools/tests/table_test.php [iso-8859-1] Thu Nov 29 16:35:40 2007 @@ -853,6 +853,7 @@ $refRow = new ezcConsoleTableRow(); $refRow->borderFormat = "green"; + // First iteration $i = 0; foreach ( $table as $id => $row ) { @@ -860,7 +861,15 @@ $this->assertEquals( $refRow, $row ); } $this->assertEquals( 10, $i, "Not iterated through all rows." ); - $this->assertEquals( 0, $table->key(), "Table not reset at and of iteration." ); + + // Second iteration + $i = 0; + foreach ( $table as $id => $row ) + { + $this->assertEquals( $i++, $id ); + $this->assertEquals( $refRow, $row ); + } + $this->assertEquals( 10, $i, "Not iterated through all rows." ); } public function testGetAccessSuccess() -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components