/** * try to get a Course * */ public function testSearchCourses() { // create $course = $this->_getCourseData(); $courseData = $this->_json->saveCourse($course); // search & check $search = $this->_json->searchCourses($this->_getCourseFilter($courseData['name']), $this->_getPaging()); $this->assertEquals($course['description'], $search['results'][0]['description']); $this->assertEquals(1, $search['totalcount']); // cleanup $this->_json->deleteCourses($courseData['id']); }
/** * try to get a Course */ public function testSearchCourses() { // create $course = $this->_getCourseData(); $courseData = $this->_json->saveCourse($course); $this->_groupsToDelete->addRecord(Tinebase_Group::getInstance()->getGroupById($courseData['group_id'])); // search & check $search = $this->_json->searchCourses($this->_getCourseFilter($courseData['name']), $this->_getPaging()); $this->assertEquals($course['description'], $search['results'][0]['description']); $this->assertEquals(1, $search['totalcount']); // cleanup $this->_json->deleteCourses($courseData['id']); }