[pLog-svn] r4312 - plog/branches/lifetype-1.1.3/class/test/tests/dao
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Thu Nov 16 12:53:52 GMT 2006
Author: jondaley
Date: 2006-11-16 12:53:51 +0000 (Thu, 16 Nov 2006)
New Revision: 4312
Modified:
plog/branches/lifetype-1.1.3/class/test/tests/dao/article_test.class.php
plog/branches/lifetype-1.1.3/class/test/tests/dao/commentscommon_test.class.php
Log:
disable my commentscommon test, since it doesn't work. Add a note to the article_test for later developers who are trying to copy it
Modified: plog/branches/lifetype-1.1.3/class/test/tests/dao/article_test.class.php
===================================================================
--- plog/branches/lifetype-1.1.3/class/test/tests/dao/article_test.class.php 2006-11-16 12:50:35 UTC (rev 4311)
+++ plog/branches/lifetype-1.1.3/class/test/tests/dao/article_test.class.php 2006-11-16 12:53:51 UTC (rev 4312)
@@ -12,7 +12,12 @@
{
function setUp()
{
- // build a dummy Article object
+ //
+ // Note: if you are going to copy this code for another test, note that this code
+ // doesn't ever add this article to the database, since if it did, it could
+ // potentially overwrite your real blog data...
+ //
+ // build a dummy Article object
$this->article = new Article(
"dummy topic",
"dummy text",
Modified: plog/branches/lifetype-1.1.3/class/test/tests/dao/commentscommon_test.class.php
===================================================================
--- plog/branches/lifetype-1.1.3/class/test/tests/dao/commentscommon_test.class.php 2006-11-16 12:50:35 UTC (rev 4311)
+++ plog/branches/lifetype-1.1.3/class/test/tests/dao/commentscommon_test.class.php 2006-11-16 12:53:51 UTC (rev 4312)
@@ -20,11 +20,11 @@
$this->articles = new Articles();
- // build a dummy Article object
+ // build a dummy Article object -- need a better way to build this, if we are going to add it to the database, so your blog doesn't get messed up.
$this->article = new Article(
"dummy topic",
"dummy text",
- Array( 1 ), // a dummy category
+ Array( 1 ), // a dummy category
Array( 1 ), // a dummy user
1, // a dummy blog
POST_STATUS_PUBLISHED, // published status
@@ -53,10 +53,10 @@
function testAddComment(){
- $this->assertTrue($this->articles->addArticle($this->article), "Couldn't add article");
- $this->assertTrue($this->article->getId() != null, "Article ID is null");
- $this->assertTrue($this->comment1->getArticleId() != null, "Can't find articleId from comment");
- $this->assertTrue($this->comment2->getArticleId() != null, "Can't find articleId from comment");
+// $this->assertTrue($this->articles->addArticle($this->article), "Couldn't add article");
+// $this->assertTrue($this->article->getId() != null, "Article ID is null");
+// $this->assertTrue($this->comment1->getArticleId() != null, "Can't find articleId from comment");
+// $this->assertTrue($this->comment2->getArticleId() != null, "Can't find articleId from comment");
// $this->assertTrue($this->comments->addComment( $this->comment1 ), "Couldn't add comment1");
More information about the pLog-svn
mailing list