get_recently_viewed($GLOBALS['current_user']->id, 'Contacts'); $expected = $max > 10 ? 10 : $max; $history_count = count($history); $this->assertTrue($history_count <= $expected, "Recently viewed list is not as expected: History count = $history_count, and expected = $expected"); } // Currently, getBreadCrumbList in BreadCrumbStack.php limits you to 10 /* * @group bug40019 */ public function testModuleMenuLastViewedForAll() { global $sugar_config; $max = $sugar_config['history_max_viewed']; $tracker = new Tracker(); $history = $tracker->get_recently_viewed($GLOBALS['current_user']->id, ''); $expected = $max > 10 ? 10 : $max; $history_count = count($history); $this->assertTrue($history_count <= $expected, "Recently viewed list is not as expected: History count = $history_count, and expected = $expected"); } }