/** * Generic getter for tests of both types * * @param int $id Test ID * @param string $what Optional. Which kind of test. Defaults to click * * @return array|bool */ public static function test($id, $what = 'click') { if (self::is_price($what)) { return price_test::read($id); } return test::read($id); }
/** * Add a test * * @since 0.0.9 * * @access protected * * @param array $sequence */ protected function add_test($sequence) { $a_or_b = $this->a_or_b($sequence, false); $group = price_group::read($sequence['group_ID']); if (is_array($group)) { $test_id = $this->get_test_id($sequence, $a_or_b); $test = test::read($test_id); $test_details = \ingot\testing\utility\price::price_detail($test_id, $a_or_b, $sequence['ID'], $group); $this->price_cookie[$sequence['ID']] = $test_details; } }