[pLog-svn] r5300 - plog/branches/lifetype-1.2/class/test/tests/dao
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Tue Apr 10 16:21:58 EDT 2007
Author: oscar
Date: 2007-04-10 16:21:58 -0400 (Tue, 10 Apr 2007)
New Revision: 5300
Modified:
plog/branches/lifetype-1.2/class/test/tests/dao/article_test.class.php
Log:
Test case for mantis issue http://bugs.lifetype.net/view.php?id=1244 -- Article::getComments() and Article::setComments() not using the same internal array.
Modified: plog/branches/lifetype-1.2/class/test/tests/dao/article_test.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/test/tests/dao/article_test.class.php 2007-04-10 19:56:55 UTC (rev 5299)
+++ plog/branches/lifetype-1.2/class/test/tests/dao/article_test.class.php 2007-04-10 20:21:58 UTC (rev 5300)
@@ -2,6 +2,8 @@
lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
lt_include( PLOG_CLASS_PATH."class/dao/article.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
/**
* \ingroup Test
@@ -51,5 +53,26 @@
"but hasExtendedText did not return false!" );
}
}
+
+ /**
+ * Test case for mantis issue http://bugs.lifetype.net/view.php?id=1244,
+ * Articles::setComments() not using the same internal array used by
+ * Articles::getComments()
+ */
+ function testSetCommentsAndGetComments()
+ {
+ // create a dummy comment
+ $c = new UserComment( $this->article->getId(),
+ $this->article->getBlogId(),
+ 0,
+ "topic",
+ "text"
+ );
+
+ // now calling Article::getComments() after Article::setComments() with the dummy comment above
+ // should not return the same
+ $this->article->setComments( Array( $c ));
+ $this->assertEquals( Array( $c ), $this->article->getComments());
+ }
}
?>
\ No newline at end of file
More information about the pLog-svn
mailing list