public function testGetAllRecordsWithLECondition() { $this->seed(['count' => ['N' => 10]]); $this->seed(['count' => ['N' => 9]]); $this->seed(['count' => ['N' => 11]]); $items = $this->testModel->where('count', '<=', 10)->get()->toArray(); $this->assertEquals(2, count($items)); }
public function studentresult() { $zhang_id = $_GET['id']; $username = Cookie::get('username'); $userid = Cookie::get('userid'); $usertype = Cookie::get('usertype'); $test = new TestModel(); $testlist = $test->where("zhang_id='{$zhang_id}'")->select(); $student_test = new Student_testModel(); $student_testlist = $student_test->where("user_id='{$userid}'")->find(); $zhang = new ZhangModel(); $zhanglist = $zhang->where("zhang_id='{$zhang_id}'")->find(); $course_id = $zhanglist['course_id']; $course = new CourseModel(); $courselist = $course->where("course_id='{$course_id}'")->find(); $this->assign('username', $username); $this->assign('userid', $userid); $this->assign('usertype', $usertype); $this->assign('zhang', $zhanglist); $this->assign('student_test', $student_testlist); $this->assign('testlist', $testlist); $this->assign('course', $courselist); $this->display(); }