protected function check_current_mark($mark) { if (is_null($mark)) { $this->assertNull($this->quba->get_question_mark($this->slot)); } else { if ($mark == 0) { // PHP will think a null mark and a mark of 0 are equal, // so explicity check not null in this case. $this->assertNotNull($this->quba->get_question_mark($this->slot)); } $this->assertEquals($mark, $this->quba->get_question_mark($this->slot), 'Expected mark and actual mark differ.', 1.0E-6); } }
/** * Gets the mark for a slot from the quba * * @param int $slot * @return number|null */ public function get_slot_mark($slot) { return $this->quba->get_question_mark($slot); }