From 8f87a017a1a3f5e1f0eb04e181fde17809c216d0 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Mon, 1 Oct 2012 09:55:32 +0000 Subject: [PATCH] Fix tests for Thread class Fix tests that affect auto generation of the last token field --- .../tests/server_side/webim/libs/classes/ThreadTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/messenger/tests/server_side/webim/libs/classes/ThreadTest.php b/src/messenger/tests/server_side/webim/libs/classes/ThreadTest.php index 4014b082..77087d50 100644 --- a/src/messenger/tests/server_side/webim/libs/classes/ThreadTest.php +++ b/src/messenger/tests/server_side/webim/libs/classes/ThreadTest.php @@ -145,6 +145,7 @@ class ThreadTest extends PHPUnit_Framework_TestCase { // Check thread $this->assertNotEmpty($thread); $this->assertNotEmpty($thread->id); + $this->assertNotEmpty($thread->lastToken); // Check if thread in database $this->assertEquals(1, $this->_helper_getThreadCount($thread->id)); @@ -195,8 +196,8 @@ class ThreadTest extends PHPUnit_Framework_TestCase { // assertTrue use instead of assertEmpty because of PHPUnit don't work correctly with __isset magic method // Property exists in internal Thread::$propertyMap property but not set - $this->assertTrue(empty($thread->lastToken)); - $this->assertFalse(isset($thread->lastToken)); + $this->assertTrue(empty($thread->lastRevision)); + $this->assertFalse(isset($thread->lastRevision)); // Property does not exists $this->assertTrue(empty($thread->someFakeProp));