static function getCase_BlogArticle_TestNormal($controller) { $testNormal = $controller->_getViewTestDefaultData('My Blog', 'blog', 'blog'); $staticData = $controller->getTestStaticData(); $testNormal += array('categories' => $controller->getNormalCategories(), 'archives' => $controller->getNormalArchives(), 'recent_posts' => $controller->getNormalRecentPosts(), 'rss_url' => 'http://rss', 'article' => array('title' => 'Tom & <strong>Jerry</strong>', 'link' => 'http://www.blog.com/article', 'comments' => $controller->getNormalComments(), 'comment_post_url' => 'http://commentposturl', 'snippet' => $staticData['content'], 'short_description' => Helper_ViewTest::getLoremIpsumP(1) . "\n" . Helper_ViewTest::getLoremIpsumP(1), 'timestamp' => 1, 'author' => 'Alice', 'categories' => $controller->getNormalCategories(), 'is_complete' => FALSE, 'comment_form' => $controller->getCommentForm(), 'image' => $controller->resource_url . '/images/test/article1.jpg', 'images' => array($controller->resource_url . '/images/test/article1.jpg', $controller->resource_url . '/images/test/article1b.jpg')), 'related_posts' => $controller->getNormalRelatedPosts(), 'prev_next_posts' => $controller->getNormalPrevNextPosts()); return $testNormal; }
static function getCase_StorePaymentNotif_TestNormal($controller) { $testNormal = $controller->_getViewTestDefaultData('Page Payment Notif', 'payment_notif', 'payment_notif'); $bank = <<<EOD <ul> <li>ABC 001-001-001</li> <li>XYZ 002-002-002</li> </ul> EOD; $testNormal['payment_instruction'] = Helper_ViewTest::getLoremIpsumP(3) . $bank; $testNormal['bank_accounts'] = $controller->getTestObjs('BankAccount', 1, 3); return $testNormal; }
static function getTestGeneralCategory($controller, $idx) { $arr = array('id' => $idx, 'parent_id' => $idx % 2 ? $idx * 10 : 0, 'title' => "General Category {$idx}", 'description' => Helper_ViewTest::getLoremIpsumP(2) . "\n" . Helper_ViewTest::getLoremIpsumP(1), 'short_description' => Helper_ViewTest::getLoremIpsumP(1) . "\n" . Helper_ViewTest::getLoremIpsumP(1), 'images' => array($controller->resource_url . "/images/test/general_category_{$idx}a.jpg", $controller->resource_url . "/images/test/general_category_{$idx}b.jpg"), 'link' => "http://general_category{$idx}"); $arr = array_merge($arr, Helper_ViewTest::getAdditionalTestFields($controller, 'general_categories', $idx)); return $arr; }