public function testProcessStreamDataRedis() { $version = explode('.', PHP_VERSION); if (!($version[0] >= 5 && $version[1] >= 3)) { //error_log("PHP version less than 5.3, Skipping Redis Tests..."); return; } if (getenv('WITH_REDIS') !== false) { if ($this->DEBUG) { print "NOTE: Running redis test againt a local redis server\n"; } $this->setUpTwitterData(); $this->setUpData('true'); $stream_process = new ConsumerStreamProcess(); $stream_process->STIME = 0; // no data in the queue $queue = new StreamMessageQueueRedis(); // items in the queue $retweet_test_data = file_get_contents($this->test_dir . "retweet1.json"); $queue->enqueueStatus($retweet_test_data); $stream_process->process($queue); // now test that both users have been added $user = $this->user_dao->getDetails(19202541, 'twitter'); $this->assertEqual($user->user_id, 19202541); $user = $this->user_dao->getDetails(17567533, 'twitter'); $this->assertEqual($user->user_id, 17567533); // check post RT count $post = $this->post_dao->getPost(3.647968240468787E+16, 'twitter'); $this->assertEqual($post->retweet_count_cache, 1); } }