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 getTestSubscription($controller, $idx) { $statuses = array(NULL, 'active', 'expiring', 'expired'); $subscription = array('first_name' => 'John', 'last_name' => 'Smith', 'subscription_id' => "SUB000{$idx}", 'product_name' => "Product {$idx}", 'start_timestamp' => strtotime("{$idx} june 2010"), 'end_timestamp' => strtotime("{$idx} june 2011"), 'next_end_timestamp' => strtotime("{$idx} june 2012"), 'expiry_status' => $statuses[($idx - 1) % count($statuses)], 'is_subscription_archived' => $idx === 5 || $idx === 6 ? TRUE : FALSE, 'hash' => "hash{$idx}"); $subscription = Helper_ViewTest::getAdditionalTestFields($controller, 'subscribe', $idx) + $subscription; return $subscription; }