From 4899a68c92541865e57fe6bc7df9e78a1357aaca Mon Sep 17 00:00:00 2001 From: Gina Trapani Date: Thu, 26 Feb 2015 16:47:53 -0500 Subject: [PATCH] Weekly graph insight improvement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t bury the lede --- .../insights/weeklygraph.php | 28 +-- .../tests/TestOfWeeklyGraphInsight.php | 192 ++++++++---------- 2 files changed, 96 insertions(+), 124 deletions(-) diff --git a/webapp/plugins/insightsgenerator/insights/weeklygraph.php b/webapp/plugins/insightsgenerator/insights/weeklygraph.php index 3fd16753ae..db1d78bd4c 100644 --- a/webapp/plugins/insightsgenerator/insights/weeklygraph.php +++ b/webapp/plugins/insightsgenerator/insights/weeklygraph.php @@ -83,7 +83,7 @@ public function generateInsight(Instance $instance, User $user, $last_week_of_po $posts = array_slice($engaged_posts, 0, 10); if ($total_replies >= $total_likes && $total_replies >= $total_retweets) { - $insight_text = $this->username." really inspired conversations in the past week"; + $insight_headline = $this->username." really inspired conversations"; $lower = array(); if ($total_replies > $total_likes) { $lower[] = $this->terms->getNoun('like', InsightTerms::PLURAL); @@ -92,16 +92,15 @@ public function generateInsight(Instance $instance, User $user, $last_week_of_po $lower[] = $this->terms->getNoun('retweet', InsightTerms::PLURAL); } if (count($lower) == 0) { - $insight_text .= ', getting more '. + $insight_text = $this->username.' got more '. $this->terms->getNoun('reply', InsightTerms::PLURAL)." than anything else."; } else { - $insight_text .= ' — '. $this->terms->getNoun('reply', InsightTerms::PLURAL). - ' outnumbered '.join(' or ', $lower).'.'; + $insight_text = 'In the past week, '. $this->terms->getNoun('reply', InsightTerms::PLURAL). + ' to '.$this->username.' outnumbered '.join(' or ', $lower).'.'; } } else if ($total_likes >= $total_replies && $total_likes >= $total_retweets) { - $insight_text = "Whatever ".$this->username." said in the past week must have been memorable"; - $were = $total_likes == 1 ? 'was' : 'were'; - $insight_text .= ' — there '.$were.' '.number_format($total_likes).' '. + $insight_headline = "Whatever ".$this->username." said must have been memorable"; + $insight_text = 'In the past week, '.$this->username.' got '.number_format($total_likes).' '. $this->terms->getNoun('like', $total_likes==1?InsightTerms::SINGULAR : InsightTerms::PLURAL); $lower = array(); if ($total_likes > $total_replies && $total_replies > 0) { @@ -118,8 +117,8 @@ public function generateInsight(Instance $instance, User $user, $last_week_of_po $insight_text .= ', beating out '.join(' and ', $lower).'.'; } } else { - $insight_text = $this->username. - " shared a lot of things people wanted to amplify in the past week."; + $insight_headline= $this->username. + " shared lots of things people wanted to amplify"; $lower = array(); if ($total_retweets > $total_replies) { $lower[] = $this->terms->getNoun('reply', InsightTerms::PLURAL) . ' by ' @@ -130,22 +129,17 @@ public function generateInsight(Instance $instance, User $user, $last_week_of_po .number_format($total_retweets - $total_likes); } if (count($lower) > 0) { - $insight_text .= ' '.ucfirst($this->terms->getNoun('retweet', InsightTerms::PLURAL)) + $insight_text = 'This past week, '.$this->username."'s " + .$this->terms->getNoun('retweet', InsightTerms::PLURAL) .' outnumbered '.join(' and ', $lower). '.'; } } - $headline = $this->getVariableCopy(array( - "A breakdown of last week's %posts", - "%username's week in %posts", - "Last week in %username's %posts", - )); - $my_insight = new Insight(); $my_insight->slug = 'weekly_graph'; $my_insight->instance_id = $instance->id; $my_insight->date = $this->insight_date; - $my_insight->headline = $headline; + $my_insight->headline = $insight_headline; $my_insight->text = $insight_text; $my_insight->header_image = $user->avatar; $my_insight->filename = basename(__FILE__, ".php"); diff --git a/webapp/plugins/insightsgenerator/tests/TestOfWeeklyGraphInsight.php b/webapp/plugins/insightsgenerator/tests/TestOfWeeklyGraphInsight.php index 653b0173c1..38c3e12767 100644 --- a/webapp/plugins/insightsgenerator/tests/TestOfWeeklyGraphInsight.php +++ b/webapp/plugins/insightsgenerator/tests/TestOfWeeklyGraphInsight.php @@ -86,14 +86,13 @@ public function testWeeklyGraphInsightForTwitter() { $insight_dao = new InsightMySQLDAO(); $today = date ('Y-m-d'); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->debug(Utils::varDumpToString($result)); + //$this->debug(Utils::varDumpToString($result)); $this->assertNotNull($result); $this->assertIsA($result, "Insight"); - $this->assertEqual("@testeriffic's week in tweets", $result->headline); - $this->assertEqual('Whatever @testeriffic said in the past week must have been memorable — there were ' - . '19 favorites, beating out 7 replies and 7 retweets.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); - $this->debug($this->getRenderedInsightInEmail($result)); + $this->assertEqual("Whatever @testeriffic said must have been memorable", $result->headline); + $this->assertEqual('In the past week, @testeriffic got 19 favorites, beating out 7 replies and 7 retweets.', + $result->text); + $this->dumpRenderedInsight($result, $instance, ""); } public function testWeeklyGraphInsightForFacebook() { @@ -128,14 +127,12 @@ public function testWeeklyGraphInsightForFacebook() { $insight_dao = new InsightMySQLDAO(); $today = date ('Y-m-d'); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->debug(Utils::varDumpToString($result)); + //$this->debug(Utils::varDumpToString($result)); $this->assertNotNull($result); $this->assertIsA($result, "Insight"); - $this->assertEqual("tester_fb's week in status updates", $result->headline); - $this->assertEqual('Whatever tester_fb said in the past week must have been memorable '. - '— there were 19 likes, beating out 10 comments.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); - $this->debug($this->getRenderedInsightInEmail($result)); + $this->assertEqual("Whatever tester_fb said must have been memorable", $result->headline); + $this->assertEqual('In the past week, tester_fb got 19 likes, beating out 10 comments.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); } public function testWeeklyGraphInsightWithOneReply() { @@ -164,14 +161,13 @@ public function testWeeklyGraphInsightWithOneReply() { $insight_dao = new InsightMySQLDAO(); $today = date ('Y-m-d'); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->debug(Utils::varDumpToString($result)); + //$this->debug(Utils::varDumpToString($result)); $this->assertNotNull($result); $this->assertIsA($result, "Insight"); - $this->assertEqual("@testeriffic's week in tweets", $result->headline); - $this->assertEqual('@testeriffic really inspired conversations in the past week — ' - . 'replies outnumbered favorites or retweets.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); - $this->debug($this->getRenderedInsightInEmail($result)); + $this->assertEqual("@testeriffic really inspired conversations", $result->headline); + $this->assertEqual('In the past week, replies to @testeriffic outnumbered favorites or retweets.', + $result->text); + $this->dumpRenderedInsight($result, $instance, ""); } public function testWeeklyGraphInsightWithFavorites() { @@ -200,14 +196,12 @@ public function testWeeklyGraphInsightWithFavorites() { $insight_dao = new InsightMySQLDAO(); $today = date ('Y-m-d'); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->debug(Utils::varDumpToString($result)); + //$this->debug(Utils::varDumpToString($result)); $this->assertNotNull($result); $this->assertIsA($result, "Insight"); - $this->assertEqual("@testeriffic's week in tweets", $result->headline); - $this->assertEqual('Whatever @testeriffic said in the past week must have been memorable — '. - 'there were 3 favorites.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); - $this->debug($this->getRenderedInsightInEmail($result)); + $this->assertEqual("Whatever @testeriffic said must have been memorable", $result->headline); + $this->assertEqual('In the past week, @testeriffic got 3 favorites.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); } public function testWeeklyGraphInsightWithRepliesAndFavorites() { @@ -233,17 +227,14 @@ public function testWeeklyGraphInsightWithRepliesAndFavorites() { $insight_dao = new InsightMySQLDAO(); $today = date ('Y-m-d'); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->debug(Utils::varDumpToString($result)); + //$this->debug(Utils::varDumpToString($result)); $this->assertNotNull($result); $this->assertIsA($result, "Insight"); - $this->assertEqual("@testeriffic's week in tweets", $result->headline); - $this->assertEqual('Whatever @testeriffic said in the past week must have been memorable — ' - .'there were 5 favorites, beating out 4 replies.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); - $this->debug($this->getRenderedInsightInEmail($result)); + $this->assertEqual("Whatever @testeriffic said must have been memorable", $result->headline); + $this->assertEqual('In the past week, @testeriffic got 5 favorites, beating out 4 replies.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); } - public function testForCommas() { $instance = new Instance(); $instance->id = 10; @@ -268,10 +259,10 @@ public function testForCommas() { $result = $insight_dao->getInsight('weekly_graph', 10, $today); $this->assertNotNull($result); $this->assertIsA($result, "Insight"); - $this->assertEqual("@testeriffic's week in tweets", $result->headline); - $this->assertEqual('@testeriffic shared a lot of things people wanted to amplify in the past week. ' - . 'Retweets outnumbered replies by 5,820 and favorites by 8,765.', $result->text); - + $this->assertEqual("@testeriffic shared lots of things people wanted to amplify", $result->headline); + $this->assertEqual("This past week, @testeriffic's retweets outnumbered replies by 5,820 and favorites ". + "by 8,765.", $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(); $posts[] = new Post(array( @@ -287,12 +278,11 @@ public function testForCommas() { $result = $insight_dao->getInsight('weekly_graph', 10, $today); $this->assertNotNull($result); $this->assertIsA($result, "Insight"); - $this->assertEqual("@testeriffic's week in tweets", $result->headline); - $this->assertEqual('Whatever @testeriffic said in the past week must have been memorable — ' - . 'there were 999,999 favorites, beating out 4,179 replies and 4,242 retweets.', $result->text); + $this->assertEqual("Whatever @testeriffic said must have been memorable", $result->headline); + $this->assertEqual('In the past week, @testeriffic got 999,999 favorites, beating out 4,179 replies '. + 'and 4,242 retweets.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); - $this->debug($this->getRenderedInsightInEmail($result)); + $this->dumpRenderedInsight($result, $instance, ""); } public function testSkipInsightIfNoActivity() { @@ -346,9 +336,8 @@ public function testForAtLeastThreePosts() { $data = unserialize($result->related_data); $this->assertNull($data['posts']); - $this->assertEqual("@testeriffic's week in tweets", $result->headline); - $this->debug($this->getRenderedInsightInHTML($result)); - $this->debug($this->getRenderedInsightInEmail($result)); + $this->assertEqual("@testeriffic really inspired conversations", $result->headline); + $this->dumpRenderedInsight($result, $instance, ""); } public function testPostLimitAndSorting() { @@ -392,9 +381,7 @@ public function testPostLimitAndSorting() { //print_r($post); $this->assertEqual('cool...', $post->c[0]->v); } - - $this->debug($this->getRenderedInsightInHTML($result)); - $this->debug($this->getRenderedInsightInEmail($result)); + $this->dumpRenderedInsight($result, $instance, ""); } public function testInsightTextsTwitter() { @@ -415,10 +402,10 @@ public function testInsightTextsTwitter() { TimeHelper::setTime(1); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("@testeriffic's week in tweets", $result->headline); - $this->assertEqual('@testeriffic really inspired conversations in the past week — replies outnumbered ' - .'favorites or retweets.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("@testeriffic really inspired conversations", $result->headline); + $this->assertEqual('In the past week, replies to @testeriffic outnumbered favorites or retweets.', + $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 0, @@ -429,10 +416,10 @@ public function testInsightTextsTwitter() { TimeHelper::setTime(2); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("Last week in @testeriffic's tweets", $result->headline); - $this->assertEqual('@testeriffic shared a lot of things people wanted to amplify in the past week. '. - 'Retweets outnumbered replies by 3 and favorites by 3.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("@testeriffic shared lots of things people wanted to amplify", $result->headline); + $this->assertEqual("This past week, @testeriffic's retweets outnumbered replies by 3 and favorites by 3.", + $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 3, @@ -443,10 +430,9 @@ public function testInsightTextsTwitter() { TimeHelper::setTime(3); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("A breakdown of last week's tweets", $result->headline); - $this->assertEqual('@testeriffic really inspired conversations in the past week — '. - 'replies outnumbered favorites.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("@testeriffic really inspired conversations", $result->headline); + $this->assertEqual('In the past week, replies to @testeriffic outnumbered favorites.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 3, @@ -457,10 +443,9 @@ public function testInsightTextsTwitter() { TimeHelper::setTime(4); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("@testeriffic's week in tweets", $result->headline); - $this->assertEqual('@testeriffic really inspired conversations in the past week, getting more replies than '. - 'anything else.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("@testeriffic really inspired conversations", $result->headline); + $this->assertEqual('@testeriffic got more replies than anything else.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 0, @@ -471,10 +456,9 @@ public function testInsightTextsTwitter() { TimeHelper::setTime(5); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("Last week in @testeriffic's tweets", $result->headline); - $this->assertEqual('Whatever @testeriffic said in the past week must have been memorable — '. - 'there were 3 favorites, beating out 2 retweets.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Whatever @testeriffic said must have been memorable", $result->headline); + $this->assertEqual('In the past week, @testeriffic got 3 favorites, beating out 2 retweets.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 0, @@ -484,10 +468,9 @@ public function testInsightTextsTwitter() { ))); $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("Last week in @testeriffic's tweets", $result->headline); - $this->assertEqual('Whatever @testeriffic said in the past week must have been memorable — there were ' - .'3 favorites.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Whatever @testeriffic said must have been memorable", $result->headline); + $this->assertEqual('In the past week, @testeriffic got 3 favorites.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 1, @@ -497,10 +480,10 @@ public function testInsightTextsTwitter() { ))); $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("Last week in @testeriffic's tweets", $result->headline); - $this->assertEqual('Whatever @testeriffic said in the past week must have been memorable — '. - 'there were 3 favorites, beating out 1 reply and 2 retweets.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Whatever @testeriffic said must have been memorable", $result->headline); + $this->assertEqual('In the past week, @testeriffic got 3 favorites, beating out 1 reply and 2 retweets.', + $result->text); + $this->dumpRenderedInsight($result, $instance, ""); } public function testSingularLike() { @@ -520,16 +503,15 @@ public function testSingularLike() { TimeHelper::setTime(1); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("@testeriffic's week in tweets", $result->headline); - $this->assertEqual("Whatever @testeriffic said in the past week must have been memorable — there was 1 favorite.", - $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Whatever @testeriffic said must have been memorable", $result->headline); + $this->assertEqual("In the past week, @testeriffic got 1 favorite.", $result->text); + $this->dumpRenderedInsight($result, $instance, ""); } public function testInsightTextsFacebook() { $instance = new Instance(); $instance->id = 10; - $instance->network_username = 'Jo Thinkup'; + $instance->network_username = 'Jo ThinkUp'; $instance->network = 'facebook'; $insight_dao = new InsightMySQLDAO(); $today = date ('Y-m-d'); @@ -544,10 +526,9 @@ public function testInsightTextsFacebook() { TimeHelper::setTime(1); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("Jo Thinkup's week in status updates", $result->headline); - $this->assertEqual('Jo Thinkup really inspired conversations in the past week — comments outnumbered ' - .'likes or reshares.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Jo ThinkUp really inspired conversations", $result->headline); + $this->assertEqual('In the past week, comments to Jo ThinkUp outnumbered likes or reshares.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 0, @@ -558,10 +539,10 @@ public function testInsightTextsFacebook() { TimeHelper::setTime(2); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("Last week in Jo Thinkup's status updates", $result->headline); - $this->assertEqual('Jo Thinkup shared a lot of things people wanted to amplify in the past week. '. - 'Reshares outnumbered comments by 3 and likes by 3.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Jo ThinkUp shared lots of things people wanted to amplify", $result->headline); + $this->assertEqual("This past week, Jo ThinkUp's reshares outnumbered comments by 3 and likes by 3.", + $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 3, @@ -572,10 +553,9 @@ public function testInsightTextsFacebook() { TimeHelper::setTime(3); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("A breakdown of last week's status updates", $result->headline); - $this->assertEqual('Jo Thinkup really inspired conversations in the past week — '. - 'comments outnumbered likes.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Jo ThinkUp really inspired conversations", $result->headline); + $this->assertEqual('In the past week, comments to Jo ThinkUp outnumbered likes.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 3, @@ -586,10 +566,9 @@ public function testInsightTextsFacebook() { TimeHelper::setTime(4); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("Jo Thinkup's week in status updates", $result->headline); - $this->assertEqual('Jo Thinkup really inspired conversations in the past week, getting more comments than '. - 'anything else.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Jo ThinkUp really inspired conversations", $result->headline); + $this->assertEqual('Jo ThinkUp got more comments than anything else.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 0, @@ -600,10 +579,9 @@ public function testInsightTextsFacebook() { TimeHelper::setTime(5); //set headline to expect $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("Last week in Jo Thinkup's status updates", $result->headline); - $this->assertEqual('Whatever Jo Thinkup said in the past week must have been memorable — '. - 'there were 3 likes, beating out 2 reshares.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Whatever Jo ThinkUp said must have been memorable", $result->headline); + $this->assertEqual('In the past week, Jo ThinkUp got 3 likes, beating out 2 reshares.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 0, @@ -613,10 +591,9 @@ public function testInsightTextsFacebook() { ))); $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("Last week in Jo Thinkup's status updates", $result->headline); - $this->assertEqual('Whatever Jo Thinkup said in the past week must have been memorable — there were ' - .'3 likes.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Whatever Jo ThinkUp said must have been memorable", $result->headline); + $this->assertEqual('In the past week, Jo ThinkUp got 3 likes.', $result->text); + $this->dumpRenderedInsight($result, $instance, ""); $posts = array(new Post(array( 'reply_count_cache' => 1, @@ -626,9 +603,10 @@ public function testInsightTextsFacebook() { ))); $insight_plugin->generateInsight($instance, null, $posts, 3); $result = $insight_dao->getInsight('weekly_graph', 10, $today); - $this->assertEqual("Last week in Jo Thinkup's status updates", $result->headline); - $this->assertEqual('Whatever Jo Thinkup said in the past week must have been memorable — '. - 'there were 3 likes, beating out 1 comment and 2 reshares.', $result->text); - $this->debug($this->getRenderedInsightInHTML($result)); + $this->assertEqual("Whatever Jo ThinkUp said must have been memorable", $result->headline); + $this->assertEqual('In the past week, Jo ThinkUp got 3 likes, beating out 1 comment and 2 reshares.', + $result->text); + + $this->dumpRenderedInsight($result, $instance, ""); } }